Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] Sign up for Cargorilla from the lobby (#79776) #1635

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

Steals-The-PRs
Copy link
Collaborator

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.

dreamseeker_ntP3OayAuV

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

* Sign up for Cargorilla from the lobby (#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.

![dreamseeker_ntP3OayAuV](https://github.com/tgstation/tgstation/assets/7483112/a26087ea-1ee7-4e9f-b37c-195cb1b1744f)

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.

:cl: Jacquerel and Fikou
qol: If the station rolls the "Cargo Gorilla" station trait. you will be
able to sign up for the role from the game lobby.
qol: If nobody signs up to be the Cargo Gorilla then you can select it
from the Late Join menu and arrive on the arrival shuttle.
fix: The Cargo Gorilla will actually spawn.
/:cl:

* Modular

---------

Co-authored-by: Jacquerel <[email protected]>
@Iajret Iajret merged commit 9d2c480 into master Jan 24, 2024
23 checks passed
@Iajret Iajret deleted the upstream-mirror-389 branch January 24, 2024 08:03
Iajret pushed a commit that referenced this pull request Mar 28, 2024
…1635)

* Poll

* Update dynamic_rulesets_midround.dm

* Update code/controllers/subsystem/dynamic/dynamic_rulesets_midround.dm

Co-authored-by: Bloop <[email protected]>

* Update dynamic_rulesets_midround.dm

* fix CI

* More logging

* Individual Polling

* Randomize picking

* return if no candidate

* Role Name Text

* This is cleaner

* Apply suggestions from code review

* More modular

---------

Co-authored-by: Bloop <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants