RJW-Sexperience/Source/RJWSexperience/Cum/IngestionOutcomeDoer_RecordEatenCum.cs

20 lines
772 B
C#
Raw Normal View History

using RimWorld;
2021-09-24 15:14:02 +00:00
using Verse;
namespace RJWSexperience.Cum
2021-09-24 15:14:02 +00:00
{
public class IngestionOutcomeDoer_RecordEatenCum : IngestionOutcomeDoer
2022-04-03 17:20:14 +00:00
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
public float unitAmount = 1.0f;
2021-09-24 15:14:02 +00:00
2022-04-03 17:20:14 +00:00
protected override void DoIngestionOutcomeSpecial(Pawn pawn, Thing ingested)
{
2022-04-27 05:36:34 +00:00
int amount = ingested.stackCount * (int)unitAmount;
Logs.LogManager.GetLogger<IngestionOutcomeDoer_RecordEatenCum, Logs.DebugLogProvider>().Message($"Record {pawn.NameShortColored} eating {amount} ml of cum");
2022-04-27 05:36:34 +00:00
pawn.records.Increment(VariousDefOf.NumofEatenCum);
pawn.records.AddTo(VariousDefOf.AmountofEatenCum, amount);
2022-04-03 17:20:14 +00:00
}
}
2021-09-24 15:14:02 +00:00
}