Skip to content

Fix queen check not checking affected z_levels + No Hijack Hive Collapse#11906

Open
Drulikar wants to merge 3 commits intocmss13-devs:masterfrom
Drulikar:fix_queen_check
Open

Fix queen check not checking affected z_levels + No Hijack Hive Collapse#11906
Drulikar wants to merge 3 commits intocmss13-devs:masterfrom
Drulikar:fix_queen_check

Conversation

@Drulikar
Copy link
Contributor

@Drulikar Drulikar commented Mar 8, 2026

About the pull request

This PR is a follow up to #7773 simply making it where the queen is still checked to be in whatever is the relevant Z levels per

/datum/game_mode/proc/get_affected_zlevels()
if(is_in_endgame)
. = SSmapping.levels_by_trait(ZTRAIT_MARINE_MAIN_SHIP)
return
and
/datum/game_mode/colonialmarines/check_win()
if(SSticker.current_state != GAME_STATE_PLAYING)
return
if(ROUND_TIME < 10 MINUTES)
return
if(SShijack?.sd_detonated)
round_finished = MODE_INFESTATION_DRAW_DEATH // Self destruction.
return
var/list/living_player_list = count_humans_and_xenos(get_affected_zlevels())
var/num_humans = living_player_list[1]
var/num_xenos = living_player_list[2]
if(!num_humans && num_xenos)
round_finished = MODE_INFESTATION_X_MAJOR //No humans remain alive.
else if(num_humans && !num_xenos)
if(SSticker.mode?.is_in_endgame)
round_finished = MODE_INFESTATION_X_MINOR //Evacuation successfully took place.
else
SSticker.roundend_check_paused = TRUE
round_finished = MODE_INFESTATION_M_MAJOR //Humans destroyed the xenomorphs.
ares_conclude()
end_of_round_ert()
addtimer(VARSET_CALLBACK(SSticker, roundend_check_paused, FALSE), MARINE_MAJOR_ROUND_END_DELAY)
else if(!num_humans && !num_xenos)
round_finished = MODE_INFESTATION_DRAW_DEATH //Both were somehow destroyed.
else if (force_end_at && world.time > force_end_at)
round_finished = MODE_INFESTATION_X_MINOR // Times up.

Additionally, we don't want to check for hive collapse during hijack because normally a hive collapse is either marine minor/major. But this could potentially return as just always a xeno minor if needed.

Explain why it's good for the game

Fixes issues where say the queen and the rest of her hive hops off a crashed almayer and the round doesn't end.

Should also fix #11516

Testing Photographs and Procedure

Screenshots & Videos

Tunnel still doesn't end round:
image

But going to a Z level that isn't checked anymore does matter:
image

Changelog

🆑 Drathek
fix: Fixed queen no forfeit check not checking the relevant Z levels (namely regarding hijack/FTL)
fix: Fixed potential for hive collapse during hijack
/:cl:

@github-project-automation github-project-automation bot moved this to Awaiting Review in Review Backlog Mar 8, 2026
@cmss13-ci cmss13-ci bot added Fix Fix one bug, make ten more size/XS Denotes a PR that changes 0-19 lines, ignoring generated files. labels Mar 8, 2026
@Drulikar Drulikar changed the title Fix queen check not checking affected z_levels Fix queen check not checking affected z_levels + No Hijack Hive Collapse Mar 8, 2026
@cm13-github
Copy link
Contributor

cm13-github commented Mar 9, 2026

Test merge deployment history:

Test Merge Deployed @ 03/09/2026 00:45:51 +00:00:
Server Instance

CM13 Live

Revision

Origin: 0cbb7e5
Pull Request: 0a17287
Server: 5a97a35

Test Merge Updated @ 03/09/2026 01:12:33 +00:00:
Server Instance

CM13 Live

Revision

Origin: cb54193
Pull Request: 0a17287
Server: 65bf557fe0deb74cfe48d69e35e12ebcbc38c1e3

Test Merge Updated @ 03/09/2026 02:43:29 +00:00:
Server Instance

CM13 Live

Revision

Origin: 875069c
Pull Request: 0a17287
Server: 304d72e358bed79142ccd24e752bcac21660aa87

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Fix Fix one bug, make ten more size/XS Denotes a PR that changes 0-19 lines, ignoring generated files.

Projects

Status: Awaiting Review

Development

Successfully merging this pull request may close these issues.

marine major on hijack

2 participants