From e0802a5d69ddd091f3719c6bb5a497b5d101820b Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Fri, 20 Dec 2013 22:05:34 -0500 Subject: [PATCH] Horsehead Mask update --- code/modules/clothing/masks/miscellaneous.dm | 32 +++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/code/modules/clothing/masks/miscellaneous.dm b/code/modules/clothing/masks/miscellaneous.dm index 190ff58bd44..e1f82ae5d39 100644 --- a/code/modules/clothing/masks/miscellaneous.dm +++ b/code/modules/clothing/masks/miscellaneous.dm @@ -89,6 +89,7 @@ w_class = 2 siemens_coefficient = 0.9 + /obj/item/clothing/mask/horsehead name = "horse head mask" desc = "A mask made of soft vinyl and latex, representing the head of a horse." @@ -97,5 +98,34 @@ flags = FPRINT|TABLEPASS|BLOCKHAIR flags_inv = HIDEFACE w_class = 2 - var/voicechange = 0 siemens_coefficient = 0.9 + var/voicechange = 0 + var/temporaryname = " the Horse" + var/originalname = "" + + + +/obj/item/clothing/mask/horsehead/equipped(mob/user, slot) + if(!canremove) //cursed masks only + originalname = user.real_name + if(!user.real_name || user.real_name == "Unknown") + user.real_name = "A Horse With No Name" //it felt good to be out of the rain + else + user.real_name = "[user.name][temporaryname]" + ..() + +/obj/item/clothing/mask/horsehead/dropped() //this really shouldn't happen, but call it extreme caution + if(!canremove) + goodbye_horses(loc) + ..() + +/obj/item/clothing/mask/horsehead/Del() + if(!canremove) + goodbye_horses(loc) + ..() + +/obj/item/clothing/mask/horsehead/proc/goodbye_horses(mob/user) //I'm flying over you + if(!ismob(user)) + return + if(user.real_name == "[originalname][temporaryname]" || user.real_name == "A Horse With No Name") //if it's somehow changed while the mask is on it doesn't revert + user.real_name = originalname