只有载具没损坏或创造模式能捡起载具
This commit is contained in:
parent
db29902f9f
commit
e87e5a0a26
4
api.lua
4
api.lua
@ -1,4 +1,4 @@
|
||||
--vehicles/mounts api by D00Med, based on lib_mount(see below)
|
||||
--vehicles/mounts api by D00Med and zaoqi, based on lib_mount(see below)
|
||||
|
||||
--License of lib_mount:
|
||||
-- Minetest mod: lib_mount
|
||||
@ -527,7 +527,7 @@ function vehicles.on_punch(self, puncher)
|
||||
end
|
||||
vehicles.explodinate(self, 5)
|
||||
end
|
||||
if self.driver == puncher then
|
||||
if self.driver == puncher and (self.object:get_hp() == self.hp_max-1 or self.object:get_hp() == self.hp_max or minetest.setting_getbool("creative_mode")) then
|
||||
local name = self.object:get_luaentity().name
|
||||
local pos = self.object:getpos()
|
||||
minetest.env:add_item(pos, name.."_spawner")
|
||||
|
Loading…
x
Reference in New Issue
Block a user