Made most paths in ZAS absolute, for easier searching.

Signed-off-by: Mloc-Argent <colmohici@gmail.com>
This commit is contained in:
Mloc-Argent
2013-07-24 21:13:48 +01:00
parent 09db9f1ff0
commit 2a825e6cca
10 changed files with 2306 additions and 2332 deletions

View File

@@ -225,13 +225,13 @@ proc/AirflowSpace(zone/A)
if(M) M.GotoAirflowDest(n/10)
//Sometimes shit breaks, and M isn't there after the spawn.
atom/movable
var/tmp/turf/airflow_dest
var/tmp/airflow_speed = 0
var/tmp/airflow_time = 0
var/tmp/last_airflow = 0
proc/GotoAirflowDest(n)
/atom/movable/var/tmp/turf/airflow_dest
/atom/movable/var/tmp/airflow_speed = 0
/atom/movable/var/tmp/airflow_time = 0
/atom/movable/var/tmp/last_airflow = 0
/atom/movable/proc/GotoAirflowDest(n)
if(!airflow_dest) return
if(airflow_speed < 0) return
if(last_airflow > world.time - vsc.airflow_delay) return
@@ -296,7 +296,7 @@ atom/movable
density = 0
proc/RepelAirflowDest(n)
/atom/movable/proc/RepelAirflowDest(n)
if(!airflow_dest) return
if(airflow_speed < 0) return
if(last_airflow > world.time - vsc.airflow_delay) return
@@ -354,7 +354,7 @@ atom/movable
if(od)
density = 0
Bump(atom/A)
/atom/movable/Bump(atom/A)
if(airflow_speed > 0 && airflow_dest)
airflow_hit(A)
else

View File

@@ -6,23 +6,25 @@ Indirect connections will not merge the two zones after they reach equilibrium.
#define CONNECTION_INDIRECT 1
#define CONNECTION_CLOSED 0
/connection
var/turf/simulated/A
var/turf/simulated/B
connection
var
turf/simulated //The turfs involved in the connection.
A
B
zone
zone_A
zone_B
ref_A
ref_B
indirect = CONNECTION_DIRECT //If the connection is purely indirect, the zones should not join.
last_updated //The tick at which this was last updated.
no_zone_count = 0
var/zone/zone_A
var/zone/zone_B
var/ref_A
var/ref_B
var/indirect = CONNECTION_DIRECT //If the connection is purely indirect, the zones should not join.
var/last_updated //The tick at which this was last updated.
var/no_zone_count = 0
New(turf/T,turf/O)
/connection/New(turf/T,turf/O)
A = T
B = O
if(A.zone && B.zone)
@@ -65,7 +67,7 @@ connection
del(src)
Del()
/connection/Del()
//remove connections from master lists.
if(ref_B in air_master.turfs_with_connections)
var/list/connections = air_master.turfs_with_connections[ref_B]
@@ -109,7 +111,7 @@ connection
. = ..()
proc/ConnectZones(var/zone/zone_1, var/zone/zone_2, open = 0)
/connection/proc/ConnectZones(var/zone/zone_1, var/zone/zone_2, open = 0)
//Sanity checking
if(!istype(zone_1) || !istype(zone_2))
@@ -162,8 +164,7 @@ connection
zone_2.closed_connection_zones[zone_1] = 1
proc/DisconnectZones(var/zone/zone_1, var/zone/zone_2)
/connection/proc/DisconnectZones(var/zone/zone_1, var/zone/zone_2)
//Sanity checking
if(!istype(zone_1) || !istype(zone_2))
return
@@ -217,7 +218,7 @@ connection
zone_2.closed_connection_zones = null
proc/Cleanup()
/connection/proc/Cleanup()
//Check sanity: existance of turfs
if(!A || !B)
@@ -246,7 +247,7 @@ connection
return 1
proc/CheckPassSanity()
/connection/proc/CheckPassSanity()
//Sanity check, first.
Cleanup()
@@ -279,7 +280,7 @@ connection
else
del src
proc/Sanitize()
/connection/proc/Sanitize()
//If the zones change on connected turfs, update it.
//Both zones changed (wat)

View File

@@ -55,8 +55,7 @@ client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf)
mob << "Both turfs can connect! :)"
zone/proc
DebugDisplay(client/client)
zone/proc/DebugDisplay(client/client)
if(!istype(client))
return

View File

@@ -14,58 +14,53 @@ What are the archived variables for?
#define QUANTIZE(variable) (round(variable,0.0001))
#define TRANSFER_FRACTION 5 //What fraction (1/#) of the air difference to try and transfer
datum
gas //These are used for the "Trace Gases" stuff, but is buggy.
sleeping_agent
specific_heat = 40
/datum/gas/sleeping_agent/specific_heat = 40 //These are used for the "Trace Gases" stuff, but is buggy.
oxygen_agent_b
specific_heat = 300
/datum/gas/oxygen_agent_b/specific_heat = 300
volatile_fuel
specific_heat = 30
/datum/gas/volatile_fuel/specific_heat = 30
var
moles = 0
specific_heat = 0
/datum/gas
var/moles = 0
moles_archived = 0
var/specific_heat = 0
gas_mixture
var //Holds the "moles" of each of the four gases.
oxygen = 0
carbon_dioxide = 0
nitrogen = 0
toxins = 0
total_moles = 0 //Updated when a reaction occurs.
var/moles_archived = 0
volume = CELL_VOLUME
/datum/gas_mixture/
var/oxygen = 0 //Holds the "moles" of each of the four gases.
var/carbon_dioxide = 0
var/nitrogen = 0
var/toxins = 0
temperature = 0 //in Kelvin, use calculate_temperature() to modify
var/total_moles = 0 //Updated when a reaction occurs.
group_multiplier = 1
var/volume = CELL_VOLUME
var/temperature = 0 //in Kelvin, use calculate_temperature() to modify
var/group_multiplier = 1
//Size of the group this gas_mixture is representing.
//=1 for singletons
graphic
var/graphic
list/datum/gas/trace_gases = list() //Seemed to be a good idea that was abandoned
var/list/datum/gas/trace_gases = list() //Seemed to be a good idea that was abandoned
tmp //These are variables for use with the archived data
oxygen_archived
carbon_dioxide_archived
nitrogen_archived
toxins_archived
var/tmp/oxygen_archived //These are variables for use with the archived data
var/tmp/carbon_dioxide_archived
var/tmp/nitrogen_archived
var/tmp/toxins_archived
temperature_archived
var/tmp/temperature_archived
graphic_archived = 0
fuel_burnt = 0
var/tmp/graphic_archived = 0
var/tmp/fuel_burnt = 0
//FOR THE LOVE OF GOD PLEASE USE THIS PROC
//Call it with negative numbers to remove gases.
proc/adjust(o2 = 0, co2 = 0, n2 = 0, tx = 0, list/datum/gas/traces = list())
/datum/gas_mixture/proc/adjust(o2 = 0, co2 = 0, n2 = 0, tx = 0, list/datum/gas/traces = list())
//Purpose: Adjusting the gases within a airmix
//Called by: Nothing, yet!
//Inputs: The values of the gases to adjust
@@ -87,23 +82,22 @@ datum
return
//tg seems to like using these a lot
proc/return_temperature()
/datum/gas_mixture/proc/return_temperature()
return temperature
proc/return_volume()
/datum/gas_mixture/proc/return_volume()
return max(0, volume)
proc/thermal_energy()
/datum/gas_mixture/proc/thermal_energy()
return temperature*heat_capacity()
///////////////////////////////
//PV=nRT - related procedures//
///////////////////////////////
proc/heat_capacity()
/datum/gas_mixture/proc/heat_capacity()
//Purpose: Returning the heat capacity of the gas mix
//Called by: UNKNOWN
//Inputs: None
@@ -117,7 +111,7 @@ datum
return max(MINIMUM_HEAT_CAPACITY,heat_capacity)
proc/heat_capacity_archived()
/datum/gas_mixture/proc/heat_capacity_archived()
//Purpose: Returning the archived heat capacity of the gas mix
//Called by: UNKNOWN
//Inputs: None
@@ -131,7 +125,7 @@ datum
return max(MINIMUM_HEAT_CAPACITY,heat_capacity_archived)
proc/total_moles()
/datum/gas_mixture/proc/total_moles()
return total_moles
/*var/moles = oxygen + carbon_dioxide + nitrogen + toxins
@@ -140,7 +134,7 @@ datum
moles += trace_gas.moles
return moles*/
proc/return_pressure()
/datum/gas_mixture/proc/return_pressure()
//Purpose: Calculating Current Pressure
//Called by:
//Inputs: None
@@ -171,7 +165,7 @@ datum
// return temperature*heat_capacity()
proc/update_values()
/datum/gas_mixture/proc/update_values()
//Purpose: Calculating and storing values which were normally called CONSTANTLY
//Called by: Anything that changes values within a gas mix.
//Inputs: None
@@ -189,8 +183,7 @@ datum
//Procedures used for very specific events//
////////////////////////////////////////////
proc/check_tile_graphic()
/datum/gas_mixture/proc/check_tile_graphic()
//Purpose: Calculating the graphic for a tile
//Called by: Turfs updating
//Inputs: None
@@ -208,7 +201,7 @@ datum
return graphic != graphic_archived
proc/react(atom/dump_location)
/datum/gas_mixture/proc/react(atom/dump_location)
//Purpose: Calculating if it is possible for a fire to occur in the airmix
//Called by: Air mixes updating?
//Inputs: None
@@ -222,7 +215,7 @@ datum
return reacting
proc/fire()
/datum/gas_mixture/proc/fire()
//Purpose: Calculating any fire reactions.
//Called by: react() (See above)
//Inputs: None
@@ -288,7 +281,7 @@ datum
//////////////////////////////////////////////
proc/archive()
/datum/gas_mixture/proc/archive()
//Purpose: Archives the current gas values
//Called by: UNKNOWN
//Inputs: None
@@ -309,7 +302,7 @@ datum
return 1
proc/check_then_merge(datum/gas_mixture/giver)
/datum/gas_mixture/proc/check_then_merge(datum/gas_mixture/giver)
//Purpose: 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)
//Called by: airgroups/machinery expelling air, ?
@@ -334,7 +327,7 @@ datum
return merge(giver)
proc/merge(datum/gas_mixture/giver)
/datum/gas_mixture/proc/merge(datum/gas_mixture/giver)
//Purpose: Merges all air from giver into self. Deletes giver.
//Called by: Machinery expelling air, check_then_merge, ?
//Inputs: The gas to merge.
@@ -374,7 +367,7 @@ datum
//del(giver)
return 1
proc/remove(amount)
/datum/gas_mixture/proc/remove(amount)
//Purpose: Removes a certain number of moles from the air.
//Called by: ?
//Inputs: How many moles to remove.
@@ -412,7 +405,7 @@ datum
return removed
proc/remove_ratio(ratio)
/datum/gas_mixture/proc/remove_ratio(ratio)
//Purpose: Removes a certain ratio of the air.
//Called by: ?
//Inputs: Percentage to remove.
@@ -449,7 +442,7 @@ datum
return removed
proc/check_then_remove(amount)
/datum/gas_mixture/proc/check_then_remove(amount)
//Purpose: 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)
//Called by: ?
@@ -463,7 +456,7 @@ datum
return remove(amount)
proc/copy_from(datum/gas_mixture/sample)
/datum/gas_mixture/proc/copy_from(datum/gas_mixture/sample)
//Purpose: Duplicates the sample air mixture.
//Called by: airgroups splitting, ?
//Inputs: Gas to copy
@@ -487,7 +480,7 @@ datum
return 1
proc/check_gas_mixture(datum/gas_mixture/sharer)
/datum/gas_mixture/proc/check_gas_mixture(datum/gas_mixture/sharer)
//Purpose: Telling if one or both airgroups needs to disable group processing.
//Called by: Airgroups sharing air, checking if group processing needs disabled.
//Inputs: Gas to compare from other airgroup
@@ -547,7 +540,7 @@ datum
return 1
proc/check_turf(turf/model)
/datum/gas_mixture/proc/check_turf(turf/model)
//Purpose: Used to compare the gases in an unsimulated turf with the gas in a simulated one.
//Called by: Sharing air (mimicing) with adjacent unsimulated turfs
//Inputs: Unsimulated turf
@@ -575,7 +568,7 @@ datum
return 1
proc/share(datum/gas_mixture/sharer)
/datum/gas_mixture/proc/share(datum/gas_mixture/sharer)
//Purpose: Used to transfer gas from a more pressurised tile to a less presurised tile
// (Two directional, if the other tile is more pressurised, air travels to current tile)
//Called by: Sharing air with adjacent simulated turfs
@@ -726,7 +719,7 @@ datum
else
return 0
proc/mimic(turf/model, border_multiplier)
/datum/gas_mixture/proc/mimic(turf/model, border_multiplier)
//Purpose: Used transfer gas from a more pressurised tile to a less presurised unsimulated tile.
//Called by: "sharing" from unsimulated to simulated turfs.
//Inputs: Unsimulated turf, Multiplier for gas transfer (optional)
@@ -809,7 +802,7 @@ datum
else
return 0
proc/check_both_then_temperature_share(datum/gas_mixture/sharer, conduction_coefficient)
/datum/gas_mixture/proc/check_both_then_temperature_share(datum/gas_mixture/sharer, conduction_coefficient)
var/delta_temperature = (temperature_archived - sharer.temperature_archived)
var/self_heat_capacity = heat_capacity_archived()
@@ -841,7 +834,7 @@ datum
return 1
//Logic integrated from: temperature_share(sharer, conduction_coefficient) for efficiency
proc/check_me_then_temperature_share(datum/gas_mixture/sharer, conduction_coefficient)
/datum/gas_mixture/proc/check_me_then_temperature_share(datum/gas_mixture/sharer, conduction_coefficient)
var/delta_temperature = (temperature_archived - sharer.temperature_archived)
var/self_heat_capacity = heat_capacity_archived()
@@ -869,7 +862,7 @@ datum
return 1
//Logic integrated from: temperature_share(sharer, conduction_coefficient) for efficiency
proc/check_me_then_temperature_turf_share(turf/simulated/sharer, conduction_coefficient)
/datum/gas_mixture/proc/check_me_then_temperature_turf_share(turf/simulated/sharer, conduction_coefficient)
var/delta_temperature = (temperature_archived - sharer.temperature)
var/self_temperature_delta = 0
@@ -897,7 +890,7 @@ datum
return 1
//Logic integrated from: temperature_turf_share(sharer, conduction_coefficient) for efficiency
proc/check_me_then_temperature_mimic(turf/model, conduction_coefficient)
/datum/gas_mixture/proc/check_me_then_temperature_mimic(turf/model, conduction_coefficient)
var/delta_temperature = (temperature_archived - model.temperature)
var/self_temperature_delta = 0
@@ -919,8 +912,7 @@ datum
return 1
//Logic integrated from: temperature_mimic(model, conduction_coefficient) for efficiency
proc/temperature_share(datum/gas_mixture/sharer, conduction_coefficient)
/datum/gas_mixture/proc/temperature_share(datum/gas_mixture/sharer, conduction_coefficient)
var/delta_temperature = (temperature_archived - sharer.temperature_archived)
if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
var/self_heat_capacity = heat_capacity_archived()
@@ -936,7 +928,7 @@ datum
temperature -= heat/(self_heat_capacity*group_multiplier)
sharer.temperature += heat/(sharer_heat_capacity*sharer.group_multiplier)
proc/temperature_mimic(turf/model, conduction_coefficient, border_multiplier)
/datum/gas_mixture/proc/temperature_mimic(turf/model, conduction_coefficient, border_multiplier)
var/delta_temperature = (temperature - model.temperature)
if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
var/self_heat_capacity = heat_capacity()//_archived()
@@ -953,7 +945,7 @@ datum
else
temperature -= heat/(self_heat_capacity*group_multiplier)
proc/temperature_turf_share(turf/simulated/sharer, conduction_coefficient)
/datum/gas_mixture/proc/temperature_turf_share(turf/simulated/sharer, conduction_coefficient)
var/delta_temperature = (temperature_archived - sharer.temperature)
if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
var/self_heat_capacity = heat_capacity()
@@ -965,7 +957,7 @@ datum
temperature -= heat/(self_heat_capacity*group_multiplier)
sharer.temperature += heat/sharer.heat_capacity
proc/compare(datum/gas_mixture/sample)
/datum/gas_mixture/proc/compare(datum/gas_mixture/sample)
//Purpose: Compares sample to self to see if within acceptable ranges that group processing may be enabled
//Called by: Airgroups trying to rebuild
//Inputs: Gas mix to compare
@@ -1014,8 +1006,7 @@ datum
return 0
return 1
proc/subtract(datum/gas_mixture/right_side)
/datum/gas_mixture/proc/subtract(datum/gas_mixture/right_side)
//Purpose: Subtracts right_side from air_mixture. Used to help turfs mingle
//Called by: Pipelines ending in a break (or something)
//Inputs: Gas mix to remove

View File

@@ -64,8 +64,7 @@ atom/proc/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
return (!density || !height || air_group)
turf
CanPass(atom/movable/mover, turf/target, height=1.5,air_group=0)
/turf/CanPass(atom/movable/mover, turf/target, height=1.5,air_group=0)
if(!target) return 0
if(istype(mover)) // turf/Enter(...) will perform more advanced checks
@@ -88,9 +87,7 @@ turf
var/global/datum/controller/air_system/air_master
datum
controller
air_system
/datum/controller/air_system/
//Geoemetry lists
var/list/turfs_with_connections = list()
var/list/active_hotspots = list()
@@ -122,7 +119,7 @@ datum
*/
proc/setup()
/datum/controller/air_system/proc/setup()
//Purpose: Call this at the start to setup air groups geometry
// (Warning: Very processor intensive but only must be done once per round)
//Called by: Gameticker/Master controller
@@ -153,7 +150,7 @@ datum
/*
spawn start()
proc/start()
/datum/controller/air_system/proc/start()
//Purpose: This is kicked off by the master controller, and controls the processing of all atmosphere.
//Called by: Master controller
//Inputs: None.
@@ -174,7 +171,7 @@ datum
sleep(max(5,update_delay*tick_multiplier))
*/
proc/tick()
/datum/controller/air_system/proc/tick()
. = 1 //Set the default return value, for runtime detection.
tick_progress = "update_air_properties"

View File

@@ -43,8 +43,7 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
return igniting
obj
fire
/obj/fire
//Icon for fire on turfs.
anchored = 1
@@ -57,10 +56,9 @@ obj
layer = TURF_LAYER
var
firelevel = 10000 //Calculated by gas_mixture.calculate_firelevel()
var/firelevel = 10000 //Calculated by gas_mixture.calculate_firelevel()
process()
/obj/fire/process()
. = 1
//get location and check if it is in a proper ZAS zone
@@ -149,7 +147,7 @@ obj
///////////////////////////////// FLOW HAS BEEN REMERGED /// feel free to delete the fire again from here on //////////////////////////////////////////////////////////////////
New(newLoc,fl)
/obj/fire/New(newLoc,fl)
..()
if(!istype(loc, /turf))
@@ -161,7 +159,7 @@ obj
air_master.active_hotspots.Add(src)
Del()
/obj/fire/Del()
if (istype(loc, /turf/simulated))
SetLuminosity(0)

View File

@@ -1,59 +1,59 @@
var/image/contamination_overlay = image('icons/effects/contamination.dmi')
pl_control/var
PLASMA_DMG = 3
PLASMA_DMG_NAME = "Plasma Damage Amount"
PLASMA_DMG_DESC = "Self Descriptive"
/pl_control
var/PLASMA_DMG = 3
var/PLASMA_DMG_NAME = "Plasma Damage Amount"
var/PLASMA_DMG_DESC = "Self Descriptive"
CLOTH_CONTAMINATION = 1
CLOTH_CONTAMINATION_NAME = "Cloth Contamination"
CLOTH_CONTAMINATION_DESC = "If this is on, plasma does damage by getting into cloth."
var/CLOTH_CONTAMINATION = 1
var/CLOTH_CONTAMINATION_NAME = "Cloth Contamination"
var/CLOTH_CONTAMINATION_DESC = "If this is on, plasma does damage by getting into cloth."
PLASMAGUARD_ONLY = 0
PLASMAGUARD_ONLY_NAME = "\"PlasmaGuard Only\""
PLASMAGUARD_ONLY_DESC = "If this is on, only biosuits and spacesuits protect against contamination and ill effects."
var/PLASMAGUARD_ONLY = 0
var/PLASMAGUARD_ONLY_NAME = "\"PlasmaGuard Only\""
var/PLASMAGUARD_ONLY_DESC = "If this is on, only biosuits and spacesuits protect against contamination and ill effects."
GENETIC_CORRUPTION = 0
GENETIC_CORRUPTION_NAME = "Genetic Corruption Chance"
GENETIC_CORRUPTION_DESC = "Chance of genetic corruption as well as toxic damage, X in 10,000."
var/GENETIC_CORRUPTION = 0
var/GENETIC_CORRUPTION_NAME = "Genetic Corruption Chance"
var/GENETIC_CORRUPTION_DESC = "Chance of genetic corruption as well as toxic damage, X in 10,000."
SKIN_BURNS = 0
SKIN_BURNS_DESC = "Plasma has an effect similar to mustard gas on the un-suited."
SKIN_BURNS_NAME = "Skin Burns"
var/SKIN_BURNS = 0
var/SKIN_BURNS_DESC = "Plasma has an effect similar to mustard gas on the un-suited."
var/SKIN_BURNS_NAME = "Skin Burns"
EYE_BURNS = 1
EYE_BURNS_NAME = "Eye Burns"
EYE_BURNS_DESC = "Plasma burns the eyes of anyone not wearing eye protection."
var/EYE_BURNS = 1
var/EYE_BURNS_NAME = "Eye Burns"
var/EYE_BURNS_DESC = "Plasma burns the eyes of anyone not wearing eye protection."
CONTAMINATION_LOSS = 0.02
CONTAMINATION_LOSS_NAME = "Contamination Loss"
CONTAMINATION_LOSS_DESC = "How much toxin damage is dealt from contaminated clothing" //Per tick? ASK ARYN
var/CONTAMINATION_LOSS = 0.02
var/CONTAMINATION_LOSS_NAME = "Contamination Loss"
var/CONTAMINATION_LOSS_DESC = "How much toxin damage is dealt from contaminated clothing" //Per tick? ASK ARYN
PLASMA_HALLUCINATION = 0
PLASMA_HALLUCINATION_NAME = "Plasma Hallucination"
PLASMA_HALLUCINATION_DESC = "Does being in plasma cause you to hallucinate?"
var/PLASMA_HALLUCINATION = 0
var/PLASMA_HALLUCINATION_NAME = "Plasma Hallucination"
var/PLASMA_HALLUCINATION_DESC = "Does being in plasma cause you to hallucinate?"
N2O_HALLUCINATION = 1
N2O_HALLUCINATION_NAME = "N2O Hallucination"
N2O_HALLUCINATION_DESC = "Does being in sleeping gas cause you to hallucinate?"
var/N2O_HALLUCINATION = 1
var/N2O_HALLUCINATION_NAME = "N2O Hallucination"
var/N2O_HALLUCINATION_DESC = "Does being in sleeping gas cause you to hallucinate?"
obj/var/contaminated = 0
obj/item/proc
can_contaminate()
/obj/item/proc/can_contaminate()
//Clothing and backpacks can be contaminated.
if(flags & PLASMAGUARD) return 0
else if(istype(src,/obj/item/weapon/storage/backpack)) return 0 //Cannot be washed :(
else if(istype(src,/obj/item/clothing)) return 1
contaminate()
/obj/item/proc/contaminate()
//Do a contamination overlay? Temporary measure to keep contamination less deadly than it was.
if(!contaminated)
contaminated = 1
overlays += contamination_overlay
decontaminate()
/obj/item/proc/decontaminate()
contaminated = 0
overlays -= contamination_overlay

View File

@@ -1,75 +1,74 @@
var/global/vs_control/vsc = new
vs_control/var
fire_consuption_rate = 0.25
fire_consuption_rate_NAME = "Fire - Air Consumption Ratio"
fire_consuption_rate_DESC = "Ratio of air removed and combusted per tick."
/vs_control
var/fire_consuption_rate = 0.25
var/fire_consuption_rate_NAME = "Fire - Air Consumption Ratio"
var/fire_consuption_rate_DESC = "Ratio of air removed and combusted per tick."
fire_firelevel_multiplier = 25
fire_firelevel_multiplier_NAME = "Fire - Firelevel Constant"
fire_firelevel_multiplier_DESC = "Multiplied by the equation for firelevel, affects mainly the extingiushing of fires."
var/fire_firelevel_multiplier = 25
var/fire_firelevel_multiplier_NAME = "Fire - Firelevel Constant"
var/fire_firelevel_multiplier_DESC = "Multiplied by the equation for firelevel, affects mainly the extingiushing of fires."
fire_fuel_energy_release = 397000
fire_fuel_energy_release_NAME = "Fire - Fuel energy release"
fire_fuel_energy_release_DESC = "The energy in joule released when burning one mol of a burnable substance"
var/fire_fuel_energy_release = 397000
var/fire_fuel_energy_release_NAME = "Fire - Fuel energy release"
var/fire_fuel_energy_release_DESC = "The energy in joule released when burning one mol of a burnable substance"
airflow_lightest_pressure = 20
airflow_lightest_pressure_NAME = "Airflow - Small Movement Threshold %"
airflow_lightest_pressure_DESC = "Percent of 1 Atm. at which items with the small weight classes will move."
var/airflow_lightest_pressure = 20
var/airflow_lightest_pressure_NAME = "Airflow - Small Movement Threshold %"
var/airflow_lightest_pressure_DESC = "Percent of 1 Atm. at which items with the small weight classes will move."
airflow_light_pressure = 35
airflow_light_pressure_NAME = "Airflow - Medium Movement Threshold %"
airflow_light_pressure_DESC = "Percent of 1 Atm. at which items with the medium weight classes will move."
var/airflow_light_pressure = 35
var/airflow_light_pressure_NAME = "Airflow - Medium Movement Threshold %"
var/airflow_light_pressure_DESC = "Percent of 1 Atm. at which items with the medium weight classes will move."
airflow_medium_pressure = 50
airflow_medium_pressure_NAME = "Airflow - Heavy Movement Threshold %"
airflow_medium_pressure_DESC = "Percent of 1 Atm. at which items with the largest weight classes will move."
var/airflow_medium_pressure = 50
var/airflow_medium_pressure_NAME = "Airflow - Heavy Movement Threshold %"
var/airflow_medium_pressure_DESC = "Percent of 1 Atm. at which items with the largest weight classes will move."
airflow_heavy_pressure = 65
airflow_heavy_pressure_NAME = "Airflow - Mob Movement Threshold %"
airflow_heavy_pressure_DESC = "Percent of 1 Atm. at which mobs will move."
var/airflow_heavy_pressure = 65
var/airflow_heavy_pressure_NAME = "Airflow - Mob Movement Threshold %"
var/airflow_heavy_pressure_DESC = "Percent of 1 Atm. at which mobs will move."
airflow_dense_pressure = 85
airflow_dense_pressure_NAME = "Airflow - Dense Movement Threshold %"
airflow_dense_pressure_DESC = "Percent of 1 Atm. at which items with canisters and closets will move."
var/airflow_dense_pressure = 85
var/airflow_dense_pressure_NAME = "Airflow - Dense Movement Threshold %"
var/airflow_dense_pressure_DESC = "Percent of 1 Atm. at which items with canisters and closets will move."
airflow_stun_pressure = 60
airflow_stun_pressure_NAME = "Airflow - Mob Stunning Threshold %"
airflow_stun_pressure_DESC = "Percent of 1 Atm. at which mobs will be stunned by airflow."
var/airflow_stun_pressure = 60
var/airflow_stun_pressure_NAME = "Airflow - Mob Stunning Threshold %"
var/airflow_stun_pressure_DESC = "Percent of 1 Atm. at which mobs will be stunned by airflow."
airflow_stun_cooldown = 60
airflow_stun_cooldown_NAME = "Aiflow Stunning - Cooldown"
airflow_stun_cooldown_DESC = "How long, in tenths of a second, to wait before stunning them again."
var/airflow_stun_cooldown = 60
var/airflow_stun_cooldown_NAME = "Aiflow Stunning - Cooldown"
var/airflow_stun_cooldown_DESC = "How long, in tenths of a second, to wait before stunning them again."
airflow_stun = 1
airflow_stun_NAME = "Airflow Impact - Stunning"
airflow_stun_DESC = "How much a mob is stunned when hit by an object."
var/airflow_stun = 1
var/airflow_stun_NAME = "Airflow Impact - Stunning"
var/airflow_stun_DESC = "How much a mob is stunned when hit by an object."
airflow_damage = 2
airflow_damage_NAME = "Airflow Impact - Damage"
airflow_damage_DESC = "Damage from airflow impacts."
var/airflow_damage = 2
var/airflow_damage_NAME = "Airflow Impact - Damage"
var/airflow_damage_DESC = "Damage from airflow impacts."
airflow_speed_decay = 1.5
airflow_speed_decay_NAME = "Airflow Speed Decay"
airflow_speed_decay_DESC = "How rapidly the speed gained from airflow decays."
var/airflow_speed_decay = 1.5
var/airflow_speed_decay_NAME = "Airflow Speed Decay"
var/airflow_speed_decay_DESC = "How rapidly the speed gained from airflow decays."
airflow_delay = 30
airflow_delay_NAME = "Airflow Retrigger Delay"
airflow_delay_DESC = "Time in deciseconds before things can be moved by airflow again."
var/airflow_delay = 30
var/airflow_delay_NAME = "Airflow Retrigger Delay"
var/airflow_delay_DESC = "Time in deciseconds before things can be moved by airflow again."
airflow_mob_slowdown = 1
airflow_mob_slowdown_NAME = "Airflow Slowdown"
airflow_mob_slowdown_DESC = "Time in tenths of a second to add as a delay to each movement by a mob if they are fighting the pull of the airflow."
var/airflow_mob_slowdown = 1
var/airflow_mob_slowdown_NAME = "Airflow Slowdown"
var/airflow_mob_slowdown_DESC = "Time in tenths of a second to add as a delay to each movement by a mob if they are fighting the pull of the airflow."
vs_control
var
list/settings = list()
list/bitflags = list("1","2","4","8","16","32","64","128","256","512","1024")
pl_control/plc = new()
New()
/vs_control/var/list/settings = list()
/vs_control/var/list/bitflags = list("1","2","4","8","16","32","64","128","256","512","1024")
/vs_control/var/pl_control/plc = new()
/vs_control/New()
. = ..()
settings = vars.Copy()
@@ -85,7 +84,7 @@ vs_control
settings -= "bitflags"
settings -= "plc"
proc/ChangeSettingsDialog(mob/user,list/L)
/vs_control/proc/ChangeSettingsDialog(mob/user,list/L)
//var/which = input(user,"Choose a setting:") in L
var/dat = ""
for(var/ch in L)
@@ -104,10 +103,12 @@ vs_control
dat += "<b>[vw_name] = [vw]</b> <A href='?src=\ref[src];changevar=[ch]'>\[Change\]</A><br>"
dat += "<i>[vw_desc]</i><br><br>"
user << browse(dat,"window=settings")
Topic(href,href_list)
/vs_control/Topic(href,href_list)
if("changevar" in href_list)
ChangeSetting(usr,href_list["changevar"])
proc/ChangeSetting(mob/user,ch)
/vs_control/proc/ChangeSetting(mob/user,ch)
var/vw
var/how = "Text"
var/display_description = ch
@@ -162,7 +163,8 @@ vs_control
ChangeSettingsDialog(user,plc.settings)
else
ChangeSettingsDialog(user,settings)
proc/RandomizeWithProbability()
/vs_control/proc/RandomizeWithProbability()
for(var/V in settings)
var/newvalue
if("[V]_RANDOM" in vars)
@@ -174,11 +176,11 @@ vs_control
newvalue = vars[V]
V = newvalue
proc/ChangePlasma()
/vs_control/proc/ChangePlasma()
for(var/V in plc.settings)
plc.Randomize(V)
proc/SetDefault(var/mob/user)
/vs_control/proc/SetDefault(var/mob/user)
var/list/setting_choices = list("Plasma - Standard", "Plasma - Low Hazard", "Plasma - High Hazard", "Plasma - Oh Shit!",\
"ZAS - Normal", "ZAS - Forgiving", "ZAS - Dangerous", "ZAS - Hellish")
var/def = input(user, "Which of these presets should be used?") as null|anything in setting_choices
@@ -280,9 +282,9 @@ vs_control
world << "\blue <b>[key_name(user)] changed the global plasma/ZAS settings to \"[def]\"</b>"
pl_control
var/list/settings = list()
New()
/pl_control/var/list/settings = list()
/pl_control/New()
. = ..()
settings = vars.Copy()
@@ -295,7 +297,8 @@ pl_control
settings -= V
settings -= "settings"
proc/Randomize(V)
/pl_control/proc/Randomize(V)
var/newvalue
if("[V]_RANDOM" in vars)
if(isnum(vars["[V]_RANDOM"]))

View File

@@ -1,13 +1,12 @@
atom/var/pressure_resistance = ONE_ATMOSPHERE
turf
/atom/var/pressure_resistance = ONE_ATMOSPHERE
var/zone/zone
/turf/var/zone/zone
assume_air(datum/gas_mixture/giver) //use this for machines to adjust air
/turf/assume_air(datum/gas_mixture/giver) //use this for machines to adjust air
del(giver)
return 0
return_air()
/turf/return_air()
//Create gas mixture to hold data for passing
var/datum/gas_mixture/GM = new
@@ -21,7 +20,7 @@ turf
return GM
remove_air(amount as num)
/turf/remove_air(amount as num)
var/datum/gas_mixture/GM = new
var/sum = oxygen + carbon_dioxide + nitrogen + toxins
@@ -36,22 +35,17 @@ turf
return GM
turf
simulated
/turf/simulated/var/current_graphic = null
var/current_graphic = null
/turf/simulated/var/tmp/datum/gas_mixture/air
var/tmp
datum/gas_mixture/air
/turf/simulated/var/tmp/processing = 1
processing = 1
/turf/simulated/var/tmp/air_check_directions = 0 //Do not modify this, just add turf to air_master.tiles_to_update
air_check_directions = 0 //Do not modify this, just add turf to air_master.tiles_to_update
/turf/simulated/var/tmp/obj/fire/active_hotspot
obj/fire/active_hotspot
proc/update_visuals()
/turf/simulated/proc/update_visuals()
overlays = null
var/siding_icon_state = return_siding_icon_state()
@@ -64,9 +58,7 @@ turf
if(2)
overlays.Add(slmaster)
New()
/turf/simulated/New()
..()
if(!blocks_air)
@@ -90,7 +82,7 @@ turf
if(istype(target))
air_master.tiles_to_update |= target
Del()
/turf/simulated/Del()
if(active_hotspot)
del(active_hotspot)
if(blocks_air)
@@ -100,7 +92,7 @@ turf
air_master.tiles_to_update.Add(tile)
..()
assume_air(datum/gas_mixture/giver)
/turf/simulated/assume_air(datum/gas_mixture/giver)
if(!giver) return 0
if(zone)
zone.air.merge(giver)
@@ -108,7 +100,7 @@ turf
else
return ..()
return_air()
/turf/simulated/return_air()
if(zone)
return zone.air
else if(air)
@@ -117,7 +109,7 @@ turf
else
return ..()
remove_air(amount as num)
/turf/simulated/remove_air(amount as num)
if(zone)
var/datum/gas_mixture/removed = null
removed = zone.air.remove(amount)
@@ -133,7 +125,7 @@ turf
else
return ..()
proc/update_air_properties()
/turf/simulated/proc/update_air_properties()
var/air_directions_archived = air_check_directions
air_check_directions = 0
@@ -270,10 +262,6 @@ turf
processing = 0
return 1
/turf/proc/HasDoor(turf/O)
//Checks for the presence of doors, used for zone spreading and connection.
//A positive numerical argument checks only for closed doors.
@@ -289,7 +277,7 @@ turf
else
return 1
turf/proc/ZCanPass(turf/simulated/T, var/include_space = 0)
/turf/proc/ZCanPass(turf/simulated/T, var/include_space = 0)
//Fairly standard pass checks for turfs, objects and directional windows. Also stops at the edge of space.
if(!istype(T))
return 0
@@ -314,7 +302,7 @@ turf/proc/ZCanPass(turf/simulated/T, var/include_space = 0)
return 1
turf/proc/ZAirPass(turf/T)
/turf/proc/ZAirPass(turf/T)
//Fairly standard pass checks for turfs, objects and directional windows.
if(!istype(T))
return 0
@@ -336,7 +324,6 @@ turf/proc/ZAirPass(turf/T)
return 1
/*UNUSED
/turf/proc/check_connections()
//Checks for new connections that can be made.

View File

@@ -2,24 +2,22 @@ var/list/zones = list()
var/list/DoorDirections = list(NORTH,WEST) //Which directions doors turfs can connect to zones
var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs can connect to zones
zone
var
dbg_output = 0 //Enables debug output.
rebuild = 0 //If 1, zone will be rebuilt on next process. Not sure if used.
datum/gas_mixture/air //The air contents of the zone.
list/contents //All the tiles that are contained in this zone.
list/connections // /connection objects which refer to connections with other zones, e.g. through a door.
list/connected_zones //Parallels connections, but lists zones to which this one is connected and the number
/zone
var/dbg_output = 0 //Enables debug output.
var/rebuild = 0 //If 1, zone will be rebuilt on next process. Not sure if used.
var/datum/gas_mixture/air //The air contents of the zone.
var/list/contents //All the tiles that are contained in this zone.
var/list/connections // /connection objects which refer to connections with other zones, e.g. through a door.
var/list/connected_zones //Parallels connections, but lists zones to which this one is connected and the number
//of points they're connected at.
list/closed_connection_zones //Same as connected_zones, but for zones where the door or whatever is closed.
list/unsimulated_tiles // Any space tiles in this list will cause air to flow out.
last_update = 0
progress = "nothing"
var/list/closed_connection_zones //Same as connected_zones, but for zones where the door or whatever is closed.
var/list/unsimulated_tiles // Any space tiles in this list will cause air to flow out.
var/last_update = 0
var/progress = "nothing"
//CREATION AND DELETION
New(turf/start)
/zone/New(turf/start)
. = ..()
//Get the turfs that are part of the zone using a floodfill method
if(istype(start,/list))
@@ -53,7 +51,7 @@ zone
//LEGACY, DO NOT USE. Use the SoftDelete proc.
Del()
/zone/Del()
//Ensuring the zone list doesn't get clogged with null values.
for(var/turf/simulated/T in contents)
RemoveTurf(T)
@@ -69,7 +67,7 @@ zone
//Handles deletion via garbage collection.
proc/SoftDelete()
/zone/proc/SoftDelete()
zones.Remove(src)
air = null
@@ -89,7 +87,7 @@ zone
//ZONE MANAGEMENT FUNCTIONS
proc/AddTurf(turf/T)
/zone/proc/AddTurf(turf/T)
//Adds the turf to contents, increases the size of the zone, and sets the zone var.
if(istype(T, /turf/simulated))
if(T in contents)
@@ -108,7 +106,7 @@ zone
unsimulated_tiles += T
contents -= T
proc/RemoveTurf(turf/T)
/zone/proc/RemoveTurf(turf/T)
//Same, but in reverse.
if(istype(T, /turf/simulated))
if(!(T in contents))
@@ -129,7 +127,7 @@ zone
#define QUANTIZE(variable) (round(variable,0.0001))
zone/proc/process()
/zone/proc/process()
. = 1
progress = "problem with: SoftDelete()"