Esempio n. 1
0
        public GeneralRace(RaceData data)
        {
            RaceData baseData = data;

            SystemName        = baseData.Name;
            DisplayName       = baseData.DisplayName;
            ConsumptionTraits = baseData.Consumptions
                                .Select(consumption => new ConsumptionTrait(GlobalGoods.GetInstance()
                                                                            .FindByName(consumption.Goods.Name), consumption.amount));
        }
Esempio n. 2
0
        public Workplace(Database.WorkplaceData data)
        {
            Database.WorkplaceData baseData = data;

            Id          = Guid.NewGuid();
            SystemName  = baseData.Name;
            DisplayName = baseData.DisplayName;

            ProduceAbilities = baseData.Products
                               .Select(goods => new ProduceAbility(GlobalGoods.GetInstance().FindByName(goods.Goods.Name),
                                                                   goods.amount));

            ConsumptionTraits = baseData.Consumptions
                                .Select(goods => new ConsumptionTrait(GlobalGoods.GetInstance().FindByName(goods.Goods.Name),
                                                                      goods.amount));
        }
 private static void InitializeGlobals()
 {
     GlobalRaces.GetInstance().Initialize();
     GlobalGoods.GetInstance().Initialize();
 }