Skip to content

Commit

Permalink
try to make balloons more durable (immortal)
Browse files Browse the repository at this point in the history
  • Loading branch information
fluxionary committed Nov 20, 2019
1 parent e6232ca commit 5fec98e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ hot_air_balloons.get_entity = function(name, mesh_name, texture_name)

on_activate = function(self, staticdata, dtime_s)
self.object:set_armor_groups({punch_operable = 1})
self.object:set_armor_groups({immortal = 1})
--so balloons don't get lost
self.object:setvelocity({x = 0, y = 0, z = 0})

Expand All @@ -150,7 +151,7 @@ hot_air_balloons.get_entity = function(name, mesh_name, texture_name)
end,

get_staticdata = mark_for_deletion_if_piloted,

immortal = true,

on_punch = function(self, puncher) --drop balloon item
if self.pilot
Expand Down Expand Up @@ -218,4 +219,4 @@ minetest.register_craftitem(hot_air_balloons.get_item(
"hot_air_balloons:balloon"))


dofile(modpath .. "/craft.lua")
dofile(modpath .. "/craft.lua")

0 comments on commit 5fec98e

Please sign in to comment.