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

This commit is contained in:
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. For Minetest 0.4.16 and later. Compatible with MT 5.0.0-dev.
Depends: default Depends: default
Licenses Licenses
-------- --------
Source code: MIT Source code: MIT
Media (textures): CC0 1.0 Media (textures and nodebox design): CC0 1.0
Note about textures and crafting Note about textures and crafting
-------------------------------- --------------------------------
This mod is fully functional but does not currently have a crafting recipe or 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 detailed textures. The textures are templates for you to add detail to.
are templates for you to add detail to.
The airboat is available in the creative inventory or by using the /giveme chat The airboat is available in the creative inventory or by using the /giveme chat
command. command.

View File

@ -24,14 +24,16 @@ end
-- Airboat entity -- Airboat entity
local airboat = { local airboat = {
physical = true, initial_properties = {
collide_with_objects = false, -- Workaround fix for a MT engine bug physical = true,
collisionbox = {-0.85, -1.5, -0.85, 0.85, 1.5, 0.85}, collide_with_objects = false, -- Workaround fix for a MT engine bug
visual = "wielditem", collisionbox = {-0.85, -1.5, -0.85, 0.85, 1.5, 0.85},
visual_size = {x = 2.0, y = 2.0}, -- Scale up of nodebox is these * 1.5 visual = "wielditem",
textures = {"airboat:airboat_nodebox"}, 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, driver = nil,
removed = false, removed = false,
v = 0, 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 -- In MT 5.0.0 use 'airboat:on_detach_child()' to do this
self.driver = nil self.driver = nil
self.auto = false 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
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