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 15:45:58 +01:00
committed by GitHub
co-authored by Luc
parent 79c2e797bb
commit c874e8d1d9
2 changed files with 9 additions and 5 deletions
+1 -1
View File
@@ -743,7 +743,7 @@
target_cryopod = safepick(free_cryopods)
if(target_cryopod.check_occupant_allowed(person_to_cryo))
var/turf/T = get_turf(person_to_cryo)
var/obj/effect/portal/SP = new /obj/effect/portal(T, null, null, 40)
var/obj/effect/portal/SP = new /obj/effect/portal(T, null, null, 40, FALSE)
SP.name = "NT SSD Teleportation Portal"
target_cryopod.take_occupant(person_to_cryo, 1)
return 1
+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