mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 02:24:11 +01:00
Added verb for admins to create additional job slot.
This commit is contained in:
@@ -60,6 +60,12 @@ var/global/datum/controller/occupations/job_master
|
||||
Debug("AR has failed, Player: [player], Rank: [rank]")
|
||||
return 0
|
||||
|
||||
proc/FreeRole(var/rank) //making additional slot on the fly
|
||||
var/datum/job/job = GetJob(rank)
|
||||
if(job && job.current_positions >= job.total_positions)
|
||||
job.total_positions++
|
||||
return 1
|
||||
return 0
|
||||
|
||||
proc/FindOccupationCandidates(datum/job/job, level, flag)
|
||||
Debug("Running FOC, Job: [job], Level: [level], Flag: [flag]")
|
||||
|
||||
@@ -54,7 +54,8 @@ var/list/admin_verbs_admin = list(
|
||||
/client/proc/cmd_admin_direct_narrate, /*send text directly to a player with no padding. Useful for narratives and fluff-text*/
|
||||
/client/proc/cmd_admin_world_narrate, /*sends text to all players with no padding*/
|
||||
/client/proc/cmd_admin_create_centcom_report,
|
||||
/client/proc/check_words /*displays cult-words*/
|
||||
/client/proc/check_words, /*displays cult-words*/
|
||||
/client/proc/free_slot /*frees slot for chosen job*/
|
||||
)
|
||||
var/list/admin_verbs_ban = list(
|
||||
/client/proc/unban_panel,
|
||||
@@ -727,3 +728,19 @@ var/list/admin_verbs_mod = list(
|
||||
if(holder)
|
||||
holder.PlayerNotes()
|
||||
return
|
||||
|
||||
/client/proc/free_slot()
|
||||
set name = "Free Job Slot"
|
||||
set category = "Admin"
|
||||
if(holder)
|
||||
var/list/jobs = list()
|
||||
for (var/datum/job/J in job_master.occupations)
|
||||
if (J.current_positions >= J.total_positions && J.total_positions != -1)
|
||||
jobs += J.title
|
||||
if (!jobs.len)
|
||||
usr << "There are no fully staffed jobs."
|
||||
return
|
||||
var/job = input("Please select job slot to free", "Free job slot") as null|anything in jobs
|
||||
if (job)
|
||||
job_master.FreeRole(job)
|
||||
return
|
||||
Reference in New Issue
Block a user