From 3501809446e3fc54fbe487ea97e2d80fcc95b328 Mon Sep 17 00:00:00 2001 From: Matt Wagner Date: Sun, 20 Jun 2021 15:06:27 -0700 Subject: [PATCH] Add osay to local chat tab --- src/scripts/layout/layout.lua | 16 ++++++++++++---- src/triggers/chat/triggers.json | 12 ++++++++++++ 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/scripts/layout/layout.lua b/src/scripts/layout/layout.lua index a198229..ebb9e56 100644 --- a/src/scripts/layout/layout.lua +++ b/src/scripts/layout/layout.lua @@ -75,6 +75,16 @@ function lotj.layout.resizeTabContents(parentContainer, tabContainer, contentsCo contentsContainer:resize(nil, newHeight) end +function setSizeOnResize() + local newBorder = math.floor(lotj.layout.rightPanel:get_width()) + if getBorderRight() ~= newBorder then + setBorderRight(newBorder) + -- We could do this following line if we want the main window to set its text wrapping automatically. + -- As-is, players will need to edit their mudlet settings to control this. + -- setWindowWrap("main", getColumnCount("main")-3) + end +end + function lotj.layout.setup() if lotj.layout.drawn then return end @@ -84,11 +94,9 @@ function lotj.layout.setup() y = 0, height = "100%", }) lotj.setup.registerEventHandler("sysWindowResizeEvent", function() - local newBorder = math.floor(lotj.layout.rightPanel:get_width()) - if getBorderRight() ~= newBorder then - setBorderRight(newBorder) - end + setSizeOnResize() end) + setSizeOnResize() -- Upper-right pane, for maps diff --git a/src/triggers/chat/triggers.json b/src/triggers/chat/triggers.json index 5a691c7..d8f2d47 100644 --- a/src/triggers/chat/triggers.json +++ b/src/triggers/chat/triggers.json @@ -18,6 +18,14 @@ "pattern": "^'.*' you .*(say|ask|exclaim)(, in .+)?.$", "type": "regex" }, + { + "pattern": "^\\(OOC\\) You say '.*'$", + "type": "regex" + }, + { + "pattern": "^\\(OOC\\) .* says '.*'$", + "type": "regex" + }, { "pattern": "^.+ speaks in your mind '.*'$", "type": "regex" @@ -98,6 +106,10 @@ "pattern": "^CouncilNet\\[.*\\]: .*$", "type": "regex" }, + { + "pattern": "^\\(R\\|P\\|C\\) .*: .*$", + "type": "regex" + }, { "pattern": "^\\(R\\|P\\|C\\) .* '.*'$", "type": "regex"