mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-07 23:42:44 +00:00
I went into this just planning on fixing some weird behaviour with spider buttons and ended up touching a lot of files. Specifically this is because some of the actions used by Giant Spiders would print feedback messages in IsAvailable, which was bad because this is called every time the button updates and so would (for example) print a bunch of messages about eggs existing when you spawned as a broodmother because the lay eggs button would be checking for that when it was granted to you. The feedback _is_ useful though so I've implemented a pattern used in Spell where we just pass a flag describing whether we want to print it or not, which is generally set to true in Trigger() or if the player physically pressed the button. A side effect of this is that any action with usability flags (such as "not when handcuffed") will now tell you why it is failing if you click it while it is unusable, which is nice. The spider changes are largely to make sure that their buttons are tinted at the correct time, they were previously tinted red as if inactive at almost all times due to the icon not being updated when relevant conditions changed. This necessitated adding a new signal (two actually) sent when a do_after begins and when it ends (for any reason, including premature interruption). I also fixed a quirk where the Wrap ability had a permanent 'active' outline after using it once (the icon states were inverted). I also fixed a bug where you could just lay infinite enriched eggs after eating one guy, which is not how the game describes it as working. I looked up the PR adding it (https://github.com/tgstation/tgstation/pull/54451) and one egg per kill seems to be how it is supposed to work. And finally I changed a few nurse spider to_chats into balloon_messages, on the principle that they're not information which needs to stick around for more than a few seconds.