diff --git a/code/controllers/subsystem/processing/overlays.dm b/code/controllers/subsystem/processing/overlays.dm index 2359d39498..589bf667af 100644 --- a/code/controllers/subsystem/processing/overlays.dm +++ b/code/controllers/subsystem/processing/overlays.dm @@ -4,7 +4,7 @@ PROCESSING_SUBSYSTEM_DEF(overlays) wait = 1 priority = 500 init_order = INIT_ORDER_OVERLAY - runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_SETUP + runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_SETUP stat_tag = "Ov" currentrun = null diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 5161386474..e126115cd5 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -573,6 +573,9 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) return 1 return 0 +/obj/item/proc/get_belt_overlay() //Returns the icon used for overlaying the object on a belt + return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', icon_state) + /obj/item/proc/is_hot() return heat diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index 3dbb98882f..9883183945 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -7,13 +7,20 @@ slot_flags = SLOT_BELT attack_verb = list("whipped", "lashed", "disciplined") max_integrity = 300 + var/content_overlays = FALSE //If this is true, the belt will gain overlays based on what it's holding /obj/item/weapon/storage/belt/update_icon() cut_overlays() - for(var/obj/item/I in contents) - add_overlay("[I.name]") + if(content_overlays) + for(var/obj/item/I in contents) + var/mutable_appearance/M = I.get_belt_overlay() + add_overlay(M) ..() +/obj/item/weapon/storage/belt/Initialize() + . = ..() + update_icon() + /obj/item/weapon/storage/belt/utility name = "toolbelt" //Carn: utility belt is nicer, but it bamboozles the text parsing. desc = "Holds tools." @@ -34,10 +41,11 @@ /obj/item/device/radio, /obj/item/clothing/gloves ) + content_overlays = TRUE /obj/item/weapon/storage/belt/utility/chief - name = "Chief Engineer's toolbelt" - desc = "Holds tools, looks snazzy" + name = "\improper Chief Engineer's toolbelt" //"the Chief Engineer's toolbelt", because "Chief Engineer's toolbelt" is not a proper noun + desc = "Holds tools, looks snazzy." icon_state = "utilitybelt_ce" item_state = "utility_ce" @@ -157,6 +165,7 @@ /obj/item/clothing/gloves/, /obj/item/weapon/restraints/legcuffs/bola ) + content_overlays = TRUE /obj/item/weapon/storage/belt/security/full/PopulateContents() new /obj/item/weapon/reagent_containers/spray/pepper(src) diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 2c190d6191..385ff6cbc0 100755 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -181,6 +181,16 @@ M.appearance_flags = RESET_COLOR . += M +/obj/item/weapon/screwdriver/get_belt_overlay() + if(random_color) + var/mutable_appearance/body = mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "screwdriver") + var/mutable_appearance/head = mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "screwdriver_head") + body.color = color + head.overlays += body + return head + else + return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', icon_state) + /obj/item/weapon/screwdriver/attack(mob/living/carbon/M, mob/living/carbon/user) if(!istype(M)) return ..() @@ -203,7 +213,7 @@ name = "alien screwdriver" desc = "An ultrasonic screwdriver." icon = 'icons/obj/abductor.dmi' - icon_state = "screwdriver" + icon_state = "screwdriver_a" item_state = "screwdriver_nuke" usesound = 'sound/items/pshoom.ogg' toolspeed = 0.1 diff --git a/icons/obj/abductor.dmi b/icons/obj/abductor.dmi index ac30dccb4f..21ab5cf9f5 100644 Binary files a/icons/obj/abductor.dmi and b/icons/obj/abductor.dmi differ diff --git a/icons/obj/clothing/belt_overlays.dmi b/icons/obj/clothing/belt_overlays.dmi new file mode 100644 index 0000000000..07765f7d79 Binary files /dev/null and b/icons/obj/clothing/belt_overlays.dmi differ diff --git a/icons/obj/clothing/belts.dmi b/icons/obj/clothing/belts.dmi index 2043111e60..473f2b8573 100644 Binary files a/icons/obj/clothing/belts.dmi and b/icons/obj/clothing/belts.dmi differ