Skip to content

Commit

Permalink
Merge pull request #16 from Lionas/develop
Browse files Browse the repository at this point in the history
v0.6.1リリース
  • Loading branch information
Lionas authored Aug 21, 2016
2 parents 4e63aed + c864893 commit 63a12bc
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 18 deletions.
18 changes: 10 additions & 8 deletions LionasFoodAndDrinkReminder/Lang/de.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ ZO_CreateStringId("LIO_FADR_NEAR_EXPIRE_HOUR_MIN", "Die Mahlzeit läuft in <<1>>
ZO_CreateStringId("LIO_FADR_NEAR_EXPIRE_MIN", "Die Mahlzeit läuft in <<1>>min aus.")
ZO_CreateStringId("LIO_FADR_NEAR_EXPIRE_CLOSED", "Die Mahlzeit läuft bald aus.")
ZO_CreateStringId("LIO_FADR_NEAR_EXPIRED", "Du hast den Wirkung der Mahlzeit verloren!")

ZO_CreateStringId("LIO_FADR_SHOULD_EAT_DRINK", "Es ist keine Mahlzeit aktiv!")

-- menus
Expand All @@ -28,12 +27,15 @@ ZO_CreateStringId("LIO_FADR_NOTIFY_BY_ZONE_CHANGING_TITLE", "Erinnerung nach Zon
ZO_CreateStringId("LIO_FADR_NOTIFY_BY_ZONE_CHANGING_TOOLTIP", "Nach jedem Zonenwechsel bekommst du eine Erinnerung über den Zustand deiner Mahlzeit.")
ZO_CreateStringId("LIO_FADR_NOTIFY_COOLDOWN_TITLE", "Zeit zwischen Meldungen [sek]")
ZO_CreateStringId("LIO_FADR_NOTIFY_COOLDOWN_TOOLTIP", "Falls Mitteilungen in dieser Zeit vorkommen sollten, werden diese nicht wiedergegeben.")
ZO_CreateStringId("LIO_FADR_DEBUG_TITLE", "Ermöglichen Sie Fehlersuchprogramm-Produktion")
ZO_CreateStringId("LIO_FADR_DEBUG_TOOLTIP", "Wenn Probleme vorgekommen werden, überprüfen Sie bitte für den Bericht.")

ZO_CreateStringId("LIO_FADR_TOP_SETTING_HEADER", "General")
ZO_CreateStringId("LIO_FADR_ZONE_SETTING_HEADER", "Zone ändern")
ZO_CreateStringId("LIO_FADR_DEBUG_SETTING_HEADER", "für das Fehlersuchprogramm")
ZO_CreateStringId("LIO_FADR_DEBUG_TITLE", "aktiviere Debug Modus")
ZO_CreateStringId("LIO_FADR_DEBUG_TOOLTIP", "Falls es gewisse Probleme gibt, kann man mit dem Debug Modus die entsprechenden Informationen auslesen.")

ZO_CreateStringId("LIO_FADR_TOP_SETTING_HEADER", "Allgemeines")
ZO_CreateStringId("LIO_FADR_ZONE_SETTING_HEADER", "Meldungen in Zone")
ZO_CreateStringId("LIO_FADR_DEBUG_SETTING_HEADER", "Fehlersuche")

ZO_CreateStringId("LIO_FADR_ENABLE_NONE_TITLE", "Notify even if buff is already expired")
ZO_CreateStringId("LIO_FADR_ENABLE_NONE_TOOLTIP", "If you want to be notified immediately when your character is active or when you moved zone or entered the dungeon after meals buff expired, please check out.")

-- keybinds
ZO_CreateStringId("SI_BINDING_NAME_LIO_FADR_ACTIVATE", "Aktiviere/Deaktiviere Meldung")
ZO_CreateStringId("SI_BINDING_NAME_LIO_FADR_ACTIVATE", "Aktiviere/Deaktiviere Meldung")
3 changes: 3 additions & 0 deletions LionasFoodAndDrinkReminder/Lang/en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,8 @@ ZO_CreateStringId("LIO_FADR_TOP_SETTING_HEADER", "General")
ZO_CreateStringId("LIO_FADR_ZONE_SETTING_HEADER", "Zone Change")
ZO_CreateStringId("LIO_FADR_DEBUG_SETTING_HEADER", "For debug")

ZO_CreateStringId("LIO_FADR_ENABLE_NONE_TITLE", "Notify even if buff is already expired")
ZO_CreateStringId("LIO_FADR_ENABLE_NONE_TOOLTIP", "If you want to be notified immediately when your character is active or when you moved zone or entered the dungeon after meals buff expired, please check out.")

-- keybinds
ZO_CreateStringId("SI_BINDING_NAME_LIO_FADR_ACTIVATE", "Enable/Disable Notify")
3 changes: 3 additions & 0 deletions LionasFoodAndDrinkReminder/Lang/jp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,8 @@ ZO_CreateStringId("LIO_FADR_TOP_SETTINGHEADER", "全体設定")
ZO_CreateStringId("LIO_FADR_ZONE_SETTING_HEADER", "ゾーン移動")
ZO_CreateStringId("LIO_FADR_DEBUG_SETTING_HEADER", "デバッグ用")

ZO_CreateStringId("LIO_FADR_ENABLE_NONE_TITLE", "既に効果が切れている場合に通知する")
ZO_CreateStringId("LIO_FADR_ENABLE_NONE_TOOLTIP", "ログイン直後や効果が切れた後にゾーン移動やダンジョンに出入りした時に、通知する場合にチェックしてください")

-- keybinds
ZO_CreateStringId("SI_BINDING_NAME_LIO_FADR_ACTIVATE", "通知の切り替え")
12 changes: 10 additions & 2 deletions LionasFoodAndDrinkReminder/LionasFoodAndDrinkReminder.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ LioFADR = {
isZoneChanged = false, -- ゾーン変更したかどうか
cooldownSec = 60, -- クールダウン時間(秒)
lastNotifyTime = 0, -- 最後に通知した時間
enableNotifyAlreadyNone = true, -- 既に効果が切れている時に通知するかどうか
},
debug = false, -- デバッグ出力用
}
Expand Down Expand Up @@ -74,6 +75,7 @@ local function initializePrefs()
cooldownSec = LioFADR.default.cooldownSec,
lastNotifyTime = LioFADR.default.lastNotifyTime,
debug = LioFADR.default.debug,
enableNotifyAlreadyNone = LioFADR.default.enableNotifyAlreadyNone,
}
)

Expand Down Expand Up @@ -133,6 +135,9 @@ local function buildNotifyMessage(remainSec, buffName)

else
-- 食事の効果が切れました!
-- 連続で通知しないように、通知済みテーブルに追加と削除
LioFADRCommon.insertTable(LioFADR.notifyExpired, EXPIRED_DUMMY_ID)

return LioFADRCommon.getColoredString(ATTENTION_COLOR, GetString(LIO_FADR_NEAR_EXPIRED))

end
Expand Down Expand Up @@ -308,8 +313,11 @@ local function scanBuffs()
-- 効果が切れたバフの通知
notifyExpiredBuffs(currentBuffs)

-- 効果がない時で、戦闘中でない場合、「食事の効果を発動してください」のメッセージをVanilla UI上で表示する
if (LioFADRCommon.getTableLength(currentBuffs) == 0) and (not IsUnitInCombat(PLAYER_TAG)) and (not LioFADRCommon.isContain(EXPIRED_DUMMY_ID, LioFADR.notifyExpired)) then
-- 効果がない時で、戦闘中でない場合、「食事の効果がありません」のメッセージをVanilla UI上で表示する
if (LioFADR.savedVariables.enableNotifyAlreadyNone and
LioFADRCommon.getTableLength(currentBuffs) == 0) and
(not IsUnitInCombat(PLAYER_TAG)) and
(not LioFADRCommon.isContain(EXPIRED_DUMMY_ID, LioFADR.notifyExpired)) then

-- 通知
local message = GetString(LIO_FADR_SHOULD_EAT_DRINK)
Expand Down
4 changes: 2 additions & 2 deletions LionasFoodAndDrinkReminder/LionasFoodAndDrinkReminder.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

## Title: Lionas's Food and Drink Reminder v0.6.0
## Title: Lionas's Food and Drink Reminder v0.6.1
## APIVersion: 100016
## Version: 0.6.0
## Version: 0.6.1
## Author: Lionas
## Description: Notify for food and drink when you entered in dungeon and expired.
## OptionalDependsOn: LibStub LibAddonMenu-2.0
Expand Down
27 changes: 21 additions & 6 deletions LionasFoodAndDrinkReminder/LionasFoodAndDrinkReminderMenu.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-- Lionas's Food & Drink Reminder
-- Author: Lionas
local PanelTitle = "Lionas's Food & Drink Reminder"
local Version = "0.6.0"
local Version = "0.6.1"
local Author = "Lionas"

local LAM2 = LibStub:GetLibrary("LibAddonMenu-2.0")
Expand Down Expand Up @@ -97,11 +97,26 @@ function LioFADRMenu.LoadLAM2Panel()
LioFADR.savedVariables.enableToChat = value
end,
},
[7] = {
[7] =
{
type = "checkbox",
name = GetString(LIO_FADR_ENABLE_NONE_TITLE),
tooltip = GetString(LIO_FADR_ENABLE_NONE_TOOLTIP),
default = LioFADR.savedVariables.enableNotifyAlreadyNone,
getFunc =
function()
return LioFADR.savedVariables.enableNotifyAlreadyNone
end,
setFunc =
function(value)
LioFADR.savedVariables.enableNotifyAlreadyNone = value
end,
},
[8] = {
type = "header",
name = GetString(LIO_FADR_ZONE_SETTING_HEADER)
},
[8] =
[9] =
{
type = "checkbox",
name = GetString(LIO_FADR_NOTIFY_BY_ZONE_CHANGING_TITLE),
Expand All @@ -116,7 +131,7 @@ function LioFADRMenu.LoadLAM2Panel()
LioFADR.savedVariables.notifyByZoneChanging = value
end,
},
[9] =
[10] =
{
type = "slider",
name = GetString(LIO_FADR_NOTIFY_COOLDOWN_TITLE),
Expand All @@ -134,11 +149,11 @@ function LioFADRMenu.LoadLAM2Panel()
LioFADR.savedVariables.cooldownSec = value
end,
},
[10] = {
[11] = {
type = "header",
name = GetString(LIO_FADR_DEBUG_SETTING_HEADER)
},
[11] =
[12] =
{
type = "checkbox",
name = GetString(LIO_FADR_DEBUG_TITLE),
Expand Down

0 comments on commit 63a12bc

Please sign in to comment.