mirror of
https://github.com/APercy/ap_airship.git
synced 2025-03-14 23:41:21 +00:00
improved remotion
This commit is contained in:
parent
8e516909c6
commit
e17e706f86
2 changed files with 4 additions and 3 deletions
|
@ -601,7 +601,8 @@ minetest.register_entity("ap_airship:airship", {
|
||||||
self.object:set_properties(properties)
|
self.object:set_properties(properties)
|
||||||
if data.remove then
|
if data.remove then
|
||||||
airutils.destroy_inventory(self)
|
airutils.destroy_inventory(self)
|
||||||
ap_airship.destroy(self)
|
self.object:remove()
|
||||||
|
--ap_airship.destroy(self)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -321,7 +321,7 @@ function ap_airship.destroy(self, overload)
|
||||||
if self._cabin2 then self._cabin2:remove() end
|
if self._cabin2 then self._cabin2:remove() end
|
||||||
|
|
||||||
airutils.destroy_inventory(self)
|
airutils.destroy_inventory(self)
|
||||||
local autofly = self._autoflymode
|
local autofly = self._autoflymode or false
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
|
|
||||||
pos.y=pos.y+2
|
pos.y=pos.y+2
|
||||||
|
@ -357,7 +357,7 @@ function ap_airship.destroy(self, overload)
|
||||||
local boat_wear = math.floor(65535*(1-(self.hull_integrity/item_def.hull_integrity)))
|
local boat_wear = math.floor(65535*(1-(self.hull_integrity/item_def.hull_integrity)))
|
||||||
stack:set_wear(boat_wear)
|
stack:set_wear(boat_wear)
|
||||||
end
|
end
|
||||||
if not autofly then
|
if autofly == false then
|
||||||
minetest.add_item({x=pos.x+math.random()-0.5,y=pos.y,z=pos.z+math.random()-0.5}, stack)
|
minetest.add_item({x=pos.x+math.random()-0.5,y=pos.y,z=pos.z+math.random()-0.5}, stack)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue