Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put players with no squad preference in random squads again #7896

Merged
merged 1 commit into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading