Page 1 of 1

MoraleReports crash and workaround

Posted: Sat Mar 05, 2022 10:58 am
by AMX
Had a crash on the current in-development version (r38808).
Apparently it was triggered by a report about unhappy Harmonized Humans becoming content again - I think the problem is that there's no Chibi for harmonized populations, so the notification icon can't be built.

I worked around it by making a modified version of @MoraleReports.lua that doesn't try to load the correct chibi, it just shows a Human.

Re: MoraleReports crash and workaround

Posted: Sun Mar 06, 2022 10:57 am
by gaerzi
AMX wrote:Had a crash on the current in-development version (r38808).
Apparently it was triggered by a report about unhappy Harmonized Humans becoming content again - I think the problem is that there's no Chibi for harmonized populations, so the notification icon can't be built.

I worked around it by making a modified version of @MoraleReports.lua that doesn't try to load the correct chibi, it just shows a Human.


Using

Code: Select all

      return notification_icons.chibi[report.race] or notification_icons.chibi![remove_race_suffix | report.race]
at line 85 does the trick better. For reference, this is basically the same code that's used in other places, it was just forgotten about in Morale Reports.