Allows drones and mice to go under doors when hidden (#19633)

* they go under

* how the fuck did I not push the flag itself

* farie review

* s34n review

* Revert "s34n review"

This reverts commit 572e689dd2.
This commit is contained in:
Contrabang
2022-11-15 19:56:29 +01:00
committed by GitHub
parent d95f641895
commit 6161109bea
7 changed files with 17 additions and 2 deletions
+1
View File
@@ -131,6 +131,7 @@
#define PASSMOB 16
#define LETPASSTHROW 32
#define PASSFENCE 64
#define PASSDOOR 128
//turf-only flags
#define NOJAUNT 1
+2
View File
@@ -739,6 +739,8 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays)
attack_ai(user)
/obj/machinery/door/airlock/CanPass(atom/movable/mover, turf/target, height=0)
if(istype(mover) && mover.checkpass(PASSDOOR) && !locked) // We really dont want mice/drones to get shocked on a door they're passing through
return TRUE
if(isElectrified() && density && isitem(mover))
var/obj/item/I = mover
if(I.flags & CONDUCT)
+5 -2
View File
@@ -144,8 +144,11 @@
bound_height = width * world.icon_size
/obj/machinery/door/CanPass(atom/movable/mover, turf/target, height=0)
if(istype(mover) && mover.checkpass(PASSGLASS))
return !opacity
if(istype(mover))
if(mover.checkpass(PASSDOOR) && !locked)
return TRUE
if(mover.checkpass(PASSGLASS))
return !opacity
return !density
/obj/machinery/door/CanAtmosPass()
@@ -29,9 +29,11 @@
if(layer != TURF_LAYER+0.2)
layer = TURF_LAYER+0.2
to_chat(src, text("<span class='notice'>You are now hiding.</span>"))
pass_flags |= PASSDOOR
else
layer = MOB_LAYER
to_chat(src, text("<span class='notice'>You have stopped hiding.</span>"))
pass_flags &= ~PASSDOOR
/mob/living/silicon/robot/drone/verb/light()
set name = "Light On/Off"
@@ -32,6 +32,7 @@
maxbodytemp = 323 //Above 50 Degrees Celcius
universal_speak = FALSE
can_hide = TRUE
pass_door_while_hidden = TRUE
holder_type = /obj/item/holder/mouse
can_collar = TRUE
gold_core_spawnable = FRIENDLY_SPAWN
@@ -9,6 +9,10 @@
if(layer != TURF_LAYER+0.2)
layer = TURF_LAYER+0.2
visible_message("<B>[src] scurries to the ground!</B>", "<span class=notice'>You are now hiding.</span>")
if(pass_door_while_hidden)
pass_flags |= PASSDOOR
else
layer = MOB_LAYER
visible_message("[src] slowly peeks up from the ground...", "<span class=notice'>You have stopped hiding.</span>")
if(pass_door_while_hidden)
pass_flags &= ~PASSDOOR
@@ -69,6 +69,8 @@
var/speed = 1 //LETS SEE IF I CAN SET SPEEDS FOR SIMPLE MOBS WITHOUT DESTROYING EVERYTHING. Higher speed is slower, negative speed is faster
var/can_hide = FALSE
/// Allows a mob to pass unbolted doors while hidden
var/pass_door_while_hidden = FALSE
var/obj/item/clothing/accessory/petcollar/pcollar = null
var/collar_type //if the mob has collar sprites, define them.