@@ -27,6 +27,7 @@
edges = list()

/datum/pipeline/proc/process()//This use to be called called from the pipe networks
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/pipeline/proc/process() called tick#: [world.time]")
if((world.timeofday - last_pressure_check) / 10 >= PRESSURE_CHECK_DELAY)
//Check to see if pressure is within acceptable limits
var/pressure = air.return_pressure()
@@ -42,6 +43,7 @@
//air.react() //Should be handled by pipe_network now

/datum/pipeline/proc/temporarily_store_air()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/pipeline/proc/temporarily_store_air() called tick#: [world.time]")
//Update individual gas_mixtures by volume ratio

for(var/obj/machinery/atmospherics/pipe/member in members)
@@ -64,6 +66,7 @@
member.air_temporary.update_values()

/datum/pipeline/proc/build_pipeline(obj/machinery/atmospherics/pipe/base)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/pipeline/proc/build_pipeline() called tick#: [world.time]")
var/list/possible_expansions = list(base)
members = list(base)
edges = list()
@@ -110,6 +113,8 @@

/datum/pipeline/proc/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)

writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/pipeline/proc/network_expand() called tick#: [world.time]")

if(new_network.line_members.Find(src))
return 0

@@ -125,6 +130,7 @@
return 1

/datum/pipeline/proc/return_network(obj/machinery/atmospherics/reference)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/pipeline/proc/return_network() called tick#: [world.time]")
if(!network)
network = getFromDPool(/datum/pipe_network)
network.build_network(src, null)
@@ -135,6 +141,7 @@
return network

/datum/pipeline/proc/mingle_with_turf(turf/simulated/target, mingle_volume)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/pipeline/proc/mingle_with_turf() called tick#: [world.time]")
var/datum/gas_mixture/air_sample = air.remove_ratio(mingle_volume/air.volume)
air_sample.volume = mingle_volume

@@ -169,6 +176,7 @@
network.update = 1

/datum/pipeline/proc/temperature_interact(turf/target, share_volume, thermal_conductivity)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/pipeline/proc/temperature_interact() called tick#: [world.time]")
var/total_heat_capacity = air.heat_capacity()
var/partial_heat_capacity = total_heat_capacity*(share_volume/air.volume)

@@ -108,6 +108,7 @@
return 1

/obj/machinery/atmospherics/pipe/simple/heat_exchanging/proc/radiate()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/pipe/simple/heat_exchanging/proc/radiate() called tick#: [world.time]")
var/datum/gas_mixture/internal = return_air()
var/internal_transfer_moles = 0.25 * internal.total_moles()
var/datum/gas_mixture/internal_removed = internal.remove(internal_transfer_moles)
@@ -35,7 +35,7 @@


// AUTOFIXED BY fix_string_idiocy.py
// C:\Users\Rob\Documents\Projects\vgstation13\code\ATMOSPHERICS\chiller.dm:95: dat += "Power Level: [cell ? round(cell.percent(),1) : 0]%<BR><BR>"
// C:\Users\Rob\\documents\\\projects\vgstation13\code\ATMOSPHERICS\chiller.dm:95: dat += "Power Level: [cell ? round(cell.percent(),1) : 0]%<BR><BR>"
dat += {"Power Level: [cell ? round(cell.percent(),1) : 0]%<BR><BR>
Set Temperature:
<A href='?src=\ref[src];op=temp;val=-5'>-</A>
@@ -93,6 +93,7 @@
return

/obj/machinery/space_heater/air_conditioner/proc/chill()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/space_heater/air_conditioner/proc/chill() called tick#: [world.time]")
var/turf/simulated/L = loc
if(istype(L))
var/datum/gas_mixture/env = L.return_air()
@@ -101,7 +101,7 @@


// AUTOFIXED BY fix_string_idiocy.py
// C:\Users\Rob\Documents\Projects\vgstation13\code\game\machinery\spaceheater.dm:99: dat += "Power Level: [cell ? round(cell.percent(),1) : 0]%<BR><BR>"
// C:\Users\Rob\\documents\\\projects\vgstation13\code\game\\machinery\spaceheater.dm:99: dat += "Power Level: [cell ? round(cell.percent(),1) : 0]%<BR><BR>"
dat += {"Power Level: [cell ? round(cell.percent(),1) : 0]%<BR><BR>
Set Temperature:
<A href='?src=\ref[src];op=temp;val=-5'>-</A>
@@ -1,4 +1,5 @@
client/verb/discon_pipes()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\client/verb/discon_pipes() called tick#: [world.time]")
set name = "Show Disconnected Pipes"
set category = "Debug"

@@ -250,6 +250,8 @@ var/global/list/nlist = list( \
)
/obj/item/pipe/proc/update()

writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/pipe/proc/update() called tick#: [world.time]")

name = nlist[pipe_type+1] + " fitting"
icon = 'icons/obj/pipe-item.dmi'
icon_state = pipeID2State[pipe_type + 1]
@@ -263,6 +265,7 @@ var/global/list/nlist = list( \
set category = "Object"
set name = "Rotate Pipe"
set src in view(1)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/pipe/verb/rotate() called tick#: [world.time]")

if ( usr.stat || usr.restrained() || (usr.status_flags & FAKEDEATH))
return
@@ -288,6 +291,7 @@ var/global/list/nlist = list( \
// returns all pipe's endpoints

/obj/item/pipe/proc/get_pipe_dir()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/pipe/proc/get_pipe_dir() called tick#: [world.time]")
if (!dir)
return 0
var/flip = turn(dir, 180)
@@ -323,6 +327,8 @@ var/global/list/nlist = list( \

/obj/item/pipe/proc/get_pdir() //endpoints for regular pipes

writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/pipe/proc/get_pdir() called tick#: [world.time]")

var/flip = turn(dir, 180)
// var/cw = turn(dir, -90)
// var/acw = turn(dir, 90)
@@ -339,6 +345,7 @@ var/global/list/nlist = list( \
// return the h_dir (heat-exchange pipes) from the type and the dir

/obj/item/pipe/proc/get_hdir() //endpoints for h/e pipes
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/pipe/proc/get_hdir() called tick#: [world.time]")

// var/flip = turn(dir, 180)
// var/cw = turn(dir, -90)
@@ -36,10 +36,12 @@
/obj/machinery/atmospherics/pipe/singularity_pull(/obj/machinery/singularity/S, size)
return
/obj/machinery/atmospherics/pipe/proc/pipeline_expansion()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/pipe/proc/pipeline_expansion() called tick#: [world.time]")
return null


/obj/machinery/atmospherics/pipe/proc/check_pressure(pressure)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/pipe/proc/check_pressure() called tick#: [world.time]")
//Return 1 if parent should continue checking other pipes
//Return null if parent should stop checking other pipes. Recall: del(src) will by default return null
return 1
@@ -217,13 +219,15 @@
user << "<span class='info'>This [src.name] is rated up to [format_num(alert_pressure)] kPa.</span>"

/obj/machinery/atmospherics/pipe/simple/proc/groan()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/pipe/simple/proc/groan() called tick#: [world.time]")
src.visible_message("<span class='warning'>\The [src] groans from the pressure!</span>");

// Need SFX for groaning metal.
//playsound(get_turf(src), 'sound/effects/groan.ogg', 25, 1)


/obj/machinery/atmospherics/pipe/simple/proc/burst()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/pipe/simple/proc/burst() called tick#: [world.time]")
src.visible_message("<span class='danger'>\The [src] bursts!</span>");

var/turf/T=get_turf(src)
@@ -273,6 +277,7 @@


/obj/machinery/atmospherics/pipe/simple/proc/normalize_dir()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/pipe/simple/proc/normalize_dir() called tick#: [world.time]")
if(dir==3)
dir = 1
else if(dir==12)
@@ -12,6 +12,7 @@

// For straight pipes
/proc/rotate_pipe_straight(var/newdir)
writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/rotate_pipe_straight() called tick#: [world.time]")
switch(newdir)
if(SOUTH) // 2->1
return NORTH
@@ -111,6 +111,7 @@ turf/simulated/floor

obj/machinery/portable_atmospherics/canister
verb/test_release()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\verb/test_release() called tick#: [world.time]")
set src in world
set category = "Minor"

@@ -425,6 +426,7 @@ turf/simulated
hotspot_expose(temp, volume)

fire_verbose()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\fire_verbose() called tick#: [world.time]")
set src in world
set category = "Minor"

@@ -454,6 +456,7 @@ obj/indicator
icon_state = measurement()

proc/measurement()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/measurement() called tick#: [world.time]")
var/turf/T = loc
if(!isturf(T)) return
var/datum/gas_mixture/GM = T.return_air()
@@ -13,10 +13,14 @@ datum/air_group
var/check_delay = 10 //number of ticks between updates, starts fairly high to get boring groups out of the way

proc/members()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/members() called tick#: [world.time]")
//Returns the members of the group
proc/process_group()


writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/process_group() called tick#: [world.time]")


var/list/borders //Tiles that connect this group to other groups/individual tiles
var/list/members //All tiles in this group

@@ -25,6 +29,7 @@ datum/air_group


proc/suspend_group_processing()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/suspend_group_processing() called tick#: [world.time]")
group_processing = 0
update_tiles_from_group()
check_delay=0
@@ -34,6 +39,7 @@ datum/air_group
//Copy group air information to individual tile air
//Used right before turning on group processing
proc/update_group_from_tiles()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/update_group_from_tiles() called tick#: [world.time]")
var/sample_member = pick(members)
var/datum/gas_mixture/sample_air = sample_member:air

@@ -45,6 +51,7 @@ datum/air_group
//Copy group air information to individual tile air
//Used right before turning off group processing
proc/update_tiles_from_group()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/update_tiles_from_group() called tick#: [world.time]")
for(var/member in members)
member:air.copy_from(air)
if (istype(member,/turf/simulated))
@@ -53,13 +60,15 @@ datum/air_group


proc/archive()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/archive() called tick#: [world.time]")
air.archive()
archived_cycle = air_master.current_cycle


//If individually processing tiles, checks all member tiles to see if they are close enough that the group may resume group processing
//Warning: Do not call, called by air_master.process()
proc/check_regroup()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/check_regroup() called tick#: [world.time]")
//Purpose: Checks to see if group processing should be turned back on
//Returns: group_processing
if(prevent_airgroup_regroup)
@@ -1,12 +1,16 @@

/atom/proc/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/atom/proc/temperature_expose() called tick#: [world.time]")
return null



/turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)


writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/turf/proc/hotspot_expose() called tick#: [world.time]")



/turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
var/datum/gas_mixture/air_contents = return_air()
@@ -62,6 +66,7 @@


/obj/effect/hotspot/proc/perform_exposure()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/effect/hotspot/proc/perform_exposure() called tick#: [world.time]")
var/turf/simulated/floor/location = loc
if(!istype(location)) return 0

@@ -142,6 +147,7 @@
// Garbage collect itself by nulling reference to it

/obj/effect/hotspot/proc/Kill()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/effect/hotspot/proc/Kill() called tick#: [world.time]")
DestroyTurf()
if(istype(loc, /turf/simulated))
var/turf/simulated/T = loc
@@ -151,6 +157,8 @@

/obj/effect/hotspot/proc/DestroyTurf()

writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/effect/hotspot/proc/DestroyTurf() called tick#: [world.time]")

if(istype(loc, /turf/simulated))
var/turf/simulated/T = loc
if(T.to_be_destroyed)
@@ -60,6 +60,7 @@ What are the archived variables for?

//PV=nRT - related procedures
proc/heat_capacity()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/heat_capacity() called tick#: [world.time]")
var/heat_capacity = HEAT_CAPACITY_CALCULATION(oxygen,carbon_dioxide,nitrogen,toxins)

if(trace_gases.len)
@@ -69,6 +70,7 @@ What are the archived variables for?


proc/heat_capacity_archived()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/heat_capacity_archived() called tick#: [world.time]")
var/heat_capacity_archived = HEAT_CAPACITY_CALCULATION(oxygen_archived,carbon_dioxide_archived,nitrogen_archived,toxins_archived)

if(trace_gases.len)
@@ -78,6 +80,7 @@ What are the archived variables for?


proc/total_moles()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/total_moles() called tick#: [world.time]")
var/moles = oxygen + carbon_dioxide + nitrogen + toxins

if(trace_gases.len)
@@ -87,25 +90,30 @@ What are the archived variables for?


proc/return_pressure()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/return_pressure() called tick#: [world.time]")
if(volume>0)
return total_moles()*R_IDEAL_GAS_EQUATION*temperature/volume
return 0


proc/return_temperature()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/return_temperature() called tick#: [world.time]")
return temperature


proc/return_volume()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/return_volume() called tick#: [world.time]")
return max(0, volume)


proc/thermal_energy()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/thermal_energy() called tick#: [world.time]")
return temperature*heat_capacity()


//Procedures used for very specific events
proc/check_tile_graphic()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/check_tile_graphic() called tick#: [world.time]")
//returns 1 if graphic changed
graphic = null
if(toxins > MOLES_PLASMA_VISIBLE)
@@ -120,6 +128,7 @@ What are the archived variables for?
return graphic != graphic_archived

proc/react(atom/dump_location)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/react() called tick#: [world.time]")
var/reacting = 0 //set to 1 if a notable reaction occured (used by pipe_network)

if(trace_gases.len > 0)
@@ -148,6 +157,7 @@ What are the archived variables for?
return reacting

proc/fire()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/fire() called tick#: [world.time]")
var/energy_released = 0
var/old_heat_capacity = heat_capacity()

@@ -202,49 +212,61 @@ What are the archived variables for?
return fuel_burnt

proc/archive()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/archive() called tick#: [world.time]")
//Update archived versions of variables
//Returns: 1 in all cases

proc/merge(datum/gas_mixture/giver)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/merge() called tick#: [world.time]")
//Merges all air from giver into self. Deletes giver.
//Returns: 1 on success (no failure cases yet)

proc/check_then_merge(datum/gas_mixture/giver)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/check_then_merge() called tick#: [world.time]")
//Similar to merge(...) but first checks to see if the amount of air assumed is small enough
// that group processing is still accurate for source (aborts if not)
//Returns: 1 on successful merge, 0 if the check failed

proc/remove(amount)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/remove() called tick#: [world.time]")
//Proportionally removes amount of gas from the gas_mixture
//Returns: gas_mixture with the gases removed

proc/remove_ratio(ratio)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/remove_ratio() called tick#: [world.time]")
//Proportionally removes amount of gas from the gas_mixture
//Returns: gas_mixture with the gases removed

proc/subtract(datum/gas_mixture/right_side)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/subtract() called tick#: [world.time]")
//Subtracts right_side from air_mixture. Used to help turfs mingle

proc/check_then_remove(amount)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/check_then_remove() called tick#: [world.time]")
//Similar to remove(...) but first checks to see if the amount of air removed is small enough
// that group processing is still accurate for source (aborts if not)
//Returns: gas_mixture with the gases removed or null

proc/copy_from(datum/gas_mixture/sample)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/copy_from() called tick#: [world.time]")
//Copies variables from sample

proc/share(datum/gas_mixture/sharer)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/share() called tick#: [world.time]")
//Performs air sharing calculations between two gas_mixtures assuming only 1 boundary length
//Return: amount of gas exchanged (+ if sharer received)

proc/mimic(turf/model)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/mimic() called tick#: [world.time]")
//Similar to share(...), except the model is not modified
//Return: amount of gas exchanged

proc/check_gas_mixture(datum/gas_mixture/sharer)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/check_gas_mixture() called tick#: [world.time]")
//Returns: 0 if the self-check failed then -1 if sharer-check failed then 1 if both checks pass

proc/check_turf(turf/model)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/check_turf() called tick#: [world.time]")
//Returns: 0 if self-check failed or 1 if check passes

// check_me_then_share(datum/gas_mixture/sharer)
@@ -265,19 +287,28 @@ What are the archived variables for?

proc/temperature_mimic(turf/model, conduction_coefficient)

writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/temperature_mimic() called tick#: [world.time]")

proc/temperature_share(datum/gas_mixture/sharer, conduction_coefficient)

proc/temperature_turf_share(turf/simulated/sharer, conduction_coefficient)


writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/temperature_turf_share() called tick#: [world.time]")


proc/check_me_then_temperature_mimic(turf/model, conduction_coefficient)

proc/check_me_then_temperature_share(datum/gas_mixture/sharer, conduction_coefficient)

writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/check_me_then_temperature_share() called tick#: [world.time]")

proc/check_both_then_temperature_share(datum/gas_mixture/sharer, conduction_coefficient)

proc/check_me_then_temperature_turf_share(turf/simulated/sharer, conduction_coefficient)

writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/check_me_then_temperature_turf_share() called tick#: [world.time]")

proc/compare(datum/gas_mixture/sample)
//Compares sample to self to see if within acceptable ranges that group processing may be enabled

@@ -1,4 +1,5 @@
/turf/simulated/proc/find_group()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/turf/simulated/proc/find_group() called tick#: [world.time]")
//Basically, join any nearby valid groups
// If more than one, pick one with most members at my borders
// If can not find any but there was an ungrouped at border with me, call for group assembly
@@ -56,6 +56,7 @@ Important Procedures
var/kill_air = 0

atom/proc/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\datom/proc/CanPass() called tick#: [world.time]")
return (!density || !height || air_group)

turf
@@ -4,6 +4,7 @@ atom/movable/var/pressure_resistance = 5
atom/movable/var/last_forced_movement = 0

atom/movable/proc/experience_pressure_difference(pressure_difference, direction)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\datom/movable/proc/experience_pressure_difference() called tick#: [world.time]")
if(last_forced_movement >= air_master.current_cycle)
return 0
else if(!anchored)
@@ -54,6 +55,7 @@ turf
var/check_delay = 0 //number of ticks between updates

proc/high_pressure_movements()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/high_pressure_movements() called tick#: [world.time]")
if(reporting_pressure_difference)
world << "pressure_difference = [pressure_difference]; pressure_direction = [pressure_direction]"
for(var/atom/movable/in_tile in src)
@@ -62,6 +64,7 @@ turf
pressure_difference = 0

proc/consider_pressure_difference(connection_difference, connection_direction)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/consider_pressure_difference() called tick#: [world.time]")
if(connection_difference < 0)
connection_difference = -connection_difference
connection_direction = turn(connection_direction,180)
@@ -73,6 +76,7 @@ turf
pressure_direction = connection_direction

turf/simulated/proc/consider_pressure_difference_space(connection_difference)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \turf/simulated/proc/consider_pressure_difference_space() called tick#: [world.time]")
for(var/direction in cardinal)
if(direction&group_border)
if(istype(get_step(src,direction),/turf/space))
@@ -107,6 +111,7 @@ turf/simulated
var/tmp/being_superconductive = 0

proc/update_visuals(datum/gas_mixture/model)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/update_visuals() called tick#: [world.time]")
overlays.len = 0

var/siding_icon_state = return_siding_icon_state()
@@ -187,16 +192,19 @@ turf/simulated
else return ..()

proc/archive()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/archive() called tick#: [world.time]")
if(air) //For open space like floors
air.archive()

temperature_archived = temperature
archived_cycle = air_master.current_cycle

proc/share_air_with_tile(turf/simulated/T)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/share_air_with_tile() called tick#: [world.time]")
return air.share(T.air)

proc/mimic_air_with_tile(turf/T)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/mimic_air_with_tile() called tick#: [world.time]")
return air.mimic(T)

return_air()
@@ -230,6 +238,7 @@ turf/simulated
return ..()

proc/update_air_properties()//OPTIMIZE
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/update_air_properties() called tick#: [world.time]")
air_check_directions = 0

for(var/direction in cardinal)
@@ -279,6 +288,7 @@ turf/simulated
processing = 0

proc/process_cell()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/process_cell() called tick#: [world.time]")
//this proc does all the heavy lifting for individual tile processing
//it shares with all of its neighbors, spreads fire, calls superconduction
//and doesn't afraid of anything
@@ -385,6 +395,7 @@ turf/simulated
return 1

proc/super_conduct()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/super_conduct() called tick#: [world.time]")
var/conductivity_directions = 0
if(blocks_air)
//Does not participate in air exchange, so will conduct heat across all four borders at this time
@@ -515,6 +526,7 @@ turf/simulated
return 0

proc/mimic_temperature_solid(turf/model, conduction_coefficient)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/mimic_temperature_solid() called tick#: [world.time]")
var/delta_temperature = (temperature_archived - model.temperature)
if((heat_capacity > 0) && (abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER))

@@ -523,6 +535,7 @@ turf/simulated
temperature -= heat/heat_capacity

proc/share_temperature_mutual_solid(turf/simulated/sharer, conduction_coefficient)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/share_temperature_mutual_solid() called tick#: [world.time]")
var/delta_temperature = (temperature_archived - sharer.temperature_archived)
if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER && heat_capacity && sharer.heat_capacity)

@@ -534,6 +547,8 @@ turf/simulated

proc/consider_superconductivity(starting)

writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/consider_superconductivity() called tick#: [world.time]")

if(being_superconductive || !thermal_conductivity)
return 0

@@ -551,6 +566,7 @@ turf/simulated
air_master.active_super_conductivity += src

proc/reset_delay()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/reset_delay() called tick#: [world.time]")
//sets this turf to process quickly again
next_check=0
check_delay= -5 //negative numbers mean a mandatory quick-update period
@@ -5,6 +5,7 @@ var/minZ = 2
// (such as mining base => admin station)
// Note that this assumes the ship's top is at z=1 and bottom at z=4
/obj/item/weapon/tank/jetpack/proc/move_z(cardinal, mob/user as mob)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/weapon/tank/jetpack/proc/move_z() called tick#: [world.time]")
if (user.z > 1)
user << "<span class='warning'>There is nothing of interest in that direction.</span>"
return
@@ -76,6 +76,7 @@ atom/movable/Move() //Hackish
return //nothing

proc/set_up() //Update the overlays to make the openspace turf show what's down a level
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/set_up() called tick#: [world.time]")
if(!overlay_references)
overlay_references = list()
if(!floorbelow) return
@@ -86,11 +87,13 @@ atom/movable/Move() //Hackish
overlay_references[o] = o_img

proc/AddImage(var/atom/movable/o)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/AddImage() called tick#: [world.time]")
var/o_img = image(o, dir=o.dir, layer = TURF_LAYER+0.05*o.layer)
overlays += o_img
overlay_references[o] = o_img

proc/RemoveImage(var/atom/movable/o)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/RemoveImage() called tick#: [world.time]")
var/o_img = overlay_references[o]
overlays -= o_img
overlay_references -= o
@@ -47,6 +47,7 @@
return

/obj/effect/landmark/zcontroller/proc/add(var/list/L, var/I, var/transfer)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/effect/landmark/zcontroller/proc/add() called tick#: [world.time]")
while (L.len)
var/turf/T = pick(L)

@@ -113,6 +114,7 @@ atom/movable/Move() //Hackish
controller.add(temp,3,1)

/obj/effect/landmark/zcontroller/proc/calc(var/list/L)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/effect/landmark/zcontroller/proc/calc() called tick#: [world.time]")
var/list/slowholder = list()
var/list/normalholder = list()
var/list/fastholder = list()
@@ -60,6 +60,7 @@ var/list/reagent_effects = list("toxin","anti_toxin","stoxin","space_drugs","min
var/jungle_plants_init = 0

/proc/init_jungle_plants()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/proc/init_jungle_plants() called tick#: [world.time]")
jungle_plants_init = 1
fruit_icon_states = shuffle(fruit_icon_states)
reagent_effects = shuffle(reagent_effects)
@@ -158,6 +158,7 @@

//Returns 1 if the machine can be interacted with via this console.
/obj/machinery/computer/rust_core_control/proc/check_core_status(var/obj/machinery/power/rust_core/C)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/computer/rust_core_control/proc/check_core_status() called tick#: [world.time]")
if(isnull(C))
return

@@ -177,7 +177,7 @@ Deuterium-tritium fusion: 4.5 x 10^7 K

//if there is too much plasma in the field, lose some
/*if( held_plasma.toxins > (MOLES_CELLSTANDARD * 7) * (50 / field_strength) )
LosePlasma()*/
Loseplasma()*/
if(held_plasma.toxins > 1)
//lose a random amount of plasma back into the air, increased by the field strength (want to switch this over to frequency eventually)
var/loss_ratio = rand() * (0.05 + (0.05 * 50 / field_strength))
@@ -211,6 +211,7 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
return 1

/obj/effect/rust_em_field/proc/ChangeFieldStrength(var/new_strength)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/effect/rust_em_field/proc/ChangeFieldStrength() called tick#: [world.time]")
var/calc_size = 1
emp_overload = 0
if(new_strength <= 50)
@@ -228,9 +229,11 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
change_size(calc_size)

/obj/effect/rust_em_field/proc/ChangeFieldFrequency(var/new_frequency)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/effect/rust_em_field/proc/ChangeFieldFrequency() called tick#: [world.time]")
frequency = new_frequency

/obj/effect/rust_em_field/proc/AddEnergy(var/a_energy, var/a_mega_energy, var/a_frequency)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/effect/rust_em_field/proc/AddEnergy() called tick#: [world.time]")
var/energy_loss_ratio = 0
if(a_frequency != src.frequency)
energy_loss_ratio = 1 / abs(a_frequency - src.frequency)
@@ -242,13 +245,15 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
mega_energy += 0.1

/obj/effect/rust_em_field/proc/AddParticles(var/name, var/quantity = 1)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/effect/rust_em_field/proc/AddParticles() called tick#: [world.time]")
if(name in dormant_reactant_quantities)
dormant_reactant_quantities[name] += quantity
else if(name != "proton" && name != "electron" && name != "neutron")
dormant_reactant_quantities.Add(name)
dormant_reactant_quantities[name] = quantity

/obj/effect/rust_em_field/proc/RadiateAll(var/ratio_lost = 1)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/effect/rust_em_field/proc/RadiateAll() called tick#: [world.time]")
for(var/particle in dormant_reactant_quantities)
radiation += dormant_reactant_quantities[particle]
dormant_reactant_quantities.Remove(particle)
@@ -260,6 +265,7 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
environment.merge(held_plasma)

/obj/effect/rust_em_field/proc/change_size(var/newsize = 1)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/effect/rust_em_field/proc/change_size() called tick#: [world.time]")
//
var/changed = 0
switch(newsize)
@@ -302,6 +308,7 @@ Deuterium-tritium fusion: 4.5 x 10^7 K

//the !!fun!! part
/obj/effect/rust_em_field/proc/React()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/effect/rust_em_field/proc/React() called tick#: [world.time]")
//loop through the reactants in random order
var/list/reactants_reacting_pool = dormant_reactant_quantities.Copy()
/*
@@ -112,6 +112,7 @@ max volume of plasma storeable by the field = the total volume of a number of ti
owned_field.ChangeFieldFrequency(field_frequency)

/obj/machinery/power/rust_core/proc/Startup()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/power/rust_core/proc/Startup() called tick#: [world.time]")
if(owned_field)
return

@@ -124,6 +125,7 @@ max volume of plasma storeable by the field = the total volume of a number of ti
. = 1

/obj/machinery/power/rust_core/proc/Shutdown()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/power/rust_core/proc/Shutdown() called tick#: [world.time]")
//todo: safety checks for field status
if(owned_field)
icon_state = "core0"
@@ -132,6 +134,7 @@ max volume of plasma storeable by the field = the total volume of a number of ti
set_light(0)

/obj/machinery/power/rust_core/proc/AddParticles(var/name, var/quantity = 1)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/power/rust_core/proc/AddParticles() called tick#: [world.time]")
if(owned_field)
owned_field.AddParticles(name, quantity)
. = 1
@@ -148,13 +151,15 @@ max volume of plasma storeable by the field = the total volume of a number of ti
"}

/obj/machinery/power/rust_core/proc/set_strength(var/value)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/power/rust_core/proc/set_strength() called tick#: [world.time]")
value = Clamp(value, MIN_FIELD_STR, MAX_FIELD_STR)
field_strength = value
active_power_usage = RUST_CORE_STR_COST * value
if(owned_field)
owned_field.ChangeFieldStrength(value)

/obj/machinery/power/rust_core/proc/set_frequency(var/value)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/power/rust_core/proc/set_frequency() called tick#: [world.time]")
value = Clamp(value, MIN_FIELD_FREQ, MAX_FIELD_FREQ)
field_frequency = value
if(owned_field)
@@ -68,6 +68,7 @@

//Returns 1 if the linked core is accesible.
/obj/machinery/computer/rust_core_monitor/proc/check_core_status()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/computer/rust_core_monitor/proc/check_core_status() called tick#: [world.time]")
if(!istype(linked_core))
return

@@ -41,6 +41,7 @@
user << "<span class='warning'>\icon[src] [src] was unable to draw a fuel rod assembly from an injector.</span>"

/obj/machinery/rust_fuel_assembly_port/proc/try_insert_assembly()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/rust_fuel_assembly_port/proc/try_insert_assembly() called tick#: [world.time]")
var/success = 0
if(cur_assembly)
var/turf/check_turf = get_step(get_turf(src), src.dir)
@@ -62,13 +63,15 @@
return success

/obj/machinery/rust_fuel_assembly_port/proc/eject_assembly()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/rust_fuel_assembly_port/proc/eject_assembly() called tick#: [world.time]")
if(cur_assembly)
cur_assembly.loc = src.loc//get_step(get_turf(src), src.dir)
cur_assembly = null
icon_state = "port0"
return 1

/obj/machinery/rust_fuel_assembly_port/proc/try_draw_assembly()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/rust_fuel_assembly_port/proc/try_draw_assembly() called tick#: [world.time]")
var/success = 0
if(!cur_assembly)
var/turf/check_turf = get_step(get_turf(src), src.dir)
@@ -96,6 +99,7 @@
set name = "Eject assembly from port"
set category = "Object"
set src in oview(1)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/rust_fuel_assembly_port/verb/eject_assembly_verb() called tick#: [world.time]")

eject_assembly()

@@ -38,7 +38,7 @@ var/const/max_assembly_amount = 300


// AUTOFIXED BY fix_string_idiocy.py
// C:\Users\Rob\Documents\Projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Rust\fuel_compressor.dm:39: var/t = "<B>Reactor Fuel Rod Compressor / Assembler</B><BR>"
// C:\Users\Rob\\documents\\\projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Rust\fuel_compressor.dm:39: var/t = "<B>Reactor Fuel Rod Compressor / Assembler</B><BR>"
var/t = {"<B>Reactor Fuel Rod Compressor / Assembler</B><BR>
<A href='?src=\ref[src];close=1'>Close</A><BR>"}
// END AUTOFIX
@@ -47,7 +47,7 @@ var/const/max_assembly_amount = 300
else

// AUTOFIXED BY fix_string_idiocy.py
// C:\Users\Rob\Documents\Projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Rust\fuel_compressor.dm:44: t += "Compressed matter in storage: [compressed_matter] <A href='?src=\ref[src];eject_matter=1'>\[Eject all\]</a><br>"
// C:\Users\Rob\\documents\\\projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Rust\fuel_compressor.dm:44: t += "Compressed matter in storage: [compressed_matter] <A href='?src=\ref[src];eject_matter=1'>\[Eject all\]</a><br>"
t += {"Compressed matter in storage: [compressed_matter] <A href='?src=\ref[src];eject_matter=1'>\[Eject all\]</a><br>
<A href='?src=\ref[src];activate=1'><b>Activate Fuel Synthesis</b></A><BR> (fuel assemblies require no more than [max_assembly_amount] rods).<br>
<hr>
@@ -57,7 +57,7 @@ var/const/max_assembly_amount = 300
t += " [reagent] rods: [new_assembly_quantities[reagent]] \[<A href='?src=\ref[src];change_reagent=[reagent]'>Modify</A>\]<br>"

// AUTOFIXED BY fix_string_idiocy.py
// C:\Users\Rob\Documents\Projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Rust\fuel_compressor.dm:50: t += "<hr>"
// C:\Users\Rob\\documents\\\projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Rust\fuel_compressor.dm:50: t += "<hr>"
t += {"<hr>
<A href='?src=\ref[src];close=1'>Close</A><BR>"}
// END AUTOFIX
@@ -65,7 +65,7 @@
/*dat += "<b>Fuel depletion announcement:</b> "
// NOT-AUTOFIXED BY fix_string_idiocy.py
// C:\Users\Rob\Documents\Projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Rust\fuel_control.dm:66: dat += "[announce_fueldepletion == 0 ? "Disabled" : "<a href='?src=\ref[src];announce_fueldepletion=0'>\[Disable\]</a>"] "
// C:\Users\Rob\\documents\\\projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Rust\fuel_control.dm:66: dat += "[announce_fueldepletion == 0 ? "Disabled" : "<a href='?src=\ref[src];announce_fueldepletion=0'>\[Disable\]</a>"] "
dat += {"[announce_fueldepletion == 0 ? "Disabled" : "<a href='?src=\ref[src];announce_fueldepletion=0'>\[Disable\]</a>"]
[announce_fueldepletion == 1 ? "Announcing" : "<a href='?src=\ref[src];announce_fueldepletion=1'>\[Announce\]</a>"]
[announce_fueldepletion == 2 ? "Broadcasting" : "<a href='?src=\ref[src];announce_fueldepletion=2'>\[Broadcast\]</a>"]<br>
@@ -91,7 +91,7 @@
for(var/obj/machinery/power/rust_fuel_injector/I in connected_injectors)

// AUTOFIXED BY fix_string_idiocy.py
// C:\Users\Rob\Documents\Projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Rust\fuel_control.dm:89: dat += "<tr>"
// C:\Users\Rob\\documents\\\projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Rust\fuel_control.dm:89: dat += "<tr>"
dat += {"<tr>
<td>[I.id_tag]</td>"}
// END AUTOFIX
@@ -114,13 +114,13 @@
dat += "<td>None <a href='?src=\ref[src];set_next_stage=[I.id_tag]'>\[modify\]</a></td>"

// AUTOFIXED BY fix_string_idiocy.py
// C:\Users\Rob\Documents\Projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Rust\fuel_control.dm:108: dat += "<td><a href='?src=\ref[src];toggle_stage=[I.id_tag]'>\[[active_stages.Find(I.id_tag) ? "Deactivate stage" : "Activate stage "] \]</a></td>"
// C:\Users\Rob\\documents\\\projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Rust\fuel_control.dm:108: dat += "<td><a href='?src=\ref[src];toggle_stage=[I.id_tag]'>\[[active_stages.Find(I.id_tag) ? "Deactivate stage" : "Activate stage "] \]</a></td>"
dat += {"<td><a href='?src=\ref[src];toggle_stage=[I.id_tag]'>\[[active_stages.Find(I.id_tag) ? "Deactivate stage" : "Activate stage "] \]</a></td>
</tr>"}
// END AUTOFIX

// AUTOFIXED BY fix_string_idiocy.py
// C:\Users\Rob\Documents\Projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Rust\fuel_control.dm:110: dat += "</table>"
// C:\Users\Rob\\documents\\\projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Rust\fuel_control.dm:110: dat += "</table>"
dat += {"</table>
<hr>
<A href='?src=\ref[src];refresh=1'>Refresh</A>
@@ -195,6 +195,7 @@
updateDialog()

/obj/machinery/computer/rust_fuel_control/proc/check_injector_status(var/obj/machinery/power/rust_fuel_injector/I)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/computer/rust_fuel_control/proc/check_injector_status() called tick#: [world.time]")
if(!I)
return 0

@@ -105,7 +105,7 @@
else

// AUTOFIXED BY fix_string_idiocy.py
// C:\Users\Rob\Documents\Projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Rust\fuel_injector.dm:149: dat += "<B>Reactor Core Fuel Injector</B><hr>"
// C:\Users\Rob\\documents\\\projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Rust\fuel_injector.dm:149: dat += "<B>Reactor Core Fuel Injector</B><hr>"
dat += {"<B>Reactor Core Fuel Injector</B><hr>
<b>Device ID tag:</b> [id_tag] <a href='?src=\ref[src];modify_tag=1'>\[Modify\]</a><br>
<b>Status:</b> [injecting ? "<font color=green>Active</font> <a href='?src=\ref[src];toggle_injecting=1'>\[Disable\]</a>" : "<font color=blue>Standby</font> <a href='?src=\ref[src];toggle_injecting=1'>\[Enable\]</a>"]<br>
@@ -124,7 +124,7 @@
font_colour = "orange"

// AUTOFIXED BY fix_string_idiocy.py
// C:\Users\Rob\Documents\Projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Rust\fuel_injector.dm:164: dat += "<b>Power status:</b> <font color=[font_colour]>[active_power_usage]/[cached_power_avail] W</font><br>"
// C:\Users\Rob\\documents\\\projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Rust\fuel_injector.dm:164: dat += "<b>Power status:</b> <font color=[font_colour]>[active_power_usage]/[cached_power_avail] W</font><br>"
dat += {"<b>Power status:</b> <font color=[font_colour]>[active_power_usage]/[cached_power_avail] W</font><br>
<a href='?src=\ref[src];toggle_remote=1'>\[[remote_access_enabled ? "Disable remote access" : "Enable remote access"]\]</a><br>
<hr>
@@ -183,18 +183,21 @@
updateDialog()

/obj/machinery/power/rust_fuel_injector/proc/BeginInjecting()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/power/rust_fuel_injector/proc/BeginInjecting() called tick#: [world.time]")
if(!injecting && cur_assembly)
icon_state = "injector1"
injecting = 1
use_power = 1

/obj/machinery/power/rust_fuel_injector/proc/StopInjecting()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/power/rust_fuel_injector/proc/StopInjecting() called tick#: [world.time]")
if(injecting)
injecting = 0
icon_state = "injector0"
use_power = 0

/obj/machinery/power/rust_fuel_injector/proc/Inject()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/power/rust_fuel_injector/proc/Inject() called tick#: [world.time]")
if(!injecting)
return
if(cur_assembly)
@@ -225,6 +228,7 @@
StopInjecting()

/obj/machinery/power/rust_fuel_injector/proc/attempt_fuel_swap()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/power/rust_fuel_injector/proc/attempt_fuel_swap() called tick#: [world.time]")
var/rev_dir = reverse_direction(dir)
var/turf/mid = get_step(src, rev_dir)
var/success = 0
@@ -255,6 +259,7 @@
set category = "Object"
set name = "Rotate Generator (Clockwise)"
set src in view(1)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/power/rust_fuel_injector/verb/rotate_clock() called tick#: [world.time]")

if (usr.stat || usr.restrained() || anchored || (usr.status_flags & FAKEDEATH))
return
@@ -265,6 +270,7 @@
set category = "Object"
set name = "Rotate Generator (Counter-clockwise)"
set src in view(1)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/power/rust_fuel_injector/verb/rotate_anticlock() called tick#: [world.time]")

if (usr.stat || usr.restrained() || anchored || (usr.status_flags & FAKEDEATH))
return
@@ -9,6 +9,7 @@ datum/fusion_reaction
/datum/controller/game_controller/var/list/fusion_reactions

proc/get_fusion_reaction(var/primary_reactant, var/secondary_reactant)
writepanic("[__FILE__].[__LINE__] \\/proc/get_fusion_reaction() called tick#: [world.time]")
if(!master_controller.fusion_reactions)
populate_fusion_reactions()
if(master_controller.fusion_reactions.Find(primary_reactant))
@@ -17,6 +18,7 @@ proc/get_fusion_reaction(var/primary_reactant, var/secondary_reactant)
return master_controller.fusion_reactions[primary_reactant][secondary_reactant]

proc/populate_fusion_reactions()
writepanic("[__FILE__].[__LINE__] \\/proc/populate_fusion_reactions() called tick#: [world.time]")
if(!master_controller.fusion_reactions)
master_controller.fusion_reactions = list()
for(var/cur_reaction_type in typesof(/datum/fusion_reaction) - /datum/fusion_reaction)
@@ -34,11 +34,13 @@
initialize()

/obj/machinery/rust/gyrotron/proc/stop_emitting()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/rust/gyrotron/proc/stop_emitting() called tick#: [world.time]")
emitting = 0
use_power = 1
update_icon()

/obj/machinery/rust/gyrotron/proc/start_emitting()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/rust/gyrotron/proc/start_emitting() called tick#: [world.time]")
if(stat & (NOPOWER | BROKEN) || emitting && state == 2) //Sanity.
return

@@ -53,6 +55,7 @@
sleep(rate)

/obj/machinery/rust/gyrotron/proc/emit()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/rust/gyrotron/proc/emit() called tick#: [world.time]")
var/obj/item/projectile/beam/emitter/A = getFromPool(/obj/item/projectile/beam/emitter, loc)
A.frequency = frequency
A.damage = mega_energy * 1500
@@ -95,6 +98,7 @@
set name = "Rotate (Clockwise)"
set src in oview(1)
set category = "Object"
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/rust/gyrotron/verb/rotate_cw() called tick#: [world.time]")

if(usr.restrained() || usr.stat || usr.weakened || usr.stunned || usr.paralysis || usr.resting || !Adjacent(usr))
return
@@ -109,6 +113,7 @@
set name = "Rotate (Counter-Clockwise)"
set src in oview(1)
set category = "Object"
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/rust/gyrotron/verb/rotate_ccw() called tick#: [world.time]")

if(usr.restrained() || usr.stat || usr.weakened || usr.stunned || usr.paralysis || usr.resting || !Adjacent(usr))
return
@@ -21,6 +21,7 @@
/*
/obj/machinery/rust
proc/RadiateParticle(var/energy, var/ionizing, var/dir = 0)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/RadiateParticle() called tick#: [world.time]")
if(!dir)
RadiateParticleRand(energy, ionizing)
var/obj/effect/accelerated_particle/particle = getFromPool(/obj/effect/accelerated_particle/particle, get_turf(src))
@@ -35,6 +36,7 @@
return particle
proc/RadiateParticleRand(var/energy, var/ionizing)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/RadiateParticleRand() called tick#: [world.time]")
var/turf/target
var/particle_range = 3 * round(energy) + rand(3,20)
if(energy > 1)
@@ -16,17 +16,20 @@
parent = null

/obj/effect/rust_particle_catcher/proc/SetSize(var/newsize)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/effect/rust_particle_catcher/proc/SetSize() called tick#: [world.time]")
name = "collector [newsize]"
mysize = newsize
UpdateSize()

/obj/effect/rust_particle_catcher/proc/AddParticles(var/name, var/quantity = 1)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/effect/rust_particle_catcher/proc/AddParticles() called tick#: [world.time]")
if(parent && parent.size >= mysize)
parent.AddParticles(name, quantity)
return 1
return 0

/obj/effect/rust_particle_catcher/proc/UpdateSize()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/effect/rust_particle_catcher/proc/UpdateSize() called tick#: [world.time]")
if(parent.size >= mysize)
density = 1
//invisibility = 0
@@ -19,6 +19,7 @@
Stress(Proj.damage / 10)

/obj/effect/energy_field/proc/Stress(var/severity)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/effect/energy_field/proc/Stress() called tick#: [world.time]")
strength -= severity

//if we take too much damage, drop out - the generator will bring us back up if we have enough power
@@ -30,6 +31,7 @@
density = 1

/obj/effect/energy_field/proc/Strengthen(var/severity)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/effect/energy_field/proc/Strengthen() called tick#: [world.time]")
strength += severity

//if we take too much damage, drop out - the generator will bring us back up if we have enough power
@@ -98,7 +98,7 @@
t += "<i>Swipe your ID card to begin.</i>"
else
// AUTOFIXED BY fix_string_idiocy.py
// C:\Users\Rob\Documents\Projects\vgstation13\code\WorkInProgress\Cael_Aislinn\ShieldGen\shield_capacitor.dm:94: t += "This capacitor is: [active ? "<font color=green>Online</font>" : "<font color=red>Offline</font>" ] <a href='?src=\ref[src];toggle=1'>[active ? "\[Deactivate\]" : "\[Activate\]"]</a><br>"
// C:\Users\Rob\\documents\\\projects\vgstation13\code\WorkInProgress\Cael_Aislinn\ShieldGen\shield_capacitor.dm:94: t += "This capacitor is: [active ? "<font color=green>Online</font>" : "<font color=red>Offline</font>" ] <a href='?src=\ref[src];toggle=1'>[active ? "\[Deactivate\]" : "\[Activate\]"]</a><br>"
t += {"This capacitor is: [active ? "<font color=green>Online</font>" : "<font color=red>Offline</font>" ] <a href='?src=\ref[src];toggle=1'>[active ? "\[Deactivate\]" : "\[Activate\]"]</a><br>
[time_since_fail > 2 ? "<font color=green>Charging stable.</font>" : "<font color=red>Warning, low charge!</font>"]<br>
Charge: [stored_charge] Watts ([100 * stored_charge/max_charge]%)<br>
@@ -111,7 +111,7 @@
<a href='?src=\ref[src];charge_rate=[max_charge_rate]'>\[max\]</a><br>"}

// AUTOFIXED BY fix_string_idiocy.py
// C:\Users\Rob\Documents\Projects\vgstation13\code\WorkInProgress\Cael_Aislinn\ShieldGen\shield_capacitor.dm:104: t += "<hr>"
// C:\Users\Rob\\documents\\\projects\vgstation13\code\WorkInProgress\Cael_Aislinn\ShieldGen\shield_capacitor.dm:104: t += "<hr>"
t += {"<hr>
<A href='?src=\ref[src]'>Refresh</A>
<A href='?src=\ref[src];close=1'>Close</A><BR>"}
@@ -176,6 +176,7 @@
set name = "Rotate capacitor clockwise"
set category = "Object"
set src in oview(1)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/shield_capacitor/verb/rotate() called tick#: [world.time]")

if (src.anchored)
usr << "It is fastened to the floor!"
@@ -112,7 +112,7 @@
else

// AUTOFIXED BY fix_string_idiocy.py
// C:\Users\Rob\Documents\Projects\vgstation13\code\WorkInProgress\Cael_Aislinn\ShieldGen\shield_gen.dm:102: t += "[owned_capacitor ? "<font color=green>Charge capacitor connected.</font>" : "<font color=red>Unable to locate charge capacitor!</font>"]<br>"
// C:\Users\Rob\\documents\\\projects\vgstation13\code\WorkInProgress\Cael_Aislinn\ShieldGen\shield_gen.dm:102: t += "[owned_capacitor ? "<font color=green>Charge capacitor connected.</font>" : "<font color=red>Unable to locate charge capacitor!</font>"]<br>"
t += {"[owned_capacitor ? "<font color=green>Charge capacitor connected.</font>" : "<font color=red>Unable to locate charge capacitor!</font>"]<br>
This generator is: [active ? "<font color=green>Online</font>" : "<font color=red>Offline</font>" ] <a href='?src=\ref[src];toggle=1'>[active ? "\[Deactivate\]" : "\[Activate\]"]</a><br>
[time_since_fail > 2 ? "<font color=green>Field is stable.</font>" : "<font color=red>Warning, field is unstable!</font>"]<br>
@@ -141,7 +141,7 @@
// END NOT-AUTOFIX

// AUTOFIXED BY fix_string_idiocy.py
// C:\Users\Rob\Documents\Projects\vgstation13\code\WorkInProgress\Cael_Aislinn\ShieldGen\shield_gen.dm:127: t += "<hr>"
// C:\Users\Rob\\documents\\\projects\vgstation13\code\WorkInProgress\Cael_Aislinn\ShieldGen\shield_gen.dm:127: t += "<hr>"
t += {"<hr>
<A href='?src=\ref[src]'>Refresh</A>
<A href='?src=\ref[src];close=1'>Close</A><BR>"}
@@ -242,6 +242,7 @@

/*
/obj/machinery/shield_gen/proc/check_powered()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/shield_gen/proc/check_powered() called tick#: [world.time]")
check_powered = 1
if(!anchored)
powered = 0
@@ -273,6 +274,7 @@
*/

/obj/machinery/shield_gen/proc/toggle()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/shield_gen/proc/toggle() called tick#: [world.time]")
active = !active
power_change()
if(active)
@@ -297,6 +299,7 @@

//grab the border tiles in a circle around this machine
/obj/machinery/shield_gen/proc/get_shielded_turfs()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/shield_gen/proc/get_shielded_turfs() called tick#: [world.time]")
var/list/out = list()
for(var/turf/T in range(field_radius, src))
if(get_dist(src,T) == field_radius)
@@ -37,6 +37,7 @@
del first*/

/obj/machinery/computer/laser/proc/setpower(var/powera)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/computer/laser/proc/setpower() called tick#: [world.time]")
/*src.power = powera
if(first)
first.setpower(src.power)*/
@@ -58,6 +59,7 @@
sd_SetLuminosity(1, 1, 4)
/obj/beam/e_beam/proc/updatebeam()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/beam/e_beam/proc/updatebeam() called tick#: [world.time]")
if(!next)
if(get_step(src.loc,src.dir))
var/obj/beam/e_beam/e = new /obj/beam/e_beam(src.loc)
@@ -86,6 +88,7 @@
next.updatebeam()
/atom/proc/laser_act(var/obj/beam/e_beam/b)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/atom/proc/laser_act() called tick#: [world.time]")
return
/mob/living/carbon/laser_act(var/obj/beam/e_beam/b)
@@ -103,6 +106,7 @@
/obj/beam/e_beam/proc/setpower(var/powera)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/beam/e_beam/proc/setpower() called tick#: [world.time]")
src.power = powera
if(src.next)
src.next.setpower(powera)
@@ -127,6 +131,7 @@
return
/obj/beam/e_beam/proc/hit()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/beam/e_beam/proc/hit() called tick#: [world.time]")
del src
return
*/
@@ -38,6 +38,8 @@
/*
/obj/machinery/computer/lasercon/proc/interact(mob/user)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/computer/lasercon/proc/interact() called tick#: [world.time]")
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
if (!istype(user, /mob/living/silicon))
user.machine = null
@@ -31,6 +31,7 @@
set name = "Rotate"
set category = "Object"
set src in oview(1)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/zero_point_emitter/verb/rotate() called tick#: [world.time]")

if (src.anchored || usr:stat)
usr << "It is fastened to the floor!"
@@ -24,6 +24,7 @@
return

/obj/item/projectile/missile/proc/explode()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/projectile/missile/proc/explode() called tick#: [world.time]")
explosion(src.loc, 1, 1, 2, 7, 0)
playsound(src.loc, "explosion", 50, 1)
del(src)
@@ -74,6 +75,7 @@
return

/obj/machinery/meteor_battery/proc/isPopping()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/meteor_battery/proc/isPopping() called tick#: [world.time]")
return (popping!=0)

/obj/machinery/meteor_battery/power_change()
@@ -92,10 +94,12 @@
stat |= NOPOWER

/obj/machinery/meteor_battery/proc/setState(var/enabled)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/meteor_battery/proc/setState() called tick#: [world.time]")
src.enabled = enabled
src.power_change()

/obj/machinery/meteor_battery/proc/get_new_target()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/meteor_battery/proc/get_new_target() called tick#: [world.time]")
var/list/new_targets = new
var/new_target
for(var/obj/effect/meteor/M in view(protect_range, get_turf(src)))
@@ -163,13 +167,15 @@
return

/obj/machinery/meteor_battery/proc/target()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/meteor_battery/proc/target() called tick#: [world.time]")
while(src && enabled && !stat)
src.dir = get_dir(src, cur_target)
shootAt(cur_target)
sleep(shot_delay)
return

/obj/machinery/meteor_battery/proc/shootAt(var/atom/movable/target)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/meteor_battery/proc/shootAt() called tick#: [world.time]")
var/turf/T = get_turf(src)
var/turf/U = get_turf(target)
if (!T || !U)
@@ -184,9 +190,11 @@


/obj/machinery/meteor_battery/proc/isDown()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/meteor_battery/proc/isDown() called tick#: [world.time]")
return (invisibility!=0)

/obj/machinery/meteor_battery/proc/popUp()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/meteor_battery/proc/popUp() called tick#: [world.time]")
if ((!isPopping()) || src.popping==-1)
invisibility = 0
popping = 1
@@ -197,6 +205,7 @@
if (popping==1) popping = 0

/obj/machinery/meteor_battery/proc/popDown()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/meteor_battery/proc/popDown() called tick#: [world.time]")
if ((!isPopping()) || src.popping==1)
popping = -1
if (src.cover!=null)
@@ -236,6 +245,7 @@
src.die()

/obj/machinery/meteor_battery/proc/die()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/meteor_battery/proc/die() called tick#: [world.time]")
src.health = 0
src.density = 0
src.stat |= BROKEN
@@ -23,6 +23,7 @@
var/obj/machinery/atmospherics/unary/vent_pump/entry_vent //Graciously stolen from spider code

/mob/living/simple_animal/sculpture/proc/GrabMob(var/mob/living/target)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/mob/living/simple_animal/sculpture/proc/GrabMob() called tick#: [world.time]")
if(target && target != src && ishuman(target) && !observed)
G = getFromPool(/obj/item/weapon/grab,src,target)
target.Stun(1)
@@ -62,6 +62,7 @@
return ..()

/obj/item/ashtray/proc/die()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/ashtray/proc/die() called tick#: [world.time]")
src.visible_message("<span class='warning'>[src] shatters spilling its contents!</span>")
for (var/obj/item/clothing/mask/cigarette/O in contents)
contents -= O
@@ -3,13 +3,17 @@
/datum/medical_effect/var/name = "None"
/datum/medical_effect/var/strength = 0
/datum/medical_effect/proc/on_life(mob/living/carbon/human/H, strength)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/medical_effect/proc/on_life() called tick#: [world.time]")
/datum/medical_effect/proc/cure(mob/living/carbon/human/H)

writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\datum/medical_effect/proc/cure() called tick#: [world.time]")


// MOB HELPERS
// ===========
/mob/living/carbon/human/var/list/datum/medical_effect/side_effects = list()
/mob/proc/add_side_effect(name, strength = 0)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/mob/proc/add_side_effect() called tick#: [world.time]")
/mob/living/carbon/human/add_side_effect(name, strength = 0)
for(var/datum/medical_effect/M in src.side_effects) if(M.name == name)
M.strength = max(M.strength, 10)
@@ -24,6 +28,7 @@
side_effects += M

/mob/living/carbon/human/proc/handle_medical_side_effects()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/mob/living/carbon/human/proc/handle_medical_side_effects() called tick#: [world.time]")
if(src.reagents.has_reagent("cryoxadone") || src.reagents.get_reagent_amount("bicaridine") >= 15 || src.reagents.get_reagent_amount("tricordrazine") >= 15)
src.add_side_effect("Headache")

@@ -378,10 +378,12 @@ log transactions

//create the most effective combination of notes to make up the requested amount
/obj/machinery/atm/proc/withdraw_arbitrary_sum(var/arbitrary_sum)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atm/proc/withdraw_arbitrary_sum() called tick#: [world.time]")
dispense_cash(arbitrary_sum,get_step(get_turf(src),turn(dir,180))) // Spawn on the ATM.

//stolen wholesale and then edited a bit from newscasters, which are awesome and by Agouri
/obj/machinery/atm/proc/scan_user(mob/living/carbon/human/human_user as mob)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atm/proc/scan_user() called tick#: [world.time]")
if(!authenticated_account && linked_db)
if(human_user.wear_id)
var/obj/item/weapon/card/id/I
@@ -139,6 +139,7 @@ var/global/list/atmos_controllers = list()


/obj/machinery/computer/atmoscontrol/proc/is_in_filter(var/typepath)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/computer/atmoscontrol/proc/is_in_filter() called tick#: [world.time]")
if(!filter) return 1 // YEP. TOTALLY.
return typepath in filter

@@ -173,6 +173,7 @@
breaktape(/obj/item/weapon/wirecutters,user)

/obj/item/tape/proc/breaktape(obj/item/weapon/W as obj, mob/user as mob)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/tape/proc/breaktape() called tick#: [world.time]")
if(user.a_intent == I_HELP && (!W || !W.is_sharp()) && !src.allowed(user))
user << "<span class='notice'>You can't break [src] [W ? "with \the [W] " : ""]unless you use force.</span>"
return
@@ -40,6 +40,7 @@ var/list/ul_IconCache = list()


proc/ul_UnblankLocal(var/list/ReApply = view(ul_TopLuminosity, src))
writepanic("[__FILE__].[__LINE__] \\/proc/ul_UnblankLocal() called tick#: [world.time]")
for(var/atom/Light in ReApply)
if(ul_IsLuminous(Light))
Light.ul_Illuminate()
@@ -54,6 +55,8 @@ atom/var/ul_Extinguished = UL_I_ONZERO

atom/proc/ul_SetLuminosity(var/Red = 0, var/Green = Red, var/Blue = Red)

writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\datom/proc/ul_SetLuminosity() called tick#: [world.time]")

if(ul_Extinguished == UL_I_CHANGING) //Changing state, just supress any changes, to prevent glitches.
return

@@ -82,6 +85,7 @@ atom/proc/ul_SetLuminosity(var/Red = 0, var/Green = Red, var/Blue = Red)
return

atom/proc/ul_Illuminate()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\datom/proc/ul_Illuminate() called tick#: [world.time]")
if (ul_Extinguished == UL_I_LIT)
return

@@ -130,6 +134,8 @@ atom/proc/ul_Illuminate()

atom/proc/ul_Extinguish()

writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\datom/proc/ul_Extinguish() called tick#: [world.time]")

if (ul_Extinguished != UL_I_LIT)
return

@@ -194,6 +200,7 @@ atom/proc/ul_Extinguish()
to avoid the cost of the square root function.
*/
atom/proc/ul_FalloffAmount(var/atom/ref)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\datom/proc/ul_FalloffAmount() called tick#: [world.time]")
if (ul_FalloffStyle == UL_I_FALLOFF_ROUND)
var/delta_x = (ref.x - src.x)
var/delta_y = (ref.y - src.y)
@@ -218,6 +225,7 @@ atom/proc/ul_FalloffAmount(var/atom/ref)
return 0

atom/proc/ul_SetOpacity(var/NewOpacity)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\datom/proc/ul_SetOpacity() called tick#: [world.time]")
if(opacity != NewOpacity)

var/list/Blanked = ul_BlankLocal()
@@ -229,6 +237,7 @@ atom/proc/ul_SetOpacity(var/NewOpacity)
return

atom/proc/ul_BlankLocal()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\datom/proc/ul_BlankLocal() called tick#: [world.time]")
var/list/Blanked = list( )
var/TurfAdjust = isturf(src) ? 1 : 0

@@ -240,6 +249,7 @@ atom/proc/ul_BlankLocal()
return Blanked

atom/proc/ul_LightLevelChanged()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\datom/proc/ul_LightLevelChanged() called tick#: [world.time]")
//Designed for client projects to use. Called on items when the turf they are in has its light level changed
return

@@ -268,19 +278,23 @@ turf/var/list/MaxGreen
turf/var/list/MaxBlue

turf/proc/ul_GetRed()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \turf/proc/ul_GetRed() called tick#: [world.time]")
if(MaxRed)
return ul_Clamp(max(MaxRed))
return 0
turf/proc/ul_GetGreen()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \turf/proc/ul_GetGreen() called tick#: [world.time]")
if(MaxGreen)
return ul_Clamp(max(MaxGreen))
return 0
turf/proc/ul_GetBlue()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \turf/proc/ul_GetBlue() called tick#: [world.time]")
if(MaxBlue)
return ul_Clamp(max(MaxBlue))
return 0

turf/proc/ul_UpdateLight()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \turf/proc/ul_UpdateLight() called tick#: [world.time]")
var/area/CurrentArea = loc

if(!isarea(CurrentArea) || !CurrentArea.ul_Lighting)
@@ -310,6 +324,8 @@ turf/proc/ul_UpdateLight()

turf/proc/ul_Recalculate()

writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \turf/proc/ul_Recalculate() called tick#: [world.time]")

ul_SuppressLightLevelChanges++

var/list/Lights = ul_BlankLocal()
@@ -330,6 +346,8 @@ area/var/list/LightLevels

area/proc/ul_Light(var/Red = LightLevelRed, var/Green = LightLevelGreen, var/Blue = LightLevelBlue)

writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\darea/proc/ul_Light() called tick#: [world.time]")

if(!src || !src.ul_Lighting)
return

@@ -361,6 +379,8 @@ area/proc/ul_Light(var/Red = LightLevelRed, var/Green = LightLevelGreen, var/Blu

area/proc/ul_Prep()

writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\darea/proc/ul_Prep() called tick#: [world.time]")

if(!tag)
tag = "[type]"
if(ul_Lighting)
@@ -8,6 +8,7 @@ var/list/ul_FastRoot = list(0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4
7, 7)

atom/proc/ul_FalloffAmount(var/atom/ref)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\datom/proc/ul_FalloffAmount() called tick#: [world.time]")
if (ul_FalloffStyle == UL_I_FALLOFF_ROUND)
var/delta_x = (ref.x - src.x)
var/delta_y = (ref.y - src.y)
@@ -30,6 +30,7 @@
var/time_inflicted = 0

proc/copy()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/copy() called tick#: [world.time]")
var/datum/autopsy_data/W = new()
W.weapon = weapon
W.pretend_weapon = pretend_weapon
@@ -39,6 +40,7 @@
return W

/obj/item/weapon/autopsy_scanner/proc/add_data(var/datum/organ/external/O)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/weapon/autopsy_scanner/proc/add_data() called tick#: [world.time]")
if(!O.autopsy_data.len && !O.trace_chemicals.len) return

for(var/V in O.autopsy_data)
@@ -80,6 +82,7 @@
set category = "Object"
set src in view(usr, 1)
set name = "Print Data"
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/weapon/autopsy_scanner/verb/print_data() called tick#: [world.time]")
if(usr.stat || !(istype(usr,/mob/living/carbon/human)) || (usr.status_flags & FAKEDEATH))
usr << "No."
return
@@ -5,6 +5,8 @@
/proc/togglebuildmode(mob/M as mob in player_list)
set name = "Toggle Build Mode"
set category = "Special Verbs"
writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/togglebuildmode() called tick#: [world.time]")

if(M.client)
if(M.client.buildmode)
log_admin("[key_name(usr)] has left build mode.")
@@ -221,6 +223,7 @@ obj/effect/bmode/buildholder/New()
src.mouse_pointer_icon = initial(src.mouse_pointer_icon)

/proc/build_click(var/mob/user, buildmode, params, var/obj/object)
writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/build_click() called tick#: [world.time]")
var/obj/effect/bmode/buildholder/holder = null
for(var/obj/effect/bmode/buildholder/H in buildmodeholders)
if(H.cl == user.client)
@@ -348,7 +351,7 @@ obj/effect/bmode/buildholder/New()
deletions++
else
for(var/atom/thing in T.contents)
if(thing==usr) continue
if(thing==usr) continue
if(strict && (thing.type == chosen))
qdel(thing)
else if(istype(thing, chosen))
@@ -482,6 +485,7 @@ obj/effect/bmode/buildholder/New()
log_admin("[key_name(usr)] is throwing a [holder.throw_atom] at [object] - [formatJumpTo(RT)]")

/proc/easyTypeSelector()
writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/easyTypeSelector() called tick#: [world.time]")
var/chosen = null

var/list/matches = new()
@@ -22,11 +22,13 @@
var/total_particles = 0

/datum/effect/system/expl_particles/proc/set_up(n = 10, loca)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/effect/system/expl_particles/proc/set_up() called tick#: [world.time]")
number = n
if(istype(loca, /turf/)) location = loca
else location = get_turf(loca)

/datum/effect/system/expl_particles/proc/start()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/effect/system/expl_particles/proc/start() called tick#: [world.time]")
var/i = 0
for(i=0, i<src.number, i++)
spawn(0)
@@ -56,10 +58,12 @@
var/turf/location

/datum/effect/system/explosion/proc/set_up(loca)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/effect/system/explosion/proc/set_up() called tick#: [world.time]")
if(istype(loca, /turf/)) location = loca
else location = get_turf(loca)

/datum/effect/system/explosion/proc/start()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/effect/system/explosion/proc/start() called tick#: [world.time]")
new/obj/effect/explosion( location )
var/datum/effect/system/expl_particles/P = new/datum/effect/system/expl_particles()
P.set_up(10,location)
@@ -88,7 +88,7 @@ var/list/alldepartments = list("Central Command")
dat += "Please insert paper to send via secure connection.<br><br>"

else
dat += "Proper authentication is required to use this device.<br><br>"
dat += "\proper authentication is required to use this device.<br><br>"

if(tofax)
dat += "<a href ='byond://?src=\ref[src];remove=1'>Remove Paper</a><br>"
@@ -190,13 +190,18 @@ var/list/alldepartments = list("Central Command")

/proc/Centcomm_fax(var/obj/item/weapon/paper/sent, var/sentname, var/mob/Sender)

writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/Centcomm_fax() called tick#: [world.time]")

var/msg = "<span class='notice'><b><font color='orange'>CENTCOMM FAX: </font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<a href='?_src_=holder;CentcommFaxReply=\ref[Sender]'>RPLY</a>)</b>: Receiving '[sentname]' via secure connection ... <a href='?_src_=holder;CentcommFaxView=\ref[sent]'>view message</a></span>"
admins << msg
admins << 'sound/effects/fax.ogg'

proc/SendFax(var/sent, var/sentname, var/mob/Sender, var/dpt)


writepanic("[__FILE__].[__LINE__] \\/proc/SendFax() called tick#: [world.time]")


for(var/obj/machinery/faxmachine/F in allfaxes)

if( F.department == dpt )
@@ -117,10 +117,12 @@
var/global/list/newscaster_standard_feeds = list(/datum/news_announcement/bluespace_research, /datum/news_announcement/lotus_tree, /datum/news_announcement/random_junk, /datum/news_announcement/food_riots)

proc/process_newscaster()
writepanic("[__FILE__].[__LINE__] \\/proc/process_newscaster() called tick#: [world.time]")
check_for_newscaster_updates(ticker.mode.newscaster_announcements)

var/global/tmp/announced_news_types = list()
proc/check_for_newscaster_updates(type)
writepanic("[__FILE__].[__LINE__] \\/proc/check_for_newscaster_updates() called tick#: [world.time]")
for(var/subtype in typesof(type)-type)
var/datum/news_announcement/news = new subtype()
if(news.round_time * 10 <= world.time && !(subtype in announced_news_types))
@@ -129,6 +131,8 @@ proc/check_for_newscaster_updates(type)

proc/announce_newscaster_news(datum/news_announcement/news)

writepanic("[__FILE__].[__LINE__] \\/proc/announce_newscaster_news() called tick#: [world.time]")

var/datum/feed_message/newMsg = new /datum/feed_message
newMsg.author = news.author
newMsg.is_admin_message = !news.can_be_redacted
@@ -1,5 +1,7 @@
/obj/item/device/spacepod_equipment/weaponry/proc/fire_weapons()

writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/device/spacepod_equipment/weaponry/proc/fire_weapons() called tick#: [world.time]")

if(my_atom.next_firetime > world.time)
usr << "<span class='warning'>Your weapons are recharging.</span>"
return
@@ -116,4 +118,6 @@
//set name = SPE.verb_name
//set desc = SPE.verb_desc
set src = usr.loc
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/device/spacepod_equipment/weaponry/proc/fire_weapon_system() called tick#: [world.time]")

SPE.fire_weapons()
@@ -20,6 +20,7 @@
var/link_angle = 0

/obj/item/pod_parts/pod_frame/proc/find_square()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/pod_parts/pod_frame/proc/find_square() called tick#: [world.time]")
/*
each part, in essence, stores the relative position of another part
you can find where this part should be by looking at the current direction of the current part and applying the link_angle
@@ -85,6 +86,7 @@
set name = "Rotate Frame"
set category = "Object"
set src in oview(1)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/pod_parts/pod_frame/verb/rotate() called tick#: [world.time]")
if(anchored)
usr << "\The [src] is securely bolted!"
return 0
@@ -48,6 +48,7 @@
equipment_system = new(src)

/obj/spacepod/proc/update_icons()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/spacepod/proc/update_icons() called tick#: [world.time]")
if(!pod_overlays)
pod_overlays = new/list(2)
pod_overlays[DAMAGE] = image(icon, icon_state="pod_damage")
@@ -67,6 +68,7 @@
deal_damage(P.damage)

/obj/spacepod/proc/deal_damage(var/damage)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/spacepod/proc/deal_damage() called tick#: [world.time]")
var/oldhealth = health
health = max(0, health - damage)
var/percentage = (health / initial(health)) * 100
@@ -222,13 +224,15 @@
set category = "Spacepod"
set src = usr.loc
set popup_menu = 0
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/spacepod/verb/toggle_internal_tank() called tick#: [world.time]")
if(usr!=src.occupant)
return
src.use_internal_tank = !src.use_internal_tank
src.occupant << "<span class='notice'>Now taking air from [use_internal_tank?"internal airtank":"environment"].</span>"
return

/obj/spacepod/proc/add_cabin()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/spacepod/proc/add_cabin() called tick#: [world.time]")
cabin_air = new
cabin_air.temperature = T20C
cabin_air.volume = 200
@@ -237,10 +241,12 @@
return cabin_air

/obj/spacepod/proc/add_airtank()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/spacepod/proc/add_airtank() called tick#: [world.time]")
internal_tank = new /obj/machinery/portable_atmospherics/canister/air(src)
return internal_tank

/obj/spacepod/proc/get_turf_air()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/spacepod/proc/get_turf_air() called tick#: [world.time]")
var/turf/T = get_turf(src)
if(T)
. = T.return_air()
@@ -261,6 +267,7 @@
return get_turf_air()

/obj/spacepod/proc/return_pressure()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/spacepod/proc/return_pressure() called tick#: [world.time]")
. = 0
if(use_internal_tank)
. = cabin_air.return_pressure()
@@ -271,6 +278,7 @@
return

/obj/spacepod/proc/return_temperature()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/spacepod/proc/return_temperature() called tick#: [world.time]")
. = 0
if(use_internal_tank)
. = cabin_air.return_temperature()
@@ -281,6 +289,7 @@
return

/obj/spacepod/proc/moved_inside(var/mob/living/carbon/human/H as mob)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/spacepod/proc/moved_inside() called tick#: [world.time]")
if(H && H.client && H in range(1))
H.reset_view(src)
/*
@@ -307,6 +316,7 @@
set category = "Object"
set name = "Enter Pod"
set src in oview(1)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/spacepod/verb/move_inside() called tick#: [world.time]")

if(usr.restrained() || usr.stat || usr.weakened || usr.stunned || usr.paralysis || usr.resting || (usr.status_flags & FAKEDEATH)) //are you cuffed, dying, lying, stunned or other
return
@@ -341,6 +351,7 @@
set name = "Exit pod"
set category = "Spacepod"
set src = usr.loc
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/spacepod/verb/exit_pod() called tick#: [world.time]")

if(usr != src.occupant)
return
@@ -351,6 +362,7 @@
return

/obj/spacepod/proc/enter_after(delay as num, var/mob/user as mob, var/numticks = 5)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/spacepod/proc/enter_after() called tick#: [world.time]")
var/delayfraction = delay/numticks

var/turf/T = user.loc
@@ -410,6 +422,7 @@
if(dir && (oldloc != NewLoc))
src.loc.Entered(src, oldloc)
/obj/spacepod/proc/Process_Spacemove(var/check_drift = 0, mob/user)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/spacepod/proc/Process_Spacemove() called tick#: [world.time]")
var/dense_object = 0
if(!user)
for(var/direction in list(NORTH, NORTHEAST, EAST))
@@ -50,6 +50,7 @@ atom/movable/RepelAirflowDest(n)

mob/var/tmp/last_airflow_stun = 0
mob/proc/airflow_stun()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\mob/proc/airflow_stun() called tick#: [world.time]")
if(stat == 2)
return 0
if(last_airflow_stun > world.time - zas_settings.Get(/datum/ZAS_Setting/airflow_stun_cooldown)) return 0
@@ -83,6 +84,7 @@ mob/living/carbon/human/airflow_stun()
return

atom/movable/proc/check_airflow_movable(n)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\datom/movable/proc/check_airflow_movable() called tick#: [world.time]")
if(anchored && !ismob(src))
return 0
if(!istype(src,/obj/item) && n < zas_settings.Get(/datum/ZAS_Setting/airflow_dense_pressure))
@@ -117,6 +119,7 @@ obj/item/check_airflow_movable(n)
//Zones A and B are air zones. n represents the amount of air moved.

proc/Airflow(zone/A, zone/B)
writepanic("[__FILE__].[__LINE__] \\/proc/Airflow() called tick#: [world.time]")
set background = 1
var/n = B.air.return_pressure() - A.air.return_pressure()

@@ -196,6 +199,7 @@ proc/Airflow(zone/A, zone/B)
spawn M.RepelAirflowDest(abs(n)/5)

proc/AirflowSpace(zone/A)
writepanic("[__FILE__].[__LINE__] \\/proc/AirflowSpace() called tick#: [world.time]")
spawn()
//The space version of the Airflow(A,B,n) proc.

@@ -238,6 +242,7 @@ proc/AirflowSpace(zone/A)

// Mainly for bustanuts.
/atom/movable/proc/AirflowCanPush()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/atom/movable/proc/AirflowCanPush() called tick#: [world.time]")
return 1

/mob/AirflowCanPush()
@@ -246,6 +251,7 @@ proc/AirflowSpace(zone/A)
return 1

/atom/movable/proc/GotoAirflowDest(n)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/atom/movable/proc/GotoAirflowDest() called tick#: [world.time]")
last_airflow = world.time
if(airflow_dest == loc)
return
@@ -306,6 +312,7 @@ proc/AirflowSpace(zone/A)


/atom/movable/proc/RepelAirflowDest(n)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/atom/movable/proc/RepelAirflowDest() called tick#: [world.time]")
if(airflow_dest == loc)
step_away(src,loc)
if(ismob(src))
@@ -368,6 +375,7 @@ proc/AirflowSpace(zone/A)
sound_override = 0

atom/movable/proc/airflow_hit(atom/A)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\datom/movable/proc/airflow_hit() called tick#: [world.time]")
airflow_speed = 0
airflow_dest = null

@@ -419,6 +427,7 @@ mob/living/carbon/human/airflow_hit(atom/A)
. = ..()

zone/proc/movables()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/zone/proc/movables() called tick#: [world.time]")
. = list()
for(var/turf/T in contents)
for(var/atom/A in T)
@@ -1,4 +1,5 @@
/atom/proc/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/atom/proc/CanPass() called tick#: [world.time]")
//Purpose: Determines if the object (or airflow) can pass this atom.
//Called by: Movement, airflow.
//Inputs: The moving atom (optional), target turf, "height" and air group
@@ -33,6 +34,7 @@
// ZONE_BLOCKED - Not blocked, but zone boundaries will not cross.
// BLOCKED - Blocked, zone boundaries will not cross even if opened.
atom/proc/c_airblock(turf/other)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\datom/proc/c_airblock() called tick#: [world.time]")
#ifdef ZASDBG
ASSERT(isturf(other))
#endif
@@ -76,28 +76,35 @@ Class Procs:
edge.add_connection(src)

/connection/proc/mark_direct()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection/proc/mark_direct() called tick#: [world.time]")
state |= CONNECTION_DIRECT
//world << "Marked direct."

/connection/proc/mark_indirect()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection/proc/mark_indirect() called tick#: [world.time]")
state &= ~CONNECTION_DIRECT
//world << "Marked indirect."

/connection/proc/mark_space()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection/proc/mark_space() called tick#: [world.time]")
state |= CONNECTION_SPACE

/connection/proc/direct()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection/proc/direct() called tick#: [world.time]")
return (state & CONNECTION_DIRECT)

/connection/proc/valid()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection/proc/valid() called tick#: [world.time]")
return !(state & CONNECTION_INVALID)

/connection/proc/erase()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection/proc/erase() called tick#: [world.time]")
edge.remove_connection(src)
state |= CONNECTION_INVALID
//world << "Connection Erased: [state]"

/connection/proc/update()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection/proc/update() called tick#: [world.time]")
//world << "Updated, \..."
if(!istype(A,/turf/simulated))
//world << "Invalid A."
@@ -68,24 +68,30 @@ Class Procs:
CRASH("Cannot make connection edge without specifications.")

/connection_edge/proc/add_connection(connection/c)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection_edge/proc/add_connection() called tick#: [world.time]")
coefficient++
//world << "Connection added: [type] Coefficient: [coefficient]"

/connection_edge/proc/remove_connection(connection/c)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection_edge/proc/remove_connection() called tick#: [world.time]")
//world << "Connection removed: [type] Coefficient: [coefficient-1]"
coefficient--
if(coefficient <= 0)
erase()

/connection_edge/proc/contains_zone(zone/Z)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection_edge/proc/contains_zone() called tick#: [world.time]")

/connection_edge/proc/erase()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection_edge/proc/erase() called tick#: [world.time]")
air_master.remove_edge(src)
//world << "[type] Erased."

/connection_edge/proc/tick()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection_edge/proc/tick() called tick#: [world.time]")

/connection_edge/proc/flow(list/movable, differential, repelled, flipped = 0)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection_edge/proc/flow() called tick#: [world.time]")
//Flipped tells us if we are going from A to B or from B to A.
if(!zas_settings.Get(/datum/ZAS_Setting/airflow_push))
return
@@ -201,6 +207,7 @@ Class Procs:

//Helper proc to get connections for a zone.
/connection_edge/zone/proc/get_connected_zone(zone/from)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection_edge/zone/proc/get_connected_zone() called tick#: [world.time]")
if(A == from) return B
else return A

@@ -250,6 +257,7 @@ Class Procs:
var/list/sharing_lookup_table = list(0.30, 0.40, 0.48, 0.54, 0.60, 0.66)

proc/ShareRatio(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
writepanic("[__FILE__].[__LINE__] \\/proc/ShareRatio() called tick#: [world.time]")
//Shares a specific ratio of gas between mixtures using simple weighted averages.
var
//WOOT WOOT TOUCH THIS AND YOU ARE A RETARD
@@ -329,6 +337,7 @@ proc/ShareRatio(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
else return 0

proc/ShareSpace(datum/gas_mixture/A, list/unsimulated_tiles, dbg_output)
writepanic("[__FILE__].[__LINE__] \\/proc/ShareSpace() called tick#: [world.time]")
//A modified version of ShareRatio for spacing gas at the same rate as if it were going into a large airless room.
if(!unsimulated_tiles)
return 0
@@ -438,6 +447,7 @@ proc/ShareSpace(datum/gas_mixture/A, list/unsimulated_tiles, dbg_output)


proc/ShareHeat(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
writepanic("[__FILE__].[__LINE__] \\/proc/ShareHeat() called tick#: [world.time]")
//This implements a simplistic version of the Stefan-Boltzmann law.
var/energy_delta = ((A.temperature - B.temperature) ** 4) * 5.6704e-8 * connecting_tiles * 2.5
var/maximum_energy_delta = max(0, min(A.temperature * A.heat_capacity() * A.group_multiplier, B.temperature * B.heat_capacity() * B.group_multiplier))
@@ -43,6 +43,7 @@ Class Procs:
#endif

/connection_manager/proc/get(d)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection_manager/proc/get() called tick#: [world.time]")
switch(d)
if(NORTH)
if(check(N)) return N
@@ -67,6 +68,7 @@ Class Procs:
#endif

/connection_manager/proc/place(connection/c, d)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection_manager/proc/place() called tick#: [world.time]")
switch(d)
if(NORTH) N = c
if(SOUTH) S = c
@@ -79,6 +81,7 @@ Class Procs:
#endif

/connection_manager/proc/update_all()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection_manager/proc/update_all() called tick#: [world.time]")
if(check(N)) N.update()
if(check(S)) S.update()
if(check(E)) E.update()
@@ -89,6 +92,7 @@ Class Procs:
#endif

/connection_manager/proc/erase_all()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection_manager/proc/erase_all() called tick#: [world.time]")
if(check(N)) N.erase()
if(check(S)) S.erase()
if(check(E)) E.erase()
@@ -99,4 +103,5 @@ Class Procs:
#endif

/connection_manager/proc/check(connection/c)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/connection_manager/proc/check() called tick#: [world.time]")
return c && c.valid()
@@ -21,7 +21,7 @@ Class Vars:
Class Procs:

mark_for_update(turf/T)
Adds the turf to the update list. When updated, update_air_properties() will be called.
Adds the turf to the update list. When updated, update_air_/properties() will be called.
When stuff changes that might affect airflow, call this. It's basically the only thing you need.

add_zone(zone/Z) and remove_zone(zone/Z)
@@ -41,7 +41,7 @@ Class Procs:
Merges the zones to create a single zone.

connect(turf/simulated/A, turf/B)
Called by turf/update_air_properties(). The first argument must be simulated.
Called by turf/update_air_/properties(). The first argument must be simulated.
Creates a connection between A and B.

mark_zone_update(zone/Z)
@@ -95,6 +95,7 @@ Class Procs:
#ifndef ZASDBG
set background = 1
#endif
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/controller/air_system/proc/Setup() called tick#: [world.time]")

world << "<span class='danger'>Processing Geometry...</span>"
sleep(-1)
@@ -124,13 +125,15 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
#ifndef ZASDBG
set background = 1
#endif
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/controller/air_system/proc/Start() called tick#: [world.time]")

while(1)
Tick()
sleep(max(5,update_delay*tick_multiplier))


/datum/controller/air_system/proc/Tick()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/controller/air_system/proc/Tick() called tick#: [world.time]")
. = 1 //Set the default return value, for runtime detection.

current_cycle++
@@ -199,14 +202,17 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
tick_progress = "success"

/datum/controller/air_system/proc/add_zone(zone/z)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/controller/air_system/proc/add_zone() called tick#: [world.time]")
zones.Add(z)
z.name = "Zone [next_id++]"
mark_zone_update(z)

/datum/controller/air_system/proc/remove_zone(zone/z)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/controller/air_system/proc/remove_zone() called tick#: [world.time]")
zones.Remove(z)

/datum/controller/air_system/proc/air_blocked(turf/A, turf/B)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/controller/air_system/proc/air_blocked() called tick#: [world.time]")
#ifdef ZASDBG
ASSERT(isturf(A))
ASSERT(isturf(B))
@@ -216,12 +222,14 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
return ablock | B.c_airblock(A)

/datum/controller/air_system/proc/has_valid_zone(turf/simulated/T)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/controller/air_system/proc/has_valid_zone() called tick#: [world.time]")
#ifdef ZASDBG
ASSERT(istype(T))
#endif
return istype(T) && T.zone && !T.zone.invalid

/datum/controller/air_system/proc/merge(zone/A, zone/B)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/controller/air_system/proc/merge() called tick#: [world.time]")
#ifdef ZASDBG
ASSERT(istype(A))
ASSERT(istype(B))
@@ -237,6 +245,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
mark_zone_update(A)

/datum/controller/air_system/proc/connect(turf/simulated/A, turf/simulated/B)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/controller/air_system/proc/connect() called tick#: [world.time]")
#ifdef ZASDBG
ASSERT(istype(A))
ASSERT(isturf(B))
@@ -278,6 +287,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
if(direct) c.mark_direct()

/datum/controller/air_system/proc/mark_for_update(turf/T)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/controller/air_system/proc/mark_for_update() called tick#: [world.time]")
#ifdef ZASDBG
ASSERT(isturf(T))
#endif
@@ -289,6 +299,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
T.needs_air_update = 1

/datum/controller/air_system/proc/mark_zone_update(zone/Z)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/controller/air_system/proc/mark_zone_update() called tick#: [world.time]")
#ifdef ZASDBG
ASSERT(istype(Z))
#endif
@@ -297,10 +308,13 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
Z.needs_update = 1

/datum/controller/air_system/proc/equivalent_pressure(zone/A, zone/B)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/controller/air_system/proc/equivalent_pressure() called tick#: [world.time]")
return A.air.compare(B.air)

/datum/controller/air_system/proc/get_edge(zone/A, zone/B)

writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/controller/air_system/proc/get_edge() called tick#: [world.time]")

if(istype(B))
for(var/connection_edge/zone/edge in A.edges)
if(edge.contains_zone(B)) return edge
@@ -315,6 +329,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
return edge

/datum/controller/air_system/proc/has_same_air(turf/A, turf/B)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/controller/air_system/proc/has_same_air() called tick#: [world.time]")
if(A.oxygen != B.oxygen) return 0
if(A.nitrogen != B.nitrogen) return 0
if(A.toxins != B.toxins) return 0
@@ -323,4 +338,5 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
return 1

/datum/controller/air_system/proc/remove_edge(connection/c)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/controller/air_system/proc/remove_edge() called tick#: [world.time]")
edges.Remove(c)
@@ -11,10 +11,12 @@ var/image/mark = image('icons/Testing/Zone.dmi', icon_state = "mark")

/turf/var/tmp/dbg_img
/turf/proc/dbg(image/img, d = 0)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/turf/proc/dbg() called tick#: [world.time]")
if(d > 0) img.dir = d
overlays -= dbg_img
overlays += img
dbg_img = img

proc/soft_assert(thing,fail)
writepanic("[__FILE__].[__LINE__] \\/proc/soft_assert() called tick#: [world.time]")
if(!thing) message_admins(fail)
@@ -1,6 +1,7 @@
client/proc/ZoneTick()
set category = "Debug"
set name = "Process Atmos"
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\client/proc/ZoneTick() called tick#: [world.time]")

var/result = air_master.Tick()
if(result)
@@ -12,6 +13,7 @@ client/proc/ZoneTick()

client/proc/Zone_Info(turf/T as null|turf)
set category = "Debug"
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\client/proc/Zone_Info() called tick#: [world.time]")
if(T)
if(istype(T,/turf/simulated) && T:zone)
T:zone:dbg_data(src)
@@ -30,6 +32,8 @@ client/var/list/zone_debug_images

client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf)
set category = "Debug"
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\client/proc/Test_ZAS_Connection() called tick#: [world.time]")

if(!istype(T))
return

@@ -85,6 +89,7 @@ client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf)


/*zone/proc/DebugDisplay(client/client)
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/zone/proc/DebugDisplay() called tick#: [world.time]")
if(!istype(client))
return

@@ -151,6 +156,7 @@ client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf)


/*client/proc/TestZASRebuild()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/client/proc/TestZASRebuild() called tick#: [world.time]")
set category = "Debug"
// var/turf/turf = get_turf(mob)
var/zone/current_zone = mob.loc:zone
@@ -232,6 +238,7 @@ client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf)

/* VG - We rolled our own.
client/proc/ZASSettings()
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\client/proc/ZASSettings() called tick#: [world.time]")
set category = "Debug"

vsc.SetDefault(mob)