Skip to content

Commit 8e7a1d1

Browse files
authored
Merge pull request #31 from wmioch/codex/add-steam-compressor-building
Add steam compressor for producing pressurized steam
2 parents 0bafce9 + de48b19 commit 8e7a1d1

File tree

3 files changed

+62
-0
lines changed

3 files changed

+62
-0
lines changed

core/src/de/dakror/quarry/scenes/GameUi.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@
170170
import de.dakror.quarry.structure.producer.RollingMachine;
171171
import de.dakror.quarry.structure.producer.SawMill;
172172
import de.dakror.quarry.structure.producer.Stacker;
173+
import de.dakror.quarry.structure.producer.SteamCompressor;
173174
import de.dakror.quarry.structure.producer.TubeBender;
174175
import de.dakror.quarry.structure.producer.WireDrawer;
175176
import de.dakror.quarry.structure.storage.Barrel;
@@ -997,6 +998,7 @@ protected void initBuildMenu(Skin skin) {
997998
buildMenuItem(wate, new OilWell(-1, 0));
998999
buildMenuItem(wate, new Refinery(-1, 0));
9991000
buildMenuItem(wate, new DistillationColumn(-1, 0));
1001+
buildMenuItem(wate, new SteamCompressor(-1, 0));
10001002
buildMenuItem(wate, new Coker(-1, 0));
10011003

10021004
buildMenuItem(powe, new Substation(-1, 0));

core/src/de/dakror/quarry/structure/base/StructureType.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
import de.dakror.quarry.structure.producer.RollingMachine;
9696
import de.dakror.quarry.structure.producer.SawMill;
9797
import de.dakror.quarry.structure.producer.Stacker;
98+
import de.dakror.quarry.structure.producer.SteamCompressor;
9899
import de.dakror.quarry.structure.producer.TubeBender;
99100
import de.dakror.quarry.structure.producer.WireDrawer;
100101
import de.dakror.quarry.structure.storage.Barrel;
@@ -175,6 +176,7 @@ public enum StructureType {
175176
BarrelDrainer(98, BarrelDrainer.class),
176177
ArcWelder(99, ArcWelder.class),
177178
Coker(214, Coker.class),
179+
SteamCompressor(216, SteamCompressor.class),
178180

179181
// power management
180182
Substation(100, Substation.class),
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/*******************************************************************************
2+
* Copyright 2024 Maximilian Stark | Dakror <mail@dakror.de>
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
******************************************************************************/
16+
17+
package de.dakror.quarry.structure.producer;
18+
19+
import de.dakror.quarry.Const;
20+
import de.dakror.quarry.game.Item.ItemType;
21+
import de.dakror.quarry.game.Item.Items;
22+
import de.dakror.quarry.game.Item.Items.Amount;
23+
import de.dakror.quarry.game.Science.ScienceType;
24+
import de.dakror.quarry.structure.base.Direction;
25+
import de.dakror.quarry.structure.base.Dock;
26+
import de.dakror.quarry.structure.base.Dock.DockFilter;
27+
import de.dakror.quarry.structure.base.Dock.DockType;
28+
import de.dakror.quarry.structure.base.ProducerStructure;
29+
import de.dakror.quarry.structure.base.RecipeList;
30+
import de.dakror.quarry.structure.base.StructureType;
31+
import de.dakror.quarry.util.Sfx;
32+
33+
/**
34+
* @author Maximilian Stark | Dakror
35+
*/
36+
public class SteamCompressor extends ProducerStructure {
37+
public static final ProducerSchema classSchema = new ProducerSchema(0, StructureType.SteamCompressor, 3, 2,
38+
"steamcompressor",
39+
new Items(ItemType.MachineFrame, 6, ItemType.SteelIngot, 18, ItemType.CopperTube, 16, ItemType.Dynamo, 2),
40+
new RecipeList() {
41+
@Override
42+
protected void init() {
43+
add(new Recipe(3f, "pressurizedsteam", 350)
44+
.input(new Amount(ItemType.Steam, 5000))
45+
.output(new Amount(ItemType.PressurizedSteam, 1200)));
46+
}
47+
},
48+
new Sfx("compactor" + Const.SFX_FORMAT, 0.7f),
49+
true,
50+
new Dock(0, 1, Direction.West, DockType.FluidIn, new DockFilter(ItemType.Steam)),
51+
new Dock(2, 1, Direction.East, DockType.FluidOut, new DockFilter(ItemType.PressurizedSteam)),
52+
new Dock(1, 0, Direction.South, DockType.Power))
53+
.sciences(ScienceType.Electricity, ScienceType.HighTech);
54+
55+
public SteamCompressor(int x, int y) {
56+
super(x, y, classSchema);
57+
}
58+
}

0 commit comments

Comments
 (0)