Skip to content

Commit

Permalink
End of everything :)
Browse files Browse the repository at this point in the history
  • Loading branch information
EgorDinamit committed Dec 16, 2023
1 parent 6655b0b commit 77cd91e
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 0 deletions.
1 change: 1 addition & 0 deletions baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -3172,6 +3172,7 @@
#include "code\modules\spells\general\area_teleport.dm"
#include "code\modules\spells\general\contract_spells.dm"
#include "code\modules\spells\general\create_air.dm"
#include "code\modules\spells\general\end_of_everything.dm"
#include "code\modules\spells\general\invisibility.dm"
#include "code\modules\spells\general\mark_recall.dm"
#include "code\modules\spells\general\portal_teleport.dm"
Expand Down
1 change: 1 addition & 0 deletions code/__defines/__renderer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#define HEAT_EFFECT_TARGET "*heat"
#define HEAT_COMPOSITE_TARGET "*heatc"
#define WARP_EFFECT_PLANE -3
#define OUTLINE_EFFECT_PLANE -2

#define DEFAULT_PLANE 1
#define PLATING_LAYER 1
Expand Down
19 changes: 19 additions & 0 deletions code/__defines/_renderer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,19 @@ GLOBAL_LIST_EMPTY(zmimic_renderers)
. = ..()
Setup()

/// Renders the /obj/effect/effect/end_of_everything
/atom/movable/renderer/outline_red
name = "Red Outline Effect"
group = RENDER_GROUP_NONE
plane = OUTLINE_EFFECT_PLANE
render_target_name = "*outline_red"
mouse_opacity = MOUSE_OPACITY_UNCLICKABLE

/atom/movable/renderer/scene_group/Initialize()
. = ..()
filters += filter(type = "displace", render_source = "*warp", size = 5)
filters += filter(type = "displace", render_source = HEAT_COMPOSITE_TARGET, size = 2.5)
filters += filter(type = "outline", render_source = "*outline_red", size = 2, color = "#ff0000", flags = OUTLINE_SHARP)

Check failure on line 335 in code/__defines/_renderer.dm

View workflow job for this annotation

GitHub Actions / DreamChecker

filter(type="outline") called with invalid keyword parameter 'render_source'


/// Example of a warp filter for /renderer use
Expand All @@ -335,3 +344,13 @@ GLOBAL_LIST_EMPTY(zmimic_renderers)
pixel_x = -176
pixel_y = -176
no_z_overlay = TRUE

// Used by end of everything spell
/obj/effect/effect/end_of_everything
plane = OUTLINE_EFFECT_PLANE
appearance_flags = PIXEL_SCALE
icon = 'icons/effects/352x352.dmi'
icon_state = "singularity_s11"
pixel_x = -176
pixel_y = -176
no_z_overlay = TRUE
44 changes: 44 additions & 0 deletions code/modules/spells/general/end_of_everything.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@
ClearEffects()
return

var/turf/T = get_turf(user)

user.say("Interitus!")
active_effects += new /obj/effect/effect/warp(T)

if(!do_after(user, 10 SECONDS))
to_chat(user, SPAN_NOTICE("You cancel the ritual!"))
Expand All @@ -41,6 +44,7 @@
return

user.say("Annihilatio!")
active_effects += new /obj/effect/effect/end_of_everything(T)

if(!do_after(user, 10 SECONDS))
to_chat(user, SPAN_NOTICE("You cancel the ritual!"))
Expand Down Expand Up @@ -80,4 +84,44 @@
qdel(D)
active_effects = null

// Essentially a delayed all-consuming terror
/obj/effect/end_of_everything
icon = 'icons/effects/160x160.dmi'
icon_state = "end_of_everything"

/obj/effect/end_of_everything/Initialize()
. = ..()
var/matrix/M = transform
transform *= 0.1 // Starts small
animate(src, transform = M, alpha = 175, time = 24 SECONDS)
addtimer(CALLBACK(src, .proc/Annihilation), 25 SECONDS)

/obj/effect/end_of_everything/proc/Annihilation()
for(var/mob/M in GLOB.player_list)
if(isnewplayer(M))
continue
if(!(M.z in GetConnectedZlevels(z)))
continue
M.playsound_local(get_turf(M), 'sound/magic/end_of_everything.ogg', 50, FALSE)
to_chat(M, SPAN_USERDANGER("Something terrible has happened..."))
M.flash_eyes(FLASH_PROTECTION_MAJOR * 2)

// HAHAHAHAHA
for(var/atom/A in range(32, src))
if(prob(15))
continue
if(prob(33))
if(istype(A, /mob/living))
var/mob/living/L = A
if(prob(50))
L.dust()
else
L.gib()
continue
qdel(A)
continue
A.ex_act(rand(1, 2))

var/matrix/M = transform * 3
animate(src, transform = M, alpha = 0, time = 4 SECONDS)
QDEL_IN(src, (5 SECONDS))
Binary file modified icons/effects/160x160.dmi
Binary file not shown.
Binary file added sound/magic/end_of_everything.ogg
Binary file not shown.

0 comments on commit 77cd91e

Please sign in to comment.