mirror of
https://github.com/Nighthawk42/roll20-character-sheets.git
synced 2026-08-30 03:40:32 +00:00
Fixing Bugs
- Subsections not being added to the correct master section; Movement Dice and Defense set to ready-only
This commit is contained in:
@@ -574,7 +574,7 @@
|
||||
<div class="input-label input-label--button">
|
||||
<button class="roller" name="roll_movement_dice" data-i18n="movement dice" role="heading" aria-level="5" value="@{movement_dice_action}" type="roll">
|
||||
</button>
|
||||
<input class="underlined input-label__input" name="attr_movement_dice" type="number" readonly="" value="1" title="@{movement_dice}"/>
|
||||
<input class="underlined input-label__input" name="attr_movement_dice" type="number" value="1" title="@{movement_dice}"/>
|
||||
</div>
|
||||
<button name="act_movement-dice-action" hidden="" type="action">
|
||||
</button>
|
||||
@@ -582,7 +582,7 @@
|
||||
<div class="input-label input-label--button">
|
||||
<button class="roller" name="roll_defense" role="heading" data-i18n="defense roll" aria-level="5" value="@{defense_action}" type="roll">
|
||||
</button>
|
||||
<input class="underlined input-label__input" name="attr_defense" type="number" readonly="" value="1" title="@{defense}"/>
|
||||
<input class="underlined input-label__input" name="attr_defense" type="number" value="1" title="@{defense}"/>
|
||||
</div>
|
||||
<button name="act_defense-action" hidden="" type="action">
|
||||
</button>
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user