mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-11 10:02:24 +00:00
* refactor: Movement cross/uncross implementation.
* wrong var name
* fix unit tests dropping PDAs into nowhere
* Add documentation.
* remove unused constants
* say which procs are off limits
* fix simpleanimal z change runtime
* helps not to leave merge conflicts
* kill me
* fix typecast
* fix projectile/table collision
* treadmills don't cause MC to crash anymore
* connect_loc is appropriate here
* fix windoors and teleporters
* fix bonfires and clarify docs
* fix proximity sensors
Tested with sensors in crates, sensors in modsuits
Tested new proximity component with firing projectiles at singularity
Tested new proximity component with portable flashes
Tested new proximity component with facehuggers
* lint
* fix: polarized access helper false positives
* Revert "fix: polarized access helper false positives"
This reverts commit 9814f98cf6.
* hopefully the right change for mindflayer steam
* Changes following cameras
* fix glass table collision
* appears to fix doorspam
* fix ore bags not picking up ore
* fix signatures of /Exited
* remove debug log
* remove duplicate signal registrar
* fix emptying bags into locations
* I don't trust these nested Move calls
* use connect_loc for upgraded resonator fields
* use moveToNullspace
* fix spiderweb crossing
* fix pass checking for windows from a tile off
* fix bluespace closet/transparency issues
* fix mechs not interacting with doors and probably other things
* fix debug
* fix telepete
* add some docs
* stop trying to shoehorn prox monitor into cards
* I should make sure things build
* kill override signal warning
* undef signal
* not many prox monitors survive going off like this
* small fixes to storage
* make moving wormholes respect signals
* use correct signals for pulse demon
* fix pulse heart too
* fix smoke signals
* may have fucked singulo projectile swerve
* fix singulo projectile arcing
* remove duplicate define
* just look at it
* hopefully last cleanups of incorrect signal usage
* fix squeaking
* may god have mercy on my soul
* Apply suggestions from code review
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: warriorstar-orion <orion@snowfrost.garden>
* lewc review
* Apply suggestions from code review
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: warriorstar-orion <orion@snowfrost.garden>
* burza review
* fix bad args for grenade assemblies
* Update code/__DEFINES/is_helpers.dm
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: warriorstar-orion <orion@snowfrost.garden>
---------
Signed-off-by: warriorstar-orion <orion@snowfrost.garden>
Co-authored-by: DGamerL <daan.lyklema@gmail.com>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
148 lines
3.8 KiB
Plaintext
148 lines
3.8 KiB
Plaintext
/turf/proc/CanAtmosPass(direction, consider_objects = TRUE)
|
|
if(blocks_air)
|
|
return FALSE
|
|
|
|
if(!consider_objects)
|
|
return TRUE
|
|
|
|
for(var/obj/O in contents)
|
|
if(istype(O, /obj/item))
|
|
// Items can't block atmos.
|
|
continue
|
|
|
|
if(!O.CanAtmosPass(direction))
|
|
return FALSE
|
|
|
|
return TRUE
|
|
|
|
/atom/movable/proc/CanAtmosPass()
|
|
return TRUE
|
|
|
|
/atom/proc/CanPass(atom/movable/mover, border_dir)
|
|
return !density
|
|
|
|
/turf/CanPass(atom/movable/mover, border_dir)
|
|
var/turf/target = get_step(src, border_dir)
|
|
if(!target)
|
|
return FALSE
|
|
|
|
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, border_dir))
|
|
return 0
|
|
for(var/obj/obstacle in target)
|
|
if(!obstacle.CanPass(mover, src))
|
|
return 0
|
|
|
|
return 1
|
|
|
|
/atom/movable/proc/get_superconductivity(direction)
|
|
return OPEN_HEAT_TRANSFER_COEFFICIENT
|
|
|
|
/atom/movable/proc/recalculate_atmos_connectivity()
|
|
for(var/turf/T in locs) // used by double wide doors and other nonexistant multitile structures
|
|
T.recalculate_atmos_connectivity()
|
|
|
|
/atom/movable/proc/move_update_air(turf/T)
|
|
if(isturf(T))
|
|
T.recalculate_atmos_connectivity()
|
|
recalculate_atmos_connectivity()
|
|
|
|
//returns a list of adjacent turfs that can share air with this one.
|
|
//alldir includes adjacent diagonal tiles that can share
|
|
// air with both of the related adjacent cardinal tiles
|
|
/turf/proc/GetAtmosAdjacentTurfs(alldir = 0)
|
|
if(!issimulatedturf(src))
|
|
return list()
|
|
|
|
var/adjacent_turfs = list()
|
|
for(var/turf/T in RANGE_EDGE_TURFS(1, src))
|
|
var/direction = get_dir(src, T)
|
|
if(!CanAtmosPass(direction))
|
|
continue
|
|
if(!T.CanAtmosPass(turn(direction, 180)))
|
|
continue
|
|
adjacent_turfs += T
|
|
|
|
if(!alldir)
|
|
return adjacent_turfs
|
|
|
|
for(var/turf/T in RANGE_TURFS(1, src))
|
|
var/direction = get_dir(src, T)
|
|
if(IS_DIR_CARDINAL(direction))
|
|
continue
|
|
// check_direction is the first way we move, from src
|
|
for(var/check_direction in GLOB.cardinal)
|
|
if(!(check_direction & direction))
|
|
// Wrong way.
|
|
continue
|
|
|
|
var/turf/intermediate = get_step(src, check_direction)
|
|
if(!(intermediate in adjacent_turfs))
|
|
continue
|
|
|
|
// other_direction is the second way we move, from intermediate.
|
|
var/other_direction = direction & ~check_direction
|
|
|
|
// We already know we can reach intermediate, so now we just need to check the second step.
|
|
if(!intermediate.CanAtmosPass(other_direction))
|
|
continue
|
|
if(!T.CanAtmosPass(turn(other_direction, 180)))
|
|
continue
|
|
|
|
adjacent_turfs += T
|
|
break
|
|
|
|
return adjacent_turfs
|
|
|
|
/atom/movable/proc/atmos_spawn_air(flag, 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(flag, amount)
|
|
|
|
/turf/simulated/proc/atmos_spawn_air(flag, amount)
|
|
if(!flag || !amount || blocks_air)
|
|
return
|
|
|
|
var/datum/gas_mixture/G = new()
|
|
|
|
if(flag & LINDA_SPAWN_20C)
|
|
G.set_temperature(T20C)
|
|
|
|
if(flag & LINDA_SPAWN_HEAT)
|
|
G.set_temperature(G.temperature() + 1000)
|
|
|
|
if(flag & LINDA_SPAWN_COLD)
|
|
G.set_temperature(TCMB)
|
|
|
|
if(flag & LINDA_SPAWN_TOXINS)
|
|
G.set_toxins(G.toxins() + amount)
|
|
|
|
if(flag & LINDA_SPAWN_OXYGEN)
|
|
G.set_oxygen(G.oxygen() + amount)
|
|
|
|
if(flag & LINDA_SPAWN_CO2)
|
|
G.set_carbon_dioxide(G.carbon_dioxide() + amount)
|
|
|
|
if(flag & LINDA_SPAWN_NITROGEN)
|
|
G.set_nitrogen(G.nitrogen() + amount)
|
|
|
|
if(flag & LINDA_SPAWN_N2O)
|
|
G.set_sleeping_agent(G.sleeping_agent() + amount)
|
|
|
|
if(flag & LINDA_SPAWN_AGENT_B)
|
|
G.set_agent_b(G.agent_b() + amount)
|
|
|
|
if(flag & LINDA_SPAWN_AIR)
|
|
G.set_oxygen(G.oxygen() + MOLES_O2STANDARD * amount)
|
|
G.set_nitrogen(G.nitrogen() + MOLES_N2STANDARD * amount)
|
|
|
|
blind_release_air(G)
|