diff --git a/changelog b/changelog index 13482baec..790dde47c 100644 --- a/changelog +++ b/changelog @@ -1,49 +1,4 @@ ## Changed -* Updated russian localization -* Rad absorbers now use metadata, existing blocks will be converted automatically -* Fissure bombs that go off in crater biomes now create fissures with metadata 1 which creates radioactive volcanic lava - * If a crater biome is created on top of an existing fissure, it will keep producing normal volcanic lava -* Simplified the battery socket's client packets, reducing CPU load -* Muzzle flashes on guns now work in third person mode, including on other players and on NPCs, making it more apparent when you're being fired at - * This includes non-standard special effects like the .44 gap flash and the .35-800 ejector plume -* Removed the old unused satellite deco blocks, freeing up 6 block IDs -* Crucibles that smelt metal with no template set will no place the metal in the recipe stack instead of the waste stack, this should make it easier to get a recipe to work in the many, many cases where people add the template after smelting the material -* Battery sockets and the FENSU now support the copy tool -* Removed unused displaylist support from the model loader - * DLs have been long phased out in favor of VBOs anyway -* Rebranded canned horse slime - * Now with extra bone marrow -* Updated the deuterium tower's model -* Updated most blast door visuals -* RBMKs now have QMAW pages -* Updated the model on the heavy magnetic storage container -* Increased the power draw on the osmiridium welding recipe -* Bullet casings now make sounds when falling to the ground -* Most ammo types now have QMAW pages, including information on whether or not they are a war crime -* Both assembly and chemical factories now have four special ports that only allow items inserted to go into one recipe group -* All models using the HFR wavefront loader can now be hot-swapped via resource reload (F3 + T) -* Updated most door models - * Door skins are no longer a dedicated item, the skin can be changed using a screwdriver - * Available skins are cycled through in the item preview - * Fire doors and secure access doors no longer use clipping planes (i.e. making the doors not render outside of their frames) - * Vault doors have been ported to the current door system, the blocks should convert automatically - -# Fixed -* Potentially fixed yet another issue regarding crates -* Fixed battery socket `fillpercent` RoR function always assuming a max power of 1 -* Fixed issue where multiblock ports would generate many OpenComputers component entries -* Fixed RBMK automatic control rods having incorrect settings when using the copy tool -* Fixed battery sockets producing junk debug data in the logs -* Fixed an issue where the charging station would crash when trying to charge certain items -* Fixed the DFC's core component not dropping its contents when mined -* Fixed audio problems with guns -* Fixed third person muzzleflash on the miniguns clipping the barrel -* Fixed arc furnace IO slots stacking items with incompatible NBT -* Fixed a bounding box issue with casing particles, causing them to slide sideways on the first tick, making trajectories weird -* Fixed some turrets not using the more modern casing spawner system which allows casings to have a smoke trail -* Fixed incorrect tooltip on the upgrade stat screen for assembly factories -* Fixed crash caused by RBMK overpressure meltdown mechanic -* Fixed a crash causing by the charging station in combination with the new battery packs -* Fixed a broken and originally unintended feature where the flamethrower turret would be loadable using regular item tanks - * Most ammo slots now work for loading, the empty canisters are returned via the fluid ID slot -* Fixed a dupe regarding conveyors +* The PWR can now be controlled via RoR + * The RoR value reader can read core and hull heat as well as fuel depletion in percent + * The RoR controller can set the control rod level in percent as well as jetison all loaded fuel \ No newline at end of file diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityPWRController.java b/src/main/java/com/hbm/tileentity/machine/TileEntityPWRController.java index 3ddd3b986..f9fa32b7a 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityPWRController.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityPWRController.java @@ -26,7 +26,7 @@ import com.hbm.tileentity.TileEntityMachineBase; import com.hbm.util.EnumUtil; import com.hbm.util.fauxpointtwelve.BlockPos; -import api.hbm.fluid.IFluidStandardTransceiver; +import api.hbm.fluidmk2.IFluidStandardTransceiverMK2; import api.hbm.redstoneoverradio.IRORInteractive; import api.hbm.redstoneoverradio.IRORValueProvider; import cpw.mods.fml.common.Optional; @@ -47,7 +47,7 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; @Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")}) -public class TileEntityPWRController extends TileEntityMachineBase implements IGUIProvider, IControlReceiver, SimpleComponent, IFluidStandardTransceiver, CompatHandler.OCComponent, IRORValueProvider, IRORInteractive { +public class TileEntityPWRController extends TileEntityMachineBase implements IGUIProvider, IControlReceiver, SimpleComponent, IFluidStandardTransceiverMK2, CompatHandler.OCComponent, IRORValueProvider, IRORInteractive { public FluidTank[] tanks; public long coreHeat; @@ -190,7 +190,7 @@ public class TileEntityPWRController extends TileEntityMachineBase implements IG for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) { BlockPos portPos = pos.offset(dir); - if(tanks[1].getFill() > 0) this.sendFluid(tanks[1], worldObj, portPos.getX(), portPos.getY(), portPos.getZ(), dir); + if(tanks[1].getFill() > 0) this.tryProvide(tanks[1], worldObj, portPos.getX(), portPos.getY(), portPos.getZ(), dir); if(worldObj.getTotalWorldTime() % 20 == 0) this.trySubscribe(tanks[0].getTankType(), worldObj, portPos.getX(), portPos.getY(), portPos.getZ(), dir); } } @@ -634,33 +634,49 @@ public class TileEntityPWRController extends TileEntityMachineBase implements IG return new GUIPWR(player.inventory, this); } - @Override - public FluidTank[] getAllTanks() { - return tanks; - } - - @Override - public FluidTank[] getSendingTanks() { - return new FluidTank[] { tanks[1] }; - } - - @Override - public FluidTank[] getReceivingTanks() { - return new FluidTank[] { tanks[0] }; - } + @Override public FluidTank[] getAllTanks() { return tanks; } + @Override public FluidTank[] getSendingTanks() { return new FluidTank[] { tanks[1] }; } + @Override public FluidTank[] getReceivingTanks() { return new FluidTank[] { tanks[0] }; } @Override public String[] getFunctionInfo() { - return new String[0]; //TODO - } - - @Override - public String runRORFunction(String name, String[] params) { - return ""; + return new String[] { + PREFIX_VALUE + "coreheat", + PREFIX_VALUE + "hullheat", + PREFIX_VALUE + "flux", + PREFIX_VALUE + "depletion", + PREFIX_FUNCTION + "setrods" + NAME_SEPARATOR + "percent", + PREFIX_FUNCTION + "jettison", + }; } @Override public String provideRORValue(String name) { - return ""; + if((PREFIX_VALUE + "coreheat").equals(name)) return "" + this.coreHeat; + if((PREFIX_VALUE + "hullheat").equals(name)) return "" + this.hullHeat; + if((PREFIX_VALUE + "flux").equals(name)) return "" + (int) this.flux; + if((PREFIX_VALUE + "depletion").equals(name)) return "" + (int) (this.progress * 100 / this.processTime); + return null; + } + + @Override + public String runRORFunction(String name, String[] params) { + + if((PREFIX_FUNCTION + "setrods").equals(name) && params.length > 0) { + int percent = IRORInteractive.parseInt(params[0], 0, 100); + this.rodTarget = percent; + this.markChanged(); + return null; + } + + if((PREFIX_FUNCTION + "jettison").equals(name)) { + this.typeLoaded = -1; + this.amountLoaded = 0; + this.progress = 0; + this.markChanged(); + return null; + } + + return null; } }