mirror of
https://github.com/tacigar/maidroid.git
synced 2024-11-05 17:50:33 +01:00
Fix wield item entity
This commit is contained in:
parent
63467d8337
commit
7c32c4fb34
|
@ -251,7 +251,7 @@ do
|
|||
if maidroid.is_maidroid(luaentity.name) then
|
||||
self.object:set_attach(obj, "Arm_R", {x = 0.075, y = 0.60, z = -0.20}, {x = 0, y = 90, z = 0})
|
||||
self.object:set_properties{textures={"maidroid:dummy_empty_craftitem"}}
|
||||
break
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -263,6 +263,7 @@ do
|
|||
|
||||
if maidroid.is_maidroid(luaentity.name) then
|
||||
local stack = luaentity:get_wield_item_stack()
|
||||
|
||||
if stack:get_name() ~= itemname then
|
||||
if stack:is_empty() then
|
||||
self.itemname = ""
|
||||
|
@ -272,9 +273,12 @@ do
|
|||
self.object:set_properties{textures={self.itemname}}
|
||||
end
|
||||
end
|
||||
break
|
||||
return
|
||||
end
|
||||
end
|
||||
-- if cannot find maidroid, delete empty item.
|
||||
self.object:remove()
|
||||
return
|
||||
end
|
||||
|
||||
minetest.register_entity("maidroid:dummy_item", {
|
||||
|
|
Loading…
Reference in New Issue
Block a user