Skip to content

Commit

Permalink
Compatibility for Extended Automation
Browse files Browse the repository at this point in the history
  • Loading branch information
ZarestiaDev committed Sep 27, 2022
1 parent 461b1c9 commit bca59b9
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
5 changes: 3 additions & 2 deletions extension.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<root version="3.3" >
<properties>
<name>Feature: Spell Record Actions</name>
<version>2.4</version>
<version>2.5</version>
<loadorder>34</loadorder>
<description>
<text>Spell Record Actions</text>
Expand All @@ -23,7 +23,7 @@

<!-- Kelrugem Extended Automation: 35 -->

<announcement text="https://forge.fantasygrounds.com/shop/items/373/view \n3.5E/PFRPG/5E Spell Record Actions - version 2.4 \nby Zarestia" font="emotefont" icon="sra_icon" />
<announcement text="https://forge.fantasygrounds.com/shop/items/373/view \n3.5E/PFRPG/5E Spell Record Actions - version 2.5 by Zarestia" font="emotefont" icon="sra_icon" />

<base>
<!-- Campaign -->
Expand All @@ -36,6 +36,7 @@
<includefile source="strings/sra_strings.xml" />

<!-- Scripts -->
<script name="CompManagerSRA" file="scripts/manager_compatibility_sra.lua" />
<script name="SRAManager" file="scripts/manager_sra.lua" ruleset="3.5E|PFRPG"/>
<script name="SpellManagerSRA" file="scripts/manager_spell_sra.lua" ruleset="3.5E|PFRPG"/>

Expand Down
7 changes: 7 additions & 0 deletions scripts/manager_compatibility_sra.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
EXTENSIONS = {};

function onInit()
for index, name in pairs(Extension.getExtensions()) do
EXTENSIONS[name] = index;
end
end
5 changes: 5 additions & 0 deletions scripts/manager_spell_sra.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
local getActionAbilityBonusOriginal;

function onInit()
-- check first if we want to rather use Kelrugem's SpellManager implementation
if CompManagerSRA.EXTENSIONS["Full OverlayPackage"] then
return;
end

getActionAbilityBonusOriginal = SpellManager.getActionAbilityBonus;
SpellManager.getActionAbilityBonus = getActionAbilityBonus;
end
Expand Down
5 changes: 0 additions & 5 deletions scripts/manager_sra.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
--
-- Please see the license.html file included with this distribution for
-- attribution and copyright information.
--

function addSRA(nodeSpell)
local sSpellDur = DB.getValue(nodeSpell, "duration", "");
local aDurWords = StringManager.parseWords(sSpellDur);
Expand Down

0 comments on commit bca59b9

Please sign in to comment.