mkscho63 / sta

This is an unofficial system for Foundry VTT using Modiphius's Star Trek Adventures 2d20 RPG. This system attempts to replicate the feeling of playing through an episode of the epic SciFi that is Star Trek. I am in no way associated with Modiphius.
MIT License
32 stars 31 forks source link

Support for Foundry Core v12 #106

Open WesWedding opened 1 month ago

WesWedding commented 1 month ago

Is your feature request related to a problem? Please describe. Foundry v12 just released a stable version, so it's that time again...

Describe the solution you'd like Support v12.

Additional context

Nothing appears broken, only deprecation warnings in logs. Technically speaking, this system (at least at first glance) seems to work in v12 just fine. But there might be issues I'm not aware of because I don't fully utilize the complete feature set of this system.

Blockers

I found nothing found to prevent use of this System in v12.

Tested the character sheet by performing tasks, modifying attributes/disciplines, adding items to inventory.

I have not necessarily tested ALL functionality, just randomly tried things to look for broken behavior in the features I am familiar with.

Non-Blocking

API deprecation warnings

There are a few warnings that will become errors in Version 14. So, they are cans that could be kicked down the road another year (or two?). I don't think there's any security, stability, or performance reasons to consider these blockers.

This is triggered pretty much every character change.

foundry-esm.js:4610 Error: You are accessing globalThis.mergeObject which must now be accessed via foundry.utils.mergeObject
Deprecated since Version 12
Backwards-compatible support will be removed in Version 14
    at Object.logCompatibilityWarning (foundry-esm.js:4598:19)
    at get (foundry-esm.js:65057:25)
    at get defaultOptions (character-sheet.js:6:5)

This warning was triggered when rendering a talent sheet, or other sheets that include a select/dropdown (I see no line for the offending code in this stack).

foundry-esm.js:4610 Error: The {{select}} handlebars helper is deprecated in favor of using the {{selectOptions}} helper or the foundry.applications.fields.createSelectInput, foundry.applications.fields.createMultiSelectElement, or foundry.applications.fields.prepareSelectOptionGroups methods.
Deprecated since Version 12
Backwards-compatible support will be removed in Version 14
    at Object.logCompatibilityWarning (foundry-esm.js:4598:19)
    at Item.select (foundry.js:8257:19)
    at Item.c (handlebars.min.js:27:27865)
    at Object.eval [as main] (eval at createFunctionContext (handlebars.min.js:29:10011), <anonymous>:23:129)
    at c (handlebars.min.js:27:23534)
    at d (handlebars.min.js:27:23849)
    at e (handlebars.min.js:28:30886)
    at renderTemplate (foundry.js:7821:10)
    at async STACharacterWeaponSheet._renderInner (foundry.js:5989:16)
    at async STACharacterWeaponSheet._renderInner (foundry.js:6559:18)
    at async STACharacterWeaponSheet._render (foundry.js:5820:19)
    at async STACharacterWeaponSheet._render (foundry.js:6548:5)
    at async STACharacterWeaponSheet._render (foundry.js:7134:5)

This warning was triggered while modifying belongings of a character.

Error: You are accessing globalThis.isNewerVersion which must now be accessed via foundry.utils.isNewerVersion
Deprecated since Version 12
Backwards-compatible support will be removed in Version 14
    at Object.logCompatibilityWarning (foundry-esm.js:4598:19)
    at get (foundry-esm.js:65057:25)
    at activeDialog.staActor.deleteConfirmDialog.activeDialog (character-sheet.js:281:11)

All error stacks are snipped at the first plugin code line to keep them succinct.

WesWedding commented 3 days ago

There is definitely no functional issue introduced with v12.

Addressing these deprecation notices prior to v14 is probably ill-advised, as I think this would require dropping support for v10 and v11 of core.