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)) 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!") 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,