public static void HediffGizmos(ref IEnumerable <Gizmo> __result, Pawn __instance) { List <Gizmo> gizmos = new List <Gizmo>(__result); foreach (Hediff hediff in __instance.health.hediffSet.hediffs) { HediffComp_HediffGizmo hediffGizmo = hediff.TryGetComp <HediffComp_HediffGizmo>(); if (hediffGizmo != null) { foreach (Gizmo h in hediffGizmo.CompGetGizmos()) { gizmos.Add(h); } } } __result = gizmos; }
public static void HediffGizmos(ref IEnumerable <Gizmo> __result, Pawn_DraftController __instance) { List <Gizmo> gizmos = new List <Gizmo>(__result); List <Hediff> hediffs = __instance.pawn.health.hediffSet.hediffs; for (int i = 0; i < hediffs.Count; i++) { HediffComp_HediffGizmo hediffGizmo = hediffs[i].TryGetComp <HediffComp_HediffGizmo>(); if (hediffGizmo != null) { foreach (Gizmo h in hediffGizmo.CompGetGizmos()) { gizmos.Add(h); } } } __result = gizmos; }