Skip to content

Commit

Permalink
Shadowlands pre-patch update
Browse files Browse the repository at this point in the history
  • Loading branch information
Ketho committed Oct 20, 2020
1 parent 1965a9e commit 0552a32
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 5 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release AddOn

on:
push:
tags:
- '**'

env:
CF_API_KEY: ${{ secrets.CF_API_KEY }}
WOWI_API_TOKEN: ${{ secrets.WOWI_API_TOKEN }}
GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }}

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- uses: BigWigsMods/packager@master
with:
args: -g 1.13.5

- uses: BigWigsMods/packager@master
20 changes: 17 additions & 3 deletions SimpleDing.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ local args = {}
S.player = {
name = UnitName("player"),
level = UnitLevel("player"),
maxlevel = MAX_PLAYER_LEVEL_TABLE[GetExpansionLevel()],
maxlevel = GetMaxLevelForPlayerExpansion(),
}
local player = S.player

Expand Down Expand Up @@ -93,6 +93,20 @@ local function LevelText(isPreview)
return ReplaceArgs(msg, args)
end

local requiresHw = {
SAY = true,
YELL = true,
CHANNEL = true,
}

local function CanSendChatMessage(chatType)
local _, instanceType = IsInInstance()
if instanceType == "none" and requiresHw[chatType or "SAY"] then
return false
end
return true
end

local defaults = {
db_version = 2, -- update this on savedvars changes
ChatSay = true,
Expand All @@ -112,7 +126,7 @@ local options = {
args = {
ChatSay = {
type = "toggle", order = 1,
width = "full", desc = "Announces to /say. If disabled, shows a message in the center of your screen instead",
width = "full", desc = "Announces to |cff71D5FF/say|r. Otherwise shows a message in the center of your screen",
name = "|TInterface\\ChatFrame\\UI-ChatIcon-Chat-Up:16:16|t "..SAY,
},
ChatGuild = {
Expand Down Expand Up @@ -197,7 +211,7 @@ function f:TIME_PLAYED_MSG(...)
S.LevelTime = curTPM2 + (S.totalTPM - totalTPM2)
local text = LevelText()

if db.ChatSay then
if db.ChatSay and CanSendChatMessage() then
SendChatMessage(text)
else
RaidNotice_AddMessage(RaidWarningFrame, text, {r=1, g=1, b=0})
Expand Down
4 changes: 2 additions & 2 deletions SimpleDing.toc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#@retail@
## Interface: 80200
## Interface: 90001
#@end-retail@
#@non-retail@
# ## Interface: 11302
# ## Interface: 11305
#@end-non-retail@
## Version: @project-version@
## Title: SimpleDing
Expand Down

0 comments on commit 0552a32

Please sign in to comment.