big-and-small-unofficial-ad.../Source/MBS_Anomaly/StatPart_BodySizeTransferOffset.cs
maciek c8b12c771d
fix: remove debugging logs
removed logging used for debugging and changed ExplanationPart to return null as i don't know how to do it properly :(
2025-02-27 19:57:55 +01:00

39 lines
1.4 KiB
C#

/*
Copyright 2025 Maciej Pawłowski
This file is part of "Maciek's Big and Small unofficial addon - Anomaly".
"Maciek's Big and Small unofficial addon - Anomaly" is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
"Maciek's Big and Small unofficial addon - Anomaly" is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with "Maciek's Big and Small unofficial addon - Anomaly". If not, see <https://www.gnu.org/licenses/>.
*/
using RimWorld;
using Verse;
namespace MBS_Anomaly;
public class StatPart_BodySizeTransferOffset : StatPart
{
public override void TransformValue(StatRequest req, ref float val)
{
if (req.Thing is Pawn pawn)
{
foreach (var hediff in pawn.health.hediffSet.hediffs)
{
if (hediff is HediffSizeOffset sizeHediff)
{
val += sizeHediff.SizeOffset;
Log.Message(val);
}
}
}
}
public override string ExplanationPart(StatRequest req)
{
return null;
}
}