diff --git a/.gitignore b/.gitignore index a4f5d33..0605a8d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -.git/ -.vs/ -bin/ -obj/ +.git/ +.vs/ +bin/ +obj/ *.sln \ No newline at end of file diff --git a/BetterStuff.csproj b/BetterStuff.csproj index 2d03814..6e4f41c 100644 --- a/BetterStuff.csproj +++ b/BetterStuff.csproj @@ -1,46 +1,46 @@ - - - - net6.0 - BetterStuff - Better Stuff - 1.1.0 - true - latest - - https://api.nuget.org/v3/index.json; - https://nuget.bepinex.dev/v3/index.json; - https://nuget.samboy.dev/v3/index.json - - BetterStuff - - - - - - - - - - ..\lib\Assembly-CSharp.dll - - - ..\lib\MyBox.dll - - - ..\lib\Il2Cppmscorlib.dll - - - ..\lib\UnityEngine.PhysicsModule.dll - - - ..\lib\UnityEngine.CoreModule.dll - - - ..\lib\Unity.InputSystem.dll - - - ..\lib\UnityEngine.AIModule.dll - - - + + + + net6.0 + BetterStuff + Better Stuff + 1.1.0 + true + latest + + https://api.nuget.org/v3/index.json; + https://nuget.bepinex.dev/v3/index.json; + https://nuget.samboy.dev/v3/index.json + + BetterStuff + + + + + + + + + + ..\lib\Assembly-CSharp.dll + + + ..\lib\MyBox.dll + + + ..\lib\Il2Cppmscorlib.dll + + + ..\lib\UnityEngine.PhysicsModule.dll + + + ..\lib\UnityEngine.CoreModule.dll + + + ..\lib\Unity.InputSystem.dll + + + ..\lib\UnityEngine.AIModule.dll + + + diff --git a/CHANGELOG b/CHANGELOG index 6cc7188..3928789 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,22 +1,22 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [1.1.0] - 2026-01-25 - -### Added -- Increased the walk speed of janitors, security guards and customer helpers -- Increased the scanning speed of customer helpers, customers and player on self checkouts -- Config contains the default gamevalues of each option - -## [1.0.0] - 2026-01-09 - -### Added -- Initial release -- Increased the scanning speed of cashiers -- Increased the time until the paymentprocess is finished -- Increased the time between scanningprocess an paymentprocess +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [1.1.0] - 2026-01-25 + +### Added +- Increased the walk speed of janitors, security guards and customer helpers +- Increased the scanning speed of customer helpers, customers and player on self checkouts +- Config contains the default gamevalues of each option + +## [1.0.0] - 2026-01-09 + +### Added +- Initial release +- Increased the scanning speed of cashiers +- Increased the time until the paymentprocess is finished +- Increased the time between scanningprocess an paymentprocess - Increased the walk speed of Restockers \ No newline at end of file diff --git a/LICENSE b/LICENSE index 808f6cb..6c85382 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,21 @@ -MIT License - -Copyright (c) 2025 Marc Philipp Burgmann - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +MIT License + +Copyright (c) 2025 Marc Philipp Burgmann + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Plugin.cs b/Plugin.cs index e868058..9994b9c 100644 --- a/Plugin.cs +++ b/Plugin.cs @@ -1,144 +1,146 @@ -using BepInEx; -using BepInEx.Configuration; -using BepInEx.Logging; -using BepInEx.Unity.IL2CPP; -using HarmonyLib; - -namespace BetterStuff; - -[BepInPlugin(PLUGIN_GUID, PLUGIN_NAME, PLUGIN_VERSION)] -public class Plugin : BasePlugin -{ - public const string PLUGIN_GUID = "de.mpburgmann.BetterStuff"; - public const string PLUGIN_NAME = "Better Stuff"; - public const string PLUGIN_VERSION = "1.1.0"; - internal static new ManualLogSource Log; - - private static ConfigEntry scanTime; - private static ConfigEntry finishDuration; - private static ConfigEntry timeAfterScans; - private static ConfigEntry restockerSpeed; - private static ConfigEntry selfcheckoutCustomerSpeed; - private static ConfigEntry selfcheckoutPlayerSpeed; - private static ConfigEntry customerHelperScanningSpeed; - private static ConfigEntry customerHelperSpeed; - private static ConfigEntry securityGuardSpeed; - private static ConfigEntry janitorSpeed; - - - public override void Load() - { - // Plugin startup logic - Log = base.Log; - Log.LogInfo($"Plugin {MyPluginInfo.PLUGIN_GUID} is loaded!"); - - scanTime = Config.Bind("Cashier", "Scanning Speed", 0.7f, "Default vanilla value is 1.5."); - finishDuration = Config.Bind("Cashier", "FinishingDuration", 1f, "Default vanilla value is 2."); - timeAfterScans = Config.Bind("Cashier", "TimeAfterAllScans", 0.5f, "Default vanilla value is 1."); - - restockerSpeed = Config.Bind("Restocker", "Speed", 5f, "Default value is 2."); - - selfcheckoutCustomerSpeed = Config.Bind("Selfcheckout", "Customer Speed", 0.6f, "Default vanilla value is 1.8."); - selfcheckoutPlayerSpeed = Config.Bind("Selfcheckout", "Player Speed", 0.3f, "Default vanilla value is 0.6."); - - customerHelperScanningSpeed = Config.Bind("Customer Helper", "Scanning Speed", 0.5f, "Default vanilla value is 1.5."); - customerHelperSpeed = Config.Bind("Customer Helper", "Speed", 5f, "Default value is 2."); - - securityGuardSpeed = Config.Bind("Security Guard", "Speed", 5f, "Default value is 2."); - - janitorSpeed = Config.Bind("Janitor", "Speed", 5f, "Default value is 2."); - - - Harmony harmony = new(PLUGIN_GUID); - harmony.PatchAll(); - } - - [HarmonyPatch(typeof(Cashier), "Start")] - public static class Cashier_Start_Patch - { - [HarmonyPostfix] - public static void Postfix(Cashier __instance) - { - __instance.ScanningInterval = scanTime.Value; - } - } - - [HarmonyPatch(typeof(Checkout), "FinishedScanning")] - public static class Cashier_Checkout_Patch - { - [HarmonyPostfix] - public static void Postfix(Checkout __instance) - { - if(!__instance.m_IsSelfCheckout) - { - __instance.m_AutomatedCheckout.m_FinishingPaymentDuration = finishDuration.Value; - __instance.m_AutomatedCheckout.m_IntervalAfterScanningAll = timeAfterScans.Value; - } - } - } - - [HarmonyPatch(typeof(Restocker), "Start")] - public static class Restocker_Start_Patch - { - [HarmonyPostfix] - public static void Postfix(Restocker __instance) - { - __instance.m_Agent.speed = restockerSpeed.Value; - __instance.m_Agent.acceleration *= 200f; - __instance.m_Agent.angularSpeed *= 200f; - } - } - - [HarmonyPatch(typeof(Checkout), "Start")] - public static class Selfcheckout_Start_Patch - { - [HarmonyPostfix] - public static void Postfix(Checkout __instance) - { - if (__instance.m_IsSelfCheckout) - { - __instance.m_SelfCheckout.m_CustomerScanningInterval = selfcheckoutCustomerSpeed.Value; - __instance.m_SelfCheckout.m_PlayerScanningInterval = selfcheckoutPlayerSpeed.Value; - } - } - } - - [HarmonyPatch(typeof(CustomerHelper), "Start")] - public static class CustomerHelper_Start_Patch - { - [HarmonyPostfix] - public static void Postfix(CustomerHelper __instance) - { - __instance.ScanningInterval = customerHelperScanningSpeed.Value; - __instance.m_CustomerHelperScanIntervals = new Il2CppSystem.Collections.Generic.List(1); - __instance.m_CustomerHelperScanIntervals.Add(customerHelperScanningSpeed.Value); - __instance.m_Agent.speed = customerHelperSpeed.Value; - __instance.m_Agent.acceleration *= 200f; - __instance.m_Agent.angularSpeed *= 200f; - } - } - - [HarmonyPatch(typeof(SecurityGuard), "Start")] - public static class SecurityGuard_Start_Patch - { - [HarmonyPostfix] - public static void Postfix(SecurityGuard __instance) - { - __instance.m_AnimController.m_Agent.speed = securityGuardSpeed.Value; - __instance.m_AnimController.m_Agent.acceleration *= 200f; - __instance.m_AnimController.m_Agent.angularSpeed *= 200f; - } - } - - [HarmonyPatch(typeof(Janitor), "Start")] - public static class Janitor_Start_Patch - { - [HarmonyPostfix] - public static void Postfix(Janitor __instance) - { - __instance.m_Agent.speed = janitorSpeed.Value; - __instance.m_Agent.acceleration *= 200f; - __instance.m_Agent.angularSpeed *= 200f; - } - } +using __Project__.Scripts.Janitor; +using BepInEx; +using BepInEx.Configuration; +using BepInEx.Logging; +using BepInEx.Unity.IL2CPP; +using HarmonyLib; + +namespace BetterStuff; + +[BepInPlugin(PLUGIN_GUID, PLUGIN_NAME, PLUGIN_VERSION)] +public class Plugin : BasePlugin +{ + public const string PLUGIN_GUID = "de.mpburgmann.BetterStuff"; + public const string PLUGIN_NAME = "Better Stuff"; + public const string PLUGIN_VERSION = "1.1.1"; + internal static new ManualLogSource Log; + + private static ConfigEntry scanTime; + private static ConfigEntry finishDuration; + private static ConfigEntry timeAfterScans; + private static ConfigEntry restockerSpeed; + private static ConfigEntry selfcheckoutCustomerSpeed; + private static ConfigEntry selfcheckoutPlayerSpeed; + private static ConfigEntry customerHelperScanningSpeed; + private static ConfigEntry customerHelperSpeed; + private static ConfigEntry securityGuardSpeed; + private static ConfigEntry janitorSpeed; + + + public override void Load() + { + // Plugin startup logic + Log = base.Log; + Log.LogInfo($"Plugin {MyPluginInfo.PLUGIN_GUID} is loaded!"); + + scanTime = Config.Bind("Cashier", "Scanning Speed", 0.7f, "Default vanilla value is 1.5."); + finishDuration = Config.Bind("Cashier", "FinishingDuration", 1f, "Default vanilla value is 2."); + timeAfterScans = Config.Bind("Cashier", "TimeAfterAllScans", 0.5f, "Default vanilla value is 1."); + + restockerSpeed = Config.Bind("Restocker", "Speed", 5f, "Default value is 2."); + + selfcheckoutCustomerSpeed = Config.Bind("Selfcheckout", "Customer Speed", 0.6f, "Default vanilla value is 1.8."); + selfcheckoutPlayerSpeed = Config.Bind("Selfcheckout", "Player Speed", 0.3f, "Default vanilla value is 0.6."); + + customerHelperScanningSpeed = Config.Bind("Customer Helper", "Scanning Speed", 0.5f, "Default vanilla value is 1.5."); + customerHelperSpeed = Config.Bind("Customer Helper", "Speed", 5f, "Default value is 2."); + + securityGuardSpeed = Config.Bind("Security Guard", "Speed", 5f, "Default value is 2."); + + janitorSpeed = Config.Bind("Janitor", "Speed", 5f, "Default value is 2."); + + + Harmony harmony = new(PLUGIN_GUID); + harmony.PatchAll(); + } + + [HarmonyPatch(typeof(Cashier), "Start")] + public static class Cashier_Start_Patch + { + [HarmonyPostfix] + public static void Postfix(Cashier __instance) + { + __instance.ScanningInterval = scanTime.Value; + } + } + + [HarmonyPatch(typeof(Checkout), "FinishedScanning")] + public static class Cashier_Checkout_Patch + { + [HarmonyPostfix] + public static void Postfix(Checkout __instance) + { + if(!__instance.m_IsSelfCheckout) + { + __instance.m_AutomatedCheckout.m_FinishingPaymentDuration = finishDuration.Value; + __instance.m_AutomatedCheckout.m_IntervalAfterScanningAll = timeAfterScans.Value; + } + } + } + + [HarmonyPatch(typeof(Restocker), "Start")] + public static class Restocker_Start_Patch + { + [HarmonyPostfix] + public static void Postfix(Restocker __instance) + { + __instance.m_Agent.speed = restockerSpeed.Value; + __instance.m_Agent.acceleration *= 200f; + __instance.m_Agent.angularSpeed *= 200f; + } + } + + [HarmonyPatch(typeof(Checkout), "Start")] + public static class Selfcheckout_Start_Patch + { + [HarmonyPostfix] + public static void Postfix(Checkout __instance) + { + if (__instance.m_IsSelfCheckout) + { + __instance.m_SelfCheckout.m_CustomerScanningInterval = selfcheckoutCustomerSpeed.Value; + __instance.m_SelfCheckout.m_PlayerScanningInterval = selfcheckoutPlayerSpeed.Value; + } + } + } + + [HarmonyPatch(typeof(CustomerHelper), "Start")] + public static class CustomerHelper_Start_Patch + { + [HarmonyPostfix] + public static void Postfix(CustomerHelper __instance) + { + __instance.ScanningInterval = customerHelperScanningSpeed.Value; + __instance.m_CustomerHelperScanIntervals = new Il2CppSystem.Collections.Generic.List(1); + __instance.m_CustomerHelperScanIntervals.Add(customerHelperScanningSpeed.Value); + __instance.m_Agent.speed = customerHelperSpeed.Value; + __instance.m_Agent.acceleration *= 200f; + __instance.m_Agent.angularSpeed *= 200f; + } + } + + [HarmonyPatch(typeof(SecurityGuard), "Start")] + public static class SecurityGuard_Start_Patch + { + [HarmonyPostfix] + public static void Postfix(SecurityGuard __instance) + { + __instance.m_AnimController.m_Agent.speed = securityGuardSpeed.Value; + __instance.m_AnimController.m_Agent.acceleration *= 200f; + __instance.m_AnimController.m_Agent.angularSpeed *= 200f; + } + } + + [HarmonyPatch(typeof(Janitor), "Start")] + public static class Janitor_Start_Patch + { + [HarmonyPostfix] + public static void Postfix(Janitor __instance) + { + __instance.m_Agent.speed = janitorSpeed.Value; + __instance.m_Agent.acceleration *= 200f; + __instance.m_Agent.angularSpeed *= 200f; + } + } + } \ No newline at end of file