Exemplo n.º 1
0
 public override void ExposeData()
 {
     base.ExposeData();
     Scribe_Values.LookValue <int>(ref this.nextFleetID, "nextFleetID");
     Scribe_Collections.LookDictionary <int, string>(ref this.PlayerFleetManager, "PlayerFleetManager", LookMode.Value, LookMode.Value);
     Scribe_Collections.LookList <ShipBase>(ref this.AllWorldShips, "AllWorldShips", LookMode.Reference, new object[0]);
 }
Exemplo n.º 2
0
 public void ExposeData()
 {
     Scribe_Collections.LookDictionary <ThingDef, int>(ref this.acquiredMats, "acquiredMats", LookMode.DefReference, LookMode.Value);
     Scribe_Collections.LookList(ref this.requiredMaterials, "requiredMaterials", LookMode.Deep);
     Scribe_Values.LookValue(ref this.hasMats, "hasMats");
     Scribe_Values.LookValue(ref this.instaBuild, "instaBuild");
 }
 public override void ExposeData()
 {
     Scribe_Collections.LookDictionary(ref bribeCount, "bribeCount", LookMode.Value, LookMode.Value);
     Scribe_Values.LookValue(ref defaultInteractionMode, "defaultInteractionMode", PrisonerInteractionMode.NoInteraction);
     Scribe_Values.LookValue(ref lastEventKey, "lastEventKey", 0);
     Scribe_Collections.LookList(ref eventQueue, "eventQueue", LookMode.Deep);
 }
Exemplo n.º 4
0
 public override void ExposeData()
 {
     Scribe_Values.LookValue(ref point, "point", default(IntVec3));
     Scribe_Values.LookValue(ref radius, "radius", 45f);
     Scribe_Collections.LookDictionary(ref visitorMoods, "visitorMoods");
     Scribe_References.LookReference(ref visitorFlag, "flag");
 }
Exemplo n.º 5
0
 public override void ExposeData()
 {
     base.ExposeData();
     Scribe_Values.LookValue <bool>(ref this.forcedEnd, "forcedEnd");
     Scribe_Values.LookValue <int>(ref this.originalDuration, "originalDuration");
     Scribe_Collections.LookList <Pawn>(ref this.visitors, "visitors", LookMode.MapReference, new object[0]);
     Scribe_Collections.LookDictionary <int, PawnVisitInfo>(ref this.visitInfoMap, "visitInfoMap", LookMode.Value, LookMode.Deep);
 }
Exemplo n.º 6
0
 public override void ExposeData()
 {
     if (Scribe.mode == LoadSaveMode.Saving)
     {
         this.assignedHives.RemoveAll((KeyValuePair <Pawn, WombBetweenWorlds> x) => x.Key.Destroyed);
     }
     Scribe_Collections.LookDictionary <Pawn, WombBetweenWorlds>(ref this.assignedHives, "assignedHives", LookMode.MapReference, LookMode.MapReference);
     if (Scribe.mode == LoadSaveMode.PostLoadInit)
     {
         this.assignedHives.RemoveAll((KeyValuePair <Pawn, WombBetweenWorlds> x) => x.Value == null);
     }
 }
        public override void ExposeData()
        {
            // scribe base things
            base.ExposeData();

            // settings, references first!
            Scribe_References.LookReference(ref LoggingArea, "LoggingArea");
            Scribe_Deep.LookDeep(ref Trigger, "trigger", manager);
            Scribe_Collections.LookDictionary(ref AllowedTrees, "AllowedTrees", LookMode.Def, LookMode.Value);
            Scribe_Values.LookValue(ref AllowSaplings, "AllowSaplings", false);
            Scribe_Values.LookValue(ref ClearWindCells, "ClearWindCells", true);

            // clearing areas list
            if (Scribe.mode == LoadSaveMode.Saving)
            {
                // make sure areas list doesn't contain deleted areas
                UpdateClearAreas();

                // create scribe helper vars
                _clearAreas_areas   = new List <Area>(ClearAreas.Keys);
                _clearAreas_allowed = new List <bool>(ClearAreas.Values);
            }

            // scribe that stuff
            // TODO: Verify LookMode Ref
            Scribe_Collections.LookList(ref _clearAreas_areas, "ClearAreas_areas", LookMode.Reference);
            Scribe_Collections.LookList(ref _clearAreas_allowed, "ClearAreas_allowed", LookMode.Value);

            // initialize areas dict from scribe helpers
            if (Scribe.mode == LoadSaveMode.PostLoadInit)
            {
                ClearAreas = new Dictionary <Area, bool>();
                for (var i = 0; i < _clearAreas_areas.Count; i++)
                {
                    if (_clearAreas_areas[i] != null)
                    {
                        ClearAreas.Add(_clearAreas_areas[i], _clearAreas_allowed[i]);
                    }
                }
            }

            if (Manager.LoadSaveMode == Manager.Modes.Normal)
            {
                // scribe history
                Scribe_Deep.LookDeep(ref History, "History");
            }
        }
        public override void ExposeData()
        {
            // scribe base things
            base.ExposeData();

            // settings, references first!
            Scribe_References.LookReference(ref ForagingArea, "ForagingArea");
            Scribe_Deep.LookDeep(ref Trigger, "trigger", manager);
            Scribe_Collections.LookDictionary(ref AllowedPlants, "AllowedPlants", LookMode.Def, LookMode.Value);
            Scribe_Values.LookValue(ref ForceFullyMature, "ForceFullyMature", false);

            if (Manager.LoadSaveMode == Manager.Modes.Normal)
            {
                // scribe history
                Scribe_Deep.LookDeep(ref History, "History");
            }
        }
        public override void                ExposeData()
        {
            //Log.Message( string.Format( "Building_AutomatedFactory.ExposeData( {0} )", Scribe.mode.ToString() ) );
            // Scribe base data
            base.ExposeData();

            string recipe = string.Empty;

            if (Scribe.mode == LoadSaveMode.Saving)
            {
                if (currentRecipe != null)
                {
                    recipe = currentRecipe.defName;
                }
                foreach (var entry in productionAllowances)
                {
                    if (!recipeAllowances.ContainsKey(entry.Value.recipe))
                    {
                        recipeAllowances.Add(entry.Value.recipe, entry.Value.allowed);
                    }
                }
            }

            // Scribe data
            Scribe_Values.LookValue <string>(ref recipe, "currentRecipe", string.Empty);
            Scribe_Values.LookValue <int>(ref currentProductionTick, "currentProductionTick", 0);
            Scribe_Collections.LookDictionary <RecipeDef, bool>(ref recipeAllowances, "productionAllowances", LookMode.DefReference, LookMode.Value);
            Scribe_Deep.LookDeep <Thing>(ref currentThing, "currentThing", null);

            // Resolve cross-references
            if (Scribe.mode == LoadSaveMode.ResolvingCrossRefs)
            {
                if (!recipe.NullOrEmpty())
                {
                    currentRecipe = DefDatabase <RecipeDef> .GetNamed(recipe, true);
                }
                foreach (var pair in recipeAllowances)
                {
                    var key = pair.Key.products[0].thingDef;
                    SetAllowed(pair.Key, pair.Value);
                }
                //ResetAndReprogramHoppers();
                currentRecipeCount = this.def.AllRecipes.Count;
            }
        }
Exemplo n.º 10
0
        public override void ExposeData()
        {
            base.ExposeData();
            Scribe_Values.LookValue <bool>(ref this.FirstSpawned, "FirstSpawned", false, false);
            Scribe_Values.LookValue <bool>(ref this.ActivatedLaunchSequence, "ActivatedLaunchSequence", false, false);
            Scribe_Values.LookValue <bool>(ref this.ShouldWait, "ShouldWait", false, false);
            Scribe_Values.LookValue <bool>(ref this.NoneLeftBehind, "NoneLeftBehind", false, false);
            Scribe_Values.LookValue <bool>(ref this.keepShipReference, "keepShipReference", false, false);
            Scribe_Values.LookValue <string>(ref this.ShipNick, "ShipNick", "Ship", false);
            Scribe_Values.LookValue <ShipState>(ref this.shipState, "shipState", ShipState.Stationary, false);

            Scribe_Values.LookValue <int>(ref this.timeToLiftoff, "timeToLiftoff", 200, false);
            Scribe_Values.LookValue <int>(ref this.drawTickOffset, "drawTickOffset", 0, false);
            Scribe_Values.LookValue <int>(ref this.timeWaited, "timeWaited", 200, false);


            Scribe_Values.LookValue <bool>(ref this.DeepsaveTurrets, "DeepsaveTurrets", false, false);
            if (this.DeepsaveTurrets)
            {
                Scribe_Collections.LookList <Building_ShipTurret>(ref this.assignedTurrets, "assignedTurrets", LookMode.Deep, new object[0]);
            }
            else
            {
                Scribe_Collections.LookList <Building_ShipTurret>(ref this.assignedTurrets, "assignedTurrets", LookMode.Reference, new object[0]);
            }


            Scribe_Collections.LookList <WeaponSystemShipBomb>(ref this.loadedBombs, "loadedBombs", LookMode.Reference, new object[0]);
            if (this.assignedSystemsToModify.Count > 0)
            {
                Scribe_Collections.LookDictionary <WeaponSystem, bool>(ref this.assignedSystemsToModify, "assignedSystemsToModify", LookMode.Reference, LookMode.Value);
            }

            Scribe_Collections.LookList <Pawn>(ref this.worldPawns, "worldPawns", LookMode.Reference, new object[0]);
            Scribe_Deep.LookDeep <ThingContainer>(ref this.innerContainer, "innerContainer", new object[]
            {
                this
            });

            if (Scribe.mode == LoadSaveMode.PostLoadInit)
            {
                this.InitiateInstalledTurrets();
            }
        }
        public override void ExposeData()
        {
            base.ExposeData();

            Scribe_Collections.LookDictionary <Pawn, Policy>(ref AssignedPolicies, "WMSFS_PawnFoodPolicies", LookMode.Reference, LookMode.Def, ref keysList, ref valuesList);

            if (Scribe.mode == LoadSaveMode.PostLoadInit)
            {
                foreach (var item in AssignedPolicies.ToList())
                {
                    // policy defname missing ? reset policy
                    if (item.Value == null || item.Key == null || item.Key.Dead || !item.Key.CanHaveFoodPolicy() || item.Key.HasHardcodedPolicy())
                    {
                        AssignedPolicies.Remove(item.Key);

                        Log.Warning(item.Key + " had a wrong assigned policy. Reseting. Did you remove its policy from Defs ?");
                    }
                }
            }
        }
Exemplo n.º 12
0
        public override void ExposeData()
        {
            // scribe base things
            base.ExposeData();

            // references first, because of the stupid bug in CrossRefResolver.
            Scribe_References.LookReference(ref HuntingGrounds, "HuntingGrounds");

            // must be after references, because reasons.
            Scribe_Deep.LookDeep(ref Trigger, "trigger", manager);

            // settings, human meat is stored in the trigger's thingfilter.
            Scribe_Collections.LookDictionary(ref AllowedAnimals, "AllowedAnimals", LookMode.Def, LookMode.Value);
            Scribe_Values.LookValue(ref UnforbidCorpses, "UnforbidCorpses", true);

            // don't store history in import/export mode.
            if (Manager.LoadSaveMode == Manager.Modes.Normal)
            {
                Scribe_Deep.LookDeep(ref History, "History");
            }
        }
Exemplo n.º 13
0
 public void ExposeData()
 {
     Scribe_Collections.LookDictionary <PsykerPowerLevel, int>(ref this.PowerLevelSlots, "PowerLevelSlots", LookMode.Value, LookMode.Value);
     Scribe_Values.LookValue <CompPsyker>(ref this.compPsyker, "compPsyker", null);
 }
 public void ExposeData()
 {
     Scribe_Collections.LookDictionary <ThingDef, int>(ref this.ReadableProgressEntry, "ReadableProgressEntry", LookMode.Def, LookMode.Value);
 }
Exemplo n.º 15
0
 public override void ExposeData()
 {
     base.ExposeData();
     Scribe_Collections.LookDictionary(ref CountTargets, "Targets", LookMode.Value, LookMode.Value);
     Scribe_Defs.LookDef(ref pawnKind, "PawnKind");
 }
Exemplo n.º 16
0
 public override void ExposeData()
 {
     Scribe_Collections.LookDictionary(ref previousPawnWeapons, "previousPawnWeapons", LookMode.MapReference, LookMode.MapReference);
     Scribe_Collections.LookDictionary(ref currentVehicle, "currentVehicle", LookMode.MapReference, LookMode.MapReference);
     Scribe_Collections.LookList(ref AutoInventory, "AutoInventory", LookMode.DefReference);
 }
 public void ExposeData()
 {
     Scribe_Values.LookValue <int>(ref this.kinseyRating, "kinseyRating", 0, false);
     Scribe_Collections.LookDictionary <Pawn, int>(ref this.knownSexualities, "knownSexualities", LookMode.Reference, LookMode.Value, ref this.knownSexualitiesWorkingKeys, ref this.knownSexualitiesWorkingValues);
 }