Skip to content

Commit 13a8c99

Browse files
committed
Skip seed combining cutscene if transitioning out during it
1 parent 76b8674 commit 13a8c99

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Entities/MultiRoomStrawberry.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,12 @@ public override void Update() {
4949
seed.Strawberry = this;
5050
}
5151

52-
Scene.Add(new CSGEN_StrawberrySeeds(this));
52+
// build the "seed merging" cutscene with a transition listener to prevent it from breaking the game if the player transitions out before time is frozen.
53+
CutsceneEntity seedsCutscene = new CSGEN_StrawberrySeeds(this);
54+
seedsCutscene.Add(new TransitionListener() {
55+
OnOutBegin = () => SceneAs<Level>().SkipCutscene()
56+
});
57+
Scene.Add(seedsCutscene);
5358

5459
// also clean up the session, since the seeds are now gone.
5560
List<SpringCollab2020Session.MultiRoomStrawberrySeedInfo> seedList = SpringCollab2020Module.Instance.Session.CollectedMultiRoomStrawberrySeeds;

0 commit comments

Comments
 (0)