From aeaad4631b8d4dd6792154196c3ed0bd64882b39 Mon Sep 17 00:00:00 2001 From: Supermichael777 Date: Tue, 7 Feb 2017 00:19:29 -0500 Subject: [PATCH] til how action buttons work --- code/modules/clothing/masks/gasmask.dm | 40 ++++++++++++++------------ 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index 448a4b74d53..8cbc9395f68 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -99,26 +99,28 @@ flags_cover = MASKCOVERSEYES resistance_flags = FLAMMABLE actions_types = list(/datum/action/item_action/adjust) + -/obj/item/clothing/mask/gas/mime/attack_self(mob/user) - cycle_mask(user) +/obj/item/clothing/mask/gas/mime/ui_action_click(mob/user) + if(!istype(user) || user.incapacitated()) + return -/obj/item/clothing/mask/gas/mime/proc/cycle_mask(mob/user) - switch(icon_state) - if("mime") - icon_state = "sadmime" - if("sadmime") - icon_state = "scaredmime" - if("scaredmime") - icon_state = "sexymime" - if("sexymime") - icon_state = "mime" - user.update_inv_wear_mask() - for(var/X in actions) - var/datum/action/A = X - A.UpdateButtonIcon() - user << "You adjust your mask to portray a different emotion." - return 1 + var/list/options = list() + options["Blanc"] = "mime" + options["Triste"] = "sadmime" + options["Effrayé"] = "scaredmime" + options["Excité"] ="sexymime" + + var/choice = input(user,"To what form do you wish to Morph this mask?","Morph Mask") in options + + if(src && choice && !user.incapacitated() && in_range(user,src)) + icon_state = options[choice] + user.update_inv_wear_mask() + for(var/X in actions) + var/datum/action/A = X + A.UpdateButtonIcon() + user << "Your Mime Mask has now morphed into [choice]!" + return 1 /obj/item/clothing/mask/gas/monkeymask name = "monkey mask" @@ -170,6 +172,7 @@ resistance_flags = FLAMMABLE obj_integrity = 100 max_integrity = 100 + actions_types = list(/datum/action/item_action/adjust) dog_fashion = null @@ -186,7 +189,6 @@ obj/item/clothing/mask/gas/tiki_mask/ui_action_click(mob/user) if(src && choice && !M.stat && in_range(M,src)) icon_state = options[choice] - item_state = options[choice] user.update_inv_wear_mask() for(var/X in actions) var/datum/action/A = X