Skip to content

Commit

Permalink
Merge branch 'master' into patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzmike authored Dec 6, 2023
2 parents 8773d4b + 38ce90b commit b26c1fa
Show file tree
Hide file tree
Showing 142 changed files with 1,572 additions and 1,077 deletions.
7 changes: 4 additions & 3 deletions code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,10 @@
//update the datacore records! This is goig to be a bit costly.
var/mob_ref = WEAKREF(src)
for(var/list/L in list(GLOB.data_core.general, GLOB.data_core.medical, GLOB.data_core.security, GLOB.data_core.locked))
for(var/datum/data/record/R in L)
if(R.fields["ref"] == mob_ref)
R.fields["name"] = newname
for(var/datum/data/record/record_entry in L)
if(record_entry.fields["ref"] == mob_ref)
record_entry.fields["name"] = newname
record_entry.name = newname
break

//update our pda and id if we have them on our person
Expand Down
1 change: 1 addition & 0 deletions code/controllers/subsystem/nanoui.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SUBSYSTEM_DEF(nano)
name = "Nano UI"
flags = SS_NO_INIT
wait = 2 SECONDS
priority = SS_PRIORITY_NANOUI
runlevels = RUNLEVELS_DEFAULT|RUNLEVEL_LOBBY
Expand Down
2 changes: 1 addition & 1 deletion code/datums/ammo/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
for(var/obj/item/reagent_container/food/drinks/cans/souto/S in P.contents)
M.put_in_active_hand(S)
for(var/mob/O in viewers(GLOB.world_view_size, P)) //find all people in view.
O.show_message(SPAN_DANGER("[M] catches the [S]!"), SHOW_MESSAGE_VISIBLE) //Tell them the can was caught.
O.show_message(SPAN_DANGER("[M] catches [S]!"), SHOW_MESSAGE_VISIBLE) //Tell them the can was caught.
return //Can was caught.
if(ishuman(M))
var/mob/living/carbon/human/H = M
Expand Down
192 changes: 98 additions & 94 deletions code/datums/datacore.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ GLOBAL_DATUM_INIT(data_core, /datum/datacore, new)
)
departments += marines_by_squad
var/list/manifest_out = list()
for(var/datum/data/record/t in GLOB.data_core.general)
if(t.fields["mob_faction"] != FACTION_MARINE) //we process only USCM humans
for(var/datum/data/record/record_entry in GLOB.data_core.general)
if(record_entry.fields["mob_faction"] != FACTION_MARINE) //we process only USCM humans
continue
var/name = t.fields["name"]
var/rank = t.fields["rank"]
var/squad = t.fields["squad"]
var/name = record_entry.fields["name"]
var/rank = record_entry.fields["rank"]
var/squad = record_entry.fields["squad"]
if(isnull(name) || isnull(rank))
continue
var/has_department = FALSE
Expand Down Expand Up @@ -85,14 +85,14 @@ GLOBAL_DATUM_INIT(data_core, /datum/datacore, new)
var/dept_flags = NO_FLAGS //Is there anybody in the department?.
var/list/squad_sublists = GLOB.ROLES_SQUAD_ALL.Copy() //Are there any marines in the squad?

for(var/datum/data/record/t in GLOB.data_core.general)
if(t.fields["mob_faction"] != FACTION_MARINE) //we process only USCM humans
for(var/datum/data/record/record_entry in GLOB.data_core.general)
if(record_entry.fields["mob_faction"] != FACTION_MARINE) //we process only USCM humans
continue

var/name = t.fields["name"]
var/rank = t.fields["rank"]
var/real_rank = t.fields["real_rank"]
var/squad_name = t.fields["squad"]
var/name = record_entry.fields["name"]
var/rank = record_entry.fields["rank"]
var/real_rank = record_entry.fields["real_rank"]
var/squad_name = record_entry.fields["squad"]
if(isnull(name) || isnull(rank) || isnull(real_rank))
continue

Expand All @@ -104,7 +104,7 @@ GLOBAL_DATUM_INIT(data_core, /datum/datacore, new)
break
isactive[name] = active ? "Active" : "Inactive"
else
isactive[name] = t.fields["p_stat"]
isactive[name] = record_entry.fields["p_stat"]
//cael - to prevent multiple appearances of a player/job combination, add a continue after each line

if(real_rank in GLOB.ROLES_CIC)
Expand Down Expand Up @@ -216,14 +216,14 @@ GLOBAL_DATUM_INIT(data_core, /datum/datacore, new)
var/datum/data/record/foundrecord

var/use_name = isnull(ref)
for(var/datum/data/record/t in GLOB.data_core.general)
for(var/datum/data/record/record_entry in GLOB.data_core.general)
if(use_name)
if(t.fields["name"] == name)
foundrecord = t
if(record_entry.fields["name"] == name)
foundrecord = record_entry
break
else
if(t.fields["ref"] == ref)
foundrecord = t
if(record_entry.fields["ref"] == ref)
foundrecord = record_entry
break

if(foundrecord)
Expand All @@ -239,102 +239,106 @@ GLOBAL_DATUM_INIT(data_core, /datum/datacore, new)
return TRUE
return FALSE

/datum/datacore/proc/manifest_inject(mob/living/carbon/human/H)
/datum/datacore/proc/manifest_inject(mob/living/carbon/human/target)
var/assignment
if(H.job)
assignment = H.job
if(target.job)
assignment = target.job
else
assignment = "Unassigned"

var/id = add_zero(num2hex(H.gid), 6) //this was the best they could come up with? A large random number? *sigh*
var/id = add_zero(num2hex(target.gid), 6) //this was the best they could come up with? A large random number? *sigh*
//var/icon/front = new(get_id_photo(H), dir = SOUTH)
//var/icon/side = new(get_id_photo(H), dir = WEST)

//General Record
var/datum/data/record/G = new()
G.fields["id"] = id
G.fields["name"] = H.real_name
G.fields["real_rank"] = H.job
G.fields["rank"] = assignment
G.fields["squad"] = H.assigned_squad ? H.assigned_squad.name : null
G.fields["age"] = H.age
G.fields["p_stat"] = "Active"
G.fields["m_stat"] = "Stable"
G.fields["sex"] = H.gender
G.fields["species"] = H.get_species()
G.fields["origin"] = H.origin
G.fields["faction"] = H.personal_faction
G.fields["mob_faction"] = H.faction
G.fields["religion"] = H.religion
G.fields["ref"] = WEAKREF(H)
//G.fields["photo_front"] = front
//G.fields["photo_side"] = side

if(H.gen_record && !jobban_isbanned(H, "Records"))
G.fields["notes"] = H.gen_record
var/datum/data/record/record_general = new()
record_general.fields["id"] = id
record_general.fields["name"] = target.real_name
record_general.name = target.real_name
record_general.fields["real_rank"] = target.job
record_general.fields["rank"] = assignment
record_general.fields["squad"] = target.assigned_squad ? target.assigned_squad.name : null
record_general.fields["age"] = target.age
record_general.fields["p_stat"] = "Active"
record_general.fields["m_stat"] = "Stable"
record_general.fields["sex"] = target.gender
record_general.fields["species"] = target.get_species()
record_general.fields["origin"] = target.origin
record_general.fields["faction"] = target.personal_faction
record_general.fields["mob_faction"] = target.faction
record_general.fields["religion"] = target.religion
record_general.fields["ref"] = WEAKREF(target)
//record_general.fields["photo_front"] = front
//record_general.fields["photo_side"] = side

if(target.gen_record && !jobban_isbanned(target, "Records"))
record_general.fields["notes"] = target.gen_record
else
G.fields["notes"] = "No notes found."
general += G
record_general.fields["notes"] = "No notes found."
general += record_general

//Medical Record
var/datum/data/record/M = new()
M.fields["id"] = id
M.fields["name"] = H.real_name
M.fields["b_type"] = H.blood_type
M.fields["mi_dis"] = "None"
M.fields["mi_dis_d"] = "No minor disabilities have been declared."
M.fields["ma_dis"] = "None"
M.fields["ma_dis_d"] = "No major disabilities have been diagnosed."
M.fields["alg"] = "None"
M.fields["alg_d"] = "No allergies have been detected in this patient."
M.fields["cdi"] = "None"
M.fields["cdi_d"] = "No diseases have been diagnosed at the moment."
M.fields["last_scan_time"] = null
M.fields["last_scan_result"] = "No scan data on record" // body scanner results
M.fields["autodoc_data"] = list()
M.fields["autodoc_manual"] = list()
M.fields["ref"] = WEAKREF(H)

if(H.med_record && !jobban_isbanned(H, "Records"))
M.fields["notes"] = H.med_record
var/datum/data/record/record_medical = new()
record_medical.fields["id"] = id
record_medical.fields["name"] = target.real_name
record_medical.name = target.name
record_medical.fields["b_type"] = target.blood_type
record_medical.fields["mi_dis"] = "None"
record_medical.fields["mi_dis_d"] = "No minor disabilities have been declared."
record_medical.fields["ma_dis"] = "None"
record_medical.fields["ma_dis_d"] = "No major disabilities have been diagnosed."
record_medical.fields["alg"] = "None"
record_medical.fields["alg_d"] = "No allergies have been detected in this patient."
record_medical.fields["cdi"] = "None"
record_medical.fields["cdi_d"] = "No diseases have been diagnosed at the moment."
record_medical.fields["last_scan_time"] = null
record_medical.fields["last_scan_result"] = "No scan data on record" // body scanner results
record_medical.fields["autodoc_data"] = list()
record_medical.fields["autodoc_manual"] = list()
record_medical.fields["ref"] = WEAKREF(target)

if(target.med_record && !jobban_isbanned(target, "Records"))
record_medical.fields["notes"] = target.med_record
else
M.fields["notes"] = "No notes found."
medical += M
record_medical.fields["notes"] = "No notes found."
medical += record_medical

//Security Record
var/datum/data/record/S = new()
S.fields["id"] = id
S.fields["name"] = H.real_name
S.fields["criminal"] = "None"
S.fields["incident"] = ""
S.fields["ref"] = WEAKREF(H)
var/datum/data/record/record_security = new()
record_security.fields["id"] = id
record_security.fields["name"] = target.real_name
record_security.name = target.real_name
record_security.fields["criminal"] = "None"
record_security.fields["incident"] = ""
record_security.fields["ref"] = WEAKREF(target)

if(H.sec_record && !jobban_isbanned(H, "Records"))
var/new_comment = list("entry" = H.sec_record, "created_by" = list("name" = "\[REDACTED\]", "rank" = "Military Police"), "deleted_by" = null, "deleted_at" = null, "created_at" = "Pre-Deployment")
S.fields["comments"] = list("1" = new_comment)
S.fields["notes"] = H.sec_record
security += S
if(target.sec_record && !jobban_isbanned(target, "Records"))
var/new_comment = list("entry" = target.sec_record, "created_by" = list("name" = "\[REDACTED\]", "rank" = "Military Police"), "deleted_by" = null, "deleted_at" = null, "created_at" = "Pre-Deployment")
record_security.fields["comments"] = list("1" = new_comment)
record_security.fields["notes"] = target.sec_record
security += record_security


//Locked Record
var/datum/data/record/L = new()
L.fields["id"] = md5("[H.real_name][H.job]")
L.fields["name"] = H.real_name
L.fields["rank"] = H.job
L.fields["age"] = H.age
L.fields["sex"] = H.gender
L.fields["b_type"] = H.b_type
L.fields["species"] = H.get_species()
L.fields["origin"] = H.origin
L.fields["faction"] = H.personal_faction
L.fields["religion"] = H.religion
L.fields["ref"] = WEAKREF(H)

if(H.exploit_record && !jobban_isbanned(H, "Records"))
L.fields["exploit_record"] = H.exploit_record
var/datum/data/record/record_locked = new()
record_locked.fields["id"] = md5("[target.real_name][target.job]")
record_locked.fields["name"] = target.real_name
record_locked.name = target.real_name
record_locked.fields["rank"] = target.job
record_locked.fields["age"] = target.age
record_locked.fields["sex"] = target.gender
record_locked.fields["b_type"] = target.b_type
record_locked.fields["species"] = target.get_species()
record_locked.fields["origin"] = target.origin
record_locked.fields["faction"] = target.personal_faction
record_locked.fields["religion"] = target.religion
record_locked.fields["ref"] = WEAKREF(target)

if(target.exploit_record && !jobban_isbanned(target, "Records"))
record_locked.fields["exploit_record"] = target.exploit_record
else
L.fields["exploit_record"] = "No additional information acquired."
locked += L
record_locked.fields["exploit_record"] = "No additional information acquired."
locked += record_locked


/proc/get_id_photo(mob/living/carbon/human/H)
Expand Down
10 changes: 5 additions & 5 deletions code/datums/emergency_calls/cryo_marines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,34 +50,34 @@
human.client?.prefs.copy_all_to(human, JOB_SQUAD_LEADER, TRUE, TRUE)
arm_equipment(human, /datum/equipment_preset/uscm/leader/cryo, mind == null, TRUE)
to_chat(human, SPAN_ROLE_HEADER("You are a Squad Leader in the USCM"))
to_chat(human, SPAN_ROLE_BODY("You are here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
to_chat(human, SPAN_ROLE_BODY("You are here to assist in the defence of [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
to_chat(human, SPAN_BOLDWARNING("If you wish to cryo or ghost upon spawning in, you must ahelp and inform staff so you can be replaced."))
else if (heavies < max_heavies && (!mind || (HAS_FLAG(human.client.prefs.toggles_ert, PLAY_HEAVY) && check_timelock(human.client, JOB_SQUAD_SPECIALIST, time_required_for_job))))
heavies++
human.client?.prefs.copy_all_to(human, JOB_SQUAD_SPECIALIST, TRUE, TRUE)
arm_equipment(human, /datum/equipment_preset/uscm/spec/cryo, mind == null, TRUE)
to_chat(human, SPAN_ROLE_HEADER("You are a Weapons Specialist in the USCM"))
to_chat(human, SPAN_ROLE_BODY("Your squad is here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
to_chat(human, SPAN_ROLE_BODY("Your squad is here to assist in the defence of [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
to_chat(human, SPAN_BOLDWARNING("If you wish to cryo or ghost upon spawning in, you must ahelp and inform staff so you can be replaced."))
else if (medics < max_medics && (!mind || (HAS_FLAG(human.client.prefs.toggles_ert, PLAY_MEDIC) && check_timelock(human.client, JOB_SQUAD_MEDIC, time_required_for_job))))
medics++
human.client?.prefs.copy_all_to(human, JOB_SQUAD_MEDIC, TRUE, TRUE)
arm_equipment(human, /datum/equipment_preset/uscm/medic/cryo, mind == null, TRUE)
to_chat(human, SPAN_ROLE_HEADER("You are a Hospital Corpsman in the USCM"))
to_chat(human, SPAN_ROLE_BODY("You are here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
to_chat(human, SPAN_ROLE_BODY("You are here to assist in the defence of [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
to_chat(human, SPAN_BOLDWARNING("If you wish to cryo or ghost upon spawning in, you must ahelp and inform staff so you can be replaced."))
else if (engineers < max_engineers && (!mind || (HAS_FLAG(human.client.prefs.toggles_ert, PLAY_ENGINEER) && check_timelock(human.client, JOB_SQUAD_ENGI, time_required_for_job))))
engineers++
human.client?.prefs.copy_all_to(human, JOB_SQUAD_ENGI, TRUE, TRUE)
arm_equipment(human, /datum/equipment_preset/uscm/engineer/cryo, mind == null, TRUE)
to_chat(human, SPAN_ROLE_HEADER("You are an Engineer in the USCM"))
to_chat(human, SPAN_ROLE_BODY("You are here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
to_chat(human, SPAN_ROLE_BODY("You are here to assist in the defence of [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
to_chat(human, SPAN_BOLDWARNING("If you wish to cryo or ghost upon spawning in, you must ahelp and inform staff so you can be replaced."))
else
human.client?.prefs.copy_all_to(human, JOB_SQUAD_MARINE, TRUE, TRUE)
arm_equipment(human, /datum/equipment_preset/uscm/pfc/cryo, mind == null, TRUE)
to_chat(human, SPAN_ROLE_HEADER("You are a Rifleman in the USCM"))
to_chat(human, SPAN_ROLE_BODY("You are here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
to_chat(human, SPAN_ROLE_BODY("You are here to assist in the defence of [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
to_chat(human, SPAN_BOLDWARNING("If you wish to cryo or ghost upon spawning in, you must ahelp and inform staff so you can be replaced."))

sleep(10)
Expand Down
12 changes: 6 additions & 6 deletions code/datums/emergency_calls/cryo_marines_heavy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,31 +41,31 @@
leaders++
arm_equipment(H, /datum/equipment_preset/uscm/leader_equipped/cryo, TRUE, TRUE)
to_chat(H, SPAN_ROLE_HEADER("You are a Squad Leader in the USCM"))
to_chat(H, SPAN_ROLE_BODY("Your squad is here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]."))
to_chat(H, SPAN_ROLE_BODY("Your squad is here to assist in the defence of [SSmapping.configs[GROUND_MAP].map_name]."))
else if (heavies < max_heavies && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_HEAVY) && check_timelock(H.client, JOB_SQUAD_SPECIALIST, time_required_for_job))
heavies++
arm_equipment(H, /datum/equipment_preset/uscm/specialist_equipped/cryo, TRUE, TRUE)
to_chat(H, SPAN_ROLE_HEADER("You are a Weapons Specialist in the USCM"))
to_chat(H, SPAN_ROLE_BODY("Your squad is here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]."))
to_chat(H, SPAN_ROLE_BODY("Your squad is here to assist in the defence of [SSmapping.configs[GROUND_MAP].map_name]."))
else if(smartgunners < max_smartgunners && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_SMARTGUNNER) && check_timelock(H.client, JOB_SQUAD_SMARTGUN, time_required_for_job))
smartgunners++
arm_equipment(H, /datum/equipment_preset/uscm/smartgunner_equipped/cryo, TRUE, TRUE)
to_chat(H, SPAN_ROLE_HEADER("You are a Smartgunner in the USCM"))
to_chat(H, SPAN_ROLE_BODY("Your squad is here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]."))
to_chat(H, SPAN_ROLE_BODY("Your squad is here to assist in the defence of [SSmapping.configs[GROUND_MAP].map_name]."))
else if(engineers < max_engineers && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_ENGINEER) && check_timelock(H.client, JOB_SQUAD_ENGI, time_required_for_job))
engineers++
arm_equipment(H, /datum/equipment_preset/uscm/engineer_equipped/cryo, TRUE, TRUE)
to_chat(H, SPAN_ROLE_HEADER("You are an Engineer in the USCM"))
to_chat(H, SPAN_ROLE_BODY("Your squad is here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]."))
to_chat(H, SPAN_ROLE_BODY("Your squad is here to assist in the defence of [SSmapping.configs[GROUND_MAP].map_name]."))
else if (medics < max_medics && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_MEDIC) && check_timelock(H.client, JOB_SQUAD_MEDIC, time_required_for_job))
medics++
arm_equipment(H, /datum/equipment_preset/uscm/medic_equipped/cryo, TRUE, TRUE)
to_chat(H, SPAN_ROLE_HEADER("You are a Hospital Corpsman in the USCM"))
to_chat(H, SPAN_ROLE_BODY("Your squad is here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]."))
to_chat(H, SPAN_ROLE_BODY("Your squad is here to assist in the defence of [SSmapping.configs[GROUND_MAP].map_name]."))
else
arm_equipment(H, /datum/equipment_preset/uscm/private_equipped/cryo, TRUE, TRUE)
to_chat(H, SPAN_ROLE_HEADER("You are a Rifleman in the USCM"))
to_chat(H, SPAN_ROLE_BODY("Your squad is here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]."))
to_chat(H, SPAN_ROLE_BODY("Your squad is here to assist in the defence of [SSmapping.configs[GROUND_MAP].map_name]."))

sleep(10)
to_chat(H, SPAN_BOLD("Objectives: [objectives]"))
Expand Down
2 changes: 1 addition & 1 deletion code/datums/emergency_calls/cryo_spec.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
human.client?.prefs.copy_all_to(human, JOB_SQUAD_SPECIALIST, TRUE, TRUE)
arm_equipment(human, /datum/equipment_preset/uscm/spec/cryo, mind == null, TRUE)
to_chat(human, SPAN_ROLE_HEADER("You are a Weapons Specialist in the USCM"))
to_chat(human, SPAN_ROLE_BODY("Your squad is here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
to_chat(human, SPAN_ROLE_BODY("Your squad is here to assist in the defence of [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
to_chat(human, SPAN_BOLDWARNING("If you wish to cryo or ghost upon spawning in, you must ahelp and inform staff so you can be replaced."))

sleep(10)
Expand Down
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 @@ -200,7 +200,7 @@
SSticker.mode.picked_calls += src

show_join_message() //Show our potential candidates the message to let them join.
message_admins("Distress beacon: '[name]' activated [src.hostility? "[SPAN_WARNING("(THEY ARE HOSTILE)")]":"(they are friendly)"]. Looking for candidates.")
message_admins("Distress beacon: '[name]' activated [hostility? "[SPAN_WARNING("(THEY ARE HOSTILE)")]":"(they are friendly)"]. Looking for candidates.")

if(!quiet_launch)
marine_announcement("A distress beacon has been launched from the [MAIN_SHIP_NAME].", "Priority Alert", 'sound/AI/distressbeacon.ogg', logging = ARES_LOG_SECURITY)
Expand Down
Loading

0 comments on commit b26c1fa

Please sign in to comment.