From ea957c95aa0c35be00b85c884fb6800b708f9559 Mon Sep 17 00:00:00 2001 From: HbmMods Date: Thu, 7 May 2026 21:09:50 +0200 Subject: [PATCH] pjsip show contacts --- changelog | 4 +++- .../com/hbm/inventory/gui/GUIScreenRBMKGraph.java | 8 ++++---- .../com/hbm/inventory/gui/GUIScreenRBMKTerminal.java | 1 + .../machine/rbmk/TileEntityRBMKTerminal.java | 11 ++++++++--- .../network/TileEntityRadioTorchController.java | 4 ++-- 5 files changed, 18 insertions(+), 10 deletions(-) diff --git a/changelog b/changelog index 3629667a0..fc2a89284 100644 --- a/changelog +++ b/changelog @@ -5,6 +5,8 @@ ## Changed * RoR graphs can now have their min and max bounds set to a fixed number * This should make it easier to accurately tell the difference/scale of values when they exist in an expected range (for example, RBMK temperatures) +* RoR controllers now use polling by default, since state change is unable to actually perform a function unless the state changes, preventing repeated commands ## Fixed -* Fixed RoR graph showing the wrong name in the GUI \ No newline at end of file +* Fixed RoR graph showing the wrong name in the GUI +* Fixed polling option in RoR controllers reading dead signals \ No newline at end of file diff --git a/src/main/java/com/hbm/inventory/gui/GUIScreenRBMKGraph.java b/src/main/java/com/hbm/inventory/gui/GUIScreenRBMKGraph.java index 309937bfe..c7e1c0827 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIScreenRBMKGraph.java +++ b/src/main/java/com/hbm/inventory/gui/GUIScreenRBMKGraph.java @@ -53,9 +53,9 @@ public class GUIScreenRBMKGraph extends GuiScreen { rtty[i] = new GuiTextField(this.fontRendererObj, guiLeft + 27 + oX, guiTop + 55 + oY + i * 54, 72 - oX * 2, 14); GUIScreenRBMKKeyPad.setupTextFieldStandard(rtty[i], 10, graph.graphs[i].rtty); min[i] = new GuiTextField(this.fontRendererObj, guiLeft + 175 + oX, guiTop + 55 + oY + i * 54, 72 - oX * 2, 14); - GUIScreenRBMKKeyPad.setupTextFieldStandard(rtty[i], 15, graph.graphs[i].minBound ? graph.graphs[i].min + "" : ""); + GUIScreenRBMKKeyPad.setupTextFieldStandard(min[i], 15, graph.graphs[i].minBound ? graph.graphs[i].min + "" : ""); max[i] = new GuiTextField(this.fontRendererObj, guiLeft + 175 + oX, guiTop + 73 + oY + i * 54, 72 - oX * 2, 14); - GUIScreenRBMKKeyPad.setupTextFieldStandard(rtty[i], 15, graph.graphs[i].maxBound ? graph.graphs[i].max + "" : ""); + GUIScreenRBMKKeyPad.setupTextFieldStandard(max[i], 15, graph.graphs[i].maxBound ? graph.graphs[i].max + "" : ""); active[i] = graph.graphs[i].active; polling[i] = graph.graphs[i].polling; @@ -82,8 +82,8 @@ public class GUIScreenRBMKGraph extends GuiScreen { drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); for(int i = 0; i < 2; i++) { - if(this.active[i]) drawTexturedModalRect(guiLeft + 111, guiTop + i * 54 + 54, 18, 114, 16, 16); - if(this.polling[i]) drawTexturedModalRect(guiLeft + 128, guiTop + i * 54 + 53, 0, 114, 18, 18); + if(this.active[i]) drawTexturedModalRect(guiLeft + 111, guiTop + i * 54 + 54, 18, 150, 16, 16); + if(this.polling[i]) drawTexturedModalRect(guiLeft + 128, guiTop + i * 54 + 53, 0, 150, 18, 18); } for(int i = 0; i < 2; i++) { diff --git a/src/main/java/com/hbm/inventory/gui/GUIScreenRBMKTerminal.java b/src/main/java/com/hbm/inventory/gui/GUIScreenRBMKTerminal.java index 18965c358..02745f8da 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIScreenRBMKTerminal.java +++ b/src/main/java/com/hbm/inventory/gui/GUIScreenRBMKTerminal.java @@ -47,6 +47,7 @@ public class GUIScreenRBMKTerminal extends GuiScreen { this.fontRendererObj.drawString("send - Send single signal over selected channel", 2, 22, 0xffffff); this.fontRendererObj.drawString("start - Continuously send signal over selected channel", 2, 32, 0xffffff); this.fontRendererObj.drawString("stop - Stop continuous sending", 2, 42, 0xffffff); + this.fontRendererObj.drawString("clear - Delete command history", 2, 52, 0xffffff); } protected void keyTyped(char c, int b) { diff --git a/src/main/java/com/hbm/tileentity/machine/rbmk/TileEntityRBMKTerminal.java b/src/main/java/com/hbm/tileentity/machine/rbmk/TileEntityRBMKTerminal.java index 0c2a0a0a1..d5655406f 100644 --- a/src/main/java/com/hbm/tileentity/machine/rbmk/TileEntityRBMKTerminal.java +++ b/src/main/java/com/hbm/tileentity/machine/rbmk/TileEntityRBMKTerminal.java @@ -57,12 +57,12 @@ public class TileEntityRBMKTerminal extends TileEntityLoadedBase implements IGUI if(cmd.startsWith("start ")) { this.repeatCmd = cmd.substring(6); - push("Repeating signal on channel " + this.channel); + push("Repeating signal on " + this.channel); this.markChanged(); return; } - if(cmd.startsWith("stop ")) { + if(cmd.equals("stop")) { this.repeatCmd = ""; push("Stopping repeat signal"); this.markChanged(); @@ -75,7 +75,7 @@ public class TileEntityRBMKTerminal extends TileEntityLoadedBase implements IGUI return; } RTTYSystem.broadcast(worldObj, this.channel, cmd.substring(5)); - push("Sent signal on channel " + this.channel); + push("Sent signal on " + this.channel); return; } @@ -94,6 +94,11 @@ public class TileEntityRBMKTerminal extends TileEntityLoadedBase implements IGUI return; } + if(cmd.equals("clear")) { + for(int i = 0; i < history.length; i++) history[i] = ""; + return; + } + push("Unrecognized command!"); } diff --git a/src/main/java/com/hbm/tileentity/network/TileEntityRadioTorchController.java b/src/main/java/com/hbm/tileentity/network/TileEntityRadioTorchController.java index 610958484..b98d51ae8 100644 --- a/src/main/java/com/hbm/tileentity/network/TileEntityRadioTorchController.java +++ b/src/main/java/com/hbm/tileentity/network/TileEntityRadioTorchController.java @@ -22,7 +22,7 @@ public class TileEntityRadioTorchController extends TileEntityLoadedBase impleme public String channel = ""; public String prev; - public boolean polling = false; + public boolean polling = true; @Override public void updateEntity() { @@ -49,7 +49,7 @@ public class TileEntityRadioTorchController extends TileEntityLoadedBase impleme vnt.explode(); return; } - if(this.polling || !rec.equals(prev)) { + if((this.polling && chan.timeStamp >= worldObj.getTotalWorldTime() - 1) || !rec.equals(prev)) { try { if(rec != null && !rec.isEmpty()) ror.runRORFunction(IRORInteractive.PREFIX_FUNCTION + IRORInteractive.getCommand(rec), IRORInteractive.getParams(rec)); } catch(RORFunctionException ex) { }