From 08972b1dc5c77ac388895a3ca3c5c5808111a358 Mon Sep 17 00:00:00 2001 From: Arokha Sieyes Date: Thu, 9 Jun 2016 18:28:16 -0400 Subject: [PATCH] Better, now. --- code/game/objects/items/weapons/cards_ids.dm | 4 +- .../objects/items/weapons/storage/wallets.dm | 104 +++++++----------- .../loadout/loadout_accessories.dm | 26 +---- icons/obj/card.dmi | Bin 16999 -> 16999 bytes icons/obj/wallet.dmi | Bin 1409 -> 2067 bytes 5 files changed, 43 insertions(+), 91 deletions(-) diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index 3f49e3c6ab..a85fab3807 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -326,14 +326,14 @@ /obj/item/weapon/card/id/cargo name = "identification card" desc = "A card issued to station cargo staff." - icon_state = "car" + icon_state = "cargo" primary_color = rgb(142,94,0) secondary_color = rgb(191,159,95) /obj/item/weapon/card/id/cargo/head name = "identification card" desc = "A card which represents service and planning." - icon_state = "carGold" + icon_state = "cargoGold" primary_color = rgb(142,94,0) secondary_color = rgb(255,223,127) diff --git a/code/game/objects/items/weapons/storage/wallets.dm b/code/game/objects/items/weapons/storage/wallets.dm index c5e4e92721..9cbda62db7 100644 --- a/code/game/objects/items/weapons/storage/wallets.dm +++ b/code/game/objects/items/weapons/storage/wallets.dm @@ -3,7 +3,7 @@ desc = "It can hold a few small and personal things." storage_slots = 10 icon = 'icons/obj/wallet.dmi' - icon_state = "wallet" + icon_state = "wallet-orange" w_class = 2 can_hold = list( /obj/item/weapon/spacecash, @@ -28,7 +28,6 @@ var/obj/item/weapon/card/id/front_id = null - /obj/item/weapon/storage/wallet/remove_from_storage(obj/item/W as obj, atom/new_location) . = ..(W, new_location) if(.) @@ -46,59 +45,14 @@ update_icon() /obj/item/weapon/storage/wallet/update_icon() + overlays.Cut() if(front_id) - switch(front_id.icon_state) - if("id") //The plain assistant ID - var/icon/new_wallet = new/icon("icon" = initial(icon), "icon_state" = initial(icon_state)) - var/icon/id_overlay = new/icon("icon" = initial(icon), "icon_state" = "wallet_id") - new_wallet.Blend(id_overlay, ICON_OVERLAY) - del id_overlay - icon = new_wallet - return - if("silver") //HoP's ID has a special overlay. - var/icon/new_wallet = new/icon("icon" = initial(icon), "icon_state" = initial(icon_state)) - var/icon/id_overlay = new/icon("icon" = initial(icon), "icon_state" = "wallet_idsilver") - new_wallet.Blend(id_overlay, ICON_OVERLAY) - del id_overlay - icon = new_wallet - if("gold") //Captain's ID has a special overlay. - var/icon/new_wallet = new/icon("icon" = initial(icon), "icon_state" = initial(icon_state)) - var/icon/id_overlay = new/icon("icon" = initial(icon), "icon_state" = "wallet_idgold") - new_wallet.Blend(id_overlay, ICON_OVERLAY) - del id_overlay - icon = new_wallet - if("centcom") //Centcom ID has a special overlay. - var/icon/new_wallet = new/icon("icon" = initial(icon), "icon_state" = initial(icon_state)) - var/icon/id_overlay = new/icon("icon" = initial(icon), "icon_state" = "wallet_idcentcom") - new_wallet.Blend(id_overlay, ICON_OVERLAY) - del id_overlay - icon = new_wallet - else //Doesn't match a special overlay type. - if(front_id.primary_color && front_id.secondary_color) //Colored ID with stripe and oval colors (pri/sec). - var/icon/new_wallet = new/icon("icon" = initial(icon), "icon_state" = initial(icon_state)) - var/icon/id_icon = new/icon("icon" = initial(icon), "icon_state" = "wallet_id") - var/icon/pri_overlay = new/icon("icon" = initial(icon), "icon_state" = "wallet_idprimary") - var/icon/sec_overlay = new/icon("icon" = initial(icon), "icon_state" = "wallet_idsecondary") - - pri_overlay.Blend(front_id.primary_color, ICON_ADD) - sec_overlay.Blend(front_id.secondary_color, ICON_ADD) - - new_wallet.Blend(id_icon, ICON_OVERLAY) - del id_icon - new_wallet.Blend(pri_overlay, ICON_OVERLAY) - del pri_overlay - new_wallet.Blend(sec_overlay, ICON_OVERLAY) - del sec_overlay - - icon = new_wallet - return - - else //Dunno what to do. Resort to plain assistant ID. - icon_state = initial(icon_state) + "id" - return - else - icon = initial(icon) - icon_state = initial(icon_state) + var/tiny_state = "id-generic" + if("id-"+front_id.icon_state in icon_states(icon)) + tiny_state = "id-"+front_id.icon_state + var/image/tiny_image = new/image(icon, icon_state = tiny_state) + tiny_image.appearance_flags = RESET_COLOR + overlays += tiny_image /obj/item/weapon/storage/wallet/GetID() return front_id @@ -123,20 +77,38 @@ SC.adjust_worth(i, 0) SC.update_icon() -/obj/item/weapon/storage/wallet/grey - icon_state = "greywallet" +/obj/item/weapon/storage/wallet/poly + name = "polychromic wallet" + desc = "You can recolor it! Fancy! The future is NOW!" + icon_state = "wallet-white" -/obj/item/weapon/storage/wallet/green - icon_state = "greenwallet" +/obj/item/weapon/storage/wallet/poly/New() + ..() + verbs |= /obj/item/weapon/storage/wallet/poly/proc/change_color + color = "#"+get_random_colour() + update_icon() + +/obj/item/weapon/storage/wallet/poly/proc/change_color() + set name = "Change Wallet Color" + set category = "Object" + set desc = "Change the color of the wallet." + set src in usr -/obj/item/weapon/storage/wallet/purple - icon_state = "purplewallet" + if(usr.stat || usr.restrained() || usr.incapacitated()) + return -/obj/item/weapon/storage/wallet/red - icon_state = "redwallet" + var/new_color = input(usr, "Pick a new color", "Wallet Color", color) as color|null -/obj/item/weapon/storage/wallet/blue - icon_state = "bluewallet" + if(new_color && (new_color != color)) + color = new_color -/obj/item/weapon/storage/wallet/white - icon_state = "whitewallet" +/obj/item/weapon/storage/wallet/poly/emp_act() + var/original_state = icon_state + icon_state = "wallet-emp" + update_icon() + + spawn(200) + if(src) + icon_state = original_state + update_icon() + \ No newline at end of file diff --git a/code/modules/client/preference_setup/loadout/loadout_accessories.dm b/code/modules/client/preference_setup/loadout/loadout_accessories.dm index dd8d66b0c5..43c99c300b 100644 --- a/code/modules/client/preference_setup/loadout/loadout_accessories.dm +++ b/code/modules/client/preference_setup/loadout/loadout_accessories.dm @@ -32,29 +32,9 @@ display_name = "wallet, orange" path = /obj/item/weapon/storage/wallet/random -/datum/gear/accessory/wallet_grey - display_name = "wallet, grey" - path = /obj/item/weapon/storage/wallet/grey - -/datum/gear/accessory/wallet_green - display_name = "wallet, green" - path = /obj/item/weapon/storage/wallet/green - -/datum/gear/accessory/wallet_purple - display_name = "wallet, purple" - path = /obj/item/weapon/storage/wallet/purple - -/datum/gear/accessory/wallet_red - display_name = "wallet, red" - path = /obj/item/weapon/storage/wallet/red - -/datum/gear/accessory/wallet_blue - display_name = "wallet, blue" - path = /obj/item/weapon/storage/wallet/blue - -/datum/gear/accessory/wallet_white - display_name = "wallet, white" - path = /obj/item/weapon/storage/wallet/white +/datum/gear/accessory/wallet_poly + display_name = "wallet, polychromic" + path = /obj/item/weapon/storage/wallet/poly /datum/gear/accessory/holster display_name = "holster, armpit" diff --git a/icons/obj/card.dmi b/icons/obj/card.dmi index 2ed467d9f5ea9d0ae6457a1994f9294e00673708..e1a2c1c2ae47791154e76b322bfe27f1195f9bdc 100644 GIT binary patch delta 337 zcmV-X0j~b%gaPM-0gyX?j=~@ihR^L&O!Vq*th*k2F&g7RU%_A*=|l<*ur+=AJ(%n! zX1n~}Ao=(hhGCe~X170_XnQ=A1BWQyQB9xk%d)tOPA%2+u_}v}#kA=$iAg1^i)mJ$shZ^2)D`Wsx8g=VWps%gD{SpTkyVh0Xcx$!n1 zLBlRJzRPne7>`kVXkQr+26Dwl5C(H`gD{Ybok1AL)iK0ixwroAFba!JI))(Z21ci) zQ7NyCqtk+7SY{rt;ly_oeMNhQ*j72iR;Fraswr5xa{A{Yiq@yt`$RRZ){ClIJar1_ z%%cM8W>i?&^a3W!=Vr2(()C!%0Kx|<@U zXkE-LkzQUL$8nah-5-u;*qx4Qpb*(RsNwT{t%?Wh)Itp(l`2|d)23+>6DEQh78(;S zRG~RUsG(HFEnr8}_y@XLboVU9T7bL-fA#5auu_F4izC#qS#5rQS4Fl1g{<6on~$I& zmm1&YIm~a^U^s~Om!+c*bUleD)glFo) jZa^#eX?hAB&q|lDKks07I;w9Ou?@+A$==Mfd;#k~TJ)Ww diff --git a/icons/obj/wallet.dmi b/icons/obj/wallet.dmi index 0525de5d7621fbf805825b53c72ddffdf65310ea..101a138156ee1299f05fd2e8ca0d7788d0bda3cd 100644 GIT binary patch literal 2067 zcmaiydsxz08pnS+F(ppUY^71g6*QwNO^F%(A#GBjJGQY(L@rgrm^ zqNye1h0MxJ>J~Xjj+gP0moO9;6)OQPZ|T%NNcdZ5cb@rk&-0w`=bZDt&-*>MD}(^= zweU@F007qd`gjKEIHBv$*L$1WI!kslF4Lm5Pc4t znCbAnEj8mD!caf~=H})|BvNN*r>msFdpN)L=&F>LfcV_5=XL-{wf<$6L2;_3g?qz=Uc)-}a#&md0L!?kWxMh{=-p2cimmiR&@?cK)= zzj+<0Hbh}^el@Tt3UM&)9B3;cd_7!gPG9Kq6PKCvVsh5N!?qQ<>^YOdTn!5EY%ZtG zpenjph^M|ULVbA^Nq7h`{6@MZe{0L?N5MjNkAv740APoFJ>7}%w`XNclFY{(7O~qU zBYbRn&iZKmh_k7M$G2@GfZ?F#5(FhMz3MP!bzZokn_-$!Z{%`ZnG`$kX;%0)-%R%g z$Ie(6X0slrbsv0$YQ8&!cnht16o#1Gg0h~^GfF7%>ufse(Mn)tm67hHKZxL#QFWNO zNF(TxO$*T@gGSWj7LB4uDlO<*X=nY}eWb?O0$SiRbpB) z$vxlg`@P)gOdr`xigWOW6`SB#i=c&(QsRI++!eGoWoIY%n^h#61T84+ z?()jTV1ebk5HcFVB)6!!y8v4iVkuO>VT5+oIcbajURjK)@%~p&yQb=*CFvuZuoeeO9xOYP-XhA7i$8OftWo+O z^t2Sp_$2#B@`lXlc# z((q8Q=wUon)Z9FGLEE8J4h;<{m5kn3u~2`h!_?robesVbE^-=c9`aNl_w9SgBQ@7G z9fBumg7QIft?us&G3Xz~NYrYa9q(!Q9V(^P@alVs zT47^1#TnE#c9Zb}DA-A&{-CaN!AjI!?N{`eR@_env;BMokg_1x2-e+|YN((mOSi82 z%l0BX{*ubXmkGAi0s!}?zI zOcA-aK@`)pZEe z=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