Fix: faction ownership not showing on some items

This commit is contained in:
Coder12a 2019-04-02 16:38:18 -05:00
parent 64c32baa13
commit 9f08642b51

View File

@ -39,7 +39,7 @@ if minetest.registered_nodes["default:chest"] then
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
local name = parcel_faction.name local name = parcel_faction.name
meta:set_string("faction", name) meta:set_string("faction", name)
meta:set_string("infotext", "Faction Chest (owned by faction " .. meta:set_string("infotext", "Faction Container (owned by faction " ..
name .. ")") name .. ")")
end end
end end
@ -103,17 +103,20 @@ local all_items = {}
local item_count = 1 local item_count = 1
local old_i = 0
for i, l in ipairs(door_items) do for i, l in ipairs(door_items) do
doors[item_count] = l .. "_a" doors[item_count] = l .. "_a"
doors[item_count + 1] = l .. "_b" doors[item_count + 1] = l .. "_b"
all_items[item_count] = l all_items[i] = l
item_count = item_count + 2 item_count = item_count + 2
old_i = old_i + 1
end end
for i, l in ipairs(trapdoor_items) do for i, l in ipairs(trapdoor_items) do
doors[item_count] = l doors[item_count] = l
doors[item_count + 1] = l .. "_open" doors[item_count + 1] = l .. "_open"
all_items[item_count] = l all_items[old_i + i] = l
item_count = item_count + 2 item_count = item_count + 2
end end