Cleans up and adds more concise admin logging to the centcom podlauncher (#40696)

* shoutout to spacemaniac and qusdtyu

* slight yeets

* slight grammer fixes

* yes

* asdf

* yikes

* fixes

* ok this should be better

* key_name

* begone, proc overhead
This commit is contained in:
MrDoomBringer
2018-10-23 08:45:19 -04:00
committed by yogstation13-bot
parent 4164f795b9
commit ba1ab608a7
3 changed files with 329 additions and 5 deletions

View File

@@ -1283,8 +1283,7 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
pod.damage = 40
pod.explosionSize = list(0,0,0,2)
pod.effectStun = TRUE
if (isnull(target_path))
alert("ERROR: NULL path given.")
if (isnull(target_path)) //The user pressed "Cancel"
return
if (target_path != "empty")//if you didn't type empty, we want to load the pod with a delivery
var/delivery = text2path(target_path)
@@ -1292,6 +1291,7 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
delivery = pick_closest_path(target_path)
if(!delivery)
alert("ERROR: Incorrect / improper path given.")
return
new delivery(pod)
new /obj/effect/DPtarget(get_turf(target), pod)
if(ADMIN_PUNISHMENT_SUPPLYPOD)
@@ -1306,17 +1306,27 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
plaunch.temp_pod.explosionSize = list(0,0,0,2)
plaunch.temp_pod.effectStun = TRUE
plaunch.ui_interact(usr)
return //We return here because punish_log() is handled by the centcom_podlauncher datum
if(ADMIN_PUNISHMENT_MAZING)
if(!puzzle_imprison(target))
to_chat(usr,"<span class='warning'>Imprisonment failed!</span>")
return
<<<<<<< HEAD
var/msg = "[key_name(usr)] punished [key_name(target)] with [punishment]." // yogs - Yog Tickets
message_admins(msg)
admin_ticket_log(target, msg)
log_admin("[key_name(usr)] punished [key_name(target)] with [punishment].")
=======
punish_log(target, punishment)
>>>>>>> 62529acdde... Cleans up and adds more concise admin logging to the centcom podlauncher (#40696)
/client/proc/punish_log(var/whom, var/punishment)
var/msg = "[key_name_admin(usr)] punished [key_name_admin(whom)] with [punishment]."
message_admins(msg)
admin_ticket_log(whom, msg)
log_admin("[key_name(usr)] punished [key_name(whom)] with [punishment].")
/client/proc/trigger_centcom_recall()
if(!check_rights(R_ADMIN))