April sync (#360)
* Maps and things no code/icons * helpers defines globalvars * Onclick world.dm orphaned_procs * subsystems Round vote and shuttle autocall done here too * datums * Game folder * Admin - chatter modules * clothing - mining * modular computers - zambies * client * mob level 1 * mob stage 2 + simple_animal * silicons n brains * mob stage 3 + Alien/Monkey * human mobs * icons updated * some sounds * emitter y u no commit * update tgstation.dme * compile fixes * travis fixes Also removes Fast digest mode, because reasons. * tweaks for travis Mentors are broke again Also fixes Sizeray guns * oxygen loss fix for vore code. * removes unused code * some code updates * bulk fixes * further fixes * outside things * whoops. * Maint bar ported * GLOBs.
This commit is contained in:
@@ -61,7 +61,7 @@
|
||||
..()
|
||||
SSair.hotspots += src
|
||||
perform_exposure()
|
||||
setDir(pick(cardinal))
|
||||
setDir(pick(GLOB.cardinal))
|
||||
air_update_turf()
|
||||
|
||||
|
||||
@@ -79,14 +79,14 @@
|
||||
|
||||
if(bypassing)
|
||||
if(!just_spawned)
|
||||
volume = location.air.fuel_burnt*FIRE_GROWTH_RATE
|
||||
volume = location.air.reaction_results["fire"]*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
|
||||
volume = affected.reaction_results["fire"]*FIRE_GROWTH_RATE
|
||||
location.assume_air(affected)
|
||||
|
||||
for(var/A in loc)
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
/turf/proc/CalculateAdjacentTurfs()
|
||||
var/list/atmos_adjacent_turfs = src.atmos_adjacent_turfs
|
||||
for(var/direction in cardinal)
|
||||
for(var/direction in GLOB.cardinal)
|
||||
var/turf/T = get_step(src, direction)
|
||||
if(!T)
|
||||
continue
|
||||
@@ -72,11 +72,11 @@
|
||||
|
||||
var/turf/curloc = src
|
||||
|
||||
for (var/direction in diagonals)
|
||||
for (var/direction in GLOB.diagonals)
|
||||
var/matchingDirections = 0
|
||||
var/turf/S = get_step(curloc, direction)
|
||||
|
||||
for (var/checkDirection in cardinal)
|
||||
for (var/checkDirection in GLOB.cardinal)
|
||||
var/turf/checkTurf = get_step(S, checkDirection)
|
||||
if(!S.atmos_adjacent_turfs || !S.atmos_adjacent_turfs[checkTurf])
|
||||
continue
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
/turf/open/archive()
|
||||
air.archive()
|
||||
archived_cycle = SSair.times_fired
|
||||
..()
|
||||
temperature_archived = temperature
|
||||
|
||||
/////////////////////////GAS OVERLAYS//////////////////////////////
|
||||
|
||||
@@ -117,11 +117,23 @@
|
||||
var/list/gases = air.gases
|
||||
for(var/id in gases)
|
||||
var/gas = gases[id]
|
||||
if(gas[GAS_META][META_GAS_OVERLAY] && gas[MOLES] > gas[GAS_META][META_GAS_MOLES_VISIBLE])
|
||||
. += gas[GAS_META][META_GAS_OVERLAY]
|
||||
var/gas_meta = gas[GAS_META]
|
||||
var/gas_overlay = gas_meta[META_GAS_OVERLAY]
|
||||
if(gas_overlay && gas[MOLES] > gas_meta[META_GAS_MOLES_VISIBLE])
|
||||
. += gas_overlay
|
||||
|
||||
/////////////////////////////SIMULATION///////////////////////////////////
|
||||
|
||||
#define LAST_SHARE_CHECK \
|
||||
var/last_share = our_air.last_share;\
|
||||
if(last_share > MINIMUM_AIR_TO_SUSPEND){\
|
||||
our_excited_group.reset_cooldowns();\
|
||||
cached_atmos_cooldown = 0;\
|
||||
} else if(last_share > MINIMUM_MOLES_DELTA_TO_MOVE) {\
|
||||
our_excited_group.dismantle_cooldown = 0;\
|
||||
cached_atmos_cooldown = 0;\
|
||||
}
|
||||
|
||||
/turf/proc/process_cell(fire_count)
|
||||
SSair.remove_from_active(src)
|
||||
|
||||
@@ -130,16 +142,19 @@
|
||||
archive()
|
||||
|
||||
current_cycle = fire_count
|
||||
var/remove = 1 //set by non simulated turfs who are sharing with this turf
|
||||
|
||||
//cache for sanic speed
|
||||
var/list/adjacent_turfs = atmos_adjacent_turfs
|
||||
var/datum/excited_group/our_excited_group = excited_group
|
||||
var/adjacent_turfs_length = LAZYLEN(adjacent_turfs)
|
||||
atmos_cooldown++
|
||||
if (planetary_atmos)
|
||||
var/cached_atmos_cooldown = atmos_cooldown + 1
|
||||
|
||||
var/planet_atmos = planetary_atmos
|
||||
if (planet_atmos)
|
||||
adjacent_turfs_length++
|
||||
|
||||
var/datum/gas_mixture/our_air = air
|
||||
|
||||
for(var/t in adjacent_turfs)
|
||||
var/turf/open/enemy_tile = t
|
||||
|
||||
@@ -148,6 +163,8 @@
|
||||
|
||||
/******************* GROUP HANDLING START *****************************************************************/
|
||||
|
||||
var/should_share_air = FALSE
|
||||
var/datum/gas_mixture/enemy_air = enemy_tile.air
|
||||
if(enemy_tile.excited)
|
||||
//cache for sanic speed
|
||||
var/datum/excited_group/enemy_excited_group = enemy_tile.excited_group
|
||||
@@ -157,26 +174,26 @@
|
||||
//combine groups (this also handles updating the excited_group var of all involved turfs)
|
||||
our_excited_group.merge_groups(enemy_excited_group)
|
||||
our_excited_group = excited_group //update our cache
|
||||
share_air(enemy_tile, fire_count, adjacent_turfs_length) //share
|
||||
should_share_air = TRUE
|
||||
else
|
||||
if((recently_active == 1 && enemy_tile.recently_active == 1) || air.compare(enemy_tile.air))
|
||||
if((recently_active == 1 && enemy_tile.recently_active == 1) || our_air.compare(enemy_air))
|
||||
our_excited_group.add_turf(enemy_tile) //add enemy to our group
|
||||
share_air(enemy_tile, fire_count, adjacent_turfs_length) //share
|
||||
should_share_air = TRUE
|
||||
else
|
||||
if(enemy_excited_group)
|
||||
if((recently_active == 1 && enemy_tile.recently_active == 1) || air.compare(enemy_tile.air))
|
||||
if((recently_active == 1 && enemy_tile.recently_active == 1) || our_air.compare(enemy_air))
|
||||
enemy_excited_group.add_turf(src) //join self to enemy group
|
||||
our_excited_group = excited_group //update our cache
|
||||
share_air(enemy_tile, fire_count, adjacent_turfs_length) //share
|
||||
should_share_air = TRUE
|
||||
else
|
||||
if((recently_active == 1 && enemy_tile.recently_active == 1) || air.compare(enemy_tile.air))
|
||||
if((recently_active == 1 && enemy_tile.recently_active == 1) || our_air.compare(enemy_air))
|
||||
var/datum/excited_group/EG = new //generate new group
|
||||
EG.add_turf(src)
|
||||
EG.add_turf(enemy_tile)
|
||||
our_excited_group = excited_group //update our cache
|
||||
share_air(enemy_tile, fire_count, adjacent_turfs_length) //share
|
||||
should_share_air = TRUE
|
||||
else
|
||||
if(air.compare(enemy_tile.air)) //compare if
|
||||
if(our_air.compare(enemy_air)) //compare if
|
||||
SSair.add_to_active(enemy_tile) //excite enemy
|
||||
if(our_excited_group)
|
||||
our_excited_group.add_turf(enemy_tile) //add enemy to group
|
||||
@@ -185,51 +202,46 @@
|
||||
EG.add_turf(src)
|
||||
EG.add_turf(enemy_tile)
|
||||
our_excited_group = excited_group //update our cache
|
||||
share_air(enemy_tile, fire_count, adjacent_turfs_length) //share
|
||||
should_share_air = TRUE
|
||||
|
||||
//air sharing
|
||||
if(should_share_air)
|
||||
var/difference = our_air.share(enemy_air, adjacent_turfs_length)
|
||||
if(difference)
|
||||
if(difference > 0)
|
||||
consider_pressure_difference(enemy_tile, difference)
|
||||
else
|
||||
enemy_tile.consider_pressure_difference(src, -difference)
|
||||
LAST_SHARE_CHECK
|
||||
|
||||
|
||||
/******************* GROUP HANDLING FINISH *********************************************************************/
|
||||
|
||||
if (planetary_atmos) //share our air with the "atmosphere" "above" the turf
|
||||
if (planet_atmos) //share our air with the "atmosphere" "above" the turf
|
||||
var/datum/gas_mixture/G = new
|
||||
G.copy_from_turf(src)
|
||||
G.archive()
|
||||
if(air.compare(G))
|
||||
if(our_air.compare(G))
|
||||
if(!our_excited_group)
|
||||
var/datum/excited_group/EG = new
|
||||
EG.add_turf(src)
|
||||
our_excited_group = excited_group
|
||||
air.share(G, adjacent_turfs_length)
|
||||
last_share_check()
|
||||
our_air.share(G, adjacent_turfs_length)
|
||||
LAST_SHARE_CHECK
|
||||
|
||||
air.react()
|
||||
our_air.react(src)
|
||||
|
||||
update_visuals()
|
||||
|
||||
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)
|
||||
var/remove = TRUE
|
||||
if(our_air.temperature > MINIMUM_TEMPERATURE_START_SUPERCONDUCTION)
|
||||
if(consider_superconductivity(starting = 1))
|
||||
remove = FALSE
|
||||
|
||||
if(air.temperature > MINIMUM_TEMPERATURE_START_SUPERCONDUCTION)
|
||||
if(consider_superconductivity(starting = 1))
|
||||
remove = 0
|
||||
|
||||
if (atmos_cooldown > EXCITED_GROUP_DISMANTLE_CYCLES*2)
|
||||
SSair.remove_from_active(src)
|
||||
if(!our_excited_group && remove == 1)
|
||||
if ((!our_excited_group && remove) || (cached_atmos_cooldown > (EXCITED_GROUP_DISMANTLE_CYCLES * 2)))
|
||||
SSair.remove_from_active(src)
|
||||
|
||||
|
||||
/turf/open/proc/share_air(turf/open/T, fire_count, adjacent_turfs_length)
|
||||
if(T.current_cycle < fire_count)
|
||||
var/difference = air.share(T.air, adjacent_turfs_length)
|
||||
if(difference)
|
||||
if(difference > 0)
|
||||
consider_pressure_difference(T, difference)
|
||||
else
|
||||
T.consider_pressure_difference(src, -difference)
|
||||
last_share_check()
|
||||
atmos_cooldown = cached_atmos_cooldown
|
||||
|
||||
//////////////////////////SPACEWIND/////////////////////////////
|
||||
|
||||
@@ -239,18 +251,7 @@
|
||||
pressure_direction = get_dir(src, T)
|
||||
pressure_difference = difference
|
||||
|
||||
/turf/open/proc/last_share_check()
|
||||
if(air.last_share > MINIMUM_AIR_TO_SUSPEND)
|
||||
excited_group.reset_cooldowns()
|
||||
atmos_cooldown = 0
|
||||
else if(air.last_share > MINIMUM_MOLES_DELTA_TO_MOVE)
|
||||
excited_group.dismantle_cooldown = 0
|
||||
atmos_cooldown = 0
|
||||
|
||||
/turf/proc/high_pressure_movements()
|
||||
return
|
||||
|
||||
/turf/open/high_pressure_movements()
|
||||
/turf/open/proc/high_pressure_movements()
|
||||
for(var/atom/movable/M in src)
|
||||
M.experience_pressure_difference(pressure_difference, pressure_direction)
|
||||
|
||||
@@ -363,7 +364,7 @@
|
||||
/turf/open/conductivity_directions()
|
||||
if(blocks_air)
|
||||
return ..()
|
||||
for(var/direction in cardinal)
|
||||
for(var/direction in GLOB.cardinal)
|
||||
var/turf/T = get_step(src, direction)
|
||||
if(!(T in atmos_adjacent_turfs) && !(atmos_supeconductivity & direction))
|
||||
. |= direction
|
||||
@@ -392,7 +393,7 @@
|
||||
|
||||
if(conductivity_directions)
|
||||
//Conduct with tiles around me
|
||||
for(var/direction in cardinal)
|
||||
for(var/direction in GLOB.cardinal)
|
||||
if(conductivity_directions & direction)
|
||||
var/turf/neighbor = get_step(src,direction)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user