mirror of
https://codeberg.org/SumianVoice/sum_airship.git
synced 2025-03-22 15:42:21 +00:00
Update balloon.lua
This commit is contained in:
parent
6eb6105a6a
commit
6aa952e2de
1 changed files with 31 additions and 29 deletions
60
balloon.lua
60
balloon.lua
|
@ -9,6 +9,36 @@ me.vars = {
|
||||||
fuel_time = 30,
|
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)
|
function me.on_activate(self, staticdata, dtime_s)
|
||||||
local data = minetest.deserialize(staticdata)
|
local data = minetest.deserialize(staticdata)
|
||||||
if type(data) == "table" then
|
if type(data) == "table" then
|
||||||
|
@ -216,35 +246,7 @@ function me.on_step(self, dtime, moveresult)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
minetest.register_entity("sum_airship:balloon_ENTITY", {
|
minetest.register_entity("sum_airship:balloon_ENTITY", 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",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craftitem("sum_airship:balloon_item", {
|
minetest.register_craftitem("sum_airship:balloon_item", {
|
||||||
description = "Hot air balloon",
|
description = "Hot air balloon",
|
||||||
|
|
Loading…
Add table
Reference in a new issue