mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 03:59:59 +01:00
modules/atmospherics major cleanup (#61904)
major cleanup of modules/atmospherics folder and all related files, still many missing -cleanup of procs name -cleanup of vars name -documentation of some of the procs -minor changes to some for() logic (no in game changes just early continue or as anything checks) No in game changes, only code and docs
This commit is contained in:
@@ -274,7 +274,7 @@
|
||||
desc = "A lightweight foamed metal wall."
|
||||
gender = PLURAL
|
||||
max_integrity = 20
|
||||
CanAtmosPass = ATMOS_PASS_DENSITY
|
||||
can_atmos_pass = ATMOS_PASS_DENSITY
|
||||
|
||||
/obj/structure/foamedmetal/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
if(!t_loc)
|
||||
return
|
||||
var/list/newsmokes = list()
|
||||
for(var/turf/T in t_loc.GetAtmosAdjacentTurfs())
|
||||
for(var/turf/T in t_loc.get_atmos_adjacent_turfs())
|
||||
var/obj/effect/particle_effect/smoke/foundsmoke = locate() in T //Don't spread smoke where there's already smoke!
|
||||
if(foundsmoke)
|
||||
continue
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
anchored = TRUE
|
||||
opacity = FALSE
|
||||
density = TRUE
|
||||
CanAtmosPass = ATMOS_PASS_DENSITY
|
||||
can_atmos_pass = ATMOS_PASS_DENSITY
|
||||
var/timeleft = 300 //Set to 0 for permanent forcefields (ugh)
|
||||
|
||||
/obj/effect/forcefield/Initialize(mapload)
|
||||
@@ -21,7 +21,7 @@
|
||||
name = "glowing wall"
|
||||
icon = 'icons/effects/cult_effects.dmi'
|
||||
icon_state = "cultshield"
|
||||
CanAtmosPass = ATMOS_PASS_NO
|
||||
can_atmos_pass = ATMOS_PASS_NO
|
||||
timeleft = 200
|
||||
|
||||
/// A form of the cult forcefield that lasts permanently.
|
||||
|
||||
@@ -131,12 +131,12 @@
|
||||
if(istype(atmos_source))
|
||||
if(istype(atmos_destination))
|
||||
LAZYREMOVE(atmos_source.atmos_adjacent_turfs, atmos_destination)
|
||||
atmos_source.ImmediateCalculateAdjacentTurfs() //Just in case they were next to each other
|
||||
atmos_source.immediate_calculate_adjacent_turfs() //Just in case they were next to each other
|
||||
atmos_source = null
|
||||
if(istype(atmos_destination))
|
||||
if(istype(atmos_source))
|
||||
LAZYREMOVE(atmos_destination.atmos_adjacent_turfs, atmos_source)
|
||||
atmos_destination.ImmediateCalculateAdjacentTurfs()
|
||||
atmos_destination.immediate_calculate_adjacent_turfs()
|
||||
atmos_destination = null
|
||||
|
||||
/obj/effect/portal/Destroy()
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
desc = "A solid thick wall of web, airtight enough to block air flow."
|
||||
icon_state = "sealedweb"
|
||||
sealed = TRUE
|
||||
CanAtmosPass = ATMOS_PASS_NO
|
||||
can_atmos_pass = ATMOS_PASS_NO
|
||||
|
||||
/obj/structure/spider/stickyweb/genetic //for the spider genes in genetics
|
||||
genetic = TRUE
|
||||
@@ -354,7 +354,7 @@
|
||||
if(get_dist(src, entry_vent) <= 1)
|
||||
var/list/vents = list()
|
||||
var/datum/pipeline/entry_vent_parent = entry_vent.parents[1]
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in entry_vent_parent.other_atmosmch)
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in entry_vent_parent.other_atmos_machines)
|
||||
vents.Add(temp_vent)
|
||||
if(!vents.len)
|
||||
entry_vent = null
|
||||
|
||||
@@ -469,7 +469,7 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
if (S.dir == ALL_CARDINALS)
|
||||
to_chat(user, span_warning("\The [S] has no unconnected directions!"))
|
||||
return
|
||||
var/old_init_dir = S.GetInitDirections()
|
||||
var/old_init_dir = S.get_init_directions()
|
||||
if (old_init_dir == p_init_dir)
|
||||
to_chat(user, span_warning("\The [S] is already in this configuration!"))
|
||||
return
|
||||
@@ -492,7 +492,7 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
to_chat(user, span_warning("\The [src]'s screen flashes a warning: Can't configure a pipe in a currently connected direction."))
|
||||
return
|
||||
// Grab the current initializable directions, which may differ from old_init_dir if someone else was working on the same pipe at the same time
|
||||
var/current_init_dir = S.GetInitDirections()
|
||||
var/current_init_dir = S.get_init_directions()
|
||||
// Access p_init_dir directly. The RPD can change target layer and initializable directions (though not pipe type or dir) while working to dispense and connect a component,
|
||||
// and have it reflected in the final result. Reprogramming should be similarly consistent.
|
||||
var/new_init_dir = (current_init_dir & ~target_differences) | (p_init_dir & target_differences)
|
||||
@@ -500,7 +500,7 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
if (ISSTUB(new_init_dir))
|
||||
to_chat(user, span_warning("\The [src]'s screen flashes a warning: Can't configure a pipe to only connect in one direction."))
|
||||
return
|
||||
S.SetInitDirections(new_init_dir)
|
||||
S.set_init_directions(new_init_dir)
|
||||
// We're now reconfigured.
|
||||
// We can never disconnect from existing connections, but we can connect to previously unconnected directions, and should immediately do so
|
||||
var/newly_permitted_connections = new_init_dir & ~current_init_dir
|
||||
@@ -516,11 +516,11 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
node.disconnect(S)
|
||||
S.nodes[i] = null
|
||||
// Get our new connections
|
||||
S.atmosinit()
|
||||
S.atmos_init()
|
||||
// Connect to our new connections
|
||||
for (var/obj/machinery/atmospherics/O in S.nodes)
|
||||
O.atmosinit()
|
||||
O.addMember(src)
|
||||
O.atmos_init()
|
||||
O.add_member(src)
|
||||
SSair.add_to_rebuild_queue(S)
|
||||
// Finally, update our internal state - update_pipe_icon also updates dir and connections
|
||||
S.update_pipe_icon()
|
||||
@@ -573,7 +573,7 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
|
||||
pipe_type.update()
|
||||
pipe_type.add_fingerprint(usr)
|
||||
pipe_type.setPipingLayer(piping_layer)
|
||||
pipe_type.set_piping_layer(piping_layer)
|
||||
if(ispath(queued_p_type, /obj/machinery/atmospherics) && !ispath(queued_p_type, /obj/machinery/atmospherics/pipe/color_adapter))
|
||||
pipe_type.add_atom_colour(GLOB.pipe_paint_colors[paint_color], FIXED_COLOUR_PRIORITY)
|
||||
if(mode & WRENCH_MODE)
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
force_proj_busy = FALSE
|
||||
return
|
||||
force_proj_busy = FALSE
|
||||
|
||||
|
||||
playsound(src,'sound/weapons/resonator_fire.ogg',50,TRUE)
|
||||
user.visible_message(span_warning("[user] projects a forcefield!"),span_notice("You project a forcefield."))
|
||||
var/obj/structure/projected_forcefield/F = new(T, src)
|
||||
@@ -102,7 +102,7 @@
|
||||
density = TRUE
|
||||
mouse_opacity = MOUSE_OPACITY_OPAQUE
|
||||
resistance_flags = INDESTRUCTIBLE
|
||||
CanAtmosPass = ATMOS_PASS_DENSITY
|
||||
can_atmos_pass = ATMOS_PASS_DENSITY
|
||||
armor = list(MELEE = 0, BULLET = 25, LASER = 50, ENERGY = 50, BOMB = 25, BIO = 100, RAD = 100, FIRE = 100, ACID = 100)
|
||||
var/obj/item/forcefield_projector/generator
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
for(var/turf/T in turflist)
|
||||
if(T == previousturf)
|
||||
continue //so we don't burn the tile we be standin on
|
||||
var/list/turfs_sharing_with_prev = previousturf.GetAtmosAdjacentTurfs(alldir=1)
|
||||
var/list/turfs_sharing_with_prev = previousturf.get_atmos_adjacent_turfs(alldir=1)
|
||||
if(!(T in turfs_sharing_with_prev))
|
||||
break
|
||||
if(igniter)
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
canSmoothWith = list(SMOOTH_GROUP_ALIEN_RESIN)
|
||||
max_integrity = 200
|
||||
var/resintype = null
|
||||
CanAtmosPass = ATMOS_PASS_DENSITY
|
||||
can_atmos_pass = ATMOS_PASS_DENSITY
|
||||
|
||||
|
||||
/obj/structure/alien/resin/Initialize(mapload)
|
||||
@@ -89,7 +89,7 @@
|
||||
smoothing_groups = list(SMOOTH_GROUP_ALIEN_RESIN, SMOOTH_GROUP_ALIEN_WALLS)
|
||||
canSmoothWith = list(SMOOTH_GROUP_ALIEN_WALLS)
|
||||
|
||||
/obj/structure/alien/resin/wall/BlockSuperconductivity()
|
||||
/obj/structure/alien/resin/wall/block_superconductivity()
|
||||
return 1
|
||||
|
||||
/// meant for one lavaland ruin or anywhere that has simplemobs who can push aside structures
|
||||
@@ -190,7 +190,7 @@
|
||||
qdel(src)
|
||||
return FALSE
|
||||
|
||||
for(var/turf/T in U.GetAtmosAdjacentTurfs())
|
||||
for(var/turf/T in U.get_atmos_adjacent_turfs())
|
||||
if(locate(/obj/structure/alien/weeds) in T)
|
||||
continue
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
smoothing_groups = list(SMOOTH_GROUP_CLOSED_TURFS, SMOOTH_GROUP_WALLS)
|
||||
canSmoothWith = list(SMOOTH_GROUP_WALLS)
|
||||
can_be_unanchored = FALSE
|
||||
CanAtmosPass = ATMOS_PASS_DENSITY
|
||||
can_atmos_pass = ATMOS_PASS_DENSITY
|
||||
flags_1 = RAD_PROTECT_CONTENTS_1 | RAD_NO_CONTAMINATE_1
|
||||
rad_insulation = RAD_MEDIUM_INSULATION
|
||||
var/mineral = /obj/item/stack/sheet/iron
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
icon_state = "holo_firelock"
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
CanAtmosPass = ATMOS_PASS_NO
|
||||
can_atmos_pass = ATMOS_PASS_NO
|
||||
alpha = 150
|
||||
flags_1 = RAD_PROTECT_CONTENTS_1 | RAD_NO_CONTAMINATE_1
|
||||
rad_insulation = RAD_LIGHT_INSULATION
|
||||
@@ -110,7 +110,7 @@
|
||||
ADD_TRAIT(local, TRAIT_FIREDOOR_STOP, TRAIT_GENERIC)
|
||||
air_update_turf(TRUE, TRUE)
|
||||
|
||||
/obj/structure/holosign/barrier/atmos/BlockSuperconductivity() //Didn't used to do this, but it's "normal", and will help ease heat flow transitions with the players.
|
||||
/obj/structure/holosign/barrier/atmos/block_superconductivity() //Didn't used to do this, but it's "normal", and will help ease heat flow transitions with the players.
|
||||
return TRUE
|
||||
|
||||
/obj/structure/holosign/barrier/atmos/Destroy()
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
icon_state = "metal"
|
||||
max_integrity = 200
|
||||
armor = list(MELEE = 10, BULLET = 0, LASER = 0, ENERGY = 100, BOMB = 10, BIO = 100, RAD = 100, FIRE = 50, ACID = 50)
|
||||
CanAtmosPass = ATMOS_PASS_DENSITY
|
||||
can_atmos_pass = ATMOS_PASS_DENSITY
|
||||
flags_1 = RAD_PROTECT_CONTENTS_1 | RAD_NO_CONTAMINATE_1
|
||||
rad_insulation = RAD_MEDIUM_INSULATION
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
armor = list(MELEE = 100, BULLET = 80, LASER = 80, ENERGY = 100, BOMB = 50, BIO = 100, RAD = 100, FIRE = 50, ACID = 50)
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
CanAtmosPass = ATMOS_PASS_NO
|
||||
can_atmos_pass = ATMOS_PASS_NO
|
||||
|
||||
/obj/structure/plasticflaps/opaque
|
||||
opacity = TRUE
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
///Update the flaps behaviour to gases, if not anchored will let air pass through
|
||||
/obj/structure/plasticflaps/proc/update_atmos_behaviour()
|
||||
CanAtmosPass = anchored ? ATMOS_PASS_YES : ATMOS_PASS_NO
|
||||
can_atmos_pass = anchored ? ATMOS_PASS_YES : ATMOS_PASS_NO
|
||||
|
||||
/obj/structure/plasticflaps/wirecutter_act(mob/living/user, obj/item/W)
|
||||
. = ..()
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
var/facing = "l" //Does the windoor open to the left or right?
|
||||
var/secure = FALSE //Whether or not this creates a secure windoor
|
||||
var/state = "01" //How far the door assembly has progressed
|
||||
CanAtmosPass = ATMOS_PASS_PROC
|
||||
can_atmos_pass = ATMOS_PASS_PROC
|
||||
|
||||
/obj/structure/windoor_assembly/Initialize(mapload, loc, set_dir)
|
||||
. = ..()
|
||||
@@ -68,7 +68,7 @@
|
||||
if(istype(mover, /obj/structure/windoor_assembly) || istype(mover, /obj/machinery/door/window))
|
||||
return valid_window_location(loc, mover.dir, is_fulltile = FALSE)
|
||||
|
||||
/obj/structure/windoor_assembly/CanAtmosPass(turf/T)
|
||||
/obj/structure/windoor_assembly/can_atmos_pass(turf/T)
|
||||
if(get_dir(loc, T) == dir)
|
||||
return !density
|
||||
else
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
can_be_unanchored = TRUE
|
||||
resistance_flags = ACID_PROOF
|
||||
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 80, ACID = 100)
|
||||
CanAtmosPass = ATMOS_PASS_PROC
|
||||
can_atmos_pass = ATMOS_PASS_PROC
|
||||
rad_insulation = RAD_VERY_LIGHT_INSULATION
|
||||
pass_flags_self = PASSGLASS
|
||||
set_dir_on_move = FALSE
|
||||
@@ -327,7 +327,7 @@
|
||||
if(anchored)
|
||||
move_update_air(T)
|
||||
|
||||
/obj/structure/window/CanAtmosPass(turf/T)
|
||||
/obj/structure/window/can_atmos_pass(turf/T)
|
||||
if(!anchored || !density)
|
||||
return TRUE
|
||||
return !(fulltile || dir == get_dir(loc, T))
|
||||
@@ -548,7 +548,7 @@
|
||||
explosion_block = 2
|
||||
glass_type = /obj/item/stack/sheet/plasmarglass
|
||||
|
||||
/obj/structure/window/reinforced/plasma/BlockSuperconductivity()
|
||||
/obj/structure/window/reinforced/plasma/block_superconductivity()
|
||||
return TRUE
|
||||
|
||||
/obj/structure/window/reinforced/plasma/spawner/east
|
||||
@@ -730,7 +730,7 @@
|
||||
glass_type = /obj/item/stack/sheet/paperframes
|
||||
heat_resistance = 233
|
||||
decon_speed = 10
|
||||
CanAtmosPass = ATMOS_PASS_YES
|
||||
can_atmos_pass = ATMOS_PASS_YES
|
||||
resistance_flags = FLAMMABLE
|
||||
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 0, ACID = 0)
|
||||
knocksound = "pageturn"
|
||||
|
||||
Reference in New Issue
Block a user