diff --git a/code/__HELPERS/icons.dm b/code/__HELPERS/icons.dm index c5806014c53..71608bc5f72 100644 --- a/code/__HELPERS/icons.dm +++ b/code/__HELPERS/icons.dm @@ -995,9 +995,9 @@ GLOBAL_LIST_EMPTY(friendly_animal_types) icon_state = thing.icon_state //Despite casting to atom, this code path supports mutable appearances, so let's be nice to them if(isnull(icon_state) || (isatom(thing) && thing.flags_1 & HTML_USE_INITAL_ICON_1)) - icon_state = initial(thing.icon_state) + icon_state = thing::post_init_icon_state || thing::icon_state if (isnull(dir)) - dir = initial(thing.dir) + dir = thing::dir if (isnull(dir)) dir = thing.dir diff --git a/code/controllers/subsystem/processing/greyscale.dm b/code/controllers/subsystem/processing/greyscale.dm index 0b7b4d3b66e..4b77aa3e7b4 100644 --- a/code/controllers/subsystem/processing/greyscale.dm +++ b/code/controllers/subsystem/processing/greyscale.dm @@ -78,7 +78,7 @@ PROCESSING_SUBSYSTEM_DEF(greyscale) var/cached_file = gags_cache[uid] if(cached_file) return cached_file - var/output_path = "tmp/gags/gags-[uid].dmi" + var/output_path = "tmp/gags/icons/gags-[uid].dmi" var/iconforge_output = rustg_iconforge_gags(type, colors, output_path) // Handle errors from IconForge if(iconforge_output != "OK") diff --git a/code/datums/elements/gags_recolorable.dm b/code/datums/elements/gags_recolorable.dm index c59b314ee96..3802492bc3b 100644 --- a/code/datums/elements/gags_recolorable.dm +++ b/code/datums/elements/gags_recolorable.dm @@ -5,25 +5,28 @@ . = ..() if(!isatom(target)) return ELEMENT_INCOMPATIBLE - RegisterSignal(target, COMSIG_ATOM_ATTACKBY, PROC_REF(on_attackby)) + RegisterSignal(target, COMSIG_ATOM_ITEM_INTERACTION, PROC_REF(on_item_interaction)) RegisterSignal(target, COMSIG_ATOM_EXAMINE_MORE, PROC_REF(on_examine)) /datum/element/gags_recolorable/proc/on_examine(atom/source, mob/user, list/examine_text) SIGNAL_HANDLER examine_text += span_notice("Now utilising PPP recolouring technology, capable of absorbing paint and pigments for changing its colours!") -/datum/element/gags_recolorable/proc/on_attackby(datum/source, obj/item/attacking_item, mob/user) +/datum/element/gags_recolorable/proc/on_item_interaction(atom/movable/source, mob/living/user, obj/item/toy/crayon/spraycan/item, modifiers) SIGNAL_HANDLER - if(!istype(attacking_item, /obj/item/toy/crayon/spraycan)) - return - var/obj/item/toy/crayon/spraycan/can = attacking_item + if(!istype(item)) + return NONE - if(can.is_capped || can.check_empty()) - return + if(item.is_capped) + user.balloon_alert(user, "take the cap off first!") + return ITEM_INTERACT_BLOCKING + if(item.check_empty()) + user.balloon_alert(user, "empty!") + return ITEM_INTERACT_BLOCKING - INVOKE_ASYNC(src, PROC_REF(open_ui), user, can, source) - return COMPONENT_NO_AFTERATTACK + INVOKE_ASYNC(src, PROC_REF(open_ui), user, item, source) + return ITEM_INTERACT_SUCCESS /datum/element/gags_recolorable/proc/open_ui(mob/user, obj/item/toy/crayon/spraycan/can, atom/target) var/list/allowed_configs = list() @@ -42,7 +45,7 @@ var/datum/greyscale_modify_menu/spray_paint/menu = new( target, user, allowed_configs, CALLBACK(src, PROC_REF(recolor), user, can, target), - starting_icon_state = initial(target.icon_state), + starting_icon_state = target::post_init_icon_state || target::icon_state, starting_config = initial(target.greyscale_config), starting_colors = target.greyscale_colors, used_spraycan = can, diff --git a/code/datums/greyscale/json_configs/screwdriver.json b/code/datums/greyscale/json_configs/screwdriver.json index 9c4317a67e1..e58516dfed8 100644 --- a/code/datums/greyscale/json_configs/screwdriver.json +++ b/code/datums/greyscale/json_configs/screwdriver.json @@ -1,5 +1,5 @@ { - "screwdriver_map": [ + "screwdriver": [ { "type": "icon_state", "icon_state": "screwdriver", diff --git a/code/game/objects/items/cigarettes.dm b/code/game/objects/items/cigarettes.dm index a3291b85d4a..7ed9353c073 100644 --- a/code/game/objects/items/cigarettes.dm +++ b/code/game/objects/items/cigarettes.dm @@ -1170,9 +1170,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM flags_1 = NONE /obj/item/vape/black - icon_state = "/obj/item/vape/black" greyscale_colors = "#2e2e2e" - flags_1 = NONE + flags_1 = NO_NEW_GAGS_PREVIEW_1 // same color as basetype /obj/item/vape/white icon_state = "/obj/item/vape/white" diff --git a/code/game/objects/items/debug_items.dm b/code/game/objects/items/debug_items.dm index e52cced51bf..6d44b1e00f1 100644 --- a/code/game/objects/items/debug_items.dm +++ b/code/game/objects/items/debug_items.dm @@ -60,7 +60,7 @@ var/list/tool_list = list( "Crowbar" = image(icon = 'icons/obj/tools.dmi', icon_state = "crowbar"), "Multitool" = image(icon = 'icons/obj/devices/tool.dmi', icon_state = "multitool"), - "Screwdriver" = image(icon = 'icons/obj/tools.dmi', icon_state = "screwdriver_map"), + "Screwdriver" = image(icon = 'icons/map_icons/items/_item.dmi', icon_state = "/obj/item/screwdriver"), "Wirecutters" = image(icon = 'icons/obj/tools.dmi', icon_state = "cutters_map"), "Wrench" = image(icon = 'icons/obj/tools.dmi', icon_state = "wrench"), "Welding Tool" = image(icon = 'icons/obj/tools.dmi', icon_state = "miniwelder"), diff --git a/code/game/objects/items/theft_tools.dm b/code/game/objects/items/theft_tools.dm index 66546a91672..ab9acd207a9 100644 --- a/code/game/objects/items/theft_tools.dm +++ b/code/game/objects/items/theft_tools.dm @@ -88,11 +88,13 @@ desc = "A screwdriver with an ultra thin tip that's carefully designed to boost screwing speed." icon = 'icons/obj/antags/syndicate_tools.dmi' icon_state = "screwdriver_nuke" + post_init_icon_state = null inhand_icon_state = "screwdriver_nuke" toolspeed = 0.5 random_color = FALSE greyscale_config_inhand_left = null greyscale_config_inhand_right = null + greyscale_colors = null /obj/item/screwdriver/nuke/get_belt_overlay() return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "screwdriver_nuke") diff --git a/code/game/objects/items/tools/screwdriver.dm b/code/game/objects/items/tools/screwdriver.dm index 143bd63cfd0..e1b644a08cc 100644 --- a/code/game/objects/items/tools/screwdriver.dm +++ b/code/game/objects/items/tools/screwdriver.dm @@ -1,8 +1,9 @@ /obj/item/screwdriver name = "screwdriver" desc = "You can be totally screwy with this." - icon = 'icons/obj/tools.dmi' - icon_state = "screwdriver_map" + icon = 'icons/map_icons/items/_item.dmi' + icon_state = "/obj/item/screwdriver" + post_init_icon_state = "screwdriver" inhand_icon_state = "screwdriver" worn_icon_state = "screwdriver" inside_belt_icon_state = "screwdriver" @@ -33,6 +34,7 @@ greyscale_config_inhand_left = /datum/greyscale_config/screwdriver_inhand_left greyscale_config_inhand_right = /datum/greyscale_config/screwdriver_inhand_right greyscale_config_belt = /datum/greyscale_config/screwdriver_belt + greyscale_colors = COLOR_TOOL_RED /// If the item should be assigned a random color var/random_color = TRUE /// List of possible random colors @@ -72,8 +74,10 @@ usesound = 'sound/items/pshoom/pshoom.ogg' toolspeed = 0.1 random_color = FALSE + greyscale_config = null greyscale_config_inhand_left = null greyscale_config_inhand_right = null + greyscale_colors = null /obj/item/screwdriver/abductor/get_belt_overlay() return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "screwdriver_alien") @@ -83,6 +87,7 @@ desc = "A simple powered hand drill." icon = 'icons/obj/tools.dmi' icon_state = "drill" + post_init_icon_state = null inside_belt_icon_state = null inhand_icon_state = "drill" worn_icon_state = "drill" @@ -104,6 +109,7 @@ greyscale_config_belt = null greyscale_config_inhand_left = null greyscale_config_inhand_right = null + greyscale_colors = null /obj/item/screwdriver/power/get_all_tool_behaviours() return list(TOOL_SCREWDRIVER, TOOL_WRENCH) @@ -152,14 +158,14 @@ desc = "A powerful automated screwdriver, designed to be both precise and quick." icon = 'icons/obj/items_cyborg.dmi' icon_state = "toolkit_engiborg_screwdriver" + post_init_icon_state = null hitsound = 'sound/items/tools/drill_hit.ogg' usesound = 'sound/items/tools/drill_use.ogg' toolspeed = 0.5 random_color = FALSE + greyscale_config = null + greyscale_colors = null /obj/item/screwdriver/red random_color = FALSE - -/obj/item/screwdriver/red/Initialize(mapload) - . = ..() - set_greyscale(colors=list(screwdriver_colors["red"])) + flags_1 = parent_type::flags_1 | NO_NEW_GAGS_PREVIEW_1 diff --git a/code/modules/asset_cache/assets/crafting.dm b/code/modules/asset_cache/assets/crafting.dm index 36c3c9f105a..6e2b082537f 100644 --- a/code/modules/asset_cache/assets/crafting.dm +++ b/code/modules/asset_cache/assets/crafting.dm @@ -55,7 +55,7 @@ var/list/tool_icons = list( TOOL_CROWBAR = uni_icon('icons/obj/tools.dmi', "crowbar"), TOOL_MULTITOOL = uni_icon('icons/obj/devices/tool.dmi', "multitool"), - TOOL_SCREWDRIVER = uni_icon('icons/obj/tools.dmi', "screwdriver_map"), + TOOL_SCREWDRIVER = uni_icon('icons/map_icons/items/_item.dmi', "/obj/item/screwdriver"), TOOL_WIRECUTTER = uni_icon('icons/obj/tools.dmi', "cutters_map"), TOOL_WRENCH = uni_icon('icons/obj/tools.dmi', "wrench"), TOOL_WELDER = uni_icon('icons/obj/tools.dmi', "welder"), diff --git a/code/modules/clothing/masks/bandana.dm b/code/modules/clothing/masks/bandana.dm index 304baa4a878..5eae31ad8e4 100644 --- a/code/modules/clothing/masks/bandana.dm +++ b/code/modules/clothing/masks/bandana.dm @@ -126,8 +126,7 @@ name = "black bandana" desc = "A fine black bandana with nanotech lining." greyscale_colors = "#2e2e2e" - flags_1 = parent_type::flags_1 | NO_NEW_GAGS_PREVIEW_1 // Same color as the basetype - flags_1 = NONE + flags_1 = NO_NEW_GAGS_PREVIEW_1 // Same color as the basetype /obj/item/clothing/mask/bandana/white name = "white bandana" @@ -159,8 +158,7 @@ /obj/item/clothing/mask/bandana/striped/black name = "striped bandana" desc = "A fine black and white bandana with nanotech lining and a stripe across." - flags_1 = parent_type::flags_1 | NO_NEW_GAGS_PREVIEW_1 // same exact icon/color as the base type - flags_1 = NONE + flags_1 = NO_NEW_GAGS_PREVIEW_1 // same exact icon/color as the base type /obj/item/clothing/mask/bandana/striped/security name = "striped security bandana" @@ -219,9 +217,8 @@ /obj/item/clothing/mask/bandana/skull/black desc = "A fine black bandana with nanotech lining and a skull emblem." - icon_state = "/obj/item/clothing/mask/bandana/skull/black" greyscale_colors = "#2e2e2e#C6C6C6" - flags_1 = NONE + flags_1 = NO_NEW_GAGS_PREVIEW_1 // same as the basetype /obj/item/clothing/mask/facescarf name = "facescarf" diff --git a/code/modules/clothing/under/jobs/security.dm b/code/modules/clothing/under/jobs/security.dm index f93ca808fbb..2730ed47a6d 100644 --- a/code/modules/clothing/under/jobs/security.dm +++ b/code/modules/clothing/under/jobs/security.dm @@ -247,6 +247,7 @@ desc = "Standardised Nanotrasen prisoner-wear. Its suit sensors are stuck in the \"OFF\" position." has_sensor = NO_SENSORS sensor_mode = SENSOR_OFF + flags_1 = parent_type::flags_1 | NO_NEW_GAGS_PREVIEW_1 /obj/item/clothing/under/rank/prisoner/skirt name = "prison jumpskirt" diff --git a/code/modules/mapfluff/ruins/spaceruin_code/caravanambush.dm b/code/modules/mapfluff/ruins/spaceruin_code/caravanambush.dm index cb99c2c8710..b765a7b4878 100644 --- a/code/modules/mapfluff/ruins/spaceruin_code/caravanambush.dm +++ b/code/modules/mapfluff/ruins/spaceruin_code/caravanambush.dm @@ -10,10 +10,13 @@ /obj/item/screwdriver/caravan icon = 'icons/obj/tools.dmi' icon_state = "screwdriver_caravan" + post_init_icon_state = null desc = "A prototype of a new screwdriver design, allegedly the red color scheme makes it go faster." name = "experimental screwdriver" toolspeed = 0.3 random_color = FALSE + greyscale_config = null + greyscale_colors = null /obj/item/wirecutters/caravan icon = 'icons/obj/tools.dmi' diff --git a/code/modules/mob/living/basic/drone/drone_tools.dm b/code/modules/mob/living/basic/drone/drone_tools.dm index 5e8af8fe5b5..2941d867d6b 100644 --- a/code/modules/mob/living/basic/drone/drone_tools.dm +++ b/code/modules/mob/living/basic/drone/drone_tools.dm @@ -42,10 +42,12 @@ desc = "A screwdriver built into your chassis." icon = 'icons/obj/items_cyborg.dmi' icon_state = "toolkit_engiborg_screwdriver" + post_init_icon_state = null inhand_icon_state = "screwdriver" item_flags = NO_MAT_REDEMPTION random_color = FALSE - + greyscale_config = null + greyscale_colors = null /obj/item/screwdriver/drone/separate_worn_overlays(mutable_appearance/standing, mutable_appearance/draw_target, isinhands = FALSE, icon_file) . = ..() diff --git a/icons/map_icons/clothing/mask.dmi b/icons/map_icons/clothing/mask.dmi index 17965d2a7e6..2651067be63 100644 Binary files a/icons/map_icons/clothing/mask.dmi and b/icons/map_icons/clothing/mask.dmi differ diff --git a/icons/map_icons/clothing/under/_under.dmi b/icons/map_icons/clothing/under/_under.dmi index 107bde6feda..7549dc9baa5 100644 Binary files a/icons/map_icons/clothing/under/_under.dmi and b/icons/map_icons/clothing/under/_under.dmi differ diff --git a/icons/map_icons/items/_item.dmi b/icons/map_icons/items/_item.dmi index 000aa654750..9e3ce568af0 100644 Binary files a/icons/map_icons/items/_item.dmi and b/icons/map_icons/items/_item.dmi differ diff --git a/icons/obj/tools.dmi b/icons/obj/tools.dmi index ec8216ccc3e..4777c610cac 100644 Binary files a/icons/obj/tools.dmi and b/icons/obj/tools.dmi differ