diff --git a/code/datums/emergency_calls/cryo_marines.dm b/code/datums/emergency_calls/cryo_marines.dm index bb9fe824ad6d..7b675af8bb97 100644 --- a/code/datums/emergency_calls/cryo_marines.dm +++ b/code/datums/emergency_calls/cryo_marines.dm @@ -15,7 +15,7 @@ /datum/emergency_call/cryo_squad/spawn_candidates(quiet_launch, announce_incoming, override_spawn_loc) var/datum/squad/marine/cryo/cryo_squad = GLOB.RoleAuthority.squads_by_type[/datum/squad/marine/cryo] - leaders = cryo_squad.num_leaders + leaders = cryo_squad.roles_in[JOB_SQUAD_LEADER] . = ..() shipwide_ai_announcement("Successfully deployed [mob_max] Foxtrot marines, of which [length(members)] are ready for duty.") if(mob_max > length(members)) diff --git a/code/datums/emergency_calls/cryo_marines_heavy.dm b/code/datums/emergency_calls/cryo_marines_heavy.dm index 14155cdd8673..b3fcc390d964 100644 --- a/code/datums/emergency_calls/cryo_marines_heavy.dm +++ b/code/datums/emergency_calls/cryo_marines_heavy.dm @@ -18,7 +18,7 @@ /datum/emergency_call/cryo_squad_equipped/spawn_candidates(quiet_launch, announce_incoming, override_spawn_loc) var/datum/squad/marine/cryo/cryo_squad = GLOB.RoleAuthority.squads_by_type[/datum/squad/marine/cryo] - leaders = cryo_squad.num_leaders + leaders = cryo_squad.roles_in[JOB_SQUAD_LEADER] . = ..() if(length(members)) shipwide_ai_announcement("Successfully deployed [length(members)] Foxtrot marines.") diff --git a/code/game/jobs/job/marine/squads.dm b/code/game/jobs/job/marine/squads.dm index c16d97e8500b..79f2be855447 100644 --- a/code/game/jobs/job/marine/squads.dm +++ b/code/game/jobs/job/marine/squads.dm @@ -87,12 +87,6 @@ ) //3 FTs where references to marines stored. var/list/squad_info_data = list() - var/num_engineers = 0 - var/num_medics = 0 - var/num_leaders = 0 - var/num_smartgun = 0 - var/num_specialists = 0 - var/num_tl = 0 var/count = 0 //Current # in the squad var/list/marines_list = list() // list of mobs (or name, not always a mob ref) in that squad. @@ -619,19 +613,9 @@ update_free_mar() target_mob.assigned_squad = null - switch(GET_DEFAULT_ROLE(target_mob.job)) - if(JOB_SQUAD_ENGI) - num_engineers-- - if(JOB_SQUAD_MEDIC) - num_medics-- - if(JOB_SQUAD_SPECIALIST) - num_specialists-- - if(JOB_SQUAD_SMARTGUN) - num_smartgun-- - if(JOB_SQUAD_TEAM_LEADER) - num_tl-- - if(JOB_SQUAD_LEADER) - num_leaders-- + var/slot_check = GET_DEFAULT_ROLE(target_mob.job) + if(slot_check && !isnull(roles_cap[slot_check])) + roles_in[slot_check]-- //proc for demoting current Squad Leader /datum/squad/proc/demote_squad_leader(leader_killed)