[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:
@@ -110,10 +110,10 @@
|
||||
if(HAS_TRAIT(user, TRAIT_SKITTISH))
|
||||
. += "<span class='notice'>If you bump into [p_them()] while running, you will jump inside.</span>"
|
||||
|
||||
/obj/structure/closet/CanPass(atom/movable/mover, turf/target)
|
||||
/obj/structure/closet/CanAllowThrough(atom/movable/mover, turf/target)
|
||||
. = ..()
|
||||
if(wall_mounted)
|
||||
return TRUE
|
||||
return !density
|
||||
|
||||
/obj/structure/closet/proc/can_open(mob/living/user, force = FALSE)
|
||||
if(force)
|
||||
|
||||
@@ -26,15 +26,15 @@
|
||||
// AddElement(/datum/element/climbable, climb_time = crate_climb_time, climb_stun = 0)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/closet/crate/CanPass(atom/movable/mover, turf/target)
|
||||
/obj/structure/closet/crate/CanAllowThrough(atom/movable/mover, turf/target)
|
||||
. = ..()
|
||||
if(!istype(mover, /obj/structure/closet))
|
||||
var/obj/structure/closet/crate/locatedcrate = locate(/obj/structure/closet/crate) in get_turf(mover)
|
||||
if(locatedcrate) //you can walk on it like tables, if you're not in an open crate trying to move to a closed crate
|
||||
if(opened) //if we're open, allow entering regardless of located crate openness
|
||||
return 1
|
||||
return TRUE
|
||||
if(!locatedcrate.opened) //otherwise, if the located crate is closed, allow entering
|
||||
return 1
|
||||
return !density
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/crate/update_icon_state()
|
||||
icon_state = "[initial(icon_state)][opened ? "open" : ""]"
|
||||
|
||||
Reference in New Issue
Block a user