diff --git a/aurorastation.dme b/aurorastation.dme index 49fece370da..8bf6f94c099 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -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" diff --git a/code/controllers/subsystems/virtual_reality.dm b/code/controllers/subsystems/virtual_reality.dm index 34accf74360..8b1d0b2795a 100644 --- a/code/controllers/subsystems/virtual_reality.dm +++ b/code/controllers/subsystems/virtual_reality.dm @@ -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]) \ No newline at end of file + 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.")) \ No newline at end of file diff --git a/code/datums/outfits/outfit_admin.dm b/code/datums/outfits/outfit_admin.dm index ee23dea4120..eff7d776b51 100644 --- a/code/datums/outfits/outfit_admin.dm +++ b/code/datums/outfits/outfit_admin.dm @@ -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 diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index 08843b8374c..0b59331a424 100644 --- a/code/game/objects/effects/landmarks.dm +++ b/code/game/objects/effects/landmarks.dm @@ -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 diff --git a/code/game/objects/structures/vr/human_chair.dm b/code/game/objects/structures/vr/human_chair.dm new file mode 100644 index 00000000000..71de534a9e8 --- /dev/null +++ b/code/game/objects/structures/vr/human_chair.dm @@ -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) \ No newline at end of file diff --git a/code/global.dm b/code/global.dm index b69941762be..c746251243f 100644 --- a/code/global.dm +++ b/code/global.dm @@ -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 diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index 30b01be9393..9cc54305fe7 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -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() diff --git a/code/modules/mob/living/carbon/human/virtual_reality_mob.dm b/code/modules/mob/living/carbon/human/virtual_reality_mob.dm new file mode 100644 index 00000000000..4813d814523 --- /dev/null +++ b/code/modules/mob/living/carbon/human/virtual_reality_mob.dm @@ -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) \ No newline at end of file