public void TryGainMemoryFast(ThoughtDef mem) { Thought_Memory firstMemoryOfDef = this.GetFirstMemoryOfDef(mem); if (firstMemoryOfDef != null) { firstMemoryOfDef.Renew(); } else { this.TryGainMemory(mem, null); } }
public virtual bool TryMergeWithExistingMemory(out bool showBubble) { ThoughtHandler thoughts = pawn.needs.mood.thoughts; if (thoughts.memories.NumMemoriesInGroup(this) >= def.stackLimit) { Thought_Memory thought_Memory = thoughts.memories.OldestMemoryInGroup(this); if (thought_Memory != null) { showBubble = (thought_Memory.age > thought_Memory.def.DurationTicks / 2); thought_Memory.Renew(); return(true); } } showBubble = true; return(false); }