CTristan / lobotomy-corporation-mods

Mods for Lobotomy Corporation
MIT License
5 stars 0 forks source link

[Enhancement] Fix original game bug of panic mouth being set randomly #72

Open CTristan opened 2 months ago

CTristan commented 2 months ago

Free Customization

Checklist of methods needing updates:

The game has a bug where the customization screen shows the agent using the combat mouth for panicking, however in-game the agent will instead have a randomly-assigned mouth for panicking.

Since there is no in-game option to set the panic mouth individually, we need to fix the bug so that the panic mouth is correctly assigned the combat mouth.

Reported from a user on Lobotomy MOD Community Discord:

on the PREVIEW of the panic face, yes, they do use the battle mouth sprite... ...BUT, in-game, during the management phase, they change to something completely different, shown here The mouth seems to be randomly chosen upon character creation, and always uses that mouth when the agent panics

image image

CTristan commented 2 months ago

Doing a quick initial check, there are multiple methods that are supposed to set all of the agent customization sprites; however, it looks like the PanicMouth sprite isn't being set/used correctly in the following game methods:

Confirmed the following game methods are assigning the PanicMouth correctly:

CTristan commented 2 months ago

Last comment was for the WorkerSprite.WorkerSprite.PanicMouth sprite, and it looks like there is another one we need to fix called Customizing.Appearance.Mouth_Panic.

Interestingly, this sprite is not referenced at all in any method. It's possible the Panic Mouth was a last-minute addition, or just somehow completely forgotten.

These methods are where the sprites are set but Mouth_Panic is missing (in addition to the ones in the comment before):

CTristan commented 2 months ago

EDIT: Don't need to fix this, confirming in game that we don't need the Mouth_Panic since there is no separate in-game panic mouth. We only need to make sure the panic mouth also uses the Combat Mouth.

Original comment:

One more issue found, there's a class called Appearance.ResourceLib that's used to store sprites, and it doesn't have an entry for Mouth_Panic. It's not too big of a deal as we can create our own class, and luckily it's only used in one method.

One more method to add:

CTristan commented 1 month ago

Updated the Initial Data Load so that it also loads all the panic mouths into the battle mouths, so now we have both available for customization.