mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 13:05:36 +01:00
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:
@@ -815,22 +815,29 @@ var/global/floorIsLava = 0
|
||||
var/J_title = html_encode(job.title)
|
||||
var/J_opPos = html_encode(job.total_positions - (job.total_positions - job.current_positions))
|
||||
var/J_totPos = html_encode(job.total_positions)
|
||||
if(job.total_positions <= 0)
|
||||
dat += "[J_title]: [J_opPos]"
|
||||
if(job.total_positions < 0)
|
||||
dat += "[J_title]: [J_opPos] (unlimited)"
|
||||
else
|
||||
dat += "[J_title]: [J_opPos]/[J_totPos]"
|
||||
if(initial(job.total_positions) > 0)
|
||||
|
||||
if(job.title == "AI" || job.title == "Cyborg")
|
||||
dat += " (Cannot Late Join)<br>"
|
||||
continue
|
||||
if(job.total_positions >= 0)
|
||||
dat += " <A href='?src=\ref[src];addjobslot=[job.title]'>Add</A> | "
|
||||
if(job.total_positions > job.current_positions)
|
||||
dat += "<A href='?src=\ref[src];removejobslot=[job.title]'>Remove</A>"
|
||||
dat += "<A href='?src=\ref[src];removejobslot=[job.title]'>Remove</A> | "
|
||||
else
|
||||
dat += "Remove"
|
||||
dat += "Remove | "
|
||||
dat += "<A href='?src=\ref[src];unlimitjobslot=[job.title]'>Unlimit</A>"
|
||||
else
|
||||
dat += " <A href='?src=\ref[src];limitjobslot=[job.title]'>Limit</A>"
|
||||
dat += "<br>"
|
||||
|
||||
dat += "</body>"
|
||||
var/winheight = 100 + (count * 20)
|
||||
winheight = min(winheight, 690)
|
||||
usr << browse(dat, "window=players;size=316x[winheight]")
|
||||
usr << browse(dat, "window=players;size=375x[winheight]")
|
||||
|
||||
//
|
||||
//
|
||||
|
||||
@@ -1404,6 +1404,31 @@
|
||||
|
||||
src.manage_free_slots()
|
||||
|
||||
else if(href_list["unlimitjobslot"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
var/Unlimit = href_list["unlimitjobslot"]
|
||||
|
||||
for(var/datum/job/job in SSjob.occupations)
|
||||
if(job.title == Unlimit)
|
||||
job.total_positions = -1
|
||||
break
|
||||
|
||||
src.manage_free_slots()
|
||||
|
||||
else if(href_list["limitjobslot"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
var/Limit = href_list["limitjobslot"]
|
||||
|
||||
for(var/datum/job/job in SSjob.occupations)
|
||||
if(job.title == Limit)
|
||||
job.total_positions = job.current_positions
|
||||
break
|
||||
|
||||
src.manage_free_slots()
|
||||
|
||||
|
||||
else if(href_list["adminspawncookie"])
|
||||
if(!check_rights(R_ADMIN|R_FUN)) return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user