Files
Bubberstation/code/modules/awaymissions/mission_code/mining.dm
Whoneedspacee 6a70a982df [Ready] Megafauna VR Training Simulator (#42353)
* lava arena is now not the default for swoop attack

adds mass fire attack, sends fire lines out from the drake in 360 degrees

lava pools now have a chance to be spawned with the fire breath attack

adds greater delay for lava pools on lesser ash drake so they don't just all instantly get placed

lava arena doesn't needlessly recalculate the turfs it will be using every pass now

enraged state, procs when you try to escape from the lava arena attack without fighting it normally, colors the drake turns its brightness up as it glows, then shoots out fire everywhere, also heals the drake for 250 health.

fixes a bug where fire lines wouldn't appear if their range would put the calculated end turf outside the map

fixes a bug where indestructible open turfs would turn into basalt on the lava arena attack

fixes a bug where lava arena safe spots would be on indestructible closed turfs

drake swoops now have a greater default recovery time

* fixes stupid text error

* adds vr mining sleepers to the lavaland mining base which can be used to train with megafauna and test out other items

removes useless code from colossus's file including having a dead icon of the drake and butchering results

adds virtual versions of each megafauna which don't drop any items and are deleted upon death

adds the vr mining map

* adds virtual megafauna spawners and their respective icons, spawn 1 megafauna at their location and are indestructible

changes default virtual megafauna hunter gear to be more like the default mining gear

* adds more items to spawning in mining vr

megafauna spawner nests can no longer be pushed

virtual megafauna now have a limit to how far they can move away from their nest

adds arenas and fast bluespace tile paths to each megafauna spawner and gives the mining base some walls to protect it

* adds mining vr map to the away mission config

adds perm portals, linked two way portals who are linked by id and can be set in mapping files by editing instance

adds megafauna portals for the arenas

fixes up some junk on the mining vr map

adds a spawn delay for megafauna spawners after the linked megafaunas death

fixes a bug where bubblegum could teleport outside of his arena

* adds true spawn var to bubblegum to easily handle clones / virtual versions of it spawning

fixes bug where virtual legion would release the real legion when damaged

moves vr mining code to the away missions code to adhere to contributing.md

* converts map files to tgm

adds arena cleanup and fixes runtime bugs on virtual megafauna spawn and death

* reverts local drake changes

* fixes bug where drake corpses still had a gps signal

removes worthless include

* adds the crusher trophies to the vr mining kit

no more granting null achievements you stinky virtual megafauna

this map really didn't need to be 255x255 im sorry

* even smaller map wowee also please compile

* adds respawning item crates for the lavaland items and healing junk

even smaller map and some filler spaces for possible future bosses

removes lavaland map changes

mining vr now works properly with other vr maps and is randomly selected working with normal vr sleepers on station

fixes permanent being permanant my bad

* lavaland map stop being changed

* maybe a bit overkill with the amount of healing items

* reordering i guess but why is the rum gone

* work please

* Update Lavaland.dmm

* Update Lavaland.dmm

* adds force stop option to portals so you can choose to not chain teleports with non linked portals.dm

permanent portals now can be var edited mid game and still work (cool admin events? idk)

permanent portals are no longer deleted if they don't have a linked portal

adds one way portals, portals that lead somewhere but have no return portal. basically non hardlinked portals but able to be done in map and edit stuff

adds recall portals for the vr megafauna arenas, one way portals but you can recall to them by using a one time use spell (no it is not tied to your real mind it is tied to the vr mind)

virtual megafauna can no longer escape their arenas

moves some virtual megafauna procs to the main megafauna file to reduce needless code

* recall portals can now be chained and the portal recall spell can now go back in a stack reverse style

* adds boss rush mode, fight all of the bosses successively with only one break in the middle without dying

object spawners can now choose their datum spawner type through a var

moves some virtual megafauna code from the megafauna file to the megafauna spawner datum

* adds new goodies to the end of the boss rush

removes a lot of the copy pastad code in the vr megafauna

adds true spawn var, decides whether or not the megafauna should grant achievements or have an internal gps, used for bubblegum hallucinations and virtual megafauna

internal gps are now added on the base megafauna path

hierophant's crusher trophy no longer spawns at its beacon (let's be honest some people missed it because of this) so it works properly with the crusher loot var
2019-02-11 12:01:51 -05:00

291 lines
10 KiB
Plaintext

// //
// -----Vr Stuff----- //
// //
/area/awaymission/vr/miner
name = "VrMining"
requires_power = FALSE
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
/datum/outfit/job/miner/equipped/vr
name = "Virtual Reality Miner"
suit = /obj/item/clothing/suit/hooded/explorer
mask = /obj/item/clothing/mask/gas/explorer
glasses = /obj/item/clothing/glasses/hud/health
suit_store = /obj/item/tank/internals/oxygen
internals_slot = SLOT_S_STORE
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/structure/closet/crate/necropolis/vr_mining_gear
name = "armory chest"
desc = "Has some sick nasty respawning gear."
icon_state = "necrocrate"
resistance_flags = INDESTRUCTIBLE
anchored = TRUE
move_resist=INFINITY
var/respawn_loot = list() // put types and count in here
/obj/structure/closet/crate/necropolis/vr_mining_gear/dump_contents() // respawn loot on the chest
var/atom/L = drop_location()
for(var/type in respawn_loot)
var/count = respawn_loot[type]
if(!isnum(count))//Default to 1
count = 1
for(var/i = 1 to count)
new type(L)
/obj/structure/closet/crate/necropolis/vr_mining_gear/take_contents() // delete loot on the chest
var/atom/L = drop_location()
for(var/atom/movable/AM in L)
if(AM == src || isliving(AM))
continue
qdel(AM)
/obj/structure/closet/crate/necropolis/vr_mining_gear/armor
name = "Armor Chest"
desc = "Contains an assortment of lavaland armors."
respawn_loot = list(
/obj/item/clothing/suit/hooded/cloak/drake=1,
/obj/item/clothing/suit/space/hostile_environment=1,
/obj/item/clothing/head/helmet/space/hostile_environment=1,
/obj/item/clothing/suit/space/hardsuit/cult=1,
/obj/item/clothing/suit/space/hardsuit/ert/paranormal/beserker=1,
/obj/item/clothing/suit/space/hardsuit/ert/paranormal/inquisitor=1,
/obj/item/stack/sheet/animalhide/goliath_hide=6)
/obj/structure/closet/crate/necropolis/vr_mining_gear/accelerator
name = "Kinetic Accelerator Chest"
desc = "Contains an assortment of kinetic accelerator equipment."
respawn_loot = list(
/obj/item/gun/energy/kinetic_accelerator=1,
/obj/item/borg/upgrade/modkit/lifesteal=1,
/obj/item/borg/upgrade/modkit/aoe/mobs=1,
/obj/item/borg/upgrade/modkit/tracer=1,
/obj/item/borg/upgrade/modkit/tracer/adjustable=1,
/obj/item/borg/upgrade/modkit/chassis_mod=1,
/obj/item/borg/upgrade/modkit/chassis_mod/orange=1,
/obj/item/borg/upgrade/modkit/aoe/turfs/andmobs=1,
/obj/item/borg/upgrade/modkit/cooldown/repeater=1,
/obj/item/borg/upgrade/modkit/resonator_blasts=1,
/obj/item/borg/upgrade/modkit/bounty=1,
/obj/item/borg/upgrade/modkit/range=3,
/obj/item/borg/upgrade/modkit/damage=3,
/obj/item/borg/upgrade/modkit/cooldown=3)
/obj/structure/closet/crate/necropolis/vr_mining_gear/crusher
name = "Kinetic Crusher Chest"
desc = "Contains an assortment of kinetic crusher equipment."
respawn_loot = list(
/obj/item/twohanded/required/kinetic_crusher=1,
/obj/item/crusher_trophy/vortex_talisman=1,
/obj/item/crusher_trophy/demon_claws=1,
/obj/item/crusher_trophy/tail_spike=1,
/obj/item/crusher_trophy/miner_eye=1,
/obj/item/crusher_trophy/legion_skull=1,
/obj/item/crusher_trophy/goliath_tentacle=1,
/obj/item/crusher_trophy/blaster_tubes/magma_wing=1,
/obj/item/crusher_trophy/watcher_wing=1,
/obj/item/crusher_trophy/blaster_tubes=1)
/obj/structure/closet/crate/necropolis/vr_mining_gear/healing
name = "Healing Chest"
desc = "Contains an assortment of healing items."
respawn_loot = list(
/obj/item/reagent_containers/hypospray/medipen/survival=1,
/obj/item/storage/firstaid/brute=1,
/obj/item/hivelordstabilizer=3,
/obj/item/organ/regenerative_core/legion=3)
/obj/structure/closet/crate/necropolis/vr_mining_gear/food
name = "Food Chest"
desc = "Fresh from the virtual cafeteria."
respawn_loot = list(
/obj/item/reagent_containers/food/snacks/donkpocket/warm=5)
/obj/structure/closet/crate/necropolis/vr_mining_gear/misc
name = "Miscellaneous Chest"
desc = "Contains an assortment of random lavaland items."
respawn_loot = list(
/obj/item/warp_cube/red=1,
/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 ---- //
// //
/datum/component/spawner/megafauna
var/spawn_wait_time = 150 // time to next spawn when the megafauna dies, 15 seconds
var/initial_spawned = FALSE // so we don't clear the arena and open the door on the initial spawn
var/nest_range = 10
/datum/component/spawner/megafauna/try_spawn_mob()
STOP_PROCESSING(SSprocessing, src)
if(spawned_mobs.len < max_mobs && initial_spawned)
var/obj/structure/spawner/megafauna/MS = parent
MS.cleanup_arena()
spawn_delay = world.time + spawn_wait_time
var/turf/check = get_ranged_target_turf(get_turf(MS), SOUTH, nest_range + 1)
if(istype(check, /turf/closed/indestructible/fakedoor))
check.ChangeTurf(/turf/open/floor/plating/asteroid/basalt/lava_land_surface)
sleep(spawn_wait_time)
check.ChangeTurf(/turf/closed/indestructible/fakedoor)
else
sleep(spawn_wait_time)
. = ..()
initial_spawned = TRUE
START_PROCESSING(SSprocessing, src)
/obj/structure/spawner/megafauna
name = "generic megafauna spawner"
desc = "Literally does nothing."
resistance_flags = INDESTRUCTIBLE
move_resist = INFINITY
max_mobs = 1
icon = 'icons/mob/nest.dmi'
spawn_text = "appears onto"
density = FALSE
spawner_type = /datum/component/spawner/megafauna
var/nest_range = 10
/obj/structure/spawner/megafauna/proc/cleanup_arena()
for(var/obj/effect/decal/B in urange(nest_range, src))
qdel(B) // go away blood and garbage shit
/obj/structure/spawner/megafauna/blood_drunk
name = "drunken beacon"
desc = "Creates holographic versions of a blood drunken miner."
icon_state = "blood_drunk"
mob_types = list(/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/virtual)
/obj/structure/spawner/megafauna/dragon
name = "flame beacon"
desc = "Creates holographic versions of a fire breathing drake."
icon_state = "dragon"
mob_types = list(/mob/living/simple_animal/hostile/megafauna/dragon/virtual)
/obj/structure/spawner/megafauna/bubblegum
name = "bloody beacon"
desc = "Creates holographic versions of the king of the slaughter demons."
icon_state = "bubblegum"
mob_types = list(/mob/living/simple_animal/hostile/megafauna/bubblegum/virtual)
/obj/structure/spawner/megafauna/colossus
name = "radiant beacon"
desc = "Creates holographic versions of a godlike creature."
icon_state = "colossus"
mob_types = list(/mob/living/simple_animal/hostile/megafauna/colossus/virtual)
/obj/structure/spawner/megafauna/hierophant
name = "beacon beacon"
desc = "Creates holographic versions of a destructive magical club."
icon_state = "hierophant"
mob_types = list(/mob/living/simple_animal/hostile/megafauna/hierophant/virtual)
/obj/structure/spawner/megafauna/legion
name = "skull beacon"
desc = "Creates holographic versions of a gigantic skull demon guarding the necropolis."
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."
crusher_loot = list()
loot = list()
true_spawn = 0
/mob/living/simple_animal/hostile/megafauna/dragon/virtual
name = "ash drake hologram"
desc = "A holographic dragon, once weak, now fierce."
del_on_death = 1 // goodbye corpse
crusher_loot = list()
loot = list()
true_spawn = 0
/mob/living/simple_animal/hostile/megafauna/bubblegum/virtual
name = "bubblegum hologram"
desc = "A holographic version of the king of the slaughter demons. You feel something oddly real staring back at you."
crusher_loot = list()
loot = list()
true_spawn = 0
/mob/living/simple_animal/hostile/megafauna/colossus/virtual
name = "colossus hologram"
desc = "A holographic god. One of the strongest creatures that has ever lived."
crusher_loot = list()
loot = list()
true_spawn = 0
/mob/living/simple_animal/hostile/megafauna/hierophant/virtual
name = "hierophant hologram"
desc = "A holographic club. It's said to wipe from existence those who fall to its rhythm."
crusher_loot = list()
loot = list()
true_spawn = 0
/mob/living/simple_animal/hostile/megafauna/legion/virtual
name = "Legion Hologram"
desc = "One of many... holograms."
crusher_loot = list()
loot = list()
true_spawn = 0