Fixes for ZAS, including fire, geometry, rebuilding consideration, and atmospheric lockdowns. In addition, improved supermatter, and humans now absorb all the oxygen they inhale, due to the ludicrous volumes of air normally encountered (Does not reduce effectiveness of air tanks)

This commit is contained in:
SkyMarshal
2012-08-21 01:18:01 -07:00
parent 175661aae5
commit d41ffc18fd
10 changed files with 338 additions and 96 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

@@ -1,10 +1,22 @@
#define NITROGEN_RETARDATION_FACTOR 12 //Higher == N2 slows reaction more
#define THERMAL_RELEASE_MODIFIER 20 //Higher == less heat released during reaction
#define PLASMA_RELEASE_MODIFIER 200 //Higher == less plasma released by reaction
#define OXYGEN_RELEASE_MODIFIER 150 //Higher == less oxygen released at high temperature/power
#define REACTION_POWER_MODIFIER 1.1 //Higher == more overall power
#define THERMAL_RELEASE_MODIFIER 0.55 //Percentage of output power given to heat generation.
#define WARNING_DELAY 30 //30 seconds between warnings.
#define PLASMA_RELEASE_MODIFIER 0.24 //Percentage of output power given to plasma generation.
#define PLASMA_CONVERSION_FACTOR 50 //How much energy per mole of plasma
#define MAX_PLASMA_RELATIVE_INCREASE 0.3 //Percentage of current plasma amounts that can be added to preexisting plasma.
#define OXYGEN_RELEASE_MODIFIER 0.13 //Percentage of output power given to oxygen generation.
#define OXYGEN_CONVERSION_FACTOR 150 //How much energy per mole of oxygen.
#define MAX_OXYGEN_RELATIVE_INCREASE 0.2 //Percentage of current oxygen amounts that can be added to preexisting oxygen.
#define RADIATION_POWER_MODIFIER 0.03 //How much power goes to irradiating the area.
#define RADIATION_FACTOR 10
#define HALLUCINATION_POWER_MODIFIER 0.05 //How much power goes to hallucinations.
#define HALLUCINATION_FACTOR 20
#define REACTION_POWER_MODIFIER 4 //Higher == more overall power
#define WARNING_DELAY 45 //45 seconds between warnings.
/obj/machinery/power/supermatter
name = "Supermatter"
@@ -19,14 +31,18 @@
var/gasefficency = 0.25
var/base_icon_state = "darkmatter"
var/damage = 0
var/damage_archived = 0
var/safe_alert = "Crystaline hyperstructure returning to safe operating levels."
var/warning_point = 300
var/warning_point = 100
var/warning_alert = "Danger! Crystal hyperstructure instability!"
var/emergency_point = 3000
var/emergency_point = 700
var/emergency_alert = "CRYSTAL DELAMINATION IMMINENT"
var/explosion_point = 4500
var/explosion_point = 1000
var/emergency_issued = 0
var/explosion_power = 8
@@ -34,27 +50,25 @@
var/power = 0
var/halucination_range = 8
var/rad_range = 4
shard //Small subtype, less efficient and more sensitive, but less boom.
name = "Supermatter Shard"
desc = "A strangely translucent and iridescent crystal. Looks like it used to be part of a larger structure. \red You get headaches just from looking at it."
warning_point = 200
emergency_point = 2500
explosion_point = 3500
icon_state = "darkmatter_shard"
base_icon_state = "darkmatter_shard"
gasefficency = 12.5
halucination_range = 5
rad_range = 2
warning_point = 50
emergency_point = 500
explosion_point = 900
explosion_power = 2 //2,4,6,8? Or is that too small?
gasefficency = 0.125
explosion_power = 3 //3,6,9,12? Or is that too small?
process()
var/turf/simulated/L = loc
var/turf/L = loc
if(!istype(L)) //If we are not on a turf, uh oh.
del src
@@ -63,31 +77,36 @@
var/datum/gas_mixture/env = L.return_air()
//Remove gas from surrounding area
var/transfer_moles = gasefficency * env.total_moles
var/datum/gas_mixture/removed = env.remove(transfer_moles)
var/datum/gas_mixture/removed = env.remove(gasefficency * env.total_moles)
if (!removed)
return 1
damage_archived = damage
damage = max( damage + ( (removed.temperature - 1000) / 150 ) , 0 )
if(damage > warning_point) // while the core is still damaged and it's still worth noting its status
if((world.timeofday - lastwarning) / 10 >= WARNING_DELAY)
if(damage > emergency_point)
radioalert("states, \"[emergency_alert]\"","Supermatter Monitor")
lastwarning = world.timeofday
else if(damage >= damage_archived) // The damage is still going up
radioalert("states, \"[warning_alert]\"","Supermatter Monitor")
lastwarning = world.timeofday-150
else // Phew, we're safe
radioalert("states, \"[safe_alert]\"","Supermatter Monitor")
lastwarning = world.timeofday
lastwarning = world.timeofday
if(damage > explosion_point)
explosion(loc,explosion_power,explosion_power*2,explosion_power*3,explosion_power*4,1)
del src
damage_archived = damage
damage = max( damage + ( (removed.temperature - 1000) / 150 ) , 0 )
if(!removed.total_moles)
damage += max((power-1600)/10,0)
power = max(power,1600)
return 1
var/nitrogen_mod = abs((removed.nitrogen / removed.total_moles)) * NITROGEN_RETARDATION_FACTOR
var/oxygen = max(min(removed.oxygen / removed.total_moles - nitrogen_mod, 1), 0)
@@ -95,47 +114,72 @@
if(oxygen > 0.8)
// with a perfect gas mix, make the power less based on heat
temp_factor = 100
icon_state = "darkmatter_glow"
icon_state = "[base_icon_state]_glow"
else
// in normal mode, base the produced energy around the heat
temp_factor = 20
icon_state = "darkmatter"
temp_factor = 60
icon_state = base_icon_state
//Calculate power released as heat and gas, in as the sqrt of the power.
var/power_factor = (power/100) ** 3
var/power_factor = (power/500) ** 3
var/device_energy = oxygen * power_factor
power = max(round((removed.temperature - T0C) / temp_factor) + power - power_factor, 0) //Total laser power plus an overload factor
//Final energy calcs.
device_energy *= removed.temperature / T0C
device_energy = round(device_energy * REACTION_POWER_MODIFIER)
device_energy = max(device_energy * REACTION_POWER_MODIFIER,0)
//To figure out how much temperature to add each tick, consider that at one atmosphere's worth
//of pure oxygen, with all four lasers firing at standard energy and no N2 present, at room temperature
//that the device energy is around 2140. At that stage, we don't want too much heat to be put out
//Since the core is effectively "cold"
//To figure out how much temperature to add each tick, consider that at one atmosphere's worth
//of pure oxygen, with all four lasers firing at standard energy and no N2 present, at room temperature
//that the device energy is around 2140. At that stage, we don't want too much heat to be put out
//Since the core is effectively "cold"
//Also keep in mind we are only adding this temperature to (efficiency)% of the one tile the rock
//is on. An increase of 4*C @ 25% efficiency here results in an increase of 1*C / (#tilesincore) overall.
removed.temperature += max((device_energy / THERMAL_RELEASE_MODIFIER), 0)
//Also keep in mind we are only adding this temperature to (efficiency)% of the one tile the rock
//is on. An increase of 4*C @ 25% efficiency here results in an increase of 1*C / (#tilesincore) overall.
removed.temperature = min(removed.temperature, 1500)
var/plasma_energy = device_energy * PLASMA_RELEASE_MODIFIER
var/oxygen_energy = device_energy * OXYGEN_RELEASE_MODIFIER
var/other_energy = device_energy * (1- (OXYGEN_RELEASE_MODIFIER + PLASMA_RELEASE_MODIFIER))
//Calculate how much gas to release
removed.toxins += max(device_energy / PLASMA_RELEASE_MODIFIER, 0)
//Put as much plasma out as is permitted.
if( plasma_energy > removed.total_moles * PLASMA_CONVERSION_FACTOR * MAX_PLASMA_RELATIVE_INCREASE / gasefficency)
removed.toxins += (MAX_PLASMA_RELATIVE_INCREASE * removed.total_moles / gasefficency)
other_energy += plasma_energy - (removed.total_moles * PLASMA_CONVERSION_FACTOR * MAX_PLASMA_RELATIVE_INCREASE / gasefficency)
else
removed.toxins += plasma_energy/PLASMA_CONVERSION_FACTOR
removed.oxygen += max((device_energy + removed.temperature - T0C) / OXYGEN_RELEASE_MODIFIER, 0)
//Put as much plasma out as is permitted.
if( oxygen_energy > removed.total_moles * OXYGEN_CONVERSION_FACTOR * MAX_OXYGEN_RELATIVE_INCREASE / gasefficency)
removed.oxygen += (MAX_OXYGEN_RELATIVE_INCREASE * removed.total_moles / gasefficency)
other_energy += oxygen_energy - (removed.total_moles * OXYGEN_CONVERSION_FACTOR * MAX_OXYGEN_RELATIVE_INCREASE / gasefficency)
else
removed.oxygen += oxygen_energy/OXYGEN_CONVERSION_FACTOR
var/heat_energy = (other_energy*THERMAL_RELEASE_MODIFIER)/(1-(OXYGEN_RELEASE_MODIFIER + PLASMA_RELEASE_MODIFIER))
var/hallucination_energy = (other_energy*HALLUCINATION_POWER_MODIFIER*HALLUCINATION_FACTOR)/(1-(OXYGEN_RELEASE_MODIFIER + PLASMA_RELEASE_MODIFIER))
var/rad_energy = (other_energy*RADIATION_POWER_MODIFIER*RADIATION_FACTOR)/(1-(OXYGEN_RELEASE_MODIFIER + PLASMA_RELEASE_MODIFIER))
var/heat_applied = max(heat_energy,0)
if(heat_applied + removed.temperature > 800)
removed.temperature = 800
var/energy_to_reconsider = (heat_applied + removed.temperature - 800)
hallucination_energy += (energy_to_reconsider*HALLUCINATION_POWER_MODIFIER)/(HALLUCINATION_POWER_MODIFIER+RADIATION_POWER_MODIFIER)
rad_energy += (energy_to_reconsider*RADIATION_POWER_MODIFIER)/(HALLUCINATION_POWER_MODIFIER+RADIATION_POWER_MODIFIER)
else
removed.temperature += heat_applied
removed.update_values()
env.merge(removed)
for(var/mob/living/carbon/human/l in range(src, halucination_range)) // you have to be seeing the core to get hallucinations
for(var/mob/living/carbon/human/l in view(src, round(hallucination_energy**0.25))) // you have to be seeing the core to get hallucinations
if(prob(10) && !istype(l.glasses, /obj/item/clothing/glasses/meson))
l.hallucination = 50
world << "Inducing hallucinations"
l.hallucination += hallucination_energy/((get_dist(l,src)**2))
for(var/mob/living/l in range(src,rad_range))
l.apply_effect(rand(20,60)/(get_dist(src, l)+1), IRRADIATE)
for(var/mob/living/l in range(src,round(rad_energy**0.25)))
var/rads = rad_energy/((get_dist(l,src)**2))
l.apply_effect(rads, IRRADIATE)
return 1
+161 -8
View File
@@ -92,15 +92,16 @@ datum
controller
air_system
//Geoemetry lists
var/list/turf/simulated/turfs_with_connections = list()
var/list/obj/fire/active_hotspots = list()
var/list/turfs_with_connections = list()
var/list/active_hotspots = list()
//Special functions lists
var/list/turf/simulated/tiles_to_reconsider_zones = list()
var/list/tiles_to_reconsider_zones = list()
//Geometry updates lists
var/list/turf/simulated/tiles_to_update = list()
var/list/connection/connections_to_check = list()
var/list/tiles_to_update = list()
var/list/connections_to_check = list()
var/list/rebuilds_to_consider = list()
var/current_cycle = 0
var/update_delay = 5 //How long between check should it try to process atmos again.
@@ -184,9 +185,30 @@ datum
var/output = T.update_air_properties()
if(. && T && !output)
. = 0 //If a runtime occured, make sure we can sense it.
log_admin("ZASALERT: Unable run turf/simualted/update_air_properties()")
//message_admins("ZASALERT: Unable run turf/simualted/update_air_properties()")
tiles_to_update = list()
tick_progress = "reconsider_zones"
if(rebuilds_to_consider.len)
for(var/turf/T in rebuilds_to_consider)
if(istype(T, /turf/simulated) && T.zone && !T.zone.rebuild)
var/turf/simulated/other_turf = rebuilds_to_consider[T]
if(istype(other_turf))
ConsiderRebuild(T,other_turf)
else if(istype(other_turf, /list))
var/list/temp_turfs = other_turf
for(var/turf/NT in temp_turfs)
ConsiderRebuild(T,NT)
else if (istype(T))
var/turf/simulated/other_turf = rebuilds_to_consider[T]
if(istype(other_turf))
ConsiderRebuild(other_turf,T)
else if(istype(other_turf, /list))
var/list/temp_turfs = other_turf
for(var/turf/simulated/NT in temp_turfs)
ConsiderRebuild(NT,T)
rebuilds_to_consider = list()
tick_progress = "connections_to_check"
if(connections_to_check.len)
for(var/connection/C in connections_to_check)
@@ -215,6 +237,137 @@ datum
var/output = F.process()
if(. && F && !output)
. = 0
log_admin("ZASALERT: Unable run obj/fire/process()")
//message_admins("ZASALERT: Unable run obj/fire/process()")
tick_progress = "success"
tick_progress = "success"
proc/AddToConsiderRebuild(var/turf/simulated/T, var/turf/NT)
var/turf/existing_test = rebuilds_to_consider[T]
var/turf/existing_test_alternate = rebuilds_to_consider[NT]
if(existing_test)
if(NT == existing_test)
return
else if(islist(existing_test) && existing_test[NT])
return
else if(existing_test_alternate)
if(T == existing_test_alternate)
return
else if(islist(existing_test_alternate) && existing_test_alternate[T])
return
if(istype(T))
if(istype(existing_test))
var/list/temp_list = list(NT = 1, existing_test = 1)
rebuilds_to_consider[T] = temp_list
else if(istype(existing_test, /list))
existing_test[NT] = 1
else
rebuilds_to_consider[T] = NT
else if(istype(NT, /turf/simulated))
if(istype(existing_test_alternate))
var/list/temp_list = list(T = 1, existing_test_alternate = 1)
rebuilds_to_consider[NT] = temp_list
else if(istype(existing_test_alternate, /list))
existing_test_alternate[T] = 1
else
rebuilds_to_consider[NT] = T
proc/ConsiderRebuild(var/turf/simulated/T, var/turf/NT)
if(istype(NT, /turf/simulated) && NT.zone != T.zone)
T.zone.RemoveTurf(NT)
if(NT.zone)
NT.zone.RemoveTurf(T)
return
if(T.zone.rebuild)
return
var/zone/zone = T.zone
var/target_dir = get_dir(T, NT)
if(target_dir in list(NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST))
T.zone.rebuild = 1
return
var/test_dir = turn(target_dir, 90)
var/turf/simulated/current = T
var/turf/simulated/next
var/stepped_back = 0
if( !(T.air_check_directions&test_dir || T.air_check_directions&turn(target_dir, 270)) )
//Step back, then try to connect.
if(!(T.air_check_directions&get_dir(NT, T)))
zone.rebuild = 1
return
current = get_step(T, get_dir(NT, T))
if(!istype(current) || !(current.air_check_directions&test_dir || current.air_check_directions&turn(target_dir, 270)) )
zone.rebuild = 1
return
stepped_back = 1
if ( !(current.air_check_directions&test_dir) && current.air_check_directions&turn(target_dir, 270) )
//Try to connect to the right hand side.
var/flipped = 0
test_dir = turn(target_dir, 270)
for(var/i = 1, i <= 10, i++)
if(get_dir(current, NT) in cardinal)
target_dir = get_dir(current, NT)
if(!istype(current) || !(current.air_check_directions&target_dir || current.air_check_directions&test_dir))
if(flipped)
zone.rebuild = 1
return
current = T
test_dir = turn(target_dir, 180)
i = 0
target_dir = get_dir(current, NT)
flipped = 1
continue
if(current.air_check_directions&target_dir && !stepped_back)
next = get_step(current, target_dir)
if(!next.HasDoor())
current = next
if(current.air_check_directions&test_dir && current != next)
next = get_step(current, test_dir)
if(!next.HasDoor())
current = next
if(current == NT)
return //We made it, yaaay~
stepped_back = 0
zone.rebuild = 1
else if ( current.air_check_directions&test_dir )
//Try to connect to the left hand side.
for(var/i = 1, i <= 10, i++)
if(get_dir(current, NT) in cardinal)
target_dir = get_dir(current, NT)
if(!istype(current) || !(current.air_check_directions&target_dir || current.air_check_directions&test_dir))
zone.rebuild = 1
return
if(current.air_check_directions&target_dir && !stepped_back)
next = get_step(current, target_dir)
if(!next.HasDoor())
current = next
if(current.air_check_directions&test_dir && current != next)
next = get_step(current, test_dir)
if(!next.HasDoor())
current = next
if(current == NT)
return //We made it, yaaay~
stepped_back = 0
zone.rebuild = 1
else
//FUCK IT
zone.rebuild = 1
+9 -11
View File
@@ -92,10 +92,14 @@ obj
//Also get liquid fuels on the ground.
obj/liquid_fuel/liquid = locate() in S
var/datum/gas_mixture/flow = air_contents.remove_ratio(0.25)
//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.
firelevel = air_contents.calculate_firelevel(liquid)
//Ensure that there is an appropriate amount of fuel and O2 here.
if(firelevel > 0.25 && (air_contents.toxins || fuel || liquid))
if(firelevel > 0.25 && flow.oxygen > 0.3 && (air_contents.toxins || fuel || liquid))
for(var/direction in cardinal)
if(S.air_check_directions&direction) //Grab all valid bordering tiles
@@ -114,10 +118,6 @@ obj
if( prob( firelevel*10 ) )
new/obj/fire(enemy_tile,firelevel)
var/datum/gas_mixture/flow = air_contents.remove_ratio(0.25)
//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.
if(flow)
//Ensure adequate oxygen and fuel.
@@ -126,16 +126,10 @@ obj
//Change icon depending on the fuel, and thus temperature.
if(firelevel > 6)
icon_state = "3"
if(LuminosityRed != 11)
ul_SetLuminosity(11,9,0)
else if(firelevel > 2.5)
icon_state = "2"
if(LuminosityRed != 8)
ul_SetLuminosity(8,7,0)
else
icon_state = "1"
if(LuminosityRed != 5)
ul_SetLuminosity(5,4,0)
//Ensure flow temperature is higher than minimum fire temperatures.
flow.temperature = max(PLASMA_MINIMUM_BURN_TEMPERATURE+0.1,flow.temperature)
@@ -163,6 +157,10 @@ obj
New(newLoc,fl)
..()
if(!istype(loc, /turf) || !loc.CanPass(null, loc, 0, 0))
del src
dir = pick(cardinal)
ul_SetLuminosity(3,2,0)
firelevel = fl
+64 -19
View File
@@ -135,6 +135,7 @@ turf
proc/update_air_properties()
. = 1
var/air_directions_archived = air_check_directions
air_check_directions = 0
for(var/direction in cardinal)
@@ -169,28 +170,69 @@ turf
if(!(C in air_master.connections_to_check))
air_master.connections_to_check += C
for(var/direction in cardinal)
var/turf/T = get_step(src,direction)
if(!istype(T))
continue
// var/list/zone/adjacent_zones = list()
if(zone && !zone.rebuild)
for(var/direction in cardinal)
if(zone.rebuild)
break
if(air_check_directions&direction) //I can connect air in this direction
if(!CanPass(null, T, 0, 0)) //If either block air, we must look to see if the adjacent turfs need rebuilt.
if(T.zone && !T.zone.rebuild)
var/turf/simulated/NT = get_step(src, reverse_direction(direction))
if(istype(NT) && NT.zone && NT.zone == T.zone)
T.zone.rebuild = 1
var/turf/T = get_step(src,direction)
if(!istype(T))
continue
// var/list/zone/adjacent_zones = list()
else
ZConnect(src,T)
if(air_check_directions&direction) //I can connect air in this direction
if(!CanPass(null, T, 0, 0)) //If either block air, we must look to see if the adjacent turfs need rebuilt.
if(!T.CanPass(null, T, 0, 0)) //Target blocks air
var/turf/NT = get_step(T, direction)
if(istype(NT,/turf/simulated) && NT in zone.contents)
air_master.AddToConsiderRebuild(src,NT)
else if(istype(NT) && NT in zone.unsimulated_tiles)
var/consider_rebuild = 0
for(var/d in cardinal)
var/turf/UT = get_step(NT,d)
if(istype(UT, /turf/simulated) && UT.zone == zone && UT.CanPass(null, NT, 0, 0)) //If we find a neighboring tile that is in the same zone, check if we need to rebuild
consider_rebuild = 1
break
if(consider_rebuild)
air_master.AddToConsiderRebuild(src,NT) //Gotta check if we need to rebuild, dammit
else
zone.RemoveTurf(NT) //Not adjacent to anything, and unsimulated. Goodbye~
//If I cannot connect to air or whatever, and there is a zone there, I am probably not able to pass air. Consider zone rebuilding
// else if(T.zone && !T.zone.rebuild)
// if(T.zone in adjacent_zones) //Found it more than 1 direction, rebuild
// T.zone.rebuild = 1
// else //Add it for later checks.
// adjacent_zones += T.zone
if(T.zone && !T.zone.rebuild) //I block air.
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)))
air_master.AddToConsiderRebuild(T,NT)
else if(istype(NT) && NT in T.zone.unsimulated_tiles)
var/consider_rebuild = 0
for(var/d in cardinal)
var/turf/UT = get_step(NT,d)
if(istype(UT, /turf/simulated) && UT.zone == T.zone && UT.CanPass(null, NT, 0, 0)) //If we find a neighboring tile that is in the same zone, check if we need to rebuild
consider_rebuild = 1
break
if(consider_rebuild)
air_master.AddToConsiderRebuild(T,NT) //Gotta check if we need to rebuild, dammit
else
T.zone.RemoveTurf(NT) //Not adjacent to anything, and unsimulated. Goodbye~
else
ZConnect(src,T)
else if(air_directions_archived&direction) //Something like a wall was built, changing the geometry.
var/turf/NT = get_step(T, direction)
if(istype(NT,/turf/simulated) && NT in zone.contents)
air_master.AddToConsiderRebuild(src,NT)
else if(istype(NT) && NT in zone.unsimulated_tiles) //Parse if we need to remove the tile, or rebuild the zone.
var/consider_rebuild = 0
for(var/d in cardinal)
var/turf/UT = get_step(NT,d)
if(istype(UT, /turf/simulated) && UT.zone == zone && UT.CanPass(null, NT, 0, 0)) //If we find a neighboring tile that is in the same zone, check if we need to rebuild
consider_rebuild = 1
break
if(consider_rebuild)
air_master.AddToConsiderRebuild(src,NT) //Gotta check if we need to rebuild, dammit
else
zone.RemoveTurf(NT) //Not adjacent to anything, and unsimulated. Goodbye~
if(air_check_directions)
processing = 1
@@ -198,6 +240,9 @@ turf
processing = 0
/turf/proc/HasDoor(turf/O)
//Checks for the presence of doors, used for zone spreading and connection.
//A positive numerical argument checks only for closed doors.
+3 -2
View File
@@ -167,7 +167,8 @@ zone/proc/process()
progress = "problem with: air.react()"
//React the air here.
air.react(null,0)
//Handled by fire, no need for this.
// air.react(null,0)
//Check the graphic.
@@ -454,7 +455,7 @@ zone/proc/Rebuild()
continue
for(var/direction in cardinal)
var/turf/simulated/T = get_step(S,direction)
if(istype(T) && T.zone)
if(istype(T) && T.zone && S.CanPass(null, T, 0, 0))
T.zone.AddTurf(S)
//UNUSED
+4 -4
View File
@@ -355,7 +355,7 @@
E.close()
continue
if(istype(E, /obj/machinery/door/airlock))
/* if(istype(E, /obj/machinery/door/airlock))
if((!E:arePowerSystemsOn()) || (E.stat & NOPOWER) || E:air_locked) continue
if(!E.density)
spawn(0)
@@ -375,7 +375,7 @@
else if(!E:locked) //Don't lock already bolted doors.
E:air_locked = E.req_access
E:req_access = list(ACCESS_ENGINE, ACCESS_ATMOSPHERICS)
E.update_icon()
E.update_icon()*/
proc/air_doors_open(manual)
var/area/A = get_area(loc)
@@ -391,12 +391,12 @@
E.open()
continue
if(istype(E, /obj/machinery/door/airlock))
/* if(istype(E, /obj/machinery/door/airlock))
if((!E:arePowerSystemsOn()) || (E.stat & NOPOWER)) continue
if(!isnull(E:air_locked)) //Don't mess with doors locked for other reasons.
E:req_access = E:air_locked
E:air_locked = null
E.update_icon()
E.update_icon()*/
///////////
//HACKING//
+5 -4
View File
@@ -321,9 +321,10 @@
if (radiation)
if (radiation > 100)
radiation = 100
Weaken(10)
src << "\red You feel weak."
emote("collapse")
if(prob(3))
Weaken(10)
src << "\red You feel weak."
emote("collapse")
if (radiation < 0)
radiation = 0
@@ -541,7 +542,7 @@
oxygen_alert = max(oxygen_alert, 1)*/
else // We're in safe limits
adjustOxyLoss(-5)
oxygen_used = breath.oxygen/6
oxygen_used = breath.oxygen
oxygen_alert = 0
breath.oxygen -= oxygen_used
+1 -1
View File
@@ -29,7 +29,7 @@
#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_VOLUME 0.5 //liters in a normal breath Increased to scale to SS13 speeds.
#define BREATH_PERCENTAGE BREATH_VOLUME/CELL_VOLUME
//Amount of air to take a from a tile
#define HUMAN_NEEDED_OXYGEN MOLES_CELLSTANDARD*BREATH_PERCENTAGE*0.16
Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 70 KiB