public override void ExposeData() { base.ExposeData(); Scribe_Values.Look <Vector3>(ref this.origin, "origin", default(Vector3), false); Scribe_Values.Look <Vector3>(ref this.destination, "destination", default(Vector3), false); Scribe_Values.Look <Vector3>(ref this.direction, "direction", default(Vector3), false); Scribe_Values.Look <float>(ref this.directionAngle, "directionAngle", 0, false); Scribe_Values.Look <int>(ref this.ticksToImpact, "ticksToImpact", 0, false); Scribe_Values.Look <int>(ref this.pwrVal, "pwrVal", 0, false); Scribe_Values.Look <int>(ref this.verVal, "verVal", 0, false); Scribe_Values.Look <float>(ref this.radius, "radius", 1.4f, false); Scribe_Values.Look <int>(ref this.proximityFrequency, "proximityFrequency", 6, false); Scribe_Values.Look <float>(ref this.proximityRadius, "proximityRadius", .4f, false); Scribe_Values.Look <bool>(ref this.damageLaunched, "damageLaunched", true, false); Scribe_Values.Look <bool>(ref this.explosion, "explosion", false, false); Scribe_Values.Look <bool>(ref this.initialized, "initialized", false, false); Scribe_References.Look <Thing>(ref this.assignedTarget, "assignedTarget", false); Scribe_References.Look <Pawn>(ref this.pawn, "pawn", false); Scribe_Deep.Look <Thing>(ref this.flyingThing, "flyingThing", new object[0]); }
// Token: 0x0600003D RID: 61 RVA: 0x00004790 File Offset: 0x00002990 public override void ExposeData() { base.ExposeData(); Scribe_Values.Look<bool>(ref DRSettings.DoIfPrisoner, "DoIfPrisoner", false, false); Scribe_Values.Look<bool>(ref DRSettings.DoDRIfPrisoner, "DoDRIfPrisoner", false, false); Scribe_Values.Look<bool>(ref DRSettings.UseNonMedical, "UseNonMedical", false, false); Scribe_Values.Look<bool>(ref DRSettings.ShowResearched, "ShowResearched", true, false); Scribe_Values.Look<bool>(ref DRSettings.BillsHighPain, "BillsHighPain", false, false); Scribe_Values.Look<bool>(ref DRSettings.DoIfImmune, "DoIfImmune", true, false); Scribe_Values.Look<bool>(ref DRSettings.UsePainManagement, "UsePainManagement", false, false); Scribe_Values.Look<int>(ref DRSettings.PainReliefWaitPeriod, "PainReliefWaitPeriod", 24, false); Scribe_Values.Look<bool>(ref DRSettings.ShowReliefMsg, "ShowReliefMsg", true, false); Scribe_Values.Look<bool>(ref DRSettings.UseReliefBills, "UseReliefBills", false, false); Scribe_Values.Look<bool>(ref DRSettings.UseDrugResponse, "UseDrugResponse", false, false); Scribe_Values.Look<int>(ref DRSettings.DRWaitPeriod, "DRWaitPeriod", 24, false); Scribe_Values.Look<int>(ref DRSettings.DRWaitPeriod2, "DRWaitPeriod2", 24, false); Scribe_Values.Look<bool>(ref DRSettings.ShowResponseMsg, "ShowResponseMsg", true, false); Scribe_Values.Look<bool>(ref DRSettings.UseDRBills, "UseDRBills", true, false); Scribe_Values.Look<bool>(ref DRSettings.UseDRBills2, "UseDRBills2", true, false); Scribe_Values.Look<string>(ref DRSettings.MSDrugMinor, "MSDrugMinor", null, false); Scribe_Values.Look<string>(ref DRSettings.MSDrugSerious, "MSDrugSerious", null, false); Scribe_Values.Look<string>(ref DRSettings.MSDrugIntense, "MSDrugIntense", null, false); Scribe_Values.Look<string>(ref DRSettings.MSDrugExtreme, "MSDrugExtreme", null, false); Scribe_Values.Look<string>(ref DRSettings.MSDRHed, "MSDRHed", null, false); Scribe_Values.Look<string>(ref DRSettings.MSDRThg, "MSDRThg", null, false); Scribe_Collections.Look<string>(ref DRSettings.MSDRValues, "MSDRValues", LookMode.Value, Array.Empty<object>()); Scribe_Values.Look<string>(ref DRSettings.MSDRHed2, "MSDRHed2", null, false); Scribe_Values.Look<string>(ref DRSettings.MSDRThg2, "MSDRThg2", null, false); Scribe_Collections.Look<string>(ref DRSettings.MSDRValues2, "MSDRValues2", LookMode.Value, Array.Empty<object>()); if (Scribe.mode != LoadSaveMode.Saving) { if (DRSettings.MSDRValues == null) { DRSettings.MSDRValues = new List<string>(); } if (DRSettings.MSDRValues2 == null) { DRSettings.MSDRValues2 = new List<string>(); } } }
public override void PostExposeData() { Scribe_Values.Look(ref IsInitialized, "abilityUserIsInitialized" + this.GetType().ToString(), false); Scribe_Deep.Look(ref abilityData, "abilityData" + this.GetType().ToString(), this); if (Scribe.mode == LoadSaveMode.PostLoadInit) { var tempAbilities = new List <PawnAbility>(AbilityData.Powers); if (!tempAbilities.NullOrEmpty()) { foreach (var pa in tempAbilities) { if (pa.Def.abilityClass != pa.GetType()) { RemovePawnAbility(pa.Def); AddPawnAbility(pa.Def); } } } } }
public override void ExposeData() { base.ExposeData(); if (Scribe.mode == LoadSaveMode.Saving) { this.things.RemoveAll((Thing x) => x.Destroyed); } Scribe_Values.Look <int>(ref this.countToTransfer, "countToTransfer", 0, false); Scribe_Collections.Look <Thing>(ref this.things, "things", LookMode.Reference, new object[0]); if (Scribe.mode == LoadSaveMode.LoadingVars) { base.EditBuffer = this.countToTransfer.ToStringCached(); } if (Scribe.mode == LoadSaveMode.PostLoadInit) { if (this.things.RemoveAll((Thing x) => x == null) != 0) { Log.Warning("Some of the things were null after loading.", false); } } }
public override void ExposeData() { base.ExposeData(); Scribe_Values.Look(ref crystalAbundanceSetting, "crystalAbundanceSetting", 1f); Scribe_Values.Look(ref crystalDiversitySetting, "crystalDiversitySetting", 1f); Scribe_Values.Look(ref boulderAbundanceSetting, "boulderAbundanceSetting", 1f); Scribe_Values.Look(ref rocksAbundanceSetting, "rocksAbundanceSetting", 1f); Scribe_Values.Look(ref mineralGrowthSetting, "mineralGrowthSetting", 1f); Scribe_Values.Look(ref mineralReproductionSetting, "mineralReproductionSetting", 1f); Scribe_Values.Look(ref mineralSpawningSetting, "mineralSpawningSetting", 1f); Scribe_Values.Look(ref replaceWallsSetting, "replaceWallsSetting", true); Scribe_Values.Look(ref replaceChunksSetting, "replaceChunksSetting", true); Scribe_Values.Look(ref includeFictionalSetting, "includeFictionalSetting", true); Scribe_Values.Look(ref removeStartingChunksSetting, "removeStartingChunksSetting", true); Scribe_Values.Look(ref underwaterMineralsSetting, "underwaterMineralsSetting", true); Scribe_Values.Look(ref mineralsGrowUpWallsSetting, "mineralsGrowUpWallsSetting", true); Scribe_Values.Look(ref snowyRockSetting, "snowyRockSetting", true); Scribe_Values.Look(ref visualSpreadFactor, "visualSpreadFactor", 1f); Scribe_Values.Look(ref resourceDropFreqSetting, "resourceDropFreqSetting", 1f); Scribe_Values.Look(ref resourceDropAmountSetting, "resourceDropAmountSetting", 1f); }
public override void ExposeData() { Scribe_Values.Look(ref bigAnimalMigrations, "bigAnimalMigrations", false); Scribe_Values.Look(ref modifyAutoUndrafter, "modifyAutoUndrafter", false); Scribe_Values.Look(ref whenGunsAreFiring, "whenGunsAreFiring", true); Scribe_Values.Look(ref extendUndraftTimeBy, "extendUndraftTimeBy", 5000); Scribe_Values.Look(ref allowAutoUndraftAtLowMood, "allowAutoUndraftAtLowMood", true); Scribe_Values.Look(ref dontExtendWhenMoodAt, "dontExtendWhenMoodAt", " Major Break Risk"); Scribe_Values.Look(ref enableLargePacks, "enableLargePacks", true); Scribe_Values.Look(ref variableRaidRetreat, "variableRaidRetreat", false); Scribe_Values.Look(ref retreatDefeatRange, "retreatDefeatRange", new FloatRange(0.5f, 0.5f)); Scribe_Values.Look(ref enableTutorialStyleRolling, "tutorialStyleRolling", true); Scribe_Values.Look(ref deathMessagesForAnimals, "deathMessageForAnimals", true); Scribe_Values.Look(ref guardingPredatorsDeferHuntingTameDesignatedAnimals, "guardingPredatorsDeferHuntingTameDesignatedAnimals", true); Scribe_Values.Look(ref animalInteractionHourLimit, "animalInteractionHourLimit", 20); Scribe_Values.Look(ref workAssignmentMatters, "workAssignmentMatters", false); Scribe_Values.Look(ref iAmAModder, "iAmAModder", false); Scribe_Values.Look(ref betterHostileReadouts, "betterHostileReadouts", true); Scribe_Values.Look(ref displayRangedDPS, "displayRangedDPS", true); Scribe_Values.Look(ref thingFilterInfoCards, "thingFilterInfoCards", true); }
/// <summary> /// Save and load variables (stored in savegame data). /// </summary> public override void ExposeData() { base.ExposeData(); // Breeding parameters. Scribe_Defs.Look <PawnKindDef>(ref breedingSpeciesDef, "breedingSpeciesDef"); Scribe_Values.Look <int>(ref breedingDurationInTicks, "breedingDuratinInTicks"); Scribe_Values.Look <int>(ref breedingProgressInTicks, "breedingProgressInTicks"); Scribe_Values.Look <bool>(ref breedingIsFinished, "breedingIsFinished"); // Food. Scribe_Values.Look <int>(ref nextFeedingDateInTicks, "nextFeedingDateInTicks"); Scribe_Values.Look <bool>(ref foodIsAvailable, "foodIsAvailable"); // Water quality. Scribe_Values.Look <float>(ref waterQuality, "waterQuality"); Scribe_Values.Look <int>(ref microFungusRemainingDurationInTicks, "microFungusRemainingDurationInTicks"); // Fishes health. Scribe_Values.Look <int>(ref fishesHealthInPercent, "fishesHealthInPercent"); }
public override void ExposeData() { base.ExposeData(); //PawnFlyer Scribe_References.Look <PawnFlyer>(ref this.pawnFlyer, "pawnFlyer"); //Vanilla Scribe_Values.Look <int>(ref this.groupID, "groupID", 0, false); Scribe_Values.Look <int>(ref this.destinationTile, "destinationTile", 0, false); Scribe_Values.Look <IntVec3>(ref this.destinationCell, "destinationCell", default(IntVec3), false); Scribe_Values.Look <PawnsArrivalModeDef>(ref this.arriveMode, "arriveMode", PawnsArrivalModeDefOf.EdgeDrop, false); Scribe_Values.Look <bool>(ref this.attackOnArrival, "attackOnArrival", false, false); Scribe_Values.Look <int>(ref this.ticksSinceStart, "ticksSinceStart", 0, false); Scribe_Deep.Look <ActiveDropPodInfo>(ref this.contents, "contents", new object[] { this }); Scribe_Values.Look <bool>(ref this.alreadyLeft, "alreadyLeft", false, false); Scribe_Values.Look <bool>(ref this.soundPlayed, "soundPlayed", false, false); }
public override void ExposeData() { Scribe_Values.Look <float>(ref this.xpMultiplier, "xpMultiplier", 1f, false); Scribe_Values.Look <float>(ref this.needMultiplier, "needMultiplier", 1f, false); Scribe_Values.Look <float>(ref this.deathExplosionRadius, "deathExplosionRadius", 3f, false); Scribe_Values.Look <int>(ref this.deathExplosionMin, "deathExplosionMin", 20, false); Scribe_Values.Look <int>(ref this.deathExplosionMax, "deathExplosionMax", 50, false); Scribe_Values.Look <bool>(ref this.AICasting, "AICasting", true, false); Scribe_Values.Look <bool>(ref this.AIHardMode, "AIHardMode", false, false); Scribe_Values.Look <bool>(ref this.AIMarking, "AIMarking", false, false); Scribe_Values.Look <bool>(ref this.AIFighterMarking, "AIFighterMarking", false, false); Scribe_Values.Look <bool>(ref this.AIFriendlyMarking, "AIFriendlyMarking", false, false); Scribe_Values.Look <float>(ref this.baseMageChance, "baseMageChance", 1f, false); Scribe_Values.Look <float>(ref this.baseFighterChance, "baseFighterChance", 1f, false); Scribe_Values.Look <float>(ref this.advMageChance, "advMageChance", 0.5f, false); Scribe_Values.Look <float>(ref this.advFighterChance, "advFighterChance", 0.5f, false); Scribe_Values.Look <float>(ref this.magicyteChance, "magicyteChance", 0.005f, false); Scribe_Values.Look <bool>(ref this.showIconsMultiSelect, "showIconsMultiSelect", true, false); Scribe_Values.Look <float>(ref this.riftChallenge, "riftChallenge", 1f, false); Scribe_Values.Look <bool>(ref this.showGizmo, "showGizmo", true, false); }
public override void ExposeData() { base.ExposeData(); Scribe_Values.Look <Vector3>(ref this.origin, "origin", default(Vector3), false); Scribe_Values.Look <Vector3>(ref this.destination, "destination", default(Vector3), false); Scribe_Values.Look <Vector3>(ref this.trueOrigin, "trueOrigin", default(Vector3), false); Scribe_Values.Look <Vector3>(ref this.nearApex, "nearApex", default(Vector3), false); Scribe_Values.Look <Vector3>(ref this.farApex, "farApex", default(Vector3), false); Scribe_Values.Look <Vector3>(ref this.direction, "direction", default(Vector3), false); Scribe_Values.Look <int>(ref this.ticksToImpact, "ticksToImpact", 0, false); Scribe_Values.Look <int>(ref this.weaponDmg, "weaponDmg", 0, false); Scribe_Values.Look <int>(ref this.verVal, "verVal", 0, false); Scribe_Values.Look <int>(ref this.destinationCurvePoint, "destinationCurvePoint", 0, false); Scribe_Values.Look <bool>(ref this.damageLaunched, "damageLaunched", true, false); Scribe_Values.Look <bool>(ref this.explosion, "explosion", false, false); Scribe_References.Look <Thing>(ref this.assignedTarget, "assignedTarget", false); Scribe_References.Look <Pawn>(ref this.pawn, "pawn", false); Scribe_Deep.Look <Thing>(ref this.flyingThing, "flyingThing", new object[0]); Scribe_Collections.Look <IntVec3>(ref this.targetCells, "targetCells", LookMode.Value); Scribe_Collections.Look <Vector3>(ref this.curvePoints, "curvePoints", LookMode.Value); }
public static bool HasPossibleSameWorldName(string[] names, string filePath) { var worldName = ""; Scribe.loader.InitLoading(filePath); if (Scribe.EnterNode("game")) { if (Scribe.EnterNode("world")) { if (Scribe.EnterNode("info")) { Scribe_Values.Look <string>(ref worldName, "name"); } } } Scribe.loader.ForceStop(); return(names.Any(name => worldName.EqualsIgnoreCase(name))); }
public override void PostExposeData() { base.PostExposeData(); Scribe_Values.Look <int>(ref this.level, "FP_RSLUM_level", 0, true); Scribe_Values.Look <int>(ref this.exp, "FP_RSLUM_exp", 0, true); Scribe_Values.Look <int>(ref this.need_exp, "FP_RSLUM_need_exp", 10000, true); Scribe_Values.Look <int>(ref this.StatPoint, "FP_RSLUM_StatPoint", 1, true); Scribe_Values.Look <int>(ref this.STR, "FP_RSLUM_STR", 0, true); Scribe_Values.Look <int>(ref this.DEX, "FP_RSLUM_DEX", 0, true); Scribe_Values.Look <int>(ref this.AGL, "FP_RSLUM_AGL", 0, true); Scribe_Values.Look <int>(ref this.CON, "FP_RSLUM_CON", 0, true); Scribe_Values.Look <int>(ref this.INT, "FP_RSLUM_INT", 0, true); Scribe_Values.Look <int>(ref this.CHA, "FP_RSLUM_CHA", 0, true); Scribe_Values.Look <bool>(ref this.STRauto, "FP_RSLUM_STRauto", false, true); Scribe_Values.Look <bool>(ref this.DEXauto, "FP_RSLUM_DEXauto", false, true); Scribe_Values.Look <bool>(ref this.AGLauto, "FP_RSLUM_AGLauto", false, true); Scribe_Values.Look <bool>(ref this.CONauto, "FP_RSLUM_CONauto", false, true); Scribe_Values.Look <bool>(ref this.INTauto, "FP_RSLUM_INTauto", false, true); Scribe_Values.Look <bool>(ref this.CHAauto, "FP_RSLUM_CHAauto", false, true); }
/// <summary> /// Save and load internal state variables (stored in savegame data). /// </summary> public override void ExposeData() { base.ExposeData(); Scribe_Values.Look <int>(ref this.nextTargetSearchTick, "nextTargetSearchTick"); Scribe_References.Look <Pawn>(ref this.target, "target"); Scribe_References.Look <Thing>(ref this.light, "light"); Scribe_Values.Look <int>(ref this.projectorRangeRateInTicks, "projectorRangeRateInTicks"); Scribe_Values.Look <int>(ref this.projectorRotationRateInTicks, "projectorRotationRateInTicks"); Scribe_Values.Look <float>(ref this.projectorRotationBaseOffset, "projectorRotationBaseOffset"); Scribe_Values.Look <float>(ref this.projectorRotation, "projectorRotation"); Scribe_Values.Look <float>(ref this.projectorRotationTarget, "projectorRotationTarget"); Scribe_Values.Look <bool>(ref this.projectorRotationClockwise, "projectorRotationClockwise"); Scribe_Values.Look <float>(ref this.projectorRangeBaseOffset, "projectorRangeBaseOffset"); Scribe_Values.Look <float>(ref this.projectorRange, "projectorRange"); Scribe_Values.Look <float>(ref this.projectorRangeTarget, "projectorRangeTarget"); Scribe_Values.Look <LightMode>(ref this.lightMode, "lightMode"); Scribe_Values.Look <int>(ref this.idlePauseTicks, "idlePauseTicks"); Scribe_Values.Look <int>(ref this.groupId, "groupId"); }
public void ExposeData() { Scribe_Values.Look(ref id, "id"); Scribe_References.Look(ref DeclaredWarFaction, "DeclaredWarFaction"); Scribe_References.Look(ref DefendingFaction, "DefendingFaction"); Scribe_Defs.Look(ref WarGoalDef, "WarGoalDef"); Scribe_Deep.Look(ref Worker, "Worker"); Scribe_Deep.Look(ref StatWorker, "StatWorker"); Scribe_Collections.Look(ref AssaultFactions, "AssaultFactions", LookMode.Reference); Scribe_Collections.Look(ref DefendingFactions, "DefendingFactions", LookMode.Reference); Scribe_Values.Look(ref StartTicks, "StartTicks"); Scribe_Values.Look(ref started, "started"); Scribe_Values.Look(ref WarName, "WarName"); Scribe_Values.Look(ref LastTruceTicks, "LastTruceTicks"); Scribe_Values.Look(ref nextTicksSituations, "nextTicksSituations"); Scribe_Collections.Look(ref armys, "armys", LookMode.Deep); }
public override void ExposeData() { base.ExposeData(); Scribe_Values.Look(ref factionCount, "factionCount", 6f); Scribe_Values.Look(ref outlanderCivilMin, "outlanderCivilMin", 1f); Scribe_Values.Look(ref outlanderHostileMin, "outlanderHostileMin", 1f); Scribe_Values.Look(ref tribalCivilMin, "tribalCivilMin", 1f); Scribe_Values.Look(ref tribalHostileMin, "tribalHostileMin", 1f); Scribe_Values.Look(ref tribalSavageMin, "tribalSavageMin", 1f); Scribe_Values.Look(ref pirateMin, "pirateMin", 1f); Scribe_Values.Look(ref empireMin, "empireMin", 1f); SetIncidents.SetIncidentLevels(); if (Scribe.mode == LoadSaveMode.LoadingVars) { if (factionCount < 0) { if (ModsConfig.RoyaltyActive) { factionCount = 6f; } else { factionCount = 5f; } } } if (Scribe.mode == LoadSaveMode.PostLoadInit) { strFacCnt = ((int)factionCount).ToString(); strOutCiv = ((int)outlanderCivilMin).ToString(); strOutHos = ((int)outlanderHostileMin).ToString(); strTriCiv = ((int)tribalCivilMin).ToString(); strTriHos = ((int)tribalHostileMin).ToString(); strTriSav = ((int)tribalSavageMin).ToString(); strPir = ((int)pirateMin).ToString(); strEmp = ((int)empireMin).ToString(); } }
public override void ExposeData() { base.ExposeData(); Scribe_Deep.Look<ThingOwner>(ref this.innerContainerDrones, "innerContainerDrones", new object[] { this }); Scribe_Deep.Look<ThingOwner>(ref this.innerContainerQueens, "innerContainerQueens", new object[] { this }); Scribe_Values.Look<bool>(ref this.contentsKnown, "contentsKnown", false, false); Scribe_Values.Look<bool>(ref this.contentsKnownQueens, "contentsKnownQueens", false, false); Scribe_Values.Look<int>(ref this.tickCounter, "tickCounter", 0, false); Scribe_Values.Look<bool>(ref this.BeehouseIsFull, "BeehouseIsFull", false, false); Scribe_Values.Look<bool>(ref this.BeehouseIsRunning, "BeehouseIsRunning", false, false); Scribe_Values.Look<bool>(ref this.BeehouseIsExpectingBees, "BeehouseIsExpectingBees", false, false); Scribe_Values.Look<bool>(ref this.BeehouseIsExpectingQueens, "BeehouseIsExpectingQueens", false, false); Scribe_Values.Look<string>(ref this.whichPlantNeeds, "whichPlantNeeds", "", false); Scribe_Values.Look<bool>(ref this.flagLight, "flagLight", false, false); Scribe_Values.Look<bool>(ref this.flagTemperature, "flagTemperature", false, false); Scribe_Values.Look<bool>(ref this.flagRain, "flagRain", false, false); Scribe_Values.Look<bool>(ref this.flagPlants, "flagPlants", false, false); Scribe_Values.Look<bool>(ref this.flagPower, "flagPower", false, false); Scribe_Values.Look<bool>(ref this.flagInitializeConditions, "flagInitializeConditions", false, false); Scribe_Values.Look<int>(ref this.avgTempMin, "avgTempMin", 0, false); Scribe_Values.Look<int>(ref this.avgTempMax, "avgTempMax", 0, false); Scribe_Values.Look<string>(ref this.theDroneIAmGoingToInsert, "theDroneIAmGoingToInsert", "", false); Scribe_Values.Look<string>(ref this.theQueenIAmGoingToInsert, "theQueenIAmGoingToInsert", "", false); }
public override void ExposeData() { base.ExposeData(); Scribe_Values.Look <Vector3>(ref this.origin, "origin", default(Vector3), false); Scribe_Values.Look <Vector3>(ref this.destination, "destination", default(Vector3), false); Scribe_Values.Look <int>(ref this.ticksToImpact, "ticksToImpact", 0, false); Scribe_Values.Look <bool>(ref this.damageLaunched, "damageLaunched", true, false); Scribe_Values.Look <bool>(ref this.explosion, "explosion", false, false); Scribe_References.Look <Thing>(ref this.assignedTarget, "assignedTarget", false); //Scribe_References.Look<Thing>(ref this.launcher, "launcher", false); Scribe_Deep.Look <Thing>(ref this.flyingThing, "flyingThing", new object[0]); Scribe_Values.Look <bool>(ref this.drafted, "drafted", false, false); Scribe_Values.Look <float>(ref this.xVariation, "xVariation", 0, false); Scribe_Values.Look <float>(ref this.zVariation, "zVariation", 0, false); Scribe_Values.Look <float>(ref this.solidTime, "solidTime", .5f, false); Scribe_Values.Look <float>(ref this.fadeInTime, "fadeInTime", .25f, false); Scribe_Values.Look <float>(ref this.fadeOutTime, "fadeOutTime", .25f, false); Scribe_Defs.Look <ThingDef>(ref this.moteDef, "moteDef"); Scribe_Values.Look <float>(ref this.moteScale, "moteScale", 1f, false); Scribe_Values.Look <int>(ref this.moteFrequency, "moteFrequency", 0, false); Scribe_Values.Look <float>(ref this.destroyPctAtEnd, "destroyPctAtEnd", 0f, false); }
public void ExposeData() { // Data marker if (Scribe.mode == LoadSaveMode.Saving) { bool isPlayerHome = map.IsPlayerHome; Scribe_Values.Look(ref isPlayerHome, "isPlayerHome", false, true); } Scribe_Deep.Look(ref caravanForming, "caravanFormingSession", map); Scribe_Deep.Look(ref transporterLoading, "transporterLoading", map); Scribe_Collections.Look(ref mapDialogs, "mapDialogs", LookMode.Deep, map); if (Scribe.mode == LoadSaveMode.LoadingVars && mapDialogs == null) { mapDialogs = new List <PersistentDialog>(); } //Multiplayer.ExposeIdBlock(ref mapIdBlock, "mapIdBlock"); ExposeFactionData(); }
public void ExposeData() { Scribe_Collections.Look(ref entities, "entities", LookMode.Deep); Scribe_Values.Look(ref rotation, "rotation", Rot4.North); if (Scribe.mode != LoadSaveMode.PostLoadInit) { return; } if (entities.RemoveAll((SketchEntity x) => x == null) != 0) { Log.Error("Some sketch entities were null after loading."); } if (entities.RemoveAll((SketchEntity x) => x.LostImportantReferences) != 0) { Log.Error("Some sketch entities had null defs after loading."); } RecacheAll(); tmpToRemove.Clear(); for (int i = 0; i < cachedThings.Count; i++) { if (!cachedThings[i].def.IsDoor) { continue; } for (int j = 0; j < cachedThings.Count; j++) { if (cachedThings[j].def == ThingDefOf.Wall && cachedThings[j].pos == cachedThings[i].pos) { tmpToRemove.Add(cachedThings[j]); } } } for (int k = 0; k < tmpToRemove.Count; k++) { Log.Error("Sketch has a wall and a door in the same cell. Fixing."); Remove(tmpToRemove[k]); } tmpToRemove.Clear(); }
public override void ExposeData() { base.ExposeData(); Scribe_Values.Look(ref this.AllowXenomorphFaction, "AllowXenomorphFaction", true); Scribe_Values.Look(ref this.AllowYautjaFaction, "AllowYautjaFaction", true); Scribe_Values.Look(ref this.AllowHiddenInfections, "AllowHiddenInfections", true); Scribe_Values.Look(ref this.AllowPredalienImpregnations, "AllowPredalienImpregnations", true); Scribe_Values.Look(ref this.AllowXenoCocoonMetamorph, "AllowXenoCocoonMetamorph", true); Scribe_Values.Look(ref this.AllowXenoEggMetamorph, "AllowXenoEggMetamorph", true); Scribe_Values.Look(ref this.AllowNonHumanlikeHosts, "AllowNonHumanlikeHosts", true); Scribe_Values.Look(ref this.AllowThrumbomorphs, "AllowThrumbomorphs", true); Scribe_Values.Look(ref this.AllowNeomorphs, "AllowNeomorphs", true); Scribe_Values.Look(ref this.AllowPredaliens, "AllowPredaliens", true); Scribe_Values.Look <float>(ref this.fachuggerRemovalFailureDeathChance, "fachuggerRemovalFailureDeathChance", 0.35f); Scribe_Values.Look <float>(ref this.embryoRemovalFailureDeathChance, "embryoRemovalFailureDeathChance", 0.35f); Scribe_Collections.Look <string, bool>(ref this.RaceKeyPairs, "RaceKeyPairs" /*, LookMode.Def, LookMode.Value, ref RaceKeyWorkingList, ref RaceValueWorkingList*/); /* * Scribe_Collections.Look(ref this.RaceKeyWorkingList, "RaceKeyPairs", LookMode.Def, new object[0]); * Scribe_Collections.Look(ref this.RaceValueWorkingList, "RaceKeyPairs", LookMode.Value); */ }
public void ExposeData() { if (savePawnsWithReferenceMode && Scribe.mode == LoadSaveMode.Saving) { tmpThings.Clear(); tmpThings.AddRange(innerContainer); tmpSavedPawns.Clear(); for (int i = 0; i < tmpThings.Count; i++) { Pawn pawn = tmpThings[i] as Pawn; if (pawn != null) { innerContainer.Remove(pawn); tmpSavedPawns.Add(pawn); } } tmpThings.Clear(); } Scribe_Values.Look(ref savePawnsWithReferenceMode, "savePawnsWithReferenceMode", defaultValue: false); if (savePawnsWithReferenceMode) { Scribe_Collections.Look(ref tmpSavedPawns, "tmpSavedPawns", LookMode.Reference); } Scribe_Deep.Look(ref innerContainer, "innerContainer", this); Scribe_Values.Look(ref openDelay, "openDelay", 110); Scribe_Values.Look(ref leaveSlag, "leaveSlag", defaultValue: false); Scribe_Values.Look(ref spawnWipeMode, "spawnWipeMode"); Scribe_Values.Look(ref despawnPodBeforeSpawningThing, "despawnPodBeforeSpawningThing", defaultValue: false); Scribe_Values.Look(ref setRotation, "setRotation"); Scribe_Values.Look(ref moveItemsAsideBeforeSpawning, "moveItemsAsideBeforeSpawning", defaultValue: false); if (savePawnsWithReferenceMode && (Scribe.mode == LoadSaveMode.PostLoadInit || Scribe.mode == LoadSaveMode.Saving)) { for (int j = 0; j < tmpSavedPawns.Count; j++) { innerContainer.TryAdd(tmpSavedPawns[j]); } tmpSavedPawns.Clear(); } }
public static void Postfix(StorageSettings __instance) { // The clipboard StorageSettings has no owner, so assume a null is the clipboard... string label = __instance?.owner?.ToString() ?? "___clipboard"; KSLog.Message("[KanbanStockpile] ExposeData() with owner name: " + label); KanbanSettings ks = State.Get(label); if (Scribe.mode == LoadSaveMode.Saving) { // this mode implicitly takes the value currently in srt and saves it out Scribe_Values.Look(ref ks.srt, "stackRefillThreshold", 100, true); Scribe_Values.Look(ref ks.ssl, "similarStackLimit", 0, true); } else if (Scribe.mode == LoadSaveMode.LoadingVars) { // this mode implicitly loads some other value into this instance of srt Scribe_Values.Look(ref ks.srt, "stackRefillThreshold", 100, false); Scribe_Values.Look(ref ks.ssl, "similarStackLimit", 0, false); State.Set(label, ks); } }
public virtual void ExposeData() { Scribe_Defs.Look(ref def, "def"); if (Scribe.mode == LoadSaveMode.LoadingVars) { InitializeComps(); } Scribe_Values.Look(ref ID, "ID", -1); Scribe_Values.Look(ref tileInt, "tile", -1); Scribe_References.Look(ref factionInt, "faction"); Scribe_Values.Look(ref creationGameTicks, "creationGameTicks", 0); Scribe_Collections.Look(ref questTags, "questTags", LookMode.Value); Scribe_Values.Look(ref destroyed, "destroyed", defaultValue: false); if (Scribe.mode != LoadSaveMode.Saving) { Scribe_Deep.Look(ref rewards, "rewards"); } for (int i = 0; i < comps.Count; i++) { comps[i].PostExposeData(); } }
public override void ExposeData() { Scribe_Values.Look(ref username, "username"); Scribe_Values.Look(ref showCursors, "showCursors", true); Scribe_Values.Look(ref autoAcceptSteam, "autoAcceptSteam"); Scribe_Values.Look(ref transparentChat, "transparentChat"); Scribe_Values.Look(ref autosaveSlots, "autosaveSlots", 5); Scribe_Values.Look(ref aggressiveTicking, "aggressiveTicking", true); Scribe_Values.Look(ref syncModConfigs, "syncModConfigs", true); Scribe_Values.Look(ref showDevInfo, "showDevInfo"); Scribe_Values.Look(ref desyncTracesRadius, "desyncTracesRadius", 40); Scribe_Values.Look(ref serverAddress, "serverAddress", "127.0.0.1"); Scribe_Values.Look(ref pauseAutosaveCounter, "pauseAutosaveCounter", true); Scribe_Values.Look(ref showModCompatibility, "showModCompatibility", true); Scribe_Deep.Look(ref serverSettings, "serverSettings"); if (serverSettings == null) { serverSettings = new ServerSettings(); } }
public void ExposeData() { if (Scribe.mode == LoadSaveMode.LoadingVars || Scribe.mode == LoadSaveMode.Saving) { Scribe_Values.Look <string>(ref id, "id", null); SettingsProperties properties = SettingsStorage.getSettingsProperties(getId()); if (Scribe.mode == LoadSaveMode.Saving) { OnBeforeSerialize(); foreach (SettingsFieldProperties p in properties.fields) { ISettingsField field; if (fields.TryGetValue(p.id, out field)) { field.OnBeforeSerialize(p); } } } OnSerialize(); foreach (SettingsFieldProperties p in properties.fields) { ISettingsField field; if (fields.TryGetValue(p.id, out field)) { field.ExposeData(p); } } if (Scribe.mode != LoadSaveMode.Saving) { OnAfterDeserialize(); foreach (SettingsFieldProperties p in properties.fields) { ISettingsField field; if (fields.TryGetValue(p.id, out field)) { field.OnAfterDeserialize(p); } } } } }
public override void ExposeData() { base.ExposeData(); Scribe_Values.Look(ref DisplayFood, "DisplayFood"); Scribe_Values.Look(ref DisplayRest, "DisplayRest"); Scribe_Values.Look(ref DisplayHealth, "DisplayHealth"); Scribe_Values.Look(ref DisplayWeapons, "DisplayWeapons"); Scribe_Values.Look(ref DisplayColorBars, "DisplayColorBars"); Scribe_Values.Look(ref DisplayBreakRiskOverlay, "DisplayBreakRiskOverlay"); Scribe_Values.Look(ref HidePawnsWhenOffMap, "HidePawnsWhenOffMap"); Scribe_Values.Look(ref HideGroups, "HideGroups"); Scribe_Values.Look(ref HideCreateGroup, "HideCreateGroup"); Scribe_Values.Look(ref DisableLabelBackground, "DisableLabelBackground"); Scribe_Values.Look(ref WeaponPlacementOffset, "WeaponPlacementOffset", 10); Scribe_Values.Look(ref ColonistBarPositionY, "MarginTop", 21f); Scribe_Values.Look(ref ColonistBarPositionX, "ColonistBarPositionX", 24f); Scribe_Values.Look(ref ColonistBarSpacing, "ColonistBarSpacing", 20f); Scribe_Values.Look(ref ColonyGroupScale, "ColonyGroupScale", 1f); Scribe_Values.Look(ref GroupScale, "GroupScale", 1f); Scribe_Values.Look(ref GroupRowCount, "GroupRowCount", 4); Scribe_Values.Look(ref PawnNeedsWidth, "PawnNeedsWidth", 4f); //Scribe_Values.Look(ref OverallPawnIconScale, "OverallPawnIconScale", 1f); //Scribe_Values.Look(ref PawnScale, "PawnScale", 1f); //Scribe_Values.Look(ref PawnBoxScale, "PawnBoxScale", 1f); Scribe_Values.Look(ref XPawnIconOffset, "XPawnIconOffset", 0f); Scribe_Values.Look(ref YPawnIconOffset, "YPawnIconOffset", 0f); Scribe_Values.Look(ref PawnBoxHeight, "PawnBoxHeight", 48f); Scribe_Values.Look(ref PawnBoxWidth, "PawnBoxWidth", 48f); Scribe_Values.Look(ref PawnCameraOffsetX, "PawnCameraOffsetX", 0f); Scribe_Values.Look(ref PawnCameraOffsetZ, "PawnCameraOffsetZ", 0.3f); Scribe_Values.Look(ref PawnScale, "PawnScale", 1f); Scribe_Values.Look(ref ColorBarMode, "ColorBarMode", ColorBarMode.Default); Scribe_Values.Look(ref WeaponShowMode, "WeaponShowMode", WeaponShowMode.Drafted); Scribe_Collections.Look(ref AllGroupPresetsSaveable, "AllGroupPresetsSaveable", LookMode.Deep); }
public void ExposeData() { if (this.savePawnsWithReferenceMode && Scribe.mode == LoadSaveMode.Saving) { this.tmpThings.Clear(); this.tmpThings.AddRange(this.innerContainer); this.tmpSavedPawns.Clear(); for (int i = 0; i < this.tmpThings.Count; i++) { Pawn pawn = this.tmpThings[i] as Pawn; if (pawn != null) { this.innerContainer.Remove(pawn); this.tmpSavedPawns.Add(pawn); } } this.tmpThings.Clear(); } Scribe_Values.Look <bool>(ref this.savePawnsWithReferenceMode, "savePawnsWithReferenceMode", false, false); if (this.savePawnsWithReferenceMode) { Scribe_Collections.Look <Pawn>(ref this.tmpSavedPawns, "tmpSavedPawns", LookMode.Reference, new object[0]); } Scribe_Deep.Look <ThingOwner>(ref this.innerContainer, "innerContainer", new object[] { this }); Scribe_Values.Look <int>(ref this.openDelay, "openDelay", 110, false); Scribe_Values.Look <bool>(ref this.leaveSlag, "leaveSlag", false, false); if (this.savePawnsWithReferenceMode && (Scribe.mode == LoadSaveMode.PostLoadInit || Scribe.mode == LoadSaveMode.Saving)) { for (int j = 0; j < this.tmpSavedPawns.Count; j++) { this.innerContainer.TryAdd(this.tmpSavedPawns[j], true); } this.tmpSavedPawns.Clear(); } }
public override void ExposeData() { base.ExposeData(); var wasColonist = wasMapPawnBefore; Scribe_Values.Look(ref state, "zstate"); Scribe_Values.Look(ref raging, "raging"); Scribe_Values.Look(ref wanderDestination, "wanderDestination"); Scribe_Values.Look(ref rubbleTicks, "rubbleTicks"); Scribe_Values.Look(ref rubbleCounter, "rubbleCounter"); Scribe_Collections.Look(ref rubbles, "rubbles", LookMode.Deep); Scribe_Values.Look(ref wasColonist, "wasColonist"); Scribe_Values.Look(ref wasMapPawnBefore, "wasMapPawnBefore"); Scribe_Values.Look(ref bombWillGoOff, "bombWillGoOff"); Scribe_Values.Look(ref bombTickingInterval, "bombTickingInterval"); Scribe_Values.Look(ref isToxicSplasher, "toxicSplasher"); Scribe_Values.Look(ref isMiner, "isMiner"); Scribe_Values.Look(ref hasTankyShield, "tankyShield"); Scribe_Values.Look(ref hasTankyHelmet, "tankyHelmet"); Scribe_Values.Look(ref hasTankySuit, "tankySuit"); Scribe_Values.Look(ref healCounter, "healCounter"); wasMapPawnBefore |= wasColonist; if (Scribe.mode == LoadSaveMode.PostLoadInit) { UpgradeOldZombieData(); ZombieGenerator.FixGlowingEyeOffset(this); if (ZombieSettings.Values.useCustomTextures) { needsGraphics = true; // make custom textures in renderer } } if (Scribe.mode == LoadSaveMode.ResolvingCrossRefs) { var idx = ageTracker.CurLifeStageIndex; // trigger calculations } }
public override void ExposeData() { base.ExposeData(); //Basic. Scribe_Values.Look(ref sourceName, "sourceName"); Scribe_Defs.Look(ref pawnKindDef, "pawnKindDef"); Scribe_Values.Look(ref gender, "gender"); //Humanoid only. Scribe_Defs.Look(ref bodyType, "bodyType"); Scribe_Values.Look(ref crownType, "crownType"); Scribe_Values.Look(ref hairColor, "hairColor"); Scribe_Values.Look(ref skinMelanin, "skinMelanin"); Scribe_Collections.Look(ref traits, "traits", LookMode.Deep); //Alien Compat. Scribe_Values.Look(ref isAlien, "isAlien"); Scribe_Values.Look(ref skinColor, "skinColor"); Scribe_Values.Look(ref skinColorSecond, "skinColorSecond"); Scribe_Values.Look(ref hairColorSecond, "hairColorSecond"); Scribe_Values.Look(ref crownTypeAlien, "crownTypeAlien"); }
public override void ExposeData() { base.ExposeData(); Scribe_Values.Look(ref UpdateFrequency, nameof(UpdateFrequency), 24); Scribe_Values.Look(ref UsePawnLearningRateThresholds, nameof(UsePawnLearningRateThresholds)); Scribe_Values.Look(ref MajorLearningRateThreshold, nameof(MajorLearningRateThreshold), 1.2f); Scribe_Values.Look(ref MinorLearningRateThreshold, nameof(MinorLearningRateThreshold), 0.8f); Scribe_Values.Look(ref UseDedicatedWorkers, nameof(UseDedicatedWorkers), true); Scribe_Values.Look(ref SpecialRulesForDoctors, nameof(SpecialRulesForDoctors), true); Scribe_Values.Look(ref AssignMultipleDoctors, nameof(AssignMultipleDoctors), true); Scribe_Values.Look(ref CountDownedColonists, nameof(CountDownedColonists), true); Scribe_Values.Look(ref CountDownedGuests, nameof(CountDownedGuests), true); Scribe_Values.Look(ref CountDownedPrisoners, nameof(CountDownedPrisoners), true); Scribe_Values.Look(ref CountDownedAnimals, nameof(CountDownedAnimals), true); Scribe_Values.Look(ref RecoveringPawnsUnfitForWork, nameof(RecoveringPawnsUnfitForWork), true); Scribe_Values.Look(ref SpecialRulesForHunters, nameof(SpecialRulesForHunters), true); Scribe_Values.Look(ref AllowMeleeHunters, nameof(AllowMeleeHunters)); Scribe_Values.Look(ref AssignAllWorkTypes, nameof(AssignAllWorkTypes)); Scribe_Values.Look(ref AssignWorkToIdlePawns, nameof(AssignWorkToIdlePawns), true); Scribe_Values.Look(ref VerboseLogging, nameof(VerboseLogging)); Scribe_Collections.Look(ref AssignEveryoneWorkTypes, nameof(AssignEveryoneWorkTypes), LookMode.Deep); Scribe_Values.Look(ref ManageWorkSchedule, nameof(ManageWorkSchedule), true); }