[MIRROR] Megafauna teleportion exploit fix (#475)

* Megafauna teleportion exploit fix (#53093)

Prevents megafauna from being added to a chilling bluespace extract's linked list, removing a way of teleporting all the megafauna from lavaland onto the station at once.
Also prevents regenerative bluespace extracts from instantly teleporting megas to where the extract was made.

* Megafauna teleportion exploit fix

Co-authored-by: ArcaneDefence <51932756+ArcaneDefence@users.noreply.github.com>
This commit is contained in:
SkyratBot
2020-08-23 20:22:50 +02:00
committed by GitHub
co-authored by ArcaneDefence
parent a7e1008b1a
commit e53c860520
3 changed files with 16 additions and 12 deletions
@@ -83,10 +83,10 @@
if(interrupted || !ismob(target))
to_chat(owner, "<span class='warning'>The bluespace tug fades away, and you feel that the force has passed you by.</span>")
return
owner.visible_message("<span class='warning'>[owner] disappears in a flurry of sparks!</span>",
"<span class='warning'>The unknown force snatches briefly you from reality, and deposits you next to [target]!</span>")
do_sparks(3, TRUE, owner)
owner.forceMove(target.loc)
var/turf/old_location = get_turf(owner)
if(do_teleport(owner, target.loc, channel = TELEPORT_CHANNEL_QUANTUM)) //despite being named a bluespace teleportation method the quantum channel is used to preserve precision teleporting with a bag of holding
old_location.visible_message("<span class='warning'>[owner] disappears in a flurry of sparks!</span>")
to_chat(owner, "<span class='warning'>The unknown force snatches briefly you from reality, and deposits you next to [target]!</span>")
/obj/screen/alert/status_effect/freon/stasis
desc = "You're frozen inside of a protective ice cube! While inside, you can't do anything, but are immune to harm! Resist to get out."
@@ -149,6 +149,9 @@ Chilling extracts:
/obj/item/slimecross/chilling/bluespace/afterattack(atom/target, mob/user, proximity)
if(!proximity || !isliving(target) || active)
return
if(HAS_TRAIT(target, TRAIT_NO_TELEPORT))
to_chat(user, "<span class='warning'>[target] resists being linked with [src]!</span>")
return
if(target in allies)
allies -= target
to_chat(user, "<span class='notice'>You unlink [src] with [target].</span>")
@@ -23,11 +23,11 @@ Regenerative extracts:
to_chat(user, "<span class='warning'>[src] will not work on the dead!</span>")
return
if(H != user)
user.visible_message("<span class='notice'>[user] crushes the [src] over [H], the milky goo quickly regenerating all of [H.p_their()] injuries!</span>",
"<span class='notice'>You squeeze the [src], and it bursts over [H], the milky goo regenerating [H.p_their()] injuries.</span>")
user.visible_message("<span class='notice'>[user] crushes [src] over [H], the milky goo quickly regenerating all of [H.p_their()] injuries!</span>",
"<span class='notice'>You squeeze [src], and it bursts over [H], the milky goo regenerating [H.p_their()] injuries.</span>")
else
user.visible_message("<span class='notice'>[user] crushes the [src] over [user.p_them()]self, the milky goo quickly regenerating all of [user.p_their()] injuries!</span>",
"<span class='notice'>You squeeze the [src], and it bursts in your hand, splashing you with milky goo which quickly regenerates your injuries!</span>")
user.visible_message("<span class='notice'>[user] crushes [src] over [user.p_them()]self, the milky goo quickly regenerating all of [user.p_their()] injuries!</span>",
"<span class='notice'>You squeeze [src], and it bursts in your hand, splashing you with milky goo which quickly regenerates your injuries!</span>")
core_effect_before(H, user)
H.revive(full_heal = TRUE, admin_revive = FALSE)
core_effect(H, user)
@@ -144,10 +144,11 @@ Regenerative extracts:
var/turf/open/T
/obj/item/slimecross/regenerative/bluespace/core_effect(mob/living/target, mob/user)
target.visible_message("<span class='warning'>[src] disappears in a shower of sparks!</span>","<span class='danger'>The milky goo teleports you somewhere it remembers!</span>")
do_sparks(5,FALSE,target)
target.forceMove(T)
do_sparks(5,FALSE,target)
var/turf/old_location = get_turf(target)
if(do_teleport(target, T, channel = TELEPORT_CHANNEL_QUANTUM)) //despite being named a bluespace teleportation method the quantum channel is used to preserve precision teleporting with a bag of holding
old_location.visible_message("<span class='warning'>[target] disappears in a shower of sparks!</span>")
to_chat(target, "<span class='danger'>The milky goo teleports you somewhere it remembers!</span>")
/obj/item/slimecross/regenerative/bluespace/Initialize()
. = ..()