mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
Merge pull request #14495 from FlattestGuitar/door-speed-toggle
Add door speed changes to remotes
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#define WAND_OPEN "Open Door"
|
||||
#define WAND_BOLT "Toggle Bolts"
|
||||
#define WAND_EMERGENCY "Toggle Emergency Access"
|
||||
#define WAND_SPEED "Change Closing Speed"
|
||||
|
||||
/obj/item/door_remote
|
||||
icon_state = "gangtool-white"
|
||||
@@ -21,7 +22,7 @@
|
||||
for(var/region in region_access)
|
||||
ID.access += get_region_accesses(region)
|
||||
ID.access += additional_access
|
||||
ID.access = uniquelist(ID.access) //remove duplicates
|
||||
ID.access = uniquelist(ID.access)
|
||||
|
||||
/obj/item/door_remote/Destroy()
|
||||
QDEL_NULL(ID)
|
||||
@@ -34,8 +35,11 @@
|
||||
if(WAND_BOLT)
|
||||
mode = WAND_EMERGENCY
|
||||
if(WAND_EMERGENCY)
|
||||
mode = WAND_SPEED
|
||||
if(WAND_SPEED)
|
||||
mode = WAND_OPEN
|
||||
to_chat(user, "Now in mode: [mode].")
|
||||
|
||||
to_chat(user, "<span class='notice'>Now in mode: [mode].</span>")
|
||||
|
||||
/obj/item/door_remote/afterattack(obj/machinery/door/airlock/D, mob/user)
|
||||
if(!istype(D))
|
||||
@@ -64,10 +68,13 @@
|
||||
D.lock()
|
||||
if(WAND_EMERGENCY)
|
||||
if(D.emergency)
|
||||
D.emergency = 0
|
||||
D.emergency = FALSE
|
||||
else
|
||||
D.emergency = 1
|
||||
D.emergency = TRUE
|
||||
D.update_icon()
|
||||
if(WAND_SPEED)
|
||||
D.normalspeed = !D.normalspeed
|
||||
to_chat(user, "<span class='notice'>[D] is now in [D.normalspeed ? "normal" : "fast"] mode.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='danger'>[src] does not have access to this door.</span>")
|
||||
|
||||
@@ -144,3 +151,4 @@
|
||||
#undef WAND_OPEN
|
||||
#undef WAND_BOLT
|
||||
#undef WAND_EMERGENCY
|
||||
#undef WAND_SPEED
|
||||
|
||||
Reference in New Issue
Block a user