The automatic Cryo storage Portal will no longer spark on use (#21739)

* New cryo portal subtype

* A better way to do it

* Update code/game/objects/effects/portals.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>

---------

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
This commit is contained in:
Bjamcham
2023-07-24 10:45:58 -04:00
committed by GitHub
parent 79c2e797bb
commit c874e8d1d9
2 changed files with 9 additions and 5 deletions
+8 -4
View File
@@ -22,8 +22,10 @@
var/one_use = FALSE // Does this portal go away after one teleport?
/// The time after which the effects should play again. Too many effects can lag the server
var/effect_cooldown = 0
/obj/effect/portal/New(loc, turf/_target, obj/creation_object = null, lifespan = 300, mob/creation_mob = null)
///Whether or not portal use will cause sparks
var/create_sparks = TRUE
/obj/effect/portal/New(loc, turf/_target, obj/creation_object = null, lifespan = 300, mob/creation_mob = null, create_sparks = TRUE)
..()
GLOB.portals += src
@@ -44,7 +46,8 @@
if(!QDELETED(O))
O.portal_destroyed(src)
target = null
do_sparks(5, 0, loc)
if(create_sparks)
do_sparks(5, 0, loc)
return ..()
/obj/effect/portal/singularity_pull()
@@ -142,7 +145,8 @@
/obj/effect/portal/proc/invalid_teleport()
visible_message("<span class='warning'>[src] flickers and fails due to bluespace interference!</span>")
do_sparks(5, 0, loc)
if(create_sparks)
do_sparks(5, 0, loc)
qdel(src)
#define UNSTABLE_TIME_DELAY 2 SECONDS