Exemplo n.º 1
0
 /// <summary>
 /// Applied after OnWorkTick runs.
 /// </summary>
 internal static void Postfix(Worker worker)
 {
     if (worker != null)
     {
         TraitReworkUtils.UpdateLitEatingModifier(worker);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Applied after SetPermitted runs.
 /// </summary>
 internal static void Postfix(ConsumableConsumer __instance)
 {
     if (TraitReworkUtils.ApplyBannedFoods(__instance))
     {
         __instance.consumableRulesChanged.Signal();
     }
 }
Exemplo n.º 3
0
            /// <summary>
            /// Applied after OnSpawn runs.
            /// </summary>
            internal static void Postfix(MinionIdentity __instance)
            {
                var cc = __instance.gameObject.GetComponentSafe <ConsumableConsumer>();

                if (cc != null)
                {
                    TraitReworkUtils.ApplyBannedFoods(cc);
                }
            }
Exemplo n.º 4
0
            /// <summary>
            /// Applied after Initialize runs.
            /// </summary>
            internal static void Postfix(EntityModifierSet __instance)
            {
                TraitReworkUtils.FixTraits(__instance);
                PUtil.LogDebug("Updated traits");
                // Add "Disturbed" trait
                var disturbedEffect = new Effect(TraitTuning.DISTURBED_EFFECT, TraitStrings.
                                                 DISTURBED_NAME, TraitStrings.DISTURBED_DESC, 200.0f, true, true, true);

                disturbedEffect.Add(new AttributeModifier("StressDelta", 0.033333333f,
                                                          TraitStrings.DISTURBED_NAME));
                __instance.effects.Add(disturbedEffect);
            }
Exemplo n.º 5
0
 /// <summary>
 /// Applied after StartSnoreBGEffect runs.
 /// </summary>
 internal static void Postfix(Snorer.StatesInstance __instance)
 {
     TraitReworkUtils.DisturbInRange(__instance.gameObject, 3.0f);
 }
Exemplo n.º 6
0
 /// <summary>
 /// Applied after CreatePassedOutLocator runs.
 /// </summary>
 internal static void Postfix(SleepChoreMonitor.Instance __instance,
                              GameObject __result)
 {
     TraitReworkUtils.RemoveSoreBack(__instance, __result);
 }
Exemplo n.º 7
0
 /// <summary>
 /// Applied after OnSpawn runs.
 ///
 /// This is not the right place to create it formally, but all Duplicants have been
 /// spawned in at this time, so the banned foods can be applied properly.
 /// </summary>
 internal static void Postfix()
 {
     TraitReworkUtils.ApplyAllBannedFoods(null);
 }
Exemplo n.º 8
0
 /// <summary>
 /// Applied after OnPrefabInit runs.
 /// </summary>
 internal static void Postfix(ConsumableConsumer __instance)
 {
     TraitReworkUtils.ApplyBannedFoods(__instance);
 }