mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
* Adds VR Snowdin and Syndicate Trainer * Replace var edit * I did forget to add a few * Adds one full outfit spawn * internals too * closet * Extends same Z level check to monitor and emping * restricted uplinks * camera bug fixes don't talk about the bees outfit changes More items outfit fix * Adds vr sleepers to runtime station * More mapping fixes * Adds telecomms to taunt your enemies * More restrictions * Some fixes * badabing * More fixes * emag related changes * forgot the ract * Additions * griff resistance mode * minor changes * Removes old centcom away map * Pushes you out of VR if you try to ghost * this is :b:roke * this shit is not :b:roke * as requested
61 lines
1.8 KiB
Plaintext
61 lines
1.8 KiB
Plaintext
/mob/living/carbon/human/virtual_reality
|
|
var/datum/mind/real_mind // where is my mind t. pixies
|
|
var/obj/machinery/vr_sleeper/vr_sleeper
|
|
var/datum/action/quit_vr/quit_action
|
|
|
|
/mob/living/carbon/human/virtual_reality/Initialize()
|
|
. = ..()
|
|
quit_action = new()
|
|
quit_action.Grant(src)
|
|
|
|
/mob/living/carbon/human/virtual_reality/death()
|
|
revert_to_reality()
|
|
..()
|
|
|
|
/mob/living/carbon/human/virtual_reality/Destroy()
|
|
revert_to_reality()
|
|
return ..()
|
|
|
|
/mob/living/carbon/human/virtual_reality/Life()
|
|
. = ..()
|
|
if(real_mind)
|
|
var/mob/living/real_me = real_mind.current
|
|
if (real_me && real_me.stat == CONSCIOUS)
|
|
return
|
|
revert_to_reality(FALSE)
|
|
|
|
/mob/living/carbon/human/virtual_reality/ghostize()
|
|
stack_trace("Ghostize was called on a virtual reality mob")
|
|
|
|
/mob/living/carbon/human/virtual_reality/ghost()
|
|
set category = "OOC"
|
|
set name = "Ghost"
|
|
set desc = "Relinquish your life and enter the land of the dead."
|
|
revert_to_reality(FALSE)
|
|
|
|
/mob/living/carbon/human/virtual_reality/proc/revert_to_reality(deathchecks = TRUE)
|
|
if(real_mind && mind)
|
|
real_mind.current.ckey = ckey
|
|
real_mind.current.stop_sound_channel(CHANNEL_HEARTBEAT)
|
|
if(deathchecks && vr_sleeper)
|
|
if(vr_sleeper.you_die_in_the_game_you_die_for_real)
|
|
to_chat(real_mind, "<span class='warning'>You feel everything fading away...</span>")
|
|
real_mind.current.death(0)
|
|
if(deathchecks && vr_sleeper)
|
|
vr_sleeper.vr_human = null
|
|
vr_sleeper = null
|
|
real_mind = null
|
|
|
|
/datum/action/quit_vr
|
|
name = "Quit Virtual Reality"
|
|
icon_icon = 'icons/mob/actions/actions_vr.dmi'
|
|
button_icon_state = "logout"
|
|
|
|
/datum/action/quit_vr/Trigger()
|
|
if(..())
|
|
if(istype(owner, /mob/living/carbon/human/virtual_reality))
|
|
var/mob/living/carbon/human/virtual_reality/VR = owner
|
|
VR.revert_to_reality(FALSE)
|
|
else
|
|
Remove(owner)
|