Skip to content

Commit

Permalink
atmospherics (#18152)
Browse files Browse the repository at this point in the history
  • Loading branch information
KalevTait authored Jul 4, 2022
1 parent c644fd0 commit ad608c8
Show file tree
Hide file tree
Showing 25 changed files with 99 additions and 102 deletions.
2 changes: 1 addition & 1 deletion code/modules/atmospherics/environmental/LINDA_fire.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

//This is the icon for fire on turfs, also helps for nurturing small fires until they are full tile
/obj/effect/hotspot
anchored = 1
anchored = TRUE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
icon = 'icons/goonstation/effects/fire.dmi'
icon_state = "1"
Expand Down
12 changes: 6 additions & 6 deletions code/modules/atmospherics/machinery/airalarm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
name = "alarm"
icon = 'icons/obj/monitors.dmi'
icon_state = "alarm0"
anchored = 1
anchored = TRUE
use_power = IDLE_POWER_USE
idle_power_usage = 4
active_power_usage = 8
Expand All @@ -92,12 +92,12 @@
var/remote_control = TRUE
var/rcon_setting = RCON_AUTO
var/rcon_time = 0
var/locked = 1
var/locked = TRUE
var/datum/wires/alarm/wires = null
var/wiresexposed = 0 // If it's been screwdrivered open.
var/aidisabled = 0
var/wiresexposed = FALSE // If it's been screwdrivered open.
var/aidisabled = FALSE
var/AAlarmwires = 31
var/shorted = 0
var/shorted = FALSE

// Waiting on a device to respond.
// Specifies an id_tag. NULL means we aren't waiting.
Expand Down Expand Up @@ -223,7 +223,7 @@
setDir(direction)

buildstage = 0
wiresexposed = 1
wiresexposed = TRUE
set_pixel_offsets_from_dir(-24, 24, -24, 24)

. = ..()
Expand Down
6 changes: 3 additions & 3 deletions code/modules/atmospherics/machinery/atmospherics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Pipes -> Pipelines
Pipelines + Other Objects -> Pipe network
*/
/obj/machinery/atmospherics
anchored = 1
anchored = TRUE
layer = GAS_PIPE_HIDDEN_LAYER //under wires
resistance_flags = FIRE_PROOF
max_integrity = 200
Expand All @@ -18,8 +18,8 @@ Pipelines + Other Objects -> Pipe network
active_power_usage = 0
power_channel = ENVIRON
on_blueprints = TRUE
var/nodealert = 0
var/can_unwrench = 0
var/nodealert = FALSE
var/can_unwrench = FALSE
/// If the machine is currently operating or not.
var/on = FALSE
/// The amount of pressure the machine wants to operate at.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

var/obj/machinery/power/generator/generator

anchored = 1
density = 1
anchored = TRUE
density = TRUE

can_unwrench = 1
var/side_inverted = 0
can_unwrench = TRUE
var/side_inverted = FALSE

var/light_range_on = 1
var/light_power_on = 0.1 //just dont want it to be culled by byond.
Expand Down Expand Up @@ -75,39 +75,36 @@
update_icon()

/obj/machinery/atmospherics/binary/circulator/proc/get_inlet_air()
if(side_inverted==0)
return air2
else
if(side_inverted)
return air1
else
return air2

/obj/machinery/atmospherics/binary/circulator/proc/get_outlet_air()
if(side_inverted==0)
return air1
else
if(side_inverted)
return air2
else
return air1

/obj/machinery/atmospherics/binary/circulator/proc/get_inlet_side()
if(dir==SOUTH||dir==NORTH)
if(side_inverted==0)
return "South"
else
if(side_inverted)
return "North"
else
return "South"

/obj/machinery/atmospherics/binary/circulator/proc/get_outlet_side()
if(dir==SOUTH||dir==NORTH)
if(side_inverted==0)
return "North"
else
if(side_inverted)
return "South"
else
return "North"

/obj/machinery/atmospherics/binary/circulator/multitool_act(mob/user, obj/item/I)
. = TRUE
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
return
if(!side_inverted)
side_inverted = TRUE
else
side_inverted = FALSE
side_inverted = !side_inverted
to_chat(user, "<span class='notice'>You reverse the circulator's valve settings. The inlet of the circulator is now on the [get_inlet_side(dir)] side.</span>")
desc = "A gas circulator pump and heat exchanger. Its input port is on the [get_inlet_side(dir)] side, and its output port is on the [get_outlet_side(dir)] side."

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
name = "passive gate"
desc = "A one-way air valve that does not require power"

can_unwrench = 1
can_unwrench = TRUE

target_pressure = ONE_ATMOSPHERE

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Thus, the two variables affect pump operation are set in New():
name = "gas pump"
desc = "A pump"

can_unwrench = 1
can_unwrench = TRUE

target_pressure = ONE_ATMOSPHERE

Expand Down Expand Up @@ -55,7 +55,7 @@ Thus, the two variables affect pump operation are set in New():

/obj/machinery/atmospherics/binary/pump/on
icon_state = "map_on"
on = 1
on = TRUE

/obj/machinery/atmospherics/binary/pump/update_icon()
..()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
name = "manual valve"
desc = "A pipe valve."

can_unwrench = 1
can_unwrench = TRUE

var/open = 0
var/open = FALSE

req_one_access_txt = "24;10"

Expand All @@ -19,7 +19,7 @@
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
open = TRUE
icon_state = "map_valve1"

/obj/machinery/atmospherics/binary/valve/update_icon(animation)
Expand All @@ -40,7 +40,7 @@
add_underlay(T, node2, get_dir(src, node2))

/obj/machinery/atmospherics/binary/valve/proc/open()
open = 1
open = TRUE
update_icon()
parent1.update = 0
parent2.update = 0
Expand All @@ -49,7 +49,7 @@
return

/obj/machinery/atmospherics/binary/valve/proc/close()
open = 0
open = FALSE
update_icon()
investigate_log("was closed by [usr ? key_name(usr) : "a remote signal"]", "atmos")
return
Expand Down Expand Up @@ -98,7 +98,7 @@
..()

/obj/machinery/atmospherics/binary/valve/digital/open
open = 1
open = TRUE
icon_state = "map_valve1"

/obj/machinery/atmospherics/binary/valve/digital/power_change()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Thus, the two variables affect pump operation are set in New():
name = "volumetric gas pump"
desc = "A volumetric pump"

can_unwrench = 1
can_unwrench = TRUE

var/transfer_rate = 200

Expand Down Expand Up @@ -51,7 +51,7 @@ Thus, the two variables affect pump operation are set in New():
return ..()

/obj/machinery/atmospherics/binary/volume_pump/on
on = 1
on = TRUE
icon_state = "map_on"

/obj/machinery/atmospherics/binary/volume_pump/atmos_init()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

/obj/machinery/atmospherics/trinary/filter/flipped
icon_state = "mmap"
flipped = 1
flipped = TRUE

/obj/machinery/atmospherics/trinary/filter/update_icon()
..()
Expand All @@ -74,7 +74,7 @@
icon_state += on ? "on" : "off"
else
icon_state += "off"
on = 0
on = FALSE

/obj/machinery/atmospherics/trinary/filter/update_underlays()
if(..())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
icon = 'icons/atmos/mixer.dmi'
icon_state = "map"

can_unwrench = 1
can_unwrench = TRUE

name = "gas mixer"

Expand Down Expand Up @@ -33,7 +33,7 @@

/obj/machinery/atmospherics/trinary/mixer/flipped
icon_state = "mmap"
flipped = 1
flipped = TRUE

/obj/machinery/atmospherics/trinary/mixer/update_icon(safety = 0)
..()
Expand All @@ -49,7 +49,7 @@
icon_state += on ? "on" : "off"
else
icon_state += "off"
on = 0
on = FALSE

/obj/machinery/atmospherics/trinary/mixer/update_underlays()
if(..())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
var/datum/pipeline/parent2
var/datum/pipeline/parent3

var/flipped = 0
var/flipped = FALSE

/obj/machinery/atmospherics/trinary/New()
..()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
name = "manual switching valve"
desc = "A pipe valve"

can_unwrench = 1
can_unwrench = TRUE

var/state = TVALVE_STATE_STRAIGHT

Expand All @@ -21,11 +21,11 @@

/obj/machinery/atmospherics/trinary/tvalve/flipped
icon_state = "map_tvalvem0"
flipped = 1
flipped = TRUE

/obj/machinery/atmospherics/trinary/tvalve/flipped/bypass
icon_state = "map_tvalvem1"
flipped = 1
flipped = TRUE
state = TVALVE_STATE_SIDE

/obj/machinery/atmospherics/trinary/tvalve/update_icon(animation)
Expand Down Expand Up @@ -121,11 +121,11 @@

/obj/machinery/atmospherics/trinary/tvalve/digital/flipped
icon_state = "map_tvalvem0"
flipped = 1
flipped = TRUE

/obj/machinery/atmospherics/trinary/tvalve/digital/flipped/bypass
icon_state = "map_tvalvem1"
flipped = 1
flipped = TRUE
state = TVALVE_STATE_SIDE

/obj/machinery/atmospherics/trinary/tvalve/digital/power_change()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
desc = "Lowers the body temperature so certain medications may take effect."
icon = 'icons/obj/cryogenics.dmi'
icon_state = "pod0"
density = 1
anchored = 1.0
density = TRUE
anchored = TRUE
layer = ABOVE_WINDOW_LAYER
plane = GAME_PLANE
interact_offline = 1
interact_offline = TRUE
max_integrity = 350
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 100, BOMB = 0, BIO = 100, RAD = 100, FIRE = 30, ACID = 30)
var/temperature_archived
Expand All @@ -23,7 +23,7 @@
var/current_heat_capacity = 50
var/efficiency

var/running_bob_animation = 0 // This is used to prevent threads from building up if update_icons is called multiple times
var/running_bob_animation = FALSE // This is used to prevent threads from building up if update_icons is called multiple times

light_color = LIGHT_COLOR_WHITE

Expand Down Expand Up @@ -361,7 +361,7 @@
if(src.on && !running_bob_animation) //no bobbing if off
var/up = 0 //used to see if we are going up or down, 1 is down, 2 is up
spawn(0) // Without this, the icon update will block. The new thread will die once the occupant leaves.
running_bob_animation = 1
running_bob_animation = TRUE
while(occupant)
overlays -= "lid[on]" //have to remove the overlays first, to force an update- remove cloning pod overlay
overlays -= pickle //remove mob overlay
Expand All @@ -388,7 +388,7 @@
overlays += "lid[on]" //re-add the overlay of the pod, they are inside it, not floating

sleep(7) //don't want to jiggle violently, just slowly bob
running_bob_animation = 0
running_bob_animation = FALSE

/obj/machinery/atmospherics/unary/cryo_cell/proc/process_occupant()
if(air_contents.total_moles() < 10)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/obj/machinery/atmospherics/unary/generator_input
icon = 'icons/obj/atmospherics/heat_exchanger.dmi'
icon_state = "intact"
density = 1
density = TRUE

name = "generator input"
desc = "Placeholder"
Expand Down
Loading

0 comments on commit ad608c8

Please sign in to comment.