From 2db989a2be1c9caefa15f6bafa86be0ef35a5a3f Mon Sep 17 00:00:00 2001 From: Barnet Date: Sat, 27 Jan 2024 09:09:33 -0800 Subject: [PATCH 01/12] Evolution Changes (#14909) --- code/_globalvars/lists/mobs.dm | 1 + code/modules/codex/entries/mobs_codex.dm | 2 +- .../xenomorph/castes/bull/castedatum_bull.dm | 4 --- .../castes/carrier/castedatum_carrier.dm | 2 -- .../castes/defender/castedatum_defender.dm | 4 --- .../castes/drone/castedatum_drone.dm | 8 ------ .../castes/hivelord/castedatum_hivelord.dm | 2 -- .../castes/hunter/castedatum_hunter.dm | 1 - .../castes/larva/castedatum_larva.dm | 6 ---- .../castes/runner/castedatum_runner.dm | 5 ---- .../castes/sentinel/castedatum_sentinel.dm | 2 -- .../castes/shrike/castedatum_shrike.dm | 1 - .../castes/spitter/castedatum_spitter.dm | 4 --- .../castes/warrior/castedatum_warrior.dm | 1 - .../mob/living/carbon/xenomorph/evo_datum.dm | 2 +- .../mob/living/carbon/xenomorph/evolution.dm | 28 ++++++++++++++----- .../living/carbon/xenomorph/xeno_defines.dm | 3 +- 17 files changed, 25 insertions(+), 51 deletions(-) diff --git a/code/_globalvars/lists/mobs.dm b/code/_globalvars/lists/mobs.dm index 0bcaaaa93f0..7d690e2a925 100644 --- a/code/_globalvars/lists/mobs.dm +++ b/code/_globalvars/lists/mobs.dm @@ -125,6 +125,7 @@ GLOBAL_LIST_EMPTY_TYPED(mob_illusions_list, /mob/illusion) GLOBAL_LIST_INIT(xeno_types_tier_one, list(/mob/living/carbon/xenomorph/runner, /mob/living/carbon/xenomorph/drone, /mob/living/carbon/xenomorph/sentinel, /mob/living/carbon/xenomorph/defender)) GLOBAL_LIST_INIT(xeno_types_tier_two, list(/mob/living/carbon/xenomorph/hunter, /mob/living/carbon/xenomorph/panther, /mob/living/carbon/xenomorph/warrior, /mob/living/carbon/xenomorph/spitter, /mob/living/carbon/xenomorph/hivelord, /mob/living/carbon/xenomorph/carrier, /mob/living/carbon/xenomorph/bull)) GLOBAL_LIST_INIT(xeno_types_tier_three, list(/mob/living/carbon/xenomorph/gorger, /mob/living/carbon/xenomorph/ravager, /mob/living/carbon/xenomorph/praetorian, /mob/living/carbon/xenomorph/boiler, /mob/living/carbon/xenomorph/defiler, /mob/living/carbon/xenomorph/crusher, /mob/living/carbon/xenomorph/shrike, /mob/living/carbon/xenomorph/behemoth, /mob/living/carbon/xenomorph/chimera)) +GLOBAL_LIST_INIT(xeno_types_tier_four, list(/mob/living/carbon/xenomorph/shrike, /mob/living/carbon/xenomorph/queen, /mob/living/carbon/xenomorph/king)) GLOBAL_LIST_INIT_TYPED(hive_datums, /datum/hive_status, init_hive_datum_list()) // init by make_datum_references_lists() diff --git a/code/modules/codex/entries/mobs_codex.dm b/code/modules/codex/entries/mobs_codex.dm index f2ad6de3157..32e35ba65ee 100644 --- a/code/modules/codex/entries/mobs_codex.dm +++ b/code/modules/codex/entries/mobs_codex.dm @@ -40,7 +40,7 @@ if(xeno_caste.caste_flags & CASTE_EVOLUTION_ALLOWED) xeno_strings += "
This can evolve to:" - for(var/type in xeno_caste.evolves_to) + for(var/type in get_evolution_options()) xeno_strings += "[GLOB.xeno_caste_datums[type][XENO_UPGRADE_BASETYPE].caste_name]" if(length(actions)) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/bull/castedatum_bull.dm b/code/modules/mob/living/carbon/xenomorph/castes/bull/castedatum_bull.dm index 644ba6020ff..ed92abb6288 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/bull/castedatum_bull.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/bull/castedatum_bull.dm @@ -24,10 +24,6 @@ // *** Evolution *** // evolution_threshold = 225 - evolves_to = list( - /mob/living/carbon/xenomorph/crusher, - /mob/living/carbon/xenomorph/behemoth, - ) deevolves_to = list( /mob/living/carbon/xenomorph/runner, ) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/carrier/castedatum_carrier.dm b/code/modules/mob/living/carbon/xenomorph/castes/carrier/castedatum_carrier.dm index 7dabc895c8c..4ac72c21094 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/carrier/castedatum_carrier.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/carrier/castedatum_carrier.dm @@ -28,8 +28,6 @@ deevolves_to = /mob/living/carbon/xenomorph/drone - evolves_to = list(/mob/living/carbon/xenomorph/defiler, /mob/living/carbon/xenomorph/gorger,) - // *** Flags *** // caste_flags = CASTE_EVOLUTION_ALLOWED can_hold_eggs = CAN_HOLD_ONE_HAND diff --git a/code/modules/mob/living/carbon/xenomorph/castes/defender/castedatum_defender.dm b/code/modules/mob/living/carbon/xenomorph/castes/defender/castedatum_defender.dm index 5b74ac80035..bf6e9cdbb4c 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/defender/castedatum_defender.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/defender/castedatum_defender.dm @@ -25,10 +25,6 @@ // *** Evolution *** // evolution_threshold = 100 - evolves_to = list( - /mob/living/carbon/xenomorph/warrior, - /mob/living/carbon/xenomorph/bull, - ) deevolves_to = /mob/living/carbon/xenomorph/larva diff --git a/code/modules/mob/living/carbon/xenomorph/castes/drone/castedatum_drone.dm b/code/modules/mob/living/carbon/xenomorph/castes/drone/castedatum_drone.dm index 5b130c0aa35..d6878d63dba 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/drone/castedatum_drone.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/drone/castedatum_drone.dm @@ -27,14 +27,6 @@ // *** Evolution *** // evolution_threshold = 100 - evolves_to = list( - /mob/living/carbon/xenomorph/shrike, - /mob/living/carbon/xenomorph/queen, - /mob/living/carbon/xenomorph/king, - /mob/living/carbon/xenomorph/carrier, - /mob/living/carbon/xenomorph/hivelord, - /mob/living/carbon/xenomorph/hivemind, - ) deevolves_to = /mob/living/carbon/xenomorph/larva diff --git a/code/modules/mob/living/carbon/xenomorph/castes/hivelord/castedatum_hivelord.dm b/code/modules/mob/living/carbon/xenomorph/castes/hivelord/castedatum_hivelord.dm index d5b80f60611..4ff2a6c7de6 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/hivelord/castedatum_hivelord.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/hivelord/castedatum_hivelord.dm @@ -29,8 +29,6 @@ deevolves_to = /mob/living/carbon/xenomorph/drone - evolves_to = list(/mob/living/carbon/xenomorph/defiler, /mob/living/carbon/xenomorph/gorger) - // *** Flags *** // caste_flags = CASTE_EVOLUTION_ALLOWED|CASTE_IS_BUILDER can_hold_eggs = CAN_HOLD_TWO_HANDS diff --git a/code/modules/mob/living/carbon/xenomorph/castes/hunter/castedatum_hunter.dm b/code/modules/mob/living/carbon/xenomorph/castes/hunter/castedatum_hunter.dm index df7dd7336fc..70b15af9307 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/hunter/castedatum_hunter.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/hunter/castedatum_hunter.dm @@ -30,7 +30,6 @@ // *** Evolution *** // evolution_threshold = 225 - evolves_to = list(/mob/living/carbon/xenomorph/ravager, /mob/living/carbon/xenomorph/chimera) deevolves_to = /mob/living/carbon/xenomorph/runner // *** Flags *** // diff --git a/code/modules/mob/living/carbon/xenomorph/castes/larva/castedatum_larva.dm b/code/modules/mob/living/carbon/xenomorph/castes/larva/castedatum_larva.dm index 989af580384..5eaad6751e5 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/larva/castedatum_larva.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/larva/castedatum_larva.dm @@ -26,12 +26,6 @@ // *** Evolution *** // evolution_threshold = 50 - evolves_to = list( - /mob/living/carbon/xenomorph/drone, - /mob/living/carbon/xenomorph/runner, - /mob/living/carbon/xenomorph/sentinel, - /mob/living/carbon/xenomorph/defender, - ) // *** Flags *** // caste_flags = CASTE_EVOLUTION_ALLOWED|CASTE_INNATE_HEALING diff --git a/code/modules/mob/living/carbon/xenomorph/castes/runner/castedatum_runner.dm b/code/modules/mob/living/carbon/xenomorph/castes/runner/castedatum_runner.dm index 992b58095bc..c471e5b4a6a 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/runner/castedatum_runner.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/runner/castedatum_runner.dm @@ -30,11 +30,6 @@ // *** Evolution *** // evolution_threshold = 100 - evolves_to = list( - /mob/living/carbon/xenomorph/hunter, - /mob/living/carbon/xenomorph/bull, - /mob/living/carbon/xenomorph/panther, - ) // *** Flags *** // caste_flags = CASTE_EVOLUTION_ALLOWED can_flags = CASTE_CAN_BE_QUEEN_HEALED|CASTE_CAN_BE_GIVEN_PLASMA|CASTE_CAN_BE_LEADER|CASTE_CAN_RIDE_CRUSHER diff --git a/code/modules/mob/living/carbon/xenomorph/castes/sentinel/castedatum_sentinel.dm b/code/modules/mob/living/carbon/xenomorph/castes/sentinel/castedatum_sentinel.dm index 94861c2220a..1eaf3b40202 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/sentinel/castedatum_sentinel.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/sentinel/castedatum_sentinel.dm @@ -28,8 +28,6 @@ // *** Evolution *** // evolution_threshold = 100 - evolves_to = list(/mob/living/carbon/xenomorph/spitter) - // *** Flags *** // caste_flags = CASTE_EVOLUTION_ALLOWED can_flags = CASTE_CAN_BE_QUEEN_HEALED|CASTE_CAN_BE_GIVEN_PLASMA|CASTE_CAN_BE_LEADER|CASTE_CAN_RIDE_CRUSHER|CASTE_CAN_HOLD_FACEHUGGERS|CASTE_CAN_HOLD_JELLY diff --git a/code/modules/mob/living/carbon/xenomorph/castes/shrike/castedatum_shrike.dm b/code/modules/mob/living/carbon/xenomorph/castes/shrike/castedatum_shrike.dm index 4a88f5f548c..d5bc678aab3 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/shrike/castedatum_shrike.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/shrike/castedatum_shrike.dm @@ -26,7 +26,6 @@ // *** Evolution *** // maximum_active_caste = 1 - evolves_to = list(/mob/living/carbon/xenomorph/queen) deevolves_to = /mob/living/carbon/xenomorph/drone // *** Flags *** // diff --git a/code/modules/mob/living/carbon/xenomorph/castes/spitter/castedatum_spitter.dm b/code/modules/mob/living/carbon/xenomorph/castes/spitter/castedatum_spitter.dm index 7604de92dd2..bb1e54f98a4 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/spitter/castedatum_spitter.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/spitter/castedatum_spitter.dm @@ -24,10 +24,6 @@ // *** Evolution *** // evolution_threshold = 225 - evolves_to = list( - /mob/living/carbon/xenomorph/boiler, - /mob/living/carbon/xenomorph/praetorian, - ) deevolves_to = list( /mob/living/carbon/xenomorph/sentinel, ) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/warrior/castedatum_warrior.dm b/code/modules/mob/living/carbon/xenomorph/castes/warrior/castedatum_warrior.dm index 5d357100301..da4367ce89a 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/warrior/castedatum_warrior.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/warrior/castedatum_warrior.dm @@ -24,7 +24,6 @@ // *** Evolution *** // evolution_threshold = 225 - evolves_to = list(/mob/living/carbon/xenomorph/crusher, /mob/living/carbon/xenomorph/gorger, /mob/living/carbon/xenomorph/warlock, /mob/living/carbon/xenomorph/behemoth, /mob/living/carbon/xenomorph/chimera) deevolves_to = /mob/living/carbon/xenomorph/defender // *** Flags *** // diff --git a/code/modules/mob/living/carbon/xenomorph/evo_datum.dm b/code/modules/mob/living/carbon/xenomorph/evo_datum.dm index 9a5b6415091..aa4dba92044 100644 --- a/code/modules/mob/living/carbon/xenomorph/evo_datum.dm +++ b/code/modules/mob/living/carbon/xenomorph/evo_datum.dm @@ -33,7 +33,7 @@ "cooldown" = (initial(xeno_ability.cooldown_duration) / 10) ) .["evolves_to"] = list() - for(var/evolves_into in xeno.xeno_caste.evolves_to) + for(var/evolves_into in xeno.get_evolution_options()) var/datum/xeno_caste/caste = GLOB.xeno_caste_datums[evolves_into][XENO_UPGRADE_BASETYPE] var/list/caste_data = list( "type_path" = caste.caste_type_path, diff --git a/code/modules/mob/living/carbon/xenomorph/evolution.dm b/code/modules/mob/living/carbon/xenomorph/evolution.dm index b6443a7afb1..d6ec34ac3ff 100644 --- a/code/modules/mob/living/carbon/xenomorph/evolution.dm +++ b/code/modules/mob/living/carbon/xenomorph/evolution.dm @@ -2,9 +2,6 @@ //Recoded and consolidated by Abby -- ALL evolutions come from here now. It should work with any caste, anywhere // refactored by spookydonut because the above two were shitcoders and i'm sure in time my code too will be considered shit. -//All castes need an evolves_to() list in their defines -//Such as evolves_to = list("Warrior", "Sentinel", "Runner", "Badass") etc -// except use typepaths now so you dont have to have an entry for literally every evolve path /mob/living/carbon/xenomorph/verb/Evolve() set name = "Evolve" @@ -55,6 +52,23 @@ RU TGMC EDIT */ do_evolve(castetype, castepick, TRUE) +///Creates a list of possible evolution options for a caste based on their tier. +/mob/living/carbon/xenomorph/proc/get_evolution_options() + . = list() + switch(tier) + if(XENO_TIER_ZERO) + return GLOB.xeno_types_tier_one + if(XENO_TIER_ONE) + return GLOB.xeno_types_tier_two + GLOB.xeno_types_tier_four + if(XENO_TIER_TWO) + return GLOB.xeno_types_tier_three + GLOB.xeno_types_tier_four + if(XENO_TIER_THREE) + return GLOB.xeno_types_tier_four + if(XENO_TIER_FOUR) + if(istype(xeno_caste, /datum/xeno_caste/shrike)) + return list(/mob/living/carbon/xenomorph/queen, /mob/living/carbon/xenomorph/king) + + ///Handles the evolution or devolution of the xenomorph /mob/living/carbon/xenomorph/proc/do_evolve(caste_type, forced_caste_name, regression = FALSE) if(!generic_evolution_checks()) @@ -70,14 +84,14 @@ RU TGMC EDIT */ castepick = forced_caste_name else var/list/castes_to_pick = list() - for(var/type in xeno_caste.evolves_to) + for(var/type in get_evolution_options()) var/datum/xeno_caste/Z = GLOB.xeno_caste_datums[type][XENO_UPGRADE_BASETYPE] castes_to_pick += Z.caste_name castepick = tgui_input_list(src, "We are growing into a beautiful alien! It is time to choose a caste.", null, castes_to_pick) if(!castepick) //Changed my mind return - for(var/type in xeno_caste.evolves_to) + for(var/type in get_evolution_options()) var/datum/xeno_caste/XC = GLOB.xeno_caste_datums[type][XENO_UPGRADE_BASETYPE] if(castepick == XC.caste_name) new_mob_type = type @@ -227,7 +241,7 @@ RU TGMC EDIT */ balloon_alert(src, "The restraints are too restricting to allow us to evolve") return FALSE - if(isnull(xeno_caste.evolves_to) || !(xeno_caste.caste_flags & CASTE_EVOLUTION_ALLOWED) || HAS_TRAIT(src, TRAIT_VALHALLA_XENO)) + if(isnull(get_evolution_options()) || !(xeno_caste.caste_flags & CASTE_EVOLUTION_ALLOWED) || HAS_TRAIT(src, TRAIT_VALHALLA_XENO)) balloon_alert(src, "We are already the apex of form and function. Let's go forth and spread the hive!") return FALSE @@ -265,7 +279,7 @@ RU TGMC EDIT */ to_chat(src, span_xenodanger("Forbidden caste is limited to 1 per Hive!")) return FALSE - if(!regression && !(new_mob_type in xeno_caste.evolves_to)) + if(!regression && !(new_mob_type in get_evolution_options())) balloon_alert(src, "We can't evolve to that caste from our current one") return FALSE diff --git a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm index 3a2bf3f07ee..0aa0303b44e 100644 --- a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm +++ b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm @@ -58,8 +58,7 @@ // *** Evolution *** // ///Threshold amount of evo points to next evolution var/evolution_threshold = 0 - ///Type paths to the castes that this xenomorph can evolve to - var/list/evolves_to = list() + ///Singular type path for the caste to deevolve to when forced to by the queen. var/deevolves_to From c8074738f82470b93ae6403264d2fa5a5ac9262b Mon Sep 17 00:00:00 2001 From: Barnet Date: Fri, 26 Jan 2024 22:04:54 -0800 Subject: [PATCH 02/12] Gives all xenos with acid strong acid during prep (#14911) --- .../mob/living/carbon/xenomorph/abilities.dm | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities.dm b/code/modules/mob/living/carbon/xenomorph/abilities.dm index e519374683d..59aac17c46e 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities.dm @@ -616,6 +616,9 @@ use_state_flags = ABILITY_USE_BUCKLED /datum/action/ability/activable/xeno/corrosive_acid/can_use_ability(atom/A, silent = FALSE, override_flags) + var/obj/effect/xenomorph/acid/current_acid_type = acid_type + if(SSmonitor.gamestate == SHUTTERS_CLOSED && CHECK_BITFIELD(SSticker.mode?.flags_round_type, MODE_ALLOW_XENO_QUICKBUILD) && SSresinshaping.active) + current_acid_type = /obj/effect/xenomorph/acid/strong //if it is before shutters open, everyone gets strong acid // Check if it's an acid object we're upgrading if (istype(A, /obj/effect/xenomorph/acid)) var/obj/effect/xenomorph/acid/existing_acid = A @@ -631,24 +634,26 @@ if(!silent) owner.balloon_alert(owner, "We can't melt [A]") return FALSE - if(A.resistance_flags & UNACIDABLE || !A.dissolvability(initial(acid_type.acid_strength))) + if(A.resistance_flags & UNACIDABLE || !A.dissolvability(initial(current_acid_type.acid_strength))) if(!silent) owner.balloon_alert(owner, "We cannot dissolve [A]") return FALSE - if(!A.should_apply_acid(initial(acid_type.acid_strength)) || initial(acid_type.acid_strength) <= A.current_acid?.acid_strength) + if(!A.should_apply_acid(initial(acid_type.acid_strength)) || initial(current_acid_type.acid_strength) <= A.current_acid?.acid_strength) if(!silent) owner.balloon_alert(owner, "[A] is already subject to a more or equally powerful acid") return FALSE /datum/action/ability/activable/xeno/corrosive_acid/use_ability(atom/A) var/mob/living/carbon/xenomorph/X = owner - + var/obj/effect/xenomorph/acid/current_acid_type = acid_type + if(SSmonitor.gamestate == SHUTTERS_CLOSED && CHECK_BITFIELD(SSticker.mode?.flags_round_type, MODE_ALLOW_XENO_QUICKBUILD) && SSresinshaping.active) + current_acid_type = /obj/effect/xenomorph/acid/strong //if it is before shutters open, everyone gets strong acid // Check if it's an acid object we're upgrading - if (istype(A, /obj/effect/xenomorph/acid)) + if(istype(A, /obj/effect/xenomorph/acid)) var/obj/effect/xenomorph/acid/existing_acid = A A = existing_acid.acid_t // Swap the target to the target of the acid - if(!A.dissolvability(initial(acid_type.acid_strength))) + if(!A.dissolvability(initial(current_acid_type.acid_strength))) return fail_activate() X.face_atom(A) @@ -662,7 +667,7 @@ var/old_acid_ticks = A.current_acid?.ticks QDEL_NULL(A.current_acid) - A.current_acid = new acid_type(get_turf(A), A, A.dissolvability(initial(acid_type.acid_strength)), old_acid_ticks) + A.current_acid = new current_acid_type(get_turf(A), A, A.dissolvability(initial(current_acid_type.acid_strength)), old_acid_ticks) succeed_activate() From 4648d1b88b4a4fa0ad78b185db062a5a1301059c Mon Sep 17 00:00:00 2001 From: Barnet Date: Fri, 2 Feb 2024 13:40:12 -0800 Subject: [PATCH 03/12] Caste Swap (#14938) Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com> --- code/__DEFINES/traits.dm | 3 + code/_globalvars/misc.dm | 3 + .../mob/living/carbon/xenomorph/evo_datum.dm | 9 ++- .../mob/living/carbon/xenomorph/evolution.dm | 76 ++++++++++--------- .../mob/living/carbon/xenomorph/xenoprocs.dm | 6 ++ 5 files changed, 59 insertions(+), 38 deletions(-) diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index fab56ea4f19..ab722feff48 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -259,3 +259,6 @@ #define TRAIT_SUPER_STRONG "t_super_strong" /// Foreign biology. Basic medHUDs won't show the mob. (Yautja, Zombies) #define TRAIT_FOREIGN_BIO "t_foreign_bio" +//regress and caste swap UI +#define TRAIT_CASTE_SWAP "caste_swap" +#define TRAIT_REGRESSING "regressing" diff --git a/code/_globalvars/misc.dm b/code/_globalvars/misc.dm index a6bee2bfacf..01181294589 100644 --- a/code/_globalvars/misc.dm +++ b/code/_globalvars/misc.dm @@ -42,5 +42,8 @@ GLOBAL_PROTECT(key_to_time_of_death) GLOBAL_LIST_EMPTY(key_to_time_of_xeno_death) GLOBAL_PROTECT(key_to_time_of_xeno_death) +GLOBAL_LIST_EMPTY(key_to_time_of_caste_swap) +GLOBAL_PROTECT(key_to_time_of_caste_swap) + ///List of ssd living mobs GLOBAL_LIST_EMPTY(ssd_living_mobs) diff --git a/code/modules/mob/living/carbon/xenomorph/evo_datum.dm b/code/modules/mob/living/carbon/xenomorph/evo_datum.dm index aa4dba92044..410d0b67af0 100644 --- a/code/modules/mob/living/carbon/xenomorph/evo_datum.dm +++ b/code/modules/mob/living/carbon/xenomorph/evo_datum.dm @@ -39,7 +39,7 @@ "type_path" = caste.caste_type_path, "name" = caste.display_name, "abilities" = list(), - "instant_evolve" = (caste.caste_flags & CASTE_INSTANT_EVOLUTION), + "instant_evolve" = (caste.caste_flags & CASTE_INSTANT_EVOLUTION || (HAS_TRAIT(xeno, TRAIT_CASTE_SWAP) || HAS_TRAIT(xeno, TRAIT_REGRESSING))), ) for(var/ability in caste.actions) var/datum/action/ability/xeno_action/xeno_ability = ability @@ -74,5 +74,10 @@ switch(action) if("evolve") var/datum/xeno_caste/caste = GLOB.xeno_caste_datums[text2path(params["path"])][XENO_UPGRADE_BASETYPE] - xeno.do_evolve(caste.caste_type_path, caste.display_name) // All the checks for can or can't are handled inside do_evolve + xeno.do_evolve(caste.caste_type_path, caste.display_name, (HAS_TRAIT(xeno, TRAIT_CASTE_SWAP) || HAS_TRAIT(xeno, TRAIT_REGRESSING))) // All the checks for can or can't are handled inside do_evolve return TRUE + +/datum/evolution_panel/ui_close(mob/user) + . = ..() + REMOVE_TRAIT(user, TRAIT_CASTE_SWAP, TRAIT_CASTE_SWAP) + REMOVE_TRAIT(user, TRAIT_REGRESSING, TRAIT_REGRESSING) diff --git a/code/modules/mob/living/carbon/xenomorph/evolution.dm b/code/modules/mob/living/carbon/xenomorph/evolution.dm index d6ec34ac3ff..6b60653bb10 100644 --- a/code/modules/mob/living/carbon/xenomorph/evolution.dm +++ b/code/modules/mob/living/carbon/xenomorph/evolution.dm @@ -10,51 +10,52 @@ GLOB.evo_panel.ui_interact(src) -/mob/living/carbon/xenomorph/verb/regress() - set name = "Regress" - set desc = "Regress into a lower form." +/mob/living/carbon/xenomorph/verb/caste_swap() + set name = "Caste Swap" + set desc = "Change into another caste in the same tier." set category = "Alien" - var/tiers_to_pick_from - switch(tier) - if(XENO_TIER_ZERO, XENO_TIER_FOUR, XENO_TIER_MINION) -/* RU TGMC EDIT - if(isxenoshrike(src)) - tiers_to_pick_from = GLOB.xeno_types_tier_one - else -RU TGMC EDIT */ - to_chat(src, span_warning("Your tier does not allow you to regress.")) - return - if(XENO_TIER_ONE) - tiers_to_pick_from = list(/mob/living/carbon/xenomorph/larva) - if(XENO_TIER_TWO) - tiers_to_pick_from = GLOB.xeno_types_tier_one - if(XENO_TIER_THREE) - tiers_to_pick_from = GLOB.xeno_types_tier_two - else - CRASH("side_evolve() called without a valid tier") - - var/list/castes_to_pick = list() - for(var/type in tiers_to_pick_from) - var/datum/xeno_caste/available_caste = GLOB.xeno_caste_datums[type][XENO_UPGRADE_BASETYPE] - castes_to_pick += available_caste.caste_name - var/castepick = tgui_input_list(src, "We are growing into a beautiful alien! It is time to choose a caste.", null, castes_to_pick) - if(!castepick) //Changed my mind + if(world.time - (GLOB.key_to_time_of_caste_swap[key] ? GLOB.key_to_time_of_caste_swap[key] : -INFINITY) < 15 MINUTES) + to_chat(src, span_warning("Your caste swap timer is not done yet.")) return - var/castetype - for(var/type in tiers_to_pick_from) - var/datum/xeno_caste/available_caste = GLOB.xeno_caste_datums[type][XENO_UPGRADE_BASETYPE] - if(castepick != available_caste.caste_name) - continue - castetype = type - break + ADD_TRAIT(src, TRAIT_CASTE_SWAP, TRAIT_CASTE_SWAP) + GLOB.evo_panel.ui_interact(src) + +/mob/living/carbon/xenomorph/verb/regress() + set name = "Regress" + set desc = "Regress into a lower form." + set category = "Alien" - do_evolve(castetype, castepick, TRUE) + ADD_TRAIT(src, TRAIT_REGRESSING, TRAIT_REGRESSING) + GLOB.evo_panel.ui_interact(src) ///Creates a list of possible evolution options for a caste based on their tier. /mob/living/carbon/xenomorph/proc/get_evolution_options() . = list() + if(HAS_TRAIT(src, TRAIT_CASTE_SWAP)) + switch(tier) + if(XENO_TIER_ZERO, XENO_TIER_FOUR) + return + if(XENO_TIER_ONE) + return GLOB.xeno_types_tier_one + if(XENO_TIER_TWO) + return GLOB.xeno_types_tier_two + if(XENO_TIER_THREE) + return GLOB.xeno_types_tier_three + if(HAS_TRAIT(src, TRAIT_REGRESSING)) + switch(tier) + if(XENO_TIER_ZERO, XENO_TIER_FOUR) + if(isxenoshrike(src)) + return GLOB.xeno_types_tier_one + else + return + if(XENO_TIER_ONE) + return list(/mob/living/carbon/xenomorph/larva) + if(XENO_TIER_TWO) + return GLOB.xeno_types_tier_one + if(XENO_TIER_THREE) + return GLOB.xeno_types_tier_two switch(tier) if(XENO_TIER_ZERO) return GLOB.xeno_types_tier_one @@ -115,6 +116,9 @@ RU TGMC EDIT */ if(!generic_evolution_checks() || !caste_evolution_checks(new_mob_type, castepick, regression)) return + if(HAS_TRAIT(src, TRAIT_CASTE_SWAP)) + GLOB.key_to_time_of_caste_swap[key] = world.time + SStgui.close_user_uis(src) //Force close all UIs upon evolution. finish_evolve(new_mob_type) diff --git a/code/modules/mob/living/carbon/xenomorph/xenoprocs.dm b/code/modules/mob/living/carbon/xenomorph/xenoprocs.dm index f0b93d38859..94fba769e19 100644 --- a/code/modules/mob/living/carbon/xenomorph/xenoprocs.dm +++ b/code/modules/mob/living/carbon/xenomorph/xenoprocs.dm @@ -130,6 +130,12 @@ . += "Regeneration power: [max(regen_power * 100, 0)]%" + var/casteswap_value = ((GLOB.key_to_time_of_caste_swap[key] ? GLOB.key_to_time_of_caste_swap[key] : -INFINITY) + 15 MINUTES - world.time) * 0.1 + if(casteswap_value <= 0) + . += "Caste Swap Timer: READY" + else + . += "Caste Swap Timer: [(casteswap_value / 60) % 60]:[add_leading(num2text(casteswap_value % 60), 2, "0")]" + //Very weak <= 1.0, weak <= 2.0, no modifier 2-3, strong <= 3.5, very strong <= 4.5 var/msg_holder = "" if(frenzy_aura) From eb23c843014fae6780e4d809ce791bbedee18960 Mon Sep 17 00:00:00 2001 From: Helg2 Date: Fri, 23 Aug 2024 13:14:25 +0300 Subject: [PATCH 04/12] Update evolution.dm --- code/modules/mob/living/carbon/xenomorph/evolution.dm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/evolution.dm b/code/modules/mob/living/carbon/xenomorph/evolution.dm index 6b60653bb10..504d8ff0392 100644 --- a/code/modules/mob/living/carbon/xenomorph/evolution.dm +++ b/code/modules/mob/living/carbon/xenomorph/evolution.dm @@ -46,10 +46,7 @@ if(HAS_TRAIT(src, TRAIT_REGRESSING)) switch(tier) if(XENO_TIER_ZERO, XENO_TIER_FOUR) - if(isxenoshrike(src)) - return GLOB.xeno_types_tier_one - else - return + return if(XENO_TIER_ONE) return list(/mob/living/carbon/xenomorph/larva) if(XENO_TIER_TWO) From 360fe58d9c7d2897e5081928bad050424e0d68e1 Mon Sep 17 00:00:00 2001 From: Helg2 Date: Fri, 23 Aug 2024 13:17:00 +0300 Subject: [PATCH 05/12] deevolve should be singular, not list --- .../living/carbon/xenomorph/castes/bull/castedatum_bull.dm | 4 +--- .../carbon/xenomorph/castes/gorger/castedatum_gorger.dm | 2 +- .../carbon/xenomorph/castes/spitter/castedatum_spitter.dm | 4 +--- .../carbon/xenomorph/castes/warlock/castedatum_warlock.dm | 2 +- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/bull/castedatum_bull.dm b/code/modules/mob/living/carbon/xenomorph/castes/bull/castedatum_bull.dm index ed92abb6288..e607d4b245d 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/bull/castedatum_bull.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/bull/castedatum_bull.dm @@ -24,9 +24,7 @@ // *** Evolution *** // evolution_threshold = 225 - deevolves_to = list( - /mob/living/carbon/xenomorph/runner, - ) + deevolves_to = /mob/living/carbon/xenomorph/runner // *** Flags *** // caste_flags = CASTE_EVOLUTION_ALLOWED diff --git a/code/modules/mob/living/carbon/xenomorph/castes/gorger/castedatum_gorger.dm b/code/modules/mob/living/carbon/xenomorph/castes/gorger/castedatum_gorger.dm index 0b1d7e30c0d..56d18a060fd 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/gorger/castedatum_gorger.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/gorger/castedatum_gorger.dm @@ -27,7 +27,7 @@ max_health = 600 // *** Evolution *** // - deevolves_to = list(/mob/living/carbon/xenomorph/warrior, /mob/living/carbon/xenomorph/hivelord) + deevolves_to = /mob/living/carbon/xenomorph/hivelord // *** Flags *** // caste_flags = CASTE_INNATE_PLASMA_REGEN|CASTE_PLASMADRAIN_IMMUNE|CASTE_EVOLUTION_ALLOWED diff --git a/code/modules/mob/living/carbon/xenomorph/castes/spitter/castedatum_spitter.dm b/code/modules/mob/living/carbon/xenomorph/castes/spitter/castedatum_spitter.dm index bb1e54f98a4..fecb166817b 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/spitter/castedatum_spitter.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/spitter/castedatum_spitter.dm @@ -24,9 +24,7 @@ // *** Evolution *** // evolution_threshold = 225 - deevolves_to = list( - /mob/living/carbon/xenomorph/sentinel, - ) + deevolves_to = /mob/living/carbon/xenomorph/sentinel // *** Flags *** // caste_flags = CASTE_EVOLUTION_ALLOWED diff --git a/code/modules/mob/living/carbon/xenomorph/castes/warlock/castedatum_warlock.dm b/code/modules/mob/living/carbon/xenomorph/castes/warlock/castedatum_warlock.dm index 9c4f6bee6dc..be46cd7f9ca 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/warlock/castedatum_warlock.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/warlock/castedatum_warlock.dm @@ -15,7 +15,7 @@ max_health = 375 spit_types = list(/datum/ammo/energy/xeno/psy_blast) - deevolves_to = list(/mob/living/carbon/xenomorph/warrior) + deevolves_to = /mob/living/carbon/xenomorph/warrior can_flags = CASTE_CAN_BE_QUEEN_HEALED|CASTE_CAN_BE_GIVEN_PLASMA|CASTE_CAN_BE_LEADER caste_traits = null soft_armor = list(MELEE = 40, BULLET = 40, LASER = 40, ENERGY = 40, BOMB = 10, BIO = 35, FIRE = 35, ACID = 35) From 162c3970a68a22db6b7e36109bec4c4d03c6fd82 Mon Sep 17 00:00:00 2001 From: Helg2 Date: Fri, 23 Aug 2024 13:19:21 +0300 Subject: [PATCH 06/12] Update evolution.dm --- code/modules/mob/living/carbon/xenomorph/evolution.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/evolution.dm b/code/modules/mob/living/carbon/xenomorph/evolution.dm index 504d8ff0392..d82d228c245 100644 --- a/code/modules/mob/living/carbon/xenomorph/evolution.dm +++ b/code/modules/mob/living/carbon/xenomorph/evolution.dm @@ -66,7 +66,6 @@ if(istype(xeno_caste, /datum/xeno_caste/shrike)) return list(/mob/living/carbon/xenomorph/queen, /mob/living/carbon/xenomorph/king) - ///Handles the evolution or devolution of the xenomorph /mob/living/carbon/xenomorph/proc/do_evolve(caste_type, forced_caste_name, regression = FALSE) if(!generic_evolution_checks()) From f813ecf0bc7ebbc0c5195ba59b30cbd34de19cff Mon Sep 17 00:00:00 2001 From: Helg2 Date: Fri, 23 Aug 2024 13:19:24 +0300 Subject: [PATCH 07/12] Update castedatum_panther.dm --- .../living/carbon/xenomorph/castes/panther/castedatum_panther.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/panther/castedatum_panther.dm b/code/modules/mob/living/carbon/xenomorph/castes/panther/castedatum_panther.dm index d777ac01ca6..ef3956eeb81 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/panther/castedatum_panther.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/panther/castedatum_panther.dm @@ -30,7 +30,6 @@ // *** Evolution *** // evolution_threshold = 225 - evolves_to = list(/mob/living/carbon/xenomorph/ravager, /mob/living/carbon/xenomorph/chimera) deevolves_to = /mob/living/carbon/xenomorph/runner // *** Flags *** // From 05b4ff3eb1750fa1f9dc5379b35126734bd58a4b Mon Sep 17 00:00:00 2001 From: Helg2 Date: Fri, 23 Aug 2024 13:38:20 +0300 Subject: [PATCH 08/12] Update evolution.dm --- code/modules/mob/living/carbon/xenomorph/evolution.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/evolution.dm b/code/modules/mob/living/carbon/xenomorph/evolution.dm index d82d228c245..44cd99b9e2b 100644 --- a/code/modules/mob/living/carbon/xenomorph/evolution.dm +++ b/code/modules/mob/living/carbon/xenomorph/evolution.dm @@ -38,11 +38,11 @@ if(XENO_TIER_ZERO, XENO_TIER_FOUR) return if(XENO_TIER_ONE) - return GLOB.xeno_types_tier_one + return GLOB.xeno_types_tier_one - caste_base_type if(XENO_TIER_TWO) - return GLOB.xeno_types_tier_two + return GLOB.xeno_types_tier_two - caste_base_type if(XENO_TIER_THREE) - return GLOB.xeno_types_tier_three + return GLOB.xeno_types_tier_three - caste_base_type if(HAS_TRAIT(src, TRAIT_REGRESSING)) switch(tier) if(XENO_TIER_ZERO, XENO_TIER_FOUR) From c69abf6ebc54f261b5899290ecc2e8c008ca9a9d Mon Sep 17 00:00:00 2001 From: Helg2 Date: Fri, 23 Aug 2024 13:57:01 +0300 Subject: [PATCH 09/12] Update larva.dm --- .../mob/living/carbon/xenomorph/castes/larva/larva.dm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/larva/larva.dm b/code/modules/mob/living/carbon/xenomorph/castes/larva/larva.dm index 8c1210acc34..fbffdac8724 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/larva/larva.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/larva/larva.dm @@ -129,9 +129,6 @@ // *** Evolution *** // evolution_threshold = 50 - evolves_to = list( - /mob/living/carbon/xenomorph/predalien, - ) // *** Flags *** // caste_flags = CASTE_EVOLUTION_ALLOWED|CASTE_INNATE_HEALING @@ -203,3 +200,9 @@ icon_state = "[base_icon_state] Stunned" else icon_state = "[base_icon_state]" + +/mob/living/carbon/xenomorph/larva/predalien/get_evolution_options() + . = list() + if(HAS_TRAIT(src, TRAIT_CASTE_SWAP) || HAS_TRAIT(src, TRAIT_REGRESSING)) + return + return list(/mob/living/carbon/xenomorph/predalien) From 1ce348afced2b1ffe4c862619063cd5bceffb524 Mon Sep 17 00:00:00 2001 From: Notamaniac Date: Sat, 6 Jul 2024 18:51:05 +0100 Subject: [PATCH 10/12] Evo sanity checks (#16270) --- .../mob/living/carbon/xenomorph/evolution.dm | 16 ++++++---------- .../mob/living/carbon/xenomorph/xenomorph.dm | 12 ++++++++++++ .../mob/living/carbon/xenomorph/xenoprocs.dm | 8 +++++++- .../mob/living/carbon/xenomorph/xenoupgrade.dm | 3 ++- 4 files changed, 27 insertions(+), 12 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/evolution.dm b/code/modules/mob/living/carbon/xenomorph/evolution.dm index 44cd99b9e2b..76f2a80125b 100644 --- a/code/modules/mob/living/carbon/xenomorph/evolution.dm +++ b/code/modules/mob/living/carbon/xenomorph/evolution.dm @@ -128,10 +128,11 @@ if(new_xeno) qdel(new_xeno) return - while(new_xeno.upgrade_possible()) - new_xeno.upgrade_xeno(new_xeno.upgrade_next(), TRUE) - + if(!new_xeno.upgrade_xeno(new_xeno.upgrade_next(), TRUE)) //Upgrade tier wasn't set properly, let's avoid looping forever + qdel(new_xeno) + stack_trace("[src] tried to evolve and upgrade, but the castes upgrade tier wasn't valid.") + return SEND_SIGNAL(src, COMSIG_XENOMORPH_EVOLVED, new_xeno) @@ -199,17 +200,12 @@ SSmonitor.stats.primo_T4-- while(new_xeno.upgrade_possible()) - new_xeno.upgrade_xeno(new_xeno.upgrade_next(), TRUE) - - var/atom/movable/screen/zone_sel/selector = new_xeno.hud_used?.zone_sel - selector?.set_selected_zone(zone_selected, new_xeno) - qdel(src) - INVOKE_ASYNC(new_xeno, TYPE_PROC_REF(/atom, do_jitter_animation), 1000) + if(!new_xeno.upgrade_xeno(new_xeno.upgrade_next(), TRUE)) //This return shouldn't be possible to trigger, unless you varedit upgrade right on the tick the xeno evos + return new_xeno.overlay_fullscreen_timer(2 SECONDS, 20, "roundstart2", /atom/movable/screen/fullscreen/spawning_in) ///Check if the xeno is currently able to evolve -/mob/living/carbon/xenomorph/proc/generic_evolution_checks() if(HAS_TRAIT(src, TRAIT_BANISHED)) balloon_alert(src, span_warning("You are banished and cannot reach the hivemind.")) diff --git a/code/modules/mob/living/carbon/xenomorph/xenomorph.dm b/code/modules/mob/living/carbon/xenomorph/xenomorph.dm index 70f247decc9..15387a4d57c 100644 --- a/code/modules/mob/living/carbon/xenomorph/xenomorph.dm +++ b/code/modules/mob/living/carbon/xenomorph/xenomorph.dm @@ -200,6 +200,8 @@ return 0 /mob/living/carbon/xenomorph/proc/upgrade_next() + if(!(upgrade in GLOB.xenoupgradetiers)) + CRASH("Invalid upgrade tier set for caste!") switch(upgrade) if(XENO_UPGRADE_INVALID) return XENO_UPGRADE_INVALID @@ -207,8 +209,14 @@ return XENO_UPGRADE_PRIMO if(XENO_UPGRADE_PRIMO) return XENO_UPGRADE_PRIMO + if(XENO_UPGRADE_BASETYPE) + return XENO_UPGRADE_BASETYPE + else + stack_trace("Logic for handling this Upgrade tier wasn't written") /mob/living/carbon/xenomorph/proc/upgrade_prev() + if(!(upgrade in GLOB.xenoupgradetiers)) + CRASH("Invalid upgrade tier set for caste!") switch(upgrade) if(XENO_UPGRADE_INVALID) return XENO_UPGRADE_INVALID @@ -216,6 +224,10 @@ return XENO_UPGRADE_NORMAL if(XENO_UPGRADE_PRIMO) return XENO_UPGRADE_NORMAL + if(XENO_UPGRADE_BASETYPE) + return XENO_UPGRADE_BASETYPE + else + stack_trace("Logic for handling this Upgrade tier wasn't written") /mob/living/carbon/xenomorph/proc/setup_job() var/datum/job/xenomorph/xeno_job = SSjob.type_occupations[xeno_caste.job_type] diff --git a/code/modules/mob/living/carbon/xenomorph/xenoprocs.dm b/code/modules/mob/living/carbon/xenomorph/xenoprocs.dm index 94fba769e19..f0c5820c721 100644 --- a/code/modules/mob/living/carbon/xenomorph/xenoprocs.dm +++ b/code/modules/mob/living/carbon/xenomorph/xenoprocs.dm @@ -103,11 +103,17 @@ ///returns TRUE if we are permitted to evo to the next caste FALSE otherwise /mob/living/carbon/xenomorph/proc/upgrade_possible() + if(!(upgrade in GLOB.xenoupgradetiers)) + stack_trace("Upgrade isn't in upgrade list, incorrect define provided") + return FALSE if(HAS_TRAIT(src, TRAIT_VALHALLA_XENO)) return FALSE if(upgrade == XENO_UPGRADE_NORMAL) return hive.purchases.upgrades_by_name[GLOB.tier_to_primo_upgrade[xeno_caste.tier]].times_bought - return (upgrade != XENO_UPGRADE_INVALID && upgrade != XENO_UPGRADE_PRIMO) + if(upgrade == XENO_UPGRADE_INVALID || upgrade == XENO_UPGRADE_PRIMO || upgrade == XENO_UPGRADE_BASETYPE) + return FALSE + stack_trace("Logic for handling this Upgrade tier wasn't written") + return FALSE //Adds stuff to your "Status" pane -- Specific castes can have their own, like carrier hugger count //Those are dealt with in their caste files. diff --git a/code/modules/mob/living/carbon/xenomorph/xenoupgrade.dm b/code/modules/mob/living/carbon/xenomorph/xenoupgrade.dm index de755efe4cd..ad30fe0d2c6 100644 --- a/code/modules/mob/living/carbon/xenomorph/xenoupgrade.dm +++ b/code/modules/mob/living/carbon/xenomorph/xenoupgrade.dm @@ -1,7 +1,7 @@ /mob/living/carbon/xenomorph/proc/upgrade_xeno(newlevel, silent = FALSE) if(!(newlevel in (GLOB.xenoupgradetiers - XENO_UPGRADE_INVALID))) - return + return FALSE hive.upgrade_xeno(src, upgrade, newlevel) upgrade = newlevel if(!silent) @@ -75,6 +75,7 @@ hud_set_queen_overwatch() //update the upgrade level insignia on our xeno hud. update_spits() //Update spits to new/better ones + return TRUE //Tiered spawns. From 31ab62b96608d42c69e583ff575f611268e2b9f2 Mon Sep 17 00:00:00 2001 From: Helg2 Date: Fri, 23 Aug 2024 14:03:53 +0300 Subject: [PATCH 11/12] Update evolution.dm --- code/modules/mob/living/carbon/xenomorph/evolution.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/evolution.dm b/code/modules/mob/living/carbon/xenomorph/evolution.dm index 76f2a80125b..a214600ff6c 100644 --- a/code/modules/mob/living/carbon/xenomorph/evolution.dm +++ b/code/modules/mob/living/carbon/xenomorph/evolution.dm @@ -206,7 +206,7 @@ new_xeno.overlay_fullscreen_timer(2 SECONDS, 20, "roundstart2", /atom/movable/screen/fullscreen/spawning_in) ///Check if the xeno is currently able to evolve - +/mob/living/carbon/xenomorph/proc/generic_evolution_checks() if(HAS_TRAIT(src, TRAIT_BANISHED)) balloon_alert(src, span_warning("You are banished and cannot reach the hivemind.")) return FALSE From 8708c8e69ff59c79088946b77578e0d7c7f77b99 Mon Sep 17 00:00:00 2001 From: Helg2 Date: Fri, 23 Aug 2024 14:11:34 +0300 Subject: [PATCH 12/12] Update evolution.dm --- code/modules/mob/living/carbon/xenomorph/evolution.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/modules/mob/living/carbon/xenomorph/evolution.dm b/code/modules/mob/living/carbon/xenomorph/evolution.dm index a214600ff6c..61c03d295c6 100644 --- a/code/modules/mob/living/carbon/xenomorph/evolution.dm +++ b/code/modules/mob/living/carbon/xenomorph/evolution.dm @@ -203,6 +203,10 @@ if(!new_xeno.upgrade_xeno(new_xeno.upgrade_next(), TRUE)) //This return shouldn't be possible to trigger, unless you varedit upgrade right on the tick the xeno evos return + var/atom/movable/screen/zone_sel/selector = new_xeno.hud_used?.zone_sel + selector?.set_selected_zone(zone_selected, new_xeno) + qdel(src) + INVOKE_ASYNC(new_xeno, TYPE_PROC_REF(/atom, do_jitter_animation), 1000) new_xeno.overlay_fullscreen_timer(2 SECONDS, 20, "roundstart2", /atom/movable/screen/fullscreen/spawning_in) ///Check if the xeno is currently able to evolve