Adding Linda.

This commit is contained in:
Aranclanos
2013-08-10 06:15:14 -03:00
parent 37e76ffec4
commit 0ce01d1583
48 changed files with 1152 additions and 696 deletions
@@ -49,6 +49,7 @@
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
loc.assume_air(removed)
air_update_turf()
if(network)
network.update = 1
@@ -107,6 +107,7 @@
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
loc.assume_air(removed)
air_update_turf()
if(network)
network.update = 1
@@ -127,6 +128,7 @@
return
air_contents.merge(removed)
air_update_turf()
if(network)
network.update = 1
@@ -137,6 +137,7 @@
air_contents.merge(filtered_out)
loc.assume_air(removed)
air_update_turf()
if(network)
network.update = 1
@@ -150,6 +151,7 @@
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
air_contents.merge(removed)
air_update_turf()
if(network)
network.update = 1
+8 -45
View File
@@ -127,37 +127,13 @@ 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)
//Have to consider preservation of group statuses
var/datum/gas_mixture/turf_copy = new
var/datum/gas_mixture/turf_air = target.return_air()
turf_copy.copy_from(target.parent.air)
turf_copy.volume = target.parent.air.volume //Copy a good representation of the turf from parent group
equalize_gases(list(air_sample, turf_air))
air.merge(air_sample)
//turf_air already modified by equalize_gases()
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.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)
else
var/datum/gas_mixture/turf_air = target.return_air()
equalize_gases(list(air_sample, turf_air))
air.merge(air_sample)
//turf_air already modified by equalize_gases()
if(istype(target) && !target.processing)
if(istype(target))
if(target.air)
if(target.air.check_tile_graphic())
target.update_visuals(target.air)
@@ -186,12 +162,8 @@ 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()
else
delta_temperature = (air.temperature - modeled_location.air.temperature)
sharer_heat_capacity = modeled_location.air.heat_capacity()
delta_temperature = (air.temperature - modeled_location.air.temperature)
sharer_heat_capacity = modeled_location.air.heat_capacity()
var/self_temperature_delta = 0
var/sharer_temperature_delta = 0
@@ -207,16 +179,7 @@ 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
else
modeled_location.air.temperature += sharer_temperature_delta
modeled_location.air.temperature += sharer_temperature_delta
else
+21 -17
View File
@@ -1,4 +1,4 @@
/*
/*
What are the archived variables for?
Calculations are done using the archived variables with the results merged into the regular variables.
This prevents race conditions that arise based on the order of tile processing.
@@ -39,6 +39,8 @@ What are the archived variables for?
var/temperature = 0 //in Kelvin, use calculate_temperature() to modify
var/last_share
var/group_multiplier = 1
//Size of the group this gas_mixture is representing.
//=1 for singletons
@@ -533,12 +535,12 @@ What are the archived variables for?
return 1
share(datum/gas_mixture/sharer)
share(datum/gas_mixture/sharer, var/atmos_adjacent_turfs = 4)
if(!sharer) return 0
var/delta_oxygen = QUANTIZE(oxygen_archived - sharer.oxygen_archived)/5
var/delta_carbon_dioxide = QUANTIZE(carbon_dioxide_archived - sharer.carbon_dioxide_archived)/5
var/delta_nitrogen = QUANTIZE(nitrogen_archived - sharer.nitrogen_archived)/5
var/delta_toxins = QUANTIZE(toxins_archived - sharer.toxins_archived)/5
var/delta_oxygen = QUANTIZE(oxygen_archived - sharer.oxygen_archived)/(atmos_adjacent_turfs+1)
var/delta_carbon_dioxide = QUANTIZE(carbon_dioxide_archived - sharer.carbon_dioxide_archived)/(atmos_adjacent_turfs+1)
var/delta_nitrogen = QUANTIZE(nitrogen_archived - sharer.nitrogen_archived)/(atmos_adjacent_turfs+1)
var/delta_toxins = QUANTIZE(toxins_archived - sharer.toxins_archived)/(atmos_adjacent_turfs+1)
var/delta_temperature = (temperature_archived - sharer.temperature_archived)
@@ -588,6 +590,7 @@ What are the archived variables for?
sharer.toxins += delta_toxins/sharer.group_multiplier
var/moved_moles = (delta_oxygen + delta_carbon_dioxide + delta_nitrogen + delta_toxins)
last_share = abs(delta_oxygen) + abs(delta_carbon_dioxide) + abs(delta_nitrogen) + abs(delta_toxins)
var/list/trace_types_considered = list()
@@ -598,12 +601,12 @@ What are the archived variables for?
var/delta = 0
if(corresponding)
delta = QUANTIZE(trace_gas.moles_archived - corresponding.moles_archived)/5
delta = QUANTIZE(trace_gas.moles_archived - corresponding.moles_archived)/(atmos_adjacent_turfs+1)
else
corresponding = new trace_gas.type()
sharer.trace_gases += corresponding
delta = trace_gas.moles_archived/5
delta = trace_gas.moles_archived/(atmos_adjacent_turfs+1)
trace_gas.moles -= delta/group_multiplier
corresponding.moles += delta/sharer.group_multiplier
@@ -616,6 +619,7 @@ What are the archived variables for?
heat_capacity_sharer_to_self -= individual_heat_capacity
moved_moles += delta
last_share += abs(delta)
trace_types_considered += trace_gas.type
@@ -640,6 +644,7 @@ What are the archived variables for?
heat_capacity_sharer_to_self += individual_heat_capacity
moved_moles += -delta
last_share += abs(delta)
if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
var/new_self_heat_capacity = old_self_heat_capacity + heat_capacity_sharer_to_self - heat_capacity_self_to_sharer
@@ -659,14 +664,11 @@ What are the archived variables for?
var/delta_pressure = temperature_archived*(total_moles() + moved_moles) - sharer.temperature_archived*(sharer.total_moles() - moved_moles)
return delta_pressure*R_IDEAL_GAS_EQUATION/volume
else
return 0
mimic(turf/model, border_multiplier)
var/delta_oxygen = QUANTIZE(oxygen_archived - model.oxygen)/5
var/delta_carbon_dioxide = QUANTIZE(carbon_dioxide_archived - model.carbon_dioxide)/5
var/delta_nitrogen = QUANTIZE(nitrogen_archived - model.nitrogen)/5
var/delta_toxins = QUANTIZE(toxins_archived - model.toxins)/5
mimic(turf/model, border_multiplier, var/atmos_adjacent_turfs = 4)
var/delta_oxygen = QUANTIZE(oxygen_archived - model.oxygen)/(atmos_adjacent_turfs+1)
var/delta_carbon_dioxide = QUANTIZE(carbon_dioxide_archived - model.carbon_dioxide)/(atmos_adjacent_turfs+1)
var/delta_nitrogen = QUANTIZE(nitrogen_archived - model.nitrogen)/(atmos_adjacent_turfs+1)
var/delta_toxins = QUANTIZE(toxins_archived - model.toxins)/(atmos_adjacent_turfs+1)
var/delta_temperature = (temperature_archived - model.temperature)
@@ -706,12 +708,13 @@ What are the archived variables for?
toxins -= delta_toxins/group_multiplier
var/moved_moles = (delta_oxygen + delta_carbon_dioxide + delta_nitrogen + delta_toxins)
last_share = abs(delta_oxygen) + abs(delta_carbon_dioxide) + abs(delta_nitrogen) + abs(delta_toxins)
if(trace_gases.len)
for(var/datum/gas/trace_gas in trace_gases)
var/delta = 0
delta = trace_gas.moles_archived/5
delta = trace_gas.moles_archived/(atmos_adjacent_turfs+1)
if(border_multiplier)
trace_gas.moles -= delta*border_multiplier/group_multiplier
@@ -722,6 +725,7 @@ What are the archived variables for?
heat_transferred += heat_cap_transferred*temperature_archived
heat_capacity_transferred += heat_cap_transferred
moved_moles += delta
moved_moles += abs(delta)
if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
var/new_self_heat_capacity = old_self_heat_capacity - heat_capacity_transferred
+177
View File
@@ -0,0 +1,177 @@
/atom/proc/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
return null
/turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
return
/turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
var/datum/gas_mixture/air_contents = return_air()
if(!air_contents)
return 0
if(active_hotspot)
if(soh)
if(air_contents.toxins > 0.5 && air_contents.oxygen > 0.5)
if(active_hotspot.temperature < exposed_temperature)
active_hotspot.temperature = exposed_temperature
if(active_hotspot.volume < exposed_volume)
active_hotspot.volume = exposed_volume
return 1
var/igniting = 0
if((exposed_temperature > PLASMA_MINIMUM_BURN_TEMPERATURE) && air_contents.toxins > 0.5)
igniting = 1
if(igniting)
if(air_contents.oxygen < 0.5 || air_contents.toxins < 0.5)
return 0
active_hotspot = new(src)
active_hotspot.temperature = exposed_temperature
active_hotspot.volume = exposed_volume
active_hotspot.just_spawned = (current_cycle < air_master.current_cycle)
//remove just_spawned protection if no longer processing this cell
air_master.add_to_active(src, 0)
return igniting
//This is the icon for fire on turfs, also helps for nurturing small fires until they are full tile
/obj/effect/hotspot
anchored = 1
mouse_opacity = 0
unacidable = 1//So you can't melt fire with acid.
icon = 'icons/effects/fire.dmi'
icon_state = "1"
layer = TURF_LAYER
luminosity = 3
var/volume = 125
var/temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST
var/just_spawned = 1
var/bypassing = 0
/obj/effect/hotspot/New()
..()
air_master.hotspots += src
/obj/effect/hotspot/proc/perform_exposure()
var/turf/simulated/floor/location = loc
if(!istype(location)) return 0
if(volume > CELL_VOLUME*0.95) bypassing = 1
else bypassing = 0
if(bypassing)
if(!just_spawned)
volume = location.air.fuel_burnt*FIRE_GROWTH_RATE
temperature = location.air.temperature
else
var/datum/gas_mixture/affected = location.air.remove_ratio(volume/location.air.volume)
affected.temperature = temperature
affected.react()
temperature = affected.temperature
volume = affected.fuel_burnt*FIRE_GROWTH_RATE
location.assume_air(affected)
for(var/atom/item in loc)
if(item) // It's possible that the item is deleted in temperature_expose
item.fire_act(null, temperature, volume)
return 0
/obj/effect/hotspot/process()
if(just_spawned)
just_spawned = 0
return 0
var/turf/simulated/floor/location = loc
if(!istype(location))
Kill()
return
if(location.excited_group)
location.excited_group.breakdown = 0
if((temperature < FIRE_MINIMUM_TEMPERATURE_TO_EXIST) || (volume <= 1))
Kill()
return
if(location.air.toxins < 0.5 || location.air.oxygen < 0.5)
Kill()
return
perform_exposure()
if(location.wet) location.wet = 0
if(bypassing)
icon_state = "3"
location.burn_tile()
//Possible spread due to radiated heat
if(location.air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_SPREAD)
var/radiated_temperature = location.air.temperature*FIRE_SPREAD_RADIOSITY_SCALE
for(var/direction in cardinal)
if(!(location.atmos_adjacent_turfs & direction))
continue
var/turf/simulated/T = get_step(src, direction)
if(istype(T) && T.active_hotspot)
T.hotspot_expose(radiated_temperature, CELL_VOLUME/4)
else
if(volume > CELL_VOLUME*0.4)
icon_state = "2"
else
icon_state = "1"
if(temperature > location.max_fire_temperature_sustained)
location.max_fire_temperature_sustained = temperature
if(location.heat_capacity && temperature > location.heat_capacity)
location.to_be_destroyed = 1
/*if(prob(25))
location.ReplaceWithSpace()
return 0*/
return 1
// Garbage collect itself by nulling reference to it
/obj/effect/hotspot/proc/Kill()
air_master.hotspots -= src
DestroyTurf()
garbage_collect()
/obj/effect/hotspot/proc/garbage_collect()
if(istype(loc, /turf/simulated))
var/turf/simulated/T = loc
if(T.active_hotspot == src)
T.active_hotspot = null
loc = null
/obj/effect/hotspot/proc/DestroyTurf()
if(istype(loc, /turf/simulated))
var/turf/simulated/T = loc
if(T.to_be_destroyed)
var/chance_of_deletion
if (T.heat_capacity) //beware of division by zero
chance_of_deletion = T.max_fire_temperature_sustained / T.heat_capacity * 8 //there is no problem with prob(23456), min() was redundant --rastaf0
else
chance_of_deletion = 100
if(prob(chance_of_deletion))
T.ChangeTurf(/turf/space)
else
T.to_be_destroyed = 0
T.max_fire_temperature_sustained = 0
/obj/effect/hotspot/New()
..()
dir = pick(cardinal)
air_update_turf()
return
+235
View File
@@ -0,0 +1,235 @@
var/kill_air = 0
var/global/datum/controller/air_system/air_master
datum/controller/air_system
var/list/excited_groups = list()
var/list/active_turfs = list()
var/list/hotspots = list()
var/speed = 1
//Special functions lists
var/list/turf/simulated/active_super_conductivity = list()
var/list/turf/simulated/high_pressure_delta = list()
var/current_cycle = 0
/datum/controller/air_system/proc/setup()
set background = 1
world << "\red \b Processing Geometry..."
sleep(1)
var/start_time = world.timeofday
setup_allturfs()
world << "\red \b Geometry processed in [(world.timeofday-start_time)/10] seconds!"
/datum/controller/air_system/proc/process()
if(kill_air)
return 1
for(var/i=0,i<speed,i++)
current_cycle++
process_active_turfs()
process_excited_groups()
process_high_pressure_delta()
process_hotspots()
process_super_conductivity()
return 1
/datum/controller/air_system/proc/process_hotspots()
for(var/obj/effect/hotspot/H in hotspots)
H.process()
/datum/controller/air_system/proc/process_super_conductivity()
for(var/turf/simulated/T in active_super_conductivity)
T.super_conduct()
/datum/controller/air_system/proc/process_high_pressure_delta()
for(var/turf/T in high_pressure_delta)
T.high_pressure_movements()
T.pressure_difference = 0
high_pressure_delta.len = 0
/datum/controller/air_system/proc/process_active_turfs()
for(var/turf/simulated/T in active_turfs)
T.process_cell()
/datum/controller/air_system/proc/remove_from_active(var/turf/simulated/T)
if(istype(T))
T.excited = 0
active_turfs -= T
if(T.excited_group)
T.excited_group.garbage_collect()
/datum/controller/air_system/proc/add_to_active(var/turf/simulated/T, var/blockchanges = 1)
if(istype(T) && T.air)
T.excited = 1
active_turfs |= T
if(blockchanges && T.excited_group)
T.excited_group.garbage_collect()
else
for(var/direction in cardinal)
if(!(T.atmos_adjacent_turfs & direction))
continue
var/turf/simulated/S = get_step(T, direction)
if(istype(S))
air_master.add_to_active(S)
/datum/controller/air_system/proc/setup_allturfs()
for(var/turf/simulated/T in world)
T.CalculateAdjacentTurfs()
if(!T.blocks_air)
if(T.air.check_tile_graphic())
T.update_visuals(T.air)
for(var/direction in cardinal)
if(!(T.atmos_adjacent_turfs & direction))
continue
var/turf/enemy_tile = get_step(T, direction)
if(istype(enemy_tile,/turf/simulated/))
var/turf/simulated/enemy_simulated = enemy_tile
if(!T.air.compare(enemy_simulated.air))
T.excited = 1
active_turfs |= T
break
else
if(!T.air.check_turf(enemy_tile))
T.excited = 1
active_turfs |= T
/datum/controller/air_system/proc/process_excited_groups()
for(var/datum/excited_group/EG in excited_groups)
if(EG.breakdown)
EG.breakdown_cooldown ++
else
EG.breakdown_cooldown = 0
if(EG.breakdown_cooldown > 10)
if(EG.self_compare())
EG.dismantle()
if(EG.breakdown_cooldown == 10)
if(!EG.self_compare())
EG.reset_cooldowns()
EG.self_breakdown()
EG.breakdown = 1
/turf/proc/CanAtmosPass(var/turf/T)
if(!istype(T)) return 0
var/R
if(blocks_air || T.blocks_air)
R = 1
for(var/obj/O in contents)
if(!O.CanAtmosPass(T))
R = 1
if(O.BlockSuperconductivity()) //the direction and open/closed are already checked on CanAtmosPass() so there are no arguments
var/D = get_dir(src, T)
atmos_supeconductivity |= D
D = get_dir(T, src)
T.atmos_supeconductivity |= D
return 0 //no need to keep going, we got all we asked
for(var/obj/O in T.contents)
if(!O.CanAtmosPass(src))
R = 1
if(O.BlockSuperconductivity())
var/D = get_dir(src, T)
atmos_supeconductivity |= D
D = get_dir(T, src)
T.atmos_supeconductivity |= D
return 0
var/D = get_dir(src, T)
atmos_supeconductivity &= ~D
D = get_dir(T, src)
T.atmos_supeconductivity &= ~D
if(!R)
return 1
atom/movable/proc/CanAtmosPass()
return 1
atom/proc/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
return (!density || !height || air_group)
turf/CanPass(atom/movable/mover, turf/target, height=1.5,air_group=0)
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
/atom/movable/proc/BlockSuperconductivity() // objects that block air and don't let superconductivity act. Only firelocks atm.
return 0
/turf/proc/CalculateAdjacentTurfs()
atmos_adjacent_turfs_amount = 0
for(var/direction in cardinal)
var/turf/T = get_step(src, direction)
if(!istype(T))
continue
var/counterdir = get_dir(T, src)
if(CanAtmosPass(T))
atmos_adjacent_turfs_amount += 1
atmos_adjacent_turfs |= direction
if(!(T.atmos_adjacent_turfs & counterdir))
T.atmos_adjacent_turfs_amount += 1
T.atmos_adjacent_turfs |= counterdir
else
atmos_adjacent_turfs &= ~direction
if(T.atmos_adjacent_turfs & counterdir)
T.atmos_adjacent_turfs_amount -= 1
T.atmos_adjacent_turfs &= ~counterdir
/atom/movable/proc/air_update_turf(var/command = 0)
if(istype(loc,/turf))
var/turf/T = loc
if(command)
T.CalculateAdjacentTurfs()
if(air_master)
air_master.add_to_active(T,command)
/atom/movable/proc/atmos_spawn_air(var/text, var/amount) //because a lot of people loves to copy paste awful code lets just make a easy proc to spawn your plasma fires
var/turf/simulated/T = get_turf(src)
if(!istype(T))
return
T.atmos_spawn_air(text, amount)
/turf/simulated/proc/atmos_spawn_air(var/text, var/amount)
if(!text || !amount || !air)
return
var/datum/gas_mixture/G = new
if(text == "fire")
G.toxins = amount
G.temperature = 1000
else if(text == "n2o")
var/datum/gas/sleeping_agent/T = new
T.moles = amount
G += T
else if(text == "fuel")
var/datum/gas/volatile_fuel/T
T.moles = amount
G += T
air.merge(G)
air_master.add_to_active(src, 0)
+470
View File
@@ -0,0 +1,470 @@
turf
var/pressure_difference = 0
var/pressure_direction = 0
var/atmos_adjacent_turfs = 0
var/atmos_adjacent_turfs_amount = 0
var/atmos_supeconductivity = 0
turf/assume_air(datum/gas_mixture/giver) //use this for machines to adjust air
del(giver)
return 0
turf/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
return GM
turf/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
return GM
turf/simulated
var/datum/excited_group/excited_group
var/excited = 0
var/recently_active = 0
var/datum/gas_mixture/air
var/archived_cycle = 0
var/current_cycle = 0
var/obj/effect/hotspot/active_hotspot
var/temperature_archived //USED ONLY FOR SOLIDS
turf/simulated/New()
..()
if(!blocks_air)
air = new
air.oxygen = oxygen
air.carbon_dioxide = carbon_dioxide
air.nitrogen = nitrogen
air.toxins = toxins
air.temperature = temperature
turf/simulated/Del()
if(active_hotspot)
active_hotspot.garbage_collect()
..()
turf/simulated/assume_air(datum/gas_mixture/giver)
if(!giver) return 0
var/datum/gas_mixture/receiver = air
if(istype(receiver))
air.merge(giver)
if(air.check_tile_graphic())
update_visuals(air)
return 1
else return ..()
turf/simulated/proc/copy_air_with_tile(turf/simulated/T)
if(istype(T) && T.air && air)
air.copy_from(T.air)
turf/simulated/proc/copy_air(datum/gas_mixture/copy)
if(air && copy)
air.copy_from(copy)
turf/simulated/return_air()
if(air)
return air
else
return ..()
turf/simulated/remove_air(amount as num)
if(air)
var/datum/gas_mixture/removed = null
removed = air.remove(amount)
if(air.check_tile_graphic())
update_visuals(air)
return removed
else
return ..()
turf/simulated/proc/mimic_temperature_solid(turf/model, conduction_coefficient)
var/delta_temperature = (temperature_archived - model.temperature)
if((heat_capacity > 0) && (abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER))
var/heat = conduction_coefficient*delta_temperature* \
(heat_capacity*model.heat_capacity/(heat_capacity+model.heat_capacity))
temperature -= heat/heat_capacity
turf/simulated/proc/share_temperature_mutual_solid(turf/simulated/sharer, conduction_coefficient)
var/delta_temperature = (temperature_archived - sharer.temperature_archived)
if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER && heat_capacity && sharer.heat_capacity)
var/heat = conduction_coefficient*delta_temperature* \
(heat_capacity*sharer.heat_capacity/(heat_capacity+sharer.heat_capacity))
temperature -= heat/heat_capacity
sharer.temperature += heat/sharer.heat_capacity
/turf/simulated/proc/process_cell()
var/image/Aran = image('icons/mob/hud.dmi', "hud_imp_chem")
overlays += Aran
spawn(9)
overlays -= Aran
if(archived_cycle < air_master.current_cycle) //archive self if not already done
archive()
current_cycle = air_master.current_cycle
var/remove = 1 //set by non simulated turfs who are sharing with this turf
for(var/direction in cardinal)
if(!(atmos_adjacent_turfs & direction))
continue
var/turf/enemy_tile = get_step(src, direction)
if(istype(enemy_tile,/turf/simulated))
var/turf/simulated/enemy_simulated = enemy_tile
if(current_cycle > enemy_simulated.current_cycle)
enemy_simulated.archive()
/******************* GROUP HANDLING START *****************************************************************/
if(enemy_simulated.excited)
if(excited_group)
if(enemy_simulated.excited_group)
if(excited_group != enemy_simulated.excited_group)
excited_group.merge_groups(enemy_simulated.excited_group) //combine groups
share_air(enemy_simulated) //share
else
if((recently_active == 1 && enemy_simulated.recently_active == 1) || !air.compare(enemy_simulated.air))
excited_group.add_turf(enemy_simulated) //add enemy to our group
share_air(enemy_simulated) //share
else
if(enemy_simulated.excited_group)
if((recently_active == 1 && enemy_simulated.recently_active == 1) || !air.compare(enemy_simulated.air))
enemy_simulated.excited_group.add_turf(src) //join self to enemy group
share_air(enemy_simulated) //share
else
if((recently_active == 1 && enemy_simulated.recently_active == 1) || !air.compare(enemy_simulated.air))
var/datum/excited_group/EG = new //generate new group
EG.add_turf(src)
EG.add_turf(enemy_simulated)
share_air(enemy_simulated) //share
else
if(!air.compare(enemy_simulated.air)) //compare if
air_master.add_to_active(enemy_simulated) //excite enemy
if(excited_group)
excited_group.add_turf(enemy_simulated) //add enemy to group
else
var/datum/excited_group/EG = new //generate new group
EG.add_turf(src)
EG.add_turf(enemy_simulated)
share_air(enemy_simulated) //share
/******************* GROUP HANDLING FINISH *********************************************************************/
else
if(!air.check_turf(enemy_tile))
var/difference = air.mimic(enemy_tile,,atmos_adjacent_turfs_amount)
if(difference)
if(difference > 0)
consider_pressure_difference(enemy_tile, difference)
else
enemy_tile.consider_pressure_difference(src, difference)
remove = 0
if(excited_group)
last_share_check()
air.react()
if(air.check_tile_graphic())
update_visuals(air)
if(air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
hotspot_expose(air.temperature, CELL_VOLUME)
for(var/atom/movable/item in src)
item.temperature_expose(air, air.temperature, CELL_VOLUME)
temperature_expose(air, air.temperature, CELL_VOLUME)
if(air.temperature > MINIMUM_TEMPERATURE_START_SUPERCONDUCTION)
if(consider_superconductivity(starting = 1))
remove = 0
if(!excited_group && remove == 1)
air_master.remove_from_active(src)
var/image/Aran5
if(excited_group)
Aran5 = image('icons/mob/hud.dmi', "[excited_group.colour]")
else
Aran5 = image('icons/mob/hud.dmi', "hud_imp_chem")
overlays += Aran5
spawn(15)
overlays -= Aran5
/turf/simulated/proc/archive()
if(air) //For open space like floors
air.archive()
temperature_archived = temperature
archived_cycle = air_master.current_cycle
/turf/simulated/proc/update_visuals(datum/gas_mixture/model)
overlays.Cut()
var/siding_icon_state = return_siding_icon_state()
if(siding_icon_state)
overlays += image('icons/turf/floors.dmi',siding_icon_state)
switch(model.graphic)
if("plasma")
overlays.Add(plmaster)
if("sleeping_agent")
overlays.Add(slmaster)
/turf/simulated/proc/share_air(var/turf/simulated/T)
if(T.current_cycle < current_cycle)
var/difference
difference = air.share(T.air, atmos_adjacent_turfs_amount)
if(difference)
if(difference > 0)
consider_pressure_difference(T, difference)
else
T.consider_pressure_difference(src, difference)
last_share_check()
/turf/proc/consider_pressure_difference(var/turf/simulated/T, var/difference)
air_master.high_pressure_delta |= src
if(difference > pressure_difference)
pressure_direction = get_dir(src, T)
pressure_difference = difference
/turf/simulated/proc/last_share_check()
if(air.last_share > MINIMUM_AIR_TO_SUSPEND)
excited_group.breakdown = 0
/turf/proc/high_pressure_movements()
for(var/atom/movable/M in src)
M.experience_pressure_difference(pressure_difference, pressure_direction)
atom/movable/var/pressure_resistance = 5
atom/movable/var/last_forced_movement = 0
atom/movable/proc/experience_pressure_difference(pressure_difference, direction)
if(last_forced_movement >= air_master.current_cycle)
return 0
else if(!anchored)
if(pressure_difference > pressure_resistance)
last_forced_movement = air_master.current_cycle
spawn step(src, direction)
return 1
/datum/excited_group
var/list/turf_list = list()
var/colour
var/breakdown = 0
var/breakdown_cooldown = 0
/datum/excited_group/New()
colour = pick("hudhealthy","hudill","huddead","hudxeno","hudwanted","hudprisioner","hudcaptain","hudheadofpersonal","hudchiefengineer","hudresearchdirector","hudchiefmedicalofficer","hudquartermaster","hudheadofsecurity","hudchemist","hudscientist","hudroboticist","hudvirologist","hudgeneticist","hudmedicaldoctor","hudatmospherictechnician","hudstationengineer","hudshaftminer","hudsecurityofficer","huddetective","hudwarden","hudbotanist","hudlibrarian","hudlawyer","hudchaplain","hudbartender","hudchef","hudjanitor","hudclown","hudmime","hudcargotechnician","hudassistant","hudunknown","hudninja","hudalien","hudchangeling","huddeathsquad","hudoperative","hudwizard","hudmalborg","hudmalai","hudcultist","hudtraitor","hudrevolutionary")
if(air_master)
air_master.excited_groups += src
/datum/excited_group/proc/add_turf(var/turf/simulated/T)
turf_list += T
T.excited_group = src
T.recently_active = 1
reset_cooldowns()
/datum/excited_group/proc/merge_groups(var/datum/excited_group/E)
if(turf_list.len > E.turf_list.len)
air_master.excited_groups -= E
for(var/turf/simulated/T in E.turf_list)
T.excited_group = src
turf_list += T
reset_cooldowns()
else
air_master.excited_groups -= src
for(var/turf/simulated/T in turf_list)
T.excited_group = E
E.turf_list += T
E.reset_cooldowns()
/datum/excited_group/proc/reset_cooldowns()
breakdown_cooldown = 0
/datum/excited_group/proc/self_compare()
var/restore = 1
var/turf/simulated/sample = pick(turf_list)
for(var/turf/simulated/T in turf_list)
if(!T.air.compare(sample.air))
restore = 0
break
if(restore)
return 1
/datum/excited_group/proc/self_breakdown()
var/datum/gas_mixture/A = new
for(var/turf/simulated/T in turf_list)
A.oxygen += T.air.oxygen
A.carbon_dioxide+= T.air.carbon_dioxide
A.nitrogen += T.air.nitrogen
A.toxins += T.air.toxins
for(var/turf/simulated/T in turf_list)
T.air.oxygen = A.oxygen/turf_list.len
T.air.carbon_dioxide= A.carbon_dioxide/turf_list.len
T.air.nitrogen = A.nitrogen/turf_list.len
T.air.toxins = A.toxins/turf_list.len
/datum/excited_group/proc/dismantle()
for(var/turf/simulated/T in turf_list)
T.excited = 0
T.recently_active = 0
air_master.active_turfs -= T
air_master.excited_groups -= src
/datum/excited_group/proc/garbage_collect()
for(var/turf/simulated/T in turf_list)
T.excited_group = null
turf_list.Cut()
air_master.excited_groups -= src
turf/simulated/proc/super_conduct()
var/conductivity_directions = 0
if(blocks_air)
//Does not participate in air exchange, so will conduct heat across all four borders at this time
conductivity_directions = NORTH|SOUTH|EAST|WEST
if(archived_cycle < air_master.current_cycle)
archive()
else
//Does particate in air exchange so only consider directions not considered during process_cell()
for(var/direction in cardinal)
if(!(atmos_adjacent_turfs & direction) && !(atmos_supeconductivity & direction))
conductivity_directions += direction
if(conductivity_directions>0)
//Conduct with tiles around me
for(var/direction in cardinal)
if(conductivity_directions&direction)
var/turf/neighbor = get_step(src,direction)
if(!neighbor.thermal_conductivity)
continue
if(istype(neighbor, /turf/simulated)) //anything under this subtype will share in the exchange
var/turf/simulated/T = neighbor
if(T.archived_cycle < air_master.current_cycle)
T.archive()
if(T.air)
if(air) //Both tiles are open
air.temperature_share(T.air, WINDOW_HEAT_TRANSFER_COEFFICIENT)
else //Solid but neighbor is open
T.air.temperature_turf_share(src, T.thermal_conductivity)
air_master.add_to_active(T, 0)
else
if(air) //Open but neighbor is solid
air.temperature_turf_share(T, T.thermal_conductivity)
else //Both tiles are solid
share_temperature_mutual_solid(T, T.thermal_conductivity)
T.temperature_expose(null, T.temperature, null)
T.consider_superconductivity()
else
if(air) //Open
air.temperature_mimic(neighbor, neighbor.thermal_conductivity)
else
mimic_temperature_solid(neighbor, neighbor.thermal_conductivity)
radiate_to_spess()
//Conduct with air on my tile if I have it
if(air)
air.temperature_turf_share(src, thermal_conductivity)
//Make sure still hot enough to continue conducting heat
if(air.temperature < MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION)
air_master.active_super_conductivity -= src
return 0
else
if(temperature < MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION)
air_master.active_super_conductivity -= src
return 0
turf/simulated/proc/consider_superconductivity(starting)
if(!thermal_conductivity)
return 0
if(air)
if(air.temperature < (starting?MINIMUM_TEMPERATURE_START_SUPERCONDUCTION:MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION))
return 0
if(air.heat_capacity() < M_CELL_WITH_RATIO) // Was: MOLES_CELLSTANDARD*0.1*0.05 Since there are no variables here we can make this a constant.
return 0
else
if(temperature < (starting?MINIMUM_TEMPERATURE_START_SUPERCONDUCTION:MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION))
return 0
air_master.active_super_conductivity |= src
return 1
turf/simulated/proc/radiate_to_spess() //Radiate excess tile heat to space
if(temperature > T0C) //Considering 0 degC as te break even point for radiation in and out
var/delta_temperature = (temperature_archived - 2.7) //hardcoded space temperature
if((heat_capacity > 0) && (abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER))
var/heat = thermal_conductivity*delta_temperature* \
(heat_capacity*700000/(heat_capacity+700000)) //700000 is the heat_capacity from a space turf, hardcoded here
temperature -= heat/heat_capacity
-1
View File
@@ -26,7 +26,6 @@
#define MOLES_N2STANDARD (MOLES_CELLSTANDARD*N2STANDARD) // N2 standard value (79%)
var/turf/space/Space_Tile = locate(/turf/space) // A space tile to reference when atmos wants to remove excess heat.
//ITEM INVENTORY SLOT BITMASKS
+6 -31
View File
@@ -893,28 +893,16 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
refined_trg -= B
continue moving
var/list/doors = new/list()
if(toupdate.len)
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
T1.CalculateAdjacentTurfs()
air_master.add_to_active(T1,1)
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
for(var/obj/O in doors)
O:update_nearby_tiles(1)
T2.CalculateAdjacentTurfs()
air_master.add_to_active(T2,1)
@@ -1056,23 +1044,10 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
continue moving
var/list/doors = new/list()
if(toupdate.len)
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
for(var/obj/O in doors)
O:update_nearby_tiles(1)
T1.CalculateAdjacentTurfs()
air_master.add_to_active(T1,1)
return copiedobjs
+1 -1
View File
@@ -42,7 +42,7 @@
/atom/proc/assume_air(datum/air_group/giver)
/atom/proc/assume_air(datum/gas_mixture/giver)
del(giver)
return null
@@ -129,8 +129,10 @@
environment.merge(removed)
else
loc.assume_air(removed)
air_update_turf()
src.update_icon()
if(air_contents.return_pressure() < 1)
can_label = 1
else
+2
View File
@@ -66,6 +66,7 @@
environment.merge(removed)
else
loc.assume_air(removed)
air_update_turf()
else
var/pressure_delta = target_pressure - air_contents.return_pressure()
//Can not have a pressure delta that would cause environment pressure > tank pressure
@@ -80,6 +81,7 @@
removed = environment.remove(transfer_moles)
else
removed = loc.remove_air(transfer_moles)
air_update_turf()
air_contents.merge(removed)
//src.update_icon()
+1 -3
View File
@@ -23,7 +23,5 @@
var/datum/gas_mixture/conn_air = zturf_conn.air //TODO: pop culture reference
var/datum/gas_mixture/my_air = myturf.air
if (istype(conn_air) && istype(my_air))
if (!my_air.compare(conn_air))
myturf.reset_delay()
zturf_conn.reset_delay()
my_air.share(conn_air)
air_update_turf()
+4 -17
View File
@@ -234,26 +234,13 @@
PlasmaBurn(exposed_temperature)
/obj/machinery/door/airlock/plasma/proc/PlasmaBurn(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
var/toxinsToDeduce = 35
napalm.toxins = toxinsToDeduce
napalm.temperature = 400+T0C
target_tile.assume_air(napalm)
spawn (0) target_tile.hotspot_expose(temperature, 400)
for(var/obj/structure/falsewall/plasma/F in range(3,src))//Hackish as fuck, but until temperature_expose works, there is nothing I can do -Sieve
var/turf/T = get_turf(F)
T.ChangeTurf(/turf/simulated/wall/mineral/plasma/)
del (F)
for(var/turf/simulated/wall/mineral/plasma/W in range(3,src))
W.ignite((temperature/4))//Added so that you can't set off a massive chain reaction with a small flame
for(var/obj/machinery/door/airlock/plasma/D in range(3,src))
D.ignite(temperature/4)
atmos_spawn_air("fire", 500)
new/obj/structure/door_assembly/door_assembly_0( src.loc )
del (src)
/obj/machinery/door/airlock/plasma/BlockSuperconductivity() //we don't stop the heat~
return 0
/obj/machinery/door/airlock/clown
name = "bananium airlock"
desc = "Honkhonkhonk"
+18 -56
View File
@@ -21,17 +21,18 @@
if(density)
layer = 3.1 //Above most items if closed
explosion_resistance = initial(explosion_resistance)
update_heat_protection(get_turf(src))
else
layer = 2.7 //Under all objects if opened. 2.7 due to tables being at 2.6
explosion_resistance = 0
update_nearby_tiles(need_rebuild=1)
update_freelok_sight()
air_update_turf(1)
return
/obj/machinery/door/Del()
density = 0
update_nearby_tiles()
air_update_turf(1)
update_freelok_sight()
..()
return
@@ -65,6 +66,10 @@
return
return
/obj/machinery/door/Move()
air_update_turf(1)
..()
air_update_turf(1)
/obj/machinery/door/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group) return 0
@@ -72,6 +77,8 @@
return !opacity
return !density
/obj/machinery/door/CanAtmosPass()
return !density
/obj/machinery/door/proc/bumpopen(mob/user as mob)
if(operating) return
@@ -197,7 +204,8 @@
explosion_resistance = 0
update_icon()
SetOpacity(0)
update_nearby_tiles()
air_update_turf(1)
update_freelok_sight()
if(operating) operating = 0
@@ -218,63 +226,17 @@
if(visible && !glass)
SetOpacity(1) //caaaaarn!
operating = 0
update_nearby_tiles()
air_update_turf(1)
update_freelok_sight()
return
/obj/machinery/door/proc/requiresID()
return 1
/obj/machinery/door/proc/update_nearby_tiles(need_rebuild)
if(!air_master) return 0
var/turf/simulated/source = loc
var/turf/simulated/north = get_step(source,NORTH)
var/turf/simulated/south = get_step(source,SOUTH)
var/turf/simulated/east = get_step(source,EAST)
var/turf/simulated/west = get_step(source,WEST)
update_heat_protection(loc)
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
return 1
/obj/machinery/door/proc/update_heat_protection(var/turf/simulated/source)
if(istype(source))
if(src.density && (src.opacity || src.heat_proof))
source.thermal_conductivity = DOOR_HEAT_TRANSFER_COEFFICIENT
else
source.thermal_conductivity = initial(source.thermal_conductivity)
/obj/machinery/door/BlockSuperconductivity()
if(opacity || heat_proof)
return 1
return 0
/obj/machinery/door/morgue
icon = 'icons/obj/doors/doormorgue.dmi'
+4 -23
View File
@@ -128,27 +128,8 @@
else
return 1
/obj/machinery/door/firedoor/border_only/update_nearby_tiles(need_rebuild)
if(!air_master) return 0
var/turf/simulated/source = loc
var/turf/simulated/destination = get_step(source,dir)
update_heat_protection(loc)
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
/obj/machinery/door/firedoor/border_only/CanAtmosPass(var/turf/T)
if(get_dir(loc, T) == dir)
return !density
else
if(istype(source)) air_master.tiles_to_update += source
if(istype(destination)) air_master.tiles_to_update += destination
return 1
return 1
+4 -2
View File
@@ -49,7 +49,8 @@
density = 0
explosion_resistance = 0
update_nearby_tiles()
air_update_turf(1)
update_freelok_sight()
operating = 0
return 1
@@ -69,7 +70,8 @@
density = 1
explosion_resistance = initial(explosion_resistance)
SetOpacity(1)
update_nearby_tiles()
air_update_turf(1)
update_freelok_sight()
sleep(10)
operating = 0
+10 -27
View File
@@ -12,30 +12,6 @@
var/obj/item/weapon/airlock_electronics/electronics = null
explosion_resistance = 5
/obj/machinery/door/window/update_nearby_tiles(need_rebuild)
if(!air_master) return 0
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
return 1
/obj/machinery/door/window/New()
..()
@@ -87,6 +63,12 @@
else
return 1
/obj/machinery/door/window/CanAtmosPass(var/turf/T)
if(get_dir(loc, T) == dir)
return !density
else
return 1
/obj/machinery/door/window/CheckExit(atom/movable/mover as mob|obj, turf/target as turf)
if(istype(mover) && mover.checkpass(PASSGLASS))
return 1
@@ -110,7 +92,8 @@
explosion_resistance = 0
src.density = 0
// src.sd_SetOpacity(0) //TODO: why is this here? Opaque windoors? ~Carn
update_nearby_tiles()
air_update_turf(1)
update_freelok_sight()
if(operating == 1) //emag again
src.operating = 0
@@ -128,8 +111,8 @@
explosion_resistance = initial(explosion_resistance)
// if(src.visible)
// SetOpacity(1) //TODO: why is this here? Opaque windoors? ~Carn
update_nearby_tiles()
air_update_turf(1)
update_freelok_sight()
sleep(10)
src.operating = 0
+9 -47
View File
@@ -13,63 +13,25 @@
/obj/machinery/shield/New()
src.dir = pick(1,2,3,4)
..()
update_nearby_tiles(need_rebuild=1)
air_update_turf(1)
/obj/machinery/shield/Del()
opacity = 0
density = 0
update_nearby_tiles()
air_update_turf(1)
..()
/obj/machinery/shield/Move()
air_update_turf(1)
..()
air_update_turf(1)
/obj/machinery/shield/CanPass(atom/movable/mover, turf/target, height, air_group)
if(!height || air_group) return 0
else return ..()
//Looks like copy/pasted code... I doubt 'need_rebuild' is even used here - Nodrak
/obj/machinery/shield/proc/update_nearby_tiles(need_rebuild)
if(!air_master) return 0
var/turf/simulated/source = loc
var/turf/simulated/north = get_step(source,NORTH)
var/turf/simulated/south = get_step(source,SOUTH)
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
return 1
/obj/machinery/shield/CanAtmosPass(var/turf/T)
return !density
/obj/machinery/shield/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(!istype(W)) return
+2
View File
@@ -178,6 +178,7 @@
//world << "now at [removed.temperature]"
env.merge(removed)
air_update_turf()
//world << "turf now at [env.temperature]"
@@ -187,4 +188,5 @@
update_icon()
return
-12
View File
@@ -36,18 +36,6 @@
health = 120
/obj/structure/alien/resin/New()
..()
var/turf/T = get_turf(src)
T.thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT
/obj/structure/alien/resin/Del()
var/turf/T = get_turf(src)
T.thermal_conductivity = initial(T.thermal_conductivity)
..()
/obj/structure/alien/resin/proc/healthcheck()
if(health <=0)
del(src)
+9 -48
View File
@@ -915,16 +915,21 @@ steam.start() -- spawns the effect
New()
..()
update_nearby_tiles(1)
air_update_turf(1)
Del()
density = 0
update_nearby_tiles(1)
air_update_turf(1)
..()
Move()
air_update_turf(1)
..()
air_update_turf(1)
proc/updateicon()
if(metal == 1)
icon_state = "metalfoam"
@@ -985,52 +990,8 @@ steam.start() -- spawns the effect
if(air_group) return 0
return !density
// shouldn't this be a general procedure?
// not sure if this neccessary or overkill
proc/update_nearby_tiles(need_rebuild)
if(!air_master) return 0
var/turf/simulated/source = loc
var/turf/simulated/north = get_step(source,NORTH)
var/turf/simulated/south = get_step(source,SOUTH)
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
return 1
CanAtmosPass()
return !density
/datum/effect/effect/system/reagents_explosion
var/amount // TNT equivalent
+2 -29
View File
@@ -46,39 +46,12 @@
del(src)
/obj/effect/mine/proc/triggern2o(obj)
//example: n2o triggerproc
//note: im lazy
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
trace_gas.moles = 30
payload += trace_gas
target.air.merge(payload)
atmos_spawn_air("n2o", 360)
spawn(0)
del(src)
/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
payload.toxins = 30
target.air.merge(payload)
target.hotspot_expose(1000, CELL_VOLUME)
atmos_spawn_air("fire", 360)
spawn(0)
del(src)
+9 -8
View File
@@ -952,18 +952,19 @@ var/global/list/obj/item/device/pda/PDAs = list()
if (istype(A, /obj/machinery/atmospherics/pipe/tank))
var/obj/icon = A
var/obj/machinery/atmospherics/pipe/tank/T = A
for (var/mob/O in viewers(user, null))
O << "\red [user] has used [src] on \icon[icon] [A]"
O << "\red [user] has used [src] on \icon[icon] [T]"
var/pressure = A:parent.air.return_pressure()
var/total_moles = A:parent.air.total_moles()
var/pressure = T.parent.air.return_pressure()
var/total_moles = T.parent.air.total_moles()
user << "\blue Results of analysis of \icon[icon]"
if (total_moles>0)
var/o2_concentration = A:parent.air.oxygen/total_moles
var/n2_concentration = A:parent.air.nitrogen/total_moles
var/co2_concentration = A:parent.air.carbon_dioxide/total_moles
var/plasma_concentration = A:parent.air.toxins/total_moles
var/o2_concentration = T.parent.air.oxygen/total_moles
var/n2_concentration = T.parent.air.nitrogen/total_moles
var/co2_concentration = T.parent.air.carbon_dioxide/total_moles
var/plasma_concentration = T.parent.air.toxins/total_moles
var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+plasma_concentration)
@@ -974,7 +975,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
user << "\blue Plasma: [round(plasma_concentration*100)]%"
if(unknown_concentration>0.01)
user << "\red Unknown: [round(unknown_concentration*100)]%"
user << "\blue Temperature: [round(A:parent.air.temperature-T0C)]&deg;C"
user << "\blue Temperature: [round(T.parent.air.temperature-T0C)]&deg;C"
else
user << "\blue Tank is empty!"
@@ -87,6 +87,7 @@
W.dir = dir_to_set
W.ini_dir = W.dir
W.anchored = 0
W.air_update_turf(1)
src.use(1)
if("Full Window")
if(!src) return 1
@@ -102,6 +103,7 @@
W.dir = SOUTHWEST
W.ini_dir = SOUTHWEST
W.anchored = 0
W.air_update_turf(1)
src.use(2)
return 0
@@ -187,8 +187,8 @@
/obj/item/weapon/flamethrower/proc/flame_turf(turflist)
if(!lit || operating) return
operating = 1
for(var/turf/T in turflist)
if(T.density || istype(T, /turf/space))
for(var/turf/simulated/T in turflist)
if(!T.air)
break
if(!previousturf && length(turflist)>1)
previousturf = get_turf(src)
@@ -214,6 +214,7 @@
//Burn it based on transfered gas
target.hotspot_expose((ptank.air_contents.temperature*2) + 380,500) // -- More of my "how do I shot fire?" dickery. -- TLE
//location.hotspot_expose(1000,500,1)
air_master.add_to_active(target, 0)
return
+1 -1
View File
@@ -19,7 +19,7 @@
processing_objects.Remove(src)
return 0
/obj/assume_air(datum/air_group/giver)
/obj/assume_air(datum/gas_mixture/giver)
if(loc)
return loc.assume_air(giver)
else
+13 -60
View File
@@ -20,12 +20,17 @@
..()
icon_state = mineralType
name = "[mineralType] door"
update_nearby_tiles(need_rebuild=1)
air_update_turf(1)
Del()
update_nearby_tiles()
air_update_turf(1)
..()
Move()
air_update_turf(1)
..()
air_update_turf(1)
Bumped(atom/user)
..()
if(!state)
@@ -51,6 +56,9 @@
return !opacity
return !density
CanAtmosPass()
return !density
proc/TryToSwitchState(atom/user)
if(isSwitchingStates) return
if(ismob(user))
@@ -163,49 +171,7 @@
CheckHardness()
return
proc/update_nearby_tiles(need_rebuild) //Copypasta from airlock code
if(!air_master) return 0
var/turf/simulated/source = loc
var/turf/simulated/north = get_step(source,NORTH)
var/turf/simulated/south = get_step(source,SOUTH)
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
return 1
/obj/structure/mineral_door/iron
mineralType = "metal"
@@ -249,22 +215,9 @@
TemperatureAct(exposed_temperature)
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
var/toxinsToDeduce = temperature/10
napalm.toxins = toxinsToDeduce
napalm.temperature = 200+T0C
target_tile.assume_air(napalm)
spawn (0) target_tile.hotspot_expose(temperature, 400)
hardness -= toxinsToDeduce/100
CheckHardness()
atmos_spawn_air("fire", 500)
hardness = 0
CheckHardness()
/obj/structure/mineral_door/transparent/diamond
mineralType = "diamond"
@@ -29,13 +29,18 @@ obj/structure/windoor_assembly
obj/structure/windoor_assembly/New(dir=NORTH)
..()
src.ini_dir = src.dir
update_nearby_tiles(need_rebuild=1)
air_update_turf(1)
obj/structure/windoor_assembly/Del()
density = 0
update_nearby_tiles()
air_update_turf(1)
..()
/obj/structure/windoor_assembly/Move()
air_update_turf(1)
..()
air_update_turf(1)
/obj/structure/windoor_assembly/update_icon()
icon_state = "[facing]_[secure]windoor_assembly[state]"
@@ -48,6 +53,12 @@ obj/structure/windoor_assembly/Del()
else
return 1
/obj/structure/windoor_assembly/CanAtmosPass(var/turf/T)
if(get_dir(loc, T) == dir)
return !density
else
return 1
/obj/structure/windoor_assembly/CheckExit(atom/movable/mover as mob|obj, turf/target as turf)
if(istype(mover) && mover.checkpass(PASSGLASS))
return 1
@@ -263,13 +274,13 @@ obj/structure/windoor_assembly/Del()
if (src.anchored)
usr << "It is fastened to the floor; therefore, you can't rotate it!"
return 0
if(src.state != "01")
update_nearby_tiles(need_rebuild=1) //Compel updates before
//if(src.state != "01")
//update_nearby_tiles(need_rebuild=1) //Compel updates before
src.dir = turn(src.dir, 270)
if(src.state != "01")
update_nearby_tiles(need_rebuild=1)
//if(src.state != "01")
//update_nearby_tiles(need_rebuild=1)
src.ini_dir = src.dir
update_icon()
@@ -290,26 +301,3 @@ obj/structure/windoor_assembly/Del()
update_icon()
return
/obj/structure/windoor_assembly/proc/update_nearby_tiles(need_rebuild)
if(!air_master) return 0
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
return 1
+12 -32
View File
@@ -216,10 +216,9 @@
usr << "It is fastened to the floor therefore you can't rotate it!"
return 0
update_nearby_tiles(need_rebuild=1) //Compel updates before
dir = turn(dir, 90)
// updateSilicate()
update_nearby_tiles(need_rebuild=1)
air_update_turf(1)
ini_dir = dir
return
@@ -233,10 +232,9 @@
usr << "It is fastened to the floor therefore you can't rotate it!"
return 0
update_nearby_tiles(need_rebuild=1) //Compel updates before
dir = turn(dir, 270)
// updateSilicate()
update_nearby_tiles(need_rebuild=1)
air_update_turf(1)
ini_dir = dir
return
@@ -274,7 +272,7 @@
else
icon_state = "window"
update_nearby_tiles(need_rebuild=1)
air_update_turf(1)
update_nearby_icons()
return
@@ -282,41 +280,23 @@
/obj/structure/window/Del()
density = 0
update_nearby_tiles()
air_update_turf(1)
playsound(src, "shatter", 70, 1)
update_nearby_icons()
..()
/obj/structure/window/Move()
update_nearby_tiles(need_rebuild=1)
air_update_turf(1)
..()
dir = ini_dir
update_nearby_tiles(need_rebuild=1)
//This proc has to do with airgroups and atmos, it has nothing to do with smoothwindows, that's update_nearby_tiles().
/obj/structure/window/proc/update_nearby_tiles(need_rebuild)
if(!air_master) return 0
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
air_update_turf(1)
/obj/structure/window/CanAtmosPass(turf/T)
if(get_dir(loc, T) == dir)
return !density
if(dir == SOUTHWEST || dir == SOUTHEAST || dir == NORTHWEST || dir == NORTHEAST)
return !density
return 1
//checks if this window is full-tile one
@@ -325,7 +305,7 @@
return 1
return 0
//This proc is used to update the icons of nearby windows. It should not be confused with update_nearby_tiles(), which is an atmos proc!
//This proc is used to update the icons of nearby windows.
/obj/structure/window/proc/update_nearby_icons()
update_icon()
for(var/direction in cardinal)
+2 -17
View File
@@ -82,6 +82,7 @@
icon_state = "plasma0"
walltype = "plasma"
mineral = "plasma"
thermal_conductivity = 0.04
/turf/simulated/wall/mineral/plasma/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(is_hot(W) > 300)//If the temperature of the object is over 300, then ignite
@@ -93,23 +94,7 @@
spawn(2)
new /obj/structure/girder(src)
src.ChangeTurf(/turf/simulated/floor)
for(var/turf/simulated/floor/target_tile in range(0,src))
if(target_tile.parent && target_tile.parent.group_processing)
target_tile.parent.suspend_group_processing()
var/datum/gas_mixture/napalm = new
var/toxinsToDeduce = 20
napalm.toxins = toxinsToDeduce
napalm.temperature = 400+T0C
target_tile.assume_air(napalm)
spawn (0) target_tile.hotspot_expose(temperature, 400)
for(var/obj/structure/falsewall/plasma/F in range(3,src))//Hackish as fuck, but until temperature_expose works, there is nothing I can do -Sieve
var/turf/T = get_turf(F)
T.ChangeTurf(/turf/simulated/wall/mineral/plasma/)
del (F)
for(var/turf/simulated/wall/mineral/plasma/W in range(3,src))
W.ignite((temperature/4))//Added so that you can't set off a massive chain reaction with a small flame
for(var/obj/machinery/door/airlock/plasma/D in range(3,src))
D.ignite(temperature/4)
atmos_spawn_air("fire", 400)
/turf/simulated/wall/mineral/plasma/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)//Doesn't fucking work because walls don't interact with air :(
if(exposed_temperature > 300)
+42 -26
View File
@@ -30,6 +30,16 @@
return
return
// Adds the adjacent turfs to the current atmos processing
/turf/Del()
if(air_master)
for(var/direction in cardinal)
if(atmos_adjacent_turfs & direction)
var/turf/simulated/T = get_step(src, direction)
if(istype(T))
air_master.add_to_active(T)
..()
/turf/DblClick()
if(istype(usr, /mob/living/silicon/ai))
return move_camera_by_click()
@@ -202,10 +212,12 @@
if(path == type) return src
var/old_lumcount = lighting_lumcount - initial(lighting_lumcount)
var/old_opacity = opacity
if(air_master)
air_master.remove_from_active(src)
var/turf/W = new path(src)
if(istype(W, /turf/simulated/floor))
if(istype(W, /turf/simulated))
W:Assimilate_Air()
W.RemoveLattice()
@@ -219,36 +231,40 @@
W.UpdateAffectingLights()
W.levelupdate()
W.CalculateAdjacentTurfs()
return W
//////Assimilate Air//////
/turf/simulated/proc/Assimilate_Air()
var/aoxy = 0//Holders to assimilate air from nearby turfs
var/anitro = 0
var/aco = 0
var/atox = 0
var/atemp = 0
var/turf_count = 0
if(air)
var/aoxy = 0//Holders to assimilate air from nearby turfs
var/anitro = 0
var/aco = 0
var/atox = 0
var/atemp = 0
var/turf_count = 0
for(var/direction in cardinal)//Only use cardinals to cut down on lag
var/turf/T = get_step(src,direction)
if(istype(T,/turf/space))//Counted as no air
turf_count++//Considered a valid turf for air calcs
continue
else if(istype(T,/turf/simulated/floor))
var/turf/simulated/S = T
if(S.air)//Add the air's contents to the holders
aoxy += S.air.oxygen
anitro += S.air.nitrogen
aco += S.air.carbon_dioxide
atox += S.air.toxins
atemp += S.air.temperature
turf_count ++
air.oxygen = (aoxy/max(turf_count,1))//Averages contents of the turfs, ignoring walls and the like
air.nitrogen = (anitro/max(turf_count,1))
air.carbon_dioxide = (aco/max(turf_count,1))
air.toxins = (atox/max(turf_count,1))
air.temperature = (atemp/max(turf_count,1))//Trace gases can get bant
for(var/direction in cardinal)//Only use cardinals to cut down on lag
var/turf/T = get_step(src,direction)
if(istype(T,/turf/space))//Counted as no air
turf_count++//Considered a valid turf for air calcs
continue
else if(istype(T,/turf/simulated/floor))
var/turf/simulated/S = T
if(S.air)//Add the air's contents to the holders
aoxy += S.air.oxygen
anitro += S.air.nitrogen
aco += S.air.carbon_dioxide
atox += S.air.toxins
atemp += S.air.temperature
turf_count ++
air.oxygen = (aoxy/max(turf_count,1))//Averages contents of the turfs, ignoring walls and the like
air.nitrogen = (anitro/max(turf_count,1))
air.carbon_dioxide = (aco/max(turf_count,1))
air.toxins = (atox/max(turf_count,1))
air.temperature = (atemp/max(turf_count,1))//Trace gases can get bant
if(air_master)
air_master.add_to_active(src)
/turf/proc/ReplaceWithLattice()
src.ChangeTurf(/turf/space)
-5
View File
@@ -107,12 +107,10 @@ var/list/admin_verbs_debug = list(
/client/proc/Debug2,
/client/proc/kill_air,
/client/proc/cmd_debug_make_powernets,
/client/proc/kill_airgroup,
/client/proc/debug_controller,
/client/proc/cmd_debug_mob_lists,
/client/proc/cmd_admin_delete,
/client/proc/cmd_debug_del_all,
/client/proc/air_report,
/client/proc/reload_admins,
/client/proc/restart_controller,
/client/proc/enable_debug_verbs,
@@ -185,12 +183,10 @@ var/list/admin_verbs_hideable = list(
/client/proc/reload_admins,
/client/proc/kill_air,
/client/proc/cmd_debug_make_powernets,
/client/proc/kill_airgroup,
/client/proc/debug_controller,
/client/proc/startSinglo,
/client/proc/cmd_debug_mob_lists,
/client/proc/cmd_debug_del_all,
/client/proc/air_report,
/client/proc/enable_debug_verbs,
/proc/possess,
/proc/release
@@ -239,7 +235,6 @@ var/list/admin_verbs_hideable = list(
/client/proc/count_objects_on_z_level,
/client/proc/count_objects_all,
/client/proc/cmd_assume_direct_control,
/client/proc/jump_to_dead_group,
/client/proc/startSinglo,
/client/proc/ticklag,
/client/proc/cmd_admin_grantfullaccess,
-84
View File
@@ -1,46 +1,3 @@
/client/proc/air_report()
set category = "Debug"
set name = "Show Air Report"
if(!master_controller || !air_master)
alert(usr,"Master_controller or air_master not found.","Air Report")
return 0
var/active_groups = 0
var/inactive_groups = 0
var/active_tiles = 0
for(var/datum/air_group/group in air_master.air_groups)
if(group.group_processing)
active_groups++
else
inactive_groups++
active_tiles += group.members.len
var/hotspots = 0
for(var/obj/effect/hotspot/hotspot in world)
hotspots++
var/output = {"<B>AIR SYSTEMS REPORT</B><HR>
<B>General Processing Data</B><BR>
<B># of Groups:</B> [air_master.air_groups.len]<BR>
---- <I>Active:</I> [active_groups]<BR>
---- <I>Inactive:</I> [inactive_groups]<BR>
-------- <I>Tiles:</I> [active_tiles]<BR>
<B># of Active Singletons:</B> [air_master.active_singletons.len]<BR>
<BR>
<B>Special Processing Data</B><BR>
<B>Hotspot Processing:</B> [hotspots]<BR>
<B>High Temperature Processing:</B> [air_master.active_super_conductivity.len]<BR>
<B>High Pressure Processing:</B> [air_master.high_pressure_delta.len] (not yet implemented)<BR>
<BR>
<B>Geometry Processing Data</B><BR>
<B>Group Rebuild:</B> [air_master.groups_to_rebuild.len]<BR>
<B>Tile Update:</B> [air_master.tiles_to_update.len]<BR>
"}
usr << browse(output,"window=airreport")
feedback_add_details("admin_verb","SAR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/air_status(turf/target as turf)
set category = "Debug"
set name = "Display Air Status"
@@ -138,47 +95,6 @@
load_admins()
feedback_add_details("admin_verb","RLDA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/jump_to_dead_group()
set name = "Jump to dead group"
set category = "Debug"
if(!holder)
src << "Only administrators may use this command."
return
if(!air_master)
usr << "Cannot find air_system"
return
var/datum/air_group/dead_groups = list()
for(var/datum/air_group/group in air_master.air_groups)
if (!group.group_processing)
dead_groups += group
var/datum/air_group/dest_group = pick(dead_groups)
usr.loc = pick(dest_group.members)
feedback_add_details("admin_verb","JDAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
/client/proc/kill_airgroup()
set name = "Kill Local Airgroup"
set desc = "Use this to allow manual manupliation of atmospherics."
set category = "Debug"
if(!holder)
src << "Only administrators may use this command."
return
if(!air_master)
usr << "Cannot find air_system"
return
var/turf/T = get_turf(usr)
if(istype(T, /turf/simulated))
var/datum/air_group/AG = T:parent
AG.next_check = 30
AG.group_processing = 0
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!
/client/proc/print_jobban_old()
set name = "Print Jobban Log"
set desc = "This spams all the active jobban entries for the current round to standard output."
-24
View File
@@ -131,7 +131,6 @@ var/intercom_range_display_status = 0
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/startSinglo
src.verbs += /client/proc/ticklag //allows you to set the ticklag.
src.verbs += /client/proc/cmd_admin_grantfullaccess
@@ -142,8 +141,6 @@ var/intercom_range_display_status = 0
src.verbs += /client/proc/print_jobban_old
src.verbs += /client/proc/print_jobban_old_filter
src.verbs += /client/proc/forceEvent
src.verbs += /client/proc/break_all_air_groups
src.verbs += /client/proc/regroup_all_air_groups
src.verbs += /client/proc/kill_pipe_processing
src.verbs += /client/proc/kill_air_processing
src.verbs += /client/proc/disable_communication
@@ -239,27 +236,6 @@ var/intercom_range_display_status = 0
world << "There are [count] objects of type [type_path] in the game world"
feedback_add_details("admin_verb","mOBJ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
var/global/prevent_airgroup_regroup = 0
/client/proc/break_all_air_groups()
set category = "Mapping"
set name = "Break All Airgroups"
prevent_airgroup_regroup = 1
for(var/datum/air_group/AG in air_master.air_groups)
AG.suspend_group_processing()
message_admins("[src.ckey] used 'Break All Airgroups'")
/client/proc/regroup_all_air_groups()
set category = "Mapping"
set name = "Regroup All Airgroups Attempt"
prevent_airgroup_regroup = 0
for(var/datum/air_group/AG in air_master.air_groups)
AG.check_regroup()
message_admins("[src.ckey] used 'Regroup All Airgroups Attempt'")
/client/proc/kill_pipe_processing()
set category = "Mapping"
set name = "Kill pipe processing"
+1 -1
View File
@@ -213,7 +213,7 @@
new src.type(tunnel, rand(10, 15), 0, dir)
else
SpawnFloor(tunnel)
else if(!istype(tunnel, src.parent)) // We hit space/normal/wall, stop our tunnel.
else //if(!istype(tunnel, src.parent)) // We hit space/normal/wall, stop our tunnel.
break
// Chance to change our direction left or right.
@@ -95,7 +95,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 <= config.health_threshold_crit)
losebreath++
@@ -70,7 +70,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 <= config.health_threshold_crit)
losebreath++
+1 -1
View File
@@ -229,7 +229,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 <= config.health_threshold_crit)
losebreath++
@@ -156,7 +156,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(health <= config.health_threshold_crit)
losebreath++
if(losebreath>0) //Suffocating so do not take a breath
@@ -49,8 +49,7 @@
// DOORS
// Simply updates the visibility of the area when it opens/closes/destroyed.
/obj/machinery/door/update_nearby_tiles(need_rebuild)
. = ..(need_rebuild)
/obj/machinery/door/proc/update_freelok_sight()
// Glass door glass = 1
// don't check then?
if(!glass && cameranet)
+2 -1
View File
@@ -644,7 +644,8 @@ note dizziness decrements automatically in the mob's Life() proc.
if(master_controller)
stat(null,"MasterController-[last_tick_duration] ([master_controller.processing?"On":"Off"]-[controller_iteration])")
stat(null,"Air-[master_controller.air_cost]\tSun-[master_controller.sun_cost]")
stat(null,"Air-[master_controller.air_cost]\t#[air_master.active_turfs.len]")
stat(null,"Sun-[master_controller.sun_cost]")
stat(null,"Mob-[master_controller.mobs_cost]\t#[mob_list.len]")
stat(null,"Dis-[master_controller.diseases_cost]\t#[active_diseases.len]")
stat(null,"Mch-[master_controller.machines_cost]\t#[machines.len]")
+5 -12
View File
@@ -1369,19 +1369,12 @@ datum
if (egg.grown)
egg.Hatch()*/
if((!O) || (!volume)) return 0
var/turf/the_turf = get_turf(O)
var/datum/gas_mixture/napalm = new
var/datum/gas/volatile_fuel/fuel = new
fuel.moles = 5
napalm.trace_gases += fuel
the_turf.assume_air(napalm)
reaction_turf(var/turf/T, var/volume)
O.atmos_spawn_air("fuel", 5)
reaction_turf(var/turf/simulated/T, var/volume)
src = null
var/datum/gas_mixture/napalm = new
var/datum/gas/volatile_fuel/fuel = new
fuel.moles = 5
napalm.trace_gases += fuel
T.assume_air(napalm)
if(istype(T))
T.atmos_spawn_air("fuel", 5)
return
toxin/lexorin
+6 -24
View File
@@ -348,18 +348,9 @@ datum
required_reagents = list("aluminum" = 1, "plasma" = 1, "sacid" = 1 )
result_amount = 1
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
napalm.toxins = created_volume
napalm.temperature = 400+T0C
target_tile.assume_air(napalm)
spawn (0) target_tile.hotspot_expose(700, 400)
var/turf/simulated/T = get_turf(src)
if(istype(T))
T.atmos_spawn_air("fire", created_volume)
holder.del_reagent("napalm")
return
@@ -1229,18 +1220,9 @@ datum
for(var/mob/O in viewers(get_turf(holder.my_atom), null))
O.show_message(text("\red The slime extract begins to vibrate violently !"), 1)
sleep(50)
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
napalm.toxins = 50
napalm.temperature = 2400
target_tile.assume_air(napalm)
spawn (0) target_tile.hotspot_expose(700, 400)
var/turf/simulated/T = get_turf(src)
if(istype(T))
T.atmos_spawn_air("fire", 50)
//Yellow
slimeoverload
+1
View File
@@ -368,6 +368,7 @@
//Actually transfer the gas
var/datum/gas_mixture/removed = env.remove(transfer_moles)
air_contents.merge(removed)
air_update_turf()
// if full enough, switch to ready mode
+1
View File
@@ -123,6 +123,7 @@
removed.temperature = min((removed.temperature*heat_capacity + heating_power)/heat_capacity, 1000)
env.merge(removed)
air_update_turf()
/obj/machinery/r_n_d/server/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (disabled)
+40 -5
View File
@@ -6,6 +6,43 @@
// BEGIN_FILE_DIR
#define FILE_DIR .
#define FILE_DIR "html"
#define FILE_DIR "icons"
#define FILE_DIR "icons/effects"
#define FILE_DIR "icons/mecha"
#define FILE_DIR "icons/misc"
#define FILE_DIR "icons/mob"
#define FILE_DIR "icons/obj"
#define FILE_DIR "icons/obj/assemblies"
#define FILE_DIR "icons/obj/atmospherics"
#define FILE_DIR "icons/obj/clothing"
#define FILE_DIR "icons/obj/doors"
#define FILE_DIR "icons/obj/flora"
#define FILE_DIR "icons/obj/machines"
#define FILE_DIR "icons/obj/pipes"
#define FILE_DIR "icons/obj/power_cond"
#define FILE_DIR "icons/pda_icons"
#define FILE_DIR "icons/spideros_icons"
#define FILE_DIR "icons/stamp_icons"
#define FILE_DIR "icons/Testing"
#define FILE_DIR "icons/turf"
#define FILE_DIR "icons/vending_icons"
#define FILE_DIR "sound"
#define FILE_DIR "sound/AI"
#define FILE_DIR "sound/ambience"
#define FILE_DIR "sound/effects"
#define FILE_DIR "sound/hallucinations"
#define FILE_DIR "sound/items"
#define FILE_DIR "sound/machines"
#define FILE_DIR "sound/mecha"
#define FILE_DIR "sound/misc"
#define FILE_DIR "sound/piano"
#define FILE_DIR "sound/violin"
#define FILE_DIR "sound/voice"
#define FILE_DIR "sound/weapons"
#define FILE_DIR "tools"
#define FILE_DIR "tools/AddToChangelog"
#define FILE_DIR "tools/AddToChangelog/AddToChangelog"
// END_FILE_DIR
// BEGIN_PREFERENCES
@@ -171,12 +208,7 @@
#include "code\defines\procs\command_alert.dm"
#include "code\defines\procs\dbcore.dm"
#include "code\defines\procs\statistics.dm"
#include "code\FEA\FEA_airgroup.dm"
#include "code\FEA\FEA_fire.dm"
#include "code\FEA\FEA_gas_mixture.dm"
#include "code\FEA\FEA_group_helpers.dm"
#include "code\FEA\FEA_system.dm"
#include "code\FEA\FEA_turf_tile.dm"
#include "code\game\asteroid.dm"
#include "code\game\atoms.dm"
#include "code\game\atoms_movable.dm"
@@ -621,6 +653,9 @@
#include "code\game\verbs\who.dm"
#include "code\js\byjax.dm"
#include "code\js\menus.dm"
#include "code\LINDA\LINDA_fire.dm"
#include "code\LINDA\LINDA_system.dm"
#include "code\LINDA\LINDA_turf_tile.dm"
#include "code\modules\admin\admin.dm"
#include "code\modules\admin\admin_investigate.dm"
#include "code\modules\admin\admin_memo.dm"