Skip to content

Commit

Permalink
fluid capacity stat
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Jan 14, 2025
1 parent ff21f28 commit f5df403
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
7 changes: 6 additions & 1 deletion assets/bundles/bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,9 @@ stat.omaloon-add-fluid = Add Fluid
air = Air
stat.omaloon-remove-fluid = Remove Fluid

stat.omaloon-fluid-capacity = Fluid Capacity
stat.omaloon-fluid-capacity.format = @x@x@ Blocks

stat.omaloon-density = Density

stat.omaloon-pump-strength = Pump Strength
Expand All @@ -346,7 +349,9 @@ stat.omaloon-optimal-pressure = Optimal Pressure
stat.omaloon-optimal-pressure.format = \uC357 @ Pascals (@%)

## ui units
unit.omaloon-density-unit = Pascals/Fluid Capacity
unit.omaloon-blocks-cubed = Blocks\u00B3

unit.omaloon-density-unit = Pascals/Blocks\u00B3
unit.omaloon-viscosity-unit = Pascal Seconds

unit.omaloon-pressure-unit = Pascals
Expand Down
4 changes: 4 additions & 0 deletions src/omaloon/world/meta/OlStats.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public class OlStats {
addFluid = new Stat("omaloon-add-fluid", StatCat.crafting),
removeFluid = new Stat("omaloon-remove-fluid", StatCat.crafting),

fluidCapacity = new Stat("omaloon-fluid-capacity", StatCat.liquids),

density = new Stat("omaloon-density"),

pressureFlow = new Stat("omaloon-pressureflow", pressure),
Expand All @@ -35,6 +37,8 @@ public class OlStats {
optimalPressure = new Stat("omaloon-optimal-pressure", pressure);

public static final StatUnit
blocksCubed = new StatUnit("omaloon-blocks-cubed"),

densityUnit = new StatUnit("omaloon-density-unit", "\uC357"),
viscosityUnit = new StatUnit("omaloon-viscosity-unit", "\uC357"),

Expand Down
2 changes: 1 addition & 1 deletion src/omaloon/world/meta/PressureConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public class PressureConfig {
};

public void addStats(Stats stats) {
stats.add(Stat.liquidCapacity, fluidCapacity, StatUnit.liquidUnits);
stats.add(OlStats.fluidCapacity, Core.bundle.get("stat.omaloon-fluid-capacity.format"), fluidCapacity/8f, fluidCapacity/8f, fluidCapacity/8f);

stats.add(OlStats.maxPressure, maxPressure, OlStats.pressureUnit);
stats.add(OlStats.minPressure, minPressure, OlStats.pressureUnit);
Expand Down

0 comments on commit f5df403

Please sign in to comment.