diff --git a/Main.cs b/Main.cs index 78e5ad0..64e85a0 100644 --- a/Main.cs +++ b/Main.cs @@ -3,7 +3,7 @@ namespace MoreRealism { - public class Main : IMod + public class Main : AbstractMod { private GameObject _controllerGO; private MoreRealismController _controllerPrefab; @@ -13,7 +13,7 @@ public Main() SetupKeyBinding(); } - public void onEnabled() + public override void onEnabled() { GameObject controllerPrefabGO = new GameObject(); _controllerPrefab = controllerPrefabGO.AddComponent(); @@ -25,7 +25,7 @@ public void onEnabled() EventManager.Instance.OnStartPlayingPark += MoreRealismController.Instance.Load; } - public void onDisabled() + public override void onDisabled() { if (MoreRealismController.Instance != null) { @@ -38,8 +38,8 @@ public void onDisabled() private void SetupKeyBinding() { - KeyGroup group = new KeyGroup(Identifier); - group.keyGroupName = Name; + KeyGroup group = new KeyGroup(getIdentifier()); + group.keyGroupName = getName(); InputManager.Instance.registerKeyGroup(group); @@ -49,20 +49,41 @@ private void SetupKeyBinding() private void RegisterKey(string identifier, KeyCode keyCode, string name, string description = "") { - KeyMapping key = new KeyMapping(Identifier + "/" + identifier, keyCode, KeyCode.None); - key.keyGroupIdentifier = Identifier; + KeyMapping key = new KeyMapping(getIdentifier() + "/" + identifier, keyCode, KeyCode.None); + key.keyGroupIdentifier = getIdentifier(); key.keyName = name; key.keyDescription = description; InputManager.Instance.registerKeyMapping(key); } + public override bool isMultiplayerModeCompatible() + { + return true; + } - public string Name => "More Realism"; + public override bool isRequiredByAllPlayersInMultiplayerMode() + { + return true; + } - public string Description => "Add new mechanics to make the game more realistic"; + public override string getName() + { + return "More Realism"; + } - public string Identifier => "TheMasterCado@MoreRealism"; + public override string getDescription() + { + return "Add new mechanics to make the game more realistic"; + } + + public override string getIdentifier() + { + return "TheMasterCado@MoreRealism"; + } - public string Version => MoreRealismController.Version; + public override string getVersionNumber() + { + return MoreRealismController.Version; + } } } \ No newline at end of file diff --git a/MoreRealismController.cs b/MoreRealismController.cs index 16aa463..525310c 100644 --- a/MoreRealismController.cs +++ b/MoreRealismController.cs @@ -7,7 +7,7 @@ namespace MoreRealism { public class MoreRealismController : SerializedMonoBehaviour { - public static string Version = "1.3"; + public static string Version = "1.4"; public static MoreRealismController Instance; public List windows = new List(); diff --git a/MoreRealism_debug/MoreRealism.dll b/MoreRealism_debug/MoreRealism.dll index bfcd14e..b3e7bee 100644 Binary files a/MoreRealism_debug/MoreRealism.dll and b/MoreRealism_debug/MoreRealism.dll differ diff --git a/MoreRealism_debug/MoreRealism.pdb b/MoreRealism_debug/MoreRealism.pdb index 90f2828..eef1ded 100644 Binary files a/MoreRealism_debug/MoreRealism.pdb and b/MoreRealism_debug/MoreRealism.pdb differ diff --git a/TheMasterCado@MoreRealism/MoreRealism.dll b/TheMasterCado@MoreRealism/MoreRealism.dll index 6b4400a..533da2f 100644 Binary files a/TheMasterCado@MoreRealism/MoreRealism.dll and b/TheMasterCado@MoreRealism/MoreRealism.dll differ