Skip to content

Commit

Permalink
Update to utilla 1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Graicc committed Jan 2, 2022
1 parent d492f45 commit 85074d5
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions SpaceMonke/SpaceMonke.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<float> 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;
}
}
}

0 comments on commit 85074d5

Please sign in to comment.