mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 23:23:28 +01:00
Make directional windows and windoors solid (#24484)
* Refactor away the useless checks of moving_diagonally. * Single-directional windows and windoors now collide properly. * Update code/game/objects/structures/window.dm Co-authored-by: GDN <96800819+GDNgit@users.noreply.github.com> * Allow exiting fulltile windows to north and east again. --------- Co-authored-by: GDN <96800819+GDNgit@users.noreply.github.com>
This commit is contained in:
@@ -110,7 +110,7 @@
|
||||
return 1
|
||||
if(dir == FULLTILE_WINDOW_DIR)
|
||||
return 0 //full tile window, you can't move into it!
|
||||
if(get_dir(loc, target) == dir)
|
||||
if(get_dir(loc, target) & dir)
|
||||
return !density
|
||||
if(istype(mover, /obj/structure/window))
|
||||
var/obj/structure/window/W = mover
|
||||
@@ -126,15 +126,17 @@
|
||||
|
||||
/obj/structure/window/CheckExit(atom/movable/O, target)
|
||||
if(istype(O) && O.checkpass(PASSGLASS))
|
||||
return 1
|
||||
if(get_dir(O.loc, target) == dir)
|
||||
return 0
|
||||
return 1
|
||||
return TRUE
|
||||
if(dir == FULLTILE_WINDOW_DIR)
|
||||
return TRUE
|
||||
if(get_dir(O.loc, target) & dir)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/window/CanPathfindPass(obj/item/card/id/ID, to_dir, atom/movable/caller, no_id = FALSE)
|
||||
if(!density)
|
||||
return 1
|
||||
if((dir == FULLTILE_WINDOW_DIR) || (dir == to_dir) || fulltile)
|
||||
if((dir == FULLTILE_WINDOW_DIR) || (dir & to_dir) || fulltile)
|
||||
return 0
|
||||
|
||||
return 1
|
||||
@@ -414,7 +416,7 @@
|
||||
/obj/structure/window/CanAtmosPass(turf/T)
|
||||
if(!anchored || !density)
|
||||
return TRUE
|
||||
return !(FULLTILE_WINDOW_DIR == dir || dir == get_dir(loc, T))
|
||||
return !(FULLTILE_WINDOW_DIR == dir || (dir & get_dir(loc, T)))
|
||||
|
||||
//This proc is used to update the icons of nearby windows.
|
||||
/obj/structure/window/proc/update_nearby_icons()
|
||||
|
||||
Reference in New Issue
Block a user