Use 'initial_properties' table. Add server log to explain warnings when driver leaves server while driving. Add steel and windows to textures
@ -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.
|
||||
|
||||
|
7
init.lua
@ -24,14 +24,16 @@ end
|
||||
-- Airboat entity
|
||||
|
||||
local airboat = {
|
||||
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
|
||||
|
||||
|
Before Width: | Height: | Size: 127 B After Width: | Height: | Size: 127 B |
Before Width: | Height: | Size: 114 B After Width: | Height: | Size: 114 B |
Before Width: | Height: | Size: 122 B After Width: | Height: | Size: 131 B |
Before Width: | Height: | Size: 146 B After Width: | Height: | Size: 126 B |
Before Width: | Height: | Size: 114 B After Width: | Height: | Size: 127 B |
Before Width: | Height: | Size: 112 B After Width: | Height: | Size: 126 B |