-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from DanielBoettner/12-bug-quantity-formula
12 bug quantity formula
- Loading branch information
Showing
5 changed files
with
266 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{"name":"toggleTokenAutoPopulation","type":"script","author":"rKaPA9z0omV5p2Qt","img":"icons/commodities/tech/lever.webp","scope":"global","command":"/**\n * Simple Macro to toggle the state of a boolean setting.\n **/\nlet module = 'lootpopulatornpc5e',\n key = 'autoPopulateTokens';\n \ngame.settings.set(module,key,!game.settings.get(module,key));\nui.notifications.info('The setting <b>' + key + '</b> was changed to: <b>' + !game.settings.get(module,key) + '</b>');","folder":null,"sort":0,"permission":{"default":0,"rKaPA9z0omV5p2Qt":3},"flags":{"combat-utility-belt":{"macroTrigger":""},"advanced-macros":{"runAsGM":false},"core":{"sourceId":"Macro.KnGdlkChHPPNClhx"}},"_id":"IfSKfuB5qqPUiTaf"} | ||
{"name":"populateLoot","type":"script","author":"rKaPA9z0omV5p2Qt","img":"icons/skills/trades/farming-plant-seeds-gray.webp","scope":"global","command":"// no token given defaults to currently selected tokens\ngame.LootPopulator.populate();","folder":null,"sort":0,"permission":{"default":0,"rKaPA9z0omV5p2Qt":3},"flags":{"combat-utility-belt":{"macroTrigger":""},"advanced-macros":{"runAsGM":false},"core":{"sourceId":"Macro.xAhxp90zTM54uT9z"}},"_id":"Ab23KwPq9VD4C2yn"} | ||
{"name":"setLightOnTokens","type":"script","author":"rKaPA9z0omV5p2Qt","img":"icons/commodities/tech/levers-colored.webp","scope":"global","command":"let presets = {\n darkvision: {\n vision: true,\n dimSight: 60,\n brightSight: 0,\n dimLight: 0,\n brightLight: 0,\n lightAngle: 360,\n lockRotation: false,\n lightColor: \"\",\n lightAlpha: 0.2,\n },\n light_cantrip: {\n vision: true,\n dimSight: 1,\n brightSight: 0,\n dimLight: 40,\n brightLight: 20,\n lightAngle: 360,\n lockRotation: false,\n lightAnimation: {type: \"torch\", intensity: 1, speed: 1},\n lightColor: \"#bbbbff\",\n lightAlpha: 0.2,\n },\n acetylene_lantern_spotlight: {\n vision: true,\n dimSight: 1,\n brightSight: 0,\n dimLight: 120,\n brightLight: 60,\n lightAngle: 55,\n lockRotation: false,\n lightAnimation: {type: \"pulse\", intensity: 2, speed: 3},\n lightColor: \"#ffee99\",\n lightAlpha: 0.2,\n },\n acetylene_lantern_narrow: {\n vision: true,\n dimSight: 1,\n brightSight: 0,\n dimLight: 90,\n brightLight: 45,\n lightAngle: 100,\n lockRotation: false,\n lightAnimation: {type: \"pulse\", intensity: 2, speed: 3},\n lightColor: \"#ffee99\",\n lightAlpha: 0.2,\n },\n acetylene_lantern_wide: {\n vision: true,\n dimSight: 1,\n brightSight: 0,\n dimLight: 60,\n brightLight: 30,\n lightAngle: 360,\n lockRotation: false,\n lightAnimation: {type: \"pulse\", intensity: 2, speed: 3},\n lightColor: \"#ffee99\",\n lightAlpha: 0.2,\n },\n acetylene_lantern_dim: {\n vision: true,\n dimSight: 1,\n brightSight: 0,\n dimLight: 30,\n brightLight: 15,\n lightAngle: 360,\n lockRotation: false,\n lightAnimation: {type: \"pulse\", intensity: 2, speed: 3},\n lightColor: \"#ffee99\",\n lightAlpha: 0.2,\n },\n torch: {\n vision: true,\n dimSight: 1,\n brightSight: 0,\n dimLight: 20,\n brightLight: 10,\n lightAngle: 360,\n lockRotation: false,\n lightAnimation: {type: \"torch\", intensity: 5, speed: 5},\n lightColor: \"#ffbb33\",\n lightAlpha: 0.2,\n },\n normal_vision: {\n vision: true,\n dimSight: 5,\n brightSight: 0,\n dimLight: 0,\n brightLight: 0,\n lightAngle: 360,\n lockRotation: false,\n lightColor: \"\",\n lightAlpha: 0.2,\n },\n no_vision: {\n vision: false,\n }\n};\n\nlet vision_buttons = [];\nfor (let key in presets) {\n vision_buttons.push({\n label: key.replaceAll('_',' '),\n callback: async function() {\n updateTokens(presets[key]);\n }\n });\n}\n\nnew Dialog({\n title: `Select a vision option`,\n content: ``,\n buttons: vision_buttons,\n //default: \"yes\",\n close: html => {}\n}).render(true);\n\nasync function updateTokens(preset){\n const updates = canvas.tokens.controlled.map(t => mergeObject({_id: t.id}, preset));\n await canvas.scene.updateEmbeddedDocuments(\"Token\", updates);\n}","folder":null,"sort":0,"permission":{"default":0,"rKaPA9z0omV5p2Qt":3},"flags":{"combat-utility-belt":{"macroTrigger":""},"advanced-macros":{"runAsGM":false},"core":{"sourceId":"Macro.PBzvJUvRseFBUDAL"}},"_id":"ZWRIblJrmgW5qv9l"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.