diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm index da972b253e..281ae28785 100644 --- a/code/_onclick/ai.dm +++ b/code/_onclick/ai.dm @@ -161,6 +161,11 @@ electrify(0, 1) else electrify(-1, 1) + // Clientside only notification + var/turf/root_turf = get_turf(src) + var/image/client_only/electrify_notice/zap = new('icons/hud/screen_gen.dmi', root_turf, electrified_until ? "stamina_crit" : "stamina_dead", OBFUSCATION_LAYER, SOUTH) + zap.place_from_root(root_turf) + zap.append_client(user.client) return 1 /obj/machinery/turretid/AIAltClick() //toggles lethal on turrets diff --git a/code/game/objects/effects/client_only_image.dm b/code/game/objects/effects/client_only_image.dm index 3b87c721c1..526dba2a8b 100644 --- a/code/game/objects/effects/client_only_image.dm +++ b/code/game/objects/effects/client_only_image.dm @@ -18,6 +18,5 @@ // Mostly for motion echos, but someone will probably find another use for it... So parent type gets it instead! /image/client_only/proc/place_from_root(var/turf/At) - var/rand_limit = 12 - pixel_x += ((At.x - loc.x) * 32) + rand(-rand_limit,rand_limit) - pixel_y += ((At.y - loc.y) * 32) + rand(-rand_limit,rand_limit) + pixel_x = ((At.x - loc.x) * 32) + pixel_y = ((At.y - loc.y) * 32) diff --git a/code/game/objects/effects/electrify_notice.dm b/code/game/objects/effects/electrify_notice.dm new file mode 100644 index 0000000000..66cbaf855f --- /dev/null +++ b/code/game/objects/effects/electrify_notice.dm @@ -0,0 +1,13 @@ +/image/client_only/electrify_notice + plane = PLANE_FULLSCREEN + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + appearance_flags = (RESET_COLOR|PIXEL_SCALE|KEEP_APART) + +/image/client_only/electrify_notice/New(icon, loc, icon_state, layer, dir) + . = ..() + QDEL_IN(src, 1 SECOND) + +/image/client_only/electrify_notice/place_from_root(var/turf/At) + . = ..() + pixel_y += 8 + animate(src, pixel_y = 32, alpha = 0, time = 1 SECOND) diff --git a/code/game/objects/effects/motion_echo.dm b/code/game/objects/effects/motion_echo.dm index 211af8975c..b175267aa3 100644 --- a/code/game/objects/effects/motion_echo.dm +++ b/code/game/objects/effects/motion_echo.dm @@ -6,3 +6,9 @@ /image/client_only/motion_echo/New(icon, loc, icon_state, layer, dir) . = ..() QDEL_IN(src, 2 SECONDS) + +/image/client_only/motion_echo/place_from_root(var/turf/At) + . = ..() + var/rand_limit = 12 + pixel_x += rand(-rand_limit,rand_limit) + pixel_y += rand(-rand_limit,rand_limit) diff --git a/vorestation.dme b/vorestation.dme index 97d27d1dd0..df860d7d64 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -1598,6 +1598,7 @@ #include "code\game\objects\effects\countdown.dm" #include "code\game\objects\effects\effect_system.dm" #include "code\game\objects\effects\effect_system_ch.dm" +#include "code\game\objects\effects\electrify_notice.dm" #include "code\game\objects\effects\explosion_particles.dm" #include "code\game\objects\effects\floorbreak.dm" #include "code\game\objects\effects\gibs.dm"