I've found one fix:
in moneybox.lua, change obj[ROOT_NAME] to the following:
Code: Select all
obj[ROOT_NAME] = {
name="MONEY BOX",
type="THING",
class="CONTAINER",
mass=11,
icon=gfx[ROOT_NAME .. "_icon"], -- Change here
alt_icon=gfx[ROOT_NAME .. "_alticon"], -- and here
dungeon=gfx[ROOT_NAME], -- and here
msg_handler = {
[M_MONEYBOX] = moneybox_click,
[M_DESTROY] = self_destruct
},
zone_obj = {
"gem_blue",
"gem_orange",
"gem_green",
"coin_gold",
"coin_silver",
"coin_copper"
},
subrenderer = moneybox_subrenderer,
to_r_hand = alticon,
from_r_hand = normicon,
max_throw_power=30
}
This will let the moneybox compile even if the dungeon designer happened to call the "moneybox" something else. Unfortunately, DSB will still crash when you pick up the moneybox as ROOT_NAME is not saved past compilation and that modified line in function moneybox_subrenderer is now trying to concatenate a nil value, something that Lua looks down upon.
I have not yet found a fix for that.