diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 4f7822e03bd..10fa8815cf1 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -104,6 +104,11 @@ src.loc = null return ..() +/obj/item/update_icon() + . = ..() + if(build_from_parts) + cut_overlays() + add_overlay(overlay_image(icon,"[icon_state]_[worn_overlay]", flags=RESET_COLOR)) //add the overlay w/o coloration of the original sprite /obj/item/device icon = 'icons/obj/device.dmi' diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index 2769975b6ad..bbbe3f88e32 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -653,6 +653,17 @@ CIGARETTE PACKETS ARE IN FANCY.DM var/flame_light_power = 2 var/flame_light_color = LIGHT_COLOR_LAVA +/obj/item/flame/lighter/colourable + icon_state = "lighter-col" + item_state = "lighter-col" + base_state = "lighter-col" + build_from_parts = TRUE + worn_overlay = "top" + +/obj/item/flame/lighter/colourable/Initialize() + . = ..() + update_icon() + /obj/item/flame/lighter/zippo name = "\improper Zippo lighter" desc = "The zippo. If you've spent that amount of money on a lighter, you're either a badass or a chain smoker." @@ -765,6 +776,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM icon_state = "[base_state]" item_state = "[base_state]" update_held_icon() + return ..() /obj/item/flame/lighter/attack_self(mob/living/user) if(!base_state) diff --git a/code/modules/client/preference_setup/loadout/loadout_smoking.dm b/code/modules/client/preference_setup/loadout/loadout_smoking.dm index b05d24a5ad2..d466f9b9ce9 100644 --- a/code/modules/client/preference_setup/loadout/loadout_smoking.dm +++ b/code/modules/client/preference_setup/loadout/loadout_smoking.dm @@ -27,7 +27,8 @@ /datum/gear/smoking/lighter display_name = "cheap lighter" - path = /obj/item/flame/lighter + path = /obj/item/flame/lighter/colourable + flags = GEAR_HAS_COLOR_SELECTION /datum/gear/smoking/cigarcase display_name = "cigar case" diff --git a/code/modules/clothing/suits/overlay.dm b/code/modules/clothing/suits/overlay.dm index e5b5431caf2..c2b222cfef0 100644 --- a/code/modules/clothing/suits/overlay.dm +++ b/code/modules/clothing/suits/overlay.dm @@ -10,12 +10,6 @@ . = ..() update_icon() -/obj/item/clothing/suit/storage/toggle/overlay/update_icon() - . = ..() - if(build_from_parts) - cut_overlays() - add_overlay(overlay_image(icon, "[icon_state]_[worn_overlay]", flags=RESET_COLOR)) //add the overlay w/o coloration of the original sprite - /obj/item/clothing/suit/storage/toggle/overlay/submariner name = "submariner's coat" desc = "A leather jacket with a synthetic fur collar. It looks comfortable, if a bit warm for the station." diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm index 7042602aaee..66d10e0a8f4 100644 --- a/code/modules/clothing/under/accessories/accessory.dm +++ b/code/modules/clothing/under/accessories/accessory.dm @@ -22,12 +22,6 @@ . = ..() update_icon() -/obj/item/clothing/accessory/update_icon() - . = ..() - if(build_from_parts) - cut_overlays() - add_overlay(overlay_image(icon, worn_overlay, flags=RESET_COLOR)) //add the overlay w/o coloration of the original sprite - /obj/item/clothing/accessory/proc/get_inv_overlay(var/force = FALSE) if(!mob_overlay) get_mob_overlay() @@ -44,7 +38,7 @@ inv_overlay.color = color if(build_from_parts) inv_overlay.cut_overlays() - inv_overlay.add_overlay(overlay_image(I, worn_overlay, flags=RESET_COLOR)) //add the overlay w/o coloration of the original sprite + inv_overlay.add_overlay(overlay_image(I, "[icon_state]_[worn_overlay]", flags=RESET_COLOR)) //add the overlay w/o coloration of the original sprite return inv_overlay /obj/item/clothing/accessory/proc/get_mob_overlay(var/force = FALSE) @@ -61,7 +55,7 @@ mob_overlay.color = color if(build_from_parts) mob_overlay.cut_overlays() - mob_overlay.add_overlay(overlay_image(I, worn_overlay, flags=RESET_COLOR)) //add the overlay w/o coloration of the original sprite + mob_overlay.add_overlay(overlay_image(I, "[icon_state]_[worn_overlay]", flags=RESET_COLOR)) //add the overlay w/o coloration of the original sprite mob_overlay.appearance_flags = RESET_ALPHA return mob_overlay diff --git a/html/changelogs/colourlighter.yml b/html/changelogs/colourlighter.yml new file mode 100644 index 00000000000..45d7b29625b --- /dev/null +++ b/html/changelogs/colourlighter.yml @@ -0,0 +1,6 @@ +author: Sparky_hotdog + +delete-after: True + +changes: + - tweak: "Cheap lighters are now colourable in the loadout." diff --git a/icons/mob/items/lefthand_cigs_lighters.dmi b/icons/mob/items/lefthand_cigs_lighters.dmi index ad304898999..f5fd6c52886 100644 Binary files a/icons/mob/items/lefthand_cigs_lighters.dmi and b/icons/mob/items/lefthand_cigs_lighters.dmi differ diff --git a/icons/mob/items/righthand_cigs_lighters.dmi b/icons/mob/items/righthand_cigs_lighters.dmi index 031047bcab6..29db0ac186c 100644 Binary files a/icons/mob/items/righthand_cigs_lighters.dmi and b/icons/mob/items/righthand_cigs_lighters.dmi differ diff --git a/icons/mob/ties.dmi b/icons/mob/ties.dmi index b01dd72a0f9..b246a3ebd5a 100644 Binary files a/icons/mob/ties.dmi and b/icons/mob/ties.dmi differ diff --git a/icons/obj/cigs_lighters.dmi b/icons/obj/cigs_lighters.dmi index f11cc43b8ce..5fcfd103470 100644 Binary files a/icons/obj/cigs_lighters.dmi and b/icons/obj/cigs_lighters.dmi differ diff --git a/icons/obj/clothing/ties.dmi b/icons/obj/clothing/ties.dmi index 7d66cd5a362..0be9c712e13 100644 Binary files a/icons/obj/clothing/ties.dmi and b/icons/obj/clothing/ties.dmi differ