Files
RickGrymes d88e3d4e0f Add consumable grenade system and settings
Introduces a new consumable grenade flow with a toggle in General settings, including localization strings and XML patching so vanilla grenades use a consumable launch verb and stack to 15. Added Harmony patches and a custom verb to handle stack consumption, prevent unwanted restacking when consumables are disabled, and auto-equip matching replacements from inventory. Also includes small supporting tweaks: safer holotape debug spawning, a log level adjustment in core mod startup, and minor def updates (apparel cleanup/category fix and energy explosion color tuning).
2026-07-04 23:06:13 -05:00

17 lines
459 B
C#

using HarmonyLib;
using Verse;
namespace FCP.Core;
[HarmonyPatch(typeof(Thing), nameof(Thing.TryAbsorbStack))]
public static class GrenadeStackAbsorb_Patch
{
public static bool Prefix(Thing __instance, Thing other, ref bool __result)
{
if (FCPCoreMod.Settings.General.consumableGrenades) return true;
if (!Thing_PostMake_Patch.IsConsumableGrenade(__instance.def)) return true;
__result = false;
return false;
}
}