mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Migrating Code to use Proper Byond Move() Code (#8667)
* Initial Commit All CanPass replaced with cross, all CheckExit replaced with uncross * Commit #2 Cross() argment turf/target now has a standard value of src.loc, the basis for this is the fact that Cross() should technically only be called with a default value by Move() code when moving to a new turf thus everything on it the target turf should be the src.loc * Commit #3 All move code has now been unhacked, all of it is functional except for border objects which still retain none of their original functionality * Commit #2 Cross() argment turf/target now has a standard value of src.loc, the basis for this is the fact that Cross() should technically only be called with a default value by Move() code when moving to a new turf thus everything on it the target turf should be the src.loc * Commit #2 Cross() argment turf/target now has a standard value of src.loc, the basis for this is the fact that Cross() should technically only be called with a default value by Move() code when moving to a new turf thus everything on it the target turf should be the src.loc (reverted from commit fdee8c8b687a4d1f305bdc5f5e1a59ebeacb4702) * Fuck me * Okay Redo * Hello, I am finished
This commit is contained in:
@@ -40,11 +40,5 @@
|
||||
invisibility = 101
|
||||
density = 0
|
||||
|
||||
/obj/effect/energy_field/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
||||
//Purpose: Determines if the object (or airflow) can pass this atom.
|
||||
//Called by: Movement, airflow.
|
||||
//Inputs: The moving atom (optional), target turf, "height" and air group
|
||||
//Outputs: Boolean if can pass.
|
||||
|
||||
//return (!density || !height || air_group)
|
||||
/obj/effect/energy_field/Cross(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
||||
return !density
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
while(get_turf(src) != target_turf && num_turfs > 0)
|
||||
if(!check_los()) //Something is looking at us now
|
||||
break
|
||||
if(!next_turf.CanPass(src, next_turf)) //We can't pass through our planned path
|
||||
if(!next_turf.Cross(src, next_turf)) //We can't pass through our planned path
|
||||
break
|
||||
for(var/obj/structure/window/W in next_turf)
|
||||
W.Destroy(brokenup = 1)
|
||||
@@ -147,7 +147,7 @@
|
||||
for(var/obj/machinery/door/D in next_turf)
|
||||
D.open()
|
||||
sleep(5)
|
||||
if(!next_turf.CanPass(src, next_turf)) //Once we cleared everything we could, check one last time if we can pass
|
||||
if(!next_turf.Cross(src, next_turf)) //Once we cleared everything we could, check one last time if we can pass
|
||||
break
|
||||
forceMove(next_turf)
|
||||
dir = get_dir(src, target)
|
||||
@@ -176,7 +176,7 @@
|
||||
while(get_turf(src) != target_turf && num_turfs > 0)
|
||||
if(!check_los()) //Something is looking at us now
|
||||
break
|
||||
if(!next_turf.CanPass(src, next_turf)) //We can't pass through our planned path
|
||||
if(!next_turf.Cross(src, next_turf)) //We can't pass through our planned path
|
||||
break
|
||||
for(var/obj/structure/window/W in next_turf)
|
||||
W.Destroy(brokenup = 1)
|
||||
@@ -198,7 +198,7 @@
|
||||
for(var/obj/machinery/door/D in next_turf)
|
||||
D.open()
|
||||
sleep(5)
|
||||
if(!next_turf.CanPass(src, next_turf)) //Once we cleared everything we could, check one last time if we can pass
|
||||
if(!next_turf.Cross(src, next_turf)) //Once we cleared everything we could, check one last time if we can pass
|
||||
break
|
||||
forceMove(next_turf)
|
||||
dir = get_dir(src, target_turf)
|
||||
@@ -280,7 +280,7 @@
|
||||
/mob/living/simple_animal/sculpture/Topic(href, href_list)
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/sculpture/Bump(atom/movable/AM as mob, yes)
|
||||
/mob/living/simple_animal/sculpture/Bump(atom/movable/AM as mob)
|
||||
if(!check_los())
|
||||
snap_neck(AM)
|
||||
..()
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
return
|
||||
M:loc = T
|
||||
|
||||
/obj/item/tape/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
||||
/obj/item/tape/Cross(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
||||
if(!density) return 1
|
||||
if(air_group || (height==0)) return 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user