예제 #1
0
        internal ConstructableItem(Constructable constructable, PlayerProcessor playerProcessor,
                                   ConstructionResult progress, double stockpile)
        {
            this.Constructable = constructable;
            this.Stockpile     = stockpile;
            this.vars          = new Var().UnionWith(playerProcessor.TechLevels).Get;

            if (progress != null)
            {
                this.Investment     = progress.InvestedPoints;
                this.CompletedCount = progress.CompletedCount;
                this.FromStockpile  = progress.FromStockpile;
                this.Overflow       = progress.LeftoverPoints;
            }
        }
예제 #2
0
        internal ConstructableInfo(IConstructionProject project, IDictionary <string, double> siteVars,
                                   ConstructionResult progress, double stockpile)
        {
            this.Project   = project;
            this.Stockpile = stockpile;

            this.infoExtractor = new ConstructionInfoExtractor(project);
            this.vars          = new Var().UnionWith(siteVars).Get;

            if (progress != null)
            {
                this.Investment     = progress.InvestedPoints;
                this.CompletedCount = progress.CompletedCount;
                this.FromStockpile  = progress.FromStockpile;
                this.Overflow       = progress.LeftoverPoints;
            }
        }