alien cocoon
Vars | |
chosen_candidate | The mob picked as a candidate to be the King |
---|---|
hatched | Whether the cocoon has hatched |
hive_number | The hive associated with this cocoon |
rolling_candidates | Is currently rolling candidates |
timer | Current running timer |
votes | Voting for King |
Procs | |
animate_hatch_king | Causes the cocoon to change visually for hatching and initiates the next timer. |
announce_halfway | Causes the halfway announcements and initiates the next timer. |
cast_vote | Tallies up votes by asking the passed candidate who they wish to vote for King. |
check_pylons | Callback for a repeating 10s timer to ensure both pylons are active (otherwise delete) and counts the number of marines groundside (would cause hatching to expedite). |
hatch_king | Actually hatches the King transferring the candidate into the spawned mob and initiates the next timer. |
is_candidate_valid | Returns TRUE is the candidate passed is valid: Returns TRUE is the candidate passed is valid: Has client, not facehugger, not lesser drone, not banished, and conditionally on playtime. |
remove_ob_protection | The final step in the cocoon sequence: Resets pylon protection levels |
roll_candidates | Finalizes the vote for King opting to use a series of fallbacks in case a candidate declines. |
start_growing | Causes the cocoon to change visually for growing and initiates the next timer. |
start_hatching | Starts the hatching in one minute, otherwise immediately if expedited |
start_vote | Initiates a vote that will end in 20 seconds to vote for the King. Hatching will then begin in 1 minute unless expedited. |
try_roll_candidate | Returns TRUE if a valid candidate accepts a TGUI alert asking them to be King. |
Var Details
chosen_candidate
The mob picked as a candidate to be the King
hatched
Whether the cocoon has hatched
hive_number
The hive associated with this cocoon
rolling_candidates
Is currently rolling candidates
timer
Current running timer
votes
Voting for King
Proc Details
animate_hatch_king
Causes the cocoon to change visually for hatching and initiates the next timer.
announce_halfway
Causes the halfway announcements and initiates the next timer.
cast_vote
Tallies up votes by asking the passed candidate who they wish to vote for King.
Arguments:
- candidate: The mob that was want to ask
- voting_candidates: A list of xenomorph mobs that are candidates
check_pylons
Callback for a repeating 10s timer to ensure both pylons are active (otherwise delete) and counts the number of marines groundside (would cause hatching to expedite).
hatch_king
Actually hatches the King transferring the candidate into the spawned mob and initiates the next timer.
is_candidate_valid
Returns TRUE is the candidate passed is valid: Returns TRUE is the candidate passed is valid: Has client, not facehugger, not lesser drone, not banished, and conditionally on playtime.
Arguments:
- hive: The hive_status to check banished ckeys against
- candidate: The mob that we want to check
- playtime_restricted: Determines whether being below KING_PLAYTIME_HOURS makes the candidate invalid
- skip_playtime: Determines whether being above KING_PLAYTIME_HOURS makes the candidate invalid (does nothing unless playtime_restricted is FALSE)
remove_ob_protection
The final step in the cocoon sequence: Resets pylon protection levels
roll_candidates
Finalizes the vote for King opting to use a series of fallbacks in case a candidate declines.
First is a vote where the first and or second top picked is asked. Then all other living xenos meeting the playtime requirement are asked. Then all xeno observer candidates meeting the playtime requirement are asked. Then all other living xenos not meeting the playtime requirement are asked. Then all other xeno observer candidates not meeting the playtime requirement are asked. Then finally if after all that, the search is given up and will ultimately result in a freed King mob.
Arguments:
- voting_candidates: A list of xenomorphs that are valid candidates to vote on.
- expedite: Whether hatching should begin in a minute or immediately after a candidate is found.
start_growing
Causes the cocoon to change visually for growing and initiates the next timer.
start_hatching
Starts the hatching in one minute, otherwise immediately if expedited
start_vote
Initiates a vote that will end in 20 seconds to vote for the King. Hatching will then begin in 1 minute unless expedited.
try_roll_candidate
Returns TRUE if a valid candidate accepts a TGUI alert asking them to be King.
Arguments:
- hive: The hive_status to check banished ckeys against
- candidate: The mob that we want to ask
- playtime_restricted: Determines whether being below KING_PLAYTIME_HOURS makes the candidate invalid (otherwise above)