mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Updates medical equipment power usage
Also adds a couple of cell chargers to engineering workshop and aux tool storage.
This commit is contained in:
@@ -10,6 +10,9 @@
|
||||
anchored = 1 //About time someone fixed this.
|
||||
density = 1
|
||||
var/orient = "LEFT" // "RIGHT" changes the dir suffix to "-r"
|
||||
|
||||
use_power = 1
|
||||
idle_power_usage = 40
|
||||
|
||||
|
||||
/obj/machinery/sleep_console/process()
|
||||
@@ -53,9 +56,14 @@
|
||||
/obj/machinery/sleep_console/attack_hand(mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
if (src.connected)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
var/dat = ""
|
||||
if (!src.connected || (connected.stat & (NOPOWER|BROKEN)))
|
||||
dat += "This console is not connected to a sleeper or the sleeper is non-functional."
|
||||
else
|
||||
var/mob/living/occupant = src.connected.occupant
|
||||
var/dat = "<font color='blue'><B>Occupant Statistics:</B></FONT><BR>"
|
||||
dat += "<font color='blue'><B>Occupant Statistics:</B></FONT><BR>"
|
||||
if (occupant)
|
||||
var/t1
|
||||
switch(occupant.stat)
|
||||
@@ -99,9 +107,9 @@
|
||||
dat += "<HR><A href='?src=\ref[src];ejectify=1'>Eject Patient</A>"
|
||||
else
|
||||
dat += "The sleeper is empty."
|
||||
dat += text("<BR><BR><A href='?src=\ref[];mach_close=sleeper'>Close</A>", user)
|
||||
user << browse(dat, "window=sleeper;size=400x500")
|
||||
onclose(user, "sleeper")
|
||||
dat += text("<BR><BR><A href='?src=\ref[];mach_close=sleeper'>Close</A>", user)
|
||||
user << browse(dat, "window=sleeper;size=400x500")
|
||||
onclose(user, "sleeper")
|
||||
return
|
||||
|
||||
/obj/machinery/sleep_console/Topic(href, href_list)
|
||||
@@ -150,6 +158,7 @@
|
||||
|
||||
/obj/machinery/sleeper
|
||||
name = "Sleeper"
|
||||
desc = "A fancy bed with built-in injectors, a dialysis machine, and a limited health scanner."
|
||||
icon = 'icons/obj/Cryogenic2.dmi'
|
||||
icon_state = "sleeper_0"
|
||||
density = 1
|
||||
@@ -160,6 +169,10 @@
|
||||
var/amounts = list(5, 10)
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker = null
|
||||
var/filtering = 0
|
||||
|
||||
use_power = 1
|
||||
idle_power_usage = 15
|
||||
active_power_usage = 200 //builtin health analyzer, dialysis machine, injectors.
|
||||
|
||||
New()
|
||||
..()
|
||||
@@ -176,6 +189,9 @@
|
||||
|
||||
|
||||
process()
|
||||
if (stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
if(filtering > 0)
|
||||
if(beaker)
|
||||
if(beaker.reagents.total_volume < beaker.reagents.maximum_volume)
|
||||
@@ -233,13 +249,12 @@
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.loc = src
|
||||
update_use_power(2)
|
||||
src.occupant = M
|
||||
src.icon_state = "sleeper_1"
|
||||
if(orient == "RIGHT")
|
||||
icon_state = "sleeper_1-r"
|
||||
|
||||
M << "\blue <b>You feel cool air surround you. You go numb as your senses turn inward.</b>"
|
||||
|
||||
src.add_fingerprint(user)
|
||||
del(G)
|
||||
return
|
||||
@@ -314,6 +329,7 @@
|
||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||
src.occupant.loc = src.loc
|
||||
src.occupant = null
|
||||
update_use_power(1)
|
||||
if(orient == "RIGHT")
|
||||
icon_state = "sleeper_0-r"
|
||||
return
|
||||
@@ -409,13 +425,12 @@
|
||||
usr.client.perspective = EYE_PERSPECTIVE
|
||||
usr.client.eye = src
|
||||
usr.loc = src
|
||||
update_use_power(2)
|
||||
src.occupant = usr
|
||||
src.icon_state = "sleeper_1"
|
||||
if(orient == "RIGHT")
|
||||
icon_state = "sleeper_1-r"
|
||||
|
||||
usr << "\blue <b>You feel cool air surround you. You go numb as your senses turn inward.</b>"
|
||||
|
||||
for(var/obj/O in src)
|
||||
del(O)
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
icon_state = "body_scanner_0"
|
||||
density = 1
|
||||
anchored = 1
|
||||
|
||||
use_power = 1
|
||||
idle_power_usage = 60
|
||||
active_power_usage = 10000 //10 kW. It's a big all-body scanner.
|
||||
|
||||
/*/obj/machinery/bodyscanner/allow_drop()
|
||||
return 0*/
|
||||
@@ -48,6 +52,7 @@
|
||||
usr.client.eye = src
|
||||
usr.loc = src
|
||||
src.occupant = usr
|
||||
update_use_power(2)
|
||||
src.icon_state = "body_scanner_1"
|
||||
for(var/obj/O in src)
|
||||
//O = null
|
||||
@@ -67,6 +72,7 @@
|
||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||
src.occupant.loc = src.loc
|
||||
src.occupant = null
|
||||
update_use_power(1)
|
||||
src.icon_state = "body_scanner_0"
|
||||
return
|
||||
|
||||
@@ -85,6 +91,7 @@
|
||||
M.client.eye = src
|
||||
M.loc = src
|
||||
src.occupant = M
|
||||
update_use_power(2)
|
||||
src.icon_state = "body_scanner_1"
|
||||
for(var/obj/O in src)
|
||||
O.loc = src.loc
|
||||
@@ -214,6 +221,12 @@
|
||||
/obj/machinery/body_scanconsole/attack_hand(user as mob)
|
||||
if(..())
|
||||
return
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(!connected || (connected.stat & (NOPOWER|BROKEN)))
|
||||
user << "\red This console is not connected to a functioning body scanner."
|
||||
return
|
||||
|
||||
if(!ishuman(connected.occupant))
|
||||
user << "\red This device can only scan compatible lifeforms."
|
||||
return
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
layer = 2.8
|
||||
|
||||
var/on = 0
|
||||
use_power = 1
|
||||
idle_power_usage = 20
|
||||
active_power_usage = 200
|
||||
|
||||
var/temperature_archived
|
||||
var/mob/living/carbon/occupant = null
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker = null
|
||||
@@ -256,9 +260,14 @@
|
||||
occupant.bodytemperature = 261 // Changed to 70 from 140 by Zuhayr due to reoccurance of bug.
|
||||
// occupant.metabslow = 0
|
||||
occupant = null
|
||||
current_heat_capacity = initial(current_heat_capacity)
|
||||
update_use_power(1)
|
||||
update_icon()
|
||||
return
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/proc/put_mob(mob/living/carbon/M as mob)
|
||||
if (stat & (NOPOWER|BROKEN))
|
||||
usr << "\red The cryo cell is not functioning."
|
||||
return
|
||||
if (!istype(M))
|
||||
usr << "\red <B>The cryo cell cannot handle such a lifeform!</B>"
|
||||
return
|
||||
@@ -279,6 +288,8 @@
|
||||
if(M.health > -100 && (M.health < 0 || M.sleeping))
|
||||
M << "\blue <b>You feel a cold liquid surround you. Your skin starts to freeze up.</b>"
|
||||
occupant = M
|
||||
current_heat_capacity = HEAT_CAPACITY_HUMAN
|
||||
update_use_power(2)
|
||||
// M.metabslow = 1
|
||||
add_fingerprint(usr)
|
||||
update_icon()
|
||||
@@ -311,7 +322,7 @@
|
||||
if(M.Victim == usr)
|
||||
usr << "You're too busy getting your life sucked out of you."
|
||||
return
|
||||
if (usr.stat != 0 || stat & (NOPOWER|BROKEN))
|
||||
if (usr.stat != 0)
|
||||
return
|
||||
put_mob(usr)
|
||||
return
|
||||
|
||||
@@ -20,6 +20,10 @@
|
||||
layer = 2.9
|
||||
anchored = 1
|
||||
density = 1
|
||||
|
||||
use_power = 1
|
||||
idle_power_usage = 10
|
||||
|
||||
var/active = 1 //No sales pitches if off!
|
||||
var/delay_product_spawn // If set, uses sleep() in product spawn proc (mostly for seeds to retrieve correct names).
|
||||
var/vend_ready = 1 //Are we ready to vend?? Is it time??
|
||||
@@ -507,7 +511,7 @@
|
||||
src.speak(src.vend_reply)
|
||||
src.last_reply = world.time
|
||||
|
||||
use_power(5)
|
||||
use_power(150) //actuators and stuff
|
||||
if (src.icon_vend) //Show the vending animation if needed
|
||||
flick(src.icon_vend,src)
|
||||
spawn(src.vend_delay)
|
||||
|
||||
Reference in New Issue
Block a user