mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 04:57:12 +01:00
PS -> SMC Ports: LINDA, Spacedrift, Throwing
This commit ports LINDA, spacedrifting, and throwing to the SMC.
This commit is contained in:
@@ -34,9 +34,9 @@
|
||||
active_hotspot.temperature = exposed_temperature
|
||||
active_hotspot.volume = exposed_volume
|
||||
|
||||
active_hotspot.just_spawned = (current_cycle < air_master.current_cycle)
|
||||
active_hotspot.just_spawned = (current_cycle < SSair.times_fired)
|
||||
//remove just_spawned protection if no longer processing this cell
|
||||
air_master.add_to_active(src, 0)
|
||||
SSair.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
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
/obj/effect/hotspot/New()
|
||||
..()
|
||||
air_master.hotspots += src
|
||||
SSair.hotspots += src
|
||||
perform_exposure()
|
||||
dir = pick(cardinal)
|
||||
air_update_turf()
|
||||
@@ -154,7 +154,7 @@
|
||||
|
||||
/obj/effect/hotspot/Destroy()
|
||||
set_light(0)
|
||||
air_master.hotspots -= src
|
||||
SSair.hotspots -= src
|
||||
DestroyTurf()
|
||||
if(istype(loc, /turf/simulated))
|
||||
var/turf/simulated/T = loc
|
||||
|
||||
@@ -126,8 +126,8 @@ turf/CanPass(atom/movable/mover, turf/target, height=1.5)
|
||||
/turf/proc/air_update_turf(var/command = 0)
|
||||
if(command)
|
||||
CalculateAdjacentTurfs()
|
||||
if(air_master)
|
||||
air_master.add_to_active(src,command)
|
||||
if(SSair)
|
||||
SSair.add_to_active(src,command)
|
||||
|
||||
/atom/movable/proc/move_update_air(var/turf/T)
|
||||
if(istype(T,/turf))
|
||||
@@ -184,4 +184,4 @@ var/const/SPAWN_AIR = 256
|
||||
G.nitrogen += MOLES_N2STANDARD * amount
|
||||
|
||||
air.merge(G)
|
||||
air_master.add_to_active(src, 0)
|
||||
SSair.add_to_active(src, 0)
|
||||
|
||||
@@ -141,9 +141,9 @@
|
||||
|
||||
/turf/simulated/proc/process_cell()
|
||||
|
||||
if(archived_cycle < air_master.current_cycle) //archive self if not already done
|
||||
if(archived_cycle < SSair.times_fired) //archive self if not already done
|
||||
archive()
|
||||
current_cycle = air_master.current_cycle
|
||||
current_cycle = SSair.times_fired
|
||||
|
||||
var/remove = 1 //set by non simulated turfs who are sharing with this turf
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
share_air(enemy_simulated) //share
|
||||
else
|
||||
if(!air.compare(enemy_simulated.air)) //compare if
|
||||
air_master.add_to_active(enemy_simulated) //excite enemy
|
||||
SSair.add_to_active(enemy_simulated) //excite enemy
|
||||
if(excited_group)
|
||||
excited_group.add_turf(enemy_simulated) //add enemy to group
|
||||
else
|
||||
@@ -227,14 +227,14 @@
|
||||
update_visuals()
|
||||
|
||||
if(!excited_group && remove == 1)
|
||||
air_master.remove_from_active(src)
|
||||
SSair.remove_from_active(src)
|
||||
|
||||
|
||||
/turf/simulated/proc/archive()
|
||||
if(air) //For open space like floors
|
||||
air.archive()
|
||||
temperature_archived = temperature
|
||||
archived_cycle = air_master.current_cycle
|
||||
archived_cycle = SSair.times_fired
|
||||
|
||||
/turf/simulated/proc/update_visuals()
|
||||
if(icy && !icyoverlay)
|
||||
@@ -288,7 +288,7 @@
|
||||
last_share_check()
|
||||
|
||||
/turf/proc/consider_pressure_difference(var/turf/simulated/T, var/difference)
|
||||
air_master.high_pressure_delta |= src
|
||||
SSair.high_pressure_delta |= src
|
||||
if(difference > pressure_difference)
|
||||
pressure_direction = get_dir(src, T)
|
||||
pressure_difference = difference
|
||||
@@ -309,24 +309,24 @@
|
||||
/atom/movable/var/last_forced_movement = 0
|
||||
|
||||
/atom/movable/proc/experience_pressure_difference(pressure_difference, direction)
|
||||
if(last_forced_movement >= air_master.current_cycle)
|
||||
if(last_forced_movement >= SSair.times_fired)
|
||||
return 0
|
||||
else if(!anchored && !pulledby)
|
||||
if(pressure_difference >= throw_pressure_limit)
|
||||
var/general_direction = get_edge_target_turf(src, direction)
|
||||
if(last_forced_movement + 10 < air_master.current_cycle && is_valid_tochat_target(src)) //the first check prevents spamming throw to_chat
|
||||
if(last_forced_movement + 10 < SSair.times_fired && is_valid_tochat_target(src)) //the first check prevents spamming throw to_chat
|
||||
to_chat(src, "<span class='userdanger'>The pressure sends you flying!</span>")
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
H.Weaken(min(pressure_difference / 50, 2))
|
||||
spawn()
|
||||
throw_at(general_direction, pressure_difference / 10, pressure_difference / 200, null, 0, 0, null)
|
||||
last_forced_movement = air_master.current_cycle
|
||||
last_forced_movement = SSair.times_fired
|
||||
return 1
|
||||
else if(pressure_difference > pressure_resistance)
|
||||
spawn()
|
||||
step(src, direction)
|
||||
last_forced_movement = air_master.current_cycle
|
||||
last_forced_movement = SSair.times_fired
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -337,8 +337,8 @@
|
||||
var/breakdown_cooldown = 0
|
||||
|
||||
/datum/excited_group/New()
|
||||
if(air_master)
|
||||
air_master.excited_groups += src
|
||||
if(SSair)
|
||||
SSair.excited_groups += src
|
||||
|
||||
/datum/excited_group/proc/add_turf(var/turf/simulated/T)
|
||||
turf_list += T
|
||||
@@ -348,13 +348,13 @@
|
||||
|
||||
/datum/excited_group/proc/merge_groups(var/datum/excited_group/E)
|
||||
if(turf_list.len > E.turf_list.len)
|
||||
air_master.excited_groups -= E
|
||||
SSair.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
|
||||
SSair.excited_groups -= src
|
||||
for(var/turf/simulated/T in turf_list)
|
||||
T.excited_group = E
|
||||
E.turf_list += T
|
||||
@@ -400,14 +400,14 @@
|
||||
T.excited = 0
|
||||
T.recently_active = 0
|
||||
T.excited_group = null
|
||||
air_master.active_turfs -= T
|
||||
SSair.active_turfs -= T
|
||||
garbage_collect()
|
||||
|
||||
/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
|
||||
SSair.excited_groups -= src
|
||||
|
||||
|
||||
|
||||
@@ -424,7 +424,7 @@ turf/simulated/proc/super_conduct()
|
||||
//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)
|
||||
if(archived_cycle < SSair.times_fired)
|
||||
archive()
|
||||
else
|
||||
//Does particate in air exchange so only consider directions not considered during process_cell()
|
||||
@@ -444,7 +444,7 @@ turf/simulated/proc/super_conduct()
|
||||
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)
|
||||
if(T.archived_cycle < SSair.times_fired)
|
||||
T.archive()
|
||||
|
||||
if(T.air)
|
||||
@@ -452,7 +452,7 @@ turf/simulated/proc/super_conduct()
|
||||
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)
|
||||
SSair.add_to_active(T, 0)
|
||||
else
|
||||
if(air) //Open but neighbor is solid
|
||||
air.temperature_turf_share(T, T.thermal_conductivity)
|
||||
@@ -476,12 +476,12 @@ turf/simulated/proc/super_conduct()
|
||||
|
||||
//Make sure still hot enough to continue conducting heat
|
||||
if(air.temperature < MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION)
|
||||
air_master.active_super_conductivity -= src
|
||||
SSair.active_super_conductivity -= src
|
||||
return 0
|
||||
|
||||
else
|
||||
if(temperature < MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION)
|
||||
air_master.active_super_conductivity -= src
|
||||
SSair.active_super_conductivity -= src
|
||||
return 0
|
||||
|
||||
turf/simulated/proc/consider_superconductivity(starting)
|
||||
@@ -497,7 +497,7 @@ turf/simulated/proc/consider_superconductivity(starting)
|
||||
if(temperature < (starting?MINIMUM_TEMPERATURE_START_SUPERCONDUCTION:MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION))
|
||||
return 0
|
||||
|
||||
air_master.active_super_conductivity |= src
|
||||
SSair.active_super_conductivity |= src
|
||||
return 1
|
||||
|
||||
turf/simulated/proc/radiate_to_spess() //Radiate excess tile heat to space
|
||||
@@ -508,3 +508,24 @@ turf/simulated/proc/radiate_to_spess() //Radiate excess tile heat to space
|
||||
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
|
||||
|
||||
/turf/proc/Initialize_Atmos(times_fired)
|
||||
CalculateAdjacentTurfs()
|
||||
|
||||
/turf/simulated/Initialize_Atmos(times_fired)
|
||||
..()
|
||||
update_visuals()
|
||||
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(!air.compare(enemy_simulated.air))
|
||||
excited = 1
|
||||
SSair.active_turfs |= src
|
||||
break
|
||||
else
|
||||
if(!air.check_turf_total(enemy_tile))
|
||||
excited = 1
|
||||
SSair.active_turfs |= src
|
||||
Reference in New Issue
Block a user