Small Logic Adjustments

This commit is contained in:
Lachlan Leone
2026-03-05 17:09:17 +11:00
parent d196cbcf9f
commit 81b980ca88
4 changed files with 20 additions and 10 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ namespace MMOKitchen.Patches
float progressSpeed = (float)getProgressSpeed.Invoke(__instance, new object[] { });
if ((((float)counter / (float)x.Count) * 100) >= Mod.manager.GetPreference<PreferenceInt>("requiredConsentPercentage").Value)
if ((((float)counter / (float)x.Count) * 100) >= Mod.manager.GetPreference<PreferenceInt>(Mod.PREFERENCE_REQUIRED_CONSENT_PERCENTAGE).Value)
progressSpeed = 1f;
if (progressSpeed <= 0f)
+11 -5
View File
@@ -8,14 +8,19 @@ namespace MMOKitchen.Patches
public class DifficultyHelpersPatch
{
[HarmonyPatch("CustomerPlayersRateModifier")]
[HarmonyPostfix]
static void CustomerPlayersRateModifier_Postfix(ref float __result, int player_count)
[HarmonyPrefix]
static bool CustomerPlayersRateModifier_Postfix(ref float __result, int player_count)
{
if (Mod.manager.GetPreference<PreferenceBool>("scaleAbove4Players").Value)
if (player_count > 4)
__result = 1 + (player_count * Mod.manager.GetPreference<PreferenceFloat>("scaleAbove4PlayersMultiplier").Value);
if (player_count < 4 && Mod.manager.GetPreference<PreferenceBool>("scaleAbove4Players").Value)
{
__result = (0.55f + (player_count * 0.25f) - 0.05f) * Mod.manager.GetPreference<PreferenceFloat>("scaleAbove4PlayersMultiplier").Value;
return false;
}
return true;
}
/*
[HarmonyPatch("FireSpreadModifier")]
[HarmonyPostfix]
static void FireSpreadModifier_Postfix(ref float __result, int player_count)
@@ -33,5 +38,6 @@ namespace MMOKitchen.Patches
if (player_count > 4)
__result = 0.75f + (player_count * Mod.manager.GetPreference<PreferenceFloat>("scaleAbove4PlayersMultiplier").Value);
}
*/
}
}