mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 09:54:52 +00:00
Superconductivity is gone. Only rustmos now.
This commit is contained in:
BIN
auxmos.dll
BIN
auxmos.dll
Binary file not shown.
BIN
auxmos.pdb
BIN
auxmos.pdb
Binary file not shown.
@@ -145,7 +145,7 @@
|
||||
#define SSAIR_EXCITEDGROUPS 3
|
||||
#define SSAIR_HIGHPRESSURE 4
|
||||
#define SSAIR_HOTSPOTS 5
|
||||
#define SSAIR_SUPERCONDUCTIVITY 6
|
||||
#define SSAIR_TURF_CONDUCTION 6
|
||||
#define SSAIR_REBUILD_PIPENETS 7
|
||||
#define SSAIR_EQUALIZE 8
|
||||
#define SSAIR_ACTIVETURFS 9
|
||||
|
||||
@@ -28,7 +28,6 @@ SUBSYSTEM_DEF(air)
|
||||
var/list/gas_reactions = list()
|
||||
|
||||
//Special functions lists
|
||||
var/list/turf/active_super_conductivity = list()
|
||||
var/list/turf/open/high_pressure_delta = list()
|
||||
|
||||
|
||||
@@ -36,7 +35,6 @@ SUBSYSTEM_DEF(air)
|
||||
var/currentpart = SSAIR_REBUILD_PIPENETS
|
||||
|
||||
var/map_loading = TRUE
|
||||
var/list/queued_for_activation
|
||||
|
||||
var/log_explosive_decompression = TRUE // If things get spammy, admemes can turn this off.
|
||||
|
||||
@@ -47,7 +45,8 @@ SUBSYSTEM_DEF(air)
|
||||
/datum/controller/subsystem/air/stat_entry(msg)
|
||||
msg += "C:{"
|
||||
msg += "AT:[round(cost_turfs,1)]|"
|
||||
msg += "EQ:[round(cost_equalize,1)]"
|
||||
msg += "TH:[round(turf_process_time(),1)]|"
|
||||
msg += "EQ:[round(cost_equalize,1)]|"
|
||||
msg += "HP:[round(cost_highpressure,1)]|"
|
||||
msg += "HS:[round(cost_hotspots,1)]|"
|
||||
msg += "SC:[round(cost_superconductivity,1)]|"
|
||||
@@ -124,15 +123,6 @@ SUBSYSTEM_DEF(air)
|
||||
resumed = 0
|
||||
currentpart = SSAIR_HIGHPRESSURE
|
||||
|
||||
if(currentpart == SSAIR_EXCITEDGROUPS)
|
||||
timer = TICK_USAGE_REAL
|
||||
process_excited_groups(resumed)
|
||||
cost_groups = MC_AVERAGE(cost_groups, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = 0
|
||||
currentpart = SSAIR_HIGHPRESSURE
|
||||
|
||||
if(currentpart == SSAIR_HIGHPRESSURE)
|
||||
timer = TICK_USAGE_REAL
|
||||
process_high_pressure_delta(resumed)
|
||||
@@ -149,11 +139,11 @@ SUBSYSTEM_DEF(air)
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = 0
|
||||
currentpart = SSAIR_SUPERCONDUCTIVITY
|
||||
currentpart = SSAIR_TURF_CONDUCTION
|
||||
|
||||
if(currentpart == SSAIR_SUPERCONDUCTIVITY)
|
||||
if(currentpart == SSAIR_TURF_CONDUCTION)
|
||||
timer = TICK_USAGE_REAL
|
||||
process_super_conductivity(resumed)
|
||||
process_turf_heat(resumed)
|
||||
cost_superconductivity = MC_AVERAGE(cost_superconductivity, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
@@ -195,18 +185,7 @@ SUBSYSTEM_DEF(air)
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_super_conductivity(resumed = 0)
|
||||
if (!resumed)
|
||||
src.currentrun = active_super_conductivity.Copy()
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
var/list/currentrun = src.currentrun
|
||||
while(currentrun.len)
|
||||
var/turf/T = currentrun[currentrun.len]
|
||||
currentrun.len--
|
||||
T.super_conduct()
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
/datum/controller/subsystem/air/proc/process_turf_heat()
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_hotspots(resumed = 0)
|
||||
if (!resumed)
|
||||
@@ -235,24 +214,8 @@ SUBSYSTEM_DEF(air)
|
||||
return
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_turf_equalize(resumed = 0)
|
||||
if(!resumed)
|
||||
src.currentrun = process_turf_equalize_extools((Master.current_ticklimit - TICK_USAGE) * world.tick_lag)
|
||||
if(src.currentrun.len)
|
||||
if(process_turf_equalize_extools((Master.current_ticklimit - TICK_USAGE) * world.tick_lag))
|
||||
pause()
|
||||
else
|
||||
var/list/currentrun = src.currentrun
|
||||
while(currentrun.len)
|
||||
var/turf/open/T = currentrun[currentrun.len]
|
||||
var/list/arg = currentrun[T]
|
||||
var/turf/open/otherT = arg[1]
|
||||
var/amt = arg[2]
|
||||
currentrun.len--
|
||||
if(T)
|
||||
T.update_visuals()
|
||||
otherT.update_visuals()
|
||||
T.consider_pressure_difference(otherT,amt)
|
||||
if (MC_TICK_CHECK)
|
||||
return
|
||||
/*
|
||||
//cache for sanic speed
|
||||
var/fire_count = times_fired
|
||||
@@ -270,12 +233,24 @@ SUBSYSTEM_DEF(air)
|
||||
return
|
||||
*/
|
||||
|
||||
/datum/controller/subsystem/air/proc/begin_turf_process()
|
||||
/proc/post_process_turf(flags,turf/open/T,list/tiles_with_diffs)
|
||||
if(!isopenturf(T))
|
||||
return
|
||||
if(flags & 2)
|
||||
T.air.react()
|
||||
if(flags & 1)
|
||||
T.update_visuals()
|
||||
for(var/list/pair in tiles_with_diffs)
|
||||
var/turf/open/enemy_tile = pair[1]
|
||||
var/difference = pair[2]
|
||||
if(difference > 0)
|
||||
T.consider_pressure_difference(enemy_tile, difference)
|
||||
else
|
||||
enemy_tile.consider_pressure_difference(T, -difference)
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_turfs(resumed = 0)
|
||||
if(!resumed)
|
||||
begin_turf_process()
|
||||
if(process_turfs_extools((Master.current_ticklimit - TICK_USAGE) * world.tick_lag))
|
||||
var/datum/callback/post_process = CALLBACK(GLOBAL_PROC,/proc/post_process_turf)
|
||||
if(process_turfs_extools(post_process))
|
||||
pause()
|
||||
/*
|
||||
//cache for sanic speed
|
||||
@@ -293,75 +268,17 @@ SUBSYSTEM_DEF(air)
|
||||
return
|
||||
*/
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_excited_groups(resumed = 0)
|
||||
return process_excited_groups_extools(resumed, (Master.current_ticklimit - TICK_USAGE) * 0.01 * world.tick_lag)
|
||||
/*
|
||||
if (!resumed)
|
||||
src.currentrun = excited_groups.Copy()
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
var/list/currentrun = src.currentrun
|
||||
while(currentrun.len)
|
||||
var/datum/excited_group/EG = currentrun[currentrun.len]
|
||||
currentrun.len--
|
||||
EG.breakdown_cooldown++
|
||||
EG.dismantle_cooldown++
|
||||
if(EG.breakdown_cooldown >= EXCITED_GROUP_BREAKDOWN_CYCLES)
|
||||
EG.self_breakdown()
|
||||
else if(EG.dismantle_cooldown >= EXCITED_GROUP_DISMANTLE_CYCLES)
|
||||
EG.dismantle()
|
||||
if (MC_TICK_CHECK)
|
||||
return
|
||||
*/
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_turfs_extools()
|
||||
/datum/controller/subsystem/air/proc/process_turf_equalize_extools()
|
||||
/datum/controller/subsystem/air/proc/process_excited_groups_extools()
|
||||
/datum/controller/subsystem/air/proc/get_amt_excited_groups()
|
||||
/datum/controller/subsystem/air/proc/get_amt_active_turfs()
|
||||
/datum/controller/subsystem/air/proc/get_amt_gas_mixes()
|
||||
/datum/controller/subsystem/air/proc/get_max_gas_mixes()
|
||||
/datum/controller/subsystem/air/proc/add_to_active_extools()
|
||||
/datum/controller/subsystem/air/proc/remove_from_active_extools()
|
||||
/datum/controller/subsystem/air/proc/get_active_turfs()
|
||||
/datum/controller/subsystem/air/proc/clear_active_turfs()
|
||||
|
||||
/datum/controller/subsystem/air/proc/remove_from_active(turf/open/T)
|
||||
remove_from_active_extools(T)
|
||||
#ifdef VISUALIZE_ACTIVE_TURFS
|
||||
T.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, "#00ff00")
|
||||
#endif
|
||||
if(istype(T))
|
||||
T.set_excited(FALSE)
|
||||
T.eg_garbage_collect()
|
||||
|
||||
/datum/controller/subsystem/air/proc/add_to_active(turf/open/T, blockchanges = 1)
|
||||
if(istype(T) && T.air)
|
||||
#ifdef VISUALIZE_ACTIVE_TURFS
|
||||
T.add_atom_colour("#00ff00", TEMPORARY_COLOUR_PRIORITY)
|
||||
#endif
|
||||
T.set_excited(TRUE)
|
||||
add_to_active_extools(T)
|
||||
if(blockchanges)
|
||||
T.eg_garbage_collect()
|
||||
else if(T.flags_1 & INITIALIZED_1)
|
||||
for(var/turf/S in T.atmos_adjacent_turfs)
|
||||
add_to_active(S)
|
||||
else if(map_loading)
|
||||
if(queued_for_activation)
|
||||
queued_for_activation[T] = T
|
||||
return
|
||||
else
|
||||
T.requires_activation = TRUE
|
||||
/datum/controller/subsystem/air/proc/turf_process_time()
|
||||
|
||||
/datum/controller/subsystem/air/StartLoadingMap()
|
||||
LAZYINITLIST(queued_for_activation)
|
||||
map_loading = TRUE
|
||||
|
||||
/datum/controller/subsystem/air/StopLoadingMap()
|
||||
map_loading = FALSE
|
||||
for(var/T in queued_for_activation)
|
||||
add_to_active(T)
|
||||
queued_for_activation.Cut()
|
||||
|
||||
/datum/controller/subsystem/air/proc/setup_allturfs()
|
||||
var/list/turfs_to_init = block(locate(1, 1, 1), locate(world.maxx, world.maxy, world.maxz))
|
||||
@@ -369,7 +286,6 @@ SUBSYSTEM_DEF(air)
|
||||
|
||||
// Clear active turfs - faster than removing every single turf in the world
|
||||
// one-by-one, and Initalize_Atmos only ever adds `src` back in.
|
||||
clear_active_turfs()
|
||||
|
||||
for(var/thing in turfs_to_init)
|
||||
var/turf/T = thing
|
||||
@@ -377,64 +293,6 @@ SUBSYSTEM_DEF(air)
|
||||
continue
|
||||
T.Initalize_Atmos(times_fired)
|
||||
CHECK_TICK
|
||||
var/starting_ats = get_amt_active_turfs()
|
||||
if(starting_ats)
|
||||
sleep(world.tick_lag)
|
||||
var/timer = world.timeofday
|
||||
log_mapping("There are [starting_ats] active turfs at roundstart caused by a difference of the air between the adjacent turfs. You can see its coordinates using \"Mapping -> Show roundstart AT list\" verb (debug verbs required).")
|
||||
var/list/turfs_to_check = get_active_turfs()
|
||||
for(var/T in turfs_to_check)
|
||||
GLOB.active_turfs_startlist += T
|
||||
|
||||
//now lets clear out these active turfs
|
||||
do
|
||||
var/list/new_turfs_to_check = list()
|
||||
for(var/turf/open/T in turfs_to_check)
|
||||
new_turfs_to_check += T.resolve_active_graph()
|
||||
CHECK_TICK
|
||||
for(var/T in new_turfs_to_check)
|
||||
add_to_active_extools(T)
|
||||
turfs_to_check = new_turfs_to_check
|
||||
|
||||
while (turfs_to_check.len)
|
||||
var/ending_ats = get_amt_active_turfs()
|
||||
/*for(var/thing in excited_groups)
|
||||
var/datum/excited_group/EG = thing
|
||||
//EG.self_breakdown(space_is_all_consuming = 1)
|
||||
//EG.dismantle()
|
||||
CHECK_TICK*/
|
||||
|
||||
var/msg = "HEY! LISTEN! [DisplayTimeText(world.timeofday - timer)] were wasted processing [starting_ats] turf(s) (connected to [ending_ats] other turfs) with atmos differences at round start."
|
||||
to_chat(world, "<span class='boldannounce'>[msg]</span>")
|
||||
warning(msg)
|
||||
|
||||
/turf/open/proc/resolve_active_graph()
|
||||
. = list()
|
||||
/*
|
||||
var/datum/excited_group/EG = excited_group
|
||||
if (blocks_air || !air)
|
||||
return
|
||||
if (!EG)
|
||||
EG = new
|
||||
EG.add_turf(src)
|
||||
|
||||
for (var/turf/open/ET in atmos_adjacent_turfs)
|
||||
if ( ET.blocks_air || !ET.air)
|
||||
continue
|
||||
|
||||
var/ET_EG = ET.excited_group
|
||||
if (ET_EG)
|
||||
if (ET_EG != EG)
|
||||
EG.merge_groups(ET_EG)
|
||||
EG = excited_group //merge_groups() may decide to replace our current EG
|
||||
else
|
||||
EG.add_turf(ET)
|
||||
if (!ET.excited)
|
||||
ET.excited = 1
|
||||
. += ET*/
|
||||
|
||||
/turf/open/space/resolve_active_graph()
|
||||
return list()
|
||||
|
||||
/datum/controller/subsystem/air/proc/setup_atmos_machinery()
|
||||
for (var/obj/machinery/atmospherics/AM in atmos_machinery)
|
||||
@@ -481,4 +339,4 @@ SUBSYSTEM_DEF(air)
|
||||
#undef SSAIR_EXCITEDGROUPS
|
||||
#undef SSAIR_HIGHPRESSURE
|
||||
#undef SSAIR_HOTSPOTS
|
||||
#undef SSAIR_SUPERCONDUCTIVITY
|
||||
#undef SSAIR_TURF_CONDUCTION
|
||||
|
||||
@@ -254,7 +254,7 @@
|
||||
DA.update_name()
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/door/airlock/plasma/BlockSuperconductivity() //we don't stop the heat~
|
||||
/obj/machinery/door/airlock/plasma/BlockThermalConductivity() //we don't stop the heat~
|
||||
return 0
|
||||
|
||||
/obj/machinery/door/airlock/plasma/attackby(obj/item/C, mob/user, params)
|
||||
|
||||
@@ -379,7 +379,7 @@
|
||||
if(!glass && GLOB.cameranet)
|
||||
GLOB.cameranet.updateVisibility(src, 0)
|
||||
|
||||
/obj/machinery/door/BlockSuperconductivity() // All non-glass airlocks block heat, this is intended.
|
||||
/obj/machinery/door/BlockThermalConductivity() // All non-glass airlocks block heat, this is intended.
|
||||
if(opacity || heat_proof)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -210,8 +210,6 @@
|
||||
//Burn it based on transfered gas
|
||||
target.hotspot_expose((ptank.air_contents.return_temperature()*2) + 380,500)
|
||||
//location.hotspot_expose(1000,500,1)
|
||||
SSair.add_to_active(target, 0)
|
||||
|
||||
|
||||
/obj/item/flamethrower/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
@@ -81,8 +81,8 @@
|
||||
resintype = "wall"
|
||||
canSmoothWith = list(/obj/structure/alien/resin/wall, /obj/structure/alien/resin/membrane)
|
||||
|
||||
/obj/structure/alien/resin/wall/BlockSuperconductivity()
|
||||
return 1
|
||||
/obj/structure/alien/resin/wall/BlockThermalConductivity()
|
||||
return TRUE
|
||||
|
||||
/obj/structure/alien/resin/membrane
|
||||
name = "resin membrane"
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
alpha = 150
|
||||
resistance_flags = FIRE_PROOF
|
||||
|
||||
/obj/structure/holosign/barrier/firelock/BlockSuperconductivity()
|
||||
/obj/structure/holosign/barrier/firelock/BlockThermalConductivity()
|
||||
return TRUE
|
||||
|
||||
/obj/structure/holosign/barrier/firelock/Initialize()
|
||||
@@ -115,7 +115,7 @@
|
||||
CanAtmosPass = ATMOS_PASS_NO
|
||||
resistance_flags = FIRE_PROOF
|
||||
|
||||
/obj/structure/holosign/barrier/combifan/BlockSuperconductivity()
|
||||
/obj/structure/holosign/barrier/combifan/BlockThermalConductivity()
|
||||
return TRUE
|
||||
|
||||
/obj/structure/holosign/barrier/combifan/Initialize()
|
||||
|
||||
@@ -149,9 +149,9 @@
|
||||
pod_moving = 0
|
||||
if(!QDELETED(pod))
|
||||
var/datum/gas_mixture/floor_mixture = loc.return_air()
|
||||
floor_mixture.archive()
|
||||
pod.air_contents.archive()
|
||||
pod.air_contents.share(floor_mixture, 1) //mix the pod's gas mixture with the tile it's on
|
||||
var/tot_volume = pod.air_contents.return_volume() + floor_mixture.return_volume()
|
||||
pod.air_contents.merge(floor_mixture.remove_ratio(1))
|
||||
floor_mixture.merge(pod.air_contents.remove_ratio(floor_mixture.return_volume()/tot_volume))
|
||||
air_update_turf()
|
||||
|
||||
/obj/structure/transit_tube/station/init_tube_dirs()
|
||||
|
||||
@@ -15,9 +15,7 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
|
||||
|
||||
if(turf_type)
|
||||
var/turf/newT = ChangeTurf(turf_type, baseturf_type, flags)
|
||||
SSair.remove_from_active(newT)
|
||||
CALCULATE_ADJACENT_TURFS(newT)
|
||||
SSair.add_to_active(newT,1)
|
||||
|
||||
/turf/proc/copyTurf(turf/T)
|
||||
if(T.type != type)
|
||||
@@ -54,6 +52,14 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
|
||||
/turf/proc/TerraformTurf(path, new_baseturf, flags)
|
||||
return ChangeTurf(path, new_baseturf, flags)
|
||||
|
||||
/turf/proc/get_z_base_turf()
|
||||
. = SSmapping.level_trait(z, ZTRAIT_BASETURF) || /turf/open/space
|
||||
if (!ispath(.))
|
||||
. = text2path(.)
|
||||
if (!ispath(.))
|
||||
warning("Z-level [z] has invalid baseturf '[SSmapping.level_trait(z, ZTRAIT_BASETURF)]'")
|
||||
. = /turf/open/space
|
||||
|
||||
// Creates a new turf
|
||||
// new_baseturfs can be either a single type or list of types, formated the same as baseturfs. see turf.dm
|
||||
/turf/proc/ChangeTurf(path, list/new_baseturfs, flags)
|
||||
@@ -61,12 +67,7 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
|
||||
if(null)
|
||||
return
|
||||
if(/turf/baseturf_bottom)
|
||||
path = SSmapping.level_trait(z, ZTRAIT_BASETURF) || /turf/open/space
|
||||
if (!ispath(path))
|
||||
path = text2path(path)
|
||||
if (!ispath(path))
|
||||
warning("Z-level [z] has invalid baseturf '[SSmapping.level_trait(z, ZTRAIT_BASETURF)]'")
|
||||
path = /turf/open/space
|
||||
path = get_z_base_turf()
|
||||
if(/turf/open/space/basic)
|
||||
// basic doesn't initialize and this will cause issues
|
||||
// no warning though because this can happen naturaly as a result of it being built on top of
|
||||
@@ -142,7 +143,6 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
|
||||
|
||||
/turf/open/ChangeTurf(path, list/new_baseturfs, flags)
|
||||
if ((flags & CHANGETURF_INHERIT_AIR) && ispath(path, /turf/open))
|
||||
SSair.remove_from_active(src)
|
||||
var/datum/gas_mixture/stashed_air = new()
|
||||
stashed_air.copy_from(air)
|
||||
. = ..()
|
||||
@@ -153,7 +153,6 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
|
||||
var/turf/open/newTurf = .
|
||||
newTurf.air.copy_from(stashed_air)
|
||||
QDEL_NULL(stashed_air)
|
||||
SSair.add_to_active(newTurf)
|
||||
else
|
||||
if(ispath(path,/turf/closed))
|
||||
flags |= CHANGETURF_RECALC_ADJACENT
|
||||
@@ -317,7 +316,6 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
|
||||
total.merge(S.air)
|
||||
|
||||
air.copy_from(total.remove_ratio(1/turf_count))
|
||||
SSair.add_to_active(src)
|
||||
|
||||
/turf/proc/ReplaceWithLattice()
|
||||
ScrapeAway(flags = CHANGETURF_INHERIT_AIR)
|
||||
|
||||
@@ -209,18 +209,9 @@
|
||||
flash_color(L, flash_color = "#C80000", flash_time = 10)
|
||||
|
||||
/turf/open/Initalize_Atmos(times_fired)
|
||||
set_excited(FALSE)
|
||||
update_visuals()
|
||||
|
||||
current_cycle = times_fired
|
||||
ImmediateCalculateAdjacentTurfs()
|
||||
for(var/i in atmos_adjacent_turfs)
|
||||
var/turf/open/enemy_tile = i
|
||||
var/datum/gas_mixture/enemy_air = enemy_tile.return_air()
|
||||
if(!get_excited() && air.compare(enemy_air))
|
||||
//testing("Active turf found. Return value of compare(): [is_active]")
|
||||
set_excited(TRUE)
|
||||
SSair.add_to_active_extools(src)
|
||||
|
||||
/turf/open/proc/GetHeatCapacity()
|
||||
. = air.heat_capacity()
|
||||
|
||||
@@ -40,12 +40,7 @@
|
||||
|
||||
///Called when there is no real turf below this turf
|
||||
/turf/open/transparent/proc/show_bottom_level()
|
||||
var/turf/path = SSmapping.level_trait(z, ZTRAIT_BASETURF) || /turf/open/space
|
||||
if(!ispath(path))
|
||||
path = text2path(path)
|
||||
if(!ispath(path))
|
||||
warning("Z-level [z] has invalid baseturf '[SSmapping.level_trait(z, ZTRAIT_BASETURF)]'")
|
||||
path = /turf/open/space
|
||||
var/turf/path = get_z_base_turf()
|
||||
var/mutable_appearance/underlay_appearance = mutable_appearance(initial(path.icon), initial(path.icon_state), layer = TURF_LAYER, plane = PLANE_SPACE)
|
||||
underlays += underlay_appearance
|
||||
return TRUE
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
var/icon_regular_floor = "floor" //used to remember what icon the tile should have by default
|
||||
var/icon_plating = "plating"
|
||||
thermal_conductivity = 0.004
|
||||
thermal_conductivity = 0.04
|
||||
heat_capacity = 10000
|
||||
intact = 1
|
||||
var/broken = 0
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
name = "reinforced floor"
|
||||
desc = "Extremely sturdy."
|
||||
icon_state = "engine"
|
||||
thermal_conductivity = 0.0025
|
||||
thermal_conductivity = 0.025
|
||||
heat_capacity = INFINITY
|
||||
floor_tile = /obj/item/stack/rods
|
||||
footstep = FOOTSTEP_PLATING
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
icon = 'icons/turf/walls/plasma_wall.dmi'
|
||||
icon_state = "plasma"
|
||||
sheet_type = /obj/item/stack/sheet/mineral/plasma
|
||||
thermal_conductivity = 0.004
|
||||
thermal_conductivity = 0.04
|
||||
canSmoothWith = list(/turf/closed/wall/mineral/plasma, /obj/structure/falsewall/plasma)
|
||||
|
||||
/turf/closed/wall/mineral/plasma/attackby(obj/item/W, mob/user, params)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
intact = 0
|
||||
|
||||
temperature = TCMB
|
||||
thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
|
||||
thermal_conductivity = 0
|
||||
heat_capacity = 700000
|
||||
|
||||
var/destination_z
|
||||
@@ -39,9 +39,6 @@
|
||||
if(!IS_DYNAMIC_LIGHTING(src) && IS_DYNAMIC_LIGHTING(A))
|
||||
add_overlay(/obj/effect/fullbright)
|
||||
|
||||
if(requires_activation)
|
||||
SSair.add_to_active(src)
|
||||
|
||||
if (light_power && light_range)
|
||||
update_light()
|
||||
|
||||
@@ -286,12 +283,7 @@
|
||||
|
||||
///Called when there is no real turf below this turf
|
||||
/turf/open/space/transparent/proc/show_bottom_level()
|
||||
var/turf/path = SSmapping.level_trait(z, ZTRAIT_BASETURF) || /turf/open/space
|
||||
if(!ispath(path))
|
||||
path = text2path(path)
|
||||
if(!ispath(path))
|
||||
warning("Z-level [z] has invalid baseturf '[SSmapping.level_trait(z, ZTRAIT_BASETURF)]'")
|
||||
path = /turf/open/space
|
||||
var/turf/path = get_z_base_turf()
|
||||
var/mutable_appearance/underlay_appearance = mutable_appearance(initial(path.icon), initial(path.icon_state), layer = TURF_LAYER, plane = PLANE_SPACE)
|
||||
underlays += underlay_appearance
|
||||
return TRUE
|
||||
|
||||
@@ -68,7 +68,6 @@
|
||||
|
||||
if(requires_activation)
|
||||
CALCULATE_ADJACENT_TURFS(src)
|
||||
SSair.add_to_active(src)
|
||||
|
||||
if (light_power && light_range)
|
||||
update_light()
|
||||
@@ -90,8 +89,12 @@
|
||||
|
||||
ComponentInitialize()
|
||||
|
||||
__auxtools_update_turf_temp_info(isspaceturf(get_z_base_turf()))
|
||||
|
||||
return INITIALIZE_HINT_NORMAL
|
||||
|
||||
/turf/proc/__auxtools_update_turf_temp_info()
|
||||
|
||||
/turf/proc/Initalize_Atmos(times_fired)
|
||||
CALCULATE_ADJACENT_TURFS(src)
|
||||
|
||||
@@ -115,7 +118,6 @@
|
||||
for(var/I in B.vars)
|
||||
B.vars[I] = null
|
||||
return
|
||||
SSair.remove_from_active(src)
|
||||
visibilityChanged()
|
||||
QDEL_LIST(blueprint_data)
|
||||
flags_1 &= ~INITIALIZED_1
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
result++
|
||||
. -= result - 1
|
||||
|
||||
/obj/structure/blob/BlockSuperconductivity()
|
||||
/obj/structure/blob/BlockThermalConductivity()
|
||||
return atmosblock
|
||||
|
||||
/obj/structure/blob/CanPass(atom/movable/mover, turf/target)
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
return
|
||||
return TRUE
|
||||
|
||||
/obj/effect/clockwork/servant_blocker/BlockSuperconductivity()
|
||||
/obj/effect/clockwork/servant_blocker/BlockThermalConductivity()
|
||||
return TRUE
|
||||
|
||||
/obj/effect/clockwork/servant_blocker/singularity_act()
|
||||
|
||||
@@ -638,7 +638,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
GLOB.wall_runes -= src
|
||||
return ..()
|
||||
|
||||
/obj/effect/rune/wall/BlockSuperconductivity()
|
||||
/obj/effect/rune/wall/BlockThermalConductivity()
|
||||
return density
|
||||
|
||||
/obj/effect/rune/wall/invoke(var/list/invokers)
|
||||
|
||||
@@ -28,13 +28,8 @@
|
||||
return
|
||||
|
||||
if((exposed_temperature > PLASMA_MINIMUM_BURN_TEMPERATURE) && (tox > 0.5 || trit > 0.5))
|
||||
|
||||
active_hotspot = new /obj/effect/hotspot(src, exposed_volume*25, exposed_temperature)
|
||||
|
||||
active_hotspot.just_spawned = (current_cycle < SSair.times_fired)
|
||||
//remove just_spawned protection if no longer processing this cell
|
||||
SSair.add_to_active(src, 0)
|
||||
|
||||
//This is the icon for fire on turfs, also helps for nurturing small fires until they are full tile
|
||||
/obj/effect/hotspot
|
||||
anchored = TRUE
|
||||
@@ -48,7 +43,6 @@
|
||||
|
||||
var/volume = 125
|
||||
var/temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST
|
||||
var/just_spawned = TRUE
|
||||
var/bypassing = FALSE
|
||||
var/visual_update_tick = 0
|
||||
|
||||
@@ -70,7 +64,7 @@
|
||||
|
||||
location.active_hotspot = src
|
||||
|
||||
bypassing = !just_spawned && (volume > CELL_VOLUME*0.95)
|
||||
bypassing = volume > CELL_VOLUME*0.95
|
||||
|
||||
if(bypassing)
|
||||
volume = location.air.reaction_results["fire"]*FIRE_GROWTH_RATE
|
||||
@@ -150,10 +144,6 @@
|
||||
|
||||
#define INSUFFICIENT(path) (location.air.get_moles(path) < 0.5)
|
||||
/obj/effect/hotspot/process()
|
||||
if(just_spawned)
|
||||
just_spawned = FALSE
|
||||
return
|
||||
|
||||
var/turf/open/location = loc
|
||||
if(!istype(location))
|
||||
qdel(src)
|
||||
|
||||
@@ -19,28 +19,24 @@
|
||||
/turf/open/CanAtmosPass(turf/T, vertical = FALSE)
|
||||
var/dir = vertical? get_dir_multiz(src, T) : get_dir(src, T)
|
||||
var/opp = REVERSE_DIR(dir)
|
||||
var/R = FALSE
|
||||
. = TRUE
|
||||
if(vertical && !(zAirOut(dir, T) && T.zAirIn(dir, src)))
|
||||
R = TRUE
|
||||
. = FALSE
|
||||
if(blocks_air || T.blocks_air)
|
||||
R = TRUE
|
||||
. = FALSE
|
||||
if (T == src)
|
||||
return !R
|
||||
return .
|
||||
for(var/obj/O in contents+T.contents)
|
||||
var/turf/other = (O.loc == src ? T : src)
|
||||
if(!(vertical? (CANVERTICALATMOSPASS(O, other)) : (CANATMOSPASS(O, other))))
|
||||
R = TRUE
|
||||
if(O.BlockSuperconductivity()) //the direction and open/closed are already checked on CanAtmosPass() so there are no arguments
|
||||
atmos_supeconductivity |= dir
|
||||
T.atmos_supeconductivity |= opp
|
||||
return FALSE //no need to keep going, we got all we asked
|
||||
. = FALSE
|
||||
if(O.BlockThermalConductivity()) //the direction and open/closed are already checked on CanAtmosPass() so there are no arguments
|
||||
conductivity_blocked_directions |= dir
|
||||
T.conductivity_blocked_directions |= opp
|
||||
if(!.)
|
||||
return .
|
||||
|
||||
atmos_supeconductivity &= ~dir
|
||||
T.atmos_supeconductivity &= ~opp
|
||||
|
||||
return !R
|
||||
|
||||
/atom/movable/proc/BlockSuperconductivity() // objects that block air and don't let superconductivity act. Only firelocks atm.
|
||||
/atom/movable/proc/BlockThermalConductivity() // Objects that don't let heat through.
|
||||
return FALSE
|
||||
|
||||
/turf/proc/ImmediateCalculateAdjacentTurfs()
|
||||
@@ -56,20 +52,19 @@
|
||||
LAZYINITLIST(T.atmos_adjacent_turfs)
|
||||
atmos_adjacent_turfs[T] = direction
|
||||
T.atmos_adjacent_turfs[src] = opp_dir
|
||||
T.__update_extools_adjacent_turfs()
|
||||
T.__update_auxtools_turf_adjacency_info(isspaceturf(T.get_z_base_turf()))
|
||||
else
|
||||
if (atmos_adjacent_turfs)
|
||||
atmos_adjacent_turfs -= T
|
||||
if (T.atmos_adjacent_turfs)
|
||||
T.atmos_adjacent_turfs -= src
|
||||
T.__update_extools_adjacent_turfs()
|
||||
T.__update_auxtools_turf_adjacency_info(isspaceturf(T.get_z_base_turf()))
|
||||
UNSETEMPTY(T.atmos_adjacent_turfs)
|
||||
UNSETEMPTY(atmos_adjacent_turfs)
|
||||
src.atmos_adjacent_turfs = atmos_adjacent_turfs
|
||||
__update_extools_adjacent_turfs()
|
||||
|
||||
/turf/proc/__update_extools_adjacent_turfs()
|
||||
__update_auxtools_turf_adjacency_info(isspaceturf(get_z_base_turf()))
|
||||
|
||||
/turf/proc/__update_auxtools_turf_adjacency_info()
|
||||
|
||||
//returns a list of adjacent turfs that can share air with this one.
|
||||
//alldir includes adjacent diagonal tiles that can share
|
||||
@@ -115,7 +110,6 @@
|
||||
/turf/air_update_turf(command = 0)
|
||||
if(command)
|
||||
ImmediateCalculateAdjacentTurfs()
|
||||
SSair.add_to_active(src,command)
|
||||
|
||||
/atom/movable/proc/move_update_air(turf/T)
|
||||
if(isturf(T))
|
||||
@@ -136,5 +130,3 @@
|
||||
G.parse_gas_string(text)
|
||||
|
||||
air.merge(G)
|
||||
archive()
|
||||
SSair.add_to_active(src, 0)
|
||||
|
||||
@@ -1,18 +1,13 @@
|
||||
/turf
|
||||
//used for temperature calculations
|
||||
var/thermal_conductivity = 0.005
|
||||
//conductivity is divided by 10 when interacting with air for balance purposes
|
||||
var/thermal_conductivity = 0.05
|
||||
var/heat_capacity = 1
|
||||
var/temperature_archived
|
||||
|
||||
//list of open turfs adjacent to us
|
||||
var/list/atmos_adjacent_turfs
|
||||
//bitfield of dirs in which we are superconducitng
|
||||
var/atmos_supeconductivity = NONE
|
||||
var/is_openturf = FALSE // used by extools shizz.
|
||||
|
||||
//used to determine whether we should archive
|
||||
var/archived_cycle = 0
|
||||
var/current_cycle = 0
|
||||
//bitfield of dirs in which we thermal conductivity is blocked
|
||||
var/conductivity_blocked_directions = NONE
|
||||
|
||||
//used for mapping and for breathing while in walls (because that's a thing that needs to be accounted for...)
|
||||
//string parsed by /datum/gas/proc/copy_from_turf
|
||||
@@ -32,7 +27,6 @@
|
||||
var/planetary_atmos = FALSE //air will revert to initial_gas_mix over time
|
||||
|
||||
var/list/atmos_overlay_types //gas IDs of current active gas overlays
|
||||
is_openturf = TRUE
|
||||
|
||||
/turf/open/Initialize()
|
||||
if(!blocks_air)
|
||||
@@ -44,9 +38,6 @@
|
||||
/turf/open/Destroy()
|
||||
if(active_hotspot)
|
||||
QDEL_NULL(active_hotspot)
|
||||
// Adds the adjacent turfs to the current atmos processing
|
||||
for(var/T in atmos_adjacent_turfs)
|
||||
SSair.add_to_active(T)
|
||||
return ..()
|
||||
|
||||
/turf/proc/update_air_ref()
|
||||
@@ -88,14 +79,6 @@
|
||||
if(temperature > heat_capacity)
|
||||
to_be_destroyed = TRUE
|
||||
|
||||
/turf/proc/archive()
|
||||
temperature_archived = temperature
|
||||
|
||||
/turf/open/archive()
|
||||
air.archive()
|
||||
archived_cycle = SSair.times_fired
|
||||
temperature_archived = temperature
|
||||
|
||||
/turf/open/proc/eg_reset_cooldowns()
|
||||
/turf/open/proc/eg_garbage_collect()
|
||||
/turf/open/proc/get_excited()
|
||||
@@ -170,7 +153,6 @@
|
||||
}
|
||||
*/
|
||||
/turf/proc/process_cell(fire_count)
|
||||
SSair.remove_from_active(src)
|
||||
|
||||
/turf/open/proc/equalize_pressure_in_zone(cyclenum)
|
||||
/turf/open/proc/consider_firelocks(turf/T2)
|
||||
@@ -235,117 +217,3 @@
|
||||
if (move_prob > PROBABILITY_OFFSET && prob(move_prob) && (move_resist != INFINITY) && (!anchored && (max_force >= (move_resist * MOVE_FORCE_PUSH_RATIO))) || (anchored && (max_force >= (move_resist * MOVE_FORCE_FORCEPUSH_RATIO))))
|
||||
step(src, direction)
|
||||
|
||||
////////////////////////SUPERCONDUCTIVITY/////////////////////////////
|
||||
/turf/proc/conductivity_directions()
|
||||
if(archived_cycle < SSair.times_fired)
|
||||
archive()
|
||||
return NORTH|SOUTH|EAST|WEST
|
||||
|
||||
/turf/open/conductivity_directions()
|
||||
if(blocks_air)
|
||||
return ..()
|
||||
for(var/direction in GLOB.cardinals)
|
||||
var/turf/T = get_step(src, direction)
|
||||
if(!(T in atmos_adjacent_turfs) && !(atmos_supeconductivity & direction))
|
||||
. |= direction
|
||||
|
||||
/turf/proc/neighbor_conduct_with_src(turf/open/other)
|
||||
if(!other.blocks_air) //Open but neighbor is solid
|
||||
other.temperature_share_open_to_solid(src)
|
||||
else //Both tiles are solid
|
||||
other.share_temperature_mutual_solid(src, thermal_conductivity)
|
||||
temperature_expose(null, temperature, null)
|
||||
|
||||
/turf/open/neighbor_conduct_with_src(turf/other)
|
||||
if(blocks_air)
|
||||
..()
|
||||
return
|
||||
|
||||
if(!other.blocks_air) //Both tiles are open
|
||||
var/turf/open/T = other
|
||||
T.air.temperature_share(air, WINDOW_HEAT_TRANSFER_COEFFICIENT)
|
||||
else //Solid but neighbor is open
|
||||
temperature_share_open_to_solid(other)
|
||||
SSair.add_to_active(src, 0)
|
||||
|
||||
/turf/proc/super_conduct()
|
||||
var/conductivity_directions = conductivity_directions()
|
||||
archive()
|
||||
if(conductivity_directions)
|
||||
//Conduct with tiles around me
|
||||
for(var/direction in GLOB.cardinals)
|
||||
if(conductivity_directions & direction)
|
||||
var/turf/neighbor = get_step(src,direction)
|
||||
|
||||
if(!neighbor.thermal_conductivity)
|
||||
continue
|
||||
|
||||
if(neighbor.archived_cycle < SSair.times_fired)
|
||||
neighbor.archive()
|
||||
|
||||
neighbor.neighbor_conduct_with_src(src)
|
||||
|
||||
neighbor.consider_superconductivity()
|
||||
|
||||
radiate_to_spess()
|
||||
|
||||
finish_superconduction()
|
||||
|
||||
/turf/proc/finish_superconduction(temp = temperature)
|
||||
//Make sure still hot enough to continue conducting heat
|
||||
if(temp < MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION)
|
||||
SSair.active_super_conductivity -= src
|
||||
return FALSE
|
||||
|
||||
/turf/open/finish_superconduction()
|
||||
//Conduct with air on my tile if I have it
|
||||
if(!blocks_air)
|
||||
temperature = air.temperature_share(null, thermal_conductivity, temperature, heat_capacity)
|
||||
..((blocks_air ? temperature : air.return_temperature()))
|
||||
|
||||
/turf/proc/consider_superconductivity()
|
||||
if(!thermal_conductivity)
|
||||
return FALSE
|
||||
|
||||
SSair.active_super_conductivity[src] = TRUE
|
||||
|
||||
return TRUE
|
||||
|
||||
/turf/open/consider_superconductivity(starting)
|
||||
if(planetary_atmos)
|
||||
return FALSE
|
||||
if(air.return_temperature() < (starting?MINIMUM_TEMPERATURE_START_SUPERCONDUCTION:MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION))
|
||||
return FALSE
|
||||
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 FALSE
|
||||
return ..()
|
||||
|
||||
/turf/closed/consider_superconductivity(starting)
|
||||
if(temperature < (starting?MINIMUM_TEMPERATURE_START_SUPERCONDUCTION:MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/turf/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 - TCMB) //hardcoded space temperature
|
||||
if((heat_capacity > 0) && (abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER))
|
||||
|
||||
var/heat = thermal_conductivity*delta_temperature* \
|
||||
(heat_capacity*HEAT_CAPACITY_VACUUM/(heat_capacity+HEAT_CAPACITY_VACUUM))
|
||||
temperature -= heat/heat_capacity
|
||||
temperature = max(temperature,T0C) //otherwise we just sorta get stuck at super cold temps forever
|
||||
|
||||
/turf/open/proc/temperature_share_open_to_solid(turf/sharer)
|
||||
sharer.temperature = air.temperature_share(null, sharer.thermal_conductivity, sharer.temperature, sharer.heat_capacity)
|
||||
|
||||
/turf/proc/share_temperature_mutual_solid(turf/sharer, conduction_coefficient) //to be understood
|
||||
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
|
||||
temperature = max(temperature,T0C)
|
||||
sharer.temperature = max(sharer.temperature,T0C)
|
||||
|
||||
@@ -139,7 +139,6 @@ GLOBAL_LIST_INIT(duplicate_forbidden_vars_by_type, typecacheof_assoc_list(list(
|
||||
if(toupdate.len)
|
||||
for(var/turf/T1 in toupdate)
|
||||
CALCULATE_ADJACENT_TURFS(T1)
|
||||
SSair.add_to_active(T1,1)
|
||||
|
||||
|
||||
return copiedobjs
|
||||
|
||||
@@ -152,7 +152,6 @@
|
||||
locate(min(T.x + width + 1, world.maxx), min(T.y + height + 1, world.maxy), T.z))
|
||||
for(var/i in border)
|
||||
var/turf/turf_to_disable = i
|
||||
SSair.remove_from_active(turf_to_disable) //stop processing turfs along the border to prevent runtimes, we return it in initTemplateBounds()
|
||||
turf_to_disable.atmos_adjacent_turfs?.Cut()
|
||||
|
||||
if(annihilate == MAP_TEMPLATE_ANNIHILATE_PRELOAD)
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
if(!mother)
|
||||
return
|
||||
var/list/map = mother.map
|
||||
for(var/turf/T in map)
|
||||
SSair.remove_from_active(T)
|
||||
for(var/turf/open/T in map)
|
||||
if(T.air)
|
||||
if(T.initial_gas_mix)
|
||||
@@ -19,7 +17,6 @@
|
||||
T.temperature = T.air.return_temperature()
|
||||
else
|
||||
T.air.copy_from_turf(T)
|
||||
SSair.add_to_active(T)
|
||||
|
||||
/datum/mapGeneratorModule/bottomLayer/massdelete
|
||||
spawnableAtoms = list()
|
||||
|
||||
Reference in New Issue
Block a user