Use 'initial_properties' table. Add server log to explain warnings when driver leaves server while driving. Add steel and windows to textures

master
paramat 2018-07-30 06:40:42 +01:00
parent 8f591ae116
commit 9a7603506f
8 changed files with 15 additions and 11 deletions

View File

@ -1,17 +1,16 @@
airboat 0.1.6 by paramat
airboat 0.1.7 by paramat
For Minetest 0.4.16 and later. Compatible with MT 5.0.0-dev.
Depends: default
Licenses
--------
Source code: MIT
Media (textures): CC0 1.0
Media (textures and nodebox design): CC0 1.0
Note about textures and crafting
--------------------------------
This mod is fully functional but does not currently have a crafting recipe or
detailed textures. It is currently a 'kit mod' for you to complete. The textures
are templates for you to add detail to.
detailed textures. The textures are templates for you to add detail to.
The airboat is available in the creative inventory or by using the /giveme chat
command.

View File

@ -24,14 +24,16 @@ end
-- Airboat entity
local airboat = {
physical = true,
collide_with_objects = false, -- Workaround fix for a MT engine bug
collisionbox = {-0.85, -1.5, -0.85, 0.85, 1.5, 0.85},
visual = "wielditem",
visual_size = {x = 2.0, y = 2.0}, -- Scale up of nodebox is these * 1.5
textures = {"airboat:airboat_nodebox"},
initial_properties = {
physical = true,
collide_with_objects = false, -- Workaround fix for a MT engine bug
collisionbox = {-0.85, -1.5, -0.85, 0.85, 1.5, 0.85},
visual = "wielditem",
visual_size = {x = 2.0, y = 2.0}, -- Scale up of nodebox is these * 1.5
textures = {"airboat:airboat_nodebox"},
},
-- Mod-added properties
-- Custom fields
driver = nil,
removed = false,
v = 0,
@ -155,6 +157,9 @@ function airboat.on_step(self, dtime)
-- In MT 5.0.0 use 'airboat:on_detach_child()' to do this
self.driver = nil
self.auto = false
minetest.log("warning", "[airboat] Driver left server while" ..
" driving. This may cause some 'Pushing ObjectRef to" ..
" removed/deactivated object' warnings.")
end
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 B

After

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 B

After

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 B

After

Width:  |  Height:  |  Size: 131 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 126 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 B

After

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 B

After

Width:  |  Height:  |  Size: 126 B