From 23dc69ec55794f10a726782ca6ab8b24d6f66d61 Mon Sep 17 00:00:00 2001 From: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Date: Sat, 10 Jun 2023 08:40:07 +1000 Subject: [PATCH] Merge pull request #14941 from Youtubeboy139/Suit-Cooler Time to cool off --- .../objects/items/devices/suit_cooling.dm | 32 ++++++++++++++---- icons/obj/suit_cooler.dmi | Bin 0 -> 933 bytes 2 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 icons/obj/suit_cooler.dmi diff --git a/code/game/objects/items/devices/suit_cooling.dm b/code/game/objects/items/devices/suit_cooling.dm index 0e87e867c5..d5baa6516b 100644 --- a/code/game/objects/items/devices/suit_cooling.dm +++ b/code/game/objects/items/devices/suit_cooling.dm @@ -2,8 +2,9 @@ name = "portable suit cooling unit" desc = "A portable heat sink and liquid cooled radiator that can be hooked up to a space suit's existing temperature controls to provide industrial levels of cooling." w_class = ITEMSIZE_LARGE - icon = 'icons/obj/device.dmi' + icon = 'icons/obj/suit_cooler.dmi' icon_state = "suitcooler0" + item_state = "coolingpack" slot_flags = SLOT_BACK //copied from tank.dm @@ -171,13 +172,32 @@ return ..() /obj/item/device/suit_cooling_unit/proc/updateicon() - if (cover_open) - if (cell) + cut_overlays() + if(cover_open) + if(cell) icon_state = "suitcooler1" else icon_state = "suitcooler2" - else - icon_state = "suitcooler0" + return + + icon_state = "suitcooler0" + + if(!cell || !on) + return + + switch(round(cell.percent())) + if(86 to INFINITY) + add_overlay("battery-0") + if(69 to 85) + add_overlay("battery-1") + if(52 to 68) + add_overlay("battery-2") + if(35 to 51) + add_overlay("battery-3") + if(18 to 34) + add_overlay("battery-4") + if(-INFINITY to 17) + add_overlay("battery-5") /obj/item/device/suit_cooling_unit/examine(mob/user) . = ..() @@ -218,7 +238,7 @@ /obj/item/device/suit_cooling_unit/emergency/attackby(obj/item/weapon/W as obj, mob/user as mob) if (W.is_screwdriver()) - to_chat(user, "This model has the cell permanently installed!") + to_chat(user, "This cooler's cell is permanently installed!") return return ..() diff --git a/icons/obj/suit_cooler.dmi b/icons/obj/suit_cooler.dmi new file mode 100644 index 0000000000000000000000000000000000000000..92f97ef8a627c733f9a2a30388aa5fb03742a62f GIT binary patch literal 933 zcmV;W16urvP)pXHS=xm(0w}(z8K5MKrm& zxidLIA3YyJLPDc{C3rw4HWL`RTrcmn6h0dvz`(#)5D+a^h2}{~oH{y%uHIRJuM#_I z7Z@g2TxKyjMa0I;j+35p9mNX(0004WQchCV=- z0C=2JR&a84_w-Y6@%7{?OD!tS%+FJ>RWQ*r;NmRLOex6#a*U0*I5Sc+(=$pSoZ^zi zl2jm5skk(=Bso7nC$-2xiHkEOv#1y-YRJWzR+N~V3SnbWYe<4xBZ6v^5=%-_iz;;q zy8xz=u>CNV#M^F6v`Q1ARhnW~35<-C)SSdhkgyJtwp2u@;j%(m!PU zw9LZ*00JdRL_t(&f$fi_@3_U^ziZ{a))Yi1uDWae$$ zhrOd_Gl~R3_$xpJ07$0@>EiskkAPBuN}+x~f9@lI2xO1?{rtI)!05`}!Fb{>&@1;5 zxNrwBPWHrj_Pi5>IK8e&V>tQ*y0IIqxWUu&ZUH0#(B**y@VEftEl%%;RK1gEQBRELUy;XbLc!>}g6o@taURD|)e;uv?&Np<5tsaC)w3Ujh ziBAEb!<+(gAAznGCzxVNFK&rib033h3z%Q$j=WhQAnz79z**pXj|AjC3i}Q?<2b4R zRwQvq-kato4axfpGziHBK@bE%5Cp*kJ38|J-N*>{&`{?(&DcE85pz1R0(N+QWPf0> zSiEE{0w&E~GA^Ht^L$LluL@)fz5^sMp@Z*$T>^fv)Jwn)P9~=`v>NGkpDZSyJ7yVm-J)u|8yYfu9U5uqh82UVxT=yL-2X-VQ;Z zqKEgk`JMk#G1{z)a#tIaMc^K=(>p)Ew+WO5bzo~9=sHkfVvbOOU2PC7fM$Mw<(Gi} zV%2ou3-my5!m0z?UGOICBXH@*Fxnh4czr<-gkZh^xz0IQ`u-Zl00000NkvXX Hu0mjfY><