Skip to content

Commit

Permalink
Make the coolant used in Ion Engines configurable (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
glowredman authored Jun 11, 2023
1 parent b19f65e commit e6631d6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/main/java/de/katzenpapst/amunra/AmunRa.java
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,8 @@ public void postInit(final FMLPostInitializationEvent event) {
NetworkRegistry.INSTANCE.registerGuiHandler(AmunRa.instance, new GuiHandler());
FMLCommonHandler.instance().bus().register(new TickHandlerServer());

TileEntityMothershipEngineJet.jetFuel = FluidRegistry.getFluid(config.validEngineFuel);
TileEntityMothershipEngineJet.jetFuel = FluidRegistry.getFluid(config.validJetEngineFuel);
TileEntityMothershipEngineIon.coolant = FluidRegistry.getFluid(config.validIonThrusterCoolant);

// failsafes
this.doCompatibilityChecks();
Expand Down
13 changes: 10 additions & 3 deletions src/main/java/de/katzenpapst/amunra/config/ARConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ public class ARConfig {
// bodies which motherships cannot orbit
public Set<String> mothershipBodiesNoOrbit;

public String validEngineFuel;
public String validJetEngineFuel;
public String validIonThrusterCoolant;

// *** sky rendering and related ***
// bodies not to render
Expand Down Expand Up @@ -196,8 +197,14 @@ public void processConfig(final Configuration config) {
emptySet,
"Bodies which should not be orbitable by motherships");

this.validEngineFuel = config
.getString("validEngineFuels", "motherships", "fuel", "These fluids can be used by Jet Engines");
this.validJetEngineFuel = config
.getString("validJetEngineFuel", "motherships", "fuel", "This fluid can be used by Jet Engines");

this.validIonThrusterCoolant = config.getString(
"validIonThrusterCoolant",
"motherships",
"liquidnitrogen",
"This fluid can be used by Ion Thrusters");

// mothershipUserRestriction = config.getBoolean("restrictMothershipToOwner", "mothership", true, "If true, only
// the one who built the mothership will be able to use it. If false, anyone can");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@
import micdoodle8.mods.galacticraft.core.GalacticraftCore;
import micdoodle8.mods.galacticraft.core.energy.item.ItemElectricBase;
import micdoodle8.mods.galacticraft.core.util.GCCoreUtil;
import micdoodle8.mods.galacticraft.planets.asteroids.AsteroidsModule;

public class TileEntityMothershipEngineIon extends TileEntityMothershipEngineAbstract {

protected MothershipFuelDisplay fuelType = null;
protected MothershipFuelDisplay fuelTypeEnergy = null;
public static Fluid coolant;

public TileEntityMothershipEngineIon() {
this.boosterBlock = ARBlocks.blockMsEngineIonBooster;
this.containingItems = new ItemStack[2];
this.fuel = AsteroidsModule.fluidLiquidNitrogen;
this.fuel = coolant;
// AsteroidsItems.canisterLN2

this.fuelType = new MothershipFuelDisplayFluid(this.fuel);
Expand Down

0 comments on commit e6631d6

Please sign in to comment.