Update balloon.lua

This commit is contained in:
Sumyjkl 2023-01-11 13:32:49 +11:00
parent 6eb6105a6a
commit 6aa952e2de

View file

@ -9,6 +9,36 @@ me.vars = {
fuel_time = 30,
}
local ship = {
physical = true,
pointable = true,
collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.2, 0.5},
selectionbox = {-0.5, -0.5, -0.5, 0.5, 0.2, 0.5},
hp_max = 3,
visual = "mesh",
mesh = "sum_airship.b3d",
backface_culling = false,
textures = {
"sum_airship_canvas.png", -- balloon
"sum_wood_ash_planks.png", -- cradle
"sum_wood_oak_plank.png", -- lining
"sum_wood_oak_plank.png", -- strut
"sum_wood_oak_plank.png", -- strut
"sum_airship_canvas.png", -- burner
"sum_wood_oak_plank.png", -- small strut
"sum_wood_oak_plank.png", -- small strut
},
on_rightclick = me.on_rightclick,
on_activate = me.on_activate,
get_staticdata = me.get_staticdata,
on_death = me.on_death,
on_step = me.on_step,
_driver = nil,
_removed = false,
_flags = {},
_itemstring = "sum_airship:balloon_item",
}
function me.on_activate(self, staticdata, dtime_s)
local data = minetest.deserialize(staticdata)
if type(data) == "table" then
@ -216,35 +246,7 @@ function me.on_step(self, dtime, moveresult)
end
minetest.register_entity("sum_airship:balloon_ENTITY", {
physical = true,
pointable = true,
collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.2, 0.5},
selectionbox = {-0.5, -0.5, -0.5, 0.5, 0.2, 0.5},
hp_max = 3,
visual = "mesh",
mesh = "sum_airship.b3d",
backface_culling = false,
textures = {
"sum_airship_canvas.png", -- balloon
"sum_wood_ash_planks.png", -- cradle
"sum_wood_oak_plank.png", -- lining
"sum_wood_oak_plank.png", -- strut
"sum_wood_oak_plank.png", -- strut
"sum_airship_canvas.png", -- burner
"sum_wood_oak_plank.png", -- small strut
"sum_wood_oak_plank.png", -- small strut
},
on_rightclick = me.on_rightclick,
on_activate = me.on_activate,
get_staticdata = me.get_staticdata,
on_death = me.on_death,
on_step = me.on_step,
_driver = nil,
_removed = false,
_flags = {},
_itemstring = "sum_airship:balloon_item",
})
minetest.register_entity("sum_airship:balloon_ENTITY", ship)
minetest.register_craftitem("sum_airship:balloon_item", {
description = "Hot air balloon",