From 045cd46553015f79b985edc2ca3a2fba8ccf6e9a Mon Sep 17 00:00:00 2001 From: sg2002 Date: Mon, 23 Dec 2024 18:38:29 +0300 Subject: [PATCH] Put players with no squad preference in random squads again --- code/game/jobs/job/marine/squads.dm | 2 -- code/game/jobs/role_authority.dm | 7 ++----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/code/game/jobs/job/marine/squads.dm b/code/game/jobs/job/marine/squads.dm index 528ae04c8924..1d453bc02d34 100644 --- a/code/game/jobs/job/marine/squads.dm +++ b/code/game/jobs/job/marine/squads.dm @@ -1,8 +1,6 @@ //This datum keeps track of individual squads. New squads can be added without any problem but to give them //access you must add them individually to access.dm with the other squads. Just look for "access_alpha" and add the new one -//Note: some important procs are held by the job controller, in job_controller.dm. -//In particular, get_lowest_squad() and randomize_squad() /datum/squad_type //Majority of this is for a follow-on PR to fully flesh the system out and add more bits for other factions. var/name = "Squad Type" var/lead_name diff --git a/code/game/jobs/role_authority.dm b/code/game/jobs/role_authority.dm index 3ccd65fa5598..99a08e18365c 100644 --- a/code/game/jobs/role_authority.dm +++ b/code/game/jobs/role_authority.dm @@ -545,6 +545,7 @@ I hope it's easier to tell what the heck this proc is even doing, unlike previou for(var/datum/squad/squad in squads) if(squad.roundstart && squad.usable && squad.faction == human.faction && squad.name != "Root") mixed_squads += squad + mixed_squads = shuffle(mixed_squads) var/preferred_squad if(human?.client?.prefs?.preferred_squad) @@ -556,11 +557,7 @@ I hope it's easier to tell what the heck this proc is even doing, unlike previou if(squad.roles_in[slot_check] >= squad.roles_cap[slot_check]) continue - if(preferred_squad == "None") - if(squad.put_marine_in_squad(human)) - return - - else if(squad.name == preferred_squad || squad.equivalent_name == preferred_squad) //fav squad or faction equivalent has a spot for us, no more searching needed. + if(squad.name == preferred_squad || squad.equivalent_name == preferred_squad) //fav squad or faction equivalent has a spot for us, no more searching needed. if(squad.put_marine_in_squad(human)) return