// Token: 0x0600000D RID: 13 RVA: 0x00002349 File Offset: 0x00000549 public LordToil_CParty(IntVec3 spot, int ticksPerPartyPulse = DefaultTicksPerPartyPulse) { this.spot = spot; this.ticksPerPartyPulse = ticksPerPartyPulse; data = new LordToilData_Gathering(); ticksToNextPulse = ticksPerPartyPulse; }
private void ApplyOutcome(LordToil_Party toil) { List <Pawn> ownedPawns = lord.ownedPawns; LordToilData_Gathering lordToilData_Party = (LordToilData_Gathering)toil.data; for (int i = 0; i < ownedPawns.Count; i++) { Pawn pawn = ownedPawns[i]; bool flag = pawn == organizer; if (lordToilData_Party.presentForTicks.TryGetValue(pawn, out int value) && value > 0) { if (ownedPawns[i].needs.mood != null) { ThoughtDef thoughtDef = flag ? OrganizerThought : AttendeeThought; float num = 0.5f / thoughtDef.stages[0].baseMoodEffect; float moodPowerFactor = Mathf.Min((float)value / (float)durationTicks + num, 1f); Thought_Memory thought_Memory = (Thought_Memory)ThoughtMaker.MakeThought(thoughtDef); thought_Memory.moodPowerFactor = moodPowerFactor; ownedPawns[i].needs.mood.thoughts.memories.TryGainMemory(thought_Memory); } TaleRecorder.RecordTale(flag ? OrganizerTale : AttendeeTale, ownedPawns[i], organizer); } } }