Skip to content

Commit

Permalink
Merge pull request #1 from ZarestiaDev/test
Browse files Browse the repository at this point in the history
Feb-2023 update
  • Loading branch information
ZarestiaDev committed Feb 24, 2023
2 parents e360e4a + 753e8ba commit 71ab848
Show file tree
Hide file tree
Showing 86 changed files with 1,108 additions and 2,213 deletions.
4 changes: 3 additions & 1 deletion base.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@
<includefile source="campaign/record_deity.xml" />
<includefile source="campaign/record_talent.xml" />

<includefile source="campaign/record_power_item.xml" />

<!-- Combat tracker -->
<includefile source="ct/template_ct.xml" />
<includefile source="ct/ct_host.xml" />
Expand Down Expand Up @@ -120,6 +122,7 @@
<script name="CharClassManager" file="scripts/manager_char_class.lua" />
<script name="CombatManager2" file="scripts/manager_combat2.lua" />
<script name="EffectManagerFFd20" file="scripts/manager_effect_FFd20.lua" />
<script name="PowerManagerFFd20" file="scripts/manager_power_FFd20.lua" />
<script name="ItemManager2" file="scripts/manager_item2.lua" />
<script name="PartyManager2" file="scripts/manager_ps2.lua" />
<script name="SpellManager" file="scripts/manager_spell.lua" />
Expand All @@ -133,7 +136,6 @@
<script name="ActionSkill" file="scripts/manager_action_skill.lua" />
<script name="ActionSave" file="scripts/manager_action_save.lua" />
<script name="ActionSpell" file="scripts/manager_action_spell.lua" />

<script name="ActionAdvantage" file="scripts/manager_action_advantage.lua" />

<!-- Import -->
Expand Down
14 changes: 5 additions & 9 deletions campaign/record_char_actions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@

<button_iedit name="actions_iedit">
<anchored to="actionframe" position="insidebottomright" offset="15,15" />
<script>
function onValueChanged()
window.actions.subwindow.update();
end
</script>
</button_iedit>
<buttoncontrol name="spellclass_iadd">
<anchored to="actions_iedit" position="lefthigh" offset="5,0" width="20" height="20" />
Expand Down Expand Up @@ -158,19 +153,19 @@
<top />
<right anchor="left" offset="-5" />
</anchored>
<editmode>actions_iedit</editmode>
</button_idelete>
<buttoncontrol name="activatedetail">
<button_details name="activatedetail">
<anchored to="rightanchor" width="20" height="20">
<top />
<right anchor="left" relation="relative" offset="-3" />
</anchored>
<state icon="button_details" pressed="button_details_down" />
<script>
function onButtonPress()
Interface.openWindow("char_weapon_editor", window.getDatabaseNode());
end
</script>
</buttoncontrol>
</button_details>

<simplestringc name="damageview">
<anchored to="rightanchor" width="100">
Expand Down Expand Up @@ -459,7 +454,7 @@
</header_column>
<button_iedit name="list_iedit">
<anchored to="header_damage" position="insidetopright" offset="-5,0" />
<target>list</target>
<edittarget>list</edittarget>
</button_iedit>
<button_iadd name="list_iadd">
<anchored to="list_iedit" position="lefthigh" offset="5,0" />
Expand Down Expand Up @@ -526,6 +521,7 @@
<top />
<right anchor="left" relation="relative" offset="-5" />
</anchored>
<editmode>list_iedit</editmode>
</button_idelete>

<basicdice name="dice">
Expand Down
4 changes: 2 additions & 2 deletions campaign/record_char_combat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@
<script>
function onSourceUpdate()
local nMaxMod = -1;
local bMaxActive = sources["encumbrance.armormaxstatbonusactive"].getValue();
local bMaxActive = DB.getValue(sources["encumbrance.armormaxstatbonusactive"]);
if bMaxActive &gt; 0 then
nMaxMod = sources["encumbrance.armormaxstatbonus"].getValue();
nMaxMod = DB.getValue(sources["encumbrance.armormaxstatbonus"]);
end

local nAbility = getAbilityBonus(nMaxMod);
Expand Down
11 changes: 5 additions & 6 deletions campaign/record_char_inventory.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,17 @@
<anchored to="encumbrancepushordrag" />
<static textres="char_label_invencdrag" />
</label_fieldtop>
<buttoncontrol name="button_encumbrance">
<anchored to="encumbrancepushordrag" width="20" height="20">
<button_details name="button_encumbrance">
<anchored to="encumbrancepushordrag">
<bottom anchor="top" />
<left anchor="right" />
</anchored>
<state icon="button_details" pressed="button_details_down" />
<script>
function onButtonPress()
Interface.openWindow("charsheet_encumbrance", window.getDatabaseNode());
end
</script>
</buttoncontrol>
</button_details>
</sheetdata>
</windowclass>

Expand All @@ -150,9 +149,9 @@
<dynamic />
</sizelimits>
<sheetdata>
<windowtitlebar_char name="title">
<windowtitlebar_charsheethelper name="title">
<prefix>char_encumbrance_title</prefix>
</windowtitlebar_char>
</windowtitlebar_charsheethelper>
<anchor_title_charsheethelper name="contentanchor" />

<frame_char name="encadjframe">
Expand Down
14 changes: 7 additions & 7 deletions campaign/record_char_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -468,9 +468,9 @@
</sizelimits>
<script file="campaign/scripts/char_classes.lua" />
<sheetdata>
<windowtitlebar_char name="title">
<windowtitlebar_charsheethelper name="title">
<prefix>char_classes_title</prefix>
</windowtitlebar_char>
</windowtitlebar_charsheethelper>
<anchor_title_charsheethelper name="contentanchor" />

<frame_char name="levelframe">
Expand Down Expand Up @@ -634,7 +634,7 @@
</sizelimits>
<script>
function action(draginfo)
local nodeChar = getDatabaseNode().getChild("...")
local nodeChar = DB.getChild(getDatabaseNode(), "...");
local rActor = ActorManager.resolveActor(nodeChar);

ActionRecovery.performRoll(draginfo, rActor, getDatabaseNode());
Expand Down Expand Up @@ -744,16 +744,16 @@
<script file="campaign/scripts/char_main.lua" />
<frame>charsheethelper</frame>
<placement>
<size width="380" height="130" />
<size width="400" height="130" />
</placement>
<sizelimits>
<minimum width="380" height="130" />
<minimum width="400" height="130" />
<dynamic />
</sizelimits>
<sheetdata>
<windowtitlebar_char name="title">
<windowtitlebar_charsheethelper name="title">
<prefix>hitpoints</prefix>
</windowtitlebar_char>
</windowtitlebar_charsheethelper>
<anchor_title_charsheethelper name="contentanchor" />

<frame_char name="hpdetailframe">
Expand Down
21 changes: 4 additions & 17 deletions campaign/record_char_skills.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,6 @@
</simplenumber>
<button_iedit name="skills_iedit">
<anchored to="skillpointframe" position="insidetopright" offset="25,15" />
<target>skills</target>
<script>
function onValueChanged()
local bEdit = (getValue() == 1);

window.skills.update();
end
</script>
</button_iedit>
<buttoncontrol name="skills_iadd_profession">
<anchored to="skills_iedit" position="lefthigh" offset="5,0" width="20" height="20" />
Expand Down Expand Up @@ -110,14 +102,9 @@
</anchored>
<invisible />
</genericcontrol>
<genericcontrol name="idelete_header">
<anchored to="rightanchor" width="20" height="20">
<top />
<right anchor="left" relation="relative" offset="-2" />
</anchored>
<disabled />
<invisible />
</genericcontrol>
<spacer_header_idelete name="idelete_header">
<editmode>skills_iedit</editmode>
</spacer_header_idelete>
<label>
<anchored to="rightanchor" width="44">
<top />
Expand Down Expand Up @@ -191,7 +178,7 @@
<bounds>22,8,12,12</bounds>
<script>
function onValueChanged()
CharManager.updateSkillPoints(window.getDatabaseNode().getChild("..."));
CharManager.updateSkillPoints(DB.getChild(window.getDatabaseNode(), "..."));
end
</script>
</button_checkbox>
Expand Down
2 changes: 1 addition & 1 deletion campaign/record_feat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
function update()
local bReadOnly = WindowManager.getReadOnlyState(getDatabaseNode());
if bReadOnly then
type_biglabel.setValue("[" .. type.getValue() .. "]");
type_biglabel.setValue(string.format("[%s]", type.getValue()));
type_biglabel.setVisible(true);

type.update(bReadOnly, true);
Expand Down
14 changes: 5 additions & 9 deletions campaign/record_npc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@
<target>spellclasslist,levels,spells</target>
<togglelevel>2</togglelevel>
</button_collapse>
<buttoncontrol name="spellclasslist_iadd">
<buttoncontrol name="spellclass_iadd">
<anchored position="insidetopright" offset="35,2" width="20" height="20" />
<icon normal="button_star" pressed="button_star_down" />
<invisible />
Expand All @@ -602,15 +602,10 @@
end
</script>
</buttoncontrol>
<button_iedit name="spellclasslist_iedit">
<button_iedit name="actions_iedit">
<anchored position="insidetopright" offset="5,2" width="20" height="20" />
<target>spellclasslist</target>
<invisible />
<script>
function onValueChanged()
window.spellclasslist.update();
end
</script>
</button_iedit>

<list_spellclass name="spellclasslist">
Expand All @@ -619,8 +614,9 @@
<npc />
<script>
function onInit()
super.onInit();
registerMenuItem(Interface.getString("menu_addspellclass"), "insert", 5);
if super and super.onInit then
super.onInit();
end
end

function onMenuSelection(selection)
Expand Down
55 changes: 55 additions & 0 deletions campaign/record_power_item.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="iso-8859-1"?>

<!--
Please see the LICENSE.md file included with this distribution for
attribution and copyright information.
-->

<root>
<windowclass name="power_item_header">
<margins control="0,0,0,2" />
<sheetdata>
<anchor_poweritem_header_left name="leftanchor" />
<genericcontrol name="usespacer">
<anchored to="leftanchor" width="10" height="20">
<top />
<left anchor="right" relation="relative" />
</anchored>
</genericcontrol>
<icon_usepower name="usepower">
<anchored to="leftanchor">
<top />
<left anchor="right" relation="relative" />
</anchored>
</icon_usepower>

<string_poweritem_header_name name="name">
<empty textres="library_recordtype_empty_spell" />
<script>
function onDragStart(button, x, y, draginfo)
local node = window.getDatabaseNode();
if not node then
return false;
end

local nLevel = 0;
local nodeSpellLevel = DB.getChild(node, "...");
if nodeSpellLevel then
nLevel = tonumber(string.sub(DB.getName(nodeSpellLevel), 6)) or 0;
end

draginfo.setType("spellmove");
draginfo.setStringData(getValue());
draginfo.setNumberData(nLevel);
draginfo.setDatabaseNode(node);

return true;
end
</script>
</string_poweritem_header_name>

<anchor_poweritem_header_right name="rightanchor" />
<list_poweraction_mini name="actionsmini" />
</sheetdata>
</windowclass>
</root>
25 changes: 9 additions & 16 deletions campaign/record_quest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,22 @@
-->

<root>
<windowclass name="quest_stats">
<windowclass name="quest_stats" merge="join">
<script>
function onInit()
update();
end
function update()
super.update();

local bReadOnly = WindowManager.getReadOnlyState(getDatabaseNode());

type.setReadOnly(bReadOnly);
level.setReadOnly(bReadOnly);
xp.setReadOnly(bReadOnly);
description.setReadOnly(bReadOnly);
end
</script>
<sheetdata>
<anchor_column name="columnanchor" />

<label_column name="type_label">
<label_column name="type_label" insertbefore="description">
<static textres="type" />
</label_column>
<button_stringcycler name="type">
<button_stringcycler name="type" insertbefore="description">
<anchored width="50">
<left offset="97" />
<top parent="columnanchor" anchor="bottom" relation="relative" offset="7" />
Expand All @@ -39,19 +34,17 @@
</parameters>
</button_stringcycler>

<label_column name="level_label">
<label_column name="level_label" insertbefore="description">
<static textres="level" />
</label_column>
<number_column name="level" />
<number_column name="level" insertbefore="description" />

<label_column name="xp_label">
<label_column name="xp_label" insertbefore="description">
<static textres="quest_label_xp" />
</label_column>
<number_column name="xp">
<number_column name="xp" insertbefore="description">
<anchored width="65" />
</number_column>

<ft_columnh name="description" />
</sheetdata>
</windowclass>
</root>
2 changes: 1 addition & 1 deletion campaign/record_skill.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
if armorcheckpenalty.getValue() ~= 0 then
table.insert(aLabel, "Armor check penalty");
end
type_label.setValue("[" .. table.concat(aLabel, "; ") .. "]");
type_label.setValue(string.format("[%s]", table.concat(aLabel, "; ")));
type_label.setVisible(true);

ability.update(bReadOnly, true);
Expand Down
Loading

0 comments on commit 71ab848

Please sign in to comment.