From 5d99941a78066d3a45388d8ef2b66f14f5fbcfec Mon Sep 17 00:00:00 2001 From: FlitchTime <109819349+FlitchTime@users.noreply.github.com> Date: Sun, 18 Aug 2024 12:46:48 +0300 Subject: [PATCH] bugfix: Icon states for items (#5732) item_state fix --- code/game/objects/items/devices/megaphone.dm | 2 +- code/game/objects/items/devices/radio/radio.dm | 1 + code/game/objects/items/weapons/holosign.dm | 7 +++++-- code/game/objects/items/weapons/storage/wallets.dm | 3 +-- code/modules/paperwork/handlabeler.dm | 4 ++-- code/modules/paperwork/photography.dm | 5 ++++- 6 files changed, 14 insertions(+), 8 deletions(-) diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm index 4befc88f872..a727ec38688 100644 --- a/code/game/objects/items/devices/megaphone.dm +++ b/code/game/objects/items/devices/megaphone.dm @@ -3,7 +3,7 @@ desc = "A device used to project your voice. Loudly." icon = 'icons/obj/device.dmi' icon_state = "megaphone" - item_state = "radio" + item_state = "megaphone" w_class = WEIGHT_CLASS_SMALL flags = CONDUCT diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 8d066ee1ef1..2d878eb0bee 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -309,6 +309,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list( name = "security shortwave radio" desc = "A basic handheld radio that can communicate with local telecommunication networks. This model is painted in black colors." icon_state = "walkietalkie_sec" + item_state = "walkietalkie_sec" frequency = SEC_FREQ // Just a dummy mob used for making announcements, so we don't create AIs to do this diff --git a/code/game/objects/items/weapons/holosign.dm b/code/game/objects/items/weapons/holosign.dm index e74ad4b563b..1b4b0a43d94 100644 --- a/code/game/objects/items/weapons/holosign.dm +++ b/code/game/objects/items/weapons/holosign.dm @@ -3,7 +3,7 @@ desc = "This shouldnt exist, if it does, tell a coder" icon = 'icons/obj/device.dmi' icon_state = "signmaker" - item_state = "electronic" + item_state = "signmaker" force = 0 w_class = WEIGHT_CLASS_SMALL throwforce = 0 @@ -14,7 +14,7 @@ var/list/signs = list() var/max_signs = 10 var/creation_time = 0 //time to create a holosign in deciseconds. - var/holosign_type = null + var/holosign_type = /obj/structure/holosign/wetsign // because runtime if type == null var/holocreator_busy = FALSE //to prevent placing multiple holo barriers at once /obj/item/holosign_creator/Initialize(mapload) @@ -104,6 +104,7 @@ name = "security holobarrier projector" desc = "A holographic projector that creates holographic security barriers." icon_state = "signmaker_sec" + item_state = "signmaker_sec" belt_icon = "security_sign_projector" holosign_type = /obj/structure/holosign/barrier creation_time = 30 @@ -113,6 +114,7 @@ name = "engineering holobarrier projector" desc = "A holographic projector that creates holographic engineering barriers." icon_state = "signmaker_engi" + item_state = "signmaker_engi" holosign_type = /obj/structure/holosign/barrier/engineering creation_time = 30 max_signs = 6 @@ -121,6 +123,7 @@ name = "ATMOS holofan projector" desc = "A holographic projector that creates holographic barriers that prevent changes in atmosphere conditions." icon_state = "signmaker_engi" + item_state = "signmaker_engi" holosign_type = /obj/structure/holosign/barrier/atmos creation_time = 0 max_signs = 3 diff --git a/code/game/objects/items/weapons/storage/wallets.dm b/code/game/objects/items/weapons/storage/wallets.dm index 918e7b287e2..6692642fcdf 100644 --- a/code/game/objects/items/weapons/storage/wallets.dm +++ b/code/game/objects/items/weapons/storage/wallets.dm @@ -4,7 +4,7 @@ storage_slots = 10 icon = 'icons/obj/wallets.dmi' icon_state = "brown_wallet" - item_state = "wallet" + item_state = "brown_wallet" w_class = WEIGHT_CLASS_SMALL resistance_flags = FLAMMABLE can_hold = list( @@ -122,7 +122,6 @@ desc = "A cheap wallet from the arcade." storage_slots = 5 //smaller storage than normal wallets icon = 'icons/obj/wallets.dmi' - item_state = "wallet" /obj/item/storage/wallet/color/Initialize(mapload) diff --git a/code/modules/paperwork/handlabeler.dm b/code/modules/paperwork/handlabeler.dm index 979a9df4cec..e000bad95a1 100644 --- a/code/modules/paperwork/handlabeler.dm +++ b/code/modules/paperwork/handlabeler.dm @@ -3,7 +3,7 @@ desc = "A combined label printer, applicator, and remover, all in a single portable device. Designed to be easy to operate and use." icon = 'icons/obj/bureaucracy.dmi' icon_state = "labeler0" - item_state = "flight" + item_state = "labeler0" var/label = null var/labels_left = 30 var/mode = FALSE @@ -67,5 +67,5 @@ icon = 'icons/obj/bureaucracy.dmi' desc = "A roll of paper. Use it on a hand labeler to refill it." icon_state = "labeler_refill" - item_state = "electropack" + item_state = "labeler_refill" w_class = WEIGHT_CLASS_TINY diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index a4d58366584..12e3ec2622d 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -141,7 +141,7 @@ icon = 'icons/obj/items.dmi' desc = "A polaroid camera. 10 photos left." icon_state = "camera" - item_state = "electropack" + item_state = "camera" w_class = WEIGHT_CLASS_SMALL slot_flags = ITEM_SLOT_BELT|ITEM_SLOT_NECK var/list/matter = list("metal" = 2000) @@ -151,6 +151,8 @@ var/blueprints = 0 var/icon_on = "camera" var/icon_off = "camera_off" + var/item_on = "camera" + var/item_off = "camera_off" var/size = 3 var/see_ghosts = 0 //for the spoop of it var/flashing_lights = TRUE @@ -213,6 +215,7 @@ GLOBAL_LIST_INIT(SpookyGhosts, list("ghost","shade","shade2","ghost-narsie","hor /obj/item/camera/update_icon_state() icon_state = on ? icon_on : icon_off + item_state = on ? item_on : item_off /obj/item/camera/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/camera_film))