mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-14 20:23:26 +00:00
Merge resolution.
This commit is contained in:
169
code/WorkInProgress/virus2/dishincubator.dm
Normal file
169
code/WorkInProgress/virus2/dishincubator.dm
Normal file
@@ -0,0 +1,169 @@
|
||||
/obj/machinery/disease2/incubator/
|
||||
name = "Pathogenic incubator"
|
||||
density = 1
|
||||
anchored = 1
|
||||
icon = 'virology.dmi'
|
||||
icon_state = "incubator"
|
||||
var/obj/item/weapon/virusdish/dish
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker = null
|
||||
var/radiation = 0
|
||||
|
||||
var/on = 0
|
||||
var/power = 0
|
||||
|
||||
var/foodsupply = 0
|
||||
var/toxins = 0
|
||||
|
||||
ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
del(src)
|
||||
return
|
||||
|
||||
blob_act()
|
||||
if (prob(25))
|
||||
del(src)
|
||||
|
||||
meteorhit()
|
||||
del(src)
|
||||
return
|
||||
|
||||
attackby(var/obj/B as obj, var/mob/user as mob)
|
||||
if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B,/obj/item/weapon/reagent_containers/syringe))
|
||||
|
||||
if(src.beaker)
|
||||
if(istype(beaker,/obj/item/weapon/reagent_containers/syringe))
|
||||
user << "A syringe is already loaded into the machine."
|
||||
else
|
||||
user << "A beaker is already loaded into the machine."
|
||||
return
|
||||
|
||||
src.beaker = B
|
||||
user.drop_item()
|
||||
B.loc = src
|
||||
if(istype(B,/obj/item/weapon/reagent_containers/syringe))
|
||||
user << "You add the syringe to the machine!"
|
||||
src.updateUsrDialog()
|
||||
else
|
||||
user << "You add the beaker to the machine!"
|
||||
src.updateUsrDialog()
|
||||
else
|
||||
if(istype(B,/obj/item/weapon/virusdish))
|
||||
if(src.dish)
|
||||
user << "A dish is already loaded into the machine."
|
||||
return
|
||||
|
||||
src.dish = B
|
||||
user.drop_item()
|
||||
B.loc = src
|
||||
if(istype(B,/obj/item/weapon/virusdish))
|
||||
user << "You add the dish to the machine!"
|
||||
src.updateUsrDialog()
|
||||
|
||||
Topic(href, href_list)
|
||||
if(stat & BROKEN) return
|
||||
if(usr.stat || usr.restrained()) return
|
||||
if(!in_range(src, usr)) return
|
||||
if (href_list["ejectchem"])
|
||||
if(beaker)
|
||||
beaker.loc = src.loc
|
||||
beaker = null
|
||||
if(!dish)
|
||||
return
|
||||
usr.machine = src
|
||||
if (href_list["power"])
|
||||
on = !on
|
||||
if(on)
|
||||
icon_state = "incubator_on"
|
||||
else
|
||||
icon_state = "incubator"
|
||||
if (href_list["ejectdish"])
|
||||
if(dish)
|
||||
dish.loc = src.loc
|
||||
dish = null
|
||||
if (href_list["rad"])
|
||||
radiation += 10
|
||||
if (href_list["flush"])
|
||||
radiation = 0
|
||||
toxins = 0
|
||||
foodsupply = 0
|
||||
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
src.updateUsrDialog()
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
user.machine = src
|
||||
var/dat = ""
|
||||
if(!dish)
|
||||
dat = "Please insert dish into the incubator.<BR>"
|
||||
var/string = "Off"
|
||||
if(on)
|
||||
string = "On"
|
||||
dat += "Power status : <A href='?src=\ref[src];power=1'>[string]</a>"
|
||||
dat += "<BR>"
|
||||
dat += "Food supply : [foodsupply]"
|
||||
dat += "<BR>"
|
||||
dat += "Radiation Levels : [radiation] RADS : <A href='?src=\ref[src];rad=1'>Radiate</a>"
|
||||
dat += "<BR>"
|
||||
dat += "Toxins : [toxins]"
|
||||
dat += "<BR><BR>"
|
||||
if(beaker)
|
||||
dat += "Eject chemicals : <A href='?src=\ref[src];ejectchem=1'> Eject</a>"
|
||||
dat += "<BR>"
|
||||
if(dish)
|
||||
dat += "Eject Virus dish : <A href='?src=\ref[src];ejectdish=1'> Eject</a>"
|
||||
dat += "<BR>"
|
||||
dat += "<BR><BR>"
|
||||
dat += "<A href='?src=\ref[src];flush=1'>Flush system</a><BR>"
|
||||
dat += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse("<TITLE>Pathogenic incubator</TITLE>incubator menu:<BR><BR>[dat]", "window=incubator;size=575x400")
|
||||
onclose(user, "incubator")
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
process()
|
||||
|
||||
if(dish && on && dish.virus2)
|
||||
use_power(50,EQUIP)
|
||||
if(!powered(EQUIP))
|
||||
on = 0
|
||||
icon_state = "incubator"
|
||||
if(foodsupply)
|
||||
foodsupply -= 1
|
||||
dish.growth += 3
|
||||
if(dish.growth >= 100)
|
||||
state("The [src.name] pings", "blue")
|
||||
if(radiation)
|
||||
if(radiation > 50 & prob(5))
|
||||
dish.virus2.majormutate()
|
||||
if(dish.info)
|
||||
dish.info = "OUTDATED : [dish.info]"
|
||||
dish.analysed = 0
|
||||
state("The [src.name] beeps", "blue")
|
||||
|
||||
else if(prob(5))
|
||||
dish.virus2.minormutate()
|
||||
radiation -= 1
|
||||
if(toxins && prob(5))
|
||||
dish.virus2.infectionchance -= 1
|
||||
if(toxins > 50)
|
||||
dish.virus2 = null
|
||||
else if(!dish)
|
||||
on = 0
|
||||
icon_state = "incubator"
|
||||
|
||||
|
||||
if(beaker)
|
||||
if(!beaker.reagents.remove_reagent("virusfood",5))
|
||||
foodsupply += 10
|
||||
if(!beaker.reagents.remove_reagent("toxin",1))
|
||||
toxins += 1
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
@@ -366,6 +367,7 @@ connection
|
||||
if(zone_A && zone_B)
|
||||
DisconnectZones(zone_A, zone_B)
|
||||
ConnectZones(A.zone, B.zone, indirect)
|
||||
zone_A = A.zone
|
||||
|
||||
//The "B" zone changed.
|
||||
else if(B.zone && B.zone != zone_B)
|
||||
@@ -393,6 +395,7 @@ connection
|
||||
if(zone_A && zone_B)
|
||||
DisconnectZones(zone_A, zone_B)
|
||||
ConnectZones(A.zone, B.zone, indirect)
|
||||
zone_B = B.zone
|
||||
|
||||
|
||||
#undef CONNECTION_DIRECT
|
||||
|
||||
@@ -8,7 +8,8 @@ client/proc/Zone_Info(turf/T as null|turf)
|
||||
mob << "No zone here."
|
||||
else
|
||||
if(zone_debug_images)
|
||||
images -= zone_debug_images
|
||||
for(var/zone in zone_debug_images)
|
||||
images -= zone_debug_images[zone]
|
||||
zone_debug_images = null
|
||||
|
||||
client/var/list/zone_debug_images
|
||||
@@ -23,12 +24,12 @@ client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf)
|
||||
"South" = SOUTH,\
|
||||
"East" = EAST,\
|
||||
"West" = WEST,\
|
||||
"None" = null)
|
||||
"N/A" = null)
|
||||
var/direction = input("What direction do you wish to test?","Set direction") as null|anything in direction_list
|
||||
if(!direction)
|
||||
return
|
||||
|
||||
if(direction == "None")
|
||||
if(direction == "N/A")
|
||||
if(T.CanPass(null, T, 0,0))
|
||||
mob << "The turf can pass air! :D"
|
||||
else
|
||||
@@ -55,8 +56,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
|
||||
|
||||
@@ -65,11 +65,14 @@ zone/proc
|
||||
|
||||
if(!client.zone_debug_images)
|
||||
client.zone_debug_images = list()
|
||||
|
||||
var/list/current_zone_images = list()
|
||||
|
||||
for(var/turf/T in contents)
|
||||
client.zone_debug_images += image('debug_group.dmi', T)
|
||||
current_zone_images += image('debug_group.dmi', T, null, TURF_LAYER)
|
||||
|
||||
for(var/turf/space/S in unsimulated_tiles)
|
||||
client.zone_debug_images += image('debug_space.dmi', S)
|
||||
current_zone_images += image('debug_space.dmi', S, null, TURF_LAYER)
|
||||
|
||||
client << "<u>Zone Air Contents</u>"
|
||||
client << "Oxygen: [air.oxygen]"
|
||||
@@ -86,8 +89,8 @@ zone/proc
|
||||
|
||||
for(var/connection/C in connections)
|
||||
client << "\ref[C] [C.A] --> [C.B] [(C.indirect?"Open":"Closed")]"
|
||||
client.zone_debug_images += image('debug_connect.dmi', C.A)
|
||||
client.zone_debug_images += image('debug_connect.dmi', C.B)
|
||||
current_zone_images += image('debug_connect.dmi', C.A, null, TURF_LAYER)
|
||||
current_zone_images += image('debug_connect.dmi', C.B, null, TURF_LAYER)
|
||||
|
||||
client << "Connected Zones:"
|
||||
for(var/zone/zone in connected_zones)
|
||||
@@ -100,13 +103,17 @@ zone/proc
|
||||
if(!istype(C,/connection))
|
||||
client << "[C] (Not Connection!)"
|
||||
|
||||
client.images += client.zone_debug_images
|
||||
if(!client.zone_debug_images)
|
||||
client.zone_debug_images = list()
|
||||
client.zone_debug_images[src] = current_zone_images
|
||||
|
||||
client.images += client.zone_debug_images[src]
|
||||
|
||||
else
|
||||
dbg_output = 0
|
||||
|
||||
client.images -= client.zone_debug_images
|
||||
client.zone_debug_images = null
|
||||
client.images -= client.zone_debug_images[src]
|
||||
client.zone_debug_images.Remove(src)
|
||||
|
||||
for(var/zone/Z in zones)
|
||||
if(Z.air == air && Z != src)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -86,11 +85,9 @@ turf
|
||||
return 1
|
||||
|
||||
|
||||
var/global/datum/controller/air_system/air_master
|
||||
var/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
|
||||
@@ -147,13 +144,13 @@ datum
|
||||
S.update_air_properties()
|
||||
|
||||
world << {"<font color='red'><b>Geometry initialized in [round(0.1*(world.timeofday-start_time),0.1)] seconds.</b>
|
||||
Total Simulated Turfs: [simulated_turf_count]
|
||||
Total Zones: [zones.len]
|
||||
Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_count]</font>"}
|
||||
Total Simulated Turfs: [simulated_turf_count]
|
||||
Total Zones: [zones.len]
|
||||
Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_count]</font>"}
|
||||
/*
|
||||
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"
|
||||
@@ -183,9 +180,11 @@ datum
|
||||
if(. && T && !T.update_air_properties())
|
||||
. = 0 //If a runtime occured, make sure we can sense it.
|
||||
//message_admins("ZASALERT: Unable run turf/simualted/update_air_properties()")
|
||||
if(.)
|
||||
tiles_to_update = list()
|
||||
|
||||
//Check sanity on connection objects.
|
||||
if(.)
|
||||
tick_progress = "connections_to_check"
|
||||
if(connections_to_check.len)
|
||||
for(var/connection/C in connections_to_check)
|
||||
@@ -193,6 +192,7 @@ datum
|
||||
connections_to_check = list()
|
||||
|
||||
//Ensure tiles still have zones.
|
||||
if(.)
|
||||
tick_progress = "tiles_to_reconsider_zones"
|
||||
if(tiles_to_reconsider_zones.len)
|
||||
for(var/turf/simulated/T in tiles_to_reconsider_zones)
|
||||
@@ -201,6 +201,7 @@ datum
|
||||
tiles_to_reconsider_zones = list()
|
||||
|
||||
//Process zones.
|
||||
if(.)
|
||||
tick_progress = "zone/process()"
|
||||
for(var/zone/Z in zones)
|
||||
if(Z.last_update < current_cycle)
|
||||
@@ -210,9 +211,11 @@ datum
|
||||
if(. && Z && !output)
|
||||
. = 0
|
||||
//Process fires.
|
||||
if(.)
|
||||
tick_progress = "active_hotspots (fire)"
|
||||
for(var/obj/fire/F in active_hotspots)
|
||||
if(. && F && !F.process())
|
||||
. = 0
|
||||
|
||||
if(.)
|
||||
tick_progress = "success"
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,75 +1,81 @@
|
||||
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."
|
||||
|
||||
var/connection_insulation = 0.4
|
||||
var/connection_insulation_NAME = "Connections - Insulation"
|
||||
var/connection_insulation_DESC = "How insulative a connection is, in terms of heat transfer. 1 is perfectly insulative, and 0 is perfectly conductive."
|
||||
|
||||
var/connection_temperature_delta = 10
|
||||
var/connection_temperature_delta_NAME = "Connections - Temperature Difference"
|
||||
var/connection_temperature_delta_DESC = "The smallest temperature difference which will cause heat to travel through doors."
|
||||
|
||||
|
||||
vs_control
|
||||
var
|
||||
list/settings = list()
|
||||
list/bitflags = list("1","2","4","8","16","32","64","128","256","512","1024")
|
||||
pl_control/plc = 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()
|
||||
|
||||
New()
|
||||
/vs_control/New()
|
||||
. = ..()
|
||||
settings = vars.Copy()
|
||||
|
||||
@@ -85,7 +91,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 +110,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 +170,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 +183,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 +289,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 +304,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"]))
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -2,27 +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"
|
||||
|
||||
// To make sure you're not spammed to death by airflow sound effects
|
||||
tmp/playsound_cooldown = 0
|
||||
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))
|
||||
@@ -41,14 +36,13 @@ zone
|
||||
//Generate the gas_mixture for use in txhis zone by using the average of the gases
|
||||
//defined at startup.
|
||||
air = new
|
||||
var/members = contents.len
|
||||
for(var/turf/simulated/T in contents)
|
||||
air.oxygen += T.oxygen / members
|
||||
air.nitrogen += T.nitrogen / members
|
||||
air.carbon_dioxide += T.carbon_dioxide / members
|
||||
air.toxins += T.toxins / members
|
||||
air.temperature += T.temperature / members
|
||||
air.group_multiplier = contents.len
|
||||
for(var/turf/simulated/T in contents)
|
||||
air.oxygen += T.oxygen / air.group_multiplier
|
||||
air.nitrogen += T.nitrogen / air.group_multiplier
|
||||
air.carbon_dioxide += T.carbon_dioxide / air.group_multiplier
|
||||
air.toxins += T.toxins / air.group_multiplier
|
||||
air.temperature += T.temperature / air.group_multiplier
|
||||
air.update_values()
|
||||
|
||||
//Add this zone to the global list.
|
||||
@@ -56,7 +50,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)
|
||||
@@ -72,7 +66,7 @@ zone
|
||||
|
||||
|
||||
//Handles deletion via garbage collection.
|
||||
proc/SoftDelete()
|
||||
/zone/proc/SoftDelete()
|
||||
zones.Remove(src)
|
||||
air = null
|
||||
|
||||
@@ -85,14 +79,17 @@ zone
|
||||
for(var/zone/Z in connected_zones)
|
||||
if(src in Z.connected_zones)
|
||||
Z.connected_zones.Remove(src)
|
||||
connected_zones = null
|
||||
|
||||
for(var/connection/C in connections)
|
||||
air_master.connections_to_check += C
|
||||
connections = null
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
//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)
|
||||
@@ -111,7 +108,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))
|
||||
@@ -132,7 +129,7 @@ zone
|
||||
|
||||
#define QUANTIZE(variable) (round(variable,0.0001))
|
||||
|
||||
zone/proc/process()
|
||||
/zone/proc/process()
|
||||
. = 1
|
||||
|
||||
progress = "problem with: SoftDelete()"
|
||||
@@ -151,7 +148,7 @@ zone/proc/process()
|
||||
if(!contents.len) //If we got soft deleted.
|
||||
return
|
||||
|
||||
progress = "problem with: air.adjust()"
|
||||
progress = "problem with: air regeneration"
|
||||
|
||||
//Sometimes explosions will cause the air to be deleted for some reason.
|
||||
if(!air)
|
||||
@@ -162,36 +159,23 @@ zone/proc/process()
|
||||
air.total_moles()
|
||||
world.log << "Air object lost in zone. Regenerating."
|
||||
|
||||
progress = "problem with: ShareSpace()"
|
||||
|
||||
progress = "problem with: ShareSpace()"
|
||||
|
||||
if(unsimulated_tiles)
|
||||
if(locate(/turf/simulated) in unsimulated_tiles)
|
||||
for(var/turf/simulated/T in unsimulated_tiles)
|
||||
RemoveTurf(T)
|
||||
if(unsimulated_tiles)
|
||||
unsimulated_tiles -= T
|
||||
|
||||
if(unsimulated_tiles.len)
|
||||
var/moved_air = ShareSpace(air,unsimulated_tiles)
|
||||
|
||||
// Only play a sound effect every once in a while
|
||||
if(playsound_cooldown <= world.time)
|
||||
// Play a nice sound effect at one of the bordering turfs
|
||||
|
||||
playsound_cooldown = world.time + rand(30, 70)
|
||||
|
||||
var/turf/random_border = pick(contents)
|
||||
play_wind_sound(random_border, abs(moved_air))
|
||||
|
||||
if(moved_air > vsc.airflow_lightest_pressure)
|
||||
AirflowSpace(src)
|
||||
|
||||
progress = "problem with: air.react()"
|
||||
|
||||
//React the air here.
|
||||
//Handled by fire, no need for this.
|
||||
// air.react(null,0)
|
||||
else
|
||||
unsimulated_tiles = null
|
||||
|
||||
//Check the graphic.
|
||||
|
||||
progress = "problem with: modifying turf graphics"
|
||||
|
||||
air.graphic = 0
|
||||
@@ -246,12 +230,13 @@ zone/proc/process()
|
||||
//Check if the connection is valid first.
|
||||
if(!C.Cleanup())
|
||||
continue
|
||||
|
||||
//Do merging if conditions are met. Specifically, if there's a non-door connection
|
||||
//to somewhere with space, the zones are merged regardless of equilibrium, to speed
|
||||
//up spacing in areas with double-plated windows.
|
||||
if(C && C.A.zone && C.B.zone)
|
||||
//indirect = 2 is a direct connection.
|
||||
if(C.indirect == 2 )
|
||||
if( C.indirect == 2 )
|
||||
if(C.A.zone.air.compare(C.B.zone.air) || unsimulated_tiles)
|
||||
ZMerge(C.A.zone,C.B.zone)
|
||||
|
||||
@@ -259,18 +244,13 @@ zone/proc/process()
|
||||
|
||||
//Share some
|
||||
for(var/zone/Z in connected_zones)
|
||||
//If that zone has already processed, skip it.
|
||||
if(Z.last_update > last_update)
|
||||
continue
|
||||
|
||||
if(air && Z.air)
|
||||
//Ensure we're not doing pointless calculations on equilibrium zones.
|
||||
var/moles_delta = abs(air.total_moles() - Z.air.total_moles())
|
||||
if(moles_delta > 0.1)
|
||||
// Only play a sound effect every once in a while
|
||||
if(playsound_cooldown <= world.time)
|
||||
// Play a nice sound effect at one of the bordering turfs
|
||||
|
||||
playsound_cooldown = world.time + rand(30, 70)
|
||||
|
||||
var/turf/random_border = pick(contents)
|
||||
play_wind_sound(random_border, abs(moles_delta))
|
||||
if(moles_delta > 0.1 || abs(air.temperature - Z.air.temperature) > 0.1)
|
||||
if(abs(Z.air.return_pressure() - air.return_pressure()) > vsc.airflow_lightest_pressure)
|
||||
Airflow(src,Z)
|
||||
@@ -284,7 +264,7 @@ zone/proc/process()
|
||||
|
||||
for(var/zone/Z in closed_connection_zones)
|
||||
if(air && Z.air)
|
||||
if( abs(air.temperature - Z.air.temperature) > 10 )
|
||||
if( abs(air.temperature - Z.air.temperature) > vsc.connection_temperature_delta )
|
||||
ShareHeat(air, Z.air, closed_connection_zones[Z])
|
||||
|
||||
progress = "all components completed successfully, the problem is not here"
|
||||
@@ -293,7 +273,7 @@ zone/proc/process()
|
||||
//Air Movement//
|
||||
////////////////
|
||||
|
||||
var/list/sharing_lookup_table = list(0.15, 0.20, 0.24, 0.27, 0.30, 0.33)
|
||||
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)
|
||||
//Shares a specific ratio of gas between mixtures using simple weighted averages.
|
||||
@@ -423,7 +403,9 @@ proc/ShareSpace(datum/gas_mixture/A, list/unsimulated_tiles, dbg_output)
|
||||
|
||||
if(sharing_lookup_table.len >= unsimulated_tiles.len) //6 or more interconnecting tiles will max at 42% of air moved per tick.
|
||||
ratio = sharing_lookup_table[unsimulated_tiles.len]
|
||||
ratio *= 2
|
||||
|
||||
//We need to adjust it to account for the insulation settings.
|
||||
ratio *= 1 - vsc.connection_insulation
|
||||
|
||||
A.oxygen = max(0, (A.oxygen - oxy_avg) * (1 - ratio) + oxy_avg )
|
||||
A.nitrogen = max(0, (A.nitrogen - nit_avg) * (1 - ratio) + nit_avg )
|
||||
@@ -543,22 +525,6 @@ zone/proc/Rebuild()
|
||||
if(istype(T) && T.zone && S.CanPass(null, T, 0, 0))
|
||||
T.zone.AddTurf(S)
|
||||
|
||||
|
||||
proc/play_wind_sound(var/turf/random_border, var/n)
|
||||
if(random_border)
|
||||
var/windsound = 'sound/effects/wind/wind_2_1.ogg'
|
||||
switch(n)
|
||||
if(31 to 40)
|
||||
windsound = pick('sound/effects/wind/wind_2_1.ogg', 'sound/effects/wind/wind_2_2.ogg')
|
||||
if(41 to 50)
|
||||
windsound = pick('sound/effects/wind/wind_3_1.ogg')
|
||||
if(51 to 60)
|
||||
windsound = pick('sound/effects/wind/wind_4_1.ogg', 'sound/effects/wind/wind_4_2.ogg')
|
||||
if(61 to 1000000)
|
||||
windsound = pick('sound/effects/wind/wind_5_1.ogg')
|
||||
|
||||
playsound(random_border, windsound, 50, 1, 1)
|
||||
|
||||
//UNUSED
|
||||
/*
|
||||
zone/proc/connected_zones()
|
||||
|
||||
@@ -132,12 +132,12 @@ datum/controller/game_controller/proc/process()
|
||||
//src.set_debug_state("Air Master")
|
||||
|
||||
air_master.current_cycle++
|
||||
var/success = air_master.tick() //Changed so that a runtime does not crash the ticker.
|
||||
if(!success) //Runtimed.
|
||||
if(!air_master.tick()) //Runtimed.
|
||||
air_master.failed_ticks++
|
||||
if(air_master.failed_ticks > 5)
|
||||
world << "<font color='red'><b>RUNTIMES IN ATMOS TICKER. Killing air simulation!</font></b>"
|
||||
message_admins("ZASALERT: unable run [air_master.tick_progress], tell someone about this!")
|
||||
world.log << "### ZAS SHUTDOWN"
|
||||
message_admins("ZASALERT: unable to run [air_master.tick_progress], shutting down!")
|
||||
log_admin("ZASALERT: unable run zone/process() -- [air_master.tick_progress]")
|
||||
air_processing_killed = 1
|
||||
air_master.failed_ticks = 0
|
||||
|
||||
@@ -49,7 +49,8 @@
|
||||
/obj/item/robot_parts/robot_component/radio,
|
||||
/obj/item/robot_parts/robot_component/actuator,
|
||||
/obj/item/robot_parts/robot_component/diagnosis_unit,
|
||||
/obj/item/robot_parts/robot_component/camera
|
||||
/obj/item/robot_parts/robot_component/camera,
|
||||
/obj/item/robot_parts/robot_component/armour
|
||||
),
|
||||
"Ripley"=list(
|
||||
/obj/item/mecha_parts/chassis/ripley,
|
||||
|
||||
@@ -77,7 +77,9 @@ mob/living/carbon/proc/handle_hallucinations()
|
||||
halitem.name = "Flashbang"
|
||||
if(client) client.screen += halitem
|
||||
spawn(rand(100,250))
|
||||
del halitem
|
||||
if(client)
|
||||
client.screen -= halitem
|
||||
halitem = null
|
||||
if(26 to 40)
|
||||
//Flashes of danger
|
||||
//src << "Danger Flash"
|
||||
|
||||
@@ -998,7 +998,7 @@
|
||||
sleeping = max(sleeping-1, 0)
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
if( prob(10) && health && !hal_crit )
|
||||
if( prob(2) && health && !hal_crit )
|
||||
spawn(0)
|
||||
emote("snore")
|
||||
else if(resting)
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\red [user]'s hand slips, tearing blood vessals and causing massive bleeding in [target]'s [affected.display_name] with the \[tool]!", \
|
||||
user.visible_message("\red [user]'s hand slips, tearing blood vessals and causing massive bleeding in [target]'s [affected.display_name] with \the [tool]!", \
|
||||
"\red Your hand slips, tearing blood vessels and causing massive bleeding in [target]'s [affected.display_name] with \the [tool]!",)
|
||||
affected.createwound(CUT, 10)
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
return ..() && affected.open < 2 && !(affected.status & ORGAN_BLEEDING)
|
||||
return ..() && affected.open == 1 && !(affected.status & ORGAN_BLEEDING)
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
@@ -627,7 +627,7 @@ var/list/TAGGERLOCATIONS = list("Disposals",
|
||||
#define CHAT_LOOC 4096
|
||||
|
||||
|
||||
#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_ATTACKLOGS)
|
||||
#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_ATTACKLOGS|CHAT_LOOC)
|
||||
|
||||
#define BE_TRAITOR 1
|
||||
#define BE_OPERATIVE 2
|
||||
|
||||
Reference in New Issue
Block a user