Skip to content

Instantly share code, notes, and snippets.

View typhonrt's full-sized avatar

Michael Leahy typhonrt

View GitHub Profile
@typhonrt
typhonrt / gist:e3f8afd1cd5aad92e69f9d846e2e069a
Created July 5, 2021 06:44
A macro for Foundry VTT `0.7.10` or below to fix any corrupted quest data w/ and old version of Forien's Quest Log.
(async () =>
{
const folder = game.journal.directory.folders.find((f) => f.name === '_fql_quests');
// Stop now if no FQL quests folder exists.
if (!folder) { return; }
for (const entry of folder.content)
{
// Detect and skip any new style FQL quests.
@typhonrt
typhonrt / ParamParser.js->guessParams
Created June 10, 2016 00:28
Fixes ESDoc issue #295 as ArrayPattern wasn't being parsed.
static guessParams(params) {
let _params = [];
for (let i = 0; i < params.length; i++) {
let param = params[i];
let result = {};
switch (param.type) {
case 'Identifier':
// e.g. func(a){}
result.name = param.name;