2022-11-27 07:36:44 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
using System.Reflection.Emit;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using HarmonyLib;
|
|
|
|
|
using rjw;
|
|
|
|
|
using RimWorld;
|
|
|
|
|
using Verse;
|
2024-05-23 22:33:37 +00:00
|
|
|
|
|
2022-11-27 07:36:44 +00:00
|
|
|
|
|
|
|
|
|
namespace RJW_Genes
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Changes LicentiaLabs (if Present) to alter the TransferNutrition for rjw_genes_generous_donor.
|
|
|
|
|
/// This code is exercised / loaded in the HarmonyInit.
|
|
|
|
|
/// Patched File: https://gitgud.io/John-the-Anabaptist/licentia-labs/-/blob/master/Source/LicentiaLabs/LicentiaLabs/Cumflation.cs
|
|
|
|
|
/// </summary>
|
|
|
|
|
///
|
|
|
|
|
class Patch_TransferNutrition
|
|
|
|
|
{
|
|
|
|
|
// This patch does not need the normal Harmony Targetting,
|
|
|
|
|
// as it needs to be added only on demand (See HarmonyInit.cs)
|
|
|
|
|
public static void Postfix(Pawn giver, Pawn receiver, float cumAmount)
|
|
|
|
|
{
|
|
|
|
|
// Design decision:
|
|
|
|
|
// I could have done some transpiler stuff, but that is scary and might need to be adjusted quite a lot
|
|
|
|
|
// Hence, I simply re-book the nutrition back to the giver in the Postfix. That should be robust and easy.
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|