From 7fdfabb1410b42acd7067e9729d983c35d2bc987 Mon Sep 17 00:00:00 2001 From: Bastian0930 <28938873+Bastian0930@users.noreply.github.com> Date: Sun, 7 Apr 2024 10:40:51 -0400 Subject: [PATCH 1/5] Ports 82412 from TGstation https://github.com/tgstation/tgstation/pull/82412 --- .../changeling/powers/fakedeath.dm | 36 +++++++++++++------ 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/code/modules/antagonists/changeling/powers/fakedeath.dm b/code/modules/antagonists/changeling/powers/fakedeath.dm index a4b6b54de3d208..9e2e272a8c15cc 100644 --- a/code/modules/antagonists/changeling/powers/fakedeath.dm +++ b/code/modules/antagonists/changeling/powers/fakedeath.dm @@ -19,7 +19,7 @@ ..() if(revive_ready) INVOKE_ASYNC(src, PROC_REF(revive), user) - disable_revive(user) // this should be already called via signal, but just incase something wacky happens + else if(enable_fakedeath(user)) to_chat(user, span_changeling("We begin our stasis, preparing energy to arise once more.")) @@ -41,17 +41,24 @@ RegisterSignal(changeling, COMSIG_MOB_STATCHANGE, PROC_REF(on_stat_change)) return TRUE -/// Sets [revive_ready] to FALSE and updates the button icons. -/// Can be called mid-revival if the process is being cancelled -/datum/action/changeling/fakedeath/proc/disable_revive(mob/living/changeling) - if(revive_ready) - chemical_cost = 15 - revive_ready = FALSE - build_all_button_icons(UPDATE_BUTTON_NAME|UPDATE_BUTTON_ICON) - +/// Removes the signals for fakedeath and listening for hapless doctors +/// healing a changeling who went into stasis after actually dying, and +/// also removes changeling stasis +/datum/action/changeling/fakedeath/proc/disable_stasis_and_fakedeath(mob/living/changeling) + REMOVE_TRAIT(changeling, TRAIT_DEATHCOMA, CHANGELING_TRAIT) UnregisterSignal(changeling, SIGNAL_REMOVETRAIT(TRAIT_DEATHCOMA)) UnregisterSignal(changeling, COMSIG_MOB_STATCHANGE) + + + +/// This proc is called to reset the chemical cost of the revival +/// as well as the revive ready flag and button states. +/datum/action/changeling/fakedeath/proc/reset_chemical_cost() + chemical_cost = 15 + revive_ready = FALSE + build_all_button_icons(UPDATE_BUTTON_NAME|UPDATE_BUTTON_ICON) + /// Sets [revive_ready] to TRUE and updates the button icons. /datum/action/changeling/fakedeath/proc/enable_revive(mob/living/changeling) if(revive_ready) @@ -68,7 +75,7 @@ if(HAS_TRAIT_FROM(source, TRAIT_DEATHCOMA, CHANGELING_TRAIT)) return - disable_revive(source) + disable_stasis_and_fakedeath(source) /// Signal proc to exit fakedeath early if we're revived from being previously dead /datum/action/changeling/fakedeath/proc/on_stat_change(mob/living/source, new_stat, old_stat) @@ -79,6 +86,7 @@ source.cure_fakedeath(CHANGELING_TRAIT) to_chat(source, span_changeling("We exit our stasis early.")) + reset_chemical_cost() /datum/action/changeling/fakedeath/proc/revive(mob/living/carbon/user) if(!istype(user)) @@ -135,6 +143,14 @@ return ..() +/// We wait until after we actually deduct chemical cost (or don't deduct +/// if it's the 0 cost we get for revival) before we reset the chemical cost +/datum/action/changeling/fakedeath/try_to_sting(mob/living/user) + . = ..() + if (!. || !revive_ready) + return + reset_chemical_cost() + /datum/action/changeling/fakedeath/proc/can_enter_stasis(mob/living/user) if(HAS_TRAIT_FROM(user, TRAIT_DEATHCOMA, CHANGELING_TRAIT)) user.balloon_alert(user, "already reviving!") From a26d0fe49eaf7545265bf379d489017d0eb9009f Mon Sep 17 00:00:00 2001 From: Bastian0930 <28938873+Bastian0930@users.noreply.github.com> Date: Sun, 7 Apr 2024 10:55:41 -0400 Subject: [PATCH 2/5] Ports TGstation 81661 https://github.com/tgstation/tgstation/pull/81661 --- tgui/packages/tgui-say/constants/index.tsx | 6 ++++++ tgui/packages/tgui-say/styles/colors.scss | 2 ++ 2 files changed, 8 insertions(+) diff --git a/tgui/packages/tgui-say/constants/index.tsx b/tgui/packages/tgui-say/constants/index.tsx index 778aa2f116928c..5e4555f89c715c 100644 --- a/tgui/packages/tgui-say/constants/index.tsx +++ b/tgui/packages/tgui-say/constants/index.tsx @@ -38,6 +38,12 @@ export const RADIO_PREFIXES = { id: 'binary', label: '0101', }, + + ':g ': { + id: 'changeling', + label: 'Cling', + }, + ':c ': { id: 'command', label: 'Cmd', diff --git a/tgui/packages/tgui-say/styles/colors.scss b/tgui/packages/tgui-say/styles/colors.scss index b1c733d9c9ae97..dd7b580255c9e2 100644 --- a/tgui/packages/tgui-say/styles/colors.scss +++ b/tgui/packages/tgui-say/styles/colors.scss @@ -22,6 +22,7 @@ $admin: #ffbbff; $mentor: #d3df68; $binary: #1e90ff; $centcom: #2681a5; +$changeling: #4c701f; $command: #fcdf03; $engi: #f37746; $hive: #855d85; @@ -43,6 +44,7 @@ $_channel_map: ( 'mentor': $mentor, 'binary': $binary, 'centcom': $centcom, + 'changeling': $changeling, 'command': $command, 'engi': $engi, 'hive': $hive, From 20fc62a4dc9ee86f997f12dc1968b6a3376800f2 Mon Sep 17 00:00:00 2001 From: Bastian0930 <28938873+Bastian0930@users.noreply.github.com> Date: Sun, 7 Apr 2024 11:06:08 -0400 Subject: [PATCH 3/5] Ports 80012 from tgstation https://github.com/tgstation/tgstation/pull/80012 --- code/game/gamemodes/objective.dm | 35 +++++++++++++------ .../antagonists/changeling/changeling.dm | 13 ++++--- 2 files changed, 33 insertions(+), 15 deletions(-) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 60183aa2543e0b..a810084770ea51 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -124,6 +124,19 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list /datum/objective/proc/get_target() return target +/datum/objective/proc/is_valid_target(datum/mind/possible_target) + if(!ishuman(possible_target.current)) + return FALSE + + if(possible_target.current.stat == DEAD) + return FALSE + + var/target_area = get_area(possible_target.current) + if(!HAS_TRAIT(SSstation, STATION_TRAIT_LATE_ARRIVALS) && istype(target_area, /area/shuttle/arrival)) + return FALSE + + return TRUE + //dupe_search_range is a list of antag datums / minds / teams /datum/objective/proc/find_target(dupe_search_range, list/blacklist) var/list/datum/mind/owners = get_owners() @@ -136,19 +149,14 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list if(O.late_joiner) try_target_late_joiners = TRUE for(var/datum/mind/possible_target in get_crewmember_minds()) - var/target_area = get_area(possible_target.current) if(possible_target in owners) continue - if(!ishuman(possible_target.current)) - continue - if(possible_target.current.stat == DEAD) - continue if(!is_unique_objective(possible_target,dupe_search_range)) continue - if(!HAS_TRAIT(SSstation, STATION_TRAIT_LATE_ARRIVALS) && istype(target_area, /area/shuttle/arrival)) - continue if(possible_target in blacklist) continue + if(!is_valid_target(possible_target)) + continue possible_targets += possible_target if(try_target_late_joiners) var/list/all_possible_targets = possible_targets.Copy() @@ -209,7 +217,7 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list return TRUE /datum/objective/assassinate - name = "assasinate" + name = "assassinate" martyr_compatible = TRUE admin_grantable = TRUE var/target_role_type = FALSE @@ -480,6 +488,11 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list target = ..() update_explanation_text() +/datum/objective/escape/escape_with_identity/is_valid_target(datum/mind/possible_target) + if(HAS_TRAIT(possible_target.current, TRAIT_NO_DNA_COPY)) + return FALSE + return ..() + /datum/objective/escape/escape_with_identity/update_explanation_text() if(target?.current) target_real_name = target.current.real_name @@ -494,12 +507,12 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list explanation_text += "." //Proper punctuation is important! else - explanation_text = "Free objective." + explanation_text = "Escape on the shuttle or an escape pod alive and without being in custody." /datum/objective/escape/escape_with_identity/check_completion() - if(!target || !target_real_name) - return TRUE var/list/datum/mind/owners = get_owners() + if(!target || !target_real_name) + return ..() for(var/datum/mind/M in owners) if(!ishuman(M.current) || !considered_escaped(M)) continue diff --git a/code/modules/antagonists/changeling/changeling.dm b/code/modules/antagonists/changeling/changeling.dm index 04e1b9ed1e37ae..454691b314e356 100644 --- a/code/modules/antagonists/changeling/changeling.dm +++ b/code/modules/antagonists/changeling/changeling.dm @@ -686,16 +686,21 @@ else var/datum/objective/maroon/maroon_objective = new maroon_objective.owner = owner - maroon_objective.find_target() - objectives += maroon_objective + if (!(locate(/datum/objective/escape) in objectives) && escape_objective_possible) var/datum/objective/escape/escape_with_identity/identity_theft = new identity_theft.owner = owner - identity_theft.target = maroon_objective.target + identity_theft.find_target() identity_theft.update_explanation_text() - objectives += identity_theft escape_objective_possible = FALSE + maroon_objective.target = identity_theft.target || maroon_objective.find_target() + maroon_objective.update_explanation_text() + objectives += maroon_objective + objectives += identity_theft + else + maroon_objective.find_target() + objectives += maroon_objective if (!(locate(/datum/objective/escape) in objectives) && escape_objective_possible) if(prob(50)) From 7255221a4002a3bceefbc4a3c9e0d3baa190a822 Mon Sep 17 00:00:00 2001 From: Bastian0930 <28938873+Bastian0930@users.noreply.github.com> Date: Sun, 7 Apr 2024 23:11:30 -0400 Subject: [PATCH 4/5] Fixes #1445 via giving IPC's a trait they should have had already --- .../code/modules/mob/living/carbon/human/species_type/ipc.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/monkestation/code/modules/mob/living/carbon/human/species_type/ipc.dm b/monkestation/code/modules/mob/living/carbon/human/species_type/ipc.dm index 2c81c861e89c0e..3a18f4c5733b9b 100644 --- a/monkestation/code/modules/mob/living/carbon/human/species_type/ipc.dm +++ b/monkestation/code/modules/mob/living/carbon/human/species_type/ipc.dm @@ -29,6 +29,7 @@ TRAIT_GENELESS, TRAIT_LITERATE, TRAIT_EASYDISMEMBER, + TRAIT_NO_DNA_COPY, ) inherent_biotypes = MOB_ROBOTIC | MOB_HUMANOID From 5c23c8cea7350e3d81138c576b078d0648bc2047 Mon Sep 17 00:00:00 2001 From: Bastian0930 Date: Fri, 12 Apr 2024 18:50:44 -0400 Subject: [PATCH 5/5] Removes a fix as Borbop wanted it in his :( darn you, maintainer man...,,, --- .../code/modules/mob/living/carbon/human/species_type/ipc.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/monkestation/code/modules/mob/living/carbon/human/species_type/ipc.dm b/monkestation/code/modules/mob/living/carbon/human/species_type/ipc.dm index 3a18f4c5733b9b..2c81c861e89c0e 100644 --- a/monkestation/code/modules/mob/living/carbon/human/species_type/ipc.dm +++ b/monkestation/code/modules/mob/living/carbon/human/species_type/ipc.dm @@ -29,7 +29,6 @@ TRAIT_GENELESS, TRAIT_LITERATE, TRAIT_EASYDISMEMBER, - TRAIT_NO_DNA_COPY, ) inherent_biotypes = MOB_ROBOTIC | MOB_HUMANOID