mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-18 18:46:24 +01:00
Add emergency suit cooler unit with fixed lowpower cell
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
|
||||
var/on = 0 //is it turned on?
|
||||
var/cover_open = 0 //is the cover open?
|
||||
var/obj/item/weapon/cell/cell
|
||||
var/obj/item/weapon/cell/cell = /obj/item/weapon/cell/high
|
||||
var/max_cooling = 15 // in degrees per second - probably don't need to mess with heat capacity here
|
||||
var/charge_consumption = 3 // charge per second at max_cooling
|
||||
var/thermostat = T20C
|
||||
@@ -30,7 +30,8 @@
|
||||
|
||||
/obj/item/device/suit_cooling_unit/Initialize()
|
||||
. = ..()
|
||||
cell = new/obj/item/weapon/cell/high(src) //comes not with the crappy default power cell - because this is dedicated EVA equipment
|
||||
if(ispath(cell))
|
||||
cell = new cell(src)
|
||||
|
||||
/obj/item/device/suit_cooling_unit/Destroy()
|
||||
qdel_null(cell)
|
||||
@@ -200,3 +201,23 @@
|
||||
. += "The charge meter reads [round(cell.percent())]%."
|
||||
else
|
||||
. += "It doesn't have a power cell installed."
|
||||
|
||||
/obj/item/device/suit_cooling_unit/emergency
|
||||
icon_state = "esuitcooler"
|
||||
cell = /obj/item/weapon/cell
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
|
||||
/obj/item/device/suit_cooling_unit/emergency/updateicon()
|
||||
return
|
||||
|
||||
/obj/item/device/suit_cooling_unit/emergency/get_cell()
|
||||
if(on)
|
||||
return null // Don't let recharging happen while we're on
|
||||
return cell
|
||||
|
||||
/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, "<span class='warning'>This model has the cell permanently installed!</span>")
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
Reference in New Issue
Block a user