Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assigned job slots and cryorines. #4076

Merged
merged 2 commits into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions code/datums/emergency_calls/cryo_marines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,30 +36,35 @@
if(leaders < cryo_squad.max_leaders && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_LEADER) && check_timelock(H.client, JOB_SQUAD_LEADER, time_required_for_job))
leader = H
leaders++
arm_equipment(H, /datum/equipment_preset/uscm/leader/cryo, TRUE, TRUE)
H.client.prefs.copy_all_to(H, JOB_SQUAD_LEADER, TRUE, TRUE)
arm_equipment(H, /datum/equipment_preset/uscm/leader/cryo, FALSE, TRUE)
to_chat(H, SPAN_ROLE_HEADER("You are a Squad Leader in the USCM"))
to_chat(H, 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(H, 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 && 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/spec/cryo, TRUE, TRUE)
H.client.prefs.copy_all_to(H, JOB_SQUAD_SPECIALIST, TRUE, TRUE)
arm_equipment(H, /datum/equipment_preset/uscm/spec/cryo, FALSE, 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]. Listen to the chain of command."))
to_chat(H, 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 && 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/cryo, TRUE, TRUE)
H.client.prefs.copy_all_to(H, JOB_SQUAD_MEDIC, TRUE, TRUE)
arm_equipment(H, /datum/equipment_preset/uscm/medic/cryo, FALSE, TRUE)
to_chat(H, SPAN_ROLE_HEADER("You are a Hospital Corpsman in the USCM"))
to_chat(H, 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(H, 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 && 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/cryo, TRUE, TRUE)
H.client.prefs.copy_all_to(H, JOB_SQUAD_ENGI, TRUE, TRUE)
arm_equipment(H, /datum/equipment_preset/uscm/engineer/cryo, FALSE, TRUE)
to_chat(H, SPAN_ROLE_HEADER("You are an Engineer in the USCM"))
to_chat(H, 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(H, SPAN_BOLDWARNING("If you wish to cryo or ghost upon spawning in, you must ahelp and inform staff so you can be replaced."))
else
arm_equipment(H, /datum/equipment_preset/uscm/pfc/cryo, TRUE, TRUE)
H.client.prefs.copy_all_to(H, JOB_SQUAD_MARINE, TRUE, TRUE)
arm_equipment(H, /datum/equipment_preset/uscm/pfc/cryo, FALSE, TRUE)
to_chat(H, SPAN_ROLE_HEADER("You are a Rifleman in the USCM"))
to_chat(H, 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(H, SPAN_BOLDWARNING("If you wish to cryo or ghost upon spawning in, you must ahelp and inform staff so you can be replaced."))
Expand Down
17 changes: 12 additions & 5 deletions code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1955,11 +1955,17 @@ var/const/MAX_SAVE_SLOTS = 10
load_character(slot_for_job)

/// Transfers both physical characteristics and character information to character
/datum/preferences/proc/copy_all_to(mob/living/carbon/human/character, job_title, is_late_join = FALSE)
/datum/preferences/proc/copy_all_to(mob/living/carbon/human/character, job_title, is_late_join = FALSE, check_datacore = FALSE)
if(!istype(character))
return

find_assigned_slot(job_title, is_late_join)
if(check_datacore && !(be_random_body && be_random_name))
for(var/datum/data/record/record as anything in GLOB.data_core.locked)
if(record.fields["name"] == real_name)
be_random_body = TRUE
be_random_name = TRUE
break

if(be_random_name)
real_name = random_name(gender)
Expand Down Expand Up @@ -1987,10 +1993,11 @@ var/const/MAX_SAVE_SLOTS = 10
character.flavor_texts["legs"] = flavor_texts["legs"]
character.flavor_texts["feet"] = flavor_texts["feet"]

character.med_record = strip_html(med_record)
character.sec_record = strip_html(sec_record)
character.gen_record = strip_html(gen_record)
character.exploit_record = strip_html(exploit_record)
if(!be_random_name)
character.med_record = strip_html(med_record)
character.sec_record = strip_html(sec_record)
character.gen_record = strip_html(gen_record)
character.exploit_record = strip_html(exploit_record)

character.age = age
character.gender = gender
Expand Down