From 004af54f8bc9f078b7c09979da58a84a57ffc821 Mon Sep 17 00:00:00 2001 From: MaxtorCoder Date: Fri, 2 May 2025 23:37:05 +0200 Subject: [PATCH 1/4] Revert "fix: Il2CppBepInEx adjustments and ultimately disabled due to problems... Will need to review later" This reverts commit 5974e64746d25ba6905da8d0b4925862f80b5dc3. --- .github/workflows/deploy-build.yml | 7 +++---- .github/workflows/verify-build.yml | 7 +++---- S1API/Conditionals/SystemTriggerEntry.cs | 4 ++-- S1API/Console/ConsoleHelper.cs | 2 +- S1API/DeadDrops/DeadDropInstance.cs | 4 ++-- S1API/DeadDrops/DeadDropManager.cs | 4 ++-- S1API/Dialogues/DialogueInjector.cs | 5 +---- S1API/Entities/NPC.cs | 4 ++-- S1API/Entities/NPCs/DanSamwell.cs | 2 +- S1API/Entities/NPCs/Docks/AnnaChesterfield.cs | 2 +- S1API/Entities/NPCs/Docks/BillyKramer.cs | 2 +- S1API/Entities/NPCs/Docks/CrankyFrank.cs | 2 +- S1API/Entities/NPCs/Docks/GenghisBarn.cs | 2 +- S1API/Entities/NPCs/Docks/JaneLucero.cs | 2 +- S1API/Entities/NPCs/Docks/JavierPerez.cs | 2 +- S1API/Entities/NPCs/Docks/LisaGardener.cs | 2 +- S1API/Entities/NPCs/Docks/MacCooper.cs | 2 +- S1API/Entities/NPCs/Docks/MarcoBaron.cs | 2 +- S1API/Entities/NPCs/Docks/MelissaWood.cs | 2 +- S1API/Entities/NPCs/Docks/SalvadorMoreno.cs | 2 +- S1API/Entities/NPCs/Downtown/BradCrosby.cs | 2 +- S1API/Entities/NPCs/Downtown/ElizabethHomley.cs | 2 +- S1API/Entities/NPCs/Downtown/EugeneBuckley.cs | 2 +- S1API/Entities/NPCs/Downtown/GregFliggle.cs | 2 +- S1API/Entities/NPCs/Downtown/JeffGilmore.cs | 2 +- S1API/Entities/NPCs/Downtown/JenniferRivera.cs | 2 +- S1API/Entities/NPCs/Downtown/KevinOakley.cs | 2 +- S1API/Entities/NPCs/Downtown/LouisFourier.cs | 2 +- S1API/Entities/NPCs/Downtown/LucyPennington.cs | 2 +- S1API/Entities/NPCs/Downtown/PhilipWentworth.cs | 2 +- S1API/Entities/NPCs/Downtown/RandyCaulfield.cs | 2 +- S1API/Entities/NPCs/IgorRomanovich.cs | 2 +- S1API/Entities/NPCs/MannyOakfield.cs | 2 +- S1API/Entities/NPCs/Northtown/AlbertHoover.cs | 2 +- S1API/Entities/NPCs/Northtown/AustinSteiner.cs | 2 +- S1API/Entities/NPCs/Northtown/BenjiColeman.cs | 2 +- S1API/Entities/NPCs/Northtown/BethPenn.cs | 2 +- S1API/Entities/NPCs/Northtown/ChloeBowers.cs | 2 +- S1API/Entities/NPCs/Northtown/DonnaMartin.cs | 2 +- S1API/Entities/NPCs/Northtown/GeraldinePoon.cs | 2 +- S1API/Entities/NPCs/Northtown/JessiWaters.cs | 2 +- S1API/Entities/NPCs/Northtown/KathyHenderson.cs | 2 +- S1API/Entities/NPCs/Northtown/KyleCooley.cs | 2 +- S1API/Entities/NPCs/Northtown/LudwigMeyer.cs | 2 +- S1API/Entities/NPCs/Northtown/MickLubbin.cs | 2 +- S1API/Entities/NPCs/Northtown/Ming.cs | 2 +- S1API/Entities/NPCs/Northtown/PeggyMyers.cs | 2 +- S1API/Entities/NPCs/Northtown/PeterFile.cs | 2 +- S1API/Entities/NPCs/Northtown/SamThompson.cs | 2 +- S1API/Entities/NPCs/OscarHolland.cs | 2 +- S1API/Entities/NPCs/PoliceOfficers/OfficerBailey.cs | 2 +- S1API/Entities/NPCs/PoliceOfficers/OfficerCooper.cs | 2 +- S1API/Entities/NPCs/PoliceOfficers/OfficerGreen.cs | 2 +- S1API/Entities/NPCs/PoliceOfficers/OfficerHoward.cs | 2 +- .../Entities/NPCs/PoliceOfficers/OfficerJackson.cs | 2 +- S1API/Entities/NPCs/PoliceOfficers/OfficerLee.cs | 2 +- S1API/Entities/NPCs/PoliceOfficers/OfficerLopez.cs | 2 +- S1API/Entities/NPCs/PoliceOfficers/OfficerMurphy.cs | 2 +- S1API/Entities/NPCs/PoliceOfficers/OfficerOakley.cs | 2 +- S1API/Entities/NPCs/StanCarney.cs | 2 +- S1API/Entities/NPCs/Suburbia/AlisonKnight.cs | 2 +- S1API/Entities/NPCs/Suburbia/CarlBundy.cs | 2 +- S1API/Entities/NPCs/Suburbia/ChrisSullivan.cs | 2 +- S1API/Entities/NPCs/Suburbia/DennisKennedy.cs | 2 +- S1API/Entities/NPCs/Suburbia/HankStevenson.cs | 2 +- S1API/Entities/NPCs/Suburbia/HaroldColt.cs | 2 +- S1API/Entities/NPCs/Suburbia/JackKnight.cs | 2 +- S1API/Entities/NPCs/Suburbia/JackieStevenson.cs | 2 +- S1API/Entities/NPCs/Suburbia/JeremyWilkinson.cs | 2 +- S1API/Entities/NPCs/Suburbia/KarenKennedy.cs | 2 +- S1API/Entities/NPCs/Suburbia/WeiLong.cs | 2 +- S1API/Entities/NPCs/UncleNelson.cs | 2 +- S1API/Entities/NPCs/Uptown/FionaHancock.cs | 2 +- S1API/Entities/NPCs/Uptown/HerbertBleuball.cs | 2 +- S1API/Entities/NPCs/Uptown/JenHeard.cs | 2 +- S1API/Entities/NPCs/Uptown/LeoRivers.cs | 2 +- S1API/Entities/NPCs/Uptown/LilyTurner.cs | 2 +- S1API/Entities/NPCs/Uptown/MichaelBoog.cs | 2 +- S1API/Entities/NPCs/Uptown/PearlMoore.cs | 2 +- S1API/Entities/NPCs/Uptown/RayHoffman.cs | 2 +- S1API/Entities/NPCs/Uptown/TobiasWentworth.cs | 2 +- S1API/Entities/NPCs/Uptown/WalterCussler.cs | 2 +- S1API/Entities/NPCs/Westville/CharlesRowland.cs | 2 +- S1API/Entities/NPCs/Westville/DeanWebster.cs | 2 +- S1API/Entities/NPCs/Westville/DorisLubbin.cs | 2 +- S1API/Entities/NPCs/Westville/GeorgeGreene.cs | 2 +- S1API/Entities/NPCs/Westville/JerryMontero.cs | 2 +- S1API/Entities/NPCs/Westville/JoyceBall.cs | 2 +- S1API/Entities/NPCs/Westville/KeithWagner.cs | 2 +- S1API/Entities/NPCs/Westville/KimDelaney.cs | 2 +- S1API/Entities/NPCs/Westville/MegCooley.cs | 2 +- S1API/Entities/NPCs/Westville/MollyPresley.cs | 2 +- S1API/Entities/NPCs/Westville/ShirleyWatts.cs | 2 +- S1API/Entities/NPCs/Westville/TrentSherman.cs | 2 +- S1API/Entities/Player.cs | 2 +- S1API/GameTime/GameDateTime.cs | 2 +- S1API/GameTime/TimeManager.cs | 2 +- S1API/Internal/Patches/HomeScreen.Start.cs | 2 +- S1API/Internal/Patches/NPCPatches.cs | 2 +- S1API/Internal/Patches/PlayerPatches.cs | 2 +- S1API/Internal/Patches/QuestPatches.cs | 2 +- S1API/Internal/Patches/TimePatches.cs | 2 +- S1API/Internal/Utils/CrossType.cs | 2 +- S1API/Items/ItemDefinition.cs | 2 +- S1API/Items/ItemInstance.cs | 2 +- S1API/Items/ItemManager.cs | 2 +- S1API/Items/ItemSlotInstance.cs | 2 +- S1API/Leveling/LevelManager.cs | 2 +- S1API/Messaging/Response.cs | 2 +- S1API/Money/CashDefinition.cs | 2 +- S1API/Money/CashInstance.cs | 2 +- S1API/Money/Money.cs | 4 ++-- S1API/PhoneApp/PhoneApp.cs | 13 ++++++------- S1API/PhoneCalls/CallManager.cs | 2 +- S1API/PhoneCalls/CallStageEntry.cs | 2 +- S1API/PhoneCalls/CallerDefinition.cs | 2 +- S1API/PhoneCalls/PhoneCallDefinition.cs | 2 +- S1API/Products/CocaineDefinition.cs | 2 +- S1API/Products/MethDefinition.cs | 2 +- S1API/Products/PackagingDefinition.cs | 2 +- S1API/Products/ProductDefinition.cs | 2 +- S1API/Products/ProductDefinitionWrapper.cs | 2 +- S1API/Products/ProductInstance.cs | 2 +- S1API/Products/ProductManager.cs | 2 +- S1API/Products/WeedDefinition.cs | 2 +- S1API/Quests/Quest.cs | 2 +- S1API/Quests/QuestEntry.cs | 2 +- S1API/Storages/StorageInstance.cs | 2 +- 128 files changed, 142 insertions(+), 148 deletions(-) diff --git a/.github/workflows/deploy-build.yml b/.github/workflows/deploy-build.yml index dde08a39..8ba84487 100644 --- a/.github/workflows/deploy-build.yml +++ b/.github/workflows/deploy-build.yml @@ -59,9 +59,8 @@ jobs: - name: Run .NET build for MonoBepInEx run: dotnet build ./S1API.sln -c MonoBepInEx -f netstandard2.1 -# TODO (@MaxtorCoder): Il2CppBepInEx still does not build properly. -# - name: Run .NET build for Il2CppBepInEx -# run: dotnet build ./S1API.sln -c Il2CppBepInEx -f net6.0 + - name: Run .NET build for Il2CppBepInEx + run: dotnet build ./S1API.sln -c Il2CppBepInEx -f net6.0 - name: Run .NET build for MonoMelon run: dotnet build ./S1API.sln -c MonoMelon -f netstandard2.1 @@ -77,8 +76,8 @@ jobs: cp ./S1APILoader/bin/MonoBepInEx/netstandard2.1/S1APILoader.dll ./artifacts/thunderstore/Plugins/S1APILoader.BepInEx.dll cp ./S1API/bin/Il2CppMelon/net6.0/S1API.dll ./artifacts/thunderstore/Mods/S1API.Il2Cpp.MelonLoader.dll cp ./S1API/bin/MonoMelon/netstandard2.1/S1API.dll ./artifacts/thunderstore/Mods/S1API.Mono.MelonLoader.dll + cp ./S1API/bin/Il2CppBepInEx/net6.0/S1API.dll ./artifacts/thunderstore/Mods/S1API.Il2Cpp.BepInEx.dll cp ./S1API/bin/MonoBepInEx/netstandard2.1/S1API.dll ./artifacts/thunderstore/Mods/S1API.Mono.BepInEx.dll -# cp ./S1API/bin/Il2CppBepInEx/net6.0/S1API.dll ./artifacts/thunderstore/Mods/S1API.Il2Cpp.BepInEx.dll - name: Publish artifact to Thunderstore uses: GreenTF/upload-thunderstore-package@v4.3 diff --git a/.github/workflows/verify-build.yml b/.github/workflows/verify-build.yml index ec246aaf..d50326d3 100644 --- a/.github/workflows/verify-build.yml +++ b/.github/workflows/verify-build.yml @@ -30,10 +30,9 @@ jobs: - name: Run .NET build for MonoBepInEx run: dotnet build ./S1API.sln -c MonoBepInEx -f netstandard2.1 - -# TODO (@MaxtorCoder): Il2CppBepInEx still does not build properly. -# - name: Run .NET build for Il2CppBepInEx -# run: dotnet build ./S1API.sln -c Il2CppBepInEx -f net6.0 + + - name: Run .NET build for Il2CppBepInEx + run: dotnet build ./S1API.sln -c Il2CppBepInEx -f net6.0 - name: Run .NET build for MonoMelon run: dotnet build ./S1API.sln -c MonoMelon -f netstandard2.1 diff --git a/S1API/Conditionals/SystemTriggerEntry.cs b/S1API/Conditionals/SystemTriggerEntry.cs index ad08f7be..44281914 100644 --- a/S1API/Conditionals/SystemTriggerEntry.cs +++ b/S1API/Conditionals/SystemTriggerEntry.cs @@ -1,8 +1,8 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using S1Quests = Il2CppScheduleOne.Quests; using S1Variables = Il2CppScheduleOne.Variables; using static Il2CppScheduleOne.Quests.QuestManager; -#elif (MONOMELON || MONOBEPINEX) +#elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) using S1Quests = ScheduleOne.Quests; using S1Variables = ScheduleOne.Variables; using static ScheduleOne.Quests.QuestManager; diff --git a/S1API/Console/ConsoleHelper.cs b/S1API/Console/ConsoleHelper.cs index 6cd33851..0544df16 100644 --- a/S1API/Console/ConsoleHelper.cs +++ b/S1API/Console/ConsoleHelper.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppSystem.Collections.Generic; using static Il2CppScheduleOne.Console; #else diff --git a/S1API/DeadDrops/DeadDropInstance.cs b/S1API/DeadDrops/DeadDropInstance.cs index 32a8898a..20b877de 100644 --- a/S1API/DeadDrops/DeadDropInstance.cs +++ b/S1API/DeadDrops/DeadDropInstance.cs @@ -1,6 +1,6 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using S1Economy = Il2CppScheduleOne.Economy; -#elif (MONOMELON || MONOBEPINEX) +#elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) using S1Economy = ScheduleOne.Economy; #endif diff --git a/S1API/DeadDrops/DeadDropManager.cs b/S1API/DeadDrops/DeadDropManager.cs index 346e1ce4..f4fc8b47 100644 --- a/S1API/DeadDrops/DeadDropManager.cs +++ b/S1API/DeadDrops/DeadDropManager.cs @@ -1,6 +1,6 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using S1Economy = Il2CppScheduleOne.Economy; -#elif (MONOMELON || MONOBEPINEX) +#elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) using S1Economy = ScheduleOne.Economy; #endif diff --git a/S1API/Dialogues/DialogueInjector.cs b/S1API/Dialogues/DialogueInjector.cs index 52719424..1ec2d6fa 100644 --- a/S1API/Dialogues/DialogueInjector.cs +++ b/S1API/Dialogues/DialogueInjector.cs @@ -59,13 +59,10 @@ private static void HookUpdateLoop() if (isHooked) return; isHooked = true; - // TODO (@omar-akermi): Can we please look into attaching during the patch process of NPCs? - // I really do not like the use of Coroutines and this in particular is causing issues in Il2CppBepInEx builds... #if (IL2CPPMELON || MONOMELON) MelonCoroutines.Start(WaitForNPCsAndInject()); #elif (IL2CPPBEPINEX || MONOBEPINEX) - // InstanceFinder.TimeManager.StartCoroutine(WaitForNPCsAndInject()); - + InstanceFinder.TimeManager.StartCoroutine(WaitForNPCsAndInject()); #endif } diff --git a/S1API/Entities/NPC.cs b/S1API/Entities/NPC.cs index c15aa590..333c9ff9 100644 --- a/S1API/Entities/NPC.cs +++ b/S1API/Entities/NPC.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using S1DevUtilities = Il2CppScheduleOne.DevUtilities; using S1Interaction = Il2CppScheduleOne.Interaction; using S1Messaging = Il2CppScheduleOne.Messaging; @@ -13,7 +13,7 @@ using S1Vehicles = Il2CppScheduleOne.Vehicles; using S1Vision = Il2CppScheduleOne.Vision; using S1NPCs = Il2CppScheduleOne.NPCs; -#elif (MONOMELON || MONOBEPINEX) +#elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) using S1DevUtilities = ScheduleOne.DevUtilities; using S1Interaction = ScheduleOne.Interaction; using S1Messaging = ScheduleOne.Messaging; diff --git a/S1API/Entities/NPCs/DanSamwell.cs b/S1API/Entities/NPCs/DanSamwell.cs index cf88c526..7b51d4d2 100644 --- a/S1API/Entities/NPCs/DanSamwell.cs +++ b/S1API/Entities/NPCs/DanSamwell.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Docks/AnnaChesterfield.cs b/S1API/Entities/NPCs/Docks/AnnaChesterfield.cs index 128ee7e4..f86f89fc 100644 --- a/S1API/Entities/NPCs/Docks/AnnaChesterfield.cs +++ b/S1API/Entities/NPCs/Docks/AnnaChesterfield.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Docks/BillyKramer.cs b/S1API/Entities/NPCs/Docks/BillyKramer.cs index b66ed16e..a27d069f 100644 --- a/S1API/Entities/NPCs/Docks/BillyKramer.cs +++ b/S1API/Entities/NPCs/Docks/BillyKramer.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Docks/CrankyFrank.cs b/S1API/Entities/NPCs/Docks/CrankyFrank.cs index 60d8d8ca..606593d0 100644 --- a/S1API/Entities/NPCs/Docks/CrankyFrank.cs +++ b/S1API/Entities/NPCs/Docks/CrankyFrank.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Docks/GenghisBarn.cs b/S1API/Entities/NPCs/Docks/GenghisBarn.cs index ebd524ad..fa97929b 100644 --- a/S1API/Entities/NPCs/Docks/GenghisBarn.cs +++ b/S1API/Entities/NPCs/Docks/GenghisBarn.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Docks/JaneLucero.cs b/S1API/Entities/NPCs/Docks/JaneLucero.cs index 836e12ed..523e034a 100644 --- a/S1API/Entities/NPCs/Docks/JaneLucero.cs +++ b/S1API/Entities/NPCs/Docks/JaneLucero.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Docks/JavierPerez.cs b/S1API/Entities/NPCs/Docks/JavierPerez.cs index 1f82527c..8163af7b 100644 --- a/S1API/Entities/NPCs/Docks/JavierPerez.cs +++ b/S1API/Entities/NPCs/Docks/JavierPerez.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Docks/LisaGardener.cs b/S1API/Entities/NPCs/Docks/LisaGardener.cs index a6ab6ee0..dd8b42e8 100644 --- a/S1API/Entities/NPCs/Docks/LisaGardener.cs +++ b/S1API/Entities/NPCs/Docks/LisaGardener.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Docks/MacCooper.cs b/S1API/Entities/NPCs/Docks/MacCooper.cs index 6a2cfffc..c4bdb013 100644 --- a/S1API/Entities/NPCs/Docks/MacCooper.cs +++ b/S1API/Entities/NPCs/Docks/MacCooper.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Docks/MarcoBaron.cs b/S1API/Entities/NPCs/Docks/MarcoBaron.cs index e297aa83..8e4eb0bc 100644 --- a/S1API/Entities/NPCs/Docks/MarcoBaron.cs +++ b/S1API/Entities/NPCs/Docks/MarcoBaron.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Docks/MelissaWood.cs b/S1API/Entities/NPCs/Docks/MelissaWood.cs index 34f6cc77..bbac72a9 100644 --- a/S1API/Entities/NPCs/Docks/MelissaWood.cs +++ b/S1API/Entities/NPCs/Docks/MelissaWood.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Docks/SalvadorMoreno.cs b/S1API/Entities/NPCs/Docks/SalvadorMoreno.cs index fc4469d3..0da716bc 100644 --- a/S1API/Entities/NPCs/Docks/SalvadorMoreno.cs +++ b/S1API/Entities/NPCs/Docks/SalvadorMoreno.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Downtown/BradCrosby.cs b/S1API/Entities/NPCs/Downtown/BradCrosby.cs index cc42a6b7..553480c0 100644 --- a/S1API/Entities/NPCs/Downtown/BradCrosby.cs +++ b/S1API/Entities/NPCs/Downtown/BradCrosby.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Downtown/ElizabethHomley.cs b/S1API/Entities/NPCs/Downtown/ElizabethHomley.cs index b7811855..309a22d0 100644 --- a/S1API/Entities/NPCs/Downtown/ElizabethHomley.cs +++ b/S1API/Entities/NPCs/Downtown/ElizabethHomley.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Downtown/EugeneBuckley.cs b/S1API/Entities/NPCs/Downtown/EugeneBuckley.cs index eeea5c69..e598ed6b 100644 --- a/S1API/Entities/NPCs/Downtown/EugeneBuckley.cs +++ b/S1API/Entities/NPCs/Downtown/EugeneBuckley.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Downtown/GregFliggle.cs b/S1API/Entities/NPCs/Downtown/GregFliggle.cs index 7d24bc35..5cf2b476 100644 --- a/S1API/Entities/NPCs/Downtown/GregFliggle.cs +++ b/S1API/Entities/NPCs/Downtown/GregFliggle.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Downtown/JeffGilmore.cs b/S1API/Entities/NPCs/Downtown/JeffGilmore.cs index 9e7592f3..185ad1dc 100644 --- a/S1API/Entities/NPCs/Downtown/JeffGilmore.cs +++ b/S1API/Entities/NPCs/Downtown/JeffGilmore.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Downtown/JenniferRivera.cs b/S1API/Entities/NPCs/Downtown/JenniferRivera.cs index bbf10c40..0fe18257 100644 --- a/S1API/Entities/NPCs/Downtown/JenniferRivera.cs +++ b/S1API/Entities/NPCs/Downtown/JenniferRivera.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Downtown/KevinOakley.cs b/S1API/Entities/NPCs/Downtown/KevinOakley.cs index 01f745cc..7a942ba3 100644 --- a/S1API/Entities/NPCs/Downtown/KevinOakley.cs +++ b/S1API/Entities/NPCs/Downtown/KevinOakley.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Downtown/LouisFourier.cs b/S1API/Entities/NPCs/Downtown/LouisFourier.cs index 11828cdf..fbf8f582 100644 --- a/S1API/Entities/NPCs/Downtown/LouisFourier.cs +++ b/S1API/Entities/NPCs/Downtown/LouisFourier.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Downtown/LucyPennington.cs b/S1API/Entities/NPCs/Downtown/LucyPennington.cs index 8f125164..832765f2 100644 --- a/S1API/Entities/NPCs/Downtown/LucyPennington.cs +++ b/S1API/Entities/NPCs/Downtown/LucyPennington.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Downtown/PhilipWentworth.cs b/S1API/Entities/NPCs/Downtown/PhilipWentworth.cs index b58c12af..f14ec3b0 100644 --- a/S1API/Entities/NPCs/Downtown/PhilipWentworth.cs +++ b/S1API/Entities/NPCs/Downtown/PhilipWentworth.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Downtown/RandyCaulfield.cs b/S1API/Entities/NPCs/Downtown/RandyCaulfield.cs index cc23b478..48914d63 100644 --- a/S1API/Entities/NPCs/Downtown/RandyCaulfield.cs +++ b/S1API/Entities/NPCs/Downtown/RandyCaulfield.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/IgorRomanovich.cs b/S1API/Entities/NPCs/IgorRomanovich.cs index 2c9defd2..cb440ca3 100644 --- a/S1API/Entities/NPCs/IgorRomanovich.cs +++ b/S1API/Entities/NPCs/IgorRomanovich.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/MannyOakfield.cs b/S1API/Entities/NPCs/MannyOakfield.cs index a2a07289..87331be5 100644 --- a/S1API/Entities/NPCs/MannyOakfield.cs +++ b/S1API/Entities/NPCs/MannyOakfield.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Northtown/AlbertHoover.cs b/S1API/Entities/NPCs/Northtown/AlbertHoover.cs index 79afe3ef..a740d58f 100644 --- a/S1API/Entities/NPCs/Northtown/AlbertHoover.cs +++ b/S1API/Entities/NPCs/Northtown/AlbertHoover.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Northtown/AustinSteiner.cs b/S1API/Entities/NPCs/Northtown/AustinSteiner.cs index 68c93c99..1587d7ea 100644 --- a/S1API/Entities/NPCs/Northtown/AustinSteiner.cs +++ b/S1API/Entities/NPCs/Northtown/AustinSteiner.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Northtown/BenjiColeman.cs b/S1API/Entities/NPCs/Northtown/BenjiColeman.cs index 1afa63ed..504fb88a 100644 --- a/S1API/Entities/NPCs/Northtown/BenjiColeman.cs +++ b/S1API/Entities/NPCs/Northtown/BenjiColeman.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Northtown/BethPenn.cs b/S1API/Entities/NPCs/Northtown/BethPenn.cs index 6686a807..46602c11 100644 --- a/S1API/Entities/NPCs/Northtown/BethPenn.cs +++ b/S1API/Entities/NPCs/Northtown/BethPenn.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Northtown/ChloeBowers.cs b/S1API/Entities/NPCs/Northtown/ChloeBowers.cs index b804ef1c..8d32e57a 100644 --- a/S1API/Entities/NPCs/Northtown/ChloeBowers.cs +++ b/S1API/Entities/NPCs/Northtown/ChloeBowers.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Northtown/DonnaMartin.cs b/S1API/Entities/NPCs/Northtown/DonnaMartin.cs index 3dc5577f..87e96d2e 100644 --- a/S1API/Entities/NPCs/Northtown/DonnaMartin.cs +++ b/S1API/Entities/NPCs/Northtown/DonnaMartin.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Northtown/GeraldinePoon.cs b/S1API/Entities/NPCs/Northtown/GeraldinePoon.cs index 49f1c617..47c86507 100644 --- a/S1API/Entities/NPCs/Northtown/GeraldinePoon.cs +++ b/S1API/Entities/NPCs/Northtown/GeraldinePoon.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Northtown/JessiWaters.cs b/S1API/Entities/NPCs/Northtown/JessiWaters.cs index ea36159e..763fd641 100644 --- a/S1API/Entities/NPCs/Northtown/JessiWaters.cs +++ b/S1API/Entities/NPCs/Northtown/JessiWaters.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Northtown/KathyHenderson.cs b/S1API/Entities/NPCs/Northtown/KathyHenderson.cs index fa2c0ee1..b49b082d 100644 --- a/S1API/Entities/NPCs/Northtown/KathyHenderson.cs +++ b/S1API/Entities/NPCs/Northtown/KathyHenderson.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Northtown/KyleCooley.cs b/S1API/Entities/NPCs/Northtown/KyleCooley.cs index 86c3afdc..824e1e15 100644 --- a/S1API/Entities/NPCs/Northtown/KyleCooley.cs +++ b/S1API/Entities/NPCs/Northtown/KyleCooley.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Northtown/LudwigMeyer.cs b/S1API/Entities/NPCs/Northtown/LudwigMeyer.cs index 98a84858..977d7b8e 100644 --- a/S1API/Entities/NPCs/Northtown/LudwigMeyer.cs +++ b/S1API/Entities/NPCs/Northtown/LudwigMeyer.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Northtown/MickLubbin.cs b/S1API/Entities/NPCs/Northtown/MickLubbin.cs index 549e987a..5c283887 100644 --- a/S1API/Entities/NPCs/Northtown/MickLubbin.cs +++ b/S1API/Entities/NPCs/Northtown/MickLubbin.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Northtown/Ming.cs b/S1API/Entities/NPCs/Northtown/Ming.cs index e71858d8..d2c59d84 100644 --- a/S1API/Entities/NPCs/Northtown/Ming.cs +++ b/S1API/Entities/NPCs/Northtown/Ming.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Northtown/PeggyMyers.cs b/S1API/Entities/NPCs/Northtown/PeggyMyers.cs index fa4f3c87..b9af550c 100644 --- a/S1API/Entities/NPCs/Northtown/PeggyMyers.cs +++ b/S1API/Entities/NPCs/Northtown/PeggyMyers.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Northtown/PeterFile.cs b/S1API/Entities/NPCs/Northtown/PeterFile.cs index 4058139c..a285a1db 100644 --- a/S1API/Entities/NPCs/Northtown/PeterFile.cs +++ b/S1API/Entities/NPCs/Northtown/PeterFile.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Northtown/SamThompson.cs b/S1API/Entities/NPCs/Northtown/SamThompson.cs index 60b7b7c9..548c3f69 100644 --- a/S1API/Entities/NPCs/Northtown/SamThompson.cs +++ b/S1API/Entities/NPCs/Northtown/SamThompson.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/OscarHolland.cs b/S1API/Entities/NPCs/OscarHolland.cs index ea9a65a7..ce8e963d 100644 --- a/S1API/Entities/NPCs/OscarHolland.cs +++ b/S1API/Entities/NPCs/OscarHolland.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/PoliceOfficers/OfficerBailey.cs b/S1API/Entities/NPCs/PoliceOfficers/OfficerBailey.cs index cf170bea..787d2c86 100644 --- a/S1API/Entities/NPCs/PoliceOfficers/OfficerBailey.cs +++ b/S1API/Entities/NPCs/PoliceOfficers/OfficerBailey.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/PoliceOfficers/OfficerCooper.cs b/S1API/Entities/NPCs/PoliceOfficers/OfficerCooper.cs index 1063f48c..4bf3d9ab 100644 --- a/S1API/Entities/NPCs/PoliceOfficers/OfficerCooper.cs +++ b/S1API/Entities/NPCs/PoliceOfficers/OfficerCooper.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/PoliceOfficers/OfficerGreen.cs b/S1API/Entities/NPCs/PoliceOfficers/OfficerGreen.cs index 92f0df57..1200e427 100644 --- a/S1API/Entities/NPCs/PoliceOfficers/OfficerGreen.cs +++ b/S1API/Entities/NPCs/PoliceOfficers/OfficerGreen.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/PoliceOfficers/OfficerHoward.cs b/S1API/Entities/NPCs/PoliceOfficers/OfficerHoward.cs index be73b41c..c91a35d7 100644 --- a/S1API/Entities/NPCs/PoliceOfficers/OfficerHoward.cs +++ b/S1API/Entities/NPCs/PoliceOfficers/OfficerHoward.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/PoliceOfficers/OfficerJackson.cs b/S1API/Entities/NPCs/PoliceOfficers/OfficerJackson.cs index 538788ab..664f61ba 100644 --- a/S1API/Entities/NPCs/PoliceOfficers/OfficerJackson.cs +++ b/S1API/Entities/NPCs/PoliceOfficers/OfficerJackson.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/PoliceOfficers/OfficerLee.cs b/S1API/Entities/NPCs/PoliceOfficers/OfficerLee.cs index 5dfdde7a..6340fc3d 100644 --- a/S1API/Entities/NPCs/PoliceOfficers/OfficerLee.cs +++ b/S1API/Entities/NPCs/PoliceOfficers/OfficerLee.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/PoliceOfficers/OfficerLopez.cs b/S1API/Entities/NPCs/PoliceOfficers/OfficerLopez.cs index 606d6673..b3af5ea0 100644 --- a/S1API/Entities/NPCs/PoliceOfficers/OfficerLopez.cs +++ b/S1API/Entities/NPCs/PoliceOfficers/OfficerLopez.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/PoliceOfficers/OfficerMurphy.cs b/S1API/Entities/NPCs/PoliceOfficers/OfficerMurphy.cs index ebfee7e6..ab65fe91 100644 --- a/S1API/Entities/NPCs/PoliceOfficers/OfficerMurphy.cs +++ b/S1API/Entities/NPCs/PoliceOfficers/OfficerMurphy.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/PoliceOfficers/OfficerOakley.cs b/S1API/Entities/NPCs/PoliceOfficers/OfficerOakley.cs index f070925c..6c26584f 100644 --- a/S1API/Entities/NPCs/PoliceOfficers/OfficerOakley.cs +++ b/S1API/Entities/NPCs/PoliceOfficers/OfficerOakley.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/StanCarney.cs b/S1API/Entities/NPCs/StanCarney.cs index 7e1a3839..6cd74f3f 100644 --- a/S1API/Entities/NPCs/StanCarney.cs +++ b/S1API/Entities/NPCs/StanCarney.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Suburbia/AlisonKnight.cs b/S1API/Entities/NPCs/Suburbia/AlisonKnight.cs index 3abc8365..5aa4c5b8 100644 --- a/S1API/Entities/NPCs/Suburbia/AlisonKnight.cs +++ b/S1API/Entities/NPCs/Suburbia/AlisonKnight.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Suburbia/CarlBundy.cs b/S1API/Entities/NPCs/Suburbia/CarlBundy.cs index 7885e0da..c1195607 100644 --- a/S1API/Entities/NPCs/Suburbia/CarlBundy.cs +++ b/S1API/Entities/NPCs/Suburbia/CarlBundy.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Suburbia/ChrisSullivan.cs b/S1API/Entities/NPCs/Suburbia/ChrisSullivan.cs index 499ad84c..7c9297b7 100644 --- a/S1API/Entities/NPCs/Suburbia/ChrisSullivan.cs +++ b/S1API/Entities/NPCs/Suburbia/ChrisSullivan.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Suburbia/DennisKennedy.cs b/S1API/Entities/NPCs/Suburbia/DennisKennedy.cs index b521f484..89214bff 100644 --- a/S1API/Entities/NPCs/Suburbia/DennisKennedy.cs +++ b/S1API/Entities/NPCs/Suburbia/DennisKennedy.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Suburbia/HankStevenson.cs b/S1API/Entities/NPCs/Suburbia/HankStevenson.cs index ba44f75a..2162a336 100644 --- a/S1API/Entities/NPCs/Suburbia/HankStevenson.cs +++ b/S1API/Entities/NPCs/Suburbia/HankStevenson.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Suburbia/HaroldColt.cs b/S1API/Entities/NPCs/Suburbia/HaroldColt.cs index bd9ff6ac..f450b6d6 100644 --- a/S1API/Entities/NPCs/Suburbia/HaroldColt.cs +++ b/S1API/Entities/NPCs/Suburbia/HaroldColt.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Suburbia/JackKnight.cs b/S1API/Entities/NPCs/Suburbia/JackKnight.cs index 0a85a749..8dce26a0 100644 --- a/S1API/Entities/NPCs/Suburbia/JackKnight.cs +++ b/S1API/Entities/NPCs/Suburbia/JackKnight.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Suburbia/JackieStevenson.cs b/S1API/Entities/NPCs/Suburbia/JackieStevenson.cs index b82996b0..0386020e 100644 --- a/S1API/Entities/NPCs/Suburbia/JackieStevenson.cs +++ b/S1API/Entities/NPCs/Suburbia/JackieStevenson.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Suburbia/JeremyWilkinson.cs b/S1API/Entities/NPCs/Suburbia/JeremyWilkinson.cs index cb55d965..f61a3f0a 100644 --- a/S1API/Entities/NPCs/Suburbia/JeremyWilkinson.cs +++ b/S1API/Entities/NPCs/Suburbia/JeremyWilkinson.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Suburbia/KarenKennedy.cs b/S1API/Entities/NPCs/Suburbia/KarenKennedy.cs index 5a4afab2..77a1bcc1 100644 --- a/S1API/Entities/NPCs/Suburbia/KarenKennedy.cs +++ b/S1API/Entities/NPCs/Suburbia/KarenKennedy.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Suburbia/WeiLong.cs b/S1API/Entities/NPCs/Suburbia/WeiLong.cs index b9df3a3b..c36a91e2 100644 --- a/S1API/Entities/NPCs/Suburbia/WeiLong.cs +++ b/S1API/Entities/NPCs/Suburbia/WeiLong.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/UncleNelson.cs b/S1API/Entities/NPCs/UncleNelson.cs index 4c4dc440..9a5fcb23 100644 --- a/S1API/Entities/NPCs/UncleNelson.cs +++ b/S1API/Entities/NPCs/UncleNelson.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Uptown/FionaHancock.cs b/S1API/Entities/NPCs/Uptown/FionaHancock.cs index 4925746b..6325996c 100644 --- a/S1API/Entities/NPCs/Uptown/FionaHancock.cs +++ b/S1API/Entities/NPCs/Uptown/FionaHancock.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Uptown/HerbertBleuball.cs b/S1API/Entities/NPCs/Uptown/HerbertBleuball.cs index 35474a37..b651a179 100644 --- a/S1API/Entities/NPCs/Uptown/HerbertBleuball.cs +++ b/S1API/Entities/NPCs/Uptown/HerbertBleuball.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Uptown/JenHeard.cs b/S1API/Entities/NPCs/Uptown/JenHeard.cs index 4e79f3f2..db42f7ed 100644 --- a/S1API/Entities/NPCs/Uptown/JenHeard.cs +++ b/S1API/Entities/NPCs/Uptown/JenHeard.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Uptown/LeoRivers.cs b/S1API/Entities/NPCs/Uptown/LeoRivers.cs index 01afef39..02238e74 100644 --- a/S1API/Entities/NPCs/Uptown/LeoRivers.cs +++ b/S1API/Entities/NPCs/Uptown/LeoRivers.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Uptown/LilyTurner.cs b/S1API/Entities/NPCs/Uptown/LilyTurner.cs index c80ff314..4b63e18c 100644 --- a/S1API/Entities/NPCs/Uptown/LilyTurner.cs +++ b/S1API/Entities/NPCs/Uptown/LilyTurner.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Uptown/MichaelBoog.cs b/S1API/Entities/NPCs/Uptown/MichaelBoog.cs index e6cb9795..0e36017b 100644 --- a/S1API/Entities/NPCs/Uptown/MichaelBoog.cs +++ b/S1API/Entities/NPCs/Uptown/MichaelBoog.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Uptown/PearlMoore.cs b/S1API/Entities/NPCs/Uptown/PearlMoore.cs index 1f6c3599..01d17570 100644 --- a/S1API/Entities/NPCs/Uptown/PearlMoore.cs +++ b/S1API/Entities/NPCs/Uptown/PearlMoore.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Uptown/RayHoffman.cs b/S1API/Entities/NPCs/Uptown/RayHoffman.cs index edac2e66..9dd7d83d 100644 --- a/S1API/Entities/NPCs/Uptown/RayHoffman.cs +++ b/S1API/Entities/NPCs/Uptown/RayHoffman.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Uptown/TobiasWentworth.cs b/S1API/Entities/NPCs/Uptown/TobiasWentworth.cs index 73374f26..26f1cbcd 100644 --- a/S1API/Entities/NPCs/Uptown/TobiasWentworth.cs +++ b/S1API/Entities/NPCs/Uptown/TobiasWentworth.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Uptown/WalterCussler.cs b/S1API/Entities/NPCs/Uptown/WalterCussler.cs index d6a36b1d..11e363b6 100644 --- a/S1API/Entities/NPCs/Uptown/WalterCussler.cs +++ b/S1API/Entities/NPCs/Uptown/WalterCussler.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Westville/CharlesRowland.cs b/S1API/Entities/NPCs/Westville/CharlesRowland.cs index 707d9325..b74064b1 100644 --- a/S1API/Entities/NPCs/Westville/CharlesRowland.cs +++ b/S1API/Entities/NPCs/Westville/CharlesRowland.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Westville/DeanWebster.cs b/S1API/Entities/NPCs/Westville/DeanWebster.cs index ad352612..46967489 100644 --- a/S1API/Entities/NPCs/Westville/DeanWebster.cs +++ b/S1API/Entities/NPCs/Westville/DeanWebster.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Westville/DorisLubbin.cs b/S1API/Entities/NPCs/Westville/DorisLubbin.cs index 1e841926..48467959 100644 --- a/S1API/Entities/NPCs/Westville/DorisLubbin.cs +++ b/S1API/Entities/NPCs/Westville/DorisLubbin.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Westville/GeorgeGreene.cs b/S1API/Entities/NPCs/Westville/GeorgeGreene.cs index 4cfed8f8..292a52fa 100644 --- a/S1API/Entities/NPCs/Westville/GeorgeGreene.cs +++ b/S1API/Entities/NPCs/Westville/GeorgeGreene.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Westville/JerryMontero.cs b/S1API/Entities/NPCs/Westville/JerryMontero.cs index 849737d6..41ce9ea4 100644 --- a/S1API/Entities/NPCs/Westville/JerryMontero.cs +++ b/S1API/Entities/NPCs/Westville/JerryMontero.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Westville/JoyceBall.cs b/S1API/Entities/NPCs/Westville/JoyceBall.cs index a7a4d0c4..2a417a2b 100644 --- a/S1API/Entities/NPCs/Westville/JoyceBall.cs +++ b/S1API/Entities/NPCs/Westville/JoyceBall.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Westville/KeithWagner.cs b/S1API/Entities/NPCs/Westville/KeithWagner.cs index 1ea07b90..8bc74432 100644 --- a/S1API/Entities/NPCs/Westville/KeithWagner.cs +++ b/S1API/Entities/NPCs/Westville/KeithWagner.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Westville/KimDelaney.cs b/S1API/Entities/NPCs/Westville/KimDelaney.cs index bc903738..ea526407 100644 --- a/S1API/Entities/NPCs/Westville/KimDelaney.cs +++ b/S1API/Entities/NPCs/Westville/KimDelaney.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Westville/MegCooley.cs b/S1API/Entities/NPCs/Westville/MegCooley.cs index c0d7e393..6c283f68 100644 --- a/S1API/Entities/NPCs/Westville/MegCooley.cs +++ b/S1API/Entities/NPCs/Westville/MegCooley.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Westville/MollyPresley.cs b/S1API/Entities/NPCs/Westville/MollyPresley.cs index 89bd088f..9aceb389 100644 --- a/S1API/Entities/NPCs/Westville/MollyPresley.cs +++ b/S1API/Entities/NPCs/Westville/MollyPresley.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Westville/ShirleyWatts.cs b/S1API/Entities/NPCs/Westville/ShirleyWatts.cs index 99237bfd..15f1096c 100644 --- a/S1API/Entities/NPCs/Westville/ShirleyWatts.cs +++ b/S1API/Entities/NPCs/Westville/ShirleyWatts.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/NPCs/Westville/TrentSherman.cs b/S1API/Entities/NPCs/Westville/TrentSherman.cs index 8b905e71..94850e52 100644 --- a/S1API/Entities/NPCs/Westville/TrentSherman.cs +++ b/S1API/Entities/NPCs/Westville/TrentSherman.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.NPCs; #else using ScheduleOne.NPCs; diff --git a/S1API/Entities/Player.cs b/S1API/Entities/Player.cs index 98851941..22551b0d 100644 --- a/S1API/Entities/Player.cs +++ b/S1API/Entities/Player.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using S1PlayerScripts = Il2CppScheduleOne.PlayerScripts; using S1Health = Il2CppScheduleOne.PlayerScripts.Health; #else diff --git a/S1API/GameTime/GameDateTime.cs b/S1API/GameTime/GameDateTime.cs index 5e4f1627..8dcbfa43 100644 --- a/S1API/GameTime/GameDateTime.cs +++ b/S1API/GameTime/GameDateTime.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using S1GameDateTime = Il2CppScheduleOne.GameTime.GameDateTime; using S1TimeManager = Il2CppScheduleOne.GameTime.TimeManager; using S1GameDateTimeData = Il2CppScheduleOne.Persistence.Datas.GameDateTimeData; diff --git a/S1API/GameTime/TimeManager.cs b/S1API/GameTime/TimeManager.cs index a176c9f0..700d40a7 100644 --- a/S1API/GameTime/TimeManager.cs +++ b/S1API/GameTime/TimeManager.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using S1GameTime = Il2CppScheduleOne.GameTime; #elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) using S1GameTime = ScheduleOne.GameTime; diff --git a/S1API/Internal/Patches/HomeScreen.Start.cs b/S1API/Internal/Patches/HomeScreen.Start.cs index b236e2a6..8d97d913 100644 --- a/S1API/Internal/Patches/HomeScreen.Start.cs +++ b/S1API/Internal/Patches/HomeScreen.Start.cs @@ -6,7 +6,7 @@ using S1API.PhoneApp; using S1API.Logging; -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.UI.Phone; #else using ScheduleOne.UI.Phone; diff --git a/S1API/Internal/Patches/NPCPatches.cs b/S1API/Internal/Patches/NPCPatches.cs index ed213f06..ac2db7a9 100644 --- a/S1API/Internal/Patches/NPCPatches.cs +++ b/S1API/Internal/Patches/NPCPatches.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using S1Loaders = Il2CppScheduleOne.Persistence.Loaders; using S1NPCs = Il2CppScheduleOne.NPCs; #elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) diff --git a/S1API/Internal/Patches/PlayerPatches.cs b/S1API/Internal/Patches/PlayerPatches.cs index fba7b2c8..49ae1228 100644 --- a/S1API/Internal/Patches/PlayerPatches.cs +++ b/S1API/Internal/Patches/PlayerPatches.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using S1PlayerScripts = Il2CppScheduleOne.PlayerScripts; #else using S1PlayerScripts = ScheduleOne.PlayerScripts; diff --git a/S1API/Internal/Patches/QuestPatches.cs b/S1API/Internal/Patches/QuestPatches.cs index bb964b04..b5e062dc 100644 --- a/S1API/Internal/Patches/QuestPatches.cs +++ b/S1API/Internal/Patches/QuestPatches.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using S1Loaders = Il2CppScheduleOne.Persistence.Loaders; using S1Datas = Il2CppScheduleOne.Persistence.Datas; using S1Quests = Il2CppScheduleOne.Quests; diff --git a/S1API/Internal/Patches/TimePatches.cs b/S1API/Internal/Patches/TimePatches.cs index 5fa41530..4e2ed6a7 100644 --- a/S1API/Internal/Patches/TimePatches.cs +++ b/S1API/Internal/Patches/TimePatches.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using S1GameTime = Il2CppScheduleOne.GameTime; #elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) using S1GameTime = ScheduleOne.GameTime; diff --git a/S1API/Internal/Utils/CrossType.cs b/S1API/Internal/Utils/CrossType.cs index 6359b69a..7eec5d0f 100644 --- a/S1API/Internal/Utils/CrossType.cs +++ b/S1API/Internal/Utils/CrossType.cs @@ -1,6 +1,6 @@ #if (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) using System; -#elif (IL2CPPMELON) +# elif (IL2CPPMELON) using Il2CppSystem; using Il2CppInterop.Runtime; using Il2CppInterop.Runtime.InteropTypes; diff --git a/S1API/Items/ItemDefinition.cs b/S1API/Items/ItemDefinition.cs index 2ac08b66..b4ba934e 100644 --- a/S1API/Items/ItemDefinition.cs +++ b/S1API/Items/ItemDefinition.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using S1ItemFramework = Il2CppScheduleOne.ItemFramework; #elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) using S1ItemFramework = ScheduleOne.ItemFramework; diff --git a/S1API/Items/ItemInstance.cs b/S1API/Items/ItemInstance.cs index 541b35d8..3f9bb0c2 100644 --- a/S1API/Items/ItemInstance.cs +++ b/S1API/Items/ItemInstance.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using S1ItemFramework = Il2CppScheduleOne.ItemFramework; #elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) using S1ItemFramework = ScheduleOne.ItemFramework; diff --git a/S1API/Items/ItemManager.cs b/S1API/Items/ItemManager.cs index 35960b33..44b9e8aa 100644 --- a/S1API/Items/ItemManager.cs +++ b/S1API/Items/ItemManager.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using S1 = Il2CppScheduleOne; using S1ItemFramework = Il2CppScheduleOne.ItemFramework; using S1Product = Il2CppScheduleOne.Product; diff --git a/S1API/Items/ItemSlotInstance.cs b/S1API/Items/ItemSlotInstance.cs index 6ca6f24e..2a8cb245 100644 --- a/S1API/Items/ItemSlotInstance.cs +++ b/S1API/Items/ItemSlotInstance.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using S1ItemFramework = Il2CppScheduleOne.ItemFramework; using S1Product = Il2CppScheduleOne.Product; #elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) diff --git a/S1API/Leveling/LevelManager.cs b/S1API/Leveling/LevelManager.cs index 67ecc1ae..30463441 100644 --- a/S1API/Leveling/LevelManager.cs +++ b/S1API/Leveling/LevelManager.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using S1Levelling = Il2CppScheduleOne.Levelling; #elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) using S1Levelling = ScheduleOne.Levelling; diff --git a/S1API/Messaging/Response.cs b/S1API/Messaging/Response.cs index f550ef40..204c208c 100644 --- a/S1API/Messaging/Response.cs +++ b/S1API/Messaging/Response.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using S1Messaging = Il2CppScheduleOne.Messaging; #elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) using S1Messaging = ScheduleOne.Messaging; diff --git a/S1API/Money/CashDefinition.cs b/S1API/Money/CashDefinition.cs index 1fff5e36..41c4844b 100644 --- a/S1API/Money/CashDefinition.cs +++ b/S1API/Money/CashDefinition.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using S1ItemFramework = Il2CppScheduleOne.ItemFramework; #elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) using S1ItemFramework = ScheduleOne.ItemFramework; diff --git a/S1API/Money/CashInstance.cs b/S1API/Money/CashInstance.cs index e9e121da..28463ed5 100644 --- a/S1API/Money/CashInstance.cs +++ b/S1API/Money/CashInstance.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using S1ItemFramework = Il2CppScheduleOne.ItemFramework; #elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) using S1ItemFramework = ScheduleOne.ItemFramework; diff --git a/S1API/Money/Money.cs b/S1API/Money/Money.cs index c160eee6..34e254ad 100644 --- a/S1API/Money/Money.cs +++ b/S1API/Money/Money.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne; using S1ItemFramework = Il2CppScheduleOne.ItemFramework; using S1MoneyFramework = Il2CppScheduleOne.Money; @@ -112,7 +112,7 @@ public static void RemoveNetworthCalculation(System.Action callback) /// A newly created instance of cash with the specified balance. public static CashInstance CreateCashInstance(float amount) { -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) var cashItem = Registry.GetItem("cash"); var instance = CrossType.As(cashItem.GetDefaultInstance(1)); var cashInstance = new CashInstance(instance); diff --git a/S1API/PhoneApp/PhoneApp.cs b/S1API/PhoneApp/PhoneApp.cs index 712d3fb5..9bc32ac5 100644 --- a/S1API/PhoneApp/PhoneApp.cs +++ b/S1API/PhoneApp/PhoneApp.cs @@ -5,16 +5,15 @@ using S1API.Internal.Abstraction; using S1API.Internal.Patches; -#if (MONOMELON || IL2CPPMELON) -using MelonLoader.Utils; -#endif - -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if IL2CPPMELON using Il2CppScheduleOne.UI.Phone; -#elif (MONOBEPINEX || MONOMELON) +using MelonLoader.Utils; +#elif MONOBEPINEX || IL2CPPBEPINEX +using ScheduleOne.UI.Phone; +#elif MONOMELON using ScheduleOne.UI.Phone; +using MelonLoader.Utils; #endif - namespace S1API.PhoneApp { /// diff --git a/S1API/PhoneCalls/CallManager.cs b/S1API/PhoneCalls/CallManager.cs index c9fec09b..be5f136e 100644 --- a/S1API/PhoneCalls/CallManager.cs +++ b/S1API/PhoneCalls/CallManager.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using S1Calling = Il2CppScheduleOne.Calling; #elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) using S1Calling = ScheduleOne.Calling; diff --git a/S1API/PhoneCalls/CallStageEntry.cs b/S1API/PhoneCalls/CallStageEntry.cs index cf3f60a2..2f6fc1b7 100644 --- a/S1API/PhoneCalls/CallStageEntry.cs +++ b/S1API/PhoneCalls/CallStageEntry.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using S1ScriptableObjects = Il2CppScheduleOne.ScriptableObjects; using S1Quests = Il2CppScheduleOne.Quests; using S1Variables = Il2CppScheduleOne.Variables; diff --git a/S1API/PhoneCalls/CallerDefinition.cs b/S1API/PhoneCalls/CallerDefinition.cs index 2ceda967..977adedd 100644 --- a/S1API/PhoneCalls/CallerDefinition.cs +++ b/S1API/PhoneCalls/CallerDefinition.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using S1CallerID = Il2CppScheduleOne.ScriptableObjects.CallerID; #elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) using S1CallerID = ScheduleOne.ScriptableObjects.CallerID; diff --git a/S1API/PhoneCalls/PhoneCallDefinition.cs b/S1API/PhoneCalls/PhoneCallDefinition.cs index ddb392ab..a0e5d578 100644 --- a/S1API/PhoneCalls/PhoneCallDefinition.cs +++ b/S1API/PhoneCalls/PhoneCallDefinition.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using S1ScriptableObjects = Il2CppScheduleOne.ScriptableObjects; #elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) using S1ScriptableObjects = ScheduleOne.ScriptableObjects; diff --git a/S1API/Products/CocaineDefinition.cs b/S1API/Products/CocaineDefinition.cs index 04b3b346..24feb99f 100644 --- a/S1API/Products/CocaineDefinition.cs +++ b/S1API/Products/CocaineDefinition.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.Product; using S1CocaineDefinition = Il2CppScheduleOne.Product.CocaineDefinition; #elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) diff --git a/S1API/Products/MethDefinition.cs b/S1API/Products/MethDefinition.cs index 4d11a0c1..ee8e16d1 100644 --- a/S1API/Products/MethDefinition.cs +++ b/S1API/Products/MethDefinition.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.Product; using S1MethDefinition = Il2CppScheduleOne.Product.MethDefinition; #elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) diff --git a/S1API/Products/PackagingDefinition.cs b/S1API/Products/PackagingDefinition.cs index 8c1bb9d1..81d6aa84 100644 --- a/S1API/Products/PackagingDefinition.cs +++ b/S1API/Products/PackagingDefinition.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using S1Packaging = Il2CppScheduleOne.Product.Packaging; using S1ItemFramework = Il2CppScheduleOne.ItemFramework; #elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) diff --git a/S1API/Products/ProductDefinition.cs b/S1API/Products/ProductDefinition.cs index 91ea8591..09751899 100644 --- a/S1API/Products/ProductDefinition.cs +++ b/S1API/Products/ProductDefinition.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppInterop.Runtime.InteropTypes; using S1Product = Il2CppScheduleOne.Product; #elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) diff --git a/S1API/Products/ProductDefinitionWrapper.cs b/S1API/Products/ProductDefinitionWrapper.cs index e6bb70ad..14e904b8 100644 --- a/S1API/Products/ProductDefinitionWrapper.cs +++ b/S1API/Products/ProductDefinitionWrapper.cs @@ -1,6 +1,6 @@ using S1API.Internal.Utils; -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using S1Product = Il2CppScheduleOne.Product; #else using S1Product = ScheduleOne.Product; diff --git a/S1API/Products/ProductInstance.cs b/S1API/Products/ProductInstance.cs index 00e61924..f3fd7f4b 100644 --- a/S1API/Products/ProductInstance.cs +++ b/S1API/Products/ProductInstance.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using S1Product = Il2CppScheduleOne.Product; #elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) using S1Product = ScheduleOne.Product; diff --git a/S1API/Products/ProductManager.cs b/S1API/Products/ProductManager.cs index 811a28a3..c317d8f4 100644 --- a/S1API/Products/ProductManager.cs +++ b/S1API/Products/ProductManager.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using S1Product = Il2CppScheduleOne.Product; using Il2CppSystem.Collections.Generic; #elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) diff --git a/S1API/Products/WeedDefinition.cs b/S1API/Products/WeedDefinition.cs index a57f6dfe..8f334711 100644 --- a/S1API/Products/WeedDefinition.cs +++ b/S1API/Products/WeedDefinition.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using Il2CppScheduleOne.Product; using S1WeedDefinition = Il2CppScheduleOne.Product.WeedDefinition; #elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) diff --git a/S1API/Quests/Quest.cs b/S1API/Quests/Quest.cs index 182c1f2d..1eeaad30 100644 --- a/S1API/Quests/Quest.cs +++ b/S1API/Quests/Quest.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using S1Quests = Il2CppScheduleOne.Quests; using S1Dev = Il2CppScheduleOne.DevUtilities; using S1Map = Il2CppScheduleOne.Map; diff --git a/S1API/Quests/QuestEntry.cs b/S1API/Quests/QuestEntry.cs index d78ce2b9..cfc25037 100644 --- a/S1API/Quests/QuestEntry.cs +++ b/S1API/Quests/QuestEntry.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using S1Quests = Il2CppScheduleOne.Quests; #elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) using S1Quests = ScheduleOne.Quests; diff --git a/S1API/Storages/StorageInstance.cs b/S1API/Storages/StorageInstance.cs index 2c5e712b..23309c46 100644 --- a/S1API/Storages/StorageInstance.cs +++ b/S1API/Storages/StorageInstance.cs @@ -1,4 +1,4 @@ -#if (IL2CPPMELON || IL2CPPBEPINEX) +#if (IL2CPPMELON) using S1Storage = Il2CppScheduleOne.Storage; #elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) using S1Storage = ScheduleOne.Storage; From 52d9fa7b93426faa1e505d0cb4a8e884398e4d4d Mon Sep 17 00:00:00 2001 From: MaxtorCoder Date: Sat, 3 May 2025 00:57:05 +0200 Subject: [PATCH 2/4] fix: Fix bepinex build with latest bleeding-edge --- S1API/Dialogues/DialogueChoiceListener.cs | 7 ++++--- S1API/Dialogues/DialogueInjector.cs | 15 ++++++++------ S1API/Internal/Utils/CrossType.cs | 24 +++++++++++------------ S1API/Property/PropertyManager.cs | 18 ++++++++--------- S1API/Property/PropertyWrapper.cs | 15 +++++++------- 5 files changed, 41 insertions(+), 38 deletions(-) diff --git a/S1API/Dialogues/DialogueChoiceListener.cs b/S1API/Dialogues/DialogueChoiceListener.cs index 4e46c679..d91f1e20 100644 --- a/S1API/Dialogues/DialogueChoiceListener.cs +++ b/S1API/Dialogues/DialogueChoiceListener.cs @@ -1,8 +1,9 @@ using System; using UnityEngine.Events; -#if IL2CPPBEPINEX || IL2CPPMELON + +#if IL2CPPMELON using Il2CppScheduleOne.Dialogue; -#elif MONOBEPINEX || MONOMELON +#elif MONOBEPINEX || MONOMELON || IL2CPPBEPINEX using ScheduleOne.Dialogue; #endif @@ -64,4 +65,4 @@ private static void OnChoice() callback = null; // optional: remove if one-time use } } -} \ No newline at end of file +} diff --git a/S1API/Dialogues/DialogueInjector.cs b/S1API/Dialogues/DialogueInjector.cs index 1ec2d6fa..a5b6f6a1 100644 --- a/S1API/Dialogues/DialogueInjector.cs +++ b/S1API/Dialogues/DialogueInjector.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; + using UnityEngine; -using S1API.Dialogues; #if (IL2CPPMELON || MONOMELON) using MelonLoader; #endif -#if IL2CPPMELON || IL2CPPBEPINEX +#if IL2CPPMELON using Il2CppScheduleOne.Dialogue; using Il2CppScheduleOne.NPCs; using Il2CppScheduleOne.NPCs.Schedules; @@ -16,6 +16,9 @@ using ScheduleOne.NPCs.Schedules; using FishNet; #endif + +using S1API.Dialogues; + /// /// The DialogueInjector class is a static utility that facilitates the injection of custom dialogue entries /// into a game's dialogue system at runtime. It provides methods for registering custom dialogue injections @@ -28,7 +31,7 @@ public static class DialogueInjector /// This variable stores pending dialogue link or choice modifications that need to be applied to NPC dialogue systems /// and is used during a coroutine process to find the relevant NPC and complete the injection. /// - private static List pendingInjections = new List(); + private static System.Collections.Generic.List pendingInjections = new System.Collections.Generic.List(); /// /// A boolean variable that indicates whether the update loop for injecting dialogue is currently hooked. @@ -58,11 +61,11 @@ private static void HookUpdateLoop() { if (isHooked) return; isHooked = true; - + #if (IL2CPPMELON || MONOMELON) MelonCoroutines.Start(WaitForNPCsAndInject()); #elif (IL2CPPBEPINEX || MONOBEPINEX) - InstanceFinder.TimeManager.StartCoroutine(WaitForNPCsAndInject()); + InstanceFinder.TimeManager.StartCoroutine("WaitForNPCsAndInject"); #endif } @@ -169,4 +172,4 @@ private static void TryInject(DialogueInjection injection, NPC npc) // TODO (@omar-akermi): Can you convert this to the new logger pls? // MelonLogger.Msg($"[DialogueInjector] Injected '{injection.ChoiceLabel}' into NPC '{npc.name}'"); } -} \ No newline at end of file +} diff --git a/S1API/Internal/Utils/CrossType.cs b/S1API/Internal/Utils/CrossType.cs index 7eec5d0f..ad76f819 100644 --- a/S1API/Internal/Utils/CrossType.cs +++ b/S1API/Internal/Utils/CrossType.cs @@ -1,6 +1,6 @@ -#if (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) +#if (MONOMELON || MONOBEPINEX) using System; -# elif (IL2CPPMELON) +# elif (IL2CPPMELON || IL2CPPBEPINEX) using Il2CppSystem; using Il2CppInterop.Runtime; using Il2CppInterop.Runtime.InteropTypes; @@ -21,9 +21,9 @@ internal static class CrossType /// The type of the class. internal static Type Of() { -#if (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) +#if (MONOMELON || MONOBEPINEX) return typeof(T); -# elif (IL2CPPMELON) +# elif (IL2CPPMELON || IL2CPPBEPINEX) return Il2CppType.Of(); #endif } @@ -36,13 +36,13 @@ internal static Type Of() /// The class we're checking against. /// Whether obj is of class T or not. internal static bool Is(object obj, out T result) -#if (IL2CPPMELON) +#if (IL2CPPMELON|| IL2CPPBEPINEX) where T : Il2CppObjectBase -#elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) +#elif (MONOMELON || MONOBEPINEX ) where T : class #endif { -#if (IL2CPPMELON) +#if (IL2CPPMELON || IL2CPPBEPINEX) if (obj is Object il2CppObj) { Type il2CppType = Il2CppType.Of(); @@ -52,7 +52,7 @@ internal static bool Is(object obj, out T result) return true; } } -#elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) +#elif (MONOMELON || MONOBEPINEX) if (obj is T t) { result = t; @@ -71,15 +71,15 @@ internal static bool Is(object obj, out T result) /// The type to cast to. /// The object cast to the specified type. internal static T As(object obj) -#if (IL2CPPMELON) +#if (IL2CPPMELON || IL2CPPBEPINEX) where T : Il2CppObjectBase -#elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) +#elif (MONOMELON || MONOBEPINEX) where T : class #endif => -#if (IL2CPPMELON) +#if (IL2CPPMELON || IL2CPPBEPINEX) obj is Object il2CppObj ? il2CppObj.Cast() : null!; -#elif (MONOMELON || MONOBEPINEX || IL2CPPBEPINEX) +#elif (MONOMELON || MONOBEPINEX) (T)obj; #endif } diff --git a/S1API/Property/PropertyManager.cs b/S1API/Property/PropertyManager.cs index 48bcb166..888cad33 100644 --- a/S1API/Property/PropertyManager.cs +++ b/S1API/Property/PropertyManager.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -#if IL2CPPMELON || IL2CPPBEPINEX +#if IL2CPPMELON using Il2CppScheduleOne.Property; -#elif MONOMELON || MONOBEPINEX +#elif MONOMELON || MONOBEPINEX || IL2CPPBEPINEX using ScheduleOne.Property; #endif namespace S1API.Property @@ -18,11 +18,11 @@ public static class PropertyManager public static List GetAllProperties() { var list = new List(); - #if IL2CPPMELON || IL2CPPBEPINEX +#if IL2CPPMELON foreach (var prop in Il2CppScheduleOne.Property.Property.Properties) #else foreach (var prop in ScheduleOne.Property.Property.Properties) - #endif +#endif { list.Add(new PropertyWrapper(prop)); } @@ -36,9 +36,9 @@ public static List GetAllProperties() public static List GetOwnedProperties() { var list = new List(); -#if IL2CPPMELON || IL2CPPBEPINEX +#if IL2CPPMELON foreach (var prop in Il2CppScheduleOne.Property.Property.OwnedProperties) -#elif MONOMELON || MONOBEPINEX +#elif MONOMELON || MONOBEPINEX || IL2CPPBEPINEX foreach (var prop in ScheduleOne.Property.Property.OwnedProperties) #endif { @@ -56,9 +56,9 @@ public static List GetOwnedProperties() /// public static PropertyWrapper FindPropertyByName(string name) { -#if IL2CPPMELON || IL2CPPBEPINEX +#if IL2CPPMELON foreach (var prop in Il2CppScheduleOne.Property.Property.Properties) -#elif MONOMELON || MONOBEPINEX +#elif MONOMELON || MONOBEPINEX || IL2CPPBEPINEX foreach (var prop in ScheduleOne.Property.Property.Properties) #endif { @@ -70,4 +70,4 @@ public static PropertyWrapper FindPropertyByName(string name) return null; } } -} \ No newline at end of file +} diff --git a/S1API/Property/PropertyWrapper.cs b/S1API/Property/PropertyWrapper.cs index fa4d180f..bb15c83e 100644 --- a/S1API/Property/PropertyWrapper.cs +++ b/S1API/Property/PropertyWrapper.cs @@ -7,7 +7,7 @@ namespace S1API.Property /// Il2CppScheduleOne.Property.Property class. Provides an abstraction for /// interacting with property details and operations in Unity. /// - public class PropertyWrapper : BaseProperty + public class PropertyWrapper : BaseProperty { /// /// A readonly backing field encapsulating the core property instance @@ -16,20 +16,19 @@ public class PropertyWrapper : BaseProperty /// and is leveraged across multiple overriden members to delegate /// operations to the actual property instance. /// - #if IL2CPPBEPINEX || IL2CPPMELON +#if IL2CPPMELON internal readonly Il2CppScheduleOne.Property.Property InnerProperty; - #else +#else internal readonly ScheduleOne.Property.Property InnerProperty; - #endif +#endif /// /// A wrapper class that extends the functionality of /// and acts as a bridge to interact with an inner property implementation /// from the Il2CppScheduleOne.Property namespace. /// -#if IL2CPPBEPINEX || IL2CPPMELON +#if IL2CPPMELON public PropertyWrapper(Il2CppScheduleOne.Property.Property property) - - #else +#else public PropertyWrapper(ScheduleOne.Property.Property property) #endif { @@ -101,4 +100,4 @@ public override bool IsPointInside(Vector3 point) return InnerProperty.DoBoundsContainPoint(point); } } -} \ No newline at end of file +} From e01abf058036bfe2c44959f8ac34c904c0885114 Mon Sep 17 00:00:00 2001 From: MaxtorCoder Date: Sat, 3 May 2025 11:22:18 +0200 Subject: [PATCH 3/4] fix: Codestyle changes for Dialogue code --- S1API/Dialogues/DialogueChoiceListener.cs | 14 +- S1API/Dialogues/DialogueInjection.cs | 127 ++++++------ S1API/Dialogues/DialogueInjector.cs | 240 +++++++++++----------- 3 files changed, 195 insertions(+), 186 deletions(-) diff --git a/S1API/Dialogues/DialogueChoiceListener.cs b/S1API/Dialogues/DialogueChoiceListener.cs index d91f1e20..323a18d5 100644 --- a/S1API/Dialogues/DialogueChoiceListener.cs +++ b/S1API/Dialogues/DialogueChoiceListener.cs @@ -23,12 +23,12 @@ public static class DialogueChoiceListener /// to match the label of the choice selected by the user. When the label matches /// expectedChoiceLabel, the registered callback is executed. /// - private static string expectedChoiceLabel; + private static string? _expectedChoiceLabel; /// /// Represents a delegate invoked when a specific dialogue choice is selected during interaction. /// - private static Action callback; + private static Action? _callback; /// Registers a specific dialogue choice with a callback to be invoked when the choice is selected. /// The reference to the DialogueHandler that manages dialogue choices. @@ -36,8 +36,8 @@ public static class DialogueChoiceListener /// The callback action to execute when the dialogue choice is selected. public static void Register(DialogueHandler handlerRef, string label, Action action) { - expectedChoiceLabel = label; - callback = action; + _expectedChoiceLabel = label; + _callback = action; if (handlerRef != null) { @@ -46,7 +46,7 @@ public static void Register(DialogueHandler handlerRef, string label, Action act // ✅ IL2CPP-safe: explicit method binding via wrapper handlerRef.onDialogueChoiceChosen.AddListener((UnityAction)delegate (string choice) { - if (choice == expectedChoiceLabel) + if (choice == _expectedChoiceLabel) ((UnityAction)ForwardCall).Invoke(); }); } @@ -61,8 +61,8 @@ public static void Register(DialogueHandler handlerRef, string label, Action act /// private static void OnChoice() { - callback?.Invoke(); - callback = null; // optional: remove if one-time use + _callback?.Invoke(); + _callback = null; // optional: remove if one-time use } } } diff --git a/S1API/Dialogues/DialogueInjection.cs b/S1API/Dialogues/DialogueInjection.cs index 40208322..2a9fb326 100644 --- a/S1API/Dialogues/DialogueInjection.cs +++ b/S1API/Dialogues/DialogueInjection.cs @@ -1,75 +1,78 @@ using System; -/// -/// Represents a dialogue injection configuration for adding custom dialogues into an NPC's conversation flow dynamically. -/// -public class DialogueInjection +namespace S1API.Dialogues { /// - /// Represents the name of the NPC (Non-Player Character) to which the dialogue injection is associated. - /// This value is expected to match or partially match the name of an NPC in the game, allowing the system - /// to identify and target the specific NPC for dialogue modifications. + /// Represents a dialogue injection configuration for adding custom dialogues into an NPC's conversation flow dynamically. /// - public string NpcName; + public class DialogueInjection + { + /// + /// Represents the name of the NPC (Non-Player Character) to which the dialogue injection is associated. + /// This value is expected to match or partially match the name of an NPC in the game, allowing the system + /// to identify and target the specific NPC for dialogue modifications. + /// + public string NpcName; - /// - /// Represents the name of the dialogue container being referenced for injections or modifications - /// within the NPC's dialogue system. - /// - /// - /// This variable is used for identifying a specific dialogue container when attempting to - /// inject new dialogue nodes, choices, or links into an NPC's dialogue setup. - /// - public string ContainerName; + /// + /// Represents the name of the dialogue container being referenced for injections or modifications + /// within the NPC's dialogue system. + /// + /// + /// This variable is used for identifying a specific dialogue container when attempting to + /// inject new dialogue nodes, choices, or links into an NPC's dialogue setup. + /// + public string ContainerName; - /// - /// Represents the unique identifier (GUID) of the starting dialogue node within a dialogue container. - /// - /// - /// This variable is used to identify the specific dialogue node from which a new choice or interaction is injected. - /// - public string FromNodeGuid; + /// + /// Represents the unique identifier (GUID) of the starting dialogue node within a dialogue container. + /// + /// + /// This variable is used to identify the specific dialogue node from which a new choice or interaction is injected. + /// + public string FromNodeGuid; - /// - /// Represents the unique identifier (GUID) for the target dialogue node to which a choice or link is pointing in a dialogue system. - /// - public string ToNodeGuid; + /// + /// Represents the unique identifier (GUID) for the target dialogue node to which a choice or link is pointing in a dialogue system. + /// + public string ToNodeGuid; - /// - /// Represents a descriptive label for a dialogue choice used in the dialogue system. - /// - /// - /// This label is utilized for identifying a specific dialogue choice during execution - /// and for associating a callback or specific functionality when that choice is selected. - /// - public string ChoiceLabel; + /// + /// Represents a descriptive label for a dialogue choice used in the dialogue system. + /// + /// + /// This label is utilized for identifying a specific dialogue choice during execution + /// and for associating a callback or specific functionality when that choice is selected. + /// + public string ChoiceLabel; - /// - /// Represents the text displayed for a dialogue choice in the game's dialogue system. - /// - /// - /// The property is utilized to define the text that appears visually for a specific dialogue choice - /// in conjunction with the dialogue system. The text is injected dynamically during runtime for scenarios - /// requiring additional or modified dialogue options. - /// - public string ChoiceText; + /// + /// Represents the text displayed for a dialogue choice in the game's dialogue system. + /// + /// + /// The property is utilized to define the text that appears visually for a specific dialogue choice + /// in conjunction with the dialogue system. The text is injected dynamically during runtime for scenarios + /// requiring additional or modified dialogue options. + /// + public string ChoiceText; - /// - /// Represents a callback action that is invoked when a dialogue choice is confirmed. - /// - public Action OnConfirmed; + /// + /// Represents a callback action that is invoked when a dialogue choice is confirmed. + /// + public Action OnConfirmed; - /// - /// Represents an injectable dialogue configuration that can be used to add or modify dialogue interactions in a game. - /// - public DialogueInjection(string npc, string container, string from, string to, string label, string text, Action onConfirmed) - { - NpcName = npc; - ContainerName = container; - FromNodeGuid = from; - ToNodeGuid = to; - ChoiceLabel = label; - ChoiceText = text; - OnConfirmed = onConfirmed; + /// + /// Represents an injectable dialogue configuration that can be used to add or modify dialogue interactions in a game. + /// + public DialogueInjection(string npc, string container, string from, string to, string label, string text, Action onConfirmed) + { + NpcName = npc; + ContainerName = container; + FromNodeGuid = from; + ToNodeGuid = to; + ChoiceLabel = label; + ChoiceText = text; + OnConfirmed = onConfirmed; + } } -} \ No newline at end of file +} diff --git a/S1API/Dialogues/DialogueInjector.cs b/S1API/Dialogues/DialogueInjector.cs index a5b6f6a1..9c5da647 100644 --- a/S1API/Dialogues/DialogueInjector.cs +++ b/S1API/Dialogues/DialogueInjector.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; - using UnityEngine; #if (IL2CPPMELON || MONOMELON) using MelonLoader; @@ -17,159 +16,166 @@ using FishNet; #endif -using S1API.Dialogues; - -/// -/// The DialogueInjector class is a static utility that facilitates the injection of custom dialogue entries -/// into a game's dialogue system at runtime. It provides methods for registering custom dialogue injections -/// and ensures that these injections are processed correctly within the update loop. -/// -public static class DialogueInjector +namespace S1API.Dialogues { /// - /// Represents a collection of dialogue injections waiting to be processed for corresponding NPCs in the game. - /// This variable stores pending dialogue link or choice modifications that need to be applied to NPC dialogue systems - /// and is used during a coroutine process to find the relevant NPC and complete the injection. - /// - private static System.Collections.Generic.List pendingInjections = new System.Collections.Generic.List(); - - /// - /// A boolean variable that indicates whether the update loop for injecting dialogue is currently hooked. - /// When true, the update loop has been hooked and is actively monitoring for pending dialogue injections; otherwise, it has not been hooked. + /// The DialogueInjector class is a static utility that facilitates the injection of custom dialogue entries + /// into a game's dialogue system at runtime. It provides methods for registering custom dialogue injections + /// and ensures that these injections are processed correctly within the update loop. /// - private static bool isHooked = false; - - /// - /// Registers a dialogue injection to be processed in the update loop. - /// - /// An instance of representing the dialogue to be injected into the game. - public static void Register(DialogueInjection injection) + public static class DialogueInjector { - pendingInjections.Add(injection); - HookUpdateLoop(); - } + /// + /// Represents a collection of dialogue injections waiting to be processed for corresponding NPCs in the game. + /// This variable stores pending dialogue link or choice modifications that need to be applied to NPC dialogue systems + /// and is used during a coroutine process to find the relevant NPC and complete the injection. + /// + private static System.Collections.Generic.List _pendingInjections = new System.Collections.Generic.List(); + + /// + /// A boolean variable that indicates whether the update loop for injecting dialogue is currently hooked. + /// When true, the update loop has been hooked and is actively monitoring for pending dialogue injections; otherwise, it has not been hooked. + /// + private static bool _isHooked = false; + + /// + /// Registers a dialogue injection to be processed in the update loop. + /// + /// An instance of representing the dialogue to be injected into the game. + public static void Register(DialogueInjection injection) + { + _pendingInjections.Add(injection); + HookUpdateLoop(); + } - /// - /// Ensures that the dialogue injection system's loop is hooked into the game's update cycle. - /// This method starts a coroutine to monitor and inject pending dialogue changes into NPCs. - /// - /// - /// This method prevents multiple hookups by checking if the injection system is already active using an internal flag. - /// If not already hooked, the method initializes a coroutine that processes and injects queued dialogue data into the corresponding NPCs. - /// - private static void HookUpdateLoop() - { - if (isHooked) return; - isHooked = true; + /// + /// Ensures that the dialogue injection system's loop is hooked into the game's update cycle. + /// This method starts a coroutine to monitor and inject pending dialogue changes into NPCs. + /// + /// + /// This method prevents multiple hookups by checking if the injection system is already active using an internal flag. + /// If not already hooked, the method initializes a coroutine that processes and injects queued dialogue data into the corresponding NPCs. + /// + private static void HookUpdateLoop() + { + if (_isHooked) + return; + _isHooked = true; + // @TODO: Check whether coroutines can be started with this. #if (IL2CPPMELON || MONOMELON) - MelonCoroutines.Start(WaitForNPCsAndInject()); + MelonCoroutines.Start(WaitForNPCsAndInject()); #elif (IL2CPPBEPINEX || MONOBEPINEX) - InstanceFinder.TimeManager.StartCoroutine("WaitForNPCsAndInject"); + InstanceFinder.TimeManager.StartCoroutine("WaitForNPCsAndInject"); #endif - } + } - /// - /// Monitors the current state of NPCs within the game world and manages the injection of dialogue - /// into the appropriate NPCs once they are found. This method waits for instances of NPC objects - /// that match the specified criteria in the pending dialogue injections and processes these injections - /// once a match is located. The method continues execution until all pending dialogue injections - /// have been completed. - /// - /// - /// An enumerator that handles the coroutine execution for periodic checks and dialogue injection processing. - /// - private static System.Collections.IEnumerator WaitForNPCsAndInject() - { - while (pendingInjections.Count > 0) + /// + /// Monitors the current state of NPCs within the game world and manages the injection of dialogue + /// into the appropriate NPCs once they are found. This method waits for instances of NPC objects + /// that match the specified criteria in the pending dialogue injections and processes these injections + /// once a match is located. The method continues execution until all pending dialogue injections + /// have been completed. + /// + /// + /// An enumerator that handles the coroutine execution for periodic checks and dialogue injection processing. + /// + private static System.Collections.IEnumerator WaitForNPCsAndInject() { - for (int i = pendingInjections.Count - 1; i >= 0; i--) + while (_pendingInjections.Count > 0) { - var injection = pendingInjections[i]; - var npcs = GameObject.FindObjectsOfType(); - NPC target = null; - - for (int j = 0; j < npcs.Length; j++) + for (int i = _pendingInjections.Count - 1; i >= 0; i--) { - if (npcs[j] != null && npcs[j].name.Contains(injection.NpcName)) + DialogueInjection? injection = _pendingInjections[i]; + var npcs = Object.FindObjectsOfType(); + NPC? target = null; + + foreach (NPC npc in npcs) { - target = npcs[j]; + if (!npc || !npc.name.Contains(injection.NpcName)) + continue; + + target = npc; break; } - } - if (target != null) - { + if (!target) + continue; + TryInject(injection, target); - pendingInjections.RemoveAt(i); + _pendingInjections.RemoveAt(i); } - } - yield return null; // Wait one frame + yield return null; // Wait one frame + } } - } - /// - /// Attempts to inject a dialogue choice and link into the specified NPC's dialogue system. - /// - /// The dialogue injection object containing the data for the choice to inject. - /// The NPC that will have the dialogue choice injected. - private static void TryInject(DialogueInjection injection, NPC npc) - { - var handler = npc.GetComponent(); - var dialogueEvent = npc.GetComponentInChildren(true); - if (dialogueEvent == null || dialogueEvent.DialogueOverride == null) return; + /// + /// Attempts to inject a dialogue choice and link into the specified NPC's dialogue system. + /// + /// The dialogue injection object containing the data for the choice to inject. + /// The NPC that will have the dialogue choice injected. + private static void TryInject(DialogueInjection injection, NPC npc) + { + DialogueHandler handler = npc.GetComponent(); + NPCEvent_LocationDialogue dialogueEvent = npc.GetComponentInChildren(true); + if (!dialogueEvent || !dialogueEvent.DialogueOverride) + return; - if (dialogueEvent.DialogueOverride.name != injection.ContainerName) return; + if (dialogueEvent.DialogueOverride.name != injection.ContainerName) + return; - var container = dialogueEvent.DialogueOverride; - if (container.DialogueNodeData == null) return; + DialogueContainer container = dialogueEvent.DialogueOverride; + if (container.DialogueNodeData == null) + return; - DialogueNodeData node = null; - for (int i = 0; i < container.DialogueNodeData.Count; i++) - { - var n = container.DialogueNodeData.ToArray()[i]; - if (n != null && n.Guid == injection.FromNodeGuid) + DialogueNodeData? node = null; + for (int i = 0; i < container.DialogueNodeData.Count; i++) { + DialogueNodeData n = container.DialogueNodeData.ToArray()[i]; + if (n == null || n.Guid != injection.FromNodeGuid) + continue; + node = n; break; } - } - if (node == null) return; + if (node == null) + return; - var choice = new DialogueChoiceData - { - Guid = System.Guid.NewGuid().ToString(), - ChoiceLabel = injection.ChoiceLabel, - ChoiceText = injection.ChoiceText - }; + DialogueChoiceData choice = new DialogueChoiceData + { + Guid = System.Guid.NewGuid().ToString(), + ChoiceLabel = injection.ChoiceLabel, + ChoiceText = injection.ChoiceText + }; - var choiceList = new List(); - if (node.choices != null) - choiceList.AddRange(node.choices); + List choiceList = new List(); + if (node.choices != null) + choiceList.AddRange(node.choices); - choiceList.Add(choice); - node.choices = choiceList.ToArray(); + choiceList.Add(choice); + node.choices = choiceList.ToArray(); - var link = new NodeLinkData - { - BaseDialogueOrBranchNodeGuid = injection.FromNodeGuid, - BaseChoiceOrOptionGUID = choice.Guid, - TargetNodeGuid = injection.ToNodeGuid - }; - - if (container.NodeLinks == null) - #if IL2CPPMELON || IL2CPPBEPINEX - container.NodeLinks = new Il2CppSystem.Collections.Generic.List(); + NodeLinkData link = new NodeLinkData + { + BaseDialogueOrBranchNodeGuid = injection.FromNodeGuid, + BaseChoiceOrOptionGUID = choice.Guid, + TargetNodeGuid = injection.ToNodeGuid + }; + +#if IL2CPPMELON || IL2CPPBEPINEX + container.NodeLinks ??= new Il2CppSystem.Collections.Generic.List(); #else - container.NodeLinks = new List(); + container.NodeLinks ??= new List(); #endif - container.NodeLinks.Add(link); - DialogueChoiceListener.Register(handler, injection.ChoiceLabel, injection.OnConfirmed); + container.NodeLinks.Add(link); - // TODO (@omar-akermi): Can you convert this to the new logger pls? - // MelonLogger.Msg($"[DialogueInjector] Injected '{injection.ChoiceLabel}' into NPC '{npc.name}'"); + DialogueChoiceListener.Register(handler, injection.ChoiceLabel, injection.OnConfirmed); + + // TODO (@omar-akermi): Can you convert this to the new logger pls? + // MelonLogger.Msg($"[DialogueInjector] Injected '{injection.ChoiceLabel}' into NPC '{npc.name}'"); + } } } From 5612bb90386a00c2fbccbe638f9bcb9a940c814e Mon Sep 17 00:00:00 2001 From: MaxtorCoder Date: Sat, 3 May 2025 21:24:58 +0200 Subject: [PATCH 4/4] fix: Fix BepInEx building --- github.build.props | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/github.build.props b/github.build.props index 2c4c39ec..ceebb8d8 100644 --- a/github.build.props +++ b/github.build.props @@ -5,28 +5,29 @@ - + false ..\ScheduleOneAssemblies\MelonLoader ..\ScheduleOneAssemblies\BepInEx - + - + null - + ..\ScheduleOneAssemblies\Managed - + null - + - ..\ScheduleOneAssemblies\Il2CppAssemblies + ..\ScheduleOneAssemblies\Il2CppAssemblies\MelonLoader + ..\ScheduleOneAssemblies\Il2CppAssemblies\BepInEx - \ No newline at end of file +