diff --git a/module/actor/actor-sheet.js b/module/actor/actor-sheet.js index 27497fc..08428a9 100644 --- a/module/actor/actor-sheet.js +++ b/module/actor/actor-sheet.js @@ -444,6 +444,7 @@ export class MothershipActorSheet extends foundry.appv1.sheets.ActorSheet { const armors = []; const conditions = []; const abilities = []; + const morphForms = []; const persTraits = []; let curWeight = 0; @@ -550,7 +551,11 @@ export class MothershipActorSheet extends foundry.appv1.sheets.ActorSheet { conditions.push(i); } else if (i.type === 'ability') { - abilities.push(i); + if (i.system?.sla?.morphForm) { + morphForms.push(i); + } else { + abilities.push(i); + } } else if (i.type === 'persTrait') { persTraits.push(i); } @@ -587,6 +592,7 @@ export class MothershipActorSheet extends foundry.appv1.sheets.ActorSheet { actorData.weapons = weapons; actorData.conditions = conditions; actorData.abilities = abilities; + actorData.slaMorphForms = morphForms; actorData.persTraits = persTraits.sort((left, right) => String(left?.name ?? "").localeCompare(String(right?.name ?? ""))); } diff --git a/module/windows/sla-character-generator.js b/module/windows/sla-character-generator.js index fdea192..5a41041 100644 --- a/module/windows/sla-character-generator.js +++ b/module/windows/sla-character-generator.js @@ -904,6 +904,11 @@ export class SLAMothershipGenerator extends FormApplication { const worldItem = findWorldItem(morph.name, "ability"); if (worldItem) { const embedded = toEmbeddedData(worldItem); + // Always ensure morphForm flag is set — prevents Ebb enforcement from deleting these + embedded.system ??= {}; + embedded.system.sla ??= {}; + embedded.system.sla.morphForm = true; + embedded.system.sla.isStartingForm = morph.name === startingMorphForm; items.push(embedded); } else { // Build a minimal ability document so the character isn't empty-handed. diff --git a/templates/actor/actor-sheet.html b/templates/actor/actor-sheet.html index 6df6f39..7621416 100644 --- a/templates/actor/actor-sheet.html +++ b/templates/actor/actor-sheet.html @@ -34,7 +34,7 @@