mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-03 14:03:25 +00:00
remove duplicate turf/CanPass
converted istype->ismovable CanPass crash_with is null-aware
This commit is contained in:
@@ -30,11 +30,6 @@
|
||||
else
|
||||
CRASH("Invalid can_atmos_pass = [can_atmos_pass] on [src] ([type])")
|
||||
|
||||
/turf/CanPass(atom/movable/mover, turf/target)
|
||||
if(!target) return FALSE
|
||||
|
||||
if(istype(mover)) // turf/Enter(...) will perform more advanced checks
|
||||
return !density
|
||||
|
||||
/turf/CanZASPass(turf/T, is_zone)
|
||||
if(T.blocks_air || src.blocks_air)
|
||||
|
||||
@@ -161,16 +161,16 @@
|
||||
sleep(2)
|
||||
O.update_transform()
|
||||
|
||||
/turf/CanPass(atom/movable/mover, turf/target)
|
||||
if(!target)
|
||||
|
||||
/turf/CanPass(atom/movable/movable, turf/target)
|
||||
if (!target)
|
||||
return FALSE
|
||||
|
||||
if(istype(mover)) // turf/Enter(...) will perform more advanced checks
|
||||
if (ismovable(movable)) // turf/Enter carries out complex tests
|
||||
return !density
|
||||
|
||||
crash_with("Non movable passed to turf CanPass : [mover]")
|
||||
crash_with("turf/CanPass invalid movable: [movable ? "[movable]" : "(null)"]")
|
||||
return FALSE
|
||||
|
||||
|
||||
//There's a lot of QDELETED() calls here if someone can figure out how to optimize this but not runtime when something gets deleted by a Bump/CanPass/Cross call, lemme know or go ahead and fix this mess - kevinz000
|
||||
/turf/Enter(atom/movable/mover, atom/oldloc)
|
||||
if(movement_disabled && usr.ckey != movement_disabled_exception)
|
||||
|
||||
Reference in New Issue
Block a user