Exemplo n.º 1
0
        public void CalculateDerivedEffects(StaticsDB statics, PlayerProcessor playerProcessor)
        {
            var vars = calcVars(statics, playerProcessor);

            vars[MaintenancePenaltyKey] = this.MaintenancePenalty;
            var counter = new ConstructionCounterVisitor(vars);

            foreach (var construction in SpendingPlan)
            {
                if (construction.CompletedCount > 0)
                {
                    counter.Count(construction.Project, construction.CompletedCount);
                }
            }
        }
Exemplo n.º 2
0
        public void CalculateDerivedEffects(StaticsDB statics, PlayerProcessor playerProcessor)
        {
            var vars = calcVars(statics, playerProcessor);

            vars[MaintenancePenaltyKey] = this.MaintenancePenalty;
            var counter = new ConstructionCounterVisitor(vars);

            foreach (var construction in SpendingPlan)
            {
                if (construction.CompletedCount > 0)
                {
                    counter.Count(construction.Project, construction.CompletedCount);
                }
            }

            vars[MaxPopulationKey] = this.MaxPopulation;
            this.ExtraStats        = statics.ExtraColonyFormulas.ToDictionary(
                x => x.Key,
                x => x.Value.Evaluate(vars)
                );
        }