mirror of
https://gitgud.io/amevarashi/rjw-sexperience-ideology.git
synced 2024-08-15 00:43:19 +00:00
25 lines
679 B
C#
25 lines
679 B
C#
using RimWorld;
|
|
|
|
namespace RJWSexperience.Ideology
|
|
{
|
|
/// <summary>
|
|
/// Increments record every time the thought is added
|
|
/// The increment is permanent
|
|
/// </summary>
|
|
public class Thought_IncreaseRecord : Thought_Memory
|
|
{
|
|
/// <summary>
|
|
/// This method is called for every thought right after the pawn is assigned
|
|
/// </summary>
|
|
public override bool TryMergeWithExistingMemory(out bool showBubble)
|
|
{
|
|
var defExtension = def.GetModExtension<ThoughtDefExtension_IncreaseRecord>();
|
|
|
|
if (defExtension != null)
|
|
{
|
|
pawn.records.AddTo(defExtension.recordDef, defExtension.increment);
|
|
}
|
|
return base.TryMergeWithExistingMemory(out showBubble);
|
|
}
|
|
}
|
|
}
|