public void UpdateThoughts() { Thoughts.RemoveAll(thought => thought.IsOver(PlayState.Time.CurrentDate)); Status.Happiness.CurrentValue = 50.0f; foreach (Thought thought in Thoughts) { Status.Happiness.CurrentValue += thought.HappinessModifier; } if (Status.IsAsleep) { AddThought(Thought.ThoughtType.Slept); } else if (Status.Energy.IsUnhappy()) { AddThought(Thought.ThoughtType.FeltSleepy); } if (Status.Hunger.IsUnhappy()) { AddThought(Thought.ThoughtType.FeltHungry); } }
override public void Update(DwarfTime Time, ChunkManager Chunks, Camera Camera) { Thoughts.RemoveAll(thought => thought.IsOver(Manager.World.Time.CurrentDate)); Status.Happiness.CurrentValue = 50.0f; foreach (Thought thought in Thoughts) { Status.Happiness.CurrentValue += thought.HappinessModifier; } if (Status.IsAsleep) { AddThought(Thought.ThoughtType.Slept); } else if (Status.Energy.IsDissatisfied()) { AddThought(Thought.ThoughtType.FeltSleepy); } if (Status.Hunger.IsDissatisfied()) { AddThought(Thought.ThoughtType.FeltHungry); } }
public void RemoveThought(Thought.ThoughtType thoughtType) { Thoughts.RemoveAll(thought => thought.Type == thoughtType); }