Skip to content

Commit

Permalink
Steam Turbine & Arkycite Refinery
Browse files Browse the repository at this point in the history
  • Loading branch information
Slotterleet committed May 21, 2024
1 parent f0349fb commit 7f5a2f5
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 22 deletions.
2 changes: 2 additions & 0 deletions res/bundles/bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions res/bundles/bundle_ru.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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 = Ставить эти генераторы около дробильщиков камня будет хорошей идеей.
Expand Down
File renamed without changes
60 changes: 38 additions & 22 deletions src/fos/content/FOSBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.*;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 7f5a2f5

Please sign in to comment.