Antagonist reputation system

This commit is contained in:
Sirenfal
2018-03-01 19:38:49 -05:00
committed by CitadelStationBot
parent 3690cf3309
commit 44dc6ac3a0
29 changed files with 252 additions and 20 deletions

View File

@@ -47,6 +47,52 @@
admin_ticket_log(M, msg)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Subtle Message") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_mod_antag_rep(client/C in GLOB.clients, var/operation)
set category = "Special Verbs"
set name = "Modify Antagonist Reputation"
if(!check_rights(R_ADMIN))
return
var/msg = ""
var/log_text = ""
if(operation == "zero")
log_text = "Set to 0"
SSpersistence.antag_rep -= C.ckey
else
var/prompt = "Please enter the amount of reputation to [operation]:"
if(operation == "set")
prompt = "Please enter the new reputation value:"
msg = input("Message:", prompt) as num
if (!msg)
return
var/ANTAG_REP_MAXIMUM = CONFIG_GET(number/antag_rep_maximum)
if(operation == "set")
log_text = "Set to [num2text(msg)]"
SSpersistence.antag_rep[C.ckey] = max(0, min(msg, ANTAG_REP_MAXIMUM))
else if(operation == "add")
log_text = "Added [num2text(msg)]"
SSpersistence.antag_rep[C.ckey] = min(SSpersistence.antag_rep[C.ckey]+msg, ANTAG_REP_MAXIMUM)
else if(operation == "subtract")
log_text = "Subtracted [num2text(msg)]"
SSpersistence.antag_rep[C.ckey] = max(SSpersistence.antag_rep[C.ckey]-msg, 0)
else
to_chat(src, "Invalid operation for antag rep modification: [operation] by user [key_name(usr)]")
return
if(SSpersistence.antag_rep[C.ckey] <= 0)
SSpersistence.antag_rep -= C.ckey
log_admin("[key_name(usr)]: Modified [key_name(C)]'s antagonist reputation [log_text]")
message_admins("<span class='adminnotice'>[key_name_admin(usr)]: Modified [key_name(C)]'s antagonist reputation ([log_text])</span>")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Modify Antagonist Reputation") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_world_narrate()
set category = "Special Verbs"
set name = "Global Narrate"