public static void _Postfix(this MedicalCareCategory cat, ThingDef meds, ref bool __result, bool __state) { if (!__state) { __result = ModMedicinePatch.GetDynamicAllowsMedicine(cat, meds); } }
public static bool _Prefix(this MedicalCareCategory cat, ThingDef meds, ref bool __state, ref bool __result) { //if MedicalCareCategory is within base game range, use original method - EXCEPT glitterworld. __state = false; if ((int)cat <= 3) { __state = true; } if (!__state) { __result = ModMedicinePatch.GetDynamicAllowsMedicine(cat, meds); } return(__state); }