module things, jfc
This commit is contained in:
@@ -120,4 +120,5 @@
|
||||
G.parse_gas_string(text)
|
||||
|
||||
air.merge(G)
|
||||
archive()
|
||||
SSair.add_to_active(src, 0)
|
||||
|
||||
@@ -129,6 +129,13 @@ GLOBAL_LIST_INIT(nonreactive_gases, typecacheof(list(/datum/gas/oxygen, /datum/g
|
||||
name = "Pluoxium"
|
||||
fusion_power = 10
|
||||
|
||||
/datum/gas/miasma
|
||||
id = "miasma"
|
||||
specific_heat = 20
|
||||
name = "Miasma"
|
||||
gas_overlay = "miasma"
|
||||
moles_visible = MOLES_GAS_VISIBLE * 60
|
||||
|
||||
/obj/effect/overlay/gas
|
||||
icon = 'icons/effects/tile_effects.dmi'
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
@@ -257,7 +257,7 @@
|
||||
reaction_energy += gases_fused * FUSION_RELEASE_ENERGY_SUPER * (power_ratio / FUSION_ENERGY_DIVISOR_SUPER)
|
||||
cached_gases[/datum/gas/tritium][MOLES] += gases_fused * FUSION_GAS_CREATION_FACTOR_TRITIUM //60% of the gas is converted to energy, 40% to trit
|
||||
fusion_prepare_to_die_edition_rng = 100 //Wait a minute..
|
||||
do_explosion = TRUE
|
||||
do_explosion = TRUE
|
||||
zap_range = FUSION_ZAP_RANGE_SUPER
|
||||
|
||||
else if (power_ratio > FUSION_HIGH_TIER_THRESHOLD) //power ratio 20-50; High tier. The reaction is so energized that it fuses into a small amount of stimulum, and some pluoxium. Very dangerous, but super cool and super useful.
|
||||
@@ -433,3 +433,30 @@
|
||||
var/new_heat_capacity = air.heat_capacity()
|
||||
if(new_heat_capacity > MINIMUM_HEAT_CAPACITY)
|
||||
air.temperature = max(((air.temperature*old_heat_capacity - energy_taken)/new_heat_capacity),TCMB)
|
||||
|
||||
|
||||
/datum/gas_reaction/miaster //dry heat sterilization: clears out pathogens in the air
|
||||
priority = -10 //after all the heating from fires etc. is done
|
||||
name = "Dry Heat Sterilization"
|
||||
id = "sterilization"
|
||||
|
||||
/datum/gas_reaction/miaster/init_reqs()
|
||||
min_requirements = list(
|
||||
"TEMP" = FIRE_MINIMUM_TEMPERATURE_TO_EXIST+70,
|
||||
/datum/gas/miasma = MINIMUM_MOLE_COUNT
|
||||
)
|
||||
|
||||
/datum/gas_reaction/miaster/react(datum/gas_mixture/air, datum/holder)
|
||||
var/list/cached_gases = air.gases
|
||||
// As the name says it, it needs to be dry
|
||||
if(/datum/gas/water_vapor in cached_gases)
|
||||
if(cached_gases[/datum/gas/water_vapor]/air.total_moles() > 0.1)
|
||||
return
|
||||
|
||||
//Replace miasma with oxygen
|
||||
var/cleaned_air = min(cached_gases[/datum/gas/miasma][MOLES], 20 + (air.temperature - FIRE_MINIMUM_TEMPERATURE_TO_EXIST - 70) / 20)
|
||||
cached_gases[/datum/gas/miasma][MOLES] -= cleaned_air
|
||||
cached_gases[/datum/gas/oxygen][MOLES] += cleaned_air
|
||||
|
||||
//Possibly burning a bit of organic matter through maillard reaction, so a *tiny* bit more heat would be understandable
|
||||
air.temperature += cleaned_air * 0.002
|
||||
|
||||
@@ -89,6 +89,7 @@
|
||||
/datum/gas/oxygen = new/datum/tlv(16, 19, 135, 140), // Partial pressure, kpa
|
||||
/datum/gas/nitrogen = new/datum/tlv(-1, -1, 1000, 1000),
|
||||
/datum/gas/carbon_dioxide = new/datum/tlv(-1, -1, 5, 10),
|
||||
/datum/gas/miasma = new/datum/tlv/(-1, -1, 2, 5),
|
||||
/datum/gas/plasma = new/datum/tlv/dangerous,
|
||||
/datum/gas/nitrous_oxide = new/datum/tlv/dangerous,
|
||||
/datum/gas/bz = new/datum/tlv/dangerous,
|
||||
@@ -107,6 +108,7 @@
|
||||
/datum/gas/oxygen = new/datum/tlv/no_checks,
|
||||
/datum/gas/nitrogen = new/datum/tlv/no_checks,
|
||||
/datum/gas/carbon_dioxide = new/datum/tlv/no_checks,
|
||||
/datum/gas/miasma = new/datum/tlv/no_checks,
|
||||
/datum/gas/plasma = new/datum/tlv/no_checks,
|
||||
/datum/gas/nitrous_oxide = new/datum/tlv/no_checks,
|
||||
/datum/gas/bz = new/datum/tlv/no_checks,
|
||||
@@ -125,6 +127,7 @@
|
||||
/datum/gas/oxygen = new/datum/tlv(16, 19, 135, 140), // Partial pressure, kpa
|
||||
/datum/gas/nitrogen = new/datum/tlv(-1, -1, 1000, 1000),
|
||||
/datum/gas/carbon_dioxide = new/datum/tlv(-1, -1, 5, 10),
|
||||
/datum/gas/miasma = new/datum/tlv/(-1, -1, 2, 5),
|
||||
/datum/gas/plasma = new/datum/tlv/dangerous,
|
||||
/datum/gas/nitrous_oxide = new/datum/tlv/dangerous,
|
||||
/datum/gas/bz = new/datum/tlv/dangerous,
|
||||
@@ -145,6 +148,12 @@
|
||||
req_access = null
|
||||
req_one_access = list(ACCESS_ATMOSPHERICS, ACCESS_ENGINE)
|
||||
|
||||
/obj/machinery/airalarm/mixingchamber
|
||||
name = "chamber air alarm"
|
||||
locked = FALSE
|
||||
req_access = null
|
||||
req_one_access = list(ACCESS_ATMOSPHERICS, ACCESS_TOX, ACCESS_TOX_STORAGE)
|
||||
|
||||
/obj/machinery/airalarm/all_access
|
||||
name = "all-access air alarm"
|
||||
desc = "This particular atmos control unit appears to have no access restrictions."
|
||||
@@ -155,6 +164,22 @@
|
||||
/obj/machinery/airalarm/syndicate //general syndicate access
|
||||
req_access = list(ACCESS_SYNDICATE)
|
||||
|
||||
/obj/machinery/airalarm/directional/north //Pixel offsets get overwritten on New()
|
||||
dir = SOUTH
|
||||
pixel_y = 24
|
||||
|
||||
/obj/machinery/airalarm/directional/south
|
||||
dir = NORTH
|
||||
pixel_y = -24
|
||||
|
||||
/obj/machinery/airalarm/directional/east
|
||||
dir = WEST
|
||||
pixel_x = 24
|
||||
|
||||
/obj/machinery/airalarm/directional/west
|
||||
dir = EAST
|
||||
pixel_x = -24
|
||||
|
||||
//all air alarms in area are connected via magic
|
||||
/area
|
||||
var/list/air_vent_names = list()
|
||||
@@ -189,6 +214,16 @@
|
||||
. = ..()
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/machinery/airalarm/examine(mob/user)
|
||||
. = ..()
|
||||
switch(buildstage)
|
||||
if(0)
|
||||
to_chat(user, "<span class='notice'>It is missing air alarm electronics.</span>")
|
||||
if(1)
|
||||
to_chat(user, "<span class='notice'>It is missing wiring.</span>")
|
||||
if(2)
|
||||
to_chat(user, "<span class='notice'>Alt-click to [locked ? "unlock" : "lock"] the interface.</span>")
|
||||
|
||||
/obj/machinery/airalarm/ui_status(mob/user)
|
||||
if(user.has_unlimited_silicon_privilege && aidisabled)
|
||||
to_chat(user, "AI control has been disabled.")
|
||||
@@ -338,25 +373,25 @@
|
||||
locked = !locked
|
||||
. = TRUE
|
||||
if("power", "toggle_filter", "widenet", "scrubbing")
|
||||
send_signal(device_id, list("[action]" = params["val"]))
|
||||
send_signal(device_id, list("[action]" = params["val"]), usr)
|
||||
. = TRUE
|
||||
if("excheck")
|
||||
send_signal(device_id, list("checks" = text2num(params["val"])^1))
|
||||
send_signal(device_id, list("checks" = text2num(params["val"])^1), usr)
|
||||
. = TRUE
|
||||
if("incheck")
|
||||
send_signal(device_id, list("checks" = text2num(params["val"])^2))
|
||||
send_signal(device_id, list("checks" = text2num(params["val"])^2), usr)
|
||||
. = TRUE
|
||||
if("set_external_pressure", "set_internal_pressure")
|
||||
var/area/A = get_area(src)
|
||||
var/target = input("New target pressure:", name, A.air_vent_info[device_id][(action == "set_external_pressure" ? "external" : "internal")]) as num|null
|
||||
if(!isnull(target) && !..())
|
||||
send_signal(device_id, list("[action]" = target))
|
||||
send_signal(device_id, list("[action]" = target), usr)
|
||||
. = TRUE
|
||||
if("reset_external_pressure")
|
||||
send_signal(device_id, list("reset_external_pressure"))
|
||||
send_signal(device_id, list("reset_external_pressure"), usr)
|
||||
. = TRUE
|
||||
if("reset_internal_pressure")
|
||||
send_signal(device_id, list("reset_internal_pressure"))
|
||||
send_signal(device_id, list("reset_internal_pressure"), usr)
|
||||
. = TRUE
|
||||
if("threshold")
|
||||
var/env = params["env"]
|
||||
@@ -373,9 +408,11 @@
|
||||
tlv.vars[name] = -1
|
||||
else
|
||||
tlv.vars[name] = round(value, 0.01)
|
||||
investigate_log(" treshold value for [env]:[name] was set to [value] by [key_name(usr)]",INVESTIGATE_ATMOS)
|
||||
. = TRUE
|
||||
if("mode")
|
||||
mode = text2num(params["mode"])
|
||||
investigate_log("was turned to [get_mode_name(mode)] mode by [key_name(usr)]",INVESTIGATE_ATMOS)
|
||||
apply_mode()
|
||||
. = TRUE
|
||||
if("alarm")
|
||||
@@ -433,17 +470,39 @@
|
||||
frequency = new_frequency
|
||||
radio_connection = SSradio.add_object(src, frequency, RADIO_TO_AIRALARM)
|
||||
|
||||
/obj/machinery/airalarm/proc/send_signal(target, list/command)//sends signal 'command' to 'target'. Returns 0 if no radio connection, 1 otherwise
|
||||
/obj/machinery/airalarm/proc/send_signal(target, list/command, mob/user)//sends signal 'command' to 'target'. Returns 0 if no radio connection, 1 otherwise
|
||||
if(!radio_connection)
|
||||
return 0
|
||||
|
||||
var/datum/signal/signal = new(command)
|
||||
signal.data["tag"] = target
|
||||
signal.data["sigtype"] = "command"
|
||||
signal.data["user"] = user
|
||||
radio_connection.post_signal(src, signal, RADIO_FROM_AIRALARM)
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/airalarm/proc/get_mode_name(mode_value)
|
||||
switch(mode_value)
|
||||
if(AALARM_MODE_SCRUBBING)
|
||||
return "Filtering"
|
||||
if(AALARM_MODE_CONTAMINATED)
|
||||
return "Contaminated"
|
||||
if(AALARM_MODE_VENTING)
|
||||
return "Draught"
|
||||
if(AALARM_MODE_REFILL)
|
||||
return "Refill"
|
||||
if(AALARM_MODE_PANIC)
|
||||
return "Panic Siphon"
|
||||
if(AALARM_MODE_REPLACEMENT)
|
||||
return "Cycle"
|
||||
if(AALARM_MODE_SIPHON)
|
||||
return "Siphon"
|
||||
if(AALARM_MODE_OFF)
|
||||
return "Off"
|
||||
if(AALARM_MODE_FLOOD)
|
||||
return "Flood"
|
||||
|
||||
/obj/machinery/airalarm/proc/apply_mode()
|
||||
var/area/A = get_area(src)
|
||||
switch(mode)
|
||||
@@ -451,7 +510,7 @@
|
||||
for(var/device_id in A.air_scrub_names)
|
||||
send_signal(device_id, list(
|
||||
"power" = 1,
|
||||
"set_filters" = list(/datum/gas/carbon_dioxide),
|
||||
"set_filters" = list(/datum/gas/carbon_dioxide, /datum/gas/miasma),
|
||||
"scrubbing" = 1,
|
||||
"widenet" = 0,
|
||||
))
|
||||
@@ -467,6 +526,7 @@
|
||||
"power" = 1,
|
||||
"set_filters" = list(
|
||||
/datum/gas/carbon_dioxide,
|
||||
/datum/gas/miasma,
|
||||
/datum/gas/plasma,
|
||||
/datum/gas/water_vapor,
|
||||
/datum/gas/hypernoblium,
|
||||
@@ -503,7 +563,7 @@
|
||||
for(var/device_id in A.air_scrub_names)
|
||||
send_signal(device_id, list(
|
||||
"power" = 1,
|
||||
"set_filters" = list(/datum/gas/carbon_dioxide),
|
||||
"set_filters" = list(/datum/gas/carbon_dioxide, /datum/gas/miasma),
|
||||
"scrubbing" = 1,
|
||||
"widenet" = 0,
|
||||
))
|
||||
|
||||
@@ -145,6 +145,8 @@
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/circulator/screwdriver_act(mob/user, obj/item/I)
|
||||
if(..())
|
||||
return TRUE
|
||||
panel_open = !panel_open
|
||||
I.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You [panel_open?"open":"close"] the panel on [src].</span>")
|
||||
|
||||
@@ -131,6 +131,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
switch(action)
|
||||
if("power")
|
||||
on = !on
|
||||
message_admins("Pump, [src.name], turned [on ? "on" : "off"] by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]")
|
||||
investigate_log("was turned [on ? "on" : "off"] by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
. = TRUE
|
||||
if("rate")
|
||||
@@ -185,3 +186,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
if(. && on && is_operational())
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
|
||||
return FALSE
|
||||
else
|
||||
investigate_log("Pump, [src.name], was unwrenched by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS)
|
||||
message_admins("Pump, [src.name], was unwrenched by [ADMIN_LOOKUPFLW(user)] at [A]")
|
||||
return TRUE
|
||||
@@ -294,7 +294,7 @@
|
||||
user.visible_message("[user] places [I] in [src].", \
|
||||
"<span class='notice'>You place [I] in [src].</span>")
|
||||
var/reagentlist = pretty_string_from_reagent_list(I.reagents.reagent_list)
|
||||
log_game("[key_name(user)] added an [I] to cyro containing [reagentlist]")
|
||||
log_game("[key_name(user)] added an [I] to cryo containing [reagentlist]")
|
||||
return
|
||||
if(!on && !occupant && !state_open && (default_deconstruction_screwdriver(user, "pod-off", "pod-off", I)) \
|
||||
|| default_change_direction_wrench(user, I) \
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
desc = "Heats or cools gas in connected pipes."
|
||||
icon = 'icons/obj/atmospherics/components/thermomachine.dmi'
|
||||
icon_state = "freezer"
|
||||
var/icon_state_on = "cold_on"
|
||||
var/icon_state_open = "cold_off"
|
||||
var/icon_state_off = "freezer"
|
||||
var/icon_state_on = "freezer_1"
|
||||
var/icon_state_open = "freezer-o"
|
||||
density = TRUE
|
||||
max_integrity = 300
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 30)
|
||||
@@ -37,7 +38,7 @@
|
||||
else if(on && is_operational())
|
||||
icon_state = icon_state_on
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
icon_state = icon_state_off
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/thermomachine/update_icon_nopipes()
|
||||
cut_overlays()
|
||||
@@ -72,7 +73,7 @@
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/thermomachine/attackby(obj/item/I, mob/user, params)
|
||||
if(!on)
|
||||
if(default_deconstruction_screwdriver(user, icon_state_open, initial(icon_state), I))
|
||||
if(default_deconstruction_screwdriver(user, icon_state_open, icon_state_off, I))
|
||||
return
|
||||
if(default_change_direction_wrench(user, I))
|
||||
return
|
||||
@@ -157,6 +158,7 @@
|
||||
/obj/machinery/atmospherics/components/unary/thermomachine/freezer
|
||||
name = "freezer"
|
||||
icon_state = "freezer"
|
||||
icon_state_off = "freezer"
|
||||
icon_state_on = "freezer_1"
|
||||
icon_state_open = "freezer-o"
|
||||
max_temperature = T20C
|
||||
@@ -182,6 +184,7 @@
|
||||
/obj/machinery/atmospherics/components/unary/thermomachine/heater
|
||||
name = "heater"
|
||||
icon_state = "heater"
|
||||
icon_state_off = "heater"
|
||||
icon_state_on = "heater_1"
|
||||
icon_state_open = "heater-o"
|
||||
max_temperature = 140 //actual maximum temperature is defined by RefreshParts()
|
||||
|
||||
@@ -337,6 +337,8 @@
|
||||
if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command"))
|
||||
return
|
||||
|
||||
var/mob/signal_sender = signal.data["user"]
|
||||
|
||||
if("purge" in signal.data)
|
||||
pressure_checks &= ~EXT_BOUND
|
||||
pump_direction = SIPHONING
|
||||
@@ -352,7 +354,10 @@
|
||||
on = !on
|
||||
|
||||
if("checks" in signal.data)
|
||||
var/old_checks = pressure_checks
|
||||
pressure_checks = text2num(signal.data["checks"])
|
||||
if(pressure_checks != old_checks)
|
||||
investigate_log(" pressure checks were set to [pressure_checks] by [key_name(signal_sender)]",INVESTIGATE_ATMOS)
|
||||
|
||||
if("checks_toggle" in signal.data)
|
||||
pressure_checks = (pressure_checks?0:NO_BOUND)
|
||||
@@ -361,10 +366,16 @@
|
||||
pump_direction = text2num(signal.data["direction"])
|
||||
|
||||
if("set_internal_pressure" in signal.data)
|
||||
var/old_pressure = internal_pressure_bound
|
||||
internal_pressure_bound = CLAMP(text2num(signal.data["set_internal_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
if(old_pressure != internal_pressure_bound)
|
||||
investigate_log(" internal pressure was set to [internal_pressure_bound] by [key_name(signal_sender)]",INVESTIGATE_ATMOS)
|
||||
|
||||
if("set_external_pressure" in signal.data)
|
||||
var/old_pressure = external_pressure_bound
|
||||
external_pressure_bound = CLAMP(text2num(signal.data["set_external_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
if(old_pressure != external_pressure_bound)
|
||||
investigate_log(" external pressure was set to [external_pressure_bound] by [key_name(signal_sender)]",INVESTIGATE_ATMOS)
|
||||
|
||||
if("reset_external_pressure" in signal.data)
|
||||
external_pressure_bound = ONE_ATMOSPHERE
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
var/scrubbing = SCRUBBING //0 = siphoning, 1 = scrubbing
|
||||
|
||||
var/filter_types = list(/datum/gas/carbon_dioxide)
|
||||
|
||||
var/volume_rate = 200
|
||||
var/widenet = 0 //is this scrubber acting on the 3x3 area around it.
|
||||
var/list/turf/adjacent_turfs = list()
|
||||
@@ -43,6 +42,7 @@
|
||||
..()
|
||||
if(!id_tag)
|
||||
id_tag = assign_uid_vents()
|
||||
|
||||
for(var/f in filter_types)
|
||||
if(istext(f))
|
||||
filter_types -= f
|
||||
@@ -118,7 +118,7 @@
|
||||
/obj/machinery/atmospherics/components/unary/vent_scrubber/proc/broadcast_status()
|
||||
if(!radio_connection)
|
||||
return FALSE
|
||||
|
||||
|
||||
var/list/f_types = list()
|
||||
for(var/path in GLOB.meta_gas_info)
|
||||
var/list/gas = GLOB.meta_gas_info[path]
|
||||
@@ -140,8 +140,8 @@
|
||||
if(!A.air_scrub_names[id_tag])
|
||||
name = "\improper [A.name] air scrubber #[A.air_scrub_names.len + 1]"
|
||||
A.air_scrub_names[id_tag] = name
|
||||
A.air_scrub_info[id_tag] = signal.data
|
||||
|
||||
A.air_scrub_info[id_tag] = signal.data
|
||||
radio_connection.post_signal(src, signal, radio_filter_out)
|
||||
|
||||
return TRUE
|
||||
@@ -171,7 +171,6 @@
|
||||
/obj/machinery/atmospherics/components/unary/vent_scrubber/proc/scrub(var/turf/tile)
|
||||
if(!istype(tile))
|
||||
return FALSE
|
||||
|
||||
var/datum/gas_mixture/environment = tile.return_air()
|
||||
var/datum/gas_mixture/air_contents = airs[1]
|
||||
var/list/env_gases = environment.gases
|
||||
@@ -185,9 +184,11 @@
|
||||
|
||||
//Take a gas sample
|
||||
var/datum/gas_mixture/removed = tile.remove_air(transfer_moles)
|
||||
|
||||
//Nothing left to remove from the tile
|
||||
if(isnull(removed))
|
||||
return FALSE
|
||||
|
||||
var/list/removed_gases = removed.gases
|
||||
|
||||
//Filter it
|
||||
@@ -204,10 +205,9 @@
|
||||
|
||||
//Remix the resulting gases
|
||||
air_contents.merge(filtered_out)
|
||||
|
||||
tile.assume_air(removed)
|
||||
tile.air_update_turf()
|
||||
|
||||
|
||||
else //Just siphoning all air
|
||||
|
||||
var/transfer_moles = environment.total_moles()*(volume_rate/environment.volume)
|
||||
@@ -221,7 +221,6 @@
|
||||
|
||||
return TRUE
|
||||
|
||||
|
||||
//There is no easy way for an object to be notified of changes to atmos can pass flags
|
||||
// So we check every machinery process (2 seconds)
|
||||
/obj/machinery/atmospherics/components/unary/vent_scrubber/process()
|
||||
@@ -230,17 +229,19 @@
|
||||
|
||||
//we populate a list of turfs with nonatmos-blocked cardinal turfs AND
|
||||
// diagonal turfs that can share atmos with *both* of the cardinal turfs
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_scrubber/proc/check_turfs()
|
||||
adjacent_turfs.Cut()
|
||||
var/turf/T = get_turf(src)
|
||||
if(istype(T))
|
||||
adjacent_turfs = T.GetAtmosAdjacentTurfs(alldir = 1)
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_scrubber/receive_signal(datum/signal/signal)
|
||||
if(!is_operational() || !signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command"))
|
||||
return 0
|
||||
|
||||
var/mob/signal_sender = signal.data["user"]
|
||||
|
||||
if("power" in signal.data)
|
||||
on = text2num(signal.data["power"])
|
||||
if("power_toggle" in signal.data)
|
||||
@@ -251,10 +252,13 @@
|
||||
if("toggle_widenet" in signal.data)
|
||||
widenet = !widenet
|
||||
|
||||
var/old_scrubbing = scrubbing
|
||||
if("scrubbing" in signal.data)
|
||||
scrubbing = text2num(signal.data["scrubbing"])
|
||||
if("toggle_scrubbing" in signal.data)
|
||||
scrubbing = !scrubbing
|
||||
if(scrubbing != old_scrubbing)
|
||||
investigate_log(" was toggled to [scrubbing ? "scrubbing" : "siphon"] mode by [key_name(signal_sender)]",INVESTIGATE_ATMOS)
|
||||
|
||||
if("toggle_filter" in signal.data)
|
||||
filter_types ^= gas_id2path(signal.data["toggle_filter"])
|
||||
|
||||
@@ -40,11 +40,15 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/meter/proc/reattach_to_layer()
|
||||
var/obj/machinery/atmospherics/candidate
|
||||
for(var/obj/machinery/atmospherics/pipe/pipe in loc)
|
||||
if(pipe.piping_layer == target_layer)
|
||||
target = pipe
|
||||
setAttachLayer(pipe.piping_layer)
|
||||
break
|
||||
candidate = pipe
|
||||
if(pipe.level == 2)
|
||||
break
|
||||
if(candidate)
|
||||
target = candidate
|
||||
setAttachLayer(candidate.piping_layer)
|
||||
|
||||
/obj/machinery/meter/proc/setAttachLayer(var/new_layer)
|
||||
target_layer = new_layer
|
||||
@@ -140,6 +144,5 @@
|
||||
// why are you yelling?
|
||||
/obj/machinery/meter/turf
|
||||
|
||||
/obj/machinery/meter/turf/Initialize()
|
||||
. = ..()
|
||||
/obj/machinery/meter/turf/reattach_to_layer()
|
||||
target = loc
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
"stimulum" = /obj/machinery/portable_atmospherics/canister/stimulum,
|
||||
"pluoxium" = /obj/machinery/portable_atmospherics/canister/pluoxium,
|
||||
"caution" = /obj/machinery/portable_atmospherics/canister,
|
||||
"miasma" = /obj/machinery/portable_atmospherics/canister/miasma
|
||||
)
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/interact(mob/user)
|
||||
@@ -137,6 +138,13 @@
|
||||
gas_type = /datum/gas/water_vapor
|
||||
filled = 1
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/miasma
|
||||
name = "miasma canister"
|
||||
desc = "Miasma. Makes you wish your nose were blocked."
|
||||
icon_state = "miasma"
|
||||
gas_type = /datum/gas/miasma
|
||||
filled = 1
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/proc/get_time_left()
|
||||
if(timing)
|
||||
. = round(max(0, valve_timer - world.time) / 10, 1)
|
||||
|
||||
@@ -91,6 +91,7 @@
|
||||
..()
|
||||
if(holding)
|
||||
to_chat(user, "<span class='notice'>\The [src] contains [holding]. Alt-click [src] to remove it.</span>")
|
||||
to_chat(user, "<span class='notice'>Click [src] with another gas tank to hot swap [holding].</span>")
|
||||
|
||||
/obj/machinery/portable_atmospherics/proc/replace_tank(mob/living/user, close_valve, obj/item/tank/new_tank)
|
||||
if(holding)
|
||||
|
||||
Reference in New Issue
Block a user