mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
refactor is_blocked_turf (#29324)
This commit is contained in:
@@ -115,7 +115,7 @@
|
||||
var/turf/target_turf = get_step(our_turf, direction)
|
||||
if(isnull(target_turf))
|
||||
continue
|
||||
if(is_blocked_turf(target_turf) || get_dist(target_turf, target) > get_dist(living_pawn, target))
|
||||
if(target_turf.is_blocked_turf() || get_dist(target_turf, target) > get_dist(living_pawn, target))
|
||||
continue
|
||||
possible_turfs += target_turf
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
var/turf/return_turf
|
||||
for(var/i in 1 to run_distance)
|
||||
var/turf/test_destination = get_ranged_target_turf_direct(source, target, range = i, offset = angle)
|
||||
if(is_blocked_turf(test_destination, excluded_objs = GLOB.airlocks + src))
|
||||
if(test_destination.is_blocked_turf(source_atom = source, ignore_atoms = GLOB.airlocks))
|
||||
break
|
||||
return_turf = test_destination
|
||||
return return_turf
|
||||
|
||||
Reference in New Issue
Block a user