26 lines
1.2 KiB
JSON
26 lines
1.2 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": "11.315",
|
|
"createdTime": 1712206097249,
|
|
"modifiedTime": 1713026618048,
|
|
"lastModifiedBy": "sVoCvBU1knmXzoYe"
|
|
},
|
|
"_key": "!macros!TCtNmn6W5twRGQo8"
|
|
}
|