Ejemplo n.º 1
0
    //public int ExcessResidents { get { return Residents - residentsMax; } }

    public override void Load(ObjSave o)
    {
        base.Load(o);

        HouseSave h = (HouseSave)o;

        Hygiene           = h.Hygiene;
        Savings           = h.Savings;
        Corpses           = h.Corpses;
        DiseasedResidents = h.DiseasedResidents;

        //thirst
        Thirst           = h.Thirst;
        WaterQualCurrent = h.WaterQualCurrent;

        //hunger
        Hunger          = h.Hunger;
        FoodQualCurrent = h.FoodQualCurrent;

        Goods = h.Goods;

        VenueAccess = h.VenueAccess.GetDictionary();
        Culture     = h.Culture;

        Residents = h.Residents;
    }
Ejemplo n.º 2
0
    public override void Load(ObjSave o)
    {
        base.Load(o);
        JobcentreSave j = (JobcentreSave)o;

        Prospects = j.Prospects;
    }
Ejemplo n.º 3
0
    public override void Load(ObjSave o)
    {
        base.Load(o);

        WalkerSave w = (WalkerSave)o;

        //retrieve origin and destination structures
        if (w.origin != null)
        {
            Origin = GameObject.Find(world.Map.GetBuildingNameAt(w.origin)).GetComponent <Structure>();
        }
        if (w.destination != null)
        {
            Destination = GameObject.Find(world.Map.GetBuildingNameAt(w.destination)).GetComponent <Structure>();
        }

        Stuck         = w.stuck;
        ReturningHome = w.returningHome;

        Prevx       = w.prevx;
        Prevy       = w.prevy;
        LaborPoints = w.laborPoints;

        MovementDistance = w.movementDistance;

        Path         = w.path;
        VisitedSpots = w.visitedSpots;
        Direction    = w.direction.GetVector3();
        Order        = w.order;
    }
Ejemplo n.º 4
0
    public override void Load(ObjSave o)
    {
        base.Load(o);

        FactorySave f = (FactorySave)o;

        IngredientAmount = f.ingredientAmount;
    }
Ejemplo n.º 5
0
    public override void Load(ObjSave o)
    {
        base.Load(o);

        StableSave s = (StableSave)o;

        Spawned = s.spawned;
    }
Ejemplo n.º 6
0
    public override void Load(ObjSave o)
    {
        base.Load(o);

        CanalSave c = (CanalSave)o;

        WaterAccess = c.WaterAccess;
    }
Ejemplo n.º 7
0
    public override void Load(ObjSave o)
    {
        base.Load(o);

        WTPSave w = (WTPSave)o;

        WaterFill = w.WaterFill;
    }
Ejemplo n.º 8
0
    public override void Load(ObjSave o)
    {
        base.Load(o);

        VenderSave v = (VenderSave)o;

        FoodDemand = v.FoodDemand;
    }
Ejemplo n.º 9
0
    public override void Load(ObjSave o)
    {
        base.Load(o);

        FarmhouseSave f = (FarmhouseSave)o;

        CurrentlyStoring = f.CurrentlyStoring;
        Yield            = f.Yield;
    }
Ejemplo n.º 10
0
    public override void Load(ObjSave o)
    {
        base.Load(o);

        MarketSave m = (MarketSave)o;

        Food  = m.Food;
        Goods = m.Goods;
    }
Ejemplo n.º 11
0
    public override void Load(ObjSave o)
    {
        base.Load(o);

        GeneratorSave g = (GeneratorSave)o;

        TimeToProduce = g.timeToProduce;
        SetProduct();
        Producing = g.producing;
    }
Ejemplo n.º 12
0
    public override void Load(ObjSave o)
    {
        base.Load(o);

        BaseDaysToGrow = ResourcesDatabase.GetBaseDays(cropType);

        CropSave c = (CropSave)o;

        GrowTimer = c.GrowTimer;
        JoinProductivityList(cropType);
    }
Ejemplo n.º 13
0
    public override void Load(ObjSave o)
    {
        base.Load(o);

        StorageBuildingSave s = (StorageBuildingSave)o;

        Inventory  = s.inventory;
        Queue      = s.queue;
        WillAccept = s.willAccept;
        WillGet    = s.willGet;
    }
Ejemplo n.º 14
0
    public override void Load(ObjSave o)
    {
        base.Load(o);

        AnimalSave a = (AnimalSave)o;

        WalkTime    = a.walkTime;
        walkTimeMax = a.walkTimeMax;
        restTimeMax = a.restTime;
        restTimeMax = a.restTimeMax;
        yield       = a.yield;
    }
Ejemplo n.º 15
0
    public virtual void Load(ObjSave o)
    {
        transform.position    = o.position.GetVector3();
        transform.eulerAngles = o.rotation.GetVector3();

        LoadControllers();

        X          = (int)o.location.X;
        Y          = (int)o.location.Y;
        tag        = o.tag;
        name       = o.name;
        rightclick = o.rightclick;
    }
Ejemplo n.º 16
0
    public GameObject LoadMapObject(ObjSave save)
    {
        //load object
        GameObject go = Instantiate(Resources.Load <GameObject>(save.resourcePath));

        //activate object
        Obj o = go.GetComponent <Obj>();

        o.world = this;
        o.Load(save);

        return(go);
    }
Ejemplo n.º 17
0
    public override void Load(ObjSave o)
    {
        base.Load(o);

        //LOAD MACHINERY BEFORE INGREDIENTS
        LoadMachinery();
        LoadIngredients();

        GeneratorSave g = (GeneratorSave)o;

        Producing         = g.Producing;
        ByproductsMade    = g.ByproductsMade;
        Deterioration     = g.Deterioration;
        IngredientsStored = g.IngredientAmount;
        JoinProductivityLists();
    }
Ejemplo n.º 18
0
    public override void Load(ObjSave o)
    {
        base.Load(o);

        WalkerSave w = (WalkerSave)o;

        //retrieve origin and destination structures
        if (w.origin != null)
        {
            Origin = GameObject.Find(world.Map.GetBuildingNameAt(w.origin)).GetComponent <Structure>();
        }
        if (w.destination != null)
        {
            Destination = GameObject.Find(world.Map.GetBuildingNameAt(w.destination)).GetComponent <Structure>();
        }

        Stuck           = w.stuck;
        SpawnedFollower = w.SpawnedFollower;
        GoingOnRamp     = w.GoingOnRamp;

        Prevx       = w.prevx;
        Prevy       = w.prevy;
        LaborPoints = w.laborPoints;
        lifeTime    = w.lifeTime;
        yield       = w.yield;

        MovementDistance = w.movementDistance;

        Path         = w.path;
        VisitedSpots = w.visitedSpots;
        Direction    = w.direction;
        Order        = w.order;

        data       = w.data;
        PersonData = w.PersonData;

        Skin = PersonData != null?PersonData.skinColor.GetColor() : GetSkinColor();

        if (meshRenderer != null)
        {
            meshRenderer.material.color = Skin;
        }

        LoadFollower(w.follower);

        world.EnterSquare(this, X, Y);
    }
Ejemplo n.º 19
0
    public virtual void Load(ObjSave o)
    {
        transform.position    = o.position.GetVector3();
        transform.eulerAngles = o.rotation.GetVector3();

        LoadControllers();

        X    = o.location.x;
        Y    = o.location.y;
        tag  = o.tag;
        name = o.name;
        //rightclick = o.rightclick;

        if (randomModel != null)
        {
            randomModel.LoadModel(o.model_num, o.model_rot);
        }
    }
Ejemplo n.º 20
0
    public override void Load(ObjSave o)
    {
        base.Load(o);

        //load vars for workplaces
        WorkplaceSave w = (WorkplaceSave)o;

        Workers           = w.workers;
        TimeToSpawnWalker = w.timeToSpawnWalker;
        Access            = w.access;
        Yield             = w.yield;

        ActiveStaff    = w.activeStaff;
        ClosedByPlayer = w.closedByPlayer;

        ActiveSchedule = w.activeSchedule;

        //add workers back to laborcontroller
        ToggleLabor(ActiveStaff);
    }
Ejemplo n.º 21
0
    public override void Load(ObjSave o)
    {
        base.Load(o);

        StructureSave s = (StructureSave)o;

        Sizex         = s.sizex;
        Sizey         = s.sizey;
        Days          = s.days;
        Weeks         = s.weeks;
        FireCount     = s.fireCount;
        CollapseCount = s.collapseCount;
        BurnCount     = s.burnCount;

        ActiveRandomWalker  = s.activeRandomWalker;
        ActiveCarryerWalker = s.activeCarryerWalker;
        ActiveImmigrant     = s.activeImmigrant;
        OnFire = s.OnFire;

        world.Map.RenameArea(name, X, Y, Sizex, Sizey);
    }
Ejemplo n.º 22
0
    public override void Load(ObjSave o)
    {
        base.Load(o);

        HouseSave h = (HouseSave)o;

        Residents  = h.Residents;
        HouseSize  = h.HouseSize;
        Prosperity = h.Prosperity;

        Water     = h.Water;
        WaterQual = h.WaterQual;

        Food = h.Food;

        Goods = h.Goods;

        VenueAccess = h.VenueAccess.GetDictionary();
        Culture     = h.Culture;

        Faith = h.Faith.GetDictionary();
    }
Ejemplo n.º 23
0
    public override void Load(ObjSave o)
    {
        base.Load(o);

        StructureSave s = (StructureSave)o;

        Sizex        = s.sizex;
        Sizey        = s.sizey;
        Days         = s.days;
        Weeks        = s.weeks;
        Months       = s.months;
        FireRisk     = s.FireRisk;
        CollapseRisk = s.CollapseRisk;
        AmountStored = s.AmountStored;

        ActiveRandomWalker = s.activeRandomWalker;
        ActiveSmartWalker  = s.activeSmartWalker;

        world.Map.RenameArea(name, X, Y, Sizex, Sizey);

        collapseRiskMax = (int)(collapseRiskMax * Difficulty.GetModifier());
        fireRiskMax     = (int)(fireRiskMax * Difficulty.GetModifier());
    }
Ejemplo n.º 24
0
    public override void Load(ObjSave o)
    {
        base.Load(o);

        //load vars for workplaces
        WorkplaceSave w = (WorkplaceSave)o;

        TimeToSpawnWalker = w.timeToSpawnWalker;
        Access            = w.access;
        WorkingDay        = w.workingDay;

        ActiveBuilding = w.activeBuilding;
        ClosedByPlayer = w.closedByPlayer;

        ActiveSchedule = w.activeSchedule;

        //add workers back to laborcontroller
        ToggleLabor(ActiveBuilding);
        WorkerList = w.WorkerList;
        WorkerSave = w.WorkerSave;

        //labor.AddWorkplace(this);
    }