mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-19 03:49:10 +01:00
Makes so that vr chairs don't work without power (#9725)
This commit is contained in:
@@ -11,6 +11,10 @@
|
||||
if(portable_type)
|
||||
name = "portable [name]"
|
||||
|
||||
/obj/structure/bed/chair/remote/Destroy()
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
return ..()
|
||||
|
||||
/obj/structure/bed/chair/remote/examine(mob/user)
|
||||
..()
|
||||
if(portable_type)
|
||||
@@ -32,12 +36,25 @@
|
||||
|
||||
/obj/structure/bed/chair/remote/user_buckle_mob(mob/user)
|
||||
..()
|
||||
var/area/A = get_area(src)
|
||||
if(!A.powered(EQUIP))
|
||||
to_chat(user, SPAN_WARNING("\The [src] is not powered."))
|
||||
return FALSE
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.old_mob)
|
||||
to_chat(H, SPAN_WARNING("The chair rejects you! You cannot recursively control bodies."))
|
||||
return
|
||||
add_overlay(image('icons/obj/furniture.dmi', src, "vr_helmet", MOB_LAYER + 1))
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
|
||||
|
||||
/obj/structure/bed/chair/remote/process()
|
||||
..()
|
||||
if(buckled_mob)
|
||||
var/area/A = get_area(src)
|
||||
if(!A.powered(EQUIP))
|
||||
user_unbuckle_mob(buckled_mob)
|
||||
|
||||
// Return to our body in the unfortunate event that we get unbuckled while plugged in
|
||||
/obj/structure/bed/chair/remote/user_unbuckle_mob(mob/user)
|
||||
@@ -46,4 +63,5 @@
|
||||
if(istype(M) && M.vr_mob)
|
||||
M.vr_mob.body_return()
|
||||
cut_overlays()
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
..()
|
||||
Reference in New Issue
Block a user