protected override void PrepareFuelConfig(
     out double fuelCapacity,
     out double fuelAmountInitial,
     out double fuelUsePerSecond,
     out IFuelItemsContainer fuelContainerPrototype)
 {
     fuelCapacity           = 2500;
     fuelAmountInitial      = 0;
     fuelUsePerSecond       = 1;
     fuelContainerPrototype = GetProtoEntity <ItemsContainerFuelElectricity>();
 }
 protected sealed override void PrepareFuelConfig(
     out double fuelCapacity,
     out double fuelAmountInitial,
     out double fuelUsePerSecond,
     out IFuelItemsContainer fuelContainerPrototype)
 {
     // don't use any fuel as this building operates on the electricity
     fuelCapacity           = 0;
     fuelAmountInitial      = 0;
     fuelUsePerSecond       = 0;
     fuelContainerPrototype = GetProtoEntity <ItemsContainerFuelElectricity>();
 }
Exemplo n.º 3
0
        private ViewModelBurningFuel(IStaticWorldObject worldObjectManufacturer, IFuelItemsContainer fuelItemsContainer)
        {
            // prepare active state property
            var manufacturerPublicState = worldObjectManufacturer.GetPublicState <ObjectManufacturerPublicState>();

            manufacturerPublicState.ClientSubscribe(_ => _.IsActive,
                                                    _ => RefreshIsManufacturerActive(),
                                                    this);
            RefreshIsManufacturerActive();

            void RefreshIsManufacturerActive()
            {
                this.IsActive = manufacturerPublicState.IsActive;
            }

            var(icon, color) = fuelItemsContainer.ClientGetFuelIconAndColor();
            this.FuelIcon    = Client.UI.GetTextureBrush(icon);
            this.FuelColor   = color;
        }
Exemplo n.º 4
0
 protected abstract void PrepareFuelConfig(
     out double fuelCapacity,
     out double fuelAmountInitial,
     out double fuelUsePerSecond,
     out IFuelItemsContainer fuelContainerPrototype);