mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-15 12:43:13 +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)
|
if(M) M.GotoAirflowDest(n/10)
|
||||||
//Sometimes shit breaks, and M isn't there after the spawn.
|
//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_dest) return
|
||||||
if(airflow_speed < 0) return
|
if(airflow_speed < 0) return
|
||||||
if(last_airflow > world.time - vsc.airflow_delay) return
|
if(last_airflow > world.time - vsc.airflow_delay) return
|
||||||
@@ -296,7 +296,7 @@ atom/movable
|
|||||||
density = 0
|
density = 0
|
||||||
|
|
||||||
|
|
||||||
proc/RepelAirflowDest(n)
|
/atom/movable/proc/RepelAirflowDest(n)
|
||||||
if(!airflow_dest) return
|
if(!airflow_dest) return
|
||||||
if(airflow_speed < 0) return
|
if(airflow_speed < 0) return
|
||||||
if(last_airflow > world.time - vsc.airflow_delay) return
|
if(last_airflow > world.time - vsc.airflow_delay) return
|
||||||
@@ -354,7 +354,7 @@ atom/movable
|
|||||||
if(od)
|
if(od)
|
||||||
density = 0
|
density = 0
|
||||||
|
|
||||||
Bump(atom/A)
|
/atom/movable/Bump(atom/A)
|
||||||
if(airflow_speed > 0 && airflow_dest)
|
if(airflow_speed > 0 && airflow_dest)
|
||||||
airflow_hit(A)
|
airflow_hit(A)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -6,23 +6,25 @@ Indirect connections will not merge the two zones after they reach equilibrium.
|
|||||||
#define CONNECTION_INDIRECT 1
|
#define CONNECTION_INDIRECT 1
|
||||||
#define CONNECTION_CLOSED 0
|
#define CONNECTION_CLOSED 0
|
||||||
|
|
||||||
|
/connection
|
||||||
|
var/turf/simulated/A
|
||||||
|
var/turf/simulated/B
|
||||||
|
|
||||||
connection
|
var/zone/zone_A
|
||||||
var
|
var/zone/zone_B
|
||||||
turf/simulated //The turfs involved in the connection.
|
|
||||||
A
|
var/ref_A
|
||||||
B
|
var/ref_B
|
||||||
zone
|
|
||||||
zone_A
|
var/indirect = CONNECTION_DIRECT //If the connection is purely indirect, the zones should not join.
|
||||||
zone_B
|
|
||||||
ref_A
|
var/last_updated //The tick at which this was last updated.
|
||||||
ref_B
|
|
||||||
indirect = CONNECTION_DIRECT //If the connection is purely indirect, the zones should not join.
|
var/no_zone_count = 0
|
||||||
last_updated //The tick at which this was last updated.
|
|
||||||
no_zone_count = 0
|
|
||||||
|
|
||||||
|
|
||||||
New(turf/T,turf/O)
|
|
||||||
|
/connection/New(turf/T,turf/O)
|
||||||
A = T
|
A = T
|
||||||
B = O
|
B = O
|
||||||
if(A.zone && B.zone)
|
if(A.zone && B.zone)
|
||||||
@@ -65,7 +67,7 @@ connection
|
|||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
|
|
||||||
Del()
|
/connection/Del()
|
||||||
//remove connections from master lists.
|
//remove connections from master lists.
|
||||||
if(ref_B in air_master.turfs_with_connections)
|
if(ref_B in air_master.turfs_with_connections)
|
||||||
var/list/connections = air_master.turfs_with_connections[ref_B]
|
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
|
//Sanity checking
|
||||||
if(!istype(zone_1) || !istype(zone_2))
|
if(!istype(zone_1) || !istype(zone_2))
|
||||||
@@ -162,8 +164,7 @@ connection
|
|||||||
zone_2.closed_connection_zones[zone_1] = 1
|
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
|
//Sanity checking
|
||||||
if(!istype(zone_1) || !istype(zone_2))
|
if(!istype(zone_1) || !istype(zone_2))
|
||||||
return
|
return
|
||||||
@@ -217,7 +218,7 @@ connection
|
|||||||
zone_2.closed_connection_zones = null
|
zone_2.closed_connection_zones = null
|
||||||
|
|
||||||
|
|
||||||
proc/Cleanup()
|
/connection/proc/Cleanup()
|
||||||
|
|
||||||
//Check sanity: existance of turfs
|
//Check sanity: existance of turfs
|
||||||
if(!A || !B)
|
if(!A || !B)
|
||||||
@@ -246,7 +247,7 @@ connection
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
proc/CheckPassSanity()
|
/connection/proc/CheckPassSanity()
|
||||||
//Sanity check, first.
|
//Sanity check, first.
|
||||||
Cleanup()
|
Cleanup()
|
||||||
|
|
||||||
@@ -279,7 +280,7 @@ connection
|
|||||||
else
|
else
|
||||||
del src
|
del src
|
||||||
|
|
||||||
proc/Sanitize()
|
/connection/proc/Sanitize()
|
||||||
//If the zones change on connected turfs, update it.
|
//If the zones change on connected turfs, update it.
|
||||||
|
|
||||||
//Both zones changed (wat)
|
//Both zones changed (wat)
|
||||||
@@ -366,6 +367,7 @@ connection
|
|||||||
if(zone_A && zone_B)
|
if(zone_A && zone_B)
|
||||||
DisconnectZones(zone_A, zone_B)
|
DisconnectZones(zone_A, zone_B)
|
||||||
ConnectZones(A.zone, B.zone, indirect)
|
ConnectZones(A.zone, B.zone, indirect)
|
||||||
|
zone_A = A.zone
|
||||||
|
|
||||||
//The "B" zone changed.
|
//The "B" zone changed.
|
||||||
else if(B.zone && B.zone != zone_B)
|
else if(B.zone && B.zone != zone_B)
|
||||||
@@ -393,6 +395,7 @@ connection
|
|||||||
if(zone_A && zone_B)
|
if(zone_A && zone_B)
|
||||||
DisconnectZones(zone_A, zone_B)
|
DisconnectZones(zone_A, zone_B)
|
||||||
ConnectZones(A.zone, B.zone, indirect)
|
ConnectZones(A.zone, B.zone, indirect)
|
||||||
|
zone_B = B.zone
|
||||||
|
|
||||||
|
|
||||||
#undef CONNECTION_DIRECT
|
#undef CONNECTION_DIRECT
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ client/proc/Zone_Info(turf/T as null|turf)
|
|||||||
mob << "No zone here."
|
mob << "No zone here."
|
||||||
else
|
else
|
||||||
if(zone_debug_images)
|
if(zone_debug_images)
|
||||||
images -= zone_debug_images
|
for(var/zone in zone_debug_images)
|
||||||
|
images -= zone_debug_images[zone]
|
||||||
zone_debug_images = null
|
zone_debug_images = null
|
||||||
|
|
||||||
client/var/list/zone_debug_images
|
client/var/list/zone_debug_images
|
||||||
@@ -23,12 +24,12 @@ client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf)
|
|||||||
"South" = SOUTH,\
|
"South" = SOUTH,\
|
||||||
"East" = EAST,\
|
"East" = EAST,\
|
||||||
"West" = WEST,\
|
"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
|
var/direction = input("What direction do you wish to test?","Set direction") as null|anything in direction_list
|
||||||
if(!direction)
|
if(!direction)
|
||||||
return
|
return
|
||||||
|
|
||||||
if(direction == "None")
|
if(direction == "N/A")
|
||||||
if(T.CanPass(null, T, 0,0))
|
if(T.CanPass(null, T, 0,0))
|
||||||
mob << "The turf can pass air! :D"
|
mob << "The turf can pass air! :D"
|
||||||
else
|
else
|
||||||
@@ -55,8 +56,7 @@ client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf)
|
|||||||
mob << "Both turfs can connect! :)"
|
mob << "Both turfs can connect! :)"
|
||||||
|
|
||||||
|
|
||||||
zone/proc
|
zone/proc/DebugDisplay(client/client)
|
||||||
DebugDisplay(client/client)
|
|
||||||
if(!istype(client))
|
if(!istype(client))
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -65,11 +65,14 @@ zone/proc
|
|||||||
|
|
||||||
if(!client.zone_debug_images)
|
if(!client.zone_debug_images)
|
||||||
client.zone_debug_images = list()
|
client.zone_debug_images = list()
|
||||||
|
|
||||||
|
var/list/current_zone_images = list()
|
||||||
|
|
||||||
for(var/turf/T in contents)
|
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)
|
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 << "<u>Zone Air Contents</u>"
|
||||||
client << "Oxygen: [air.oxygen]"
|
client << "Oxygen: [air.oxygen]"
|
||||||
@@ -86,8 +89,8 @@ zone/proc
|
|||||||
|
|
||||||
for(var/connection/C in connections)
|
for(var/connection/C in connections)
|
||||||
client << "\ref[C] [C.A] --> [C.B] [(C.indirect?"Open":"Closed")]"
|
client << "\ref[C] [C.A] --> [C.B] [(C.indirect?"Open":"Closed")]"
|
||||||
client.zone_debug_images += image('debug_connect.dmi', C.A)
|
current_zone_images += image('debug_connect.dmi', C.A, null, TURF_LAYER)
|
||||||
client.zone_debug_images += image('debug_connect.dmi', C.B)
|
current_zone_images += image('debug_connect.dmi', C.B, null, TURF_LAYER)
|
||||||
|
|
||||||
client << "Connected Zones:"
|
client << "Connected Zones:"
|
||||||
for(var/zone/zone in connected_zones)
|
for(var/zone/zone in connected_zones)
|
||||||
@@ -100,13 +103,17 @@ zone/proc
|
|||||||
if(!istype(C,/connection))
|
if(!istype(C,/connection))
|
||||||
client << "[C] (Not 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
|
else
|
||||||
dbg_output = 0
|
dbg_output = 0
|
||||||
|
|
||||||
client.images -= client.zone_debug_images
|
client.images -= client.zone_debug_images[src]
|
||||||
client.zone_debug_images = null
|
client.zone_debug_images.Remove(src)
|
||||||
|
|
||||||
for(var/zone/Z in zones)
|
for(var/zone/Z in zones)
|
||||||
if(Z.air == air && Z != src)
|
if(Z.air == air && Z != src)
|
||||||
|
|||||||
@@ -14,58 +14,53 @@ What are the archived variables for?
|
|||||||
#define QUANTIZE(variable) (round(variable,0.0001))
|
#define QUANTIZE(variable) (round(variable,0.0001))
|
||||||
#define TRANSFER_FRACTION 5 //What fraction (1/#) of the air difference to try and transfer
|
#define TRANSFER_FRACTION 5 //What fraction (1/#) of the air difference to try and transfer
|
||||||
|
|
||||||
datum
|
/datum/gas/sleeping_agent/specific_heat = 40 //These are used for the "Trace Gases" stuff, but is buggy.
|
||||||
gas //These are used for the "Trace Gases" stuff, but is buggy.
|
|
||||||
sleeping_agent
|
|
||||||
specific_heat = 40
|
|
||||||
|
|
||||||
oxygen_agent_b
|
/datum/gas/oxygen_agent_b/specific_heat = 300
|
||||||
specific_heat = 300
|
|
||||||
|
|
||||||
volatile_fuel
|
/datum/gas/volatile_fuel/specific_heat = 30
|
||||||
specific_heat = 30
|
|
||||||
|
|
||||||
var
|
/datum/gas
|
||||||
moles = 0
|
var/moles = 0
|
||||||
specific_heat = 0
|
|
||||||
|
|
||||||
moles_archived = 0
|
var/specific_heat = 0
|
||||||
|
|
||||||
gas_mixture
|
var/moles_archived = 0
|
||||||
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.
|
|
||||||
|
|
||||||
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.
|
//Size of the group this gas_mixture is representing.
|
||||||
//=1 for singletons
|
//=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
|
var/tmp/oxygen_archived //These are variables for use with the archived data
|
||||||
oxygen_archived
|
var/tmp/carbon_dioxide_archived
|
||||||
carbon_dioxide_archived
|
var/tmp/nitrogen_archived
|
||||||
nitrogen_archived
|
var/tmp/toxins_archived
|
||||||
toxins_archived
|
|
||||||
|
|
||||||
temperature_archived
|
var/tmp/temperature_archived
|
||||||
|
|
||||||
graphic_archived = 0
|
var/tmp/graphic_archived = 0
|
||||||
fuel_burnt = 0
|
var/tmp/fuel_burnt = 0
|
||||||
|
|
||||||
//FOR THE LOVE OF GOD PLEASE USE THIS PROC
|
//FOR THE LOVE OF GOD PLEASE USE THIS PROC
|
||||||
//Call it with negative numbers to remove gases.
|
//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
|
//Purpose: Adjusting the gases within a airmix
|
||||||
//Called by: Nothing, yet!
|
//Called by: Nothing, yet!
|
||||||
//Inputs: The values of the gases to adjust
|
//Inputs: The values of the gases to adjust
|
||||||
@@ -87,23 +82,22 @@ datum
|
|||||||
return
|
return
|
||||||
|
|
||||||
//tg seems to like using these a lot
|
//tg seems to like using these a lot
|
||||||
proc/return_temperature()
|
/datum/gas_mixture/proc/return_temperature()
|
||||||
return temperature
|
return temperature
|
||||||
|
|
||||||
|
|
||||||
proc/return_volume()
|
/datum/gas_mixture/proc/return_volume()
|
||||||
return max(0, volume)
|
return max(0, volume)
|
||||||
|
|
||||||
|
|
||||||
proc/thermal_energy()
|
/datum/gas_mixture/proc/thermal_energy()
|
||||||
return temperature*heat_capacity()
|
return temperature*heat_capacity()
|
||||||
|
|
||||||
///////////////////////////////
|
///////////////////////////////
|
||||||
//PV=nRT - related procedures//
|
//PV=nRT - related procedures//
|
||||||
///////////////////////////////
|
///////////////////////////////
|
||||||
|
|
||||||
|
/datum/gas_mixture/proc/heat_capacity()
|
||||||
proc/heat_capacity()
|
|
||||||
//Purpose: Returning the heat capacity of the gas mix
|
//Purpose: Returning the heat capacity of the gas mix
|
||||||
//Called by: UNKNOWN
|
//Called by: UNKNOWN
|
||||||
//Inputs: None
|
//Inputs: None
|
||||||
@@ -117,7 +111,7 @@ datum
|
|||||||
|
|
||||||
return max(MINIMUM_HEAT_CAPACITY,heat_capacity)
|
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
|
//Purpose: Returning the archived heat capacity of the gas mix
|
||||||
//Called by: UNKNOWN
|
//Called by: UNKNOWN
|
||||||
//Inputs: None
|
//Inputs: None
|
||||||
@@ -131,7 +125,7 @@ datum
|
|||||||
|
|
||||||
return max(MINIMUM_HEAT_CAPACITY,heat_capacity_archived)
|
return max(MINIMUM_HEAT_CAPACITY,heat_capacity_archived)
|
||||||
|
|
||||||
proc/total_moles()
|
/datum/gas_mixture/proc/total_moles()
|
||||||
return total_moles
|
return total_moles
|
||||||
/*var/moles = oxygen + carbon_dioxide + nitrogen + toxins
|
/*var/moles = oxygen + carbon_dioxide + nitrogen + toxins
|
||||||
|
|
||||||
@@ -140,7 +134,7 @@ datum
|
|||||||
moles += trace_gas.moles
|
moles += trace_gas.moles
|
||||||
return moles*/
|
return moles*/
|
||||||
|
|
||||||
proc/return_pressure()
|
/datum/gas_mixture/proc/return_pressure()
|
||||||
//Purpose: Calculating Current Pressure
|
//Purpose: Calculating Current Pressure
|
||||||
//Called by:
|
//Called by:
|
||||||
//Inputs: None
|
//Inputs: None
|
||||||
@@ -171,7 +165,7 @@ datum
|
|||||||
|
|
||||||
// return temperature*heat_capacity()
|
// return temperature*heat_capacity()
|
||||||
|
|
||||||
proc/update_values()
|
/datum/gas_mixture/proc/update_values()
|
||||||
//Purpose: Calculating and storing values which were normally called CONSTANTLY
|
//Purpose: Calculating and storing values which were normally called CONSTANTLY
|
||||||
//Called by: Anything that changes values within a gas mix.
|
//Called by: Anything that changes values within a gas mix.
|
||||||
//Inputs: None
|
//Inputs: None
|
||||||
@@ -189,8 +183,7 @@ datum
|
|||||||
//Procedures used for very specific events//
|
//Procedures used for very specific events//
|
||||||
////////////////////////////////////////////
|
////////////////////////////////////////////
|
||||||
|
|
||||||
|
/datum/gas_mixture/proc/check_tile_graphic()
|
||||||
proc/check_tile_graphic()
|
|
||||||
//Purpose: Calculating the graphic for a tile
|
//Purpose: Calculating the graphic for a tile
|
||||||
//Called by: Turfs updating
|
//Called by: Turfs updating
|
||||||
//Inputs: None
|
//Inputs: None
|
||||||
@@ -208,7 +201,7 @@ datum
|
|||||||
|
|
||||||
return graphic != graphic_archived
|
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
|
//Purpose: Calculating if it is possible for a fire to occur in the airmix
|
||||||
//Called by: Air mixes updating?
|
//Called by: Air mixes updating?
|
||||||
//Inputs: None
|
//Inputs: None
|
||||||
@@ -222,7 +215,7 @@ datum
|
|||||||
|
|
||||||
return reacting
|
return reacting
|
||||||
|
|
||||||
proc/fire()
|
/datum/gas_mixture/proc/fire()
|
||||||
//Purpose: Calculating any fire reactions.
|
//Purpose: Calculating any fire reactions.
|
||||||
//Called by: react() (See above)
|
//Called by: react() (See above)
|
||||||
//Inputs: None
|
//Inputs: None
|
||||||
@@ -288,7 +281,7 @@ datum
|
|||||||
//////////////////////////////////////////////
|
//////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
proc/archive()
|
/datum/gas_mixture/proc/archive()
|
||||||
//Purpose: Archives the current gas values
|
//Purpose: Archives the current gas values
|
||||||
//Called by: UNKNOWN
|
//Called by: UNKNOWN
|
||||||
//Inputs: None
|
//Inputs: None
|
||||||
@@ -309,7 +302,7 @@ datum
|
|||||||
|
|
||||||
return 1
|
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
|
//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)
|
// that group processing is still accurate for source (aborts if not)
|
||||||
//Called by: airgroups/machinery expelling air, ?
|
//Called by: airgroups/machinery expelling air, ?
|
||||||
@@ -334,7 +327,7 @@ datum
|
|||||||
|
|
||||||
return merge(giver)
|
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.
|
//Purpose: Merges all air from giver into self. Deletes giver.
|
||||||
//Called by: Machinery expelling air, check_then_merge, ?
|
//Called by: Machinery expelling air, check_then_merge, ?
|
||||||
//Inputs: The gas to merge.
|
//Inputs: The gas to merge.
|
||||||
@@ -374,7 +367,7 @@ datum
|
|||||||
//del(giver)
|
//del(giver)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
proc/remove(amount)
|
/datum/gas_mixture/proc/remove(amount)
|
||||||
//Purpose: Removes a certain number of moles from the air.
|
//Purpose: Removes a certain number of moles from the air.
|
||||||
//Called by: ?
|
//Called by: ?
|
||||||
//Inputs: How many moles to remove.
|
//Inputs: How many moles to remove.
|
||||||
@@ -412,7 +405,7 @@ datum
|
|||||||
|
|
||||||
return removed
|
return removed
|
||||||
|
|
||||||
proc/remove_ratio(ratio)
|
/datum/gas_mixture/proc/remove_ratio(ratio)
|
||||||
//Purpose: Removes a certain ratio of the air.
|
//Purpose: Removes a certain ratio of the air.
|
||||||
//Called by: ?
|
//Called by: ?
|
||||||
//Inputs: Percentage to remove.
|
//Inputs: Percentage to remove.
|
||||||
@@ -449,7 +442,7 @@ datum
|
|||||||
|
|
||||||
return removed
|
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
|
//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)
|
// that group processing is still accurate for source (aborts if not)
|
||||||
//Called by: ?
|
//Called by: ?
|
||||||
@@ -463,7 +456,7 @@ datum
|
|||||||
|
|
||||||
return remove(amount)
|
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.
|
//Purpose: Duplicates the sample air mixture.
|
||||||
//Called by: airgroups splitting, ?
|
//Called by: airgroups splitting, ?
|
||||||
//Inputs: Gas to copy
|
//Inputs: Gas to copy
|
||||||
@@ -487,7 +480,7 @@ datum
|
|||||||
|
|
||||||
return 1
|
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.
|
//Purpose: Telling if one or both airgroups needs to disable group processing.
|
||||||
//Called by: Airgroups sharing air, checking if group processing needs disabled.
|
//Called by: Airgroups sharing air, checking if group processing needs disabled.
|
||||||
//Inputs: Gas to compare from other airgroup
|
//Inputs: Gas to compare from other airgroup
|
||||||
@@ -547,7 +540,7 @@ datum
|
|||||||
|
|
||||||
return 1
|
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.
|
//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
|
//Called by: Sharing air (mimicing) with adjacent unsimulated turfs
|
||||||
//Inputs: Unsimulated turf
|
//Inputs: Unsimulated turf
|
||||||
@@ -575,7 +568,7 @@ datum
|
|||||||
|
|
||||||
return 1
|
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
|
//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)
|
// (Two directional, if the other tile is more pressurised, air travels to current tile)
|
||||||
//Called by: Sharing air with adjacent simulated turfs
|
//Called by: Sharing air with adjacent simulated turfs
|
||||||
@@ -726,7 +719,7 @@ datum
|
|||||||
else
|
else
|
||||||
return 0
|
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.
|
//Purpose: Used transfer gas from a more pressurised tile to a less presurised unsimulated tile.
|
||||||
//Called by: "sharing" from unsimulated to simulated turfs.
|
//Called by: "sharing" from unsimulated to simulated turfs.
|
||||||
//Inputs: Unsimulated turf, Multiplier for gas transfer (optional)
|
//Inputs: Unsimulated turf, Multiplier for gas transfer (optional)
|
||||||
@@ -809,7 +802,7 @@ datum
|
|||||||
else
|
else
|
||||||
return 0
|
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/delta_temperature = (temperature_archived - sharer.temperature_archived)
|
||||||
|
|
||||||
var/self_heat_capacity = heat_capacity_archived()
|
var/self_heat_capacity = heat_capacity_archived()
|
||||||
@@ -841,7 +834,7 @@ datum
|
|||||||
return 1
|
return 1
|
||||||
//Logic integrated from: temperature_share(sharer, conduction_coefficient) for efficiency
|
//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/delta_temperature = (temperature_archived - sharer.temperature_archived)
|
||||||
|
|
||||||
var/self_heat_capacity = heat_capacity_archived()
|
var/self_heat_capacity = heat_capacity_archived()
|
||||||
@@ -869,7 +862,7 @@ datum
|
|||||||
return 1
|
return 1
|
||||||
//Logic integrated from: temperature_share(sharer, conduction_coefficient) for efficiency
|
//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/delta_temperature = (temperature_archived - sharer.temperature)
|
||||||
|
|
||||||
var/self_temperature_delta = 0
|
var/self_temperature_delta = 0
|
||||||
@@ -897,7 +890,7 @@ datum
|
|||||||
return 1
|
return 1
|
||||||
//Logic integrated from: temperature_turf_share(sharer, conduction_coefficient) for efficiency
|
//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/delta_temperature = (temperature_archived - model.temperature)
|
||||||
var/self_temperature_delta = 0
|
var/self_temperature_delta = 0
|
||||||
|
|
||||||
@@ -919,8 +912,7 @@ datum
|
|||||||
return 1
|
return 1
|
||||||
//Logic integrated from: temperature_mimic(model, conduction_coefficient) for efficiency
|
//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)
|
var/delta_temperature = (temperature_archived - sharer.temperature_archived)
|
||||||
if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
|
if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
|
||||||
var/self_heat_capacity = heat_capacity_archived()
|
var/self_heat_capacity = heat_capacity_archived()
|
||||||
@@ -936,7 +928,7 @@ datum
|
|||||||
temperature -= heat/(self_heat_capacity*group_multiplier)
|
temperature -= heat/(self_heat_capacity*group_multiplier)
|
||||||
sharer.temperature += heat/(sharer_heat_capacity*sharer.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)
|
var/delta_temperature = (temperature - model.temperature)
|
||||||
if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
|
if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
|
||||||
var/self_heat_capacity = heat_capacity()//_archived()
|
var/self_heat_capacity = heat_capacity()//_archived()
|
||||||
@@ -953,7 +945,7 @@ datum
|
|||||||
else
|
else
|
||||||
temperature -= heat/(self_heat_capacity*group_multiplier)
|
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)
|
var/delta_temperature = (temperature_archived - sharer.temperature)
|
||||||
if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
|
if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
|
||||||
var/self_heat_capacity = heat_capacity()
|
var/self_heat_capacity = heat_capacity()
|
||||||
@@ -965,7 +957,7 @@ datum
|
|||||||
temperature -= heat/(self_heat_capacity*group_multiplier)
|
temperature -= heat/(self_heat_capacity*group_multiplier)
|
||||||
sharer.temperature += heat/sharer.heat_capacity
|
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
|
//Purpose: Compares sample to self to see if within acceptable ranges that group processing may be enabled
|
||||||
//Called by: Airgroups trying to rebuild
|
//Called by: Airgroups trying to rebuild
|
||||||
//Inputs: Gas mix to compare
|
//Inputs: Gas mix to compare
|
||||||
@@ -1014,8 +1006,7 @@ datum
|
|||||||
return 0
|
return 0
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
/datum/gas_mixture/proc/subtract(datum/gas_mixture/right_side)
|
||||||
proc/subtract(datum/gas_mixture/right_side)
|
|
||||||
//Purpose: Subtracts right_side from air_mixture. Used to help turfs mingle
|
//Purpose: Subtracts right_side from air_mixture. Used to help turfs mingle
|
||||||
//Called by: Pipelines ending in a break (or something)
|
//Called by: Pipelines ending in a break (or something)
|
||||||
//Inputs: Gas mix to remove
|
//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)
|
return (!density || !height || air_group)
|
||||||
|
|
||||||
turf
|
/turf/CanPass(atom/movable/mover, turf/target, height=1.5,air_group=0)
|
||||||
CanPass(atom/movable/mover, turf/target, height=1.5,air_group=0)
|
|
||||||
if(!target) return 0
|
if(!target) return 0
|
||||||
|
|
||||||
if(istype(mover)) // turf/Enter(...) will perform more advanced checks
|
if(istype(mover)) // turf/Enter(...) will perform more advanced checks
|
||||||
@@ -86,11 +85,9 @@ turf
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
var/global/datum/controller/air_system/air_master
|
var/datum/controller/air_system/air_master
|
||||||
|
|
||||||
datum
|
/datum/controller/air_system/
|
||||||
controller
|
|
||||||
air_system
|
|
||||||
//Geoemetry lists
|
//Geoemetry lists
|
||||||
var/list/turfs_with_connections = list()
|
var/list/turfs_with_connections = list()
|
||||||
var/list/active_hotspots = 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
|
//Purpose: Call this at the start to setup air groups geometry
|
||||||
// (Warning: Very processor intensive but only must be done once per round)
|
// (Warning: Very processor intensive but only must be done once per round)
|
||||||
//Called by: Gameticker/Master controller
|
//Called by: Gameticker/Master controller
|
||||||
@@ -153,7 +150,7 @@ datum
|
|||||||
/*
|
/*
|
||||||
spawn start()
|
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.
|
//Purpose: This is kicked off by the master controller, and controls the processing of all atmosphere.
|
||||||
//Called by: Master controller
|
//Called by: Master controller
|
||||||
//Inputs: None.
|
//Inputs: None.
|
||||||
@@ -174,7 +171,7 @@ datum
|
|||||||
sleep(max(5,update_delay*tick_multiplier))
|
sleep(max(5,update_delay*tick_multiplier))
|
||||||
*/
|
*/
|
||||||
|
|
||||||
proc/tick()
|
/datum/controller/air_system/proc/tick()
|
||||||
. = 1 //Set the default return value, for runtime detection.
|
. = 1 //Set the default return value, for runtime detection.
|
||||||
|
|
||||||
tick_progress = "update_air_properties"
|
tick_progress = "update_air_properties"
|
||||||
@@ -183,9 +180,11 @@ datum
|
|||||||
if(. && T && !T.update_air_properties())
|
if(. && T && !T.update_air_properties())
|
||||||
. = 0 //If a runtime occured, make sure we can sense it.
|
. = 0 //If a runtime occured, make sure we can sense it.
|
||||||
//message_admins("ZASALERT: Unable run turf/simualted/update_air_properties()")
|
//message_admins("ZASALERT: Unable run turf/simualted/update_air_properties()")
|
||||||
|
if(.)
|
||||||
tiles_to_update = list()
|
tiles_to_update = list()
|
||||||
|
|
||||||
//Check sanity on connection objects.
|
//Check sanity on connection objects.
|
||||||
|
if(.)
|
||||||
tick_progress = "connections_to_check"
|
tick_progress = "connections_to_check"
|
||||||
if(connections_to_check.len)
|
if(connections_to_check.len)
|
||||||
for(var/connection/C in connections_to_check)
|
for(var/connection/C in connections_to_check)
|
||||||
@@ -193,6 +192,7 @@ datum
|
|||||||
connections_to_check = list()
|
connections_to_check = list()
|
||||||
|
|
||||||
//Ensure tiles still have zones.
|
//Ensure tiles still have zones.
|
||||||
|
if(.)
|
||||||
tick_progress = "tiles_to_reconsider_zones"
|
tick_progress = "tiles_to_reconsider_zones"
|
||||||
if(tiles_to_reconsider_zones.len)
|
if(tiles_to_reconsider_zones.len)
|
||||||
for(var/turf/simulated/T in tiles_to_reconsider_zones)
|
for(var/turf/simulated/T in tiles_to_reconsider_zones)
|
||||||
@@ -201,6 +201,7 @@ datum
|
|||||||
tiles_to_reconsider_zones = list()
|
tiles_to_reconsider_zones = list()
|
||||||
|
|
||||||
//Process zones.
|
//Process zones.
|
||||||
|
if(.)
|
||||||
tick_progress = "zone/process()"
|
tick_progress = "zone/process()"
|
||||||
for(var/zone/Z in zones)
|
for(var/zone/Z in zones)
|
||||||
if(Z.last_update < current_cycle)
|
if(Z.last_update < current_cycle)
|
||||||
@@ -210,9 +211,11 @@ datum
|
|||||||
if(. && Z && !output)
|
if(. && Z && !output)
|
||||||
. = 0
|
. = 0
|
||||||
//Process fires.
|
//Process fires.
|
||||||
|
if(.)
|
||||||
tick_progress = "active_hotspots (fire)"
|
tick_progress = "active_hotspots (fire)"
|
||||||
for(var/obj/fire/F in active_hotspots)
|
for(var/obj/fire/F in active_hotspots)
|
||||||
if(. && F && !F.process())
|
if(. && F && !F.process())
|
||||||
. = 0
|
. = 0
|
||||||
|
|
||||||
|
if(.)
|
||||||
tick_progress = "success"
|
tick_progress = "success"
|
||||||
@@ -43,8 +43,7 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
|
|||||||
|
|
||||||
return igniting
|
return igniting
|
||||||
|
|
||||||
obj
|
/obj/fire
|
||||||
fire
|
|
||||||
//Icon for fire on turfs.
|
//Icon for fire on turfs.
|
||||||
|
|
||||||
anchored = 1
|
anchored = 1
|
||||||
@@ -57,10 +56,9 @@ obj
|
|||||||
|
|
||||||
layer = TURF_LAYER
|
layer = TURF_LAYER
|
||||||
|
|
||||||
var
|
var/firelevel = 10000 //Calculated by gas_mixture.calculate_firelevel()
|
||||||
firelevel = 10000 //Calculated by gas_mixture.calculate_firelevel()
|
|
||||||
|
|
||||||
process()
|
/obj/fire/process()
|
||||||
. = 1
|
. = 1
|
||||||
|
|
||||||
//get location and check if it is in a proper ZAS zone
|
//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 //////////////////////////////////////////////////////////////////
|
///////////////////////////////// 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))
|
if(!istype(loc, /turf))
|
||||||
@@ -161,7 +159,7 @@ obj
|
|||||||
air_master.active_hotspots.Add(src)
|
air_master.active_hotspots.Add(src)
|
||||||
|
|
||||||
|
|
||||||
Del()
|
/obj/fire/Del()
|
||||||
if (istype(loc, /turf/simulated))
|
if (istype(loc, /turf/simulated))
|
||||||
SetLuminosity(0)
|
SetLuminosity(0)
|
||||||
|
|
||||||
|
|||||||
@@ -1,59 +1,59 @@
|
|||||||
var/image/contamination_overlay = image('icons/effects/contamination.dmi')
|
var/image/contamination_overlay = image('icons/effects/contamination.dmi')
|
||||||
|
|
||||||
pl_control/var
|
/pl_control
|
||||||
PLASMA_DMG = 3
|
var/PLASMA_DMG = 3
|
||||||
PLASMA_DMG_NAME = "Plasma Damage Amount"
|
var/PLASMA_DMG_NAME = "Plasma Damage Amount"
|
||||||
PLASMA_DMG_DESC = "Self Descriptive"
|
var/PLASMA_DMG_DESC = "Self Descriptive"
|
||||||
|
|
||||||
CLOTH_CONTAMINATION = 1
|
var/CLOTH_CONTAMINATION = 1
|
||||||
CLOTH_CONTAMINATION_NAME = "Cloth Contamination"
|
var/CLOTH_CONTAMINATION_NAME = "Cloth Contamination"
|
||||||
CLOTH_CONTAMINATION_DESC = "If this is on, plasma does damage by getting into cloth."
|
var/CLOTH_CONTAMINATION_DESC = "If this is on, plasma does damage by getting into cloth."
|
||||||
|
|
||||||
PLASMAGUARD_ONLY = 0
|
var/PLASMAGUARD_ONLY = 0
|
||||||
PLASMAGUARD_ONLY_NAME = "\"PlasmaGuard Only\""
|
var/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_DESC = "If this is on, only biosuits and spacesuits protect against contamination and ill effects."
|
||||||
|
|
||||||
GENETIC_CORRUPTION = 0
|
var/GENETIC_CORRUPTION = 0
|
||||||
GENETIC_CORRUPTION_NAME = "Genetic Corruption Chance"
|
var/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_DESC = "Chance of genetic corruption as well as toxic damage, X in 10,000."
|
||||||
|
|
||||||
SKIN_BURNS = 0
|
var/SKIN_BURNS = 0
|
||||||
SKIN_BURNS_DESC = "Plasma has an effect similar to mustard gas on the un-suited."
|
var/SKIN_BURNS_DESC = "Plasma has an effect similar to mustard gas on the un-suited."
|
||||||
SKIN_BURNS_NAME = "Skin Burns"
|
var/SKIN_BURNS_NAME = "Skin Burns"
|
||||||
|
|
||||||
EYE_BURNS = 1
|
var/EYE_BURNS = 1
|
||||||
EYE_BURNS_NAME = "Eye Burns"
|
var/EYE_BURNS_NAME = "Eye Burns"
|
||||||
EYE_BURNS_DESC = "Plasma burns the eyes of anyone not wearing eye protection."
|
var/EYE_BURNS_DESC = "Plasma burns the eyes of anyone not wearing eye protection."
|
||||||
|
|
||||||
CONTAMINATION_LOSS = 0.02
|
var/CONTAMINATION_LOSS = 0.02
|
||||||
CONTAMINATION_LOSS_NAME = "Contamination Loss"
|
var/CONTAMINATION_LOSS_NAME = "Contamination Loss"
|
||||||
CONTAMINATION_LOSS_DESC = "How much toxin damage is dealt from contaminated clothing" //Per tick? ASK ARYN
|
var/CONTAMINATION_LOSS_DESC = "How much toxin damage is dealt from contaminated clothing" //Per tick? ASK ARYN
|
||||||
|
|
||||||
PLASMA_HALLUCINATION = 0
|
var/PLASMA_HALLUCINATION = 0
|
||||||
PLASMA_HALLUCINATION_NAME = "Plasma Hallucination"
|
var/PLASMA_HALLUCINATION_NAME = "Plasma Hallucination"
|
||||||
PLASMA_HALLUCINATION_DESC = "Does being in plasma cause you to hallucinate?"
|
var/PLASMA_HALLUCINATION_DESC = "Does being in plasma cause you to hallucinate?"
|
||||||
|
|
||||||
N2O_HALLUCINATION = 1
|
var/N2O_HALLUCINATION = 1
|
||||||
N2O_HALLUCINATION_NAME = "N2O Hallucination"
|
var/N2O_HALLUCINATION_NAME = "N2O Hallucination"
|
||||||
N2O_HALLUCINATION_DESC = "Does being in sleeping gas cause you to hallucinate?"
|
var/N2O_HALLUCINATION_DESC = "Does being in sleeping gas cause you to hallucinate?"
|
||||||
|
|
||||||
|
|
||||||
obj/var/contaminated = 0
|
obj/var/contaminated = 0
|
||||||
|
|
||||||
obj/item/proc
|
|
||||||
can_contaminate()
|
/obj/item/proc/can_contaminate()
|
||||||
//Clothing and backpacks can be contaminated.
|
//Clothing and backpacks can be contaminated.
|
||||||
if(flags & PLASMAGUARD) return 0
|
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/weapon/storage/backpack)) return 0 //Cannot be washed :(
|
||||||
else if(istype(src,/obj/item/clothing)) return 1
|
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.
|
//Do a contamination overlay? Temporary measure to keep contamination less deadly than it was.
|
||||||
if(!contaminated)
|
if(!contaminated)
|
||||||
contaminated = 1
|
contaminated = 1
|
||||||
overlays += contamination_overlay
|
overlays += contamination_overlay
|
||||||
|
|
||||||
decontaminate()
|
/obj/item/proc/decontaminate()
|
||||||
contaminated = 0
|
contaminated = 0
|
||||||
overlays -= contamination_overlay
|
overlays -= contamination_overlay
|
||||||
|
|
||||||
|
|||||||
@@ -1,75 +1,81 @@
|
|||||||
var/global/vs_control/vsc = new
|
var/global/vs_control/vsc = new
|
||||||
|
|
||||||
vs_control/var
|
/vs_control
|
||||||
fire_consuption_rate = 0.25
|
var/fire_consuption_rate = 0.25
|
||||||
fire_consuption_rate_NAME = "Fire - Air Consumption Ratio"
|
var/fire_consuption_rate_NAME = "Fire - Air Consumption Ratio"
|
||||||
fire_consuption_rate_DESC = "Ratio of air removed and combusted per tick."
|
var/fire_consuption_rate_DESC = "Ratio of air removed and combusted per tick."
|
||||||
|
|
||||||
fire_firelevel_multiplier = 25
|
var/fire_firelevel_multiplier = 25
|
||||||
fire_firelevel_multiplier_NAME = "Fire - Firelevel Constant"
|
var/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_DESC = "Multiplied by the equation for firelevel, affects mainly the extingiushing of fires."
|
||||||
|
|
||||||
fire_fuel_energy_release = 397000
|
var/fire_fuel_energy_release = 397000
|
||||||
fire_fuel_energy_release_NAME = "Fire - Fuel energy release"
|
var/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_DESC = "The energy in joule released when burning one mol of a burnable substance"
|
||||||
|
|
||||||
|
|
||||||
airflow_lightest_pressure = 20
|
var/airflow_lightest_pressure = 20
|
||||||
airflow_lightest_pressure_NAME = "Airflow - Small Movement Threshold %"
|
var/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_DESC = "Percent of 1 Atm. at which items with the small weight classes will move."
|
||||||
|
|
||||||
airflow_light_pressure = 35
|
var/airflow_light_pressure = 35
|
||||||
airflow_light_pressure_NAME = "Airflow - Medium Movement Threshold %"
|
var/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_DESC = "Percent of 1 Atm. at which items with the medium weight classes will move."
|
||||||
|
|
||||||
airflow_medium_pressure = 50
|
var/airflow_medium_pressure = 50
|
||||||
airflow_medium_pressure_NAME = "Airflow - Heavy Movement Threshold %"
|
var/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_DESC = "Percent of 1 Atm. at which items with the largest weight classes will move."
|
||||||
|
|
||||||
airflow_heavy_pressure = 65
|
var/airflow_heavy_pressure = 65
|
||||||
airflow_heavy_pressure_NAME = "Airflow - Mob Movement Threshold %"
|
var/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_DESC = "Percent of 1 Atm. at which mobs will move."
|
||||||
|
|
||||||
airflow_dense_pressure = 85
|
var/airflow_dense_pressure = 85
|
||||||
airflow_dense_pressure_NAME = "Airflow - Dense Movement Threshold %"
|
var/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_DESC = "Percent of 1 Atm. at which items with canisters and closets will move."
|
||||||
|
|
||||||
airflow_stun_pressure = 60
|
var/airflow_stun_pressure = 60
|
||||||
airflow_stun_pressure_NAME = "Airflow - Mob Stunning Threshold %"
|
var/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_DESC = "Percent of 1 Atm. at which mobs will be stunned by airflow."
|
||||||
|
|
||||||
airflow_stun_cooldown = 60
|
var/airflow_stun_cooldown = 60
|
||||||
airflow_stun_cooldown_NAME = "Aiflow Stunning - Cooldown"
|
var/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_DESC = "How long, in tenths of a second, to wait before stunning them again."
|
||||||
|
|
||||||
airflow_stun = 1
|
var/airflow_stun = 1
|
||||||
airflow_stun_NAME = "Airflow Impact - Stunning"
|
var/airflow_stun_NAME = "Airflow Impact - Stunning"
|
||||||
airflow_stun_DESC = "How much a mob is stunned when hit by an object."
|
var/airflow_stun_DESC = "How much a mob is stunned when hit by an object."
|
||||||
|
|
||||||
airflow_damage = 2
|
var/airflow_damage = 2
|
||||||
airflow_damage_NAME = "Airflow Impact - Damage"
|
var/airflow_damage_NAME = "Airflow Impact - Damage"
|
||||||
airflow_damage_DESC = "Damage from airflow impacts."
|
var/airflow_damage_DESC = "Damage from airflow impacts."
|
||||||
|
|
||||||
airflow_speed_decay = 1.5
|
var/airflow_speed_decay = 1.5
|
||||||
airflow_speed_decay_NAME = "Airflow Speed Decay"
|
var/airflow_speed_decay_NAME = "Airflow Speed Decay"
|
||||||
airflow_speed_decay_DESC = "How rapidly the speed gained from airflow decays."
|
var/airflow_speed_decay_DESC = "How rapidly the speed gained from airflow decays."
|
||||||
|
|
||||||
airflow_delay = 30
|
var/airflow_delay = 30
|
||||||
airflow_delay_NAME = "Airflow Retrigger Delay"
|
var/airflow_delay_NAME = "Airflow Retrigger Delay"
|
||||||
airflow_delay_DESC = "Time in deciseconds before things can be moved by airflow again."
|
var/airflow_delay_DESC = "Time in deciseconds before things can be moved by airflow again."
|
||||||
|
|
||||||
airflow_mob_slowdown = 1
|
var/airflow_mob_slowdown = 1
|
||||||
airflow_mob_slowdown_NAME = "Airflow Slowdown"
|
var/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_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
|
/vs_control/var/list/settings = list()
|
||||||
var
|
/vs_control/var/list/bitflags = list("1","2","4","8","16","32","64","128","256","512","1024")
|
||||||
list/settings = list()
|
/vs_control/var/pl_control/plc = new()
|
||||||
list/bitflags = list("1","2","4","8","16","32","64","128","256","512","1024")
|
|
||||||
pl_control/plc = new()
|
|
||||||
|
|
||||||
New()
|
/vs_control/New()
|
||||||
. = ..()
|
. = ..()
|
||||||
settings = vars.Copy()
|
settings = vars.Copy()
|
||||||
|
|
||||||
@@ -85,7 +91,7 @@ vs_control
|
|||||||
settings -= "bitflags"
|
settings -= "bitflags"
|
||||||
settings -= "plc"
|
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/which = input(user,"Choose a setting:") in L
|
||||||
var/dat = ""
|
var/dat = ""
|
||||||
for(var/ch in L)
|
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 += "<b>[vw_name] = [vw]</b> <A href='?src=\ref[src];changevar=[ch]'>\[Change\]</A><br>"
|
||||||
dat += "<i>[vw_desc]</i><br><br>"
|
dat += "<i>[vw_desc]</i><br><br>"
|
||||||
user << browse(dat,"window=settings")
|
user << browse(dat,"window=settings")
|
||||||
Topic(href,href_list)
|
|
||||||
|
/vs_control/Topic(href,href_list)
|
||||||
if("changevar" in href_list)
|
if("changevar" in href_list)
|
||||||
ChangeSetting(usr,href_list["changevar"])
|
ChangeSetting(usr,href_list["changevar"])
|
||||||
proc/ChangeSetting(mob/user,ch)
|
|
||||||
|
/vs_control/proc/ChangeSetting(mob/user,ch)
|
||||||
var/vw
|
var/vw
|
||||||
var/how = "Text"
|
var/how = "Text"
|
||||||
var/display_description = ch
|
var/display_description = ch
|
||||||
@@ -162,7 +170,8 @@ vs_control
|
|||||||
ChangeSettingsDialog(user,plc.settings)
|
ChangeSettingsDialog(user,plc.settings)
|
||||||
else
|
else
|
||||||
ChangeSettingsDialog(user,settings)
|
ChangeSettingsDialog(user,settings)
|
||||||
proc/RandomizeWithProbability()
|
|
||||||
|
/vs_control/proc/RandomizeWithProbability()
|
||||||
for(var/V in settings)
|
for(var/V in settings)
|
||||||
var/newvalue
|
var/newvalue
|
||||||
if("[V]_RANDOM" in vars)
|
if("[V]_RANDOM" in vars)
|
||||||
@@ -174,11 +183,11 @@ vs_control
|
|||||||
newvalue = vars[V]
|
newvalue = vars[V]
|
||||||
V = newvalue
|
V = newvalue
|
||||||
|
|
||||||
proc/ChangePlasma()
|
/vs_control/proc/ChangePlasma()
|
||||||
for(var/V in plc.settings)
|
for(var/V in plc.settings)
|
||||||
plc.Randomize(V)
|
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!",\
|
var/list/setting_choices = list("Plasma - Standard", "Plasma - Low Hazard", "Plasma - High Hazard", "Plasma - Oh Shit!",\
|
||||||
"ZAS - Normal", "ZAS - Forgiving", "ZAS - Dangerous", "ZAS - Hellish")
|
"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
|
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>"
|
world << "\blue <b>[key_name(user)] changed the global plasma/ZAS settings to \"[def]\"</b>"
|
||||||
|
|
||||||
pl_control
|
/pl_control/var/list/settings = list()
|
||||||
var/list/settings = list()
|
|
||||||
New()
|
/pl_control/New()
|
||||||
. = ..()
|
. = ..()
|
||||||
settings = vars.Copy()
|
settings = vars.Copy()
|
||||||
|
|
||||||
@@ -295,7 +304,8 @@ pl_control
|
|||||||
settings -= V
|
settings -= V
|
||||||
|
|
||||||
settings -= "settings"
|
settings -= "settings"
|
||||||
proc/Randomize(V)
|
|
||||||
|
/pl_control/proc/Randomize(V)
|
||||||
var/newvalue
|
var/newvalue
|
||||||
if("[V]_RANDOM" in vars)
|
if("[V]_RANDOM" in vars)
|
||||||
if(isnum(vars["[V]_RANDOM"]))
|
if(isnum(vars["[V]_RANDOM"]))
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
atom/var/pressure_resistance = ONE_ATMOSPHERE
|
/atom/var/pressure_resistance = ONE_ATMOSPHERE
|
||||||
turf
|
|
||||||
|
|
||||||
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)
|
del(giver)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
return_air()
|
/turf/return_air()
|
||||||
//Create gas mixture to hold data for passing
|
//Create gas mixture to hold data for passing
|
||||||
var/datum/gas_mixture/GM = new
|
var/datum/gas_mixture/GM = new
|
||||||
|
|
||||||
@@ -21,7 +20,7 @@ turf
|
|||||||
|
|
||||||
return GM
|
return GM
|
||||||
|
|
||||||
remove_air(amount as num)
|
/turf/remove_air(amount as num)
|
||||||
var/datum/gas_mixture/GM = new
|
var/datum/gas_mixture/GM = new
|
||||||
|
|
||||||
var/sum = oxygen + carbon_dioxide + nitrogen + toxins
|
var/sum = oxygen + carbon_dioxide + nitrogen + toxins
|
||||||
@@ -36,22 +35,17 @@ turf
|
|||||||
|
|
||||||
return GM
|
return GM
|
||||||
|
|
||||||
turf
|
/turf/simulated/var/current_graphic = null
|
||||||
simulated
|
|
||||||
|
|
||||||
var/current_graphic = null
|
/turf/simulated/var/tmp/datum/gas_mixture/air
|
||||||
|
|
||||||
var/tmp
|
/turf/simulated/var/tmp/processing = 1
|
||||||
datum/gas_mixture/air
|
|
||||||
|
|
||||||
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
|
/turf/simulated/proc/update_visuals()
|
||||||
|
|
||||||
|
|
||||||
proc/update_visuals()
|
|
||||||
overlays = null
|
overlays = null
|
||||||
|
|
||||||
var/siding_icon_state = return_siding_icon_state()
|
var/siding_icon_state = return_siding_icon_state()
|
||||||
@@ -64,9 +58,7 @@ turf
|
|||||||
if(2)
|
if(2)
|
||||||
overlays.Add(slmaster)
|
overlays.Add(slmaster)
|
||||||
|
|
||||||
|
/turf/simulated/New()
|
||||||
|
|
||||||
New()
|
|
||||||
..()
|
..()
|
||||||
|
|
||||||
if(!blocks_air)
|
if(!blocks_air)
|
||||||
@@ -90,7 +82,7 @@ turf
|
|||||||
if(istype(target))
|
if(istype(target))
|
||||||
air_master.tiles_to_update |= target
|
air_master.tiles_to_update |= target
|
||||||
|
|
||||||
Del()
|
/turf/simulated/Del()
|
||||||
if(active_hotspot)
|
if(active_hotspot)
|
||||||
del(active_hotspot)
|
del(active_hotspot)
|
||||||
if(blocks_air)
|
if(blocks_air)
|
||||||
@@ -100,7 +92,7 @@ turf
|
|||||||
air_master.tiles_to_update.Add(tile)
|
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(!giver) return 0
|
||||||
if(zone)
|
if(zone)
|
||||||
zone.air.merge(giver)
|
zone.air.merge(giver)
|
||||||
@@ -108,7 +100,7 @@ turf
|
|||||||
else
|
else
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
return_air()
|
/turf/simulated/return_air()
|
||||||
if(zone)
|
if(zone)
|
||||||
return zone.air
|
return zone.air
|
||||||
else if(air)
|
else if(air)
|
||||||
@@ -117,7 +109,7 @@ turf
|
|||||||
else
|
else
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
remove_air(amount as num)
|
/turf/simulated/remove_air(amount as num)
|
||||||
if(zone)
|
if(zone)
|
||||||
var/datum/gas_mixture/removed = null
|
var/datum/gas_mixture/removed = null
|
||||||
removed = zone.air.remove(amount)
|
removed = zone.air.remove(amount)
|
||||||
@@ -133,7 +125,7 @@ turf
|
|||||||
else
|
else
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
proc/update_air_properties()
|
/turf/simulated/proc/update_air_properties()
|
||||||
var/air_directions_archived = air_check_directions
|
var/air_directions_archived = air_check_directions
|
||||||
air_check_directions = 0
|
air_check_directions = 0
|
||||||
|
|
||||||
@@ -270,10 +262,6 @@ turf
|
|||||||
processing = 0
|
processing = 0
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/turf/proc/HasDoor(turf/O)
|
/turf/proc/HasDoor(turf/O)
|
||||||
//Checks for the presence of doors, used for zone spreading and connection.
|
//Checks for the presence of doors, used for zone spreading and connection.
|
||||||
//A positive numerical argument checks only for closed doors.
|
//A positive numerical argument checks only for closed doors.
|
||||||
@@ -289,7 +277,7 @@ turf
|
|||||||
else
|
else
|
||||||
return 1
|
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.
|
//Fairly standard pass checks for turfs, objects and directional windows. Also stops at the edge of space.
|
||||||
if(!istype(T))
|
if(!istype(T))
|
||||||
return 0
|
return 0
|
||||||
@@ -314,7 +302,7 @@ turf/proc/ZCanPass(turf/simulated/T, var/include_space = 0)
|
|||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
turf/proc/ZAirPass(turf/T)
|
/turf/proc/ZAirPass(turf/T)
|
||||||
//Fairly standard pass checks for turfs, objects and directional windows.
|
//Fairly standard pass checks for turfs, objects and directional windows.
|
||||||
if(!istype(T))
|
if(!istype(T))
|
||||||
return 0
|
return 0
|
||||||
@@ -336,7 +324,6 @@ turf/proc/ZAirPass(turf/T)
|
|||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
/*UNUSED
|
/*UNUSED
|
||||||
/turf/proc/check_connections()
|
/turf/proc/check_connections()
|
||||||
//Checks for new connections that can be made.
|
//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/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
|
var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs can connect to zones
|
||||||
|
|
||||||
zone
|
/zone
|
||||||
|
var/dbg_output = 0 //Enables debug output.
|
||||||
var
|
var/rebuild = 0 //If 1, zone will be rebuilt on next process. Not sure if used.
|
||||||
dbg_output = 0 //Enables debug output.
|
var/datum/gas_mixture/air //The air contents of the zone.
|
||||||
rebuild = 0 //If 1, zone will be rebuilt on next process. Not sure if used.
|
var/list/contents //All the tiles that are contained in this zone.
|
||||||
datum/gas_mixture/air //The air contents of the zone.
|
var/list/connections // /connection objects which refer to connections with other zones, e.g. through a door.
|
||||||
list/contents //All the tiles that are contained in this zone.
|
var/list/connected_zones //Parallels connections, but lists zones to which this one is connected and the number
|
||||||
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
|
|
||||||
//of points they're connected at.
|
//of points they're connected at.
|
||||||
list/closed_connection_zones //Same as connected_zones, but for zones where the door or whatever is closed.
|
var/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.
|
var/list/unsimulated_tiles // Any space tiles in this list will cause air to flow out.
|
||||||
last_update = 0
|
var/last_update = 0
|
||||||
progress = "nothing"
|
var/progress = "nothing"
|
||||||
|
|
||||||
// To make sure you're not spammed to death by airflow sound effects
|
|
||||||
tmp/playsound_cooldown = 0
|
|
||||||
|
|
||||||
|
|
||||||
//CREATION AND DELETION
|
//CREATION AND DELETION
|
||||||
New(turf/start)
|
/zone/New(turf/start)
|
||||||
. = ..()
|
. = ..()
|
||||||
//Get the turfs that are part of the zone using a floodfill method
|
//Get the turfs that are part of the zone using a floodfill method
|
||||||
if(istype(start,/list))
|
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
|
//Generate the gas_mixture for use in txhis zone by using the average of the gases
|
||||||
//defined at startup.
|
//defined at startup.
|
||||||
air = new
|
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
|
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()
|
air.update_values()
|
||||||
|
|
||||||
//Add this zone to the global list.
|
//Add this zone to the global list.
|
||||||
@@ -56,7 +50,7 @@ zone
|
|||||||
|
|
||||||
|
|
||||||
//LEGACY, DO NOT USE. Use the SoftDelete proc.
|
//LEGACY, DO NOT USE. Use the SoftDelete proc.
|
||||||
Del()
|
/zone/Del()
|
||||||
//Ensuring the zone list doesn't get clogged with null values.
|
//Ensuring the zone list doesn't get clogged with null values.
|
||||||
for(var/turf/simulated/T in contents)
|
for(var/turf/simulated/T in contents)
|
||||||
RemoveTurf(T)
|
RemoveTurf(T)
|
||||||
@@ -72,7 +66,7 @@ zone
|
|||||||
|
|
||||||
|
|
||||||
//Handles deletion via garbage collection.
|
//Handles deletion via garbage collection.
|
||||||
proc/SoftDelete()
|
/zone/proc/SoftDelete()
|
||||||
zones.Remove(src)
|
zones.Remove(src)
|
||||||
air = null
|
air = null
|
||||||
|
|
||||||
@@ -85,14 +79,17 @@ zone
|
|||||||
for(var/zone/Z in connected_zones)
|
for(var/zone/Z in connected_zones)
|
||||||
if(src in Z.connected_zones)
|
if(src in Z.connected_zones)
|
||||||
Z.connected_zones.Remove(src)
|
Z.connected_zones.Remove(src)
|
||||||
|
connected_zones = null
|
||||||
|
|
||||||
for(var/connection/C in connections)
|
for(var/connection/C in connections)
|
||||||
air_master.connections_to_check += C
|
air_master.connections_to_check += C
|
||||||
|
connections = null
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
//ZONE MANAGEMENT FUNCTIONS
|
//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.
|
//Adds the turf to contents, increases the size of the zone, and sets the zone var.
|
||||||
if(istype(T, /turf/simulated))
|
if(istype(T, /turf/simulated))
|
||||||
if(T in contents)
|
if(T in contents)
|
||||||
@@ -111,7 +108,7 @@ zone
|
|||||||
unsimulated_tiles += T
|
unsimulated_tiles += T
|
||||||
contents -= T
|
contents -= T
|
||||||
|
|
||||||
proc/RemoveTurf(turf/T)
|
/zone/proc/RemoveTurf(turf/T)
|
||||||
//Same, but in reverse.
|
//Same, but in reverse.
|
||||||
if(istype(T, /turf/simulated))
|
if(istype(T, /turf/simulated))
|
||||||
if(!(T in contents))
|
if(!(T in contents))
|
||||||
@@ -132,7 +129,7 @@ zone
|
|||||||
|
|
||||||
#define QUANTIZE(variable) (round(variable,0.0001))
|
#define QUANTIZE(variable) (round(variable,0.0001))
|
||||||
|
|
||||||
zone/proc/process()
|
/zone/proc/process()
|
||||||
. = 1
|
. = 1
|
||||||
|
|
||||||
progress = "problem with: SoftDelete()"
|
progress = "problem with: SoftDelete()"
|
||||||
@@ -151,7 +148,7 @@ zone/proc/process()
|
|||||||
if(!contents.len) //If we got soft deleted.
|
if(!contents.len) //If we got soft deleted.
|
||||||
return
|
return
|
||||||
|
|
||||||
progress = "problem with: air.adjust()"
|
progress = "problem with: air regeneration"
|
||||||
|
|
||||||
//Sometimes explosions will cause the air to be deleted for some reason.
|
//Sometimes explosions will cause the air to be deleted for some reason.
|
||||||
if(!air)
|
if(!air)
|
||||||
@@ -162,36 +159,23 @@ zone/proc/process()
|
|||||||
air.total_moles()
|
air.total_moles()
|
||||||
world.log << "Air object lost in zone. Regenerating."
|
world.log << "Air object lost in zone. Regenerating."
|
||||||
|
|
||||||
progress = "problem with: ShareSpace()"
|
|
||||||
|
|
||||||
|
progress = "problem with: ShareSpace()"
|
||||||
|
|
||||||
if(unsimulated_tiles)
|
if(unsimulated_tiles)
|
||||||
if(locate(/turf/simulated) in unsimulated_tiles)
|
if(locate(/turf/simulated) in unsimulated_tiles)
|
||||||
for(var/turf/simulated/T in unsimulated_tiles)
|
for(var/turf/simulated/T in unsimulated_tiles)
|
||||||
RemoveTurf(T)
|
unsimulated_tiles -= T
|
||||||
if(unsimulated_tiles)
|
|
||||||
|
if(unsimulated_tiles.len)
|
||||||
var/moved_air = ShareSpace(air,unsimulated_tiles)
|
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)
|
if(moved_air > vsc.airflow_lightest_pressure)
|
||||||
AirflowSpace(src)
|
AirflowSpace(src)
|
||||||
|
else
|
||||||
progress = "problem with: air.react()"
|
unsimulated_tiles = null
|
||||||
|
|
||||||
//React the air here.
|
|
||||||
//Handled by fire, no need for this.
|
|
||||||
// air.react(null,0)
|
|
||||||
|
|
||||||
//Check the graphic.
|
//Check the graphic.
|
||||||
|
|
||||||
progress = "problem with: modifying turf graphics"
|
progress = "problem with: modifying turf graphics"
|
||||||
|
|
||||||
air.graphic = 0
|
air.graphic = 0
|
||||||
@@ -246,6 +230,7 @@ zone/proc/process()
|
|||||||
//Check if the connection is valid first.
|
//Check if the connection is valid first.
|
||||||
if(!C.Cleanup())
|
if(!C.Cleanup())
|
||||||
continue
|
continue
|
||||||
|
|
||||||
//Do merging if conditions are met. Specifically, if there's a non-door connection
|
//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
|
//to somewhere with space, the zones are merged regardless of equilibrium, to speed
|
||||||
//up spacing in areas with double-plated windows.
|
//up spacing in areas with double-plated windows.
|
||||||
@@ -259,18 +244,13 @@ zone/proc/process()
|
|||||||
|
|
||||||
//Share some
|
//Share some
|
||||||
for(var/zone/Z in connected_zones)
|
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)
|
if(air && Z.air)
|
||||||
//Ensure we're not doing pointless calculations on equilibrium zones.
|
//Ensure we're not doing pointless calculations on equilibrium zones.
|
||||||
var/moles_delta = abs(air.total_moles() - Z.air.total_moles())
|
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(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)
|
if(abs(Z.air.return_pressure() - air.return_pressure()) > vsc.airflow_lightest_pressure)
|
||||||
Airflow(src,Z)
|
Airflow(src,Z)
|
||||||
@@ -284,7 +264,7 @@ zone/proc/process()
|
|||||||
|
|
||||||
for(var/zone/Z in closed_connection_zones)
|
for(var/zone/Z in closed_connection_zones)
|
||||||
if(air && Z.air)
|
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])
|
ShareHeat(air, Z.air, closed_connection_zones[Z])
|
||||||
|
|
||||||
progress = "all components completed successfully, the problem is not here"
|
progress = "all components completed successfully, the problem is not here"
|
||||||
@@ -293,7 +273,7 @@ zone/proc/process()
|
|||||||
//Air Movement//
|
//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)
|
proc/ShareRatio(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
|
||||||
//Shares a specific ratio of gas between mixtures using simple weighted averages.
|
//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.
|
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 = 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.oxygen = max(0, (A.oxygen - oxy_avg) * (1 - ratio) + oxy_avg )
|
||||||
A.nitrogen = max(0, (A.nitrogen - nit_avg) * (1 - ratio) + nit_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))
|
if(istype(T) && T.zone && S.CanPass(null, T, 0, 0))
|
||||||
T.zone.AddTurf(S)
|
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
|
//UNUSED
|
||||||
/*
|
/*
|
||||||
zone/proc/connected_zones()
|
zone/proc/connected_zones()
|
||||||
|
|||||||
@@ -132,12 +132,12 @@ datum/controller/game_controller/proc/process()
|
|||||||
//src.set_debug_state("Air Master")
|
//src.set_debug_state("Air Master")
|
||||||
|
|
||||||
air_master.current_cycle++
|
air_master.current_cycle++
|
||||||
var/success = air_master.tick() //Changed so that a runtime does not crash the ticker.
|
if(!air_master.tick()) //Runtimed.
|
||||||
if(!success) //Runtimed.
|
|
||||||
air_master.failed_ticks++
|
air_master.failed_ticks++
|
||||||
if(air_master.failed_ticks > 5)
|
if(air_master.failed_ticks > 5)
|
||||||
world << "<font color='red'><b>RUNTIMES IN ATMOS TICKER. Killing air simulation!</font></b>"
|
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]")
|
log_admin("ZASALERT: unable run zone/process() -- [air_master.tick_progress]")
|
||||||
air_processing_killed = 1
|
air_processing_killed = 1
|
||||||
air_master.failed_ticks = 0
|
air_master.failed_ticks = 0
|
||||||
|
|||||||
@@ -49,7 +49,8 @@
|
|||||||
/obj/item/robot_parts/robot_component/radio,
|
/obj/item/robot_parts/robot_component/radio,
|
||||||
/obj/item/robot_parts/robot_component/actuator,
|
/obj/item/robot_parts/robot_component/actuator,
|
||||||
/obj/item/robot_parts/robot_component/diagnosis_unit,
|
/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(
|
"Ripley"=list(
|
||||||
/obj/item/mecha_parts/chassis/ripley,
|
/obj/item/mecha_parts/chassis/ripley,
|
||||||
|
|||||||
@@ -77,7 +77,9 @@ mob/living/carbon/proc/handle_hallucinations()
|
|||||||
halitem.name = "Flashbang"
|
halitem.name = "Flashbang"
|
||||||
if(client) client.screen += halitem
|
if(client) client.screen += halitem
|
||||||
spawn(rand(100,250))
|
spawn(rand(100,250))
|
||||||
del halitem
|
if(client)
|
||||||
|
client.screen -= halitem
|
||||||
|
halitem = null
|
||||||
if(26 to 40)
|
if(26 to 40)
|
||||||
//Flashes of danger
|
//Flashes of danger
|
||||||
//src << "Danger Flash"
|
//src << "Danger Flash"
|
||||||
|
|||||||
@@ -998,7 +998,7 @@
|
|||||||
sleeping = max(sleeping-1, 0)
|
sleeping = max(sleeping-1, 0)
|
||||||
blinded = 1
|
blinded = 1
|
||||||
stat = UNCONSCIOUS
|
stat = UNCONSCIOUS
|
||||||
if( prob(10) && health && !hal_crit )
|
if( prob(2) && health && !hal_crit )
|
||||||
spawn(0)
|
spawn(0)
|
||||||
emote("snore")
|
emote("snore")
|
||||||
else if(resting)
|
else if(resting)
|
||||||
|
|||||||
@@ -86,7 +86,7 @@
|
|||||||
|
|
||||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
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)
|
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]!",)
|
"\red Your hand slips, tearing blood vessels and causing massive bleeding in [target]'s [affected.display_name] with \the [tool]!",)
|
||||||
affected.createwound(CUT, 10)
|
affected.createwound(CUT, 10)
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
|
|
||||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
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)
|
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)
|
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||||
|
|||||||
@@ -627,7 +627,7 @@ var/list/TAGGERLOCATIONS = list("Disposals",
|
|||||||
#define CHAT_LOOC 4096
|
#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_TRAITOR 1
|
||||||
#define BE_OPERATIVE 2
|
#define BE_OPERATIVE 2
|
||||||
|
|||||||
Reference in New Issue
Block a user