mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-25 00:51:55 +00:00
* Fixes is_station_level() sometimes behaving erratically if the value provided is more complex than just a variable (#75489) ## About The Pull Request I have been debugging this stupid macro for the past nearly five hours, to finally figure out why it was breaking. If you had something like `a || 0` in what you called the macro with, it would somehow manage to break the cache. This makes it far more foolproof, and will ensure that it doesn't break here anymore, because debugging this has to be one of the biggest pains in my ass I've ever had. ## Why It's Good For The Game So shit like this  Doesn't end up breaking your CI (or even worse, the game in prod), in places unrelated. At least now it shouldn't be overwriting values in the cache. It shouldn't have to do verification that you're doing the right thing, that should be left on the person using the macro because it was meant to be faster than a proc call, adding too much verification overhead kind of just loses some of that speed. ## Changelog 🆑 GoldenAlpharex fix: Makes checks for the station z level more robust against coders doing less intuitive stuff, thus protecting it from breaking in weirdly difficult and seemingly unrelated places (I'm looking at you, nuke cinematic unit test). /🆑 * Fixes is_station_level() sometimes behaving erratically if the value provided is more complex than just a variable --------- Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
1.2 KiB
1.2 KiB