[DNM][DNM][WIP] Projectile backend code port and update
Ports#54924, #65061, #59804 from /tg. adds auxiliary code from /tg to make code work.
This commit is contained in:
@@ -18,6 +18,7 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
|
||||
pressure_resistance = 4*ONE_ATMOSPHERE
|
||||
anchored = TRUE //initially is 0 for tile smoothing
|
||||
max_integrity = 25
|
||||
pass_flags_self = PASSGLASS
|
||||
var/ini_dir = null
|
||||
var/state = WINDOW_OUT_OF_FRAME
|
||||
var/reinf = FALSE
|
||||
@@ -90,13 +91,13 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
|
||||
. = ..()
|
||||
if(direct)
|
||||
setDir(direct)
|
||||
|
||||
|
||||
if(extra_reinforced && anchored)
|
||||
state = PRWINDOW_SECURE
|
||||
|
||||
else if(reinf && anchored)
|
||||
state = WINDOW_SCREWED_TO_FRAME
|
||||
|
||||
|
||||
|
||||
if(mapload && electrochromatic_id && electrochromatic_id[1] == "!")
|
||||
electrochromatic_id = SSmapping.get_obfuscated_id(electrochromatic_id)
|
||||
@@ -159,13 +160,15 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
|
||||
else
|
||||
..(FULLTILE_WINDOW_DIR)
|
||||
|
||||
/obj/structure/window/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && (mover.pass_flags & PASSGLASS))
|
||||
return 1
|
||||
/obj/structure/window/CanAllowThrough(atom/movable/mover, turf/target)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(dir == FULLTILE_WINDOW_DIR)
|
||||
return 0 //full tile window, you can't move into it!
|
||||
if(get_dir(loc, target) == dir)
|
||||
return !density
|
||||
var/attempted_dir = get_dir(loc, target)
|
||||
if(attempted_dir == dir)
|
||||
return
|
||||
if(istype(mover, /obj/structure/window))
|
||||
var/obj/structure/window/W = mover
|
||||
if(!valid_window_location(loc, W.ini_dir))
|
||||
@@ -176,7 +179,8 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
|
||||
return FALSE
|
||||
else if(istype(mover, /obj/machinery/door/window) && !valid_window_location(loc, mover.dir))
|
||||
return FALSE
|
||||
return 1
|
||||
else if(attempted_dir != dir)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/window/CheckExit(atom/movable/O, turf/target)
|
||||
if(istype(O) && (O.pass_flags & PASSGLASS))
|
||||
|
||||
Reference in New Issue
Block a user