diff --git a/info.json b/info.json index d90127c..4d1178d 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "Id": "tostilities", - "Version": "0.0.1", + "Version": "0.0.2", "DisplayName": "Tostilities", "Author": "Tostiman", "EntryMethod": "tostilities.Main.Load", diff --git a/repository.json b/repository.json index bcc10bc..7e12cd8 100644 --- a/repository.json +++ b/repository.json @@ -1,5 +1,10 @@ { "Releases": [ + { + "Id": "tostilities", + "Version": "0.0.2", + "DownloadUrl": "https://github.com/t0stiman/rr_tostilities/releases/download/v0.0.2/tostilities.zip" + }, { "Id": "tostilities", "Version": "0.0.1", diff --git a/src/Patches/Console_Patch.cs b/src/Patches/Console_Patch.cs index 04cea3c..566bd06 100644 --- a/src/Patches/Console_Patch.cs +++ b/src/Patches/Console_Patch.cs @@ -15,6 +15,5 @@ private static void Prefix(ref string text) } text = $"{DateTime.Now.ToString("HH:mm")} | " + text; - //todo PlayersManager.NotifyOfNewPlayers already has a timestamp } } \ No newline at end of file diff --git a/src/Patches/TrainController_Patch.cs b/src/Patches/IntegrationSet_Patch.cs similarity index 55% rename from src/Patches/TrainController_Patch.cs rename to src/Patches/IntegrationSet_Patch.cs index c0f3a78..4c56e3a 100644 --- a/src/Patches/TrainController_Patch.cs +++ b/src/Patches/IntegrationSet_Patch.cs @@ -1,13 +1,14 @@ using HarmonyLib; +using Model.Physics; namespace tostilities.Patches; /// /// Super-human strength /// -[HarmonyPatch(typeof(TrainController))] -[HarmonyPatch(nameof(TrainController.HandleManualMoveCar))] -public class TrainController_HandleManualMoveCar_Patch +[HarmonyPatch(typeof(IntegrationSet))] +[HarmonyPatch(nameof(IntegrationSet.AddVelocityToCar))] +public class IntegrationSet_AddVelocityToCar_Patch { private static void Prefix(ref float amount) { diff --git a/src/Settings.cs b/src/Settings.cs index 8cc0aa9..728d73b 100644 --- a/src/Settings.cs +++ b/src/Settings.cs @@ -9,7 +9,7 @@ public class Settings : UnityModManager.ModSettings public const string playername_replaceo = ""; private const int SPACE = 15; - public float PushForceMultiplier = 10; + public int PushForceMultiplier = 10; private string PushForceMultiplier_text; public bool DisableDerailing = false; @@ -38,7 +38,7 @@ public void Draw(UnityModManager.ModEntry modEntry) GUILayout.Label("These only work in multiplayer if you are the server host, and apply to ALL players:"); GUILayout.Space(SPACE); - DrawFloatInput("Car push force multiplier. Higher number -> bigger YEET.", ref PushForceMultiplier_text, ref PushForceMultiplier); + DrawIntInput("Car push force multiplier. Higher number -> bigger YEET.", ref PushForceMultiplier_text, ref PushForceMultiplier); DisableDerailing = GUILayout.Toggle(DisableDerailing, "Disable derailing"); DisableDamage = GUILayout.Toggle(DisableDamage, "Disable damage to rolling stock"); @@ -53,14 +53,14 @@ public void Draw(UnityModManager.ModEntry modEntry) } } - private void DrawFloatInput(string descriptionText, ref string fieldText, ref float number) + private void DrawIntInput(string descriptionText, ref string fieldText, ref int number) { GUILayout.BeginHorizontal(); GUILayout.Label(descriptionText); fieldText = GUILayout.TextField(fieldText); GUILayout.EndHorizontal(); - if (float.TryParse(fieldText, out float parsed)) + if (int.TryParse(fieldText, out int parsed)) { number = parsed; }