From 19bb497f06e04e978607a64aae33382ef22196cb Mon Sep 17 00:00:00 2001 From: Miguel Peres Date: Sat, 1 Mar 2025 17:35:35 -0300 Subject: [PATCH] Fixing Bugs - Subsections not being added to the correct master section; Movement Dice and Defense set to ready-only --- Storypath/Storypath.html | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Storypath/Storypath.html b/Storypath/Storypath.html index 4e26c2d7ec..c0cffed21d 100644 --- a/Storypath/Storypath.html +++ b/Storypath/Storypath.html @@ -574,7 +574,7 @@
- +
@@ -582,7 +582,7 @@
- +
@@ -3936,7 +3936,7 @@ const addSubsection = async function(event){ let type = button.replace(/add-/,''); let newID = generateRowID(); k.getAllAttrs({props:[],callback:(attributes,sections,casc)=>{ - addSystemSubSection({type,newID,section,attributes,sections,casc}); + addSystemSubSection({type,newID,section,attributes,sections,casc,masterID:rowID}); k.setActionCalls({attributes,sections}); }}) }; @@ -4903,11 +4903,12 @@ const repeatProcessors = { };/** * Logic for adding the system specific subsections */ -const addSystemSubSection = ({type,newID,section,attributes,sections}) => { +const addSystemSubSection = ({type,newID,section,attributes,sections,masterID}) => { if(/birthright/.test(type)){ addBirthright(attributes,type,newID); }else{ - addChildSection(attributes,sections,section,newID,type,newID) + const rowID = masterID || newID; + addChildSection(attributes,sections,section,rowID,type,newID) } }