diff --git a/MMOKitchen/Changelogs/v0.1.8.MD b/MMOKitchen/Changelogs/v0.1.8.MD new file mode 100644 index 0000000..81bb5bd --- /dev/null +++ b/MMOKitchen/Changelogs/v0.1.8.MD @@ -0,0 +1,5 @@ +# Release Notes v0.1.8 + +- Fixed a bug preventing players from interacting with cosmetics / colours. +- Fixed a bug causing incorrect customer counts under 4 players. +- Fixed a bug causing MMO Kitchen to display under "Untested Mods". \ No newline at end of file diff --git a/MMOKitchen/Main.cs b/MMOKitchen/Main.cs index 5dd0581..5c92324 100644 --- a/MMOKitchen/Main.cs +++ b/MMOKitchen/Main.cs @@ -15,8 +15,8 @@ namespace MMOKitchenReborn public const string MOD_ID = "mmokitchen"; public const string MOD_NAME = "MMO Kitchen"; public const string MOD_AUTHOR = "StarFluxGames"; - public const string MOD_VERSION = "0.1.7"; - public const string MOD_COMPATIBLE_VERSIONS = "=<1.1.4"; + public const string MOD_VERSION = "0.1.8"; + public const string MOD_COMPATIBLE_VERSIONS = ">=1.1.4"; public static PreferenceManager manager; public Main() : base(MOD_ID, MOD_NAME, MOD_AUTHOR, MOD_VERSION, MOD_COMPATIBLE_VERSIONS, Assembly.GetExecutingAssembly()) { } diff --git a/MMOKitchen/Patches/DifficultyHelpers_Patch.cs b/MMOKitchen/Patches/DifficultyHelpers_Patch.cs index b3f12cf..73bf152 100644 --- a/MMOKitchen/Patches/DifficultyHelpers_Patch.cs +++ b/MMOKitchen/Patches/DifficultyHelpers_Patch.cs @@ -10,21 +10,24 @@ namespace MMOKitchenReborn.Patches [HarmonyPostfix] static void CustomerPlayersRateModifier_Postfix(ref float __result, int player_count) { - __result = 1 + (player_count * 0.25f); + if (player_count > 4) + __result = 1 + (player_count * 0.25f); } [HarmonyPatch("FireSpreadModifier")] [HarmonyPostfix] static void FireSpreadModifier_Postfix(ref float __result, int player_count) { - __result = 0.75f + (player_count * 0.25f); + if (player_count > 4) + __result = 0.75f + (player_count * 0.25f); } [HarmonyPatch("PatiencePlayerCountModifier")] [HarmonyPostfix] static void PatiencePlayerCountModifier_Postfix(ref float __result, int player_count) { - __result = 0.75f + (player_count * 0.25f); + if (player_count > 4) + __result = 0.75f + (player_count * 0.25f); } } } diff --git a/MMOKitchen/Systems/ChangeColour_Override.cs b/MMOKitchen/Systems/ChangeColour_Override.cs new file mode 100644 index 0000000..c224609 --- /dev/null +++ b/MMOKitchen/Systems/ChangeColour_Override.cs @@ -0,0 +1,33 @@ +using Kitchen; +using KitchenMods; +using UnityEngine; + +namespace MMOKitchenReborn.Systems +{ + public class ChangeColour_Override : ChangeColour, IModSystem + { + protected override bool IsPossible(ref InteractionData data) + { + bool result; + if (!Require(data.Target, out Selector)) + result = false; + else + result = Require(data.Interactor, out Colour); + return result; + } + + protected override void Perform(ref InteractionData data) + { + float num; + float s; + float v; + Color.RGBToHSV(Colour.Color, out num, out s, out v); + Colour.Color = Color.HSVToRGB(num + 0.05f, s, v); + data.Context.Set(data.Interactor, Colour); + } + + private CColourSelector Selector; + + private CPlayerColour Colour; + } +} diff --git a/MMOKitchen/Systems/MakeOwnedAppliancesPublic.cs b/MMOKitchen/Systems/MakeOwnedAppliancesPublic.cs deleted file mode 100644 index cd93861..0000000 --- a/MMOKitchen/Systems/MakeOwnedAppliancesPublic.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Kitchen; -using Unity.Collections; -using Unity.Entities; - -namespace MMOKitchenReborn.Systems -{ - public class MakeOwnedAppliancesPublic : GenericSystemBase - { - protected override void Initialise() - { - base.Initialise(); - this.query = GetEntityQuery(new EntityQueryDesc - { - All = new ComponentType[] - { - typeof(COwnedByPlayer) - } - }); - } - - protected override void OnUpdate() - { - NativeArray nativeArray = query.ToEntityArray(Allocator.Temp); - - for (int i = 0; i < nativeArray.Length; i++) - { - EntityManager.RemoveComponent(nativeArray[i]); - } - } - - private EntityQuery query; - } -} diff --git a/MMOKitchen/Systems/SwapCosmetics_Override.cs b/MMOKitchen/Systems/SwapCosmetics_Override.cs new file mode 100644 index 0000000..831d02e --- /dev/null +++ b/MMOKitchen/Systems/SwapCosmetics_Override.cs @@ -0,0 +1,28 @@ +using Kitchen; +using KitchenMods; + +namespace MMOKitchenReborn.Systems +{ + public class SwapCosmetics_Override : SwapCosmetics, IModSystem + { + protected override bool IsPossible(ref InteractionData data) + { + base.IsPossible(ref data); + bool result; + if (!Require(data.Target, out Selector)) + result = false; + else + result = Require(data.Interactor, out Cosmetics); + return result; + } + + protected override void Perform(ref InteractionData data) + { + base.Perform(ref data); + } + + private CCosmeticSelector Selector; + + private CPlayerCosmetics Cosmetics; + } +}