Skip to content

Commit

Permalink
Merge branch 'tg-effects-part2-poc' into tg-effects-part3a-daze
Browse files Browse the repository at this point in the history
  • Loading branch information
fira committed Nov 9, 2023
2 parents 26c3a99 + 092060e commit 3e6ba3d
Show file tree
Hide file tree
Showing 122 changed files with 1,348 additions and 336 deletions.
3 changes: 0 additions & 3 deletions code/__DEFINES/dcs/signals/atom/mob/living/signals_xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,3 @@

/// For any additional things that should happen when a xeno's melee_attack_additional_effects_self() proc is called
#define COMSIG_XENO_SLASH_ADDITIONAL_EFFECTS_SELF "xeno_slash_additional_effects_self"

/// Cancels all running cloaking effects on target
#define COMSIG_MOB_EFFECT_CLOAK_CANCEL "mob_effect_cloak_cancel"
3 changes: 3 additions & 0 deletions code/__DEFINES/dcs/signals/atom/mob/signals_mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,6 @@

/// From /obj/item/proc/pickup() : (obj/item/picked_up)
#define COMSIG_MOB_PICKUP_ITEM "mob_pickup_item"

/// Cancels all running cloaking effects on target
#define COMSIG_MOB_EFFECT_CLOAK_CANCEL "mob_effect_cloak_cancel"
2 changes: 2 additions & 0 deletions code/__DEFINES/dcs/signals/atom/signals_obj.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@

/// from /obj/proc/afterbuckle()
#define COSMIG_OBJ_AFTER_BUCKLE "signal_obj_after_buckle"

#define COMSIG_STRUCTURE_CRATE_SQUAD_LAUNCHED "structure_crate_squad_launched"
1 change: 1 addition & 0 deletions code/__DEFINES/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#define SQUAD_MARINE_CRYO "Foxtrot"
#define SQUAD_MARINE_INTEL "Intel"
#define SQUAD_SOF "SOF"
#define SQUAD_CBRN "CBRN"

// Job name defines
#define JOB_SQUAD_MARINE "Rifleman"
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/keybinding.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#define COMSIG_KB_ADMIN_INVISIMINTOGGLE_DOWN "keybinding_admin_invisimintoggle_down"
#define COMSIG_KB_ADMIN_DEADMIN_DOWN "keybinding_admin_deadmin_down"
#define COMSIG_KB_ADMIN_READMIN_DOWN "keybinding_admin_readmin_down"
#define COMSIG_KB_ADMIN_MENTORSAY_DOWN "keybinding_admin_mentorsay_down"

//Carbon
#define COMSIG_KB_CARBON_HOLDRUNMOVEINTENT_DOWN "keybinding_carbon_holdrunmoveintent_down"
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/speech_channels.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Used to direct channels to speak into.
#define SAY_CHANNEL "Say"
#define COMMS_CHANNEL "Comms"
#define WHISPER_CHANNEL "Whisper"
#define ME_CHANNEL "Me"
#define OOC_CHANNEL "OOC"
#define LOOC_CHANNEL "LOOC"
Expand Down
36 changes: 18 additions & 18 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@
/// A simple helper for checking traits in a mob's mind
#define HAS_MIND_TRAIT(target, trait) (HAS_TRAIT(target, trait) || (target.mind ? HAS_TRAIT(target.mind, trait) : FALSE))


/// Example trait
// #define TRAIT_X "t_x"

Expand All @@ -131,6 +130,18 @@
//-- mob traits --
/// Apply this to make a mob not dense, and remove it when you want it to no longer make them undense, other sorces of undesity will still apply. Always define a unique source when adding a new instance of this!
#define TRAIT_UNDENSE "undense"
/// Forces the user to stay unconscious.
#define TRAIT_KNOCKEDOUT "knockedout"
/// Prevents voluntary movement.
#define TRAIT_IMMOBILIZED "immobilized"
/// Prevents voluntary standing or staying up on its own.
#define TRAIT_FLOORED "floored"
/// Forces user to stay standing
#define TRAIT_FORCED_STANDING "forcedstanding"
/// Stuns preventing movement and using objects but without further impairement
#define TRAIT_INCAPACITATED "incapacitated"
/// Disoriented. Unable to talk, and unable to use skills as Xeno
#define TRAIT_DAZED "dazed"

// SPECIES TRAITS
/// Knowledge of Yautja technology
Expand All @@ -146,17 +157,6 @@
/// Makes it impossible to strip the inventory of this mob.
#define TRAIT_UNSTRIPPABLE "t_unstrippable"

/// Forces the user to stay unconscious.
#define TRAIT_KNOCKEDOUT "knockedout"
/// Prevents voluntary movement.
#define TRAIT_IMMOBILIZED "immobilized"
/// Prevents voluntary standing or staying up on its own.
#define TRAIT_FLOORED "floored"
#define TRAIT_INCAPACITATED "incapacitated"
/// Disoriented. Unable to talk, and unable to use skills as Xeno
#define TRAIT_DAZED "dazed"


// HIVE TRAITS
/// If the Hive is a Xenonid Hive
#define TRAIT_XENONID "t_xenonid"
Expand Down Expand Up @@ -374,6 +374,8 @@ GLOBAL_LIST(trait_name_map)
// #define TRAIT_SOURCE_Y "t_s_y"
#define TRAIT_SOURCE_INHERENT "t_s_inherent"
//-- mob traits --
///Status trait coming from lying down through update_canmove()
#define LYING_TRAIT "lying"
///Status trait coming from species. .human/species_gain()
#define TRAIT_SOURCE_SPECIES "t_s_species"
///Status trait coming from the hive.
Expand Down Expand Up @@ -425,10 +427,10 @@ GLOBAL_LIST(trait_name_map)
#define STAT_TRAIT "stat"
/// trait effect related to the queen ovipositor
#define OVIPOSITOR_TRAIT "ovipositor"
/// trait effect related to active specialist gear
#define SPECIALIST_GEAR_TRAIT "specialist_gear"
/// trait associated to being held in a chokehold
#define CHOKEHOLD_TRAIT "chokehold"
/// trait effect related to active specialist gear
#define SPECIALIST_GEAR_TRAIT "specialist_gear"
/// traits associated with usage of snowflake dropship double seats
#define DOUBLE_SEATS_TRAIT "double_seats"
/// traits associated with xeno on-ground weeds
Expand All @@ -443,11 +445,9 @@ GLOBAL_LIST(trait_name_map)
#define KNOCKEDOUT_TRAIT "knockedout"
/// traits from being pounced
#define POUNCED_TRAIT "pounced"
/// traits added by manual intervention
#define ADMIN_ACTION_TRAIT "admin_action"
/// traits from chloroform usage
#define CHLOROFORM_TRAIT "chloroform"
/// traits from step_triggers on the map
#define STEP_TRIGGER_TRAIT "step_trigger"
/// traits from hacked machine interactions
#define HACKED_TRAIT "hacked"
/// traits from chloroform usage
#define CHLOROFORM_TRAIT "chloroform"
2 changes: 1 addition & 1 deletion code/_onclick/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
if(xeno.stat != DEAD) // If the Xeno is alive, fight back
var/mob/living/carbon/carbon_user = user
if(!carbon_user || !carbon_user.ally_of_hivenumber(xeno.hivenumber))
user.KnockDown(rand(xeno.caste.tacklestrength_min, xeno.caste.tacklestrength_max))
carbon_user.KnockDown(rand(xeno.caste.tacklestrength_min, xeno.caste.tacklestrength_max))
playsound(user.loc, 'sound/weapons/pierce.ogg', 25, TRUE)
user.visible_message(SPAN_WARNING("\The [user] tried to unstrap \the [back_item] from [xeno] but instead gets a tail swipe to the head!"))
return
Expand Down
3 changes: 3 additions & 0 deletions code/controllers/subsystem/communications.dm
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ var/const/MAX_FREQ = 1468 // ---------------------------------------------------
var/const/HC_FREQ = 1471
var/const/SOF_FREQ = 1472
var/const/PVST_FREQ = 1473
var/const/CBRN_FREQ = 1474

//Ship department channels
var/const/SENTRY_FREQ = 1480
Expand Down Expand Up @@ -162,6 +163,7 @@ var/list/radiochannels = list(
SQUAD_MARINE_5 = ECHO_FREQ,
SQUAD_MARINE_CRYO = CRYO_FREQ,
SQUAD_SOF = SOF_FREQ,
SQUAD_CBRN = CBRN_FREQ,

RADIO_CHANNEL_ALAMO = DS1_FREQ,
RADIO_CHANNEL_NORMANDY = DS2_FREQ,
Expand Down Expand Up @@ -262,6 +264,7 @@ SUBSYSTEM_DEF(radio)
"[DELTA_FREQ]" = "deltaradio",
"[ECHO_FREQ]" = "echoradio",
"[CRYO_FREQ]" = "cryoradio",
"[CBRN_FREQ]" = "hcradio",
"[SOF_FREQ]" = "hcradio",
"[HC_FREQ]" = "hcradio",
"[PVST_FREQ]" = "pvstradio",
Expand Down
8 changes: 4 additions & 4 deletions code/datums/ammo/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

neuro_callback = CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(apply_neuro))

/proc/apply_neuro(mob/M, power, insta_neuro)
/proc/apply_neuro(mob/living/M, power, insta_neuro)
if(skillcheck(M, SKILL_ENDURANCE, SKILL_ENDURANCE_MAX) && !insta_neuro)
M.visible_message(SPAN_DANGER("[M] withstands the neurotoxin!"))
return //endurance 5 makes you immune to weak neurotoxin
Expand Down Expand Up @@ -67,7 +67,7 @@
M.adjust_effect(1 * power, WEAKEN) // KD them a bit more
M.visible_message(SPAN_DANGER("[M] falls prone."))

/proc/apply_scatter_neuro(mob/M)
/proc/apply_scatter_neuro(mob/living/M)
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(skillcheck(M, SKILL_ENDURANCE, SKILL_ENDURANCE_MAX))
Expand Down Expand Up @@ -314,7 +314,7 @@
shrapnel_type = /obj/item/shard/shrapnel/bone_chips
shrapnel_chance = 60

/datum/ammo/xeno/bone_chips/on_hit_mob(mob/M, obj/projectile/P)
/datum/ammo/xeno/bone_chips/on_hit_mob(mob/living/M, obj/projectile/P)
if(iscarbon(M))
var/mob/living/carbon/C = M
if((HAS_FLAG(C.status_flags, XENO_HOST) && HAS_TRAIT(C, TRAIT_NESTED)) || C.stat == DEAD)
Expand Down Expand Up @@ -344,7 +344,7 @@
damage = 10
shrapnel_chance = 0

/datum/ammo/xeno/bone_chips/spread/runner/on_hit_mob(mob/M, obj/projectile/P)
/datum/ammo/xeno/bone_chips/spread/runner/on_hit_mob(mob/living/M, obj/projectile/P)
if(iscarbon(M))
var/mob/living/carbon/C = M
if((HAS_FLAG(C.status_flags, XENO_HOST) && HAS_TRAIT(C, TRAIT_NESTED)) || C.stat == DEAD)
Expand Down
36 changes: 36 additions & 0 deletions code/datums/components/crate_tag.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/datum/component/crate_tag
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
/// The crate tag used for notifications and as label
var/name

/datum/component/crate_tag/Initialize(name, obj/structure/closet/crate/masquarade_type)
var/obj/structure/closet/crate/crate = parent
if(!istype(crate))
return COMPONENT_INCOMPATIBLE
setup(name, masquarade_type)
RegisterSignal(parent, COMSIG_STRUCTURE_CRATE_SQUAD_LAUNCHED, PROC_REF(notify_squad))

/datum/component/crate_tag/InheritComponent(datum/component/C, i_am_original, name, obj/structure/closet/crate/masquarade_type)
. = ..()
setup(name, masquarade_type)

/datum/component/crate_tag/proc/setup(name, obj/structure/closet/crate/masquarade_type)
var/obj/structure/closet/crate/crate = parent
if(masquarade_type)
crate.name = initial(masquarade_type.name)
crate.desc = initial(masquarade_type.desc)
crate.icon_opened = initial(masquarade_type.icon_opened)
crate.icon_closed = initial(masquarade_type.icon_closed)
if(crate.opened)
crate.icon_state = crate.icon_opened
else
crate.icon_state = crate.icon_closed
if(name)
parent.AddComponent(/datum/component/label, name)
src.name = name // Keep it around additionally for notifications

/// Handler to notify an overwatched squad that this crate has been dropped for them
/datum/component/crate_tag/proc/notify_squad(datum/source, datum/squad/squad)
SIGNAL_HANDLER
squad.send_message("'[name]' supply drop incoming. Heads up!")
squad.send_maptext(name, "Incoming Supply Drop:")
3 changes: 3 additions & 0 deletions code/datums/datacore.dm
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ GLOBAL_DATUM_INIT(data_core, /datum/datacore, new)
continue
dept_flags |= FLAG_SHOW_MARINES
squad_sublists[squad_name] = TRUE
///If it is a real squad in the USCM squad list to prevent the crew manifest from breaking
if(!(squad_name in ROLES_SQUAD_ALL))
continue
LAZYSET(marines_by_squad[squad_name][real_rank], name, rank)

//here we fill manifest
Expand Down
9 changes: 9 additions & 0 deletions code/datums/diseases/black_goo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,15 @@
. = ..()
reagents.add_reagent("antiZed", 30)

/obj/item/reagent_container/glass/bottle/labeled_black_goo_cure
name = "\"Pathogen\" cure bottle"
desc = "The bottle has a biohazard symbol on the front, and has a label, designating its use against Agent A0-3959X.91–15, colloquially known as the \"Black Goo\"."
icon_state = "bottle20"

/obj/item/reagent_container/glass/bottle/labeled_black_goo_cure/Initialize()
. = ..()
reagents.add_reagent("antiZed", 60)

/datum/language/zombie
name = "Zombie"
desc = "A growling, guttural method of communication, only Zombies seem to be capable of producing these sounds."
Expand Down
12 changes: 6 additions & 6 deletions code/datums/effects/xeno_strains/boiler_trap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
/datum/effects/boiler_trap/New(atom/A, mob/living/from, last_dmg_source, zone)
. = ..()
if(!QDELETED(src))
var/mob/living/M = affected_atom
ADD_TRAIT(M, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY(effect_name))
var/mob/living/affected_living = affected_atom
ADD_TRAIT(affected_living, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY(effect_name))

/datum/effects/boiler_trap/Destroy(force)
if(ismob(affected_atom))
var/mob/living/M = affected_atom
REMOVE_TRAIT(M, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY(effect_name))
var/mob/living/affected_living = affected_atom
REMOVE_TRAIT(affected_living, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY(effect_name))
return ..()

/datum/effects/boiler_trap/validate_atom(atom/A)
Expand All @@ -26,6 +26,6 @@
/datum/effects/boiler_trap/process_mob()
. = ..()
if(!.) return FALSE
var/mob/living/M = affected_atom
ADD_TRAIT(M, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY(effect_name))
var/mob/living/affected_living = affected_atom
ADD_TRAIT(affected_living, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY(effect_name))
return TRUE
80 changes: 80 additions & 0 deletions code/datums/emergency_calls/cbrn.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/datum/emergency_call/cbrn
name = "CBRN (Squad)"
arrival_message = "A CBRN squad has been dispatched to your ship. Stand by."
objectives = "Handle the chemical, biological, radiological, or nuclear threat. Further orders may be provided."
mob_min = 3
mob_max = 5
max_heavies = 0
max_smartgunners = 0

/datum/emergency_call/cbrn/create_member(datum/mind/new_mind, turf/override_spawn_loc)
var/turf/spawn_loc = override_spawn_loc ? override_spawn_loc : get_spawn_point()

if(!istype(spawn_loc))
return //Didn't find a useable spawn point.

var/mob/living/carbon/human/mob = new(spawn_loc)
new_mind.transfer_to(mob, TRUE)

if(!leader && HAS_FLAG(mob.client.prefs.toggles_ert, PLAY_LEADER) && check_timelock(mob.client, JOB_SQUAD_LEADER, time_required_for_job))
leader = mob
arm_equipment(mob, /datum/equipment_preset/uscm/cbrn/leader, TRUE, TRUE)
to_chat(mob, SPAN_ROLE_HEADER("You are the CBRN Fireteam Leader!"))

else if(medics < max_medics && HAS_FLAG(mob.client.prefs.toggles_ert, PLAY_MEDIC) && check_timelock(mob.client, JOB_SQUAD_MEDIC, time_required_for_job))
medics++
arm_equipment(mob, /datum/equipment_preset/uscm/cbrn/medic, TRUE, TRUE)
to_chat(mob, SPAN_ROLE_HEADER("You are the CBRN Squad Medic!"))

else if(engineers < max_engineers && HAS_FLAG(mob.client.prefs.toggles_ert, PLAY_ENGINEER) && check_timelock(mob.client, JOB_SQUAD_ENGI, time_required_for_job))
engineers++
arm_equipment(mob, /datum/equipment_preset/uscm/cbrn/engineer, TRUE, TRUE)
to_chat(mob, SPAN_ROLE_HEADER("You are the CBRN Squad Engineer!"))

else
arm_equipment(mob, /datum/equipment_preset/uscm/cbrn/standard, TRUE, TRUE)
to_chat(mob, SPAN_ROLE_HEADER("You are a CBRN Squad Rifleman!"))

to_chat(mob, SPAN_ROLE_BODY("You are a member of the USCM's CBRN. The CBRN is a force that specializes in handling chemical, biological, radiological, and nuclear threats."))
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), mob, SPAN_BOLD("Objectives:</b> [objectives]")), 1 SECONDS)

/datum/emergency_call/cbrn/ert
name = "CBRN (Distress)"
arrival_message = "Your distress signal has been received and we are dispatching the nearest CBRN squad to board with you now. Stand by."
probability = 10

/datum/emergency_call/cbrn/ert/New()
..()
objectives = "Investigate the distress signal aboard the [MAIN_SHIP_NAME]."

/datum/emergency_call/cbrn/specialists
name = "CBRN (Specialists)"
mob_min = 2
mob_max = 5
max_engineers = 0
max_medics = 0

/datum/emergency_call/cbrn/specialists/New()
var/cbrn_ship_name = "Unit [pick(nato_phonetic_alphabet)]-[rand(1, 99)]"
arrival_message = "[MAIN_SHIP_NAME], CBRN [cbrn_ship_name] has been dispatched. Follow all orders provided by [cbrn_ship_name]."
objectives = "You are a specialist team in [cbrn_ship_name] dispatched to quell a threat to [MAIN_SHIP_NAME]. Further orders may be provided."

/datum/emergency_call/cbrn/specialists/create_member(datum/mind/new_mind, turf/override_spawn_loc)
var/turf/spawn_loc = override_spawn_loc ? override_spawn_loc : get_spawn_point()

if(!istype(spawn_loc))
return //Didn't find a useable spawn point.

var/mob/living/carbon/human/mob = new(spawn_loc)
new_mind.transfer_to(mob, TRUE)

if(!leader && HAS_FLAG(mob.client.prefs.toggles_ert, PLAY_LEADER) && check_timelock(mob.client, JOB_SQUAD_LEADER, time_required_for_job))
leader = mob
arm_equipment(mob, /datum/equipment_preset/uscm/cbrn/specialist/lead, TRUE, TRUE)
to_chat(mob, SPAN_ROLE_HEADER("You are the CBRN Specialist Squad Leader!"))
else
arm_equipment(mob, /datum/equipment_preset/uscm/cbrn/specialist, TRUE, TRUE)
to_chat(mob, SPAN_ROLE_HEADER("You are a CBRN Specialist!"))

to_chat(mob, SPAN_ROLE_BODY("You are a member of the USCM's CBRN. The CBRN is a force that specializes in handling chemical, biological, radiological, and nuclear threats."))
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), mob, SPAN_BOLD("Objectives:</b> [objectives]")), 1 SECONDS)
2 changes: 1 addition & 1 deletion code/datums/emergency_calls/emergency_call.dm
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@

candidates = list()
if(arrival_message && announce_incoming)
marine_announcement(arrival_message, "Intercepted Tranmission:")
marine_announcement(arrival_message, "Intercepted Transmission:")

/datum/emergency_call/proc/add_candidate(mob/M)
if(!M.client || (M.mind && (M.mind in candidates)) || istype(M, /mob/living/carbon/xenomorph))
Expand Down
13 changes: 13 additions & 0 deletions code/datums/factions/uscm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,19 @@
if(JOB_CMB_OBS)
marine_rk = "obs"
icon_prefix = "cmb_"
// Check squad marines here too, for the unique ones
if(JOB_SQUAD_ENGI)
marine_rk = "engi"
if(JOB_SQUAD_MEDIC)
marine_rk = "med"
if(JOB_SQUAD_SPECIALIST)
marine_rk = "spec"
if(JOB_SQUAD_SMARTGUN)
marine_rk = "gun"
if(JOB_SQUAD_TEAM_LEADER)
marine_rk = "tl"
if(JOB_SQUAD_LEADER)
marine_rk = "leader"

if(marine_rk)
var/image/I = image('icons/mob/hud/marine_hud.dmi', current_human, "hudsquad")
Expand Down
Loading

0 comments on commit 3e6ba3d

Please sign in to comment.