Commit Graph

14 Commits

Author SHA1 Message Date
uberwald 891769816a Actor sheet -> working !!! 2026-06-06 15:48:18 +02:00
uberwald 9b77a0c552 Fix apv2, WIP 2026-06-06 10:21:24 +02:00
uberwald 6fbc7e7864 fix(actor): check applicationPhase to prevent double effect application
The previous solution used a flag, but it didn't persist across preparation cycles.
This solution checks this.effects.applicationPhase directly.

If phase is 'initial' or 'final', it means effects are already being applied,
so we skip the super.prepareEmbeddedDocuments() call to avoid the
'phase has already completed' error.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-04 23:20:23 +02:00
uberwald 308073877b fix(actor): remove duplicate prepareBaseData method
The previous commit accidentally created a duplicate prepareBaseData() method.
This commit removes the duplicate and keeps only the version with proper
initialization of wound data and combatStatus.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-04 23:15:23 +02:00
uberwald 81adfb7ffd fix(actor): prevent double ActiveEffect application in prepareData cycle
- Move wound data initialization to prepareBaseData() (before effects are applied)
- Initialize combatStatus in prepareBaseData() to prevent undefined errors
- Add protection against recursive effect application in prepareEmbeddedDocuments()
- This prevents the 'ActiveEffect application phase has already completed' error

The error occurred because modify data in prepareDerivedData() (like combatStatus)
could trigger observers that try to re-apply effects during the same cycle.

By initializing all required data in prepareBaseData() and protecting
prepareEmbeddedDocuments() from recursive calls, we ensure effects are
applied exactly once per preparation cycle.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-04 23:14:38 +02:00
uberwald 30d6f71fc7 fix: Correct critical bugs and complete Creature/Group DataModel implementation
- Fix TypeError: controls.find is not a function in hooks.mjs
- Fix undefined 'npc' variable in applications.mjs
- Fix CONFIG.VERMINE.model undefined by checking game.system.template existence
- Fix TypeError: html.find(...).forEach is not a function in roll.mjs
- Fix Cannot set properties of undefined (setting 'initial') in actor.mjs
- Fix Cannot read properties of undefined (reading 'difficulty') in actor.mjs
- Fix ActiveEffect application phase 'initial' already completed by adding combatStatus to base template
- Fix Missing helper: 'select' in roll-dialog.hbs (removed invalid Handlebars select block)
- Add SIZE_LEVELS labels to creatureSizeLevels config
- Add SIZE_LEVELS translations to fr.json
- Add combatStatus to base actor template
- Convert all .html templates to .hbs for Foundry v14 compatibility
- Update item-sheet.mjs to use .hbs extension
- Update handlebars-manager.mjs to use .hbs for all partials

Complete Vermine2047 Creature and Group sheet implementation:
- Creature: Pattern, Size, Role, Pack with computed values
- Group: Totem, Reserve, Morale, Objectives, Members management
- All templates functional with proper styling

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-04 22:22:52 +02:00
Erwan Lemaire c35e93975b pifpouf 2025-05-02 13:19:49 +02:00
Erwan Lemaire d380efeed5 reprise du projet 2025-04-17 14:55:41 +02:00
rwanoux a163528acb indent 2024-06-24 08:56:59 +02:00
François-Xavier Guillois 615148e4f7 kristov condensed versions 2023-09-06 07:45:56 +02:00
François-Xavier Guillois 11b8b01fda v0.1.8 2023-09-05 19:47:02 +02:00
François-Xavier Guillois c376055bf3 refactoring 1 2023-09-05 18:47:36 +02:00
François-Xavier Guillois 2b5e639e9e from totem to vermine - v0.0.12 2023-06-06 11:06:04 +02:00
François-Xavier Guillois fa8e32f4dd boilerplate 2023-04-19 17:10:01 +02:00