Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename RF power unit to FE #7737

Merged
merged 1 commit into from
Mar 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/generated/resources/assets/ae2/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@
"gui.ae2.inWorldCraftingPresses": "Crafting Presses are obtained by breaking a Mysterious Cube. Mysterious Cubes are in the center of meteorites which can be found in around the world. They can be located by using a meteorite compass.",
"gui.ae2.inWorldSingularity": "To create drop 1 Singularity and 1 Ender Dust and cause an explosion within range of the items.",
"gui.ae2.units.appliedenergistics": "AE",
"gui.ae2.units.rf": "RF",
"gui.ae2.units.fe": "FE",
"gui.tooltips.ae2.ActiveOnPulse": "Activate once per pulse",
"gui.tooltips.ae2.ActiveWithSignal": "Active with signal",
"gui.tooltips.ae2.ActiveWithoutSignal": "Active without signal",
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/appeng/api/config/PowerUnits.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

public enum PowerUnits {
AE("gui.ae2.units.appliedenergistics", "AE"), // Native Units - AE Energy
RF("gui.ae2.units.rf", "RF"); // RF - Redstone Flux
FE("gui.ae2.units.fe", "FE"); // Forge Energy

/**
* unlocalized name for the power unit.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ public SettingToggleButton(Setting<T> setting, T val, Predicate<T> isValidValue,
PowerUnits.AE.textComponent());
// registerApp(Icon.POWER_UNIT_EU, Settings.POWER_UNITS, PowerUnits.EU, ButtonToolTips.PowerUnits,
// PowerUnits.EU.textComponent());
registerApp(Icon.POWER_UNIT_RF, Settings.POWER_UNITS, PowerUnits.RF, ButtonToolTips.PowerUnits,
PowerUnits.RF.textComponent());
registerApp(Icon.POWER_UNIT_RF, Settings.POWER_UNITS, PowerUnits.FE, ButtonToolTips.PowerUnits,
PowerUnits.FE.textComponent());

registerApp(Icon.REDSTONE_IGNORE, Settings.REDSTONE_CONTROLLED, RedstoneMode.IGNORE,
ButtonToolTips.RedstoneMode,
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/appeng/core/AEConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ private void syncClientConfig() {
}

private void syncCommonConfig() {
PowerUnits.RF.conversionRatio = COMMON.powerRatioForgeEnergy.get();
PowerUnits.FE.conversionRatio = COMMON.powerRatioForgeEnergy.get();
PowerMultiplier.CONFIG.multiplier = COMMON.powerUsageMultiplier.get();

CondenserOutput.MATTER_BALLS.requiredPower = COMMON.condenserMatterBallsPower.get();
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/appeng/helpers/ForgeEnergyAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,20 @@ public ForgeEnergyAdapter(IExternalPowerSink sink) {
@Override
public final int receiveEnergy(int maxReceive, boolean simulate) {
final double offered = maxReceive;
final double overflow = this.sink.injectExternalPower(PowerUnits.RF, offered,
final double overflow = this.sink.injectExternalPower(PowerUnits.FE, offered,
simulate ? Actionable.SIMULATE : Actionable.MODULATE);

return (int) (maxReceive - overflow);
}

@Override
public final int getEnergyStored() {
return (int) Math.floor(PowerUnits.AE.convertTo(PowerUnits.RF, this.sink.getAECurrentPower()));
return (int) Math.floor(PowerUnits.AE.convertTo(PowerUnits.FE, this.sink.getAECurrentPower()));
}

@Override
public final int getMaxEnergyStored() {
return (int) Math.floor(PowerUnits.AE.convertTo(PowerUnits.RF, this.sink.getAEMaxPower()));
return (int) Math.floor(PowerUnits.AE.convertTo(PowerUnits.FE, this.sink.getAEMaxPower()));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ public PoweredItemCapabilities(ItemStack is, IAEItemPowerStorage item) {

@Override
public int receiveEnergy(int maxReceive, boolean simulate) {
final double convertedOffer = PowerUnits.RF.convertTo(PowerUnits.AE, maxReceive);
final double convertedOffer = PowerUnits.FE.convertTo(PowerUnits.AE, maxReceive);
final double overflow = this.item.injectAEPower(this.is, convertedOffer,
simulate ? Actionable.SIMULATE : Actionable.MODULATE);

return maxReceive - (int) PowerUnits.AE.convertTo(PowerUnits.RF, overflow);
return maxReceive - (int) PowerUnits.AE.convertTo(PowerUnits.FE, overflow);
}

@Override
Expand All @@ -55,12 +55,12 @@ public int extractEnergy(int maxExtract, boolean simulate) {

@Override
public int getEnergyStored() {
return (int) PowerUnits.AE.convertTo(PowerUnits.RF, this.item.getAECurrentPower(this.is));
return (int) PowerUnits.AE.convertTo(PowerUnits.FE, this.item.getAECurrentPower(this.is));
}

@Override
public int getMaxEnergyStored() {
return (int) PowerUnits.AE.convertTo(PowerUnits.RF, this.item.getAEMaxPower(this.is));
return (int) PowerUnits.AE.convertTo(PowerUnits.FE, this.item.getAEMaxPower(this.is));
}

@Override
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/appeng/parts/p2p/FEP2PTunnelPart.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public int receiveEnergy(int maxReceive, boolean simulate) {
}

if (!simulate) {
FEP2PTunnelPart.this.queueTunnelDrain(PowerUnits.RF, total);
FEP2PTunnelPart.this.queueTunnelDrain(PowerUnits.FE, total);
}

return total;
Expand Down Expand Up @@ -131,7 +131,7 @@ public int extractEnergy(int maxExtract, boolean simulate) {
final int total = input.get().extractEnergy(maxExtract, simulate);

if (!simulate) {
FEP2PTunnelPart.this.queueTunnelDrain(PowerUnits.RF, total);
FEP2PTunnelPart.this.queueTunnelDrain(PowerUnits.FE, total);
}

return total;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/appeng/parts/p2p/FluidP2PTunnelPart.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public int fill(FluidStack resource, FluidAction action) {
}

if (action == FluidAction.EXECUTE) {
FluidP2PTunnelPart.this.queueTunnelDrain(PowerUnits.RF,
FluidP2PTunnelPart.this.queueTunnelDrain(PowerUnits.FE,
(double) total / AEKeyType.fluids().getAmountPerOperation());
}

Expand Down Expand Up @@ -163,7 +163,7 @@ public FluidStack drain(FluidStack resource, FluidAction action) {
FluidStack result = input.get().drain(resource, action);

if (action.execute()) {
queueTunnelDrain(PowerUnits.RF,
queueTunnelDrain(PowerUnits.FE,
(double) result.getAmount() / AEKeyType.fluids().getAmountPerOperation());
}

Expand All @@ -177,7 +177,7 @@ public FluidStack drain(int maxDrain, FluidAction action) {
FluidStack result = input.get().drain(maxDrain, action);

if (action.execute()) {
queueTunnelDrain(PowerUnits.RF,
queueTunnelDrain(PowerUnits.FE,
(double) result.getAmount() / AEKeyType.fluids().getAmountPerOperation());
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/appeng/parts/p2p/ItemP2PTunnelPart.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public ItemStack insertItem(int slot, ItemStack stack, boolean simulate) {
}

if (!simulate) {
ItemP2PTunnelPart.this.queueTunnelDrain(PowerUnits.RF, amount - remainder);
ItemP2PTunnelPart.this.queueTunnelDrain(PowerUnits.FE, amount - remainder);
}

if (remainder == stack.getCount()) {
Expand Down Expand Up @@ -160,7 +160,7 @@ public ItemStack extractItem(int slot, int amount, boolean simulate) {
ItemStack result = input.get().extractItem(slot, amount, simulate);

if (!simulate) {
queueTunnelDrain(PowerUnits.RF, result.getCount());
queueTunnelDrain(PowerUnits.FE, result.getCount());
}

return result;
Expand Down
Binary file modified src/main/resources/assets/ae2/textures/guis/states.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading