mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 14:52:58 +00:00
cap fusion reactor injection rate, should eliminate CC/OC & hacked packet exploits. Fixes #4792
This commit is contained in:
1 parent
837e2f7f30
commit
94428beddc
1 file changed
+4
-1
@@ -54,6 +54,7 @@ public class FusionReactor
|
||||
public static double burnTemperature = TemperatureUnit.AMBIENT.convertFromK(1E8, true);
|
||||
public static double burnRatio = 1;
|
||||
public int injectionRate = 0;
|
||||
public static final int MAX_INJECTION = 98;//this is the effective cap in the GUI, as text field is limited to 2 chars
|
||||
|
||||
//Thermal characteristics
|
||||
public static double plasmaHeatCapacity = 100;
|
||||
@@ -449,7 +450,9 @@ public class FusionReactor
|
||||
{
|
||||
injectionRate = rate;
|
||||
|
||||
int capRate = Math.max(1, rate);
|
||||
int capRate = Math.min(Math.max(1, rate), MAX_INJECTION);
|
||||
|
||||
capRate -= capRate%2;
|
||||
|
||||
controller.waterTank.setCapacity(TileEntityReactorController.MAX_WATER*capRate);
|
||||
controller.steamTank.setCapacity(TileEntityReactorController.MAX_STEAM*capRate);
|
||||
|
||||
Reference in new issue
Block a user