[MIRROR] Sign up for Cargorilla from the lobby (#79776) #1635
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Mirrored on Nova: NovaSector/NovaSector#389
ORIGINAL PR: tgstation/tgstation#79776
If the station rolls the "Cargo Gorilla" trait, a button will now be visible on the lobby.
Clicking on this button before the round has started will add you to a list of participants, one of whom will be selected to become a gorilla when the round begins.
If nobody signs up (because they're really boring I guess) the job will instead appear on the latejoin menu.
Once someone has become the gorilla the button will disappear.
While implementing this I noticed that an inverted check means we were never populating the "GLOB.cargo_sloth" field which means the station trait wasn't even working.
BEHIND THE SCENES
This also adds a generic "job station trait" which can be expanded in the future.
Future developers can extend this to add other "rare jobs" with relative ease.
By default I have made it so all subtypes of this trait are mutually exclusive, only one can roll at a time.
This also means that I have converted "cargo gorilla" into a job, which applies most of the code previously located in the mob's typepath or in the station trait.
The fact that it is a job means that admins can enable any number of gorillas to be present on the latejoin menu (but not the roundstart one, as it is not possible to add Cargo Gorilla to your occupation preferences) if they so desire.
The random beurocratic station trait, event, and traitor item (and the job console) are not able to add gorilla slots.
Because I changed "Cargo Gorilla" to a job it now no longer exists on the map until a player gains the role, and there wasn't a non-hacky way to copy the name of this round's cargo sloth. Instead I just added a small cargo gorilla name list.
Makes the presence of a fun trait more visible to players. Means that people who aren't observing get a chance to be a monkey. This is a framework several other people have wanted to exist for their own features.
Edit: removed changelog, this is not functional for us (yet). Our lobby is a custom html thing and I do not feel like mucking with html and css right now, however this is holding things up so let's get it merged