From 46fc4082509561d32e08dc6a77bac8eb4f8ef915 Mon Sep 17 00:00:00 2001 From: Ketho Date: Sun, 26 Nov 2023 00:29:35 +0100 Subject: [PATCH] Update for 10.2.0, 3.4.3, 1.15.0 --- .github/workflows/release.yml | 13 +++++-------- .vscode/settings.json | 15 ++++++++++++++- OwoSpeak.lua | 19 +++++++++++-------- OwoSpeak.toc | 8 ++++---- 4 files changed, 34 insertions(+), 21 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1211593..bc8b757 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,14 +14,11 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - - uses: BigWigsMods/packager@master + - uses: actions/checkout@v3 with: - args: -g classic + fetch-depth: 0 - - uses: BigWigsMods/packager@master + - uses: BigWigsMods/packager@v2 + # automatically generates game type specific TOC files with: - args: -g bc - - - uses: BigWigsMods/packager@master + args: -S diff --git a/.vscode/settings.json b/.vscode/settings.json index bb0abde..65788f3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,18 @@ { "Lua.diagnostics.globals": [ - "SlashCmdList" + "SlashCmdList", + "CreateFrame", + "tinsert", + "wipe", + "CopyTable", + "random", + "format", + "gmatch", + "print", + "tonumber", + "pairs", + "string", + "GetChannelName", + "table" ] } \ No newline at end of file diff --git a/OwoSpeak.lua b/OwoSpeak.lua index 40496a3..04093d8 100644 --- a/OwoSpeak.lua +++ b/OwoSpeak.lua @@ -71,7 +71,7 @@ end local function ShouldOwoTwo(chatType, channel) if chatType == "CHANNEL" then - id, channelName = GetChannelName(channel) + local id, channelName = GetChannelName(channel) for key, value in pairs(blockedChannels) do if channelName == value then @@ -87,6 +87,10 @@ end local makeowo = SendChatMessage function SendChatMessage(msg, chatType, language, channel) + -- im so sowwy meo + if msg == "GHI2ChannelReadyCheck" then + return + end if ShouldOwo(chatType) and ShouldOwoTwo(chatType, channel) then wipe(hyperlinks) local owo = owos[random(#owos)] @@ -105,7 +109,7 @@ function SendChatMessage(msg, chatType, language, channel) return 'w' .. following end end) - + s = s:gsub("([LR])([%S]*S?)", function(L, following) if L == 'R' and following == 'S' then return 'R' .. following @@ -123,10 +127,9 @@ function SendChatMessage(msg, chatType, language, channel) s = s:gsub("([fps])([aeio]%w+)", "%1w%2") or s s = s:gsub("n([aeiou]%w)", "ny%1") or s s = s:gsub(" th", " d") or s - -- y-you awe such a b-baka s = format(" %s ", s) for k in gmatch(s, "%a+") do - if random(10) == 1 then + if random(12) == 1 then local firstChar = k:sub(1, 1) s = s:gsub(format(" %s ", k), format(" %s-%s ", firstChar, k)) end @@ -153,7 +156,7 @@ end SLASH_OWOSPEAK1 = "/owo" SLASH_OWOSPEAK2 = "/owospeak" -function tablefind(tab,el) +local function tablefind(tab,el) for index, value in pairs(tab) do if value == el then return index @@ -172,7 +175,7 @@ SlashCmdList.OWOSPEAK = function(msg) db.whisper = not db.whisper PrintMessage("Whisper - "..EnabledMsg[db.whisper]) elseif string.find(msg, "add") then - exploded = {} + local exploded = {} for substring in string.gmatch(msg, "[^%s]+") do table.insert(exploded, substring) end @@ -183,8 +186,8 @@ SlashCmdList.OWOSPEAK = function(msg) PrintMessage("You must provide a channel name to block.") end elseif string.find(msg, "remove") then - exploded = {} - foundAndRemoved = false + local exploded = {} + local foundAndRemoved = false for substring in string.gmatch(msg, "[^%s]+") do table.insert(exploded, substring) end diff --git a/OwoSpeak.toc b/OwoSpeak.toc index aa46064..e3c8af9 100644 --- a/OwoSpeak.toc +++ b/OwoSpeak.toc @@ -1,8 +1,8 @@ -## Interface-Retail: 90207 -## Interface-Classic: 11307 -## Interface-BC: 20501 +## Interface-Retail: 100200 +## Interface-Wrath: 30403 +## Interface-Classic: 11404 ## Version: @project-version@ -## Version: 1.0.9 +## Version: 1.1.0 ## Title: OwoSpeak ## Notes: Pwease owo wesponsibwy ## Author: Ketho