Adds virtual reality human bodies (#12403)

This commit is contained in:
Alberyk
2021-08-31 17:54:35 +02:00
committed by GitHub
parent 3817b4d4d7
commit 9a12064cb6
8 changed files with 65 additions and 1 deletions
+2
View File
@@ -1172,6 +1172,7 @@
#include "code\game\objects\structures\stool_bed_chair_nest\stools.dm"
#include "code\game\objects\structures\stool_bed_chair_nest\wheelchair.dm"
#include "code\game\objects\structures\vr\_remote_chair.dm"
#include "code\game\objects\structures\vr\human_chair.dm"
#include "code\game\objects\structures\vr\mech_chair.dm"
#include "code\game\objects\structures\vr\robot_chair.dm"
#include "code\game\turfs\simulated.dm"
@@ -2129,6 +2130,7 @@
#include "code\modules\mob\living\carbon\human\stripping.dm"
#include "code\modules\mob\living\carbon\human\unarmed_attack.dm"
#include "code\modules\mob\living\carbon\human\update_icons.dm"
#include "code\modules\mob\living\carbon\human\virtual_reality_mob.dm"
#include "code\modules\mob\living\carbon\human\whisper.dm"
#include "code\modules\mob\living\carbon\human\species\species.dm"
#include "code\modules\mob\living\carbon\human\species\species_attack.dm"
+31 -1
View File
@@ -103,6 +103,20 @@
to_chat(src, SPAN_DANGER("Interface error, you cannot exit the system at this time."))
to_chat(src, SPAN_WARNING("Ahelp to get back into your body, a bug has occurred."))
/mob/living/carbon/human/virtual_reality/body_return()
set name = "Return to Body"
set category = "IC"
if(old_mob)
ckey_transfer(old_mob)
languages = list(all_languages[LANGUAGE_TCB])
to_chat(old_mob, SPAN_NOTICE("System exited safely, we hope you enjoyed your stay."))
old_mob = null
qdel(src)
else
to_chat(src, SPAN_DANGER("Interface error, you cannot exit the system at this time."))
to_chat(src, SPAN_WARNING("Ahelp to get back into your body, a bug has occurred."))
/mob/living/proc/vr_mob_exit_languages()
languages = list(all_languages[LANGUAGE_TCB])
@@ -241,4 +255,20 @@
if(!choice)
return
mind_transfer(user, bound[choice])
mind_transfer(user, bound[choice])
/datum/controller/subsystem/virtualreality/proc/create_virtual_reality_avatar(var/mob/living/carbon/human/user)
if(virtual_reality_spawn.len)
var/mob/living/carbon/human/virtual_reality/H = new /mob/living/carbon/human/virtual_reality(pick(virtual_reality_spawn))
H.set_species(user.species.name, 1)
H.gender = user.gender
H.dna = user.dna.Clone()
H.real_name = user.real_name
H.UpdateAppearance()
H.preEquipOutfit(/datum/outfit/admin/virtual_reality, FALSE)
H.equipOutfit(/datum/outfit/admin/virtual_reality, FALSE)
mind_transfer(user, H)
to_chat(H, SPAN_NOTICE("You are now in control of a virtual reality body. Dying will return you to your original body."))
+11
View File
@@ -91,3 +91,14 @@
/datum/outfit/admin/random/visitor/get_id_rank()
return "Visitor"
/datum/outfit/admin/virtual_reality
name = "Virtual Reality Outfit"
uniform = /obj/item/clothing/under/chameleon
suit = /obj/item/clothing/suit/chameleon
back = /obj/item/storage/backpack/chameleon
gloves = /obj/item/clothing/gloves/chameleon
shoes = /obj/item/clothing/shoes/chameleon
head = /obj/item/clothing/head/chameleon
mask = /obj/item/clothing/mask/chameleon
glasses = /obj/item/clothing/glasses/chameleon
+4
View File
@@ -87,6 +87,10 @@
dream_entries += loc
delete_me = 1
return
if("virtual_reality_spawn")
virtual_reality_spawn += loc
delete_me = 1
return
landmarks_list += src
return 1
@@ -0,0 +1,9 @@
/obj/structure/bed/chair/remote/human
name = "virtual reality centre"
desc = "A comfortable chair with full audio-visual transposition centres. This one gives you access to a virtual reality body."
/obj/structure/bed/chair/remote/human/user_buckle(mob/user)
..()
if(ishuman(user))
var/mob/living/carbon/human/H = user
SSvirtualreality.create_virtual_reality_avatar(H)
+1
View File
@@ -54,6 +54,7 @@ var/list/latejoin_cryo_command = list()
var/list/latejoin_cyborg = list()
var/list/latejoin_merchant = list()
var/list/kickoffsloc = list()
var/list/virtual_reality_spawn = list()
var/list/prisonwarp = list() // Prisoners go to these
var/list/holdingfacility = list() // Captured people go here
+2
View File
@@ -164,6 +164,7 @@
desc = "They're comfy black shoes, with clever cloaking technology built in. It seems to have a small dial on the back of each shoe."
silent = 1
origin_tech = list(TECH_ILLEGAL = 3)
species_restricted = list("exclude",BODYTYPE_GOLEM,BODYTYPE_VAURCA_BREEDER,BODYTYPE_VAURCA_WARFORM)
var/global/list/clothing_choices
/obj/item/clothing/shoes/chameleon/Initialize()
@@ -245,6 +246,7 @@
item_state = "black"
desc = "It looks like a pair of gloves, but it seems to have a small dial inside."
origin_tech = list(TECH_ILLEGAL = 3)
species_restricted = list("exclude",BODYTYPE_GOLEM,BODYTYPE_VAURCA_BREEDER,BODYTYPE_VAURCA_WARFORM)
var/global/list/clothing_choices
/obj/item/clothing/gloves/chameleon/Initialize()
@@ -0,0 +1,5 @@
//this human mob is to be used in virtual reality, typically in their own environment where they won't interact with the rest of the world
/mob/living/carbon/human/virtual_reality/death(gibbed)//the body is deleted when you die to simulate your virtual avatar being deleted
..()
qdel(src)