コード例 #1
0
            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;
            }
コード例 #2
0
            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;
            }