Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add PlaceAlternateBuilding trait #16510
This PR allows
This uses separate actors because we can't (yet) modify the building previews or footprint using conditions. We can consider changing this to use conditions in the future once these have been fixed.
I've added this to the TS gates, and added a temporary testcase that flips the TS refinery - demonstrating "silent" alternates that aren't buildable on their own. The testcase isn't useful as a real feature because the x-flip casts the shadow in the wrong direction and doesn't significantly help with the balance issue.
Shift and Ctrl are modifier keys - it would be bad UX and bad code (they can't be detected via normal button presses, so would need to be bodged by observing modifier state changes from Tick) to implement them for state changes. Using the mousewheel was raised as an option in Discord, but this is also bad UX (scrolling is a continuous action, and should not be used to toggle discrete states) and makes the feature difficult to access for players using trackpads or other input methods without a dedicated scrollwheel.
The only option that IMO would be reasonable to toggle discrete states would be the tab key, at the expense of disabling queue toggling while the OG is active.
In any case, changing this from a modifier-based alternative to toggling between N discrete states would require a complete rewrite of the code here, so if there is a consensus that this is the way forward I will close this and leave the reimplementation to somebody else.
Updated to support toggling between an arbitrary number of variants using a mod-definable hotkey.
It doesn't make sense to expose a dedicated hotkey just for rotating gates in TS, so I have removed that ability from the PR. This feature will now only be available for modders instead of being used in the default mods.