From 201ef9523cedd5ec903598c4ebef1c9487a8b95b Mon Sep 17 00:00:00 2001 From: Arokha Sieyes Date: Mon, 29 Jan 2018 01:16:02 -0500 Subject: [PATCH] Removes obsolete assistant ratio code, fixes nonconstant declaration --- code/game/jobs/job/assistant.dm | 21 ++++++++++++++++---- code/modules/admin/admin_verbs.dm | 5 ++--- code/modules/admin/verbs/debug_vr.dm | 15 -------------- code/modules/mob/new_player/new_player_vr.dm | 16 --------------- 4 files changed, 19 insertions(+), 38 deletions(-) diff --git a/code/game/jobs/job/assistant.dm b/code/game/jobs/job/assistant.dm index e5cabfeb23..d67d570c39 100644 --- a/code/game/jobs/job/assistant.dm +++ b/code/game/jobs/job/assistant.dm @@ -4,8 +4,8 @@ department = "Civilian" department_flag = CIVILIAN faction = "Station" - total_positions = config.limit_interns //VOREStation Edit - spawn_positions = config.limit_interns //VOREStation Edit + total_positions = -1 + spawn_positions = -1 supervisors = "absolutely everyone" selection_color = "#515151" economic_modifier = 2 @@ -13,6 +13,12 @@ minimal_access = list() //See /datum/job/assistant/get_access() outfit_type = /decl/hierarchy/outfit/job/assistant alt_titles = list("Engineering Intern","Medical Intern","Research Intern","Security Intern","Cargo Intern") //VOREStation Edit +//VOREStation Add +/datum/job/assistant/New() + ..() + total_positions = config.limit_interns + spawn_positions = config.limit_interns +//VOREStation Add End /datum/job/assistant/get_access() if(config.assistant_maint) @@ -27,8 +33,8 @@ department = "Civilian" department_flag = CIVILIAN faction = "Station" - total_positions = config.limit_visitors - spawn_positions = config.limit_visitors + total_positions = -1 + spawn_positions = -1 supervisors = "absolutely everyone" selection_color = "#515151" economic_modifier = 1 @@ -36,4 +42,11 @@ minimal_access = list() outfit_type = /decl/hierarchy/outfit/job/assistant alt_titles = list("Test Subject") +//VOREStation Add +/datum/job/visitor/New() + ..() + total_positions = config.limit_visitors + spawn_positions = config.limit_visitors +//VOREStation Add End + // VOREStation Add End \ No newline at end of file diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index bed437ecc5..14462a93f6 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -103,7 +103,6 @@ var/list/admin_verbs_admin = list( /datum/admins/proc/paralyze_mob, /client/proc/fixatmos, /datum/admins/proc/quick_nif, //VOREStation Add, - /datum/admins/proc/assistant_ratio, //VOREStation Add, /datum/admins/proc/sendFax ) @@ -1050,7 +1049,7 @@ var/list/admin_verbs_event_manager = list( set category = "Fun" set name = "Man Up" set desc = "Tells mob to man up and deal with it." - + if(alert("Are you sure you want to tell them to man up?","Confirmation","Deal with it","No")=="No") return T << "Man up and deal with it." @@ -1063,7 +1062,7 @@ var/list/admin_verbs_event_manager = list( set category = "Fun" set name = "Man Up Global" set desc = "Tells everyone to man up and deal with it." - + if(alert("Are you sure you want to tell the whole server up?","Confirmation","Deal with it","No")=="No") return for (var/mob/T as mob in mob_list) diff --git a/code/modules/admin/verbs/debug_vr.dm b/code/modules/admin/verbs/debug_vr.dm index 5484f37771..eb8cd37e01 100644 --- a/code/modules/admin/verbs/debug_vr.dm +++ b/code/modules/admin/verbs/debug_vr.dm @@ -30,18 +30,3 @@ log_and_message_admins("[key_name(src)] Quick NIF'd [H.real_name].") feedback_add_details("admin_verb","QNIF") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - -/datum/admins/proc/assistant_ratio() - set category = "Admin" - set name = "Toggle Asst. Ratio" - set desc = "Toggles the assistant ratio enforcement on/off." - - if(!check_rights(R_ADMIN)) - return - - if(isnull(config.assistants_ratio)) - to_chat(usr,"Assistant ratio enforcement isn't even turned on...") - return - - config.assistants_ratio *= -1 - to_chat(usr,"Assistant ratio enforcement now [config.assistants_ratio > 0 ? "enabled" : "disabled"].") diff --git a/code/modules/mob/new_player/new_player_vr.dm b/code/modules/mob/new_player/new_player_vr.dm index 0b5b2c26b6..d92df60859 100644 --- a/code/modules/mob/new_player/new_player_vr.dm +++ b/code/modules/mob/new_player/new_player_vr.dm @@ -47,22 +47,6 @@ pass = FALSE to_chat(src,"Your custom species is not playable. Reconfigure your traits on the VORE tab.") - //Assistant ratio enforcement - if (config.assistants_ratio > 0) //Stored as a negative number when inactive by admin verb - - var/nonassistants = 0 - var/assistants = 0 - for(var/job in job_master.occupations) - var/datum/job/J = job - if(istype(J,/datum/job/assistant)) - assistants += J.current_positions - else - nonassistants += J.current_positions - - if(assistants != 0 && assistants >= config.assistants_assured && nonassistants/assistants < config.assistants_ratio) - pass = FALSE - to_chat(src,"There are currently [assistants] assistants, and [nonassistants] normal employees, while we enforce a specific ratio. Please join as a job instead of assistant.") - //Final popup notice if (!pass) alert(src,"There were problems with spawning your character. Check your message log for details.","Error","OK")