コード例 #1
0
 // Token: 0x06000057 RID: 87 RVA: 0x00005FB0 File Offset: 0x000041B0
 public override void PostSpawnSetup(bool respawningAfterLoad)
 {
     base.PostSpawnSetup(respawningAfterLoad);
     if (respawningAfterLoad && this.Props.ActiveCamoEff > 0f && this.Props.CamoEnergyMax > 0f)
     {
         Thing parent = this.parent;
         if (parent.GetType() != typeof(ActiveCamoApparel) && parent.def.thingClass == typeof(ActiveCamoApparel) && parent.Spawned && (parent?.Map) != null)
         {
             PawnCamoData.CorrectActiveApparel(parent as Apparel, null);
         }
     }
 }
コード例 #2
0
        // Token: 0x06000057 RID: 87 RVA: 0x00005FB0 File Offset: 0x000041B0
        public override void PostSpawnSetup(bool respawningAfterLoad)
        {
            base.PostSpawnSetup(respawningAfterLoad);
            if (!respawningAfterLoad || !(Props.ActiveCamoEff > 0f) || !(Props.CamoEnergyMax > 0f))
            {
                return;
            }

            Thing thingWithComps = parent;

            if (thingWithComps.GetType() != typeof(ActiveCamoApparel) &&
                thingWithComps.def.thingClass == typeof(ActiveCamoApparel) && thingWithComps.Spawned &&
                thingWithComps.Map != null)
            {
                PawnCamoData.CorrectActiveApparel(thingWithComps as Apparel);
            }
        }
コード例 #3
0
 // Token: 0x06000063 RID: 99 RVA: 0x0000650C File Offset: 0x0000470C
 public override void PostSpawnSetup(bool respawningAfterLoad)
 {
     base.PostSpawnSetup(respawningAfterLoad);
     if (respawningAfterLoad)
     {
         Pawn pawn = this.Pawn;
         if ((pawn?.apparel) != null && this.Pawn.apparel.WornApparelCount > 0)
         {
             foreach (Apparel apparel in this.Pawn.apparel.WornApparel)
             {
                 CompGearCamo compGearCamo = ThingCompUtility.TryGetComp <CompGearCamo>(apparel);
                 if (compGearCamo != null && compGearCamo.Props.ActiveCamoEff > 0f && compGearCamo.Props.CamoEnergyMax > 0f && apparel.GetType() != typeof(ActiveCamoApparel) && apparel.def.thingClass == typeof(ActiveCamoApparel))
                 {
                     PawnCamoData.CorrectActiveApparel(apparel, this.Pawn);
                     break;
                 }
             }
         }
     }
     CamoGearUtility.CalcAndSetCamoEff(this.Pawn);
 }