Updates Manage Job Slots to work with assistant slots

Any (non-silicon) job can now be set to be an unlimited slot job from Manage Job Slots

People will be allowed to join as assistant if no other jobs are availible

Removes a redundant sanity check from AssignRole()
This commit is contained in:
Incoming
2015-02-24 16:06:36 -05:00
parent b49a5a934c
commit cbcc52beeb
4 changed files with 55 additions and 13 deletions
+12 -1
View File
@@ -246,7 +246,13 @@
if(!job)
return 0
if((job.current_positions >= job.total_positions) && job.total_positions != -1)
return 0
if(job.title == "Assistant")
for(var/datum/job/J in SSjob.occupations)
if(J && J.current_positions < J.total_positions && J.title != job.title)
world << "[J.title]"
return 0
else
return 0
if(jobban_isbanned(src,rank))
return 0
if(!job.player_old_enough(src.client))
@@ -329,6 +335,11 @@
if (job.title in command_positions)
position_class = "commandPosition"
dat += "<a class='[position_class]' href='byond://?src=\ref[src];SelectedJob=[job.title]'>[job.title] ([job.current_positions])</a><br>"
if(!job_count) //if there's nowhere to go, assistant opens up.
for(var/datum/job/job in SSjob.occupations)
if(job.title != "Assistant") continue
dat += "<a class='otherPosition' href='byond://?src=\ref[src];SelectedJob=[job.title]'>[job.title] ([job.current_positions])</a><br>"
break
dat += "</div></div>"
// Removing the old window method but leaving it here for reference