mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-27 23:29:10 +01:00
Early Polaris Ports
Ports Polaris PRs 6424, 6426, 6428, 6430, 6431, 6432, 6433, and 6434 No vorestation edit markings because they are polariscode ports.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
//Basically a one way passive valve. If the pressure inside is greater than the environment then gas will flow passively,
|
||||
//Basically a one way passive valve. If the pressure inside is greater than the environment then gas will flow passively,
|
||||
//but it does not permit gas to flow back from the environment into the injector. Can be turned off to prevent any gas flow.
|
||||
//When it receives the "inject" signal, it will try to pump it's entire contents into the environment regardless of pressure, using power.
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
use_power = 0
|
||||
idle_power_usage = 150 //internal circuitry, friction losses and stuff
|
||||
power_rating = 15000 //15000 W ~ 20 HP
|
||||
|
||||
|
||||
var/injecting = 0
|
||||
|
||||
var/volume_rate = 50 //flow rate limit
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/New()
|
||||
..()
|
||||
air_contents.volume = ATMOS_DEFAULT_VOLUME_PUMP + 500 //Give it a small reservoir for injecting. Also allows it to have a higher flow rate limit than vent pumps, to differentiate injectors a bit more.
|
||||
air_contents.volume = ATMOS_DEFAULT_VOLUME_PUMP + 500 //Give it a small reservoir for injecting. Also allows it to have a higher flow rate limit than vent pumps, to differentiate injectors a bit more.
|
||||
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/Destroy()
|
||||
unregister_radio(src, frequency)
|
||||
@@ -60,21 +60,21 @@
|
||||
|
||||
if((stat & (NOPOWER|BROKEN)) || !use_power)
|
||||
return
|
||||
|
||||
|
||||
var/power_draw = -1
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
|
||||
|
||||
if(environment && air_contents.temperature > 0)
|
||||
var/transfer_moles = (volume_rate/air_contents.volume)*air_contents.total_moles //apply flow rate limit
|
||||
power_draw = pump_gas(src, air_contents, environment, transfer_moles, power_rating)
|
||||
|
||||
|
||||
if (power_draw >= 0)
|
||||
last_power_draw = power_draw
|
||||
use_power(power_draw)
|
||||
|
||||
|
||||
if(network)
|
||||
network.update = 1
|
||||
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/proc/inject()
|
||||
@@ -84,7 +84,7 @@
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
if (!environment)
|
||||
return 0
|
||||
|
||||
|
||||
injecting = 1
|
||||
|
||||
if(air_contents.temperature > 0)
|
||||
@@ -155,4 +155,23 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/hide(var/i)
|
||||
update_underlays()
|
||||
update_underlays()
|
||||
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/attack_hand(mob/user as mob)
|
||||
to_chat(user, "<span class='notice'>You toggle \the [src].</span>")
|
||||
injecting = !injecting
|
||||
use_power = injecting
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (!W.is_wrench())
|
||||
return ..()
|
||||
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
|
||||
if (do_after(user, 40 * W.toolspeed))
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
|
||||
"<span class='notice'>You have unfastened \the [src].</span>", \
|
||||
"You hear a ratchet.")
|
||||
deconstruct()
|
||||
Reference in New Issue
Block a user