Skip to content

Commit

Permalink
UPP Loadout overhaul
Browse files Browse the repository at this point in the history
  • Loading branch information
AmoryBlaine committed Aug 15, 2024
1 parent f930e3c commit 64fa434
Show file tree
Hide file tree
Showing 5 changed files with 216 additions and 3,309 deletions.
35 changes: 0 additions & 35 deletions code/datums/emergency_calls/upp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,45 +57,10 @@
var/mob/living/carbon/human/H = new(spawn_loc)
M.transfer_to(H, TRUE)

if(!leader && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_LEADER) && check_timelock(H.client, JOB_SQUAD_LEADER, time_required_for_job))
leader = H
arm_equipment(H, /datum/equipment_preset/upp/leader, TRUE, TRUE)
to_chat(H, SPAN_ROLE_HEADER("You are an Officer of the Union of Progressive People, a powerful socialist state that rivals the United Americas!"))
else if(synths < max_synths && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_SYNTH) && RoleAuthority.roles_whitelist[H.ckey] & WHITELIST_SYNTHETIC)
synths++
to_chat(H, SPAN_ROLE_HEADER("You are a Combat Synthetic of the Union of Progressive People, a powerful socialist state that rivals the United Americas!"))
arm_equipment(H, /datum/equipment_preset/upp/synth, TRUE, TRUE)
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++
to_chat(H, SPAN_ROLE_HEADER("You are a Medic of the Union of Progressive People, a powerful socialist state that rivals the United Americas!"))
arm_equipment(H, /datum/equipment_preset/upp/medic, TRUE, TRUE)
else if(engineers < engineers && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_ENGINEER) && check_timelock(H.client, JOB_SQUAD_ENGI, time_required_for_job))
engineers++
to_chat(H, SPAN_ROLE_HEADER("You are a Sapper of the Union of Progressive People, a powerful socialist state that rivals the United Americas!"))
arm_equipment(H, /datum/equipment_preset/upp/sapper, TRUE, TRUE)
else if(heavies < max_heavies && ((!heavy_pick && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_HEAVY)) || (heavy_pick && HAS_FLAG(H.client.prefs.toggles_ert, (PLAY_HEAVY|PLAY_SMARTGUNNER)))) && check_timelock(H.client, heavy_pick ? list(JOB_SQUAD_SPECIALIST, JOB_SQUAD_SMARTGUN) : JOB_SQUAD_SPECIALIST, time_required_for_job))
heavies++
to_chat(H, SPAN_ROLE_HEADER("You are a Sergeant of the Union of Progressive People, a powerful socialist state that rivals the United Americas!"))
var/equipment_path = /datum/equipment_preset/upp/specialist
if(heavy_pick)
if(HAS_FLAG(H.client.prefs.toggles_ert, PLAY_HEAVY) && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_SMARTGUNNER))
equipment_path = pick(/datum/equipment_preset/upp/specialist, /datum/equipment_preset/upp/machinegunner)
else if(HAS_FLAG(H.client.prefs.toggles_ert, PLAY_SMARTGUNNER) && !HAS_FLAG(H.client.prefs.toggles_ert, PLAY_HEAVY))
equipment_path = /datum/equipment_preset/upp/machinegunner
arm_equipment(H, equipment_path, TRUE, TRUE)
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++
to_chat(H, SPAN_ROLE_HEADER("You are a sergeant of the Union of Progressive People, a powerful socialist state that rivals the United Americas!"))
arm_equipment(H, /datum/equipment_preset/upp/machinegunner, TRUE, TRUE)
else
to_chat(H, SPAN_ROLE_HEADER("You are a soldier of the Union of Progressive People, a powerful socialist state that rivals the United Americas!"))
arm_equipment(H, /datum/equipment_preset/upp/soldier, TRUE, TRUE)

print_backstory(H)

addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), H, SPAN_BOLD("Objectives: [objectives]")), 1 SECONDS)


/datum/emergency_call/upp/hostile
name = "UPP Naval Infantry (Squad) (Hostile)"
hostility = TRUE
Expand Down
26 changes: 0 additions & 26 deletions code/datums/emergency_calls/upp_commando.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,6 @@
var/mob/living/carbon/human/H = new(spawn_loc)
M.transfer_to(H, TRUE)

if(!leader && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_LEADER) && check_timelock(H.client, JOB_SQUAD_LEADER, time_required_for_job)) //First one spawned is always the leader.
leader = H
arm_equipment(H, /datum/equipment_preset/upp/commando/leader, TRUE, TRUE)
to_chat(H, SPAN_ROLE_HEADER("You are a Commando Team Leader of the Union of Progressive People, a powerful socialist state that rivals the United Americas!"))
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++
to_chat(H, SPAN_ROLE_HEADER("You are a Commando Medic of the Union of Progressive People, a powerful socialist state that rivals the United Americas!"))
arm_equipment(H, /datum/equipment_preset/upp/commando/medic, TRUE, TRUE)
else
to_chat(H, SPAN_ROLE_HEADER("You are a Commando of the Union of Progressive People, a powerful socialist state that rivals the United Americas!"))
arm_equipment(H, /datum/equipment_preset/upp/commando, TRUE, TRUE)
print_backstory(H)

addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), H, SPAN_BOLD("Objectives: [objectives]")), 1 SECONDS)

/datum/emergency_call/upp_commando/low_threat
Expand All @@ -63,17 +50,4 @@
var/mob/living/carbon/human/person = new(spawn_loc)
mind.transfer_to(person, TRUE)

if(!leader && HAS_FLAG(person.client.prefs.toggles_ert, PLAY_LEADER) && check_timelock(person.client, JOB_SQUAD_LEADER, time_required_for_job)) //First one spawned is always the leader.
leader = person
arm_equipment(person, /datum/equipment_preset/upp/commando/leader/low_threat, TRUE, TRUE)
to_chat(person, SPAN_ROLE_HEADER("You are a Commando Team Leader of the Union of Progressive People, a powerful socialist state that rivals the United Americas!"))
else if(medics < max_medics && HAS_FLAG(person.client.prefs.toggles_ert, PLAY_MEDIC) && check_timelock(person.client, JOB_SQUAD_MEDIC, time_required_for_job))
medics++
to_chat(person, SPAN_ROLE_HEADER("You are a Commando Medic of the Union of Progressive People, a powerful socialist state that rivals the United Americas!"))
arm_equipment(person, /datum/equipment_preset/upp/commando/medic/low_threat, TRUE, TRUE)
else
to_chat(person, SPAN_ROLE_HEADER("You are a Commando of the Union of Progressive People, a powerful socialist state that rivals the United Americas!"))
arm_equipment(person, /datum/equipment_preset/upp/commando/low_threat, TRUE, TRUE)
print_backstory(person)

addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), person, SPAN_BOLD("Objectives: [objectives]")), 1 SECONDS)
9 changes: 2 additions & 7 deletions code/datums/paygrades/factions/upp/upp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,11 @@


//UPP Enlisted
/datum/paygrade/upp/ue0
paygrade = "UE0"
name = "Conscript"
pay_multiplier = 0.05
prefix = "Cnscr."

/datum/paygrade/upp/ue1
paygrade = "UE1"
name = "Private"
prefix = "PVT."
name = "Ryadovoy"
prefix = "Ryad."

/datum/paygrade/upp/ue2
paygrade = "UE2"
Expand Down
6 changes: 3 additions & 3 deletions code/game/objects/effects/landmarks/freed_mob_spawner.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
H.free_for_ghosts()

/obj/effect/landmark/freed_mob_spawner/upp_conscript
name = "UPP Conscript"
equipment_path = /datum/equipment_preset/upp/conscript
name = "UPP Militiaman"
equipment_path = /datum/equipment_preset/upp/militia
count_participant = TRUE

/obj/effect/landmark/freed_mob_spawner/upp_soldier
name = "UPP Soldier"
equipment_path = /datum/equipment_preset/upp/soldier
equipment_path = /datum/equipment_preset/uscm/private_equipped/upp
count_participant = TRUE
Loading

0 comments on commit 64fa434

Please sign in to comment.