From 7f5a2f574bd0a79655e9086df3e1bce050fabbeb Mon Sep 17 00:00:00 2001 From: Slotterleet <62336673+Slotterleet@users.noreply.github.com> Date: Tue, 21 May 2024 19:40:50 +0300 Subject: [PATCH] Steam Turbine & Arkycite Refinery --- res/bundles/bundle.properties | 2 + res/bundles/bundle_ru.properties | 2 + ...=> arkycite-refinery-nitrogen-output1.png} | Bin ...=> arkycite-refinery-nitrogen-output2.png} | Bin ...ter.png => arkycite-refinery-nitrogen.png} | Bin ...or-bottom.png => steam-turbine-bottom.png} | Bin ...burner-generator.png => steam-turbine.png} | Bin src/fos/content/FOSBlocks.java | 60 +++++++++++------- 8 files changed, 42 insertions(+), 22 deletions(-) rename res/sprites/blocks/crafting/{arkycite-refinery-water-output1.png => arkycite-refinery-nitrogen-output1.png} (100%) rename res/sprites/blocks/crafting/{arkycite-refinery-water-output2.png => arkycite-refinery-nitrogen-output2.png} (100%) rename res/sprites/blocks/crafting/{arkycite-refinery-water.png => arkycite-refinery-nitrogen.png} (100%) rename res/sprites/blocks/power/{burner-generator-bottom.png => steam-turbine-bottom.png} (100%) rename res/sprites/blocks/power/{burner-generator.png => steam-turbine.png} (100%) diff --git a/res/bundles/bundle.properties b/res/bundles/bundle.properties index 6e4c8bc0..4d249f00 100644 --- a/res/bundles/bundle.properties +++ b/res/bundles/bundle.properties @@ -172,6 +172,8 @@ block.fos-brass-wire-pole.name = Brass Wire Pole block.fos-brass-wire-pole.description = Distributes power over terrain or buildings. Has even longer distance than the previous tier and no resistance. block.fos-wind-turbine.name = Wind Turbine block.fos-wind-turbine.description = Converts the power of wind into electricity. Produces the less power the more buildings are around it. +block.fos-steam-turbine.name = Steam Turbine +block.fos-steam-turbine.description = Generates power by burning flammable liquids and converting water to steam. block.fos-heat-generator.name = Heat Generator block.fos-heat-generator.description = Generates electricity from heat. block.fos-heat-generator.details = It is a good idea to place these blocks next to rock crushers. diff --git a/res/bundles/bundle_ru.properties b/res/bundles/bundle_ru.properties index 2d7c676a..cb8ccace 100644 --- a/res/bundles/bundle_ru.properties +++ b/res/bundles/bundle_ru.properties @@ -172,6 +172,8 @@ block.fos-brass-wire-pole.name = Латунное энергополе block.fos-brass-wire-pole.description = Передает энергию над местностью или зданиями. Имеет еще большую дальность, чем предыдущая итерация, и не имеет сопротивления. block.fos-wind-turbine.name = Ветряная турбина block.fos-wind-turbine.description = Преобразует энергию ветра в электричество. Производит тем меньше энергии, чем больше построек вокруг неё. +block.fos-steam-turbine.name = Паровая турбина +block.fos-steam-turbine.description = Вырабатывает энергию путем сжигания горючих жидкостей и преобразования воды в пар. block.fos-heat-generator.name = Тепловой генератор block.fos-heat-generator.description = Генерирует электричество с помощью тепла. block.fos-heat-generator.details = Ставить эти генераторы около дробильщиков камня будет хорошей идеей. diff --git a/res/sprites/blocks/crafting/arkycite-refinery-water-output1.png b/res/sprites/blocks/crafting/arkycite-refinery-nitrogen-output1.png similarity index 100% rename from res/sprites/blocks/crafting/arkycite-refinery-water-output1.png rename to res/sprites/blocks/crafting/arkycite-refinery-nitrogen-output1.png diff --git a/res/sprites/blocks/crafting/arkycite-refinery-water-output2.png b/res/sprites/blocks/crafting/arkycite-refinery-nitrogen-output2.png similarity index 100% rename from res/sprites/blocks/crafting/arkycite-refinery-water-output2.png rename to res/sprites/blocks/crafting/arkycite-refinery-nitrogen-output2.png diff --git a/res/sprites/blocks/crafting/arkycite-refinery-water.png b/res/sprites/blocks/crafting/arkycite-refinery-nitrogen.png similarity index 100% rename from res/sprites/blocks/crafting/arkycite-refinery-water.png rename to res/sprites/blocks/crafting/arkycite-refinery-nitrogen.png diff --git a/res/sprites/blocks/power/burner-generator-bottom.png b/res/sprites/blocks/power/steam-turbine-bottom.png similarity index 100% rename from res/sprites/blocks/power/burner-generator-bottom.png rename to res/sprites/blocks/power/steam-turbine-bottom.png diff --git a/res/sprites/blocks/power/burner-generator.png b/res/sprites/blocks/power/steam-turbine.png similarity index 100% rename from res/sprites/blocks/power/burner-generator.png rename to res/sprites/blocks/power/steam-turbine.png diff --git a/src/fos/content/FOSBlocks.java b/src/fos/content/FOSBlocks.java index e4935ba1..34f1263f 100644 --- a/src/fos/content/FOSBlocks.java +++ b/src/fos/content/FOSBlocks.java @@ -26,7 +26,7 @@ import mindustry.gen.Sounds; import mindustry.graphics.*; import mindustry.type.*; -import mindustry.ui.Styles; +import mindustry.ui.*; import mindustry.world.Block; import mindustry.world.blocks.defense.Wall; import mindustry.world.blocks.defense.turrets.*; @@ -66,7 +66,7 @@ public class FOSBlocks { copperPipe, brassPipe, fluidJunction, fluidBridge, pumpjack, fluidRouter, fluidBarrel, fluidTank, // POWER - tinWire, copperWire, brassWire, tinWirePole, copperWirePole, brassWirePole, windTurbine, burnerGenerator, heatGenerator, plasmaLauncher, solarPanelMedium, + tinWire, copperWire, brassWire, tinWirePole, copperWirePole, brassWirePole, windTurbine, steamTurbine, heatGenerator, plasmaLauncher, solarPanelMedium, copperBattery, brassBattery, // DEFENSE @@ -246,10 +246,10 @@ public static void load() { itemCapacity = 5; liquidCapacity = 60f; consumePower(5f); - consumeLiquid(arkycite, 20f/60f); + consumeLiquid(arkycite, 0.5f); craftTime = 60f; outputItem = new ItemStack(sulphur, 1); - outputLiquids = LiquidStack.with(oil, 14f/60f, water, 4f/60f); + outputLiquids = LiquidStack.with(oil, 18f/60f, nitrogen, 6f/60f); liquidOutputDirections = new int[]{0, 2}; craftEffect = FOSFx.refinerySmoke; lightRadius = 32f; @@ -1425,24 +1425,40 @@ diamond, new MissileBulletType(5f, 5){{ new DrawRegion("-rotator", 15f, true) ); }}; - burnerGenerator = new ConsumeGenerator("burner-generator"){{ - health = 900; - size = 3; - liquidCapacity = 60f; - powerProduction = 15f; - generateEffect = FOSFx.generatorSmoke; - effectChance = 0.05f; - consume(new ConsumeLiquidFlammable(0.4f, 0.5f){{ - filter = l -> l.flammability >= minFlammability && !l.gas; - }}); - drawer = new DrawMulti( - new DrawRegion("-bottom"), - new DrawLiquidTile(arkycite, 8f), - new DrawLiquidTile(oil, 8f), - new DrawDefault() - ); - requirements(Category.power, with(tin, 75, brass, 150, vanadium, 100)); - }}; + steamTurbine = new ConsumeGenerator("steam-turbine"){ + { + health = 900; + size = 3; + liquidCapacity = 60f; + powerProduction = 15f; + generateEffect = FOSFx.generatorSmoke; + effectChance = 0.05f; + consume(new ConsumeLiquidFlammable(0.4f, 0.2f){{ + filter = l -> l.flammability >= minFlammability && !l.gas; + }}); + consumeLiquid(water, 0.5f); + drawer = new DrawMulti( + new DrawRegion("-bottom"), + new DrawLiquidTile(arkycite, 8f), + new DrawLiquidTile(oil, 8f), + new DrawDefault() + ); + requirements(Category.power, with(tin, 75, brass, 150, vanadium, 100)); + } + + // ugh + @Override + public void setBars() { + super.setBars(); + removeBar("power"); + addLiquidBar(build -> build.liquids.get(oil) > 0 ? oil : arkycite); + addBar("power", (GeneratorBuild entity) -> new Bar(() -> + Core.bundle.format("bar.poweroutput", + Strings.fixed(entity.getPowerProduction() * 60 * entity.timeScale(), 1)), + () -> Pal.powerBar, + () -> entity.productionEfficiency)); + } + }; heatGenerator = new HeatGenerator("heat-generator"){{ health = 480; size = 2;