Skip to content

Commit

Permalink
Fixed: Arcane Ward Cast button not showing up due to database node ch…
Browse files Browse the repository at this point in the history
…ange by SW

Update: License
  • Loading branch information
rhagelstrom committed Nov 21, 2024
1 parent 61cd299 commit 3f9c43b
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 144 deletions.
121 changes: 0 additions & 121 deletions LICENSE

This file was deleted.

21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021-2024 MeAndUnique Ryan Hagelstrom

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
12 changes: 6 additions & 6 deletions campaign/scripts/power_item.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-- Author: Ryan Hagelstrom
-- Copyright © 2022
-- This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
-- https://creativecommons.org/licenses/by-sa/4.0/
--
-- Please see the license.txt file included with this distribution for
-- attribution and copyright information.
--
--
-- luacheck: globals onInit onClose optionChange registerCallbacks unRegisterCallbacks onUpdate onDisplayChanged
-- luacheck: globals setCastButton
Expand Down Expand Up @@ -116,7 +116,7 @@ function onDisplayChanged()

local node = getDatabaseNode();
local sGroup = DB.getValue(node, 'group', '');
local sDisplayMode = DB.getValue(node, '...powerdisplaymode', '');
local sDisplayMode = DB.getValue(node, '...powermode', '');
local bProcess = false;
local aCastInfo;

Expand All @@ -130,7 +130,7 @@ function onDisplayChanged()
end
if sDisplayMode == 'summary' then
header.subwindow.button_abjuration.setVisible(false);
elseif sDisplayMode == 'action' and bProcess and (aCastInfo.bSpellcasting or aCastInfo.bPactMagic) and aCastInfo.nLevel > 0 then
elseif (sDisplayMode == 'action' or sDisplayMode == 'combat') and bProcess and (aCastInfo.bSpellcasting or aCastInfo.bPactMagic) and aCastInfo.nLevel > 0 then

Check warning on line 133 in campaign/scripts/power_item.lua

View workflow job for this annotation

GitHub Actions / luacheck

(W631) line is too long (162 > 150)

Check warning on line 133 in campaign/scripts/power_item.lua

View workflow job for this annotation

GitHub Actions / luacheck

(W631) line is too long (162 > 150)
setCastButton(aCastInfo);
else
header.subwindow.button_abjuration.setVisible(false);
Expand Down
8 changes: 4 additions & 4 deletions campaign/scripts/spell_cast.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-- Author: Ryan Hagelstrom
-- Copyright © 2022
-- This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
-- https://creativecommons.org/licenses/by-sa/4.0/
--
-- Please see the license.txt file included with this distribution for
-- attribution and copyright information.
--
--
-- luacheck: globals onInit onClose defaultButton optionChange registerCallbacks unRegisterCallbacks onUpdate setCastToolTip onButtonPress
-- luacheck: globals setAnchor setTooltipText WildMagicSurgeManager WildMagicSurgeManager.doWildMagicCheck
Expand Down
7 changes: 3 additions & 4 deletions ct/scripts/arcane_ward_field.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
-- Author: Shane Parker
-- Copyright © 2023
-- This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
-- https://creativecommons.org/licenses/by-sa/4.0/
--
-- Please see the license.txt file included with this distribution for
-- attribution and copyright information.
--
-- luacheck: globals onInit updateWidget onWheel getArcaneWard setArcaneWard addTextWidget
local nodeWard;
Expand Down
7 changes: 3 additions & 4 deletions ct/scripts/ct_entry.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
-- Author: Ryan Hagelstrom
-- Copyright © 2022
-- This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
-- https://creativecommons.org/licenses/by-sa/4.0/
--
-- Please see the license.txt file included with this distribution for
-- attribution and copyright information.
--
-- luacheck: globals linkPCFields
function linkPCFields()
Expand Down
9 changes: 4 additions & 5 deletions scripts/arcane_ward.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
-- Author: Ryan Hagelstrom
-- Copyright © 2022
-- This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
-- https://creativecommons.org/licenses/by-sa/4.0/
--
-- Please see the license.txt file included with this distribution for
-- attribution and copyright information.
--
-- luacheck: globals ArcaneWard onInit onClose hasCA hasLA hasCG hasSAI castAbjuration parseArcaneWard hasArcaneWard arcaneWard
-- luacheck: globals removeAbsorbed getDBString customApplyDamage customMessageDamage customRest getCurrentCastInfo
Expand Down Expand Up @@ -170,7 +169,7 @@ function parseArcaneWard(rActor)
if StringManager.isWord(aWords[i], 'equal') and StringManager.isWord(aWords[i + 1], 'to') and
StringManager.isWord(aWords[i + 2], 'twice') and StringManager.isWord(aWords[i + 3], 'your') then
aAWParsed['class'] = aWords[i + 4];
elseif StringManager.isWord(aWords[i], '+') and StringManager.isWord(aWords[i + 1], 'your') and
elseif (StringManager.isWord(aWords[i], '+') or StringManager.isWord(aWords[i], 'plus')) and StringManager.isWord(aWords[i + 1], 'your') and

Check warning on line 172 in scripts/arcane_ward.lua

View workflow job for this annotation

GitHub Actions / luacheck

(W631) line is too long (160 > 150)

Check warning on line 172 in scripts/arcane_ward.lua

View workflow job for this annotation

GitHub Actions / luacheck

(W631) line is too long (160 > 150)
StringManager.isWord(aWords[i + 3], 'modifier') then
aAWParsed['modifier'] = aWords[i + 2];
end
Expand Down

0 comments on commit 3f9c43b

Please sign in to comment.