mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-20 20:37:34 +01:00
Revenant Gameplay Enhancement (#11049)
This commit is contained in:
@@ -40,6 +40,13 @@
|
||||
if(does_teleport)
|
||||
teleport(AM)
|
||||
|
||||
/obj/effect/portal/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/bluespace_neutralizer))
|
||||
user.visible_message("<b>[user]</b> collapses \the [src] with \the [I].", SPAN_NOTICE("You collapse \the [src] with \the [I]."))
|
||||
qdel(src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/effect/portal/attack_hand(mob/user)
|
||||
set waitfor = FALSE
|
||||
|
||||
@@ -92,7 +99,7 @@
|
||||
if(next_spawn < world.time)
|
||||
visible_message(SPAN_WARNING("\The [src] spits something out!"))
|
||||
for(var/thing in spawn_things)
|
||||
var/spawn_path = text2path(thing)
|
||||
var/spawn_path = thing
|
||||
var/atom/spawned_thing = new spawn_path(get_turf(src))
|
||||
|
||||
if(istype(spawned_thing, /obj/item/stack))
|
||||
@@ -113,33 +120,137 @@
|
||||
/obj/effect/portal/spawner/metal
|
||||
num_of_spawns = 3
|
||||
spawn_things = list(
|
||||
"/obj/item/stack/material/steel" = 10,
|
||||
"/obj/item/stack/material/plasteel" = 5
|
||||
)
|
||||
/obj/item/stack/material/steel = 10,
|
||||
/obj/item/stack/material/plasteel = 5
|
||||
)
|
||||
|
||||
/obj/effect/portal/spawner/rare_metal
|
||||
num_of_spawns = 4
|
||||
spawn_things = list(
|
||||
"/obj/item/stack/material/gold" = 2,
|
||||
"/obj/item/stack/material/silver" = 2,
|
||||
"/obj/item/stack/material/uranium" = 2,
|
||||
"/obj/item/stack/material/diamond" = 1
|
||||
)
|
||||
/obj/item/stack/material/gold = 2,
|
||||
/obj/item/stack/material/silver = 2,
|
||||
/obj/item/stack/material/uranium = 2,
|
||||
/obj/item/stack/material/diamond = 1
|
||||
)
|
||||
|
||||
/obj/effect/portal/spawner/silver
|
||||
num_of_spawns = 3
|
||||
spawn_things = list(
|
||||
/obj/item/stack/material/silver = 3
|
||||
)
|
||||
|
||||
/obj/effect/portal/spawner/gold
|
||||
num_of_spawns = 3
|
||||
spawn_things = list(
|
||||
/obj/item/stack/material/gold = 3
|
||||
)
|
||||
|
||||
/obj/effect/portal/spawner/phoron
|
||||
num_of_spawns = 3
|
||||
spawn_things = list(
|
||||
"/obj/item/stack/material/phoron" = 3
|
||||
)
|
||||
/obj/item/stack/material/phoron = 3
|
||||
)
|
||||
|
||||
/obj/effect/portal/spawner/monkey_cube
|
||||
num_of_spawns = 1
|
||||
spawn_things = list(
|
||||
"/obj/item/reagent_containers/food/snacks/monkeycube" = 4
|
||||
)
|
||||
/obj/item/reagent_containers/food/snacks/monkeycube = 4
|
||||
)
|
||||
|
||||
/obj/effect/portal/spawner/cow // debug but funny so im keeping it
|
||||
num_of_spawns = 1
|
||||
spawn_things = list(
|
||||
"/mob/living/simple_animal/cow" = 1
|
||||
/mob/living/simple_animal/cow = 1
|
||||
)
|
||||
|
||||
#define COLOR_STAGE_FIVE "#163DFF"
|
||||
#define COLOR_STAGE_FOUR "#0099ff"
|
||||
#define COLOR_STAGE_THREE "#33eb33"
|
||||
#define COLOR_STAGE_TWO "#F0FF2B"
|
||||
#define COLOR_STAGE_ONE "#FF8D23"
|
||||
#define COLOR_STAGE_ZERO "#FF0000"
|
||||
|
||||
/obj/effect/portal/revenant
|
||||
name = "bluespace rift"
|
||||
desc = "A bluespace tear in space, reaching directly to another point within this region. This one looks like a one-way portal to here, don't come too close."
|
||||
desc_info = "This is a bluespace rift. It is a node wherein revenants can seep into this locale. To destroy it, you must bring a bluespace neutralizer near it."
|
||||
icon_state = "portal_g"
|
||||
|
||||
does_teleport = FALSE
|
||||
has_lifespan = FALSE
|
||||
|
||||
color = COLOR_STAGE_FIVE
|
||||
light_color = COLOR_STAGE_FIVE
|
||||
light_power = 6
|
||||
light_range = 8
|
||||
|
||||
var/last_color_level = 5
|
||||
var/health_timer = 10 MINUTES // you need to reduce the health by standing near it with a neutralizer
|
||||
var/datum/looping_sound/revenant_rift/soundloop
|
||||
|
||||
/obj/effect/portal/revenant/Initialize(mapload)
|
||||
. = ..()
|
||||
if(revenants.revenant_rift)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
var/turf/T = get_turf(src)
|
||||
log_and_message_admins("Revenant Bluespace Rift spawned at \the [get_area(T)]", null, T)
|
||||
revenants.revenant_rift = src
|
||||
soundloop = new(list(src), FALSE)
|
||||
soundloop.start()
|
||||
|
||||
/obj/effect/portal/revenant/Destroy()
|
||||
revenants.destroyed_rift()
|
||||
visible_message(FONT_LARGE(SPAN_DANGER("\The [src] collapses!")))
|
||||
new /obj/random/highvalue/no_crystal(src)
|
||||
new /obj/random/highvalue/no_crystal(src)
|
||||
for(var/thing in contents)
|
||||
var/obj/O = thing
|
||||
O.forceMove(get_turf(src))
|
||||
O.throw_at_random(FALSE, 3, THROWNOBJ_KNOCKBACK_SPEED)
|
||||
var/area/A = get_area(src)
|
||||
message_all_revenants(FONT_LARGE(SPAN_WARNING("The rift keeping us here has been destroyed in [A.name]!")))
|
||||
QDEL_NULL(soundloop)
|
||||
return ..()
|
||||
|
||||
/obj/effect/portal/revenant/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/bluespace_neutralizer))
|
||||
to_chat(user, SPAN_WARNING("You need to activate \the [I] and keep it near \the [src] to collapse it."))
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/effect/portal/revenant/proc/reduce_health(var/amount = 1)
|
||||
health_timer -= amount
|
||||
if(health_timer <= 0)
|
||||
qdel(src)
|
||||
return
|
||||
update_icon()
|
||||
|
||||
/obj/effect/portal/revenant/update_icon()
|
||||
var/color_level = round((health_timer / 600) / 2) // this should give a value from 0 - 5
|
||||
if(color_level == last_color_level)
|
||||
return
|
||||
var/area/A = get_area(src)
|
||||
message_all_revenants(FONT_LARGE(SPAN_WARNING("The rift keeping us here is being attacked in [A.name]!")))
|
||||
last_color_level = color_level
|
||||
switch(color_level)
|
||||
if(0)
|
||||
color = COLOR_STAGE_ZERO
|
||||
if(1)
|
||||
color = COLOR_STAGE_ONE
|
||||
if(2)
|
||||
color = COLOR_STAGE_TWO
|
||||
if(3)
|
||||
color = COLOR_STAGE_THREE
|
||||
if(4)
|
||||
color = COLOR_STAGE_FOUR
|
||||
if(5)
|
||||
color = COLOR_STAGE_FIVE
|
||||
light_color = color
|
||||
update_light()
|
||||
|
||||
#undef COLOR_STAGE_FIVE
|
||||
#undef COLOR_STAGE_FOUR
|
||||
#undef COLOR_STAGE_THREE
|
||||
#undef COLOR_STAGE_TWO
|
||||
#undef COLOR_STAGE_ONE
|
||||
#undef COLOR_STAGE_ZERO
|
||||
@@ -0,0 +1,55 @@
|
||||
/obj/item/bluespace_neutralizer
|
||||
name = "bluespace neutralizer"
|
||||
desc = "A strange device, supposedly capable of pre-emptively shutting down bluespace portals."
|
||||
desc_info = "Click on it, or use it in-hand to activate it. Click on any portal-like structure to instantly close it. Stand near a bluespace rift while it's active to start the closing process."
|
||||
icon = 'icons/obj/contained_items/tools/neutralizer.dmi'
|
||||
icon_state = "neutralizer"
|
||||
contained_sprite = TRUE
|
||||
|
||||
var/tethered = FALSE // it needs to tether with the portal before it can start zapping
|
||||
var/last_zap = 0
|
||||
var/active = FALSE
|
||||
|
||||
/obj/item/bluespace_neutralizer/update_icon()
|
||||
icon_state = "neutralizer[active ? "-a" : ""]"
|
||||
|
||||
/obj/item/bluespace_neutralizer/attack_self(mob/user)
|
||||
if(!active && !revenants.revenant_rift)
|
||||
to_chat(user, SPAN_WARNING("\The [src] doesn't detect any large bluespace rifts in the region."))
|
||||
return
|
||||
toggle(user)
|
||||
|
||||
/obj/item/bluespace_neutralizer/proc/toggle(var/mob/user)
|
||||
active = !active
|
||||
if(active)
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
else
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
if(user)
|
||||
to_chat(user, SPAN_NOTICE("You turn \the [src] [active ? "on" : "off"]."))
|
||||
update_icon()
|
||||
|
||||
/obj/item/bluespace_neutralizer/process()
|
||||
if(active && !revenants.revenant_rift)
|
||||
toggle()
|
||||
return
|
||||
var/turf/our_turf = get_turf(src)
|
||||
if(!(our_turf.z == revenants.revenant_rift.z && get_dist(src, revenants.revenant_rift) < 5 && isInSight(src, revenants.revenant_rift)))
|
||||
tethered = FALSE
|
||||
return
|
||||
if(!tethered)
|
||||
visible_message(SPAN_DANGER("\The [src] tethers with \the [revenants.revenant_rift]!"))
|
||||
last_zap = world.time
|
||||
tethered = TRUE
|
||||
Beam(revenants.revenant_rift, icon_state="n_beam", icon = 'icons/effects/beam.dmi', time=2, maxdistance=5, beam_datum_type=/datum/beam/held)
|
||||
playsound(get_turf(src), 'sound/magic/Charge.ogg', 70, TRUE, extrarange = 30)
|
||||
return
|
||||
revenants.revenant_rift.reduce_health(world.time - last_zap)
|
||||
last_zap = world.time
|
||||
Beam(revenants.revenant_rift, icon_state="lightning[rand(1,12)]", icon = 'icons/effects/effects.dmi', time=2, maxdistance=5, beam_datum_type=/datum/beam/held)
|
||||
playsound(get_turf(src), 'sound/magic/LightningShock.ogg', 50, TRUE, extrarange = 30)
|
||||
|
||||
/obj/item/bluespace_neutralizer/Destroy()
|
||||
if(active)
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
return ..()
|
||||
@@ -1108,6 +1108,21 @@
|
||||
/obj/item/anomaly_core = 0.5
|
||||
)
|
||||
|
||||
/obj/random/highvalue/no_crystal
|
||||
problist = list(
|
||||
/obj/item/clothing/suit/armor/reactive = 0.5,
|
||||
/obj/item/clothing/glasses/thermal = 0.5,
|
||||
/obj/item/gun/projectile/automatic/rifle/shotgun = 0.5,
|
||||
/obj/random/sword = 0.5,
|
||||
/obj/item/gun/energy/lawgiver = 0.5,
|
||||
/obj/item/melee/energy/axe = 0.5,
|
||||
/obj/item/gun/projectile/automatic/terminator = 0.5,
|
||||
/obj/item/rig/military = 0.5,
|
||||
/obj/item/rig/unathi/fancy = 0.5,
|
||||
/obj/item/rig/vaurca/minimal = 0.5,
|
||||
/obj/item/anomaly_core = 0.5
|
||||
)
|
||||
|
||||
/obj/random/junk
|
||||
name = "random trash"
|
||||
desc = "This is toss."
|
||||
|
||||
Reference in New Issue
Block a user