mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 21:19:00 +01:00
Merge branch 'master' into tgglassfloors
This commit is contained in:
@@ -228,7 +228,12 @@
|
||||
for(var/mob/living/L in T)
|
||||
L.adjust_fire_stacks(3)
|
||||
L.IgniteMob()
|
||||
L.bodytemperature = max(temp / 3, L.bodytemperature)
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/M = L
|
||||
var/heatBlockPercent = 1 - M.get_heat_protection(temp)
|
||||
M.bodytemperature += (temp - M.bodytemperature) * heatBlockPercent / 3
|
||||
else
|
||||
L.bodytemperature = (2 * L.bodytemperature + temp) / 3
|
||||
|
||||
/proc/fireflash_s(atom/center, radius, temp, falloff)
|
||||
if(temp < T0C + 60)
|
||||
@@ -291,7 +296,12 @@
|
||||
for(var/mob/living/L in T)
|
||||
L.adjust_fire_stacks(3)
|
||||
L.IgniteMob()
|
||||
L.bodytemperature = (2 * L.bodytemperature + temp) / 3
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/M = L
|
||||
var/heatBlockPercent = 1 - M.get_heat_protection(temp)
|
||||
M.bodytemperature += (temp - M.bodytemperature) * heatBlockPercent / 3
|
||||
else
|
||||
L.bodytemperature = (2 * L.bodytemperature + temp) / 3
|
||||
|
||||
if(T.density)
|
||||
continue
|
||||
|
||||
@@ -112,6 +112,7 @@
|
||||
|
||||
var/target_temperature = T20C
|
||||
var/regulating_temperature = 0
|
||||
var/thermostat_state = FALSE
|
||||
|
||||
var/list/TLV = list()
|
||||
|
||||
@@ -329,8 +330,8 @@
|
||||
var/datum/gas_mixture/gas = location.remove_air(0.25 * environment.total_moles())
|
||||
if(!gas)
|
||||
return
|
||||
if(!regulating_temperature)
|
||||
regulating_temperature = 1
|
||||
if(!regulating_temperature && thermostat_state == TRUE)
|
||||
regulating_temperature = TRUE
|
||||
visible_message("\The [src] clicks as it starts [environment.temperature > target_temperature ? "cooling" : "heating"] the room.", "You hear a click and a faint electronic hum.")
|
||||
|
||||
if(target_temperature > MAX_TEMPERATURE)
|
||||
@@ -339,25 +340,26 @@
|
||||
if(target_temperature < MIN_TEMPERATURE)
|
||||
target_temperature = MIN_TEMPERATURE
|
||||
|
||||
var/heat_capacity = gas.heat_capacity()
|
||||
var/energy_used = max(abs(heat_capacity * (gas.temperature - target_temperature) ), MAX_ENERGY_CHANGE)
|
||||
if(thermostat_state == TRUE)
|
||||
var/heat_capacity = gas.heat_capacity()
|
||||
var/energy_used = max(abs(heat_capacity * (gas.temperature - target_temperature) ), MAX_ENERGY_CHANGE)
|
||||
|
||||
//Use power. Assuming that each power unit represents 1000 watts....
|
||||
use_power(energy_used/1000, ENVIRON)
|
||||
//Use power. Assuming that each power unit represents 1000 watts....
|
||||
use_power(energy_used / 1000, ENVIRON)
|
||||
|
||||
//We need to cool ourselves.
|
||||
if(heat_capacity)
|
||||
if(environment.temperature > target_temperature)
|
||||
gas.temperature -= energy_used / heat_capacity
|
||||
else
|
||||
gas.temperature += energy_used / heat_capacity
|
||||
//We need to cool ourselves.
|
||||
if(heat_capacity)
|
||||
if(environment.temperature > target_temperature)
|
||||
gas.temperature -= energy_used / heat_capacity
|
||||
else
|
||||
gas.temperature += energy_used / heat_capacity
|
||||
|
||||
if(abs(environment.temperature - target_temperature) <= 0.5)
|
||||
regulating_temperature = FALSE
|
||||
visible_message("[src] clicks quietly as it stops [environment.temperature > target_temperature ? "cooling" : "heating"] the room.", "You hear a click as a faint electronic humming stops.")
|
||||
|
||||
environment.merge(gas)
|
||||
|
||||
if(abs(environment.temperature - target_temperature) <= 0.5)
|
||||
regulating_temperature = 0
|
||||
visible_message("\The [src] clicks quietly as it stops [environment.temperature > target_temperature ? "cooling" : "heating"] the room.", "You hear a click as a faint electronic humming stops.")
|
||||
|
||||
/obj/machinery/alarm/update_icon()
|
||||
if(wiresexposed)
|
||||
icon_state = "alarmx"
|
||||
@@ -642,6 +644,7 @@
|
||||
data["pressure"] = environment_pressure
|
||||
data["temperature"] = environment.temperature
|
||||
data["temperature_c"] = round(environment.temperature - T0C, 0.1)
|
||||
data["thermostat_state"] = thermostat_state
|
||||
|
||||
var/list/percentages = list()
|
||||
percentages["oxygen"] = oxygen_percent
|
||||
@@ -931,6 +934,8 @@
|
||||
else
|
||||
target_temperature = input_temperature
|
||||
|
||||
if("thermostat_state")
|
||||
thermostat_state = !thermostat_state
|
||||
|
||||
/obj/machinery/alarm/emag_act(mob/user)
|
||||
if(!emagged)
|
||||
|
||||
@@ -20,7 +20,10 @@ Pipelines + Other Objects -> Pipe network
|
||||
on_blueprints = TRUE
|
||||
var/nodealert = 0
|
||||
var/can_unwrench = 0
|
||||
|
||||
/// If the machine is currently operating or not.
|
||||
var/on = FALSE
|
||||
/// The amount of pressure the machine wants to operate at.
|
||||
var/target_pressure = 0
|
||||
var/connect_types[] = list(1) //1=regular, 2=supply, 3=scrubber
|
||||
var/connected_to = 1 //same as above, currently not used for anything
|
||||
var/icon_connect_type = "" //"-supply" or "-scrubbers"
|
||||
@@ -373,3 +376,35 @@ Pipelines + Other Objects -> Pipe network
|
||||
//Used for certain children of obj/machinery/atmospherics to not show pipe vision when mob is inside it.
|
||||
/obj/machinery/atmospherics/proc/can_see_pipes()
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
* Turns the machine either on, or off. If this is done by a user, display a message to them.
|
||||
*
|
||||
* NOTE: Only applies to atmospherics machines which can be toggled on or off, such as pumps, or other devices.
|
||||
*
|
||||
* Arguments:
|
||||
* * user - the mob who is toggling the machine.
|
||||
*/
|
||||
/obj/machinery/atmospherics/proc/toggle(mob/living/user)
|
||||
if(!powered())
|
||||
return
|
||||
on = !on
|
||||
update_icon()
|
||||
if(user)
|
||||
to_chat(user, "<span class='notice'>You toggle [src] [on ? "on" : "off"].</span>")
|
||||
|
||||
/**
|
||||
* Maxes the output pressure of the machine. If this is done by a user, display a message to them.
|
||||
*
|
||||
* NOTE: Only applies to atmospherics machines which allow a `target_pressure` to be set, such as pumps, or other devices.
|
||||
*
|
||||
* Arguments:
|
||||
* * user - the mob who is setting the output pressure to maximum.
|
||||
*/
|
||||
/obj/machinery/atmospherics/proc/set_max(mob/living/user)
|
||||
if(!powered())
|
||||
return
|
||||
target_pressure = MAX_OUTPUT_PRESSURE
|
||||
update_icon()
|
||||
if(user)
|
||||
to_chat(user, "<span class='notice'>You set the target pressure of [src] to maximum.</span>")
|
||||
|
||||
@@ -16,6 +16,10 @@
|
||||
can_unwrench = 1
|
||||
var/side_inverted = 0
|
||||
|
||||
/obj/machinery/atmospherics/binary/circulator/detailed_examine()
|
||||
return "This generates electricity, depending on the difference in temperature between each side of the machine. The meter in \
|
||||
the center of the machine gives an indicator of how much electricity is being generated."
|
||||
|
||||
// Creating a custom circulator pipe subtype to be delivered through cargo
|
||||
/obj/item/pipe/circulator
|
||||
name = "circulator/heat exchanger fitting"
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
connect_types = list(1,2,3) //connects to regular, supply and scrubbers pipes
|
||||
|
||||
var/on = 0
|
||||
var/pump_direction = 1 //0 = siphoning, 1 = releasing
|
||||
|
||||
var/external_pressure_bound = ONE_ATMOSPHERE
|
||||
@@ -206,23 +205,23 @@
|
||||
pump_direction = 1
|
||||
|
||||
if(signal.data["set_input_pressure"] != null)
|
||||
input_pressure_min = between(
|
||||
0,
|
||||
input_pressure_min = clamp(
|
||||
text2num(signal.data["set_input_pressure"]),
|
||||
0,
|
||||
ONE_ATMOSPHERE*50
|
||||
)
|
||||
|
||||
if(signal.data["set_output_pressure"] != null)
|
||||
output_pressure_max = between(
|
||||
0,
|
||||
output_pressure_max = clamp(
|
||||
text2num(signal.data["set_output_pressure"]),
|
||||
0,
|
||||
ONE_ATMOSPHERE*50
|
||||
)
|
||||
|
||||
if(signal.data["set_external_pressure"] != null)
|
||||
external_pressure_bound = between(
|
||||
0,
|
||||
external_pressure_bound = clamp(
|
||||
text2num(signal.data["set_external_pressure"]),
|
||||
0,
|
||||
ONE_ATMOSPHERE*50
|
||||
)
|
||||
|
||||
|
||||
@@ -9,11 +9,13 @@
|
||||
|
||||
can_unwrench = 1
|
||||
|
||||
var/on = 0
|
||||
var/target_pressure = ONE_ATMOSPHERE
|
||||
target_pressure = ONE_ATMOSPHERE
|
||||
|
||||
var/id = null
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/detailed_examine()
|
||||
return "This is a one-way regulator, allowing gas to flow only at a specific pressure and flow rate. If the light is green, it is flowing."
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/atmos_init()
|
||||
..()
|
||||
if(frequency)
|
||||
@@ -100,9 +102,9 @@
|
||||
on = !on
|
||||
|
||||
if("set_output_pressure" in signal.data)
|
||||
target_pressure = between(
|
||||
0,
|
||||
target_pressure = clamp(
|
||||
text2num(signal.data["set_output_pressure"]),
|
||||
0,
|
||||
ONE_ATMOSPHERE*50
|
||||
)
|
||||
|
||||
@@ -171,11 +173,6 @@
|
||||
if(.)
|
||||
investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", "atmos")
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/proc/toggle()
|
||||
if(powered())
|
||||
on = !on
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/attackby(obj/item/W, mob/user, params)
|
||||
if(!istype(W, /obj/item/wrench))
|
||||
return ..()
|
||||
|
||||
@@ -21,50 +21,31 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
can_unwrench = 1
|
||||
|
||||
var/on = 0
|
||||
var/target_pressure = ONE_ATMOSPHERE
|
||||
target_pressure = ONE_ATMOSPHERE
|
||||
|
||||
var/id = null
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/detailed_examine()
|
||||
return "This moves gas from one pipe to another. A higher target pressure demands more energy. The side with the red end is the output."
|
||||
|
||||
// So we can CtrlClick without triggering the anchored message.
|
||||
/obj/machinery/atmospherics/binary/pump/can_be_pulled(user, grab_state, force, show_message)
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/CtrlClick(mob/living/user)
|
||||
if(!istype(user) || user.incapacitated())
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
if(!in_range(src, user) && !issilicon(usr))
|
||||
return
|
||||
if(!ishuman(usr) && !issilicon(usr))
|
||||
return
|
||||
toggle()
|
||||
if(can_use_shortcut(user))
|
||||
toggle(user)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/AICtrlClick()
|
||||
toggle()
|
||||
return ..()
|
||||
/obj/machinery/atmospherics/binary/pump/AICtrlClick(mob/living/silicon/user)
|
||||
toggle(user)
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/AltClick(mob/living/user)
|
||||
if(!istype(user) || user.incapacitated())
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
if(!in_range(src, user) && !issilicon(usr))
|
||||
return
|
||||
if(!ishuman(usr) && !issilicon(usr))
|
||||
return
|
||||
set_max()
|
||||
return
|
||||
if(can_use_shortcut(user))
|
||||
set_max(user)
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/AIAltClick()
|
||||
set_max()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/proc/toggle()
|
||||
if(powered())
|
||||
on = !on
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/proc/set_max()
|
||||
if(powered())
|
||||
target_pressure = MAX_OUTPUT_PRESSURE
|
||||
update_icon()
|
||||
/obj/machinery/atmospherics/binary/pump/AIAltClick(mob/living/silicon/user)
|
||||
set_max(user)
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/Destroy()
|
||||
if(SSradio)
|
||||
@@ -155,9 +136,9 @@ Thus, the two variables affect pump operation are set in New():
|
||||
on = !on
|
||||
|
||||
if(signal.data["set_output_pressure"])
|
||||
target_pressure = between(
|
||||
0,
|
||||
target_pressure = clamp(
|
||||
text2num(signal.data["set_output_pressure"]),
|
||||
0,
|
||||
ONE_ATMOSPHERE*50
|
||||
)
|
||||
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
|
||||
req_one_access_txt = "24;10"
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve/detailed_examine()
|
||||
return "Click this to turn the valve. If red, the pipes on each end are separated. Otherwise, they are connected."
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve/open
|
||||
open = 1
|
||||
icon_state = "map_valve1"
|
||||
|
||||
@@ -21,50 +21,28 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
can_unwrench = 1
|
||||
|
||||
var/on = 0
|
||||
var/transfer_rate = 200
|
||||
|
||||
var/id = null
|
||||
|
||||
// So we can CtrlClick without triggering the anchored message.
|
||||
/obj/machinery/atmospherics/binary/volume_pump/can_be_pulled(user, grab_state, force, show_message)
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/CtrlClick(mob/living/user)
|
||||
if(!istype(user) || user.incapacitated())
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
if(!in_range(src, user) && !issilicon(usr))
|
||||
return
|
||||
if(!ishuman(usr) && !issilicon(usr))
|
||||
return
|
||||
toggle()
|
||||
if(can_use_shortcut(user))
|
||||
toggle(user)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/AICtrlClick()
|
||||
toggle()
|
||||
return ..()
|
||||
/obj/machinery/atmospherics/binary/volume_pump/AICtrlClick(mob/living/silicon/user)
|
||||
toggle(user)
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/AltClick(mob/living/user)
|
||||
if(!istype(user) || user.incapacitated())
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
if(!in_range(src, user) && !issilicon(usr))
|
||||
return
|
||||
if(!ishuman(usr) && !issilicon(usr))
|
||||
return
|
||||
set_max()
|
||||
return
|
||||
if(can_use_shortcut(user))
|
||||
set_max(user)
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/AIAltClick()
|
||||
set_max()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/proc/toggle()
|
||||
if(powered())
|
||||
on = !on
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/proc/set_max()
|
||||
if(powered())
|
||||
transfer_rate = MAX_TRANSFER_RATE
|
||||
update_icon()
|
||||
/obj/machinery/atmospherics/binary/volume_pump/AIAltClick(mob/living/silicon/user)
|
||||
set_max(user)
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/Destroy()
|
||||
if(SSradio)
|
||||
@@ -153,9 +131,9 @@ Thus, the two variables affect pump operation are set in New():
|
||||
on = !on
|
||||
|
||||
if(signal.data["set_transfer_rate"])
|
||||
transfer_rate = between(
|
||||
0,
|
||||
transfer_rate = clamp(
|
||||
text2num(signal.data["set_transfer_rate"]),
|
||||
0,
|
||||
air1.volume
|
||||
)
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
icon = 'icons/atmos/filter.dmi'
|
||||
icon_state = "map"
|
||||
can_unwrench = TRUE
|
||||
/// The amount of pressure the filter wants to operate at.
|
||||
var/target_pressure = ONE_ATMOSPHERE
|
||||
|
||||
target_pressure = ONE_ATMOSPHERE
|
||||
/// The type of gas we want to filter. Valid values that go here are from the `FILTER` defines at the top of the file.
|
||||
var/filter_type = FILTER_TOXINS
|
||||
/// A list of available filter options. Used with `ui_data`.
|
||||
@@ -31,45 +31,24 @@
|
||||
"N2O" = FILTER_N2O
|
||||
)
|
||||
|
||||
// So we can CtrlClick without triggering the anchored message.
|
||||
/obj/machinery/atmospherics/trinary/filter/can_be_pulled(user, grab_state, force, show_message)
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/atmospherics/trinary/filter/CtrlClick(mob/living/user)
|
||||
if(!istype(user) || user.incapacitated())
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
if(!in_range(src, user) && !issilicon(usr))
|
||||
return
|
||||
if(!ishuman(usr) && !issilicon(usr))
|
||||
return
|
||||
toggle()
|
||||
if(can_use_shortcut(user))
|
||||
toggle(user)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/trinary/filter/AICtrlClick()
|
||||
toggle()
|
||||
return ..()
|
||||
/obj/machinery/atmospherics/trinary/filter/AICtrlClick(mob/living/silicon/user)
|
||||
toggle(user)
|
||||
|
||||
/obj/machinery/atmospherics/trinary/filter/AltClick(mob/living/user)
|
||||
if(!istype(user) || user.incapacitated())
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
if(!in_range(src, user) && !issilicon(usr))
|
||||
return
|
||||
if(!ishuman(usr) && !issilicon(usr))
|
||||
return
|
||||
set_max()
|
||||
return
|
||||
if(can_use_shortcut(user))
|
||||
set_max(user)
|
||||
|
||||
/obj/machinery/atmospherics/trinary/filter/AIAltClick()
|
||||
set_max()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/trinary/filter/proc/toggle()
|
||||
if(powered())
|
||||
on = !on
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/trinary/filter/proc/set_max()
|
||||
if(powered())
|
||||
target_pressure = MAX_OUTPUT_PRESSURE
|
||||
update_icon()
|
||||
/obj/machinery/atmospherics/trinary/filter/AIAltClick(mob/living/silicon/user)
|
||||
set_max(user)
|
||||
|
||||
/obj/machinery/atmospherics/trinary/filter/Destroy()
|
||||
if(SSradio)
|
||||
|
||||
@@ -6,56 +6,35 @@
|
||||
|
||||
name = "gas mixer"
|
||||
|
||||
var/target_pressure = ONE_ATMOSPHERE
|
||||
target_pressure = ONE_ATMOSPHERE
|
||||
var/node1_concentration = 0.5
|
||||
var/node2_concentration = 0.5
|
||||
|
||||
//node 3 is the outlet, nodes 1 & 2 are intakes
|
||||
|
||||
// So we can CtrlClick without triggering the anchored message.
|
||||
/obj/machinery/atmospherics/trinary/mixer/can_be_pulled(user, grab_state, force, show_message)
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/atmospherics/trinary/mixer/CtrlClick(mob/living/user)
|
||||
if(!istype(user) || user.incapacitated())
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
if(!in_range(src, user) && !issilicon(usr))
|
||||
return
|
||||
if(!ishuman(usr) && !issilicon(usr))
|
||||
return
|
||||
toggle()
|
||||
if(can_use_shortcut(user))
|
||||
toggle(user)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/trinary/mixer/AICtrlClick()
|
||||
toggle()
|
||||
return ..()
|
||||
/obj/machinery/atmospherics/trinary/mixer/AICtrlClick(mob/living/silicon/user)
|
||||
toggle(user)
|
||||
|
||||
/obj/machinery/atmospherics/trinary/mixer/AltClick(mob/living/user)
|
||||
if(!istype(user) || user.incapacitated())
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
if(!in_range(src, user) && !issilicon(usr))
|
||||
return
|
||||
if(!ishuman(usr) && !issilicon(usr))
|
||||
return
|
||||
set_max()
|
||||
return
|
||||
if(can_use_shortcut(user))
|
||||
set_max(user)
|
||||
|
||||
/obj/machinery/atmospherics/trinary/mixer/AIAltClick()
|
||||
set_max()
|
||||
return ..()
|
||||
/obj/machinery/atmospherics/trinary/mixer/AIAltClick(mob/living/silicon/user)
|
||||
set_max(user)
|
||||
|
||||
/obj/machinery/atmospherics/trinary/mixer/flipped
|
||||
icon_state = "mmap"
|
||||
flipped = 1
|
||||
|
||||
/obj/machinery/atmospherics/trinary/mixer/proc/toggle()
|
||||
if(powered())
|
||||
on = !on
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/trinary/mixer/proc/set_max()
|
||||
if(powered())
|
||||
target_pressure = MAX_OUTPUT_PRESSURE
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/trinary/mixer/update_icon(safety = 0)
|
||||
..()
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
initialize_directions = SOUTH|NORTH|WEST
|
||||
use_power = IDLE_POWER_USE
|
||||
|
||||
var/on = 0
|
||||
layer = GAS_FILTER_LAYER
|
||||
|
||||
var/datum/gas_mixture/air1
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
|
||||
var/state = TVALVE_STATE_STRAIGHT
|
||||
|
||||
/obj/machinery/atmospherics/trinary/tvalve/detailed_examine()
|
||||
return "Click this to toggle the mode. The direction with the green light is where the gas will flow."
|
||||
|
||||
/obj/machinery/atmospherics/trinary/tvalve/bypass
|
||||
icon_state = "map_tvalve1"
|
||||
state = TVALVE_STATE_SIDE
|
||||
|
||||
@@ -13,12 +13,11 @@
|
||||
interact_offline = 1
|
||||
max_integrity = 350
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 30, "acid" = 30)
|
||||
var/on = FALSE
|
||||
var/temperature_archived
|
||||
var/mob/living/carbon/occupant = null
|
||||
var/obj/item/reagent_containers/glass/beaker = null
|
||||
/// Holds two bitflags, AUTO_EJECT_DEAD and AUTO_EJECT_HEALTHY. Used to determine if the cryo cell will auto-eject dead and/or completely health patients.
|
||||
var/auto_eject_prefs = NONE
|
||||
/// Holds two bitflags, AUTO_EJECT_DEAD and AUTO_EJECT_HEALTHY. Used to determine if the cryo cell will auto-eject dead and/or completely healthy patients.
|
||||
var/auto_eject_prefs = AUTO_EJECT_HEALTHY | AUTO_EJECT_DEAD
|
||||
|
||||
var/next_trans = 0
|
||||
var/current_heat_capacity = 50
|
||||
@@ -28,6 +27,23 @@
|
||||
|
||||
light_color = LIGHT_COLOR_WHITE
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/detailed_examine()
|
||||
return "The cryogenic chamber, or 'cryo', treats most damage types, most notably genetic damage. It also stabilizes patients \
|
||||
in critical condition by placing them in stasis, so they can be treated at a later time.<br>\
|
||||
<br>\
|
||||
In order for it to work, it must be loaded with chemicals, and the temperature of the solution must reach a certain point. Additionally, it \
|
||||
requires a supply of pure oxygen, provided by canisters that are attached. The most commonly used chemicals in the chambers is Cryoxadone, which \
|
||||
heals most damage types including genetic damage.<br>\
|
||||
<br>\
|
||||
Activating the freezer nearby, and setting it to a temperature setting below 150, is recommended before operation! Further, any clothing the patient \
|
||||
is wearing that act as an insulator will reduce its effectiveness, and should be removed.<br>\
|
||||
<br>\
|
||||
Clicking the tube with a beaker full of chemicals in hand will place it in its storage to distribute when it is activated.<br>\
|
||||
<br>\
|
||||
Click your target with Grab intent, then click on the tube, with an empty hand, to place them in it. Click the tube again to open the menu. \
|
||||
Press the button on the menu to activate it. Once they have reached 100 health, right-click the cell and click 'Eject Occupant' to remove them. \
|
||||
Remember to turn it off, once you've finished, to save power and chemicals!"
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/power_change()
|
||||
..()
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
|
||||
req_one_access_txt = "24;10"
|
||||
|
||||
var/on = 0
|
||||
var/injecting = 0
|
||||
|
||||
var/volume_rate = 50
|
||||
@@ -30,6 +29,10 @@
|
||||
if(id && !id_tag)//I'm not dealing with any more merge conflicts
|
||||
id_tag = id
|
||||
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/detailed_examine()
|
||||
return "Outputs the pipe's gas into the atmosphere, similar to an air vent. It can be controlled by a nearby atmospherics computer. \
|
||||
A green light on it means it is on."
|
||||
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/Destroy()
|
||||
if(SSradio)
|
||||
SSradio.remove_object(src, frequency)
|
||||
@@ -135,7 +138,7 @@
|
||||
|
||||
if(signal.data["set_volume_rate"] != null)
|
||||
var/number = text2num(signal.data["set_volume_rate"])
|
||||
volume_rate = between(0, number, air_contents.volume)
|
||||
volume_rate = clamp(number, 0, air_contents.volume)
|
||||
|
||||
if(signal.data["status"])
|
||||
broadcast_status()
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
dir = SOUTH
|
||||
initialize_directions = SOUTH
|
||||
|
||||
var/on = 0
|
||||
|
||||
var/oxygen_content = 10
|
||||
|
||||
/obj/machinery/atmospherics/unary/oxygen_generator/update_icon()
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
if(!node)
|
||||
return 0
|
||||
|
||||
var/turf/T = loc
|
||||
if(T.density) //No, you should not be able to get free air from walls
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
|
||||
var/pressure_delta = air_contents.return_pressure() - environment.return_pressure()
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
|
||||
var/obj/machinery/portable_atmospherics/connected_device
|
||||
|
||||
var/on = 0
|
||||
|
||||
/obj/machinery/atmospherics/unary/portables_connector/Destroy()
|
||||
if(connected_device)
|
||||
connected_device.disconnect()
|
||||
|
||||
@@ -10,9 +10,6 @@
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 30)
|
||||
layer = OBJ_LAYER
|
||||
|
||||
///Check if the device should be on or off
|
||||
var/on = FALSE
|
||||
|
||||
var/icon_state_off = "freezer"
|
||||
var/icon_state_on = "freezer_1"
|
||||
var/icon_state_open = "freezer-o"
|
||||
@@ -40,6 +37,11 @@
|
||||
RefreshParts()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/unary/thermomachine/detailed_examine()
|
||||
return "Cools or heats the gas of the pipe it is connected to. It uses massive amounts of electricity while on. \
|
||||
It can be upgraded by replacing the capacitors, manipulators, and matter bins. It can be deconstructed by screwing the maintenance panel open with a \
|
||||
screwdriver, and then using a crowbar."
|
||||
|
||||
/obj/machinery/atmospherics/unary/thermomachine/proc/swap_function()
|
||||
cooling = !cooling
|
||||
if(cooling)
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
req_one_access_txt = "24;10"
|
||||
|
||||
var/on = 0
|
||||
var/pump_direction = 1 //0 = siphoning, 1 = releasing
|
||||
|
||||
var/external_pressure_bound = EXTERNAL_PRESSURE_BOUND
|
||||
@@ -47,6 +46,9 @@
|
||||
|
||||
connect_types = list(1,2) //connects to regular and supply pipes
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_pump/detailed_examine()
|
||||
return "This pumps the contents of the attached pipe out into the atmosphere, if needed. It can be controlled from an Air Alarm."
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_pump/on
|
||||
on = 1
|
||||
icon_state = "map_vent_out"
|
||||
@@ -128,6 +130,9 @@
|
||||
..()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return FALSE
|
||||
var/turf/T = loc
|
||||
if(T.density) //No, you should not be able to get free air from walls
|
||||
return
|
||||
if(!node)
|
||||
on = FALSE
|
||||
//broadcast_status() // from now air alarm/control computer should request update purposely --rastaf0
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
var/list/turf/simulated/adjacent_turfs = list()
|
||||
|
||||
var/on = 0
|
||||
var/scrubbing = 1 //0 = siphoning, 1 = scrubbing
|
||||
var/scrub_O2 = 0
|
||||
var/scrub_N2 = 0
|
||||
@@ -51,6 +50,10 @@
|
||||
assign_uid()
|
||||
id_tag = num2text(uid)
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/detailed_examine()
|
||||
return "This filters the atmosphere of harmful gas. Filtered gas goes to the pipes connected to it, typically a scrubber pipe. \
|
||||
It can be controlled from an Air Alarm. It can be configured to drain all air rapidly with a 'panic syphon' from an air alarm."
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/Destroy()
|
||||
if(initial_loc && frequency == ATMOS_VENTSCRUB)
|
||||
initial_loc.air_scrub_info -= id_tag
|
||||
@@ -193,6 +196,10 @@
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
var/turf/T = loc
|
||||
if(T.density) //No, you should not be able to get free air from walls
|
||||
return
|
||||
|
||||
if(!node)
|
||||
on = 0
|
||||
|
||||
|
||||
@@ -39,6 +39,9 @@
|
||||
if(!target)
|
||||
target = locate(/obj/machinery/atmospherics/pipe) in loc
|
||||
|
||||
/obj/machinery/meter/detailed_examine()
|
||||
return "Measures the volume and temperature of the pipe under the meter."
|
||||
|
||||
/obj/machinery/meter/process_atmos()
|
||||
if(!target)
|
||||
icon_state = "meterX"
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
..()
|
||||
initialize_directions = dir
|
||||
|
||||
/obj/machinery/atmospherics/pipe/cap/detailed_examine()
|
||||
return "This is a cosmetic attachment, as pipes currently do not spill their contents into the air."
|
||||
|
||||
/obj/machinery/atmospherics/pipe/cap/hide(i)
|
||||
if(level == 1 && istype(loc, /turf/simulated))
|
||||
invisibility = i ? INVISIBILITY_MAXIMUM : 0
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
level = 1
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/New()
|
||||
|
||||
..()
|
||||
|
||||
alpha = 255
|
||||
@@ -31,6 +30,9 @@
|
||||
if(WEST)
|
||||
initialize_directions = NORTH|EAST|SOUTH
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/detailed_examine()
|
||||
return "A normal pipe with three ends to connect to."
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/atmos_init()
|
||||
..()
|
||||
for(var/D in GLOB.cardinal)
|
||||
@@ -170,6 +172,10 @@
|
||||
icon_connect_type = "-scrubbers"
|
||||
color = PIPE_COLOR_RED
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/visible/scrubbers/detailed_examine()
|
||||
return "This is a special 'scrubber' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \
|
||||
a Universal Adapter pipe."
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/visible/supply
|
||||
name="Air supply pipe manifold"
|
||||
desc = "A manifold composed of supply pipes"
|
||||
@@ -179,6 +185,10 @@
|
||||
icon_connect_type = "-supply"
|
||||
color = PIPE_COLOR_BLUE
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/visible/supply/detailed_examine()
|
||||
return "This is a special 'supply' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \
|
||||
a Universal Adapter pipe."
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/visible/yellow
|
||||
color = PIPE_COLOR_YELLOW
|
||||
|
||||
@@ -211,6 +221,10 @@
|
||||
icon_connect_type = "-scrubbers"
|
||||
color = PIPE_COLOR_RED
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers/detailed_examine()
|
||||
return "This is a special 'scrubber' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \
|
||||
a Universal Adapter pipe."
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/hidden/supply
|
||||
name="Air supply pipe manifold"
|
||||
desc = "A manifold composed of supply pipes"
|
||||
@@ -220,6 +234,10 @@
|
||||
icon_connect_type = "-supply"
|
||||
color = PIPE_COLOR_BLUE
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/hidden/supply/detailed_examine()
|
||||
return "This is a special 'supply' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \
|
||||
a Universal Adapter pipe."
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/hidden/yellow
|
||||
color = PIPE_COLOR_YELLOW
|
||||
|
||||
|
||||
@@ -21,6 +21,9 @@
|
||||
alpha = 255
|
||||
icon = null
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/detailed_examine()
|
||||
return "This is a four-way pipe."
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/pipeline_expansion()
|
||||
return list(node1, node2, node3, node4)
|
||||
|
||||
@@ -179,6 +182,10 @@
|
||||
icon_connect_type = "-scrubbers"
|
||||
color = PIPE_COLOR_RED
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/visible/scrubbers/detailed_examine()
|
||||
return "This is a special 'scrubber' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \
|
||||
a Universal Adapter pipe."
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/visible/supply
|
||||
name="4-way air supply pipe manifold"
|
||||
desc = "A manifold composed of supply pipes"
|
||||
@@ -188,6 +195,10 @@
|
||||
icon_connect_type = "-supply"
|
||||
color = PIPE_COLOR_BLUE
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/visible/supply/detailed_examine()
|
||||
return "This is a special 'supply' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \
|
||||
a Universal Adapter pipe."
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/visible/yellow
|
||||
color = PIPE_COLOR_YELLOW
|
||||
|
||||
@@ -214,6 +225,10 @@
|
||||
icon_connect_type = "-scrubbers"
|
||||
color = PIPE_COLOR_RED
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/hidden/scrubbers/detailed_examine()
|
||||
return "This is a special 'scrubber' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \
|
||||
a Universal Adapter pipe."
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/hidden/supply
|
||||
name="4-way air supply pipe manifold"
|
||||
desc = "A manifold composed of supply pipes"
|
||||
@@ -223,6 +238,10 @@
|
||||
icon_connect_type = "-supply"
|
||||
color = PIPE_COLOR_BLUE
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/hidden/supply/detailed_examine()
|
||||
return "This is a special 'supply' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \
|
||||
a Universal Adapter pipe."
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/hidden/yellow
|
||||
color = PIPE_COLOR_YELLOW
|
||||
|
||||
|
||||
@@ -36,6 +36,12 @@
|
||||
qdel(parent)
|
||||
parent = null
|
||||
|
||||
/obj/machinery/atmospherics/pipe/detailed_examine()
|
||||
return "This pipe, and all other pipes, can be connected or disconnected by a wrench. The internal pressure of the pipe must \
|
||||
be below 300 kPa to do this. More pipes can be obtained from the pipe dispenser.<br> \
|
||||
Most pipes and atmospheric devices can be connected or disconnected with a wrench. The pipe's pressure must not be too high, \
|
||||
or if it is a device, it must be turned off first."
|
||||
|
||||
/obj/machinery/atmospherics/pipe/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/analyzer))
|
||||
atmosanalyzer_scan(parent.air, user)
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
var/icon_temperature = T20C //stop small changes in temperature causing icon refresh
|
||||
resistance_flags = LAVA_PROOF | FIRE_PROOF
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/detailed_examine()
|
||||
return "This radiates heat from the pipe's gas to space, cooling it down."
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/process_atmos()
|
||||
var/environment_temperature = 0
|
||||
var/datum/gas_mixture/pipe_air = return_air()
|
||||
|
||||
@@ -12,6 +12,10 @@
|
||||
icon_connect_type = "-scrubbers"
|
||||
color = PIPE_COLOR_RED
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers/detailed_examine()
|
||||
return "This is a special 'scrubber' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \
|
||||
a Universal Adapter pipe."
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/supply
|
||||
name = "Air supply pipe"
|
||||
desc = "A one meter section of supply pipe"
|
||||
@@ -21,12 +25,19 @@
|
||||
icon_connect_type = "-supply"
|
||||
color = PIPE_COLOR_BLUE
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/supply/detailed_examine()
|
||||
return "This is a special 'supply' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \
|
||||
a Universal Adapter pipe."
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/universal
|
||||
name="Universal pipe adapter"
|
||||
desc = "An adapter for regular, supply and scrubbers pipes"
|
||||
connect_types = list(1,2,3)
|
||||
icon_state = "map_universal"
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/universal/detailed_examine()
|
||||
return "This allows you to connect 'normal' pipes, red 'scrubber' pipes, and blue 'supply' pipes."
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/universal/update_icon(safety = 0)
|
||||
..()
|
||||
|
||||
|
||||
@@ -9,3 +9,6 @@
|
||||
alert_pressure = 900*ONE_ATMOSPHERE
|
||||
|
||||
level = 2
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/insulated/detailed_examine()
|
||||
return "This is completely useless, use a normal pipe." //Sorry, but it's true.
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
icon_connect_type = "-scrubbers"
|
||||
color = PIPE_COLOR_RED
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/visible/scrubbers/detailed_examine()
|
||||
return "This is a special 'scrubber' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \
|
||||
a Universal Adapter pipe."
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/visible/supply
|
||||
name = "Air supply pipe"
|
||||
desc = "A one meter section of supply pipe"
|
||||
@@ -20,6 +24,10 @@
|
||||
icon_connect_type = "-supply"
|
||||
color = PIPE_COLOR_BLUE
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/visible/supply/detailed_examine()
|
||||
return "This is a special 'supply' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \
|
||||
a Universal Adapter pipe."
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/visible/yellow
|
||||
color = PIPE_COLOR_YELLOW
|
||||
|
||||
@@ -44,6 +52,9 @@
|
||||
connect_types = list(1,2,3)
|
||||
icon_state = "map_universal"
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/visible/universal/detailed_examine()
|
||||
return "This allows you to connect 'normal' pipes, red 'scrubber' pipes, and blue 'supply' pipes."
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/visible/universal/update_icon(safety = 0)
|
||||
..()
|
||||
|
||||
|
||||
@@ -101,6 +101,14 @@ GLOBAL_DATUM_INIT(canister_icon_container, /datum/canister_icons, new())
|
||||
color_index = list()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/detailed_examine()
|
||||
return "The canister can be connected to a connector port with a wrench. Tanks of gas (the kind you can hold in your hand) \
|
||||
can be filled by the canister, by using the tank on the canister, increasing the release pressure, then opening the valve until it is full, and then close it. \
|
||||
*DO NOT* remove the tank until the valve is closed. A gas analyzer can be used to check the contents of the canister."
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/detailed_examine_antag()
|
||||
return "Canisters can be damaged, spilling their contents into the air, or you can just leave the release valve open."
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/proc/check_change()
|
||||
var/old_flag = update_flag
|
||||
update_flag = 0
|
||||
|
||||
@@ -19,6 +19,11 @@
|
||||
/// The desired pressure the pump should be outputting, either into the atmosphere, or into a holding tank.
|
||||
var/target_pressure = 101.325
|
||||
|
||||
/obj/machinery/portable_atmospherics/pump/detailed_examine()
|
||||
return "Invaluable for filling air in a room rapidly after a breach repair. The internal gas container can be filled by \
|
||||
connecting it to a connector port. The pump can pump the air in (sucking) or out (blowing), at a specific target pressure. The powercell inside can be \
|
||||
replaced by using a screwdriver, and then adding a new cell. A tank of gas can also be attached to the air pump."
|
||||
|
||||
/obj/machinery/portable_atmospherics/pump/update_icon()
|
||||
overlays = 0
|
||||
|
||||
|
||||
@@ -14,6 +14,11 @@
|
||||
/// Is this scrubber acting on the 3x3 area around it.
|
||||
var/widenet = FALSE
|
||||
|
||||
/obj/machinery/portable_atmospherics/scrubber/detailed_examine()
|
||||
return "Filters the air, placing harmful gases into the internal gas container. The container can be emptied by \
|
||||
connecting it to a connector port. The pump can pump the air in (sucking) or out (blowing), at a specific target pressure. The powercell inside can be \
|
||||
replaced by using a screwdriver, and then adding a new cell. A tank of gas can also be attached to the scrubber."
|
||||
|
||||
/obj/machinery/portable_atmospherics/scrubber/emp_act(severity)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
..(severity)
|
||||
|
||||
Reference in New Issue
Block a user