mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 18:44:48 +01:00
job transfers now correctly update job slots
This commit is contained in:
@@ -624,6 +624,15 @@ SUBSYSTEM_DEF(jobs)
|
||||
id_change_records["[id_change_counter]"] = list("transferee" = transferee, "oldvalue" = oldvalue, "newvalue" = newvalue, "whodidit" = whodidit, "timestamp" = station_time_timestamp())
|
||||
id_change_counter++
|
||||
|
||||
/datum/controller/subsystem/jobs/proc/slot_job_transfer(oldtitle, newtitle)
|
||||
var/datum/job/oldjobdatum = SSjobs.GetJob(oldtitle)
|
||||
var/datum/job/newjobdatum = SSjobs.GetJob(newtitle)
|
||||
if(istype(oldjobdatum) && oldjobdatum.current_positions > 0 && istype(newjobdatum))
|
||||
if(!(oldjobdatum.title in command_positions) && !(newjobdatum.title in command_positions))
|
||||
oldjobdatum.current_positions--
|
||||
newjobdatum.current_positions++
|
||||
|
||||
|
||||
/datum/controller/subsystem/jobs/proc/fetch_transfer_record_html(var/centcom)
|
||||
var/record_html = "<TABLE border=\"1\">"
|
||||
|
||||
|
||||
@@ -408,6 +408,7 @@ var/time_last_changed_position = 0
|
||||
message_admins("[key_name_admin(usr)] has reassigned \"[modify.registered_name]\" from \"[jobnamedata]\" to \"[t1]\".")
|
||||
|
||||
SSjobs.log_job_transfer(modify.registered_name, jobnamedata, t1, scan.registered_name)
|
||||
SSjobs.slot_job_transfer(modify.rank, t1)
|
||||
|
||||
var/mob/living/carbon/human/H = modify.getPlayer()
|
||||
if(istype(H))
|
||||
@@ -416,7 +417,6 @@ var/time_last_changed_position = 0
|
||||
if(H.mind)
|
||||
H.mind.playtime_role = t1
|
||||
|
||||
|
||||
modify.access = access
|
||||
modify.rank = t1
|
||||
modify.assignment = t1
|
||||
|
||||
@@ -250,6 +250,8 @@
|
||||
message_admins("[key_name_admin(usr)] has reassigned \"[modify.registered_name]\" from \"[jobnamedata]\" to \"[t1]\".")
|
||||
|
||||
SSjobs.log_job_transfer(modify.registered_name, jobnamedata, t1, scan.registered_name)
|
||||
SSjobs.slot_job_transfer(modify.rank, t1)
|
||||
|
||||
var/mob/living/carbon/human/H = modify.getPlayer()
|
||||
if(istype(H))
|
||||
if(jobban_isbanned(H, t1))
|
||||
|
||||
Reference in New Issue
Block a user