Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Extracts some specific effects properties into an element, adds afterimage effect" #7347

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/__HELPERS/icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,7 @@ world
swapped = 1
return result


/image/proc/flick_overlay(atom/A, duration) //originally code related to goonPS. This isn't the original code, but has the same effect
A.overlays.Add(src)
addtimer(CALLBACK(src, PROC_REF(flick_remove_overlay), A), duration)
Expand Down
4 changes: 2 additions & 2 deletions code/datums/elements/drop_retrieval.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

/datum/element/drop_retrieval/Attach(datum/target)
. = ..()
if (!is_type_in_list(target, compatible_types))
if(!is_type_in_list(target, compatible_types))
return ELEMENT_INCOMPATIBLE
RegisterSignal(target, COMSIG_MOVABLE_PRE_THROW, PROC_REF(cancel_throw))
RegisterSignal(target, COMSIG_ITEM_DROPPED, PROC_REF(dropped))
Expand Down Expand Up @@ -40,7 +40,7 @@

/datum/element/drop_retrieval/gun/Attach(datum/target, slot)
. = ..()
if (.)
if(.)
return
retrieval_slot = slot

Expand Down
16 changes: 0 additions & 16 deletions code/datums/elements/effects/copy_appearance.dm

This file was deleted.

10 changes: 0 additions & 10 deletions code/datums/elements/effects/fading.dm

This file was deleted.

24 changes: 0 additions & 24 deletions code/datums/elements/effects/pixel_shifting.dm

This file was deleted.

15 changes: 0 additions & 15 deletions code/datums/elements/effects/temporary.dm

This file was deleted.

20 changes: 0 additions & 20 deletions code/game/objects/effects/afterimage.dm

This file was deleted.

67 changes: 0 additions & 67 deletions code/game/objects/effects/bloodsplatter.dm

This file was deleted.

2 changes: 0 additions & 2 deletions code/game/objects/effects/effect.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,5 @@
icon = 'icons/effects/effects.dmi'
blocks_emissive = EMISSIVE_BLOCK_GENERIC

var/as_image = FALSE

/obj/effect/get_applying_acid_time()
return -1
17 changes: 13 additions & 4 deletions code/game/objects/effects/portals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,27 @@
anchored = TRUE

/obj/effect/portal/Collided(atom/movable/AM)
INVOKE_ASYNC(src, PROC_REF(teleport), AM)
spawn(0)
teleport(AM)
return
return

/obj/effect/portal/Crossed(AM as mob|obj)
INVOKE_ASYNC(src, PROC_REF(teleport), AM)
spawn(0)
src.teleport(AM)
return
return

/obj/effect/portal/attack_hand(mob/user as mob)
INVOKE_ASYNC(src, PROC_REF(teleport), user)
spawn(0)
src.teleport(user)
return
return

/obj/effect/portal/Initialize(mapload, ...)
. = ..()
GLOB.portal_list += src
AddElement(/datum/element/temporary, 30 SECONDS)
QDEL_IN(src, 30 SECONDS)

/obj/effect/portal/Destroy()
GLOB.portal_list -= src
Expand Down
22 changes: 0 additions & 22 deletions code/game/objects/effects/shockwave.dm

This file was deleted.

121 changes: 121 additions & 0 deletions code/game/objects/effects/temporary_visuals.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
/obj/effect/temp_visual//ported (pasted) from TG13
icon_state = null
anchored = TRUE
layer = ABOVE_MOB_LAYER
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
//time, in deciseconds of duration
var/duration = 10
///if true, will pick a random direction when created.
var/randomdir = TRUE
///id of the deletion timer
var/timerid

/obj/effect/temp_visual/Initialize(mapload)
. = ..()
if(randomdir)
setDir(pick(GLOB.cardinals))

timerid = QDEL_IN(src, duration)

/obj/effect/temp_visual/Destroy()
. = ..()
deltimer(timerid)

/obj/effect/temp_visual/dir_setting
randomdir = FALSE

/obj/effect/temp_visual/dir_setting/Initialize(mapload, set_dir)
if(set_dir)
setDir(set_dir)
. = ..()

//------------------------------------------
//BLOOD HITS
//------------------------------------------

/obj/effect/temp_visual/dir_setting/bloodsplatter
icon = 'icons/effects/blood.dmi'
duration = 5
randomdir = FALSE
layer = ABOVE_XENO_LAYER
var/splatter_type = "splatter"

/obj/effect/temp_visual/dir_setting/bloodsplatter/Initialize(mapload, set_dir, fx_duration, color_override)
if(color_override)
color = color_override
if(IS_DIAGONAL_DIR(set_dir))
icon_state = "[splatter_type][pick(1, 2, 6)]"
else
icon_state = "[splatter_type][pick(3, 4, 5)]"
. = ..()
if(fx_duration)
duration = fx_duration
var/target_pixel_x = 0
var/target_pixel_y = 0
switch(set_dir)
if(NORTH)
target_pixel_y = 16
if(SOUTH)
target_pixel_y = -16
if(EAST)
target_pixel_x = 16
if(WEST)
target_pixel_x = -16
if(NORTHEAST)
target_pixel_x = 16
target_pixel_y = 16
if(NORTHWEST)
target_pixel_x = -16
target_pixel_y = 16
if(SOUTHEAST)
target_pixel_x = 16
target_pixel_y = -16
if(SOUTHWEST)
target_pixel_x = -16
target_pixel_y = -16
animate(src, pixel_x = target_pixel_x, pixel_y = target_pixel_y, alpha = 0, time = duration)


/obj/effect/temp_visual/dir_setting/bloodsplatter/xenosplatter
splatter_type = "csplatter"
color = BLOOD_COLOR_XENO

/obj/effect/temp_visual/dir_setting/bloodsplatter/human
splatter_type = "csplatter"
color = BLOOD_COLOR_HUMAN

/obj/effect/temp_visual/dir_setting/bloodsplatter/hellhound
splatter_type = "csplatter"
color = BLOOD_COLOR_YAUTJA

/obj/effect/temp_visual/dir_setting/bloodsplatter/yautjasplatter
splatter_type = "csplatter"
color = BLOOD_COLOR_YAUTJA_DARK

/obj/effect/temp_visual/dir_setting/bloodsplatter/synthsplatter
splatter_type = "csplatter"
color = BLOOD_COLOR_SYNTHETIC

//------------------------------------------
//Shockwaves
//------------------------------------------

/obj/effect/shockwave
icon = 'icons/effects/light_overlays/shockwave.dmi'
icon_state = "shockwave"
plane = DISPLACEMENT_PLATE_RENDER_LAYER
pixel_x = -496
pixel_y = -496

/obj/effect/shockwave/Initialize(mapload, radius, speed, easing_type = LINEAR_EASING, y_offset, x_offset)
. = ..()
if(!speed)
speed = 1
if(y_offset)
pixel_y += y_offset
if(x_offset)
pixel_x += x_offset
QDEL_IN(src, 0.5 * radius * speed)
transform = matrix().Scale(32 / 1024, 32 / 1024)
animate(src, time = 0.5 * radius * speed, transform=matrix().Scale((32 / 1024) * radius * 1.5, (32 / 1024) * radius * 1.5), easing = easing_type)

4 changes: 2 additions & 2 deletions code/modules/mob/living/carbon/human/species/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
var/gibbed_anim = "gibbed-h"
var/dusted_anim = "dust-h"
var/remains_type = /obj/effect/decal/remains/xeno
var/bloodsplatter_type = /obj/effect/bloodsplatter/human
var/bloodsplatter_type = /obj/effect/temp_visual/dir_setting/bloodsplatter/human
var/death_sound
var/death_message = "seizes up and falls limp, their eyes dead and lifeless..."

Expand Down Expand Up @@ -486,7 +486,7 @@
if(D)
color_override = D.color

var/obj/effect/bloodsplatter/bloodsplatter = new bloodsplatter_type(human.loc, splatter_dir, 5, color_override)
var/obj/effect/temp_visual/dir_setting/bloodsplatter/bloodsplatter = new bloodsplatter_type(human.loc, splatter_dir, 5, color_override)
return bloodsplatter

/datum/species/proc/get_status_tab_items()
Expand Down
Loading
Loading