1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2024-12-23 00:20:17 +01:00

streamline locked description/infotext setting; avoid double brackets "Node (Locked) (owned by .. )"

This commit is contained in:
Tim 2015-08-19 20:28:47 +02:00
parent 25c2262750
commit 088269a85e

View File

@ -154,7 +154,7 @@ function homedecor.handle_inventory(name, def, original_def)
local lockable = inventory.lockable local lockable = inventory.lockable
if lockable then if lockable then
local locked_def = table.copy(original_def) local locked_def = table.copy(original_def)
locked_def.description = S("%s (Locked)"):format(def.infotext or def.description) locked_def.description = S("Locked %s"):format(def.description or name)
local locked_inventory = locked_def.inventory local locked_inventory = locked_def.inventory
locked_inventory.locked = true locked_inventory.locked = true