[Ready] The Virtual Reality Hub (#42879)

About The Pull Request

VR sleepers now lead to the VR Hub, a place with a bunch of portals that lead you to other areas, or just has chill stuff like a bar. Includes portals to all the old vr maps, the megafauna training simulator map, a soon to be minecraft map, and my crappy game runner where you run away from falling tiles and fight to be the last person to survive. Merges murderdome and syndicate trainer into the vr hub map so they spawn every time with vr. Recall portals now can have multiple exits to support the old vr waypoint system from the hub. Also moves a lot of stuff around in the files to make it more organized. There's now also a ghost role that can access VR as well with infinite spawns.

VR NOW HAS A CONFIG OPTION SO ENABLE IT OR VR WILL NOT WORK.
Why It's Good For The Game

Being a ghost is boring for most people, it's nice to have a place for people to hang out rather than just leave the server. This is also a nice place where people can put gamemodes they're testing or other fun little minigames that can't be main gamemodes. VR currently is not used by really anyone so I don't see anyone getting bothered by this PR as well.
This commit is contained in:
Whoneedspacee
2019-04-22 12:16:11 +12:00
committed by oranges
parent e586883c8c
commit 5b89dea70f
19 changed files with 69388 additions and 31960 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+19 -33
View File
@@ -200,7 +200,6 @@
pixel_x = 5;
pixel_y = 5
},
/obj/effect/landmark/vr_spawn/snowdin,
/obj/item/bedsheet/purple,
/turf/open/floor/wood,
/area/awaymission/snowdin/post/dorm)
@@ -239,16 +238,6 @@
/obj/effect/decal/cleanable/cobweb,
/turf/open/floor/wood,
/area/awaymission/snowdin/post/dorm)
"aX" = (
/obj/structure/bed,
/obj/machinery/atmospherics/components/unary/vent_scrubber/on{
piping_layer = 3;
pixel_x = 5;
pixel_y = 5
},
/obj/effect/landmark/vr_spawn/snowdin,
/turf/open/floor/wood,
/area/awaymission/snowdin/post/dorm)
"aY" = (
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
dir = 6;
@@ -289,7 +278,6 @@
pixel_x = 5;
pixel_y = 5
},
/obj/effect/landmark/vr_spawn/snowdin,
/obj/item/paper/crumpled/ruins/snowdin/dontdeadopeninside,
/obj/item/bedsheet/green,
/turf/open/floor/wood,
@@ -329,6 +317,7 @@
/obj/machinery/atmospherics/pipe/simple/supply/hidden{
dir = 6
},
/obj/effect/portal/permanent/one_way/destroy/snowdin,
/turf/open/floor/wood{
icon_state = "wood-broken"
},
@@ -363,6 +352,7 @@
/obj/machinery/atmospherics/pipe/simple/supply/hidden{
dir = 6
},
/obj/effect/portal/permanent/one_way/destroy/snowdin,
/turf/open/floor/wood,
/area/awaymission/snowdin/post/dorm)
"bm" = (
@@ -618,7 +608,6 @@
/turf/open/floor/plasteel/freezer,
/area/awaymission/snowdin/post/kitchen)
"bM" = (
/obj/effect/landmark/vr_spawn/snowdin,
/obj/effect/decal/cleanable/blood/old,
/turf/open/floor/plasteel/freezer,
/area/awaymission/snowdin/post/kitchen)
@@ -1571,6 +1560,7 @@
icon_state = "1-2"
},
/obj/effect/decal/cleanable/dirt,
/obj/effect/portal/permanent/one_way/destroy/snowdin,
/turf/open/floor/plasteel,
/area/awaymission/snowdin/post/dorm)
"dE" = (
@@ -1813,7 +1803,6 @@
pixel_x = 5;
pixel_y = 5
},
/obj/effect/landmark/vr_spawn/snowdin,
/obj/item/bedsheet/red,
/turf/open/floor/wood{
icon_state = "wood-broken"
@@ -2526,15 +2515,9 @@
/area/awaymission/snowdin/post/gateway)
"fH" = (
/obj/structure/bed,
/obj/effect/landmark/vr_spawn/snowdin,
/obj/item/bedsheet/nanotrasen,
/turf/open/floor/carpet,
/area/awaymission/snowdin/post/dorm)
"fI" = (
/obj/effect/landmark/vr_spawn/snowdin,
/obj/effect/decal/cleanable/dirt,
/turf/open/floor/plasteel,
/area/awaymission/snowdin/post/gateway)
"fJ" = (
/obj/structure/table/reinforced,
/obj/effect/turf_decal/tile/bar,
@@ -2895,7 +2878,6 @@
/area/awaymission/snowdin/post/gateway)
"gw" = (
/obj/machinery/atmospherics/components/unary/vent_pump/on,
/obj/effect/landmark/vr_spawn/snowdin,
/obj/effect/decal/cleanable/dirt,
/turf/open/floor/plasteel,
/area/awaymission/snowdin/post/gateway)
@@ -2905,7 +2887,6 @@
pixel_x = 5;
pixel_y = 5
},
/obj/effect/landmark/vr_spawn/snowdin,
/obj/effect/decal/cleanable/dirt,
/turf/open/floor/plasteel,
/area/awaymission/snowdin/post/gateway)
@@ -3259,7 +3240,7 @@
/obj/machinery/atmospherics/pipe/simple/supply/hidden{
dir = 5
},
/obj/effect/landmark/vr_spawn/snowdin,
/obj/effect/portal/permanent/one_way/destroy/snowdin,
/turf/open/floor/plasteel,
/area/awaymission/snowdin/post/gateway)
"hm" = (
@@ -3272,9 +3253,9 @@
/obj/machinery/atmospherics/pipe/simple/supply/hidden{
dir = 10
},
/obj/effect/landmark/vr_spawn/snowdin,
/obj/machinery/holopad,
/obj/effect/decal/cleanable/dirt,
/obj/effect/portal/permanent/one_way/destroy/snowdin,
/turf/open/floor/plasteel,
/area/awaymission/snowdin/post/gateway)
"hn" = (
@@ -3284,7 +3265,7 @@
pixel_x = 5;
pixel_y = 5
},
/obj/effect/landmark/vr_spawn/snowdin,
/obj/effect/portal/permanent/one_way/destroy/snowdin,
/turf/open/floor/plasteel,
/area/awaymission/snowdin/post/gateway)
"ho" = (
@@ -3531,8 +3512,8 @@
/turf/open/floor/plasteel,
/area/awaymission/snowdin/post/gateway)
"hR" = (
/obj/effect/landmark/vr_spawn/snowdin,
/obj/effect/turf_decal/stripes/line,
/obj/effect/portal/permanent/one_way/destroy/snowdin,
/turf/open/floor/plasteel,
/area/awaymission/snowdin/post/gateway)
"hS" = (
@@ -3542,16 +3523,15 @@
pixel_x = 5;
pixel_y = 5
},
/obj/effect/landmark/vr_spawn/snowdin,
/obj/effect/turf_decal/stripes/line,
/obj/effect/decal/cleanable/dirt,
/obj/effect/portal/permanent/one_way/destroy/snowdin,
/turf/open/floor/plasteel,
/area/awaymission/snowdin/post/gateway)
"hT" = (
/obj/structure/chair{
dir = 4
},
/obj/effect/landmark/vr_spawn/snowdin,
/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
piping_layer = 3;
@@ -3896,6 +3876,7 @@
id = "snowdin_gate"
},
/obj/effect/turf_decal/delivery,
/obj/effect/portal/permanent/one_way/destroy/snowdin,
/turf/open/floor/plasteel,
/area/awaymission/snowdin/post/gateway)
"iB" = (
@@ -4335,7 +4316,6 @@
/obj/structure/chair{
dir = 8
},
/obj/effect/landmark/vr_spawn/snowdin,
/obj/effect/decal/cleanable/dirt,
/turf/open/floor/plasteel,
/area/awaymission/snowdin/post/garage)
@@ -4557,10 +4537,10 @@
id = "snowdin_gate"
},
/obj/effect/turf_decal/delivery,
/obj/effect/portal/permanent/one_way/destroy/snowdin,
/turf/open/floor/plasteel,
/area/awaymission/snowdin/post/gateway)
"jZ" = (
/obj/effect/landmark/vr_spawn/snowdin,
/obj/effect/turf_decal/tile/neutral{
dir = 1
},
@@ -4654,6 +4634,7 @@
pixel_x = 5;
pixel_y = 5
},
/obj/effect/portal/permanent/one_way/destroy/snowdin,
/turf/open/floor/plating,
/area/awaymission/snowdin/post/garage)
"kk" = (
@@ -14254,6 +14235,7 @@
/obj/machinery/light/small{
dir = 1
},
/obj/effect/portal/permanent/one_way/destroy/snowdin,
/turf/open/floor/plasteel/grimy,
/area/awaymission/snowdin/post/mining_main)
"HV" = (
@@ -15597,6 +15579,10 @@
"ND" = (
/turf/open/floor/plasteel/elevatorshaft,
/area/awaymission/snowdin/post/mining_dock)
"Om" = (
/obj/effect/portal/permanent/one_way/destroy/snowdin,
/turf/open/floor/plating,
/area/awaymission/snowdin/post/garage)
"OF" = (
/obj/machinery/door/airlock/external{
name = "Ready Room";
@@ -23168,7 +23154,7 @@ af
af
ag
aK
aX
aU
bm
bB
aS
@@ -26778,7 +26764,7 @@ fh
fF
fG
fG
fI
fG
hm
hS
iA
@@ -35778,7 +35764,7 @@ iW
iW
iW
iW
iW
Om
hE
hE
nB
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -162,4 +162,5 @@
#define LOCKED_HELMET_TRAIT "locked-helmet"
#define NINJA_SUIT_TRAIT "ninja-suit"
#define ANTI_DROP_IMPLANT_TRAIT "anti-drop-implant"
#define HIVEMIND_ONE_MIND_TRAIT "one_mind"
#define HIVEMIND_ONE_MIND_TRAIT "one_mind"
#define VR_ZONE_TRAIT "vr_zone_trait"
@@ -272,6 +272,8 @@
movedelay_type = /mob/living/simple_animal
/////////////////////////////////////////////////
/datum/config_entry/flag/virtual_reality //Will virtual reality be loaded
/datum/config_entry/flag/roundstart_away //Will random away mission be loaded.
/datum/config_entry/number/gateway_delay //How long the gateway takes before it activates. Default is half an hour. Only matters if roundstart_away is enabled.
+5
View File
@@ -74,6 +74,11 @@ SUBSYSTEM_DEF(mapping)
if(CONFIG_GET(flag/roundstart_away))
createRandomZlevel()
// Load the virtual reality hub
if(CONFIG_GET(flag/virtual_reality))
to_chat(world, "<span class='boldannounce'>Loading virtual reality...</span>")
load_new_z_level("_maps/RandomZLevels/VR/vrhub.dmm", "Virtual Reality Hub")
to_chat(world, "<span class='boldannounce'>Virtual reality loaded.</span>")
// Generate mining ruins
loading_ruins = TRUE
+5 -1
View File
@@ -25,4 +25,8 @@ Unused icons for new areas are "awaycontent1" ~ "awaycontent30"
/area/awaymission/vr
name = "Virtual Reality"
icon_state = "awaycontent1"
icon_state = "awaycontent1"
requires_power = FALSE
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
var/pacifist = TRUE // if when you enter this zone, you become a pacifist or not
var/death = FALSE // if when you enter this zone, you die
+19 -15
View File
@@ -200,37 +200,41 @@
/obj/effect/portal/permanent/proc/get_linked()
if(!id)
return
var/list/possible = list()
for(var/obj/effect/portal/permanent/P in GLOB.portals - src)
if(P.id && P.id == id) // gets portals with the same id, there should only be two permanent portals with the same id
return P
possible += P
return possible
/obj/effect/portal/permanent/proc/set_linked()
var/obj/effect/portal/permanent/other = get_linked()
if(!other)
var/list/possible = get_linked()
if(!possible || !possible.len)
return
other.linked = src
linked = other
for(var/obj/effect/portal/permanent/other in possible)
other.linked = src
linked = pick(possible)
/obj/effect/portal/permanent/teleport(atom/movable/M, force = FALSE)
if(!linked) // try to search for a new one if something was var edited etc
set_linked()
// try to search for a new one if something was var edited etc
set_linked()
. = ..()
/obj/effect/portal/permanent/one_way // doesn't have a return portal
name = "one-way portal"
desc = "You get the feeling that this might not be the safest thing you've ever done."
var/list/possible_exits = list()
var/keep // if this is a portal that should be kept
/obj/effect/portal/permanent/one_way/set_linked()
var/obj/effect/portal/permanent/one_way/other = get_linked()
if(!other)
if(!keep) // wait for a keep portal to set
return
hard_target = get_turf(other)
other.hard_target = get_turf(src)
if(!other.keep)
qdel(other)
if(!keep)
qdel(src)
var/list/possible_temp = get_linked()
if(possible_temp && possible_temp.len)
for(var/obj/effect/portal/permanent/other in possible_temp)
possible_exits += get_turf(other)
qdel(other)
if(possible_exits && possible_exits.len)
hard_target = pick(possible_exits)
/obj/effect/portal/permanent/one_way/keep // because its nice to be able to tell which is which on the map
keep = TRUE
+27 -1
View File
@@ -7,10 +7,15 @@
. = ..()
quit_action = new()
quit_action.Grant(src)
check_area()
/mob/living/carbon/human/virtual_reality/Moved()
. = ..()
check_area()
/mob/living/carbon/human/virtual_reality/death()
revert_to_reality()
..()
. = ..()
/mob/living/carbon/human/virtual_reality/Destroy()
revert_to_reality()
@@ -25,6 +30,8 @@
revert_to_reality(FALSE)
/mob/living/carbon/human/virtual_reality/ghostize()
if(!real_mind && !vr_sleeper)
return ..()
stack_trace("Ghostize was called on a virtual reality mob")
/mob/living/carbon/human/virtual_reality/ghost()
@@ -33,6 +40,23 @@
set desc = "Relinquish your life and enter the land of the dead."
revert_to_reality(FALSE)
/mob/living/carbon/human/virtual_reality/proc/check_area()
var/area/check = get_area(src)
if(!check || !istype(check, /area/awaymission/vr))
return
var/area/awaymission/vr/A = check
if(A.death)
to_chat(src, "<span class='userdanger'>It is unwise to attempt to break Virtual Reality.</span>")
playsound(src, 'sound/effects/supermatter.ogg', 50, 1)
dust()
return
if(A.pacifist && !has_trait(TRAIT_PACIFISM, VR_ZONE_TRAIT))
add_trait(TRAIT_PACIFISM, VR_ZONE_TRAIT)
to_chat(src, "<span class='notice'>You feel like your ability to fight other living beings is being suppressed.</span>")
else if(!A.pacifist && has_trait(TRAIT_PACIFISM, VR_ZONE_TRAIT))
remove_trait(TRAIT_PACIFISM, VR_ZONE_TRAIT)
to_chat(src, "<span class='notice'>You feel that your ability to fight is no longer being suppressed.</span>")
/mob/living/carbon/human/virtual_reality/proc/revert_to_reality(deathchecks = TRUE)
if(real_mind && mind)
real_mind.current.ckey = ckey
@@ -44,6 +68,8 @@
if(deathchecks && vr_sleeper)
vr_sleeper.vr_human = null
vr_sleeper = null
if(!real_mind && !vr_sleeper)
ghostize()
real_mind = null
/datum/action/quit_vr
@@ -1,11 +1,11 @@
// //
// -----Vr Stuff----- //
// //
/area/awaymission/vr/megafauna_arena
name = "Virtual Reality Megafauna Trainer Safe Area"
icon_state = "awaycontent3"
/area/awaymission/vr/miner
name = "VrMining"
requires_power = FALSE
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
/area/awaymission/vr/megafauna_arena/arena
name = "Virtual Reality Megafauna Trainer Fighting Area"
icon_state = "awaycontent4"
pacifist = FALSE
/datum/outfit/job/miner/equipped/vr
name = "Virtual Reality Miner"
@@ -17,8 +17,91 @@
backpack_contents = list(
/obj/item/gun/energy/kinetic_accelerator=2)
/obj/effect/landmark/vr_spawn/miner
vr_outfit = /datum/outfit/job/miner/equipped/vr
/obj/effect/portal/permanent/one_way/recall/megafauna_arena
name = "Megafauna Arena Portal"
desc = "Fight against megafauna in the safety of virtual reality."
equipment = /datum/outfit/job/miner/equipped/vr
recall_equipment = /datum/outfit/vr
id = "vr megafauna arena"
light_color = LIGHT_COLOR_FIRE
light_power = 1
light_range = 10
/obj/effect/portal/permanent/one_way/destroy/megafauna_arena
name = "Megafauna Arena Exit Portal"
id = "vr megafauna arena"
/obj/effect/portal/permanent/one_way/recall/blood_drunk_miner
name = "Blood Drunk Miner Arena Portal"
desc = "You see a faded miner through the portal. His rippling eyes stare directly at you."
id = "vr blood drunk miner"
/obj/effect/portal/permanent/one_way/destroy/blood_drunk_miner
name = "Blood Drunk Miner Arena Exit Portal"
id = "vr blood drunk miner"
/obj/effect/portal/permanent/one_way/recall/dragon
name = "Ash Drake Arena Portal"
desc = "The crackling fires of hell burn on the other side."
id = "vr ash drake"
/obj/effect/portal/permanent/one_way/destroy/dragon
name = "Ash Drake Arena Exit Portal"
id = "vr ash drake"
/obj/effect/portal/permanent/one_way/recall/bubblegum
name = "Bubblegum Arena Portal"
desc = "The arena of the king of the slaughter demons. Doesn't he control all versions of himself?"
id = "vr bubblegum"
/obj/effect/portal/permanent/one_way/destroy/bubblegum
name = "Bubblegum Arena Exit Portal"
id = "vr bubblegum"
/obj/effect/portal/permanent/one_way/recall/colossus
name = "Colossus Arena Portal"
desc = "Colossus are quite dangerous in close quarters."
id = "vr colossus"
/obj/effect/portal/permanent/one_way/destroy/colossus
name = "Colossus Arena Exit Portal"
id = "vr colossus"
/obj/effect/portal/permanent/one_way/recall/hierophant
name = "Hierophant Arena Portal"
desc = "They call him the hierophant. He's the king of the rumba beat. When he plays the maracas you go Chick chicky boom Chick chicky boom."
id = "vr hierophant"
/obj/effect/portal/permanent/one_way/destroy/hierophant
name = "Hierophant Arena Exit Portal"
id = "vr hierophant"
/obj/effect/portal/permanent/one_way/recall/legion
name = "Legion Arena Portal"
desc = "The portal to the defender of the necropolis. He's mostly there for show."
id = "vr legion"
/obj/effect/portal/permanent/one_way/destroy/legion
name = "Legion Arena Exit Portal"
id = "vr legion"
/obj/effect/portal/permanent/one_way/recall/vr_boss_rush
name = "Boss Rush Portal"
desc = "You're not certain this is even possible."
id = "vr boss rush"
/obj/effect/portal/permanent/one_way/destroy/vr_boss_rush
name = "Boss Rush Exit Portal"
id = "vr boss rush"
/obj/effect/portal/permanent/one_way/keep/vr_boss_rush_continue
name = "Boss Rush Continue Portal"
desc = "You're halfway there. These next fights are even tougher, however."
id = "vr boss rush continue"
/obj/effect/portal/permanent/one_way/destroy/vr_boss_rush_continue
name = "Boss Rush Continue Exit Portal"
id = "vr boss rush continue"
/obj/structure/closet/crate/necropolis/vr_mining_gear
name = "armory chest"
@@ -114,11 +197,8 @@
/obj/item/reagent_containers/glass/bottle/potion/flight=1,
/obj/item/organ/heart/cursed/wizard=1,
/obj/item/immortality_talisman=1,
/obj/item/book/granter/spell/summonitem=1)
// //
// -----Virtual Megafauna Spawners ---- //
// //
/obj/item/book/granter/spell/summonitem=1,
/obj/item/extinguisher=1)
/datum/component/spawner/megafauna
var/spawn_wait_time = 150 // time to next spawn when the megafauna dies, 15 seconds
@@ -194,58 +274,6 @@
icon_state = "legion"
mob_types = list(/mob/living/simple_animal/hostile/megafauna/legion/virtual)
// //
// ----- Recall Portals ---- //
// //
/obj/effect/proc_holder/spell/portal_recall
name = "Portal Recall"
desc = "This will teleport you back to your previously used portal. One use only."
clothes_req = FALSE
action_icon_state = "blink"
var/list/recall_portals = list()
/obj/effect/proc_holder/spell/portal_recall/Click(mob/user = usr)
if(!recall_portals.len)
user.mind.RemoveSpell(src) // remove spell if no portals left
var/turf/recall_turf = get_turf(recall_portals[recall_portals.len])
if(recall_turf)
do_teleport(user, recall_turf, 0, no_effects = FALSE, channel = TELEPORT_CHANNEL_BLUESPACE)
recall_portals -= recall_portals[recall_portals.len]
if(!recall_portals.len)
user.mind.RemoveSpell(src) // remove spell if no portals left
/obj/effect/portal/permanent/one_way/recall
name = "recall portal"
desc = "Gives you a one time ability to return to this portal once you have entered."
mech_sized = TRUE
keep = TRUE
/obj/effect/portal/permanent/one_way/recall/Crossed(atom/movable/AM, oldloc)
if(ismob(AM))
var/mob/user = AM
var/check = locate(/obj/effect/proc_holder/spell/portal_recall) in user.mind.spell_list
if(check)
var/obj/effect/proc_holder/spell/portal_recall/mob_recall = check
for(var/obj/effect/portal/permanent/one_way/recall/P in mob_recall.recall_portals)
if(src == P)
return ..(AM, oldloc, force_stop = 1) // don't teleport if they have a recall spell with this portal already (or have just teleported onto it)
return ..()
/obj/effect/portal/permanent/one_way/recall/teleport(atom/movable/M, force = FALSE)
. = ..()
if(ismob(M))
var/mob/user = M
var/findspell = locate(/obj/effect/proc_holder/spell/portal_recall) in user.mind.spell_list
var/obj/effect/proc_holder/spell/portal_recall/personal_recall = findspell ? findspell : new
personal_recall.recall_portals += src
if(!findspell)
user.mind.AddSpell(personal_recall)
// //
// -----Virtual Megafauna----- //
// //
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/virtual
name = "blood-drunk miner hologram"
desc = "A holographic miner, eternally hunting."
@@ -1,3 +1,8 @@
/area/awaymission/vr/murderdome
name = "Murderdome"
icon_state = "awaycontent8"
pacifist = FALSE
/obj/structure/window/reinforced/fulltile/indestructable
name = "robust window"
flags_1 = PREVENT_CLICK_UNDER_1 | NODECONSTRUCT_1
@@ -34,8 +39,3 @@
if(!QDELETED(src))
new /obj/structure/barricade/security/murderdome(get_turf(src))
qdel(src)
/area/awaymission/vr/murderdome
name = "Murderdome"
requires_power = FALSE
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
@@ -0,0 +1,129 @@
GLOBAL_VAR_INIT(vr_runner_active, FALSE)
GLOBAL_LIST_EMPTY(vr_runner_players)
GLOBAL_LIST_EMPTY(vr_runner_tiles)
/area/awaymission/vr/runner
name = "VrRunner"
icon_state = "awaycontent5"
/datum/outfit/vr/runner
name = "Runner Equipment"
shoes = /obj/item/clothing/shoes/bhop
/obj/effect/portal/permanent/one_way/recall/pit_faller
name = "Runner Portal"
desc = "A game of eternal running, where one misstep means certain death."
equipment = /datum/outfit/vr/runner
recall_equipment = /datum/outfit/vr
id = "vr runner"
light_color = LIGHT_COLOR_FIRE
light_power = 1
light_range = 4
var/game_starting = FALSE
var/game_start_time = FALSE
var/fall_wait = 5 // time in deciseconds between randomly falling tiles
/obj/effect/portal/permanent/one_way/recall/pit_faller/teleport(atom/movable/M, force = FALSE)
if(GLOB.vr_runner_active)
return FALSE
if(!ishuman(M))
return FALSE
. = ..()
if(.)
var/mob/living/carbon/human/H = M
GLOB.vr_runner_players += H
if(!game_starting)
INVOKE_ASYNC(src, .proc/game_start_countdown)
/obj/effect/portal/permanent/one_way/recall/pit_faller/recall_effect(mob/user)
if(ishuman(user))
var/mob/living/carbon/human/H = user
GLOB.vr_runner_players -= H
if(GLOB.vr_runner_active)
if(!GLOB.vr_runner_players.len)
to_chat(H, "<span class='notice'>You win! You survived for [(world.time - game_start_time) / 10] second\s.</span>")
end_game()
else
to_chat(H, "<span class='notice'>You survived for [(world.time - game_start_time) / 10] seconds. [GLOB.vr_runner_players.len] other player(s) remained.</span>")
/obj/effect/portal/permanent/one_way/recall/pit_faller/proc/game_start_countdown(wait_seconds = 10)
game_starting = TRUE
for(var/seconds_remaining = wait_seconds to 1 step -1)
if(!GLOB.vr_runner_players.len)
game_starting = FALSE
return FALSE
for(var/mob/living/carbon/human/H in GLOB.vr_runner_players)
to_chat(H, "<span class='notice'>Game starting in [seconds_remaining].</span>")
sleep(10)
if(GLOB.vr_runner_players.len)
GLOB.vr_runner_active = TRUE
for(var/mob/living/carbon/human/H in GLOB.vr_runner_players)
to_chat(H, "<span class='notice'>Game Started!</span>")
var/turf/open/indestructible/runner/R = get_turf(H)
INVOKE_ASYNC(R, /turf/open/indestructible/runner.proc/turf_fall)
color = COLOR_RED
INVOKE_ASYNC(src, .proc/random_falling_tiles)
game_starting = FALSE
game_start_time = world.time
/obj/effect/portal/permanent/one_way/recall/pit_faller/proc/random_falling_tiles()
if(!GLOB.vr_runner_active)
return FALSE
for(var/turf/open/indestructible/runner/R in GLOB.vr_runner_tiles)
if(R.color != COLOR_ALMOST_BLACK && prob(1))
INVOKE_ASYNC(R, /turf/open/indestructible/runner.proc/turf_fall)
sleep(fall_wait)
random_falling_tiles()
/obj/effect/portal/permanent/one_way/recall/pit_faller/proc/end_game()
color = initial(color)
GLOB.vr_runner_active = FALSE
game_starting = FALSE
for(var/turf/open/indestructible/runner/R in GLOB.vr_runner_tiles)
R.reset_fall()
/obj/effect/portal/permanent/one_way/destroy/pit_faller
name = "Runner Exit Portal"
id = "vr runner"
/turf/open/indestructible/runner
name = "Shaky Ground"
desc = "If you walk on that that you better keep running!"
var/not_reset = FALSE // check so turfs dont fall after being reset
var/falling_time = 15 // time it takes for the turf to fall
/turf/open/indestructible/runner/Initialize()
. = ..()
GLOB.vr_runner_tiles += src
/turf/open/indestructible/runner/Entered(atom/movable/A)
. = ..()
if(isliving(A) && GLOB.vr_runner_active)
if(color == COLOR_ALMOST_BLACK)
if(locate(A) in GLOB.vr_runner_players)
if(!A.throwing)
var/mob/living/carbon/human/H = A
var/obj/effect/proc_holder/spell/portal_recall/findspell = locate(/obj/effect/proc_holder/spell/portal_recall) in H.mind.spell_list
findspell.Click(H)
else
qdel(A)
else if(!not_reset) // make sure it's not already currently falling
INVOKE_ASYNC(src, .proc/turf_fall)
/turf/open/indestructible/runner/proc/turf_fall()
color = COLOR_RED
not_reset = TRUE
sleep(falling_time)
if(!not_reset)
return
not_reset = FALSE
color = COLOR_ALMOST_BLACK
for(var/mob/living/carbon/human/H in contents)
var/obj/effect/proc_holder/spell/portal_recall/findspell = locate(/obj/effect/proc_holder/spell/portal_recall) in H.mind.spell_list
if(H)
findspell.Click(H)
/turf/open/indestructible/runner/proc/reset_fall()
not_reset = FALSE
color = initial(color)
return
@@ -0,0 +1,156 @@
/area/awaymission/vr/general
name = "Virtual Reality Forbidden Zone"
death = TRUE
/area/awaymission/vr/hub
name = "Virtual Reality Hub Area"
icon_state = "awaycontent2"
dynamic_lighting = DYNAMIC_LIGHTING_FORCED
/area/awaymission/vr/hub/boxing
name = "Virtual Reality Boxing Ring"
icon_state = "awaycontent9"
pacifist = FALSE
/area/awaymission/vr/syndicate
name = "Virtual Reality Syndicate Trainer"
icon_state = "awaycontent6"
pacifist = FALSE
/obj/effect/portal/permanent/one_way/recall
name = "recall portal"
desc = "Gives you a one time ability to return to this portal once you have entered."
mech_sized = TRUE
keep = TRUE
var/datum/outfit/equipment // optional outfit to equip upon entering
var/datum/outfit/recall_equipment // optional outfit to equip upon recalling
/obj/effect/portal/permanent/one_way/recall/Crossed(atom/movable/AM, oldloc)
if(ismob(AM))
var/mob/user = AM
var/check = locate(/obj/effect/proc_holder/spell/portal_recall) in user.mind.spell_list
if(check)
var/obj/effect/proc_holder/spell/portal_recall/mob_recall = check
for(var/obj/effect/portal/permanent/one_way/recall/P in mob_recall.recall_portals)
if(src == P)
return ..(AM, oldloc, force_stop = TRUE) // don't teleport if they have a recall spell with this portal already (or have just teleported onto it)
return ..()
/obj/effect/portal/permanent/one_way/recall/teleport(atom/movable/M, force = FALSE)
. = ..()
if(. && ismob(M))
var/mob/user = M
var/findspell = locate(/obj/effect/proc_holder/spell/portal_recall) in user.mind.spell_list
var/obj/effect/proc_holder/spell/portal_recall/personal_recall = findspell ? findspell : new
personal_recall.recall_portals += src
if(!findspell)
user.mind.AddSpell(personal_recall)
if(equipment && ishuman(user))
var/mob/living/carbon/human/H = user
H.delete_equipment()
H.equipOutfit(equipment)
// the effect that happens when someone recalls to your portal
/obj/effect/portal/permanent/one_way/recall/proc/recall_effect(mob/user)
return
/obj/effect/proc_holder/spell/portal_recall
name = "Portal Recall"
desc = "This will teleport you back to your previously used portal. One use only."
clothes_req = FALSE
action_icon_state = "blink"
var/list/recall_portals = list()
/obj/effect/proc_holder/spell/portal_recall/Click(mob/user = usr)
if(!recall_portals.len)
user.mind.RemoveSpell(src) // remove spell if no portals left
var/obj/effect/portal/permanent/one_way/recall/last_portal = recall_portals[recall_portals.len]
var/turf/recall_turf = get_turf(last_portal)
if(recall_turf)
if(last_portal.recall_equipment && ishuman(user))
var/mob/living/carbon/human/H = user
H.delete_equipment()
H.equipOutfit(last_portal.recall_equipment)
last_portal.recall_effect(user)
if(user)
do_teleport(user, recall_turf, 0, no_effects = FALSE, channel = TELEPORT_CHANNEL_BLUESPACE)
recall_portals -= last_portal
if(!recall_portals.len)
user.mind.RemoveSpell(src) // remove spell if no portals left
/obj/effect/mob_spawn/human/virtual_reality
name = "Network Relay"
desc = "A machine with flashing buttons. It seems to be some sort of teleportation pad. There doesn't seem to be any way to activate it from this side."
mob_name = "Virtual Reality Human"
icon = 'icons/obj/telescience.dmi'
icon_state = "qpad-idle"
density = FALSE
roundstart = FALSE
death = FALSE
uses = -1 // infinite
random = TRUE
mob_type = /mob/living/carbon/human/virtual_reality
outfit = /datum/outfit/vr
flavour_text = "<span class='big bold'>You have connected to another stations virtual reality system</span>\n\
<b>You have been assigned a mission by nanotrasen to increase productivity in a station that lacks any and all teamwork.\n\
Your objective is to help other people by completing tasks, whether social or combatative, together, while also improving your own skills.</b>"
assignedrole = "Vr"
/obj/effect/portal/permanent/one_way/recall/murderdome
name = "Murderdome Portal"
desc = "Active, but only occasionally. Leads to an endless battle arena."
equipment = /datum/outfit/death_commando
recall_equipment = /datum/outfit/vr
id = "vr murderdome"
light_color = LIGHT_COLOR_FIRE
light_power = 1
light_range = 3
/obj/effect/portal/permanent/one_way/destroy/murderdome
name = "Murderdome Exit Portal"
id = "vr murderdome"
/obj/effect/portal/permanent/one_way/recall/syndicate
name = "Syndicate Portal"
desc = "Active, but only occasionally. Leads to a syndicate training program."
equipment = /datum/outfit/vr/syndicate
recall_equipment = /datum/outfit/vr
id = "vr syndicate"
light_color = LIGHT_COLOR_FIRE
light_power = 1
light_range = 3
/obj/effect/portal/permanent/one_way/recall/syndicate/recall_effect(mob/user)
// fuck this im not dealing with you fucks smuggling equipment out of the syndicate uplink
user.dust()
return
/obj/effect/portal/permanent/one_way/destroy/syndicate
name = "Syndicate Exit Portal"
id = "vr syndicate"
/obj/effect/portal/permanent/one_way/recall/snowdin
name = "Snowdin Portal"
desc = "Active, but only occasionally. Leads to a snowed in wasteland."
equipment = /datum/outfit/vr/snowtide
recall_equipment = /datum/outfit/vr
id = "vr snowdin"
light_color = LIGHT_COLOR_FIRE
light_power = 1
light_range = 3
/obj/effect/portal/permanent/one_way/destroy/snowdin
name = "Snowdin Exit Portal"
id = "vr snowdin"
/obj/effect/light_emitter/vr_hub
set_luminosity = 9
set_cap = 2.5
light_color = LIGHT_COLOR_WHITE
/turf/closed/indestructible/iron
name = "rough metal wall"
desc = "A wall with rough metal plating."
icon = 'icons/turf/walls/iron_wall.dmi'
icon_state = "iron"
canSmoothWith = list(/turf/closed/indestructible/iron)
+13 -2
View File
@@ -1,3 +1,5 @@
GLOBAL_LIST_EMPTY(all_wormholes) // So we can pick wormholes to teleport to
/datum/round_event_control/wormholes
name = "Wormholes"
typepath = /datum/round_event/wormholes
@@ -49,6 +51,15 @@
icon_state = "anom"
mech_sized = TRUE
/obj/effect/portal/wormhole/Initialize(mapload, _creator, _lifespan = 0, obj/effect/portal/_linked, automatic_link = FALSE, turf/hard_target_override, atmos_link_override)
. = ..()
GLOB.all_wormholes += src
/obj/effect/portal/wormhole/Destroy()
. = ..()
GLOB.all_wormholes -= src
/obj/effect/portal/wormhole/teleport(atom/movable/M)
if(iseffect(M)) //sparks don't teleport
return
@@ -57,8 +68,8 @@
return
if(ismovableatom(M))
if(GLOB.portals.len)
var/obj/effect/portal/P = pick(GLOB.portals)
if(GLOB.all_wormholes.len)
var/obj/effect/portal/wormhole/P = pick(GLOB.all_wormholes)
if(P && isturf(P.loc))
hard_target = P.loc
if(!hard_target)
+1 -4
View File
@@ -21,7 +21,4 @@
#_maps/RandomZLevels/research.dmm
#_maps/RandomZLevels/Cabin.dmm
#_maps/RandomZLevels/beach2.dmm
_maps/RandomZLevels/VR/mining_VR.dmm
_maps/RandomZLevels/VR/murderdome.dmm
_maps/RandomZLevels/VR/snowdin_VR.dmm
_maps/RandomZLevels/VR/syndicate_trainer.dmm
_maps/RandomZLevels/VR/snowdin_VR.dmm
+3
View File
@@ -286,6 +286,9 @@ ALLOW_AI_MULTICAM
## AWAY MISSIONS ###
## Uncomment to load the virtual reality hub map
#VIRTUAL_REALITY
## Uncomment to load one of the missions from awaymissionconfig.txt at roundstart.
#ROUNDSTART_AWAY
+2
View File
@@ -1425,10 +1425,12 @@
#include "code\modules\awaymissions\mission_code\moonoutpost19.dm"
#include "code\modules\awaymissions\mission_code\murderdome.dm"
#include "code\modules\awaymissions\mission_code\research.dm"
#include "code\modules\awaymissions\mission_code\runner.dm"
#include "code\modules\awaymissions\mission_code\snowdin.dm"
#include "code\modules\awaymissions\mission_code\spacebattle.dm"
#include "code\modules\awaymissions\mission_code\stationCollision.dm"
#include "code\modules\awaymissions\mission_code\undergroundoutpost45.dm"
#include "code\modules\awaymissions\mission_code\vrhub.dm"
#include "code\modules\awaymissions\mission_code\wildwest.dm"
#include "code\modules\bsql\includes.dm"
#include "code\modules\buildmode\bm_mode.dm"