mirror of
https://github.com/stujones11/wield3d.git
synced 2024-12-28 08:47:27 +01:00
Add support for wieldview mod
This commit is contained in:
parent
b0a20fbcf3
commit
a53dee98ca
8
init.lua
8
init.lua
@ -69,10 +69,16 @@ minetest.register_entity("wield3d:wield_entity", {
|
|||||||
if p1 and p2 then
|
if p1 and p2 then
|
||||||
if vector.equals(p1, p2) then
|
if vector.equals(p1, p2) then
|
||||||
local stack = player:get_wielded_item()
|
local stack = player:get_wielded_item()
|
||||||
local item = stack:get_name()
|
local item = stack:get_name() or ""
|
||||||
if item == self.item then
|
if item == self.item then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
if minetest.get_modpath("wieldview") then
|
||||||
|
local def = minetest.registered_items[item] or {}
|
||||||
|
if def.inventory_image ~= "" then
|
||||||
|
item = ""
|
||||||
|
end
|
||||||
|
end
|
||||||
self.item = item
|
self.item = item
|
||||||
if item == "" then
|
if item == "" then
|
||||||
item = "wield3d:hand"
|
item = "wield3d:hand"
|
||||||
|
Loading…
Reference in New Issue
Block a user