mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-08-10 17:55:44 +00:00
3 hours of sleep let's fucking go
This commit is contained in:
parent
97b2077038
commit
2cef5bf006
@ -29,13 +29,14 @@
|
|||||||
* Increased the blast furnace's fuel buffer by 50%, allowing coke blocks to be used
|
* 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
|
* 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`
|
* This means that the AUTOCAL can now send RoR commands using calculated values directly without the use of `round` or `evalr`
|
||||||
* Assembly machines now support Redstone-over-Radio
|
* Assembly machines and chemical plants now support Redstone-over-Radio
|
||||||
* Active state (0 or 1), progress (0-100) and current recipe (internal name) can now be read
|
* Active state (0 or 1), progress (0-100) and current recipe (internal name) can now be read
|
||||||
* The recipe can be set using a controller
|
* The recipe can be set using a controller
|
||||||
* Do note that setting a recipe that needs a blueprint without that blueprint will not work
|
* Do note that setting a recipe that needs a blueprint without that blueprint will not work
|
||||||
* RoR set recipes cause the assembler to go into low power mode, making it run at only 25% speed (visible through the blue progress bar)
|
* RoR set recipes cause the assembler to go into low power mode, making it run at only 25% speed (visible through the blue progress bar)
|
||||||
* The speed penalty is removed as soon as a recipe is assigned manually again
|
* The speed penalty is removed as soon as a recipe is assigned manually again
|
||||||
* The AUTOCAL's script interpreter now runs MS-ES v1.1 (First Extended Instruction Set)
|
* Assembly recipes and chemical factories can now be read (but not configured) using Redstone-over-Radio
|
||||||
|
* The factories script interpreter now runs MS-ES v1.1 (First Extended Instruction Set)
|
||||||
* Allows the use of a global stack, similar to the buffer which can hold 256 values
|
* Allows the use of a global stack, similar to the buffer which can hold 256 values
|
||||||
* Allows splitting of strings and counting of string fragments
|
* Allows splitting of strings and counting of string fragments
|
||||||
* Adds substring operations
|
* Adds substring operations
|
||||||
|
|||||||
@ -78,7 +78,7 @@ public class GUIMachineChemicalPlant extends GuiInfoContainer {
|
|||||||
|
|
||||||
if(chemplant.chemplantModule.progress > 0) {
|
if(chemplant.chemplantModule.progress > 0) {
|
||||||
int j = (int) Math.ceil(70 * chemplant.chemplantModule.progress);
|
int j = (int) Math.ceil(70 * chemplant.chemplantModule.progress);
|
||||||
drawTexturedModalRect(guiLeft + 62, guiTop + 126, 176, 61, j, 16);
|
drawTexturedModalRect(guiLeft + 62, guiTop + 126, 176, 61 + (chemplant.chemplantModule.restrictedMode ? 16 : 0), j, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
GenericRecipe recipe = chemplant.chemplantModule.getRecipe();
|
GenericRecipe recipe = chemplant.chemplantModule.getRecipe();
|
||||||
|
|||||||
@ -32,6 +32,7 @@ import com.hbm.util.i18n.I18nUtil;
|
|||||||
|
|
||||||
import api.hbm.energymk2.IEnergyReceiverMK2;
|
import api.hbm.energymk2.IEnergyReceiverMK2;
|
||||||
import api.hbm.fluidmk2.IFluidStandardTransceiverMK2;
|
import api.hbm.fluidmk2.IFluidStandardTransceiverMK2;
|
||||||
|
import api.hbm.redstoneoverradio.IRORValueProvider;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
@ -46,7 +47,7 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||||||
|
|
||||||
// TODO: make a base class because 90% of this is just copy pasted from the chemfac
|
// TODO: make a base class because 90% of this is just copy pasted from the chemfac
|
||||||
@NotableComments
|
@NotableComments
|
||||||
public class TileEntityMachineAssemblyFactory extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidStandardTransceiverMK2, IUpgradeInfoProvider, IControlReceiver, IGUIProvider, IProxyDelegateProvider, IConditionalInvAccess {
|
public class TileEntityMachineAssemblyFactory extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidStandardTransceiverMK2, IUpgradeInfoProvider, IControlReceiver, IGUIProvider, IProxyDelegateProvider, IConditionalInvAccess, IRORValueProvider {
|
||||||
|
|
||||||
public FluidTank[] allTanks;
|
public FluidTank[] allTanks;
|
||||||
public FluidTank[] inputTanks;
|
public FluidTank[] inputTanks;
|
||||||
@ -721,4 +722,34 @@ public class TileEntityMachineAssemblyFactory extends TileEntityMachineBase impl
|
|||||||
RETIRE, // return to null position for carriage transit
|
RETIRE, // return to null position for carriage transit
|
||||||
WAIT // either waiting for or in the middle of carriage transit
|
WAIT // either waiting for or in the middle of carriage transit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getFunctionInfo() {
|
||||||
|
return new String[] {
|
||||||
|
PREFIX_VALUE + "progress1",
|
||||||
|
PREFIX_VALUE + "progress2",
|
||||||
|
PREFIX_VALUE + "progress3",
|
||||||
|
PREFIX_VALUE + "progress4",
|
||||||
|
PREFIX_VALUE + "recipe1",
|
||||||
|
PREFIX_VALUE + "recipe2",
|
||||||
|
PREFIX_VALUE + "recipe3",
|
||||||
|
PREFIX_VALUE + "recipe4",
|
||||||
|
PREFIX_VALUE + "anyactive",
|
||||||
|
PREFIX_VALUE + "active1",
|
||||||
|
PREFIX_VALUE + "active2",
|
||||||
|
PREFIX_VALUE + "active3",
|
||||||
|
PREFIX_VALUE + "active4",
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String provideRORValue(String name) {
|
||||||
|
if("anyactive".equals(name)) return "" + ((this.didProcess[0] || this.didProcess[1] || this.didProcess[2] || this.didProcess[3]) ? 1 : 0);
|
||||||
|
for(int i = 0; i < 4; i++) {
|
||||||
|
if(("progress" + i).equals(name)) return "" + (int) Math.round(this.assemblerModule[i].progress * 100);
|
||||||
|
if(("recipe" + i).equals(name)) return this.assemblerModule[i].getRecipeName();
|
||||||
|
if(("active" + i).equals(name)) return "" + (this.didProcess[i] ? 1 : 0);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,6 +30,7 @@ import com.hbm.util.i18n.I18nUtil;
|
|||||||
|
|
||||||
import api.hbm.energymk2.IEnergyReceiverMK2;
|
import api.hbm.energymk2.IEnergyReceiverMK2;
|
||||||
import api.hbm.fluidmk2.IFluidStandardTransceiverMK2;
|
import api.hbm.fluidmk2.IFluidStandardTransceiverMK2;
|
||||||
|
import api.hbm.redstoneoverradio.IRORValueProvider;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
@ -42,7 +43,7 @@ import net.minecraft.util.EnumChatFormatting;
|
|||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
public class TileEntityMachineChemicalFactory extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidStandardTransceiverMK2, IUpgradeInfoProvider, IControlReceiver, IGUIProvider, IProxyDelegateProvider, IConditionalInvAccess {
|
public class TileEntityMachineChemicalFactory extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidStandardTransceiverMK2, IUpgradeInfoProvider, IControlReceiver, IGUIProvider, IProxyDelegateProvider, IConditionalInvAccess, IRORValueProvider {
|
||||||
|
|
||||||
public FluidTank[] allTanks;
|
public FluidTank[] allTanks;
|
||||||
public FluidTank[] inputTanks;
|
public FluidTank[] inputTanks;
|
||||||
@ -479,4 +480,34 @@ public class TileEntityMachineChemicalFactory extends TileEntityMachineBase impl
|
|||||||
|
|
||||||
@Override public FluidTank[] getAllTanks() { return TileEntityMachineChemicalFactory.this.getAllTanks(); }
|
@Override public FluidTank[] getAllTanks() { return TileEntityMachineChemicalFactory.this.getAllTanks(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getFunctionInfo() {
|
||||||
|
return new String[] {
|
||||||
|
PREFIX_VALUE + "progress1",
|
||||||
|
PREFIX_VALUE + "progress2",
|
||||||
|
PREFIX_VALUE + "progress3",
|
||||||
|
PREFIX_VALUE + "progress4",
|
||||||
|
PREFIX_VALUE + "recipe1",
|
||||||
|
PREFIX_VALUE + "recipe2",
|
||||||
|
PREFIX_VALUE + "recipe3",
|
||||||
|
PREFIX_VALUE + "recipe4",
|
||||||
|
PREFIX_VALUE + "anyactive",
|
||||||
|
PREFIX_VALUE + "active1",
|
||||||
|
PREFIX_VALUE + "active2",
|
||||||
|
PREFIX_VALUE + "active3",
|
||||||
|
PREFIX_VALUE + "active4",
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String provideRORValue(String name) {
|
||||||
|
if("anyactive".equals(name)) return "" + ((this.didProcess[0] || this.didProcess[1] || this.didProcess[2] || this.didProcess[3]) ? 1 : 0);
|
||||||
|
for(int i = 0; i < 4; i++) {
|
||||||
|
if(("progress" + i).equals(name)) return "" + (int) Math.round(this.chemplantModule[i].progress * 100);
|
||||||
|
if(("recipe" + i).equals(name)) return this.chemplantModule[i].getRecipeName();
|
||||||
|
if(("active" + i).equals(name)) return "" + (this.didProcess[i] ? 1 : 0);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,6 +28,8 @@ import com.hbm.util.i18n.I18nUtil;
|
|||||||
|
|
||||||
import api.hbm.energymk2.IEnergyReceiverMK2;
|
import api.hbm.energymk2.IEnergyReceiverMK2;
|
||||||
import api.hbm.fluidmk2.IFluidStandardTransceiverMK2;
|
import api.hbm.fluidmk2.IFluidStandardTransceiverMK2;
|
||||||
|
import api.hbm.redstoneoverradio.IRORInteractive;
|
||||||
|
import api.hbm.redstoneoverradio.IRORValueProvider;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
@ -39,7 +41,7 @@ import net.minecraft.util.AxisAlignedBB;
|
|||||||
import net.minecraft.util.EnumChatFormatting;
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class TileEntityMachineChemicalPlant extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidStandardTransceiverMK2, IUpgradeInfoProvider, IControlReceiver, IGUIProvider {
|
public class TileEntityMachineChemicalPlant extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidStandardTransceiverMK2, IUpgradeInfoProvider, IControlReceiver, IGUIProvider, IRORValueProvider, IRORInteractive {
|
||||||
|
|
||||||
public FluidTank[] inputTanks;
|
public FluidTank[] inputTanks;
|
||||||
public FluidTank[] outputTanks;
|
public FluidTank[] outputTanks;
|
||||||
@ -325,4 +327,34 @@ public class TileEntityMachineChemicalPlant extends TileEntityMachineBase implem
|
|||||||
upgrades.put(UpgradeType.OVERDRIVE, 3);
|
upgrades.put(UpgradeType.OVERDRIVE, 3);
|
||||||
return upgrades;
|
return upgrades;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getFunctionInfo() {
|
||||||
|
return new String[] {
|
||||||
|
PREFIX_VALUE + "progress",
|
||||||
|
PREFIX_VALUE + "recipe",
|
||||||
|
PREFIX_VALUE + "active",
|
||||||
|
PREFIX_FUNCTION + "setrecipe" + NAME_SEPARATOR + "name",
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String provideRORValue(String name) {
|
||||||
|
if("progress".equals(name)) return "" + (int) Math.round(this.chemplantModule.progress * 100);
|
||||||
|
if("recipe".equals(name)) return this.chemplantModule.getRecipeName();
|
||||||
|
if("active".equals(name)) return "" + (this.didProcess ? 1 : 0);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String runRORFunction(String name, String[] params) {
|
||||||
|
|
||||||
|
if("setrecipe".equals(name) && params.length == 1) {
|
||||||
|
this.chemplantModule.setRecipe(params[0], true);
|
||||||
|
this.markChanged();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user