Skip to content

Commit

Permalink
Put players with no squad preference in random squads again
Browse files Browse the repository at this point in the history
  • Loading branch information
sg2002 committed Dec 23, 2024
1 parent d1b8e7e commit 045cd46
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 0 additions & 2 deletions code/game/jobs/job/marine/squads.dm
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 2 additions & 5 deletions code/game/jobs/role_authority.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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

Expand Down

0 comments on commit 045cd46

Please sign in to comment.