Phase one done.

This commit is contained in:
Warior4356
2017-04-02 01:50:51 -07:00
parent a44d4bb8d3
commit dbf989be51
16 changed files with 294 additions and 160 deletions
-81
View File
@@ -1,81 +0,0 @@
"a" = (/turf/space,/area/space)
"b" = (/turf/unsimulated/wall/metal,/area/space)
"c" = (/turf/simulated/floor/bluegrid{icon_state = "dark"; name = "Mainframe Floor"; nitrogen = 100; oxygen = 0; temperature = 80},/area/space)
"d" = (/turf/unsimulated/wall/fakeglass{dir = 8; icon_state = "fakewindows3"; tag = "icon-fakewindows (WEST)"},/area/space)
"e" = (/turf/simulated/floor/greengrid,/area/space)
"f" = (/turf/simulated/floor/bluegrid{name = "Mainframe Base"; nitrogen = 100; oxygen = 0; temperature = 80},/area/space)
"g" = (/obj/machinery/telecomms/hub/preset_cent,/turf/simulated/floor/bluegrid{icon_state = "dark"; name = "Mainframe Floor"; nitrogen = 100; oxygen = 0; temperature = 80},/area/space)
"h" = (/turf/simulated/floor/light,/area/space)
"i" = (/turf/unsimulated/wall/fakeglass{dir = 1; icon_state = "fakewindows"; tag = "icon-fakewindows (WEST)"},/area/space)
"j" = (/turf/unsimulated/wall/fakeglass{dir = 0; icon_state = "fakewindows"; tag = "icon-fakewindows (EAST)"},/area/space)
"k" = (/obj/machinery/telecomms/server/presets/centcomm,/turf/simulated/floor/greengrid,/area/space)
"l" = (/obj/machinery/telecomms/relay/preset/centcom,/turf/simulated/floor/greengrid,/area/space)
"m" = (/obj/machinery/computer/mecha,/turf/simulated/floor/bluegrid{icon_state = "dark"; name = "Mainframe Floor"; nitrogen = 100; oxygen = 0; temperature = 80},/area/space)
"n" = (/obj/machinery/telecomms/processor/preset_cent,/turf/simulated/floor/bluegrid{icon_state = "dark"; name = "Mainframe Floor"; nitrogen = 100; oxygen = 0; temperature = 80},/area/space)
"o" = (/turf/unsimulated/wall/fakeglass{icon_state = "fakewindows"; dir = 8},/area/space)
"p" = (/turf/unsimulated/wall/fakeglass{tag = "icon-fakewindows (EAST)"; icon_state = "f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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
"}
+46
View File
@@ -0,0 +1,46 @@
"a" = (/turf/space,/area/space)
"b" = (/turf/unsimulated/wall/other,/area/vr/roman)
"c" = (/turf/unsimulated/beach/sand,/area/vr/roman)
"d" = (/obj/effect/landmark{name = "avatarspawn"},/turf/unsimulated/beach/sand,/area/vr/roman)
"e" = (/turf/unsimulated/floor{tag = "icon-warnplate (NORTHWEST)"; icon_state = "warnplate"; dir = 9},/area/vr/roman)
"f" = (/turf/unsimulated/floor{tag = "icon-warnplate (NORTH)"; icon_state = "warnplate"; dir = 1},/area/vr/roman)
"g" = (/turf/unsimulated/floor{tag = "icon-warnplate (NORTHEAST)"; icon_state = "warnplate"; dir = 5},/area/vr/roman)
"h" = (/turf/unsimulated/floor{icon_state = "warnplate"; dir = 8},/area/vr/roman)
"i" = (/turf/unsimulated/floor/lava/dense,/area/vr/roman)
"j" = (/turf/unsimulated/floor{icon_state = "panelscorched"},/area/vr/roman)
"k" = (/turf/unsimulated/floor{tag = "icon-warnplate (SOUTHWEST)"; icon_state = "warnplate"; dir = 10},/area/vr/roman)
"l" = (/turf/unsimulated/floor{tag = "icon-warnplate"; icon_state = "warnplate"; dir = 2},/area/vr/roman)
"m" = (/turf/unsimulated/floor{tag = "icon-warnplate (SOUTHEAST)"; icon_state = "warnplate"; dir = 6},/area/vr/roman)
(1,1,1) = {"
aaaaaaaaaaabbbbbbbbaaaaaaaaaaa
aaaaaaaabbbbccccccbbbbaaaaaaaa
aaaaaaabbccccccccccccbbaaaaaaa
aaaaabbbccccccddccccccbbbaaaaa
aaaabbdccccccefgcccccccdbbaaaa
aaabbddcccccchijcccccccddbbaaa
aaabcccccccccklmccccccccccbaaa
aabbccccccccccccccccccccccbbaa
abbccefgcccccccccccccccccccbba
abccchijccccccddccccccccccccba
abcccklmcccdccccccdcccccccccba
bbccccccccdbccccccbdccccccccbb
bccccccccccccccccccccccccccccb
bccccccccccccccccccccccccccccb
bccdccccdccccccccccccdccccdccb
bccdccccdccccccccccccdccccdccb
bccccccccccccccccccccccccccccb
bccccccccccccccccccccccccccccb
bbccccccccdbccccccbdccccefgcbb
abcccccccccdccccccdccccchijcba
abccccccccccccccccccccccklmcba
abbcccefgcccccddcccccccccccbba
aabbcchijcccccccccccccccccbbaa
aaabddklmcccccccccccccccccbaaa
aaabbdcccccccccccccccccddbbaaa
aaaabbcccccccccccccccccdbbaaaa
aaaaabbbccccccddccccccbbbaaaaa
aaaaaaabbccccccccccccbbaaaaaaa
aaaaaaaabbbbccccccbbbbaaaaaaaa
aaaaaaaaaaabbbbbbbbaaaaaaaaaaa
"}
+45 -2
View File
@@ -1,3 +1,46 @@
"a" = ()
"a" = (/turf/space,/area/space)
"b" = (/turf/unsimulated/wall/metal,/area/vr/lobby)
"c" = (/turf/unsimulated/floor{tag = "icon-dark"; icon_state = "dark"},/area/vr/lobby)
"d" = (/turf/unsimulated/wall/fakeglass{dir = 8; icon_state = "fakewindows3"; tag = "icon-fakewindows (WEST)"},/area/vr/lobby)
"e" = (/turf/unsimulated/floor{icon_state = "gcircuit"},/area/vr/lobby)
"f" = (/obj/machinery/telecomms/processor/preset_cent,/turf/unsimulated/floor{tag = "icon-dark"; icon_state = "dark"},/area/vr/lobby)
"g" = (/turf/unsimulated/floor{icon_state = "light_on"},/area/vr/lobby)
"h" = (/turf/unsimulated/wall/fakeglass{dir = 1; icon_state = "fakewindows"; tag = "icon-fakewindows (WEST)"},/area/vr/lobby)
"i" = (/turf/unsimulated/wall/fakeglass{dir = 0; icon_state = "fakewindows"; tag = "icon-fakewindows (EAST)"},/area/vr/lobby)
"j" = (/obj/machinery/telecomms/server/presets/centcomm,/turf/unsimulated/floor{icon_state = "gcircuit"},/area/vr/lobby)
"k" = (/obj/machinery/telecomms/relay/preset/centcom,/turf/unsimulated/floor{icon_state = "gcircuit"},/area/vr/lobby)
"l" = (/obj/machinery/telecomms/hub/preset_cent,/turf/unsimulated/floor{tag = "icon-dark"; icon_state = "dark"},/area/vr/lobby)
"m" = (/obj/machinery/computer/vr_control,/turf/unsimulated/floor{tag = "icon-dark"; icon_state = "dark"},/area/vr/lobby)
"n" = (/turf/unsimulated/wall/fakeglass{icon_state = "fakewindows"; dir = 8},/area/vr/lobby)
"o" = (/turf/unsimulated/wall/fakeglass{tag = "icon-fakewindows (EAST)"; icon_state = "fakewindows"; dir = 4},/area/vr/lobby)
"p" = (/obj/effect/landmark{name = "avatarspawn"},/turf/unsimulated/floor{icon_state = "gcircuit"},/area/vr/lobby)
"q" = (/obj/machinery/telecomms/processor/preset_cent,/turf/simulated/floor/bluegrid{icon_state = "dark"; name = "Mainframe Floor"; nitrogen = 100; oxygen = 0; temperature = 80},/area/vr/lobby)
"r" = (/turf/unsimulated/wall/fakeglass,/area/vr/lobby)
(1,1,1, 10,10,1) = {""}
(1,1,1) = {"
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaabbbbaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaabbccbbaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaabbbdeedbbbaaaaaaaaaaaaaaaaaaaa
aabbbbbbbbbbbbbbbbbbbeefeefeebbbbbbbbbbbbbbbbbbbaa
aabbcecececececbbbeeeegheehgeeeebbbcecececececbbaa
aabcgegegegegegcbbegcgcieeicgcgebbcgegegegegegcbaa
aabeejekejekejeebbeceeeleeleeecebbeejekejekejeebaa
aabcgegegegegegcbeegecgheehgcegeebcgegegegegegcbaa
aabbcecececececbbegcegcieeicgecgebbcecececececbbaa
aaabdmdmdmdmdmdbdfnolnobccbnolnofdbdmdmdmdmdmdbaaa
aaabeeeeeeeeeeeceeeeeeecppceeeeeeeceeeeeeeeeeebaaa
aaabeeeeeeeeeeeceeeeeeecppceeeeeeeceeeeeeeeeeebaaa
aaabbbbbbbbbbbbbdfnolnobccbnolnoqdbbbbbbbbbbbbbaaa
aaaaaaaaaaaaaaabbegcegcheehcgecgebbaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaabeegecgreeigcegeebaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaabbeceeeleeleeecebbaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaabegcgcheehcgcgebaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaabeeeegreeigeeeebaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaabbbbeefeefeebbbbaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaabbbdeedbbbaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaabbccbbaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaabbbbaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
"}
+2 -1
View File
@@ -52,4 +52,5 @@ var/list/datum/map_template/ruins_templates = list()
var/list/datum/map_template/space_ruins_templates = list()
var/list/datum/map_template/lava_ruins_templates = list()
var/list/datum/map_template/shelter_templates = list()
var/list/datum/map_template/shuttle_templates = list()
var/list/datum/map_template/shuttle_templates = list()
var/list/datum/map_template/vr_templates = list()
+13 -1
View File
@@ -114,6 +114,7 @@
preloadRuinTemplates()
preloadShelterTemplates()
preloadShuttleTemplates()
preloadVRTemplates()
/proc/preloadRuinTemplates()
// Still supporting bans by filename
@@ -163,4 +164,15 @@
var/datum/map_template/shuttle/S = new shuttle_type()
shuttle_templates[S.shuttle_id] = S
map_templates[S.shuttle_id] = S
map_templates[S.shuttle_id] = S
/proc/preloadVRTemplates()
for(var/item in subtypesof(/datum/map_template/vr))
var/datum/map_template/vr/vr_type = item
if(!initial(vr_type.suffix))
continue
var/datum/map_template/vr/V = new vr_type()
vr_templates[V.id] = V
map_templates[V.id] = V
+4 -6
View File
@@ -1,14 +1,12 @@
/datum/map_template/vr
//name = "A Chest of Doubloons"
//name = "Lobby"
name = null
var/id = null // For blacklisting purposes, all vr levels need an id
var/description = "In the middle of a clearing in the rockface, there's a \
chest filled with gold coins with Spanish engravings. How is there a \
wooden container filled with 18th century coinage in the middle of a \
lavawracked hellscape? It is clearly a mystery."
var/description = "This is a placeholder. Please contact your virtual adminsitrator if you see this."
var/outfit = null
var/cost = null
var/allow_duplicates = TRUE //A bit boring, don't you think? You can always explicitly allow it on a ruin definition
var/allow_duplicates = TRUE
var/prefix = null
var/suffix = null
+7 -1
View File
@@ -1,4 +1,3 @@
//The bigger ones lag like hell if there is more than one on a z-level, so cost 2 for them
/datum/map_template/vr/level
prefix = "_maps/map_files/vr/"
@@ -7,4 +6,11 @@
suffix = "lobby.dmm"
name = "Virtual Hub Facility"
description = "This is the lobby. The hub for all things VR."
outfit = /datum/outfit/vr/vr_basic
/datum/map_template/vr/level/roman
id = "roman"
suffix = "blood_and_sand.dmm"
name = "Blood and Sand Arena"
description = "To the Death!"
outfit = /datum/outfit/vr/roman
+16
View File
@@ -2587,6 +2587,22 @@ area/security/podbay
/area/awaycontent/a30
icon_state = "awaycontent30"
////////////////////////VR AREAS///////////////////////////////////
/area/vr
name = "VR"
requires_power = 0
dynamic_lighting = 0
no_teleportlocs = 1
/area/vr/lobby
name = "VR Lobby"
/area/vr/roman
name = "Roman Arena"
/////////////////////////////////////////////////////////////////////
/*
Lists of areas to be used with is_type_in_list.
+7 -7
View File
@@ -27,14 +27,14 @@
/obj/machinery/computer/vr_control/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
//crew_monitor.ui_interact(user, ui_key, ui, force_open)
switch(alert("What would you like to do?", "VR Control", "Join Room", "Make Room", "Cancel"))
if("Join Room")
spawn_vr_avatar(user, input(user, "Choose a room to join.","Select Level") as null|anything in vr_rooms)
if("Make Room")
make_vr_room(input(user, "Name your new Room","Name here.") as null|text, input(user, "Choose a Level to load into your new Room.","Select Level") as null|anything in vr_templates)
if("Cancel")
return
/obj/machinery/computer/vr_control/interact(mob/user)
//crew_monitor.ui_interact(user)
/obj/machinery/computer/vr_control/proc/loadlevel(var/datum/map_template/template)
//var/map = input(usr, "Choose a Map Template to place at your CURRENT LOCATION","Place Map Template") as null|anything in map_templates
//if(!map)
// return
template = "_maps/map_files/templates/vr/lobby.dmm"
var/datum/space_chunk/C = space_manager.allocate_space(template.width, template.height)
template.load(C, centered = FALSE)
-1
View File
@@ -22,7 +22,6 @@
if("avatarspawn")
avatarspawn += loc
qdel(src)
if("JoinLate")
latejoin += loc
+50 -17
View File
@@ -2,23 +2,25 @@
/mob/living/carbon/human/virtual_reality
var/mob/living/carbon/human/real_me //The human controlling us, can be any human (including virtual ones... inception...)
var/obj/item/clothing/glasses/vr_goggles
var/datum/action/quit_vr/quit_action
var/datum/action/back_to_lobby/back_to_lobby
var/datum/action/detach_from_avatar/detach_from_avatar
/mob/living/carbon/human/virtual_reality/New()
quit_action = new()
quit_action.Grant(src)
back_to_lobby = new()
back_to_lobby.Grant(src)
detach_from_avatar = new()
detach_from_avatar.Grant(src)
..()
/mob/living/carbon/human/virtual_reality/death()
revert_to_reality()
qdel(src)
return_to_lobby()
..()
/mob/living/carbon/human/virtual_reality/Destroy()
revert_to_reality()
qdel(src)
return_to_lobby()
return ..()
/mob/living/carbon/human/virtual_reality/ghost()
@@ -26,20 +28,28 @@
set name = "Ghost"
set desc = "Relinquish your life and enter the land of the dead."
var/mob/living/carbon/human/H = real_me
revert_to_reality(FALSE, FALSE)
revert_to_reality(FALSE)
if(H)
H.ghost()
qdel(src)
/mob/living/carbon/human/virtual_reality/proc/revert_to_reality(refcleanup = TRUE, deathchecks = TRUE)
/mob/living/carbon/human/virtual_reality/proc/revert_to_reality(remove = 0)
if(real_me && mind)
mind.transfer_to(real_me)
real_me.eye_blind = 4
real_me.confused = 4
// if(deathchecks && vr_sleeper && vr_sleeper.you_die_in_the_game_you_die_for_real)
// real_me.death(0)
if(refcleanup)
real_me = null
real_me.eye_blind = 2
real_me.confused = 2
if(remove)
qdel(src)
else
return src
/mob/living/carbon/human/virtual_reality/proc/return_to_lobby()
if(real_me && mind)
var/mob/living/carbon/human/virtual_reality/new_vr
new_vr = spawn_vr_avatar(src, "Lobby")
var/obj/item/clothing/glasses/vr_goggles/g = new_vr.real_me.glasses
g.vr_human = new_vr
qdel(src)
/datum/action/quit_vr
name = "Quit Virtual Reality"
@@ -47,8 +57,31 @@
/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, FALSE)
var/mob/living/carbon/human/virtual_reality/vr = owner
vr.revert_to_reality(1)
else
Remove(owner)
/datum/action/back_to_lobby
name = "Return To Lobby"
/datum/action/back_to_lobby/Trigger()
if(..())
if(istype(owner, /mob/living/carbon/human/virtual_reality))
var/mob/living/carbon/human/virtual_reality/vr = owner
vr.return_to_lobby()
else
Remove(owner)
/datum/action/detach_from_avatar
name = "Detach From Avatar"
/datum/action/detach_from_avatar/Trigger()
if(..())
if(istype(owner, /mob/living/carbon/human/virtual_reality))
var/mob/living/carbon/human/virtual_reality/vr = owner
var/obj/item/clothing/glasses/vr_goggles/g = vr.real_me.glasses
g.vr_human = vr
vr.revert_to_reality(0)
else
Remove(owner)
qdel(src)
+11 -41
View File
@@ -1,5 +1,3 @@
//Glorified teleporter that puts you in a new human body.
// it's """VR"""
@@ -16,12 +14,11 @@
var/you_die_in_the_game_you_die_for_real = FALSE
var/mob/living/carbon/human/virtual_reality/vr_human
var/static/list/available_vr_spawnpoints
var/vr_category = "default" //Specific category of spawn points to pick from
var/outfit = /datum/outfit/vr_basic
/obj/item/clothing/glasses/vr_goggles/Destroy()
..()
vr_human.revert_to_reality(1)
cleanup_vr_avatar()
/obj/item/clothing/glasses/vr_goggles/emag_act(mob/user)
@@ -30,45 +27,18 @@
/obj/item/clothing/glasses/vr_goggles/dropped()
..()
if(vr_human)
cleanup_vr_avatar()
vr_human.revert_to_reality(FALSE, FALSE)
vr_human.revert_to_reality(0)
/obj/item/clothing/glasses/vr_goggles/proc/cleanup_vr_avatar()
if(vr_human)
vr_human = null
/obj/item/clothing/glasses/vr_goggles/equipped()
..()
var/mob/living/carbon/human/H = loc
spawn(1)
if(H.glasses == src)
control_remote(H,build_virtual_avatar(H,pick(avatarspawn)))
/obj/item/clothing/glasses/vr_goggles/proc/build_virtual_avatar(mob/living/carbon/human/virtual_reality/H, location)
if(!location)
return
var/mob/living/carbon/human/virtual_reality/vr_avatar
cleanup_vr_avatar()
vr_avatar = new /mob/living/carbon/human/virtual_reality(location)
vr_avatar.set_species(H.species.name)
vr_avatar.vr_goggles = src
vr_avatar.real_me = H
vr_avatar.dna = H.dna.Clone()
vr_avatar.name = H.name
vr_avatar.real_name = H.real_name
vr_avatar.undershirt = H.undershirt
vr_avatar.underwear = H.underwear
// vr_avatar.change_hair(H.head_organ.h_style)
if(outfit)
var/datum/outfit/vr_basic/O = new outfit()
O.equip(vr_avatar)
return vr_avatar
/obj/item/clothing/glasses/vr_goggles/proc/control_remote(mob/living/carbon/human/H, mob/living/carbon/human/virtual_reality/vr_avatar)
if(H.mind)
H.mind.transfer_to(vr_avatar)
/obj/item/clothing/glasses/vr_goggles/proc/cleanup_vr_avatar()
if(vr_human)
vr_human.death(0)
/datum/outfit/vr_basic
name = "basic vr"
uniform = /obj/item/clothing/under/psysuit
shoes = /obj/item/clothing/shoes/black
if(vr_human == null)
vr_human = spawn_vr_avatar(H, "Lobby")
else
control_remote(H, vr_human)
@@ -96,6 +96,13 @@
/datum/space_chunk/proc/return_turfs()
return
/datum/space_chunk/proc/search_chunk(object_list)
var/list/located = list()
for(var/atom/object in object_list)
if(((object.x >= x) && (object.x <= (x + width))) && ((object.y >= y) && (object.y <= (y + height))) && (object.z == zpos))
located.Add(object)
return located
#undef BOTTOM_LEFT_CHUNK
#undef BOTTOM_RIGHT_CHUNK
#undef TOP_LEFT_CHUNK
+66
View File
@@ -0,0 +1,66 @@
//Control file with the backbone for the vr rooms and avatars
var/datum/vr_rooms = list()
var/roomcap = 20
/datum/vr_room
var/name = null
var/datum/map_template/vr/template = null
var/datum/space_chunk/chunk = null
var/list/spawn_points = list()
var/expires = 1
proc/make_vr_room(name, template, expires)
var/datum/vr_room/R = new
R.name = name
R.template = template
R.template = vr_templates[R.template]
R.chunk = space_manager.allocate_space(R.template.width, R.template.height)
R.expires = expires
vr_rooms[R.name] = R
R.template.load(locate(R.chunk.x,R.chunk.y,R.chunk.zpos), centered = FALSE)
for(var/atom/landmark in R.chunk.search_chunk(landmarks_list))
if(landmark.name == "avatarspawn")
R.spawn_points.Add(landmark)
//datum/vr_room/process()
//Control code for the avatars
proc/build_virtual_avatar(mob/living/carbon/human/H, location, datum/map_template/vr/level/template)
if(!location)
return
var/mob/living/carbon/human/virtual_reality/vr_avatar
location = get_turf(location)
vr_avatar = new /mob/living/carbon/human/virtual_reality(location)
vr_avatar.set_species(H.species.name)
if(istype(H, /mob/living/carbon/human/virtual_reality))
var/mob/living/carbon/human/virtual_reality/V = H
vr_avatar.real_me = V.real_me
else
vr_avatar.real_me = H
vr_avatar.dna = H.dna.Clone()
vr_avatar.name = H.name
vr_avatar.real_name = H.real_name
vr_avatar.undershirt = H.undershirt
vr_avatar.underwear = H.underwear
var/obj/item/organ/external/head/hd = H.get_organ("head")
vr_avatar.change_hair(hd.h_style)
vr_avatar.equipOutfit(template.outfit)
return vr_avatar
proc/control_remote(mob/living/carbon/human/H, mob/living/carbon/human/virtual_reality/vr_avatar)
if(H.mind)
H.mind.transfer_to(vr_avatar)
proc/spawn_vr_avatar(mob/living/carbon/human/H, datum/vr_room/room)
room = vr_rooms[room]
var/mob/living/carbon/human/virtual_reality/vr_human
vr_human = build_virtual_avatar(H, pick(room.spawn_points), room.template)
control_remote(H, vr_human)
return vr_human
//Preloaded rooms
/hook/roundstart/proc/starting_levels()
make_vr_room("Lobby", "lobby", "0")
+15
View File
@@ -0,0 +1,15 @@
//place all the outfits for your levels in here.
/datum/outfit/vr/vr_basic
name = "basic vr"
uniform = /obj/item/clothing/under/psysuit
shoes = /obj/item/clothing/shoes/black
/datum/outfit/vr/roman
name = "roman"
uniform = /obj/item/clothing/under/roman
shoes = /obj/item/clothing/shoes/roman
l_hand = /obj/item/weapon/shield/riot/roman
r_hand = /obj/item/weapon/twohanded/spear
head = /obj/item/clothing/head/helmet/roman
back = /obj/item/weapon/twohanded/spear
+5 -2
View File
@@ -601,6 +601,7 @@
#include "code\game\machinery\computer\store.dm"
#include "code\game\machinery\computer\syndicate_specops_shuttle.dm"
#include "code\game\machinery\computer\telecrystalconsoles.dm"
#include "code\game\machinery\computer\vr_control.dm"
#include "code\game\machinery\doors\airlock.dm"
#include "code\game\machinery\doors\airlock_control.dm"
#include "code\game\machinery\doors\airlock_electronics.dm"
@@ -2162,8 +2163,10 @@
#include "code\modules\vehicle\speedbike.dm"
#include "code\modules\vehicle\sportscar.dm"
#include "code\modules\vehicle\vehicle.dm"
#include "code\modules\VR\vr_avatar.dm"
#include "code\modules\VR\vr_goggles.dm"
#include "code\modules\vr\vr_avatar.dm"
#include "code\modules\vr\vr_controller.dm"
#include "code\modules\vr\vr_goggles.dm"
#include "code\modules\vr\vr_outfits.dm"
#include "goon\code\datums\browserOutput.dm"
#include "interface\interface.dm"
#include "interface\skin.dmf"