mb-assets/packsrc/asset-macros/Reveal_FoW_TCtNmn6W5twRGQo8.json
2024-08-11 15:24:00 -05:00

28 lines
1.3 KiB
JSON

{
"name": "Reveal FoW",
"type": "script",
"_id": "TCtNmn6W5twRGQo8",
"author": "sVoCvBU1knmXzoYe",
"img": "icons/magic/perception/eye-ringed-glow-angry-large-red.webp",
"scope": "global",
"command": "const scene = canvas.scene;\nawait scene.update({ fogExploration: false });\nfor (const user of game.users) {\n const explorationData = {\n scene: scene.id,\n user: user.id,\n explored: \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=\"\n };\n const fogExplorationCls = getDocumentClass(\"FogExploration\");\n let exploration = await fogExplorationCls.get({ scene, user });\n if (exploration) await exploration.update(explorationData, { diff: false });\n else {\n exploration = new fogExplorationCls(explorationData);\n await fogExplorationCls.create(exploration.toJSON());\n }\n}",
"folder": null,
"sort": 0,
"ownership": {
"default": 0,
"sVoCvBU1knmXzoYe": 3
},
"flags": {},
"_stats": {
"systemId": "swade",
"systemVersion": "3.3.11",
"coreVersion": "12.328",
"createdTime": 1712206097249,
"modifiedTime": 1713026618048,
"lastModifiedBy": "sVoCvBU1knmXzoYe",
"compendiumSource": null,
"duplicateSource": null
},
"_key": "!macros!TCtNmn6W5twRGQo8"
}