{ "type": "File", "start": 0, "end": 4317, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 135, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 4317, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 135, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 82, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 82 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 9, "end": 22, "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 22 } }, "imported": { "type": "Identifier", "start": 9, "end": 22, "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 22 }, "identifierName": "enumDirection" }, "name": "enumDirection" }, "local": { "type": "Identifier", "start": 9, "end": 22, "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 22 }, "identifierName": "enumDirection" }, "name": "enumDirection" } }, { "type": "ImportSpecifier", "start": 24, "end": 46, "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 46 } }, "imported": { "type": "Identifier", "start": 24, "end": 46, "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 46 }, "identifierName": "enumInvertedDirections" }, "name": "enumInvertedDirections" }, "local": { "type": "Identifier", "start": 24, "end": 46, "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 46 }, "identifierName": "enumInvertedDirections" }, "name": "enumInvertedDirections" } }, { "type": "ImportSpecifier", "start": 48, "end": 54, "loc": { "start": { "line": 1, "column": 48 }, "end": { "line": 1, "column": 54 } }, "imported": { "type": "Identifier", "start": 48, "end": 54, "loc": { "start": { "line": 1, "column": 48 }, "end": { "line": 1, "column": 54 }, "identifierName": "Vector" }, "name": "Vector" }, "local": { "type": "Identifier", "start": 48, "end": 54, "loc": { "start": { "line": 1, "column": 48 }, "end": { "line": 1, "column": 54 }, "identifierName": "Vector" }, "name": "Vector" } } ], "source": { "type": "StringLiteral", "start": 62, "end": 81, "loc": { "start": { "line": 1, "column": 62 }, "end": { "line": 1, "column": 81 } }, "extra": { "rawValue": "../../core/vector", "raw": "\"../../core/vector\"" }, "value": "../../core/vector" } }, { "type": "ImportDeclaration", "start": 84, "end": 137, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 53 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 93, "end": 98, "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 14 } }, "imported": { "type": "Identifier", "start": 93, "end": 98, "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 14 }, "identifierName": "types" }, "name": "types" }, "local": { "type": "Identifier", "start": 93, "end": 98, "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 14 }, "identifierName": "types" }, "name": "types" } } ], "source": { "type": "StringLiteral", "start": 106, "end": 136, "loc": { "start": { "line": 2, "column": 22 }, "end": { "line": 2, "column": 52 } }, "extra": { "rawValue": "../../savegame/serialization", "raw": "\"../../savegame/serialization\"" }, "value": "../../savegame/serialization" } }, { "type": "ImportDeclaration", "start": 139, "end": 179, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 40 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 148, "end": 156, "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 17 } }, "imported": { "type": "Identifier", "start": 148, "end": 156, "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 17 }, "identifierName": "BaseItem" }, "name": "BaseItem" }, "local": { "type": "Identifier", "start": 148, "end": 156, "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 17 }, "identifierName": "BaseItem" }, "name": "BaseItem" } } ], "source": { "type": "StringLiteral", "start": 164, "end": 178, "loc": { "start": { "line": 3, "column": 25 }, "end": { "line": 3, "column": 39 } }, "extra": { "rawValue": "../base_item", "raw": "\"../base_item\"" }, "value": "../base_item" } }, { "type": "ImportDeclaration", "start": 181, "end": 222, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 41 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 190, "end": 199, "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 18 } }, "imported": { "type": "Identifier", "start": 190, "end": 199, "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 18 }, "identifierName": "Component" }, "name": "Component" }, "local": { "type": "Identifier", "start": 190, "end": 199, "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 18 }, "identifierName": "Component" }, "name": "Component" } } ], "source": { "type": "StringLiteral", "start": 207, "end": 221, "loc": { "start": { "line": 4, "column": 26 }, "end": { "line": 4, "column": 40 } }, "extra": { "rawValue": "../component", "raw": "\"../component\"" }, "value": "../component" }, "trailingComments": [ { "type": "CommentBlock", "value": "* @typedef {{\r\n * pos: Vector,\r\n * directions: enumDirection[],\r\n * filter?: ItemType\r\n * }} ItemAcceptorSlot ", "start": 226, "end": 340, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 10, "column": 25 } } }, { "type": "CommentBlock", "value": "*\r\n * Contains information about a slot plus its location\r\n * @typedef {{\r\n * slot: ItemAcceptorSlot,\r\n * index: number,\r\n * acceptedDirection: enumDirection\r\n * }} ItemAcceptorLocatedSlot ", "start": 344, "end": 540, "loc": { "start": { "line": 12, "column": 0 }, "end": { "line": 18, "column": 32 } } }, { "type": "CommentBlock", "value": "* @typedef {{\r\n * pos: Vector,\r\n * directions: enumDirection[],\r\n * filter?: ItemType\r\n * }} ItemAcceptorSlotConfig ", "start": 544, "end": 664, "loc": { "start": { "line": 20, "column": 0 }, "end": { "line": 24, "column": 31 } } } ] }, { "type": "ExportNamedDeclaration", "start": 668, "end": 4315, "loc": { "start": { "line": 26, "column": 0 }, "end": { "line": 134, "column": 1 } }, "specifiers": [], "source": null, "declaration": { "type": "ClassDeclaration", "start": 675, "end": 4315, "loc": { "start": { "line": 26, "column": 7 }, "end": { "line": 134, "column": 1 } }, "id": { "type": "Identifier", "start": 681, "end": 702, "loc": { "start": { "line": 26, "column": 13 }, "end": { "line": 26, "column": 34 }, "identifierName": "ItemAcceptorComponent" }, "name": "ItemAcceptorComponent", "leadingComments": null }, "superClass": { "type": "Identifier", "start": 711, "end": 720, "loc": { "start": { "line": 26, "column": 43 }, "end": { "line": 26, "column": 52 }, "identifierName": "Component" }, "name": "Component" }, "body": { "type": "ClassBody", "start": 721, "end": 4315, "loc": { "start": { "line": 26, "column": 53 }, "end": { "line": 134, "column": 1 } }, "body": [ { "type": "ClassMethod", "start": 728, "end": 783, "loc": { "start": { "line": 27, "column": 4 }, "end": { "line": 29, "column": 5 } }, "static": true, "computed": false, "key": { "type": "Identifier", "start": 735, "end": 740, "loc": { "start": { "line": 27, "column": 11 }, "end": { "line": 27, "column": 16 }, "identifierName": "getId" }, "name": "getId" }, "kind": "method", "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 743, "end": 783, "loc": { "start": { "line": 27, "column": 19 }, "end": { "line": 29, "column": 5 } }, "body": [ { "type": "ReturnStatement", "start": 754, "end": 776, "loc": { "start": { "line": 28, "column": 8 }, "end": { "line": 28, "column": 30 } }, "argument": { "type": "StringLiteral", "start": 761, "end": 775, "loc": { "start": { "line": 28, "column": 15 }, "end": { "line": 28, "column": 29 } }, "extra": { "rawValue": "ItemAcceptor", "raw": "\"ItemAcceptor\"" }, "value": "ItemAcceptor" } } ], "directives": [], "trailingComments": null }, "trailingComments": [ { "type": "CommentBlock", "value": "*\r\n *\r\n * @param {object} param0\r\n * @param {Array} param0.slots The slots from which we accept items\r\n ", "start": 791, "end": 939, "loc": { "start": { "line": 31, "column": 4 }, "end": { "line": 35, "column": 7 } } } ] }, { "type": "ClassMethod", "start": 945, "end": 1314, "loc": { "start": { "line": 36, "column": 4 }, "end": { "line": 51, "column": 5 } }, "static": false, "computed": false, "key": { "type": "Identifier", "start": 945, "end": 956, "loc": { "start": { "line": 36, "column": 4 }, "end": { "line": 36, "column": 15 }, "identifierName": "constructor" }, "name": "constructor", "leadingComments": null }, "kind": "constructor", "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "ObjectPattern", "start": 957, "end": 971, "loc": { "start": { "line": 36, "column": 16 }, "end": { "line": 36, "column": 30 } }, "properties": [ { "type": "ObjectProperty", "start": 959, "end": 969, "loc": { "start": { "line": 36, "column": 18 }, "end": { "line": 36, "column": 28 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 959, "end": 964, "loc": { "start": { "line": 36, "column": 18 }, "end": { "line": 36, "column": 23 }, "identifierName": "slots" }, "name": "slots" }, "value": { "type": "AssignmentPattern", "start": 959, "end": 969, "loc": { "start": { "line": 36, "column": 18 }, "end": { "line": 36, "column": 28 } }, "left": { "type": "Identifier", "start": 959, "end": 964, "loc": { "start": { "line": 36, "column": 18 }, "end": { "line": 36, "column": 23 }, "identifierName": "slots" }, "name": "slots" }, "right": { "type": "ArrayExpression", "start": 967, "end": 969, "loc": { "start": { "line": 36, "column": 26 }, "end": { "line": 36, "column": 28 } }, "elements": [] } }, "extra": { "shorthand": true } } ] } ], "body": { "type": "BlockStatement", "start": 973, "end": 1314, "loc": { "start": { "line": 36, "column": 32 }, "end": { "line": 51, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 984, "end": 992, "loc": { "start": { "line": 37, "column": 8 }, "end": { "line": 37, "column": 16 } }, "expression": { "type": "CallExpression", "start": 984, "end": 991, "loc": { "start": { "line": 37, "column": 8 }, "end": { "line": 37, "column": 15 } }, "callee": { "type": "Super", "start": 984, "end": 989, "loc": { "start": { "line": 37, "column": 8 }, "end": { "line": 37, "column": 13 } } }, "arguments": [] }, "trailingComments": [ { "type": "CommentBlock", "value": "*\r\n * Fixes belt animations\r\n * @type {Array<{\r\n * item: BaseItem,\r\n * slotIndex: number,\r\n * animProgress: number,\r\n * direction: enumDirection\r\n * }>}\r\n ", "start": 1004, "end": 1228, "loc": { "start": { "line": 39, "column": 8 }, "end": { "line": 47, "column": 11 } } } ] }, { "type": "ExpressionStatement", "start": 1238, "end": 1274, "loc": { "start": { "line": 48, "column": 8 }, "end": { "line": 48, "column": 44 } }, "expression": { "type": "AssignmentExpression", "start": 1238, "end": 1273, "loc": { "start": { "line": 48, "column": 8 }, "end": { "line": 48, "column": 43 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 1238, "end": 1268, "loc": { "start": { "line": 48, "column": 8 }, "end": { "line": 48, "column": 38 } }, "object": { "type": "ThisExpression", "start": 1238, "end": 1242, "loc": { "start": { "line": 48, "column": 8 }, "end": { "line": 48, "column": 12 } }, "leadingComments": null }, "property": { "type": "Identifier", "start": 1243, "end": 1268, "loc": { "start": { "line": 48, "column": 13 }, "end": { "line": 48, "column": 38 }, "identifierName": "itemConsumptionAnimations" }, "name": "itemConsumptionAnimations" }, "computed": false, "leadingComments": null }, "right": { "type": "ArrayExpression", "start": 1271, "end": 1273, "loc": { "start": { "line": 48, "column": 41 }, "end": { "line": 48, "column": 43 } }, "elements": [] }, "leadingComments": null }, "leadingComments": [ { "type": "CommentBlock", "value": "*\r\n * Fixes belt animations\r\n * @type {Array<{\r\n * item: BaseItem,\r\n * slotIndex: number,\r\n * animProgress: number,\r\n * direction: enumDirection\r\n * }>}\r\n ", "start": 1004, "end": 1228, "loc": { "start": { "line": 39, "column": 8 }, "end": { "line": 47, "column": 11 } } } ] }, { "type": "ExpressionStatement", "start": 1286, "end": 1307, "loc": { "start": { "line": 50, "column": 8 }, "end": { "line": 50, "column": 29 } }, "expression": { "type": "CallExpression", "start": 1286, "end": 1306, "loc": { "start": { "line": 50, "column": 8 }, "end": { "line": 50, "column": 28 } }, "callee": { "type": "MemberExpression", "start": 1286, "end": 1299, "loc": { "start": { "line": 50, "column": 8 }, "end": { "line": 50, "column": 21 } }, "object": { "type": "ThisExpression", "start": 1286, "end": 1290, "loc": { "start": { "line": 50, "column": 8 }, "end": { "line": 50, "column": 12 } } }, "property": { "type": "Identifier", "start": 1291, "end": 1299, "loc": { "start": { "line": 50, "column": 13 }, "end": { "line": 50, "column": 21 }, "identifierName": "setSlots" }, "name": "setSlots" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 1300, "end": 1305, "loc": { "start": { "line": 50, "column": 22 }, "end": { "line": 50, "column": 27 }, "identifierName": "slots" }, "name": "slots" } ] } } ], "directives": [], "trailingComments": null }, "leadingComments": [ { "type": "CommentBlock", "value": "*\r\n *\r\n * @param {object} param0\r\n * @param {Array} param0.slots The slots from which we accept items\r\n ", "start": 791, "end": 939, "loc": { "start": { "line": 31, "column": 4 }, "end": { "line": 35, "column": 7 } } } ], "trailingComments": [ { "type": "CommentBlock", "value": "*\r\n *\r\n * @param {Array} slots\r\n ", "start": 1322, "end": 1395, "loc": { "start": { "line": 53, "column": 4 }, "end": { "line": 56, "column": 7 } } } ] }, { "type": "ClassMethod", "start": 1401, "end": 1847, "loc": { "start": { "line": 57, "column": 4 }, "end": { "line": 70, "column": 5 } }, "static": false, "computed": false, "key": { "type": "Identifier", "start": 1401, "end": 1409, "loc": { "start": { "line": 57, "column": 4 }, "end": { "line": 57, "column": 12 }, "identifierName": "setSlots" }, "name": "setSlots", "leadingComments": null }, "kind": "method", "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 1410, "end": 1415, "loc": { "start": { "line": 57, "column": 13 }, "end": { "line": 57, "column": 18 }, "identifierName": "slots" }, "name": "slots" } ], "body": { "type": "BlockStatement", "start": 1417, "end": 1847, "loc": { "start": { "line": 57, "column": 20 }, "end": { "line": 70, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 1476, "end": 1492, "loc": { "start": { "line": 59, "column": 8 }, "end": { "line": 59, "column": 24 } }, "expression": { "type": "AssignmentExpression", "start": 1476, "end": 1491, "loc": { "start": { "line": 59, "column": 8 }, "end": { "line": 59, "column": 23 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 1476, "end": 1486, "loc": { "start": { "line": 59, "column": 8 }, "end": { "line": 59, "column": 18 } }, "object": { "type": "ThisExpression", "start": 1476, "end": 1480, "loc": { "start": { "line": 59, "column": 8 }, "end": { "line": 59, "column": 12 } }, "leadingComments": null }, "property": { "type": "Identifier", "start": 1481, "end": 1486, "loc": { "start": { "line": 59, "column": 13 }, "end": { "line": 59, "column": 18 }, "identifierName": "slots" }, "name": "slots" }, "computed": false, "leadingComments": null }, "right": { "type": "ArrayExpression", "start": 1489, "end": 1491, "loc": { "start": { "line": 59, "column": 21 }, "end": { "line": 59, "column": 23 } }, "elements": [] }, "leadingComments": null }, "leadingComments": [ { "type": "CommentBlock", "value": "* @type {Array} ", "start": 1428, "end": 1466, "loc": { "start": { "line": 58, "column": 8 }, "end": { "line": 58, "column": 46 } } } ] }, { "type": "ForStatement", "start": 1502, "end": 1840, "loc": { "start": { "line": 60, "column": 8 }, "end": { "line": 69, "column": 9 } }, "init": { "type": "VariableDeclaration", "start": 1507, "end": 1516, "loc": { "start": { "line": 60, "column": 13 }, "end": { "line": 60, "column": 22 } }, "declarations": [ { "type": "VariableDeclarator", "start": 1511, "end": 1516, "loc": { "start": { "line": 60, "column": 17 }, "end": { "line": 60, "column": 22 } }, "id": { "type": "Identifier", "start": 1511, "end": 1512, "loc": { "start": { "line": 60, "column": 17 }, "end": { "line": 60, "column": 18 }, "identifierName": "i" }, "name": "i" }, "init": { "type": "NumericLiteral", "start": 1515, "end": 1516, "loc": { "start": { "line": 60, "column": 21 }, "end": { "line": 60, "column": 22 } }, "extra": { "rawValue": 0, "raw": "0" }, "value": 0 } } ], "kind": "let" }, "test": { "type": "BinaryExpression", "start": 1518, "end": 1534, "loc": { "start": { "line": 60, "column": 24 }, "end": { "line": 60, "column": 40 } }, "left": { "type": "Identifier", "start": 1518, "end": 1519, "loc": { "start": { "line": 60, "column": 24 }, "end": { "line": 60, "column": 25 }, "identifierName": "i" }, "name": "i" }, "operator": "<", "right": { "type": "MemberExpression", "start": 1522, "end": 1534, "loc": { "start": { "line": 60, "column": 28 }, "end": { "line": 60, "column": 40 } }, "object": { "type": "Identifier", "start": 1522, "end": 1527, "loc": { "start": { "line": 60, "column": 28 }, "end": { "line": 60, "column": 33 }, "identifierName": "slots" }, "name": "slots" }, "property": { "type": "Identifier", "start": 1528, "end": 1534, "loc": { "start": { "line": 60, "column": 34 }, "end": { "line": 60, "column": 40 }, "identifierName": "length" }, "name": "length" }, "computed": false } }, "update": { "type": "UpdateExpression", "start": 1536, "end": 1539, "loc": { "start": { "line": 60, "column": 42 }, "end": { "line": 60, "column": 45 } }, "operator": "++", "prefix": true, "argument": { "type": "Identifier", "start": 1538, "end": 1539, "loc": { "start": { "line": 60, "column": 44 }, "end": { "line": 60, "column": 45 }, "identifierName": "i" }, "name": "i" }, "extra": { "parenthesizedArgument": false } }, "body": { "type": "BlockStatement", "start": 1541, "end": 1840, "loc": { "start": { "line": 60, "column": 47 }, "end": { "line": 69, "column": 9 } }, "body": [ { "type": "VariableDeclaration", "start": 1556, "end": 1578, "loc": { "start": { "line": 61, "column": 12 }, "end": { "line": 61, "column": 34 } }, "declarations": [ { "type": "VariableDeclarator", "start": 1562, "end": 1577, "loc": { "start": { "line": 61, "column": 18 }, "end": { "line": 61, "column": 33 } }, "id": { "type": "Identifier", "start": 1562, "end": 1566, "loc": { "start": { "line": 61, "column": 18 }, "end": { "line": 61, "column": 22 }, "identifierName": "slot" }, "name": "slot" }, "init": { "type": "MemberExpression", "start": 1569, "end": 1577, "loc": { "start": { "line": 61, "column": 25 }, "end": { "line": 61, "column": 33 } }, "object": { "type": "Identifier", "start": 1569, "end": 1574, "loc": { "start": { "line": 61, "column": 25 }, "end": { "line": 61, "column": 30 }, "identifierName": "slots" }, "name": "slots" }, "property": { "type": "Identifier", "start": 1575, "end": 1576, "loc": { "start": { "line": 61, "column": 31 }, "end": { "line": 61, "column": 32 }, "identifierName": "i" }, "name": "i" }, "computed": true } } ], "kind": "const" }, { "type": "ExpressionStatement", "start": 1592, "end": 1829, "loc": { "start": { "line": 62, "column": 12 }, "end": { "line": 68, "column": 15 } }, "expression": { "type": "CallExpression", "start": 1592, "end": 1828, "loc": { "start": { "line": 62, "column": 12 }, "end": { "line": 68, "column": 14 } }, "callee": { "type": "MemberExpression", "start": 1592, "end": 1607, "loc": { "start": { "line": 62, "column": 12 }, "end": { "line": 62, "column": 27 } }, "object": { "type": "MemberExpression", "start": 1592, "end": 1602, "loc": { "start": { "line": 62, "column": 12 }, "end": { "line": 62, "column": 22 } }, "object": { "type": "ThisExpression", "start": 1592, "end": 1596, "loc": { "start": { "line": 62, "column": 12 }, "end": { "line": 62, "column": 16 } } }, "property": { "type": "Identifier", "start": 1597, "end": 1602, "loc": { "start": { "line": 62, "column": 17 }, "end": { "line": 62, "column": 22 }, "identifierName": "slots" }, "name": "slots" }, "computed": false }, "property": { "type": "Identifier", "start": 1603, "end": 1607, "loc": { "start": { "line": 62, "column": 23 }, "end": { "line": 62, "column": 27 }, "identifierName": "push" }, "name": "push" }, "computed": false }, "arguments": [ { "type": "ObjectExpression", "start": 1608, "end": 1827, "loc": { "start": { "line": 62, "column": 28 }, "end": { "line": 68, "column": 13 } }, "properties": [ { "type": "ObjectProperty", "start": 1627, "end": 1640, "loc": { "start": { "line": 63, "column": 16 }, "end": { "line": 63, "column": 29 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 1627, "end": 1630, "loc": { "start": { "line": 63, "column": 16 }, "end": { "line": 63, "column": 19 }, "identifierName": "pos" }, "name": "pos" }, "value": { "type": "MemberExpression", "start": 1632, "end": 1640, "loc": { "start": { "line": 63, "column": 21 }, "end": { "line": 63, "column": 29 } }, "object": { "type": "Identifier", "start": 1632, "end": 1636, "loc": { "start": { "line": 63, "column": 21 }, "end": { "line": 63, "column": 25 }, "identifierName": "slot" }, "name": "slot" }, "property": { "type": "Identifier", "start": 1637, "end": 1640, "loc": { "start": { "line": 63, "column": 26 }, "end": { "line": 63, "column": 29 }, "identifierName": "pos" }, "name": "pos" }, "computed": false } }, { "type": "ObjectProperty", "start": 1659, "end": 1686, "loc": { "start": { "line": 64, "column": 16 }, "end": { "line": 64, "column": 43 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 1659, "end": 1669, "loc": { "start": { "line": 64, "column": 16 }, "end": { "line": 64, "column": 26 }, "identifierName": "directions" }, "name": "directions" }, "value": { "type": "MemberExpression", "start": 1671, "end": 1686, "loc": { "start": { "line": 64, "column": 28 }, "end": { "line": 64, "column": 43 } }, "object": { "type": "Identifier", "start": 1671, "end": 1675, "loc": { "start": { "line": 64, "column": 28 }, "end": { "line": 64, "column": 32 }, "identifierName": "slot" }, "name": "slot" }, "property": { "type": "Identifier", "start": 1676, "end": 1686, "loc": { "start": { "line": 64, "column": 33 }, "end": { "line": 64, "column": 43 }, "identifierName": "directions" }, "name": "directions" }, "computed": false } }, { "type": "ObjectProperty", "start": 1792, "end": 1811, "loc": { "start": { "line": 67, "column": 16 }, "end": { "line": 67, "column": 35 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 1792, "end": 1798, "loc": { "start": { "line": 67, "column": 16 }, "end": { "line": 67, "column": 22 }, "identifierName": "filter" }, "name": "filter", "leadingComments": null }, "value": { "type": "MemberExpression", "start": 1800, "end": 1811, "loc": { "start": { "line": 67, "column": 24 }, "end": { "line": 67, "column": 35 } }, "object": { "type": "Identifier", "start": 1800, "end": 1804, "loc": { "start": { "line": 67, "column": 24 }, "end": { "line": 67, "column": 28 }, "identifierName": "slot" }, "name": "slot" }, "property": { "type": "Identifier", "start": 1805, "end": 1811, "loc": { "start": { "line": 67, "column": 29 }, "end": { "line": 67, "column": 35 }, "identifierName": "filter" }, "name": "filter" }, "computed": false }, "leadingComments": [ { "type": "CommentLine", "value": " Which type of item to accept (shape | color | all) @see ItemType", "start": 1707, "end": 1774, "loc": { "start": { "line": 66, "column": 16 }, "end": { "line": 66, "column": 83 } } } ] } ] } ] } } ], "directives": [] } } ], "directives": [], "trailingComments": null }, "leadingComments": [ { "type": "CommentBlock", "value": "*\r\n *\r\n * @param {Array} slots\r\n ", "start": 1322, "end": 1395, "loc": { "start": { "line": 53, "column": 4 }, "end": { "line": 56, "column": 7 } } } ], "trailingComments": [ { "type": "CommentBlock", "value": "*\r\n * Returns if this acceptor can accept a new item at slot N\r\n * @param {number} slotIndex\r\n * @param {BaseItem=} item\r\n ", "start": 1855, "end": 1998, "loc": { "start": { "line": 72, "column": 4 }, "end": { "line": 76, "column": 7 } } } ] }, { "type": "ClassMethod", "start": 2004, "end": 2156, "loc": { "start": { "line": 77, "column": 4 }, "end": { "line": 80, "column": 5 } }, "static": false, "computed": false, "key": { "type": "Identifier", "start": 2004, "end": 2017, "loc": { "start": { "line": 77, "column": 4 }, "end": { "line": 77, "column": 17 }, "identifierName": "canAcceptItem" }, "name": "canAcceptItem", "leadingComments": null }, "kind": "method", "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 2018, "end": 2027, "loc": { "start": { "line": 77, "column": 18 }, "end": { "line": 77, "column": 27 }, "identifierName": "slotIndex" }, "name": "slotIndex" }, { "type": "Identifier", "start": 2029, "end": 2033, "loc": { "start": { "line": 77, "column": 29 }, "end": { "line": 77, "column": 33 }, "identifierName": "item" }, "name": "item" } ], "body": { "type": "BlockStatement", "start": 2035, "end": 2156, "loc": { "start": { "line": 77, "column": 35 }, "end": { "line": 80, "column": 5 } }, "body": [ { "type": "VariableDeclaration", "start": 2046, "end": 2081, "loc": { "start": { "line": 78, "column": 8 }, "end": { "line": 78, "column": 43 } }, "declarations": [ { "type": "VariableDeclarator", "start": 2052, "end": 2080, "loc": { "start": { "line": 78, "column": 14 }, "end": { "line": 78, "column": 42 } }, "id": { "type": "Identifier", "start": 2052, "end": 2056, "loc": { "start": { "line": 78, "column": 14 }, "end": { "line": 78, "column": 18 }, "identifierName": "slot" }, "name": "slot" }, "init": { "type": "MemberExpression", "start": 2059, "end": 2080, "loc": { "start": { "line": 78, "column": 21 }, "end": { "line": 78, "column": 42 } }, "object": { "type": "MemberExpression", "start": 2059, "end": 2069, "loc": { "start": { "line": 78, "column": 21 }, "end": { "line": 78, "column": 31 } }, "object": { "type": "ThisExpression", "start": 2059, "end": 2063, "loc": { "start": { "line": 78, "column": 21 }, "end": { "line": 78, "column": 25 } } }, "property": { "type": "Identifier", "start": 2064, "end": 2069, "loc": { "start": { "line": 78, "column": 26 }, "end": { "line": 78, "column": 31 }, "identifierName": "slots" }, "name": "slots" }, "computed": false }, "property": { "type": "Identifier", "start": 2070, "end": 2079, "loc": { "start": { "line": 78, "column": 32 }, "end": { "line": 78, "column": 41 }, "identifierName": "slotIndex" }, "name": "slotIndex" }, "computed": true } } ], "kind": "const" }, { "type": "ReturnStatement", "start": 2091, "end": 2149, "loc": { "start": { "line": 79, "column": 8 }, "end": { "line": 79, "column": 66 } }, "argument": { "type": "LogicalExpression", "start": 2098, "end": 2148, "loc": { "start": { "line": 79, "column": 15 }, "end": { "line": 79, "column": 65 } }, "left": { "type": "UnaryExpression", "start": 2098, "end": 2110, "loc": { "start": { "line": 79, "column": 15 }, "end": { "line": 79, "column": 27 } }, "operator": "!", "prefix": true, "argument": { "type": "MemberExpression", "start": 2099, "end": 2110, "loc": { "start": { "line": 79, "column": 16 }, "end": { "line": 79, "column": 27 } }, "object": { "type": "Identifier", "start": 2099, "end": 2103, "loc": { "start": { "line": 79, "column": 16 }, "end": { "line": 79, "column": 20 }, "identifierName": "slot" }, "name": "slot" }, "property": { "type": "Identifier", "start": 2104, "end": 2110, "loc": { "start": { "line": 79, "column": 21 }, "end": { "line": 79, "column": 27 }, "identifierName": "filter" }, "name": "filter" }, "computed": false }, "extra": { "parenthesizedArgument": false } }, "operator": "||", "right": { "type": "BinaryExpression", "start": 2114, "end": 2148, "loc": { "start": { "line": 79, "column": 31 }, "end": { "line": 79, "column": 65 } }, "left": { "type": "MemberExpression", "start": 2114, "end": 2125, "loc": { "start": { "line": 79, "column": 31 }, "end": { "line": 79, "column": 42 } }, "object": { "type": "Identifier", "start": 2114, "end": 2118, "loc": { "start": { "line": 79, "column": 31 }, "end": { "line": 79, "column": 35 }, "identifierName": "slot" }, "name": "slot" }, "property": { "type": "Identifier", "start": 2119, "end": 2125, "loc": { "start": { "line": 79, "column": 36 }, "end": { "line": 79, "column": 42 }, "identifierName": "filter" }, "name": "filter" }, "computed": false }, "operator": "===", "right": { "type": "CallExpression", "start": 2130, "end": 2148, "loc": { "start": { "line": 79, "column": 47 }, "end": { "line": 79, "column": 65 } }, "callee": { "type": "MemberExpression", "start": 2130, "end": 2146, "loc": { "start": { "line": 79, "column": 47 }, "end": { "line": 79, "column": 63 } }, "object": { "type": "Identifier", "start": 2130, "end": 2134, "loc": { "start": { "line": 79, "column": 47 }, "end": { "line": 79, "column": 51 }, "identifierName": "item" }, "name": "item" }, "property": { "type": "Identifier", "start": 2135, "end": 2146, "loc": { "start": { "line": 79, "column": 52 }, "end": { "line": 79, "column": 63 }, "identifierName": "getItemType" }, "name": "getItemType" }, "computed": false }, "arguments": [] } } } } ], "directives": [], "trailingComments": null }, "leadingComments": [ { "type": "CommentBlock", "value": "*\r\n * Returns if this acceptor can accept a new item at slot N\r\n * @param {number} slotIndex\r\n * @param {BaseItem=} item\r\n ", "start": 1855, "end": 1998, "loc": { "start": { "line": 72, "column": 4 }, "end": { "line": 76, "column": 7 } } } ], "trailingComments": [ { "type": "CommentBlock", "value": "*\r\n * Called when an item has been accepted so that\r\n * @param {number} slotIndex\r\n * @param {enumDirection} direction\r\n * @param {BaseItem} item\r\n * @param {number} remainingProgress World space remaining progress, can be set to set the start position of the item\r\n ", "start": 2164, "end": 2459, "loc": { "start": { "line": 82, "column": 4 }, "end": { "line": 88, "column": 7 } } } ] }, { "type": "ClassMethod", "start": 2465, "end": 2731, "loc": { "start": { "line": 89, "column": 4 }, "end": { "line": 96, "column": 5 } }, "static": false, "computed": false, "key": { "type": "Identifier", "start": 2465, "end": 2479, "loc": { "start": { "line": 89, "column": 4 }, "end": { "line": 89, "column": 18 }, "identifierName": "onItemAccepted" }, "name": "onItemAccepted", "leadingComments": null }, "kind": "method", "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 2480, "end": 2489, "loc": { "start": { "line": 89, "column": 19 }, "end": { "line": 89, "column": 28 }, "identifierName": "slotIndex" }, "name": "slotIndex" }, { "type": "Identifier", "start": 2491, "end": 2500, "loc": { "start": { "line": 89, "column": 30 }, "end": { "line": 89, "column": 39 }, "identifierName": "direction" }, "name": "direction" }, { "type": "Identifier", "start": 2502, "end": 2506, "loc": { "start": { "line": 89, "column": 41 }, "end": { "line": 89, "column": 45 }, "identifierName": "item" }, "name": "item" }, { "type": "AssignmentPattern", "start": 2508, "end": 2531, "loc": { "start": { "line": 89, "column": 47 }, "end": { "line": 89, "column": 70 } }, "left": { "type": "Identifier", "start": 2508, "end": 2525, "loc": { "start": { "line": 89, "column": 47 }, "end": { "line": 89, "column": 64 }, "identifierName": "remainingProgress" }, "name": "remainingProgress" }, "right": { "type": "NumericLiteral", "start": 2528, "end": 2531, "loc": { "start": { "line": 89, "column": 67 }, "end": { "line": 89, "column": 70 } }, "extra": { "rawValue": 0, "raw": "0.0" }, "value": 0 } } ], "body": { "type": "BlockStatement", "start": 2533, "end": 2731, "loc": { "start": { "line": 89, "column": 72 }, "end": { "line": 96, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 2544, "end": 2724, "loc": { "start": { "line": 90, "column": 8 }, "end": { "line": 95, "column": 11 } }, "expression": { "type": "CallExpression", "start": 2544, "end": 2723, "loc": { "start": { "line": 90, "column": 8 }, "end": { "line": 95, "column": 10 } }, "callee": { "type": "MemberExpression", "start": 2544, "end": 2579, "loc": { "start": { "line": 90, "column": 8 }, "end": { "line": 90, "column": 43 } }, "object": { "type": "MemberExpression", "start": 2544, "end": 2574, "loc": { "start": { "line": 90, "column": 8 }, "end": { "line": 90, "column": 38 } }, "object": { "type": "ThisExpression", "start": 2544, "end": 2548, "loc": { "start": { "line": 90, "column": 8 }, "end": { "line": 90, "column": 12 } } }, "property": { "type": "Identifier", "start": 2549, "end": 2574, "loc": { "start": { "line": 90, "column": 13 }, "end": { "line": 90, "column": 38 }, "identifierName": "itemConsumptionAnimations" }, "name": "itemConsumptionAnimations" }, "computed": false }, "property": { "type": "Identifier", "start": 2575, "end": 2579, "loc": { "start": { "line": 90, "column": 39 }, "end": { "line": 90, "column": 43 }, "identifierName": "push" }, "name": "push" }, "computed": false }, "arguments": [ { "type": "ObjectExpression", "start": 2580, "end": 2722, "loc": { "start": { "line": 90, "column": 44 }, "end": { "line": 95, "column": 9 } }, "properties": [ { "type": "ObjectProperty", "start": 2595, "end": 2599, "loc": { "start": { "line": 91, "column": 12 }, "end": { "line": 91, "column": 16 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 2595, "end": 2599, "loc": { "start": { "line": 91, "column": 12 }, "end": { "line": 91, "column": 16 }, "identifierName": "item" }, "name": "item" }, "value": { "type": "Identifier", "start": 2595, "end": 2599, "loc": { "start": { "line": 91, "column": 12 }, "end": { "line": 91, "column": 16 }, "identifierName": "item" }, "name": "item" }, "extra": { "shorthand": true } }, { "type": "ObjectProperty", "start": 2614, "end": 2623, "loc": { "start": { "line": 92, "column": 12 }, "end": { "line": 92, "column": 21 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 2614, "end": 2623, "loc": { "start": { "line": 92, "column": 12 }, "end": { "line": 92, "column": 21 }, "identifierName": "slotIndex" }, "name": "slotIndex" }, "value": { "type": "Identifier", "start": 2614, "end": 2623, "loc": { "start": { "line": 92, "column": 12 }, "end": { "line": 92, "column": 21 }, "identifierName": "slotIndex" }, "name": "slotIndex" }, "extra": { "shorthand": true } }, { "type": "ObjectProperty", "start": 2638, "end": 2647, "loc": { "start": { "line": 93, "column": 12 }, "end": { "line": 93, "column": 21 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 2638, "end": 2647, "loc": { "start": { "line": 93, "column": 12 }, "end": { "line": 93, "column": 21 }, "identifierName": "direction" }, "name": "direction" }, "value": { "type": "Identifier", "start": 2638, "end": 2647, "loc": { "start": { "line": 93, "column": 12 }, "end": { "line": 93, "column": 21 }, "identifierName": "direction" }, "name": "direction" }, "extra": { "shorthand": true } }, { "type": "ObjectProperty", "start": 2662, "end": 2710, "loc": { "start": { "line": 94, "column": 12 }, "end": { "line": 94, "column": 60 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 2662, "end": 2674, "loc": { "start": { "line": 94, "column": 12 }, "end": { "line": 94, "column": 24 }, "identifierName": "animProgress" }, "name": "animProgress" }, "value": { "type": "CallExpression", "start": 2676, "end": 2710, "loc": { "start": { "line": 94, "column": 26 }, "end": { "line": 94, "column": 60 } }, "callee": { "type": "MemberExpression", "start": 2676, "end": 2684, "loc": { "start": { "line": 94, "column": 26 }, "end": { "line": 94, "column": 34 } }, "object": { "type": "Identifier", "start": 2676, "end": 2680, "loc": { "start": { "line": 94, "column": 26 }, "end": { "line": 94, "column": 30 }, "identifierName": "Math" }, "name": "Math" }, "property": { "type": "Identifier", "start": 2681, "end": 2684, "loc": { "start": { "line": 94, "column": 31 }, "end": { "line": 94, "column": 34 }, "identifierName": "min" }, "name": "min" }, "computed": false }, "arguments": [ { "type": "NumericLiteral", "start": 2685, "end": 2686, "loc": { "start": { "line": 94, "column": 35 }, "end": { "line": 94, "column": 36 } }, "extra": { "rawValue": 1, "raw": "1" }, "value": 1 }, { "type": "BinaryExpression", "start": 2688, "end": 2709, "loc": { "start": { "line": 94, "column": 38 }, "end": { "line": 94, "column": 59 } }, "left": { "type": "Identifier", "start": 2688, "end": 2705, "loc": { "start": { "line": 94, "column": 38 }, "end": { "line": 94, "column": 55 }, "identifierName": "remainingProgress" }, "name": "remainingProgress" }, "operator": "*", "right": { "type": "NumericLiteral", "start": 2708, "end": 2709, "loc": { "start": { "line": 94, "column": 58 }, "end": { "line": 94, "column": 59 } }, "extra": { "rawValue": 2, "raw": "2" }, "value": 2 } } ] } } ] } ] } } ], "directives": [], "trailingComments": null }, "leadingComments": [ { "type": "CommentBlock", "value": "*\r\n * Called when an item has been accepted so that\r\n * @param {number} slotIndex\r\n * @param {enumDirection} direction\r\n * @param {BaseItem} item\r\n * @param {number} remainingProgress World space remaining progress, can be set to set the start position of the item\r\n ", "start": 2164, "end": 2459, "loc": { "start": { "line": 82, "column": 4 }, "end": { "line": 88, "column": 7 } } } ], "trailingComments": [ { "type": "CommentBlock", "value": "*\r\n * Tries to find a slot which accepts the current item\r\n * @param {Vector} targetLocalTile\r\n * @param {enumDirection} fromLocalDirection\r\n * @returns {ItemAcceptorLocatedSlot|null}\r\n ", "start": 2739, "end": 2949, "loc": { "start": { "line": 98, "column": 4 }, "end": { "line": 103, "column": 7 } } } ] }, { "type": "ClassMethod", "start": 2955, "end": 4312, "loc": { "start": { "line": 104, "column": 4 }, "end": { "line": 133, "column": 5 } }, "static": false, "computed": false, "key": { "type": "Identifier", "start": 2955, "end": 2971, "loc": { "start": { "line": 104, "column": 4 }, "end": { "line": 104, "column": 20 }, "identifierName": "findMatchingSlot" }, "name": "findMatchingSlot", "leadingComments": null }, "kind": "method", "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 2972, "end": 2987, "loc": { "start": { "line": 104, "column": 21 }, "end": { "line": 104, "column": 36 }, "identifierName": "targetLocalTile" }, "name": "targetLocalTile" }, { "type": "Identifier", "start": 2989, "end": 3007, "loc": { "start": { "line": 104, "column": 38 }, "end": { "line": 104, "column": 56 }, "identifierName": "fromLocalDirection" }, "name": "fromLocalDirection" } ], "body": { "type": "BlockStatement", "start": 3009, "end": 4312, "loc": { "start": { "line": 104, "column": 58 }, "end": { "line": 133, "column": 5 } }, "body": [ { "type": "VariableDeclaration", "start": 3312, "end": 3380, "loc": { "start": { "line": 108, "column": 8 }, "end": { "line": 108, "column": 76 } }, "declarations": [ { "type": "VariableDeclarator", "start": 3318, "end": 3379, "loc": { "start": { "line": 108, "column": 14 }, "end": { "line": 108, "column": 75 } }, "id": { "type": "Identifier", "start": 3318, "end": 3334, "loc": { "start": { "line": 108, "column": 14 }, "end": { "line": 108, "column": 30 }, "identifierName": "desiredDirection" }, "name": "desiredDirection", "leadingComments": null }, "init": { "type": "MemberExpression", "start": 3337, "end": 3379, "loc": { "start": { "line": 108, "column": 33 }, "end": { "line": 108, "column": 75 } }, "object": { "type": "Identifier", "start": 3337, "end": 3359, "loc": { "start": { "line": 108, "column": 33 }, "end": { "line": 108, "column": 55 }, "identifierName": "enumInvertedDirections" }, "name": "enumInvertedDirections" }, "property": { "type": "Identifier", "start": 3360, "end": 3378, "loc": { "start": { "line": 108, "column": 56 }, "end": { "line": 108, "column": 74 }, "identifierName": "fromLocalDirection" }, "name": "fromLocalDirection" }, "computed": true }, "leadingComments": null } ], "kind": "const", "leadingComments": [ { "type": "CommentLine", "value": " We need to invert our direction since the acceptor specifies *from* which direction", "start": 3020, "end": 3106, "loc": { "start": { "line": 105, "column": 8 }, "end": { "line": 105, "column": 94 } } }, { "type": "CommentLine", "value": " it accepts items, but the ejector specifies *into* which direction it ejects items.", "start": 3116, "end": 3202, "loc": { "start": { "line": 106, "column": 8 }, "end": { "line": 106, "column": 94 } } }, { "type": "CommentLine", "value": " E.g.: Ejector ejects into \"right\" direction but acceptor accepts from \"left\" direction.", "start": 3212, "end": 3302, "loc": { "start": { "line": 107, "column": 8 }, "end": { "line": 107, "column": 98 } } } ], "trailingComments": [ { "type": "CommentLine", "value": " Go over all slots and try to find a target slot", "start": 3392, "end": 3442, "loc": { "start": { "line": 110, "column": 8 }, "end": { "line": 110, "column": 58 } } } ] }, { "type": "ForStatement", "start": 3452, "end": 4281, "loc": { "start": { "line": 111, "column": 8 }, "end": { "line": 130, "column": 9 } }, "init": { "type": "VariableDeclaration", "start": 3457, "end": 3474, "loc": { "start": { "line": 111, "column": 13 }, "end": { "line": 111, "column": 30 } }, "declarations": [ { "type": "VariableDeclarator", "start": 3461, "end": 3474, "loc": { "start": { "line": 111, "column": 17 }, "end": { "line": 111, "column": 30 } }, "id": { "type": "Identifier", "start": 3461, "end": 3470, "loc": { "start": { "line": 111, "column": 17 }, "end": { "line": 111, "column": 26 }, "identifierName": "slotIndex" }, "name": "slotIndex", "leadingComments": null }, "init": { "type": "NumericLiteral", "start": 3473, "end": 3474, "loc": { "start": { "line": 111, "column": 29 }, "end": { "line": 111, "column": 30 } }, "extra": { "rawValue": 0, "raw": "0" }, "value": 0 }, "leadingComments": null } ], "kind": "let", "leadingComments": null }, "test": { "type": "BinaryExpression", "start": 3476, "end": 3505, "loc": { "start": { "line": 111, "column": 32 }, "end": { "line": 111, "column": 61 } }, "left": { "type": "Identifier", "start": 3476, "end": 3485, "loc": { "start": { "line": 111, "column": 32 }, "end": { "line": 111, "column": 41 }, "identifierName": "slotIndex" }, "name": "slotIndex" }, "operator": "<", "right": { "type": "MemberExpression", "start": 3488, "end": 3505, "loc": { "start": { "line": 111, "column": 44 }, "end": { "line": 111, "column": 61 } }, "object": { "type": "MemberExpression", "start": 3488, "end": 3498, "loc": { "start": { "line": 111, "column": 44 }, "end": { "line": 111, "column": 54 } }, "object": { "type": "ThisExpression", "start": 3488, "end": 3492, "loc": { "start": { "line": 111, "column": 44 }, "end": { "line": 111, "column": 48 } } }, "property": { "type": "Identifier", "start": 3493, "end": 3498, "loc": { "start": { "line": 111, "column": 49 }, "end": { "line": 111, "column": 54 }, "identifierName": "slots" }, "name": "slots" }, "computed": false }, "property": { "type": "Identifier", "start": 3499, "end": 3505, "loc": { "start": { "line": 111, "column": 55 }, "end": { "line": 111, "column": 61 }, "identifierName": "length" }, "name": "length" }, "computed": false } }, "update": { "type": "UpdateExpression", "start": 3507, "end": 3518, "loc": { "start": { "line": 111, "column": 63 }, "end": { "line": 111, "column": 74 } }, "operator": "++", "prefix": true, "argument": { "type": "Identifier", "start": 3509, "end": 3518, "loc": { "start": { "line": 111, "column": 65 }, "end": { "line": 111, "column": 74 }, "identifierName": "slotIndex" }, "name": "slotIndex" }, "extra": { "parenthesizedArgument": false } }, "body": { "type": "BlockStatement", "start": 3520, "end": 4281, "loc": { "start": { "line": 111, "column": 76 }, "end": { "line": 130, "column": 9 } }, "body": [ { "type": "VariableDeclaration", "start": 3535, "end": 3570, "loc": { "start": { "line": 112, "column": 12 }, "end": { "line": 112, "column": 47 } }, "declarations": [ { "type": "VariableDeclarator", "start": 3541, "end": 3569, "loc": { "start": { "line": 112, "column": 18 }, "end": { "line": 112, "column": 46 } }, "id": { "type": "Identifier", "start": 3541, "end": 3545, "loc": { "start": { "line": 112, "column": 18 }, "end": { "line": 112, "column": 22 }, "identifierName": "slot" }, "name": "slot" }, "init": { "type": "MemberExpression", "start": 3548, "end": 3569, "loc": { "start": { "line": 112, "column": 25 }, "end": { "line": 112, "column": 46 } }, "object": { "type": "MemberExpression", "start": 3548, "end": 3558, "loc": { "start": { "line": 112, "column": 25 }, "end": { "line": 112, "column": 35 } }, "object": { "type": "ThisExpression", "start": 3548, "end": 3552, "loc": { "start": { "line": 112, "column": 25 }, "end": { "line": 112, "column": 29 } } }, "property": { "type": "Identifier", "start": 3553, "end": 3558, "loc": { "start": { "line": 112, "column": 30 }, "end": { "line": 112, "column": 35 }, "identifierName": "slots" }, "name": "slots" }, "computed": false }, "property": { "type": "Identifier", "start": 3559, "end": 3568, "loc": { "start": { "line": 112, "column": 36 }, "end": { "line": 112, "column": 45 }, "identifierName": "slotIndex" }, "name": "slotIndex" }, "computed": true } } ], "kind": "const", "trailingComments": [ { "type": "CommentLine", "value": " Make sure the acceptor slot is on the right position", "start": 3586, "end": 3641, "loc": { "start": { "line": 114, "column": 12 }, "end": { "line": 114, "column": 67 } } } ] }, { "type": "IfStatement", "start": 3655, "end": 3737, "loc": { "start": { "line": 115, "column": 12 }, "end": { "line": 117, "column": 13 } }, "test": { "type": "UnaryExpression", "start": 3659, "end": 3692, "loc": { "start": { "line": 115, "column": 16 }, "end": { "line": 115, "column": 49 } }, "operator": "!", "prefix": true, "argument": { "type": "CallExpression", "start": 3660, "end": 3692, "loc": { "start": { "line": 115, "column": 17 }, "end": { "line": 115, "column": 49 } }, "callee": { "type": "MemberExpression", "start": 3660, "end": 3675, "loc": { "start": { "line": 115, "column": 17 }, "end": { "line": 115, "column": 32 } }, "object": { "type": "MemberExpression", "start": 3660, "end": 3668, "loc": { "start": { "line": 115, "column": 17 }, "end": { "line": 115, "column": 25 } }, "object": { "type": "Identifier", "start": 3660, "end": 3664, "loc": { "start": { "line": 115, "column": 17 }, "end": { "line": 115, "column": 21 }, "identifierName": "slot" }, "name": "slot", "leadingComments": null }, "property": { "type": "Identifier", "start": 3665, "end": 3668, "loc": { "start": { "line": 115, "column": 22 }, "end": { "line": 115, "column": 25 }, "identifierName": "pos" }, "name": "pos" }, "computed": false, "leadingComments": null }, "property": { "type": "Identifier", "start": 3669, "end": 3675, "loc": { "start": { "line": 115, "column": 26 }, "end": { "line": 115, "column": 32 }, "identifierName": "equals" }, "name": "equals" }, "computed": false, "leadingComments": null }, "arguments": [ { "type": "Identifier", "start": 3676, "end": 3691, "loc": { "start": { "line": 115, "column": 33 }, "end": { "line": 115, "column": 48 }, "identifierName": "targetLocalTile" }, "name": "targetLocalTile" } ], "leadingComments": null }, "extra": { "parenthesizedArgument": false }, "leadingComments": null }, "consequent": { "type": "BlockStatement", "start": 3694, "end": 3737, "loc": { "start": { "line": 115, "column": 51 }, "end": { "line": 117, "column": 13 } }, "body": [ { "type": "ContinueStatement", "start": 3713, "end": 3722, "loc": { "start": { "line": 116, "column": 16 }, "end": { "line": 116, "column": 25 } }, "label": null } ], "directives": [], "trailingComments": null }, "alternate": null, "leadingComments": [ { "type": "CommentLine", "value": " Make sure the acceptor slot is on the right position", "start": 3586, "end": 3641, "loc": { "start": { "line": 114, "column": 12 }, "end": { "line": 114, "column": 67 } } } ], "trailingComments": [ { "type": "CommentLine", "value": " Check if the acceptor slot accepts items from our direction", "start": 3753, "end": 3815, "loc": { "start": { "line": 119, "column": 12 }, "end": { "line": 119, "column": 74 } } } ] }, { "type": "ForStatement", "start": 3829, "end": 4270, "loc": { "start": { "line": 120, "column": 12 }, "end": { "line": 129, "column": 13 } }, "init": { "type": "VariableDeclaration", "start": 3834, "end": 3843, "loc": { "start": { "line": 120, "column": 17 }, "end": { "line": 120, "column": 26 } }, "declarations": [ { "type": "VariableDeclarator", "start": 3838, "end": 3843, "loc": { "start": { "line": 120, "column": 21 }, "end": { "line": 120, "column": 26 } }, "id": { "type": "Identifier", "start": 3838, "end": 3839, "loc": { "start": { "line": 120, "column": 21 }, "end": { "line": 120, "column": 22 }, "identifierName": "i" }, "name": "i", "leadingComments": null }, "init": { "type": "NumericLiteral", "start": 3842, "end": 3843, "loc": { "start": { "line": 120, "column": 25 }, "end": { "line": 120, "column": 26 } }, "extra": { "rawValue": 0, "raw": "0" }, "value": 0 }, "leadingComments": null } ], "kind": "let", "leadingComments": null }, "test": { "type": "BinaryExpression", "start": 3845, "end": 3871, "loc": { "start": { "line": 120, "column": 28 }, "end": { "line": 120, "column": 54 } }, "left": { "type": "Identifier", "start": 3845, "end": 3846, "loc": { "start": { "line": 120, "column": 28 }, "end": { "line": 120, "column": 29 }, "identifierName": "i" }, "name": "i" }, "operator": "<", "right": { "type": "MemberExpression", "start": 3849, "end": 3871, "loc": { "start": { "line": 120, "column": 32 }, "end": { "line": 120, "column": 54 } }, "object": { "type": "MemberExpression", "start": 3849, "end": 3864, "loc": { "start": { "line": 120, "column": 32 }, "end": { "line": 120, "column": 47 } }, "object": { "type": "Identifier", "start": 3849, "end": 3853, "loc": { "start": { "line": 120, "column": 32 }, "end": { "line": 120, "column": 36 }, "identifierName": "slot" }, "name": "slot" }, "property": { "type": "Identifier", "start": 3854, "end": 3864, "loc": { "start": { "line": 120, "column": 37 }, "end": { "line": 120, "column": 47 }, "identifierName": "directions" }, "name": "directions" }, "computed": false }, "property": { "type": "Identifier", "start": 3865, "end": 3871, "loc": { "start": { "line": 120, "column": 48 }, "end": { "line": 120, "column": 54 }, "identifierName": "length" }, "name": "length" }, "computed": false } }, "update": { "type": "UpdateExpression", "start": 3873, "end": 3876, "loc": { "start": { "line": 120, "column": 56 }, "end": { "line": 120, "column": 59 } }, "operator": "++", "prefix": true, "argument": { "type": "Identifier", "start": 3875, "end": 3876, "loc": { "start": { "line": 120, "column": 58 }, "end": { "line": 120, "column": 59 }, "identifierName": "i" }, "name": "i" }, "extra": { "parenthesizedArgument": false } }, "body": { "type": "BlockStatement", "start": 3878, "end": 4270, "loc": { "start": { "line": 120, "column": 61 }, "end": { "line": 129, "column": 13 } }, "body": [ { "type": "IfStatement", "start": 4000, "end": 4255, "loc": { "start": { "line": 122, "column": 16 }, "end": { "line": 128, "column": 17 } }, "test": { "type": "BinaryExpression", "start": 4004, "end": 4043, "loc": { "start": { "line": 122, "column": 20 }, "end": { "line": 122, "column": 59 } }, "left": { "type": "Identifier", "start": 4004, "end": 4020, "loc": { "start": { "line": 122, "column": 20 }, "end": { "line": 122, "column": 36 }, "identifierName": "desiredDirection" }, "name": "desiredDirection", "leadingComments": null }, "operator": "===", "right": { "type": "MemberExpression", "start": 4025, "end": 4043, "loc": { "start": { "line": 122, "column": 41 }, "end": { "line": 122, "column": 59 } }, "object": { "type": "MemberExpression", "start": 4025, "end": 4040, "loc": { "start": { "line": 122, "column": 41 }, "end": { "line": 122, "column": 56 } }, "object": { "type": "Identifier", "start": 4025, "end": 4029, "loc": { "start": { "line": 122, "column": 41 }, "end": { "line": 122, "column": 45 }, "identifierName": "slot" }, "name": "slot" }, "property": { "type": "Identifier", "start": 4030, "end": 4040, "loc": { "start": { "line": 122, "column": 46 }, "end": { "line": 122, "column": 56 }, "identifierName": "directions" }, "name": "directions" }, "computed": false }, "property": { "type": "Identifier", "start": 4041, "end": 4042, "loc": { "start": { "line": 122, "column": 57 }, "end": { "line": 122, "column": 58 }, "identifierName": "i" }, "name": "i" }, "computed": true }, "leadingComments": null }, "consequent": { "type": "BlockStatement", "start": 4045, "end": 4255, "loc": { "start": { "line": 122, "column": 61 }, "end": { "line": 128, "column": 17 } }, "body": [ { "type": "ReturnStatement", "start": 4068, "end": 4236, "loc": { "start": { "line": 123, "column": 20 }, "end": { "line": 127, "column": 22 } }, "argument": { "type": "ObjectExpression", "start": 4075, "end": 4235, "loc": { "start": { "line": 123, "column": 27 }, "end": { "line": 127, "column": 21 } }, "properties": [ { "type": "ObjectProperty", "start": 4102, "end": 4106, "loc": { "start": { "line": 124, "column": 24 }, "end": { "line": 124, "column": 28 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 4102, "end": 4106, "loc": { "start": { "line": 124, "column": 24 }, "end": { "line": 124, "column": 28 }, "identifierName": "slot" }, "name": "slot" }, "value": { "type": "Identifier", "start": 4102, "end": 4106, "loc": { "start": { "line": 124, "column": 24 }, "end": { "line": 124, "column": 28 }, "identifierName": "slot" }, "name": "slot" }, "extra": { "shorthand": true } }, { "type": "ObjectProperty", "start": 4133, "end": 4149, "loc": { "start": { "line": 125, "column": 24 }, "end": { "line": 125, "column": 40 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 4133, "end": 4138, "loc": { "start": { "line": 125, "column": 24 }, "end": { "line": 125, "column": 29 }, "identifierName": "index" }, "name": "index" }, "value": { "type": "Identifier", "start": 4140, "end": 4149, "loc": { "start": { "line": 125, "column": 31 }, "end": { "line": 125, "column": 40 }, "identifierName": "slotIndex" }, "name": "slotIndex" } }, { "type": "ObjectProperty", "start": 4176, "end": 4211, "loc": { "start": { "line": 126, "column": 24 }, "end": { "line": 126, "column": 59 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 4176, "end": 4193, "loc": { "start": { "line": 126, "column": 24 }, "end": { "line": 126, "column": 41 }, "identifierName": "acceptedDirection" }, "name": "acceptedDirection" }, "value": { "type": "Identifier", "start": 4195, "end": 4211, "loc": { "start": { "line": 126, "column": 43 }, "end": { "line": 126, "column": 59 }, "identifierName": "desiredDirection" }, "name": "desiredDirection" } } ] } } ], "directives": [] }, "alternate": null, "leadingComments": [ { "type": "CommentLine", "value": " const localDirection = targetStaticComp.localDirectionToWorld(slot.directions[l]);", "start": 3897, "end": 3982, "loc": { "start": { "line": 121, "column": 16 }, "end": { "line": 121, "column": 101 } } } ] } ], "directives": [] }, "leadingComments": [ { "type": "CommentLine", "value": " Check if the acceptor slot accepts items from our direction", "start": 3753, "end": 3815, "loc": { "start": { "line": 119, "column": 12 }, "end": { "line": 119, "column": 74 } } } ] } ], "directives": [] }, "leadingComments": [ { "type": "CommentLine", "value": " Go over all slots and try to find a target slot", "start": 3392, "end": 3442, "loc": { "start": { "line": 110, "column": 8 }, "end": { "line": 110, "column": 58 } } } ] }, { "type": "ReturnStatement", "start": 4293, "end": 4305, "loc": { "start": { "line": 132, "column": 8 }, "end": { "line": 132, "column": 20 } }, "argument": { "type": "NullLiteral", "start": 4300, "end": 4304, "loc": { "start": { "line": 132, "column": 15 }, "end": { "line": 132, "column": 19 } } } } ], "directives": [] }, "leadingComments": [ { "type": "CommentBlock", "value": "*\r\n * Tries to find a slot which accepts the current item\r\n * @param {Vector} targetLocalTile\r\n * @param {enumDirection} fromLocalDirection\r\n * @returns {ItemAcceptorLocatedSlot|null}\r\n ", "start": 2739, "end": 2949, "loc": { "start": { "line": 98, "column": 4 }, "end": { "line": 103, "column": 7 } } } ] } ] }, "leadingComments": [ { "type": "CommentBlock", "value": "* @typedef {{\r\n * pos: Vector,\r\n * directions: enumDirection[],\r\n * filter?: ItemType\r\n * }} ItemAcceptorSlot ", "start": 226, "end": 340, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 10, "column": 25 } } }, { "type": "CommentBlock", "value": "*\r\n * Contains information about a slot plus its location\r\n * @typedef {{\r\n * slot: ItemAcceptorSlot,\r\n * index: number,\r\n * acceptedDirection: enumDirection\r\n * }} ItemAcceptorLocatedSlot ", "start": 344, "end": 540, "loc": { "start": { "line": 12, "column": 0 }, "end": { "line": 18, "column": 32 } } }, { "type": "CommentBlock", "value": "* @typedef {{\r\n * pos: Vector,\r\n * directions: enumDirection[],\r\n * filter?: ItemType\r\n * }} ItemAcceptorSlotConfig ", "start": 544, "end": 664, "loc": { "start": { "line": 20, "column": 0 }, "end": { "line": 24, "column": 31 } } } ], "trailingComments": [] }, "leadingComments": [ { "type": "CommentBlock", "value": "* @typedef {{\r\n * pos: Vector,\r\n * directions: enumDirection[],\r\n * filter?: ItemType\r\n * }} ItemAcceptorSlot ", "start": 226, "end": 340, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 10, "column": 25 } } }, { "type": "CommentBlock", "value": "*\r\n * Contains information about a slot plus its location\r\n * @typedef {{\r\n * slot: ItemAcceptorSlot,\r\n * index: number,\r\n * acceptedDirection: enumDirection\r\n * }} ItemAcceptorLocatedSlot ", "start": 344, "end": 540, "loc": { "start": { "line": 12, "column": 0 }, "end": { "line": 18, "column": 32 } } }, { "type": "CommentBlock", "value": "* @typedef {{\r\n * pos: Vector,\r\n * directions: enumDirection[],\r\n * filter?: ItemType\r\n * }} ItemAcceptorSlotConfig ", "start": 544, "end": 664, "loc": { "start": { "line": 20, "column": 0 }, "end": { "line": 24, "column": 31 } } } ] } ], "directives": [] }, "comments": [ { "type": "CommentBlock", "value": "* @typedef {{\r\n * pos: Vector,\r\n * directions: enumDirection[],\r\n * filter?: ItemType\r\n * }} ItemAcceptorSlot ", "start": 226, "end": 340, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 10, "column": 25 } } }, { "type": "CommentBlock", "value": "*\r\n * Contains information about a slot plus its location\r\n * @typedef {{\r\n * slot: ItemAcceptorSlot,\r\n * index: number,\r\n * acceptedDirection: enumDirection\r\n * }} ItemAcceptorLocatedSlot ", "start": 344, "end": 540, "loc": { "start": { "line": 12, "column": 0 }, "end": { "line": 18, "column": 32 } } }, { "type": "CommentBlock", "value": "* @typedef {{\r\n * pos: Vector,\r\n * directions: enumDirection[],\r\n * filter?: ItemType\r\n * }} ItemAcceptorSlotConfig ", "start": 544, "end": 664, "loc": { "start": { "line": 20, "column": 0 }, "end": { "line": 24, "column": 31 } } }, { "type": "CommentBlock", "value": "*\r\n *\r\n * @param {object} param0\r\n * @param {Array} param0.slots The slots from which we accept items\r\n ", "start": 791, "end": 939, "loc": { "start": { "line": 31, "column": 4 }, "end": { "line": 35, "column": 7 } } }, { "type": "CommentBlock", "value": "*\r\n * Fixes belt animations\r\n * @type {Array<{\r\n * item: BaseItem,\r\n * slotIndex: number,\r\n * animProgress: number,\r\n * direction: enumDirection\r\n * }>}\r\n ", "start": 1004, "end": 1228, "loc": { "start": { "line": 39, "column": 8 }, "end": { "line": 47, "column": 11 } } }, { "type": "CommentBlock", "value": "*\r\n *\r\n * @param {Array} slots\r\n ", "start": 1322, "end": 1395, "loc": { "start": { "line": 53, "column": 4 }, "end": { "line": 56, "column": 7 } } }, { "type": "CommentBlock", "value": "* @type {Array} ", "start": 1428, "end": 1466, "loc": { "start": { "line": 58, "column": 8 }, "end": { "line": 58, "column": 46 } } }, { "type": "CommentLine", "value": " Which type of item to accept (shape | color | all) @see ItemType", "start": 1707, "end": 1774, "loc": { "start": { "line": 66, "column": 16 }, "end": { "line": 66, "column": 83 } } }, { "type": "CommentBlock", "value": "*\r\n * Returns if this acceptor can accept a new item at slot N\r\n * @param {number} slotIndex\r\n * @param {BaseItem=} item\r\n ", "start": 1855, "end": 1998, "loc": { "start": { "line": 72, "column": 4 }, "end": { "line": 76, "column": 7 } } }, { "type": "CommentBlock", "value": "*\r\n * Called when an item has been accepted so that\r\n * @param {number} slotIndex\r\n * @param {enumDirection} direction\r\n * @param {BaseItem} item\r\n * @param {number} remainingProgress World space remaining progress, can be set to set the start position of the item\r\n ", "start": 2164, "end": 2459, "loc": { "start": { "line": 82, "column": 4 }, "end": { "line": 88, "column": 7 } } }, { "type": "CommentBlock", "value": "*\r\n * Tries to find a slot which accepts the current item\r\n * @param {Vector} targetLocalTile\r\n * @param {enumDirection} fromLocalDirection\r\n * @returns {ItemAcceptorLocatedSlot|null}\r\n ", "start": 2739, "end": 2949, "loc": { "start": { "line": 98, "column": 4 }, "end": { "line": 103, "column": 7 } } }, { "type": "CommentLine", "value": " We need to invert our direction since the acceptor specifies *from* which direction", "start": 3020, "end": 3106, "loc": { "start": { "line": 105, "column": 8 }, "end": { "line": 105, "column": 94 } } }, { "type": "CommentLine", "value": " it accepts items, but the ejector specifies *into* which direction it ejects items.", "start": 3116, "end": 3202, "loc": { "start": { "line": 106, "column": 8 }, "end": { "line": 106, "column": 94 } } }, { "type": "CommentLine", "value": " E.g.: Ejector ejects into \"right\" direction but acceptor accepts from \"left\" direction.", "start": 3212, "end": 3302, "loc": { "start": { "line": 107, "column": 8 }, "end": { "line": 107, "column": 98 } } }, { "type": "CommentLine", "value": " Go over all slots and try to find a target slot", "start": 3392, "end": 3442, "loc": { "start": { "line": 110, "column": 8 }, "end": { "line": 110, "column": 58 } } }, { "type": "CommentLine", "value": " Make sure the acceptor slot is on the right position", "start": 3586, "end": 3641, "loc": { "start": { "line": 114, "column": 12 }, "end": { "line": 114, "column": 67 } } }, { "type": "CommentLine", "value": " Check if the acceptor slot accepts items from our direction", "start": 3753, "end": 3815, "loc": { "start": { "line": 119, "column": 12 }, "end": { "line": 119, "column": 74 } } }, { "type": "CommentLine", "value": " const localDirection = targetStaticComp.localDirectionToWorld(slot.directions[l]);", "start": 3897, "end": 3982, "loc": { "start": { "line": 121, "column": 16 }, "end": { "line": 121, "column": 101 } } } ], "tokens": [ { "type": { "label": "import", "keyword": "import", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "import", "start": 0, "end": 6, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 7, "end": 8, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "enumDirection", "start": 9, "end": 22, "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 22 } } }, { "type": { "label": ",", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 22, "end": 23, "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "enumInvertedDirections", "start": 24, "end": 46, "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 46 } } }, { "type": { "label": ",", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 46, "end": 47, "loc": { "start": { "line": 1, "column": 46 }, "end": { "line": 1, "column": 47 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "Vector", "start": 48, "end": 54, "loc": { "start": { "line": 1, "column": 48 }, "end": { "line": 1, "column": 54 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 55, "end": 56, "loc": { "start": { "line": 1, "column": 55 }, "end": { "line": 1, "column": 56 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "from", "start": 57, "end": 61, "loc": { "start": { "line": 1, "column": 57 }, "end": { "line": 1, "column": 61 } } }, { "type": { "label": "string", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "../../core/vector", "start": 62, "end": 81, "loc": { "start": { "line": 1, "column": 62 }, "end": { "line": 1, "column": 81 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 81, "end": 82, "loc": { "start": { "line": 1, "column": 81 }, "end": { "line": 1, "column": 82 } } }, { "type": { "label": "import", "keyword": "import", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "import", "start": 84, "end": 90, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 6 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 91, "end": 92, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 8 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "types", "start": 93, "end": 98, "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 14 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 99, "end": 100, "loc": { "start": { "line": 2, "column": 15 }, "end": { "line": 2, "column": 16 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "from", "start": 101, "end": 105, "loc": { "start": { "line": 2, "column": 17 }, "end": { "line": 2, "column": 21 } } }, { "type": { "label": "string", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "../../savegame/serialization", "start": 106, "end": 136, "loc": { "start": { "line": 2, "column": 22 }, "end": { "line": 2, "column": 52 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 136, "end": 137, "loc": { "start": { "line": 2, "column": 52 }, "end": { "line": 2, "column": 53 } } }, { "type": { "label": "import", "keyword": "import", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "import", "start": 139, "end": 145, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 6 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 146, "end": 147, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 8 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "BaseItem", "start": 148, "end": 156, "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 17 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 157, "end": 158, "loc": { "start": { "line": 3, "column": 18 }, "end": { "line": 3, "column": 19 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "from", "start": 159, "end": 163, "loc": { "start": { "line": 3, "column": 20 }, "end": { "line": 3, "column": 24 } } }, { "type": { "label": "string", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "../base_item", "start": 164, "end": 178, "loc": { "start": { "line": 3, "column": 25 }, "end": { "line": 3, "column": 39 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 178, "end": 179, "loc": { "start": { "line": 3, "column": 39 }, "end": { "line": 3, "column": 40 } } }, { "type": { "label": "import", "keyword": "import", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "import", "start": 181, "end": 187, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 6 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 188, "end": 189, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 8 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "Component", "start": 190, "end": 199, "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 18 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 200, "end": 201, "loc": { "start": { "line": 4, "column": 19 }, "end": { "line": 4, "column": 20 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "from", "start": 202, "end": 206, "loc": { "start": { "line": 4, "column": 21 }, "end": { "line": 4, "column": 25 } } }, { "type": { "label": "string", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "../component", "start": 207, "end": 221, "loc": { "start": { "line": 4, "column": 26 }, "end": { "line": 4, "column": 40 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 221, "end": 222, "loc": { "start": { "line": 4, "column": 40 }, "end": { "line": 4, "column": 41 } } }, { "type": "CommentBlock", "value": "* @typedef {{\r\n * pos: Vector,\r\n * directions: enumDirection[],\r\n * filter?: ItemType\r\n * }} ItemAcceptorSlot ", "start": 226, "end": 340, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 10, "column": 25 } } }, { "type": "CommentBlock", "value": "*\r\n * Contains information about a slot plus its location\r\n * @typedef {{\r\n * slot: ItemAcceptorSlot,\r\n * index: number,\r\n * acceptedDirection: enumDirection\r\n * }} ItemAcceptorLocatedSlot ", "start": 344, "end": 540, "loc": { "start": { "line": 12, "column": 0 }, "end": { "line": 18, "column": 32 } } }, { "type": "CommentBlock", "value": "* @typedef {{\r\n * pos: Vector,\r\n * directions: enumDirection[],\r\n * filter?: ItemType\r\n * }} ItemAcceptorSlotConfig ", "start": 544, "end": 664, "loc": { "start": { "line": 20, "column": 0 }, "end": { "line": 24, "column": 31 } } }, { "type": { "label": "export", "keyword": "export", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "export", "start": 668, "end": 674, "loc": { "start": { "line": 26, "column": 0 }, "end": { "line": 26, "column": 6 } } }, { "type": { "label": "class", "keyword": "class", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "class", "start": 675, "end": 680, "loc": { "start": { "line": 26, "column": 7 }, "end": { "line": 26, "column": 12 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "ItemAcceptorComponent", "start": 681, "end": 702, "loc": { "start": { "line": 26, "column": 13 }, "end": { "line": 26, "column": 34 } } }, { "type": { "label": "extends", "keyword": "extends", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "extends", "start": 703, "end": 710, "loc": { "start": { "line": 26, "column": 35 }, "end": { "line": 26, "column": 42 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "Component", "start": 711, "end": 720, "loc": { "start": { "line": 26, "column": 43 }, "end": { "line": 26, "column": 52 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 721, "end": 722, "loc": { "start": { "line": 26, "column": 53 }, "end": { "line": 26, "column": 54 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "static", "start": 728, "end": 734, "loc": { "start": { "line": 27, "column": 4 }, "end": { "line": 27, "column": 10 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "getId", "start": 735, "end": 740, "loc": { "start": { "line": 27, "column": 11 }, "end": { "line": 27, "column": 16 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 740, "end": 741, "loc": { "start": { "line": 27, "column": 16 }, "end": { "line": 27, "column": 17 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 741, "end": 742, "loc": { "start": { "line": 27, "column": 17 }, "end": { "line": 27, "column": 18 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 743, "end": 744, "loc": { "start": { "line": 27, "column": 19 }, "end": { "line": 27, "column": 20 } } }, { "type": { "label": "return", "keyword": "return", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "return", "start": 754, "end": 760, "loc": { "start": { "line": 28, "column": 8 }, "end": { "line": 28, "column": 14 } } }, { "type": { "label": "string", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "ItemAcceptor", "start": 761, "end": 775, "loc": { "start": { "line": 28, "column": 15 }, "end": { "line": 28, "column": 29 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 775, "end": 776, "loc": { "start": { "line": 28, "column": 29 }, "end": { "line": 28, "column": 30 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 782, "end": 783, "loc": { "start": { "line": 29, "column": 4 }, "end": { "line": 29, "column": 5 } } }, { "type": "CommentBlock", "value": "*\r\n *\r\n * @param {object} param0\r\n * @param {Array} param0.slots The slots from which we accept items\r\n ", "start": 791, "end": 939, "loc": { "start": { "line": 31, "column": 4 }, "end": { "line": 35, "column": 7 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "constructor", "start": 945, "end": 956, "loc": { "start": { "line": 36, "column": 4 }, "end": { "line": 36, "column": 15 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 956, "end": 957, "loc": { "start": { "line": 36, "column": 15 }, "end": { "line": 36, "column": 16 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 957, "end": 958, "loc": { "start": { "line": 36, "column": 16 }, "end": { "line": 36, "column": 17 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "slots", "start": 959, "end": 964, "loc": { "start": { "line": 36, "column": 18 }, "end": { "line": 36, "column": 23 } } }, { "type": { "label": "=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "=", "start": 965, "end": 966, "loc": { "start": { "line": 36, "column": 24 }, "end": { "line": 36, "column": 25 } } }, { "type": { "label": "[", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 967, "end": 968, "loc": { "start": { "line": 36, "column": 26 }, "end": { "line": 36, "column": 27 } } }, { "type": { "label": "]", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 968, "end": 969, "loc": { "start": { "line": 36, "column": 27 }, "end": { "line": 36, "column": 28 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 970, "end": 971, "loc": { "start": { "line": 36, "column": 29 }, "end": { "line": 36, "column": 30 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 971, "end": 972, "loc": { "start": { "line": 36, "column": 30 }, "end": { "line": 36, "column": 31 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 973, "end": 974, "loc": { "start": { "line": 36, "column": 32 }, "end": { "line": 36, "column": 33 } } }, { "type": { "label": "super", "keyword": "super", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "super", "start": 984, "end": 989, "loc": { "start": { "line": 37, "column": 8 }, "end": { "line": 37, "column": 13 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 989, "end": 990, "loc": { "start": { "line": 37, "column": 13 }, "end": { "line": 37, "column": 14 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 990, "end": 991, "loc": { "start": { "line": 37, "column": 14 }, "end": { "line": 37, "column": 15 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 991, "end": 992, "loc": { "start": { "line": 37, "column": 15 }, "end": { "line": 37, "column": 16 } } }, { "type": "CommentBlock", "value": "*\r\n * Fixes belt animations\r\n * @type {Array<{\r\n * item: BaseItem,\r\n * slotIndex: number,\r\n * animProgress: number,\r\n * direction: enumDirection\r\n * }>}\r\n ", "start": 1004, "end": 1228, "loc": { "start": { "line": 39, "column": 8 }, "end": { "line": 47, "column": 11 } } }, { "type": { "label": "this", "keyword": "this", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "this", "start": 1238, "end": 1242, "loc": { "start": { "line": 48, "column": 8 }, "end": { "line": 48, "column": 12 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1242, "end": 1243, "loc": { "start": { "line": 48, "column": 12 }, "end": { "line": 48, "column": 13 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "itemConsumptionAnimations", "start": 1243, "end": 1268, "loc": { "start": { "line": 48, "column": 13 }, "end": { "line": 48, "column": 38 } } }, { "type": { "label": "=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "=", "start": 1269, "end": 1270, "loc": { "start": { "line": 48, "column": 39 }, "end": { "line": 48, "column": 40 } } }, { "type": { "label": "[", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1271, "end": 1272, "loc": { "start": { "line": 48, "column": 41 }, "end": { "line": 48, "column": 42 } } }, { "type": { "label": "]", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1272, "end": 1273, "loc": { "start": { "line": 48, "column": 42 }, "end": { "line": 48, "column": 43 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1273, "end": 1274, "loc": { "start": { "line": 48, "column": 43 }, "end": { "line": 48, "column": 44 } } }, { "type": { "label": "this", "keyword": "this", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "this", "start": 1286, "end": 1290, "loc": { "start": { "line": 50, "column": 8 }, "end": { "line": 50, "column": 12 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1290, "end": 1291, "loc": { "start": { "line": 50, "column": 12 }, "end": { "line": 50, "column": 13 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "setSlots", "start": 1291, "end": 1299, "loc": { "start": { "line": 50, "column": 13 }, "end": { "line": 50, "column": 21 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 1299, "end": 1300, "loc": { "start": { "line": 50, "column": 21 }, "end": { "line": 50, "column": 22 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "slots", "start": 1300, "end": 1305, "loc": { "start": { "line": 50, "column": 22 }, "end": { "line": 50, "column": 27 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 1305, "end": 1306, "loc": { "start": { "line": 50, "column": 27 }, "end": { "line": 50, "column": 28 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1306, "end": 1307, "loc": { "start": { "line": 50, "column": 28 }, "end": { "line": 50, "column": 29 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 1313, "end": 1314, "loc": { "start": { "line": 51, "column": 4 }, "end": { "line": 51, "column": 5 } } }, { "type": "CommentBlock", "value": "*\r\n *\r\n * @param {Array} slots\r\n ", "start": 1322, "end": 1395, "loc": { "start": { "line": 53, "column": 4 }, "end": { "line": 56, "column": 7 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "setSlots", "start": 1401, "end": 1409, "loc": { "start": { "line": 57, "column": 4 }, "end": { "line": 57, "column": 12 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 1409, "end": 1410, "loc": { "start": { "line": 57, "column": 12 }, "end": { "line": 57, "column": 13 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "slots", "start": 1410, "end": 1415, "loc": { "start": { "line": 57, "column": 13 }, "end": { "line": 57, "column": 18 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 1415, "end": 1416, "loc": { "start": { "line": 57, "column": 18 }, "end": { "line": 57, "column": 19 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 1417, "end": 1418, "loc": { "start": { "line": 57, "column": 20 }, "end": { "line": 57, "column": 21 } } }, { "type": "CommentBlock", "value": "* @type {Array} ", "start": 1428, "end": 1466, "loc": { "start": { "line": 58, "column": 8 }, "end": { "line": 58, "column": 46 } } }, { "type": { "label": "this", "keyword": "this", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "this", "start": 1476, "end": 1480, "loc": { "start": { "line": 59, "column": 8 }, "end": { "line": 59, "column": 12 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1480, "end": 1481, "loc": { "start": { "line": 59, "column": 12 }, "end": { "line": 59, "column": 13 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "slots", "start": 1481, "end": 1486, "loc": { "start": { "line": 59, "column": 13 }, "end": { "line": 59, "column": 18 } } }, { "type": { "label": "=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "=", "start": 1487, "end": 1488, "loc": { "start": { "line": 59, "column": 19 }, "end": { "line": 59, "column": 20 } } }, { "type": { "label": "[", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1489, "end": 1490, "loc": { "start": { "line": 59, "column": 21 }, "end": { "line": 59, "column": 22 } } }, { "type": { "label": "]", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1490, "end": 1491, "loc": { "start": { "line": 59, "column": 22 }, "end": { "line": 59, "column": 23 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1491, "end": 1492, "loc": { "start": { "line": 59, "column": 23 }, "end": { "line": 59, "column": 24 } } }, { "type": { "label": "for", "keyword": "for", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": true, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "for", "start": 1502, "end": 1505, "loc": { "start": { "line": 60, "column": 8 }, "end": { "line": 60, "column": 11 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 1506, "end": 1507, "loc": { "start": { "line": 60, "column": 12 }, "end": { "line": 60, "column": 13 } } }, { "type": { "label": "let", "keyword": "let", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "let", "start": 1507, "end": 1510, "loc": { "start": { "line": 60, "column": 13 }, "end": { "line": 60, "column": 16 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "i", "start": 1511, "end": 1512, "loc": { "start": { "line": 60, "column": 17 }, "end": { "line": 60, "column": 18 } } }, { "type": { "label": "=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "=", "start": 1513, "end": 1514, "loc": { "start": { "line": 60, "column": 19 }, "end": { "line": 60, "column": 20 } } }, { "type": { "label": "num", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": 0, "start": 1515, "end": 1516, "loc": { "start": { "line": 60, "column": 21 }, "end": { "line": 60, "column": 22 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1516, "end": 1517, "loc": { "start": { "line": 60, "column": 22 }, "end": { "line": 60, "column": 23 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "i", "start": 1518, "end": 1519, "loc": { "start": { "line": 60, "column": 24 }, "end": { "line": 60, "column": 25 } } }, { "type": { "label": "", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": 7, "updateContext": null }, "value": "<", "start": 1520, "end": 1521, "loc": { "start": { "line": 60, "column": 26 }, "end": { "line": 60, "column": 27 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "slots", "start": 1522, "end": 1527, "loc": { "start": { "line": 60, "column": 28 }, "end": { "line": 60, "column": 33 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1527, "end": 1528, "loc": { "start": { "line": 60, "column": 33 }, "end": { "line": 60, "column": 34 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "length", "start": 1528, "end": 1534, "loc": { "start": { "line": 60, "column": 34 }, "end": { "line": 60, "column": 40 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1534, "end": 1535, "loc": { "start": { "line": 60, "column": 40 }, "end": { "line": 60, "column": 41 } } }, { "type": { "label": "++/--", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": true, "postfix": true, "binop": null }, "value": "++", "start": 1536, "end": 1538, "loc": { "start": { "line": 60, "column": 42 }, "end": { "line": 60, "column": 44 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "i", "start": 1538, "end": 1539, "loc": { "start": { "line": 60, "column": 44 }, "end": { "line": 60, "column": 45 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 1539, "end": 1540, "loc": { "start": { "line": 60, "column": 45 }, "end": { "line": 60, "column": 46 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 1541, "end": 1542, "loc": { "start": { "line": 60, "column": 47 }, "end": { "line": 60, "column": 48 } } }, { "type": { "label": "const", "keyword": "const", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "const", "start": 1556, "end": 1561, "loc": { "start": { "line": 61, "column": 12 }, "end": { "line": 61, "column": 17 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "slot", "start": 1562, "end": 1566, "loc": { "start": { "line": 61, "column": 18 }, "end": { "line": 61, "column": 22 } } }, { "type": { "label": "=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "=", "start": 1567, "end": 1568, "loc": { "start": { "line": 61, "column": 23 }, "end": { "line": 61, "column": 24 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "slots", "start": 1569, "end": 1574, "loc": { "start": { "line": 61, "column": 25 }, "end": { "line": 61, "column": 30 } } }, { "type": { "label": "[", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1574, "end": 1575, "loc": { "start": { "line": 61, "column": 30 }, "end": { "line": 61, "column": 31 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "i", "start": 1575, "end": 1576, "loc": { "start": { "line": 61, "column": 31 }, "end": { "line": 61, "column": 32 } } }, { "type": { "label": "]", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1576, "end": 1577, "loc": { "start": { "line": 61, "column": 32 }, "end": { "line": 61, "column": 33 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1577, "end": 1578, "loc": { "start": { "line": 61, "column": 33 }, "end": { "line": 61, "column": 34 } } }, { "type": { "label": "this", "keyword": "this", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "this", "start": 1592, "end": 1596, "loc": { "start": { "line": 62, "column": 12 }, "end": { "line": 62, "column": 16 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1596, "end": 1597, "loc": { "start": { "line": 62, "column": 16 }, "end": { "line": 62, "column": 17 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "slots", "start": 1597, "end": 1602, "loc": { "start": { "line": 62, "column": 17 }, "end": { "line": 62, "column": 22 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1602, "end": 1603, "loc": { "start": { "line": 62, "column": 22 }, "end": { "line": 62, "column": 23 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "push", "start": 1603, "end": 1607, "loc": { "start": { "line": 62, "column": 23 }, "end": { "line": 62, "column": 27 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 1607, "end": 1608, "loc": { "start": { "line": 62, "column": 27 }, "end": { "line": 62, "column": 28 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 1608, "end": 1609, "loc": { "start": { "line": 62, "column": 28 }, "end": { "line": 62, "column": 29 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "pos", "start": 1627, "end": 1630, "loc": { "start": { "line": 63, "column": 16 }, "end": { "line": 63, "column": 19 } } }, { "type": { "label": ":", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1630, "end": 1631, "loc": { "start": { "line": 63, "column": 19 }, "end": { "line": 63, "column": 20 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "slot", "start": 1632, "end": 1636, "loc": { "start": { "line": 63, "column": 21 }, "end": { "line": 63, "column": 25 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1636, "end": 1637, "loc": { "start": { "line": 63, "column": 25 }, "end": { "line": 63, "column": 26 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "pos", "start": 1637, "end": 1640, "loc": { "start": { "line": 63, "column": 26 }, "end": { "line": 63, "column": 29 } } }, { "type": { "label": ",", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1640, "end": 1641, "loc": { "start": { "line": 63, "column": 29 }, "end": { "line": 63, "column": 30 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "directions", "start": 1659, "end": 1669, "loc": { "start": { "line": 64, "column": 16 }, "end": { "line": 64, "column": 26 } } }, { "type": { "label": ":", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1669, "end": 1670, "loc": { "start": { "line": 64, "column": 26 }, "end": { "line": 64, "column": 27 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "slot", "start": 1671, "end": 1675, "loc": { "start": { "line": 64, "column": 28 }, "end": { "line": 64, "column": 32 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1675, "end": 1676, "loc": { "start": { "line": 64, "column": 32 }, "end": { "line": 64, "column": 33 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "directions", "start": 1676, "end": 1686, "loc": { "start": { "line": 64, "column": 33 }, "end": { "line": 64, "column": 43 } } }, { "type": { "label": ",", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1686, "end": 1687, "loc": { "start": { "line": 64, "column": 43 }, "end": { "line": 64, "column": 44 } } }, { "type": "CommentLine", "value": " Which type of item to accept (shape | color | all) @see ItemType", "start": 1707, "end": 1774, "loc": { "start": { "line": 66, "column": 16 }, "end": { "line": 66, "column": 83 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "filter", "start": 1792, "end": 1798, "loc": { "start": { "line": 67, "column": 16 }, "end": { "line": 67, "column": 22 } } }, { "type": { "label": ":", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1798, "end": 1799, "loc": { "start": { "line": 67, "column": 22 }, "end": { "line": 67, "column": 23 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "slot", "start": 1800, "end": 1804, "loc": { "start": { "line": 67, "column": 24 }, "end": { "line": 67, "column": 28 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1804, "end": 1805, "loc": { "start": { "line": 67, "column": 28 }, "end": { "line": 67, "column": 29 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "filter", "start": 1805, "end": 1811, "loc": { "start": { "line": 67, "column": 29 }, "end": { "line": 67, "column": 35 } } }, { "type": { "label": ",", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1811, "end": 1812, "loc": { "start": { "line": 67, "column": 35 }, "end": { "line": 67, "column": 36 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 1826, "end": 1827, "loc": { "start": { "line": 68, "column": 12 }, "end": { "line": 68, "column": 13 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 1827, "end": 1828, "loc": { "start": { "line": 68, "column": 13 }, "end": { "line": 68, "column": 14 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 1828, "end": 1829, "loc": { "start": { "line": 68, "column": 14 }, "end": { "line": 68, "column": 15 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 1839, "end": 1840, "loc": { "start": { "line": 69, "column": 8 }, "end": { "line": 69, "column": 9 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 1846, "end": 1847, "loc": { "start": { "line": 70, "column": 4 }, "end": { "line": 70, "column": 5 } } }, { "type": "CommentBlock", "value": "*\r\n * Returns if this acceptor can accept a new item at slot N\r\n * @param {number} slotIndex\r\n * @param {BaseItem=} item\r\n ", "start": 1855, "end": 1998, "loc": { "start": { "line": 72, "column": 4 }, "end": { "line": 76, "column": 7 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "canAcceptItem", "start": 2004, "end": 2017, "loc": { "start": { "line": 77, "column": 4 }, "end": { "line": 77, "column": 17 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 2017, "end": 2018, "loc": { "start": { "line": 77, "column": 17 }, "end": { "line": 77, "column": 18 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "slotIndex", "start": 2018, "end": 2027, "loc": { "start": { "line": 77, "column": 18 }, "end": { "line": 77, "column": 27 } } }, { "type": { "label": ",", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 2027, "end": 2028, "loc": { "start": { "line": 77, "column": 27 }, "end": { "line": 77, "column": 28 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "item", "start": 2029, "end": 2033, "loc": { "start": { "line": 77, "column": 29 }, "end": { "line": 77, "column": 33 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 2033, "end": 2034, "loc": { "start": { "line": 77, "column": 33 }, "end": { "line": 77, "column": 34 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 2035, "end": 2036, "loc": { "start": { "line": 77, "column": 35 }, "end": { "line": 77, "column": 36 } } }, { "type": { "label": "const", "keyword": "const", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "const", "start": 2046, "end": 2051, "loc": { "start": { "line": 78, "column": 8 }, "end": { "line": 78, "column": 13 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "slot", "start": 2052, "end": 2056, "loc": { "start": { "line": 78, "column": 14 }, "end": { "line": 78, "column": 18 } } }, { "type": { "label": "=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "=", "start": 2057, "end": 2058, "loc": { "start": { "line": 78, "column": 19 }, "end": { "line": 78, "column": 20 } } }, { "type": { "label": "this", "keyword": "this", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "this", "start": 2059, "end": 2063, "loc": { "start": { "line": 78, "column": 21 }, "end": { "line": 78, "column": 25 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 2063, "end": 2064, "loc": { "start": { "line": 78, "column": 25 }, "end": { "line": 78, "column": 26 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "slots", "start": 2064, "end": 2069, "loc": { "start": { "line": 78, "column": 26 }, "end": { "line": 78, "column": 31 } } }, { "type": { "label": "[", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 2069, "end": 2070, "loc": { "start": { "line": 78, "column": 31 }, "end": { "line": 78, "column": 32 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "slotIndex", "start": 2070, "end": 2079, "loc": { "start": { "line": 78, "column": 32 }, "end": { "line": 78, "column": 41 } } }, { "type": { "label": "]", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 2079, "end": 2080, "loc": { "start": { "line": 78, "column": 41 }, "end": { "line": 78, "column": 42 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 2080, "end": 2081, "loc": { "start": { "line": 78, "column": 42 }, "end": { "line": 78, "column": 43 } } }, { "type": { "label": "return", "keyword": "return", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "return", "start": 2091, "end": 2097, "loc": { "start": { "line": 79, "column": 8 }, "end": { "line": 79, "column": 14 } } }, { "type": { "label": "prefix", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": true, "postfix": false, "binop": null, "updateContext": null }, "value": "!", "start": 2098, "end": 2099, "loc": { "start": { "line": 79, "column": 15 }, "end": { "line": 79, "column": 16 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "slot", "start": 2099, "end": 2103, "loc": { "start": { "line": 79, "column": 16 }, "end": { "line": 79, "column": 20 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 2103, "end": 2104, "loc": { "start": { "line": 79, "column": 20 }, "end": { "line": 79, "column": 21 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "filter", "start": 2104, "end": 2110, "loc": { "start": { "line": 79, "column": 21 }, "end": { "line": 79, "column": 27 } } }, { "type": { "label": "||", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": 1, "updateContext": null }, "value": "||", "start": 2111, "end": 2113, "loc": { "start": { "line": 79, "column": 28 }, "end": { "line": 79, "column": 30 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "slot", "start": 2114, "end": 2118, "loc": { "start": { "line": 79, "column": 31 }, "end": { "line": 79, "column": 35 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 2118, "end": 2119, "loc": { "start": { "line": 79, "column": 35 }, "end": { "line": 79, "column": 36 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "filter", "start": 2119, "end": 2125, "loc": { "start": { "line": 79, "column": 36 }, "end": { "line": 79, "column": 42 } } }, { "type": { "label": "==/!=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": 6, "updateContext": null }, "value": "===", "start": 2126, "end": 2129, "loc": { "start": { "line": 79, "column": 43 }, "end": { "line": 79, "column": 46 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "item", "start": 2130, "end": 2134, "loc": { "start": { "line": 79, "column": 47 }, "end": { "line": 79, "column": 51 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 2134, "end": 2135, "loc": { "start": { "line": 79, "column": 51 }, "end": { "line": 79, "column": 52 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "getItemType", "start": 2135, "end": 2146, "loc": { "start": { "line": 79, "column": 52 }, "end": { "line": 79, "column": 63 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 2146, "end": 2147, "loc": { "start": { "line": 79, "column": 63 }, "end": { "line": 79, "column": 64 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 2147, "end": 2148, "loc": { "start": { "line": 79, "column": 64 }, "end": { "line": 79, "column": 65 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 2148, "end": 2149, "loc": { "start": { "line": 79, "column": 65 }, "end": { "line": 79, "column": 66 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 2155, "end": 2156, "loc": { "start": { "line": 80, "column": 4 }, "end": { "line": 80, "column": 5 } } }, { "type": "CommentBlock", "value": "*\r\n * Called when an item has been accepted so that\r\n * @param {number} slotIndex\r\n * @param {enumDirection} direction\r\n * @param {BaseItem} item\r\n * @param {number} remainingProgress World space remaining progress, can be set to set the start position of the item\r\n ", "start": 2164, "end": 2459, "loc": { "start": { "line": 82, "column": 4 }, "end": { "line": 88, "column": 7 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "onItemAccepted", "start": 2465, "end": 2479, "loc": { "start": { "line": 89, "column": 4 }, "end": { "line": 89, "column": 18 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 2479, "end": 2480, "loc": { "start": { "line": 89, "column": 18 }, "end": { "line": 89, "column": 19 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "slotIndex", "start": 2480, "end": 2489, "loc": { "start": { "line": 89, "column": 19 }, "end": { "line": 89, "column": 28 } } }, { "type": { "label": ",", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 2489, "end": 2490, "loc": { "start": { "line": 89, "column": 28 }, "end": { "line": 89, "column": 29 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "direction", "start": 2491, "end": 2500, "loc": { "start": { "line": 89, "column": 30 }, "end": { "line": 89, "column": 39 } } }, { "type": { "label": ",", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 2500, "end": 2501, "loc": { "start": { "line": 89, "column": 39 }, "end": { "line": 89, "column": 40 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "item", "start": 2502, "end": 2506, "loc": { "start": { "line": 89, "column": 41 }, "end": { "line": 89, "column": 45 } } }, { "type": { "label": ",", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 2506, "end": 2507, "loc": { "start": { "line": 89, "column": 45 }, "end": { "line": 89, "column": 46 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "remainingProgress", "start": 2508, "end": 2525, "loc": { "start": { "line": 89, "column": 47 }, "end": { "line": 89, "column": 64 } } }, { "type": { "label": "=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "=", "start": 2526, "end": 2527, "loc": { "start": { "line": 89, "column": 65 }, "end": { "line": 89, "column": 66 } } }, { "type": { "label": "num", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": 0, "start": 2528, "end": 2531, "loc": { "start": { "line": 89, "column": 67 }, "end": { "line": 89, "column": 70 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 2531, "end": 2532, "loc": { "start": { "line": 89, "column": 70 }, "end": { "line": 89, "column": 71 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 2533, "end": 2534, "loc": { "start": { "line": 89, "column": 72 }, "end": { "line": 89, "column": 73 } } }, { "type": { "label": "this", "keyword": "this", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "this", "start": 2544, "end": 2548, "loc": { "start": { "line": 90, "column": 8 }, "end": { "line": 90, "column": 12 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 2548, "end": 2549, "loc": { "start": { "line": 90, "column": 12 }, "end": { "line": 90, "column": 13 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "itemConsumptionAnimations", "start": 2549, "end": 2574, "loc": { "start": { "line": 90, "column": 13 }, "end": { "line": 90, "column": 38 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 2574, "end": 2575, "loc": { "start": { "line": 90, "column": 38 }, "end": { "line": 90, "column": 39 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "push", "start": 2575, "end": 2579, "loc": { "start": { "line": 90, "column": 39 }, "end": { "line": 90, "column": 43 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 2579, "end": 2580, "loc": { "start": { "line": 90, "column": 43 }, "end": { "line": 90, "column": 44 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 2580, "end": 2581, "loc": { "start": { "line": 90, "column": 44 }, "end": { "line": 90, "column": 45 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "item", "start": 2595, "end": 2599, "loc": { "start": { "line": 91, "column": 12 }, "end": { "line": 91, "column": 16 } } }, { "type": { "label": ",", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 2599, "end": 2600, "loc": { "start": { "line": 91, "column": 16 }, "end": { "line": 91, "column": 17 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "slotIndex", "start": 2614, "end": 2623, "loc": { "start": { "line": 92, "column": 12 }, "end": { "line": 92, "column": 21 } } }, { "type": { "label": ",", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 2623, "end": 2624, "loc": { "start": { "line": 92, "column": 21 }, "end": { "line": 92, "column": 22 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "direction", "start": 2638, "end": 2647, "loc": { "start": { "line": 93, "column": 12 }, "end": { "line": 93, "column": 21 } } }, { "type": { "label": ",", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 2647, "end": 2648, "loc": { "start": { "line": 93, "column": 21 }, "end": { "line": 93, "column": 22 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "animProgress", "start": 2662, "end": 2674, "loc": { "start": { "line": 94, "column": 12 }, "end": { "line": 94, "column": 24 } } }, { "type": { "label": ":", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 2674, "end": 2675, "loc": { "start": { "line": 94, "column": 24 }, "end": { "line": 94, "column": 25 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "Math", "start": 2676, "end": 2680, "loc": { "start": { "line": 94, "column": 26 }, "end": { "line": 94, "column": 30 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 2680, "end": 2681, "loc": { "start": { "line": 94, "column": 30 }, "end": { "line": 94, "column": 31 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "min", "start": 2681, "end": 2684, "loc": { "start": { "line": 94, "column": 31 }, "end": { "line": 94, "column": 34 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 2684, "end": 2685, "loc": { "start": { "line": 94, "column": 34 }, "end": { "line": 94, "column": 35 } } }, { "type": { "label": "num", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": 1, "start": 2685, "end": 2686, "loc": { "start": { "line": 94, "column": 35 }, "end": { "line": 94, "column": 36 } } }, { "type": { "label": ",", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 2686, "end": 2687, "loc": { "start": { "line": 94, "column": 36 }, "end": { "line": 94, "column": 37 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "remainingProgress", "start": 2688, "end": 2705, "loc": { "start": { "line": 94, "column": 38 }, "end": { "line": 94, "column": 55 } } }, { "type": { "label": "*", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": 10, "updateContext": null }, "value": "*", "start": 2706, "end": 2707, "loc": { "start": { "line": 94, "column": 56 }, "end": { "line": 94, "column": 57 } } }, { "type": { "label": "num", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": 2, "start": 2708, "end": 2709, "loc": { "start": { "line": 94, "column": 58 }, "end": { "line": 94, "column": 59 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 2709, "end": 2710, "loc": { "start": { "line": 94, "column": 59 }, "end": { "line": 94, "column": 60 } } }, { "type": { "label": ",", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 2710, "end": 2711, "loc": { "start": { "line": 94, "column": 60 }, "end": { "line": 94, "column": 61 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 2721, "end": 2722, "loc": { "start": { "line": 95, "column": 8 }, "end": { "line": 95, "column": 9 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 2722, "end": 2723, "loc": { "start": { "line": 95, "column": 9 }, "end": { "line": 95, "column": 10 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 2723, "end": 2724, "loc": { "start": { "line": 95, "column": 10 }, "end": { "line": 95, "column": 11 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 2730, "end": 2731, "loc": { "start": { "line": 96, "column": 4 }, "end": { "line": 96, "column": 5 } } }, { "type": "CommentBlock", "value": "*\r\n * Tries to find a slot which accepts the current item\r\n * @param {Vector} targetLocalTile\r\n * @param {enumDirection} fromLocalDirection\r\n * @returns {ItemAcceptorLocatedSlot|null}\r\n ", "start": 2739, "end": 2949, "loc": { "start": { "line": 98, "column": 4 }, "end": { "line": 103, "column": 7 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "findMatchingSlot", "start": 2955, "end": 2971, "loc": { "start": { "line": 104, "column": 4 }, "end": { "line": 104, "column": 20 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 2971, "end": 2972, "loc": { "start": { "line": 104, "column": 20 }, "end": { "line": 104, "column": 21 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "targetLocalTile", "start": 2972, "end": 2987, "loc": { "start": { "line": 104, "column": 21 }, "end": { "line": 104, "column": 36 } } }, { "type": { "label": ",", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 2987, "end": 2988, "loc": { "start": { "line": 104, "column": 36 }, "end": { "line": 104, "column": 37 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "fromLocalDirection", "start": 2989, "end": 3007, "loc": { "start": { "line": 104, "column": 38 }, "end": { "line": 104, "column": 56 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 3007, "end": 3008, "loc": { "start": { "line": 104, "column": 56 }, "end": { "line": 104, "column": 57 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 3009, "end": 3010, "loc": { "start": { "line": 104, "column": 58 }, "end": { "line": 104, "column": 59 } } }, { "type": "CommentLine", "value": " We need to invert our direction since the acceptor specifies *from* which direction", "start": 3020, "end": 3106, "loc": { "start": { "line": 105, "column": 8 }, "end": { "line": 105, "column": 94 } } }, { "type": "CommentLine", "value": " it accepts items, but the ejector specifies *into* which direction it ejects items.", "start": 3116, "end": 3202, "loc": { "start": { "line": 106, "column": 8 }, "end": { "line": 106, "column": 94 } } }, { "type": "CommentLine", "value": " E.g.: Ejector ejects into \"right\" direction but acceptor accepts from \"left\" direction.", "start": 3212, "end": 3302, "loc": { "start": { "line": 107, "column": 8 }, "end": { "line": 107, "column": 98 } } }, { "type": { "label": "const", "keyword": "const", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "const", "start": 3312, "end": 3317, "loc": { "start": { "line": 108, "column": 8 }, "end": { "line": 108, "column": 13 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "desiredDirection", "start": 3318, "end": 3334, "loc": { "start": { "line": 108, "column": 14 }, "end": { "line": 108, "column": 30 } } }, { "type": { "label": "=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "=", "start": 3335, "end": 3336, "loc": { "start": { "line": 108, "column": 31 }, "end": { "line": 108, "column": 32 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "enumInvertedDirections", "start": 3337, "end": 3359, "loc": { "start": { "line": 108, "column": 33 }, "end": { "line": 108, "column": 55 } } }, { "type": { "label": "[", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 3359, "end": 3360, "loc": { "start": { "line": 108, "column": 55 }, "end": { "line": 108, "column": 56 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "fromLocalDirection", "start": 3360, "end": 3378, "loc": { "start": { "line": 108, "column": 56 }, "end": { "line": 108, "column": 74 } } }, { "type": { "label": "]", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 3378, "end": 3379, "loc": { "start": { "line": 108, "column": 74 }, "end": { "line": 108, "column": 75 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 3379, "end": 3380, "loc": { "start": { "line": 108, "column": 75 }, "end": { "line": 108, "column": 76 } } }, { "type": "CommentLine", "value": " Go over all slots and try to find a target slot", "start": 3392, "end": 3442, "loc": { "start": { "line": 110, "column": 8 }, "end": { "line": 110, "column": 58 } } }, { "type": { "label": "for", "keyword": "for", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": true, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "for", "start": 3452, "end": 3455, "loc": { "start": { "line": 111, "column": 8 }, "end": { "line": 111, "column": 11 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 3456, "end": 3457, "loc": { "start": { "line": 111, "column": 12 }, "end": { "line": 111, "column": 13 } } }, { "type": { "label": "let", "keyword": "let", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "let", "start": 3457, "end": 3460, "loc": { "start": { "line": 111, "column": 13 }, "end": { "line": 111, "column": 16 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "slotIndex", "start": 3461, "end": 3470, "loc": { "start": { "line": 111, "column": 17 }, "end": { "line": 111, "column": 26 } } }, { "type": { "label": "=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "=", "start": 3471, "end": 3472, "loc": { "start": { "line": 111, "column": 27 }, "end": { "line": 111, "column": 28 } } }, { "type": { "label": "num", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": 0, "start": 3473, "end": 3474, "loc": { "start": { "line": 111, "column": 29 }, "end": { "line": 111, "column": 30 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 3474, "end": 3475, "loc": { "start": { "line": 111, "column": 30 }, "end": { "line": 111, "column": 31 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "slotIndex", "start": 3476, "end": 3485, "loc": { "start": { "line": 111, "column": 32 }, "end": { "line": 111, "column": 41 } } }, { "type": { "label": "", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": 7, "updateContext": null }, "value": "<", "start": 3486, "end": 3487, "loc": { "start": { "line": 111, "column": 42 }, "end": { "line": 111, "column": 43 } } }, { "type": { "label": "this", "keyword": "this", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "this", "start": 3488, "end": 3492, "loc": { "start": { "line": 111, "column": 44 }, "end": { "line": 111, "column": 48 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 3492, "end": 3493, "loc": { "start": { "line": 111, "column": 48 }, "end": { "line": 111, "column": 49 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "slots", "start": 3493, "end": 3498, "loc": { "start": { "line": 111, "column": 49 }, "end": { "line": 111, "column": 54 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 3498, "end": 3499, "loc": { "start": { "line": 111, "column": 54 }, "end": { "line": 111, "column": 55 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "length", "start": 3499, "end": 3505, "loc": { "start": { "line": 111, "column": 55 }, "end": { "line": 111, "column": 61 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 3505, "end": 3506, "loc": { "start": { "line": 111, "column": 61 }, "end": { "line": 111, "column": 62 } } }, { "type": { "label": "++/--", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": true, "postfix": true, "binop": null }, "value": "++", "start": 3507, "end": 3509, "loc": { "start": { "line": 111, "column": 63 }, "end": { "line": 111, "column": 65 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "slotIndex", "start": 3509, "end": 3518, "loc": { "start": { "line": 111, "column": 65 }, "end": { "line": 111, "column": 74 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 3518, "end": 3519, "loc": { "start": { "line": 111, "column": 74 }, "end": { "line": 111, "column": 75 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 3520, "end": 3521, "loc": { "start": { "line": 111, "column": 76 }, "end": { "line": 111, "column": 77 } } }, { "type": { "label": "const", "keyword": "const", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "const", "start": 3535, "end": 3540, "loc": { "start": { "line": 112, "column": 12 }, "end": { "line": 112, "column": 17 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "slot", "start": 3541, "end": 3545, "loc": { "start": { "line": 112, "column": 18 }, "end": { "line": 112, "column": 22 } } }, { "type": { "label": "=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "=", "start": 3546, "end": 3547, "loc": { "start": { "line": 112, "column": 23 }, "end": { "line": 112, "column": 24 } } }, { "type": { "label": "this", "keyword": "this", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "this", "start": 3548, "end": 3552, "loc": { "start": { "line": 112, "column": 25 }, "end": { "line": 112, "column": 29 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 3552, "end": 3553, "loc": { "start": { "line": 112, "column": 29 }, "end": { "line": 112, "column": 30 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "slots", "start": 3553, "end": 3558, "loc": { "start": { "line": 112, "column": 30 }, "end": { "line": 112, "column": 35 } } }, { "type": { "label": "[", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 3558, "end": 3559, "loc": { "start": { "line": 112, "column": 35 }, "end": { "line": 112, "column": 36 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "slotIndex", "start": 3559, "end": 3568, "loc": { "start": { "line": 112, "column": 36 }, "end": { "line": 112, "column": 45 } } }, { "type": { "label": "]", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 3568, "end": 3569, "loc": { "start": { "line": 112, "column": 45 }, "end": { "line": 112, "column": 46 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 3569, "end": 3570, "loc": { "start": { "line": 112, "column": 46 }, "end": { "line": 112, "column": 47 } } }, { "type": "CommentLine", "value": " Make sure the acceptor slot is on the right position", "start": 3586, "end": 3641, "loc": { "start": { "line": 114, "column": 12 }, "end": { "line": 114, "column": 67 } } }, { "type": { "label": "if", "keyword": "if", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "if", "start": 3655, "end": 3657, "loc": { "start": { "line": 115, "column": 12 }, "end": { "line": 115, "column": 14 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 3658, "end": 3659, "loc": { "start": { "line": 115, "column": 15 }, "end": { "line": 115, "column": 16 } } }, { "type": { "label": "prefix", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": true, "postfix": false, "binop": null, "updateContext": null }, "value": "!", "start": 3659, "end": 3660, "loc": { "start": { "line": 115, "column": 16 }, "end": { "line": 115, "column": 17 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "slot", "start": 3660, "end": 3664, "loc": { "start": { "line": 115, "column": 17 }, "end": { "line": 115, "column": 21 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 3664, "end": 3665, "loc": { "start": { "line": 115, "column": 21 }, "end": { "line": 115, "column": 22 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "pos", "start": 3665, "end": 3668, "loc": { "start": { "line": 115, "column": 22 }, "end": { "line": 115, "column": 25 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 3668, "end": 3669, "loc": { "start": { "line": 115, "column": 25 }, "end": { "line": 115, "column": 26 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "equals", "start": 3669, "end": 3675, "loc": { "start": { "line": 115, "column": 26 }, "end": { "line": 115, "column": 32 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 3675, "end": 3676, "loc": { "start": { "line": 115, "column": 32 }, "end": { "line": 115, "column": 33 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "targetLocalTile", "start": 3676, "end": 3691, "loc": { "start": { "line": 115, "column": 33 }, "end": { "line": 115, "column": 48 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 3691, "end": 3692, "loc": { "start": { "line": 115, "column": 48 }, "end": { "line": 115, "column": 49 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 3692, "end": 3693, "loc": { "start": { "line": 115, "column": 49 }, "end": { "line": 115, "column": 50 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 3694, "end": 3695, "loc": { "start": { "line": 115, "column": 51 }, "end": { "line": 115, "column": 52 } } }, { "type": { "label": "continue", "keyword": "continue", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "continue", "start": 3713, "end": 3721, "loc": { "start": { "line": 116, "column": 16 }, "end": { "line": 116, "column": 24 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 3721, "end": 3722, "loc": { "start": { "line": 116, "column": 24 }, "end": { "line": 116, "column": 25 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 3736, "end": 3737, "loc": { "start": { "line": 117, "column": 12 }, "end": { "line": 117, "column": 13 } } }, { "type": "CommentLine", "value": " Check if the acceptor slot accepts items from our direction", "start": 3753, "end": 3815, "loc": { "start": { "line": 119, "column": 12 }, "end": { "line": 119, "column": 74 } } }, { "type": { "label": "for", "keyword": "for", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": true, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "for", "start": 3829, "end": 3832, "loc": { "start": { "line": 120, "column": 12 }, "end": { "line": 120, "column": 15 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 3833, "end": 3834, "loc": { "start": { "line": 120, "column": 16 }, "end": { "line": 120, "column": 17 } } }, { "type": { "label": "let", "keyword": "let", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "let", "start": 3834, "end": 3837, "loc": { "start": { "line": 120, "column": 17 }, "end": { "line": 120, "column": 20 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "i", "start": 3838, "end": 3839, "loc": { "start": { "line": 120, "column": 21 }, "end": { "line": 120, "column": 22 } } }, { "type": { "label": "=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "=", "start": 3840, "end": 3841, "loc": { "start": { "line": 120, "column": 23 }, "end": { "line": 120, "column": 24 } } }, { "type": { "label": "num", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": 0, "start": 3842, "end": 3843, "loc": { "start": { "line": 120, "column": 25 }, "end": { "line": 120, "column": 26 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 3843, "end": 3844, "loc": { "start": { "line": 120, "column": 26 }, "end": { "line": 120, "column": 27 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "i", "start": 3845, "end": 3846, "loc": { "start": { "line": 120, "column": 28 }, "end": { "line": 120, "column": 29 } } }, { "type": { "label": "", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": 7, "updateContext": null }, "value": "<", "start": 3847, "end": 3848, "loc": { "start": { "line": 120, "column": 30 }, "end": { "line": 120, "column": 31 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "slot", "start": 3849, "end": 3853, "loc": { "start": { "line": 120, "column": 32 }, "end": { "line": 120, "column": 36 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 3853, "end": 3854, "loc": { "start": { "line": 120, "column": 36 }, "end": { "line": 120, "column": 37 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "directions", "start": 3854, "end": 3864, "loc": { "start": { "line": 120, "column": 37 }, "end": { "line": 120, "column": 47 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 3864, "end": 3865, "loc": { "start": { "line": 120, "column": 47 }, "end": { "line": 120, "column": 48 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "length", "start": 3865, "end": 3871, "loc": { "start": { "line": 120, "column": 48 }, "end": { "line": 120, "column": 54 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 3871, "end": 3872, "loc": { "start": { "line": 120, "column": 54 }, "end": { "line": 120, "column": 55 } } }, { "type": { "label": "++/--", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": true, "postfix": true, "binop": null }, "value": "++", "start": 3873, "end": 3875, "loc": { "start": { "line": 120, "column": 56 }, "end": { "line": 120, "column": 58 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "i", "start": 3875, "end": 3876, "loc": { "start": { "line": 120, "column": 58 }, "end": { "line": 120, "column": 59 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 3876, "end": 3877, "loc": { "start": { "line": 120, "column": 59 }, "end": { "line": 120, "column": 60 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 3878, "end": 3879, "loc": { "start": { "line": 120, "column": 61 }, "end": { "line": 120, "column": 62 } } }, { "type": "CommentLine", "value": " const localDirection = targetStaticComp.localDirectionToWorld(slot.directions[l]);", "start": 3897, "end": 3982, "loc": { "start": { "line": 121, "column": 16 }, "end": { "line": 121, "column": 101 } } }, { "type": { "label": "if", "keyword": "if", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "if", "start": 4000, "end": 4002, "loc": { "start": { "line": 122, "column": 16 }, "end": { "line": 122, "column": 18 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 4003, "end": 4004, "loc": { "start": { "line": 122, "column": 19 }, "end": { "line": 122, "column": 20 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "desiredDirection", "start": 4004, "end": 4020, "loc": { "start": { "line": 122, "column": 20 }, "end": { "line": 122, "column": 36 } } }, { "type": { "label": "==/!=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": 6, "updateContext": null }, "value": "===", "start": 4021, "end": 4024, "loc": { "start": { "line": 122, "column": 37 }, "end": { "line": 122, "column": 40 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "slot", "start": 4025, "end": 4029, "loc": { "start": { "line": 122, "column": 41 }, "end": { "line": 122, "column": 45 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 4029, "end": 4030, "loc": { "start": { "line": 122, "column": 45 }, "end": { "line": 122, "column": 46 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "directions", "start": 4030, "end": 4040, "loc": { "start": { "line": 122, "column": 46 }, "end": { "line": 122, "column": 56 } } }, { "type": { "label": "[", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 4040, "end": 4041, "loc": { "start": { "line": 122, "column": 56 }, "end": { "line": 122, "column": 57 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "i", "start": 4041, "end": 4042, "loc": { "start": { "line": 122, "column": 57 }, "end": { "line": 122, "column": 58 } } }, { "type": { "label": "]", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 4042, "end": 4043, "loc": { "start": { "line": 122, "column": 58 }, "end": { "line": 122, "column": 59 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 4043, "end": 4044, "loc": { "start": { "line": 122, "column": 59 }, "end": { "line": 122, "column": 60 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 4045, "end": 4046, "loc": { "start": { "line": 122, "column": 61 }, "end": { "line": 122, "column": 62 } } }, { "type": { "label": "return", "keyword": "return", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "return", "start": 4068, "end": 4074, "loc": { "start": { "line": 123, "column": 20 }, "end": { "line": 123, "column": 26 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 4075, "end": 4076, "loc": { "start": { "line": 123, "column": 27 }, "end": { "line": 123, "column": 28 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "slot", "start": 4102, "end": 4106, "loc": { "start": { "line": 124, "column": 24 }, "end": { "line": 124, "column": 28 } } }, { "type": { "label": ",", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 4106, "end": 4107, "loc": { "start": { "line": 124, "column": 28 }, "end": { "line": 124, "column": 29 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "index", "start": 4133, "end": 4138, "loc": { "start": { "line": 125, "column": 24 }, "end": { "line": 125, "column": 29 } } }, { "type": { "label": ":", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 4138, "end": 4139, "loc": { "start": { "line": 125, "column": 29 }, "end": { "line": 125, "column": 30 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "slotIndex", "start": 4140, "end": 4149, "loc": { "start": { "line": 125, "column": 31 }, "end": { "line": 125, "column": 40 } } }, { "type": { "label": ",", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 4149, "end": 4150, "loc": { "start": { "line": 125, "column": 40 }, "end": { "line": 125, "column": 41 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "acceptedDirection", "start": 4176, "end": 4193, "loc": { "start": { "line": 126, "column": 24 }, "end": { "line": 126, "column": 41 } } }, { "type": { "label": ":", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 4193, "end": 4194, "loc": { "start": { "line": 126, "column": 41 }, "end": { "line": 126, "column": 42 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "desiredDirection", "start": 4195, "end": 4211, "loc": { "start": { "line": 126, "column": 43 }, "end": { "line": 126, "column": 59 } } }, { "type": { "label": ",", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 4211, "end": 4212, "loc": { "start": { "line": 126, "column": 59 }, "end": { "line": 126, "column": 60 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 4234, "end": 4235, "loc": { "start": { "line": 127, "column": 20 }, "end": { "line": 127, "column": 21 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 4235, "end": 4236, "loc": { "start": { "line": 127, "column": 21 }, "end": { "line": 127, "column": 22 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 4254, "end": 4255, "loc": { "start": { "line": 128, "column": 16 }, "end": { "line": 128, "column": 17 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 4269, "end": 4270, "loc": { "start": { "line": 129, "column": 12 }, "end": { "line": 129, "column": 13 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 4280, "end": 4281, "loc": { "start": { "line": 130, "column": 8 }, "end": { "line": 130, "column": 9 } } }, { "type": { "label": "return", "keyword": "return", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "return", "start": 4293, "end": 4299, "loc": { "start": { "line": 132, "column": 8 }, "end": { "line": 132, "column": 14 } } }, { "type": { "label": "null", "keyword": "null", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "null", "start": 4300, "end": 4304, "loc": { "start": { "line": 132, "column": 15 }, "end": { "line": 132, "column": 19 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 4304, "end": 4305, "loc": { "start": { "line": 132, "column": 19 }, "end": { "line": 132, "column": 20 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 4311, "end": 4312, "loc": { "start": { "line": 133, "column": 4 }, "end": { "line": 133, "column": 5 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 4314, "end": 4315, "loc": { "start": { "line": 134, "column": 0 }, "end": { "line": 134, "column": 1 } } }, { "type": { "label": "eof", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 4317, "end": 4317, "loc": { "start": { "line": 135, "column": 0 }, "end": { "line": 135, "column": 0 } } } ] }