{
  "name": "Migrate World Icons",
  "type": "script",
  "scope": "global",
  "author": "6SdI10VpXHcBvx2J",
  "img": "icons/svg/card-hand.svg",
  "command": "const items = game.items.filter(e => e.type == \"ability\" || e.type == \"virtue\" || e.type == \"flaw\");\nui.notifications.info(`${items.length} items found`);\n\n\n\nlet updatedItems = []\nfor (let it of items) {\n    if (it.img == CONFIG.ARM5E_DEFAULT_ICONS[it.type] ||\n    it.img === \"icons/svg/mystery-man.svg\" ||\n    it.img === \"icons/svg/item-bag.svg\") {\n        \n      console.log(it.name);\n      let itemData = {_id : it._id, img : CONFIG.Item.systemDataModels[it.type].getIcon(it)};\n      updatedItems.push(itemData);\n    }\n}\nlet updated = await Item.updateDocuments(updatedItems);\n\n\n\nui.notifications.info(`${updated.length} items updated`);",
  "ownership": {
    "default": 0,
    "ErQ613O32LNYb71L": 3,
    "6SdI10VpXHcBvx2J": 3
  },
  "flags": {
    "core": {}
  },
  "_stats": {
    "compendiumSource": "Macro.5yOsEAKylIbEuCl7",
    "duplicateSource": null,
    "coreVersion": "13.351",
    "systemId": "arm5e",
    "systemVersion": "2.3.2.7",
    "createdTime": 1731268014718,
    "modifiedTime": 1743316271731,
    "lastModifiedBy": "xMd6zrGNn4dbQYey",
    "exportSource": null
  },
  "folder": "qGZgdsZ3cZpILlVt",
  "_id": "DIOTvbubqoeBH4Ky",
  "sort": 300000,
  "_key": "!macros!DIOTvbubqoeBH4Ky"
}
