Skip to content

Commit

Permalink
hints
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Jan 13, 2025
1 parent 0cf7adf commit ff117ad
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 28 deletions.
8 changes: 1 addition & 7 deletions assets/bundles/bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,7 @@ omaloon.update.dialog.fullclean.confirm = Are you sure you want to reset your cu
requirement.omaloon-at-wave = Reach Wave {0} in {1}

## Hints
hint.omaloon-pump_positive = To create higher pressure, place \uC353[accent] mechanical pumps[] in series, adding liquid pipes between them.\nTo increase pressure faster, place \uC353[accent] mechanical pumps[] in parallel.
hint.omaloon-pump_negative = To decrease pressure faster, add more \uC353[accent]mechanical pumps[].
hint.omaloon-drill_positive_pressure = \uC351 [accent]Hammer drills[] require negative pressure to operate. Rotate the \uC353[accent] mechanical pumps[] away from the drills to create negative pressure.
hint.omaloon-press_or_shelter_negative_pressure = Some buildings require positive pressure. Rotate the \uC353[accent] mechanical pumps[] to these blocks to create positive pressure.
hint.omaloon-pump = The pumps only stop when there is a block in front of it or the front block has enough pressure.
hint.omaloon-low_pressure = Buildings will implode when it reaches -50 pressure units. To avoid this, use \uC354 [accent]Liquid Valve[], which will reduce the pressure, preventing it from reaching dangerous levels.
hint.omaloon-valve = One valve can handle up to three pumps. If you have more pumps, place more valves to avoid jamming.
hint.omaloon-pump_chaining = Pumps chained in series can reach a higher pressure gradient between the ends. If they're chained in parallel, they work faster.

## planets
planet.omaloon-omaloon.name = Omaloon
Expand Down
Binary file modified assets/sprites/blocks/liquids/liquid-gauge-tiles.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/sprites/blocks/liquids/liquid-gauge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 3 additions & 17 deletions src/omaloon/ui/dialogs/EventHints.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,12 @@
import arc.util.*;
import mindustry.*;
import mindustry.ui.fragments.HintsFragment.*;
import omaloon.content.blocks.*;
import omaloon.world.blocks.liquid.*;

public enum EventHints implements Hint {
// drill_positive_pressure(
// () -> false,
// () -> Vars.state.teams.get(Vars.state.rules.defaultTeam).getBuildings(OlProductionBlocks.hammerDrill).find(b -> ((HasPressure) b).getPressure() > 0f) != null
// ),
// press_or_shelter_negative_pressure(
// () -> false,
// () -> Vars.state.teams.get(Vars.state.rules.defaultTeam).getBuildings(OlCraftingBlocks.carborundumPress).find(b -> ((HasPressure) b).getPressure() < 0f) != null
// || Vars.state.teams.get(Vars.state.rules.defaultTeam).getBuildings(OlDefenceBlocks.smallShelter).find(b -> ((HasPressure) b).getPressure() < 0f) != null
// ),
pump(
pump_chaining(
() -> false,
() -> !Vars.state.teams.get(Vars.state.rules.defaultTeam).getBuildings(OlDistributionBlocks.liquidPump).isEmpty()
),
valve(
() -> false,
() -> !Vars.state.teams.get(Vars.state.rules.defaultTeam).getBuildings(OlDistributionBlocks.liquidValve).isEmpty(),
pump
() -> Vars.control.input.block instanceof PressureLiquidPump
);

final Boolp complete;
Expand Down
6 changes: 2 additions & 4 deletions src/omaloon/world/blocks/liquid/PressureLiquidPump.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ public PressureLiquidPump(String name) {
destructible = true;
update = true;
saveConfig = copyConfig = true;
config(Liquid.class, (PressureLiquidPumpBuild build, Liquid liquid) -> {
build.filter = liquid.id;
});
config(Liquid.class, (PressureLiquidPumpBuild build, Liquid liquid) -> build.filter = liquid.id);
}

@Override
Expand Down Expand Up @@ -153,7 +151,7 @@ public int chainSize() {
}

@Override public boolean connects(HasPressure to) {
return HasPressure.super.connects(to) && (front() == to || back() == to);
return HasPressure.super.connects(to) && (front() == to || back() == to) && (!(to instanceof PressureLiquidPumpBuild) || to.rotation() == rotation);
}

@Override
Expand Down

0 comments on commit ff117ad

Please sign in to comment.