initial commit
first working version
a little late since i didn't expect this to be big enough to require source control 😵💫
This commit is contained in:
commit
f390de6ce3
14 changed files with 1117 additions and 0 deletions
41
Source/MBS_Anomaly/StatPart_BodySizeTransferOffset.cs
Normal file
41
Source/MBS_Anomaly/StatPart_BodySizeTransferOffset.cs
Normal file
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
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";
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue