From 0e7bfa8b0f5a796929b8285823fe171c5feba0bd Mon Sep 17 00:00:00 2001 From: Julien Date: Thu, 15 Feb 2024 15:13:56 +0100 Subject: [PATCH] trying something cross finger --- code/modules/clothing/suits/marine_armor.dm | 37 ++++++++++++++++----- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/code/modules/clothing/suits/marine_armor.dm b/code/modules/clothing/suits/marine_armor.dm index d234e42626d9..e0c9529345ac 100644 --- a/code/modules/clothing/suits/marine_armor.dm +++ b/code/modules/clothing/suits/marine_armor.dm @@ -1895,7 +1895,7 @@ //proc that allow to repaint/change sprite for -GLOBAL_LIST_INIT(armor_paints, list("padded" = "L1", "padless" = "L2", "padless_lines" = "L3", "carrier" = "L4", "skull" = "L5", "smooth" = "L6")) +GLOBAL_LIST_INIT(armor_paints_light, list("padded" = "L1", "padless" = "L2", "padless_lines" = "L3", "carrier" = "L4", "skull" = "L5", "smooth" = "L6")) GLOBAL_LIST_INIT(armor_paints_medium, list("padded" = "1", "padless" = "2", "padless_lines" = "3", "carrier" = "4", "skull" = "5", "smooth" = "6")) GLOBAL_LIST_INIT(armor_paints_heavy, list("padded" = "H1", "padless" = "H2", "padless_lines" = "H3", "carrier" = "H4", "skull" = "H5", "smooth" = "H6")) /obj/item/device/armor_painter @@ -1903,15 +1903,29 @@ GLOBAL_LIST_INIT(armor_paints_heavy, list("padded" = "H1", "padless" = "H2", "pa icon = 'icons/obj/items/paper.dmi' icon_state = "labeler1" item_state = "flight" - var/list/modes + var/list/modes_light + var/list/modes_medium + var/list/modes_heavy var/mode /obj/item/device/armor_painter/New() ..() - modes = new() + + modes_light = new() for(var/C in GLOB.armor_paints) - modes += "[C]" - mode = pick(modes) + modes_light += "[C]" + mode = pick(modes_light) + + modes_medium = new() + for(var/C in GLOB.armor_paints_medium) + modes_medium += "[C]" + mode = pick(modes_medium) + + modes_heavy = new() + for(var/C in GLOB.armor_paints_heavy) + modes_heavy += "[C]" + mode = pick(modes_heavy) + /obj/item/device/armor_painter/afterattack(atom/A, mob/user as mob, proximity) if(!proximity) @@ -1924,11 +1938,11 @@ GLOBAL_LIST_INIT(armor_paints_heavy, list("padded" = "H1", "padless" = "H2", "pa if(istype(A,/obj/item/clothing/suit/storage/marine/light)) to_chat(user, "it's an light armor.") - A.icon_state = (GLOB.armor_paints[mode]) + A.icon_state = (GLOB.armor_paints_light[mode]) return if(istype(A,/obj/item/clothing/suit/storage/marine/medium)) - to_chat(user, "it's an meduim armor.") + to_chat(user, "it's an medium armor.") A.icon_state = (GLOB.armor_paints_medium[mode]) return @@ -1939,7 +1953,14 @@ GLOBAL_LIST_INIT(armor_paints_heavy, list("padded" = "H1", "padless" = "H2", "pa /obj/item/device/armor_painter/attack_self(mob/user) ..() - mode = tgui_input_list(usr, "Which armor tag do you want to use?", "Armor painter", modes) + var/type = tgui_input_list(usr, "What type of armor?", "Armor painter", list("light", "medium", "heavy")) + switch(type) + if("light") + mode = tgui_input_list(usr, "Which armor tag do you want to use?", "Armor painter", modes_light) + if("medium") + mode = tgui_input_list(usr, "Which armor tag do you want to use?", "Armor painter", modes_medium) + if("heavy") + mode = tgui_input_list(usr, "Which armor tag do you want to use?", "Armor painter", modes_heavy) /obj/item/device/armor_painter/get_examine_text(mob/user) . = ..()