mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-25 04:57:47 +01:00
Linter diagnostics + bans non-var relative pathing
This commit is contained in:
@@ -9,8 +9,8 @@
|
||||
// FOR THE LOVE OF GOD USE THESE. DO NOT FUCKING SPAGHETTIFY THIS.
|
||||
// Use the Has*() functions if you ONLY need to check.
|
||||
// If you need to do something, use Get*().
|
||||
HasAbove(var/z)
|
||||
HasBelow(var/z)
|
||||
/HasAbove(var/z)
|
||||
/HasBelow(var/z)
|
||||
// These give either the turf or null.
|
||||
GetAbove(var/atom/atom)
|
||||
GetBelow(var/atom/atom)
|
||||
/GetAbove(var/atom/atom)
|
||||
/GetBelow(var/atom/atom)
|
||||
@@ -43,7 +43,7 @@ var/list/z_levels = list()// Each bit re... haha just kidding this is a list of
|
||||
for(var/level = z, HasAbove(level), level++)
|
||||
. |= level+1
|
||||
|
||||
proc/AreConnectedZLevels(var/zA, var/zB)
|
||||
/proc/AreConnectedZLevels(var/zA, var/zB)
|
||||
return zA == zB || (zB in GetConnectedZlevels(zA))
|
||||
|
||||
/proc/get_zstep(ref, dir)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
|
||||
proc/HasAbove(var/z)
|
||||
/proc/HasAbove(var/z)
|
||||
return 0
|
||||
proc/HasBelow(var/z)
|
||||
/proc/HasBelow(var/z)
|
||||
return 0
|
||||
// These give either the turf or null.
|
||||
proc/GetAbove(var/turf/turf)
|
||||
/proc/GetAbove(var/turf/turf)
|
||||
return null
|
||||
proc/GetBelow(var/turf/turf)
|
||||
/proc/GetBelow(var/turf/turf)
|
||||
return null
|
||||
@@ -1,7 +1,7 @@
|
||||
////////////////////////////
|
||||
// parent class for pipes //
|
||||
////////////////////////////
|
||||
obj/machinery/atmospherics/pipe/zpipe
|
||||
/obj/machinery/atmospherics/pipe/zpipe
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "up"
|
||||
|
||||
@@ -56,13 +56,13 @@ obj/machinery/atmospherics/pipe/zpipe
|
||||
invisibility = i ? 101 : 0
|
||||
update_icon()
|
||||
|
||||
obj/machinery/atmospherics/pipe/zpipe/process()
|
||||
/obj/machinery/atmospherics/pipe/zpipe/process()
|
||||
if(!parent) //This should cut back on the overhead calling build_network thousands of times per cycle
|
||||
..()
|
||||
else
|
||||
. = PROCESS_KILL
|
||||
|
||||
obj/machinery/atmospherics/pipe/zpipe/check_pressure(pressure)
|
||||
/obj/machinery/atmospherics/pipe/zpipe/check_pressure(pressure)
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
|
||||
var/pressure_difference = pressure - environment.return_pressure()
|
||||
@@ -77,7 +77,7 @@ obj/machinery/atmospherics/pipe/zpipe/check_pressure(pressure)
|
||||
|
||||
else return 1
|
||||
|
||||
obj/machinery/atmospherics/pipe/zpipe/proc/burst()
|
||||
/obj/machinery/atmospherics/pipe/zpipe/proc/burst()
|
||||
src.visible_message("<span class='warning'>\The [src] bursts!</span>");
|
||||
playsound(src, 'sound/effects/bang.ogg', 25, 1)
|
||||
var/datum/effect/effect/system/smoke_spread/smoke = new
|
||||
@@ -85,27 +85,27 @@ obj/machinery/atmospherics/pipe/zpipe/proc/burst()
|
||||
smoke.start()
|
||||
qdel(src) // NOT qdel.
|
||||
|
||||
obj/machinery/atmospherics/pipe/zpipe/proc/normalize_dir()
|
||||
/obj/machinery/atmospherics/pipe/zpipe/proc/normalize_dir()
|
||||
if(dir == (NORTH|SOUTH))
|
||||
set_dir(NORTH)
|
||||
else if(dir == (EAST|WEST))
|
||||
set_dir(EAST)
|
||||
|
||||
obj/machinery/atmospherics/pipe/zpipe/Destroy()
|
||||
/obj/machinery/atmospherics/pipe/zpipe/Destroy()
|
||||
if(node1)
|
||||
node1.disconnect(src)
|
||||
if(node2)
|
||||
node2.disconnect(src)
|
||||
. = ..()
|
||||
|
||||
obj/machinery/atmospherics/pipe/zpipe/pipeline_expansion()
|
||||
/obj/machinery/atmospherics/pipe/zpipe/pipeline_expansion()
|
||||
return list(node1, node2)
|
||||
|
||||
obj/machinery/atmospherics/pipe/zpipe/update_icon()
|
||||
/obj/machinery/atmospherics/pipe/zpipe/update_icon()
|
||||
color = pipe_color
|
||||
return
|
||||
|
||||
obj/machinery/atmospherics/pipe/zpipe/disconnect(obj/machinery/atmospherics/reference)
|
||||
/obj/machinery/atmospherics/pipe/zpipe/disconnect(obj/machinery/atmospherics/reference)
|
||||
if(reference == node1)
|
||||
if(istype(node1, /obj/machinery/atmospherics/pipe))
|
||||
qdel(parent)
|
||||
@@ -120,14 +120,14 @@ obj/machinery/atmospherics/pipe/zpipe/disconnect(obj/machinery/atmospherics/refe
|
||||
/////////////////////////
|
||||
// the elusive up pipe //
|
||||
/////////////////////////
|
||||
obj/machinery/atmospherics/pipe/zpipe/up
|
||||
/obj/machinery/atmospherics/pipe/zpipe/up
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "up"
|
||||
|
||||
name = "upwards pipe"
|
||||
desc = "A pipe segment to connect upwards."
|
||||
|
||||
obj/machinery/atmospherics/pipe/zpipe/up/atmos_init()
|
||||
/obj/machinery/atmospherics/pipe/zpipe/up/atmos_init()
|
||||
normalize_dir()
|
||||
var/node1_dir
|
||||
|
||||
@@ -157,14 +157,14 @@ obj/machinery/atmospherics/pipe/zpipe/up/atmos_init()
|
||||
// and the down pipe //
|
||||
///////////////////////
|
||||
|
||||
obj/machinery/atmospherics/pipe/zpipe/down
|
||||
/obj/machinery/atmospherics/pipe/zpipe/down
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "down"
|
||||
|
||||
name = "downwards pipe"
|
||||
desc = "A pipe segment to connect downwards."
|
||||
|
||||
obj/machinery/atmospherics/pipe/zpipe/down/atmos_init()
|
||||
/obj/machinery/atmospherics/pipe/zpipe/down/atmos_init()
|
||||
normalize_dir()
|
||||
var/node1_dir
|
||||
|
||||
@@ -194,7 +194,7 @@ obj/machinery/atmospherics/pipe/zpipe/down/atmos_init()
|
||||
// supply/scrubbers //
|
||||
///////////////////////
|
||||
|
||||
obj/machinery/atmospherics/pipe/zpipe/up/scrubbers
|
||||
/obj/machinery/atmospherics/pipe/zpipe/up/scrubbers
|
||||
icon_state = "up-scrubbers"
|
||||
name = "upwards scrubbers pipe"
|
||||
desc = "A scrubbers pipe segment to connect upwards."
|
||||
@@ -204,7 +204,7 @@ obj/machinery/atmospherics/pipe/zpipe/up/scrubbers
|
||||
icon_connect_type = "-scrubbers"
|
||||
color = PIPE_COLOR_RED
|
||||
|
||||
obj/machinery/atmospherics/pipe/zpipe/up/supply
|
||||
/obj/machinery/atmospherics/pipe/zpipe/up/supply
|
||||
icon_state = "up-supply"
|
||||
name = "upwards supply pipe"
|
||||
desc = "A supply pipe segment to connect upwards."
|
||||
@@ -214,7 +214,7 @@ obj/machinery/atmospherics/pipe/zpipe/up/supply
|
||||
icon_connect_type = "-supply"
|
||||
color = PIPE_COLOR_BLUE
|
||||
|
||||
obj/machinery/atmospherics/pipe/zpipe/up/fuel
|
||||
/obj/machinery/atmospherics/pipe/zpipe/up/fuel
|
||||
icon_state = "up-fuel"
|
||||
name = "upwards fuel pipe"
|
||||
desc = "A fuel pipe segment to connect upwards."
|
||||
@@ -224,7 +224,7 @@ obj/machinery/atmospherics/pipe/zpipe/up/fuel
|
||||
icon_connect_type = "-fuel"
|
||||
color = PIPE_COLOR_YELLOW
|
||||
|
||||
obj/machinery/atmospherics/pipe/zpipe/up/aux
|
||||
/obj/machinery/atmospherics/pipe/zpipe/up/aux
|
||||
icon_state = "up-aux"
|
||||
name = "upwards aux pipe"
|
||||
desc = "A aux pipe segment to connect upwards."
|
||||
@@ -234,7 +234,7 @@ obj/machinery/atmospherics/pipe/zpipe/up/aux
|
||||
icon_connect_type = "-aux"
|
||||
color = PIPE_COLOR_CYAN
|
||||
|
||||
obj/machinery/atmospherics/pipe/zpipe/down/scrubbers
|
||||
/obj/machinery/atmospherics/pipe/zpipe/down/scrubbers
|
||||
icon_state = "down-scrubbers"
|
||||
name = "downwards scrubbers pipe"
|
||||
desc = "A scrubbers pipe segment to connect downwards."
|
||||
@@ -244,7 +244,7 @@ obj/machinery/atmospherics/pipe/zpipe/down/scrubbers
|
||||
icon_connect_type = "-scrubbers"
|
||||
color = PIPE_COLOR_RED
|
||||
|
||||
obj/machinery/atmospherics/pipe/zpipe/down/supply
|
||||
/obj/machinery/atmospherics/pipe/zpipe/down/supply
|
||||
icon_state = "down-supply"
|
||||
name = "downwards supply pipe"
|
||||
desc = "A supply pipe segment to connect downwards."
|
||||
@@ -254,7 +254,7 @@ obj/machinery/atmospherics/pipe/zpipe/down/supply
|
||||
icon_connect_type = "-supply"
|
||||
color = PIPE_COLOR_BLUE
|
||||
|
||||
obj/machinery/atmospherics/pipe/zpipe/down/fuel
|
||||
/obj/machinery/atmospherics/pipe/zpipe/down/fuel
|
||||
icon_state = "down-fuel"
|
||||
name = "downwards fuel pipe"
|
||||
desc = "A fuel pipe segment to connect downwards."
|
||||
@@ -264,7 +264,7 @@ obj/machinery/atmospherics/pipe/zpipe/down/fuel
|
||||
icon_connect_type = "-fuel"
|
||||
color = PIPE_COLOR_YELLOW
|
||||
|
||||
obj/machinery/atmospherics/pipe/zpipe/down/aux
|
||||
/obj/machinery/atmospherics/pipe/zpipe/down/aux
|
||||
icon_state = "down-aux"
|
||||
name = "upwards aux pipe"
|
||||
desc = "A aux pipe segment to connect upwards."
|
||||
|
||||
Reference in New Issue
Block a user