big-and-small-unofficial-ad.../Source/MBS_Anomaly/StatPart_BodySizeTransferOffset.cs
maciek f390de6ce3
initial commit
first working version
a little late since i didn't expect this to be big enough to require source control 😵‍💫
2025-02-27 19:40:35 +01:00

41 lines
1.5 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);
}
Log.Message("2");
}
}
Log.Message("1");
}
public override string ExplanationPart(StatRequest req)
{
return "test";
}
}