mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-26 14:31:59 +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
|
||||
Reference in New Issue
Block a user