mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Merge pull request #7830 from VOREStation/aro-suitcooler
Optimize suit cooler processing
This commit is contained in:
@@ -28,14 +28,17 @@
|
|||||||
/obj/item/device/suit_cooling_unit/ui_action_click()
|
/obj/item/device/suit_cooling_unit/ui_action_click()
|
||||||
toggle(usr)
|
toggle(usr)
|
||||||
|
|
||||||
/obj/item/device/suit_cooling_unit/New()
|
/obj/item/device/suit_cooling_unit/Initialize()
|
||||||
START_PROCESSING(SSobj, src)
|
. = ..()
|
||||||
cell = new/obj/item/weapon/cell/high() //comes not with the crappy default power cell - because this is dedicated EVA equipment
|
cell = new/obj/item/weapon/cell/high(src) //comes not with the crappy default power cell - because this is dedicated EVA equipment
|
||||||
cell.loc = src
|
|
||||||
|
/obj/item/device/suit_cooling_unit/Destroy()
|
||||||
|
qdel_null(cell)
|
||||||
|
return ..()
|
||||||
|
|
||||||
/obj/item/device/suit_cooling_unit/process()
|
/obj/item/device/suit_cooling_unit/process()
|
||||||
if (!on || !cell)
|
if (!on || !cell)
|
||||||
return
|
return PROCESS_KILL
|
||||||
|
|
||||||
if (!ismob(loc))
|
if (!ismob(loc))
|
||||||
return
|
return
|
||||||
@@ -106,11 +109,13 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
on = 1
|
on = 1
|
||||||
|
START_PROCESSING(SSobj, src)
|
||||||
updateicon()
|
updateicon()
|
||||||
|
|
||||||
/obj/item/device/suit_cooling_unit/proc/turn_off(var/failed)
|
/obj/item/device/suit_cooling_unit/proc/turn_off(var/failed)
|
||||||
if(failed) visible_message("\The [src] clicks and whines as it powers down.")
|
if(failed) visible_message("\The [src] clicks and whines as it powers down.")
|
||||||
on = 0
|
on = 0
|
||||||
|
STOP_PROCESSING(SSobj, src)
|
||||||
updateicon()
|
updateicon()
|
||||||
|
|
||||||
/obj/item/device/suit_cooling_unit/attack_self(var/mob/user)
|
/obj/item/device/suit_cooling_unit/attack_self(var/mob/user)
|
||||||
|
|||||||
Reference in New Issue
Block a user