public ChargeableItem(ChargeableItemBuilder builder, ItemConfiguration config) : base(builder.Kind()) { _builder = builder; Configuration = config; _chargeModels = new Dictionary <int, ItemConfiguration>(); ItemPower = new Power(UpdateModel); if (HasToolComponent(Configuration.Components)) { var component = Configuration.Components.Select <ChargeableComponent>().First(); ItemPower = Power.GetTilePowerFromBlob(component.GetBlob(), UpdateModel); DescriptionCode = component.DescriptionCode; var chargeModels = component.ChargeModels; var configs = GameContext.ItemDatabase.GetConfigsByKind(_builder.Kind()).ToList(); foreach (var model in chargeModels) { if (configs.Any(x => x.Value.Code == model.Value)) { _chargeModels.Add(model.Key, configs.First(x => x.Value.Code == model.Value).Value); } } } }
public CableDrillItem(ChargeableItemBuilder builder, ItemConfiguration config) : base(builder, config) { }
public CapacitorItem(ChargeableItemBuilder builder, ItemConfiguration config) : base(builder, config) { }