This commit is contained in:
LetterJay
2017-06-10 09:42:08 -05:00
parent eac4854adf
commit 47687a6d1a
5 changed files with 21 additions and 27 deletions
@@ -85,6 +85,7 @@
item_color = "bronze"
materials = list(MAT_METAL=1000)
resistance_flags = FIRE_PROOF
var/commended = FALSE
//Pinning medals on people
/obj/item/clothing/accessory/medal/attack(mob/living/carbon/human/M, mob/living/user)
@@ -103,6 +104,9 @@
else
user.visible_message("[user] is trying to pin [src] on [M]'s chest.", \
"<span class='notice'>You try to pin [src] on [M]'s chest.</span>")
var/input
if(!commended && user != M)
input = stripped_input(user,"Please input a reason for this commendation, it will be recorded by Nanotrasen.", ,"", 140)
if(do_after(user, delay, target = M))
if(U.attach_accessory(src, user, 0)) //Attach it, do not notify the user of the attachment
if(user == M)
@@ -110,6 +114,12 @@
else
user.visible_message("[user] pins \the [src] on [M]'s chest.", \
"<span class='notice'>You pin \the [src] on [M]'s chest.</span>")
if(input)
SSblackbox.add_details("commendation", json_encode(list("commender" = "[user.real_name]", "commendee" = "[M.real_name]", "medal" = "[src]", "reason" = input)))
GLOB.commendations += "[user.real_name] awarded <b>[M.real_name]</b> the <font color='blue'>[name]</font>! \n- [input]"
commended = TRUE
log_game("<b>[key_name(M)]</b> was given the following commendation by <b>[key_name(user)]</b>: [input]")
message_admins("<b>[key_name(M)]</b> was given the following commendation by <b>[key_name(user)]</b>: [input]")
else to_chat(user, "<span class='warning'>Medals can only be pinned on jumpsuits!</span>")
else ..()
+3 -2
View File
@@ -46,8 +46,9 @@ Captain
dufflebag = /obj/item/weapon/storage/backpack/dufflebag/captain
implants = list(/obj/item/weapon/implant/mindshield)
accessory = /obj/item/clothing/accessory/medal/gold/captain
accessory = /obj/item/clothing/accessory/medal/gold/captain
/*
Head of Personnel
*/