Exemplo n.º 1
0
        /// <summary>
        /// Removes the "Sore Back" debuff if the Duplicant is Narcoleptic.
        /// </summary>
        /// <param name="monitor">The sleep chore monitor of that Duplicant.</param>
        /// <param name="locator">The locator for the pending sleep chore.</param>
        internal static void RemoveSoreBack(SleepChoreMonitor.Instance monitor,
                                            GameObject locator)
        {
            var sleepable = locator.GetComponentSafe <Sleepable>();
            var traits    = monitor.gameObject.GetComponentSafe <Traits>();

            if (traits != null && sleepable != null && traits.HasTrait("Narcolepsy"))
            {
                sleepable.wakeEffects = null;
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Applied after CreatePassedOutLocator runs.
 /// </summary>
 internal static void Postfix(SleepChoreMonitor.Instance __instance,
                              GameObject __result)
 {
     TraitReworkUtils.RemoveSoreBack(__instance, __result);
 }