Maintenance Madness

by Arcitos

Adds a complete new game mechanic: Maintenance! Create a sophisticated spare parts logistics and bring your mall to its absolute limits! UPS-friendly and MP-tested - Now with a fancy GUI!

Tweaks
3 years ago
0.17 - 0.18
16

b [Fixed] Icon_size error

4 years ago

https://cdn.discordapp.com/attachments/306402592265732098/688793773886537733/unknown.png

Modlist:
https://cdn.discordapp.com/attachments/306402592265732098/688793836763349042/mod-list.json

It seems like you haven't handled the case where icons is partially defined, requiring icon_size to be defined.

4 years ago

I have patched my own copy of the game by modifying the relevant function to this:

function mm_util.get_maxIconSize(item, defaultSize) local maxIconSize = defaultSize or item.icon_size or 0 if item.icons ~= nil then for _, layer in pairs(item.icons) do if layer.icon_size and layer.icon_size > maxIconSize then maxIconSize = layer.icon_size end end else maxIconSize = item.icon_size end return maxIconSize end

4 years ago

Hi, yes, your're right, this case was not handled properly.
Thank you for your hint and for your code patch! :)

New response