mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-09 16:12:17 +00:00
Remove atom/Uncross override
This commit is contained in:
@@ -236,11 +236,6 @@
|
||||
#define COMSIG_MOVABLE_CROSSED "movable_crossed"
|
||||
///when we cross over something (calling Crossed() on that atom)
|
||||
#define COMSIG_CROSSED_MOVABLE "crossed_movable"
|
||||
///from base of atom/movable/Uncross(): (/atom/movable)
|
||||
#define COMSIG_MOVABLE_UNCROSS "movable_uncross"
|
||||
#define COMPONENT_MOVABLE_BLOCK_UNCROSS (1<<0)
|
||||
///from base of atom/movable/Uncrossed(): (/atom/movable)
|
||||
#define COMSIG_MOVABLE_UNCROSSED "movable_uncrossed"
|
||||
///from base of atom/movable/Bump(): (/atom)
|
||||
#define COMSIG_MOVABLE_BUMP "movable_bump"
|
||||
///from base of atom/movable/throw_impact(): (/atom/hit_atom, /datum/thrownthing/throwingdatum)
|
||||
|
||||
@@ -140,9 +140,6 @@
|
||||
return flags & INSERT_CONTAINER
|
||||
*/
|
||||
|
||||
/atom/proc/CheckExit()
|
||||
return 1
|
||||
|
||||
// Used to be for the PROXMOVE flag, but that was terrible, so instead it's just here as a stub for
|
||||
// all the atoms that still have the proc, but get events other ways.
|
||||
/atom/proc/HasProximity(turf/T, atom/movable/AM, old_loc)
|
||||
|
||||
@@ -260,11 +260,6 @@
|
||||
/atom/movable/Crossed(atom/movable/AM, oldloc)
|
||||
return
|
||||
|
||||
/atom/movable/Uncross(atom/movable/AM, atom/newloc)
|
||||
. = ..()
|
||||
if(isturf(newloc) && !CheckExit(AM, newloc))
|
||||
return FALSE
|
||||
|
||||
/atom/movable/Bump(atom/A)
|
||||
if(!A)
|
||||
CRASH("Bump was called with no argument.")
|
||||
|
||||
@@ -86,7 +86,14 @@
|
||||
/obj/machinery/door/window/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return TRUE
|
||||
if(get_dir(mover, loc) == turn(dir, 180)) //Make sure looking at appropriate border
|
||||
if(get_dir(mover, target) == reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
return !density
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/door/window/Uncross(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return TRUE
|
||||
if(get_dir(mover, target) == dir) // From here to elsewhere, can't move in our dir
|
||||
return !density
|
||||
return TRUE
|
||||
|
||||
@@ -97,14 +104,6 @@
|
||||
return !density // Air can flow if open (density == FALSE).
|
||||
return TRUE // Windoors don't block if not facing the right way.
|
||||
|
||||
/obj/machinery/door/window/CheckExit(atom/movable/mover as mob|obj, turf/target as turf)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return 1
|
||||
if(get_dir(loc, target) == dir)
|
||||
return !density
|
||||
else
|
||||
return 1
|
||||
|
||||
/obj/machinery/door/window/open()
|
||||
if (operating == 1 || !density) //doors can still open when emag-disabled
|
||||
return 0
|
||||
|
||||
@@ -9,18 +9,20 @@
|
||||
layer = WINDOW_LAYER
|
||||
anchored = TRUE
|
||||
flags = ON_BORDER
|
||||
/obj/structure/fitness/boxing_ropes/CanPass(atom/movable/mover, turf/target) //sets it so that players can enter turf from all directions except the main direction.
|
||||
|
||||
/obj/structure/fitness/boxing_ropes/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return TRUE
|
||||
if(get_dir(mover, target) == turn(dir, 180))
|
||||
if(get_dir(mover, target) == reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
return !density
|
||||
return TRUE
|
||||
|
||||
/obj/structure/fitness/boxing_ropes/Uncross(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return TRUE
|
||||
if(get_dir(mover, target) == dir) // From here to elsewhere, can't move in our dir
|
||||
return !density
|
||||
return TRUE
|
||||
/obj/structure/fitness/boxing_ropes/CheckExit(atom/movable/O as mob|obj, target as turf) // Sets it so that players can't leave the truf from the set direction.
|
||||
if(istype(O) && O.checkpass(PASSTABLE))
|
||||
return 1
|
||||
if(get_dir(O.loc, target) == dir)
|
||||
return 0
|
||||
return 1
|
||||
/obj/structure/fitness/boxing_ropes/do_climb(var/mob/living/user) //Sets it so that players can climb *over* the turf and will enter the the turf **this** turf is facing.
|
||||
if(!can_climb(user))
|
||||
return
|
||||
@@ -73,12 +75,6 @@
|
||||
if(get_dir(mover, target) == turn(dir, 180))
|
||||
return !density
|
||||
return TRUE
|
||||
/obj/structure/fitness/boxing_ropes_bottom/CheckExit(atom/movable/O as mob|obj, target as turf)
|
||||
if(istype(O) && O.checkpass(PASSTABLE))
|
||||
return 1
|
||||
if(get_dir(O.loc, target) == dir)
|
||||
return 0
|
||||
return 1
|
||||
/obj/structure/fitness/boxing_ropes_bottom/do_climb(var/mob/living/user)
|
||||
if(!can_climb(user))
|
||||
return
|
||||
@@ -132,12 +128,6 @@
|
||||
if(get_dir(mover, target) == turn(dir, 180))
|
||||
return !density
|
||||
return TRUE
|
||||
/obj/structure/fitness/boxing_turnbuckle/CheckExit(atom/movable/O as mob|obj, target as turf)
|
||||
if(istype(O) && O.checkpass(PASSTABLE))
|
||||
return 1
|
||||
if(get_dir(O.loc, target) == dir)
|
||||
return 0
|
||||
return 1
|
||||
/obj/structure/fitness/boxing_turnbuckle/do_climb(var/mob/living/user)
|
||||
if(!can_climb(user))
|
||||
return
|
||||
|
||||
@@ -39,16 +39,16 @@
|
||||
/obj/structure/gravemarker/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return TRUE
|
||||
if(get_dir(loc, target) & dir)
|
||||
if(get_dir(mover, target) == reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
return !density
|
||||
return TRUE
|
||||
|
||||
/obj/structure/gravemarker/CheckExit(atom/movable/O as mob|obj, target as turf)
|
||||
if(istype(O) && O.checkpass(PASSTABLE))
|
||||
return 1
|
||||
if(get_dir(O.loc, target) == dir)
|
||||
return 0
|
||||
return 1
|
||||
/obj/structure/gravemarker/Uncross(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return TRUE
|
||||
if(get_dir(mover, target) == dir) // From here to elsewhere, can't move in our dir
|
||||
return !density
|
||||
return TRUE
|
||||
|
||||
/obj/structure/gravemarker/attackby(obj/item/weapon/W, mob/user as mob)
|
||||
if(W.is_screwdriver())
|
||||
|
||||
@@ -39,16 +39,16 @@
|
||||
/obj/structure/ledge/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return TRUE
|
||||
if(solidledge && get_dir(mover, target) == turn(dir, 180))
|
||||
if(solidledge && get_dir(mover, target) == reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
return !density
|
||||
return TRUE
|
||||
|
||||
/obj/structure/ledge/CheckExit(atom/movable/O as mob|obj, target as turf)
|
||||
if(istype(O) && O.checkpass(PASSTABLE))
|
||||
return 1
|
||||
if(solidledge && get_dir(O.loc, target) == dir)
|
||||
return 0
|
||||
return 1
|
||||
/obj/structure/ledge/Uncross(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return TRUE
|
||||
if(solidledge && get_dir(mover, target) == dir) // From here to elsewhere, can't move in our dir
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/ledge/do_climb(var/mob/living/user)
|
||||
if(!can_climb(user))
|
||||
|
||||
@@ -44,7 +44,14 @@
|
||||
/obj/structure/railing/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return TRUE
|
||||
if(get_dir(mover, target) == turn(dir, 180))
|
||||
if(get_dir(mover, target) == reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
return !density
|
||||
return TRUE
|
||||
|
||||
/obj/structure/railing/Uncross(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return TRUE
|
||||
if(get_dir(mover, target) == dir) // From here to elsewhere, can't move in our dir
|
||||
return !density
|
||||
return TRUE
|
||||
|
||||
@@ -193,13 +200,6 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/railing/CheckExit(atom/movable/O as mob|obj, target as turf)
|
||||
if(istype(O) && O.checkpass(PASSTABLE))
|
||||
return 1
|
||||
if(get_dir(O.loc, target) == dir)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/structure/railing/attackby(obj/item/W as obj, mob/user as mob)
|
||||
// Dismantle
|
||||
if(W.is_wrench() && !anchored)
|
||||
|
||||
@@ -57,17 +57,17 @@
|
||||
/obj/structure/windoor_assembly/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return TRUE
|
||||
if(get_dir(loc, target) == dir) //Make sure looking at appropriate border
|
||||
if(get_dir(mover, target) == reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
return !density
|
||||
return TRUE
|
||||
|
||||
/obj/structure/windoor_assembly/CheckExit(atom/movable/mover as mob|obj, turf/target as turf)
|
||||
/obj/structure/windoor_assembly/Uncross(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return 1
|
||||
if(get_dir(loc, target) == dir)
|
||||
return TRUE
|
||||
if(get_dir(mover, target) == dir) // From here to elsewhere, can't move in our dir
|
||||
return !density
|
||||
else
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/structure/windoor_assembly/proc/rename_door(mob/living/user)
|
||||
var/t = sanitizeSafe(input(user, "Enter the name for the windoor.", src.name, src.created_name), MAX_NAME_LEN)
|
||||
|
||||
@@ -138,24 +138,24 @@
|
||||
return TRUE
|
||||
if(is_fulltile())
|
||||
return FALSE //full tile window, you can't move into it!
|
||||
if((get_dir(loc, target) & dir) || (get_dir(mover, target) == turn(dir, 180)))
|
||||
if(get_dir(mover, target) == reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
return !density
|
||||
else
|
||||
return TRUE
|
||||
|
||||
/obj/structure/window/Uncross(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return TRUE
|
||||
if(get_dir(mover, target) == dir) // From here to elsewhere, can't move in our dir
|
||||
return !density
|
||||
else
|
||||
return TRUE
|
||||
|
||||
/obj/structure/window/CanZASPass(turf/T, is_zone)
|
||||
if(is_fulltile() || get_dir(T, loc) == turn(dir, 180)) // Make sure we're handling the border correctly.
|
||||
return !anchored // If it's anchored, it'll block air.
|
||||
return TRUE // Don't stop airflow from the other sides.
|
||||
|
||||
/obj/structure/window/CheckExit(atom/movable/O as mob|obj, target as turf)
|
||||
if(istype(O) && O.checkpass(PASSGLASS))
|
||||
return 1
|
||||
if(get_dir(O.loc, target) == dir)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/structure/window/hitby(AM as mob|obj)
|
||||
..()
|
||||
visible_message("<span class='danger'>[src] was hit by [AM].</span>")
|
||||
|
||||
@@ -82,16 +82,10 @@
|
||||
if(!watching_mob && isliving(AM) && AM.loc == loc)
|
||||
startWatching(AM)
|
||||
|
||||
// In order to actually get Bumped() we need to block movement. We're (visually) on a wall, so people
|
||||
// couldn't really walk into us anyway. But in reality we are on the turf in front of the wall, so bumping
|
||||
// against where we seem is actually trying to *exit* our real loc
|
||||
/obj/machinery/station_map/CheckExit(atom/movable/mover as mob|obj, turf/target as turf)
|
||||
// log_debug("[src] (dir=[dir]) CheckExit([mover], [target]) get_dir() = [get_dir(target, loc)]")
|
||||
if(get_dir(target, loc) == dir) // Opposite of "normal" since we are visually in the next turf over
|
||||
/obj/machinery/station_map/Uncross(atom/movable/mover, turf/target)
|
||||
if(get_dir(mover, target) == reverse_dir[dir])
|
||||
return FALSE
|
||||
else
|
||||
return TRUE
|
||||
|
||||
return TRUE
|
||||
/obj/machinery/station_map/proc/startWatching(var/mob/user)
|
||||
// Okay, does this belong on a screen thing or what?
|
||||
// One argument is that this is an "in game" object becuase its in the world.
|
||||
|
||||
@@ -105,13 +105,6 @@
|
||||
to_chat(src, "<span class='warning'>Gravity stops you from moving upward.</span>")
|
||||
return 0
|
||||
|
||||
//VOREStation Addition Start
|
||||
for(var/atom/A in start)
|
||||
if(!A.CheckExit(src, destination))
|
||||
to_chat(src, "<span class='warning'>\The [A] blocks you.</span>")
|
||||
return 0
|
||||
//VOREStation Addition End
|
||||
|
||||
for(var/atom/A in destination)
|
||||
if(!A.CanPass(src, start, 1.5, 0))
|
||||
to_chat(src, "<span class='warning'>\The [A] blocks you.</span>")
|
||||
|
||||
@@ -1,8 +1,21 @@
|
||||
/obj/structure/table/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover,/obj/item/projectile))
|
||||
return (check_cover(mover,target))
|
||||
<<<<<<< HEAD
|
||||
if (flipped == 1)
|
||||
if (get_dir(loc, target) == dir)
|
||||
||||||| parent of 068e743690... Merge pull request #11290 from VOREStation/Arokha/crossfox
|
||||
if (flipped)
|
||||
var/move_dir = get_dir(mover, target)
|
||||
// Moving from back to front, gotta climb
|
||||
if(move_dir == dir && target != loc)
|
||||
return !density
|
||||
// Moving from front to back, gotta climb
|
||||
if(move_dir == reverse_dir[dir])
|
||||
=======
|
||||
if (flipped)
|
||||
if(get_dir(mover, target) == reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
>>>>>>> 068e743690... Merge pull request #11290 from VOREStation/Arokha/crossfox
|
||||
return !density
|
||||
else
|
||||
return TRUE
|
||||
@@ -15,6 +28,31 @@
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
<<<<<<< HEAD
|
||||
||||||| parent of 068e743690... Merge pull request #11290 from VOREStation/Arokha/crossfox
|
||||
/obj/structure/table/climb_to(mob/living/mover)
|
||||
if(flipped && mover.loc == loc)
|
||||
var/turf/T = get_step(src, dir)
|
||||
if(T.Enter(mover))
|
||||
return T
|
||||
|
||||
return ..()
|
||||
|
||||
=======
|
||||
/obj/structure/table/climb_to(mob/living/mover)
|
||||
if(flipped && mover.loc == loc)
|
||||
var/turf/T = get_step(src, dir)
|
||||
if(T.Enter(mover))
|
||||
return T
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/structure/table/Uncross(atom/movable/mover, turf/target)
|
||||
if(flipped && (get_dir(mover, target) == dir)) // From here to elsewhere, can't move in our dir
|
||||
return !density
|
||||
return TRUE
|
||||
|
||||
>>>>>>> 068e743690... Merge pull request #11290 from VOREStation/Arokha/crossfox
|
||||
//checks if projectile 'P' from turf 'from' can hit whatever is behind the table. Returns 1 if it can, 0 if bullet stops.
|
||||
/obj/structure/table/proc/check_cover(obj/item/projectile/P, turf/from)
|
||||
var/turf/cover
|
||||
@@ -48,17 +86,6 @@
|
||||
return 1
|
||||
return 1
|
||||
|
||||
/obj/structure/table/CheckExit(atom/movable/O as mob|obj, target as turf)
|
||||
if(istype(O) && O.checkpass(PASSTABLE))
|
||||
return 1
|
||||
if (flipped==1)
|
||||
if (get_dir(loc, target) == dir)
|
||||
return !density
|
||||
else
|
||||
return 1
|
||||
return 1
|
||||
|
||||
|
||||
/obj/structure/table/MouseDrop_T(obj/O as obj, mob/user as mob)
|
||||
|
||||
if ((!( istype(O, /obj/item/weapon) ) || user.get_active_hand() != O))
|
||||
|
||||
@@ -140,15 +140,21 @@
|
||||
/obj/effect/ceiling
|
||||
invisibility = 101 // nope cant see this
|
||||
anchored = 1
|
||||
can_atmos_pass = ATMOS_PASS_PROC
|
||||
|
||||
/obj/effect/ceiling/CheckExit(atom/movable/O as mob|obj, turf/target as turf)
|
||||
if(target && target.z > src.z)
|
||||
return FALSE // Block exit from our turf to above
|
||||
/obj/effect/ceiling/CanZASPass(turf/T, is_zone)
|
||||
if(T == GetAbove(src))
|
||||
return FALSE // Keep your air up there, buddy
|
||||
return TRUE
|
||||
|
||||
/obj/effect/ceiling/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(mover && mover.z > src.z)
|
||||
return FALSE // Block entry from above to our turf
|
||||
/obj/effect/ceiling/CanPass(atom/movable/mover, turf/target)
|
||||
if(target == GetAbove(src))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/effect/ceiling/Uncross(atom/movable/mover, turf/target)
|
||||
if(target == GetAbove(src))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user