Skip to content

Commit

Permalink
Merge branch 'cmss13-devs:master' into eepy
Browse files Browse the repository at this point in the history
  • Loading branch information
Releasethesea authored Nov 8, 2023
2 parents 474afc8 + d4efa52 commit a783a1e
Show file tree
Hide file tree
Showing 84 changed files with 1,005 additions and 150 deletions.
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
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
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
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
8 changes: 5 additions & 3 deletions code/datums/map_config.dm
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,14 @@
/datum/equipment_preset/synth/survivor/janitor_synth,
/datum/equipment_preset/synth/survivor/chef_synth,
/datum/equipment_preset/synth/survivor/teacher_synth,
/datum/equipment_preset/synth/survivor/freelancer_synth,
/datum/equipment_preset/synth/survivor/trucker_synth,
/datum/equipment_preset/synth/survivor/bartender_synth,
/datum/equipment_preset/synth/survivor/detective_synth,
/datum/equipment_preset/synth/survivor/cmb_synth,
/datum/equipment_preset/synth/survivor/security_synth,
/datum/equipment_preset/synth/survivor/protection_synth,
/datum/equipment_preset/synth/survivor/corporate_synth,
/datum/equipment_preset/synth/survivor/wy/security_synth,
/datum/equipment_preset/synth/survivor/wy/protection_synth,
/datum/equipment_preset/synth/survivor/wy/corporate_synth,
/datum/equipment_preset/synth/survivor/radiation_synth,
)

Expand Down
5 changes: 5 additions & 0 deletions code/datums/mind.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,14 @@
research_objective_interface = new()

/datum/mind/Destroy()
QDEL_NULL(initial_account)
QDEL_NULL(objective_memory)
QDEL_NULL(objective_interface)
QDEL_NULL(research_objective_interface)
current = null
original = null
ghost_mob = null
player_entity = null
return ..()

/datum/mind/proc/transfer_to(mob/living/new_character, force = FALSE)
Expand Down
4 changes: 4 additions & 0 deletions code/datums/statistics/entities/caste_stats.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
var/total_hits = 0
var/list/abilities_used = list() // types of /datum/entity/statistic, "tail sweep" = 10, "screech" = 2

/datum/entity/player_stats/caste/Destroy(force)
. = ..()
QDEL_LIST_ASSOC_VAL(abilities_used)

/datum/entity/player_stats/caste/proc/setup_ability(ability)
if(!ability)
return
Expand Down
8 changes: 4 additions & 4 deletions code/datums/statistics/entities/death_stats.dm
Original file line number Diff line number Diff line change
Expand Up @@ -140,16 +140,16 @@
new_death.detach()
return new_death

/mob/living/carbon/human/track_mob_death(cause, cause_mob)
. = ..(cause, cause_mob, job)
/mob/living/carbon/human/track_mob_death(datum/cause_data/cause_data, turf/death_loc)
. = ..()
if(statistic_exempt || !mind)
return
var/datum/entity/player_stats/human/human_stats = mind.setup_human_stats()
if(human_stats && human_stats.death_list)
human_stats.death_list.Insert(1, .)

/mob/living/carbon/xenomorph/track_mob_death(cause, cause_mob)
var/datum/entity/statistic/death/new_death = ..(cause, cause_mob, caste_type)
/mob/living/carbon/xenomorph/track_mob_death(datum/cause_data/cause_data, turf/death_loc)
var/datum/entity/statistic/death/new_death = ..()
if(!new_death)
return
new_death.is_xeno = TRUE // this was placed beneath the if below, which meant gibbing as a xeno wouldn't track properly in stats
Expand Down
15 changes: 11 additions & 4 deletions code/datums/statistics/entities/human_stats.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,17 @@
var/total_shots = 0
var/total_shots_hit = 0
var/total_screams = 0
var/datum/entity/weapon_stats/top_weapon = null // reference to /datum/entity/weapon_stats (like tac-shotty)
var/list/weapon_stats_list = list() // list of types /datum/entity/weapon_stats
var/list/job_stats_list = list() // list of types /datum/entity/job_stats
var/list/datum/entity/statistic/medal/medal_list = list() // list of all medals earned
var/list/weapon_stats_list = list() //! indexed list of types /datum/entity/weapon_stats
var/list/job_stats_list = list() //! indexed list of types /datum/entity/job_stats
var/datum/entity/weapon_stats/top_weapon //! reference to /datum/entity/weapon_stats (like tac-shotty)
var/list/datum/entity/statistic/medal/medal_list = list() //! list of all medals earned

/datum/entity/player_stats/human/Destroy(force)
. = ..()
QDEL_LIST_ASSOC_VAL(weapon_stats_list)
QDEL_LIST_ASSOC_VAL(job_stats_list)
QDEL_NULL(top_weapon)
QDEL_LIST(medal_list)

/datum/entity/player_stats/human/get_playtime(type)
if(!type)
Expand Down
14 changes: 7 additions & 7 deletions code/datums/statistics/entities/job_stats.dm
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/datum/entity/player_stats/job
var/name = null
var/total_friendly_fire = null
var/total_revives = null
var/total_lives_saved = null
var/total_shots = null
var/total_shots_hit = null
var/total_screams = null
var/name
var/total_friendly_fire
var/total_revives
var/total_lives_saved
var/total_shots
var/total_shots_hit
var/total_screams
2 changes: 1 addition & 1 deletion code/datums/statistics/entities/panel_stats.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
update_panel_data(round_statistics)
ui_interact(user)

/datum/entity/player_entity/proc/ui_interact(mob/user, ui_key = "statistics", datum/nanoui/ui = null, force_open = 1)
/datum/entity/player_entity/proc/ui_interact(mob/user, ui_key = "statistics", datum/nanoui/ui, force_open = 1)
data["menu"] = menu
data["subMenu"] = subMenu
data["dataMenu"] = dataMenu
Expand Down
9 changes: 7 additions & 2 deletions code/datums/statistics/entities/player_entity.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
/datum/entity/player_entity
var/name
var/ckey // "cakey"
var/list/datum/entity/player_stats = list()
var/list/datum/entity/statistic/death/death_stats = list()
var/list/player_stats = list() //! Indeed list of /datum/entity/player_stats
var/list/death_stats = list() //! Indexed list of /datum/entity/statistic/death
var/menu = 0
var/subMenu = 0
var/dataMenu = 0
Expand All @@ -18,6 +18,11 @@
var/savefile_version
var/save_loaded = FALSE

/datum/entity/player_entity/Destroy(force)
QDEL_LIST_ASSOC_VAL(player_stats)
QDEL_LIST_ASSOC_VAL(death_stats)
return ..()

/datum/entity/player_entity/proc/get_playtime(branch, type)
var/playtime = 0
if(player_stats["[branch]"])
Expand Down
10 changes: 9 additions & 1 deletion code/datums/statistics/entities/player_stats.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,21 @@
var/total_rounds_played = 0
var/steps_walked = 0
var/round_played = FALSE
var/datum/entity/statistic/nemesis = null // "runner" = 3
var/datum/entity/statistic/nemesis // "runner" = 3
var/list/niche_stats = list() // list of type /datum/entity/statistic, "Total Executions" = number
var/list/humans_killed = list() // list of type /datum/entity/statistic, "jobname2" = number
var/list/xenos_killed = list() // list of type /datum/entity/statistic, "caste" = number
var/list/death_list = list() // list of type /datum/entity/death_stats
var/display_stat = TRUE

/datum/entity/player_stats/Destroy(force)
QDEL_NULL(nemesis)
QDEL_LIST_ASSOC_VAL(niche_stats)
QDEL_LIST_ASSOC_VAL(humans_killed)
QDEL_LIST_ASSOC_VAL(xenos_killed)
QDEL_LIST_ASSOC_VAL(death_list)
return ..()

/datum/entity/player_stats/proc/get_playtime()
return total_playtime

Expand Down
18 changes: 15 additions & 3 deletions code/datums/statistics/entities/round_stats.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
var/total_slashes = 0

// untracked data
var/datum/entity/statistic/map/current_map = null // reference to current map
var/datum/entity/statistic/map/current_map // reference to current map
var/list/datum/entity/statistic/death/death_stats_list = list()

var/list/abilities_used = list() // types of /datum/entity/statistic, "tail sweep" = 10, "screech" = 2
Expand All @@ -37,8 +37,20 @@
var/list/job_stats_list = list() // list of types /datum/entity/job_stats

// nanoui data
var/round_data[0]
var/death_data[0]
var/list/round_data = list()
var/list/death_data = list()

/datum/entity/statistic/round/Destroy(force)
. = ..()
QDEL_NULL(current_map)
QDEL_LIST(death_stats_list)
QDEL_LIST_ASSOC_VAL(abilities_used)
QDEL_LIST_ASSOC_VAL(final_participants)
QDEL_LIST_ASSOC_VAL(hijack_participants)
QDEL_LIST_ASSOC_VAL(total_deaths)
QDEL_LIST_ASSOC_VAL(caste_stats_list)
QDEL_LIST_ASSOC_VAL(weapon_stats_list)
QDEL_LIST_ASSOC_VAL(job_stats_list)

/datum/entity_meta/statistic_round
entity_type = /datum/entity/statistic/round
Expand Down
25 changes: 16 additions & 9 deletions code/datums/statistics/entities/weapon_stats.dm
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
/datum/entity/weapon_stats
var/datum/entity/player = null // "deanthelis"
var/list/niche_stats = list() // list of type /datum/entity/statistic, "Total Reloads" = number
var/list/humans_killed = list() // list of type /datum/entity/statistic, "jobname2" = number
var/list/xenos_killed = list() // list of type /datum/entity/statistic, "caste" = number
var/name = null
var/datum/entity/player
var/list/niche_stats = list() //! Indexed list of /datum/entity/statistic, "Total Reloads" = number
var/list/humans_killed = list() //! Indexed list of /datum/entity/statistic, "jobname2" = number
var/list/xenos_killed = list() //! Indexed list of /datum/entity/statistic, "caste" = number
var/name
var/total_kills = 0
var/total_hits = null
var/total_shots = null
var/total_shots_hit = null
var/total_friendly_fire = null
var/total_hits
var/total_shots
var/total_shots_hit
var/total_friendly_fire
var/display_stat = TRUE

/datum/entity/weapon_stats/Destroy(force)
player = null
QDEL_LIST_ASSOC_VAL(niche_stats)
QDEL_LIST_ASSOC_VAL(humans_killed)
QDEL_LIST_ASSOC_VAL(xenos_killed)
return ..()

/datum/entity/weapon_stats/proc/count_human_kill(job_name)
if(!job_name)
return
Expand Down
Loading

0 comments on commit a783a1e

Please sign in to comment.