This is almost exactly the mod I wanted but it sadly does not work properly. The values change constantly just by viewing another e-mail. This makes it entirely useless. Damn I want some more realistic problem soving hard mode. Not just buy the most expensive components for the budget and you will be fine mode.
Hey, I really like the mod, but there is one thing that makes it a bit unusable. Whenever I click on the job in my emails, click on a different one and then back the budget changes. That means the budget is never the same. Would be great if you could fix it, as this is one of the 2 mods that I use.
[HarmonyPatch(typeof(Job), "GetBudget")] [HarmonyPrefix] private static bool RandomBudget(Job __instance, ref int __result) { float num = UnityEngine.Random.Range(0.2f, 0.8f); float num2 = (float)UnityEngine.Random.Range(0, 1); float num3 = (float)__instance.m_budget; bool flag = (double)num2 <= 0.65; bool result; if (flag) { num3 *= num; __result = (int)num3; result = false; } else { result = true; } return result; } This is fun: your chance to have the budget reduced is 50%, not 65% - guess why? Because of Random.Range(0, 1);
3 comments
[HarmonyPatch(typeof(Job), "GetBudget")]
This is fun: your chance to have the budget reduced is 50%, not 65% - guess why? Because of Random.Range(0, 1);[HarmonyPrefix]
private static bool RandomBudget(Job __instance, ref int __result)
{
float num = UnityEngine.Random.Range(0.2f, 0.8f);
float num2 = (float)UnityEngine.Random.Range(0, 1);
float num3 = (float)__instance.m_budget;
bool flag = (double)num2 <= 0.65;
bool result;
if (flag)
{
num3 *= num;
__result = (int)num3;
result = false;
}
else
{
result = true;
}
return result;
}