Revert "Assorted changes to job assignment code and logging." (#85929)

Reverts tgstation/tgstation#85308

![image](https://github.com/user-attachments/assets/eb74d378-29da-44f0-bd14-89c95654cb4e)
This commit is contained in:
Kyle Spier-Swenson
2024-08-17 15:26:08 -07:00
committed by GitHub
parent 4ce1f048fe
commit 4d1639b04c
69 changed files with 295 additions and 323 deletions
+3 -3
View File
@@ -521,7 +521,7 @@ ADMIN_VERB(spawn_debug_full_crew, R_DEBUG, "Spawn Debug Full Crew", "Creates a f
// Then, spawn a human and slap a person into it.
var/number_made = 0
for(var/rank in SSjob.name_occupations)
var/datum/job/job = SSjob.get_job(rank)
var/datum/job/job = SSjob.GetJob(rank)
// JOB_CREW_MEMBER is all jobs that pretty much aren't silicon
if(!(job.job_flags & JOB_CREW_MEMBER))
@@ -533,7 +533,7 @@ ADMIN_VERB(spawn_debug_full_crew, R_DEBUG, "Spawn Debug Full Crew", "Creates a f
new_guy.mind.name = "[rank] Dummy"
// Assign the rank to the new player dummy.
if(!SSjob.assign_role(new_guy, job, do_eligibility_checks = FALSE))
if(!SSjob.AssignRole(new_guy, job, do_eligibility_checks = FALSE))
qdel(new_guy)
to_chat(user, "[rank] wasn't able to be spawned.")
continue
@@ -545,7 +545,7 @@ ADMIN_VERB(spawn_debug_full_crew, R_DEBUG, "Spawn Debug Full Crew", "Creates a f
qdel(new_guy)
// Then equip up the human with job gear.
SSjob.equip_rank(character, job)
SSjob.EquipRank(character, job)
job.after_latejoin_spawn(character)
// Finally, ensure the minds are tracked and in the manifest.
+1 -1
View File
@@ -32,7 +32,7 @@ ADMIN_VERB(unprison, R_ADMIN, "UnPrison", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEG
tgui_alert(user, "[prisoner.name] is not prisoned.")
return
SSjob.send_to_late_join(prisoner)
SSjob.SendToLateJoin(prisoner)
message_admins("[key_name_admin(user)] has unprisoned [key_name_admin(prisoner)]")
log_admin("[key_name(user)] has unprisoned [key_name(prisoner)]")
BLACKBOX_LOG_ADMIN_VERB("Unprison")
+5 -5
View File
@@ -190,7 +190,7 @@ ADMIN_VERB(respawn_character, R_ADMIN, "Respawn Character", "Respawn a player th
if(findtext(G_found.real_name,"monkey"))
if(tgui_alert(user,"This character appears to have been a monkey. Would you like to respawn them as such?",,list("Yes","No")) == "Yes")
var/mob/living/carbon/human/species/monkey/new_monkey = new
SSjob.send_to_late_join(new_monkey)
SSjob.SendToLateJoin(new_monkey)
G_found.mind.transfer_to(new_monkey) //be careful when doing stuff like this! I've already checked the mind isn't in use
new_monkey.key = G_found.key
to_chat(new_monkey, "You have been fully respawned. Enjoy the game.", confidential = TRUE)
@@ -202,7 +202,7 @@ ADMIN_VERB(respawn_character, R_ADMIN, "Respawn Character", "Respawn a player th
//Ok, it's not a monkey. So, spawn a human.
var/mob/living/carbon/human/new_character = new//The mob being spawned.
SSjob.send_to_late_join(new_character)
SSjob.SendToLateJoin(new_character)
var/datum/record/locked/record_found //Referenced to later to either randomize or not randomize the character.
if(G_found.mind && !G_found.mind.active) //mind isn't currently in use by someone/something
@@ -225,7 +225,7 @@ ADMIN_VERB(respawn_character, R_ADMIN, "Respawn Character", "Respawn a player th
else
new_character.mind_initialize()
if(is_unassigned_job(new_character.mind.assigned_role))
new_character.mind.set_assigned_role(SSjob.get_job_type(SSjob.overflow_role))
new_character.mind.set_assigned_role(SSjob.GetJobType(SSjob.overflow_role))
new_character.key = G_found.key
@@ -242,7 +242,7 @@ ADMIN_VERB(respawn_character, R_ADMIN, "Respawn Character", "Respawn a player th
//Now for special roles and equipment.
var/datum/antagonist/traitor/traitordatum = new_character.mind.has_antag_datum(/datum/antagonist/traitor)
if(traitordatum)
SSjob.equip_rank(new_character, new_character.mind.assigned_role, new_character.client)
SSjob.EquipRank(new_character, new_character.mind.assigned_role, new_character.client)
new_character.mind.give_uplink(silent = TRUE, antag_datum = traitordatum)
switch(new_character.mind.special_role)
@@ -271,7 +271,7 @@ ADMIN_VERB(respawn_character, R_ADMIN, "Respawn Character", "Respawn a player th
new_character = new_character.AIize()
else
if(!traitordatum) // Already equipped there.
SSjob.equip_rank(new_character, new_character.mind.assigned_role, new_character.client)//Or we simply equip them.
SSjob.EquipRank(new_character, new_character.mind.assigned_role, new_character.client)//Or we simply equip them.
//Announces the character on all the systems, based on the record.
if(!record_found && (new_character.mind.assigned_role.job_flags & JOB_CREW_MEMBER))
+1 -1
View File
@@ -36,7 +36,7 @@ GLOBAL_DATUM(triple_ai_controller, /datum/triple_ai_controller)
to_chat(usr, "This option is currently only usable during pregame. This may change at a later date.", confidential = TRUE)
return
var/datum/job/job = SSjob.get_job_type(/datum/job/ai)
var/datum/job/job = SSjob.GetJobType(/datum/job/ai)
if(!job)
to_chat(usr, "Unable to locate the AI job", confidential = TRUE)
CRASH("triple_ai() called, no /datum/job/ai to be found.")
+1 -1
View File
@@ -242,7 +242,7 @@
ert_antag.random_names = ertemplate.random_names
ert_operative.mind.add_antag_datum(ert_antag,ert_team)
ert_operative.mind.set_assigned_role(SSjob.get_job_type(ert_antag.ert_job_path))
ert_operative.mind.set_assigned_role(SSjob.GetJobType(ert_antag.ert_job_path))
//Logging and cleanup
ert_operative.log_message("has been selected as \a [ert_antag.name].", LOG_GAME)
+1 -1
View File
@@ -84,7 +84,7 @@ ADMIN_VERB(secrets, R_NONE, "Secrets", "Abuse harder than you ever have before w
if("infinite_sec")
if(!is_debugger)
return
var/datum/job/sec_job = SSjob.get_job_type(/datum/job/security_officer)
var/datum/job/sec_job = SSjob.GetJobType(/datum/job/security_officer)
sec_job.total_positions = -1
sec_job.spawn_positions = -1
message_admins("[key_name_admin(holder)] has removed the cap on security officers.")