Skip to content

Commit

Permalink
Summary (required)
Browse files Browse the repository at this point in the history
  • Loading branch information
kotmatross28729 committed Nov 17, 2024
1 parent 1f31faf commit 35c83c7
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 44 deletions.
14 changes: 6 additions & 8 deletions src/main/java/enviromine/core/EM_Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,12 @@ public class EM_Settings
public static float RTGFurnaceHeatConstant = 100;
public static float WoodBurningGenHeatDivisor = 16;
public static float DieselGenHeatConstant = 50;
public static float ICEHeatConstant = 100; //TODO
public static float CyclotronHeatConstant = 150; //TODO
public static float GeothermalGenHeatDivisor = 10; //TODO
public static float RBMKRodHeatDivisor = 5; //TODO
public static float RBMKRodHeatHardCap = 1500; //TODO


public static float ArcFurnaceHeatConstant; //TODO
public static float ICEHeatConstant = 100;
public static float CyclotronHeatConstant = 150;
public static float GeothermalGenHeatDivisor = 10;
public static float RBMKRodHeatDivisor = 5;
public static float RBMKRodHeatHardCap = 1500;
public static float ArcFurnaceHeatConstant = 200;
public static float FlareStackHeatConstant; //TODO
public static float CokerHeatDivisor; //TODO
public static float TurbofanHeatConstant; //TODO
Expand Down
72 changes: 36 additions & 36 deletions src/main/java/enviromine/handlers/EM_StatusManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -473,15 +473,16 @@ else if(tileentity instanceof TileEntityNukeFurnace nukeFurnace) {
}
}
else if(tileentity instanceof TileEntityRtgFurnace rtgFurnace) {
//this shouldn't really be a constant, but I don't give a fuck
if(rtgFurnace.isProcessing()){
//Works in space -
//Works in space -
blockAndItemTempInfluence += getTempFalloff((EM_Settings.RTGFurnaceHeatConstant*2), dist, cubeRadius, EM_Settings.blockTempDropoffPower);
}
}
else if(tileentity instanceof TileEntityMachineWoodBurner woodBurner) {
int powerGen = 0;
try {
Field powerGenz = TileEntityMachineWoodBurner.class.getDeclaredField("powerGen");
Field powerGenz = TileEntityMachineWoodBurner.class.getDeclaredField("powerGen"); //куадусешщт
powerGenz.setAccessible(true);
powerGen = (int) powerGenz.get(woodBurner);
} catch (NoSuchFieldException | IllegalAccessException ignored) {}
Expand All @@ -494,53 +495,52 @@ else if(tileentity instanceof TileEntityMachineWoodBurner woodBurner) {
}
else if(tileentity instanceof TileEntityMachineDiesel diesel) {
if(diesel.tank.getFill() > 0 && TileEntityMachineDiesel.getHEFromFuel(diesel.tank.getTankType()) > 0L) {
//Works in space -
//Works in space -
blockAndItemTempInfluence += getTempFalloff((EM_Settings.DieselGenHeatConstant*2), dist, cubeRadius, EM_Settings.blockTempDropoffPower);
}
}
else if(tileentity instanceof TileEntityMachineCombustionEngine combustionEngine) {
if(combustionEngine.isOn) {
//Works in space -
if(combustionEngine.wasOn) {
//Works in space -
blockAndItemTempInfluence += getTempFalloff((EM_Settings.ICEHeatConstant*2), dist, cubeRadius, EM_Settings.blockTempDropoffPower);
}
}
else if(tileentity instanceof TileEntityMachineCyclotron cyclotron) {
if(cyclotron.progress > 0) {
//Works in space -
//Works in space -
blockAndItemTempInfluence += getTempFalloff((EM_Settings.CyclotronHeatConstant*2), dist, cubeRadius, EM_Settings.blockTempDropoffPower);
}
}
else if(tileentity instanceof TileEntityMachineHephaestus hephaestus) { //GeoThermal
if(hephaestus.bufferedHeat > 0) {
//Works in space - ❔
blockAndItemTempInfluence += getTempFalloff((hephaestus.bufferedHeat / EM_Settings.GeothermalGenHeatDivisor), dist, cubeRadius, EM_Settings.blockTempDropoffPower);
if(hephaestus.getTotalHeat() > 0) {
//Max - 10_000/10 = 493℃ (expected 500) ✅
//Works in space - ✅
blockAndItemTempInfluence += getTempFalloff((hephaestus.getTotalHeat() / EM_Settings.GeothermalGenHeatDivisor), dist, cubeRadius, EM_Settings.blockTempDropoffPower);
}
}
else if(tileentity instanceof TileEntityRBMKBase rbmkBase) {
if(rbmkBase.heat > 0) {
//Works in space -
//Works in space -
blockAndItemTempInfluence += getTempFalloff(Math.min(((float)rbmkBase.heat / EM_Settings.RBMKRodHeatDivisor), EM_Settings.RBMKRodHeatHardCap*2), dist, cubeRadius, EM_Settings.blockTempDropoffPower);
}
}
else if(tileentity instanceof TileEntityMachineArcFurnaceLarge arcFurnaceLarge) {
//TODO
//progress =
//isProgressing =
//Concl. = CONST
//Works in space - ❔
// LogManager.getLogger().fatal("TileEntityMachineArcFurnaceLarge : ");
// LogManager.getLogger().fatal("progress : " + arcFurnaceLarge.progress);
// LogManager.getLogger().fatal("isProgressing : " + arcFurnaceLarge.isProgressing);
if(arcFurnaceLarge.isProgressing) {
//Works in space - ✅
blockAndItemTempInfluence += getTempFalloff((EM_Settings.ArcFurnaceHeatConstant*2), dist, cubeRadius, EM_Settings.blockTempDropoffPower);
}
}
else if(tileentity instanceof TileEntityMachineGasFlare gasFlare) {
//TODO
//isOn =
//doesBurn =
//Concl. = CONST
//Works in space - ❔
// LogManager.getLogger().fatal("TileEntityMachineGasFlare : ");
// LogManager.getLogger().fatal("isOn : " + gasFlare.isOn);
// LogManager.getLogger().fatal("doesBurn : " + gasFlare.doesBurn);
int powerGen = 0;
try {
Field output = TileEntityMachineGasFlare.class.getDeclaredField("output");
output.setAccessible(true);
powerGen = (int) output.get(gasFlare);
} catch (NoSuchFieldException | IllegalAccessException ignored) {}
if(gasFlare.doesBurn && powerGen > 0) {
//Works in space - ❔
blockAndItemTempInfluence += getTempFalloff((EM_Settings.FlareStackHeatConstant*2), dist, cubeRadius, EM_Settings.blockTempDropoffPower);
}
}
else if(tileentity instanceof TileEntityMachineCoker coker) {
//TODO
Expand All @@ -549,18 +549,18 @@ else if(tileentity instanceof TileEntityMachineCoker coker) {
//heat =
//Concl. = NOT CONST - heat
//Works in space - ❔
// LogManager.getLogger().fatal("TileEntityMachineCoker : ");
// LogManager.getLogger().fatal("wasOn : " + coker.wasOn);
// LogManager.getLogger().fatal("progress : " + coker.progress);
// LogManager.getLogger().fatal("heat : " + coker.heat);
LogManager.getLogger().fatal("TileEntityMachineCoker : ");
LogManager.getLogger().fatal("wasOn : " + coker.wasOn);
LogManager.getLogger().fatal("progress : " + coker.progress);
LogManager.getLogger().fatal("heat : " + coker.heat);
}
else if(tileentity instanceof TileEntityMachineTurbofan turbofan) {
//TODO
//wasOn =
//Concl. = CONST
//Works in space - ❔
// LogManager.getLogger().fatal("TileEntityMachineTurbofan : ");
// LogManager.getLogger().fatal("wasOn : " + turbofan.wasOn);
LogManager.getLogger().fatal("TileEntityMachineTurbofan : ");
LogManager.getLogger().fatal("wasOn : " + turbofan.wasOn);
}
else if(tileentity instanceof TileEntityMachineTurbineGas turbineGas) {
//TODO
Expand All @@ -569,10 +569,10 @@ else if(tileentity instanceof TileEntityMachineTurbineGas turbineGas) {
//temp =
//Concl. = NOT CONST - temp
//Works in space - ❔
// LogManager.getLogger().fatal("TileEntityMachineTurbineGas : ");
// LogManager.getLogger().fatal("state : " + turbineGas.state);
// LogManager.getLogger().fatal("active (cust) : " + (turbineGas.state == 1));
// LogManager.getLogger().fatal("temp : " + turbineGas.temp);
LogManager.getLogger().fatal("TileEntityMachineTurbineGas : ");
LogManager.getLogger().fatal("state : " + turbineGas.state);
LogManager.getLogger().fatal("active (cust) : " + (turbineGas.state == 1));
LogManager.getLogger().fatal("temp : " + turbineGas.temp);
}
}
}
Expand Down

0 comments on commit 35c83c7

Please sign in to comment.