diff --git a/changelog b/changelog index a86d04d2d..958841776 100644 --- a/changelog +++ b/changelog @@ -25,6 +25,10 @@ * Flashgold and flashlead are now made in the PUREX instead of the crafting table * The flashgold recipe now yields two billets instead of one * Slightly changed the HSS ingot texture to not look identical to steel except slightly greenish +* The AUTOCAL's buffer is now limited to 256 characters instead of being infinite +* Increased the blast furnace's fuel buffer by 50%, allowing coke blocks to be used +* If an RoR controller tries to parse an integer, but the supplied string represents a decimal, instead of canceling the operation, the system will now interpret decimals and round them to be integers + * This means that the AUTOCAL can now send RoR commands using calculated values directly without the use of `round` or `evalr` ## Fixed * Fixed AUTOCAL's number comparison functions not working with variable substitution as advertised diff --git a/src/main/java/api/hbm/redstoneoverradio/IRORInteractive.java b/src/main/java/api/hbm/redstoneoverradio/IRORInteractive.java index 4e90ac4ad..86e5bb59f 100644 --- a/src/main/java/api/hbm/redstoneoverradio/IRORInteractive.java +++ b/src/main/java/api/hbm/redstoneoverradio/IRORInteractive.java @@ -34,7 +34,9 @@ public interface IRORInteractive extends IRORInfo { public static int parseInt(String val, int min, int max) { int result = 0; - try { result = Integer.parseInt(val); } catch(Exception x) { throw new RORFunctionException(EX_FORMAT); }; + try { result = Integer.parseInt(val); } catch(Exception x) { + try { result = (int) Math.round(Double.parseDouble(val)); } catch(Exception y) { throw new RORFunctionException(EX_FORMAT); } + } if(result < min || result > max) throw new RORFunctionException(EX_FORMAT); return result; } diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineBlastFurnace.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineBlastFurnace.java index bd67f3358..08225588b 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineBlastFurnace.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineBlastFurnace.java @@ -46,7 +46,7 @@ public class TileEntityMachineBlastFurnace extends TileEntityMachineBase impleme public int fuel; public static final int FUEL_COAL = 200 * 8; public static final int FUEL_RATE = 200 * 4; // half coal per operation - public static final int MAX_FUEL = FUEL_COAL * 16; // 16 pieces of coal + public static final int MAX_FUEL = FUEL_COAL * 24; // 24 pieces of coal, can also fit a bit more than a coal coke block public static final int FLUE_GAS = 100; // per finished operation, not per tick public ModuleBurnTime burnModule = new ModuleBurnTime() @@ -56,7 +56,7 @@ public class TileEntityMachineBlastFurnace extends TileEntityMachineBase impleme super(5); this.tanks = new FluidTank[2]; this.tanks[0] = new FluidTank(Fluids.AIRBLAST, 4_000); - this.tanks[1] = new FluidTank(Fluids.FLUE, 1_000); // TEMP + this.tanks[1] = new FluidTank(Fluids.FLUE, 1_000); } @Override diff --git a/src/main/java/com/hbm/tileentity/network/TileEntityRadioAUTOCAL.java b/src/main/java/com/hbm/tileentity/network/TileEntityRadioAUTOCAL.java index 17a835664..b75a4a5b0 100644 --- a/src/main/java/com/hbm/tileentity/network/TileEntityRadioAUTOCAL.java +++ b/src/main/java/com/hbm/tileentity/network/TileEntityRadioAUTOCAL.java @@ -27,6 +27,8 @@ public class TileEntityRadioAUTOCAL extends TileEntityTickingBase implements ICo public boolean ignoreError = false; public boolean autoReboot = false; + public static final int MAX_BUFFER_LENGTH = 256; + public String[] script = new String[0]; public IParse msesv1 = new ParseMSES1(); public ParseContext ctx; @@ -68,6 +70,7 @@ public class TileEntityRadioAUTOCAL extends TileEntityTickingBase implements ICo this.ctx.current ++; String line = this.script[index]; EnumStatementReturn ret = msesv1.eval(ctx, line); + if(ctx.buffer.length() > MAX_BUFFER_LENGTH) ctx.buffer = ctx.buffer.substring(0, MAX_BUFFER_LENGTH); if(ret != EnumStatementReturn.SKIP) pushMsg(index + ": " + line); this.history[0] = "Buffer: " + ctx.buffer; if(ret == EnumStatementReturn.END_TICK) break;