Пример #1
0
        protected sealed override void PrepareProtoItem()
        {
            var lightConfig = new ItemLightConfig();
            var fuelConfig  = new ItemFuelConfig();

            this.PrepareProtoItemLight(lightConfig, fuelConfig);
            this.ItemLightConfig = lightConfig.ToReadOnly();
            this.ItemFuelConfig  = fuelConfig.ToReadOnly();
        }
Пример #2
0
        protected override void PrepareProtoItemLight(ItemLightConfig lightConfig, ItemFuelConfig fuelConfig)
        {
            lightConfig.Color        = LightColors.OilLamp;
            lightConfig.ScreenOffset = (42, 60);
            lightConfig.Size         = 18;

            fuelConfig.FuelCapacity      = 750; // about 12.5 minutes
            fuelConfig.FuelAmountInitial = 0;
            fuelConfig.FuelUsePerSecond  = 1;
            fuelConfig.FuelProtoItemsList.AddAll <IProtoItemFuelOil>();
        }
        protected override void PrepareProtoItemEquipmentHeadWithLight(
            ItemLightConfig lightConfig,
            ItemFuelConfig fuelConfig)
        {
            lightConfig.IsLightEnabled = false;

            fuelConfig.FuelCapacity      = 1000;
            fuelConfig.FuelAmountInitial = 0;
            fuelConfig.FuelUsePerSecond  = 1;
            fuelConfig.FuelProtoItemsList.AddAll <IProtoItemFuelElectricity>();
        }
Пример #4
0
        protected override void PrepareProtoItemLight(ItemLightConfig lightConfig, ItemFuelConfig fuelConfig)
        {
            lightConfig.Color        = LightColors.Flashlight;
            lightConfig.ScreenOffset = (16, 102);
            lightConfig.Size         = 18;

            fuelConfig.FuelCapacity      = 1000; // >10 minutes
            fuelConfig.FuelAmountInitial = 0;
            fuelConfig.FuelUsePerSecond  = 1;
            fuelConfig.FuelProtoItemsList.AddAll <IProtoItemFuelElectricity>();
        }
Пример #5
0
        protected override void PrepareProtoItemLight(ItemLightConfig lightConfig, ItemFuelConfig fuelConfig)
        {
            lightConfig.Color        = LightColors.Flashlight;
            lightConfig.ScreenOffset = (3, -1);
            lightConfig.Size         = 17;

            fuelConfig.FuelTitle         = CoreStrings.TitleEnergyCharge;
            fuelConfig.FuelCapacity      = 500; // about 8.5 minutes
            fuelConfig.FuelAmountInitial = 0;
            fuelConfig.FuelUsePerSecond  = 1;
            fuelConfig.FuelProtoItemsList.AddAll <IProtoItemFuelElectricity>();
        }
Пример #6
0
        protected override void PrepareProtoItemEquipmentHeadWithLight(
            ItemLightConfig lightConfig,
            ItemFuelConfig fuelConfig)
        {
            lightConfig.Color        = LightColors.OilLamp;
            lightConfig.ScreenOffset = (20, -3);
            lightConfig.Size         = 17;

            fuelConfig.FuelCapacity      = 1000; // >10 minutes
            fuelConfig.FuelAmountInitial = 0;
            fuelConfig.FuelUsePerSecond  = 1;
            fuelConfig.FuelProtoItemsList.AddAll <IProtoItemFuelElectricity>();
        }
Пример #7
0
        protected override void PrepareProtoItemLight(ItemLightConfig lightConfig, ItemFuelConfig fuelConfig)
        {
            lightConfig.Color        = LightColors.Torch;
            lightConfig.ScreenOffset = (10, 2);
            lightConfig.Size         = 16;

            fuelConfig.FuelCustomIcon    = new TextureResource("Icons/IconFire");
            fuelConfig.FuelCapacity      = 6.5 * 60;                // 6.5 minutes
            fuelConfig.FuelAmountInitial = fuelConfig.FuelCapacity; // torch is spawned with the full fuel amount
            fuelConfig.FuelUsePerSecond  = 1;
            // fuel list is not populated - the item is spawned fully charged and destroyed when charge is 0
            //config.FuelList = ...
        }
Пример #8
0
        protected override void PrepareProtoItemEquipmentHeadWithLight(
            ItemLightConfig lightConfig,
            ItemFuelConfig fuelConfig)
        {
            lightConfig.Color        = LightColors.OilLamp;
            lightConfig.ScreenOffset = (15, 2);
            lightConfig.Size         = 16;

            fuelConfig.FuelCapacity      = 500; // about 8.5 minutes
            fuelConfig.FuelAmountInitial = 0;
            fuelConfig.FuelUsePerSecond  = 1;
            fuelConfig.FuelProtoItemsList.AddAll <IProtoItemFuelOil>();
        }
        protected sealed override void PrepareProtoItemEquipmentHead()
        {
            var lightConfig = new ItemLightConfig();
            var fuelConfig  = new ItemFuelConfig();

            this.PrepareProtoItemEquipmentHeadWithLight(lightConfig, fuelConfig);
            this.ItemLightConfig = lightConfig.ToReadOnly();
            this.ItemFuelConfig  = fuelConfig.ToReadOnly();

            if (IsClient)
            {
                ClientEquipmentHeadWithLightInputToggle.Init();
            }
        }
Пример #10
0
 protected abstract void PrepareProtoItemLight(ItemLightConfig lightConfig, ItemFuelConfig fuelConfig);
 protected abstract void PrepareProtoItemEquipmentHeadWithLight(
     ItemLightConfig lightConfig,
     ItemFuelConfig fuelConfig);