mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 12:04:48 +01:00
Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into space_ruins
All hail glorious leader tigercat
This commit is contained in:
@@ -156,7 +156,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
/obj/machinery/atmospherics/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if(can_unwrench && istype(W, /obj/item/weapon/wrench))
|
||||
var/turf/T = get_turf(src)
|
||||
if (level == 1 && isturf(T) && T.intact)
|
||||
if(level == 1 && isturf(T) && T.intact)
|
||||
to_chat(user, "<span class='danger'>You must remove the plating first.</span>")
|
||||
return 1
|
||||
var/datum/gas_mixture/int_air = return_air()
|
||||
@@ -168,11 +168,11 @@ Pipelines + Other Objects -> Pipe network
|
||||
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
|
||||
if (internal_pressure > 2*ONE_ATMOSPHERE)
|
||||
if(internal_pressure > 2*ONE_ATMOSPHERE)
|
||||
to_chat(user, "<span class='warning'>As you begin unwrenching \the [src] a gush of air blows in your face... maybe you should reconsider?</span>")
|
||||
unsafe_wrenching = TRUE //Oh dear oh dear
|
||||
|
||||
if (do_after(user, 40, target = src) && isnull(gcDestroyed))
|
||||
if(do_after(user, 40, target = src) && isnull(gcDestroyed))
|
||||
user.visible_message( \
|
||||
"[user] unfastens \the [src].", \
|
||||
"<span class='notice'>You have unfastened \the [src].</span>", \
|
||||
@@ -293,7 +293,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
add_underlay_adapter(T, , node_dir, "")
|
||||
add_underlay_adapter(T, node, node_dir, "-supply")
|
||||
add_underlay_adapter(T, , node_dir, "-scrubbers")
|
||||
else if (node.icon_connect_type == "-scrubbers")
|
||||
else if(node.icon_connect_type == "-scrubbers")
|
||||
add_underlay_adapter(T, , node_dir, "")
|
||||
add_underlay_adapter(T, , node_dir, "-supply")
|
||||
add_underlay_adapter(T, node, node_dir, "-scrubbers")
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node1_connect))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
var/c = check_connect_types(target,src)
|
||||
if (c)
|
||||
if(c)
|
||||
target.connected_to = c
|
||||
connected_to = c
|
||||
node1 = target
|
||||
@@ -58,7 +58,7 @@
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node2_connect))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
var/c = check_connect_types(target,src)
|
||||
if (c)
|
||||
if(c)
|
||||
target.connected_to = c
|
||||
connected_to = c
|
||||
node2 = target
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
/obj/machinery/atmospherics/binary/dp_vent_pump/New()
|
||||
..()
|
||||
if (!id_tag)
|
||||
if(!id_tag)
|
||||
assign_uid()
|
||||
id_tag = num2text(uid)
|
||||
icon = null
|
||||
@@ -93,11 +93,11 @@
|
||||
if(T.intact && node1 && node2 && node1.level == 1 && node2.level == 1 && istype(node1, /obj/machinery/atmospherics/pipe) && istype(node2, /obj/machinery/atmospherics/pipe))
|
||||
return
|
||||
else
|
||||
if (node1)
|
||||
if(node1)
|
||||
add_underlay(T, node1, turn(dir, -180), node1.icon_connect_type)
|
||||
else
|
||||
add_underlay(T, node1, turn(dir, -180))
|
||||
if (node2)
|
||||
if(node2)
|
||||
add_underlay(T, node2, dir, node2.icon_connect_type)
|
||||
else
|
||||
add_underlay(T, node2, dir)
|
||||
|
||||
@@ -155,9 +155,9 @@
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
if(!istype(W, /obj/item/weapon/wrench))
|
||||
return ..()
|
||||
if (on)
|
||||
if(on)
|
||||
to_chat(user, "<span class='alert'>You cannot unwrench this [src], turn it off first.</span>")
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
@@ -182,9 +182,9 @@ Thus, the two variables affect pump operation are set in New():
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
if(!istype(W, /obj/item/weapon/wrench))
|
||||
return ..()
|
||||
if (!(stat & NOPOWER) && on)
|
||||
if(!(stat & NOPOWER) && on)
|
||||
to_chat(user, "<span class='alert'>You cannot unwrench this [src], turn it off first.</span>")
|
||||
return 1
|
||||
return ..()
|
||||
@@ -52,7 +52,7 @@
|
||||
add_fingerprint(usr)
|
||||
update_icon(1)
|
||||
sleep(10)
|
||||
if (open)
|
||||
if(open)
|
||||
close()
|
||||
return
|
||||
open()
|
||||
|
||||
@@ -173,9 +173,9 @@ Thus, the two variables affect pump operation are set in New():
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
if(!istype(W, /obj/item/weapon/wrench))
|
||||
return ..()
|
||||
if (!(stat & NOPOWER) && on)
|
||||
if(!(stat & NOPOWER) && on)
|
||||
to_chat(user, "<span class='alert'>You cannot unwrench this [src], turn it off first.</span>")
|
||||
return 1
|
||||
return ..()
|
||||
@@ -117,7 +117,7 @@
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
|
||||
|
||||
if (!ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "omni_filter.tmpl", "Omni Filter Control", 330, 330)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
|
||||
|
||||
if (!ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "omni_mixer.tmpl", "Omni Mixer Control", 360, 330)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
for(var/datum/omni_port/P in ports)
|
||||
int_pressure += P.air.return_pressure()
|
||||
var/datum/gas_mixture/env_air = loc.return_air()
|
||||
if ((int_pressure - env_air.return_pressure()) > 2*ONE_ATMOSPHERE)
|
||||
if((int_pressure - env_air.return_pressure()) > 2*ONE_ATMOSPHERE)
|
||||
to_chat(user, "<span class='danger'>You cannot unwrench [src], it is too exerted due to internal pressure.</span>")
|
||||
add_fingerprint(user)
|
||||
return 1
|
||||
|
||||
@@ -191,7 +191,7 @@ Filter types:
|
||||
onclose(user, "atmo_filter")
|
||||
return
|
||||
|
||||
if (src.temp)
|
||||
if(src.temp)
|
||||
dat = text("<TT>[]</TT><BR><BR><A href='?src=\ref[];temp=1'>Clear Screen</A>", src.temp, src)
|
||||
//else
|
||||
// src.on != src.on
|
||||
@@ -207,7 +207,7 @@ Filter types:
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["filterset"])
|
||||
src.filter_type = text2num(href_list["filterset"])
|
||||
if (href_list["temp"])
|
||||
if(href_list["temp"])
|
||||
src.temp = null
|
||||
if(href_list["set_press"])
|
||||
var/new_pressure = input(usr,"Enter new output pressure (0-4500kPa)","Pressure control",src.target_pressure) as num
|
||||
@@ -218,7 +218,7 @@ Filter types:
|
||||
src.updateUsrDialog()
|
||||
/*
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
if((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
*/
|
||||
return
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
interact(user)
|
||||
return 1
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if (!(stat & NOPOWER) && on)
|
||||
if(!(stat & NOPOWER) && on)
|
||||
to_chat(user, "<span class='danger'>You cannot unwrench this [src], turn if off first.</span>")
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
var/transfer_moles = 0.25 * environment.total_moles()
|
||||
var/datum/gas_mixture/external_removed = environment.remove(transfer_moles)
|
||||
|
||||
if (!external_removed)
|
||||
if(!external_removed)
|
||||
return radiate()
|
||||
|
||||
if (external_removed.total_moles() < 10)
|
||||
if(external_removed.total_moles() < 10)
|
||||
return radiate()
|
||||
|
||||
//Get same info from connected gas
|
||||
@@ -39,7 +39,7 @@
|
||||
var/internal_transfer_moles = 0.25 * air_contents.total_moles()
|
||||
var/datum/gas_mixture/internal_removed = air_contents.remove(internal_transfer_moles)
|
||||
|
||||
if (!internal_removed)
|
||||
if(!internal_removed)
|
||||
environment.merge(external_removed)
|
||||
return 1
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
var/internal_transfer_moles = 0.25 * air_contents.total_moles()
|
||||
var/datum/gas_mixture/internal_removed = air_contents.remove(internal_transfer_moles)
|
||||
|
||||
if (!internal_removed)
|
||||
if(!internal_removed)
|
||||
return 1
|
||||
|
||||
var/combined_heat_capacity = internal_removed.heat_capacity() + RADIATION_CAPACITY
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src, dir))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
var/c = check_connect_types(target,src)
|
||||
if (c)
|
||||
if(c)
|
||||
target.connected_to = c
|
||||
src.connected_to = c
|
||||
node = target
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
icon = null
|
||||
initial_loc = get_area(loc)
|
||||
area_uid = initial_loc.uid
|
||||
if (!id_tag)
|
||||
if(!id_tag)
|
||||
assign_uid()
|
||||
id_tag = num2text(uid)
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
/obj/machinery/atmospherics/unary/vent_pump/process()
|
||||
if(!..() || (stat & (NOPOWER|BROKEN)))
|
||||
return 0
|
||||
if (!node)
|
||||
if(!node)
|
||||
on = 0
|
||||
//broadcast_status() // from now air alarm/control computer should request update purposely --rastaf0
|
||||
if(!on)
|
||||
@@ -164,7 +164,7 @@
|
||||
var/transfer_moles = pressure_delta*air_contents.volume/(environment.temperature * R_IDEAL_GAS_EQUATION)
|
||||
|
||||
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
|
||||
if (isnull(removed)) //in space
|
||||
if(isnull(removed)) //in space
|
||||
return
|
||||
|
||||
air_contents.merge(removed)
|
||||
@@ -252,7 +252,7 @@
|
||||
on = !on
|
||||
|
||||
if(signal.data["checks"] != null)
|
||||
if (signal.data["checks"] == "default")
|
||||
if(signal.data["checks"] == "default")
|
||||
pressure_checks = pressure_checks_default
|
||||
else
|
||||
pressure_checks = text2num(signal.data["checks"])
|
||||
@@ -264,7 +264,7 @@
|
||||
pump_direction = text2num(signal.data["direction"])
|
||||
|
||||
if(signal.data["set_internal_pressure"] != null)
|
||||
if (signal.data["set_internal_pressure"] == "default")
|
||||
if(signal.data["set_internal_pressure"] == "default")
|
||||
internal_pressure_bound = internal_pressure_bound_default
|
||||
else
|
||||
internal_pressure_bound = between(
|
||||
@@ -274,7 +274,7 @@
|
||||
)
|
||||
|
||||
if(signal.data["set_external_pressure"] != null)
|
||||
if (signal.data["set_external_pressure"] == "default")
|
||||
if(signal.data["set_external_pressure"] == "default")
|
||||
external_pressure_bound = external_pressure_bound_default
|
||||
else
|
||||
external_pressure_bound = between(
|
||||
@@ -320,7 +320,7 @@
|
||||
/obj/machinery/atmospherics/unary/vent_pump/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if (WT.remove_fuel(0,user))
|
||||
if(WT.remove_fuel(0,user))
|
||||
to_chat(user, "<span class='notice'>Now welding the vent.</span>")
|
||||
if(do_after(user, 20, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
@@ -343,12 +343,12 @@
|
||||
if(!welded)
|
||||
if(open)
|
||||
to_chat(user, "<span class='notice'> Now closing the vent.</span>")
|
||||
if (do_after(user, 20, target = src))
|
||||
if(do_after(user, 20, target = src))
|
||||
open = 0
|
||||
user.visible_message("[user] screwdrivers the vent shut.", "You screwdriver the vent shut.", "You hear a screwdriver.")
|
||||
else
|
||||
to_chat(user, "<span class='notice'> Now opening the vent.</span>")
|
||||
if (do_after(user, 20, target = src))
|
||||
if(do_after(user, 20, target = src))
|
||||
open = 1
|
||||
user.visible_message("[user] screwdrivers the vent shut.", "You screwdriver the vent shut.", "You hear a screwdriver.")
|
||||
return
|
||||
@@ -365,8 +365,8 @@
|
||||
if(istype(W, /obj/item/device/multitool))
|
||||
update_multitool_menu(user)
|
||||
return 1
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
if (!(stat & NOPOWER) && on)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(!(stat & NOPOWER) && on)
|
||||
to_chat(user, "<span class='danger'>You cannot unwrench this [src], turn it off first.</span>")
|
||||
return 1
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
icon = null
|
||||
initial_loc = get_area(loc)
|
||||
area_uid = initial_loc.uid
|
||||
if (!id_tag)
|
||||
if(!id_tag)
|
||||
assign_uid()
|
||||
id_tag = num2text(uid)
|
||||
|
||||
@@ -63,26 +63,26 @@
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/auto_use_power()
|
||||
if(!powered(power_channel))
|
||||
return 0
|
||||
if (!on || welded)
|
||||
if(!on || welded)
|
||||
return 0
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return 0
|
||||
|
||||
var/amount = idle_power_usage
|
||||
|
||||
if (scrubbing)
|
||||
if (scrub_CO2)
|
||||
if(scrubbing)
|
||||
if(scrub_CO2)
|
||||
amount += idle_power_usage
|
||||
if (scrub_Toxins)
|
||||
if(scrub_Toxins)
|
||||
amount += idle_power_usage
|
||||
if (scrub_N2)
|
||||
if(scrub_N2)
|
||||
amount += idle_power_usage
|
||||
if (scrub_N2O)
|
||||
if(scrub_N2O)
|
||||
amount += idle_power_usage
|
||||
else
|
||||
amount = active_power_usage
|
||||
|
||||
if (widenet)
|
||||
if(widenet)
|
||||
amount += amount*(adjacent_turfs.len*(adjacent_turfs.len/2))
|
||||
use_power(amount, power_channel)
|
||||
return 1
|
||||
@@ -178,13 +178,13 @@
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
if (widenet)
|
||||
if(widenet)
|
||||
check_turfs()
|
||||
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
if (!node)
|
||||
if(!node)
|
||||
on = 0
|
||||
|
||||
if(welded)
|
||||
@@ -194,8 +194,8 @@
|
||||
return 0
|
||||
|
||||
scrub(loc)
|
||||
if (widenet)
|
||||
for (var/turf/simulated/tile in adjacent_turfs)
|
||||
if(widenet)
|
||||
for(var/turf/simulated/tile in adjacent_turfs)
|
||||
scrub(tile)
|
||||
|
||||
//we populate a list of turfs with nonatmos-blocked cardinal turfs AND
|
||||
@@ -203,11 +203,11 @@
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/proc/check_turfs()
|
||||
adjacent_turfs.Cut()
|
||||
var/turf/T = loc
|
||||
if (istype(T))
|
||||
if(istype(T))
|
||||
adjacent_turfs = T.GetAtmosAdjacentTurfs(alldir=1)
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/proc/scrub(var/turf/simulated/tile)
|
||||
if (!tile || !istype(tile))
|
||||
if(!tile || !istype(tile))
|
||||
return 0
|
||||
|
||||
var/datum/gas_mixture/environment = tile.return_air()
|
||||
@@ -218,7 +218,7 @@
|
||||
|
||||
//Take a gas sample
|
||||
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
|
||||
if (isnull(removed)) //in space
|
||||
if(isnull(removed)) //in space
|
||||
return
|
||||
|
||||
//Filter it
|
||||
@@ -253,7 +253,7 @@
|
||||
tile.air_update_turf()
|
||||
|
||||
else //Just siphoning all air
|
||||
if (air_contents.return_pressure()>=50*ONE_ATMOSPHERE)
|
||||
if(air_contents.return_pressure()>=50*ONE_ATMOSPHERE)
|
||||
return
|
||||
|
||||
var/transfer_moles = environment.total_moles()*(volume_rate/environment.volume)
|
||||
@@ -372,7 +372,7 @@
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if (WT.remove_fuel(0,user))
|
||||
if(WT.remove_fuel(0,user))
|
||||
to_chat(user, "<span class='notice'>Now welding the scrubber.</span>")
|
||||
if(do_after(user, 20, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
@@ -394,8 +394,8 @@
|
||||
if(istype(W, /obj/item/device/multitool))
|
||||
update_multitool_menu(user)
|
||||
return 1
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
if (!(stat & NOPOWER) && on)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(!(stat & NOPOWER) && on)
|
||||
to_chat(user, "<span class='danger'>You cannot unwrench this [src], turn it off first.</span>")
|
||||
return 1
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src, dir))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
var/c = check_connect_types(target,src)
|
||||
if (c)
|
||||
if(c)
|
||||
target.connected_to = c
|
||||
src.connected_to = c
|
||||
node = target
|
||||
|
||||
@@ -99,18 +99,6 @@
|
||||
overlays += icon_manager.get_atmos_icon("manifold", , , "clamps_4way" + icon_connect_type)
|
||||
underlays.Cut()
|
||||
|
||||
/*
|
||||
var/list/directions = list(NORTH, SOUTH, EAST, WEST)
|
||||
|
||||
directions -= add_underlay(node1)
|
||||
directions -= add_underlay(node2)
|
||||
directions -= add_underlay(node3)
|
||||
directions -= add_underlay(node4)
|
||||
|
||||
for(var/D in directions)
|
||||
add_underlay(,D)
|
||||
*/
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
if(!istype(T)) return
|
||||
var/list/directions = list(NORTH, SOUTH, EAST, WEST)
|
||||
|
||||
@@ -96,17 +96,17 @@
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction/New()
|
||||
.. ()
|
||||
switch (dir)
|
||||
if (SOUTH)
|
||||
switch(dir)
|
||||
if(SOUTH)
|
||||
initialize_directions = NORTH
|
||||
initialize_directions_he = SOUTH
|
||||
if (NORTH)
|
||||
if(NORTH)
|
||||
initialize_directions = SOUTH
|
||||
initialize_directions_he = NORTH
|
||||
if (EAST)
|
||||
if(EAST)
|
||||
initialize_directions = WEST
|
||||
initialize_directions_he = EAST
|
||||
if (WEST)
|
||||
if(WEST)
|
||||
initialize_directions = EAST
|
||||
initialize_directions_he = WEST
|
||||
|
||||
|
||||
@@ -37,14 +37,14 @@
|
||||
overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "universal")
|
||||
underlays.Cut()
|
||||
|
||||
if (node1)
|
||||
if(node1)
|
||||
universal_underlays(node1)
|
||||
if(node2)
|
||||
universal_underlays(node2)
|
||||
else
|
||||
var/node2_dir = turn(get_dir(src,node1),-180)
|
||||
universal_underlays(,node2_dir)
|
||||
else if (node2)
|
||||
else if(node2)
|
||||
universal_underlays(node2)
|
||||
var/node1_dir = turn(get_dir(src,node2),-180)
|
||||
universal_underlays(,node1_dir)
|
||||
|
||||
@@ -48,14 +48,14 @@
|
||||
overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "universal")
|
||||
underlays.Cut()
|
||||
|
||||
if (node1)
|
||||
if(node1)
|
||||
universal_underlays(node1)
|
||||
if(node2)
|
||||
universal_underlays(node2)
|
||||
else
|
||||
var/node1_dir = get_dir(node1,src)
|
||||
universal_underlays(,node1_dir)
|
||||
else if (node2)
|
||||
else if(node2)
|
||||
universal_underlays(node2)
|
||||
else
|
||||
universal_underlays(,dir)
|
||||
|
||||
Reference in New Issue
Block a user