1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00
tobspr_shapez.io/docs/ast/source/game/building_codes.js.json
2021-02-26 15:20:37 +01:00

6888 lines
162 KiB
JSON

{
"type": "File",
"start": 0,
"end": 1951,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 70,
"column": 1
}
},
"program": {
"type": "Program",
"start": 0,
"end": 1951,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 70,
"column": 1
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 23,
"end": 70,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 47
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 32,
"end": 44,
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 21
}
},
"imported": {
"type": "Identifier",
"start": 32,
"end": 44,
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 21
},
"identifierName": "MetaBuilding"
},
"name": "MetaBuilding",
"leadingComments": null
},
"local": {
"type": "Identifier",
"start": 32,
"end": 44,
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 21
},
"identifierName": "MetaBuilding"
},
"name": "MetaBuilding"
},
"leadingComments": null
}
],
"source": {
"type": "StringLiteral",
"start": 52,
"end": 69,
"loc": {
"start": {
"line": 2,
"column": 29
},
"end": {
"line": 2,
"column": 46
}
},
"extra": {
"rawValue": "./meta_building",
"raw": "\"./meta_building\""
},
"value": "./meta_building"
},
"leadingComments": [
{
"type": "CommentBlock",
"value": " typehints:start ",
"start": 0,
"end": 21,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 21
}
}
}
]
},
{
"type": "ImportDeclaration",
"start": 72,
"end": 118,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 46
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 81,
"end": 92,
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 20
}
},
"imported": {
"type": "Identifier",
"start": 81,
"end": 92,
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 20
},
"identifierName": "AtlasSprite"
},
"name": "AtlasSprite"
},
"local": {
"type": "Identifier",
"start": 81,
"end": 92,
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 20
},
"identifierName": "AtlasSprite"
},
"name": "AtlasSprite"
}
}
],
"source": {
"type": "StringLiteral",
"start": 100,
"end": 117,
"loc": {
"start": {
"line": 3,
"column": 28
},
"end": {
"line": 3,
"column": 45
}
},
"extra": {
"rawValue": "../core/sprites",
"raw": "\"../core/sprites\""
},
"value": "../core/sprites"
}
},
{
"type": "ImportDeclaration",
"start": 120,
"end": 160,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 40
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 129,
"end": 135,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 15
}
},
"imported": {
"type": "Identifier",
"start": 129,
"end": 135,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 15
},
"identifierName": "Vector"
},
"name": "Vector"
},
"local": {
"type": "Identifier",
"start": 129,
"end": 135,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 15
},
"identifierName": "Vector"
},
"name": "Vector"
}
}
],
"source": {
"type": "StringLiteral",
"start": 143,
"end": 159,
"loc": {
"start": {
"line": 4,
"column": 23
},
"end": {
"line": 4,
"column": 39
}
},
"extra": {
"rawValue": "../core/vector",
"raw": "\"../core/vector\""
},
"value": "../core/vector"
},
"trailingComments": [
{
"type": "CommentBlock",
"value": " typehints:end ",
"start": 162,
"end": 181,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 19
}
}
},
{
"type": "CommentBlock",
"value": "*\r\n * @typedef {{\r\n * metaClass: typeof MetaBuilding,\r\n * metaInstance?: MetaBuilding,\r\n * variant?: string,\r\n * rotationVariant?: number,\r\n * tileSize?: Vector,\r\n * sprite?: AtlasSprite,\r\n * blueprintSprite?: AtlasSprite,\r\n * silhouetteColor?: string\r\n * }} BuildingVariantIdentifier\r\n ",
"start": 185,
"end": 492,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 18,
"column": 3
}
}
},
{
"type": "CommentBlock",
"value": "*\r\n * Stores a lookup table for all building variants (for better performance)\r\n * @type {Object<number, BuildingVariantIdentifier>}\r\n ",
"start": 496,
"end": 635,
"loc": {
"start": {
"line": 20,
"column": 0
},
"end": {
"line": 23,
"column": 3
}
}
}
]
},
{
"type": "ExportNamedDeclaration",
"start": 637,
"end": 693,
"loc": {
"start": {
"line": 24,
"column": 0
},
"end": {
"line": 26,
"column": 2
}
},
"specifiers": [],
"source": null,
"declaration": {
"type": "VariableDeclaration",
"start": 644,
"end": 693,
"loc": {
"start": {
"line": 24,
"column": 7
},
"end": {
"line": 26,
"column": 2
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 650,
"end": 692,
"loc": {
"start": {
"line": 24,
"column": 13
},
"end": {
"line": 26,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 650,
"end": 667,
"loc": {
"start": {
"line": 24,
"column": 13
},
"end": {
"line": 24,
"column": 30
},
"identifierName": "gBuildingVariants"
},
"name": "gBuildingVariants",
"leadingComments": null
},
"init": {
"type": "ObjectExpression",
"start": 670,
"end": 692,
"loc": {
"start": {
"line": 24,
"column": 33
},
"end": {
"line": 26,
"column": 1
}
},
"properties": [],
"leadingComments": null,
"innerComments": [
{
"type": "CommentLine",
"value": " Set later",
"start": 677,
"end": 689,
"loc": {
"start": {
"line": 25,
"column": 4
},
"end": {
"line": 25,
"column": 16
}
}
}
]
},
"leadingComments": null
}
],
"kind": "const",
"leadingComments": [
{
"type": "CommentBlock",
"value": " typehints:end ",
"start": 162,
"end": 181,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 19
}
}
},
{
"type": "CommentBlock",
"value": "*\r\n * @typedef {{\r\n * metaClass: typeof MetaBuilding,\r\n * metaInstance?: MetaBuilding,\r\n * variant?: string,\r\n * rotationVariant?: number,\r\n * tileSize?: Vector,\r\n * sprite?: AtlasSprite,\r\n * blueprintSprite?: AtlasSprite,\r\n * silhouetteColor?: string\r\n * }} BuildingVariantIdentifier\r\n ",
"start": 185,
"end": 492,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 18,
"column": 3
}
}
},
{
"type": "CommentBlock",
"value": "*\r\n * Stores a lookup table for all building variants (for better performance)\r\n * @type {Object<number, BuildingVariantIdentifier>}\r\n ",
"start": 496,
"end": 635,
"loc": {
"start": {
"line": 20,
"column": 0
},
"end": {
"line": 23,
"column": 3
}
}
}
],
"trailingComments": [
{
"type": "CommentBlock",
"value": "*\r\n * Registers a new variant\r\n * @param {typeof MetaBuilding} meta\r\n * @param {string} variant\r\n * @param {number} rotationVariant\r\n ",
"start": 697,
"end": 835,
"loc": {
"start": {
"line": 28,
"column": 0
},
"end": {
"line": 33,
"column": 3
}
}
}
]
},
"leadingComments": [
{
"type": "CommentBlock",
"value": " typehints:end ",
"start": 162,
"end": 181,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 19
}
}
},
{
"type": "CommentBlock",
"value": "*\r\n * @typedef {{\r\n * metaClass: typeof MetaBuilding,\r\n * metaInstance?: MetaBuilding,\r\n * variant?: string,\r\n * rotationVariant?: number,\r\n * tileSize?: Vector,\r\n * sprite?: AtlasSprite,\r\n * blueprintSprite?: AtlasSprite,\r\n * silhouetteColor?: string\r\n * }} BuildingVariantIdentifier\r\n ",
"start": 185,
"end": 492,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 18,
"column": 3
}
}
},
{
"type": "CommentBlock",
"value": "*\r\n * Stores a lookup table for all building variants (for better performance)\r\n * @type {Object<number, BuildingVariantIdentifier>}\r\n ",
"start": 496,
"end": 635,
"loc": {
"start": {
"line": 20,
"column": 0
},
"end": {
"line": 23,
"column": 3
}
}
}
],
"trailingComments": [
{
"type": "CommentBlock",
"value": "*\r\n * Registers a new variant\r\n * @param {typeof MetaBuilding} meta\r\n * @param {string} variant\r\n * @param {number} rotationVariant\r\n ",
"start": 697,
"end": 835,
"loc": {
"start": {
"line": 28,
"column": 0
},
"end": {
"line": 33,
"column": 3
}
}
}
]
},
{
"type": "ExportNamedDeclaration",
"start": 837,
"end": 1368,
"loc": {
"start": {
"line": 34,
"column": 0
},
"end": {
"line": 49,
"column": 1
}
},
"specifiers": [],
"source": null,
"declaration": {
"type": "FunctionDeclaration",
"start": 844,
"end": 1368,
"loc": {
"start": {
"line": 34,
"column": 7
},
"end": {
"line": 49,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 853,
"end": 876,
"loc": {
"start": {
"line": 34,
"column": 16
},
"end": {
"line": 34,
"column": 39
},
"identifierName": "registerBuildingVariant"
},
"name": "registerBuildingVariant",
"leadingComments": null
},
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 883,
"end": 887,
"loc": {
"start": {
"line": 35,
"column": 4
},
"end": {
"line": 35,
"column": 8
},
"identifierName": "meta"
},
"name": "meta"
},
{
"type": "AssignmentPattern",
"start": 894,
"end": 913,
"loc": {
"start": {
"line": 36,
"column": 4
},
"end": {
"line": 36,
"column": 23
}
},
"left": {
"type": "Identifier",
"start": 894,
"end": 901,
"loc": {
"start": {
"line": 36,
"column": 4
},
"end": {
"line": 36,
"column": 11
},
"identifierName": "variant"
},
"name": "variant"
},
"right": {
"type": "StringLiteral",
"start": 904,
"end": 913,
"loc": {
"start": {
"line": 36,
"column": 14
},
"end": {
"line": 36,
"column": 23
}
},
"extra": {
"rawValue": "default",
"raw": "\"default\""
},
"value": "default",
"leadingComments": null,
"trailingComments": null
},
"trailingComments": [
{
"type": "CommentBlock",
"value": " @TODO: Circular dependency, actually its defaultBuildingVariant ",
"start": 914,
"end": 983,
"loc": {
"start": {
"line": 36,
"column": 24
},
"end": {
"line": 36,
"column": 93
}
}
}
]
},
{
"type": "AssignmentPattern",
"start": 991,
"end": 1010,
"loc": {
"start": {
"line": 37,
"column": 4
},
"end": {
"line": 37,
"column": 23
}
},
"left": {
"type": "Identifier",
"start": 991,
"end": 1006,
"loc": {
"start": {
"line": 37,
"column": 4
},
"end": {
"line": 37,
"column": 19
},
"identifierName": "rotationVariant"
},
"name": "rotationVariant",
"leadingComments": null
},
"right": {
"type": "NumericLiteral",
"start": 1009,
"end": 1010,
"loc": {
"start": {
"line": 37,
"column": 22
},
"end": {
"line": 37,
"column": 23
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
},
"leadingComments": [
{
"type": "CommentBlock",
"value": " @TODO: Circular dependency, actually its defaultBuildingVariant ",
"start": 914,
"end": 983,
"loc": {
"start": {
"line": 36,
"column": 24
},
"end": {
"line": 36,
"column": 93
}
}
}
]
}
],
"body": {
"type": "BlockStatement",
"start": 1014,
"end": 1368,
"loc": {
"start": {
"line": 38,
"column": 2
},
"end": {
"line": 49,
"column": 1
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 1040,
"end": 1113,
"loc": {
"start": {
"line": 40,
"column": 4
},
"end": {
"line": 40,
"column": 77
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 1044,
"end": 1112,
"loc": {
"start": {
"line": 40,
"column": 8
},
"end": {
"line": 40,
"column": 76
}
},
"id": {
"type": "Identifier",
"start": 1044,
"end": 1048,
"loc": {
"start": {
"line": 40,
"column": 8
},
"end": {
"line": 40,
"column": 12
},
"identifierName": "code"
},
"name": "code",
"leadingComments": null
},
"init": {
"type": "CallExpression",
"start": 1051,
"end": 1112,
"loc": {
"start": {
"line": 40,
"column": 15
},
"end": {
"line": 40,
"column": 76
}
},
"callee": {
"type": "Identifier",
"start": 1051,
"end": 1074,
"loc": {
"start": {
"line": 40,
"column": 15
},
"end": {
"line": 40,
"column": 38
},
"identifierName": "getCodeFromBuildingData"
},
"name": "getCodeFromBuildingData"
},
"arguments": [
{
"type": "NewExpression",
"start": 1075,
"end": 1085,
"loc": {
"start": {
"line": 40,
"column": 39
},
"end": {
"line": 40,
"column": 49
}
},
"callee": {
"type": "Identifier",
"start": 1079,
"end": 1083,
"loc": {
"start": {
"line": 40,
"column": 43
},
"end": {
"line": 40,
"column": 47
},
"identifierName": "meta"
},
"name": "meta"
},
"arguments": []
},
{
"type": "Identifier",
"start": 1087,
"end": 1094,
"loc": {
"start": {
"line": 40,
"column": 51
},
"end": {
"line": 40,
"column": 58
},
"identifierName": "variant"
},
"name": "variant"
},
{
"type": "Identifier",
"start": 1096,
"end": 1111,
"loc": {
"start": {
"line": 40,
"column": 60
},
"end": {
"line": 40,
"column": 75
},
"identifierName": "rotationVariant"
},
"name": "rotationVariant"
}
]
},
"leadingComments": null
}
],
"kind": "let",
"leadingComments": [
{
"type": "CommentLine",
"value": " @ts-ignore",
"start": 1021,
"end": 1034,
"loc": {
"start": {
"line": 39,
"column": 4
},
"end": {
"line": 39,
"column": 17
}
}
}
]
},
{
"type": "ExpressionStatement",
"start": 1119,
"end": 1177,
"loc": {
"start": {
"line": 41,
"column": 4
},
"end": {
"line": 41,
"column": 62
}
},
"expression": {
"type": "CallExpression",
"start": 1119,
"end": 1176,
"loc": {
"start": {
"line": 41,
"column": 4
},
"end": {
"line": 41,
"column": 61
}
},
"callee": {
"type": "Identifier",
"start": 1119,
"end": 1125,
"loc": {
"start": {
"line": 41,
"column": 4
},
"end": {
"line": 41,
"column": 10
},
"identifierName": "assert"
},
"name": "assert"
},
"arguments": [
{
"type": "UnaryExpression",
"start": 1126,
"end": 1150,
"loc": {
"start": {
"line": 41,
"column": 11
},
"end": {
"line": 41,
"column": 35
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "MemberExpression",
"start": 1127,
"end": 1150,
"loc": {
"start": {
"line": 41,
"column": 12
},
"end": {
"line": 41,
"column": 35
}
},
"object": {
"type": "Identifier",
"start": 1127,
"end": 1144,
"loc": {
"start": {
"line": 41,
"column": 12
},
"end": {
"line": 41,
"column": 29
},
"identifierName": "gBuildingVariants"
},
"name": "gBuildingVariants"
},
"property": {
"type": "Identifier",
"start": 1145,
"end": 1149,
"loc": {
"start": {
"line": 41,
"column": 30
},
"end": {
"line": 41,
"column": 34
},
"identifierName": "code"
},
"name": "code"
},
"computed": true
},
"extra": {
"parenthesizedArgument": false
}
},
{
"type": "BinaryExpression",
"start": 1152,
"end": 1175,
"loc": {
"start": {
"line": 41,
"column": 37
},
"end": {
"line": 41,
"column": 60
}
},
"left": {
"type": "StringLiteral",
"start": 1152,
"end": 1168,
"loc": {
"start": {
"line": 41,
"column": 37
},
"end": {
"line": 41,
"column": 53
}
},
"extra": {
"rawValue": "Duplicate id: ",
"raw": "\"Duplicate id: \""
},
"value": "Duplicate id: "
},
"operator": "+",
"right": {
"type": "Identifier",
"start": 1171,
"end": 1175,
"loc": {
"start": {
"line": 41,
"column": 56
},
"end": {
"line": 41,
"column": 60
},
"identifierName": "code"
},
"name": "code"
}
}
]
}
},
{
"type": "ExpressionStatement",
"start": 1183,
"end": 1365,
"loc": {
"start": {
"line": 42,
"column": 4
},
"end": {
"line": 48,
"column": 6
}
},
"expression": {
"type": "AssignmentExpression",
"start": 1183,
"end": 1364,
"loc": {
"start": {
"line": 42,
"column": 4
},
"end": {
"line": 48,
"column": 5
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 1183,
"end": 1206,
"loc": {
"start": {
"line": 42,
"column": 4
},
"end": {
"line": 42,
"column": 27
}
},
"object": {
"type": "Identifier",
"start": 1183,
"end": 1200,
"loc": {
"start": {
"line": 42,
"column": 4
},
"end": {
"line": 42,
"column": 21
},
"identifierName": "gBuildingVariants"
},
"name": "gBuildingVariants"
},
"property": {
"type": "Identifier",
"start": 1201,
"end": 1205,
"loc": {
"start": {
"line": 42,
"column": 22
},
"end": {
"line": 42,
"column": 26
},
"identifierName": "code"
},
"name": "code"
},
"computed": true
},
"right": {
"type": "ObjectExpression",
"start": 1209,
"end": 1364,
"loc": {
"start": {
"line": 42,
"column": 30
},
"end": {
"line": 48,
"column": 5
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 1220,
"end": 1235,
"loc": {
"start": {
"line": 43,
"column": 8
},
"end": {
"line": 43,
"column": 23
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 1220,
"end": 1229,
"loc": {
"start": {
"line": 43,
"column": 8
},
"end": {
"line": 43,
"column": 17
},
"identifierName": "metaClass"
},
"name": "metaClass"
},
"value": {
"type": "Identifier",
"start": 1231,
"end": 1235,
"loc": {
"start": {
"line": 43,
"column": 19
},
"end": {
"line": 43,
"column": 23
},
"identifierName": "meta"
},
"name": "meta"
}
},
{
"type": "ObjectProperty",
"start": 1246,
"end": 1253,
"loc": {
"start": {
"line": 44,
"column": 8
},
"end": {
"line": 44,
"column": 15
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 1246,
"end": 1253,
"loc": {
"start": {
"line": 44,
"column": 8
},
"end": {
"line": 44,
"column": 15
},
"identifierName": "variant"
},
"name": "variant"
},
"value": {
"type": "Identifier",
"start": 1246,
"end": 1253,
"loc": {
"start": {
"line": 44,
"column": 8
},
"end": {
"line": 44,
"column": 15
},
"identifierName": "variant"
},
"name": "variant"
},
"extra": {
"shorthand": true
}
},
{
"type": "ObjectProperty",
"start": 1264,
"end": 1279,
"loc": {
"start": {
"line": 45,
"column": 8
},
"end": {
"line": 45,
"column": 23
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 1264,
"end": 1279,
"loc": {
"start": {
"line": 45,
"column": 8
},
"end": {
"line": 45,
"column": 23
},
"identifierName": "rotationVariant"
},
"name": "rotationVariant"
},
"value": {
"type": "Identifier",
"start": 1264,
"end": 1279,
"loc": {
"start": {
"line": 45,
"column": 8
},
"end": {
"line": 45,
"column": 23
},
"identifierName": "rotationVariant"
},
"name": "rotationVariant"
},
"extra": {
"shorthand": true
}
},
{
"type": "ObjectProperty",
"start": 1313,
"end": 1356,
"loc": {
"start": {
"line": 47,
"column": 8
},
"end": {
"line": 47,
"column": 51
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 1313,
"end": 1321,
"loc": {
"start": {
"line": 47,
"column": 8
},
"end": {
"line": 47,
"column": 16
},
"identifierName": "tileSize"
},
"name": "tileSize",
"leadingComments": null
},
"value": {
"type": "CallExpression",
"start": 1323,
"end": 1356,
"loc": {
"start": {
"line": 47,
"column": 18
},
"end": {
"line": 47,
"column": 51
}
},
"callee": {
"type": "MemberExpression",
"start": 1323,
"end": 1347,
"loc": {
"start": {
"line": 47,
"column": 18
},
"end": {
"line": 47,
"column": 42
}
},
"object": {
"type": "NewExpression",
"start": 1323,
"end": 1333,
"loc": {
"start": {
"line": 47,
"column": 18
},
"end": {
"line": 47,
"column": 28
}
},
"callee": {
"type": "Identifier",
"start": 1327,
"end": 1331,
"loc": {
"start": {
"line": 47,
"column": 22
},
"end": {
"line": 47,
"column": 26
},
"identifierName": "meta"
},
"name": "meta"
},
"arguments": []
},
"property": {
"type": "Identifier",
"start": 1334,
"end": 1347,
"loc": {
"start": {
"line": 47,
"column": 29
},
"end": {
"line": 47,
"column": 42
},
"identifierName": "getDimensions"
},
"name": "getDimensions"
},
"computed": false
},
"arguments": [
{
"type": "Identifier",
"start": 1348,
"end": 1355,
"loc": {
"start": {
"line": 47,
"column": 43
},
"end": {
"line": 47,
"column": 50
},
"identifierName": "variant"
},
"name": "variant"
}
]
},
"leadingComments": [
{
"type": "CommentLine",
"value": " @ts-ignore",
"start": 1290,
"end": 1303,
"loc": {
"start": {
"line": 46,
"column": 8
},
"end": {
"line": 46,
"column": 21
}
}
}
]
}
]
}
}
}
],
"directives": [],
"trailingComments": null
},
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\r\n * Registers a new variant\r\n * @param {typeof MetaBuilding} meta\r\n * @param {string} variant\r\n * @param {number} rotationVariant\r\n ",
"start": 697,
"end": 835,
"loc": {
"start": {
"line": 28,
"column": 0
},
"end": {
"line": 33,
"column": 3
}
}
}
],
"trailingComments": [
{
"type": "CommentBlock",
"value": "*\r\n *\r\n * @param {String} code\r\n * @returns {BuildingVariantIdentifier}\r\n ",
"start": 1372,
"end": 1450,
"loc": {
"start": {
"line": 51,
"column": 0
},
"end": {
"line": 55,
"column": 3
}
}
}
]
},
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\r\n * Registers a new variant\r\n * @param {typeof MetaBuilding} meta\r\n * @param {string} variant\r\n * @param {number} rotationVariant\r\n ",
"start": 697,
"end": 835,
"loc": {
"start": {
"line": 28,
"column": 0
},
"end": {
"line": 33,
"column": 3
}
}
}
],
"trailingComments": [
{
"type": "CommentBlock",
"value": "*\r\n *\r\n * @param {String} code\r\n * @returns {BuildingVariantIdentifier}\r\n ",
"start": 1372,
"end": 1450,
"loc": {
"start": {
"line": 51,
"column": 0
},
"end": {
"line": 55,
"column": 3
}
}
}
]
},
{
"type": "ExportNamedDeclaration",
"start": 1452,
"end": 1611,
"loc": {
"start": {
"line": 56,
"column": 0
},
"end": {
"line": 59,
"column": 1
}
},
"specifiers": [],
"source": null,
"declaration": {
"type": "FunctionDeclaration",
"start": 1459,
"end": 1611,
"loc": {
"start": {
"line": 56,
"column": 7
},
"end": {
"line": 59,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 1468,
"end": 1491,
"loc": {
"start": {
"line": 56,
"column": 16
},
"end": {
"line": 56,
"column": 39
},
"identifierName": "getBuildingDataFromCode"
},
"name": "getBuildingDataFromCode",
"leadingComments": null
},
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 1492,
"end": 1496,
"loc": {
"start": {
"line": 56,
"column": 40
},
"end": {
"line": 56,
"column": 44
},
"identifierName": "code"
},
"name": "code"
}
],
"body": {
"type": "BlockStatement",
"start": 1498,
"end": 1611,
"loc": {
"start": {
"line": 56,
"column": 46
},
"end": {
"line": 59,
"column": 1
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 1505,
"end": 1571,
"loc": {
"start": {
"line": 57,
"column": 4
},
"end": {
"line": 57,
"column": 70
}
},
"expression": {
"type": "CallExpression",
"start": 1505,
"end": 1570,
"loc": {
"start": {
"line": 57,
"column": 4
},
"end": {
"line": 57,
"column": 69
}
},
"callee": {
"type": "Identifier",
"start": 1505,
"end": 1511,
"loc": {
"start": {
"line": 57,
"column": 4
},
"end": {
"line": 57,
"column": 10
},
"identifierName": "assert"
},
"name": "assert"
},
"arguments": [
{
"type": "MemberExpression",
"start": 1512,
"end": 1535,
"loc": {
"start": {
"line": 57,
"column": 11
},
"end": {
"line": 57,
"column": 34
}
},
"object": {
"type": "Identifier",
"start": 1512,
"end": 1529,
"loc": {
"start": {
"line": 57,
"column": 11
},
"end": {
"line": 57,
"column": 28
},
"identifierName": "gBuildingVariants"
},
"name": "gBuildingVariants"
},
"property": {
"type": "Identifier",
"start": 1530,
"end": 1534,
"loc": {
"start": {
"line": 57,
"column": 29
},
"end": {
"line": 57,
"column": 33
},
"identifierName": "code"
},
"name": "code"
},
"computed": true
},
{
"type": "BinaryExpression",
"start": 1537,
"end": 1569,
"loc": {
"start": {
"line": 57,
"column": 36
},
"end": {
"line": 57,
"column": 68
}
},
"left": {
"type": "StringLiteral",
"start": 1537,
"end": 1562,
"loc": {
"start": {
"line": 57,
"column": 36
},
"end": {
"line": 57,
"column": 61
}
},
"extra": {
"rawValue": "Invalid building code: ",
"raw": "\"Invalid building code: \""
},
"value": "Invalid building code: "
},
"operator": "+",
"right": {
"type": "Identifier",
"start": 1565,
"end": 1569,
"loc": {
"start": {
"line": 57,
"column": 64
},
"end": {
"line": 57,
"column": 68
},
"identifierName": "code"
},
"name": "code"
}
}
]
}
},
{
"type": "ReturnStatement",
"start": 1577,
"end": 1608,
"loc": {
"start": {
"line": 58,
"column": 4
},
"end": {
"line": 58,
"column": 35
}
},
"argument": {
"type": "MemberExpression",
"start": 1584,
"end": 1607,
"loc": {
"start": {
"line": 58,
"column": 11
},
"end": {
"line": 58,
"column": 34
}
},
"object": {
"type": "Identifier",
"start": 1584,
"end": 1601,
"loc": {
"start": {
"line": 58,
"column": 11
},
"end": {
"line": 58,
"column": 28
},
"identifierName": "gBuildingVariants"
},
"name": "gBuildingVariants"
},
"property": {
"type": "Identifier",
"start": 1602,
"end": 1606,
"loc": {
"start": {
"line": 58,
"column": 29
},
"end": {
"line": 58,
"column": 33
},
"identifierName": "code"
},
"name": "code"
},
"computed": true
}
}
],
"directives": [],
"trailingComments": null
},
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\r\n *\r\n * @param {String} code\r\n * @returns {BuildingVariantIdentifier}\r\n ",
"start": 1372,
"end": 1450,
"loc": {
"start": {
"line": 51,
"column": 0
},
"end": {
"line": 55,
"column": 3
}
}
}
],
"trailingComments": [
{
"type": "CommentBlock",
"value": "*\r\n * Finds the code for a given variant\r\n * @param {MetaBuilding} metaBuilding\r\n * @param {string} variant\r\n * @param {number} rotationVariant\r\n * @returns {String}\r\n ",
"start": 1615,
"end": 1787,
"loc": {
"start": {
"line": 61,
"column": 0
},
"end": {
"line": 67,
"column": 3
}
}
}
]
},
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\r\n *\r\n * @param {String} code\r\n * @returns {BuildingVariantIdentifier}\r\n ",
"start": 1372,
"end": 1450,
"loc": {
"start": {
"line": 51,
"column": 0
},
"end": {
"line": 55,
"column": 3
}
}
}
],
"trailingComments": [
{
"type": "CommentBlock",
"value": "*\r\n * Finds the code for a given variant\r\n * @param {MetaBuilding} metaBuilding\r\n * @param {string} variant\r\n * @param {number} rotationVariant\r\n * @returns {String}\r\n ",
"start": 1615,
"end": 1787,
"loc": {
"start": {
"line": 61,
"column": 0
},
"end": {
"line": 67,
"column": 3
}
}
}
]
},
{
"type": "ExportNamedDeclaration",
"start": 1789,
"end": 1951,
"loc": {
"start": {
"line": 68,
"column": 0
},
"end": {
"line": 70,
"column": 1
}
},
"specifiers": [],
"source": null,
"declaration": {
"type": "FunctionDeclaration",
"start": 1796,
"end": 1951,
"loc": {
"start": {
"line": 68,
"column": 7
},
"end": {
"line": 70,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 1805,
"end": 1828,
"loc": {
"start": {
"line": 68,
"column": 16
},
"end": {
"line": 68,
"column": 39
},
"identifierName": "getCodeFromBuildingData"
},
"name": "getCodeFromBuildingData",
"leadingComments": null
},
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 1829,
"end": 1841,
"loc": {
"start": {
"line": 68,
"column": 40
},
"end": {
"line": 68,
"column": 52
},
"identifierName": "metaBuilding"
},
"name": "metaBuilding"
},
{
"type": "Identifier",
"start": 1843,
"end": 1850,
"loc": {
"start": {
"line": 68,
"column": 54
},
"end": {
"line": 68,
"column": 61
},
"identifierName": "variant"
},
"name": "variant"
},
{
"type": "AssignmentPattern",
"start": 1852,
"end": 1871,
"loc": {
"start": {
"line": 68,
"column": 63
},
"end": {
"line": 68,
"column": 82
}
},
"left": {
"type": "Identifier",
"start": 1852,
"end": 1867,
"loc": {
"start": {
"line": 68,
"column": 63
},
"end": {
"line": 68,
"column": 78
},
"identifierName": "rotationVariant"
},
"name": "rotationVariant"
},
"right": {
"type": "NumericLiteral",
"start": 1870,
"end": 1871,
"loc": {
"start": {
"line": 68,
"column": 81
},
"end": {
"line": 68,
"column": 82
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
}
}
],
"body": {
"type": "BlockStatement",
"start": 1873,
"end": 1951,
"loc": {
"start": {
"line": 68,
"column": 84
},
"end": {
"line": 70,
"column": 1
}
},
"body": [
{
"type": "ReturnStatement",
"start": 1880,
"end": 1948,
"loc": {
"start": {
"line": 69,
"column": 4
},
"end": {
"line": 69,
"column": 72
}
},
"argument": {
"type": "BinaryExpression",
"start": 1887,
"end": 1947,
"loc": {
"start": {
"line": 69,
"column": 11
},
"end": {
"line": 69,
"column": 71
}
},
"left": {
"type": "BinaryExpression",
"start": 1887,
"end": 1929,
"loc": {
"start": {
"line": 69,
"column": 11
},
"end": {
"line": 69,
"column": 53
}
},
"left": {
"type": "BinaryExpression",
"start": 1887,
"end": 1923,
"loc": {
"start": {
"line": 69,
"column": 11
},
"end": {
"line": 69,
"column": 47
}
},
"left": {
"type": "BinaryExpression",
"start": 1887,
"end": 1913,
"loc": {
"start": {
"line": 69,
"column": 11
},
"end": {
"line": 69,
"column": 37
}
},
"left": {
"type": "CallExpression",
"start": 1887,
"end": 1907,
"loc": {
"start": {
"line": 69,
"column": 11
},
"end": {
"line": 69,
"column": 31
}
},
"callee": {
"type": "MemberExpression",
"start": 1887,
"end": 1905,
"loc": {
"start": {
"line": 69,
"column": 11
},
"end": {
"line": 69,
"column": 29
}
},
"object": {
"type": "Identifier",
"start": 1887,
"end": 1899,
"loc": {
"start": {
"line": 69,
"column": 11
},
"end": {
"line": 69,
"column": 23
},
"identifierName": "metaBuilding"
},
"name": "metaBuilding"
},
"property": {
"type": "Identifier",
"start": 1900,
"end": 1905,
"loc": {
"start": {
"line": 69,
"column": 24
},
"end": {
"line": 69,
"column": 29
},
"identifierName": "getId"
},
"name": "getId"
},
"computed": false
},
"arguments": []
},
"operator": "+",
"right": {
"type": "StringLiteral",
"start": 1910,
"end": 1913,
"loc": {
"start": {
"line": 69,
"column": 34
},
"end": {
"line": 69,
"column": 37
}
},
"extra": {
"rawValue": "/",
"raw": "\"/\""
},
"value": "/"
}
},
"operator": "+",
"right": {
"type": "Identifier",
"start": 1916,
"end": 1923,
"loc": {
"start": {
"line": 69,
"column": 40
},
"end": {
"line": 69,
"column": 47
},
"identifierName": "variant"
},
"name": "variant"
}
},
"operator": "+",
"right": {
"type": "StringLiteral",
"start": 1926,
"end": 1929,
"loc": {
"start": {
"line": 69,
"column": 50
},
"end": {
"line": 69,
"column": 53
}
},
"extra": {
"rawValue": "/",
"raw": "\"/\""
},
"value": "/"
}
},
"operator": "+",
"right": {
"type": "Identifier",
"start": 1932,
"end": 1947,
"loc": {
"start": {
"line": 69,
"column": 56
},
"end": {
"line": 69,
"column": 71
},
"identifierName": "rotationVariant"
},
"name": "rotationVariant"
}
}
}
],
"directives": []
},
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\r\n * Finds the code for a given variant\r\n * @param {MetaBuilding} metaBuilding\r\n * @param {string} variant\r\n * @param {number} rotationVariant\r\n * @returns {String}\r\n ",
"start": 1615,
"end": 1787,
"loc": {
"start": {
"line": 61,
"column": 0
},
"end": {
"line": 67,
"column": 3
}
}
}
],
"trailingComments": []
},
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\r\n * Finds the code for a given variant\r\n * @param {MetaBuilding} metaBuilding\r\n * @param {string} variant\r\n * @param {number} rotationVariant\r\n * @returns {String}\r\n ",
"start": 1615,
"end": 1787,
"loc": {
"start": {
"line": 61,
"column": 0
},
"end": {
"line": 67,
"column": 3
}
}
}
]
}
],
"directives": []
},
"comments": [
{
"type": "CommentBlock",
"value": " typehints:start ",
"start": 0,
"end": 21,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 21
}
}
},
{
"type": "CommentBlock",
"value": " typehints:end ",
"start": 162,
"end": 181,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 19
}
}
},
{
"type": "CommentBlock",
"value": "*\r\n * @typedef {{\r\n * metaClass: typeof MetaBuilding,\r\n * metaInstance?: MetaBuilding,\r\n * variant?: string,\r\n * rotationVariant?: number,\r\n * tileSize?: Vector,\r\n * sprite?: AtlasSprite,\r\n * blueprintSprite?: AtlasSprite,\r\n * silhouetteColor?: string\r\n * }} BuildingVariantIdentifier\r\n ",
"start": 185,
"end": 492,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 18,
"column": 3
}
}
},
{
"type": "CommentBlock",
"value": "*\r\n * Stores a lookup table for all building variants (for better performance)\r\n * @type {Object<number, BuildingVariantIdentifier>}\r\n ",
"start": 496,
"end": 635,
"loc": {
"start": {
"line": 20,
"column": 0
},
"end": {
"line": 23,
"column": 3
}
}
},
{
"type": "CommentLine",
"value": " Set later",
"start": 677,
"end": 689,
"loc": {
"start": {
"line": 25,
"column": 4
},
"end": {
"line": 25,
"column": 16
}
}
},
{
"type": "CommentBlock",
"value": "*\r\n * Registers a new variant\r\n * @param {typeof MetaBuilding} meta\r\n * @param {string} variant\r\n * @param {number} rotationVariant\r\n ",
"start": 697,
"end": 835,
"loc": {
"start": {
"line": 28,
"column": 0
},
"end": {
"line": 33,
"column": 3
}
}
},
{
"type": "CommentBlock",
"value": " @TODO: Circular dependency, actually its defaultBuildingVariant ",
"start": 914,
"end": 983,
"loc": {
"start": {
"line": 36,
"column": 24
},
"end": {
"line": 36,
"column": 93
}
}
},
{
"type": "CommentLine",
"value": " @ts-ignore",
"start": 1021,
"end": 1034,
"loc": {
"start": {
"line": 39,
"column": 4
},
"end": {
"line": 39,
"column": 17
}
}
},
{
"type": "CommentLine",
"value": " @ts-ignore",
"start": 1290,
"end": 1303,
"loc": {
"start": {
"line": 46,
"column": 8
},
"end": {
"line": 46,
"column": 21
}
}
},
{
"type": "CommentBlock",
"value": "*\r\n *\r\n * @param {String} code\r\n * @returns {BuildingVariantIdentifier}\r\n ",
"start": 1372,
"end": 1450,
"loc": {
"start": {
"line": 51,
"column": 0
},
"end": {
"line": 55,
"column": 3
}
}
},
{
"type": "CommentBlock",
"value": "*\r\n * Finds the code for a given variant\r\n * @param {MetaBuilding} metaBuilding\r\n * @param {string} variant\r\n * @param {number} rotationVariant\r\n * @returns {String}\r\n ",
"start": 1615,
"end": 1787,
"loc": {
"start": {
"line": 61,
"column": 0
},
"end": {
"line": 67,
"column": 3
}
}
}
],
"tokens": [
{
"type": "CommentBlock",
"value": " typehints:start ",
"start": 0,
"end": 21,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 21
}
}
},
{
"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": 23,
"end": 29,
"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": 30,
"end": 31,
"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": "MetaBuilding",
"start": 32,
"end": 44,
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 21
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 45,
"end": 46,
"loc": {
"start": {
"line": 2,
"column": 22
},
"end": {
"line": 2,
"column": 23
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "from",
"start": 47,
"end": 51,
"loc": {
"start": {
"line": 2,
"column": 24
},
"end": {
"line": 2,
"column": 28
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "./meta_building",
"start": 52,
"end": 69,
"loc": {
"start": {
"line": 2,
"column": 29
},
"end": {
"line": 2,
"column": 46
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 69,
"end": 70,
"loc": {
"start": {
"line": 2,
"column": 46
},
"end": {
"line": 2,
"column": 47
}
}
},
{
"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": 72,
"end": 78,
"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": 79,
"end": 80,
"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": "AtlasSprite",
"start": 81,
"end": 92,
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 20
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 93,
"end": 94,
"loc": {
"start": {
"line": 3,
"column": 21
},
"end": {
"line": 3,
"column": 22
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "from",
"start": 95,
"end": 99,
"loc": {
"start": {
"line": 3,
"column": 23
},
"end": {
"line": 3,
"column": 27
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "../core/sprites",
"start": 100,
"end": 117,
"loc": {
"start": {
"line": 3,
"column": 28
},
"end": {
"line": 3,
"column": 45
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 117,
"end": 118,
"loc": {
"start": {
"line": 3,
"column": 45
},
"end": {
"line": 3,
"column": 46
}
}
},
{
"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": 120,
"end": 126,
"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": 127,
"end": 128,
"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": "Vector",
"start": 129,
"end": 135,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 15
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 136,
"end": 137,
"loc": {
"start": {
"line": 4,
"column": 16
},
"end": {
"line": 4,
"column": 17
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "from",
"start": 138,
"end": 142,
"loc": {
"start": {
"line": 4,
"column": 18
},
"end": {
"line": 4,
"column": 22
}
}
},
{
"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": 143,
"end": 159,
"loc": {
"start": {
"line": 4,
"column": 23
},
"end": {
"line": 4,
"column": 39
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 159,
"end": 160,
"loc": {
"start": {
"line": 4,
"column": 39
},
"end": {
"line": 4,
"column": 40
}
}
},
{
"type": "CommentBlock",
"value": " typehints:end ",
"start": 162,
"end": 181,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 19
}
}
},
{
"type": "CommentBlock",
"value": "*\r\n * @typedef {{\r\n * metaClass: typeof MetaBuilding,\r\n * metaInstance?: MetaBuilding,\r\n * variant?: string,\r\n * rotationVariant?: number,\r\n * tileSize?: Vector,\r\n * sprite?: AtlasSprite,\r\n * blueprintSprite?: AtlasSprite,\r\n * silhouetteColor?: string\r\n * }} BuildingVariantIdentifier\r\n ",
"start": 185,
"end": 492,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 18,
"column": 3
}
}
},
{
"type": "CommentBlock",
"value": "*\r\n * Stores a lookup table for all building variants (for better performance)\r\n * @type {Object<number, BuildingVariantIdentifier>}\r\n ",
"start": 496,
"end": 635,
"loc": {
"start": {
"line": 20,
"column": 0
},
"end": {
"line": 23,
"column": 3
}
}
},
{
"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": 637,
"end": 643,
"loc": {
"start": {
"line": 24,
"column": 0
},
"end": {
"line": 24,
"column": 6
}
}
},
{
"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": 644,
"end": 649,
"loc": {
"start": {
"line": 24,
"column": 7
},
"end": {
"line": 24,
"column": 12
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "gBuildingVariants",
"start": 650,
"end": 667,
"loc": {
"start": {
"line": 24,
"column": 13
},
"end": {
"line": 24,
"column": 30
}
}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "=",
"start": 668,
"end": 669,
"loc": {
"start": {
"line": 24,
"column": 31
},
"end": {
"line": 24,
"column": 32
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 670,
"end": 671,
"loc": {
"start": {
"line": 24,
"column": 33
},
"end": {
"line": 24,
"column": 34
}
}
},
{
"type": "CommentLine",
"value": " Set later",
"start": 677,
"end": 689,
"loc": {
"start": {
"line": 25,
"column": 4
},
"end": {
"line": 25,
"column": 16
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 691,
"end": 692,
"loc": {
"start": {
"line": 26,
"column": 0
},
"end": {
"line": 26,
"column": 1
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 692,
"end": 693,
"loc": {
"start": {
"line": 26,
"column": 1
},
"end": {
"line": 26,
"column": 2
}
}
},
{
"type": "CommentBlock",
"value": "*\r\n * Registers a new variant\r\n * @param {typeof MetaBuilding} meta\r\n * @param {string} variant\r\n * @param {number} rotationVariant\r\n ",
"start": 697,
"end": 835,
"loc": {
"start": {
"line": 28,
"column": 0
},
"end": {
"line": 33,
"column": 3
}
}
},
{
"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": 837,
"end": 843,
"loc": {
"start": {
"line": 34,
"column": 0
},
"end": {
"line": 34,
"column": 6
}
}
},
{
"type": {
"label": "function",
"keyword": "function",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "function",
"start": 844,
"end": 852,
"loc": {
"start": {
"line": 34,
"column": 7
},
"end": {
"line": 34,
"column": 15
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "registerBuildingVariant",
"start": 853,
"end": 876,
"loc": {
"start": {
"line": 34,
"column": 16
},
"end": {
"line": 34,
"column": 39
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 876,
"end": 877,
"loc": {
"start": {
"line": 34,
"column": 39
},
"end": {
"line": 34,
"column": 40
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "meta",
"start": 883,
"end": 887,
"loc": {
"start": {
"line": 35,
"column": 4
},
"end": {
"line": 35,
"column": 8
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 887,
"end": 888,
"loc": {
"start": {
"line": 35,
"column": 8
},
"end": {
"line": 35,
"column": 9
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "variant",
"start": 894,
"end": 901,
"loc": {
"start": {
"line": 36,
"column": 4
},
"end": {
"line": 36,
"column": 11
}
}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "=",
"start": 902,
"end": 903,
"loc": {
"start": {
"line": 36,
"column": 12
},
"end": {
"line": 36,
"column": 13
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "default",
"start": 904,
"end": 913,
"loc": {
"start": {
"line": 36,
"column": 14
},
"end": {
"line": 36,
"column": 23
}
}
},
{
"type": "CommentBlock",
"value": " @TODO: Circular dependency, actually its defaultBuildingVariant ",
"start": 914,
"end": 983,
"loc": {
"start": {
"line": 36,
"column": 24
},
"end": {
"line": 36,
"column": 93
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 984,
"end": 985,
"loc": {
"start": {
"line": 36,
"column": 94
},
"end": {
"line": 36,
"column": 95
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "rotationVariant",
"start": 991,
"end": 1006,
"loc": {
"start": {
"line": 37,
"column": 4
},
"end": {
"line": 37,
"column": 19
}
}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "=",
"start": 1007,
"end": 1008,
"loc": {
"start": {
"line": 37,
"column": 20
},
"end": {
"line": 37,
"column": 21
}
}
},
{
"type": {
"label": "num",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": 0,
"start": 1009,
"end": 1010,
"loc": {
"start": {
"line": 37,
"column": 22
},
"end": {
"line": 37,
"column": 23
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1012,
"end": 1013,
"loc": {
"start": {
"line": 38,
"column": 0
},
"end": {
"line": 38,
"column": 1
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1014,
"end": 1015,
"loc": {
"start": {
"line": 38,
"column": 2
},
"end": {
"line": 38,
"column": 3
}
}
},
{
"type": "CommentLine",
"value": " @ts-ignore",
"start": 1021,
"end": 1034,
"loc": {
"start": {
"line": 39,
"column": 4
},
"end": {
"line": 39,
"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": 1040,
"end": 1043,
"loc": {
"start": {
"line": 40,
"column": 4
},
"end": {
"line": 40,
"column": 7
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "code",
"start": 1044,
"end": 1048,
"loc": {
"start": {
"line": 40,
"column": 8
},
"end": {
"line": 40,
"column": 12
}
}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "=",
"start": 1049,
"end": 1050,
"loc": {
"start": {
"line": 40,
"column": 13
},
"end": {
"line": 40,
"column": 14
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "getCodeFromBuildingData",
"start": 1051,
"end": 1074,
"loc": {
"start": {
"line": 40,
"column": 15
},
"end": {
"line": 40,
"column": 38
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1074,
"end": 1075,
"loc": {
"start": {
"line": 40,
"column": 38
},
"end": {
"line": 40,
"column": 39
}
}
},
{
"type": {
"label": "new",
"keyword": "new",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "new",
"start": 1075,
"end": 1078,
"loc": {
"start": {
"line": 40,
"column": 39
},
"end": {
"line": 40,
"column": 42
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "meta",
"start": 1079,
"end": 1083,
"loc": {
"start": {
"line": 40,
"column": 43
},
"end": {
"line": 40,
"column": 47
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1083,
"end": 1084,
"loc": {
"start": {
"line": 40,
"column": 47
},
"end": {
"line": 40,
"column": 48
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1084,
"end": 1085,
"loc": {
"start": {
"line": 40,
"column": 48
},
"end": {
"line": 40,
"column": 49
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1085,
"end": 1086,
"loc": {
"start": {
"line": 40,
"column": 49
},
"end": {
"line": 40,
"column": 50
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "variant",
"start": 1087,
"end": 1094,
"loc": {
"start": {
"line": 40,
"column": 51
},
"end": {
"line": 40,
"column": 58
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1094,
"end": 1095,
"loc": {
"start": {
"line": 40,
"column": 58
},
"end": {
"line": 40,
"column": 59
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "rotationVariant",
"start": 1096,
"end": 1111,
"loc": {
"start": {
"line": 40,
"column": 60
},
"end": {
"line": 40,
"column": 75
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1111,
"end": 1112,
"loc": {
"start": {
"line": 40,
"column": 75
},
"end": {
"line": 40,
"column": 76
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1112,
"end": 1113,
"loc": {
"start": {
"line": 40,
"column": 76
},
"end": {
"line": 40,
"column": 77
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "assert",
"start": 1119,
"end": 1125,
"loc": {
"start": {
"line": 41,
"column": 4
},
"end": {
"line": 41,
"column": 10
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1125,
"end": 1126,
"loc": {
"start": {
"line": 41,
"column": 10
},
"end": {
"line": 41,
"column": 11
}
}
},
{
"type": {
"label": "prefix",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": true,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "!",
"start": 1126,
"end": 1127,
"loc": {
"start": {
"line": 41,
"column": 11
},
"end": {
"line": 41,
"column": 12
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "gBuildingVariants",
"start": 1127,
"end": 1144,
"loc": {
"start": {
"line": 41,
"column": 12
},
"end": {
"line": 41,
"column": 29
}
}
},
{
"type": {
"label": "[",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1144,
"end": 1145,
"loc": {
"start": {
"line": 41,
"column": 29
},
"end": {
"line": 41,
"column": 30
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "code",
"start": 1145,
"end": 1149,
"loc": {
"start": {
"line": 41,
"column": 30
},
"end": {
"line": 41,
"column": 34
}
}
},
{
"type": {
"label": "]",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1149,
"end": 1150,
"loc": {
"start": {
"line": 41,
"column": 34
},
"end": {
"line": 41,
"column": 35
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1150,
"end": 1151,
"loc": {
"start": {
"line": 41,
"column": 35
},
"end": {
"line": 41,
"column": 36
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "Duplicate id: ",
"start": 1152,
"end": 1168,
"loc": {
"start": {
"line": 41,
"column": 37
},
"end": {
"line": 41,
"column": 53
}
}
},
{
"type": {
"label": "+/-",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": true,
"postfix": false,
"binop": 9,
"updateContext": null
},
"value": "+",
"start": 1169,
"end": 1170,
"loc": {
"start": {
"line": 41,
"column": 54
},
"end": {
"line": 41,
"column": 55
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "code",
"start": 1171,
"end": 1175,
"loc": {
"start": {
"line": 41,
"column": 56
},
"end": {
"line": 41,
"column": 60
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1175,
"end": 1176,
"loc": {
"start": {
"line": 41,
"column": 60
},
"end": {
"line": 41,
"column": 61
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1176,
"end": 1177,
"loc": {
"start": {
"line": 41,
"column": 61
},
"end": {
"line": 41,
"column": 62
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "gBuildingVariants",
"start": 1183,
"end": 1200,
"loc": {
"start": {
"line": 42,
"column": 4
},
"end": {
"line": 42,
"column": 21
}
}
},
{
"type": {
"label": "[",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1200,
"end": 1201,
"loc": {
"start": {
"line": 42,
"column": 21
},
"end": {
"line": 42,
"column": 22
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "code",
"start": 1201,
"end": 1205,
"loc": {
"start": {
"line": 42,
"column": 22
},
"end": {
"line": 42,
"column": 26
}
}
},
{
"type": {
"label": "]",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1205,
"end": 1206,
"loc": {
"start": {
"line": 42,
"column": 26
},
"end": {
"line": 42,
"column": 27
}
}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "=",
"start": 1207,
"end": 1208,
"loc": {
"start": {
"line": 42,
"column": 28
},
"end": {
"line": 42,
"column": 29
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1209,
"end": 1210,
"loc": {
"start": {
"line": 42,
"column": 30
},
"end": {
"line": 42,
"column": 31
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "metaClass",
"start": 1220,
"end": 1229,
"loc": {
"start": {
"line": 43,
"column": 8
},
"end": {
"line": 43,
"column": 17
}
}
},
{
"type": {
"label": ":",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1229,
"end": 1230,
"loc": {
"start": {
"line": 43,
"column": 17
},
"end": {
"line": 43,
"column": 18
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "meta",
"start": 1231,
"end": 1235,
"loc": {
"start": {
"line": 43,
"column": 19
},
"end": {
"line": 43,
"column": 23
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1235,
"end": 1236,
"loc": {
"start": {
"line": 43,
"column": 23
},
"end": {
"line": 43,
"column": 24
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "variant",
"start": 1246,
"end": 1253,
"loc": {
"start": {
"line": 44,
"column": 8
},
"end": {
"line": 44,
"column": 15
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1253,
"end": 1254,
"loc": {
"start": {
"line": 44,
"column": 15
},
"end": {
"line": 44,
"column": 16
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "rotationVariant",
"start": 1264,
"end": 1279,
"loc": {
"start": {
"line": 45,
"column": 8
},
"end": {
"line": 45,
"column": 23
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1279,
"end": 1280,
"loc": {
"start": {
"line": 45,
"column": 23
},
"end": {
"line": 45,
"column": 24
}
}
},
{
"type": "CommentLine",
"value": " @ts-ignore",
"start": 1290,
"end": 1303,
"loc": {
"start": {
"line": 46,
"column": 8
},
"end": {
"line": 46,
"column": 21
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "tileSize",
"start": 1313,
"end": 1321,
"loc": {
"start": {
"line": 47,
"column": 8
},
"end": {
"line": 47,
"column": 16
}
}
},
{
"type": {
"label": ":",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1321,
"end": 1322,
"loc": {
"start": {
"line": 47,
"column": 16
},
"end": {
"line": 47,
"column": 17
}
}
},
{
"type": {
"label": "new",
"keyword": "new",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "new",
"start": 1323,
"end": 1326,
"loc": {
"start": {
"line": 47,
"column": 18
},
"end": {
"line": 47,
"column": 21
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "meta",
"start": 1327,
"end": 1331,
"loc": {
"start": {
"line": 47,
"column": 22
},
"end": {
"line": 47,
"column": 26
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1331,
"end": 1332,
"loc": {
"start": {
"line": 47,
"column": 26
},
"end": {
"line": 47,
"column": 27
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1332,
"end": 1333,
"loc": {
"start": {
"line": 47,
"column": 27
},
"end": {
"line": 47,
"column": 28
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1333,
"end": 1334,
"loc": {
"start": {
"line": 47,
"column": 28
},
"end": {
"line": 47,
"column": 29
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "getDimensions",
"start": 1334,
"end": 1347,
"loc": {
"start": {
"line": 47,
"column": 29
},
"end": {
"line": 47,
"column": 42
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1347,
"end": 1348,
"loc": {
"start": {
"line": 47,
"column": 42
},
"end": {
"line": 47,
"column": 43
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "variant",
"start": 1348,
"end": 1355,
"loc": {
"start": {
"line": 47,
"column": 43
},
"end": {
"line": 47,
"column": 50
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1355,
"end": 1356,
"loc": {
"start": {
"line": 47,
"column": 50
},
"end": {
"line": 47,
"column": 51
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1356,
"end": 1357,
"loc": {
"start": {
"line": 47,
"column": 51
},
"end": {
"line": 47,
"column": 52
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1363,
"end": 1364,
"loc": {
"start": {
"line": 48,
"column": 4
},
"end": {
"line": 48,
"column": 5
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1364,
"end": 1365,
"loc": {
"start": {
"line": 48,
"column": 5
},
"end": {
"line": 48,
"column": 6
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1367,
"end": 1368,
"loc": {
"start": {
"line": 49,
"column": 0
},
"end": {
"line": 49,
"column": 1
}
}
},
{
"type": "CommentBlock",
"value": "*\r\n *\r\n * @param {String} code\r\n * @returns {BuildingVariantIdentifier}\r\n ",
"start": 1372,
"end": 1450,
"loc": {
"start": {
"line": 51,
"column": 0
},
"end": {
"line": 55,
"column": 3
}
}
},
{
"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": 1452,
"end": 1458,
"loc": {
"start": {
"line": 56,
"column": 0
},
"end": {
"line": 56,
"column": 6
}
}
},
{
"type": {
"label": "function",
"keyword": "function",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "function",
"start": 1459,
"end": 1467,
"loc": {
"start": {
"line": 56,
"column": 7
},
"end": {
"line": 56,
"column": 15
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "getBuildingDataFromCode",
"start": 1468,
"end": 1491,
"loc": {
"start": {
"line": 56,
"column": 16
},
"end": {
"line": 56,
"column": 39
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1491,
"end": 1492,
"loc": {
"start": {
"line": 56,
"column": 39
},
"end": {
"line": 56,
"column": 40
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "code",
"start": 1492,
"end": 1496,
"loc": {
"start": {
"line": 56,
"column": 40
},
"end": {
"line": 56,
"column": 44
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1496,
"end": 1497,
"loc": {
"start": {
"line": 56,
"column": 44
},
"end": {
"line": 56,
"column": 45
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1498,
"end": 1499,
"loc": {
"start": {
"line": 56,
"column": 46
},
"end": {
"line": 56,
"column": 47
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "assert",
"start": 1505,
"end": 1511,
"loc": {
"start": {
"line": 57,
"column": 4
},
"end": {
"line": 57,
"column": 10
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1511,
"end": 1512,
"loc": {
"start": {
"line": 57,
"column": 10
},
"end": {
"line": 57,
"column": 11
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "gBuildingVariants",
"start": 1512,
"end": 1529,
"loc": {
"start": {
"line": 57,
"column": 11
},
"end": {
"line": 57,
"column": 28
}
}
},
{
"type": {
"label": "[",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1529,
"end": 1530,
"loc": {
"start": {
"line": 57,
"column": 28
},
"end": {
"line": 57,
"column": 29
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "code",
"start": 1530,
"end": 1534,
"loc": {
"start": {
"line": 57,
"column": 29
},
"end": {
"line": 57,
"column": 33
}
}
},
{
"type": {
"label": "]",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1534,
"end": 1535,
"loc": {
"start": {
"line": 57,
"column": 33
},
"end": {
"line": 57,
"column": 34
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1535,
"end": 1536,
"loc": {
"start": {
"line": 57,
"column": 34
},
"end": {
"line": 57,
"column": 35
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "Invalid building code: ",
"start": 1537,
"end": 1562,
"loc": {
"start": {
"line": 57,
"column": 36
},
"end": {
"line": 57,
"column": 61
}
}
},
{
"type": {
"label": "+/-",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": true,
"postfix": false,
"binop": 9,
"updateContext": null
},
"value": "+",
"start": 1563,
"end": 1564,
"loc": {
"start": {
"line": 57,
"column": 62
},
"end": {
"line": 57,
"column": 63
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "code",
"start": 1565,
"end": 1569,
"loc": {
"start": {
"line": 57,
"column": 64
},
"end": {
"line": 57,
"column": 68
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1569,
"end": 1570,
"loc": {
"start": {
"line": 57,
"column": 68
},
"end": {
"line": 57,
"column": 69
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1570,
"end": 1571,
"loc": {
"start": {
"line": 57,
"column": 69
},
"end": {
"line": 57,
"column": 70
}
}
},
{
"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": 1577,
"end": 1583,
"loc": {
"start": {
"line": 58,
"column": 4
},
"end": {
"line": 58,
"column": 10
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "gBuildingVariants",
"start": 1584,
"end": 1601,
"loc": {
"start": {
"line": 58,
"column": 11
},
"end": {
"line": 58,
"column": 28
}
}
},
{
"type": {
"label": "[",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1601,
"end": 1602,
"loc": {
"start": {
"line": 58,
"column": 28
},
"end": {
"line": 58,
"column": 29
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "code",
"start": 1602,
"end": 1606,
"loc": {
"start": {
"line": 58,
"column": 29
},
"end": {
"line": 58,
"column": 33
}
}
},
{
"type": {
"label": "]",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1606,
"end": 1607,
"loc": {
"start": {
"line": 58,
"column": 33
},
"end": {
"line": 58,
"column": 34
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1607,
"end": 1608,
"loc": {
"start": {
"line": 58,
"column": 34
},
"end": {
"line": 58,
"column": 35
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1610,
"end": 1611,
"loc": {
"start": {
"line": 59,
"column": 0
},
"end": {
"line": 59,
"column": 1
}
}
},
{
"type": "CommentBlock",
"value": "*\r\n * Finds the code for a given variant\r\n * @param {MetaBuilding} metaBuilding\r\n * @param {string} variant\r\n * @param {number} rotationVariant\r\n * @returns {String}\r\n ",
"start": 1615,
"end": 1787,
"loc": {
"start": {
"line": 61,
"column": 0
},
"end": {
"line": 67,
"column": 3
}
}
},
{
"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": 1789,
"end": 1795,
"loc": {
"start": {
"line": 68,
"column": 0
},
"end": {
"line": 68,
"column": 6
}
}
},
{
"type": {
"label": "function",
"keyword": "function",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "function",
"start": 1796,
"end": 1804,
"loc": {
"start": {
"line": 68,
"column": 7
},
"end": {
"line": 68,
"column": 15
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "getCodeFromBuildingData",
"start": 1805,
"end": 1828,
"loc": {
"start": {
"line": 68,
"column": 16
},
"end": {
"line": 68,
"column": 39
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1828,
"end": 1829,
"loc": {
"start": {
"line": 68,
"column": 39
},
"end": {
"line": 68,
"column": 40
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "metaBuilding",
"start": 1829,
"end": 1841,
"loc": {
"start": {
"line": 68,
"column": 40
},
"end": {
"line": 68,
"column": 52
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1841,
"end": 1842,
"loc": {
"start": {
"line": 68,
"column": 52
},
"end": {
"line": 68,
"column": 53
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "variant",
"start": 1843,
"end": 1850,
"loc": {
"start": {
"line": 68,
"column": 54
},
"end": {
"line": 68,
"column": 61
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1850,
"end": 1851,
"loc": {
"start": {
"line": 68,
"column": 61
},
"end": {
"line": 68,
"column": 62
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "rotationVariant",
"start": 1852,
"end": 1867,
"loc": {
"start": {
"line": 68,
"column": 63
},
"end": {
"line": 68,
"column": 78
}
}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "=",
"start": 1868,
"end": 1869,
"loc": {
"start": {
"line": 68,
"column": 79
},
"end": {
"line": 68,
"column": 80
}
}
},
{
"type": {
"label": "num",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": 0,
"start": 1870,
"end": 1871,
"loc": {
"start": {
"line": 68,
"column": 81
},
"end": {
"line": 68,
"column": 82
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1871,
"end": 1872,
"loc": {
"start": {
"line": 68,
"column": 82
},
"end": {
"line": 68,
"column": 83
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1873,
"end": 1874,
"loc": {
"start": {
"line": 68,
"column": 84
},
"end": {
"line": 68,
"column": 85
}
}
},
{
"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": 1880,
"end": 1886,
"loc": {
"start": {
"line": 69,
"column": 4
},
"end": {
"line": 69,
"column": 10
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "metaBuilding",
"start": 1887,
"end": 1899,
"loc": {
"start": {
"line": 69,
"column": 11
},
"end": {
"line": 69,
"column": 23
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1899,
"end": 1900,
"loc": {
"start": {
"line": 69,
"column": 23
},
"end": {
"line": 69,
"column": 24
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "getId",
"start": 1900,
"end": 1905,
"loc": {
"start": {
"line": 69,
"column": 24
},
"end": {
"line": 69,
"column": 29
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1905,
"end": 1906,
"loc": {
"start": {
"line": 69,
"column": 29
},
"end": {
"line": 69,
"column": 30
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1906,
"end": 1907,
"loc": {
"start": {
"line": 69,
"column": 30
},
"end": {
"line": 69,
"column": 31
}
}
},
{
"type": {
"label": "+/-",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": true,
"postfix": false,
"binop": 9,
"updateContext": null
},
"value": "+",
"start": 1908,
"end": 1909,
"loc": {
"start": {
"line": 69,
"column": 32
},
"end": {
"line": 69,
"column": 33
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "/",
"start": 1910,
"end": 1913,
"loc": {
"start": {
"line": 69,
"column": 34
},
"end": {
"line": 69,
"column": 37
}
}
},
{
"type": {
"label": "+/-",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": true,
"postfix": false,
"binop": 9,
"updateContext": null
},
"value": "+",
"start": 1914,
"end": 1915,
"loc": {
"start": {
"line": 69,
"column": 38
},
"end": {
"line": 69,
"column": 39
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "variant",
"start": 1916,
"end": 1923,
"loc": {
"start": {
"line": 69,
"column": 40
},
"end": {
"line": 69,
"column": 47
}
}
},
{
"type": {
"label": "+/-",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": true,
"postfix": false,
"binop": 9,
"updateContext": null
},
"value": "+",
"start": 1924,
"end": 1925,
"loc": {
"start": {
"line": 69,
"column": 48
},
"end": {
"line": 69,
"column": 49
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "/",
"start": 1926,
"end": 1929,
"loc": {
"start": {
"line": 69,
"column": 50
},
"end": {
"line": 69,
"column": 53
}
}
},
{
"type": {
"label": "+/-",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": true,
"postfix": false,
"binop": 9,
"updateContext": null
},
"value": "+",
"start": 1930,
"end": 1931,
"loc": {
"start": {
"line": 69,
"column": 54
},
"end": {
"line": 69,
"column": 55
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "rotationVariant",
"start": 1932,
"end": 1947,
"loc": {
"start": {
"line": 69,
"column": 56
},
"end": {
"line": 69,
"column": 71
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1947,
"end": 1948,
"loc": {
"start": {
"line": 69,
"column": 71
},
"end": {
"line": 69,
"column": 72
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1950,
"end": 1951,
"loc": {
"start": {
"line": 70,
"column": 0
},
"end": {
"line": 70,
"column": 1
}
}
},
{
"type": {
"label": "eof",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1951,
"end": 1951,
"loc": {
"start": {
"line": 70,
"column": 1
},
"end": {
"line": 70,
"column": 1
}
}
}
]
}