Files
Bubberstation/code/game/objects/items/implants/implant_stealth.dm
Xander3359 df65971499 Bumping into a door in a stealth implant opens the door (if you have access) (#82224)
## About The Pull Request
Bumping into a door in a stealth implant opens the door (if you have
access)
## Why It's Good For The Game

![image](https://github.com/tgstation/tgstation/assets/66163761/d00bf8b6-5a60-4c64-8035-27c400b1960d)
Reduces jank by allowing stealth boxes to open doors.
## Changelog
🆑
qol: You can now open airlocks (That you have access to) while inside a
stealth implant box
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2024-03-30 01:01:19 +01:00

50 lines
1.3 KiB
Plaintext

/obj/item/implant/stealth
name = "S3 implant"
desc = "Allows you to be hidden in plain sight."
actions_types = list(/datum/action/item_action/agent_box)
/obj/item/implanter/stealth
name = "implanter (stealth)"
imp_type = /obj/item/implant/stealth
//Box Object
/obj/structure/closet/cardboard/agent
name = "inconspicious box"
desc = "It's so normal that you didn't notice it before."
icon_state = "agentbox"
max_integrity = 1 // "This dumb box shouldn't take more than one hit to make it vanish."
move_speed_multiplier = 0.5
enable_door_overlay = FALSE
/obj/structure/closet/cardboard/agent/Initialize(mapload)
. = ..()
go_invisible()
/obj/structure/closet/cardboard/agent/proc/go_invisible()
animate(src, alpha = 0, time = 20)
/obj/structure/closet/cardboard/agent/after_open(mob/living/user)
. = ..()
qdel(src)
/obj/structure/closet/cardboard/agent/process()
alpha = max(0, alpha - 50)
/obj/structure/closet/cardboard/agent/proc/reveal()
alpha = 255
addtimer(CALLBACK(src, PROC_REF(go_invisible)), 10, TIMER_OVERRIDE|TIMER_UNIQUE)
/obj/structure/closet/cardboard/agent/Bump(atom/A)
. = ..()
if(istype(A, /obj/machinery/door))
for(var/mob/mob_in_box in contents)
A.Bumped(mob_in_box)
if(isliving(A))
reveal()
/obj/structure/closet/cardboard/agent/Bumped(atom/movable/A)
. = ..()
if(isliving(A))
reveal()