From d969552a190f2a2c6b58b1cea2771d9c5f251665 Mon Sep 17 00:00:00 2001 From: Helg2 Date: Wed, 23 Oct 2024 14:01:38 +0300 Subject: [PATCH] delete gun greyscale configs --- code/__DEFINES/greyscale_guns.dm | 6 -- .../greyscale/json_configs/attachments.json | 54 ------------- .../json_configs/attachments_64.json | 46 ----------- code/datums/greyscale/json_configs/gun.json | 79 ------------------- .../greyscale/json_configs/gun_fire.json | 35 -------- .../greyscale/json_configs/gun_hands.json | 24 ------ .../greyscale/json_configs/gun_mob.json | 13 --- .../greyscale/json_configs/gun_revolver.json | 47 ----------- .../greyscale/json_configs/gun_shotgun.json | 46 ----------- code/game/objects/items/cosmetics.dm | 17 ++-- code/modules/projectiles/gun_system.dm | 15 +--- 11 files changed, 12 insertions(+), 370 deletions(-) delete mode 100644 code/datums/greyscale/json_configs/attachments.json delete mode 100644 code/datums/greyscale/json_configs/attachments_64.json delete mode 100644 code/datums/greyscale/json_configs/gun.json delete mode 100644 code/datums/greyscale/json_configs/gun_fire.json delete mode 100644 code/datums/greyscale/json_configs/gun_hands.json delete mode 100644 code/datums/greyscale/json_configs/gun_mob.json delete mode 100644 code/datums/greyscale/json_configs/gun_revolver.json delete mode 100644 code/datums/greyscale/json_configs/gun_shotgun.json diff --git a/code/__DEFINES/greyscale_guns.dm b/code/__DEFINES/greyscale_guns.dm index a6396f9350c..fcfeb35e883 100644 --- a/code/__DEFINES/greyscale_guns.dm +++ b/code/__DEFINES/greyscale_guns.dm @@ -6,12 +6,6 @@ #define AMMO_BAND_COLOR_EXPLOSIVE "#3f1111" #define AMMO_BAND_COLOR_SABOT "#663618" -#define GUN_ICONSTATE_LOADED "loaded" -#define GUN_ICONSTATE_UNLOADED "unloaded" -#define GUN_ICONSTATE_UNRACKED "unracked" -#define GUN_ICONSTATE_OPEN "open" -#define GUN_ICONSTATE_PUMP "pump" - #define GUN_PALETTE_TAN "#3F382E#61574A#807360#978872" #define GUN_PALETTE_RED "#421010#601e1e#762525#9b3a28" #define GUN_PALETTE_DARK_RED "#301a1d#422628#5d3839#815150" diff --git a/code/datums/greyscale/json_configs/attachments.json b/code/datums/greyscale/json_configs/attachments.json deleted file mode 100644 index 40f151503a0..00000000000 --- a/code/datums/greyscale/json_configs/attachments.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "verticalgrip":[ - { - "type":"hyperscale", - "icon_state":"verticalgrip" - } - ], - "verticalgrip_a":[ - { - "type":"hyperscale", - "icon_state":"verticalgrip_a" - } - ], - "angledgrip":[ - { - "type":"hyperscale", - "icon_state":"angledgrip" - } - ], - "angledgrip_a":[ - { - "type":"hyperscale", - "icon_state":"angledgrip_a" - } - ], - "t60stock_a":[ - { - "type":"hyperscale", - "icon_state":"t60stock_a" - }, - { - "type":"icon_state", - "icon_state":"t60stock_no_color_a", - "blend_mode":"overlay" - } - ], - "tl127stock_a":[ - { - "type":"hyperscale", - "icon_state":"tl127stock_a" - }, - { - "type":"icon_state", - "icon_state":"tl127stock_no_color_a", - "blend_mode":"overlay" - } - ], - "sg29stock_a":[ - { - "type":"hyperscale", - "icon_state":"sg29stock_a" - } - ] -} diff --git a/code/datums/greyscale/json_configs/attachments_64.json b/code/datums/greyscale/json_configs/attachments_64.json deleted file mode 100644 index 34434035f02..00000000000 --- a/code/datums/greyscale/json_configs/attachments_64.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "t35stock":[ - { - "type":"hyperscale", - "icon_state":"t35stock_color" - }, - { - "type":"icon_state", - "icon_state":"t35stock", - "blend_mode":"overlay" - } - ], - "t35stock_a":[ - { - "type":"hyperscale", - "icon_state":"t35stock_color" - }, - { - "type":"icon_state", - "icon_state":"t35stock_a", - "blend_mode":"overlay" - } - ], - "t35stock_open":[ - { - "type":"hyperscale", - "icon_state":"t35stock_color" - }, - { - "type":"icon_state", - "icon_state":"t35stock_open", - "blend_mode":"overlay" - } - ], - "t35stock_open_a":[ - { - "type":"hyperscale", - "icon_state":"t35stock_color" - }, - { - "type":"icon_state", - "icon_state":"t35stock_open_a", - "blend_mode":"overlay" - } - ] -} diff --git a/code/datums/greyscale/json_configs/gun.json b/code/datums/greyscale/json_configs/gun.json deleted file mode 100644 index f36537ef47a..00000000000 --- a/code/datums/greyscale/json_configs/gun.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "loaded":[ - { - "type":"hyperscale", - "icon_state":"colored" - }, - { - "type":"icon_state", - "icon_state":"loaded", - "blend_mode":"overlay" - } - ], - "loaded_fire":[ - { - "type":"hyperscale", - "icon_state":"colored" - }, - { - "type":"icon_state", - "icon_state":"fire", - "blend_mode":"overlay" - } - ], - "unloaded":[ - { - "type":"hyperscale", - "icon_state":"colored" - }, - { - "type":"icon_state", - "icon_state":"unloaded", - "blend_mode":"overlay" - } - ], - "belt":[ - { - "type":"hyperscale", - "icon_state":"belt_color" - }, - { - "type":"icon_state", - "icon_state":"belt_no_color", - "blend_mode":"overlay" - } - ], - "loaded_l":[ - { - "type":"hyperscale", - "icon_state":"colored" - }, - { - "type":"icon_state", - "icon_state":"linked", - "blend_mode":"overlay" - } - ], - "loaded_a":[ - { - "type":"hyperscale", - "icon_state":"colored_a" - }, - { - "type":"icon_state", - "icon_state":"loaded_a", - "blend_mode":"overlay" - } - ], - "unloaded_a":[ - { - "type":"hyperscale", - "icon_state":"colored_a" - }, - { - "type":"icon_state", - "icon_state":"unloaded_a", - "blend_mode":"overlay" - } - ] -} diff --git a/code/datums/greyscale/json_configs/gun_fire.json b/code/datums/greyscale/json_configs/gun_fire.json deleted file mode 100644 index af62066e45a..00000000000 --- a/code/datums/greyscale/json_configs/gun_fire.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "loaded":[ - { - "type":"hyperscale", - "icon_state":"colored" - }, - { - "type":"icon_state", - "icon_state":"loaded", - "blend_mode":"overlay" - } - ], - "loaded_fire":[ - { - "type":"hyperscale", - "icon_state":"colored" - }, - { - "type":"icon_state", - "icon_state":"fire", - "blend_mode":"overlay" - } - ], - "unloaded":[ - { - "type":"hyperscale", - "icon_state":"colored" - }, - { - "type":"icon_state", - "icon_state":"unloaded", - "blend_mode":"overlay" - } - ] -} diff --git a/code/datums/greyscale/json_configs/gun_hands.json b/code/datums/greyscale/json_configs/gun_hands.json deleted file mode 100644 index 9cdfc6e047a..00000000000 --- a/code/datums/greyscale/json_configs/gun_hands.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "loaded":[ - { - "type":"hyperscale", - "icon_state":"color" - }, - { - "type":"icon_state", - "icon_state":"no_color", - "blend_mode":"overlay" - } - ], - "loaded_w":[ - { - "type":"hyperscale", - "icon_state":"color_w" - }, - { - "type":"icon_state", - "icon_state":"no_color_w", - "blend_mode":"overlay" - } - ] -} diff --git a/code/datums/greyscale/json_configs/gun_mob.json b/code/datums/greyscale/json_configs/gun_mob.json deleted file mode 100644 index ec509495346..00000000000 --- a/code/datums/greyscale/json_configs/gun_mob.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "loaded":[ - { - "type":"hyperscale", - "icon_state":"color" - }, - { - "type":"icon_state", - "icon_state":"no_color", - "blend_mode":"overlay" - } - ] -} diff --git a/code/datums/greyscale/json_configs/gun_revolver.json b/code/datums/greyscale/json_configs/gun_revolver.json deleted file mode 100644 index 68e4f0c4441..00000000000 --- a/code/datums/greyscale/json_configs/gun_revolver.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "loaded":[ - { - "type":"hyperscale", - "icon_state":"colored" - }, - { - "type":"icon_state", - "icon_state":"loaded", - "blend_mode":"overlay" - } - ], - "unloaded":[ - { - "type":"hyperscale", - "icon_state":"colored" - }, - { - "type":"icon_state", - "icon_state":"unloaded", - "blend_mode":"overlay" - } - - ], - "open":[ - { - "type":"hyperscale", - "icon_state":"colored" - }, - { - "type":"icon_state", - "icon_state":"open", - "blend_mode":"overlay" - } - ], - "belt":[ - { - "type":"hyperscale", - "icon_state":"belt_color" - }, - { - "type":"icon_state", - "icon_state":"belt_no_color", - "blend_mode":"overlay" - } - ] -} diff --git a/code/datums/greyscale/json_configs/gun_shotgun.json b/code/datums/greyscale/json_configs/gun_shotgun.json deleted file mode 100644 index 5a52f581fce..00000000000 --- a/code/datums/greyscale/json_configs/gun_shotgun.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "loaded":[ - { - "type":"hyperscale", - "icon_state":"colored" - }, - { - "type":"icon_state", - "icon_state":"loaded", - "blend_mode":"overlay" - } - ], - "unloaded":[ - { - "type":"hyperscale", - "icon_state":"colored_unloaded" - }, - { - "type":"icon_state", - "icon_state":"unloaded", - "blend_mode":"overlay" - } - ], - "unracked":[ - { - "type":"hyperscale", - "icon_state":"colored" - }, - { - "type":"icon_state", - "icon_state":"unprimed", - "blend_mode":"overlay" - } - ], - "pump":[ - { - "type":"hyperscale", - "icon_state":"colored_pump" - }, - { - "type":"icon_state", - "icon_state":"pump", - "blend_mode":"overlay" - } - ] -} diff --git a/code/game/objects/items/cosmetics.dm b/code/game/objects/items/cosmetics.dm index 6dc713c188a..34f5077f0e6 100644 --- a/code/game/objects/items/cosmetics.dm +++ b/code/game/objects/items/cosmetics.dm @@ -4,8 +4,8 @@ desc = "A kit designed for customizing various pieces of armor and clothing. Comes with facepaint!" icon = 'icons/obj/items/cosmetics.dmi' icon_state = "camo" - var/colour = "green" w_class = WEIGHT_CLASS_TINY + var/colour = "green" var/uses = 100 /obj/item/facepaint/green @@ -46,22 +46,21 @@ return if(H == user) paint_face(H, user) - return 1 + return TRUE else to_chat(user, span_notice("You attempt to apply [src] on [H]...")) to_chat(H, span_notice("[user] is trying to apply [src] on your face...")) - if(tgui_alert(H, "Will you allow [user] to paint your face?", null, list("Sure","No")) == "Sure") - if( user && loc == user && (user in range(1,H)) ) //Have to be close and hold the thing. - paint_face(H, user) - return 1 + if(tgui_alert(H, "Will you allow [user] to paint your face?", null, list("Sure","No")) != "Sure") + return + if(user && loc == user && (user in range(1, H))) //Have to be close and hold the thing. + paint_face(H, user) + return TRUE to_chat(user, span_warning("Foiled!")) - /obj/item/facepaint/proc/paint_face(mob/living/carbon/human/H, mob/user) if(!H || !user) return //In case they're passed as null. - user.visible_message(span_notice("[user] carefully applies [src] on [H]'s face."), \ - span_notice("You apply [src].")) + user.visible_message(span_notice("[user] carefully applies [src] on [H]'s face."), span_notice("You apply [src].")) H.lip_style = colour H.alpha = max(0, initial(H.alpha) - 1) // decreases your alpha by 1 H.update_body() diff --git a/code/modules/projectiles/gun_system.dm b/code/modules/projectiles/gun_system.dm index 41798b51fe2..30438dd3199 100644 --- a/code/modules/projectiles/gun_system.dm +++ b/code/modules/projectiles/gun_system.dm @@ -520,22 +520,15 @@ . = ..() var/real_icon = current_skin ? current_skin : base_gun_icon if(CHECK_BITFIELD(reciever_flags, AMMO_RECIEVER_TOGGLES_OPEN) && !CHECK_BITFIELD(reciever_flags, AMMO_RECIEVER_CLOSED)) - icon_state = !greyscale_config ? real_icon + "_o" : GUN_ICONSTATE_OPEN + icon_state = real_icon + "_o" else if(CHECK_BITFIELD(reciever_flags, AMMO_RECIEVER_REQUIRES_UNIQUE_ACTION) && !in_chamber && length(chamber_items)) - icon_state = !greyscale_config ? real_icon + "_u" : GUN_ICONSTATE_UNRACKED + icon_state = real_icon + "_u" else if((!length(chamber_items) && max_chamber_items) || (!rounds && !max_chamber_items)) - icon_state = !greyscale_config ? real_icon + "_e" : GUN_ICONSTATE_UNLOADED + icon_state = real_icon + "_e" else if(current_chamber_position <= length(chamber_items) && chamber_items[current_chamber_position] && chamber_items[current_chamber_position].loc != src) icon_state = real_icon + "_l" else - icon_state = !greyscale_config ? real_icon : GUN_ICONSTATE_LOADED - -/obj/item/weapon/gun/color_item(obj/item/facepaint/paint, mob/user) - . = ..() - if(!ishuman(user)) - return - var/mob/living/carbon/human/human = user - human.regenerate_icons() + icon_state = real_icon //manages the overlays for the gun - separate from attachment overlays /obj/item/weapon/gun/update_overlays()