unsoluble / smalltime

A small FoundryVTT module for displaying and controlling the current time of day.
MIT License
24 stars 15 forks source link

[Bug] Warnings in console slows FVTT #207

Closed VirusNik21 closed 1 month ago

VirusNik21 commented 2 months ago

Hello. Enabling the Moonlight Adjustment setting in the scene settings causes warnings in the console that grow over time - after a while this causes FVTT to slow down. Here is the text of the error:

foundry-esm.js:4621 Error: You are accessing Scene#globalLightThreshold which has been migrated to Scene#environment.globalLight.darkness.max Deprecated since Version 12 Backwards-compatible support will be removed in Version 14 at logCompatibilityWarning (foundry-esm.js:4609:19) at Scene._logDataFieldMigration (foundry-esm.js:12102:14) at Scene.get (foundry-esm.js:15681:30) at Helpers.adjustMoonlight (helpers.mjs:749:45) at Object.fn (smalltime-app.mjs:1122:17)

Apparently the problem is that in V12 the scene hue settings were moved to the Environment tab.

unsoluble commented 1 month ago

Thanks for catching this! Should be fixed in 1.20.2