Merge pull request #2673 from SkyMarshal/bugfixes

See description
This commit is contained in:
Jim "Apples"
2013-04-18 12:48:02 -07:00
40 changed files with 1672 additions and 2120 deletions

View File

@@ -1289,6 +1289,7 @@
#include "code\WorkInProgress\Chinsky\ashtray.dm" #include "code\WorkInProgress\Chinsky\ashtray.dm"
#include "code\WorkInProgress\Cib\MedicalSideEffects.dm" #include "code\WorkInProgress\Cib\MedicalSideEffects.dm"
#include "code\WorkInProgress\Mini\ATM.dm" #include "code\WorkInProgress\Mini\ATM.dm"
#include "code\WorkInProgress\Mini\atmos_control.dm"
#include "code\WorkInProgress\Ported\policetape.dm" #include "code\WorkInProgress\Ported\policetape.dm"
#include "code\WorkInProgress\SkyMarshal\Ultralight_procs.dm" #include "code\WorkInProgress\SkyMarshal\Ultralight_procs.dm"
#include "code\WorkInProgress\Susan\susan_desert_turfs.dm" #include "code\WorkInProgress\Susan\susan_desert_turfs.dm"
@@ -1301,6 +1302,7 @@
#include "code\WorkInProgress\virus2\isolator.dm" #include "code\WorkInProgress\virus2\isolator.dm"
#include "code\ZAS\Airflow.dm" #include "code\ZAS\Airflow.dm"
#include "code\ZAS\Connection.dm" #include "code\ZAS\Connection.dm"
#include "code\ZAS\Debug.dm"
#include "code\ZAS\FEA_gas_mixture.dm" #include "code\ZAS\FEA_gas_mixture.dm"
#include "code\ZAS\FEA_system.dm" #include "code\ZAS\FEA_system.dm"
#include "code\ZAS\Fire.dm" #include "code\ZAS\Fire.dm"

View File

@@ -62,7 +62,7 @@ Filter types:
var/output_starting_pressure = air3.return_pressure() var/output_starting_pressure = air3.return_pressure()
if(output_starting_pressure >= target_pressure) if(output_starting_pressure >= target_pressure || air2.return_pressure() >= target_pressure )
//No need to mix if target is already full! //No need to mix if target is already full!
return 1 return 1

View File

@@ -248,8 +248,8 @@ atom/movable
if(src:buckled) if(src:buckled)
return return
if(src:shoes) if(src:shoes)
if(src:shoes.type == /obj/item/clothing/shoes/magboots) if(istype(src:shoes, /obj/item/clothing/shoes/magboots))
if(src:shoes.flags & NOSLIP) if(src:shoes:magpulse)
return return
src << "\red You are sucked away by airflow!" src << "\red You are sucked away by airflow!"
var/airflow_falloff = 9 - ul_FalloffAmount(airflow_dest) //It's a fast falloff calc. Very useful. var/airflow_falloff = 9 - ul_FalloffAmount(airflow_dest) //It's a fast falloff calc. Very useful.
@@ -303,7 +303,6 @@ atom/movable
if(airflow_speed) if(airflow_speed)
airflow_speed = n/max(get_dist(src,airflow_dest),1) airflow_speed = n/max(get_dist(src,airflow_dest),1)
return return
last_airflow = world.time
if(airflow_dest == loc) if(airflow_dest == loc)
step_away(src,loc) step_away(src,loc)
if(ismob(src)) if(ismob(src))
@@ -317,6 +316,7 @@ atom/movable
if(src:shoes.flags & NOSLIP) if(src:shoes.flags & NOSLIP)
return return
src << "\red You are pushed away by airflow!" src << "\red You are pushed away by airflow!"
last_airflow = world.time
var/airflow_falloff = 9 - ul_FalloffAmount(airflow_dest) //It's a fast falloff calc. Very useful. var/airflow_falloff = 9 - ul_FalloffAmount(airflow_dest) //It's a fast falloff calc. Very useful.
if(airflow_falloff < 1) if(airflow_falloff < 1)
airflow_dest = null airflow_dest = null

View File

@@ -17,7 +17,7 @@ connection
zone_B zone_B
ref_A ref_A
ref_B ref_B
indirect = 0 //If the connection is purely indirect, the zones should not join. indirect = CONNECTION_DIRECT //If the connection is purely indirect, the zones should not join.
last_updated //The tick at which this was last updated. last_updated //The tick at which this was last updated.
no_zone_count = 0 no_zone_count = 0
@@ -47,24 +47,48 @@ connection
else else
air_master.turfs_with_connections[ref_B] = list(src) air_master.turfs_with_connections[ref_B] = list(src)
if(!A.zone.connected_zones) if(A.CanPass(null, B, 0, 0))
A.zone.connected_zones = list()
if(!B.zone.connected_zones)
B.zone.connected_zones = list()
if(B.zone in A.zone.connected_zones) if(!A.zone.connected_zones)
A.zone.connected_zones[B.zone]++ A.zone.connected_zones = list()
else if(!B.zone.connected_zones)
A.zone.connected_zones += B.zone B.zone.connected_zones = list()
A.zone.connected_zones[B.zone] = 1
if(B.zone in A.zone.connected_zones)
A.zone.connected_zones[B.zone]++
else
A.zone.connected_zones += B.zone
A.zone.connected_zones[B.zone] = 1
if(A.zone in B.zone.connected_zones)
B.zone.connected_zones[A.zone]++
else
B.zone.connected_zones += A.zone
B.zone.connected_zones[A.zone] = 1
if(A.HasDoor(B) || B.HasDoor(A))
indirect = CONNECTION_INDIRECT
if(A.zone in B.zone.connected_zones)
B.zone.connected_zones[A.zone]++
else else
B.zone.connected_zones += A.zone indirect = CONNECTION_CLOSED
B.zone.connected_zones[A.zone] = 1
if(A.HasDoor(B) || B.HasDoor(A))
indirect = 1 if(!A.zone.closed_connection_zones)
A.zone.closed_connection_zones = list()
if(B.zone in A.zone.closed_connection_zones)
A.zone.closed_connection_zones[B.zone]++
else
A.zone.closed_connection_zones += B.zone
A.zone.closed_connection_zones[B.zone] = 1
if(!B.zone.closed_connection_zones)
B.zone.closed_connection_zones = list()
if(A.zone in B.zone.closed_connection_zones)
B.zone.closed_connection_zones[A.zone]++
else
B.zone.closed_connection_zones += A.zone
B.zone.closed_connection_zones[A.zone] = 1
else else
world.log << "Attempted to create connection object for non-zone tiles: [T] -> [O]" world.log << "Attempted to create connection object for non-zone tiles: [T] -> [O]"
del(src) del(src)
@@ -168,6 +192,75 @@ connection
zone_B.connected_zones -= zone_A zone_B.connected_zones -= zone_A
if(zone_B.connected_zones && !zone_B.connected_zones.len) if(zone_B.connected_zones && !zone_B.connected_zones.len)
zone_B.connected_zones = null zone_B.connected_zones = null
else
if(A && A.zone)
if(B && B.zone)
if(B.zone in A.zone.closed_connection_zones)
if(A.zone.closed_connection_zones[B.zone] > 1)
A.zone.closed_connection_zones[B.zone]--
else
A.zone.closed_connection_zones -= B.zone
if(A.zone.closed_connection_zones && !A.zone.closed_connection_zones.len)
A.zone.closed_connection_zones = null
if( zone_B && (!B.zone || zone_B != B.zone) )
if(zone_B in A.zone.closed_connection_zones)
if(A.zone.closed_connection_zones[zone_B] > 1)
A.zone.closed_connection_zones[zone_B]--
else
A.zone.closed_connection_zones -= zone_B
if(A.zone.closed_connection_zones && !A.zone.closed_connection_zones.len)
A.zone.closed_connection_zones = null
if(zone_A && (!A.zone || zone_A != A.zone))
if(B && B.zone)
if(B.zone in zone_A.closed_connection_zones)
if(zone_A.closed_connection_zones[B.zone] > 1)
zone_A.closed_connection_zones[B.zone]--
else
zone_A.closed_connection_zones -= B.zone
if(zone_A.closed_connection_zones && !zone_A.closed_connection_zones.len)
zone_A.closed_connection_zones = null
if( zone_B && (!B.zone || zone_B != B.zone) )
if(zone_B in zone_A.closed_connection_zones)
if(zone_A.closed_connection_zones[zone_B] > 1)
zone_A.closed_connection_zones[zone_B]--
else
zone_A.closed_connection_zones -= zone_B
if(zone_A.closed_connection_zones && !zone_A.closed_connection_zones.len)
zone_A.closed_connection_zones = null
if(B && B.zone)
if(A && A.zone)
if(A.zone in B.zone.closed_connection_zones)
if(B.zone.closed_connection_zones[A.zone] > 1)
B.zone.closed_connection_zones[A.zone]--
else
B.zone.closed_connection_zones -= A.zone
if(B.zone.closed_connection_zones && !B.zone.closed_connection_zones.len)
B.zone.closed_connection_zones = null
if( zone_A && (!A.zone || zone_A != A.zone) )
if(zone_A in B.zone.closed_connection_zones)
if(B.zone.closed_connection_zones[zone_A] > 1)
B.zone.closed_connection_zones[zone_A]--
else
B.zone.closed_connection_zones -= zone_A
if(B.zone.closed_connection_zones && !B.zone.closed_connection_zones.len)
B.zone.closed_connection_zones = null
if(zone_B && (!B.zone || zone_B != B.zone))
if(A && A.zone)
if(A.zone in zone_B.closed_connection_zones)
if(zone_B.closed_connection_zones[A.zone] > 1)
zone_B.closed_connection_zones[A.zone]--
else
zone_B.closed_connection_zones -= A.zone
if(zone_B.closed_connection_zones && !zone_B.closed_connection_zones.len)
zone_B.closed_connection_zones = null
if( zone_A && (!A.zone || zone_A != A.zone) )
if(zone_A in zone_B.closed_connection_zones)
if(zone_B.closed_connection_zones[zone_A] > 1)
zone_B.closed_connection_zones[zone_A]--
else
zone_B.closed_connection_zones -= zone_A
if(zone_B.closed_connection_zones && !zone_B.closed_connection_zones.len)
zone_B.closed_connection_zones = null
. = ..() . = ..()
proc/Cleanup() proc/Cleanup()
@@ -212,12 +305,32 @@ connection
else else
B.zone.connected_zones += A.zone B.zone.connected_zones += A.zone
B.zone.connected_zones[A.zone] = 1 B.zone.connected_zones[A.zone] = 1
if(A.zone.closed_connection_zones)
if(A.zone.closed_connection_zones[B.zone] > 1)
A.zone.closed_connection_zones[B.zone]--
else
A.zone.closed_connection_zones.Remove(B.zone)
if(A.zone.closed_connection_zones && !A.zone.closed_connection_zones.len)
A.zone.closed_connection_zones = null
if(B.zone.closed_connection_zones)
if(B.zone.closed_connection_zones[A.zone] > 1)
B.zone.closed_connection_zones[A.zone]--
else
B.zone.closed_connection_zones.Remove(A.zone)
if(B.zone.closed_connection_zones && !B.zone.closed_connection_zones.len)
B.zone.closed_connection_zones = null
if(door_pass) if(door_pass)
indirect = CONNECTION_DIRECT indirect = CONNECTION_DIRECT
else if(!door_pass) else if(!door_pass)
indirect = CONNECTION_INDIRECT indirect = CONNECTION_INDIRECT
else if(indirect > CONNECTION_CLOSED) else if(indirect > CONNECTION_CLOSED)
indirect = CONNECTION_CLOSED indirect = CONNECTION_CLOSED
//ADJUST FOR CANNOT CONNECT //ADJUST FOR CANNOT CONNECT
if(A.zone.connected_zones) if(A.zone.connected_zones)
if(A.zone.connected_zones[B.zone] > 1) if(A.zone.connected_zones[B.zone] > 1)
@@ -226,13 +339,33 @@ connection
A.zone.connected_zones.Remove(B.zone) A.zone.connected_zones.Remove(B.zone)
if(A.zone.connected_zones && !A.zone.connected_zones.len) if(A.zone.connected_zones && !A.zone.connected_zones.len)
A.zone.connected_zones = null A.zone.connected_zones = null
if(B.zone.connected_zones) if(B.zone.connected_zones)
if(B.zone.connected_zones[A.zone] > 1) if(B.zone.connected_zones[A.zone] > 1)
B.zone.connected_zones[A.zone]-- B.zone.connected_zones[A.zone]--
else else
B.zone.connected_zones.Remove(A.zone) B.zone.connected_zones.Remove(A.zone)
if(B.zone.connected_zones && !B.zone.connected_zones.len) if(B.zone.connected_zones && !B.zone.connected_zones.len)
B.zone.connected_zones = null B.zone.connected_zones = null
//Add to the closed connections list(s)
if(!A.zone.closed_connection_zones)
A.zone.closed_connection_zones = list()
if(B.zone in A.zone.closed_connection_zones)
A.zone.closed_connection_zones[B.zone]++
else
A.zone.closed_connection_zones += B.zone
A.zone.closed_connection_zones[B.zone] = 1
if(!B.zone.closed_connection_zones)
B.zone.closed_connection_zones = list()
if(A.zone in B.zone.closed_connection_zones)
B.zone.closed_connection_zones[A.zone]++
else
B.zone.closed_connection_zones += A.zone
B.zone.closed_connection_zones[A.zone] = 1
else //If I can no longer pass air, better delete else //If I can no longer pass air, better delete
del src del src
@@ -268,6 +401,16 @@ connection
if(zone_A.connected_zones && !zone_A.connected_zones.len) if(zone_A.connected_zones && !zone_A.connected_zones.len)
zone_A.connected_zones = null zone_A.connected_zones = null
else
if(zone_A.closed_connection_zones)
if(zone_A.closed_connection_zones[zone_B] > 1)
zone_A.closed_connection_zones[zone_B]--
else
zone_A.closed_connection_zones.Remove(zone_B)
if(zone_A.closed_connection_zones && !zone_A.closed_connection_zones.len)
zone_A.closed_connection_zones = null
if(zone_B) if(zone_B)
if(zone_B.connections) if(zone_B.connections)
zone_B.connections.Remove(src) zone_B.connections.Remove(src)
@@ -283,6 +426,15 @@ connection
if(zone_B.connected_zones && !zone_B.connected_zones.len) if(zone_B.connected_zones && !zone_B.connected_zones.len)
zone_B.connected_zones = null zone_B.connected_zones = null
else
if(zone_B.closed_connection_zones)
if(zone_B.closed_connection_zones[zone_A] > 1)
zone_B.closed_connection_zones[zone_A]--
else
zone_B.closed_connection_zones.Remove(zone_A)
if(zone_B.closed_connection_zones && !zone_B.closed_connection_zones.len)
zone_B.closed_connection_zones = null
if(indirect != CONNECTION_CLOSED) if(indirect != CONNECTION_CLOSED)
if(!A.zone.connections) if(!A.zone.connections)
A.zone.connections = list() A.zone.connections = list()
@@ -307,6 +459,31 @@ connection
B.zone.connected_zones += A.zone B.zone.connected_zones += A.zone
B.zone.connected_zones[A.zone] = 1 B.zone.connected_zones[A.zone] = 1
else
if(!A.zone.connections)
A.zone.connections = list()
A.zone.connections |= src
if(!B.zone.connections)
B.zone.connections = list()
B.zone.connections |= src
if(!A.zone.closed_connection_zones)
A.zone.closed_connection_zones = list()
if(B.zone in A.zone.closed_connection_zones)
A.zone.closed_connection_zones[B.zone]++
else
A.zone.closed_connection_zones += B.zone
A.zone.closed_connection_zones[B.zone] = 1
if(!B.zone.closed_connection_zones)
B.zone.closed_connection_zones = list()
if(A.zone in B.zone.closed_connection_zones)
B.zone.closed_connection_zones[A.zone]++
else
B.zone.closed_connection_zones += A.zone
B.zone.closed_connection_zones[A.zone] = 1
zone_B = B.zone zone_B = B.zone
zone_A = A.zone zone_A = A.zone
@@ -340,6 +517,23 @@ connection
else else
A.zone.connected_zones[zone_B]++ A.zone.connected_zones[zone_B]++
else
if(zone_A.closed_connection_zones)
if(zone_A.closed_connection_zones[zone_B] > 1)
zone_A.closed_connection_zones[zone_B]--
else
zone_A.closed_connection_zones.Remove(zone_B)
if(zone_A.closed_connection_zones && !zone_A.closed_connection_zones.len)
zone_A.closed_connection_zones = null
if(!A.zone.closed_connection_zones)
A.zone.closed_connection_zones = list()
if(!(zone_B in A.zone.closed_connection_zones))
A.zone.closed_connection_zones += zone_B
A.zone.closed_connection_zones[zone_B] = 1
else
A.zone.closed_connection_zones[zone_B]++
zone_A = A.zone zone_A = A.zone
else else
@@ -373,6 +567,23 @@ connection
else else
B.zone.connected_zones[zone_A]++ B.zone.connected_zones[zone_A]++
else
if(zone_B.closed_connection_zones)
if(zone_B.closed_connection_zones[zone_A] > 1)
zone_B.closed_connection_zones[zone_A]--
else
zone_B.closed_connection_zones.Remove(zone_A)
if(zone_B.closed_connection_zones && !zone_B.closed_connection_zones.len)
zone_B.closed_connection_zones = null
if(!B.zone.closed_connection_zones)
B.zone.closed_connection_zones = list()
if(!(zone_A in B.zone.closed_connection_zones))
B.zone.closed_connection_zones += zone_A
B.zone.closed_connection_zones[zone_A] = 1
else
B.zone.closed_connection_zones[zone_A]++
zone_B = B.zone zone_B = B.zone
else else

View File

@@ -1,5 +1,5 @@
client/verb/Zone_Info(turf/T as null|turf) client/proc/Zone_Info(turf/T as null|turf)
set category = "Debug" set category = "Debug"
if(T) if(T)
if(T.zone) if(T.zone)
@@ -12,6 +12,50 @@ client/verb/Zone_Info(turf/T as null|turf)
T.overlays -= 'debug_group.dmi' T.overlays -= 'debug_group.dmi'
T.overlays -= 'debug_connect.dmi' T.overlays -= 'debug_connect.dmi'
client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf)
set category = "Debug"
if(!istype(T))
return
var/direction_list = list(\
"North" = NORTH,\
"South" = SOUTH,\
"East" = EAST,\
"West" = WEST,\
"None" = 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(T.CanPass(null, T, 0,0))
mob << "The turf can pass air! :D"
else
mob << "No air passage :x"
return
var/turf/simulated/other_turf = get_step(T, direction_list[direction])
if(!istype(other_turf))
return
var/pass_directions = T.CanPass(null, other_turf, 0, 0) + 2*other_turf.CanPass(null, T, 0, 0)
switch(pass_directions)
if(0)
mob << "Neither turf can connect. :("
if(1)
mob << "The initial turf only can connect. :\\"
if(2)
mob << "The other turf can connect, but not the initial turf. :/"
if(3)
mob << "Both turfs can connect! :)"
zone/proc zone/proc
DebugDisplay(mob/M) DebugDisplay(mob/M)
if(!dbg_output) if(!dbg_output)

View File

@@ -346,7 +346,7 @@ datum
if(current == NT) if(current == NT)
return //We made it, yaaay~ return //We made it, yaaay~
stepped_back = 0 stepped_back = 0
zone.rebuild = 1 zone.rebuild = 1
else if ( current.air_check_directions&test_dir ) else if ( current.air_check_directions&test_dir )
//Try to connect to the left hand side. //Try to connect to the left hand side.

View File

@@ -11,8 +11,6 @@ Attach to transfer valve and open. BOOM.
*/ */
//Some legacy definitions so fires can be started. //Some legacy definitions so fires can be started.
atom/proc/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) atom/proc/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
return null return null
@@ -21,21 +19,12 @@ atom/proc/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed
turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0) turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh) turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
if(fire_protection > world.time-300) return if(fire_protection > world.time-300) return
var/datum/gas_mixture/air_contents = return_air(1) var/datum/gas_mixture/air_contents = return_air()
if(!air_contents) if(!air_contents || exposed_temperature < PLASMA_MINIMUM_BURN_TEMPERATURE)
return 0 return 0
/*if(active_hotspot)
if(soh)
if(air_contents.toxins > 0.5 && air_contents.oxygen > 0.5)
if(active_hotspot.temperature < exposed_temperature)
active_hotspot.temperature = exposed_temperature
if(active_hotspot.volume < exposed_volume)
active_hotspot.volume = exposed_volume
return 1*/
var/igniting = 0 var/igniting = 0
if(locate(/obj/fire) in src) if(locate(/obj/fire) in src)
return 1 return 1
@@ -47,9 +36,8 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
return 0 return 0
if(! (locate(/obj/fire) in src)) if(! (locate(/obj/fire) in src))
var/obj/fire/F = new(src,1000)
F.temperature = exposed_temperature new /obj/fire(src,1000)
F.volume = CELL_VOLUME
//active_hotspot.just_spawned = (current_cycle < air_master.current_cycle) //active_hotspot.just_spawned = (current_cycle < air_master.current_cycle)
//remove just_spawned protection if no longer processing this cell //remove just_spawned protection if no longer processing this cell
@@ -71,10 +59,7 @@ obj
layer = TURF_LAYER layer = TURF_LAYER
var var
volume = CELL_VOLUME
temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST
firelevel = 10000 //Calculated by gas_mixture.calculate_firelevel() firelevel = 10000 //Calculated by gas_mixture.calculate_firelevel()
archived_firelevel = 0
process() process()
. = 1 . = 1
@@ -84,15 +69,15 @@ obj
var/turf/simulated/floor/S = loc var/turf/simulated/floor/S = loc
if(!S.zone) del src //Cannot exist where zones are broken. if(!S.zone) del src //Cannot exist where zones are broken.
if(istype(S,/turf/simulated/floor)) if(istype(S))
var var
datum/gas_mixture/air_contents = S.return_air() datum/gas_mixture/air_contents = S.return_air()
//Get whatever trace fuels are in the area //Get whatever trace fuels are in the area
datum/gas/volatile_fuel/fuel = locate(/datum/gas/volatile_fuel/) in air_contents.trace_gases datum/gas/volatile_fuel/fuel = locate() in air_contents.trace_gases
//Also get liquid fuels on the ground. //Also get liquid fuels on the ground.
obj/effect/decal/cleanable/liquid_fuel/liquid = locate() in S obj/effect/decal/cleanable/liquid_fuel/liquid = locate() in S
var/datum/gas_mixture/flow = air_contents.remove_ratio(0.25) var/datum/gas_mixture/flow = air_contents.remove_ratio(vsc.fire_consuption_rate)
//The reason we're taking a part of the air instead of all of it is so that it doesn't jump to //The reason we're taking a part of the air instead of all of it is so that it doesn't jump to
//the fire's max temperature instantaneously. //the fire's max temperature instantaneously.
@@ -115,7 +100,7 @@ obj
//Spread the fire. //Spread the fire.
if(!(locate(/obj/fire) in enemy_tile)) if(!(locate(/obj/fire) in enemy_tile))
if( prob( firelevel*10 ) ) if( prob( firelevel*10 ) && S.CanPass(null, enemy_tile, 0,0) && enemy_tile.CanPass(null, S, 0,0))
new/obj/fire(enemy_tile,firelevel) new/obj/fire(enemy_tile,firelevel)
if(flow) if(flow)
@@ -126,16 +111,21 @@ obj
//Change icon depending on the fuel, and thus temperature. //Change icon depending on the fuel, and thus temperature.
if(firelevel > 6) if(firelevel > 6)
icon_state = "3" icon_state = "3"
SetLuminosity(7)
else if(firelevel > 2.5) else if(firelevel > 2.5)
icon_state = "2" icon_state = "2"
SetLuminosity(5)
else else
icon_state = "1" icon_state = "1"
SetLuminosity(3)
//Ensure flow temperature is higher than minimum fire temperatures. //Ensure flow temperature is higher than minimum fire temperatures.
flow.temperature = max(PLASMA_MINIMUM_BURN_TEMPERATURE+0.1,flow.temperature) flow.temperature = max(PLASMA_MINIMUM_BURN_TEMPERATURE+0.1,flow.temperature)
//Burn the gas mixture. //Burn the gas mixture.
flow.zburn(liquid) flow.zburn(liquid)
if(fuel && fuel.moles <= 0.00001)
air_contents.trace_gases.Remove(fuel)
else else
@@ -151,28 +141,26 @@ obj
else else
del src del src
//Should fix fire being extra damaging, temperature of the environment will now be the main source of fire damage.
/*
for(var/mob/living/carbon/human/M in loc) for(var/mob/living/carbon/human/M in loc)
M.FireBurn(min(max(0.1,firelevel / 20),10)) //Burn the humans! M.FireBurn(firelevel) //Burn the humans!
*/
New(newLoc,fl) New(newLoc,fl)
..() ..()
if(!istype(loc, /turf) || !loc.CanPass(null, loc, 0, 0)) if(!istype(loc, /turf))
del src del src
dir = pick(cardinal) dir = pick(cardinal)
//sd_SetLuminosity(3,2,0) SetLuminosity(3)
firelevel = fl firelevel = fl
for(var/mob/living/carbon/human/M in loc)
M.FireBurn(min(max(0.1,firelevel / 20),10)) //Burn the humans!
air_master.active_hotspots.Add(src) air_master.active_hotspots.Add(src)
Del() Del()
if (istype(loc, /turf/simulated)) if (istype(loc, /turf/simulated))
//sd_SetLuminosity(0) SetLuminosity(0)
loc = null loc = null
air_master.active_hotspots.Remove(src) air_master.active_hotspots.Remove(src)
@@ -180,40 +168,34 @@ obj
..() ..()
turf/simulated/var/fire_protection = 0 //Protects newly extinguished tiles from being overrun again. turf/simulated/var/fire_protection = 0 //Protects newly extinguished tiles from being overrun again.
turf/proc/apply_fire_protection() turf/proc/apply_fire_protection()
turf/simulated/apply_fire_protection() turf/simulated/apply_fire_protection()
fire_protection = world.time fire_protection = world.time
datum/gas_mixture/proc/zburn(obj/effect/decal/cleanable/liquid_fuel/liquid) datum/gas_mixture/proc/zburn(obj/effect/decal/cleanable/liquid_fuel/liquid)
//This proc is similar to fire(), but uses a simple logarithm to calculate temp, and is thus more stable with ZAS. //This proc is similar to fire(), but uses a simple logarithm to calculate temp, and is thus more stable with ZAS.
if(temperature > PLASMA_MINIMUM_BURN_TEMPERATURE) if(temperature > PLASMA_MINIMUM_BURN_TEMPERATURE)
var var
total_fuel = toxins total_fuel = toxins
fuel_sources = 0 //We'll divide by this later so that fuel is consumed evenly.
datum/gas/volatile_fuel/fuel = locate() in trace_gases datum/gas/volatile_fuel/fuel = locate() in trace_gases
if(fuel) if(fuel)
//Volatile Fuel //Volatile Fuel
if(fuel.moles < 0.01) total_fuel += fuel.moles
trace_gases.Remove(fuel)
fuel = null
else
total_fuel += fuel.moles
fuel_sources++
if(liquid) if(liquid)
//Liquid Fuel //Liquid Fuel
if(liquid.amount <= 0) if(liquid.amount <= 0)
del liquid del liquid
else else
total_fuel += liquid.amount total_fuel += liquid.amount*15
fuel_sources++
//Toxins if(! (fuel || toxins || liquid) )
if(toxins > 0.3) fuel_sources++ return 0 //If there's no fuel, there's no burn. Can't divide by zero anyway.
if(!fuel_sources) return 0 //If there's no fuel, there's no burn. Can't divide by zero anyway.
if(oxygen > 0.3) if(oxygen > 0.3)
@@ -223,46 +205,54 @@ datum/gas_mixture/proc/zburn(obj/effect/decal/cleanable/liquid_fuel/liquid)
//Reaches a maximum practical temperature of around 4500. //Reaches a maximum practical temperature of around 4500.
//Increase temperature. //Increase temperature.
temperature = max( 1700*log(0.4*firelevel + 1.23) , temperature ) temperature = max( vsc.fire_temperature_multiplier*log(0.04*firelevel + 1.24) , temperature )
var/total_reactants = min(oxygen, 2*total_fuel) + total_fuel
//Consume some gas. //Consume some gas.
var/consumed_gas = min(oxygen,0.05*firelevel,total_fuel) / fuel_sources var/consumed_gas = max( min( total_reactants, vsc.fire_gas_combustion_ratio*firelevel ), 0.2)
oxygen = max(0,oxygen-consumed_gas) oxygen -= min(oxygen, (total_reactants-total_fuel)*consumed_gas/total_reactants )
toxins = max(0,toxins-consumed_gas) toxins -= min(toxins, toxins*consumed_gas/total_reactants )
carbon_dioxide += consumed_gas*2 carbon_dioxide += max(consumed_gas, 0)
if(fuel) if(fuel)
fuel.moles -= consumed_gas fuel.moles -= fuel.moles*consumed_gas/total_reactants
if(fuel.moles <= 0) del fuel if(fuel.moles <= 0) del fuel
if(liquid) if(liquid)
liquid.amount -= consumed_gas liquid.amount -= liquid.amount*consumed_gas/(total_reactants)
if(liquid.amount <= 0) del liquid if(liquid.amount <= 0) del liquid
update_values() update_values()
return consumed_gas*fuel_sources return consumed_gas
return 0 return 0
datum/gas_mixture/proc/calculate_firelevel(obj/effect/decal/cleanable/liquid_fuel/liquid) datum/gas_mixture/proc/calculate_firelevel(obj/effect/decal/cleanable/liquid_fuel/liquid)
//Calculates the firelevel based on one equation instead of having to do this multiple times in different areas. //Calculates the firelevel based on one equation instead of having to do this multiple times in different areas.
var var
datum/gas/volatile_fuel/fuel = locate() in trace_gases datum/gas/volatile_fuel/fuel = locate() in trace_gases
liquid_concentration = 0
oxy_concentration = oxygen / volume var/total_fuel = toxins - 0.5
tox_concentration = toxins / volume
fuel_concentration = 0
if(fuel) fuel_concentration = (fuel.moles) / volume if(liquid)
if(liquid) liquid_concentration = (liquid.amount*15) / volume total_fuel += (liquid.amount*15)
return (oxy_concentration + tox_concentration + liquid_concentration + fuel_concentration)*100
/mob/living/carbon/human/proc/FireBurn(mx as num) if(fuel)
total_fuel += fuel.moles
var/total_combustables = (total_fuel + oxygen)
if(total_fuel <= 0 || oxygen <= 0)
return 0
return max( 0, vsc.fire_firelevel_multiplier*(total_combustables/(total_combustables + nitrogen))*log(2*total_combustables/oxygen)*log(total_combustables/total_fuel))
/mob/living/carbon/human/proc/FireBurn(var/firelevel)
//Burns mobs due to fire. Respects heat transfer coefficients on various body parts. //Burns mobs due to fire. Respects heat transfer coefficients on various body parts.
//Due to TG reworking how fireprotection works, this is kinda less meaningful.
var var
head_exposure = 1 head_exposure = 1
@@ -271,20 +261,26 @@ datum/gas_mixture/proc/calculate_firelevel(obj/effect/decal/cleanable/liquid_fue
legs_exposure = 1 legs_exposure = 1
arms_exposure = 1 arms_exposure = 1
var/mx = min(max(0.1,firelevel / 20),10)
var/last_temperature = vsc.fire_temperature_multiplier*log(0.04*firelevel + 1.24)
//Get heat transfer coefficients for clothing. //Get heat transfer coefficients for clothing.
//skytodo: different handling of temp with tg //skytodo: kill anyone who breaks things then orders me to fix them
/*for(var/obj/item/clothing/C in src) for(var/obj/item/clothing/C in src)
if(l_hand == C || r_hand == C) continue if(l_hand == C || r_hand == C)
if(C.body_parts_covered & HEAD) continue
head_exposure *= C.heat_transfer_coefficient
if(C.body_parts_covered & UPPER_TORSO) if( C.max_heat_protection_temperature >= last_temperature )
chest_exposure *= C.heat_transfer_coefficient if(C.body_parts_covered & HEAD)
if(C.body_parts_covered & LOWER_TORSO) head_exposure = 0
groin_exposure *= C.heat_transfer_coefficient if(C.body_parts_covered & UPPER_TORSO)
if(C.body_parts_covered & LEGS) chest_exposure = 0
legs_exposure *= C.heat_transfer_coefficient if(C.body_parts_covered & LOWER_TORSO)
if(C.body_parts_covered & ARMS) groin_exposure = 0
arms_exposure *= C.heat_transfer_coefficient*/ if(C.body_parts_covered & LEGS)
legs_exposure = 0
if(C.body_parts_covered & ARMS)
arms_exposure = 0
//Always check these damage procs first if fire damage isn't working. They're probably what's wrong. //Always check these damage procs first if fire damage isn't working. They're probably what's wrong.
@@ -296,4 +292,5 @@ datum/gas_mixture/proc/calculate_firelevel(obj/effect/decal/cleanable/liquid_fue
apply_damage(0.4*mx*arms_exposure, BURN, "l_arm", 0, 0, "Fire") apply_damage(0.4*mx*arms_exposure, BURN, "l_arm", 0, 0, "Fire")
apply_damage(0.4*mx*arms_exposure, BURN, "r_arm", 0, 0, "Fire") apply_damage(0.4*mx*arms_exposure, BURN, "r_arm", 0, 0, "Fire")
//flash_pain() //flash_pain()
#undef ZAS_FIRE_CONSUMPTION_RATE

View File

@@ -21,7 +21,24 @@ proc/FloodFill(turf/simulated/start)
if(istype(O) && !(O in open) && !(O in closed) && O.ZCanPass(T)) if(istype(O) && !(O in open) && !(O in closed) && O.ZCanPass(T))
if(!O.HasDoor()) if(T.HasDoor())
//If they both have doors, then they are nto able to connect period.
if(O.HasDoor())
continue
//connect first to north and west
if(d == NORTH || d == WEST)
open += O
else
var/turf/simulated/W = get_step(O, WEST)
var/turf/simulated/N = get_step(O, NORTH)
if( !O.ZCanPass(N) && !O.ZCanPass(W) )
//If it cannot connect either to the north or west, connect it!
open += O
else if(!O.HasDoor())
open += O open += O
else else
@@ -92,6 +109,7 @@ proc/ZMerge(zone/A,zone/B)
proc/ZConnect(turf/simulated/A,turf/simulated/B) proc/ZConnect(turf/simulated/A,turf/simulated/B)
//Connects two zones by forming a connection object representing turfs A and B. //Connects two zones by forming a connection object representing turfs A and B.
//Make sure that if it's space, it gets added to unsimulated_tiles instead. //Make sure that if it's space, it gets added to unsimulated_tiles instead.
if(!istype(B)) if(!istype(B))
if(A.zone) if(A.zone)
@@ -108,8 +126,8 @@ proc/ZConnect(turf/simulated/A,turf/simulated/B)
//Make some preliminary checks to see if the connection is valid. //Make some preliminary checks to see if the connection is valid.
if(!A.zone || !B.zone) return if(!A.zone || !B.zone) return
if(A.zone == B.zone) return if(A.zone == B.zone) return
if(!A.CanPass(null,B,0,0)) return
if(A.CanPass(null,B,1.5,1)) if(A.CanPass(null,B,0,1))
return ZMerge(A.zone,B.zone) return ZMerge(A.zone,B.zone)
//Ensure the connection isn't already made. //Ensure the connection isn't already made.

View File

@@ -5,7 +5,7 @@ pl_control/var
PLASMA_DMG_NAME = "Plasma Damage Amount" PLASMA_DMG_NAME = "Plasma Damage Amount"
PLASMA_DMG_DESC = "Self Descriptive" PLASMA_DMG_DESC = "Self Descriptive"
CLOTH_CONTAMINATION = 0 CLOTH_CONTAMINATION = 1
CLOTH_CONTAMINATION_NAME = "Cloth Contamination" CLOTH_CONTAMINATION_NAME = "Cloth Contamination"
CLOTH_CONTAMINATION_DESC = "If this is on, plasma does damage by getting into cloth." CLOTH_CONTAMINATION_DESC = "If this is on, plasma does damage by getting into cloth."
@@ -17,7 +17,7 @@ pl_control/var
GENETIC_CORRUPTION_NAME = "Genetic Corruption Chance" GENETIC_CORRUPTION_NAME = "Genetic Corruption Chance"
GENETIC_CORRUPTION_DESC = "Chance of genetic corruption as well as toxic damage, X in 10,000." GENETIC_CORRUPTION_DESC = "Chance of genetic corruption as well as toxic damage, X in 10,000."
SKIN_BURNS = 1 SKIN_BURNS = 0
SKIN_BURNS_DESC = "Plasma has an effect similar to mustard gas on the un-suited." SKIN_BURNS_DESC = "Plasma has an effect similar to mustard gas on the un-suited."
SKIN_BURNS_NAME = "Skin Burns" SKIN_BURNS_NAME = "Skin Burns"
@@ -25,7 +25,7 @@ pl_control/var
EYE_BURNS_NAME = "Eye Burns" EYE_BURNS_NAME = "Eye Burns"
EYE_BURNS_DESC = "Plasma burns the eyes of anyone not wearing eye protection." EYE_BURNS_DESC = "Plasma burns the eyes of anyone not wearing eye protection."
CONTAMINATION_LOSS = 0.01 CONTAMINATION_LOSS = 0.02
CONTAMINATION_LOSS_NAME = "Contamination Loss" CONTAMINATION_LOSS_NAME = "Contamination Loss"
CONTAMINATION_LOSS_DESC = "How much toxin damage is dealt from contaminated clothing" //Per tick? ASK ARYN CONTAMINATION_LOSS_DESC = "How much toxin damage is dealt from contaminated clothing" //Per tick? ASK ARYN
@@ -42,11 +42,10 @@ obj/var/contaminated = 0
obj/item/proc obj/item/proc
can_contaminate() can_contaminate()
return 0
//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/clothing)) return 1 else if(istype(src,/obj/item/clothing)) return 1
else if(istype(src,/obj/item/weapon/storage/backpack)) return 1
contaminate() 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.

View File

@@ -2,40 +2,69 @@ var/global/vs_control/vsc = new
vs_control/var vs_control/var
IgnitionLevel = 0.5 IgnitionLevel = 0.5
IgnitionLevel_DESC = "Moles of oxygen+plasma - co2 needed to burn." IgnitionLevel_DESC = "Determines point at which fire can ignite"
airflow_lightest_pressure = 30
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."
fire_firelevel_multiplier = 25
fire_firelevel_multiplier_NAME = "Fire - Firelevel Constant"
fire_firelevel_multiplier_DESC = "Multiplied by the equation for firelevel, affects the combustion and ignition of gas mixes."
fire_temperature_multiplier = 1700
fire_temperature_multiplier_NAME = "Fire - Temperature Multiplier"
fire_temperature_multiplier_DESC = "Base value for fire temperatures."
fire_gas_combustion_ratio = 0.25
fire_gas_combustion_ratio_NAME = "Fire - Gas Conversion Ratio"
fire_gas_combustion_ratio_DESC = "The rate at which oxygen and plasma are converted to CO2, expressed in terms of the firelevel."
airflow_lightest_pressure = 20
airflow_lightest_pressure_NAME = "Airflow - Small Movement Threshold %" 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." airflow_lightest_pressure_DESC = "Percent of 1 Atm. at which items with the small weight classes will move."
airflow_light_pressure = 45
airflow_light_pressure = 35
airflow_light_pressure_NAME = "Airflow - Medium Movement Threshold %" 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." airflow_light_pressure_DESC = "Percent of 1 Atm. at which items with the medium weight classes will move."
airflow_medium_pressure = 90
airflow_medium_pressure = 50
airflow_medium_pressure_NAME = "Airflow - Heavy Movement Threshold %" 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." airflow_medium_pressure_DESC = "Percent of 1 Atm. at which items with the largest weight classes will move."
airflow_heavy_pressure = 95
airflow_heavy_pressure = 65
airflow_heavy_pressure_NAME = "Airflow - Mob Movement Threshold %" airflow_heavy_pressure_NAME = "Airflow - Mob Movement Threshold %"
airflow_heavy_pressure_DESC = "Percent of 1 Atm. at which mobs will move." airflow_heavy_pressure_DESC = "Percent of 1 Atm. at which mobs will move."
airflow_dense_pressure = 120
airflow_dense_pressure = 85
airflow_dense_pressure_NAME = "Airflow - Dense Movement Threshold %" 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." airflow_dense_pressure_DESC = "Percent of 1 Atm. at which items with canisters and closets will move."
airflow_stun_pressure = 100
airflow_stun_pressure = 60
airflow_stun_pressure_NAME = "Airflow - Mob Stunning Threshold %" airflow_stun_pressure_NAME = "Airflow - Mob Stunning Threshold %"
airflow_stun_pressure_DESC = "Percent of 1 Atm. at which mobs will be stunned by airflow." airflow_stun_pressure_DESC = "Percent of 1 Atm. at which mobs will be stunned by airflow."
airflow_stun_cooldown = 60 airflow_stun_cooldown = 60
airflow_stun_cooldown_NAME = "Aiflow Stunning - Cooldown" airflow_stun_cooldown_NAME = "Aiflow Stunning - Cooldown"
airflow_stun_cooldown_DESC = "How long, in tenths of a second, to wait before stunning them again." airflow_stun_cooldown_DESC = "How long, in tenths of a second, to wait before stunning them again."
airflow_stun = 0.15
airflow_stun = 1
airflow_stun_NAME = "Airflow Impact - Stunning" airflow_stun_NAME = "Airflow Impact - Stunning"
airflow_stun_DESC = "How much a mob is stunned when hit by an object." airflow_stun_DESC = "How much a mob is stunned when hit by an object."
airflow_damage = 0.3
airflow_damage = 2
airflow_damage_NAME = "Airflow Impact - Damage" airflow_damage_NAME = "Airflow Impact - Damage"
airflow_damage_DESC = "Damage from airflow impacts." airflow_damage_DESC = "Damage from airflow impacts."
airflow_speed_decay = 1.5 airflow_speed_decay = 1.5
airflow_speed_decay_NAME = "Airflow Speed Decay" airflow_speed_decay_NAME = "Airflow Speed Decay"
airflow_speed_decay_DESC = "How rapidly the speed gained from airflow decays." airflow_speed_decay_DESC = "How rapidly the speed gained from airflow decays."
airflow_delay = 30 airflow_delay = 30
airflow_delay_NAME = "Airflow Retrigger Delay" airflow_delay_NAME = "Airflow Retrigger Delay"
airflow_delay_DESC = "Time in deciseconds before things can be moved by airflow again." airflow_delay_DESC = "Time in deciseconds before things can be moved by airflow again."
airflow_mob_slowdown = 1 airflow_mob_slowdown = 1
airflow_mob_slowdown_NAME = "Airflow Slowdown" 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." 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."
@@ -164,21 +193,22 @@ vs_control
return return
switch(def) switch(def)
if("Plasma - Standard") if("Plasma - Standard")
plc.CLOTH_CONTAMINATION = 0 //If this is on, plasma does damage by getting into cloth. plc.CLOTH_CONTAMINATION = 1 //If this is on, plasma does damage by getting into cloth.
plc.PLASMAGUARD_ONLY = 0 plc.PLASMAGUARD_ONLY = 0
plc.GENETIC_CORRUPTION = 0 //Chance of genetic corruption as well as toxic damage, X in 1000. plc.GENETIC_CORRUPTION = 0 //Chance of genetic corruption as well as toxic damage, X in 1000.
plc.SKIN_BURNS = 0 //Plasma has an effect similar to mustard gas on the un-suited. plc.SKIN_BURNS = 0 //Plasma has an effect similar to mustard gas on the un-suited.
plc.EYE_BURNS = 0 //Plasma burns the eyes of anyone not wearing eye protection. plc.EYE_BURNS = 1 //Plasma burns the eyes of anyone not wearing eye protection.
plc.PLASMA_HALLUCINATION = 0 plc.PLASMA_HALLUCINATION = 0
plc.CONTAMINATION_LOSS = 0 plc.CONTAMINATION_LOSS = 0.02
if("Plasma - Low Hazard") if("Plasma - Low Hazard")
plc.CLOTH_CONTAMINATION = 0 //If this is on, plasma does damage by getting into cloth. plc.CLOTH_CONTAMINATION = 0 //If this is on, plasma does damage by getting into cloth.
plc.PLASMAGUARD_ONLY = 0 plc.PLASMAGUARD_ONLY = 0
plc.GENETIC_CORRUPTION = 0 //Chance of genetic corruption as well as toxic damage, X in 1000 plc.GENETIC_CORRUPTION = 0 //Chance of genetic corruption as well as toxic damage, X in 1000
plc.SKIN_BURNS = 1 //Plasma has an effect similar to mustard gas on the un-suited. plc.SKIN_BURNS = 0 //Plasma has an effect similar to mustard gas on the un-suited.
plc.EYE_BURNS = 0 //Plasma burns the eyes of anyone not wearing eye protection. plc.EYE_BURNS = 1 //Plasma burns the eyes of anyone not wearing eye protection.
plc.CONTAMINATION_LOSS = 0 plc.PLASMA_HALLUCINATION = 0
plc.CONTAMINATION_LOSS = 0.01
if("Plasma - High Hazard") if("Plasma - High Hazard")
plc.CLOTH_CONTAMINATION = 1 //If this is on, plasma does damage by getting into cloth. plc.CLOTH_CONTAMINATION = 1 //If this is on, plasma does damage by getting into cloth.
@@ -186,6 +216,8 @@ vs_control
plc.GENETIC_CORRUPTION = 0 //Chance of genetic corruption as well as toxic damage, X in 1000. plc.GENETIC_CORRUPTION = 0 //Chance of genetic corruption as well as toxic damage, X in 1000.
plc.SKIN_BURNS = 1 //Plasma has an effect similar to mustard gas on the un-suited. plc.SKIN_BURNS = 1 //Plasma has an effect similar to mustard gas on the un-suited.
plc.EYE_BURNS = 1 //Plasma burns the eyes of anyone not wearing eye protection. plc.EYE_BURNS = 1 //Plasma burns the eyes of anyone not wearing eye protection.
plc.PLASMA_HALLUCINATION = 1
plc.CONTAMINATION_LOSS = 0.05
if("Plasma - Oh Shit!") if("Plasma - Oh Shit!")
plc.CLOTH_CONTAMINATION = 1 //If this is on, plasma does damage by getting into cloth. plc.CLOTH_CONTAMINATION = 1 //If this is on, plasma does damage by getting into cloth.
@@ -193,18 +225,20 @@ vs_control
plc.GENETIC_CORRUPTION = 5 //Chance of genetic corruption as well as toxic damage, X in 1000. plc.GENETIC_CORRUPTION = 5 //Chance of genetic corruption as well as toxic damage, X in 1000.
plc.SKIN_BURNS = 1 //Plasma has an effect similar to mustard gas on the un-suited. plc.SKIN_BURNS = 1 //Plasma has an effect similar to mustard gas on the un-suited.
plc.EYE_BURNS = 1 //Plasma burns the eyes of anyone not wearing eye protection. plc.EYE_BURNS = 1 //Plasma burns the eyes of anyone not wearing eye protection.
plc.PLASMA_HALLUCINATION = 1
plc.CONTAMINATION_LOSS = 0.075
if("ZAS - Normal") if("ZAS - Normal")
IgnitionLevel = 0.5 IgnitionLevel = 0.5
airflow_lightest_pressure = 30 airflow_lightest_pressure = 20
airflow_light_pressure = 45 airflow_light_pressure = 35
airflow_medium_pressure = 90 airflow_medium_pressure = 50
airflow_heavy_pressure = 95 airflow_heavy_pressure = 65
airflow_dense_pressure = 120 airflow_dense_pressure = 85
airflow_stun_pressure = 100 airflow_stun_pressure = 60
airflow_stun_cooldown = 60 airflow_stun_cooldown = 60
airflow_stun = 0.15 airflow_stun = 1
airflow_damage = 0.3 airflow_damage = 2
airflow_speed_decay = 1.5 airflow_speed_decay = 1.5
airflow_delay = 30 airflow_delay = 30
airflow_mob_slowdown = 1 airflow_mob_slowdown = 1
@@ -226,15 +260,15 @@ vs_control
if("ZAS - Dangerous") if("ZAS - Dangerous")
IgnitionLevel = 0.4 IgnitionLevel = 0.4
airflow_lightest_pressure = 25 airflow_lightest_pressure = 15
airflow_light_pressure = 35 airflow_light_pressure = 30
airflow_medium_pressure = 75 airflow_medium_pressure = 45
airflow_heavy_pressure = 80 airflow_heavy_pressure = 55
airflow_dense_pressure = 100 airflow_dense_pressure = 70
airflow_stun_pressure = 90 airflow_stun_pressure = 50
airflow_stun_cooldown = 50 airflow_stun_cooldown = 50
airflow_stun = 2 airflow_stun = 2
airflow_damage = 1 airflow_damage = 3
airflow_speed_decay = 1.2 airflow_speed_decay = 1.2
airflow_delay = 25 airflow_delay = 25
airflow_mob_slowdown = 2 airflow_mob_slowdown = 2
@@ -243,13 +277,13 @@ vs_control
IgnitionLevel = 0.3 IgnitionLevel = 0.3
airflow_lightest_pressure = 20 airflow_lightest_pressure = 20
airflow_light_pressure = 30 airflow_light_pressure = 30
airflow_medium_pressure = 70 airflow_medium_pressure = 40
airflow_heavy_pressure = 75 airflow_heavy_pressure = 50
airflow_dense_pressure = 80 airflow_dense_pressure = 60
airflow_stun_pressure = 70 airflow_stun_pressure = 40
airflow_stun_cooldown = 40 airflow_stun_cooldown = 40
airflow_stun = 3 airflow_stun = 3
airflow_damage = 2 airflow_damage = 4
airflow_speed_decay = 1 airflow_speed_decay = 1
airflow_delay = 20 airflow_delay = 20
airflow_mob_slowdown = 3 airflow_mob_slowdown = 3

View File

@@ -198,6 +198,9 @@ turf
else else
zone.RemoveTurf(NT) //Not adjacent to anything, and unsimulated. Goodbye~ zone.RemoveTurf(NT) //Not adjacent to anything, and unsimulated. Goodbye~
//To make a closed connection through closed door.
ZConnect(T, src)
if(T.zone && !T.zone.rebuild) //I block air. if(T.zone && !T.zone.rebuild) //I block air.
var/turf/NT = get_step(src, reverse_direction(direction)) var/turf/NT = get_step(src, reverse_direction(direction))
if(istype(NT,/turf/simulated) && (NT in T.zone.contents || (NT.zone && T in NT.zone.contents))) if(istype(NT,/turf/simulated) && (NT in T.zone.contents || (NT.zone && T in NT.zone.contents)))

View File

@@ -12,6 +12,7 @@ zone
list/connections // /connection objects which refer to connections with other zones, e.g. through a door. 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 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.
list/unsimulated_tiles // Any space tiles in this list will cause air to flow out. list/unsimulated_tiles // Any space tiles in this list will cause air to flow out.
last_update = 0 last_update = 0
progress = "nothing" progress = "nothing"
@@ -200,7 +201,7 @@ zone/proc/process()
progress = "problem with an inbuilt byond function: some conditional checks" progress = "problem with an inbuilt byond function: some conditional checks"
//Only run through the individual turfs if there's reason to. //Only run through the individual turfs if there's reason to.
if(air.graphic != air.graphic_archived || air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST) if(air.graphic != air.graphic_archived || air.temperature > PLASMA_FLASHPOINT)
progress = "problem with: turf/simulated/update_visuals()" progress = "problem with: turf/simulated/update_visuals()"
@@ -215,10 +216,10 @@ zone/proc/process()
progress = "problem with: item or turf temperature_expose()" progress = "problem with: item or turf temperature_expose()"
//Expose stuff to extreme heat. //Expose stuff to extreme heat.
if(air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST) if(air.temperature > PLASMA_FLASHPOINT)
for(var/atom/movable/item in S) for(var/atom/movable/item in S)
item.temperature_expose(air, air.temperature, CELL_VOLUME) item.temperature_expose(air, air.temperature, CELL_VOLUME)
S.temperature_expose(air, air.temperature, CELL_VOLUME) S.hotspot_expose(air.temperature, CELL_VOLUME)
progress = "problem with: calculating air graphic" progress = "problem with: calculating air graphic"
@@ -244,9 +245,11 @@ zone/proc/process()
//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.
if(C && C.indirect == 2 && C.A.zone && C.B.zone) //indirect = 2 is a direct connection. if(C && C.A.zone && C.B.zone)
if(C.A.zone.air.compare(C.B.zone.air) || unsimulated_tiles) //indirect = 2 is a direct connection.
ZMerge(C.A.zone,C.B.zone) if(C.indirect == 2 )
if(C.A.zone.air.compare(C.B.zone.air) || unsimulated_tiles)
ZMerge(C.A.zone,C.B.zone)
progress = "problem with: ShareRatio(), Airflow(), a couple of misc procs" progress = "problem with: ShareRatio(), Airflow(), a couple of misc procs"
@@ -269,19 +272,24 @@ zone/proc/process()
Airflow(src,Z) Airflow(src,Z)
ShareRatio( air , Z.air , connected_zones[Z] ) ShareRatio( air , Z.air , connected_zones[Z] )
for(var/zone/Z in closed_connection_zones)
if(air && Z.air)
if( abs(air.temperature - Z.air.temperature) > 10 )
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"
//////////////// ////////////////
//Air Movement// //Air Movement//
//////////////// ////////////////
var/list/sharing_lookup_table = list(0.06, 0.11, 0.15, 0.18, 0.20, 0.21) var/list/sharing_lookup_table = list(0.15, 0.20, 0.24, 0.27, 0.30, 0.33)
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.
var var
//WOOT WOOT TOUCH THIS AND YOU ARE A RETARD //WOOT WOOT TOUCH THIS AND YOU ARE A RETARD
ratio = 0.21 ratio = 0.33
//WOOT WOOT TOUCH THIS AND YOU ARE A RETARD //WOOT WOOT TOUCH THIS AND YOU ARE A RETARD
size = max(1,A.group_multiplier) size = max(1,A.group_multiplier)
@@ -367,39 +375,37 @@ proc/ShareSpace(datum/gas_mixture/A, list/unsimulated_tiles)
unsim_temperature += T.temperature/unsimulated_tiles.len unsim_temperature += T.temperature/unsimulated_tiles.len
var var
// Depressurize very, very fast(it's fine since many rooms are internally multiple zones) ratio = 0.33
ratio = 0.21
old_pressure = A.return_pressure() old_pressure = A.return_pressure()
size = max(1,A.group_multiplier) size = max(1,A.group_multiplier)
share_size = max(1,unsimulated_tiles.len) share_size = max(1,unsimulated_tiles.len)
//full_oxy = A.oxygen * size full_oxy = A.oxygen * size
//full_nitro = A.nitrogen * size full_nitro = A.nitrogen * size
//full_co2 = A.carbon_dioxide * size full_co2 = A.carbon_dioxide * size
//full_plasma = A.toxins * size full_plasma = A.toxins * size
//full_heat_capacity = A.heat_capacity() * size full_heat_capacity = A.heat_capacity() * size
oxy_avg = unsim_oxygen//(full_oxy + unsim_oxygen) / (size + share_size) oxy_avg = (full_oxy + unsim_oxygen) / (size + share_size)
nit_avg = unsim_nitrogen//(full_nitro + unsim_nitrogen) / (size + share_size) nit_avg = (full_nitro + unsim_nitrogen) / (size + share_size)
co2_avg = unsim_co2//(full_co2 + unsim_co2) / (size + share_size) co2_avg = (full_co2 + unsim_co2) / (size + share_size)
plasma_avg = unsim_plasma//(full_plasma + unsim_plasma) / (size + share_size) plasma_avg = (full_plasma + unsim_plasma) / (size + share_size)
temp_avg = (A.temperature * full_heat_capacity + unsim_temperature * unsim_heat_capacity) / (full_heat_capacity + unsim_heat_capacity)
//WOOT WOOT TOUCH THIS AND YOU ARE A RETARD
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 ratio *= 2
//WOOT WOOT TOUCH THIS AND YOU ARE A RETARD
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 )
A.carbon_dioxide = max(0, (A.carbon_dioxide - co2_avg) * (1-ratio) + co2_avg ) A.carbon_dioxide = max(0, (A.carbon_dioxide - co2_avg) * (1-ratio) + co2_avg )
A.toxins = max(0, (A.toxins - plasma_avg) * (1-ratio) + plasma_avg ) A.toxins = max(0, (A.toxins - plasma_avg) * (1-ratio) + plasma_avg )
// EXPERIMENTAL: Disable space being cold A.temperature = max(TCMB, (A.temperature - temp_avg) * (1-ratio) + temp_avg )
//A.temperature = max(TCMB, (A.temperature - temp_avg) * (1-ratio) + temp_avg )
for(var/datum/gas/G in A.trace_gases) for(var/datum/gas/G in A.trace_gases)
var/G_avg = (G.moles*size + 0) / (size+share_size) var/G_avg = (G.moles*size + 0) / (size+share_size)
@@ -409,6 +415,29 @@ proc/ShareSpace(datum/gas_mixture/A, list/unsimulated_tiles)
return abs(old_pressure - A.return_pressure()) return abs(old_pressure - A.return_pressure())
proc/ShareHeat(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
//Shares a specific ratio of gas between mixtures using simple weighted averages.
var
//WOOT WOOT TOUCH THIS AND YOU ARE A RETARD
ratio = 0.33
//WOOT WOOT TOUCH THIS AND YOU ARE A RETARD
full_heat_capacity = A.heat_capacity()
s_full_heat_capacity = B.heat_capacity()
temp_avg = (A.temperature * full_heat_capacity + B.temperature * s_full_heat_capacity) / (full_heat_capacity + s_full_heat_capacity)
//WOOT WOOT TOUCH THIS AND YOU ARE A RETARD
if(sharing_lookup_table.len >= connecting_tiles) //6 or more interconnecting tiles will max at 42% of air moved per tick.
ratio = sharing_lookup_table[connecting_tiles]
//WOOT WOOT TOUCH THIS AND YOU ARE A RETARD
A.temperature = max(0, (A.temperature - temp_avg) * (1- (ratio / max(1,A.group_multiplier)) ) + temp_avg )
B.temperature = max(0, (B.temperature - temp_avg) * (1- (ratio / max(1,B.group_multiplier)) ) + temp_avg )
/////////////////// ///////////////////
//Zone Rebuilding// //Zone Rebuilding//
/////////////////// ///////////////////
@@ -489,6 +518,7 @@ 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) proc/play_wind_sound(var/turf/random_border, var/n)
if(random_border) if(random_border)
var/windsound = 'sound/effects/wind/wind_2_1.ogg' var/windsound = 'sound/effects/wind/wind_2_1.ogg'

View File

@@ -38,12 +38,6 @@ datum/controller/game_controller/New()
del(master_controller) del(master_controller)
master_controller = src master_controller = src
createRandomZlevel()
if(!air_master)
air_master = new /datum/controller/air_system()
air_master.setup()
if(!job_master) if(!job_master)
job_master = new /datum/controller/occupations() job_master = new /datum/controller/occupations()
job_master.SetupOccupations() job_master.SetupOccupations()
@@ -52,13 +46,20 @@ datum/controller/game_controller/New()
if(!syndicate_code_phrase) syndicate_code_phrase = generate_code_phrase() if(!syndicate_code_phrase) syndicate_code_phrase = generate_code_phrase()
if(!syndicate_code_response) syndicate_code_response = generate_code_phrase() if(!syndicate_code_response) syndicate_code_response = generate_code_phrase()
if(!ticker) ticker = new /datum/controller/gameticker()
if(!emergency_shuttle) emergency_shuttle = new /datum/shuttle_controller/emergency_shuttle() if(!emergency_shuttle) emergency_shuttle = new /datum/shuttle_controller/emergency_shuttle()
datum/controller/game_controller/proc/setup() datum/controller/game_controller/proc/setup()
world.tick_lag = config.Ticklag world.tick_lag = config.Ticklag
createRandomZlevel()
if(!air_master)
air_master = new /datum/controller/air_system()
air_master.setup()
if(!ticker)
ticker = new /datum/controller/gameticker()
setup_objects() setup_objects()
setupgenetics() setupgenetics()
setupfactions() setupfactions()
@@ -71,6 +72,9 @@ datum/controller/game_controller/proc/setup()
if(ticker) if(ticker)
ticker.pregame() ticker.pregame()
lighting_controller.Initialize()
datum/controller/game_controller/proc/setup_objects() datum/controller/game_controller/proc/setup_objects()
world << "\red \b Initializing objects" world << "\red \b Initializing objects"
sleep(-1) sleep(-1)

View File

@@ -24,7 +24,7 @@
U.hastie = new /obj/item/clothing/tie/medal/gold/captain(U) U.hastie = new /obj/item/clothing/tie/medal/gold/captain(U)
H.equip_to_slot_or_del(U, slot_w_uniform) H.equip_to_slot_or_del(U, slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/captain(H), slot_belt) H.equip_to_slot_or_del(new /obj/item/device/pda/captain(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/captain(H), slot_wear_suit) //H.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/captain(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/head/caphat(H), slot_head) H.equip_to_slot_or_del(new /obj/item/clothing/head/caphat(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses) H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses)

File diff suppressed because it is too large Load Diff

View File

@@ -136,6 +136,9 @@
else else
can_label = 0 can_label = 0
if(air_contents.temperature > PLASMA_FLASHPOINT)
air_contents.zburn()
src.updateDialog() src.updateDialog()
return return

View File

@@ -78,6 +78,8 @@
/obj/machinery/door/proc/bumpopen(mob/user as mob) /obj/machinery/door/proc/bumpopen(mob/user as mob)
if(operating) return if(operating) return
if(user.last_airflow > world.time - vsc.airflow_delay) //Fakkit
return
src.add_fingerprint(user) src.add_fingerprint(user)
if(!src.requiresID()) if(!src.requiresID())
user = null user = null
@@ -229,6 +231,11 @@
SetOpacity(1) //caaaaarn! SetOpacity(1) //caaaaarn!
operating = 0 operating = 0
update_nearby_tiles() update_nearby_tiles()
//I shall not add a check every x ticks if a door has closed over some fire.
var/obj/fire/fire = locate() in loc
if(fire)
del fire
return return
/obj/machinery/door/proc/requiresID() /obj/machinery/door/proc/requiresID()

View File

@@ -17,6 +17,11 @@
New() New()
. = ..() . = ..()
for(var/obj/machinery/door/firedoor/F in loc)
if(F != src)
spawn(1)
del src
return .
var/area/A = get_area(src) var/area/A = get_area(src)
ASSERT(istype(A)) ASSERT(istype(A))
@@ -134,7 +139,7 @@
else else
users_name = "Unknown" users_name = "Unknown"
if( !stat && ( istype(C, /obj/item/weapon/card/id) || istype(C, /obj/item/device/pda) ) ) if( ishuman(user) && !stat && ( istype(C, /obj/item/weapon/card/id) || istype(C, /obj/item/device/pda) ) )
var/obj/item/weapon/card/id/ID = C var/obj/item/weapon/card/id/ID = C
if( istype(C, /obj/item/device/pda) ) if( istype(C, /obj/item/device/pda) )
@@ -223,6 +228,8 @@
/obj/machinery/door/firedoor/border_only /obj/machinery/door/firedoor/border_only
//These are playing merry hell on ZAS. Sorry fellas :(
/*
icon = 'icons/obj/doors/edge_Doorfire.dmi' icon = 'icons/obj/doors/edge_Doorfire.dmi'
glass = 1 //There is a glass window so you can see through the door glass = 1 //There is a glass window so you can see through the door
//This is needed due to BYOND limitations in controlling visibility //This is needed due to BYOND limitations in controlling visibility
@@ -257,3 +264,4 @@
if(istype(source)) air_master.tiles_to_update += source if(istype(source)) air_master.tiles_to_update += source
if(istype(destination)) air_master.tiles_to_update += destination if(istype(destination)) air_master.tiles_to_update += destination
return 1 return 1
*/

View File

@@ -40,6 +40,9 @@
for(var/atom/A in contents) for(var/atom/A in contents)
A.clean_blood() A.clean_blood()
for(var/obj/item/I in contents)
I.decontaminate()
//Tanning! //Tanning!
for(var/obj/item/stack/sheet/hairlesshide/HH in contents) for(var/obj/item/stack/sheet/hairlesshide/HH in contents)
var/obj/item/stack/sheet/wetleather/WL = new(src) var/obj/item/stack/sheet/wetleather/WL = new(src)

View File

@@ -26,10 +26,11 @@ obj/effect/decal/cleanable/liquid_fuel
if(!istype(S)) return if(!istype(S)) return
for(var/d in cardinal) for(var/d in cardinal)
if(rand(25)) if(rand(25))
var/turf/simulated/O = get_step(src,d) var/turf/simulated/target = get_step(src,d)
if(O.CanPass(target = get_turf(src), air_group = 1)) var/turf/simulated/origin = get_turf(src)
if(!locate(/obj/effect/decal/cleanable/liquid_fuel) in O) if(origin.CanPass(null, target, 0, 0) && target.CanPass(null, origin, 0, 0))
new/obj/effect/decal/cleanable/liquid_fuel(O,amount*0.25) if(!locate(/obj/effect/decal/cleanable/liquid_fuel) in target)
new/obj/effect/decal/cleanable/liquid_fuel(target, amount*0.25)
amount *= 0.75 amount *= 0.75
flamethrower_fuel flamethrower_fuel
@@ -38,18 +39,19 @@ obj/effect/decal/cleanable/liquid_fuel
New(newLoc, amt = 1, d = 0) New(newLoc, amt = 1, d = 0)
dir = d //Setting this direction means you won't get torched by your own flamethrower. dir = d //Setting this direction means you won't get torched by your own flamethrower.
. = ..() . = ..()
Spread() Spread()
//The spread for flamethrower fuel is much more precise, to create a wide fire pattern. //The spread for flamethrower fuel is much more precise, to create a wide fire pattern.
if(amount < 0.1) return if(amount < 0.1) return
var/turf/simulated/S = loc var/turf/simulated/S = loc
if(!istype(S)) return if(!istype(S)) return
for(var/d in list(turn(dir,90),turn(dir,-90))) for(var/d in list(turn(dir,90),turn(dir,-90), dir))
var/turf/simulated/O = get_step(S,d) var/turf/simulated/O = get_step(S,d)
if(locate(/obj/effect/decal/cleanable/liquid_fuel/flamethrower_fuel) in O) if(locate(/obj/effect/decal/cleanable/liquid_fuel/flamethrower_fuel) in O)
continue continue
if(O.CanPass(target = get_turf(src), air_group = 1)) if(O.CanPass(null, S, 0, 0) && S.CanPass(null, O, 0, 0))
new/obj/effect/decal/cleanable/liquid_fuel/flamethrower_fuel(O,amount*0.25,d) new/obj/effect/decal/cleanable/liquid_fuel/flamethrower_fuel(O,amount*0.25,d)
O.hotspot_expose((T20C*2) + 380,500) //Light flamethrower fuel on fire immediately. O.hotspot_expose((T20C*2) + 380,500) //Light flamethrower fuel on fire immediately.
amount *= 0.5 amount *= 0.25

View File

@@ -110,15 +110,11 @@
icon = 'icons/mob/screen1.dmi' icon = 'icons/mob/screen1.dmi'
icon_state = "x" icon_state = "x"
var/btype = 0 // 0=radio, 1=prox, 2=time var/btype = 0 // 0=radio, 1=prox, 2=time
var/btemp1 = 1500
var/btemp2 = 1000 // tank temperatures
timer timer
btype = 2 btype = 2
syndicate syndicate
btemp1 = 150
btemp2 = 20
proximity proximity
btype = 1 btype = 1
@@ -130,75 +126,49 @@
/obj/effect/spawner/newbomb/New() /obj/effect/spawner/newbomb/New()
..() ..()
var/obj/item/device/transfer_valve/V = new(src.loc)
var/obj/item/weapon/tank/plasma/PT = new(V)
var/obj/item/weapon/tank/oxygen/OT = new(V)
V.tank_one = PT
V.tank_two = OT
PT.master = V
OT.master = V
PT.air_contents.temperature = PLASMA_FLASHPOINT
PT.air_contents.toxins = 15
PT.air_contents.carbon_dioxide = 33
PT.air_contents.update_values()
OT.air_contents.temperature = PLASMA_FLASHPOINT
OT.air_contents.oxygen = 48
OT.air_contents.update_values()
var/obj/item/device/assembly/S
switch (src.btype) switch (src.btype)
// radio // radio
if (0) if (0)
var/obj/item/device/transfer_valve/V = new(src.loc) S = new/obj/item/device/assembly/signaler(V)
var/obj/item/weapon/tank/plasma/PT = new(V)
var/obj/item/weapon/tank/oxygen/OT = new(V)
var/obj/item/device/assembly/signaler/S = new(V)
V.tank_one = PT
V.tank_two = OT
V.attached_device = S
S.holder = V
S.toggle_secure()
PT.master = V
OT.master = V
PT.air_contents.temperature = btemp1 + T0C
OT.air_contents.temperature = btemp2 + T0C
V.update_icon()
// proximity // proximity
if (1) if (1)
var/obj/item/device/transfer_valve/V = new(src.loc) S = new/obj/item/device/assembly/prox_sensor(V)
var/obj/item/weapon/tank/plasma/PT = new(V)
var/obj/item/weapon/tank/oxygen/OT = new(V)
var/obj/item/device/assembly/prox_sensor/P = new(V)
V.tank_one = PT
V.tank_two = OT
V.attached_device = P
P.holder = V
P.toggle_secure()
PT.master = V
OT.master = V
PT.air_contents.temperature = btemp1 + T0C
OT.air_contents.temperature = btemp2 + T0C
V.update_icon()
// timer // timer
if (2) if (2)
var/obj/item/device/transfer_valve/V = new(src.loc)
var/obj/item/weapon/tank/plasma/PT = new(V)
var/obj/item/weapon/tank/oxygen/OT = new(V)
var/obj/item/device/assembly/timer/T = new(V) S = new/obj/item/device/assembly/timer(V)
V.tank_one = PT
V.tank_two = OT
V.attached_device = T
T.holder = V V.attached_device = S
T.toggle_secure()
PT.master = V
OT.master = V
T.time = 30
PT.air_contents.temperature = btemp1 + T0C S.holder = V
OT.air_contents.temperature = btemp2 + T0C S.toggle_secure()
V.update_icon()
V.update_icon()
del(src) del(src)

View File

@@ -117,7 +117,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/captain /obj/item/device/pda/captain
default_cartridge = /obj/item/weapon/cartridge/captain default_cartridge = /obj/item/weapon/cartridge/captain
icon_state = "pda-c" icon_state = "pda-c"
toff = 1 detonate = 0
//toff = 1
/obj/item/device/pda/cargo /obj/item/device/pda/cargo
default_cartridge = /obj/item/weapon/cartridge/quartermaster default_cartridge = /obj/item/weapon/cartridge/quartermaster

View File

@@ -209,15 +209,17 @@
/obj/item/weapon/flamethrower/proc/ignite_turf(turf/target) /obj/item/weapon/flamethrower/proc/ignite_turf(turf/target)
//TODO: DEFERRED Consider checking to make sure tank pressure is high enough before doing this... //TODO: DEFERRED Consider checking to make sure tank pressure is high enough before doing this...
//Transfer 5% of current tank air contents to turf //Transfer 5% of current tank air contents to turf
var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(0.05) var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(0.02*(throw_amount/100))
air_transfer.toxins = air_transfer.toxins * 5 // This is me not comprehending the air system. I realize this is retarded and I could probably make it work without fucking it up like this, but there you have it. -- TLE //air_transfer.toxins = air_transfer.toxins * 5 // This is me not comprehending the air system. I realize this is retarded and I could probably make it work without fucking it up like this, but there you have it. -- TLE
new/obj/effect/decal/cleanable/liquid_fuel/flamethrower_fuel(target,air_transfer.toxins,get_dir(loc,target))
air_transfer.toxins = 0
target.assume_air(air_transfer) target.assume_air(air_transfer)
//Burn it based on transfered gas //Burn it based on transfered gas
//target.hotspot_expose(part4.air_contents.temperature*2,300)
target.hotspot_expose((ptank.air_contents.temperature*2) + 380,500) // -- More of my "how do I shot fire?" dickery. -- TLE target.hotspot_expose((ptank.air_contents.temperature*2) + 380,500) // -- More of my "how do I shot fire?" dickery. -- TLE
//location.hotspot_expose(1000,500,1) //location.hotspot_expose(1000,500,1)
return return
/obj/item/weapon/flamethrower/full/New(var/loc) /obj/item/weapon/flamethrower/full/New(var/loc)
..() ..()
weldtool = new /obj/item/weapon/weldingtool(src) weldtool = new /obj/item/weapon/weldingtool(src)

View File

@@ -114,7 +114,7 @@
activate(mob/user as mob) activate(mob/user as mob)
if(active) return if(active) return
if(detonator) if(detonator)
if(!isigniter(detonator.a_left)) if(!isigniter(detonator.a_left))
detonator.a_left.activate() detonator.a_left.activate()
@@ -216,9 +216,11 @@
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src) var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src) var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("aluminum", 25) B1.reagents.add_reagent("aluminum", 15)
B2.reagents.add_reagent("plasma", 25) B1.reagents.add_reagent("fuel",20)
B2.reagents.add_reagent("sacid", 25) B2.reagents.add_reagent("plasma", 15)
B2.reagents.add_reagent("sacid", 15)
B1.reagents.add_reagent("fuel",20)
detonator = new/obj/item/device/assembly_holder/timer_igniter(src) detonator = new/obj/item/device/assembly_holder/timer_igniter(src)

View File

@@ -251,8 +251,9 @@
W.zone = src.zone W.zone = src.zone
W.zone.AddTurf(W) W.zone.AddTurf(W)
for(var/turf/simulated/T in orange(src,1)) if(air_master)
air_master.tiles_to_update.Add(T) for(var/turf/simulated/T in orange(src,1))
air_master.tiles_to_update.Add(T)
W.levelupdate() W.levelupdate()
return W return W

View File

@@ -499,9 +499,12 @@ var/global/floorIsLava = 0
<A href='?src=\ref[src];quick_create_object=1'>Quick Create Object</A><br> <A href='?src=\ref[src];quick_create_object=1'>Quick Create Object</A><br>
<A href='?src=\ref[src];create_turf=1'>Create Turf</A><br> <A href='?src=\ref[src];create_turf=1'>Create Turf</A><br>
<A href='?src=\ref[src];create_mob=1'>Create Mob</A><br> <A href='?src=\ref[src];create_mob=1'>Create Mob</A><br>
<br><A href='?src=\ref[src];vsc=airflow'>Edit Airflow Settings</A><br>
<A href='?src=\ref[src];vsc=plasma'>Edit Plasma Settings</A><br>
<A href='?src=\ref[src];vsc=default'>Choose a default ZAS setting</A><br>
"} "}
usr << browse(dat, "window=admin2;size=210x180") usr << browse(dat, "window=admin2;size=210x280")
return return
/datum/admins/proc/Secrets() /datum/admins/proc/Secrets()

View File

@@ -120,7 +120,6 @@ var/list/admin_verbs_server = list(
/client/proc/check_customitem_activity /client/proc/check_customitem_activity
) )
var/list/admin_verbs_debug = list( var/list/admin_verbs_debug = list(
/client/proc/restart_controller,
/client/proc/cmd_admin_list_open_jobs, /client/proc/cmd_admin_list_open_jobs,
/client/proc/Debug2, /client/proc/Debug2,
/client/proc/kill_air, /client/proc/kill_air,

View File

@@ -2422,6 +2422,15 @@
if(check_rights(R_ADMIN|R_SERVER)) if(check_rights(R_ADMIN|R_SERVER))
populate_inactive_customitems_list(src.owner) populate_inactive_customitems_list(src.owner)
else if(href_list["vsc"])
if(check_rights(R_ADMIN|R_SERVER))
if(href_list["vsc"] == "airflow")
vsc.ChangeSettingsDialog(usr,vsc.settings)
if(href_list["vsc"] == "plasma")
vsc.ChangeSettingsDialog(usr,vsc.plc.settings)
if(href_list["vsc"] == "default")
vsc.SetDefault(usr)
// player info stuff // player info stuff
if(href_list["add_player_info"]) if(href_list["add_player_info"])

View File

@@ -159,6 +159,8 @@ var/intercom_range_display_status = 0
src.verbs += /client/proc/kill_air_processing src.verbs += /client/proc/kill_air_processing
src.verbs += /client/proc/disable_communication src.verbs += /client/proc/disable_communication
src.verbs += /client/proc/disable_movement src.verbs += /client/proc/disable_movement
src.verbs += /client/proc/Zone_Info
src.verbs += /client/proc/Test_ZAS_Connection
//src.verbs += /client/proc/cmd_admin_rejuvenate //src.verbs += /client/proc/cmd_admin_rejuvenate
feedback_add_details("admin_verb","mDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","mDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!

View File

@@ -7,12 +7,18 @@
/obj/effect/spawner/lootdrop/initialize() /obj/effect/spawner/lootdrop/initialize()
var/list/things = params2list(loot) var/list/things = params2list(loot)
if(things && things.len) if(things && things.len)
for(var/i = lootcount, i > 0, i--) for(var/i = lootcount, i > 0, i--)
if(!things.len) return if(!things.len)
var/lootspawn = text2path(pick(things)) return
if(!lootdoubles)
things.Remove(lootspawn)
new lootspawn(get_turf(src)) var/loot_spawn = pick(things)
var/loot_path = text2path(loot_spawn)
if(!loot_path || !lootdoubles)
things.Remove(loot_spawn)
continue
new loot_path(get_turf(src))
del(src) del(src)

View File

@@ -709,12 +709,12 @@ hi
///// Colt Peacemaker - Ana Ka'Rimah - SueTheCake ///// Colt Peacemaker - Ana Ka'Rimah - SueTheCake
/obj/item/weapon/gun/energy/stunrevolver/fluff/ana_peacemaker //obj/item/weapon/gun/energy/stunrevolver/fluff/ana_peacemaker
name = "Peacemaker" /* name = "Peacemaker"
desc = "A nickel-plated revolver with pearl grips. It has a certain Old West flair!" desc = "A nickel-plated revolver with pearl grips. It has a certain Old West flair!"
icon = 'custom_items.dmi' icon = 'custom_items.dmi'
icon_state = "peacemaker" icon_state = "peacemaker"*/
///// Well-used baton - Oen'g Issek - Donofnyc3 ///// Well-used baton - Oen'g Issek - Donofnyc3

View File

@@ -17,7 +17,7 @@
attack_self(mob/user as mob) attack_self(mob/user as mob)
if(!brainmob.key && searching == 0) if(brainmob && !brainmob.key && searching == 0)
//Start the process of searching for a new user. //Start the process of searching for a new user.
user << "\blue You carefully locate the manual activation switch and start the positronic brain's boot process." user << "\blue You carefully locate the manual activation switch and start the positronic brain's boot process."
icon_state = "posibrain-searching" icon_state = "posibrain-searching"
@@ -65,7 +65,7 @@
proc/reset_search() //We give the players sixty seconds to decide, then reset the timer. proc/reset_search() //We give the players sixty seconds to decide, then reset the timer.
if(brainmob) return if(src.brainmob && src.brainmob.key) return
src.searching = 0 src.searching = 0
icon_state = "posibrain" icon_state = "posibrain"
@@ -86,7 +86,7 @@
var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n[desc]\n" var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n[desc]\n"
msg += "<span class='warning'>" msg += "<span class='warning'>"
if(src.brainmob.key) if(src.brainmob && src.brainmob.key)
switch(src.brainmob.stat) switch(src.brainmob.stat)
if(CONSCIOUS) if(CONSCIOUS)
if(!src.brainmob.client) msg += "It appears to be in stand-by mode.\n" //afk if(!src.brainmob.client) msg += "It appears to be in stand-by mode.\n" //afk
@@ -124,4 +124,4 @@
src.brainmob.brain_op_stage = 4.0 src.brainmob.brain_op_stage = 4.0
dead_mob_list -= src.brainmob dead_mob_list -= src.brainmob
..() ..()

View File

@@ -564,6 +564,9 @@
pressure_alert = -2 pressure_alert = -2
else else
pressure_alert = -1 pressure_alert = -1
if(environment.toxins > MOLES_PLASMA_VISIBLE)
pl_effects()
return return
/* /*
@@ -777,6 +780,12 @@
proc/handle_chemicals_in_body() proc/handle_chemicals_in_body()
if(reagents) reagents.metabolize(src) if(reagents) reagents.metabolize(src)
var/total_plasmaloss = 0
for(var/obj/item/I in src)
if(I.contaminated)
total_plasmaloss += vsc.plc.CONTAMINATION_LOSS
adjustToxLoss(total_plasmaloss)
// if(dna && dna.mutantrace == "plant") //couldn't think of a better place to place it, since it handles nutrition -- Urist // if(dna && dna.mutantrace == "plant") //couldn't think of a better place to place it, since it handles nutrition -- Urist
if(PLANT in mutations) if(PLANT in mutations)

View File

@@ -1121,26 +1121,15 @@ datum
reagent_state = LIQUID reagent_state = LIQUID
color = "#660000" // rgb: 102, 0, 0 color = "#660000" // rgb: 102, 0, 0
//Commenting this out as it's horribly broken. It's a neat effect though, so it might be worth making a new reagent (that is less common) with similar effects. -Pete
/*
reaction_obj(var/obj/O, var/volume) reaction_obj(var/obj/O, var/volume)
src = null
var/turf/the_turf = get_turf(O) var/turf/the_turf = get_turf(O)
if(!the_turf) if(!the_turf)
return //No sense trying to start a fire if you don't have a turf to set on fire. --NEO return //No sense trying to start a fire if you don't have a turf to set on fire. --NEO
var/datum/gas_mixture/napalm = new new /obj/effect/decal/cleanable/liquid_fuel(the_turf, volume)
var/datum/gas/volatile_fuel/fuel = new
fuel.moles = 15
napalm.trace_gases += fuel
the_turf.assume_air(napalm)
reaction_turf(var/turf/T, var/volume) reaction_turf(var/turf/T, var/volume)
src = null new /obj/effect/decal/cleanable/liquid_fuel(T, volume)
var/datum/gas_mixture/napalm = new return
var/datum/gas/volatile_fuel/fuel = new
fuel.moles = 15
napalm.trace_gases += fuel
T.assume_air(napalm)
return*/
on_mob_life(var/mob/living/M as mob) on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom if(!M) M = holder.my_atom
M.adjustToxLoss(1) M.adjustToxLoss(1)

View File

@@ -385,8 +385,10 @@ datum
for(var/turf/simulated/floor/target_tile in range(0,location)) for(var/turf/simulated/floor/target_tile in range(0,location))
var/datum/gas_mixture/napalm = new var/datum/gas_mixture/napalm = new
var/datum/gas/volatile_fuel/fuel = new
fuel.moles = created_volume
napalm.trace_gases += fuel
napalm.toxins = created_volume*10
napalm.temperature = 400+T0C napalm.temperature = 400+T0C
napalm.update_values() napalm.update_values()

View File

@@ -122,6 +122,7 @@
//Plasma fire properties //Plasma fire properties
#define PLASMA_MINIMUM_BURN_TEMPERATURE 100+T0C #define PLASMA_MINIMUM_BURN_TEMPERATURE 100+T0C
#define PLASMA_FLASHPOINT 246+T0C
#define PLASMA_UPPER_TEMPERATURE 1370+T0C #define PLASMA_UPPER_TEMPERATURE 1370+T0C
#define PLASMA_MINIMUM_OXYGEN_NEEDED 2 #define PLASMA_MINIMUM_OXYGEN_NEEDED 2
#define PLASMA_MINIMUM_OXYGEN_PLASMA_RATIO 20 #define PLASMA_MINIMUM_OXYGEN_PLASMA_RATIO 20

View File

@@ -78,14 +78,16 @@
src.update_status() src.update_status()
. = ..()
sleep_offline = 1
master_controller = new /datum/controller/game_controller() master_controller = new /datum/controller/game_controller()
spawn(-1) spawn(1)
master_controller.setup() master_controller.setup()
lighting_controller.Initialize()
process_teleport_locs() //Sets up the wizard teleport locations process_teleport_locs() //Sets up the wizard teleport locations
process_ghost_teleport_locs() //Sets up ghost teleport locations. process_ghost_teleport_locs() //Sets up ghost teleport locations.
sleep_offline = 1
spawn(3000) //so we aren't adding to the round-start lag spawn(3000) //so we aren't adding to the round-start lag
if(config.ToRban) if(config.ToRban)

View File

@@ -58,6 +58,22 @@ Stuff which is in development and not yet visible to players or just code relate
should be listed in the changelog upon commit though. Thanks. --> should be listed in the changelog upon commit though. Thanks. -->
<!-- To take advantage of the pretty new format (well it was new when I wrote this anyway), open the "add-to-changelog.html" file in any browser and add the stuff and then generate the html code and paste it here --> <!-- To take advantage of the pretty new format (well it was new when I wrote this anyway), open the "add-to-changelog.html" file in any browser and add the stuff and then generate the html code and paste it here -->
<div class="commit sansserif">
<h2 class="date">17 April 2013</h2>
<h3 class="author">SkyMarshal updated:</h3>
<ul class="changes bgimages16">
<li class="experiment">ZAS is now more deadly, as per decision by administrative team. May be tweaked, but currently AIRFLOW is the biggest griefer.</li>
<li class="experiment">World startup optimized, many functions now delayed until a player joins the server. (Reduces server boot time significantly)</li>
<li class="tweak">Zones will now equalize air more rapidly.</li>
<li class="bugfix">ZAS now respects active magboots when airflow occurs.</li>
<li class="bugfix">Airflow will no longer throw you into doors and open them.</li>
<li class="bugfix">Race condition in zone construction has been fixed, so zones connect properly at round start.</li>
<li class="bugfix">Plasma effects readded.</li>
<li class="bugfix">Fixed runtime involving away mission.</li>
</ul>
</div>
<div class="commit sansserif"> <div class="commit sansserif">
<h2 class="date">15.04.2013</h2> <h2 class="date">15.04.2013</h2>
<h3 class="author">Spamcat updated:</h3> <h3 class="author">Spamcat updated:</h3>
@@ -66,6 +82,35 @@ should be listed in the changelog upon commit though. Thanks. -->
</ul> </ul>
</div> </div>
<div class="commit sansserif">
<h2 class="date">11 April 2013</h2>
<h3 class="author">SkyMarshal updated:</h3>
<ul class="changes bgimages16">
<li class="experiment">Fire has been reworked.</li>
<li class="experiment">In-game variable editor is both readded and expanded with fire controlling capability.</li>
</ul>
</div>
<div class="commit sansserif">
<h2 class="date">9 April 2013</h2>
<h3 class="author">SkyMarshal updated:</h3>
<ul class="changes bgimages16">
<li class="bugfix">Fire Issues (Firedoors, Flamethrowers, Incendiary Grenades) fixed.</li>
<li class="bugfix">Fixed a bad line of code that was preventing autoignition of flammable gas mixes.</li>
<li class="bugfix">Volatile fuel is burned up after a point.</li>
<li class="rscdel">Partial-tile firedoors removed. This is due to ZAS breaking when interacting with them.</li>
</ul>
</div>
<div class="commit sansserif">
<h2 class="date">4 April 2013</h2>
<h3 class="author">SkyMarshal updated:</h3>
<ul class="changes bgimages16">
<li class="bugfix">Fixed ZAS</li>
<li class="bugfix">Fixed Fire</li>
</ul>
</div>
<div class="commit sansserif"> <div class="commit sansserif">
<h2 class="date">March 27th 2013</h2> <h2 class="date">March 27th 2013</h2>
<h3 class="author">Asanadas updated:</h3> <h3 class="author">Asanadas updated:</h3>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 678 B

After

Width:  |  Height:  |  Size: 679 B

File diff suppressed because it is too large Load Diff