From 21397e52dbea0edcb2534162a755f17955249bd0 Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Sun, 4 May 2025 10:37:13 -0400 Subject: [PATCH 01/36] Add a thunderstore.build.props that is configured for devs using Thunderstore --- S1API/S1API.csproj | 6 +++++- S1APILoader/S1APILoader.csproj | 8 ++++++-- thunderstore.build.props | 35 ++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 thunderstore.build.props diff --git a/S1API/S1API.csproj b/S1API/S1API.csproj index 85a23c63..dd27e717 100644 --- a/S1API/S1API.csproj +++ b/S1API/S1API.csproj @@ -2,7 +2,11 @@ - + + + + diff --git a/S1APILoader/S1APILoader.csproj b/S1APILoader/S1APILoader.csproj index b664e6a4..0d3ad75a 100644 --- a/S1APILoader/S1APILoader.csproj +++ b/S1APILoader/S1APILoader.csproj @@ -2,7 +2,11 @@ - + + + + @@ -12,7 +16,7 @@ AnyCPU S1APILoader - + $(MelonLoaderAssembliesPath)\0Harmony.dll diff --git a/thunderstore.build.props b/thunderstore.build.props new file mode 100644 index 00000000..8fca05f0 --- /dev/null +++ b/thunderstore.build.props @@ -0,0 +1,35 @@ + + + + + + + + + + true + + + $(AppData)\Thunderstore Mod Manager\DataFolder\ScheduleI\profiles\Default\MelonLoader\net6 + TBD + + + + + $(AppData)\Thunderstore Mod Manager\DataFolder\ScheduleI\profiles\Default + + + C:\Program Files (x86)\Steam\steamapps\common\Schedule I\Schedule I_Data\Managed + + + + + $(AppData)\Thunderstore Mod Manager\DataFolder\ScheduleI\profiles\Default + + + $(AppData)\Thunderstore Mod Manager\DataFolder\ScheduleI\profiles\Default\MelonLoader\Il2CppAssemblies + + + TBD + + From 3e6ad934ad80be677c6958577554b45e067431c6 Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Sun, 4 May 2025 15:45:37 -0400 Subject: [PATCH 02/36] Add console command to add employee to property. --- S1API/Console/ConsoleHelper.cs | 24 ++++++++++++++++++++++ S1API/Property/PropertyType.cs | 37 ++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 S1API/Property/PropertyType.cs diff --git a/S1API/Console/ConsoleHelper.cs b/S1API/Console/ConsoleHelper.cs index 0544df16..93f38f59 100644 --- a/S1API/Console/ConsoleHelper.cs +++ b/S1API/Console/ConsoleHelper.cs @@ -1,10 +1,13 @@ #if (IL2CPPMELON) using Il2CppSystem.Collections.Generic; using static Il2CppScheduleOne.Console; +using Il2CppScheduleOne.Employees; #else using static ScheduleOne.Console; using System.Collections.Generic; +using ScheduleOne.Employees; #endif +using S1API.Property; namespace S1API.Console { @@ -13,6 +16,27 @@ namespace S1API.Console /// public static class ConsoleHelper { + /// + /// Executes the AddEmployeeCommand with the given arguments. + /// This method works across both IL2CPP and Mono builds. + /// + /// The type of employee. + /// The property to add the employee to. You must own the property. + public static void AddEmployee(EEmployeeType employeeType, PropertyType propertyName) + { +#if (IL2CPPMELON || IL2CPPBEPINEX) + var command = new AddEmployeeCommand(); + var args = new Il2CppSystem.Collections.Generic.List(); +#else + var command = new AddEmployeeCommand(); + var args = new List(); +#endif + args.Add(employeeType.ToString()); + args.Add(propertyName.ToString()); + + command.Execute(args); + } + /// /// Executes the ChangeCashCommand with the given amount. /// This method works across both IL2CPP and Mono builds. diff --git a/S1API/Property/PropertyType.cs b/S1API/Property/PropertyType.cs new file mode 100644 index 00000000..73d02f0e --- /dev/null +++ b/S1API/Property/PropertyType.cs @@ -0,0 +1,37 @@ +namespace S1API.Property +{ + /// + /// The types of properties in the game. + /// + public enum PropertyType + { + /// + /// The Barn property. + /// + Barn, + /// + /// The Bungalow property. + /// + Bungalow, + /// + /// The Docks property. + /// + DocksWarehouse, + /// + /// The Manor property. + /// + Manor, + /// + /// The Motel Room property. + /// + MotelRoom, + /// + /// The RV property. + /// + Rv, + /// + /// The Sweatshop property + /// + Sweatshop + } +} From d471058efc9e86475ec66cbbb99c0c3d3318222e Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Sun, 4 May 2025 15:58:20 -0400 Subject: [PATCH 03/36] Add console command to add items to inventory. --- S1API/Console/ConsoleHelper.cs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/S1API/Console/ConsoleHelper.cs b/S1API/Console/ConsoleHelper.cs index 93f38f59..0822ab8b 100644 --- a/S1API/Console/ConsoleHelper.cs +++ b/S1API/Console/ConsoleHelper.cs @@ -37,6 +37,30 @@ public static void AddEmployee(EEmployeeType employeeType, PropertyType property command.Execute(args); } + /// + /// Executes the AddItemToInventoryCommand with the given arguments. + /// This method works across both IL2CPP and Mono builds. + /// + /// The name of the item. + /// The amount to add to inventory. Optional. + public static void AddItemToInventory(string itemName, int? amount = null) + { +#if (IL2CPPMELON || IL2CPPBEPINEX) + var command = new AddItemToInventoryCommand(); + var args = new Il2CppSystem.Collections.Generic.List(); +#else + var command = new AddItemToInventoryCommand(); + var args = new List(); +#endif + args.Add(itemName); + if (amount.HasValue) + { + args.Add(amount.ToString()!); + } + + command.Execute(args); + } + /// /// Executes the ChangeCashCommand with the given amount. /// This method works across both IL2CPP and Mono builds. From 7e047bdf82c5bc5d24a1a3faa311408f680d890c Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Sun, 4 May 2025 19:31:42 -0400 Subject: [PATCH 04/36] Add console command to set player's bank balance. --- S1API/Console/ConsoleHelper.cs | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/S1API/Console/ConsoleHelper.cs b/S1API/Console/ConsoleHelper.cs index 0822ab8b..ae192589 100644 --- a/S1API/Console/ConsoleHelper.cs +++ b/S1API/Console/ConsoleHelper.cs @@ -17,7 +17,7 @@ namespace S1API.Console public static class ConsoleHelper { /// - /// Executes the AddEmployeeCommand with the given arguments. + /// Adds an employee to a property. /// This method works across both IL2CPP and Mono builds. /// /// The type of employee. @@ -38,7 +38,7 @@ public static void AddEmployee(EEmployeeType employeeType, PropertyType property } /// - /// Executes the AddItemToInventoryCommand with the given arguments. + /// Adds an item, with optional quantity, to the player's inventory. /// This method works across both IL2CPP and Mono builds. /// /// The name of the item. @@ -61,6 +61,25 @@ public static void AddItemToInventory(string itemName, int? amount = null) command.Execute(args); } + /// + /// Sets the player's bank balance to the given amount. + /// This method works across both IL2CPP and Mono builds. + /// + /// The amount to set the player's bank balance to. + public static void ChangeOnlineBalance(int amount) + { +#if (IL2CPPMELON || IL2CPPBEPINEX) + var command = new ChangeOnlineBalanceCommand(); + var args = new Il2CppSystem.Collections.Generic.List(); +#else + var command = new ChangeOnlineBalanceCommand(); + var args = new List(); +#endif + args.Add(amount.ToString()); + + command.Execute(args); + } + /// /// Executes the ChangeCashCommand with the given amount. /// This method works across both IL2CPP and Mono builds. From a4d3251a33e33aaaff48dc2bc5163b9cc9f7fd65 Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Sun, 4 May 2025 19:32:43 -0400 Subject: [PATCH 05/36] Add console command to clear player's inventory. --- S1API/Console/ConsoleHelper.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/S1API/Console/ConsoleHelper.cs b/S1API/Console/ConsoleHelper.cs index ae192589..dc501829 100644 --- a/S1API/Console/ConsoleHelper.cs +++ b/S1API/Console/ConsoleHelper.cs @@ -80,6 +80,23 @@ public static void ChangeOnlineBalance(int amount) command.Execute(args); } + /// + /// Clears the player's inventory. + /// This method works across both IL2CPP and Mono builds. + /// + public static void ClearInventory() + { +#if (IL2CPPMELON || IL2CPPBEPINEX) + var command = new ClearInventoryCommand(); + var args = new Il2CppSystem.Collections.Generic.List(); +#else + var command = new ClearInventoryCommand(); + var args = new List(); +#endif + + command.Execute(args); + } + /// /// Executes the ChangeCashCommand with the given amount. /// This method works across both IL2CPP and Mono builds. From b72644e8ea5b12934c8844b5c931565c56f2396b Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Sun, 4 May 2025 19:33:00 -0400 Subject: [PATCH 06/36] Add console command to clear trash from world. --- S1API/Console/ConsoleHelper.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/S1API/Console/ConsoleHelper.cs b/S1API/Console/ConsoleHelper.cs index dc501829..5b4dd688 100644 --- a/S1API/Console/ConsoleHelper.cs +++ b/S1API/Console/ConsoleHelper.cs @@ -97,6 +97,23 @@ public static void ClearInventory() command.Execute(args); } + /// + /// Clears all trash from the world. + /// This method works across both IL2CPP and Mono builds. + /// + public static void ClearTrash() + { +#if (IL2CPPMELON || IL2CPPBEPINEX) + var command = new ClearTrash(); + var args = new Il2CppSystem.Collections.Generic.List(); +#else + var command = new ClearTrash(); + var args = new List(); +#endif + + command.Execute(args); + } + /// /// Executes the ChangeCashCommand with the given amount. /// This method works across both IL2CPP and Mono builds. From 127e5bb03b679f08f68a8db8ba4af338d48f318b Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Sun, 4 May 2025 19:33:13 -0400 Subject: [PATCH 07/36] Add console command to clear player's wanted level. --- S1API/Console/ConsoleHelper.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/S1API/Console/ConsoleHelper.cs b/S1API/Console/ConsoleHelper.cs index 5b4dd688..5b820d29 100644 --- a/S1API/Console/ConsoleHelper.cs +++ b/S1API/Console/ConsoleHelper.cs @@ -114,6 +114,23 @@ public static void ClearTrash() command.Execute(args); } + /// + /// Clears the player's wanted level. + /// This method works across both IL2CPP and Mono builds. + /// + public static void ClearWanted() + { +#if (IL2CPPMELON || IL2CPPBEPINEX) + var command = new ClearWanted(); + var args = new Il2CppSystem.Collections.Generic.List(); +#else + var command = new ClearWanted(); + var args = new List(); +#endif + + command.Execute(args); + } + /// /// Executes the ChangeCashCommand with the given amount. /// This method works across both IL2CPP and Mono builds. From e812e719f02e6f0a1b22a35b5945831c36875089 Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Sun, 4 May 2025 19:33:38 -0400 Subject: [PATCH 08/36] Add console command to give player XP. --- S1API/Console/ConsoleHelper.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/S1API/Console/ConsoleHelper.cs b/S1API/Console/ConsoleHelper.cs index 5b820d29..20d01a38 100644 --- a/S1API/Console/ConsoleHelper.cs +++ b/S1API/Console/ConsoleHelper.cs @@ -131,6 +131,26 @@ public static void ClearWanted() command.Execute(args); } + /// + /// Adds the given amount of XP to the player. + /// This method works across both IL2CPP and Mono builds. + /// + /// The amount of XP to give. Must be a non-negative amount. + public static void GiveXp(int amount) + { +#if (IL2CPPMELON || IL2CPPBEPINEX) + var command = new GiveXP(); + var args = new Il2CppSystem.Collections.Generic.List(); +#else + var command = new GiveXP(); + var args = new List(); +#endif + + args.Add(amount.ToString()); + + command.Execute(args); + } + /// /// Executes the ChangeCashCommand with the given amount. /// This method works across both IL2CPP and Mono builds. From 97a6fe1c2ca05c84616939ad4a52abf1ebffa434 Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Sun, 4 May 2025 19:35:42 -0400 Subject: [PATCH 09/36] Add console command to grow all plants in the world. --- S1API/Console/ConsoleHelper.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/S1API/Console/ConsoleHelper.cs b/S1API/Console/ConsoleHelper.cs index 20d01a38..18bb6876 100644 --- a/S1API/Console/ConsoleHelper.cs +++ b/S1API/Console/ConsoleHelper.cs @@ -151,6 +151,23 @@ public static void GiveXp(int amount) command.Execute(args); } + /// + /// Instantly sets all plants in the world to fully grown. + /// This method works across both IL2CPP and Mono builds. + /// + public static void GrowPlants() + { +#if (IL2CPPMELON || IL2CPPBEPINEX) + var command = new GrowPlants(); + var args = new Il2CppSystem.Collections.Generic.List(); +#else + var command = new GrowPlants(); + var args = new List(); +#endif + + command.Execute(args); + } + /// /// Executes the ChangeCashCommand with the given amount. /// This method works across both IL2CPP and Mono builds. From 44e1b6a061da57ca935304ed4e287c41f3bac35d Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Sun, 4 May 2025 19:36:43 -0400 Subject: [PATCH 10/36] Add console command to lower the player's wanted level. --- S1API/Console/ConsoleHelper.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/S1API/Console/ConsoleHelper.cs b/S1API/Console/ConsoleHelper.cs index 18bb6876..90178620 100644 --- a/S1API/Console/ConsoleHelper.cs +++ b/S1API/Console/ConsoleHelper.cs @@ -168,6 +168,23 @@ public static void GrowPlants() command.Execute(args); } + /// + /// Lower the player's wanted level. + /// This method works across both IL2CPP and Mono builds. + /// + public static void LowerWanted() + { +#if (IL2CPPMELON || IL2CPPBEPINEX) + var command = new LowerWanted(); + var args = new Il2CppSystem.Collections.Generic.List(); +#else + var command = new LowerWanted(); + var args = new List(); +#endif + + command.Execute(args); + } + /// /// Executes the ChangeCashCommand with the given amount. /// This method works across both IL2CPP and Mono builds. From e308cb1b5244e24113220c9c9527fdfce827eccd Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Sun, 4 May 2025 19:47:29 -0400 Subject: [PATCH 11/36] Add console command to package equipped product. --- S1API/Console/ConsoleHelper.cs | 22 ++++++++++++++++++++++ S1API/Products/Packaging/PackageType.cs | 21 +++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 S1API/Products/Packaging/PackageType.cs diff --git a/S1API/Console/ConsoleHelper.cs b/S1API/Console/ConsoleHelper.cs index 90178620..74f8f451 100644 --- a/S1API/Console/ConsoleHelper.cs +++ b/S1API/Console/ConsoleHelper.cs @@ -7,6 +7,7 @@ using System.Collections.Generic; using ScheduleOne.Employees; #endif +using S1API.Products.Packaging; using S1API.Property; namespace S1API.Console @@ -185,6 +186,27 @@ public static void LowerWanted() command.Execute(args); } + /// + /// Packages the currently equipped item into the specified package type. + /// This method works across both IL2CPP and Mono builds. + /// + /// This method can convert between package types. It can change baggies to jars, baggies to bricks, bricks to baggies, etc. + /// The type of packaging to package the product as. + public static void PackageSelectedProduct(PackageType packageType) + { +#if (IL2CPPMELON || IL2CPPBEPINEX) + var command = new PackageProduct(); + var args = new Il2CppSystem.Collections.Generic.List(); +#else + var command = new PackageProduct(); + var args = new List(); +#endif + + args.Add(packageType.ToString()); + + command.Execute(args); + } + /// /// Executes the ChangeCashCommand with the given amount. /// This method works across both IL2CPP and Mono builds. diff --git a/S1API/Products/Packaging/PackageType.cs b/S1API/Products/Packaging/PackageType.cs new file mode 100644 index 00000000..8f91b38b --- /dev/null +++ b/S1API/Products/Packaging/PackageType.cs @@ -0,0 +1,21 @@ +namespace S1API.Products.Packaging +{ + /// + /// The types of packages + /// + public enum PackageType + { + /// + /// The baggie package type. + /// + Baggie, + /// + /// The brick package type. + /// + Brick, + /// + /// The jar package type. + /// + Jar + } +} From 8bbd65650347d643137e963d459afe0808f4a7e7 Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Sun, 4 May 2025 19:48:52 -0400 Subject: [PATCH 12/36] Add console command to raise the player's wanted level. --- S1API/Console/ConsoleHelper.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/S1API/Console/ConsoleHelper.cs b/S1API/Console/ConsoleHelper.cs index 74f8f451..92ef9621 100644 --- a/S1API/Console/ConsoleHelper.cs +++ b/S1API/Console/ConsoleHelper.cs @@ -207,6 +207,23 @@ public static void PackageSelectedProduct(PackageType packageType) command.Execute(args); } + /// + /// Raise the player's wanted level. + /// This method works across both IL2CPP and Mono builds. + /// + public static void RaiseWanted() + { +#if (IL2CPPMELON || IL2CPPBEPINEX) + var command = new RaisedWanted(); + var args = new Il2CppSystem.Collections.Generic.List(); +#else + var command = new RaisedWanted(); + var args = new List(); +#endif + + command.Execute(args); + } + /// /// Executes the ChangeCashCommand with the given amount. /// This method works across both IL2CPP and Mono builds. From 6a6bd5d165bac6ec380101c536138bcc339707cb Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Sun, 4 May 2025 19:49:45 -0400 Subject: [PATCH 13/36] Add console command to save the game. --- S1API/Console/ConsoleHelper.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/S1API/Console/ConsoleHelper.cs b/S1API/Console/ConsoleHelper.cs index 92ef9621..6f676d82 100644 --- a/S1API/Console/ConsoleHelper.cs +++ b/S1API/Console/ConsoleHelper.cs @@ -224,6 +224,23 @@ public static void RaiseWanted() command.Execute(args); } + /// + /// Saves the player's game. + /// This method works across both IL2CPP and Mono builds. + /// + public static void SaveGame() + { +#if (IL2CPPMELON || IL2CPPBEPINEX) + var command = new Save(); + var args = new Il2CppSystem.Collections.Generic.List(); +#else + var command = new Save(); + var args = new List(); +#endif + + command.Execute(args); + } + /// /// Executes the ChangeCashCommand with the given amount. /// This method works across both IL2CPP and Mono builds. From 4aa448aafb3cf4da6fb8f66f4e2c36016a38ce5c Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Sun, 4 May 2025 19:51:00 -0400 Subject: [PATCH 14/36] Add console command to discover a product. --- S1API/Console/ConsoleHelper.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/S1API/Console/ConsoleHelper.cs b/S1API/Console/ConsoleHelper.cs index 6f676d82..eebe0d20 100644 --- a/S1API/Console/ConsoleHelper.cs +++ b/S1API/Console/ConsoleHelper.cs @@ -241,6 +241,25 @@ public static void SaveGame() command.Execute(args); } + /// + /// Sets a product as discovered. + /// This method works across both IL2CPP and Mono builds. + /// + public static void DiscoverProduct(string productName) + { +#if (IL2CPPMELON || IL2CPPBEPINEX) + var command = new SetDiscovered(); + var args = new Il2CppSystem.Collections.Generic.List(); +#else + var command = new SetDiscovered(); + var args = new List(); +#endif + + args.Add(productName); + + command.Execute(args); + } + /// /// Executes the ChangeCashCommand with the given amount. /// This method works across both IL2CPP and Mono builds. From 13c324eb94ee523673db7afa87701a52a3d3b142 Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Sun, 4 May 2025 19:54:53 -0400 Subject: [PATCH 15/36] Add console command to set the player's energy level. --- S1API/Console/ConsoleHelper.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/S1API/Console/ConsoleHelper.cs b/S1API/Console/ConsoleHelper.cs index eebe0d20..aff33648 100644 --- a/S1API/Console/ConsoleHelper.cs +++ b/S1API/Console/ConsoleHelper.cs @@ -260,6 +260,26 @@ public static void DiscoverProduct(string productName) command.Execute(args); } + /// + /// Sets the player's energy level. + /// This method works across both IL2CPP and Mono builds. + /// + /// The level of energy to set to. Range is 0 to 100. + public static void SetPlayerEnergyLevel(float amount) + { +#if (IL2CPPMELON || IL2CPPBEPINEX) + var command = new SetEnergy(); + var args = new Il2CppSystem.Collections.Generic.List(); +#else + var command = new SetEnergy(); + var args = new List(); +#endif + + args.Add(amount.ToString()); + + command.Execute(args); + } + /// /// Executes the ChangeCashCommand with the given amount. /// This method works across both IL2CPP and Mono builds. From 27d25cf9598ac00fa702f5c5bb154f55c9183588 Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Sun, 4 May 2025 19:57:12 -0400 Subject: [PATCH 16/36] Add console command to set the player's health. --- S1API/Console/ConsoleHelper.cs | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/S1API/Console/ConsoleHelper.cs b/S1API/Console/ConsoleHelper.cs index aff33648..d53ab61b 100644 --- a/S1API/Console/ConsoleHelper.cs +++ b/S1API/Console/ConsoleHelper.cs @@ -7,6 +7,7 @@ using System.Collections.Generic; using ScheduleOne.Employees; #endif +using System.Globalization; using S1API.Products.Packaging; using S1API.Property; @@ -275,7 +276,27 @@ public static void SetPlayerEnergyLevel(float amount) var args = new List(); #endif - args.Add(amount.ToString()); + args.Add(amount.ToString(CultureInfo.InvariantCulture)); + + command.Execute(args); + } + + /// + /// Sets the player's health. + /// This method works across both IL2CPP and Mono builds. + /// + /// The health value to set to. + public static void SetPlayerHealth(float amount) + { +#if (IL2CPPMELON || IL2CPPBEPINEX) + var command = new SetHealth(); + var args = new Il2CppSystem.Collections.Generic.List(); +#else + var command = new SetHealth(); + var args = new List(); +#endif + + args.Add(amount.ToString(CultureInfo.InvariantCulture)); command.Execute(args); } From fe6a16aebe6f6e08d9a04841c52d2d199abcd357 Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Sun, 4 May 2025 19:58:21 -0400 Subject: [PATCH 17/36] Add console command to set the player's jump multiplier. --- S1API/Console/ConsoleHelper.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/S1API/Console/ConsoleHelper.cs b/S1API/Console/ConsoleHelper.cs index d53ab61b..a8fc76e2 100644 --- a/S1API/Console/ConsoleHelper.cs +++ b/S1API/Console/ConsoleHelper.cs @@ -301,6 +301,26 @@ public static void SetPlayerHealth(float amount) command.Execute(args); } + /// + /// Sets the player's jump multiplier. + /// This method works across both IL2CPP and Mono builds. + /// + /// The multiplier to set to. + public static void SetPlayerJumpMultiplier(float amount) + { +#if (IL2CPPMELON || IL2CPPBEPINEX) + var command = new SetJumpMultiplier(); + var args = new Il2CppSystem.Collections.Generic.List(); +#else + var command = new SetJumpMultiplier(); + var args = new List(); +#endif + + args.Add(amount.ToString(CultureInfo.InvariantCulture)); + + command.Execute(args); + } + /// /// Executes the ChangeCashCommand with the given amount. /// This method works across both IL2CPP and Mono builds. From 77240bb1ad46d0ce0a04da173f3e93f2bfab4c7b Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Sun, 4 May 2025 19:59:35 -0400 Subject: [PATCH 18/36] Add console command to set the intensity of law enforcement. --- S1API/Console/ConsoleHelper.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/S1API/Console/ConsoleHelper.cs b/S1API/Console/ConsoleHelper.cs index a8fc76e2..4558f424 100644 --- a/S1API/Console/ConsoleHelper.cs +++ b/S1API/Console/ConsoleHelper.cs @@ -321,6 +321,26 @@ public static void SetPlayerJumpMultiplier(float amount) command.Execute(args); } + /// + /// Sets the intensity of law enforcement activity. + /// This method works across both IL2CPP and Mono builds. + /// + /// The level of activity. Ranges from 0 to 10. + public static void SetLawIntensity(float amount) + { +#if (IL2CPPMELON || IL2CPPBEPINEX) + var command = new SetLawIntensity(); + var args = new Il2CppSystem.Collections.Generic.List(); +#else + var command = new SetLawIntensity(); + var args = new List(); +#endif + + args.Add(amount.ToString(CultureInfo.InvariantCulture)); + + command.Execute(args); + } + /// /// Executes the ChangeCashCommand with the given amount. /// This method works across both IL2CPP and Mono builds. From c301fa1b0c1da2aa787465238b897d9ba4d25cbd Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Sun, 4 May 2025 20:01:43 -0400 Subject: [PATCH 19/36] Add console command to set the player's move speed multiplier. --- S1API/Console/ConsoleHelper.cs | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/S1API/Console/ConsoleHelper.cs b/S1API/Console/ConsoleHelper.cs index 4558f424..a254e010 100644 --- a/S1API/Console/ConsoleHelper.cs +++ b/S1API/Console/ConsoleHelper.cs @@ -305,7 +305,7 @@ public static void SetPlayerHealth(float amount) /// Sets the player's jump multiplier. /// This method works across both IL2CPP and Mono builds. /// - /// The multiplier to set to. + /// The multiplier to set to. Must be non-negative. public static void SetPlayerJumpMultiplier(float amount) { #if (IL2CPPMELON || IL2CPPBEPINEX) @@ -341,6 +341,26 @@ public static void SetLawIntensity(float amount) command.Execute(args); } + /// + /// Sets the player's move speed multiplier. + /// This method works across both IL2CPP and Mono builds. + /// + /// The multiplier to set to. Must be non-negative. + public static void SetPlayerMoveSpeedMultiplier(float amount) + { +#if (IL2CPPMELON || IL2CPPBEPINEX) + var command = new SetMoveSpeedCommand(); + var args = new Il2CppSystem.Collections.Generic.List(); +#else + var command = new SetMoveSpeedCommand(); + var args = new List(); +#endif + + args.Add(amount.ToString(CultureInfo.InvariantCulture)); + + command.Execute(args); + } + /// /// Executes the ChangeCashCommand with the given amount. /// This method works across both IL2CPP and Mono builds. From 3ea89425350038370776502b008dd8bb816de3b8 Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Tue, 6 May 2025 20:46:32 -0400 Subject: [PATCH 20/36] Add console commands to unlock businesses and properties. --- S1API/Console/ConsoleHelper.cs | 43 ++++++++++++++++++++++++++++++++-- S1API/Property/PropertyType.cs | 23 ++++++++++++++++++ 2 files changed, 64 insertions(+), 2 deletions(-) diff --git a/S1API/Console/ConsoleHelper.cs b/S1API/Console/ConsoleHelper.cs index a254e010..03e41bf0 100644 --- a/S1API/Console/ConsoleHelper.cs +++ b/S1API/Console/ConsoleHelper.cs @@ -1,5 +1,4 @@ #if (IL2CPPMELON) -using Il2CppSystem.Collections.Generic; using static Il2CppScheduleOne.Console; using Il2CppScheduleOne.Employees; #else @@ -7,9 +6,9 @@ using System.Collections.Generic; using ScheduleOne.Employees; #endif -using System.Globalization; using S1API.Products.Packaging; using S1API.Property; +using System.Globalization; namespace S1API.Console { @@ -361,6 +360,46 @@ public static void SetPlayerMoveSpeedMultiplier(float amount) command.Execute(args); } + /// + /// Sets a business as owned. + /// This method works across both IL2CPP and Mono builds. + /// + /// The business to set as owned. + public static void SetBusinessAsOwned(BusinessType business) + { +#if (IL2CPPMELON || IL2CPPBEPINEX) + var command = new SetPropertyOwned(); + var args = new Il2CppSystem.Collections.Generic.List(); +#else + var command = new SetPropertyOwned(); + var args = new List(); +#endif + + args.Add(business.ToString()); + + command.Execute(args); + } + + /// + /// Sets a property as owned. + /// This method works across both IL2CPP and Mono builds. + /// + /// The property to set as owned. + public static void SetPropertyAsOwned(PropertyType property) + { +#if (IL2CPPMELON || IL2CPPBEPINEX) + var command = new SetPropertyOwned(); + var args = new Il2CppSystem.Collections.Generic.List(); +#else + var command = new SetPropertyOwned(); + var args = new List(); +#endif + + args.Add(property.ToString()); + + command.Execute(args); + } + /// /// Executes the ChangeCashCommand with the given amount. /// This method works across both IL2CPP and Mono builds. diff --git a/S1API/Property/PropertyType.cs b/S1API/Property/PropertyType.cs index 73d02f0e..6030e504 100644 --- a/S1API/Property/PropertyType.cs +++ b/S1API/Property/PropertyType.cs @@ -34,4 +34,27 @@ public enum PropertyType /// Sweatshop } + + /// + /// The types of businesses in the game. + /// + public enum BusinessType + { + /// + /// The Car Wash business. + /// + CarWash, + /// + /// The Laundromat business. + /// + Laundromat, + /// + /// The Post Office business. + /// + PostOffice, + /// + /// The Taco Ticklers business. + /// + TacoTicklers, + } } From 80c8bffbec68052e6f6ddada1f594e9e40938bec Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Thu, 8 May 2025 16:32:09 -0400 Subject: [PATCH 21/36] Add new StorageUnit property from 0.3.5 --- S1API/Property/PropertyType.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/S1API/Property/PropertyType.cs b/S1API/Property/PropertyType.cs index 6030e504..c59e4ef0 100644 --- a/S1API/Property/PropertyType.cs +++ b/S1API/Property/PropertyType.cs @@ -30,6 +30,10 @@ public enum PropertyType /// Rv, /// + /// The Storage Unit property. + /// + StorageUnit, + /// /// The Sweatshop property /// Sweatshop From ab5639ed9e3a8849aeec548d90606a4889f959fd Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Thu, 8 May 2025 16:36:53 -0400 Subject: [PATCH 22/36] Add console command to set item quality. --- S1API/Console/ConsoleHelper.cs | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/S1API/Console/ConsoleHelper.cs b/S1API/Console/ConsoleHelper.cs index 03e41bf0..82650e9d 100644 --- a/S1API/Console/ConsoleHelper.cs +++ b/S1API/Console/ConsoleHelper.cs @@ -1,10 +1,12 @@ #if (IL2CPPMELON) using static Il2CppScheduleOne.Console; using Il2CppScheduleOne.Employees; -#else +using Il2CppScheduleOne.ItemFramework; +#elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) using static ScheduleOne.Console; using System.Collections.Generic; using ScheduleOne.Employees; +using ScheduleOne.ItemFramework; #endif using S1API.Products.Packaging; using S1API.Property; @@ -400,6 +402,26 @@ public static void SetPropertyAsOwned(PropertyType property) command.Execute(args); } + /// + /// Sets the equipped product's quality. + /// This method works across both IL2CPP and Mono builds. + /// + /// The quality to set the current equipped item to. + public static void SetQuality(EQuality quality) + { +#if (IL2CPPMELON || IL2CPPBEPINEX) + var command = new SetQuality(); + var args = new Il2CppSystem.Collections.Generic.List(); +#else + var command = new SetQuality(); + var args = new List(); +#endif + + args.Add(quality.ToString()); + + command.Execute(args); + } + /// /// Executes the ChangeCashCommand with the given amount. /// This method works across both IL2CPP and Mono builds. From 0a07a8ca15873a765c0b8b3d80fabba3bf71c427 Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Thu, 8 May 2025 16:57:02 -0400 Subject: [PATCH 23/36] Add console command to set quest state. --- S1API/Console/ConsoleHelper.cs | 45 +++++++++++++++++++++++++ S1API/Quests/Constants/VanillaQuest.cs | 46 ++++++++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 S1API/Quests/Constants/VanillaQuest.cs diff --git a/S1API/Console/ConsoleHelper.cs b/S1API/Console/ConsoleHelper.cs index 82650e9d..33f7729a 100644 --- a/S1API/Console/ConsoleHelper.cs +++ b/S1API/Console/ConsoleHelper.cs @@ -10,6 +10,7 @@ #endif using S1API.Products.Packaging; using S1API.Property; +using S1API.Quests.Constants; using System.Globalization; namespace S1API.Console @@ -421,6 +422,50 @@ public static void SetQuality(EQuality quality) command.Execute(args); } + + /// + /// Sets the state for a given quest. + /// This method works across both IL2CPP and Mono builds. + /// + /// The quest to set the state for. + /// The state to set for the quest. + public static void SetQuestState(string quest, QuestState state) + { +#if (IL2CPPMELON || IL2CPPBEPINEX) + var command = new SetQuestState(); + var args = new Il2CppSystem.Collections.Generic.List(); +#else + var command = new SetQuestState(); + var args = new List(); +#endif + + args.Add(quest); + args.Add(state.ToString()); + + command.Execute(args); + } + + /// + /// Sets the state for a given quest. + /// This method works across both IL2CPP and Mono builds. + /// + /// The quest to set the state for. + /// The state to set for the quest. + public static void SetQuestState(VanillaQuest quest, QuestState state) + { +#if (IL2CPPMELON || IL2CPPBEPINEX) + var command = new SetQuestState(); + var args = new Il2CppSystem.Collections.Generic.List(); +#else + var command = new SetQuestState(); + var args = new List(); +#endif + + args.Add(quest.ToString()); + args.Add(state.ToString()); + + command.Execute(args); + } /// /// Executes the ChangeCashCommand with the given amount. diff --git a/S1API/Quests/Constants/VanillaQuest.cs b/S1API/Quests/Constants/VanillaQuest.cs new file mode 100644 index 00000000..6e1fba7c --- /dev/null +++ b/S1API/Quests/Constants/VanillaQuest.cs @@ -0,0 +1,46 @@ +using System.ComponentModel; + +namespace S1API.Quests.Constants +{ + public enum VanillaQuest + { + [Description("Botanists")] + Botanists, + [Description("Chemists")] + Chemists, + [Description("Clean Cash")] + Clean_Cash, + [Description("Cleaners")] + Cleaners, + [Description("Dodgy Dealing")] + Dodgy_Dealing, + [Description("Gearing Up")] + Gearing_Up, + [Description("Getting Started")] + Getting_Started, + [Description("Keeping it Fresh")] + Keeping_it_Fresh, + [Description("Making the Rounds")] + Making_the_Rounds, + [Description("Mixing Mania")] + Mixing_Mania, + [Description("Money Management")] + Money_Management, + [Description("Moving Up")] + Moving_Up, + [Description("Needin' the Green")] + NeedinTheGreen, + [Description("On the Grind")] + On_the_Grind, + [Description("Packagers")] + Packagers, + [Description("Packin'")] + Packin, + [Description("We Need To Cook")] + We_Need_To_Cook, + [Description("Welcome to Hyland Point")] + Welcome_to_Hyland_Point, + [Description("Wretched Hive of Scum and Villainy")] + Wretched_Hive_of_Scum_and_Villainy, + } +} From b627e5ff3207be9a228c5e16171ff9b46dbd68f9 Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Thu, 8 May 2025 17:12:28 -0400 Subject: [PATCH 24/36] Massive cleanup with removing unnecessary preprocessor directives in ConsoleHelper.cs --- S1API/Console/ConsoleHelper.cs | 125 ++------------------------------- 1 file changed, 5 insertions(+), 120 deletions(-) diff --git a/S1API/Console/ConsoleHelper.cs b/S1API/Console/ConsoleHelper.cs index 33f7729a..2c02e496 100644 --- a/S1API/Console/ConsoleHelper.cs +++ b/S1API/Console/ConsoleHelper.cs @@ -2,6 +2,7 @@ using static Il2CppScheduleOne.Console; using Il2CppScheduleOne.Employees; using Il2CppScheduleOne.ItemFramework; +using Il2CppSystem.Collections.Generic; #elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) using static ScheduleOne.Console; using System.Collections.Generic; @@ -28,13 +29,9 @@ public static class ConsoleHelper /// The property to add the employee to. You must own the property. public static void AddEmployee(EEmployeeType employeeType, PropertyType propertyName) { -#if (IL2CPPMELON || IL2CPPBEPINEX) - var command = new AddEmployeeCommand(); - var args = new Il2CppSystem.Collections.Generic.List(); -#else var command = new AddEmployeeCommand(); var args = new List(); -#endif + args.Add(employeeType.ToString()); args.Add(propertyName.ToString()); @@ -49,13 +46,9 @@ public static void AddEmployee(EEmployeeType employeeType, PropertyType property /// The amount to add to inventory. Optional. public static void AddItemToInventory(string itemName, int? amount = null) { -#if (IL2CPPMELON || IL2CPPBEPINEX) - var command = new AddItemToInventoryCommand(); - var args = new Il2CppSystem.Collections.Generic.List(); -#else var command = new AddItemToInventoryCommand(); var args = new List(); -#endif + args.Add(itemName); if (amount.HasValue) { @@ -72,13 +65,9 @@ public static void AddItemToInventory(string itemName, int? amount = null) /// The amount to set the player's bank balance to. public static void ChangeOnlineBalance(int amount) { -#if (IL2CPPMELON || IL2CPPBEPINEX) - var command = new ChangeOnlineBalanceCommand(); - var args = new Il2CppSystem.Collections.Generic.List(); -#else var command = new ChangeOnlineBalanceCommand(); var args = new List(); -#endif + args.Add(amount.ToString()); command.Execute(args); @@ -90,13 +79,8 @@ public static void ChangeOnlineBalance(int amount) /// public static void ClearInventory() { -#if (IL2CPPMELON || IL2CPPBEPINEX) - var command = new ClearInventoryCommand(); - var args = new Il2CppSystem.Collections.Generic.List(); -#else var command = new ClearInventoryCommand(); var args = new List(); -#endif command.Execute(args); } @@ -107,13 +91,8 @@ public static void ClearInventory() /// public static void ClearTrash() { -#if (IL2CPPMELON || IL2CPPBEPINEX) - var command = new ClearTrash(); - var args = new Il2CppSystem.Collections.Generic.List(); -#else var command = new ClearTrash(); var args = new List(); -#endif command.Execute(args); } @@ -124,13 +103,8 @@ public static void ClearTrash() /// public static void ClearWanted() { -#if (IL2CPPMELON || IL2CPPBEPINEX) - var command = new ClearWanted(); - var args = new Il2CppSystem.Collections.Generic.List(); -#else var command = new ClearWanted(); var args = new List(); -#endif command.Execute(args); } @@ -142,13 +116,8 @@ public static void ClearWanted() /// The amount of XP to give. Must be a non-negative amount. public static void GiveXp(int amount) { -#if (IL2CPPMELON || IL2CPPBEPINEX) - var command = new GiveXP(); - var args = new Il2CppSystem.Collections.Generic.List(); -#else var command = new GiveXP(); var args = new List(); -#endif args.Add(amount.ToString()); @@ -161,13 +130,8 @@ public static void GiveXp(int amount) /// public static void GrowPlants() { -#if (IL2CPPMELON || IL2CPPBEPINEX) - var command = new GrowPlants(); - var args = new Il2CppSystem.Collections.Generic.List(); -#else var command = new GrowPlants(); var args = new List(); -#endif command.Execute(args); } @@ -178,13 +142,8 @@ public static void GrowPlants() /// public static void LowerWanted() { -#if (IL2CPPMELON || IL2CPPBEPINEX) - var command = new LowerWanted(); - var args = new Il2CppSystem.Collections.Generic.List(); -#else var command = new LowerWanted(); var args = new List(); -#endif command.Execute(args); } @@ -197,13 +156,8 @@ public static void LowerWanted() /// The type of packaging to package the product as. public static void PackageSelectedProduct(PackageType packageType) { -#if (IL2CPPMELON || IL2CPPBEPINEX) - var command = new PackageProduct(); - var args = new Il2CppSystem.Collections.Generic.List(); -#else var command = new PackageProduct(); var args = new List(); -#endif args.Add(packageType.ToString()); @@ -216,13 +170,8 @@ public static void PackageSelectedProduct(PackageType packageType) /// public static void RaiseWanted() { -#if (IL2CPPMELON || IL2CPPBEPINEX) - var command = new RaisedWanted(); - var args = new Il2CppSystem.Collections.Generic.List(); -#else var command = new RaisedWanted(); var args = new List(); -#endif command.Execute(args); } @@ -233,13 +182,8 @@ public static void RaiseWanted() /// public static void SaveGame() { -#if (IL2CPPMELON || IL2CPPBEPINEX) - var command = new Save(); - var args = new Il2CppSystem.Collections.Generic.List(); -#else var command = new Save(); var args = new List(); -#endif command.Execute(args); } @@ -250,13 +194,8 @@ public static void SaveGame() /// public static void DiscoverProduct(string productName) { -#if (IL2CPPMELON || IL2CPPBEPINEX) - var command = new SetDiscovered(); - var args = new Il2CppSystem.Collections.Generic.List(); -#else var command = new SetDiscovered(); var args = new List(); -#endif args.Add(productName); @@ -270,13 +209,8 @@ public static void DiscoverProduct(string productName) /// The level of energy to set to. Range is 0 to 100. public static void SetPlayerEnergyLevel(float amount) { -#if (IL2CPPMELON || IL2CPPBEPINEX) - var command = new SetEnergy(); - var args = new Il2CppSystem.Collections.Generic.List(); -#else var command = new SetEnergy(); var args = new List(); -#endif args.Add(amount.ToString(CultureInfo.InvariantCulture)); @@ -290,13 +224,8 @@ public static void SetPlayerEnergyLevel(float amount) /// The health value to set to. public static void SetPlayerHealth(float amount) { -#if (IL2CPPMELON || IL2CPPBEPINEX) - var command = new SetHealth(); - var args = new Il2CppSystem.Collections.Generic.List(); -#else var command = new SetHealth(); var args = new List(); -#endif args.Add(amount.ToString(CultureInfo.InvariantCulture)); @@ -310,13 +239,8 @@ public static void SetPlayerHealth(float amount) /// The multiplier to set to. Must be non-negative. public static void SetPlayerJumpMultiplier(float amount) { -#if (IL2CPPMELON || IL2CPPBEPINEX) - var command = new SetJumpMultiplier(); - var args = new Il2CppSystem.Collections.Generic.List(); -#else var command = new SetJumpMultiplier(); var args = new List(); -#endif args.Add(amount.ToString(CultureInfo.InvariantCulture)); @@ -330,13 +254,8 @@ public static void SetPlayerJumpMultiplier(float amount) /// The level of activity. Ranges from 0 to 10. public static void SetLawIntensity(float amount) { -#if (IL2CPPMELON || IL2CPPBEPINEX) - var command = new SetLawIntensity(); - var args = new Il2CppSystem.Collections.Generic.List(); -#else var command = new SetLawIntensity(); var args = new List(); -#endif args.Add(amount.ToString(CultureInfo.InvariantCulture)); @@ -350,13 +269,8 @@ public static void SetLawIntensity(float amount) /// The multiplier to set to. Must be non-negative. public static void SetPlayerMoveSpeedMultiplier(float amount) { -#if (IL2CPPMELON || IL2CPPBEPINEX) - var command = new SetMoveSpeedCommand(); - var args = new Il2CppSystem.Collections.Generic.List(); -#else var command = new SetMoveSpeedCommand(); var args = new List(); -#endif args.Add(amount.ToString(CultureInfo.InvariantCulture)); @@ -370,13 +284,8 @@ public static void SetPlayerMoveSpeedMultiplier(float amount) /// The business to set as owned. public static void SetBusinessAsOwned(BusinessType business) { -#if (IL2CPPMELON || IL2CPPBEPINEX) - var command = new SetPropertyOwned(); - var args = new Il2CppSystem.Collections.Generic.List(); -#else var command = new SetPropertyOwned(); var args = new List(); -#endif args.Add(business.ToString()); @@ -390,13 +299,8 @@ public static void SetBusinessAsOwned(BusinessType business) /// The property to set as owned. public static void SetPropertyAsOwned(PropertyType property) { -#if (IL2CPPMELON || IL2CPPBEPINEX) - var command = new SetPropertyOwned(); - var args = new Il2CppSystem.Collections.Generic.List(); -#else var command = new SetPropertyOwned(); var args = new List(); -#endif args.Add(property.ToString()); @@ -410,13 +314,8 @@ public static void SetPropertyAsOwned(PropertyType property) /// The quality to set the current equipped item to. public static void SetQuality(EQuality quality) { -#if (IL2CPPMELON || IL2CPPBEPINEX) - var command = new SetQuality(); - var args = new Il2CppSystem.Collections.Generic.List(); -#else var command = new SetQuality(); var args = new List(); -#endif args.Add(quality.ToString()); @@ -431,13 +330,8 @@ public static void SetQuality(EQuality quality) /// The state to set for the quest. public static void SetQuestState(string quest, QuestState state) { -#if (IL2CPPMELON || IL2CPPBEPINEX) - var command = new SetQuestState(); - var args = new Il2CppSystem.Collections.Generic.List(); -#else var command = new SetQuestState(); var args = new List(); -#endif args.Add(quest); args.Add(state.ToString()); @@ -453,13 +347,8 @@ public static void SetQuestState(string quest, QuestState state) /// The state to set for the quest. public static void SetQuestState(VanillaQuest quest, QuestState state) { -#if (IL2CPPMELON || IL2CPPBEPINEX) - var command = new SetQuestState(); - var args = new Il2CppSystem.Collections.Generic.List(); -#else var command = new SetQuestState(); var args = new List(); -#endif args.Add(quest.ToString()); args.Add(state.ToString()); @@ -474,13 +363,9 @@ public static void SetQuestState(VanillaQuest quest, QuestState state) /// The cash amount to add or remove. public static void RunCashCommand(int amount) { -#if (IL2CPPMELON || IL2CPPBEPINEX) - var command = new ChangeCashCommand(); - var args = new Il2CppSystem.Collections.Generic.List(); -#else var command = new ChangeCashCommand(); var args = new List(); -#endif + args.Add(amount.ToString()); command.Execute(args); } From e767f5304420cca47522534917cd5cba4d7b5853 Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Thu, 8 May 2025 17:13:49 -0400 Subject: [PATCH 25/36] Add enum utility and console command to set NPC relationship. --- S1API/Console/ConsoleHelper.cs | 21 +++- S1API/Internal/Utils/EnumUtils.cs | 23 +++++ S1API/NPCs/VanillaNpcList.cs | 160 ++++++++++++++++++++++++++++++ 3 files changed, 203 insertions(+), 1 deletion(-) create mode 100644 S1API/Internal/Utils/EnumUtils.cs create mode 100644 S1API/NPCs/VanillaNpcList.cs diff --git a/S1API/Console/ConsoleHelper.cs b/S1API/Console/ConsoleHelper.cs index 2c02e496..80a722c6 100644 --- a/S1API/Console/ConsoleHelper.cs +++ b/S1API/Console/ConsoleHelper.cs @@ -9,6 +9,8 @@ using ScheduleOne.Employees; using ScheduleOne.ItemFramework; #endif +using S1API.Internal.Utils; +using S1API.NPCs; using S1API.Products.Packaging; using S1API.Property; using S1API.Quests.Constants; @@ -350,12 +352,29 @@ public static void SetQuestState(VanillaQuest quest, QuestState state) var command = new SetQuestState(); var args = new List(); - args.Add(quest.ToString()); + args.Add(quest.GetDescriptionValue()); args.Add(state.ToString()); command.Execute(args); } + /// + /// Sets the relationship for a given NPC. + /// This method works across both IL2CPP and Mono builds. + /// + /// The NPC to set the relationship for. + /// The relationship value to set. Must be between 0 and 5 inclusive. + public static void SetNpcRelationship(VanillaNpcList npc, float level) + { + var command = new SetRelationship(); + var args = new List(); + + args.Add(npc.GetDescriptionValue()); + args.Add(level.ToString(CultureInfo.InvariantCulture)); + + command.Execute(args); + } + /// /// Executes the ChangeCashCommand with the given amount. /// This method works across both IL2CPP and Mono builds. diff --git a/S1API/Internal/Utils/EnumUtils.cs b/S1API/Internal/Utils/EnumUtils.cs new file mode 100644 index 00000000..32240cb0 --- /dev/null +++ b/S1API/Internal/Utils/EnumUtils.cs @@ -0,0 +1,23 @@ +using System; +using System.ComponentModel; +using System.Reflection; + +namespace S1API.Internal.Utils; + +/// +/// A set of utility methods when working with enums. +/// +internal static class EnumUtils +{ + /// + /// Gets the value of the Description attribute for an enum value. + /// + /// The enum value + /// The description string or the enum value's name if no description is found + internal static string GetDescriptionValue(this Enum value) + { + var fieldInfo = value.GetType().GetField(value.ToString()); + var attribute = fieldInfo?.GetCustomAttribute(); + return attribute?.Description ?? value.ToString(); + } +} diff --git a/S1API/NPCs/VanillaNpcList.cs b/S1API/NPCs/VanillaNpcList.cs new file mode 100644 index 00000000..0e56a5c5 --- /dev/null +++ b/S1API/NPCs/VanillaNpcList.cs @@ -0,0 +1,160 @@ +using System.ComponentModel; + +namespace S1API.NPCs +{ + /// + /// The list of NPCs in the vanilla game. + /// + public enum VanillaNpcList + { + [Description("albert_hoover")] + AlbertHoover, + [Description("alison_knight")] + AlisonKnight, + [Description("anna_chesterfield")] + AnnaChesterfield, + [Description("austin_steiner")] + AustinSteiner, + [Description("benji_coleman")] + BenjiColeman, + [Description("beth_penn")] + BethPenn, + [Description("billy_kramer")] + BillyKramer, + [Description("brad_crosby")] + BradCrosby, + [Description("carl_bundy")] + CarlBundy, + [Description("charles_rowland")] + CharlesRowland, + [Description("chloe_bowers")] + ChloeBowers, + [Description("chris_sullivan")] + ChrisSullivan, + [Description("cranky_frank")] + CrankyFrank, + [Description("dan_samwell")] + DanSamwell, + [Description("dean_webster")] + DeanWebster, + [Description("dennis_kennedy")] + DennisKennedy, + [Description("donna_martin")] + DonnaMartin, + [Description("doris_lubbin")] + DorisLubbin, + [Description("elizabeth_homley")] + ElizabethHomley, + [Description("eugene_buckley")] + EugeneBuckley, + [Description("fiona_hancock")] + FionaHancock, + [Description("genghis_barn")] + GenghisBarn, + [Description("george_greene")] + GeorgeGreene, + [Description("geraldine_poon")] + GeraldinePoon, + [Description("greg_fliggle")] + GregFliggle, + [Description("hank_stevenson")] + HankStevenson, + [Description("harold_colt")] + HaroldColt, + [Description("herbert_bleuball")] + HerbertBleuball, + [Description("igor_romanovich_door")] + IgorRomanovichDoor, + [Description("jack_knight")] + JackKnight, + [Description("jackie_stevenson")] + JackieStevenson, + [Description("jane_lucero")] + JaneLucero, + [Description("javier_perez")] + JavierPerez, + [Description("jeff_gilmore")] + JeffGilmore, + [Description("jen_heard")] + JenHeard, + [Description("jennifer_rivera")] + JenniferRivera, + [Description("jeremy_wilkinson")] + JeremyWilkinson, + [Description("jerry_montero")] + JerryMontero, + [Description("jessi_waters")] + JessiWaters, + [Description("joyce_ball")] + JoyceBall, + [Description("karen_kennedy")] + KarenKennedy, + [Description("kathy_henderson")] + KathyHenderson, + [Description("keith_wagner")] + KeithWagner, + [Description("kevin_oakley")] + KevinOakley, + [Description("kim_delaney")] + KimDelaney, + [Description("kyle_cooley")] + KyleCooley, + [Description("leo_rivers")] + LeoRivers, + [Description("lily_turner")] + LilyTurner, + [Description("lisa_gardener")] + LisaGardener, + [Description("louis_fourier")] + LouisFourier, + [Description("lucy_pennington")] + LucyPennington, + [Description("ludwig_meyer")] + LudwigMeyer, + [Description("mac_cooper")] + MacCooper, + [Description("marco_baron")] + MarcoBaron, + [Description("meg_cooley")] + MegCooley, + [Description("melissa_wood")] + MelissaWood, + [Description("michael_boog")] + MichaelBoog, + [Description("mick_lubbin")] + MickLubbin, + [Description("molly_presley")] + MollyPresley, + Ming, + [Description("pearl_moore")] + PearlMoore, + [Description("peggy_myers")] + PeggyMyers, + [Description("peter_file")] + PeterFile, + [Description("philip_wentworth")] + PhilipWentworth, + [Description("randy_caulfield")] + RandyCaulfield, + [Description("ray_hoffman")] + RayHoffman, + [Description("salvador_moreno")] + SalvadorMoreno, + [Description("sam_thompson")] + SamThompson, + [Description("shirley_watts")] + ShirleyWatts, + [Description("stan_carney")] + StanCarney, + [Description("tobias_wentworth")] + TobiasWentworth, + [Description("trent_sherman")] + TrentSherman, + [Description("uncle_nelson")] + UncleNelson, + [Description("walter_cussler")] + WalterCussler, + [Description("wei_long")] + WeiLong + } +} From 53a11f0740eb424a133407dcbe2d87c8bef65c8f Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Thu, 8 May 2025 20:02:40 -0400 Subject: [PATCH 26/36] Add console command to set time of day. --- S1API/Console/ConsoleHelper.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/S1API/Console/ConsoleHelper.cs b/S1API/Console/ConsoleHelper.cs index 80a722c6..c79d2f27 100644 --- a/S1API/Console/ConsoleHelper.cs +++ b/S1API/Console/ConsoleHelper.cs @@ -375,6 +375,21 @@ public static void SetNpcRelationship(VanillaNpcList npc, float level) command.Execute(args); } + /// + /// Sets the time. + /// This method works across both IL2CPP and Mono builds. + /// + /// The time to set. Requires a valid value with Regex ^([01]?[0-9]|2[0-3])[0-5][0-9]$ (e.g. 1530 for 15:30 / 3:30 PM) + public static void SetTime(string time) + { + var command = new SetTimeCommand(); + var args = new List(); + + args.Add(time); + + command.Execute(args); + } + /// /// Executes the ChangeCashCommand with the given amount. /// This method works across both IL2CPP and Mono builds. From 8ad771357f56d7101b8782d795d032ad9b98dd2e Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Thu, 8 May 2025 20:04:31 -0400 Subject: [PATCH 27/36] Add override for setting NPC relationship console command that uses NPC ID. --- S1API/Console/ConsoleHelper.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/S1API/Console/ConsoleHelper.cs b/S1API/Console/ConsoleHelper.cs index c79d2f27..d572756d 100644 --- a/S1API/Console/ConsoleHelper.cs +++ b/S1API/Console/ConsoleHelper.cs @@ -358,6 +358,23 @@ public static void SetQuestState(VanillaQuest quest, QuestState state) command.Execute(args); } + /// + /// Sets the relationship for a given NPC. + /// This method works across both IL2CPP and Mono builds. + /// + /// The ID of the NPC to set the relationship for. + /// The relationship value to set. Must be between 0 and 5 inclusive. + public static void SetNpcRelationship(string npcId, float level) + { + var command = new SetRelationship(); + var args = new List(); + + args.Add(npcId); + args.Add(level.ToString(CultureInfo.InvariantCulture)); + + command.Execute(args); + } + /// /// Sets the relationship for a given NPC. /// This method works across both IL2CPP and Mono builds. From a3b7a2a7293a8850530f3a59dcc457951b9e9913 Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Thu, 8 May 2025 20:08:46 -0400 Subject: [PATCH 28/36] Add console command to unlock a NPC. --- S1API/Console/ConsoleHelper.cs | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/S1API/Console/ConsoleHelper.cs b/S1API/Console/ConsoleHelper.cs index d572756d..ab05602e 100644 --- a/S1API/Console/ConsoleHelper.cs +++ b/S1API/Console/ConsoleHelper.cs @@ -407,6 +407,36 @@ public static void SetTime(string time) command.Execute(args); } + /// + /// Unlocks the connection for the given NPC. + /// This method works across both IL2CPP and Mono builds. + /// + /// The ID of the NPC to set the relationship for. + public static void UnlockNpc(string npcId) + { + var command = new SetUnlocked(); + var args = new List(); + + args.Add(npcId); + + command.Execute(args); + } + + /// + /// Unlocks the connection for the given NPC. + /// This method works across both IL2CPP and Mono builds. + /// + /// The NPC to set the relationship for. + public static void UnlockNpc(VanillaNpcList npc) + { + var command = new SetUnlocked(); + var args = new List(); + + args.Add(npc.GetDescriptionValue()); + + command.Execute(args); + } + /// /// Executes the ChangeCashCommand with the given amount. /// This method works across both IL2CPP and Mono builds. From 0bb68d51a6fbedcb6d3be24113c3506f9a834c4a Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Thu, 8 May 2025 20:12:09 -0400 Subject: [PATCH 29/36] Add console command to teleport to business and properties. --- S1API/Console/ConsoleHelper.cs | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/S1API/Console/ConsoleHelper.cs b/S1API/Console/ConsoleHelper.cs index ab05602e..e7ad494e 100644 --- a/S1API/Console/ConsoleHelper.cs +++ b/S1API/Console/ConsoleHelper.cs @@ -437,6 +437,36 @@ public static void UnlockNpc(VanillaNpcList npc) command.Execute(args); } + /// + /// Teleport to a business. + /// This method works across both IL2CPP and Mono builds. + /// + /// The business to teleport to. + public static void TeleportToBusiness(BusinessType business) + { + var command = new Teleport(); + var args = new List(); + + args.Add(business.ToString()); + + command.Execute(args); + } + + /// + /// Teleport to a property. + /// This method works across both IL2CPP and Mono builds. + /// + /// The property to teleport to. + public static void TeleportToProperty(PropertyType property) + { + var command = new Teleport(); + var args = new List(); + + args.Add(property.ToString()); + + command.Execute(args); + } + /// /// Executes the ChangeCashCommand with the given amount. /// This method works across both IL2CPP and Mono builds. From d32f8c4b3308203b9c5b9de833dd9371b212f2a7 Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Fri, 9 May 2025 19:21:59 -0400 Subject: [PATCH 30/36] Add console command to spawn vehicles. --- S1API/Console/ConsoleHelper.cs | 31 +++++++++++++++++++++++++++ S1API/Vehicles/VanillaVehicleList.cs | 32 ++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 S1API/Vehicles/VanillaVehicleList.cs diff --git a/S1API/Console/ConsoleHelper.cs b/S1API/Console/ConsoleHelper.cs index e7ad494e..79304683 100644 --- a/S1API/Console/ConsoleHelper.cs +++ b/S1API/Console/ConsoleHelper.cs @@ -14,6 +14,7 @@ using S1API.Products.Packaging; using S1API.Property; using S1API.Quests.Constants; +using S1API.Vehicles; using System.Globalization; namespace S1API.Console @@ -407,6 +408,36 @@ public static void SetTime(string time) command.Execute(args); } + /// + /// Spawns a vehicle at the player's location. + /// This method works across both IL2CPP and Mono builds. + /// + /// The vehicle to spawn. + public static void SpawnVehicle(string vehicle) + { + var command = new SpawnVehicleCommand(); + var args = new List(); + + args.Add(vehicle); + + command.Execute(args); + } + + /// + /// Spawns a vehicle at the player's location. + /// This method works across both IL2CPP and Mono builds. + /// + /// The vehicle to spawn. + public static void SpawnVehicle(VanillaVehicleList vehicle) + { + var command = new SpawnVehicleCommand(); + var args = new List(); + + args.Add(vehicle.ToString()); + + command.Execute(args); + } + /// /// Unlocks the connection for the given NPC. /// This method works across both IL2CPP and Mono builds. diff --git a/S1API/Vehicles/VanillaVehicleList.cs b/S1API/Vehicles/VanillaVehicleList.cs new file mode 100644 index 00000000..0f53ce45 --- /dev/null +++ b/S1API/Vehicles/VanillaVehicleList.cs @@ -0,0 +1,32 @@ +namespace S1API.Vehicles; + +/// +/// The vehicles available in vanilla. +/// +public enum VanillaVehicleList +{ + /// + /// The Bruiser vehicle. + /// + Bruiser, + /// + /// The Cheetah vehicle. + /// + Cheetah, + /// + /// The Dinkler vehicle. + /// + Dinkler, + /// + /// The Hounddog vehicle. + /// + Hounddog, + /// + /// The Shitbox vehicle. + /// + Shitbox, + /// + /// The Veeper vehicle. + /// + Veeper, +} From d4fcb730bf362aec6ac5c292fda5c7d46bfd3450 Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Fri, 9 May 2025 19:23:53 -0400 Subject: [PATCH 31/36] Add XML comments to VanillaQuest.cs --- S1API/Quests/Constants/VanillaQuest.cs | 60 ++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/S1API/Quests/Constants/VanillaQuest.cs b/S1API/Quests/Constants/VanillaQuest.cs index 6e1fba7c..d7b2c560 100644 --- a/S1API/Quests/Constants/VanillaQuest.cs +++ b/S1API/Quests/Constants/VanillaQuest.cs @@ -2,44 +2,104 @@ namespace S1API.Quests.Constants { + /// + /// The list of quests in vanilla. + /// public enum VanillaQuest { + /// + /// The Botanists quest + /// [Description("Botanists")] Botanists, + /// + /// The Chemists quest + /// [Description("Chemists")] Chemists, + /// + /// The Clean Cash quest + /// [Description("Clean Cash")] Clean_Cash, + /// + /// The Cleaners quest + /// [Description("Cleaners")] Cleaners, + /// + /// The Dodgy Dealing quest + /// [Description("Dodgy Dealing")] Dodgy_Dealing, + /// + /// The Gearing Up quest + /// [Description("Gearing Up")] Gearing_Up, + /// + /// The Getting Started quest + /// [Description("Getting Started")] Getting_Started, + /// + /// The Keeping it Fresh quest + /// [Description("Keeping it Fresh")] Keeping_it_Fresh, + /// + /// The Making the Rounds quest + /// [Description("Making the Rounds")] Making_the_Rounds, + /// + /// The Mixing Mania quest + /// [Description("Mixing Mania")] Mixing_Mania, + /// + /// The Money Management quest + /// [Description("Money Management")] Money_Management, + /// + /// The Moving Up quest + /// [Description("Moving Up")] Moving_Up, + /// + /// The Needin' the Green quest + /// [Description("Needin' the Green")] NeedinTheGreen, + /// + /// The On the Grind quest + /// [Description("On the Grind")] On_the_Grind, + /// + /// The Packagers quest + /// [Description("Packagers")] Packagers, + /// + /// The Packin' quest + /// [Description("Packin'")] Packin, + /// + /// The We Need To Cook quest + /// [Description("We Need To Cook")] We_Need_To_Cook, + /// + /// The Welcome to Hyland Point quest + /// [Description("Welcome to Hyland Point")] Welcome_to_Hyland_Point, + /// + /// The Wretched Hive of Scum and Villainy quest + /// [Description("Wretched Hive of Scum and Villainy")] Wretched_Hive_of_Scum_and_Villainy, } From 87eda293194d073788126be562a223434437f5cd Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Fri, 9 May 2025 19:25:47 -0400 Subject: [PATCH 32/36] Add Description attribute for Ming in VanillaNpcList.cs --- S1API/NPCs/VanillaNpcList.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/S1API/NPCs/VanillaNpcList.cs b/S1API/NPCs/VanillaNpcList.cs index 0e56a5c5..c2ebad92 100644 --- a/S1API/NPCs/VanillaNpcList.cs +++ b/S1API/NPCs/VanillaNpcList.cs @@ -125,6 +125,7 @@ public enum VanillaNpcList MickLubbin, [Description("molly_presley")] MollyPresley, + [Description("ming")] Ming, [Description("pearl_moore")] PearlMoore, From 1110c5d4fef4bce43738e288fac179bcea723638 Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Fri, 9 May 2025 19:27:14 -0400 Subject: [PATCH 33/36] Use block-scoped namespace in EnumUtils.cs --- S1API/Internal/Utils/EnumUtils.cs | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/S1API/Internal/Utils/EnumUtils.cs b/S1API/Internal/Utils/EnumUtils.cs index 32240cb0..505e0815 100644 --- a/S1API/Internal/Utils/EnumUtils.cs +++ b/S1API/Internal/Utils/EnumUtils.cs @@ -2,22 +2,23 @@ using System.ComponentModel; using System.Reflection; -namespace S1API.Internal.Utils; - -/// -/// A set of utility methods when working with enums. -/// -internal static class EnumUtils +namespace S1API.Internal.Utils { /// - /// Gets the value of the Description attribute for an enum value. + /// A set of utility methods when working with enums. /// - /// The enum value - /// The description string or the enum value's name if no description is found - internal static string GetDescriptionValue(this Enum value) + internal static class EnumUtils { - var fieldInfo = value.GetType().GetField(value.ToString()); - var attribute = fieldInfo?.GetCustomAttribute(); - return attribute?.Description ?? value.ToString(); + /// + /// Gets the value of the Description attribute for an enum value. + /// + /// The enum value + /// The description string or the enum value's name if no description is found + internal static string GetDescriptionValue(this Enum value) + { + var fieldInfo = value.GetType().GetField(value.ToString()); + var attribute = fieldInfo?.GetCustomAttribute(); + return attribute?.Description ?? value.ToString(); + } } } From 3e7941c0ff09a36de60cb44a9201c06573404559 Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Fri, 9 May 2025 19:27:42 -0400 Subject: [PATCH 34/36] Use block-scoped namespace in VanillaVehicleList.cs --- S1API/Vehicles/VanillaVehicleList.cs | 57 ++++++++++++++-------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/S1API/Vehicles/VanillaVehicleList.cs b/S1API/Vehicles/VanillaVehicleList.cs index 0f53ce45..991afcbf 100644 --- a/S1API/Vehicles/VanillaVehicleList.cs +++ b/S1API/Vehicles/VanillaVehicleList.cs @@ -1,32 +1,33 @@ -namespace S1API.Vehicles; - -/// -/// The vehicles available in vanilla. -/// -public enum VanillaVehicleList +namespace S1API.Vehicles { /// - /// The Bruiser vehicle. + /// The vehicles available in vanilla. /// - Bruiser, - /// - /// The Cheetah vehicle. - /// - Cheetah, - /// - /// The Dinkler vehicle. - /// - Dinkler, - /// - /// The Hounddog vehicle. - /// - Hounddog, - /// - /// The Shitbox vehicle. - /// - Shitbox, - /// - /// The Veeper vehicle. - /// - Veeper, + public enum VanillaVehicleList + { + /// + /// The Bruiser vehicle. + /// + Bruiser, + /// + /// The Cheetah vehicle. + /// + Cheetah, + /// + /// The Dinkler vehicle. + /// + Dinkler, + /// + /// The Hounddog vehicle. + /// + Hounddog, + /// + /// The Shitbox vehicle. + /// + Shitbox, + /// + /// The Veeper vehicle. + /// + Veeper, + } } From 2f634dfa5e11f11605167617b6627fff31e41f66 Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Fri, 9 May 2025 19:37:20 -0400 Subject: [PATCH 35/36] Rename some console methods to be more descriptive. --- S1API/Console/ConsoleHelper.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/S1API/Console/ConsoleHelper.cs b/S1API/Console/ConsoleHelper.cs index 79304683..11320acb 100644 --- a/S1API/Console/ConsoleHelper.cs +++ b/S1API/Console/ConsoleHelper.cs @@ -30,7 +30,7 @@ public static class ConsoleHelper /// /// The type of employee. /// The property to add the employee to. You must own the property. - public static void AddEmployee(EEmployeeType employeeType, PropertyType propertyName) + public static void AddEmployeeToProperty(EEmployeeType employeeType, PropertyType propertyName) { var command = new AddEmployeeCommand(); var args = new List(); @@ -66,7 +66,7 @@ public static void AddItemToInventory(string itemName, int? amount = null) /// This method works across both IL2CPP and Mono builds. /// /// The amount to set the player's bank balance to. - public static void ChangeOnlineBalance(int amount) + public static void SetOnlineBalance(int amount) { var command = new ChangeOnlineBalanceCommand(); var args = new List(); From 2f2c1526d12dc9dd5f1577e1d9462ae37e134d65 Mon Sep 17 00:00:00 2001 From: Doug Murphy Date: Mon, 12 May 2025 16:20:02 -0400 Subject: [PATCH 36/36] Delete VanillaNpcList.cs * Use NPC as param instead so it's less restrictive. --- S1API/Console/ConsoleHelper.cs | 10 +- S1API/NPCs/VanillaNpcList.cs | 161 --------------------------------- 2 files changed, 5 insertions(+), 166 deletions(-) delete mode 100644 S1API/NPCs/VanillaNpcList.cs diff --git a/S1API/Console/ConsoleHelper.cs b/S1API/Console/ConsoleHelper.cs index 11320acb..d00c8915 100644 --- a/S1API/Console/ConsoleHelper.cs +++ b/S1API/Console/ConsoleHelper.cs @@ -9,8 +9,8 @@ using ScheduleOne.Employees; using ScheduleOne.ItemFramework; #endif +using S1API.Entities; using S1API.Internal.Utils; -using S1API.NPCs; using S1API.Products.Packaging; using S1API.Property; using S1API.Quests.Constants; @@ -382,12 +382,12 @@ public static void SetNpcRelationship(string npcId, float level) /// /// The NPC to set the relationship for. /// The relationship value to set. Must be between 0 and 5 inclusive. - public static void SetNpcRelationship(VanillaNpcList npc, float level) + public static void SetNpcRelationship(NPC npc, float level) { var command = new SetRelationship(); var args = new List(); - args.Add(npc.GetDescriptionValue()); + args.Add(npc.ID); args.Add(level.ToString(CultureInfo.InvariantCulture)); command.Execute(args); @@ -458,12 +458,12 @@ public static void UnlockNpc(string npcId) /// This method works across both IL2CPP and Mono builds. /// /// The NPC to set the relationship for. - public static void UnlockNpc(VanillaNpcList npc) + public static void UnlockNpc(NPC npc) { var command = new SetUnlocked(); var args = new List(); - args.Add(npc.GetDescriptionValue()); + args.Add(npc.ID); command.Execute(args); } diff --git a/S1API/NPCs/VanillaNpcList.cs b/S1API/NPCs/VanillaNpcList.cs deleted file mode 100644 index c2ebad92..00000000 --- a/S1API/NPCs/VanillaNpcList.cs +++ /dev/null @@ -1,161 +0,0 @@ -using System.ComponentModel; - -namespace S1API.NPCs -{ - /// - /// The list of NPCs in the vanilla game. - /// - public enum VanillaNpcList - { - [Description("albert_hoover")] - AlbertHoover, - [Description("alison_knight")] - AlisonKnight, - [Description("anna_chesterfield")] - AnnaChesterfield, - [Description("austin_steiner")] - AustinSteiner, - [Description("benji_coleman")] - BenjiColeman, - [Description("beth_penn")] - BethPenn, - [Description("billy_kramer")] - BillyKramer, - [Description("brad_crosby")] - BradCrosby, - [Description("carl_bundy")] - CarlBundy, - [Description("charles_rowland")] - CharlesRowland, - [Description("chloe_bowers")] - ChloeBowers, - [Description("chris_sullivan")] - ChrisSullivan, - [Description("cranky_frank")] - CrankyFrank, - [Description("dan_samwell")] - DanSamwell, - [Description("dean_webster")] - DeanWebster, - [Description("dennis_kennedy")] - DennisKennedy, - [Description("donna_martin")] - DonnaMartin, - [Description("doris_lubbin")] - DorisLubbin, - [Description("elizabeth_homley")] - ElizabethHomley, - [Description("eugene_buckley")] - EugeneBuckley, - [Description("fiona_hancock")] - FionaHancock, - [Description("genghis_barn")] - GenghisBarn, - [Description("george_greene")] - GeorgeGreene, - [Description("geraldine_poon")] - GeraldinePoon, - [Description("greg_fliggle")] - GregFliggle, - [Description("hank_stevenson")] - HankStevenson, - [Description("harold_colt")] - HaroldColt, - [Description("herbert_bleuball")] - HerbertBleuball, - [Description("igor_romanovich_door")] - IgorRomanovichDoor, - [Description("jack_knight")] - JackKnight, - [Description("jackie_stevenson")] - JackieStevenson, - [Description("jane_lucero")] - JaneLucero, - [Description("javier_perez")] - JavierPerez, - [Description("jeff_gilmore")] - JeffGilmore, - [Description("jen_heard")] - JenHeard, - [Description("jennifer_rivera")] - JenniferRivera, - [Description("jeremy_wilkinson")] - JeremyWilkinson, - [Description("jerry_montero")] - JerryMontero, - [Description("jessi_waters")] - JessiWaters, - [Description("joyce_ball")] - JoyceBall, - [Description("karen_kennedy")] - KarenKennedy, - [Description("kathy_henderson")] - KathyHenderson, - [Description("keith_wagner")] - KeithWagner, - [Description("kevin_oakley")] - KevinOakley, - [Description("kim_delaney")] - KimDelaney, - [Description("kyle_cooley")] - KyleCooley, - [Description("leo_rivers")] - LeoRivers, - [Description("lily_turner")] - LilyTurner, - [Description("lisa_gardener")] - LisaGardener, - [Description("louis_fourier")] - LouisFourier, - [Description("lucy_pennington")] - LucyPennington, - [Description("ludwig_meyer")] - LudwigMeyer, - [Description("mac_cooper")] - MacCooper, - [Description("marco_baron")] - MarcoBaron, - [Description("meg_cooley")] - MegCooley, - [Description("melissa_wood")] - MelissaWood, - [Description("michael_boog")] - MichaelBoog, - [Description("mick_lubbin")] - MickLubbin, - [Description("molly_presley")] - MollyPresley, - [Description("ming")] - Ming, - [Description("pearl_moore")] - PearlMoore, - [Description("peggy_myers")] - PeggyMyers, - [Description("peter_file")] - PeterFile, - [Description("philip_wentworth")] - PhilipWentworth, - [Description("randy_caulfield")] - RandyCaulfield, - [Description("ray_hoffman")] - RayHoffman, - [Description("salvador_moreno")] - SalvadorMoreno, - [Description("sam_thompson")] - SamThompson, - [Description("shirley_watts")] - ShirleyWatts, - [Description("stan_carney")] - StanCarney, - [Description("tobias_wentworth")] - TobiasWentworth, - [Description("trent_sherman")] - TrentSherman, - [Description("uncle_nelson")] - UncleNelson, - [Description("walter_cussler")] - WalterCussler, - [Description("wei_long")] - WeiLong - } -}