bmarian / token-tooltip-alt

A module that adds a tooltip next to the currently hovered token to show some useful information for players and DMs.
MIT License
9 stars 15 forks source link

[BUG] Use of PlaceObject#getFlag #82

Closed profounddark closed 3 years ago

profounddark commented 3 years ago

Describe the bug Whenever a ToolTip is revealed or hidden, it send the following warning to the JavaScript console: "You are calling PlaceableObject#getFlag which has been deprecated in favor of Document#getFlag. Support will be removed in 0.9.0"

To Reproduce Steps to reproduce the behavior:

  1. Open JS Console
  2. Cause a ToolTip to appear, either by hovering over a token or using the ALT key.

Please complete the following information:

Additional context This does not currently affect functionality, other than flooding the JS Console with deprecation warnings. However, if the warning is to be believed, this will break with the module with the release of 0.9.0

An export of your tooltip settings Please provide an export of your settings, found by going into the Tooltip manger and clicking Export.

{"gmSettings":{"default":{"items":[{"disposition":"FRIENDLY","items":[{"value":"{ \n\thp=<attributes.hp.value>;\n\thpm=<attributes.hp.max>;\n\thpt=<attributes.hp.temp>;\n\thpt=compareText(typeOf(hpt), \"null\") == 0 ? 0 : hpt;\n\tconcat(string(hp + hpt), \"/\", string(hpm))\n}","icon":"fa-heart","isFunction":false,"expression":true,"isNumber":false,"color":"#ff2600"},{"value":"{     ac=<attributes.ac.value>;     concat(string(ac), \" AC\") }","icon":"fa-shield-alt","isFunction":false,"expression":true,"isNumber":false,"color":"#008f00"},{"value":"{     percept=<attributes.perception.value>;     concat(string(percept), \" Per\") }","icon":"fa-eye","isFunction":false,"expression":true,"isNumber":false,"color":"#ff40ff"},{"value":"{\n\tfort= 10 + <saves.fortitude.value>;\n\tconcat(string(fort), \" Fort DC\")\n}","icon":"fa-fist-raised","isFunction":false,"expression":true,"isNumber":false,"color":"#d6d6d6"},{"value":"{\n\treflex=10 + <saves.reflex.value>;\n\tconcat(string(reflex), \" Ref DC\")\n}","icon":"fa-running","isFunction":false,"expression":true,"isNumber":false,"color":"#73fcd6"},{"value":"{    \n\twill=10 + <saves.will.value>;\n\tconcat(string(will), \" Will DC\")\n}","icon":"fa-bahai","isFunction":false,"expression":true,"isNumber":false,"color":"#ffd479"}]},{"disposition":"NEUTRAL","items":[{"value":"{ \n\thp=<attributes.hp.value>;\n\thpm=<attributes.hp.max>;\n\thpt=<attributes.hp.temp>;\n\thpt=compareText(typeOf(hpt), \"null\") == 0 ? 0 : hpt;\n\tconcat(string(hp + hpt), \"/\", string(hpm))\n}","icon":"fa-heart","isFunction":false,"expression":true,"isNumber":false,"color":"#ff2600"},{"value":"{     ac=<attributes.ac.value>;     concat(string(ac), \" AC\") }","icon":"fa-shield-alt","isFunction":false,"expression":true,"isNumber":false,"color":"#008f00"},{"value":"{     percept=<attributes.perception.value>;     concat(string(percept), \" Per\") }","icon":"fa-eye","isFunction":false,"expression":true,"isNumber":false,"color":"#ff40ff"},{"value":"{\n\tfort= 10 + <saves.fortitude.value>;\n\tconcat(string(fort), \" Fort DC\")\n}","icon":"fa-fist-raised","isFunction":false,"expression":true,"isNumber":false,"color":"#d6d6d6"},{"value":"{\n\treflex=10 + <saves.reflex.value>;\n\tconcat(string(reflex), \" Ref DC\")\n}","icon":"fa-running","isFunction":false,"expression":true,"isNumber":false,"color":"#73fcd6"},{"value":"{    \n\twill=10 + <saves.will.value>;\n\tconcat(string(will), \" Will DC\")\n}","icon":"fa-bahai","isFunction":false,"expression":true,"isNumber":false,"color":"#ffd479"}]},{"disposition":"HOSTILE","items":[{"value":"{ \n\thp=<attributes.hp.value>;\n\thpm=<attributes.hp.max>;\n\thpt=<attributes.hp.temp>;\n\thpt=compareText(typeOf(hpt), \"null\") == 0 ? 0 : hpt;\n\tconcat(string(hp + hpt), \"/\", string(hpm))\n}","icon":"fa-heart","isFunction":false,"expression":true,"isNumber":false,"color":"#ff2600"},{"value":"{     ac=<attributes.ac.value>;     concat(string(ac), \" AC\") }","icon":"fa-shield-alt","isFunction":false,"expression":true,"isNumber":false,"color":"#008f00"},{"value":"{     percept=<attributes.perception.value>;     concat(string(percept), \" Per\") }","icon":"fa-eye","isFunction":false,"expression":true,"isNumber":false,"color":"#ff40ff"},{"value":"{\n\tfort= 10 + <saves.fortitude.value>;\n\tconcat(string(fort), \" Fort DC\")\n}","icon":"fa-fist-raised","isFunction":false,"expression":true,"isNumber":false,"color":"#d6d6d6"},{"value":"{\n\treflex=10 + <saves.reflex.value>;\n\tconcat(string(reflex), \" Ref DC\")\n}","icon":"fa-running","isFunction":false,"expression":true,"isNumber":false,"color":"#73fcd6"},{"value":"{    \n\twill=10 + <saves.will.value>;\n\tconcat(string(will), \" Will DC\")\n}","icon":"fa-bahai","isFunction":false,"expression":true,"isNumber":false,"color":"#ffd479"}]}],"static":{"displayNameInTooltip":true,"useAccentEverywhere":false,"accentColor":"#0c5b08","tokenDispositions":["FRIENDLY","NEUTRAL","HOSTILE"],"useAccentColorForEverything":false}},"character":{"items":[{"disposition":"FRIENDLY","items":[]},{"disposition":"NEUTRAL","items":[]},{"disposition":"HOSTILE","items":[]}],"static":{"displayNameInTooltip":true,"accentColor":"#e7802a","useAccentColorForEverything":false,"tokenDispositions":["FRIENDLY","NEUTRAL","HOSTILE"]}},"npc":{"items":[{"disposition":"FRIENDLY","items":[{"value":"{ \n\thp=<attributes.hp.value>;\n\thpm=<attributes.hp.max>;\n\thpt=<attributes.hp.temp>;\n\thpt=compareText(typeOf(hpt), \"null\") == 0 ? 0 : hpt;\n\tconcat(string(hp + hpt), \"/\", string(hpm))\n}","icon":"fa-heart","isFunction":false,"expression":true,"isNumber":false,"color":"#ff2600"},{"value":"{     ac=<attributes.ac.value>;     concat(string(ac), \" AC\") }","icon":"fa-shield-alt","isFunction":false,"expression":true,"isNumber":false,"color":"#008f00"},{"value":"{     percept=<attributes.perception.value>;     concat(string(percept), \" Per\") }","icon":"fa-eye","isFunction":false,"expression":true,"isNumber":false,"color":"#ff40ff"},{"value":"{\n\tfort= 10 + <saves.fortitude.value>;\n\tconcat(\"Fort DC \", string(fort))\n}","icon":"fa-fist-raised","isFunction":false,"expression":true,"isNumber":false,"color":"#d6d6d6"},{"value":"{\n\treflex=10 + <saves.reflex.value>;\n\tconcat(\"Ref DC \", string(reflex))\n}","icon":"fa-running","isFunction":false,"expression":true,"isNumber":false,"color":"#73fcd6"},{"value":"{    \n\twill=10 + <saves.will.value>;\n\tconcat(\"Will DC\"m string(will))\n}","icon":"fa-bahai","isFunction":false,"expression":true,"isNumber":false,"color":"#ffd479"}]},{"disposition":"NEUTRAL","items":[{"value":"{ \n\thp=<attributes.hp.value>;\n\thpm=<attributes.hp.max>;\n\thpt=<attributes.hp.temp>;\n\thpt=compareText(typeOf(hpt), \"null\") == 0 ? 0 : hpt;\n\tconcat(string(hp + hpt), \"/\", string(hpm))\n}","icon":"fa-heart","isFunction":false,"expression":true,"isNumber":false,"color":"#ff2600"},{"value":"{     ac=<attributes.ac.value>;     concat(string(ac), \" AC\") }","icon":"fa-shield-alt","isFunction":false,"expression":true,"isNumber":false,"color":"#008f00"},{"value":"{     percept=<attributes.perception.value>;     concat(string(percept), \" Per\") }","icon":"fa-eye","isFunction":false,"expression":true,"isNumber":false,"color":"#ff40ff"},{"value":"{\n\tfort= 10 + <saves.fortitude.value>;\n\tconcat(\"Fort DC \", string(fort))\n}","icon":"fa-fist-raised","isFunction":false,"expression":true,"isNumber":false,"color":"#d6d6d6"},{"value":"{\n\treflex=10 + <saves.reflex.value>;\n\tconcat(\"Ref DC \", string(reflex))\n}","icon":"fa-running","isFunction":false,"expression":true,"isNumber":false,"color":"#73fcd6"},{"value":"{    \n\twill=10 + <saves.will.value>;\n\tconcat(\"Will DC\"m string(will))\n}","icon":"fa-bahai","isFunction":false,"expression":true,"isNumber":false,"color":"#ffd479"}]},{"disposition":"HOSTILE","items":[{"value":"{ \n\thp=<attributes.hp.value>;\n\thpm=<attributes.hp.max>;\n\thpt=<attributes.hp.temp>;\n\thpt=compareText(typeOf(hpt), \"null\") == 0 ? 0 : hpt;\n\tconcat(string(hp + hpt), \"/\", string(hpm))\n}","icon":"fa-heart","isFunction":false,"expression":true,"isNumber":false,"color":"#ff2600"},{"value":"{     ac=<attributes.ac.value>;     concat(string(ac), \" AC\") }","icon":"fa-shield-alt","isFunction":false,"expression":true,"isNumber":false,"color":"#008f00"},{"value":"{     percept=<attributes.perception.value>;     concat(string(percept), \" Per\") }","icon":"fa-eye","isFunction":false,"expression":true,"isNumber":false,"color":"#ff40ff"},{"value":"{\n\tfort= 10 + <saves.fortitude.value>;\n\tconcat(\"Fort DC \", string(fort))\n}","icon":"fa-fist-raised","isFunction":false,"expression":true,"isNumber":false,"color":"#d6d6d6"},{"value":"{\n\treflex=10 + <saves.reflex.value>;\n\tconcat(\"Ref DC \", string(reflex))\n}","icon":"fa-running","isFunction":false,"expression":true,"isNumber":false,"color":"#73fcd6"},{"value":"{    \n\twill=10 + <saves.will.value>;\n\tconcat(\"Will DC\"m string(will))\n}","icon":"fa-bahai","isFunction":false,"expression":true,"isNumber":false,"color":"#ffd479"}]}],"static":{"displayNameInTooltip":true,"useAccentEverywhere":false,"accentColor":"#0c5b08","tokenDispositions":["FRIENDLY","NEUTRAL","HOSTILE"],"useAccentColorForEverything":false}},"hazard":{"items":[{"disposition":"FRIENDLY","items":[]},{"disposition":"NEUTRAL","items":[]},{"disposition":"HOSTILE","items":[]}],"static":{"displayNameInTooltip":true,"accentColor":"#0ef875","useAccentColorForEverything":false,"tokenDispositions":["FRIENDLY","NEUTRAL","HOSTILE"]}},"loot":{"items":[{"disposition":"FRIENDLY","items":[]},{"disposition":"NEUTRAL","items":[]},{"disposition":"HOSTILE","items":[]}],"static":{"displayNameInTooltip":true,"accentColor":"#0a7d50","useAccentColorForEverything":false,"tokenDispositions":["FRIENDLY","NEUTRAL","HOSTILE"]}},"familiar":{"items":[{"disposition":"FRIENDLY","items":[]},{"disposition":"NEUTRAL","items":[]},{"disposition":"HOSTILE","items":[]}],"static":{"displayNameInTooltip":true,"accentColor":"#9246ff","useAccentColorForEverything":false,"tokenDispositions":["FRIENDLY","NEUTRAL","HOSTILE"]}},"vehicle":{"items":[{"disposition":"FRIENDLY","items":[]},{"disposition":"NEUTRAL","items":[]},{"disposition":"HOSTILE","items":[]}],"static":{"displayNameInTooltip":true,"accentColor":"#2ec056","useAccentColorForEverything":false,"tokenDispositions":["FRIENDLY","NEUTRAL","HOSTILE"]}}},"playerSettings":{"default":{"items":[{"disposition":"OWNED","items":[{"value":"{ \n\thp=<attributes.hp.value>;\n\thpm=<attributes.hp.max>;\n\thpt=<attributes.hp.temp>;\n\thpt=compareText(typeOf(hpt), \"null\") == 0 ? 0 : hpt;\n\tconcat(string(hp + hpt), \"/\", string(hpm))\n}","icon":"fa-heart","isFunction":false,"expression":true,"isNumber":false,"color":"#ff2600"},{"value":"{     ac=<attributes.ac.value>;     concat(string(ac), \" AC\") }","icon":"fa-shield-alt","isFunction":false,"expression":true,"isNumber":false,"color":"#008f00"},{"value":"{     percept=<attributes.perception.value>;     concat(string(percept), \" Per\") }","icon":"fa-eye","isFunction":false,"expression":true,"isNumber":false,"color":"#ff40ff"},{"value":"{\n\tfort= 10 + <saves.fortitude.value>;\n\tconcat(string(fort), \" Fort DC\")\n}","icon":"fa-fist-raised","isFunction":false,"expression":true,"isNumber":false,"color":"#d6d6d6"},{"value":"{\n\treflex=10 + <saves.reflex.value>;\n\tconcat(string(reflex), \" Ref DC\")\n}","icon":"fa-running","isFunction":false,"expression":true,"isNumber":false,"color":"#73fcd6"},{"value":"{    \n\twill=10 + <saves.will.value>;\n\tconcat(string(will), \" Will DC\")\n}","icon":"fa-bahai","isFunction":false,"expression":true,"isNumber":false,"color":"#ffd479"}]},{"disposition":"FRIENDLY","items":[{"value":"{ \n\thp=<attributes.hp.value>;\n\thpm=<attributes.hp.max>;\n\thpt=<attributes.hp.temp>;\n\thpt=compareText(typeOf(hpt), \"null\") == 0 ? 0 : hpt;\n\tconcat(string(hp + hpt), \"/\", string(hpm))\n}","icon":"fa-heart","isFunction":false,"expression":true,"isNumber":false,"color":"#ff2600"},{"value":"{     ac=<attributes.ac.value>;     concat(string(ac), \" AC\") }","icon":"fa-shield-alt","isFunction":false,"expression":true,"isNumber":false,"color":"#008f00"},{"value":"{     percept=<attributes.perception.value>;     concat(string(percept), \" Per\") }","icon":"fa-eye","isFunction":false,"expression":true,"isNumber":false,"color":"#ff40ff"},{"value":"{\n\tfort= 10 + <saves.fortitude.value>;\n\tconcat(string(fort), \" Fort DC\")\n}","icon":"fa-fist-raised","isFunction":false,"expression":true,"isNumber":false,"color":"#d6d6d6"},{"value":"{\n\treflex=10 + <saves.reflex.value>;\n\tconcat(string(reflex), \" Ref DC\")\n}","icon":"fa-running","isFunction":false,"expression":true,"isNumber":false,"color":"#73fcd6"},{"value":"{    \n\twill=10 + <saves.will.value>;\n\tconcat(string(will), \" Will DC\")\n}","icon":"fa-bahai","isFunction":false,"expression":true,"isNumber":false,"color":"#ffd479"}]},{"disposition":"NEUTRAL","items":[{"value":"{ hp=<attributes.hp.value>; hpm=<attributes.hp.max>; hp <= 0 ? \"Defeated\" : hp <= hpm/2 ? \"Bloodied\" : \"Healthy\" }","icon":"fa-heartbeat","isFunction":false,"expression":true,"isNumber":false,"color":"#ff2600"}]},{"disposition":"HOSTILE","items":[{"value":"{ hp=<attributes.hp.value>; hpm=<attributes.hp.max>; hp <= 0 ? \"Defeated\" : hp <= hpm/2 ? \"Bloodied\" : \"Healthy\" }","icon":"fa-heartbeat","isFunction":false,"expression":true,"isNumber":false,"color":"#ff2600"}]}],"static":{"displayNameInTooltip":"HOSTILE","useAccentEverywhere":false,"accentColor":"#601ec6","tokenDispositions":["OWNED","FRIENDLY","NEUTRAL","HOSTILE"],"useAccentColorForEverything":false}},"character":{"items":[{"disposition":"OWNED","items":[]},{"disposition":"FRIENDLY","items":[]},{"disposition":"NEUTRAL","items":[]},{"disposition":"HOSTILE","items":[]}],"static":{"displayNameInTooltip":"OWNED","accentColor":"#bf4dfc","useAccentColorForEverything":false,"tokenDispositions":["OWNED","FRIENDLY","NEUTRAL","HOSTILE"]}},"npc":{"items":[{"disposition":"OWNED","items":[{"value":"{ \n\thp=<attributes.hp.value>;\n\thpm=<attributes.hp.max>;\n\thpt=<attributes.hp.temp>;\n\thpt=compareText(typeOf(hpt), \"null\") == 0 ? 0 : hpt;\n\tconcat(string(hp + hpt), \"/\", string(hpm))\n}","icon":"fa-heart","isFunction":false,"expression":true,"isNumber":false,"color":"#ff2600"},{"value":"{     ac=<attributes.ac.value>;     concat(string(ac), \" AC\") }","icon":"fa-shield-alt","isFunction":false,"expression":true,"isNumber":false,"color":"#008f00"},{"value":"{     percept=<attributes.perception.value>;     concat(string(percept), \" Per\") }","icon":"fa-eye","isFunction":false,"expression":true,"isNumber":false,"color":"#ff40ff"},{"value":"{\n\tfort= 10 + <saves.fortitude.value>;\n\tconcat(\"Fort DC \", string(fort))\n}","icon":"fa-fist-raised","isFunction":false,"expression":true,"isNumber":false,"color":"#d6d6d6"},{"value":"{\n\treflex=10 + <saves.reflex.value>;\n\tconcat(\"Ref DC \", string(reflex))\n}","icon":"fa-running","isFunction":false,"expression":true,"isNumber":false,"color":"#73fcd6"},{"value":"{    \n\twill=10 + <saves.will.value>;\n\tconcat(\"Will DC\"m string(will))\n}","icon":"fa-bahai","isFunction":false,"expression":true,"isNumber":false,"color":"#ffd479"}]},{"disposition":"FRIENDLY","items":[{"value":"{ \n\thp=<attributes.hp.value>;\n\thpm=<attributes.hp.max>;\n\thpt=<attributes.hp.temp>;\n\thpt=compareText(typeOf(hpt), \"null\") == 0 ? 0 : hpt;\n\tconcat(string(hp + hpt), \"/\", string(hpm))\n}","icon":"fa-heart","isFunction":false,"expression":true,"isNumber":false,"color":"#ff2600"},{"value":"{     ac=<attributes.ac.value>;     concat(string(ac), \" AC\") }","icon":"fa-shield-alt","isFunction":false,"expression":true,"isNumber":false,"color":"#008f00"},{"value":"{     percept=<attributes.perception.value>;     concat(string(percept), \" Per\") }","icon":"fa-eye","isFunction":false,"expression":true,"isNumber":false,"color":"#ff40ff"},{"value":"{\n\tfort= 10 + <saves.fortitude.value>;\n\tconcat(\"Fort DC \", string(fort))\n}","icon":"fa-fist-raised","isFunction":false,"expression":true,"isNumber":false,"color":"#d6d6d6"},{"value":"{\n\treflex=10 + <saves.reflex.value>;\n\tconcat(\"Ref DC \", string(reflex))\n}","icon":"fa-running","isFunction":false,"expression":true,"isNumber":false,"color":"#73fcd6"},{"value":"{    \n\twill=10 + <saves.will.value>;\n\tconcat(\"Will DC\"m string(will))\n}","icon":"fa-bahai","isFunction":false,"expression":true,"isNumber":false,"color":"#ffd479"}]},{"disposition":"NEUTRAL","items":[{"value":"{ hp=<attributes.hp.value>; hpm=<attributes.hp.max>; hp <= 0 ? \"Defeated\" : hp <= hpm/2 ? \"Bloodied\" : \"Healthy\" }","icon":"fa-heartbeat","isFunction":false,"expression":true,"isNumber":false,"color":"#ff2600"}]},{"disposition":"HOSTILE","items":[{"value":"{ hp=<attributes.hp.value>; hpm=<attributes.hp.max>; hp <= 0 ? \"Defeated\" : hp <= hpm/2 ? \"Bloodied\" : \"Healthy\" }","icon":"fa-heartbeat","isFunction":false,"expression":true,"isNumber":false,"color":"#ff2600"}]}],"static":{"displayNameInTooltip":"HOSTILE","useAccentEverywhere":false,"accentColor":"#601ec6","tokenDispositions":["OWNED","FRIENDLY","NEUTRAL","HOSTILE"],"useAccentColorForEverything":false}},"hazard":{"items":[{"disposition":"OWNED","items":[]},{"disposition":"FRIENDLY","items":[]},{"disposition":"NEUTRAL","items":[]},{"disposition":"HOSTILE","items":[]}],"static":{"displayNameInTooltip":"OWNED","accentColor":"#ee9e00","useAccentColorForEverything":false,"tokenDispositions":["OWNED","FRIENDLY","NEUTRAL","HOSTILE"]}},"loot":{"items":[{"disposition":"OWNED","items":[]},{"disposition":"FRIENDLY","items":[]},{"disposition":"NEUTRAL","items":[]},{"disposition":"HOSTILE","items":[]}],"static":{"displayNameInTooltip":"OWNED","accentColor":"#2cc9cb","useAccentColorForEverything":false,"tokenDispositions":["OWNED","FRIENDLY","NEUTRAL","HOSTILE"]}},"familiar":{"items":[{"disposition":"OWNED","items":[]},{"disposition":"FRIENDLY","items":[]},{"disposition":"NEUTRAL","items":[]},{"disposition":"HOSTILE","items":[]}],"static":{"displayNameInTooltip":"OWNED","accentColor":"#b1d80b","useAccentColorForEverything":false,"tokenDispositions":["OWNED","FRIENDLY","NEUTRAL","HOSTILE"]}},"vehicle":{"items":[{"disposition":"OWNED","items":[]},{"disposition":"FRIENDLY","items":[]},{"disposition":"NEUTRAL","items":[]},{"disposition":"HOSTILE","items":[]}],"static":{"displayNameInTooltip":"OWNED","accentColor":"#cf2cec","useAccentColorForEverything":false,"tokenDispositions":["OWNED","FRIENDLY","NEUTRAL","HOSTILE"]}}}}
mkahvi commented 3 years ago

Presumably fixed by changing token.getFlag() to token.document.getFlag() for Foundry 0.8.x

I hope this gets solved soon, the module is really noisy because of this right now.

bmarian commented 3 years ago

Probably not that soon. I will fix it with the 4.0 release.

bmarian commented 3 years ago

Closed with the 3.0.2 release