From 85074d5947856f5c8d673b141056d26fcc267115 Mon Sep 17 00:00:00 2001 From: Graicc <33105645+Graicc@users.noreply.github.com> Date: Sun, 2 Jan 2022 18:36:44 -0500 Subject: [PATCH] Update to utilla 1.5.0 --- SpaceMonke/SpaceMonke.cs | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/SpaceMonke/SpaceMonke.cs b/SpaceMonke/SpaceMonke.cs index e981e35..c5ceb89 100644 --- a/SpaceMonke/SpaceMonke.cs +++ b/SpaceMonke/SpaceMonke.cs @@ -9,26 +9,30 @@ namespace SpaceMonke { [BepInPlugin("org.legoandmars.gorillatag.spacemonke", "Space Monke", "1.2.0")] - [BepInDependency("org.legoandmars.gorillatag.utilla", "1.3.0")] + [BepInDependency("org.legoandmars.gorillatag.utilla", "1.5.0")] + [ModdedGamemode] public class SpaceMonke : BaseUnityPlugin { public static bool allowSpaceMonke = false; public static ConfigEntry multiplier; void Awake() { - Utilla.Events.RoomJoined += RoomJoined; SpaceMonkePatches.ApplyHarmonyPatches(); var customFile = new ConfigFile(Path.Combine(Paths.ConfigPath, "SpaceMonke.cfg"), true); multiplier = customFile.Bind("Configuration", "JumpMultiplier", 10f, "How much to multiply the jump height/distance by. 10 = 10x higher jumps"); } - private void RoomJoined(object sender, Events.RoomJoinedArgs e) - { - if(e != null && e.isPrivate != null) - { - allowSpaceMonke = e.isPrivate; - } - } + [ModdedGamemodeJoin] + private void RoomJoined() + { + allowSpaceMonke = true; + } + + [ModdedGamemodeLeave] + private void RoomLeft() + { + allowSpaceMonke = false; + } } } \ No newline at end of file