diff --git a/code/game/jobs/job/marine/squads.dm b/code/game/jobs/job/marine/squads.dm index c5f6defaac2d..7dff9e06e4a0 100644 --- a/code/game/jobs/job/marine/squads.dm +++ b/code/game/jobs/job/marine/squads.dm @@ -265,6 +265,7 @@ faction = FACTION_UPP radio_freq = UPP_FREQ roles_cap = list( + JOB_UPP = null, JOB_UPP_ENGI = 3, JOB_UPP_MEDIC = 4, JOB_UPP_SPECIALIST = 1, diff --git a/code/modules/gear_presets/upp.dm b/code/modules/gear_presets/upp.dm index 01457c63400e..47138307b8b6 100644 --- a/code/modules/gear_presets/upp.dm +++ b/code/modules/gear_presets/upp.dm @@ -17,6 +17,9 @@ scaled = FALSE faction_menu = FACTION_UPP minimum_playtime_as_job = 0 + total_positions = 8 + spawn_positions = 8 + allow_additional = 1 gear_preset = /datum/equipment_preset/upp/soldier @@ -99,10 +102,15 @@ minimap_icon = "upp_pvt" paygrades = list(PAY_SHORT_UE1 = JOB_PLAYTIME_TIER_0, PAY_SHORT_UE2 = JOB_PLAYTIME_TIER_1) +/datum/job/antag/upp/rifleman/set_spawn_positions(count) + spawn_positions = max((floor(count * STANDARD_MARINE_TO_TOTAL_SPAWN_RATIO)), 8) + /datum/job/antag/upp/rifleman title = JOB_UPP flags_startup_parameters = ROLE_ADD_TO_SQUAD gear_preset = /datum/equipment_preset/upp/soldier + total_positions = -1 + spawn_positions = -1 /datum/equipment_preset/upp/soldier/dressed name = "UPP Soldier" @@ -292,7 +300,27 @@ title = JOB_UPP_MEDIC gear_preset = /datum/equipment_preset/upp/medic flags_startup_parameters = ROLE_ADD_TO_SQUAD + total_positions = 16 + spawn_positions = 16 + allow_additional = 1 + +/datum/job/antag/upp/cryo/medic/get_total_positions(latejoin=0) + var/slots = medic_slot_formula(get_total_marines()) + + if(slots <= total_positions_so_far) + slots = total_positions_so_far + else + total_positions_so_far = slots + if(latejoin) + for(var/datum/squad/target_squad in GLOB.RoleAuthority.squads) + if(target_squad) + target_squad.roles_cap[title] = slots + +/datum/job/antag/upp/cryo/medic/set_spawn_positions(count) + for(var/datum/squad/target_squad in GLOB.RoleAuthority.squads) + if(target_squad) + target_squad.roles_cap[title] = medic_slot_formula(count) /datum/equipment_preset/upp/medic name = "UPP Medic (Cryo)" @@ -486,10 +514,34 @@ ) //*****************************************************************************************************/ + /datum/job/antag/upp/sapper title = JOB_UPP_ENGI gear_preset = /datum/equipment_preset/upp/sapper flags_startup_parameters = ROLE_ADD_TO_SQUAD + total_positions = 12 + spawn_positions = 12 + allow_additional = 1 + +/datum/job/antag/upp/sapper/get_total_positions(latejoin=0) + var/slots = engi_slot_formula(get_total_marines()) + + if(slots <= total_positions_so_far) + slots = total_positions_so_far + else + total_positions_so_far = slots + + if(latejoin) + for(var/datum/squad/target_squad in GLOB.RoleAuthority.squads) + if(target_squad) + target_squad.roles_cap[title] = slots + + return (slots*4) + +/datum/job/antag/upp/sapper/set_spawn_positions(count) + for(var/datum/squad/target_squad in GLOB.RoleAuthority.squads) + if(target_squad) + target_squad.roles_cap[title] = engi_slot_formula(count) /datum/equipment_preset/upp/sapper name = "UPP Sapper (Cryo)" @@ -802,6 +854,26 @@ title = JOB_UPP_SPECIALIST gear_preset = /datum/equipment_preset/upp/machinegunner flags_startup_parameters = ROLE_ADD_TO_SQUAD + total_positions = 4 + spawn_positions = 4 + allow_additional = 1 + scaled = 1 + +/datum/job/antag/upp/machinegunner/get_total_positions(latejoin = 0) + var/positions = spawn_positions + if(latejoin) + positions = spec_slot_formula(get_total_marines()) + if(positions <= total_positions_so_far) + positions = total_positions_so_far + else + total_positions_so_far = positions + else + total_positions_so_far = positions + return positions + +/datum/job/antag/upp/machinegunner/set_spawn_positions(count) + spawn_positions = spec_slot_formula(count) + /datum/equipment_preset/upp/machinegunner name = "UPP Machinegunner (Cryo)" @@ -947,6 +1019,8 @@ title = JOB_UPP_LEADER gear_preset = /datum/equipment_preset/upp/leader flags_startup_parameters = ROLE_ADD_TO_SQUAD + total_positions = 4 + spawn_positions = 4 /datum/equipment_preset/upp/leader name = "UPP Squad Leader (Cryo)" @@ -1136,6 +1210,30 @@ // Support Roles // //=================// +/datum/job/antag/upp/military_police + title = JOB_UPP_POLICE + gear_preset = /datum/equipment_preset/upp/military_police + selection_class = "job_mp" + total_positions = 5 + spawn_positions = 5 + allow_additional = 1 + scaled = 1 + +/datum/job/antag/upp/military_police/get_total_positions(latejoin = 0) + var/positions = spawn_positions + if(latejoin) + positions = mp_slot_formula(get_total_marines()) + if(positions <= total_positions_so_far) + positions = total_positions_so_far + else + total_positions_so_far = positions + else + total_positions_so_far = positions + return positions + +/datum/job/antag/upp/military_police/set_spawn_positions(count) + return mp_slot_formula(count) + /datum/equipment_preset/upp/military_police name = "UPP Military Police (Cryo)" @@ -1146,11 +1244,6 @@ minimap_icon = "upp_mp" paygrades = list(PAY_SHORT_UE6 = JOB_PLAYTIME_TIER_0) -/datum/job/antag/upp/military_police - title = JOB_UPP_POLICE - gear_preset = /datum/equipment_preset/upp/military_police - selection_class = "job_mp" - /datum/equipment_preset/upp/military_police/load_gear(mob/living/carbon/human/new_human) . = ..() //uniform @@ -1318,6 +1411,25 @@ title = JOB_UPP_LT_DOKTOR selection_class = "job_cmo" gear_preset = /datum/equipment_preset/upp/doctor + total_positions = 5 + spawn_positions = 5 + allow_additional = 1 + scaled = 1 + +/datum/job/antag/upp/doctor/get_total_positions(latejoin = 0) + var/positions = spawn_positions + if(latejoin) + positions = doc_slot_formula(get_total_marines()) + if(positions <= total_positions_so_far) + positions = total_positions_so_far + else + total_positions_so_far = positions + else + total_positions_so_far = positions + return positions + +/datum/job/antag/upp/doctor/set_spawn_positions(count) + spawn_positions = doc_slot_formula(count) /datum/equipment_preset/upp/doctor name = "UPP Doktor (Cryo)" @@ -1488,7 +1600,25 @@ title = JOB_UPP_SUPPLY selection_class = "job_ct" gear_preset = /datum/equipment_preset/upp/supply + total_positions = 2 + spawn_positions = 2 + allow_additional = 1 + scaled = 1 + +/datum/job/antag/upp/supply/get_total_positions(latejoin = 0) + var/positions = spawn_positions + if(latejoin) + positions = ct_slot_formula(get_total_marines()) + if(positions <= total_positions_so_far) + positions = total_positions_so_far + else + total_positions_so_far = positions + else + total_positions_so_far = positions + return positions +/datum/job/antag/upp/supply/set_spawn_positions(count) + return ct_slot_formula(count) /datum/equipment_preset/upp/supply name = "UPP Logistics Technician (Cryo)" @@ -1593,6 +1723,31 @@ //====================// // Field Officers // //================// + +/datum/job/antag/upp/officer //this is placeholder for stuff that is supposed to be the same for all officers + title = JOB_UPP_SRLT_OFFICER + selection_class = "job_command" + gear_preset = /datum/equipment_preset/upp/officer + total_positions = 4 + spawn_positions = 4 + allow_additional = 1 + scaled = FALSE + +/datum/job/antag/upp/officer/get_total_positions(latejoin = 0) + var/positions = spawn_positions + if(latejoin) + positions = so_slot_formula(get_total_marines()) + if(positions <= total_positions_so_far) + positions = total_positions_so_far + else + total_positions_so_far = positions + else + total_positions_so_far = positions + return positions + +/datum/job/antag/upp/officer/set_spawn_positions(count) + return so_slot_formula(count) + /datum/equipment_preset/upp/officer name = "UPP Mladshiy Leytenant (Cryo)" flags = EQUIPMENT_PRESET_EXTRA @@ -1604,11 +1759,6 @@ minimap_icon = "upp_lt" paygrades = list(PAY_SHORT_UO1 = JOB_PLAYTIME_TIER_0) - -/datum/job/antag/upp/officer //this is placeholder for stuff that is supposed to be the same for all officers - title = JOB_UPP_SRLT_OFFICER - selection_class = "job_command" - /datum/equipment_preset/upp/officer/load_gear(mob/living/carbon/human/new_human) . = ..() //face @@ -1625,7 +1775,6 @@ name = "UPP Lieutenant" flags = EQUIPMENT_PRESET_EXTRA - /datum/equipment_preset/upp/officer/dressed/load_gear(mob/living/carbon/human/new_human) //back new_human.equip_to_slot_or_del(new /obj/item/storage/backpack/lightpack/upp, WEAR_BACK) @@ -1785,6 +1934,8 @@ /datum/job/antag/upp/officer/senior title = JOB_UPP_SRLT_OFFICER gear_preset = /datum/equipment_preset/upp/officer/senior + total_positions = 1 + spawn_positions = 1 /datum/equipment_preset/upp/officer/senior name = "UPP Starshiy Leytenant (Cryo)" @@ -1943,6 +2094,8 @@ /datum/job/antag/upp/officer/kapitan title = JOB_UPP_KPT_OFFICER gear_preset = /datum/equipment_preset/upp/officer/kapitan + total_positions = 1 + spawn_positions = 1 /datum/equipment_preset/upp/officer/kapitan name = "UPP Kapitan (Cryo)" @@ -2316,6 +2469,8 @@ flags_whitelist = WHITELIST_COMMANDER_COUNCIL title = JOB_UPP_LTKOL_OFFICER gear_preset = /datum/equipment_preset/upp/officer/flag/podpolkovnik + total_positions = 1 + spawn_positions = 1 /datum/equipment_preset/upp/officer/flag/podpolkovnik @@ -2663,6 +2818,21 @@ flags_whitelist = WHITELIST_SYNTHETIC +/datum/job/antag/upp/synth/get_total_positions(latejoin = 0) + var/positions = spawn_positions + if(latejoin) + positions = synth_slot_formula(get_total_marines()) + if(positions <= total_positions_so_far) + positions = total_positions_so_far + else + total_positions_so_far = positions + else + total_positions_so_far = positions + return positions + +/datum/job/antag/upp/synth/set_spawn_positions(count) + spawn_positions = synth_slot_formula(count) + /datum/equipment_preset/upp/synth name = "UPP Synthetic (Cryo)" @@ -3642,6 +3812,8 @@ title = JOB_UPP_COMMISSAR selection_class = "job_cl" gear_preset = /datum/equipment_preset/upp/commissar + total_positions = 1 + spawn_positions = 1 /datum/equipment_preset/upp/commissar name = "UPP Political Commissar (Cryo)"