Skip to content

Commit

Permalink
one letter vars no more
Browse files Browse the repository at this point in the history
  • Loading branch information
ihatethisengine committed Aug 8, 2023
1 parent 19a8ca9 commit 056ca96
Showing 1 changed file with 41 additions and 41 deletions.
82 changes: 41 additions & 41 deletions code/datums/emergency_calls/cryo_marines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,69 +23,69 @@
if(mob_max > length(members))
announce_dchat("Some cryomarines were not taken, use the Join As Freed Mob verb to take one of them.")

/datum/emergency_call/cryo_squad/create_member(datum/mind/M, turf/override_spawn_loc)
/datum/emergency_call/cryo_squad/create_member(datum/mind/mind, turf/override_spawn_loc)
set waitfor = 0
if(SSmapping.configs[GROUND_MAP].map_name == MAP_WHISKEY_OUTPOST)
name_of_spawn = /obj/effect/landmark/ert_spawns/distress_wo
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/H = new(spawn_loc)
var/mob/living/carbon/human/human = new(spawn_loc)

if(M)
M.transfer_to(H, TRUE)
if(mind)
mind.transfer_to(human, TRUE)
else
H.create_hud()
human.create_hud()

if(!M)
for(var/obj/structure/machinery/cryopod/pod in view(7,H))
if(!mind)
for(var/obj/structure/machinery/cryopod/pod in view(7,human))
if(pod && !pod.occupant)
pod.go_in_cryopod(H, silent = TRUE)
pod.go_in_cryopod(human, silent = TRUE)
break

sleep(5)
var/datum/squad/marine/cryo/cryo_squad = RoleAuthority.squads_by_type[/datum/squad/marine/cryo]
if(leaders < cryo_squad.max_leaders && (!M || (HAS_FLAG(H.client.prefs.toggles_ert, PLAY_LEADER) && check_timelock(H.client, JOB_SQUAD_LEADER, time_required_for_job))))
leader = H
if(leaders < cryo_squad.max_leaders && (!mind || (HAS_FLAG(human.client.prefs.toggles_ert, PLAY_LEADER) && check_timelock(human.client, JOB_SQUAD_LEADER, time_required_for_job))))
leader = human
leaders++
H.client?.prefs.copy_all_to(H, JOB_SQUAD_LEADER, TRUE, TRUE)
arm_equipment(H, /datum/equipment_preset/uscm/leader/cryo, M == null, 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 && (!M || (HAS_FLAG(H.client.prefs.toggles_ert, PLAY_HEAVY) && check_timelock(H.client, JOB_SQUAD_SPECIALIST, time_required_for_job))))
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_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++
H.client?.prefs.copy_all_to(H, JOB_SQUAD_SPECIALIST, TRUE, TRUE)
arm_equipment(H, /datum/equipment_preset/uscm/spec/cryo, M == null, 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 && (!M || (HAS_FLAG(H.client.prefs.toggles_ert, PLAY_MEDIC) && check_timelock(H.client, JOB_SQUAD_MEDIC, time_required_for_job))))
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_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++
H.client?.prefs.copy_all_to(H, JOB_SQUAD_MEDIC, TRUE, TRUE)
arm_equipment(H, /datum/equipment_preset/uscm/medic/cryo, M == null, 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 && (!M || (HAS_FLAG(H.client.prefs.toggles_ert, PLAY_ENGINEER) && check_timelock(H.client, JOB_SQUAD_ENGI, time_required_for_job))))
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_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++
H.client?.prefs.copy_all_to(H, JOB_SQUAD_ENGI, TRUE, TRUE)
arm_equipment(H, /datum/equipment_preset/uscm/engineer/cryo, M == null, 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."))
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_BOLDWARNING("If you wish to cryo or ghost upon spawning in, you must ahelp and inform staff so you can be replaced."))
else
H.client?.prefs.copy_all_to(H, JOB_SQUAD_MARINE, TRUE, TRUE)
arm_equipment(H, /datum/equipment_preset/uscm/pfc/cryo, M == null, 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."))
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_BOLDWARNING("If you wish to cryo or ghost upon spawning in, you must ahelp and inform staff so you can be replaced."))

sleep(10)
if(!M)
H.free_for_ghosts()
to_chat(H, SPAN_BOLD("Objectives: [objectives]"))
if(!mind)
human.free_for_ghosts()
to_chat(human, SPAN_BOLD("Objectives: [objectives]"))

/datum/emergency_call/cryo_squad/platoon
name = "Marine Cryo Reinforcements (Platoon)"
Expand Down

0 comments on commit 056ca96

Please sign in to comment.