From fbfa125f4bfdb95481436e592d1051aab2d40271 Mon Sep 17 00:00:00 2001 From: MagmaRam Date: Sat, 18 May 2013 22:00:15 +0700 Subject: [PATCH] Bugfix: Fixed issues with custom item camera sprites icond/obj/custom_items.dmi: renamed off sprite for blue camera code/modules/paperwork/photography.dm: made cameras use variables item_on and item_off for sprites so that other types of cameras (i.e. custom ones) can use their own sprites without getting messed. /code/modules/customitems/item_defines.dm: set sprites for custom cameras "orange camera" and "old camera" to use item_on and item_off sprites in custom_items.dmi so that they had the correct sprites --- code/modules/customitems/item_defines.dm | 4 ++++ code/modules/paperwork/photography.dm | 10 ++++++---- icons/obj/custom_items.dmi | Bin 42327 -> 42329 bytes 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index 1522d8970b..0c9ffc5839 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -200,6 +200,8 @@ hi icon = 'custom_items.dmi' desc = "A modified detective's camera, painted in bright orange. On the back you see \"Have fun\" written in small accurate letters with something black." icon_state = "orangecamera" + icon_on = "orangecamera" + icon_off = "camera_off" pictures_left = 30 /obj/item/device/camera/fluff/oldcamera //magmaram: Maria Crash @@ -207,6 +209,8 @@ hi icon = 'custom_items.dmi' desc = "An old, slightly beat-up digital camera, with a cheap photo printer taped on. It's a nice shade of blue." icon_state = "oldcamera" + icon_on = "oldcamera" + icon_off = "oldcamera_off" pictures_left = 30 /obj/item/weapon/card/id/fluff/lifetime //fastler: Fastler Greay; it seemed like something multiple people would have diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index d6daad6092..dae7ac1384 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -122,6 +122,8 @@ var/pictures_max = 10 var/pictures_left = 10 var/on = 1 + var/icon_on = "camera" + var/icon_off = "camera_off" /obj/item/device/camera/attack(mob/living/carbon/human/M as mob, mob/user as mob) @@ -130,9 +132,9 @@ /obj/item/device/camera/attack_self(mob/user as mob) on = !on if(on) - src.icon_state = "camera" + src.icon_state = icon_on else - src.icon_state = "camera_off" + src.icon_state = icon_off user << "You switch the camera [on ? "on" : "off"]." return @@ -253,8 +255,8 @@ pictures_left-- desc = "A polaroid camera. It has [pictures_left] photos left." user << "[pictures_left] photos left." - icon_state = "camera_off" + icon_state = icon_off on = 0 spawn(64) - icon_state = "camera" + icon_state = icon_on on = 1 \ No newline at end of file diff --git a/icons/obj/custom_items.dmi b/icons/obj/custom_items.dmi index f0a310d2e8664d2644c536107aa9fd6c6fe74f1b..54dfe1707478f7aa386454c4a66903da076f5b84 100644 GIT binary patch delta 1000 zcmVV?nKAB2PI%iKzhP*GQ_8iGo5&v#Ez5;x4z$QJVjia zeY3mS-Ry4uNA49@Cs@ybY1S!{ld-KUA4V8mB94Z4DwRp1)r-$)hm#d)d0JkuSWJI* z5&IEyJ*P!6_2h6Q#kvIINQxj`SI=hdsPIU9G4VG+N}i-N`{wS;&F(DJBPzncal)eP z219HjVF{$INXd0C7CI6fBqUoa!pM$bbWX|C?9SkGJz52IO)zjrYB0af1H*_V&)#PK zoM3h30bM3iks2h{V10fOghYzUu<_KW`iDtf{Uaj(fRa^Urtpx_Ng$$GxPxAD?36$4k?b zg?e&B#HrA<-WJ1#5vqhgqQ;<vBkEh<>MZ7=C0wi11VexyVfiCq`D z59QZO^dF+@O@LfT>==_J-gzR&7{OtpD)>avqf=R0)Vl8aBPS>nX$q33AeNrgD|(~% zUyvVhekXG($jLN&a|t|;)@FaxD;~-ChBLGw3+5B01tD|Jrft~;jDXXGCiIB2vLk58 zccT6>V-rQD@5-!R>Tw{4>(Efy(6^4N8ilZUP$_k0x5Yg4;MrD6>1cM>u%ZjC# zH6HaaCvZU~!>)3WkgxG}6J@R3~+g#kxSc~}jMjEVsq#v>^j@R)jv z0t?51G)ubT2yImc$`%GGm%xBpFtUX~C18RDEl+md!C@Y!JaegnBeqVkfb$MyqI3~9&Y?2geMTXt&w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