diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index ed851057cb9..7eef4895220 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -242,6 +242,11 @@ return swap_hand() +/mob/living/carbon/human/MiddleClickOn(var/atom/A) + if(species.handle_middle_mouse_click(src, A)) + return + return ..() + // In case of use break glass /* /atom/proc/MiddleClick(var/mob/M as mob) diff --git a/code/_onclick/hud/fullscreen.dm b/code/_onclick/hud/fullscreen.dm index e94445021b9..f698c05618f 100644 --- a/code/_onclick/hud/fullscreen.dm +++ b/code/_onclick/hud/fullscreen.dm @@ -143,4 +143,7 @@ /obj/screen/fullscreen/frenzy icon_state = "frenzyoverlay" - layer = OBFUSCATION_LAYER \ No newline at end of file + layer = OBFUSCATION_LAYER + +/obj/screen/fullscreen/teleport + icon_state = "teleport" diff --git a/code/game/objects/effects/overlays.dm b/code/game/objects/effects/overlays.dm index 079bc538728..736cea9a124 100644 --- a/code/game/objects/effects/overlays.dm +++ b/code/game/objects/effects/overlays.dm @@ -109,3 +109,13 @@ layer = FLOAT_LAYER vis_flags = VIS_INHERIT_ID appearance_flags = KEEP_TOGETHER | LONG_GLIDE | PIXEL_SCALE + +/obj/effect/overlay/teleport_pulse + icon = 'icons/effects/effects.dmi' + icon_state = "emppulse" + mouse_opacity = FALSE + anchored = TRUE + +/obj/effect/overlay/teleport_pulse/Initialize(mapload, ...) + . = ..() + QDEL_IN(src, 8) diff --git a/code/modules/mob/living/carbon/human/species/outsider/revenant.dm b/code/modules/mob/living/carbon/human/species/outsider/revenant.dm index 68e215dea83..0950b26567b 100644 --- a/code/modules/mob/living/carbon/human/species/outsider/revenant.dm +++ b/code/modules/mob/living/carbon/human/species/outsider/revenant.dm @@ -143,6 +143,31 @@ return -1 return ..() +/datum/species/revenant/handle_middle_mouse_click(var/mob/living/carbon/human/user, var/atom/target) + if(user.incapacitated() || user.last_special + 5 SECONDS > world.time) + return FALSE + if(!isturf(target)) + target = get_turf(target) + if(!isturf(target)) + return FALSE + + if(turf_contains_dense_objects(target)) + return FALSE + + new /obj/effect/overlay/teleport_pulse(user.loc) + + user.last_special = world.time + user.visible_message("[user] disappears with a flash!", SPAN_NOTICE("You jump into the nothing.")) + user.forceMove(target) + user.visible_message("[user] appears out of thin air!", SPAN_NOTICE("You successfully step into your destination.")) + + user.overlay_fullscreen("teleport", /obj/screen/fullscreen/teleport) + user.clear_fullscreen("teleport", 5 SECONDS) + + playsound(get_turf(user), pick('sound/hallucinations/behind_you1.ogg', 'sound/hallucinations/behind_you2.ogg', 'sound/hallucinations/i_see_you1.ogg', 'sound/hallucinations/i_see_you2.ogg', 'sound/hallucinations/im_here1.ogg', 'sound/hallucinations/im_here2.ogg', 'sound/hallucinations/look_up1.ogg', 'sound/hallucinations/look_up2.ogg', 'sound/hallucinations/over_here1.ogg', 'sound/hallucinations/over_here2.ogg', 'sound/hallucinations/over_here3.ogg', 'sound/hallucinations/turn_around1.ogg', 'sound/hallucinations/turn_around2.ogg'), 50, TRUE) + + return TRUE + /obj/item/organ/internal/eyes/night/revenant name = "spectral eyes" desc = "A pair of glowing eyes. The ocular nerves still slowly writhe." diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 65f4fcb4e87..fd92c7d5e69 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -838,3 +838,6 @@ /datum/species/proc/drain_stamina(var/mob/living/carbon/human/human, var/stamina_cost) human.stamina -= stamina_cost human.hud_used.move_intent.update_move_icon(human) + +/datum/species/proc/handle_middle_mouse_click(var/atom/target) + return diff --git a/html/changelogs/geeves-revenant_teleportation.yml b/html/changelogs/geeves-revenant_teleportation.yml new file mode 100644 index 00000000000..fbacd1af719 --- /dev/null +++ b/html/changelogs/geeves-revenant_teleportation.yml @@ -0,0 +1,6 @@ +author: Geeves + +delete-after: True + +changes: + - rscadd: "Revenants can now teleport anywhere they can see with the middle mouse button, as long as there isn't a dense object on the tile. It has a five second cooldown." diff --git a/icons/mob/screen/full.dmi b/icons/mob/screen/full.dmi index 94f2e10ded4..0cd28e2816e 100644 Binary files a/icons/mob/screen/full.dmi and b/icons/mob/screen/full.dmi differ