// 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); }
// Token: 0x06000037 RID: 55 RVA: 0x00003D60 File Offset: 0x00001F60 internal static void CalcAndSetCamoEff(Pawn pawn) { float num; float num2; float num3; float num4; float num5; float num6; float num7; if (StealthyBox.IsWearingStealthBox(pawn, out Apparel apparel)) { CompGearCamo compGearCamo = ThingCompUtility.TryGetComp <CompGearCamo>(apparel); if (compGearCamo != null) { num = compGearCamo.Props.ArcticCamoEff; num2 = compGearCamo.Props.DesertCamoEff; num3 = compGearCamo.Props.JungleCamoEff; num4 = compGearCamo.Props.StoneCamoEff; num5 = compGearCamo.Props.WoodlandCamoEff; num6 = compGearCamo.Props.UrbanCamoEff; num7 = (compGearCamo.Props.ArcticCamoEff + compGearCamo.Props.DesertCamoEff + compGearCamo.Props.JungleCamoEff + compGearCamo.Props.StoneCamoEff + compGearCamo.Props.WoodlandCamoEff + compGearCamo.Props.UrbanCamoEff) / 6f; } else { num = 1f; num2 = 1f; num3 = 1f; num4 = 1f; num5 = 1f; num6 = 1f; num7 = 1f; } } else { CamoGearUtility.WearingCamoGear(pawn, out float num8, out float num9, out float num10, out float num11, out float num12, out float num13, out float num14); num = num8; num2 = num9; num3 = num10; num4 = num11; num5 = num12; num6 = num13; num7 = num14; } float pawnArcticCamo = num; float pawnDesertCamo = num2; float pawnJungleCamo = num3; float pawnStoneCamo = num4; float pawnWoodlandCamo = num5; float pawnUrbanCamo = num6; float pawnnotDefinedCamo = num7; PawnCamoData pawnCamoData = ThingCompUtility.TryGetComp <PawnCamoData>(pawn); if (pawnCamoData != null) { pawnCamoData.PawnArcticCamo = pawnArcticCamo; pawnCamoData.PawnDesertCamo = pawnDesertCamo; pawnCamoData.PawnJungleCamo = pawnJungleCamo; pawnCamoData.PawnStoneCamo = pawnStoneCamo; pawnCamoData.PawnWoodlandCamo = pawnWoodlandCamo; pawnCamoData.PawnUrbanCamo = pawnUrbanCamo; pawnCamoData.PawnnotDefinedCamo = pawnnotDefinedCamo; } }