Skip to content

Commit

Permalink
TGS Test Merge (#16717)
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyorange committed Nov 9, 2024
2 parents 5b0d5f7 + fd1a60c commit 05622be
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions code/datums/gamemodes/_game_mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ GLOBAL_VAR(common_report) //Contains common part of roundend report
var/time_between_round = 0
///What factions are used in this gamemode, typically TGMC and xenos
var/list/factions = list(FACTION_TERRAGOV, FACTION_ALIEN)
///Increases the amount of xenos needed to evolve to tier three by the value.
var/tier_three_penalty = 0
///List of castes we dont want to be evolvable depending on gamemode.
var/list/restricted_castes

//Distress call variables.
var/list/datum/emergency_call/all_calls = list() //initialized at round start and stores the datums.
Expand Down
2 changes: 2 additions & 0 deletions code/datums/gamemodes/crash.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
)
xenorespawn_time = 3 MINUTES
blacklist_ground_maps = list(MAP_BIG_RED, MAP_DELTA_STATION, MAP_PRISON_STATION, MAP_LV_624, MAP_WHISKEY_OUTPOST, MAP_OSCAR_OUTPOST, MAP_FORT_PHOBOS, MAP_CHIGUSA, MAP_LAVA_OUTPOST, MAP_CORSAT, MAP_KUTJEVO_REFINERY, MAP_BLUESUMMERS)
tier_three_penalty = 1
restricted_castes = list(/datum/xeno_caste/hivelord, /datum/xeno_caste/wraith, /datum/xeno_caste/hivemind)

// Round end conditions
var/shuttle_landed = FALSE
Expand Down
4 changes: 4 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/evolution.dm
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,10 @@
balloon_alert(src, "We can't evolve to that caste from our current one")
return FALSE

if(new_caste_type in SSticker.mode.restricted_castes)
balloon_alert(src, "Our weak hive can't support that caste!")
return FALSE

var/no_room_tier_two = length(hive.xenos_by_tier[XENO_TIER_TWO]) >= hive.tier2_xeno_limit
var/no_room_tier_three = length(hive.xenos_by_tier[XENO_TIER_THREE]) >= hive.tier3_xeno_limit
var/datum/xeno_caste/new_caste = GLOB.xeno_caste_datums[new_caste_type][XENO_UPGRADE_BASETYPE] // tivi todo make so evo takes the strict caste datums
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/xenomorph/hive_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,7 @@ to_chat will check for valid clients itself already so no need to double check f
var/threes = length(xenos_by_tier[XENO_TIER_THREE])
var/fours = length(xenos_by_tier[XENO_TIER_FOUR])

tier3_xeno_limit = max(threes, FLOOR((zeros + ones + twos + fours) / 3 + length(psychictowers) + 1, 1))
tier3_xeno_limit = max(threes, FLOOR(((zeros + ones + twos + fours) - SSticker.mode.tier_three_penalty) / 3 + length(psychictowers) + 1, 1))
tier2_xeno_limit = max(twos, (zeros + ones + fours) + length(psychictowers) * 2 + 1 - threes)

// ***************************************
Expand Down

0 comments on commit 05622be

Please sign in to comment.