mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Included: -The process lists use |= instead of += due to the increased stability of the former against double additions. -Atmospherics machinery is moved under the pipenet processing. -Modified the atmospherics processes to return 1 when theyve done something, and 0 if they aint done jack shit. Then called scheck() if they return 1, possibly reducing unnecessary scheck calls while still managing to smooth out the atmospherics processing. -If a powernet happens to get rebuilt by either powernets or power machinery scheck() is also called
102 lines
3.4 KiB
Plaintext
102 lines
3.4 KiB
Plaintext
|
|
/obj/machinery/atmospherics/unary/tank
|
|
icon = 'icons/obj/atmospherics/pipe_tank.dmi'
|
|
icon_state = "intact"
|
|
name = "Pressure Tank"
|
|
desc = "A large vessel containing pressurized gas."
|
|
starting_volume = 2000 //in liters, 1 meters by 1 meters by 2 meters
|
|
dir = SOUTH
|
|
initialize_directions = SOUTH
|
|
density = 1
|
|
|
|
/obj/machinery/atmospherics/unary/tank/process()
|
|
if(!network)
|
|
. = ..()
|
|
atmos_machines.Remove(src)
|
|
/* if(!node1)
|
|
parent.mingle_with_turf(loc, 200)
|
|
if(!nodealert)
|
|
//world << "Missing node from [src] at [src.x],[src.y],[src.z]"
|
|
nodealert = 1
|
|
else if (nodealert)
|
|
nodealert = 0
|
|
*/
|
|
|
|
/obj/machinery/atmospherics/unary/tank/carbon_dioxide
|
|
name = "Pressure Tank (Carbon Dioxide)"
|
|
|
|
/obj/machinery/atmospherics/unary/tank/carbon_dioxide/New()
|
|
..()
|
|
|
|
air_contents.set_gas(CARBON_DIOXIDE, (25*ONE_ATMOSPHERE)*(starting_volume)/(R_IDEAL_GAS_EQUATION*air_contents.temperature), 0)
|
|
|
|
|
|
/obj/machinery/atmospherics/unary/tank/toxins
|
|
icon = 'icons/obj/atmospherics/orange_pipe_tank.dmi'
|
|
name = "Pressure Tank (Plasma)"
|
|
|
|
/obj/machinery/atmospherics/unary/tank/toxins/New()
|
|
..()
|
|
|
|
air_contents.set_gas(PLASMA, (25*ONE_ATMOSPHERE)*(starting_volume)/(R_IDEAL_GAS_EQUATION*air_contents.temperature), 0)
|
|
|
|
/*
|
|
|
|
/obj/machinery/atmospherics/unary/tank/oxygen_agent_b
|
|
icon = 'icons/obj/atmospherics/red_orange_pipe_tank.dmi'
|
|
name = "Pressure Tank (Oxygen + Plasma)"
|
|
|
|
/obj/machinery/atmospherics/unary/tank/oxygen_agent_b/New()
|
|
..()
|
|
|
|
air_contents.set_gas(OXYGEN_AGENT_B, (25*ONE_ATMOSPHERE)*(starting_volume)/(R_IDEAL_GAS_EQUATION*air_contents.temperature), 0)
|
|
*/
|
|
|
|
/obj/machinery/atmospherics/unary/tank/oxygen
|
|
icon = 'icons/obj/atmospherics/blue_pipe_tank.dmi'
|
|
name = "Pressure Tank (Oxygen)"
|
|
|
|
/obj/machinery/atmospherics/unary/tank/oxygen/New()
|
|
..()
|
|
|
|
air_contents.set_gas(OXYGEN, (25*ONE_ATMOSPHERE)*(starting_volume)/(R_IDEAL_GAS_EQUATION*air_contents.temperature), 0)
|
|
|
|
/obj/machinery/atmospherics/unary/tank/nitrogen
|
|
icon = 'icons/obj/atmospherics/red_pipe_tank.dmi'
|
|
name = "Pressure Tank (Nitrogen)"
|
|
|
|
/obj/machinery/atmospherics/unary/tank/nitrogen/New()
|
|
..()
|
|
|
|
air_contents.set_gas(NITROGEN, (25*ONE_ATMOSPHERE)*(starting_volume)/(R_IDEAL_GAS_EQUATION*air_contents.temperature), 0)
|
|
|
|
/obj/machinery/atmospherics/unary/tank/air
|
|
icon = 'icons/obj/atmospherics/red_pipe_tank.dmi'
|
|
name = "Pressure Tank (Air)"
|
|
|
|
/obj/machinery/atmospherics/unary/tank/air/New()
|
|
..()
|
|
|
|
air_contents.set_gas(OXYGEN, (25*ONE_ATMOSPHERE*O2STANDARD)*(starting_volume)/(R_IDEAL_GAS_EQUATION*air_contents.temperature), 0)
|
|
air_contents.set_gas(NITROGEN, (25*ONE_ATMOSPHERE*N2STANDARD)*(starting_volume)/(R_IDEAL_GAS_EQUATION*air_contents.temperature), 0)
|
|
|
|
/obj/machinery/atmospherics/unary/tank/update_icon()
|
|
if(node)
|
|
icon_state = "intact"
|
|
dir = get_dir(src, node)
|
|
else
|
|
icon_state = "exposed"
|
|
|
|
/obj/machinery/atmospherics/unary/tank/disconnect(obj/machinery/atmospherics/reference)
|
|
..()
|
|
update_icon()
|
|
|
|
|
|
/obj/machinery/atmospherics/unary/tank/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
|
if(istype(W, /obj/item/weapon/pipe_dispenser) || istype(W, /obj/item/device/pipe_painter))
|
|
return // Coloring pipes.
|
|
if (istype(W, /obj/item/device/analyzer) && get_dist(user, src) <= 1)
|
|
user.visible_message("<span class='attack'>[user] has used [W] on \icon[icon] [src]</span>", "<span class='attack'>You use \the [W] on \icon[icon] [src]</span>")
|
|
var/obj/item/device/analyzer/analyzer = W
|
|
user.show_message(analyzer.output_gas_scan(air_contents, src, 0), 1)
|