summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Pérez-Cerezo <gabriel@gpcf.eu>2017-12-25 21:01:10 +0100
committerGabriel Pérez-Cerezo <gabriel@gpcf.eu>2017-12-25 21:01:10 +0100
commit36c4aa784e9275d1419ded0b159b538dadcbb151 (patch)
tree310611d2c48e14390b6c4a36fb607e49e8936852
parentbac6157ffb37f2e67d713ca14eca23adb1a85f55 (diff)
-rw-r--r--init.lua15
-rw-r--r--textures/advboats_inventory.pngbin0 -> 800 bytes
-rw-r--r--textures/advboats_wield.pngbin0 -> 575 bytes
-rw-r--r--textures/boats_inventory.pngbin851 -> 0 bytes
-rw-r--r--textures/boats_wield.pngbin546 -> 0 bytes
5 files changed, 9 insertions, 6 deletions
diff --git a/init.lua b/init.lua
index df54fc5..40d04ed 100644
--- a/init.lua
+++ b/init.lua
@@ -72,6 +72,9 @@ function boat.on_rightclick(self, clicker)
end
clicker:set_detach()
end
+ if not self.selfdriving then
+ minetest.chat_send_player(name,"Press E to save path and enter automatic mode")
+ end
self.driver = clicker
clicker:set_attach(self.object, "",
{x = 0, y = 11, z = -3}, {x = 0, y = 0, z = 0})
@@ -158,7 +161,7 @@ function boat.round_pos(self)
pos.x = math.floor(pos.x+0.5)
pos.z = math.floor(pos.z+0.5)
self.object:setpos(pos)
- minetest.add_entity(pos, "advboats:mark")
+-- minetest.add_entity(pos, "advboats:mark")
end
boat.get_instr_pos = function (instruction)
return {x=instruction[1], y=instruction[2], z=instruction[3]}
@@ -168,7 +171,7 @@ function boat.save_pos(self)
local pos = self.object:getpos()
local o = math.floor(self.object:getyaw()*4/math.pi+0.5)%8
local s = self.v
- minetest.chat_send_all(pos.x.." "..pos.y.." "..pos.z.." "..o.." "..s)
+-- minetest.chat_send_all(pos.x.." "..pos.y.." "..pos.z.." "..o.." "..s)
if not self.instructions then
self.instructions = {}
end
@@ -178,7 +181,7 @@ function boat.save_pos(self)
return
end
local lastpos = self.get_instr_pos(last)
- minetest.chat_send_all("Last position:"..lastpos.x..","..lastpos.y..","..lastpos.z..", Distance to last position: "..vector.distance(pos,lastpos))
+-- minetest.chat_send_all("Last position:"..lastpos.x..","..lastpos.y..","..lastpos.z..", Distance to last position: "..vector.distance(pos,lastpos))
end
@@ -230,7 +233,7 @@ function boat.selfdriving_step(self, dtime)
self.dnext = vector.distance(curpos,nextpos)
end
self.dnext = self.dnext - math.abs(self.v*dtime)
- minetest.chat_send_all(self.dnext)
+-- minetest.chat_send_all(self.dnext)
end
function boat.on_step(self, dtime)
@@ -240,7 +243,7 @@ function boat.on_step(self, dtime)
local yaw = self.object:getyaw()
if ctrl.aux1 then
self.selfdriving = true
- minetest.chat_send_all("Boat is now selfdriving")
+-- minetest.chat_send_all("Boat is now selfdriving")
end
if ctrl.up then
self.v = self.v + 0.1
@@ -339,7 +342,7 @@ minetest.register_entity("advboats:boat", boat)
minetest.register_craftitem("advboats:boat", {
- description = "Boat",
+ description = "Advanced Boat",
inventory_image = "advboats_inventory.png",
wield_image = "advboats_wield.png",
wield_scale = {x = 2, y = 2, z = 1},
diff --git a/textures/advboats_inventory.png b/textures/advboats_inventory.png
new file mode 100644
index 0000000..7f90584
--- /dev/null
+++ b/textures/advboats_inventory.png
Binary files differ
diff --git a/textures/advboats_wield.png b/textures/advboats_wield.png
new file mode 100644
index 0000000..f3313c5
--- /dev/null
+++ b/textures/advboats_wield.png
Binary files differ
diff --git a/textures/boats_inventory.png b/textures/boats_inventory.png
deleted file mode 100644
index f9d082e..0000000
--- a/textures/boats_inventory.png
+++ /dev/null
Binary files differ
diff --git a/textures/boats_wield.png b/textures/boats_wield.png
deleted file mode 100644
index f998b5b..0000000
--- a/textures/boats_wield.png
+++ /dev/null
Binary files differ