MoraleReports crash and workaround

A place for discussion of making game modifications.
Post Reply
AMX
Posts: 66
Joined: Fri Nov 24, 2017 10:41 pm

MoraleReports crash and workaround

Post 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.
Attachments
ChibiWA.7z
(1.63 KiB) Downloaded 641 times
gaerzi
Posts: 210
Joined: Wed Jul 10, 2019 1:30 pm

Re: MoraleReports crash and workaround

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 104 guests