mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Adds an admin verb to toggle it easier
This commit is contained in:
@@ -32,6 +32,10 @@
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
switch (name)
|
switch (name)
|
||||||
|
if ("assistants_ratio")
|
||||||
|
config.assistants_ratio = value
|
||||||
|
if ("assistants_assured")
|
||||||
|
config.assistants_assured = value
|
||||||
if ("chat_webhook_url")
|
if ("chat_webhook_url")
|
||||||
config.chat_webhook_url = value
|
config.chat_webhook_url = value
|
||||||
if ("chat_webhook_key")
|
if ("chat_webhook_key")
|
||||||
@@ -42,8 +46,5 @@
|
|||||||
config.fax_export_dir = value
|
config.fax_export_dir = value
|
||||||
if ("items_survive_digestion")
|
if ("items_survive_digestion")
|
||||||
config.items_survive_digestion = 1
|
config.items_survive_digestion = 1
|
||||||
if ("assistants_ratio")
|
|
||||||
config.assistants_ratio = value
|
|
||||||
if ("assistants_assured")
|
|
||||||
config.assistants_assured = value
|
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ var/list/admin_verbs_admin = list(
|
|||||||
/datum/admins/proc/paralyze_mob,
|
/datum/admins/proc/paralyze_mob,
|
||||||
/client/proc/fixatmos,
|
/client/proc/fixatmos,
|
||||||
/datum/admins/proc/quick_nif, //VOREStation Add,
|
/datum/admins/proc/quick_nif, //VOREStation Add,
|
||||||
|
/datum/admins/proc/assistant_ratio, //VOREStation Add,
|
||||||
/datum/admins/proc/sendFax
|
/datum/admins/proc/sendFax
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -30,3 +30,18 @@
|
|||||||
|
|
||||||
log_and_message_admins("[key_name(src)] Quick NIF'd [H.real_name].")
|
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!
|
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,"<span class='warning'>Assistant ratio enforcement isn't even turned on...</span>")
|
||||||
|
return
|
||||||
|
|
||||||
|
config.assistants_ratio *= -1
|
||||||
|
to_chat(usr,"<span class='notice'>Assistant ratio enforcement now [config.assistants_ratio > 0 ? "<b>en</b>abled" : "<b>dis</b>abled"].</span>")
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
to_chat(src,"<span class='warning'>Your custom species is not playable. Reconfigure your traits on the VORE tab.</span>")
|
to_chat(src,"<span class='warning'>Your custom species is not playable. Reconfigure your traits on the VORE tab.</span>")
|
||||||
|
|
||||||
//Assistant ratio enforcement
|
//Assistant ratio enforcement
|
||||||
if (config.assistants_ratio)
|
if (config.assistants_ratio > 0) //Stored as a negative number when inactive by admin verb
|
||||||
|
|
||||||
var/nonassistants = 0
|
var/nonassistants = 0
|
||||||
var/assistants = 0
|
var/assistants = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user