Feature/excel import combat equipment#280
Open
Rright7 wants to merge 5 commits into
Open
Conversation
readExcelData now returns { rows, workbook }. parseExcelToActor accepts
an options.workbook arg; when present, downstream parsers can read named
ranges and other sheets that the flat NamedRangesList does not expose.
Modular parsers under excelImporter/combatEquipment/. Read Tabla_Combate named range and the Armadura block, fuzzy-match against the system compendium, and link each ranged weapon to its ammo via system.ammoId.
New world setting NOTIFY_ON_MISSING_EXCEL_MATCH (default ON) plus i18n in es/en/fr. Items without a compendium match are still created from Excel data as fallback.
37 tests across 4 suites. In-memory workbooks built with xlsx.utils so future Excel layout changes (renamed sheet, moved Armadura header) fail with a clear message instead of breaking silently in production.
Setting NOTIFY_ON_MISSING_EXCEL_MATCH already applies to whoever runs the import. Updates es/en/fr strings and a code comment that wrongly implied a GM-only audience.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extiende la importación desde Excel para que el bloque de combate del PJ ya quede relleno automáticamente:
Los items se buscan en el compendio del sistema (
animabf.weapons,animabf.armors) por nombre. Si el Excel usa un nombre que no coincide exactamente con el compendio, se hace match difuso (sin tildes, plural→singular) y hay una pequeña tabla de sinónimos para casos puntuales (p. ej. "Espada a dos manos" → "Mandoble"). Si aún así no hay match, el item se crea con los datos del Excel como fallback y se avisa al playerConfiguración
Nuevo setting
NOTIFY_ON_MISSING_EXCEL_MATCH(default ON): muestra la lista de armas/armaduras/munición del Excel que no se han encontrado en el compendio, para añadir alias o reportarlas.Tests
37 tests cubren los anclajes del Excel (Named Range
Tabla_Combate, headerArmadura, layout 17×10) y el vínculo arma → munición. Si en una futura versión del Excel comunitario cambia algún anclaje del excel, los tests fallan con un mensaje concreto indicando qué tocar.