mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 15:14:27 +01:00
Fix for heads not getting assigned properly at round start.
Well, hopefully a fix. I've tested it locally to make sure it still actually assigns jobs without any problems, and it should work but we wont know for sure until we get more people trying it out. Thanks to Tonberrytoby for correcting me and pretty much pinpointing the source of the problem. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4296 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -111,16 +111,16 @@ var/global/datum/controller/occupations/job_master
|
||||
return
|
||||
|
||||
|
||||
proc/FillHeadPosition()
|
||||
proc/FillHeadPosition(var/command_position)
|
||||
if(!command_position) return 0
|
||||
for(var/level = 1 to 3)
|
||||
for(var/command_position in command_positions)
|
||||
var/datum/job/job = GetJob(command_position)
|
||||
if(!job) continue
|
||||
var/list/candidates = FindOccupationCandidates(job, level)
|
||||
if(!candidates.len) continue
|
||||
var/mob/new_player/candidate = pick(candidates)
|
||||
if(AssignRole(candidate, command_position))
|
||||
return 1
|
||||
var/datum/job/job = GetJob(command_position)
|
||||
if(!job) continue
|
||||
var/list/candidates = FindOccupationCandidates(job, level)
|
||||
if(!candidates.len) continue
|
||||
var/mob/new_player/candidate = pick(candidates)
|
||||
if(AssignRole(candidate, command_position))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -195,7 +195,8 @@ var/global/datum/controller/occupations/job_master
|
||||
|
||||
//Select one head
|
||||
Debug("DO, Running Head Check")
|
||||
FillHeadPosition()
|
||||
for(var/i in command_positions)
|
||||
FillHeadPosition(i)
|
||||
Debug("DO, Head Check end")
|
||||
|
||||
//Check for an AI
|
||||
|
||||
Reference in New Issue
Block a user