Skip to content

Commit

Permalink
Merge pull request Baystation12#34466 from MuckerMayhem/whoops
Browse files Browse the repository at this point in the history
fix interlude tp chance being 100%
  • Loading branch information
Spookerton authored Jan 16, 2024
2 parents 7053e26 + ca590a4 commit 9287ea3
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions code/game/machinery/bluespace_drive.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
///Whether or not the BSD Instability event is active
var/instability_event_active = FALSE

///Chance to teleport someone to the interlude during a pulse.
var/interlude_chance = 55


/obj/machinery/bluespacedrive/Destroy()
QDEL_NULL(drive_sound)
Expand Down Expand Up @@ -143,7 +146,7 @@
playsound(src, 'sound/effects/EMPulse.ogg', 100, TRUE)
var/datum/bubble_effect/bluespace_pulse/parent
for (var/level in GetConnectedZlevels(z))
parent = new (x, y, level, 1, 1, parent)
parent = new (x, y, level, 1, 1, parent, interlude_teleport_chance = interlude_chance)


/// Creates a blinding flash of light that will blind and deafen those in range, and change turfs to bluespace
Expand Down Expand Up @@ -171,9 +174,11 @@
/datum/bubble_effect/bluespace_pulse
///List of mobs that can be swapped around when the pulse hits
var/list/mob/living/mobs_to_switch = list()
var/interlude_teleport_chance = 0

/datum/bubble_effect/bluespace_pulse/New()
/datum/bubble_effect/bluespace_pulse/New(interlude_teleport_chance = 50)
..()
src.interlude_teleport_chance = interlude_teleport_chance
START_PROCESSING(SSfastprocess, src)
var/list/zlevels = GetConnectedZlevels(z)
for (var/mob/living/L as anything in GLOB.alive_mobs)
Expand Down Expand Up @@ -212,7 +217,7 @@
if (!(mob.z in zlevels))
continue

if (GLOB.using_map.use_bluespace_interlude && prob(100))
if (GLOB.using_map.use_bluespace_interlude && prob(interlude_teleport_chance))
addtimer(new Callback(GLOBAL_PROC, /proc/do_unstable_teleport_safe, mob, GetConnectedZlevels(mob.z)), rand(1, 2) MINUTES)
GLOB.using_map.do_interlude_teleport(mob, duration = rand(1, 2.5) MINUTES)
return
Expand Down

0 comments on commit 9287ea3

Please sign in to comment.