mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 15:08:02 +01:00
I accidentally ALL THE THINGS! But yeah, ZAS is updated.
This commit is contained in:
@@ -128,28 +128,19 @@ datum/pipeline
|
||||
var/datum/gas_mixture/air_sample = air.remove_ratio(mingle_volume/air.volume)
|
||||
air_sample.volume = mingle_volume
|
||||
|
||||
if(istype(target) && target.parent && target.parent.group_processing)
|
||||
if(istype(target) && target.zone)
|
||||
//Have to consider preservation of group statuses
|
||||
var/datum/gas_mixture/turf_copy = new
|
||||
|
||||
turf_copy.copy_from(target.parent.air)
|
||||
turf_copy.volume = target.parent.air.volume //Copy a good representation of the turf from parent group
|
||||
turf_copy.copy_from(target.zone.air)
|
||||
turf_copy.volume = target.zone.air.volume //Copy a good representation of the turf from parent group
|
||||
|
||||
equalize_gases(list(air_sample, turf_copy))
|
||||
air.merge(air_sample)
|
||||
|
||||
if(target.parent.air.compare(turf_copy))
|
||||
//The new turf would be an acceptable group member so permit the integration
|
||||
turf_copy.subtract(target.zone.air)
|
||||
|
||||
turf_copy.subtract(target.parent.air)
|
||||
|
||||
target.parent.air.merge(turf_copy)
|
||||
|
||||
else
|
||||
//Comparison failure so dissemble group and copy turf
|
||||
|
||||
target.parent.suspend_group_processing()
|
||||
target.air.copy_from(turf_copy)
|
||||
target.zone.air.merge(turf_copy)
|
||||
|
||||
else
|
||||
var/datum/gas_mixture/turf_air = target.return_air()
|
||||
@@ -187,9 +178,9 @@ datum/pipeline
|
||||
var/delta_temperature = 0
|
||||
var/sharer_heat_capacity = 0
|
||||
|
||||
if(modeled_location.parent && modeled_location.parent.group_processing)
|
||||
delta_temperature = (air.temperature - modeled_location.parent.air.temperature)
|
||||
sharer_heat_capacity = modeled_location.parent.air.heat_capacity()
|
||||
if(modeled_location.zone)
|
||||
delta_temperature = (air.temperature - modeled_location.zone.air.temperature)
|
||||
sharer_heat_capacity = modeled_location.zone.air.heat_capacity()
|
||||
else
|
||||
delta_temperature = (air.temperature - modeled_location.air.temperature)
|
||||
sharer_heat_capacity = modeled_location.air.heat_capacity()
|
||||
@@ -208,14 +199,8 @@ datum/pipeline
|
||||
|
||||
air.temperature += self_temperature_delta
|
||||
|
||||
if(modeled_location.parent && modeled_location.parent.group_processing)
|
||||
if((abs(sharer_temperature_delta) > MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND) && (abs(sharer_temperature_delta) > MINIMUM_TEMPERATURE_RATIO_TO_SUSPEND*modeled_location.parent.air.temperature))
|
||||
modeled_location.parent.suspend_group_processing()
|
||||
|
||||
modeled_location.air.temperature += sharer_temperature_delta
|
||||
|
||||
else
|
||||
modeled_location.parent.air.temperature += sharer_temperature_delta/modeled_location.parent.air.group_multiplier
|
||||
if(modeled_location.zone)
|
||||
modeled_location.zone.air.temperature += sharer_temperature_delta/modeled_location.zone.air.group_multiplier
|
||||
else
|
||||
modeled_location.air.temperature += sharer_temperature_delta
|
||||
|
||||
|
||||
+1
-2
@@ -64,14 +64,13 @@ atom/movable/RepelAirflowDest(n)
|
||||
|
||||
*/
|
||||
|
||||
var/tick_multiplier = 2
|
||||
vs_control/var
|
||||
|
||||
zone_update_delay = 10
|
||||
zone_update_delay_NAME = "Zone Update Delay"
|
||||
zone_update_delay_DESC = "The delay in ticks between updates of zones. Increase if lag is bad seemingly because of air."
|
||||
|
||||
zone_share_percent = 2
|
||||
zone_share_percent = 5
|
||||
zone_share_percent_NAME = "Zone Connection Transfer %"
|
||||
zone_share_percent_DESC = "Percent of gas per connected tile that is shared between zones."
|
||||
|
||||
|
||||
+14
-2
@@ -5,6 +5,7 @@ connection
|
||||
B
|
||||
indirect = 0 //If the connection is purely indirect, the zones should not join.
|
||||
last_updated //The tick at which this was last updated.
|
||||
no_zone_count = 0
|
||||
New(turf/T,turf/O)
|
||||
A = T
|
||||
B = O
|
||||
@@ -31,6 +32,8 @@ connection
|
||||
B.zone.connected_zones[A.zone] = 1
|
||||
else
|
||||
B.zone.connected_zones[A.zone]++
|
||||
else
|
||||
world.log << "Attempted to create connection object for non-zone tiles: [T] -> [O]"
|
||||
Del()
|
||||
if(A.zone && A.zone.connections)
|
||||
A.zone.connections -= src
|
||||
@@ -57,5 +60,14 @@ connection
|
||||
. = ..()
|
||||
|
||||
proc/Cleanup()
|
||||
if(A.zone == B.zone) del src
|
||||
if(!A.zone || !B.zone) del src
|
||||
if(!A || !B)
|
||||
world.log << "Connection removed: [A] or [B] missing entirely."
|
||||
del src
|
||||
if(A.zone == B.zone)
|
||||
world.log << "Connection removed: Zones now merged."
|
||||
del src
|
||||
if(!A.zone || !B.zone)
|
||||
no_zone_count++
|
||||
if(no_zone_count >= 5)
|
||||
world.log << "Connection removed: [A] or [B] missing a zone."
|
||||
del src
|
||||
@@ -17,6 +17,7 @@ zone
|
||||
air.toxins += T.toxins / members
|
||||
air.temperature += T.temperature / members
|
||||
air.group_multiplier = contents.len
|
||||
air.update_values()
|
||||
zones += src
|
||||
Del()
|
||||
zones -= src
|
||||
|
||||
+6
-2
@@ -1,5 +1,5 @@
|
||||
|
||||
client/proc/Zone_Info(turf/T as null|turf)
|
||||
client/verb/Zone_Info(turf/T as null|turf)
|
||||
set category = "Debug"
|
||||
if(T)
|
||||
if(T.zone)
|
||||
@@ -28,9 +28,10 @@ zone/proc
|
||||
M << "Plasma: [air.toxins]"
|
||||
M << "Carbon Dioxide: [air.carbon_dioxide]"
|
||||
M << "Temperature: [air.temperature]"
|
||||
M << "Heat Energy: [air.thermal_energy()]"
|
||||
M << "Heat Energy: [air.temperature * air.heat_capacity()]"
|
||||
M << "Pressure: [air.return_pressure()]"
|
||||
M << ""
|
||||
M << "Space Tiles: [length(space_tiles)]"
|
||||
M << "<u>Connections: [length(connections)]</u>"
|
||||
|
||||
for(var/connection/C in connections)
|
||||
@@ -40,6 +41,9 @@ zone/proc
|
||||
spawn(50)
|
||||
C.A.overlays -= 'debug_connect.dmi'
|
||||
C.B.overlays -= 'debug_connect.dmi'
|
||||
for(var/C in connections)
|
||||
if(!istype(C,/connection))
|
||||
M << "[C] (Not Connection!)"
|
||||
|
||||
else
|
||||
dbg_output = 0
|
||||
|
||||
@@ -1,25 +1,6 @@
|
||||
turf/var/zone/zone
|
||||
|
||||
var/list/zones = list()
|
||||
var/zone_controller/zone_master = new
|
||||
|
||||
zone_controller
|
||||
var
|
||||
current_tick = 0
|
||||
proc
|
||||
start()
|
||||
set background = 1
|
||||
while(1)
|
||||
current_tick++
|
||||
for(var/zone/Z in zones)
|
||||
if(Z.last_update < current_tick)
|
||||
Z.process()
|
||||
if(Z) Z.last_update = current_tick
|
||||
for(var/obj/fire/F)
|
||||
F.process()
|
||||
//for(var/obj/z_hotspot/H in z_hotspots)
|
||||
// H.process()
|
||||
sleep(max(5,vsc.zone_update_delay*tick_multiplier))
|
||||
|
||||
zone
|
||||
var
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,178 @@
|
||||
/*
|
||||
Overview:
|
||||
The air_master global variable is the workhorse for the system.
|
||||
|
||||
Why are you archiving data before modifying it?
|
||||
The general concept with archiving data and having each tile keep track of when they were last updated is to keep everything symmetric
|
||||
and totally independent of the order they are read in an update cycle.
|
||||
This prevents abnormalities like air/fire spreading rapidly in one direction and super slowly in the other.
|
||||
|
||||
Why not just archive everything and then calculate?
|
||||
Efficiency. While a for-loop that goes through all tils and groups to archive their information before doing any calculations seems simple, it is
|
||||
slightly less efficient than the archive-before-modify/read method.
|
||||
|
||||
Why is there a cycle check for calculating data as well?
|
||||
This ensures that every connection between group-tile, tile-tile, and group-group is only evaluated once per loop.
|
||||
|
||||
|
||||
|
||||
|
||||
Important variables:
|
||||
air_master.groups_to_rebuild (list)
|
||||
A list of air groups that have had their geometry occluded and thus may need to be split in half.
|
||||
A set of adjacent groups put in here will join together if validly connected.
|
||||
This is done before air system calculations for a cycle.
|
||||
air_master.tiles_to_update (list)
|
||||
Turfs that are in this list have their border data updated before the next air calculations for a cycle.
|
||||
Place turfs in this list rather than call the proc directly to prevent race conditions
|
||||
|
||||
turf/simulated.archive() and datum/air_group.archive()
|
||||
This stores all data for.
|
||||
If you modify, make sure to update the archived_cycle to prevent race conditions and maintain symmetry
|
||||
|
||||
atom/CanPass(atom/movable/mover, turf/target, height, air_group)
|
||||
returns 1 for allow pass and 0 for deny pass
|
||||
Turfs automatically call this for all objects/mobs in its turf.
|
||||
This is called both as source.CanPass(target, height, air_group)
|
||||
and target.CanPass(source, height, air_group)
|
||||
|
||||
Cases for the parameters
|
||||
1. This is called with args (mover, location, height>0, air_group=0) for normal objects.
|
||||
2. This is called with args (null, location, height=0, air_group=0) for flowing air.
|
||||
3. This is called with args (null, location, height=?, air_group=1) for determining group boundaries.
|
||||
|
||||
Cases 2 and 3 would be different for doors or other objects open and close fairly often.
|
||||
(Case 3 would return 0 always while Case 2 would return 0 only when the door is open)
|
||||
This prevents the necessity of re-evaluating group geometry every time a door opens/closes.
|
||||
|
||||
|
||||
Important Procedures
|
||||
air_master.process()
|
||||
This first processes the air_master update/rebuild lists then processes all groups and tiles for air calculations
|
||||
|
||||
|
||||
*/
|
||||
|
||||
var/kill_air = 0
|
||||
var/tick_multiplier = 2
|
||||
|
||||
atom/proc/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
||||
//Purpose: Determines if the object (or airflow) can pass this atom.
|
||||
//Called by: Movement, airflow.
|
||||
//Inputs: The moving atom (optional), target turf, "height" and air group
|
||||
//Outputs: Boolean if can pass.
|
||||
|
||||
return (!density || !height || air_group)
|
||||
|
||||
turf
|
||||
CanPass(atom/movable/mover, turf/target, height=1.5,air_group=0)
|
||||
if(!target) return 0
|
||||
|
||||
if(istype(mover)) // turf/Enter(...) will perform more advanced checks
|
||||
return !density
|
||||
|
||||
else // Now, doing more detailed checks for air movement and air group formation
|
||||
if(target.blocks_air||blocks_air)
|
||||
return 0
|
||||
|
||||
for(var/obj/obstacle in src)
|
||||
if(!obstacle.CanPass(mover, target, height, air_group))
|
||||
return 0
|
||||
for(var/obj/obstacle in target)
|
||||
if(!obstacle.CanPass(mover, src, height, air_group))
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
var/global/datum/controller/air_system/air_master
|
||||
|
||||
datum
|
||||
controller
|
||||
air_system
|
||||
//Geoemetry lists
|
||||
var/list/turf/simulated/active_singletons = list()
|
||||
|
||||
//Special functions lists
|
||||
var/list/turf/simulated/active_super_conductivity = list()
|
||||
var/list/turf/simulated/high_pressure_delta = list()
|
||||
|
||||
//Geometry updates lists
|
||||
var/list/turf/simulated/tiles_to_update = list()
|
||||
var/list/turf/simulated/groups_to_rebuild = list()
|
||||
|
||||
var/current_cycle = 0
|
||||
var/update_delay = 5 //How long between check should it try to process atmos again.
|
||||
var/failed_ticks = 0 //How many ticks have runtimed?
|
||||
|
||||
|
||||
/* process()
|
||||
//Call this to process air movements for a cycle
|
||||
|
||||
process_rebuild_select_groups()
|
||||
//Used by process()
|
||||
//Warning: Do not call this
|
||||
|
||||
rebuild_group(datum/air_group)
|
||||
//Used by process_rebuild_select_groups()
|
||||
//Warning: Do not call this, add the group to air_master.groups_to_rebuild instead
|
||||
*/
|
||||
|
||||
|
||||
proc/setup()
|
||||
//Purpose: Call this at the start to setup air groups geometry
|
||||
// (Warning: Very processor intensive but only must be done once per round)
|
||||
//Called by: Gameticker/Master controller
|
||||
//Inputs: None.
|
||||
//Outputs: None.
|
||||
|
||||
set background = 1
|
||||
world << "\red \b Processing Geometry..."
|
||||
sleep(-1)
|
||||
|
||||
var/start_time = world.timeofday
|
||||
|
||||
for(var/turf/simulated/S in world)
|
||||
if(S.z < 5)
|
||||
if(!S.blocks_air && !S.zone && S.z < 5) // Added last check to force skipping asteroid z-levels -- TLE
|
||||
new/zone(S)
|
||||
|
||||
S.update_air_properties()
|
||||
|
||||
world << "\red \b Geometry processed in [time2text(world.timeofday-start_time, "mm:ss")] minutes!"
|
||||
spawn start()
|
||||
|
||||
proc/start()
|
||||
//Purpose: This is kicked off by the master controller, and controls the processing of all atmosphere.
|
||||
//Called by: Master controller
|
||||
//Inputs: None.
|
||||
//Outputs: None.
|
||||
|
||||
set background = 1
|
||||
while(1)
|
||||
if(!kill_air)
|
||||
current_cycle++
|
||||
var/success = tick() //Changed so that a runtime does not crash the ticker.
|
||||
if(!success) //Runtimed.
|
||||
failed_ticks++
|
||||
if(failed_ticks > 20)
|
||||
world << "<font size='4' color='red'>ERROR IN ATMOS TICKER. Killing air simulation!</font>"
|
||||
kill_air = 1
|
||||
sleep(max(5,update_delay*tick_multiplier))
|
||||
|
||||
proc/tick()
|
||||
|
||||
if(tiles_to_update.len > 0) //If there are tiles to update, do so.
|
||||
for(var/turf/simulated/T in tiles_to_update)
|
||||
spawn T.update_air_properties()
|
||||
tiles_to_update = list()
|
||||
|
||||
for(var/zone/Z in zones)
|
||||
if(Z.last_update < current_cycle)
|
||||
Z.process()
|
||||
if(Z) Z.last_update = current_cycle
|
||||
|
||||
for(var/obj/fire/F)
|
||||
F.process()
|
||||
|
||||
return 1
|
||||
@@ -0,0 +1,205 @@
|
||||
atom/var/pressure_resistance = ONE_ATMOSPHERE
|
||||
turf
|
||||
assume_air(datum/gas_mixture/giver) //use this for machines to adjust air
|
||||
del(giver)
|
||||
return 0
|
||||
|
||||
return_air()
|
||||
//Create gas mixture to hold data for passing
|
||||
var/datum/gas_mixture/GM = new
|
||||
|
||||
GM.oxygen = oxygen
|
||||
GM.carbon_dioxide = carbon_dioxide
|
||||
GM.nitrogen = nitrogen
|
||||
GM.toxins = toxins
|
||||
|
||||
GM.temperature = temperature
|
||||
GM.update_values()
|
||||
|
||||
return GM
|
||||
|
||||
remove_air(amount as num)
|
||||
var/datum/gas_mixture/GM = new
|
||||
|
||||
var/sum = oxygen + carbon_dioxide + nitrogen + toxins
|
||||
if(sum>0)
|
||||
GM.oxygen = (oxygen/sum)*amount
|
||||
GM.carbon_dioxide = (carbon_dioxide/sum)*amount
|
||||
GM.nitrogen = (nitrogen/sum)*amount
|
||||
GM.toxins = (toxins/sum)*amount
|
||||
|
||||
GM.temperature = temperature
|
||||
GM.update_values()
|
||||
|
||||
return GM
|
||||
|
||||
|
||||
turf
|
||||
simulated
|
||||
|
||||
var/current_graphic = null
|
||||
|
||||
var/tmp
|
||||
datum/gas_mixture/air
|
||||
|
||||
processing = 1
|
||||
group_border = 0
|
||||
length_space_border = 0
|
||||
|
||||
air_check_directions = 0 //Do not modify this, just add turf to air_master.tiles_to_update
|
||||
|
||||
archived_cycle = 0
|
||||
current_cycle = 0
|
||||
|
||||
obj/effect/hotspot/active_hotspot
|
||||
|
||||
temperature_archived //USED ONLY FOR SOLIDS
|
||||
being_superconductive = 0
|
||||
|
||||
|
||||
proc
|
||||
process_cell()
|
||||
update_air_properties()
|
||||
archive()
|
||||
|
||||
mimic_air_with_tile(turf/model)
|
||||
share_air_with_tile(turf/simulated/sharer)
|
||||
|
||||
mimic_temperature_with_tile(turf/model)
|
||||
share_temperature_with_tile(turf/simulated/sharer)
|
||||
|
||||
|
||||
super_conduct()
|
||||
|
||||
update_visuals()
|
||||
overlays = null
|
||||
|
||||
var/siding_icon_state = return_siding_icon_state()
|
||||
if(siding_icon_state)
|
||||
overlays += image('floors.dmi',siding_icon_state)
|
||||
var/datum/gas_mixture/model = return_air()
|
||||
switch(model.graphic)
|
||||
if("plasma")
|
||||
overlays.Add(plmaster)
|
||||
if("sleeping_agent")
|
||||
overlays.Add(slmaster)
|
||||
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
|
||||
if(!blocks_air)
|
||||
air = new
|
||||
|
||||
air.oxygen = oxygen
|
||||
air.carbon_dioxide = carbon_dioxide
|
||||
air.nitrogen = nitrogen
|
||||
air.toxins = toxins
|
||||
|
||||
air.temperature = temperature
|
||||
air.update_values()
|
||||
|
||||
if(air_master)
|
||||
air_master.tiles_to_update.Add(src)
|
||||
|
||||
find_zone()
|
||||
|
||||
// air.parent = src //TODO DEBUG REMOVE
|
||||
|
||||
else
|
||||
if(air_master)
|
||||
for(var/direction in cardinal)
|
||||
var/turf/simulated/floor/target = get_step(src,direction)
|
||||
if(istype(target))
|
||||
air_master.tiles_to_update.Add(target)
|
||||
|
||||
Del()
|
||||
if(active_hotspot)
|
||||
del(active_hotspot)
|
||||
if(blocks_air)
|
||||
for(var/direction in list(NORTH, SOUTH, EAST, WEST))
|
||||
var/turf/simulated/tile = get_step(src,direction)
|
||||
if(istype(tile) && !tile.blocks_air)
|
||||
air_master.tiles_to_update.Add(tile)
|
||||
..()
|
||||
|
||||
assume_air(datum/gas_mixture/giver)
|
||||
if(!giver) return 0
|
||||
if(zone)
|
||||
zone.air.merge(giver)
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
archive()
|
||||
if(air) //For open space like floors
|
||||
air.archive()
|
||||
|
||||
temperature_archived = temperature
|
||||
archived_cycle = air_master.current_cycle
|
||||
|
||||
share_air_with_tile(turf/simulated/T)
|
||||
return air.share(T.air)
|
||||
|
||||
mimic_air_with_tile(turf/T)
|
||||
return air.mimic(T)
|
||||
|
||||
return_air()
|
||||
if(zone)
|
||||
return zone.air
|
||||
else if(air)
|
||||
return air
|
||||
|
||||
else
|
||||
return ..()
|
||||
|
||||
remove_air(amount as num)
|
||||
if(zone)
|
||||
var/datum/gas_mixture/removed = null
|
||||
removed = zone.air.remove(amount)
|
||||
return removed
|
||||
else if(air)
|
||||
var/datum/gas_mixture/removed = null
|
||||
removed = air.remove(amount)
|
||||
|
||||
if(air.check_tile_graphic())
|
||||
update_visuals(air)
|
||||
return removed
|
||||
|
||||
else
|
||||
return ..()
|
||||
|
||||
update_air_properties()//OPTIMIZE
|
||||
air_check_directions = 0
|
||||
|
||||
for(var/direction in cardinal)
|
||||
if(CanPass(null, get_step(src,direction), 0, 0))
|
||||
air_check_directions |= direction
|
||||
|
||||
if(zone)
|
||||
for(var/direction in cardinal)
|
||||
if(air_check_directions&direction)
|
||||
|
||||
var/turf/simulated/T = get_step(src,direction)
|
||||
if(T)
|
||||
ZConnect(src,T)
|
||||
else
|
||||
var/turf/simulated/T = get_step(src,direction)
|
||||
if(T)
|
||||
ZDisconnect(src,T)
|
||||
else
|
||||
|
||||
for(var/direction in cardinal)
|
||||
if(air_check_directions&direction)
|
||||
var/turf/simulated/T = get_step(src,direction)
|
||||
if(T.zone)
|
||||
T.zone.AddTurf(src)
|
||||
break
|
||||
if(!zone)
|
||||
new/zone(src)
|
||||
|
||||
if(air_check_directions)
|
||||
processing = 1
|
||||
else
|
||||
processing = 0
|
||||
+120
-78
@@ -7,7 +7,7 @@ atom/proc/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed
|
||||
turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
|
||||
|
||||
turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
|
||||
if(fire_protection) return
|
||||
if(fire_protection > world.time-300) return
|
||||
var/datum/gas_mixture/air_contents = return_air(1)
|
||||
if(!air_contents)
|
||||
return 0
|
||||
@@ -25,19 +25,11 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
|
||||
return 1
|
||||
var/datum/gas/volatile_fuel/fuel = locate() in air_contents.trace_gases
|
||||
var/obj/liquid_fuel/liquid = locate() in src
|
||||
var/fuel_level = 0
|
||||
var/liquid_level = 0
|
||||
if(fuel) fuel_level = fuel.moles
|
||||
if(liquid) liquid_level = liquid.amount
|
||||
var/total_fuel = air_contents.toxins + fuel_level + liquid_level
|
||||
if((air_contents.oxygen + air_contents.toxins + fuel_level*1.5 + liquid_level*1.5) - (air_contents.carbon_dioxide*0.25) > vsc.IgnitionLevel && total_fuel > 0.5)
|
||||
if(air_contents.calculate_firelevel(liquid) > vsc.IgnitionLevel && (fuel || liquid || air_contents.toxins > 0.5))
|
||||
igniting = 1
|
||||
if(air_contents.oxygen < 0.5)
|
||||
return 0
|
||||
|
||||
if(parent&&parent.group_processing)
|
||||
parent.suspend_group_processing()
|
||||
|
||||
if(! (locate(/obj/fire) in src))
|
||||
var/obj/fire/F = new(src,1000)
|
||||
F.temperature = exposed_temperature
|
||||
@@ -180,31 +172,20 @@ obj
|
||||
var
|
||||
datum/gas_mixture/air_contents = S.return_air()
|
||||
datum/gas/volatile_fuel/fuel = locate(/datum/gas/volatile_fuel/) in air_contents.trace_gases
|
||||
fuel_level = 0
|
||||
obj/liquid_fuel/liquid = locate() in S
|
||||
liquid_level = 0
|
||||
|
||||
if(fuel) fuel_level = fuel.moles
|
||||
if(liquid)
|
||||
liquid_level = liquid.amount
|
||||
if(liquid.amount <= 0)
|
||||
del liquid
|
||||
liquid_level = 0
|
||||
firelevel = air_contents.calculate_firelevel(liquid)
|
||||
|
||||
firelevel = (air_contents.oxygen + air_contents.toxins + fuel_level*1.5 + liquid_level*1.5) - (air_contents.carbon_dioxide*0.25)
|
||||
|
||||
firelevel = min(firelevel,vsc.IgnitionLevel*5)
|
||||
|
||||
if(firelevel > vsc.IgnitionLevel * 1.5 && (air_contents.toxins || fuel_level || liquid_level))
|
||||
if(firelevel > 25 && (air_contents.toxins || fuel || liquid))
|
||||
for(var/direction in cardinal)
|
||||
if(S.air_check_directions&direction) //Grab all valid bordering tiles
|
||||
var/turf/simulated/enemy_tile = get_step(S, direction)
|
||||
if(istype(enemy_tile))
|
||||
if(enemy_tile.fire_protection)
|
||||
firelevel -= vsc.IgnitionLevel
|
||||
if(enemy_tile.fire_protection > world.time-30)
|
||||
firelevel -= 150
|
||||
continue
|
||||
if(!(locate(/obj/fire) in enemy_tile))
|
||||
if( prob( firelevel/(vsc.IgnitionLevel*0.1) ) )
|
||||
if( prob( firelevel/2.5 ) )
|
||||
new/obj/fire(enemy_tile,firelevel)
|
||||
// else
|
||||
// world << "Spread Probability: [firelevel/(vsc.IgnitionLevel*0.1)]%."
|
||||
@@ -220,12 +201,12 @@ obj
|
||||
|
||||
if(flow)
|
||||
|
||||
if(flow.oxygen > 0.3 && (flow.toxins || fuel_level || liquid))
|
||||
if(flow.oxygen > 0.3 && (flow.toxins || fuel || liquid))
|
||||
|
||||
icon_state = "1"
|
||||
if(firelevel > vsc.IgnitionLevel * 2)
|
||||
if(firelevel > 25)
|
||||
icon_state = "2"
|
||||
if(firelevel > vsc.IgnitionLevel * 3.5)
|
||||
if(firelevel > 100)
|
||||
icon_state = "3"
|
||||
flow.temperature = max(PLASMA_MINIMUM_BURN_TEMPERATURE+0.1,flow.temperature)
|
||||
flow.zburn(liquid)
|
||||
@@ -245,7 +226,7 @@ obj
|
||||
del src
|
||||
|
||||
for(var/mob/living/carbon/human/M in loc)
|
||||
M.FireBurn(firelevel/(vsc.IgnitionLevel*10))
|
||||
M.FireBurn(min(max(0.1,firelevel / 20),10))
|
||||
|
||||
|
||||
New(newLoc,fl)
|
||||
@@ -254,7 +235,7 @@ obj
|
||||
sd_SetLuminosity(3)
|
||||
firelevel = fl
|
||||
for(var/mob/living/carbon/human/M in loc)
|
||||
M.FireBurn(firelevel/(vsc.IgnitionLevel*10))
|
||||
M.FireBurn(min(max(0.1,firelevel / 20),10))
|
||||
|
||||
Del()
|
||||
if (istype(loc, /turf/simulated))
|
||||
@@ -265,74 +246,135 @@ obj
|
||||
..()
|
||||
|
||||
obj/liquid_fuel
|
||||
icon = 'effects.dmi'
|
||||
icon_state = "slube"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "fuel"
|
||||
layer = TURF_LAYER+0.2
|
||||
anchored = 1
|
||||
var/amount = 1
|
||||
|
||||
New(newLoc)
|
||||
New(newLoc,amt=1)
|
||||
src.amount = amt
|
||||
for(var/obj/liquid_fuel/other in newLoc)
|
||||
if(other != src)
|
||||
other.amount += src.amount
|
||||
spawn other.Spread()
|
||||
del src
|
||||
return
|
||||
Spread()
|
||||
. = ..()
|
||||
proc/Spread()
|
||||
if(amount < 0.5) return
|
||||
var/turf/simulated/S = loc
|
||||
if(!istype(S)) return
|
||||
for(var/d in cardinal)
|
||||
if(S.air_check_directions & d)
|
||||
if(rand(25))
|
||||
var/turf/simulated/O = get_step(src,d)
|
||||
new/obj/liquid_fuel(O,amount*0.25)
|
||||
amount *= 0.75
|
||||
|
||||
flamethrower_fuel
|
||||
icon_state = "mustard"
|
||||
anchored = 0
|
||||
New(newLoc, amt = 1, d = 0)
|
||||
dir = d
|
||||
. = ..()
|
||||
Spread()
|
||||
if(amount < 0.1) return
|
||||
var/turf/simulated/S = loc
|
||||
if(!istype(S)) return
|
||||
for(var/d in list(turn(dir,90),turn(dir,-90)))
|
||||
if(S.air_check_directions & d)
|
||||
var/turf/simulated/O = get_step(S,d)
|
||||
new/obj/liquid_fuel/flamethrower_fuel(O,amount*0.25,d)
|
||||
O.hotspot_expose((T20C*2) + 380,500)
|
||||
amount *= 0.5
|
||||
|
||||
vs_control/var/switch_fire = 1
|
||||
|
||||
turf/simulated/var/fire_protection = 0
|
||||
|
||||
datum/gas_mixture/proc/zburn(obj/liquid_fuel/liquid)
|
||||
if(vsc.switch_fire)
|
||||
. = fire()
|
||||
if(liquid && liquid.amount > 0)
|
||||
oxygen -= fire_ratio_1
|
||||
liquid.amount = max(liquid.amount-fire_ratio_1,0)
|
||||
carbon_dioxide += fire_ratio_1
|
||||
if(liquid.amount <= 0)
|
||||
del liquid
|
||||
return
|
||||
if(temperature > PLASMA_MINIMUM_BURN_TEMPERATURE)
|
||||
turf/proc/apply_fire_protection()
|
||||
turf/simulated/apply_fire_protection()
|
||||
fire_protection = world.time
|
||||
|
||||
datum/gas_mixture/proc
|
||||
zburn(obj/liquid_fuel/liquid)
|
||||
if(temperature > PLASMA_MINIMUM_BURN_TEMPERATURE)
|
||||
var
|
||||
total_fuel = toxins
|
||||
fuel_sources = 0
|
||||
datum/gas/volatile_fuel/fuel = locate() in trace_gases
|
||||
if(fuel)
|
||||
total_fuel += fuel.moles
|
||||
fuel_sources++
|
||||
if(liquid)
|
||||
if(liquid.amount <= 0)
|
||||
del liquid
|
||||
else
|
||||
total_fuel += liquid.amount
|
||||
fuel_sources++
|
||||
if(toxins > 0.3) fuel_sources++
|
||||
|
||||
if(!fuel_sources) return 0
|
||||
if(oxygen > 0.3 && total_fuel)
|
||||
var/firelevel = calculate_firelevel(liquid)
|
||||
//f(x) = 1000ln(0.01x + 1.45)
|
||||
temperature = 1000*log(0.016*firelevel + 1.45)
|
||||
var/consumed_gas = min(oxygen,0.002*firelevel,total_fuel) / fuel_sources
|
||||
oxygen -= consumed_gas
|
||||
toxins = max(0,toxins-consumed_gas)
|
||||
if(fuel)
|
||||
fuel.moles -= consumed_gas
|
||||
if(fuel.moles <= 0) del fuel
|
||||
if(liquid)
|
||||
liquid.amount -= consumed_gas
|
||||
if(liquid.amount <= 0) del liquid
|
||||
update_values()
|
||||
return consumed_gas*fuel_sources
|
||||
return 0
|
||||
calculate_firelevel(obj/liquid_fuel/liquid)
|
||||
var
|
||||
fuel_level = 0
|
||||
datum/gas/volatile_fuel/fuel = locate() in trace_gases
|
||||
fuel_level = 0
|
||||
liquid_level = 0
|
||||
if(fuel) fuel_level = fuel.moles
|
||||
if(liquid) liquid_level = liquid.amount
|
||||
if(liquid && liquid_level <= 0)
|
||||
del liquid
|
||||
liquid_level = 0
|
||||
if(oxygen > 0.3 && (toxins || fuel_level || liquid_level))
|
||||
if(toxins && temperature < PLASMA_UPPER_TEMPERATURE)
|
||||
temperature += (FIRE_PLASMA_ENERGY_RELEASED*fire_ratio_1) / heat_capacity()
|
||||
return oxygen + toxins + liquid_level*15 + fuel_level*5
|
||||
|
||||
if((fuel_level || liquid_level) && temperature < PLASMA_UPPER_TEMPERATURE)
|
||||
temperature += (FIRE_CARBON_ENERGY_RELEASED*fire_ratio_1) / heat_capacity()
|
||||
/mob/living/carbon/human/proc/FireBurn(mx as num)
|
||||
//NO! NOT INTO THE PIT! IT BURRRRRNS!
|
||||
|
||||
if(toxins > fire_ratio_1)
|
||||
oxygen -= vsc.plc.OXY_TO_PLASMA*fire_ratio_1
|
||||
toxins -= fire_ratio_1
|
||||
carbon_dioxide += fire_ratio_1
|
||||
else if(toxins)
|
||||
oxygen -= toxins * vsc.plc.OXY_TO_PLASMA
|
||||
carbon_dioxide += toxins
|
||||
toxins = 0
|
||||
var
|
||||
head_exposure = 1
|
||||
chest_exposure = 1
|
||||
groin_exposure = 1
|
||||
legs_exposure = 1
|
||||
arms_exposure = 1
|
||||
|
||||
if(fuel_level > fire_ratio_1/1.5)
|
||||
oxygen -= vsc.plc.OXY_TO_PLASMA*fire_ratio_1
|
||||
fuel.moles -= fire_ratio_1
|
||||
carbon_dioxide += fire_ratio_1
|
||||
for(var/obj/item/clothing/C in src)
|
||||
if(l_hand == C || r_hand == C) continue
|
||||
if(C.body_parts_covered & HEAD)
|
||||
head_exposure *= C.heat_transfer_coefficient
|
||||
if(C.body_parts_covered & UPPER_TORSO)
|
||||
chest_exposure *= C.heat_transfer_coefficient
|
||||
if(C.body_parts_covered & LOWER_TORSO)
|
||||
groin_exposure *= C.heat_transfer_coefficient
|
||||
if(C.body_parts_covered & LEGS)
|
||||
legs_exposure *= C.heat_transfer_coefficient
|
||||
if(C.body_parts_covered & ARMS)
|
||||
arms_exposure *= C.heat_transfer_coefficient
|
||||
|
||||
else if(fuel_level)
|
||||
oxygen -= fuel.moles * vsc.plc.OXY_TO_PLASMA
|
||||
carbon_dioxide += fuel.moles
|
||||
fuel.moles = 0
|
||||
mx *= 1
|
||||
|
||||
if(liquid_level > 0)
|
||||
oxygen -= fire_ratio_1
|
||||
liquid.amount = max(liquid.amount-fire_ratio_1,0)
|
||||
carbon_dioxide += fire_ratio_1
|
||||
if(liquid.amount <= 0)
|
||||
del liquid
|
||||
return 1
|
||||
return 0
|
||||
//Always check these damage procs first if fire damage isn't working. They're probably what's wrong.
|
||||
|
||||
apply_damage(2.5*mx*head_exposure, BURN, "head", 0, 0, "Fire")
|
||||
apply_damage(2.5*mx*chest_exposure, BURN, "chest", 0, 0, "Fire")
|
||||
apply_damage(2.0*mx*groin_exposure, BURN, "groin", 0, 0, "Fire")
|
||||
apply_damage(0.6*mx*legs_exposure, BURN, "l_leg", 0, 0, "Fire")
|
||||
apply_damage(0.6*mx*legs_exposure, BURN, "r_leg", 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")
|
||||
|
||||
flash_pain()
|
||||
+23
-9
@@ -48,15 +48,29 @@ turf/proc/HasDoor(turf/O)
|
||||
return 1
|
||||
|
||||
turf/proc/find_zone()
|
||||
if(world.time < 10) return
|
||||
for(var/d in cardinal)
|
||||
var/turf/T = get_step(src,d)
|
||||
if(!T || !T.zone) continue
|
||||
if(!T || !T.zone || !T.ZCanPass(src)) continue
|
||||
if(!zone)
|
||||
zone = T.zone
|
||||
zone.AddTurf(src)
|
||||
else if(T.zone != zone)
|
||||
ZConnect(src,T)
|
||||
|
||||
turf/proc/check_connections()
|
||||
for(var/d in cardinal)
|
||||
var/turf/T = get_step(src,d)
|
||||
if(!T || !T.zone || !T.CanPass(0,src,0,0)) continue
|
||||
if(T.zone != zone)
|
||||
ZConnect(src,T)
|
||||
|
||||
turf/proc/check_for_space()
|
||||
for(var/d in cardinal)
|
||||
var/turf/T = get_step(src,d)
|
||||
if(istype(T,/turf/space) && T.CanPass(0,src,0,0))
|
||||
zone.AddSpace(T)
|
||||
|
||||
proc
|
||||
ZMerge(zone/A,zone/B)
|
||||
//world << "Merge occured."
|
||||
@@ -78,6 +92,7 @@ proc
|
||||
if((C.A in new_contents) && (C.B in new_contents))
|
||||
del C
|
||||
continue
|
||||
if(!A.connections) A.connections = list()
|
||||
A.connections += C
|
||||
A.space_tiles += B.space_tiles
|
||||
A.contents = new_contents
|
||||
@@ -93,7 +108,7 @@ proc
|
||||
return
|
||||
if(istype(A,/turf/space))
|
||||
if(B.zone)
|
||||
B.zone.AddSpace(B)
|
||||
B.zone.AddSpace(A)
|
||||
//world << "Space added."
|
||||
return
|
||||
if(!A.zone || !B.zone) return
|
||||
@@ -124,7 +139,7 @@ proc
|
||||
A.overlays -= 'zone_connection_A.dmi'
|
||||
B.overlays -= 'zone_connection_B.dmi'*/
|
||||
del C
|
||||
/*else
|
||||
else
|
||||
if(A == B) return
|
||||
if(A.CanPass(0,B,0,0)) return
|
||||
if(A.HasDoor(B) || B.HasDoor(A)) return
|
||||
@@ -137,6 +152,8 @@ proc
|
||||
if((A in Z.contents) || (B in Z.contents))
|
||||
if(!Z.connections) Z.connections = list()
|
||||
Z.connections += C
|
||||
for(var/turf/T in test)
|
||||
T.check_for_space()
|
||||
var/datum/gas_mixture/Y_Air = new
|
||||
Y_Air.copy_from(oldzone.air)
|
||||
var/zone/Y = new(B,Y_Air)
|
||||
@@ -144,14 +161,11 @@ proc
|
||||
if((A in Y.contents) || (B in Y.contents))
|
||||
if(!Y.connections) Y.connections = list()
|
||||
Y.connections += C
|
||||
for(var/turf/space/T in oldzone.space_tiles)
|
||||
if(!(T in Z.space_tiles))
|
||||
Y.AddSpace(T)
|
||||
oldzone.air = null
|
||||
del oldzone
|
||||
world << "Zone Split: [A] / [B]"
|
||||
A.overlays += 'zone_connection_A.dmi'
|
||||
B.overlays += 'zone_connection_B.dmi'
|
||||
spawn(10)
|
||||
A.overlays -= 'zone_connection_A.dmi'
|
||||
B.overlays -= 'zone_connection_B.dmi'*/
|
||||
else
|
||||
if(istype(A,/turf/space) && B.zone)
|
||||
B.zone.RemoveSpace(A)
|
||||
|
||||
+66
-129
@@ -3,17 +3,12 @@ pl_control/var
|
||||
PLASMA_DMG_NAME = "Plasma Damage Multiplier"
|
||||
PLASMA_DMG_DESC = "Multiplier on how much damage inhaling plasma can do."
|
||||
|
||||
OXY_TO_PLASMA = 1
|
||||
OXY_TO_PLASMA_NAME = "O2/Plasma Ratio"
|
||||
OXY_TO_PLASMA_DESC = "Multiplier for the ratio of oxygen to plasma required in fires."
|
||||
|
||||
CLOTH_CONTAMINATION = 1 //If this is on, plasma does damage by getting into cloth.
|
||||
CLOTH_CONTAMINATION = 0 //If this is on, plasma does damage by getting into cloth.
|
||||
CLOTH_CONTAMINATION_NAME = "Plasma - Cloth Contamination"
|
||||
CLOTH_CONTAMINATION_RANDOM = 60
|
||||
CLOTH_CONTAMINATION_METHOD = "Toggle"
|
||||
CLOTH_CONTAMINATION_DESC = "If set to nonzero, plasma will contaminate cloth items (uniforms, backpacks, etc.)\
|
||||
and cause a small amount of damage over time to anyone carrying or wearing them. Contamination can be detected\
|
||||
with a Health Analyzer, and washed off in the washer."
|
||||
and cause a small amount of damage over time to anyone carrying or wearing them. Contamination can be washed off in the washer."
|
||||
|
||||
ALL_ITEM_CONTAMINATION = 0 //If this is on, any item can be contaminated, so suits and tools must be discarded or
|
||||
//decontaminated.
|
||||
@@ -48,7 +43,7 @@ pl_control/var
|
||||
//PLASMA_INJECTS_TOXINS_RANDOM = 30
|
||||
//PLASMA_INJECTS_TOXINS_METHOD = "Toggle"
|
||||
|
||||
EYE_BURNS = 0 //Plasma burns the eyes of anyone not wearing eye protection.
|
||||
EYE_BURNS = 1 //Plasma burns the eyes of anyone not wearing eye protection.
|
||||
EYE_BURNS_NAME = "Plasma - Eye Burns"
|
||||
EYE_BURNS_RANDOM = 30
|
||||
EYE_BURNS_METHOD = "Toggle"
|
||||
@@ -66,8 +61,8 @@ pl_control/var
|
||||
//PLASMA_DMG_QUOTIENT = 10
|
||||
//PLASMA_DMG_QUOTIENT_RANDOM = "1d10+4"
|
||||
|
||||
CONTAMINATION_LOSS = 0.1
|
||||
_NAME = "Plasma - Contamination Damage"
|
||||
CONTAMINATION_LOSS = 0.01
|
||||
CONTAMINATION_LOSS_NAME = "Plasma - Contamination Damage"
|
||||
CONTAMINATION_LOSS_DESC = "A number representing the damage done per life cycle by contaminated items."
|
||||
|
||||
PLASMA_HALLUCINATION = 1
|
||||
@@ -93,160 +88,102 @@ obj/item/proc
|
||||
else if(istype(src,/obj/item/clothing)) return 1
|
||||
else if(istype(src,/obj/item/weapon/storage/backpack)) return 1
|
||||
|
||||
/mob/living/carbon/human/proc/contaminate()
|
||||
contaminate()
|
||||
if(!contaminated)
|
||||
contaminated = 1
|
||||
overlays += 'icons/effects/contamination.dmi'
|
||||
|
||||
decontaminate()
|
||||
contaminated = 0
|
||||
overlays -= 'icons/effects/contamination.dmi'
|
||||
|
||||
/mob/proc/contaminate()
|
||||
|
||||
/mob/living/carbon/human/contaminate()
|
||||
if(!pl_suit_protected())
|
||||
suit_contamination()
|
||||
else if(vsc.plc.PLASMAGUARD_ONLY)
|
||||
if(!wear_suit.flags & PLASMAGUARD) wear_suit.contaminated = 1
|
||||
|
||||
|
||||
|
||||
if(!pl_head_protected())
|
||||
if(wear_mask) wear_mask.contaminated = 1
|
||||
if(prob(1)) suit_contamination() //Plasma can sometimes get through such an open suit.
|
||||
else if(vsc.plc.PLASMAGUARD_ONLY)
|
||||
if(!head.flags & PLASMAGUARD) head.contaminated = 1
|
||||
|
||||
if(istype(back,/obj/item/weapon/storage/backpack) || vsc.plc.ALL_ITEM_CONTAMINATION)
|
||||
back.contaminated = 1
|
||||
if(istype(back,/obj/item/weapon/storage/backpack))
|
||||
back.contaminate()
|
||||
|
||||
if(l_hand)
|
||||
if(l_hand.can_contaminate()) l_hand.contaminated = 1
|
||||
/*if(l_hand)
|
||||
if(l_hand.can_contaminate()) l_hand.contaminate()
|
||||
if(r_hand)
|
||||
if(r_hand.can_contaminate()) r_hand.contaminated = 1
|
||||
if(r_hand.can_contaminate()) r_hand.contaminate()
|
||||
if(belt)
|
||||
if(belt.can_contaminate()) belt.contaminated = 1
|
||||
if(wear_id && !pl_suit_protected())
|
||||
if(wear_id.can_contaminate()) wear_id.contaminated = 1
|
||||
if(l_ear && !pl_head_protected())
|
||||
if(l_ear.can_contaminate()) l_ear.contaminated = 1
|
||||
if(r_ear && !pl_head_protected())
|
||||
if(r_ear.can_contaminate()) r_ear.contaminated = 1
|
||||
if(belt.can_contaminate()) belt.contaminate()*/
|
||||
|
||||
/mob/living/carbon/human/proc/pl_effects()
|
||||
/mob/proc/pl_effects()
|
||||
|
||||
/mob/living/carbon/human/pl_effects()
|
||||
if(vsc.plc.CLOTH_CONTAMINATION) contaminate()
|
||||
if(stat >= 2)
|
||||
return
|
||||
if(vsc.plc.SKIN_BURNS)
|
||||
if(!pl_head_protected() || !pl_suit_protected())
|
||||
burn_skin(0.75)
|
||||
if (coughedtime != 1)
|
||||
coughedtime = 1
|
||||
emote("gasp")
|
||||
spawn (20)
|
||||
coughedtime = 0
|
||||
if(prob(20)) src << "\red Your skin burns!"
|
||||
updatehealth()
|
||||
if(vsc.plc.EYE_BURNS && !pl_head_protected())
|
||||
if(!wear_mask)
|
||||
if(prob(20)) usr << "\red Your eyes burn!"
|
||||
eye_stat += 2.5
|
||||
eye_blurry += 1.5
|
||||
if (eye_stat >= 20 && !(disabilities & 1))
|
||||
src << "\red Your eyes start to burn badly!"
|
||||
disabilities |= 1
|
||||
if (prob(max(0,eye_stat - 20) + 1))
|
||||
src << "\red You are blinded!"
|
||||
eye_blind += 20
|
||||
eye_stat = max(eye_stat-25,0)
|
||||
|
||||
if(vsc.plc.EYE_BURNS)
|
||||
if(!head)
|
||||
if(!wear_mask)
|
||||
burn_eyes()
|
||||
else
|
||||
if(!(wear_mask.flags & MASKCOVERSEYES))
|
||||
burn_eyes()
|
||||
else
|
||||
if(!(wear_mask.flags & MASKCOVERSEYES))
|
||||
if(prob(20)) usr << "\red Your eyes burn!"
|
||||
eye_stat += 2.5
|
||||
eye_blurry = min(eye_blurry+1.5,50)
|
||||
if (eye_stat >= 20 && !(disabilities & 1))
|
||||
src << "\red Your eyes start to burn badly!"
|
||||
disabilities |= 1
|
||||
if (prob(max(0,eye_stat - 20) + 1) &&!eye_blind)
|
||||
src << "\red You are blinded!"
|
||||
eye_blind += 20
|
||||
eye_stat = 0
|
||||
if(!(head.flags & MASKCOVERSEYES))
|
||||
if(!wear_mask)
|
||||
burn_eyes()
|
||||
else
|
||||
if(!(wear_mask.flags & MASKCOVERSEYES))
|
||||
burn_eyes()
|
||||
|
||||
if(vsc.plc.GENETIC_CORRUPTION)
|
||||
if(rand(1,1000) < vsc.plc.GENETIC_CORRUPTION)
|
||||
if(rand(1,10000) < vsc.plc.GENETIC_CORRUPTION)
|
||||
randmutb(src)
|
||||
src << "\red High levels of toxins cause you to spontaneously mutate."
|
||||
domutcheck(src,null)
|
||||
|
||||
/mob/living/carbon/human/proc/FireBurn(mx as num)
|
||||
//NO! NOT INTO THE PIT! IT BURRRRRNS!
|
||||
mx *= vsc.BURN_DMG
|
||||
|
||||
var
|
||||
head_exposure = 1
|
||||
chest_exposure = 1
|
||||
groin_exposure = 1
|
||||
legs_exposure = 1
|
||||
feet_exposure = 1
|
||||
arms_exposure = 1
|
||||
hands_exposure = 1
|
||||
for(var/obj/item/clothing/C in src)
|
||||
if(l_hand == C || r_hand == C) continue
|
||||
if(C.body_parts_covered & HEAD)
|
||||
head_exposure *= C.heat_transfer_coefficient
|
||||
if(C.body_parts_covered & UPPER_TORSO)
|
||||
chest_exposure *= C.heat_transfer_coefficient
|
||||
if(C.body_parts_covered & LOWER_TORSO)
|
||||
groin_exposure *= C.heat_transfer_coefficient
|
||||
if(C.body_parts_covered & LEGS)
|
||||
legs_exposure *= C.heat_transfer_coefficient
|
||||
if(C.body_parts_covered & FEET)
|
||||
feet_exposure *= C.heat_transfer_coefficient
|
||||
if(C.body_parts_covered & ARMS)
|
||||
arms_exposure *= C.heat_transfer_coefficient
|
||||
if(C.body_parts_covered & HANDS)
|
||||
arms_exposure *= C.heat_transfer_coefficient
|
||||
|
||||
mx *= 10
|
||||
|
||||
apply_damage("head", 0, 2.5*mx*head_exposure)
|
||||
apply_damage("chest", 0, 2.5*mx*chest_exposure)
|
||||
apply_damage("groin", 0, 2.0*mx*groin_exposure)
|
||||
apply_damage("l_leg", 0, 0.6*mx*legs_exposure)
|
||||
apply_damage("r_leg", 0, 0.6*mx*legs_exposure)
|
||||
apply_damage("l_arm", 0, 0.4*mx*arms_exposure)
|
||||
apply_damage("r_arm", 0, 0.4*mx*arms_exposure)
|
||||
apply_damage("l_foot", 0, 0.25*mx*feet_exposure)
|
||||
apply_damage("r_foot", 0, 0.25*mx*feet_exposure)
|
||||
apply_damage("l_hand", 0, 0.25*mx*hands_exposure)
|
||||
apply_damage("r_hand", 0, 0.25*mx*hands_exposure)
|
||||
|
||||
/mob/living/carbon/human/proc/suit_interior()
|
||||
. = list()
|
||||
if(!pl_suit_protected())
|
||||
for(var/obj/item/I in src)
|
||||
. += I
|
||||
return .
|
||||
. += wear_mask
|
||||
. += w_uniform
|
||||
. += shoes
|
||||
. += gloves
|
||||
if(!pl_head_protected())
|
||||
. += head
|
||||
/mob/living/carbon/human/proc/burn_eyes()
|
||||
if(prob(20)) src << "\red Your eyes burn!"
|
||||
eye_stat += 2.5
|
||||
eye_blurry = min(eye_blurry+1.5,50)
|
||||
if (prob(max(0,eye_stat - 20) + 1) &&!eye_blind)
|
||||
src << "\red You are blinded!"
|
||||
eye_blind += 20
|
||||
eye_stat = 0
|
||||
|
||||
/mob/living/carbon/human/proc/pl_head_protected()
|
||||
if(head)
|
||||
if(head.flags & PLASMAGUARD || head.flags & HEADSPACE) return 1
|
||||
if(vsc.plc.PLASMAGUARD_ONLY)
|
||||
if(head.flags & PLASMAGUARD || head.flags & HEADSPACE) return 1
|
||||
else
|
||||
if(head.flags & HEADCOVERSEYES) return 1
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/proc/pl_suit_protected()
|
||||
if(wear_suit)
|
||||
if(wear_suit.flags & PLASMAGUARD || wear_suit.flags & SUITSPACE) return 1
|
||||
if(vsc.plc.PLASMAGUARD_ONLY)
|
||||
if(wear_suit.flags & PLASMAGUARD || wear_suit.flags & SUITSPACE) return 1
|
||||
else
|
||||
if(wear_suit.flags_inv & HIDEJUMPSUIT) return 1
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/proc/suit_contamination()
|
||||
if(vsc.plc.ALL_ITEM_CONTAMINATION)
|
||||
for(var/obj/item/I in src)
|
||||
I.contaminated = 1
|
||||
else
|
||||
if(wear_suit) wear_suit.contaminated = 1
|
||||
if(w_uniform) w_uniform.contaminated = 1
|
||||
if(shoes) shoes.contaminated = 1
|
||||
if(gloves) gloves.contaminated = 1
|
||||
if(wear_mask) wear_mask.contaminated = 1
|
||||
if(w_uniform) w_uniform.contaminate()
|
||||
if(shoes) shoes.contaminate()
|
||||
if(gloves) gloves.contaminate()
|
||||
|
||||
|
||||
turf/Entered(obj/item/I)
|
||||
. = ..()
|
||||
if(istype(I))
|
||||
if(istype(I) && vsc.plc.CLOTH_CONTAMINATION)
|
||||
var/datum/gas_mixture/env = return_air(1)
|
||||
if(env.toxins > 0.35)
|
||||
if(env.toxins > MOLES_PLASMA_VISIBLE + 1)
|
||||
if(I.can_contaminate())
|
||||
I.contaminated = 1
|
||||
I.contaminate()
|
||||
+128
-43
@@ -26,55 +26,39 @@ zone
|
||||
Z.air.copy_from(air)
|
||||
rebuild = 0
|
||||
|
||||
var/total_space = 0
|
||||
var/turf/space/space
|
||||
if(!air)
|
||||
air = new()
|
||||
air.adjustGases(MOLES_O2STANDARD, 0, MOLES_N2STANDARD, 0, list())
|
||||
world.log << "Air object lost in zone. Regenerating."
|
||||
|
||||
if(length(connected_zones))
|
||||
for(var/zone/Z in connected_zones)
|
||||
total_space += length(Z.space_tiles)
|
||||
if(length(Z.space_tiles))
|
||||
space = Z.space_tiles[1]
|
||||
var/total_space = 0
|
||||
|
||||
if(space_tiles)
|
||||
for(var/T in space_tiles)
|
||||
if(!istype(T,/turf/space)) space_tiles -= T
|
||||
total_space += length(space_tiles)
|
||||
if(length(space_tiles))
|
||||
space = space_tiles[1]
|
||||
total_space = length(space_tiles)
|
||||
|
||||
if(total_space && space)
|
||||
var/old_pressure = air.return_pressure()
|
||||
air.temperature_mimic(space,OPEN_HEAT_TRANSFER_COEFFICIENT,total_space)
|
||||
air.remove(MOLES_CELLSTANDARD * (air.group_multiplier/40) * total_space)
|
||||
if(dbg_output) world << "Space removed [MOLES_CELLSTANDARD*(air.group_multiplier/40)*total_space] moles of air."
|
||||
var/p_diff = old_pressure - air.return_pressure()
|
||||
if(p_diff > vsc.AF_TINY_MOVEMENT_THRESHOLD) AirflowSpace(src,p_diff)
|
||||
if(total_space) // SPAAAAAAAAAACE
|
||||
//var/old_pressure = air.pressure
|
||||
ShareSpace(air,total_space*(vsc.zone_share_percent/100))
|
||||
//var/p_diff = old_pressure - air.pressure
|
||||
//if(p_diff > vsc.AF_TINY_MOVEMENT_THRESHOLD) AirflowSpace(src,p_diff)
|
||||
|
||||
air.react(null,0)
|
||||
var/check = air.check_tile_graphic()
|
||||
for(var/turf/T in contents)
|
||||
if(T.zone && T.zone != src)
|
||||
RemoveTurf(T)
|
||||
if(dbg_output) world << "Removed invalid turf."
|
||||
if(air.group_multiplier <= 0) // No more turfs belong to this zone, so we can get rid of it
|
||||
del(src)
|
||||
else // Turf was valid, so we can handle it
|
||||
if(!T.zone)
|
||||
T.zone = src
|
||||
|
||||
if(istype(T,/turf/simulated))
|
||||
var/turf/simulated/S = T
|
||||
if(S.fire_protection) S.fire_protection--
|
||||
if(check)
|
||||
if(S.HasDoor(1))
|
||||
S.update_visuals()
|
||||
else
|
||||
S.update_visuals(air)
|
||||
if(check || air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
|
||||
for(var/turf/simulated/S in contents)
|
||||
if(check)
|
||||
if(S.HasDoor(1))
|
||||
S.update_visuals()
|
||||
else
|
||||
S.update_visuals(air)
|
||||
|
||||
if(air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
|
||||
for(var/atom/movable/item in S)
|
||||
item.temperature_expose(air, air.temperature, CELL_VOLUME)
|
||||
S.temperature_expose(air, air.temperature, CELL_VOLUME)
|
||||
if(air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
|
||||
for(var/atom/movable/item in S)
|
||||
item.temperature_expose(air, air.temperature, CELL_VOLUME)
|
||||
S.temperature_expose(air, air.temperature, CELL_VOLUME)
|
||||
|
||||
air.graphic_archived = air.graphic
|
||||
|
||||
@@ -83,13 +67,114 @@ zone
|
||||
if(length(connections))
|
||||
for(var/connection/C in connections)
|
||||
C.Cleanup()
|
||||
if(C && !C.indirect)
|
||||
if(C.A.zone.air.compare(C.B.zone.air))
|
||||
if(C && !C.indirect && C.A.zone && C.B.zone)
|
||||
if(C.A.zone.air.compare(C.B.zone.air) || total_space)
|
||||
ZMerge(C.A.zone,C.B.zone)
|
||||
for(var/zone/Z in connected_zones)
|
||||
var/p_diff = (air.return_pressure()-Z.air.return_pressure())*connected_zones[Z]*(vsc.zone_share_percent/100)
|
||||
if(p_diff > vsc.AF_TINY_MOVEMENT_THRESHOLD) Airflow(src,Z,p_diff)
|
||||
air.share_ratio(Z.air,connected_zones[Z]*(vsc.zone_share_percent/100))
|
||||
//var/p_diff = (air.return_pressure()-Z.air.return_pressure())*connected_zones[Z]*(vsc.zone_share_percent/100)
|
||||
//if(p_diff > vsc.AF_TINY_MOVEMENT_THRESHOLD) Airflow(src,Z,p_diff)
|
||||
ShareRatio(air,Z.air,connected_zones[Z]*(vsc.zone_share_percent/100))
|
||||
|
||||
proc/ShareRatio(datum/gas_mixture/A, datum/gas_mixture/B, ratio)
|
||||
var
|
||||
size = max(1,A.group_multiplier)
|
||||
share_size = max(1,B.group_multiplier)
|
||||
|
||||
full_oxy = A.oxygen * size
|
||||
full_nitro = A.nitrogen * size
|
||||
full_co2 = A.carbon_dioxide * size
|
||||
full_plasma = A.toxins * size
|
||||
|
||||
full_thermal = A.temperature * A.heat_capacity() * size
|
||||
|
||||
s_full_oxy = B.oxygen * share_size
|
||||
s_full_nitro = B.nitrogen * share_size
|
||||
s_full_co2 = B.carbon_dioxide * share_size
|
||||
s_full_plasma = B.toxins * share_size
|
||||
|
||||
s_full_thermal = B.temperature * B.heat_capacity() * share_size
|
||||
|
||||
oxy_avg = (full_oxy + s_full_oxy) / (size + share_size)
|
||||
nit_avg = (full_nitro + s_full_nitro) / (size + share_size)
|
||||
co2_avg = (full_co2 + s_full_co2) / (size + share_size)
|
||||
plasma_avg = (full_plasma + s_full_plasma) / (size + share_size)
|
||||
|
||||
thermal_avg = (full_thermal + s_full_thermal) / (size+share_size)
|
||||
|
||||
A.oxygen = (A.oxygen - oxy_avg) * (1-ratio) + oxy_avg
|
||||
A.nitrogen = (A.nitrogen - nit_avg) * (1-ratio) + nit_avg
|
||||
A.carbon_dioxide = (A.carbon_dioxide - co2_avg) * (1-ratio) + co2_avg
|
||||
A.toxins = (A.toxins - plasma_avg) * (1-ratio) + plasma_avg
|
||||
|
||||
B.oxygen = (B.oxygen - oxy_avg) * (1-ratio) + oxy_avg
|
||||
B.nitrogen = (B.nitrogen - nit_avg) * (1-ratio) + nit_avg
|
||||
B.carbon_dioxide = (B.carbon_dioxide - co2_avg) * (1-ratio) + co2_avg
|
||||
B.toxins = (B.toxins - plasma_avg) * (1-ratio) + plasma_avg
|
||||
|
||||
var
|
||||
thermal = (full_thermal/size - thermal_avg) * (1-ratio) + thermal_avg
|
||||
sharer_thermal = (s_full_thermal/share_size - thermal_avg) * (1-ratio) + thermal_avg
|
||||
|
||||
A.temperature = thermal / (A.heat_capacity() == 0 ? MINIMUM_HEAT_CAPACITY : A.heat_capacity())
|
||||
|
||||
B.temperature = sharer_thermal / (B.heat_capacity() == 0 ? MINIMUM_HEAT_CAPACITY : B.heat_capacity())
|
||||
|
||||
for(var/datum/gas/G in A.trace_gases)
|
||||
var/datum/gas/H = locate(G.type) in B.trace_gases
|
||||
if(H)
|
||||
var/G_avg = (G.moles*size + H.moles*share_size) / (size+share_size)
|
||||
G.moles = (G.moles - G_avg) * (1-ratio) + G_avg
|
||||
H.moles = (H.moles - G_avg) * (1-ratio) + G_avg
|
||||
else
|
||||
H = new G.type
|
||||
B.trace_gases += H
|
||||
var/G_avg = (G.moles*size) / (size+share_size)
|
||||
G.moles = (G.moles - G_avg) * (1-ratio) + G_avg
|
||||
H.moles = (H.moles - G_avg) * (1-ratio) + G_avg
|
||||
|
||||
A.update_values()
|
||||
B.update_values()
|
||||
|
||||
if(A.compare(B)) return 1
|
||||
else return 0
|
||||
|
||||
/* See? Now that's how it's done. */
|
||||
|
||||
proc/ShareSpace(datum/gas_mixture/A, ratio)
|
||||
var
|
||||
size = max(1,A.group_multiplier)
|
||||
share_size = 2000 //A huge value because space is huge.
|
||||
|
||||
full_oxy = A.oxygen * size
|
||||
full_nitro = A.nitrogen * size
|
||||
full_co2 = A.carbon_dioxide * size
|
||||
full_plasma = A.toxins * size
|
||||
|
||||
full_thermal = A.temperature * A.heat_capacity() * size
|
||||
|
||||
oxy_avg = (full_oxy + 0) / (size + share_size)
|
||||
nit_avg = (full_nitro + 0.2) / (size + share_size)
|
||||
co2_avg = (full_co2 + 0) / (size + share_size)
|
||||
plasma_avg = (full_plasma + 0) / (size + share_size)
|
||||
|
||||
thermal_avg = (full_thermal + MINIMUM_HEAT_CAPACITY) / (size+share_size)
|
||||
|
||||
A.oxygen = (A.oxygen - oxy_avg) * (1-ratio) + oxy_avg
|
||||
A.nitrogen = (A.nitrogen - nit_avg) * (1-ratio) + nit_avg
|
||||
A.carbon_dioxide = (A.carbon_dioxide - co2_avg) * (1-ratio) + co2_avg
|
||||
A.toxins = (A.toxins - plasma_avg) * (1-ratio) + plasma_avg
|
||||
|
||||
var/thermal = (full_thermal/size - thermal_avg) * (1-ratio) + thermal_avg
|
||||
|
||||
A.temperature = thermal / (A.heat_capacity() == 0 ? MINIMUM_HEAT_CAPACITY : A.heat_capacity())
|
||||
|
||||
for(var/datum/gas/G in A.trace_gases)
|
||||
var/G_avg = (G.moles*size + 0) / (size+share_size)
|
||||
G.moles = (G.moles - G_avg) * (1-ratio) + G_avg
|
||||
|
||||
A.update_values()
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
zone/proc
|
||||
|
||||
@@ -133,6 +133,8 @@ vs_control
|
||||
|
||||
plc.EYE_BURNS = 0 //Plasma burns the eyes of anyone not wearing eye protection.
|
||||
|
||||
plc.PLASMA_HALLUCINATION = 0
|
||||
|
||||
//plc.N2O_REACTION = 0 //Plasma can react with N2O, making sparks and starting a fire if levels are high.
|
||||
|
||||
//plc.PLASMA_COLOR = "onturf" //Plasma can change colors yaaaay!
|
||||
@@ -141,8 +143,8 @@ vs_control
|
||||
//plc.PLASMA_DMG_QUOTIENT = 10
|
||||
|
||||
plc.CONTAMINATION_LOSS = 0
|
||||
if("Hazard-Low")
|
||||
plc.CLOTH_CONTAMINATION = 1 //If this is on, plasma does damage by getting into cloth.
|
||||
if("Hazard - Low")
|
||||
plc.CLOTH_CONTAMINATION = 0 //If this is on, plasma does damage by getting into cloth.
|
||||
|
||||
plc.ALL_ITEM_CONTAMINATION = 0 //If this is on, any item can be contaminated, so suits and tools must be discarded or
|
||||
|
||||
@@ -152,7 +154,7 @@ vs_control
|
||||
|
||||
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 = 1 //Plasma has an effect similar to mustard gas on the un-suited.
|
||||
|
||||
// plc.PLASMA_INJECTS_TOXINS = 0 //Plasma damage injects the toxins chemical to do damage over time.
|
||||
|
||||
@@ -168,12 +170,9 @@ vs_control
|
||||
//plc.PLASMA_DMG_OFFSET = 1.5
|
||||
//plc.PLASMA_DMG_QUOTIENT = 8
|
||||
|
||||
plc.CONTAMINATION_LOSS = 0.01
|
||||
plc.CONTAMINATION_LOSS = 0
|
||||
|
||||
var/s = pick(plc.settings)
|
||||
plc.Randomize(s)
|
||||
|
||||
if("Hazard-High")
|
||||
if("Hazard - High")
|
||||
plc.CLOTH_CONTAMINATION = 1 //If this is on, plasma does damage by getting into cloth.
|
||||
|
||||
plc.ALL_ITEM_CONTAMINATION = 0 //If this is on, any item can be contaminated, so suits and tools must be discarded or
|
||||
@@ -184,11 +183,11 @@ vs_control
|
||||
|
||||
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 = 1 //Plasma has an effect similar to mustard gas on the un-suited.
|
||||
|
||||
// plc.PLASMA_INJECTS_TOXINS = 0 //Plasma damage injects the toxins chemical to do damage over time.
|
||||
|
||||
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.N2O_REACTION = 0 //Plasma can react with N2O, making sparks and starting a fire if levels are high.
|
||||
|
||||
@@ -197,16 +196,10 @@ vs_control
|
||||
//plc.PLASMA_DMG_OFFSET = 3
|
||||
//plc.PLASMA_DMG_QUOTIENT = 5
|
||||
|
||||
plc.CONTAMINATION_LOSS = 0.05
|
||||
|
||||
for(var/i = rand(3,5),i>0,i--)
|
||||
var/s = pick(plc.settings)
|
||||
plc.Randomize(s)
|
||||
|
||||
if("Everything")
|
||||
if("Oh Shit!")
|
||||
plc.CLOTH_CONTAMINATION = 1 //If this is on, plasma does damage by getting into cloth.
|
||||
|
||||
plc.ALL_ITEM_CONTAMINATION = 1 //If this is on, any item can be contaminated, so suits and tools must be discarded or ELSE
|
||||
plc.ALL_ITEM_CONTAMINATION = 0 //If this is on, any item can be contaminated, so suits and tools must be discarded or ELSE
|
||||
|
||||
plc.PLASMAGUARD_ONLY = 1
|
||||
|
||||
@@ -227,7 +220,6 @@ vs_control
|
||||
//plc.PLASMA_DMG_OFFSET = 3
|
||||
//plc.PLASMA_DMG_QUOTIENT = 5
|
||||
|
||||
plc.CONTAMINATION_LOSS = 0.02
|
||||
/////world << "Plasma color updated."
|
||||
|
||||
pl_control
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
// replaced by OPENCONTAINER flags and atom/proc/is_open_container()
|
||||
///Chemistry.
|
||||
|
||||
proc/assume_air(datum/air_group/giver)
|
||||
proc/assume_air(datum/gas_mixture/giver)
|
||||
del(giver)
|
||||
return null
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
*/
|
||||
|
||||
obj
|
||||
assume_air(datum/air_group/giver)
|
||||
assume_air(datum/gas_mixture/giver)
|
||||
if(loc)
|
||||
return loc.assume_air(giver)
|
||||
else
|
||||
|
||||
@@ -1561,19 +1561,13 @@ proc/listclearnulls(list/list)
|
||||
for(var/turf/simulated/T1 in toupdate)
|
||||
for(var/obj/machinery/door/D2 in T1)
|
||||
doors += D2
|
||||
if(T1.parent)
|
||||
air_master.groups_to_rebuild += T1.parent
|
||||
else
|
||||
air_master.tiles_to_update += T1
|
||||
air_master.tiles_to_update += T1
|
||||
|
||||
if(fromupdate.len)
|
||||
for(var/turf/simulated/T2 in fromupdate)
|
||||
for(var/obj/machinery/door/D2 in T2)
|
||||
doors += D2
|
||||
if(T2.parent)
|
||||
air_master.groups_to_rebuild += T2.parent
|
||||
else
|
||||
air_master.tiles_to_update += T2
|
||||
air_master.tiles_to_update += T2
|
||||
|
||||
for(var/obj/O in doors)
|
||||
O:update_nearby_tiles(1)
|
||||
@@ -1728,10 +1722,7 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
|
||||
for(var/turf/simulated/T1 in toupdate)
|
||||
for(var/obj/machinery/door/D2 in T1)
|
||||
doors += D2
|
||||
if(T1.parent)
|
||||
air_master.groups_to_rebuild += T1.parent
|
||||
else
|
||||
air_master.tiles_to_update += T1
|
||||
air_master.tiles_to_update += T1
|
||||
|
||||
for(var/obj/O in doors)
|
||||
O:update_nearby_tiles(1)
|
||||
|
||||
@@ -341,8 +341,6 @@
|
||||
|
||||
proc/TemperatureAct(temperature)
|
||||
for(var/turf/simulated/floor/target_tile in range(2,loc))
|
||||
if(target_tile.parent && target_tile.parent.group_processing)
|
||||
target_tile.parent.suspend_group_processing()
|
||||
|
||||
var/datum/gas_mixture/napalm = new
|
||||
|
||||
|
||||
@@ -267,12 +267,12 @@
|
||||
if (src.operating)
|
||||
return
|
||||
src.operating = 1
|
||||
|
||||
|
||||
var/X = src:x
|
||||
var/Y = src:y
|
||||
var/Z = src:z
|
||||
var/held = 1
|
||||
|
||||
|
||||
if(src.holdopen && !forcecrush)
|
||||
while(held == 1 && holdopen && !forcecrush) //If it is no longer hold open, it should close.
|
||||
sleep(held? 10:40)
|
||||
@@ -288,25 +288,25 @@
|
||||
spawn(4)
|
||||
if(!istype(src, /obj/machinery/door/window))
|
||||
for(var/mob/living/L in src.loc) // Crush mobs and move them out of the way
|
||||
|
||||
|
||||
if(src.forcecrush) // Save an AI, crush a limb
|
||||
var/limbname = pick("l_arm", "r_arm", "l_hand","r_hand", "l_foot", "r_foot")
|
||||
var/limbdisplay
|
||||
|
||||
|
||||
for(var/organ in L:organs)
|
||||
var/datum/organ/external/temp = L:organs["[organ]"]
|
||||
if (istype(temp, /datum/organ/external) && temp.name == limbname)
|
||||
limbdisplay = temp.display_name // Take the name for down below
|
||||
temp.take_damage(rand(50,80), 0) //OH GOD IT HURTS
|
||||
break
|
||||
|
||||
|
||||
L << "\red The airlock crushes your [limbdisplay]!"
|
||||
for(var/mob/O in viewers(L, null))
|
||||
if(O == L)
|
||||
continue
|
||||
O.show_message("\red The airlock crushes [L.name]'s [limbdisplay]!", 1)
|
||||
sleep(rand(2,8))
|
||||
|
||||
|
||||
L << "\red The airlock forces you out of the way!" //Lucky you
|
||||
for(var/mob/O in viewers(L, null))
|
||||
O.show_message("\red The airlock pushes [L.name] out of the way!", 1)
|
||||
@@ -314,7 +314,7 @@
|
||||
var/turf/T = get_random_turf(L, lst)
|
||||
if(T)
|
||||
L.loc = T
|
||||
|
||||
|
||||
if(!src.forcecrush)
|
||||
for(var/obj/item/I in src.loc) // Move items out of the way
|
||||
if(!I.anchored)
|
||||
@@ -322,10 +322,10 @@
|
||||
var/turf/T = get_random_turf(I, lst)
|
||||
if(T)
|
||||
I.loc = T
|
||||
|
||||
|
||||
sleep(6)
|
||||
update_icon()
|
||||
|
||||
|
||||
if(src.visible && (!src.glass))
|
||||
src.sd_SetOpacity(1)
|
||||
if(operating == 1)
|
||||
@@ -343,38 +343,11 @@
|
||||
var/turf/simulated/east = get_step(source,EAST)
|
||||
var/turf/simulated/west = get_step(source,WEST)
|
||||
|
||||
if(need_rebuild)
|
||||
if(istype(source)) //Rebuild/update nearby group geometry
|
||||
if(source.parent)
|
||||
air_master.groups_to_rebuild += source.parent
|
||||
else
|
||||
air_master.tiles_to_update += source
|
||||
if(istype(north))
|
||||
if(north.parent)
|
||||
air_master.groups_to_rebuild += north.parent
|
||||
else
|
||||
air_master.tiles_to_update += north
|
||||
if(istype(south))
|
||||
if(south.parent)
|
||||
air_master.groups_to_rebuild += south.parent
|
||||
else
|
||||
air_master.tiles_to_update += south
|
||||
if(istype(east))
|
||||
if(east.parent)
|
||||
air_master.groups_to_rebuild += east.parent
|
||||
else
|
||||
air_master.tiles_to_update += east
|
||||
if(istype(west))
|
||||
if(west.parent)
|
||||
air_master.groups_to_rebuild += west.parent
|
||||
else
|
||||
air_master.tiles_to_update += west
|
||||
else
|
||||
if(istype(source)) air_master.tiles_to_update += source
|
||||
if(istype(north)) air_master.tiles_to_update += north
|
||||
if(istype(south)) air_master.tiles_to_update += south
|
||||
if(istype(east)) air_master.tiles_to_update += east
|
||||
if(istype(west)) air_master.tiles_to_update += west
|
||||
if(istype(source)) air_master.tiles_to_update += source
|
||||
if(istype(north)) air_master.tiles_to_update += north
|
||||
if(istype(south)) air_master.tiles_to_update += south
|
||||
if(istype(east)) air_master.tiles_to_update += east
|
||||
if(istype(west)) air_master.tiles_to_update += west
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -110,18 +110,6 @@
|
||||
var/turf/simulated/source = loc
|
||||
var/turf/simulated/destination = get_step(source,dir)
|
||||
|
||||
if(need_rebuild)
|
||||
if(istype(source)) //Rebuild/update nearby group geometry
|
||||
if(source.parent)
|
||||
air_master.groups_to_rebuild += source.parent
|
||||
else
|
||||
air_master.tiles_to_update += source
|
||||
if(istype(destination))
|
||||
if(destination.parent)
|
||||
air_master.groups_to_rebuild += destination.parent
|
||||
else
|
||||
air_master.tiles_to_update += destination
|
||||
else
|
||||
if(istype(source)) air_master.tiles_to_update += source
|
||||
if(istype(destination)) air_master.tiles_to_update += destination
|
||||
if(istype(source)) air_master.tiles_to_update += source
|
||||
if(istype(destination)) air_master.tiles_to_update += destination
|
||||
return 1
|
||||
@@ -15,20 +15,8 @@
|
||||
var/turf/simulated/source = loc
|
||||
var/turf/simulated/target = get_step(source,dir)
|
||||
|
||||
if(need_rebuild)
|
||||
if(istype(source)) //Rebuild/update nearby group geometry
|
||||
if(source.parent)
|
||||
air_master.groups_to_rebuild += source.parent
|
||||
else
|
||||
air_master.tiles_to_update += source
|
||||
if(istype(target))
|
||||
if(target.parent)
|
||||
air_master.groups_to_rebuild += target.parent
|
||||
else
|
||||
air_master.tiles_to_update += target
|
||||
else
|
||||
if(istype(source)) air_master.tiles_to_update += source
|
||||
if(istype(target)) air_master.tiles_to_update += target
|
||||
if(istype(source)) air_master.tiles_to_update += source
|
||||
if(istype(target)) air_master.tiles_to_update += target
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
@@ -408,38 +408,11 @@
|
||||
var/turf/simulated/east = get_step(source,EAST)
|
||||
var/turf/simulated/west = get_step(source,WEST)
|
||||
|
||||
if(need_rebuild)
|
||||
if(istype(source)) //Rebuild/update nearby group geometry
|
||||
if(source.parent)
|
||||
air_master.groups_to_rebuild += source.parent
|
||||
else
|
||||
air_master.tiles_to_update += source
|
||||
if(istype(north))
|
||||
if(north.parent)
|
||||
air_master.groups_to_rebuild += north.parent
|
||||
else
|
||||
air_master.tiles_to_update += north
|
||||
if(istype(south))
|
||||
if(south.parent)
|
||||
air_master.groups_to_rebuild += south.parent
|
||||
else
|
||||
air_master.tiles_to_update += south
|
||||
if(istype(east))
|
||||
if(east.parent)
|
||||
air_master.groups_to_rebuild += east.parent
|
||||
else
|
||||
air_master.tiles_to_update += east
|
||||
if(istype(west))
|
||||
if(west.parent)
|
||||
air_master.groups_to_rebuild += west.parent
|
||||
else
|
||||
air_master.tiles_to_update += west
|
||||
else
|
||||
if(istype(source)) air_master.tiles_to_update += source
|
||||
if(istype(north)) air_master.tiles_to_update += north
|
||||
if(istype(south)) air_master.tiles_to_update += south
|
||||
if(istype(east)) air_master.tiles_to_update += east
|
||||
if(istype(west)) air_master.tiles_to_update += west
|
||||
if(istype(source)) air_master.tiles_to_update += source
|
||||
if(istype(north)) air_master.tiles_to_update += north
|
||||
if(istype(south)) air_master.tiles_to_update += south
|
||||
if(istype(east)) air_master.tiles_to_update += east
|
||||
if(istype(west)) air_master.tiles_to_update += west
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
new /obj/item/device/flashlight(src)
|
||||
new /obj/item/weapon/tank/oxygen/red(src)
|
||||
new /obj/item/weapon/extinguisher(src)
|
||||
new /obj/item/clothing/head/helmet/hardhat/red(src)
|
||||
new /obj/item/clothing/head/helmet/space/fire_helmet(src)
|
||||
|
||||
/obj/structure/closet/firecloset/New()
|
||||
..()
|
||||
@@ -17,7 +17,7 @@
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/weapon/tank/oxygen/red(src)
|
||||
new /obj/item/weapon/extinguisher(src)
|
||||
new /obj/item/clothing/head/helmet/hardhat/red(src)
|
||||
new /obj/item/clothing/head/helmet/space/fire_helmet(src)
|
||||
|
||||
/*switch (pickweight(list("nothing" = 5, "bare-bones" = 35, "basic" = 40, "pickpocketed" = 10, "untouched" = 10)))
|
||||
if ("nothing")
|
||||
|
||||
@@ -1050,38 +1050,11 @@ steam.start() -- spawns the effect
|
||||
var/turf/simulated/east = get_step(source,EAST)
|
||||
var/turf/simulated/west = get_step(source,WEST)
|
||||
|
||||
if(need_rebuild)
|
||||
if(istype(source)) //Rebuild/update nearby group geometry
|
||||
if(source.parent)
|
||||
air_master.groups_to_rebuild += source.parent
|
||||
else
|
||||
air_master.tiles_to_update += source
|
||||
if(istype(north))
|
||||
if(north.parent)
|
||||
air_master.groups_to_rebuild += north.parent
|
||||
else
|
||||
air_master.tiles_to_update += north
|
||||
if(istype(south))
|
||||
if(south.parent)
|
||||
air_master.groups_to_rebuild += south.parent
|
||||
else
|
||||
air_master.tiles_to_update += south
|
||||
if(istype(east))
|
||||
if(east.parent)
|
||||
air_master.groups_to_rebuild += east.parent
|
||||
else
|
||||
air_master.tiles_to_update += east
|
||||
if(istype(west))
|
||||
if(west.parent)
|
||||
air_master.groups_to_rebuild += west.parent
|
||||
else
|
||||
air_master.tiles_to_update += west
|
||||
else
|
||||
if(istype(source)) air_master.tiles_to_update += source
|
||||
if(istype(north)) air_master.tiles_to_update += north
|
||||
if(istype(south)) air_master.tiles_to_update += south
|
||||
if(istype(east)) air_master.tiles_to_update += east
|
||||
if(istype(west)) air_master.tiles_to_update += west
|
||||
if(istype(source)) air_master.tiles_to_update += source
|
||||
if(istype(north)) air_master.tiles_to_update += north
|
||||
if(istype(south)) air_master.tiles_to_update += south
|
||||
if(istype(east)) air_master.tiles_to_update += east
|
||||
if(istype(west)) air_master.tiles_to_update += west
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
@@ -236,8 +236,10 @@
|
||||
/obj/item/weapon/flamethrower/proc/ignite_turf(turf/target)
|
||||
//TODO: DEFERRED Consider checking to make sure tank pressure is high enough before doing this...
|
||||
//Transfer 5% of current tank air contents to turf
|
||||
var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(0.05*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
|
||||
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
|
||||
new/obj/liquid_fuel/flamethrower_fuel(target,air_transfer.toxins,get_dir(loc,target))
|
||||
air_transfer.toxins = 0
|
||||
target.assume_air(air_transfer)
|
||||
//Burn it based on transfered gas
|
||||
//target.hotspot_expose(part4.air_contents.temperature*2,300)
|
||||
|
||||
@@ -145,38 +145,11 @@
|
||||
var/turf/simulated/east = get_step(source,EAST)
|
||||
var/turf/simulated/west = get_step(source,WEST)
|
||||
|
||||
if(need_rebuild)
|
||||
if(istype(source)) //Rebuild/update nearby group geometry
|
||||
if(source.parent)
|
||||
air_master.groups_to_rebuild += source.parent
|
||||
else
|
||||
air_master.tiles_to_update += source
|
||||
if(istype(north))
|
||||
if(north.parent)
|
||||
air_master.groups_to_rebuild += north.parent
|
||||
else
|
||||
air_master.tiles_to_update += north
|
||||
if(istype(south))
|
||||
if(south.parent)
|
||||
air_master.groups_to_rebuild += south.parent
|
||||
else
|
||||
air_master.tiles_to_update += south
|
||||
if(istype(east))
|
||||
if(east.parent)
|
||||
air_master.groups_to_rebuild += east.parent
|
||||
else
|
||||
air_master.tiles_to_update += east
|
||||
if(istype(west))
|
||||
if(west.parent)
|
||||
air_master.groups_to_rebuild += west.parent
|
||||
else
|
||||
air_master.tiles_to_update += west
|
||||
else
|
||||
if(istype(source)) air_master.tiles_to_update += source
|
||||
if(istype(north)) air_master.tiles_to_update += north
|
||||
if(istype(south)) air_master.tiles_to_update += south
|
||||
if(istype(east)) air_master.tiles_to_update += east
|
||||
if(istype(west)) air_master.tiles_to_update += west
|
||||
if(istype(source)) air_master.tiles_to_update += source
|
||||
if(istype(north)) air_master.tiles_to_update += north
|
||||
if(istype(south)) air_master.tiles_to_update += south
|
||||
if(istype(east)) air_master.tiles_to_update += east
|
||||
if(istype(west)) air_master.tiles_to_update += west
|
||||
|
||||
return 1
|
||||
|
||||
@@ -225,8 +198,6 @@
|
||||
|
||||
proc/TemperatureAct(temperature)
|
||||
for(var/turf/simulated/floor/target_tile in range(2,loc))
|
||||
if(target_tile.parent && target_tile.parent.group_processing)
|
||||
target_tile.parent.suspend_group_processing()
|
||||
|
||||
var/datum/gas_mixture/napalm = new
|
||||
|
||||
@@ -305,4 +276,4 @@
|
||||
isSwitchingStates = 0
|
||||
|
||||
Dismantle(devastated = 0)
|
||||
del(src)
|
||||
del(src)
|
||||
|
||||
@@ -30,8 +30,6 @@
|
||||
|
||||
for (var/turf/simulated/floor/target in range(1,src))
|
||||
if(!target.blocks_air)
|
||||
if(target.parent)
|
||||
target.parent.suspend_group_processing()
|
||||
|
||||
var/datum/gas_mixture/payload = new
|
||||
var/datum/gas/sleeping_agent/trace_gas = new
|
||||
@@ -48,8 +46,6 @@
|
||||
/obj/effect/mine/proc/triggerplasma(obj)
|
||||
for (var/turf/simulated/floor/target in range(1,src))
|
||||
if(!target.blocks_air)
|
||||
if(target.parent)
|
||||
target.parent.suspend_group_processing()
|
||||
|
||||
var/datum/gas_mixture/payload = new
|
||||
|
||||
|
||||
@@ -346,20 +346,8 @@
|
||||
var/turf/simulated/source = loc
|
||||
var/turf/simulated/target = get_step(source,dir)
|
||||
|
||||
if(need_rebuild)
|
||||
if(istype(source)) //Rebuild/update nearby group geometry
|
||||
if(source.parent)
|
||||
air_master.groups_to_rebuild += source.parent
|
||||
else
|
||||
air_master.tiles_to_update += source
|
||||
if(istype(target))
|
||||
if(target.parent)
|
||||
air_master.groups_to_rebuild += target.parent
|
||||
else
|
||||
air_master.tiles_to_update += target
|
||||
else
|
||||
if(istype(source)) air_master.tiles_to_update += source
|
||||
if(istype(target)) air_master.tiles_to_update += target
|
||||
if(istype(source)) air_master.tiles_to_update += source
|
||||
if(istype(target)) air_master.tiles_to_update += target
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
verbs += /client/proc/voting
|
||||
verbs += /client/proc/hide_verbs
|
||||
verbs += /client/proc/general_report
|
||||
verbs += /client/proc/air_report
|
||||
//verbs += /client/proc/air_report
|
||||
verbs += /client/proc/deadmin_self
|
||||
//verbs += /client/proc/cmd_admin_prison --Merged with player panel
|
||||
//verbs += /obj/admins/proc/unprison --Merged with player panel
|
||||
@@ -248,7 +248,7 @@
|
||||
// verbs += /client/proc/mapload
|
||||
verbs += /client/proc/check_words
|
||||
verbs += /client/proc/drop_bomb
|
||||
verbs += /client/proc/kill_airgroup
|
||||
//verbs += /client/proc/kill_airgroup
|
||||
//verbs += /client/proc/cmd_admin_drop_everything --Merged with view variables
|
||||
verbs += /client/proc/make_sound
|
||||
verbs += /client/proc/play_local_sound
|
||||
@@ -278,7 +278,7 @@
|
||||
verbs += /client/proc/Force_Event_admin
|
||||
verbs += /client/proc/radioalert
|
||||
verbs += /client/proc/CarbonCopy
|
||||
verbs += /client/proc/jump_to_dead_group
|
||||
//verbs += /client/proc/jump_to_dead_group
|
||||
else return
|
||||
|
||||
//Game Master
|
||||
@@ -403,7 +403,7 @@
|
||||
verbs -= /client/proc/voting
|
||||
verbs -= /client/proc/hide_verbs
|
||||
verbs -= /client/proc/general_report
|
||||
verbs -= /client/proc/air_report
|
||||
//verbs -= /client/proc/air_report
|
||||
verbs -= /client/proc/cmd_admin_say
|
||||
verbs -= /client/proc/cmd_admin_gib_self
|
||||
verbs -= /client/proc/restartcontroller
|
||||
@@ -452,13 +452,13 @@
|
||||
//verbs -= /obj/admins/proc/unprison --Merged with player panel
|
||||
//verbs -= /client/proc/cmd_switch_radio --removed because tcommsat is staying
|
||||
verbs -= /client/proc/togglebuildmodeself
|
||||
verbs -= /client/proc/kill_airgroup
|
||||
//verbs -= /client/proc/kill_airgroup
|
||||
verbs -= /client/proc/debug_master_controller
|
||||
verbs -= /client/proc/make_tajaran
|
||||
verbs -= /client/proc/admin_deny_shuttle
|
||||
verbs -= /client/proc/cmd_admin_christmas
|
||||
verbs -= /client/proc/editappear
|
||||
verbs -= /client/proc/jump_to_dead_group
|
||||
//verbs -= /client/proc/jump_to_dead_group
|
||||
verbs -= /client/proc/playernotes
|
||||
verbs -= /obj/admins/proc/show_skills
|
||||
verbs -= /client/proc/enable_debug_verbs
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
usr << browse(output,"window=generalreport")
|
||||
//feedback_add_details("admin_verb","SGR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
air_report()
|
||||
/* air_report()
|
||||
set category = "Debug"
|
||||
set name = "Show Air Report"
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
for(var/datum/gas/trace_gas in GM.trace_gases)
|
||||
usr << "[trace_gas.type]: [trace_gas.moles]"
|
||||
//feedback_add_details("admin_verb","DAST") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
*/
|
||||
fix_next_move()
|
||||
set category = "Debug"
|
||||
set name = "Unfreeze Everyone"
|
||||
@@ -183,7 +183,7 @@
|
||||
//feedback_add_details("admin_verb","RLDA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
jump_to_dead_group()
|
||||
/*jump_to_dead_group()
|
||||
set name = "Jump to dead group"
|
||||
set category = "Debug"
|
||||
if(!holder)
|
||||
@@ -221,7 +221,7 @@
|
||||
else
|
||||
usr << "Local airgroup is unsimulated!"
|
||||
//feedback_add_details("admin_verb","KLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
*/
|
||||
|
||||
tension_report()
|
||||
set category = "Debug"
|
||||
|
||||
@@ -130,14 +130,14 @@ var/intercom_range_display_status = 0
|
||||
src.verbs += /client/proc/camera_view //-errorage
|
||||
src.verbs += /client/proc/sec_camera_report //-errorage
|
||||
src.verbs += /client/proc/intercom_view //-errorage
|
||||
src.verbs += /client/proc/air_status //Air things
|
||||
//src.verbs += /client/proc/air_status //Air things
|
||||
src.verbs += /client/proc/Cell //More air things
|
||||
src.verbs += /client/proc/atmosscan //check plumbing
|
||||
src.verbs += /client/proc/powerdebug //check power
|
||||
src.verbs += /client/proc/count_objects_on_z_level
|
||||
src.verbs += /client/proc/count_objects_all
|
||||
src.verbs += /client/proc/cmd_assume_direct_control //-errorage
|
||||
src.verbs += /client/proc/jump_to_dead_group
|
||||
//src.verbs += /client/proc/jump_to_dead_group
|
||||
src.verbs += /client/proc/startSinglo
|
||||
src.verbs += /client/proc/ticklag //allows you to set the ticklag.
|
||||
src.verbs += /client/proc/cmd_admin_grantfullaccess
|
||||
|
||||
@@ -350,8 +350,6 @@ datum
|
||||
on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
var/turf/location = get_turf(holder.my_atom.loc)
|
||||
for(var/turf/simulated/floor/target_tile in range(0,location))
|
||||
if(target_tile.parent && target_tile.parent.group_processing)
|
||||
target_tile.parent.suspend_group_processing()
|
||||
|
||||
var/datum/gas_mixture/napalm = new
|
||||
|
||||
|
||||
@@ -28,6 +28,18 @@
|
||||
protective_temperature = 10000
|
||||
slowdown = 1.5
|
||||
|
||||
/obj/item/clothing/head/helmet/space/fire_helmet
|
||||
name = "Fire Helmet"
|
||||
desc = "A helmet designed to protect against fires in sealed areas, which often create extreme pressures."
|
||||
flags = FPRINT | TABLEPASS | HEADSPACE | HEADCOVERSEYES | BLOCKHAIR
|
||||
see_face = 0.0
|
||||
permeability_coefficient = 0.01
|
||||
heat_transfer_coefficient = 0.01
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50)
|
||||
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES
|
||||
icon_state = "hazmat_firered"
|
||||
item_state = "hazhat_firered"
|
||||
|
||||
|
||||
|
||||
/obj/item/clothing/head/radiation
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return
|
||||
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
var/datum/air_group/breath
|
||||
var/datum/gas_mixture/breath
|
||||
// HACK NEED CHANGING LATER
|
||||
if(src.health < 0)
|
||||
src.losebreath++
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return
|
||||
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
var/datum/air_group/breath
|
||||
var/datum/gas_mixture/breath
|
||||
// HACK NEED CHANGING LATER
|
||||
if(health < 0)
|
||||
losebreath++
|
||||
|
||||
@@ -359,7 +359,7 @@
|
||||
if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return
|
||||
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
var/datum/air_group/breath
|
||||
var/datum/gas_mixture/breath
|
||||
|
||||
// HACK NEED CHANGING LATER
|
||||
if(isbreathing && health < config.health_threshold_crit)
|
||||
@@ -420,6 +420,14 @@
|
||||
smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs?
|
||||
break // If they breathe in the nasty stuff once, no need to continue checking
|
||||
|
||||
if(istype(wear_mask, /obj/item/clothing/mask/gas))
|
||||
var/datum/gas_mixture/filtered = new()
|
||||
filtered.toxins = breath.toxins
|
||||
filtered.trace_gases = breath.trace_gases.Copy()
|
||||
breath.toxins = 0
|
||||
breath.trace_gases = list()
|
||||
loc.assume_air(filtered)
|
||||
|
||||
else //Still give containing object the chance to interact
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
@@ -469,7 +477,7 @@
|
||||
var/safe_oxygen_min = 16 // Minimum safe partial pressure of O2, in kPa
|
||||
//var/safe_oxygen_max = 140 // Maximum safe partial pressure of O2, in kPa (Not used for now)
|
||||
var/safe_co2_max = 10 // Yes it's an arbitrary value who cares?
|
||||
var/safe_toxins_max = 0.005
|
||||
var/safe_toxins_max = 0.0025
|
||||
var/SA_para_min = 1
|
||||
var/SA_sleep_min = 5
|
||||
var/oxygen_used = 0
|
||||
@@ -649,7 +657,7 @@
|
||||
|
||||
//Account for massive pressure differences. Done by Polymorph
|
||||
var/pressure = environment.return_pressure()
|
||||
if(!istype(wear_suit, /obj/item/clothing/suit/space))
|
||||
if(!istype(wear_suit, /obj/item/clothing/suit/space) && !istype(wear_suit, /obj/item/clothing/suit/fire))
|
||||
/*if(pressure < 20)
|
||||
if(prob(25))
|
||||
src << "You feel the splittle on your lips and the fluid on your eyes boiling away, the capillteries in your skin breaking."
|
||||
@@ -658,6 +666,9 @@
|
||||
if(pressure > HAZARD_HIGH_PRESSURE)
|
||||
adjustBruteLoss(min((10+(round(pressure/(HIGH_STEP_PRESSURE)-2)*5)),MAX_PRESSURE_DAMAGE))
|
||||
|
||||
if(environment.toxins > MOLES_PLASMA_VISIBLE)
|
||||
pl_effects()
|
||||
|
||||
return //TODO: DEFERRED
|
||||
|
||||
adjust_body_temperature(current, loc_temp, boost)
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
if(!loc) return //probably ought to make a proper fix for this, but :effort: --NeoFite
|
||||
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
var/datum/air_group/breath
|
||||
var/datum/gas_mixture/breath
|
||||
|
||||
if(losebreath>0) //Suffocating so do not take a breath
|
||||
src.losebreath--
|
||||
|
||||
@@ -40,14 +40,8 @@
|
||||
return 0
|
||||
var/mob/living/carbon/human/H = src //make this damage method divide the damage to be done among all the body parts, then burn each body part for that much damage. will have better effect then just randomly picking a body part
|
||||
var/divided_damage = (burn_amount)/(H.organs.len)
|
||||
var/extradam = 0 //added to when organ is at max dam
|
||||
for(var/name in H.organs)
|
||||
var/datum/organ/external/affecting = H.organs[name]
|
||||
if(!affecting) continue
|
||||
if(affecting.take_damage(0, divided_damage+extradam, 0, used_weapon))
|
||||
extradam = 0
|
||||
else
|
||||
extradam += divided_damage
|
||||
apply_damage(divided_damage, BURN, name, 0, 0, "Skin Burns")
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
return 1
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
burn *= 0.66 //~2/3 damage for ROBOLIMBS
|
||||
|
||||
if(owner && !robot)
|
||||
owner.pain(display_name, (brute+burn)*3, 1)
|
||||
owner.pain(display_name, (brute+burn)*3, 1, burn > brute)
|
||||
if(sharp)
|
||||
var/nux = brute * rand(10,15)
|
||||
if(brute_dam >= max_damage)
|
||||
|
||||
@@ -7,7 +7,7 @@ mob/var/next_pain_time = 0
|
||||
|
||||
// partname is the name of a body part
|
||||
// amount is a num from 1 to 100
|
||||
mob/proc/pain(var/partname, var/amount, var/force)
|
||||
mob/proc/pain(var/partname, var/amount, var/force, var/burning = 0)
|
||||
if(stat >= 2) return
|
||||
if(world.time < next_pain_time && !force)
|
||||
return
|
||||
@@ -17,15 +17,26 @@ mob/proc/pain(var/partname, var/amount, var/force)
|
||||
if(amount > 50 && prob(amount / 5))
|
||||
src:drop_item()
|
||||
var/msg
|
||||
switch(amount)
|
||||
if(1 to 10)
|
||||
msg = "<b>Your [partname] hurts a bit.</b>"
|
||||
if(11 to 90)
|
||||
flash_weak_pain()
|
||||
msg = "<b><font size=1>Ouch! Your [partname] hurts.</font></b>"
|
||||
if(91 to 10000)
|
||||
flash_pain()
|
||||
msg = "<b><font size=3>OH GOD! Your [partname] is hurting terribly!</font></b>"
|
||||
if(burning)
|
||||
switch(amount)
|
||||
if(1 to 10)
|
||||
msg = "\red <b>Your [partname] burns.</b>"
|
||||
if(11 to 90)
|
||||
flash_weak_pain()
|
||||
msg = "\red <b><font size=2>Your [partname] burns badly!</font></b>"
|
||||
if(91 to 10000)
|
||||
flash_pain()
|
||||
msg = "\red <b><font size=3>OH GOD! Your [partname] is on fire!</font></b>"
|
||||
else
|
||||
switch(amount)
|
||||
if(1 to 10)
|
||||
msg = "<b>Your [partname] hurts.</b>"
|
||||
if(11 to 90)
|
||||
flash_weak_pain()
|
||||
msg = "<b><font size=2>Your [partname] hurts badly.</font></b>"
|
||||
if(91 to 10000)
|
||||
flash_pain()
|
||||
msg = "<b><font size=3>OH GOD! Your [partname] is hurting terribly!</font></b>"
|
||||
if(msg && (msg != last_pain_message || prob(10)))
|
||||
last_pain_message = msg
|
||||
src << msg
|
||||
|
||||
@@ -14,6 +14,16 @@
|
||||
|
||||
#define MOLES_PLASMA_VISIBLE 0.5 //Moles in a standard cell after which plasma is visible
|
||||
|
||||
#define SPECIFIC_HEAT_TOXIN 200
|
||||
#define SPECIFIC_HEAT_AIR 20
|
||||
#define SPECIFIC_HEAT_CDO 30
|
||||
#define HEAT_CAPACITY_CALCULATION(oxygen,carbon_dioxide,nitrogen,toxins) \
|
||||
(carbon_dioxide*SPECIFIC_HEAT_CDO + (oxygen+nitrogen)*SPECIFIC_HEAT_AIR + toxins*SPECIFIC_HEAT_TOXIN)
|
||||
|
||||
#define MINIMUM_HEAT_CAPACITY 0.0003
|
||||
#define QUANTIZE(variable) (round(variable,0.0001))
|
||||
#define TRANSFER_FRACTION 5 //What fraction (1/#) of the air difference to try and transfer
|
||||
|
||||
#define BREATH_VOLUME 0.5 //liters in a normal breath
|
||||
#define BREATH_PERCENTAGE BREATH_VOLUME/CELL_VOLUME
|
||||
//Amount of air to take a from a tile
|
||||
|
||||
Reference in New Issue
Block a user