Skip to content

Commit

Permalink
bugfix: Icon states for items (#5732)
Browse files Browse the repository at this point in the history
item_state fix
  • Loading branch information
FlitchTime authored Aug 18, 2024
1 parent 57b099b commit 5d99941
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion code/game/objects/items/devices/megaphone.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions code/game/objects/items/devices/radio/radio.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions code/game/objects/items/weapons/holosign.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
3 changes: 1 addition & 2 deletions code/game/objects/items/weapons/storage/wallets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/paperwork/handlabeler.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
5 changes: 4 additions & 1 deletion code/modules/paperwork/photography.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 5d99941

Please sign in to comment.