diff --git a/_data/stdlib_index.json b/_data/stdlib_index.json index e3dc00f..8cb0fcc 100644 --- a/_data/stdlib_index.json +++ b/_data/stdlib_index.json @@ -103636,7 +103636,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 6 + "line": 7 }, { "kind": "constant", @@ -103652,7 +103652,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 7 + "line": 8 }, { "kind": "constant", @@ -103665,10 +103665,10 @@ "flag": false, "message": null }, - "configurable": false, + "configurable": true, "members": [], "enumMembers": [], - "line": 8 + "line": 9 }, { "kind": "constant", @@ -103684,7 +103684,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 9 + "line": 10 }, { "kind": "constant", @@ -103700,7 +103700,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 10 + "line": 11 }, { "kind": "constant", @@ -103716,7 +103716,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 11 + "line": 12 }, { "kind": "class", @@ -103745,7 +103745,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 19 + "line": 20 }, { "kind": "function", @@ -103761,7 +103761,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 25 + "line": 26 }, { "kind": "function", @@ -103777,11 +103777,11 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 28 + "line": 29 } ], "enumMembers": [], - "line": 13 + "line": 14 } ] }, @@ -103796,7 +103796,9 @@ "tags": [ "objediting" ], - "imports": [], + "imports": [ + "TypeCasting" + ], "entities": [ { "kind": "function", @@ -103812,7 +103814,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 13 + "line": 11 }, { "kind": "function", @@ -103828,7 +103830,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 25 + "line": 23 }, { "kind": "extension-function", @@ -103844,7 +103846,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 38 + "line": 36 }, { "kind": "extension-function", @@ -103860,7 +103862,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 41 + "line": 39 }, { "kind": "function", @@ -103876,7 +103878,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 45 + "line": 43 }, { "kind": "function", @@ -103892,7 +103894,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 51 + "line": 49 }, { "kind": "function", @@ -103908,7 +103910,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 56 + "line": 54 }, { "kind": "function", @@ -103924,7 +103926,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 62 + "line": 60 }, { "kind": "function", @@ -103940,7 +103942,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 68 + "line": 66 }, { "kind": "function", @@ -103956,7 +103958,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 73 + "line": 71 } ] }, @@ -110793,7 +110795,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 104 + "line": 106 }, { "kind": "function", @@ -110809,7 +110811,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 665 + "line": 716 }, { "kind": "interface", @@ -110825,7 +110827,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 675 + "line": 726 }, { "kind": "interface", @@ -110841,7 +110843,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 678 + "line": 729 }, { "kind": "interface", @@ -110857,7 +110859,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 681 + "line": 732 }, { "kind": "interface", @@ -110873,7 +110875,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 684 + "line": 735 }, { "kind": "interface", @@ -110889,7 +110891,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 687 + "line": 738 }, { "kind": "interface", @@ -110905,7 +110907,23 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 690 + "line": 741 + }, + { + "kind": "constant", + "name": "intComparator", + "typeParams": "", + "receiver": null, + "signature": "public constant Comparator intComparator = (i1, i2) -> i1 < i2 ? -1 : (i1 > i2 ? 1 : 0)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 748 }, { "kind": "extension-function", @@ -110921,7 +110939,23 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 698 + "line": 749 + }, + { + "kind": "constant", + "name": "realComparator", + "typeParams": "", + "receiver": null, + "signature": "public constant Comparator realComparator = (r1, r2) -> r1 < r2 ? -1 : (r1 > r2 ? 1 : 0)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 752 }, { "kind": "extension-function", @@ -110937,7 +110971,23 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 702 + "line": 753 + }, + { + "kind": "constant", + "name": "stringComparator", + "typeParams": "", + "receiver": null, + "signature": "public constant Comparator stringComparator = (s1, s2) -> stringCompare(s1, s2)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 756 }, { "kind": "extension-function", @@ -110953,7 +111003,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 706 + "line": 757 }, { "kind": "extension-function", @@ -110969,7 +111019,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 714 + "line": 765 }, { "kind": "extension-function", @@ -110985,7 +111035,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 723 + "line": 774 } ] }, @@ -111018,7 +111068,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 7 + "line": 6 }, { "kind": "tuple", @@ -111034,7 +111084,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 25 + "line": 24 }, { "kind": "function", @@ -111050,7 +111100,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 28 + "line": 27 }, { "kind": "extension-function", @@ -111066,7 +111116,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 32 + "line": 31 }, { "kind": "extension-function", @@ -111082,7 +111132,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 36 + "line": 35 }, { "kind": "extension-function", @@ -111098,7 +111148,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 40 + "line": 39 }, { "kind": "extension-function", @@ -111114,7 +111164,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 44 + "line": 43 }, { "kind": "extension-function", @@ -111130,7 +111180,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 48 + "line": 47 }, { "kind": "extension-function", @@ -111146,7 +111196,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 52 + "line": 51 }, { "kind": "extension-function", @@ -111162,7 +111212,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 56 + "line": 55 }, { "kind": "extension-function", @@ -111178,7 +111228,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 60 + "line": 59 }, { "kind": "extension-function", @@ -111194,7 +111244,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 64 + "line": 63 }, { "kind": "extension-function", @@ -111210,7 +111260,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 68 + "line": 67 }, { "kind": "extension-function", @@ -111226,7 +111276,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 72 + "line": 71 }, { "kind": "function", @@ -111242,7 +111292,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 77 + "line": 76 }, { "kind": "function", @@ -111258,7 +111308,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 80 + "line": 79 } ] }, @@ -111432,7 +111482,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 81 + "line": 84 }, { "kind": "function", @@ -111448,7 +111498,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 91 + "line": 94 }, { "kind": "function", @@ -111464,7 +111514,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 95 + "line": 98 }, { "kind": "function", @@ -111472,7 +111522,7 @@ "typeParams": "", "receiver": null, "signature": "function get(int index) returns T", - "doc": "Get the element at the given index from this list", + "doc": "Get the element at the given index from this list.\n\t\tIndices outside [0, size) are not validated and yield the null/zero value.", "deprecated": { "flag": false, "message": null @@ -111480,7 +111530,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 99 + "line": 103 }, { "kind": "function", @@ -111496,7 +111546,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 103 + "line": 107 }, { "kind": "function", @@ -111512,7 +111562,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 107 + "line": 111 }, { "kind": "function", @@ -111528,7 +111578,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 111 + "line": 115 }, { "kind": "function", @@ -111544,7 +111594,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 115 + "line": 119 }, { "kind": "function", @@ -111560,7 +111610,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 122 + "line": 126 }, { "kind": "function", @@ -111576,7 +111626,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 129 + "line": 133 }, { "kind": "function", @@ -111584,7 +111634,7 @@ "typeParams": "", "receiver": null, "signature": "function removeIf(RemovePredicate predicate)", - "doc": "Removes the element if the predicates returns true", + "doc": "Removes the element if the predicates returns true.\n\t\tSingle pass compaction - removing through the iterator instead would\n\t\tshift the tail once per removal, making this O(n^2).", "deprecated": { "flag": false, "message": null @@ -111592,7 +111642,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 136 + "line": 142 }, { "kind": "function", @@ -111608,7 +111658,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 145 + "line": 159 } ], "enumMembers": [], @@ -111641,11 +111691,11 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 152 + "line": 166 } ], "enumMembers": [], - "line": 151 + "line": 165 }, { "kind": "interface", @@ -111674,11 +111724,11 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 155 + "line": 169 } ], "enumMembers": [], - "line": 154 + "line": 168 }, { "kind": "class", @@ -111707,7 +111757,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 161 + "line": 175 }, { "kind": "function", @@ -111723,7 +111773,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 164 + "line": 178 }, { "kind": "function", @@ -111739,7 +111789,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 167 + "line": 181 }, { "kind": "function", @@ -111755,7 +111805,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 171 + "line": 185 }, { "kind": "function", @@ -111771,7 +111821,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 175 + "line": 189 }, { "kind": "function", @@ -111787,11 +111837,11 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 178 + "line": 192 } ], "enumMembers": [], - "line": 157 + "line": 171 } ] }, @@ -112041,7 +112091,7 @@ "typeParams": "", "receiver": null, "signature": "override function getAndRemove(K key) returns V", - "doc": "Retrieves the value saved under the given key and removes it", + "doc": "Retrieves the value saved under the given key and removes it.\n\t\tsuper.getAndRemove dispatches back into this class's remove(), which\n\t\talready drops the key, so no second keys.remove() is needed here.", "deprecated": { "flag": false, "message": null @@ -112049,7 +112099,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 77 + "line": 79 }, { "kind": "function", @@ -112113,7 +112163,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 113 + "line": 116 }, { "kind": "function", @@ -112129,7 +112179,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 118 + "line": 121 }, { "kind": "function", @@ -112145,7 +112195,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 125 + "line": 128 }, { "kind": "function", @@ -112161,7 +112211,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 129 + "line": 132 } ], "enumMembers": [], @@ -112194,11 +112244,11 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 144 + "line": 147 } ], "enumMembers": [], - "line": 143 + "line": 146 } ] }, @@ -112416,7 +112466,7 @@ "typeParams": "", "receiver": null, "signature": "function get(int index) returns T", - "doc": "Returns the element at the specified index", + "doc": "Returns the element at the specified index.\n\t\tErrors if the index is outside [0, size).", "deprecated": { "flag": false, "message": null @@ -112424,7 +112474,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 64 + "line": 65 }, { "kind": "function", @@ -112440,7 +112490,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 68 + "line": 69 }, { "kind": "function", @@ -112448,7 +112498,7 @@ "typeParams": "", "receiver": null, "signature": "function set(int index, T elem)", - "doc": "Sets the element at the specified index", + "doc": "Sets the element at the specified index.\n\t\tErrors if the index is outside [0, size).", "deprecated": { "flag": false, "message": null @@ -112456,7 +112506,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 79 + "line": 81 }, { "kind": "function", @@ -112472,7 +112522,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 83 + "line": 85 }, { "kind": "function", @@ -112480,7 +112530,7 @@ "typeParams": "", "receiver": null, "signature": "function getFirst() returns T", - "doc": "Returns the first element in the list", + "doc": "Returns the first element in the list, or null if it is empty", "deprecated": { "flag": false, "message": null @@ -112488,7 +112538,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 87 + "line": 89 }, { "kind": "function", @@ -112496,7 +112546,7 @@ "typeParams": "", "receiver": null, "signature": "function getLast() returns T", - "doc": "Returns the last element in the list", + "doc": "Returns the last element in the list, or null if it is empty", "deprecated": { "flag": false, "message": null @@ -112504,7 +112554,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 91 + "line": 93 }, { "kind": "function", @@ -112520,7 +112570,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 95 + "line": 97 }, { "kind": "function", @@ -112536,7 +112586,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 104 + "line": 106 }, { "kind": "function", @@ -112552,7 +112602,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 113 + "line": 115 }, { "kind": "function", @@ -112568,7 +112618,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 117 + "line": 119 }, { "kind": "function", @@ -112584,7 +112634,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 126 + "line": 128 }, { "kind": "function", @@ -112600,7 +112650,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 137 + "line": 139 }, { "kind": "function", @@ -112616,7 +112666,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 149 + "line": 151 }, { "kind": "function", @@ -112632,7 +112682,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 153 + "line": 155 }, { "kind": "function", @@ -112648,7 +112698,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 157 + "line": 159 }, { "kind": "function", @@ -112664,7 +112714,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 164 + "line": 166 }, { "kind": "function", @@ -112680,7 +112730,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 171 + "line": 173 }, { "kind": "function", @@ -112696,7 +112746,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 178 + "line": 180 }, { "kind": "function", @@ -112712,7 +112762,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 182 + "line": 184 }, { "kind": "function", @@ -112728,7 +112778,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 186 + "line": 188 }, { "kind": "function", @@ -112744,7 +112794,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 190 + "line": 192 }, { "kind": "function", @@ -112760,7 +112810,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 200 + "line": 202 }, { "kind": "function", @@ -112776,7 +112826,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 210 + "line": 212 }, { "kind": "function", @@ -112792,7 +112842,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 220 + "line": 222 }, { "kind": "function", @@ -112808,7 +112858,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 229 + "line": 231 }, { "kind": "function", @@ -112816,7 +112866,7 @@ "typeParams": "", "receiver": null, "signature": "function shuffle()", - "doc": "Performs a Fisher–Yates shuffle on this list", + "doc": "Performs a Fisher-Yates shuffle on this list.\n\t\tPermutes the elements in place - no nodes are destroyed or reallocated.", "deprecated": { "flag": false, "message": null @@ -112824,7 +112874,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 237 + "line": 240 }, { "kind": "function", @@ -112832,7 +112882,7 @@ "typeParams": "", "receiver": null, "signature": "function getRandomElement() returns T", - "doc": "Returns a random element from this list or null, if empty", + "doc": "Returns a random element from this list, or null if it is empty", "deprecated": { "flag": false, "message": null @@ -112840,7 +112890,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 260 + "line": 259 }, { "kind": "function", @@ -112848,7 +112898,7 @@ "typeParams": "", "receiver": null, "signature": "function addAt(T elem, int index)", - "doc": "Adds the given element directly behind the element at the given index", + "doc": "Inserts the given element at the given index, shifting the element that\n\t\twas there (and everything after it) one position to the right.\n\t\tAn index equal to the list's size appends to the end.", "deprecated": { "flag": false, "message": null @@ -112856,7 +112906,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 264 + "line": 267 }, { "kind": "function", @@ -112872,7 +112922,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 272 + "line": 277 }, { "kind": "function", @@ -112888,7 +112938,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 282 + "line": 287 }, { "kind": "function", @@ -112896,7 +112946,7 @@ "typeParams": "", "receiver": null, "signature": "function filter(LinkedListPredicate predicate) returns LinkedList", - "doc": "Returns a new list of the elements that satisfy the predicate", + "doc": "Returns a new list of the elements that satisfy the predicate.\n\t\tBuilds the result directly instead of copying and pruning, so only the\n\t\tmatching elements are ever allocated.", "deprecated": { "flag": false, "message": null @@ -112904,7 +112954,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 289 + "line": 296 }, { "kind": "function", @@ -112920,7 +112970,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 297 + "line": 308 }, { "kind": "function", @@ -112936,7 +112986,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 307 + "line": 318 }, { "kind": "function", @@ -112944,7 +112994,7 @@ "typeParams": "", "receiver": null, "signature": "function toString() returns string", - "doc": "Prints the content of the list", + "doc": "Prints the content of the list. Only meaningful for int-like element types.", "deprecated": { "flag": false, "message": null @@ -112952,7 +113002,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 380 + "line": 391 }, { "kind": "function", @@ -112968,7 +113018,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 385 + "line": 398 } ], "enumMembers": [], @@ -112988,7 +113038,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 422 + "line": 445 }, { "kind": "class", @@ -113017,7 +113067,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 444 + "line": 467 }, { "kind": "function", @@ -113033,7 +113083,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 448 + "line": 472 }, { "kind": "function", @@ -113049,7 +113099,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 453 + "line": 478 }, { "kind": "function", @@ -113065,7 +113115,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 459 + "line": 484 }, { "kind": "function", @@ -113081,7 +113131,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 468 + "line": 495 }, { "kind": "function", @@ -113097,7 +113147,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 472 + "line": 499 }, { "kind": "function", @@ -113113,7 +113163,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 475 + "line": 502 }, { "kind": "function", @@ -113129,7 +113179,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 479 + "line": 506 }, { "kind": "function", @@ -113145,7 +113195,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 485 + "line": 512 }, { "kind": "function", @@ -113161,7 +113211,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 489 + "line": 516 }, { "kind": "function", @@ -113177,11 +113227,11 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 495 + "line": 522 } ], "enumMembers": [], - "line": 438 + "line": 461 }, { "kind": "class", @@ -113210,7 +113260,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 505 + "line": 532 }, { "kind": "function", @@ -113226,7 +113276,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 510 + "line": 538 }, { "kind": "function", @@ -113242,7 +113292,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 514 + "line": 543 }, { "kind": "function", @@ -113258,7 +113308,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 519 + "line": 548 }, { "kind": "function", @@ -113274,7 +113324,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 523 + "line": 552 }, { "kind": "function", @@ -113290,7 +113340,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 526 + "line": 555 }, { "kind": "function", @@ -113306,7 +113356,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 530 + "line": 559 }, { "kind": "function", @@ -113322,7 +113372,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 537 + "line": 566 }, { "kind": "function", @@ -113338,11 +113388,11 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 543 + "line": 572 } ], "enumMembers": [], - "line": 499 + "line": 526 }, { "kind": "interface", @@ -113371,11 +113421,11 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 548 + "line": 577 } ], "enumMembers": [], - "line": 547 + "line": 576 }, { "kind": "interface", @@ -113404,11 +113454,11 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 551 + "line": 580 } ], "enumMembers": [], - "line": 550 + "line": 579 }, { "kind": "interface", @@ -113437,11 +113487,11 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 554 + "line": 583 } ], "enumMembers": [], - "line": 553 + "line": 582 }, { "kind": "interface", @@ -113470,11 +113520,11 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 557 + "line": 586 } ], "enumMembers": [], - "line": 556 + "line": 585 }, { "kind": "interface", @@ -113503,11 +113553,11 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 560 + "line": 589 } ], "enumMembers": [], - "line": 559 + "line": 588 }, { "kind": "interface", @@ -113536,11 +113586,11 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 563 + "line": 592 } ], "enumMembers": [], - "line": 562 + "line": 591 }, { "kind": "extension-function", @@ -113556,7 +113606,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 566 + "line": 597 }, { "kind": "extension-function", @@ -113572,7 +113622,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 570 + "line": 601 }, { "kind": "extension-function", @@ -113588,7 +113638,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 574 + "line": 605 }, { "kind": "extension-function", @@ -113604,7 +113654,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 577 + "line": 608 }, { "kind": "extension-function", @@ -113620,7 +113670,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 584 + "line": 615 }, { "kind": "extension-function", @@ -113636,7 +113686,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 600 + "line": 631 }, { "kind": "extension-function", @@ -113652,7 +113702,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 613 + "line": 644 } ] }, @@ -113712,7 +113762,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 24 + "line": 23 }, { "kind": "function", @@ -113720,7 +113770,7 @@ "typeParams": "", "receiver": null, "signature": "function getNext() returns thistype", - "doc": "", + "doc": "The next instance, wrapping around to the first one at the end of the list", "deprecated": { "flag": false, "message": null @@ -113736,7 +113786,7 @@ "typeParams": "", "receiver": null, "signature": "function getPrev() returns thistype", - "doc": "", + "doc": "The previous instance, wrapping around to the last one at the start of the list", "deprecated": { "flag": false, "message": null @@ -113744,7 +113794,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 32 + "line": 33 }, { "kind": "function", @@ -113760,7 +113810,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 37 + "line": 38 }, { "kind": "function", @@ -113776,7 +113826,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 52 + "line": 55 }, { "kind": "function", @@ -113792,7 +113842,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 58 + "line": 61 }, { "kind": "function", @@ -113808,7 +113858,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 62 + "line": 65 }, { "kind": "function", @@ -113824,7 +113874,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 68 + "line": 71 } ], "enumMembers": [], @@ -113832,6 +113882,277 @@ } ] }, + { + "package": "PriorityQueue", + "category": "data", + "categoryLabel": "Data Structures", + "sourcePath": "wurst/data/PriorityQueue.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/data/PriorityQueue.wurst", + "summary": "A binary heap priority queue.\n\nThe comparator defines priority: a negative result means that the first\nvalue has higher priority, so ArrayList.intComparator creates a min-heap.\nReverse the comparator to create a max-heap. Equal-priority elements are\nnot stable.\n\nAdding and removing the highest-priority element are O(log n). Peeking is\nO(1). The queue does not support changing an element's priority in place;\nremove and re-add it after changing any fields used by the comparator.", + "summaryFirstLine": "A binary heap priority queue.", + "tags": [ + "data" + ], + "imports": [], + "entities": [ + { + "kind": "class", + "name": "PriorityQueue", + "typeParams": "", + "receiver": null, + "signature": "public class PriorityQueue", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 25 + } + ] + }, + { + "package": "ShardedIntStorage", + "category": "data", + "categoryLabel": "Data Structures", + "sourcePath": "wurst/data/ShardedIntStorage.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/data/ShardedIntStorage.wurst", + "summary": "A shared integer arena spanning multiple native JASS arrays. Allocations are\ncontiguous logical address ranges and released adjacent ranges are coalesced.", + "summaryFirstLine": "A shared integer arena spanning multiple native JASS arrays. Allocations are", + "tags": [ + "data" + ], + "imports": [], + "entities": [ + { + "kind": "class", + "name": "ShardedIntStorage", + "typeParams": "", + "receiver": null, + "signature": "public class ShardedIntStorage", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [ + { + "kind": "function", + "name": "capacity", + "typeParams": "", + "receiver": null, + "signature": "static function capacity() returns int", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 51 + }, + { + "kind": "function", + "name": "get", + "typeParams": "", + "receiver": null, + "signature": "static function get(int address) returns int", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 54 + }, + { + "kind": "function", + "name": "set", + "typeParams": "", + "receiver": null, + "signature": "static function set(int address, int value)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 124 + }, + { + "kind": "function", + "name": "tryAllocate", + "typeParams": "", + "receiver": null, + "signature": "static function tryAllocate(int size) returns int", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 193 + }, + { + "kind": "function", + "name": "allocate", + "typeParams": "", + "receiver": null, + "signature": "static function allocate(int size) returns int", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 217 + }, + { + "kind": "function", + "name": "release", + "typeParams": "", + "receiver": null, + "signature": "static function release(int start, int size)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 224 + } + ], + "enumMembers": [], + "line": 10 + } + ] + }, + { + "package": "SparseSet", + "category": "data", + "categoryLabel": "Data Structures", + "sourcePath": "wurst/data/SparseSet.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/data/SparseSet.wurst", + "summary": "A set with O(1) membership checks, insertion, and unordered removal.\n\nElements are stored in a dense typed array. The sparse index maps the key\nsupplied by SparseSetKey to the element's dense index. Keys must be unique\nand stable for the lifetime of an element in the set. A key may be reused\nafter its old value is gone; add() validates the stored value before\naccepting the new one.\n\nRemoval swaps the last element into the removed element's slot, so dense\niteration order is not preserved.", + "summaryFirstLine": "A set with O(1) membership checks, insertion, and unordered removal.", + "tags": [ + "data" + ], + "imports": [ + "TypeCasting" + ], + "entities": [ + { + "kind": "interface", + "name": "SparseSetKey", + "typeParams": "", + "receiver": null, + "signature": "public interface SparseSetKey", + "doc": "Supplies the stable, unique integer key used by a SparseSet.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 9 + }, + { + "kind": "class", + "name": "SparseSet", + "typeParams": "", + "receiver": null, + "signature": "public class SparseSet", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 24 + }, + { + "kind": "class", + "name": "UnitSparseSetKey", + "typeParams": "", + "receiver": null, + "signature": "public class UnitSparseSetKey implements SparseSetKey", + "doc": "Key provider for unit sets.\n\nThis deliberately uses the native handle identity rather than UnitIndexer\nIDs. That matches native groups: membership is not automatically removed\nwhen a unit is deindexed. SparseSet validates the stored unit when a key is\nreused, so a new unit cannot silently inherit stale membership.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 150 + }, + { + "kind": "constant", + "name": "UNIT_SPARSE_SET_KEY", + "typeParams": "", + "receiver": null, + "signature": "public constant SparseSetKey UNIT_SPARSE_SET_KEY = new UnitSparseSetKey()", + "doc": "Reusable key provider for SparseSet.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 155 + } + ] + }, + { + "package": "SparseSetBenchmark", + "category": "data", + "categoryLabel": "Data Structures", + "sourcePath": "wurst/data/SparseSetBenchmark.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/data/SparseSetBenchmark.wurst", + "summary": "", + "summaryFirstLine": "", + "tags": [ + "data" + ], + "imports": [], + "entities": [ + { + "kind": "function", + "name": "startSparseSetBenchmark", + "typeParams": "", + "receiver": null, + "signature": "public function startSparseSetBenchmark()", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 222 + } + ] + }, { "package": "Table", "category": "data", @@ -115642,8 +115963,8 @@ "categoryLabel": "Closures", "sourcePath": "wurst/closures/ClosureForGroups.wurst", "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/closures/ClosureForGroups.wurst", - "summary": "Executes the given closure for every unit in this group,\n\tremoving the units from the group as processed.\n\tReturn true to continue iteration, false to stop.", - "summaryFirstLine": "Executes the given closure for every unit in this group,", + "summary": "Executes the given closure for every unit of the given type.\n\tStops invoking the closure after *count* units. The underlying enumeration\n\tcannot be aborted, so it still visits every match.", + "summaryFirstLine": "Executes the given closure for every unit of the given type.", "tags": [ "closure", "closures", @@ -115771,7 +116092,7 @@ "typeParams": "", "receiver": null, "signature": "public function forUnitsOfTypeCounted(string unitname, int count, ForGroupCallback c)", - "doc": "Executes the given closure for every unit of the given player.\n\tCancels itself after *count* iterations", + "doc": "", "deprecated": { "flag": false, "message": null @@ -115779,7 +116100,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 100 + "line": 101 }, { "kind": "function", @@ -115795,7 +116116,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 106 + "line": 107 }, { "kind": "function", @@ -115811,7 +116132,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 112 + "line": 113 }, { "kind": "function", @@ -115827,7 +116148,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 120 + "line": 121 }, { "kind": "function", @@ -115835,7 +116156,7 @@ "typeParams": "", "receiver": null, "signature": "public function forUnitsInRectCounted(rect r, int count, ForGroupCallback c)", - "doc": "Executes the given closure for every unit in the given rect.\n\tCancels itself after *count* iterations", + "doc": "Executes the given closure for every unit in the given rect.\n\tStops invoking the closure after *count* units. The underlying enumeration\n\tcannot be aborted, so it still visits every unit in the rect.", "deprecated": { "flag": false, "message": null @@ -115843,7 +116164,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 127 + "line": 129 }, { "kind": "function", @@ -115859,7 +116180,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 133 + "line": 135 }, { "kind": "function", @@ -115875,7 +116196,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 138 + "line": 140 }, { "kind": "function", @@ -115883,7 +116204,7 @@ "typeParams": "", "receiver": null, "signature": "public function forUnitsInRangeCounted(vec2 pos, real radius, int count, ForGroupCallback c)", - "doc": "Executes the given closure for every unit in range of the given position\n\tCancels itself after *count* iterations", + "doc": "Executes the given closure for every unit in range of the given position.\n\tStops invoking the closure after *count* units. The underlying enumeration\n\tcannot be aborted, so it still visits every unit in range.", "deprecated": { "flag": false, "message": null @@ -115891,7 +116212,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 153 + "line": 156 }, { "kind": "function", @@ -115907,7 +116228,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 159 + "line": 162 }, { "kind": "function", @@ -115923,7 +116244,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 166 + "line": 169 }, { "kind": "extension-function", @@ -115931,7 +116252,7 @@ "typeParams": "", "receiver": "group", "signature": "public function group.forEachFromUntil(ForGroupCallbackUntil cb)", - "doc": "", + "doc": "Executes the given closure for every unit in this group,\n\tremoving the units from the group as processed.\n\tReturn true to continue iteration, false to stop.", "deprecated": { "flag": false, "message": null @@ -115939,7 +116260,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 182 + "line": 185 }, { "kind": "extension-function", @@ -115955,7 +116276,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 191 + "line": 194 }, { "kind": "function", @@ -115971,7 +116292,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 201 + "line": 204 }, { "kind": "function", @@ -115987,7 +116308,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 208 + "line": 211 }, { "kind": "function", @@ -116003,7 +116324,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 215 + "line": 218 }, { "kind": "function", @@ -116019,7 +116340,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 225 + "line": 228 }, { "kind": "function", @@ -116035,7 +116356,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 232 + "line": 235 }, { "kind": "function", @@ -116051,7 +116372,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 239 + "line": 242 }, { "kind": "interface", @@ -116080,11 +116401,11 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 247 + "line": 250 } ], "enumMembers": [], - "line": 246 + "line": 249 }, { "kind": "function", @@ -116092,7 +116413,7 @@ "typeParams": "", "receiver": null, "signature": "public function forDestructablesInRange(vec2 pos, real range, ForGroupCallbackD cb)", - "doc": "Executes the given closure for all destructables in a rect\n\tthat incompasses the circle with the range radius at the given position.", + "doc": "Executes the given closure for all destructables in a rect\n\tthat encompasses the circle with the range radius at the given position.", "deprecated": { "flag": false, "message": null @@ -116100,7 +116421,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 272 + "line": 288 }, { "kind": "function", @@ -116108,7 +116429,7 @@ "typeParams": "", "receiver": null, "signature": "public function forDestructablesInRange(vec2 pos, real range, boolexpr filter, ForGroupCallbackD cb)", - "doc": "Executes the given closure for all destructables in a rect\n\tthat incompasses the circle with the range radius at the given position.", + "doc": "Executes the given closure for all destructables in a rect\n\tthat encompasses the circle with the range radius at the given position.", "deprecated": { "flag": false, "message": null @@ -116116,7 +116437,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 277 + "line": 293 }, { "kind": "function", @@ -116132,7 +116453,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 282 + "line": 299 }, { "kind": "function", @@ -116148,7 +116469,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 286 + "line": 303 }, { "kind": "function", @@ -116156,7 +116477,7 @@ "typeParams": "", "receiver": null, "signature": "public function forNearestDestructable(vec2 pos, real range, ForGroupCallbackD c)", - "doc": "Executes the given closure for the closes destructable in the given rect.\n\tIf there is no destructable in range, the closure will be run with \"null\"", + "doc": "Executes the given closure for the closest destructable in the given range.\n\tIf there is no destructable in range, the closure will be run with \"null\"", "deprecated": { "flag": false, "message": null @@ -116164,7 +116485,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 298 + "line": 319 } ] }, @@ -116643,7 +116964,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 16 + "line": 15 }, { "kind": "function", @@ -116659,7 +116980,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 27 + "line": 26 }, { "kind": "function", @@ -116675,7 +116996,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 39 + "line": 38 }, { "kind": "function", @@ -116691,7 +117012,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 50 + "line": 49 }, { "kind": "extension-function", @@ -116707,7 +117028,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 62 + "line": 61 }, { "kind": "function", @@ -116723,7 +117044,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 74 + "line": 73 }, { "kind": "extension-function", @@ -116739,7 +117060,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 86 + "line": 85 }, { "kind": "function", @@ -116755,7 +117076,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 98 + "line": 97 }, { "kind": "extension-function", @@ -116771,7 +117092,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 110 + "line": 109 }, { "kind": "function", @@ -116787,7 +117108,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 121 + "line": 120 }, { "kind": "interface", @@ -116816,11 +117137,11 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 126 + "line": 125 } ], "enumMembers": [], - "line": 125 + "line": 124 }, { "kind": "class", @@ -116849,7 +117170,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 130 + "line": 129 }, { "kind": "function", @@ -116865,11 +117186,11 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 144 + "line": 143 } ], "enumMembers": [], - "line": 128 + "line": 127 }, { "kind": "class", @@ -116899,10 +117220,42 @@ "members": [], "enumMembers": [], "line": 154 + }, + { + "kind": "function", + "name": "disable", + "typeParams": "", + "receiver": null, + "signature": "function disable()", + "doc": "Pauses this periodic callback without destroying it. Safe to call when already disabled.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 166 + }, + { + "kind": "function", + "name": "enable", + "typeParams": "", + "receiver": null, + "signature": "function enable()", + "doc": "Resumes a previously disabled periodic callback. Safe to call when already enabled.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 171 } ], "enumMembers": [], - "line": 151 + "line": 150 }, { "kind": "class", @@ -116931,7 +117284,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 173 + "line": 184 }, { "kind": "function", @@ -116947,7 +117300,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 182 + "line": 193 }, { "kind": "function", @@ -116955,7 +117308,7 @@ "typeParams": "", "receiver": null, "signature": "function getCount() returns int", - "doc": "", + "doc": "The number of this call, counting down: maxCount on the first call and\n\t\t1 on the last. Returns maxCount before the first call.", "deprecated": { "flag": false, "message": null @@ -116963,7 +117316,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 185 + "line": 198 }, { "kind": "function", @@ -116971,7 +117324,7 @@ "typeParams": "", "receiver": null, "signature": "function progress() returns real", - "doc": "Returns a value between 0 and 1.", + "doc": "Progress through the run as a value between 0 and 1.\n\t\tReturns 0 if the callback was started with a call count of 0.", "deprecated": { "flag": false, "message": null @@ -116979,7 +117332,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 189 + "line": 203 }, { "kind": "function", @@ -116987,7 +117340,7 @@ "typeParams": "", "receiver": null, "signature": "function stop()", - "doc": "", + "doc": "Stops the callback. The remaining calls are skipped and the object is\n\t\tdestroyed on the next tick, not immediately.", "deprecated": { "flag": false, "message": null @@ -116995,7 +117348,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 192 + "line": 210 }, { "kind": "function", @@ -117011,11 +117364,11 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 198 + "line": 216 } ], "enumMembers": [], - "line": 168 + "line": 179 } ] }, @@ -117115,13 +117468,92 @@ } ] }, + { + "package": "SpatialIndexForUnits", + "category": "closures", + "categoryLabel": "Closures", + "sourcePath": "wurst/closures/SpatialIndexForUnits.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/closures/SpatialIndexForUnits.wurst", + "summary": "", + "summaryFirstLine": "", + "tags": [ + "closures" + ], + "imports": [], + "entities": [ + { + "kind": "function", + "name": "unitsInRange", + "typeParams": "", + "receiver": null, + "signature": "public function unitsInRange(vec2 center, real radius) returns SparseSet", + "doc": "Returns units whose origins are within radius of center.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 23 + }, + { + "kind": "function", + "name": "unitsInRange", + "typeParams": "", + "receiver": null, + "signature": "public function unitsInRange(vec2 center, real radius, boolean collisionFiltering) returns SparseSet", + "doc": "Returns units in range, optionally applying collision-size filtering.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 27 + }, + { + "kind": "function", + "name": "unitsInBox", + "typeParams": "", + "receiver": null, + "signature": "public function unitsInBox(vec2 boxMin, vec2 boxMax) returns SparseSet", + "doc": "Returns units whose origins are inside the axis-aligned box.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 34 + }, + { + "kind": "function", + "name": "unitsOfPlayer", + "typeParams": "", + "receiver": null, + "signature": "public function unitsOfPlayer(player owner) returns SparseSet", + "doc": "Returns currently indexed units owned by owner.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 44 + } + ] + }, { "package": "DamageEvent", "category": "event", "categoryLabel": "Events", "sourcePath": "wurst/event/DamageEvent.wurst", "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/event/DamageEvent.wurst", - "summary": "This package provides a light-weight damage detection system with priority-ordered listeners.\n\n**IMPORTANT**\n This package **doesn't** provide protection from cyclic damage.\n Damage from code **must** be declared by the user using DamageEvent.setNextDamageFromCode() before dealing damage.\n If you set damage amount to zero or less in the unreduced listeners, reduced listeners will not fire.\n\n if DETECT_NATIVE_ABILITIES is true:\n > Any damage instance of attacktype ATTACK_TYPE_NORMAL is passed with DamageType SPELL\n\n\nTo listen to any damage instance firing:\n\n DamageEvent.addListener() ->\n print(DamageEvent.getSource().getName() + \" dealt \" + DamageEvent.getAmount().toString() + \" damage to \" + DamageEvent.getTarget().getName() + \".\")\n\nIf the order of firing of the listeners is important, the user can give a priority to the listener:\n\n DamageEvent.addListener(2) ->\n print(\"This fires after.\")\n DamageEvent.addListener(0) ->\n print(\"This fires before.\")\n\nIf you want to catch the damage instance before it has been reduced by any damage reducing effect (such as armor) you can use the unreduced verions of the listeners:\n\n DamageEvent.addUnreducedListener() ->\n print(\"this fire before any damage reduction\")\n\n\nEach damage instance has a DamageType associated to it.\nCODE **must** be declared by the user using DamageEvent.setNextDamageFromCode() before dealing damage.\nATTACK and SPELL are detected by the system (if DETECT_NATIVE_ABILITIES is false then native abilities will be detected as ATTACK)\n\n DamageEvent.addListener() ->\n switch DamageEvent.getType()\n case ATTACK\n print(\"This damage is from a unit's attack.\")\n case SPELL\n print(\"This damage is from a native ability.\")\n case CODE\n print(\"This damage is from code.\")\n default\n\nEach damage instance can have an id and/or an element.DamageEvent\nAllowing the user to easily categorize (DamageElement) or/and identify a damage instance (id):\n\n DamageEvent.setNextDamageFromCode()\n DamageEvent.setNextDamageId('A000') // This damage instance is from the spell 'A000'\n DamageEvent.setNextDamageElement(DAMAGE_ELEMENT_FIRE) // This damage instance will be categorized as a Fire damage instance.\n UnitDamageTarget(source, target, amount, [...])\n\nUsing globally defined priorities for a map can help easily understand and use a damage pipeline:\n\n public constant DAMAGE_EVENT_PRIO_START = 0 // Abort damage at this priority\n public constant DAMAGE_EVENT_PRIO_RELATIVE = 1 // Apply relative changes (multiplication and division)\n public constant DAMAGE_EVENT_PRIO_ABSOLUTE = 2 // Apply absolute changes (addition and subtraction)\n public constant DAMAGE_EVENT_PRIO_SHIELD = 4 // Apply reduction from \"shield\" effects\n public constant DAMAGE_EVENT_PRIO_FINAL = 5 // Final damage (won't be changed at this stage)", + "summary": "This package provides a light-weight damage detection system with priority-ordered listeners.\n\n**IMPORTANT**\n This package **doesn't** provide protection from cyclic damage.\n Damage from code **must** be declared by the user using DamageEvent.setNextDamageFromCode() before dealing damage.\n Setting the damage amount to zero or less in the unreduced listeners does **not** skip the reduced\n listeners: EVENT_PLAYER_UNIT_DAMAGED still fires and they run with an amount of zero.\n (This corrects an older note here which claimed the opposite. Verified in game by check 10 of\n package StdlibIngameTests.)\n\n if DETECT_NATIVE_ABILITIES is true:\n > Any damage instance of attacktype ATTACK_TYPE_NORMAL is passed with DamageType SPELL\n\n\nTo listen to any damage instance firing:\n\n DamageEvent.addListener() ->\n print(DamageEvent.getSource().getName() + \" dealt \" + DamageEvent.getAmount().toString() + \" damage to \" + DamageEvent.getTarget().getName() + \".\")\n\nIf the order of firing of the listeners is important, the user can give a priority to the listener:\n\n DamageEvent.addListener(2) ->\n print(\"This fires after.\")\n DamageEvent.addListener(0) ->\n print(\"This fires before.\")\n\nIf you want to catch the damage instance before it has been reduced by any damage reducing effect (such as armor) you can use the unreduced versions of the listeners:\n\n DamageEvent.addUnreducedListener() ->\n print(\"this fire before any damage reduction\")\n\n\nEach damage instance has a DamageType associated to it.\nCODE **must** be declared by the user using DamageEvent.setNextDamageFromCode() before dealing damage.\nATTACK and SPELL are detected by the system (if DETECT_NATIVE_ABILITIES is false then native abilities will be detected as ATTACK)\n\n DamageEvent.addListener() ->\n switch DamageEvent.getType()\n case ATTACK\n print(\"This damage is from a unit's attack.\")\n case SPELL\n print(\"This damage is from a native ability.\")\n case CODE\n print(\"This damage is from code.\")\n default\n\nEach damage instance can have an id and/or an element.DamageEvent\nAllowing the user to easily categorize (DamageElement) or/and identify a damage instance (id):\n\n DamageEvent.setNextDamageFromCode()\n DamageEvent.setNextDamageId('A000') // This damage instance is from the spell 'A000'\n DamageEvent.setNextDamageElement(DAMAGE_ELEMENT_FIRE) // This damage instance will be categorized as a Fire damage instance.\n UnitDamageTarget(source, target, amount, [...])\n\nUsing globally defined priorities for a map can help easily understand and use a damage pipeline:\n\n public constant DAMAGE_EVENT_PRIO_START = 0 // Abort damage at this priority\n public constant DAMAGE_EVENT_PRIO_RELATIVE = 1 // Apply relative changes (multiplication and division)\n public constant DAMAGE_EVENT_PRIO_ABSOLUTE = 2 // Apply absolute changes (addition and subtraction)\n public constant DAMAGE_EVENT_PRIO_SHIELD = 4 // Apply reduction from \"shield\" effects\n public constant DAMAGE_EVENT_PRIO_FINAL = 5 // Final damage (won't be changed at this stage)", "summaryFirstLine": "This package provides a light-weight damage detection system with priority-ordered listeners.", "tags": [ "damage", @@ -117144,7 +117576,7 @@ "configurable": true, "members": [], "enumMembers": [], - "line": 68 + "line": 71 }, { "kind": "constant", @@ -117152,7 +117584,7 @@ "typeParams": "", "receiver": null, "signature": "public constant DAMAGE_ELEMENT_ATTACK = new DamageElement(\"Physical\", colorA(223, 59, 33, 255))", - "doc": "A damage instance can have an element.\n DAMAGE_ELEMENT_ATTACK is the defaut element added to any damage instances of DamageType ATTACK", + "doc": "A damage instance can have an element.\n DAMAGE_ELEMENT_ATTACK is the default element added to any damage instances of DamageType ATTACK", "deprecated": { "flag": false, "message": null @@ -117160,7 +117592,7 @@ "configurable": true, "members": [], "enumMembers": [], - "line": 72 + "line": 75 }, { "kind": "enum", @@ -117176,7 +117608,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 80 + "line": 83 }, { "kind": "class", @@ -117184,7 +117616,7 @@ "typeParams": "", "receiver": null, "signature": "public class DamageElement", - "doc": "Each damage instance can have a DamageElement associated to it.\n Allowing for categories of damage instances:\n\n DAMAGE_ELEMENT_FIRE = new DamageElement(\"Fire\", colorA(255, 0, 0, 255))\n DAMAGE_ELEMENT_WATER = new DamageElement(\"Water\", colorA(0, 0, 255, 255))\n\n The user can extends from DamageElement to add his own settings.", + "doc": "Each damage instance can have a DamageElement associated to it.\n Allowing for categories of damage instances:\n\n DAMAGE_ELEMENT_FIRE = new DamageElement(\"Fire\", colorA(255, 0, 0, 255))\n DAMAGE_ELEMENT_WATER = new DamageElement(\"Water\", colorA(0, 0, 255, 255))\n\n DamageElement can be extended to carry additional per-element settings.", "deprecated": { "flag": false, "message": null @@ -117192,7 +117624,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 97 + "line": 100 }, { "kind": "class", @@ -117208,7 +117640,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 169 + "line": 172 }, { "kind": "class", @@ -117224,7 +117656,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 431 + "line": 520 }, { "kind": "function", @@ -117240,7 +117672,7 @@ "configurable": true, "members": [], "enumMembers": [], - "line": 445 + "line": 536 }, { "kind": "function", @@ -117256,7 +117688,7 @@ "configurable": true, "members": [], "enumMembers": [], - "line": 457 + "line": 548 } ] }, @@ -117463,7 +117895,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 52 + "line": 63 }, { "kind": "extension-function", @@ -117479,7 +117911,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 56 + "line": 66 }, { "kind": "extension-function", @@ -117495,7 +117927,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 60 + "line": 69 }, { "kind": "class", @@ -117524,7 +117956,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 70 + "line": 78 }, { "kind": "function", @@ -117540,7 +117972,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 73 + "line": 81 }, { "kind": "function", @@ -117556,7 +117988,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 77 + "line": 85 }, { "kind": "function", @@ -117572,7 +118004,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 82 + "line": 89 }, { "kind": "function", @@ -117588,7 +118020,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 87 + "line": 93 }, { "kind": "function", @@ -117604,7 +118036,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 91 + "line": 96 }, { "kind": "function", @@ -117620,7 +118052,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 94 + "line": 99 }, { "kind": "function", @@ -117636,7 +118068,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 97 + "line": 102 }, { "kind": "function", @@ -117652,7 +118084,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 100 + "line": 105 }, { "kind": "function", @@ -117668,7 +118100,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 103 + "line": 108 }, { "kind": "function", @@ -117684,7 +118116,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 106 + "line": 111 }, { "kind": "function", @@ -117700,7 +118132,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 109 + "line": 114 }, { "kind": "function", @@ -117716,7 +118148,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 112 + "line": 117 }, { "kind": "function", @@ -117732,7 +118164,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 115 + "line": 120 }, { "kind": "function", @@ -117748,7 +118180,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 118 + "line": 123 }, { "kind": "function", @@ -117764,7 +118196,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 121 + "line": 126 }, { "kind": "function", @@ -117780,7 +118212,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 124 + "line": 129 }, { "kind": "function", @@ -117796,7 +118228,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 131 + "line": 136 }, { "kind": "function", @@ -117812,7 +118244,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 135 + "line": 140 }, { "kind": "function", @@ -117828,7 +118260,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 139 + "line": 144 }, { "kind": "function", @@ -117844,7 +118276,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 142 + "line": 147 }, { "kind": "function", @@ -117860,7 +118292,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 145 + "line": 150 }, { "kind": "function", @@ -117876,7 +118308,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 148 + "line": 153 }, { "kind": "function", @@ -117892,7 +118324,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 151 + "line": 156 }, { "kind": "function", @@ -117908,7 +118340,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 154 + "line": 159 }, { "kind": "function", @@ -117924,7 +118356,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 158 + "line": 163 }, { "kind": "function", @@ -117940,7 +118372,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 162 + "line": 167 }, { "kind": "function", @@ -117956,7 +118388,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 165 + "line": 170 }, { "kind": "function", @@ -117972,7 +118404,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 168 + "line": 173 }, { "kind": "function", @@ -117988,7 +118420,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 171 + "line": 176 }, { "kind": "function", @@ -118004,7 +118436,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 174 + "line": 179 }, { "kind": "function", @@ -118020,7 +118452,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 186 + "line": 191 }, { "kind": "function", @@ -118036,7 +118468,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 189 + "line": 194 }, { "kind": "function", @@ -118052,7 +118484,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 192 + "line": 197 }, { "kind": "function", @@ -118068,7 +118500,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 195 + "line": 200 }, { "kind": "function", @@ -118084,7 +118516,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 198 + "line": 203 }, { "kind": "function", @@ -118100,7 +118532,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 201 + "line": 206 }, { "kind": "function", @@ -118116,7 +118548,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 204 + "line": 209 }, { "kind": "function", @@ -118132,7 +118564,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 207 + "line": 212 }, { "kind": "function", @@ -118148,7 +118580,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 210 + "line": 215 }, { "kind": "function", @@ -118164,7 +118596,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 213 + "line": 218 }, { "kind": "function", @@ -118180,7 +118612,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 216 + "line": 221 }, { "kind": "function", @@ -118196,7 +118628,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 219 + "line": 224 }, { "kind": "function", @@ -118212,7 +118644,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 222 + "line": 227 }, { "kind": "function", @@ -118228,7 +118660,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 225 + "line": 230 }, { "kind": "function", @@ -118244,7 +118676,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 229 + "line": 234 }, { "kind": "function", @@ -118260,7 +118692,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 233 + "line": 238 }, { "kind": "function", @@ -118276,7 +118708,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 236 + "line": 241 }, { "kind": "function", @@ -118292,7 +118724,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 239 + "line": 244 }, { "kind": "function", @@ -118308,7 +118740,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 242 + "line": 247 }, { "kind": "function", @@ -118324,7 +118756,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 245 + "line": 250 }, { "kind": "function", @@ -118340,7 +118772,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 249 + "line": 254 }, { "kind": "function", @@ -118356,7 +118788,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 253 + "line": 258 }, { "kind": "function", @@ -118372,7 +118804,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 256 + "line": 261 }, { "kind": "function", @@ -118388,7 +118820,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 259 + "line": 264 }, { "kind": "function", @@ -118404,7 +118836,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 262 + "line": 267 }, { "kind": "function", @@ -118420,7 +118852,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 265 + "line": 270 }, { "kind": "function", @@ -118436,7 +118868,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 268 + "line": 273 }, { "kind": "function", @@ -118452,7 +118884,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 271 + "line": 276 }, { "kind": "function", @@ -118468,7 +118900,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 274 + "line": 279 }, { "kind": "function", @@ -118484,7 +118916,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 277 + "line": 282 }, { "kind": "function", @@ -118500,7 +118932,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 280 + "line": 285 }, { "kind": "function", @@ -118516,7 +118948,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 283 + "line": 288 }, { "kind": "function", @@ -118532,7 +118964,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 286 + "line": 291 }, { "kind": "function", @@ -118548,7 +118980,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 291 + "line": 296 }, { "kind": "function", @@ -118564,7 +118996,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 296 + "line": 301 }, { "kind": "function", @@ -118580,7 +119012,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 299 + "line": 304 }, { "kind": "function", @@ -118596,7 +119028,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 302 + "line": 307 }, { "kind": "function", @@ -118612,7 +119044,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 305 + "line": 310 }, { "kind": "function", @@ -118628,7 +119060,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 308 + "line": 313 }, { "kind": "function", @@ -118644,7 +119076,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 311 + "line": 316 }, { "kind": "function", @@ -118660,7 +119092,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 314 + "line": 319 }, { "kind": "function", @@ -118676,7 +119108,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 317 + "line": 322 }, { "kind": "function", @@ -118692,7 +119124,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 320 + "line": 325 }, { "kind": "function", @@ -118708,7 +119140,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 323 + "line": 328 }, { "kind": "function", @@ -118724,7 +119156,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 326 + "line": 331 }, { "kind": "function", @@ -118740,7 +119172,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 329 + "line": 334 }, { "kind": "function", @@ -118756,7 +119188,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 332 + "line": 337 }, { "kind": "function", @@ -118772,7 +119204,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 335 + "line": 340 }, { "kind": "function", @@ -118788,7 +119220,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 338 + "line": 343 }, { "kind": "function", @@ -118804,7 +119236,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 341 + "line": 346 }, { "kind": "function", @@ -118820,7 +119252,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 344 + "line": 349 }, { "kind": "function", @@ -118836,7 +119268,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 347 + "line": 352 }, { "kind": "function", @@ -118852,7 +119284,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 350 + "line": 355 }, { "kind": "function", @@ -118868,7 +119300,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 353 + "line": 358 }, { "kind": "function", @@ -118884,7 +119316,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 356 + "line": 361 }, { "kind": "function", @@ -118900,7 +119332,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 359 + "line": 364 }, { "kind": "function", @@ -118916,7 +119348,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 362 + "line": 367 }, { "kind": "function", @@ -118932,7 +119364,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 365 + "line": 370 }, { "kind": "function", @@ -118948,7 +119380,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 368 + "line": 373 }, { "kind": "function", @@ -118964,7 +119396,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 371 + "line": 376 }, { "kind": "function", @@ -118980,7 +119412,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 374 + "line": 379 }, { "kind": "function", @@ -118996,7 +119428,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 377 + "line": 382 }, { "kind": "function", @@ -119012,7 +119444,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 380 + "line": 385 }, { "kind": "function", @@ -119028,7 +119460,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 383 + "line": 388 }, { "kind": "function", @@ -119044,7 +119476,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 387 + "line": 392 }, { "kind": "function", @@ -119060,7 +119492,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 391 + "line": 396 }, { "kind": "function", @@ -119076,7 +119508,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 395 + "line": 400 }, { "kind": "function", @@ -119092,7 +119524,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 399 + "line": 404 }, { "kind": "function", @@ -119108,11 +119540,11 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 403 + "line": 408 } ], "enumMembers": [], - "line": 67 + "line": 75 } ] }, @@ -119888,7 +120320,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 20 + "line": 19 }, { "kind": "constant", @@ -119904,7 +120336,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 29 + "line": 28 }, { "kind": "constant", @@ -119920,7 +120352,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 31 + "line": 30 }, { "kind": "class", @@ -119949,7 +120381,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 41 + "line": 40 }, { "kind": "function", @@ -119965,7 +120397,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 48 + "line": 47 }, { "kind": "function", @@ -119981,11 +120413,11 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 64 + "line": 63 } ], "enumMembers": [], - "line": 38 + "line": 37 } ] }, @@ -120900,7 +121332,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 6 + "line": 5 }, { "kind": "constant", @@ -120916,7 +121348,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 8 + "line": 7 }, { "kind": "tuple", @@ -120932,7 +121364,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 12 + "line": 11 }, { "kind": "extension-function", @@ -120948,7 +121380,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 15 + "line": 14 }, { "kind": "extension-function", @@ -120964,7 +121396,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 19 + "line": 18 }, { "kind": "extension-function", @@ -120980,7 +121412,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 23 + "line": 22 }, { "kind": "extension-function", @@ -120996,7 +121428,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 27 + "line": 26 }, { "kind": "extension-function", @@ -121004,7 +121436,7 @@ "typeParams": "", "receiver": "real", "signature": "public function real.fromRad() returns angle", - "doc": "interpret this real as an angle given in degrees", + "doc": "interpret this real as an angle given in radians", "deprecated": { "flag": false, "message": null @@ -121012,7 +121444,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 31 + "line": 30 }, { "kind": "extension-function", @@ -121020,7 +121452,7 @@ "typeParams": "", "receiver": "int", "signature": "public function int.fromRad() returns angle", - "doc": "interpret this int as an angle given in degrees", + "doc": "interpret this int as an angle given in radians", "deprecated": { "flag": false, "message": null @@ -121028,7 +121460,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 35 + "line": 34 }, { "kind": "extension-function", @@ -121044,7 +121476,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 39 + "line": 38 }, { "kind": "extension-function", @@ -121060,7 +121492,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 43 + "line": 42 }, { "kind": "extension-function", @@ -121076,7 +121508,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 47 + "line": 46 }, { "kind": "extension-function", @@ -121092,7 +121524,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 51 + "line": 50 }, { "kind": "extension-function", @@ -121108,7 +121540,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 55 + "line": 54 }, { "kind": "extension-function", @@ -121124,7 +121556,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 59 + "line": 58 }, { "kind": "extension-function", @@ -121140,7 +121572,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 63 + "line": 62 }, { "kind": "extension-function", @@ -121156,7 +121588,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 67 + "line": 66 }, { "kind": "extension-function", @@ -121172,7 +121604,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 71 + "line": 70 }, { "kind": "extension-function", @@ -121188,7 +121620,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 75 + "line": 74 } ] }, @@ -121628,7 +122060,7 @@ "typeParams": "", "receiver": "int", "signature": "public function int.toBitString() returns string", - "doc": "Produces a bistring from this integer.\n*", + "doc": "Produces a bitstring from this integer. Zero yields \"0\", and negative\nvalues yield their full 32 bit two's complement representation.\n*", "deprecated": { "flag": false, "message": null @@ -121636,7 +122068,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 114 + "line": 115 }, { "kind": "extension-function", @@ -121652,7 +122084,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 206 + "line": 210 }, { "kind": "extension-function", @@ -121668,7 +122100,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 214 + "line": 218 }, { "kind": "extension-function", @@ -121684,7 +122116,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 223 + "line": 227 }, { "kind": "extension-function", @@ -121700,7 +122132,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 231 + "line": 235 }, { "kind": "extension-function", @@ -121716,7 +122148,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 240 + "line": 244 }, { "kind": "extension-function", @@ -121732,7 +122164,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 248 + "line": 252 }, { "kind": "extension-function", @@ -121748,7 +122180,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 257 + "line": 261 }, { "kind": "extension-function", @@ -121764,7 +122196,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 265 + "line": 269 }, { "kind": "extension-function", @@ -121772,7 +122204,7 @@ "typeParams": "", "receiver": "int", "signature": "public function int.shiftl(int amount) returns int", - "doc": "32-bit SHIFTL (<<)\n\nnumber.shiftl(amount) equivalent to (number << amount)\n*", + "doc": "32-bit SHIFTL (<<)\n\nnumber.shiftl(amount) equivalent to (number << amount)\nBits shifted past bit 31 are discarded, so a shift of 32 yields 0.\n`amount` must be in [0, 32]; other values read outside the shift table.\n*", "deprecated": { "flag": false, "message": null @@ -121780,7 +122212,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 273 + "line": 279 }, { "kind": "extension-function", @@ -121788,7 +122220,7 @@ "typeParams": "", "receiver": "int", "signature": "public function int.shiftr(int amount) returns int", - "doc": "32-bit SHIFTR (>>)\n\nnumber.shiftr(amount) equivalent to (number >> amount)\n*", + "doc": "32-bit logical SHIFTR (>>>)\n\nnumber.shiftr(amount) equivalent to (number >>> amount): the sign bit is\nshifted in as data rather than replicated, so negative inputs produce a\npositive result for any amount > 0.\n\n`amount` must be in [0, 31] - one less than shiftl accepts. The shift table\nholds 2^32 as 0 after wrapping, so an amount of 32 divides by zero rather\nthan returning 0. Guard the call if the amount is computed.\n*", "deprecated": { "flag": false, "message": null @@ -121796,7 +122228,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 281 + "line": 293 } ] }, @@ -121938,7 +122370,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 8 + "line": 7 }, { "kind": "function", @@ -121954,7 +122386,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 16 + "line": 15 }, { "kind": "extension-function", @@ -121970,7 +122402,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 19 + "line": 18 }, { "kind": "extension-function", @@ -121986,7 +122418,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 22 + "line": 21 }, { "kind": "extension-function", @@ -122002,7 +122434,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 25 + "line": 24 }, { "kind": "extension-function", @@ -122018,7 +122450,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 28 + "line": 27 }, { "kind": "extension-function", @@ -122034,7 +122466,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 31 + "line": 30 }, { "kind": "extension-function", @@ -122050,7 +122482,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 34 + "line": 33 }, { "kind": "function", @@ -122066,7 +122498,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 42 + "line": 41 }, { "kind": "function", @@ -122082,7 +122514,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 49 + "line": 48 }, { "kind": "extension-function", @@ -122098,7 +122530,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 52 + "line": 51 }, { "kind": "extension-function", @@ -122114,7 +122546,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 55 + "line": 54 }, { "kind": "function", @@ -122130,7 +122562,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 63 + "line": 62 }, { "kind": "function", @@ -122146,7 +122578,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 71 + "line": 70 }, { "kind": "extension-function", @@ -122162,7 +122594,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 74 + "line": 73 }, { "kind": "extension-function", @@ -122178,7 +122610,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 77 + "line": 76 }, { "kind": "function", @@ -122186,7 +122618,7 @@ "typeParams": "", "receiver": null, "signature": "public function hermite(real start, real stop, real tangent1, real tangent2, real s) returns real", - "doc": "Hermite Interpolation", + "doc": "Cubic Hermite interpolation between `start` and `stop` for s in [0, 1],\n\twith `tangent1` and `tangent2` as the derivatives at s = 0 and s = 1.\n\tThe basis is h00 = 2s^3-3s^2+1, h10 = s^3-2s^2+s, h01 = -2s^3+3s^2, h11 = s^3-s^2.", "deprecated": { "flag": false, "message": null @@ -122194,7 +122626,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 84 + "line": 85 }, { "kind": "function", @@ -122210,7 +122642,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 103 + "line": 104 }, { "kind": "function", @@ -122226,7 +122658,118 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 107 + "line": 108 + } + ] + }, + { + "package": "LineGeometry", + "category": "math", + "categoryLabel": "Math", + "sourcePath": "wurst/math/LineGeometry.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/math/LineGeometry.wurst", + "summary": "", + "summaryFirstLine": "", + "tags": [ + "math" + ], + "imports": [], + "entities": [ + { + "kind": "tuple", + "name": "lineFormular", + "typeParams": "", + "receiver": null, + "signature": "public tuple lineFormular(real m, real b)", + "doc": "Line formula tuple representing y = m*x + b where m is slope and b is y-intercept", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 6 + }, + { + "kind": "extension-function", + "name": "getYOnLine", + "typeParams": "", + "receiver": "real", + "signature": "public function real.getYOnLine(lineFormular line) returns real", + "doc": "Returns f(x) = m*x + b for a given x value on a line", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 9 + }, + { + "kind": "extension-function", + "name": "getXOnLine", + "typeParams": "", + "receiver": "real", + "signature": "public function real.getXOnLine(lineFormular line) returns real", + "doc": "Returns the x value for a given y on a line: x = (y - b) / m", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 13 + }, + { + "kind": "extension-function", + "name": "getLineFormular", + "typeParams": "", + "receiver": "vec2", + "signature": "public function vec2.getLineFormular(vec2 p) returns lineFormular", + "doc": "Returns the line formula for the line passing through this point and p.\n\tWARNING: Undefined behavior for vertical lines (p.x == this.x causes division by zero).", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 18 + }, + { + "kind": "extension-function", + "name": "getParallelLineWithOrthogonalDistance", + "typeParams": "", + "receiver": "lineFormular", + "signature": "public function lineFormular.getParallelLineWithOrthogonalDistance(real d) returns lineFormular", + "doc": "Returns a parallel line with orthogonal distance d from the original line", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 22 + }, + { + "kind": "extension-function", + "name": "getOrthogonalSidePoint", + "typeParams": "", + "receiver": "vec2", + "signature": "public function vec2.getOrthogonalSidePoint(lineFormular line, real d) returns vec2", + "doc": "Returns a point on the side of a line at orthogonal distance d", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 26 } ] }, @@ -122259,7 +122802,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 9 + "line": 8 }, { "kind": "constant", @@ -122275,14 +122818,14 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 11 + "line": 10 }, { "kind": "constant", "name": "PI2", "typeParams": "", "receiver": null, - "signature": "public constant real PI2 = 6.28318", + "signature": "public constant real PI2 = 6.283185307", "doc": "PI * 2 constant", "deprecated": { "flag": false, @@ -122291,7 +122834,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 13 + "line": 12 }, { "kind": "constant", @@ -122307,7 +122850,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 15 + "line": 14 }, { "kind": "function", @@ -122323,7 +122866,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 21 + "line": 20 }, { "kind": "function", @@ -122339,7 +122882,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 33 + "line": 32 }, { "kind": "extension-function", @@ -122355,7 +122898,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 36 + "line": 35 }, { "kind": "function", @@ -122371,7 +122914,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 41 + "line": 40 }, { "kind": "function", @@ -122387,7 +122930,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 49 + "line": 48 }, { "kind": "function", @@ -122403,7 +122946,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 57 + "line": 56 }, { "kind": "function", @@ -122419,7 +122962,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 65 + "line": 64 } ] }, @@ -123416,6 +123959,525 @@ } ] }, + { + "package": "PathingGrid", + "category": "math", + "categoryLabel": "Math", + "sourcePath": "wurst/math/PathingGrid.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/math/PathingGrid.wurst", + "summary": "", + "summaryFirstLine": "", + "tags": [ + "math" + ], + "imports": [], + "entities": [ + { + "kind": "constant", + "name": "PATHING_CELL_SIZE", + "typeParams": "", + "receiver": null, + "signature": "public constant real PATHING_CELL_SIZE = 32.", + "doc": "Warcraft III pathing cells are 32 world units wide and high.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 6 + }, + { + "kind": "tuple", + "name": "pathingCell", + "typeParams": "", + "receiver": null, + "signature": "public tuple pathingCell(int x, int y)", + "doc": "Global pathing-grid coordinates. Cell bounds are inclusive at min and exclusive at max.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 9 + }, + { + "kind": "extension-function", + "name": "toPathingCell", + "typeParams": "", + "receiver": "vec2", + "signature": "public function vec2.toPathingCell() returns pathingCell", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 11 + }, + { + "kind": "extension-function", + "name": "toPathingCell", + "typeParams": "", + "receiver": "vec3", + "signature": "public function vec3.toPathingCell() returns pathingCell", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 14 + }, + { + "kind": "extension-function", + "name": "min", + "typeParams": "", + "receiver": "pathingCell", + "signature": "public function pathingCell.min() returns vec2", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 17 + }, + { + "kind": "extension-function", + "name": "max", + "typeParams": "", + "receiver": "pathingCell", + "signature": "public function pathingCell.max() returns vec2", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 20 + }, + { + "kind": "extension-function", + "name": "center", + "typeParams": "", + "receiver": "pathingCell", + "signature": "public function pathingCell.center() returns vec2", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 23 + } + ] + }, + { + "package": "Polygon", + "category": "math", + "categoryLabel": "Math", + "sourcePath": "wurst/math/Polygon.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/math/Polygon.wurst", + "summary": "An immutable closed 2D path after seal(). Polygon owns its copied vertex\nstorage and cached bounds rect. Call destroy when finished: it releases both,\nand invalidates every rect previously borrowed from bounds().", + "summaryFirstLine": "An immutable closed 2D path after seal(). Polygon owns its copied vertex", + "tags": [ + "math" + ], + "imports": [], + "entities": [ + { + "kind": "enum", + "name": "PolygonPointRelation", + "typeParams": "", + "receiver": null, + "signature": "public enum PolygonPointRelation", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [ + "OUTSIDE", + "BOUNDARY", + "INSIDE" + ], + "line": 14 + }, + { + "kind": "enum", + "name": "PolygonCellCoverage", + "typeParams": "", + "receiver": null, + "signature": "public enum PolygonCellCoverage", + "doc": "Coverage of one cached pathing-grid cell, not the relation of one point.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [ + "OUTSIDE", + "MIXED", + "INSIDE" + ], + "line": 20 + }, + { + "kind": "class", + "name": "Polygon", + "typeParams": "", + "receiver": null, + "signature": "public class Polygon", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [ + { + "kind": "function", + "name": "construct", + "typeParams": "", + "receiver": null, + "signature": "construct(int expectedVertexCount)", + "doc": "Builder form. expectedVertexCount is a capacity hint. Call seal() before querying.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 44 + }, + { + "kind": "function", + "name": "construct", + "typeParams": "", + "receiver": null, + "signature": "construct(vararg vec2 initialVertices)", + "doc": "Convenience form. Copies the supplied vertices and seals immediately.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 48 + }, + { + "kind": "function", + "name": "addVertex", + "typeParams": "", + "receiver": null, + "signature": "function addVertex(vec2 vertex) returns thistype", + "doc": "Appends a copied vertex before seal(). Adding after seal() is a programmer error.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 55 + }, + { + "kind": "function", + "name": "seal", + "typeParams": "", + "receiver": null, + "signature": "function seal() returns thistype", + "doc": "Finalizes immutable query state and creates Polygon's owned bounds rect.\nRepeated calls preserve the same rect handle. Polygon removes that rect\nwhen it is destroyed; callers must not remove its borrowed bounds().", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 67 + }, + { + "kind": "function", + "name": "isSealed", + "typeParams": "", + "receiver": null, + "signature": "function isSealed() returns bool", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 95 + }, + { + "kind": "function", + "name": "vertexCount", + "typeParams": "", + "receiver": null, + "signature": "function vertexCount() returns int", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 98 + }, + { + "kind": "function", + "name": "vertexAt", + "typeParams": "", + "receiver": null, + "signature": "function vertexAt(int index) returns vec2", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 103 + }, + { + "kind": "function", + "name": "bounds", + "typeParams": "", + "receiver": null, + "signature": "function bounds() returns rect", + "doc": "Returns Polygon's borrowed cached rect. Polygon retains ownership: callers\nmust not remove or destroy it, and must not use it after Polygon is\ndestroyed.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 116 + }, + { + "kind": "function", + "name": "boundsCenter", + "typeParams": "", + "receiver": null, + "signature": "function boundsCenter() returns vec2", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 121 + }, + { + "kind": "function", + "name": "classifyLinear", + "typeParams": "", + "receiver": null, + "signature": "function classifyLinear(vec2 point) returns PolygonPointRelation", + "doc": "Exact division-free O(n) reference implementation and grid fallback.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 133 + }, + { + "kind": "function", + "name": "cellCoverage", + "typeParams": "", + "receiver": null, + "signature": "function cellCoverage(vec2 point) returns PolygonCellCoverage", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 304 + }, + { + "kind": "function", + "name": "cellCoverage", + "typeParams": "", + "receiver": null, + "signature": "function cellCoverage(vec3 point) returns PolygonCellCoverage", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 317 + }, + { + "kind": "function", + "name": "cellCandidateEdgeCount", + "typeParams": "", + "receiver": null, + "signature": "function cellCandidateEdgeCount(vec2 point) returns int", + "doc": "Number of exact edge candidates classify() examines for this point.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 321 + }, + { + "kind": "function", + "name": "classify", + "typeParams": "", + "receiver": null, + "signature": "function classify(vec2 point) returns PolygonPointRelation", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 329 + }, + { + "kind": "function", + "name": "contains", + "typeParams": "", + "receiver": null, + "signature": "function contains(vec2 point) returns bool", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 348 + }, + { + "kind": "function", + "name": "containsStrict", + "typeParams": "", + "receiver": null, + "signature": "function containsStrict(vec2 point) returns bool", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 351 + }, + { + "kind": "function", + "name": "debugRender", + "typeParams": "", + "receiver": null, + "signature": "function debugRender() returns ArrayList", + "doc": "Draws every edge in standard green. Ownership transfers to the caller:\ndestroy every returned lightning handle, then destroy the returned list.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 358 + }, + { + "kind": "function", + "name": "debugRender", + "typeParams": "", + "receiver": null, + "signature": "function debugRender(color col) returns ArrayList", + "doc": "Draws every edge in the requested color. Ownership transfers to the caller:\ndestroy every returned lightning handle, then destroy the returned list.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 365 + }, + { + "kind": "function", + "name": "debugRenderTimed", + "typeParams": "", + "receiver": null, + "signature": "function debugRenderTimed(real duration)", + "doc": "Draws in standard green. Polygon retains ownership of all created lightning\nhandles and its internal list, and destroys both after duration. duration\nmust be positive.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 385 + }, + { + "kind": "function", + "name": "debugRenderTimed", + "typeParams": "", + "receiver": null, + "signature": "function debugRenderTimed(real duration, color col)", + "doc": "Draws in the requested color. Polygon retains ownership of all created\nlightning handles and its internal list, and destroys both after duration.\nduration must be positive.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 393 + } + ], + "enumMembers": [], + "line": 30 + } + ] + }, { "package": "Quaternion", "category": "math", @@ -123893,7 +124955,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 177 + "line": 182 }, { "kind": "extension-function", @@ -123909,7 +124971,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 184 + "line": 189 }, { "kind": "extension-function", @@ -123925,7 +124987,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 187 + "line": 192 }, { "kind": "extension-function", @@ -123941,7 +125003,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 192 + "line": 197 }, { "kind": "extension-function", @@ -123957,7 +125019,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 197 + "line": 202 }, { "kind": "extension-function", @@ -123973,7 +125035,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 227 + "line": 232 }, { "kind": "extension-function", @@ -123989,7 +125051,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 233 + "line": 238 }, { "kind": "extension-function", @@ -124005,7 +125067,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 237 + "line": 242 }, { "kind": "extension-function", @@ -124021,7 +125083,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 243 + "line": 248 }, { "kind": "extension-function", @@ -124037,7 +125099,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 261 + "line": 266 } ] }, @@ -124068,7 +125130,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 46 + "line": 45 }, { "kind": "tuple", @@ -124084,7 +125146,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 51 + "line": 50 }, { "kind": "tuple", @@ -124100,7 +125162,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 57 + "line": 56 }, { "kind": "tuple", @@ -124116,7 +125178,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 61 + "line": 60 }, { "kind": "tuple", @@ -124132,7 +125194,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 68 + "line": 67 }, { "kind": "tuple", @@ -124148,7 +125210,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 72 + "line": 71 }, { "kind": "extension-function", @@ -124164,7 +125226,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 81 + "line": 80 }, { "kind": "extension-function", @@ -124180,7 +125242,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 99 + "line": 98 }, { "kind": "extension-function", @@ -124196,7 +125258,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 118 + "line": 117 }, { "kind": "extension-function", @@ -124212,7 +125274,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 136 + "line": 135 }, { "kind": "extension-function", @@ -124228,7 +125290,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 156 + "line": 155 }, { "kind": "extension-function", @@ -124244,7 +125306,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 192 + "line": 191 }, { "kind": "extension-function", @@ -124260,7 +125322,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 212 + "line": 211 }, { "kind": "extension-function", @@ -124276,7 +125338,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 233 + "line": 232 }, { "kind": "extension-function", @@ -124292,7 +125354,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 239 + "line": 238 }, { "kind": "extension-function", @@ -124308,7 +125370,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 275 + "line": 274 } ] }, @@ -124526,7 +125588,7 @@ "typeParams": "", "receiver": "vec2", "signature": "public function vec2.op_mult(vec2 v) returns vec2", - "doc": "dot product Operator", + "doc": "Operator, component-wise (Hadamard) product. For the dot product use vec2.dot", "deprecated": { "flag": false, "message": null @@ -124942,7 +126004,7 @@ "typeParams": "", "receiver": "vec2", "signature": "public function vec2.isInPolygon(vararg vec2 args) returns bool", - "doc": "Checks whether the point is in a polygon defined by a sequence of connected points.", + "doc": "", "deprecated": { "flag": false, "message": null @@ -124950,7 +126012,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 187 + "line": 188 }, { "kind": "tuple", @@ -124966,7 +126028,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 218 + "line": 219 }, { "kind": "extension-function", @@ -124982,7 +126044,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 222 + "line": 223 }, { "kind": "extension-function", @@ -124998,7 +126060,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 226 + "line": 227 }, { "kind": "extension-function", @@ -125014,7 +126076,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 230 + "line": 231 }, { "kind": "extension-function", @@ -125030,7 +126092,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 234 + "line": 235 }, { "kind": "extension-function", @@ -125046,7 +126108,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 238 + "line": 239 }, { "kind": "extension-function", @@ -125054,7 +126116,7 @@ "typeParams": "", "receiver": "real", "signature": "public function real.op_mult(vec3 v) returns vec3", - "doc": "dot Operator", + "doc": "Operator, scales the vector by this scalar", "deprecated": { "flag": false, "message": null @@ -125062,7 +126124,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 242 + "line": 243 }, { "kind": "extension-function", @@ -125078,7 +126140,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 246 + "line": 247 }, { "kind": "extension-function", @@ -125094,7 +126156,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 250 + "line": 251 }, { "kind": "extension-function", @@ -125110,7 +126172,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 254 + "line": 255 }, { "kind": "extension-function", @@ -125126,7 +126188,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 266 + "line": 267 }, { "kind": "extension-function", @@ -125134,7 +126196,7 @@ "typeParams": "", "receiver": "vec3", "signature": "public function vec3.setLengthSq(real lengthSq) returns vec3", - "doc": "Sets the length of the given Vector", + "doc": "Returns this vector rescaled so that its *squared* length equals the given\n\tvalue. Scaling by lengthSq/currentSq would give a squared length of\n\tlengthSq^2/currentSq, so the factor has to be the square root of the ratio.", "deprecated": { "flag": false, "message": null @@ -125142,7 +126204,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 288 + "line": 291 }, { "kind": "extension-function", @@ -125158,7 +126220,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 297 + "line": 302 }, { "kind": "extension-function", @@ -125174,7 +126236,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 306 + "line": 311 }, { "kind": "extension-function", @@ -125190,7 +126252,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 310 + "line": 315 }, { "kind": "extension-function", @@ -125206,7 +126268,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 314 + "line": 319 }, { "kind": "extension-function", @@ -125222,7 +126284,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 318 + "line": 323 }, { "kind": "extension-function", @@ -125238,7 +126300,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 327 + "line": 332 }, { "kind": "extension-function", @@ -125246,7 +126308,7 @@ "typeParams": "", "receiver": "vec3", "signature": "public function vec3.inRange(vec3 v2, real radius) returns boolean", - "doc": "Is this vector inside the given circle", + "doc": "Is this vector inside the given circle. Only the x and y coordinates are\n\tcompared - the height difference is ignored. Use inRange3d for a spherical\n\ttest that includes z.", "deprecated": { "flag": false, "message": null @@ -125254,7 +126316,23 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 331 + "line": 338 + }, + { + "kind": "extension-function", + "name": "inRange3d", + "typeParams": "", + "receiver": "vec3", + "signature": "public function vec3.inRange3d(vec3 v2, real radius) returns boolean", + "doc": "Is this vector inside the given sphere, taking the z coordinate into\n\taccount. Compare vec3.inRange, which only compares x and y.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 343 }, { "kind": "extension-function", @@ -125270,7 +126348,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 335 + "line": 347 }, { "kind": "extension-function", @@ -125286,7 +126364,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 339 + "line": 351 }, { "kind": "extension-function", @@ -125302,7 +126380,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 343 + "line": 355 }, { "kind": "extension-function", @@ -125318,7 +126396,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 347 + "line": 359 }, { "kind": "extension-function", @@ -125334,7 +126412,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 351 + "line": 363 }, { "kind": "extension-function", @@ -125350,7 +126428,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 355 + "line": 367 }, { "kind": "extension-function", @@ -125366,7 +126444,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 359 + "line": 371 }, { "kind": "extension-function", @@ -125382,7 +126460,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 363 + "line": 375 }, { "kind": "extension-function", @@ -125398,7 +126476,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 367 + "line": 379 }, { "kind": "extension-function", @@ -125414,7 +126492,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 370 + "line": 382 }, { "kind": "extension-function", @@ -125430,7 +126508,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 374 + "line": 386 }, { "kind": "extension-function", @@ -125446,7 +126524,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 382 + "line": 394 }, { "kind": "extension-function", @@ -125462,7 +126540,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 395 + "line": 407 }, { "kind": "extension-function", @@ -125478,7 +126556,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 399 + "line": 411 }, { "kind": "extension-function", @@ -125494,7 +126572,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 403 + "line": 415 }, { "kind": "extension-function", @@ -125510,7 +126588,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 407 + "line": 419 }, { "kind": "extension-function", @@ -125526,7 +126604,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 411 + "line": 423 }, { "kind": "extension-function", @@ -125542,7 +126620,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 414 + "line": 426 }, { "kind": "extension-function", @@ -125558,7 +126636,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 420 + "line": 432 }, { "kind": "extension-function", @@ -125574,7 +126652,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 428 + "line": 440 }, { "kind": "extension-function", @@ -125582,7 +126660,7 @@ "typeParams": "", "receiver": "vec3", "signature": "public function vec3.isInPolygon2d(vararg vec3 args) returns bool", - "doc": "Checks whether the point is in a 2d polygon defined by a sequence of connected points.\nWorks as for vec2.isInPolygon, Z-coords are discarded.", + "doc": "", "deprecated": { "flag": false, "message": null @@ -125590,7 +126668,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 433 + "line": 446 } ] }, @@ -125653,7 +126731,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 77 + "line": 80 }, { "kind": "class", @@ -125669,7 +126747,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 184 + "line": 187 }, { "kind": "extension-function", @@ -125685,7 +126763,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 264 + "line": 267 }, { "kind": "extension-function", @@ -125701,7 +126779,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 268 + "line": 271 }, { "kind": "extension-function", @@ -125717,7 +126795,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 272 + "line": 275 } ] }, @@ -125761,7 +126839,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 41 + "line": 43 }, { "kind": "function", @@ -125777,7 +126855,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 51 + "line": 53 }, { "kind": "function", @@ -125793,7 +126871,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 58 + "line": 60 }, { "kind": "function", @@ -125809,7 +126887,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 62 + "line": 64 }, { "kind": "function", @@ -125825,7 +126903,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 66 + "line": 68 }, { "kind": "function", @@ -125833,7 +126911,7 @@ "typeParams": "", "receiver": null, "signature": "function hasByte() returns bool", - "doc": "", + "doc": "Returns whether at least one unread byte remains.\n\t\tCompares against the total byte count rather than the internal int index,\n\t\tso a buffer whose size is an exact multiple of 4 does not report a\n\t\tphantom trailing byte from the empty write buffer.", "deprecated": { "flag": false, "message": null @@ -125841,7 +126919,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 70 + "line": 76 }, { "kind": "function", @@ -125849,7 +126927,7 @@ "typeParams": "", "receiver": null, "signature": "function readByte() returns int", - "doc": "Reads a single unsigned byte from this buffer. The returned value will be in the range [0, 255]. *", + "doc": "Reads a single unsigned byte from this buffer. The returned value will be in the range [0, 255].\n\t\tReading past the end yields 0; guard with hasByte(). *", "deprecated": { "flag": false, "message": null @@ -125857,7 +126935,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 74 + "line": 81 }, { "kind": "function", @@ -125873,7 +126951,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 84 + "line": 92 }, { "kind": "function", @@ -125889,7 +126967,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 88 + "line": 96 }, { "kind": "function", @@ -125905,7 +126983,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 91 + "line": 99 }, { "kind": "function", @@ -125921,7 +126999,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 95 + "line": 104 }, { "kind": "function", @@ -125929,7 +127007,7 @@ "typeParams": "", "receiver": null, "signature": "function getIntCount() returns int", - "doc": "", + "doc": "Number of ints backing this buffer, counting the partially filled write\n\t\tbuffer as one. An empty buffer therefore reports 1, not 0.", "deprecated": { "flag": false, "message": null @@ -125937,7 +127015,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 100 + "line": 111 }, { "kind": "function", @@ -125953,7 +127031,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 104 + "line": 115 }, { "kind": "function", @@ -125969,7 +127047,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 107 + "line": 118 }, { "kind": "function", @@ -125985,11 +127063,11 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 118 + "line": 129 } ], "enumMembers": [], - "line": 13 + "line": 14 } ] }, @@ -126262,7 +127340,7 @@ "configurable": true, "members": [], "enumMembers": [], - "line": 18 + "line": 35 }, { "kind": "constant", @@ -126278,7 +127356,7 @@ "configurable": true, "members": [], "enumMembers": [], - "line": 19 + "line": 36 }, { "kind": "constant", @@ -126294,7 +127372,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 23 + "line": 40 }, { "kind": "class", @@ -126323,7 +127401,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 28 + "line": 45 }, { "kind": "function", @@ -126339,7 +127417,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 31 + "line": 48 }, { "kind": "function", @@ -126355,7 +127433,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 37 + "line": 54 }, { "kind": "function", @@ -126371,7 +127449,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 46 + "line": 63 }, { "kind": "function", @@ -126379,7 +127457,7 @@ "typeParams": "", "receiver": null, "signature": "function read(player p) returns ChunkedString", - "doc": "", + "doc": "Reads the file's contents. Only the given player actually reads from\n\t\tdisk; every other client gets an empty ChunkedString, so the result is\n\t\tnot synchronised - see the desync warning at the top of this package.", "deprecated": { "flag": false, "message": null @@ -126387,7 +127465,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 49 + "line": 69 }, { "kind": "function", @@ -126395,7 +127473,7 @@ "typeParams": "", "receiver": null, "signature": "function readAsString(player p) returns string", - "doc": "", + "doc": "Reads the file's contents as one string. Not synchronised - see read().", "deprecated": { "flag": false, "message": null @@ -126403,11 +127481,11 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 55 + "line": 76 } ], "enumMembers": [], - "line": 25 + "line": 42 } ] }, @@ -126756,8 +127834,8 @@ "categoryLabel": "File & Network", "sourcePath": "wurst/file/SyncSimple.wurst", "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/file/SyncSimple.wurst", - "summary": "", - "summaryFirstLine": "", + "summary": "Generic sync listener for arbitrary types that can be cast to/from int.\n\tOnly works for values representable as an int (class instances, handle ids).\n\tThe synced object must already be in sync across all clients.", + "summaryFirstLine": "Generic sync listener for arbitrary types that can be cast to/from int.", "tags": [ "file" ], @@ -126976,6 +128054,39 @@ "enumMembers": [], "line": 37 }, + { + "kind": "interface", + "name": "AnySyncListener", + "typeParams": "", + "receiver": null, + "signature": "public interface AnySyncListener", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [ + { + "kind": "function", + "name": "onDataSynced", + "typeParams": "", + "receiver": null, + "signature": "function onDataSynced(T data)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 44 + } + ], + "enumMembers": [], + "line": 43 + }, { "kind": "extension-function", "name": "sync", @@ -126990,7 +128101,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 43 + "line": 49 }, { "kind": "extension-function", @@ -127006,7 +128117,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 49 + "line": 55 }, { "kind": "extension-function", @@ -127022,7 +128133,23 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 55 + "line": 61 + }, + { + "kind": "extension-function", + "name": "sync", + "typeParams": "", + "receiver": "player", + "signature": "public function player.sync(T data, AnySyncListener listener)", + "doc": "Syncs an arbitrary type from the given player.\n\tOnly works for values representable as an int handle/index (class instances, handle ids).\n\tThe synced object must already be in sync across clients. Listener is destroyed after firing.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 69 }, { "kind": "extension-function", @@ -127038,7 +128165,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 61 + "line": 76 }, { "kind": "extension-function", @@ -127054,7 +128181,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 68 + "line": 83 } ] }, @@ -127259,7 +128386,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 14 + "line": 13 }, { "kind": "constant", @@ -127275,7 +128402,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 17 + "line": 16 }, { "kind": "constant", @@ -127283,7 +128410,7 @@ "typeParams": "", "receiver": null, "signature": "public constant COLOR_BLACK = colorA(0,0,0,0)", - "doc": "", + "doc": "Black with alpha 0, i.e. fully transparent. COLOR_BLACK_STR therefore\n\trenders text invisible - use colorA(0, 0, 0, 255) for opaque black.", "deprecated": { "flag": false, "message": null @@ -127291,7 +128418,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 18 + "line": 19 }, { "kind": "constant", @@ -127307,7 +128434,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 19 + "line": 20 }, { "kind": "constant", @@ -127323,7 +128450,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 21 + "line": 22 }, { "kind": "constant", @@ -127339,7 +128466,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 22 + "line": 23 }, { "kind": "constant", @@ -127355,7 +128482,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 23 + "line": 24 }, { "kind": "constant", @@ -127371,7 +128498,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 25 + "line": 26 }, { "kind": "constant", @@ -127387,7 +128514,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 27 + "line": 28 }, { "kind": "constant", @@ -127403,7 +128530,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 29 + "line": 30 }, { "kind": "constant", @@ -127419,7 +128546,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 39 + "line": 40 }, { "kind": "extension-function", @@ -127435,7 +128562,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 48 + "line": 49 }, { "kind": "extension-function", @@ -127451,7 +128578,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 51 + "line": 52 }, { "kind": "extension-function", @@ -127467,7 +128594,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 55 + "line": 56 }, { "kind": "extension-function", @@ -127483,7 +128610,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 59 + "line": 60 }, { "kind": "tuple", @@ -127499,7 +128626,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 63 + "line": 64 }, { "kind": "tuple", @@ -127515,7 +128642,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 65 + "line": 66 }, { "kind": "tuple", @@ -127531,7 +128658,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 68 + "line": 69 }, { "kind": "extension-function", @@ -127547,7 +128674,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 71 + "line": 72 }, { "kind": "extension-function", @@ -127563,7 +128690,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 74 + "line": 75 }, { "kind": "extension-function", @@ -127579,7 +128706,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 78 + "line": 79 }, { "kind": "extension-function", @@ -127595,7 +128722,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 101 + "line": 102 }, { "kind": "function", @@ -127611,7 +128738,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 136 + "line": 137 }, { "kind": "extension-function", @@ -127627,7 +128754,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 143 + "line": 144 }, { "kind": "extension-function", @@ -127643,7 +128770,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 146 + "line": 147 }, { "kind": "function", @@ -127659,7 +128786,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 149 + "line": 150 }, { "kind": "extension-function", @@ -127675,7 +128802,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 178 + "line": 179 }, { "kind": "extension-function", @@ -127691,7 +128818,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 185 + "line": 186 }, { "kind": "extension-function", @@ -127707,7 +128834,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 189 + "line": 190 }, { "kind": "extension-function", @@ -127723,7 +128850,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 193 + "line": 194 }, { "kind": "extension-function", @@ -127739,7 +128866,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 197 + "line": 198 }, { "kind": "extension-function", @@ -127755,7 +128882,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 201 + "line": 202 }, { "kind": "extension-function", @@ -127771,7 +128898,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 205 + "line": 206 }, { "kind": "extension-function", @@ -127787,7 +128914,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 209 + "line": 210 }, { "kind": "function", @@ -127803,7 +128930,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 213 + "line": 214 }, { "kind": "function", @@ -127819,7 +128946,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 219 + "line": 220 }, { "kind": "extension-function", @@ -127835,7 +128962,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 229 + "line": 230 }, { "kind": "function", @@ -127851,7 +128978,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 238 + "line": 239 }, { "kind": "extension-function", @@ -127867,7 +128994,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 243 + "line": 244 }, { "kind": "extension-function", @@ -127883,7 +129010,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 252 + "line": 253 }, { "kind": "extension-function", @@ -127899,7 +129026,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 267 + "line": 261 }, { "kind": "extension-function", @@ -127915,7 +129042,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 270 + "line": 264 }, { "kind": "extension-function", @@ -127931,7 +129058,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 273 + "line": 267 } ] }, @@ -128235,7 +129362,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 15 + "line": 16 }, { "kind": "extension-function", @@ -128251,7 +129378,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 22 + "line": 24 } ] }, @@ -128261,8 +129388,8 @@ "categoryLabel": "Utilities", "sourcePath": "wurst/util/GameTimer.wurst", "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/GameTimer.wurst", - "summary": "", - "summaryFirstLine": "", + "summary": "Seconds elapsed since map start.\n\nCaveat for @Test code: the compiletime interpreter backs this with the\nwall clock, so it returns a unix epoch timestamp (~1.7e9). At that\nmagnitude a 32 bit real only resolves ~128 second steps, so instants built\nfrom smaller offsets are indistinguishable from instantNow() there. Build\ninstants explicitly, e.g. instant(10.), when unit testing package Time.", + "summaryFirstLine": "Seconds elapsed since map start.", "tags": [ "util" ], @@ -128282,7 +129409,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 11 + "line": 17 } ] }, @@ -128313,7 +129440,7 @@ "configurable": true, "members": [], "enumMembers": [], - "line": 22 + "line": 24 }, { "kind": "constant", @@ -128329,7 +129456,7 @@ "configurable": true, "members": [], "enumMembers": [], - "line": 25 + "line": 27 }, { "kind": "constant", @@ -128345,7 +129472,7 @@ "configurable": true, "members": [], "enumMembers": [], - "line": 28 + "line": 30 }, { "kind": "function", @@ -128361,7 +129488,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 40 + "line": 42 }, { "kind": "extension-function", @@ -128377,7 +129504,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 53 + "line": 55 }, { "kind": "extension-function", @@ -128385,7 +129512,7 @@ "typeParams": "", "receiver": "group", "signature": "public function group.recyclableIterator() returns group", - "doc": "", + "doc": "Copies this group's units into a freshly acquired recyclable group and\n\treturns it, so the copy can be iterated while the original is modified.\n\tThe caller owns the result and must call .release() on it.\n\n\tNot re-entrant: the copy is staged through a single package global, so this\n\tmust not be called again from inside an iteration over its own result.", "deprecated": { "flag": false, "message": null @@ -128393,7 +129520,39 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 70 + "line": 78 + }, + { + "kind": "extension-function", + "name": "getClosestUnit", + "typeParams": "", + "receiver": "group", + "signature": "public function group.getClosestUnit(vec2 pos) returns unit", + "doc": "Returns the closest unit in this group to the given position.\n\tReturns null if the group is empty.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 150 + }, + { + "kind": "extension-function", + "name": "filterAliveUnits", + "typeParams": "", + "receiver": "group", + "signature": "public function group.filterAliveUnits(unit mustBeEnemyOf, int ownerId) returns group", + "doc": "Filters this group to include only alive units, optionally filtering by allegiance and owner.\n\tmustBeEnemyOf: If not null, only units that are enemies of this unit are kept. Pass null to ignore allegiance.\n\townerId: If not -1, only units owned by this player ID are kept. Pass -1 to ignore owner.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 163 } ] }, @@ -128528,7 +129687,7 @@ "typeParams": "", "receiver": null, "signature": "static function add(unit u, real velocity, angle groundAngle, angle airAngle)", - "doc": "Apply a knockback vector to unit u. `velocity` is initial speed in units\nper second. `groundAngle` and `airAngle` are the direction and trajectory\nparameters, respectively. Example:", + "doc": "Apply a knockback vector to unit u. `velocity` is initial speed in units\nper second. `groundAngle` and `airAngle` are the direction and trajectory\nparameters, respectively. Example:\n\n> Knockback3.add(u, 1000., 0 .fromDeg(), 45 .fromDeg())", "deprecated": { "flag": false, "message": null @@ -128536,7 +129695,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 131 + "line": 138 }, { "kind": "function", @@ -128544,7 +129703,7 @@ "typeParams": "", "receiver": null, "signature": "static function add(unit u, vec2 target, real groundSpeed)", - "doc": "Apply a knockback vector to unit u. If the unit is stopped, this vector will\nthrow the unit to the position at vec2 `target`. Along the XY-plane, the\nunit will move `groundSpeed` units per second. Note that the more vertical\nangle will always be used from the pair of possible trajectories. Example:", + "doc": "Apply a knockback vector to unit u. If the unit is stopped, this vector will\nthrow the unit to the position at vec2 `target`. Along the XY-plane, the\nunit will move `groundSpeed` units per second. Note that the more vertical\nangle will always be used from the pair of possible trajectories. Example:\n\n> Knockback3.add(caster, getSpellTargetPos(), 500.)", "deprecated": { "flag": false, "message": null @@ -128552,7 +129711,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 157 + "line": 166 }, { "kind": "function", @@ -128568,7 +129727,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 171 + "line": 182 }, { "kind": "function", @@ -128576,7 +129735,7 @@ "typeParams": "", "receiver": null, "signature": "static function getVel(unit u) returns vec3", - "doc": "Getter for the knockback vector on unit u. If the unit is not already tracked, returns (0, 0, 0).", + "doc": "Getter for the knockback vector on unit u, as a per-tick displacement\n(speed * ANIMATION_PERIOD) - note that `add` and `setVel` take units per\n*second*. Returns (0, 0, 0) if the unit is not tracked.", "deprecated": { "flag": false, "message": null @@ -128584,7 +129743,23 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 184 + "line": 197 + }, + { + "kind": "function", + "name": "getVelPerSecond", + "typeParams": "", + "receiver": null, + "signature": "static function getVelPerSecond(unit u) returns vec3", + "doc": "Getter for the knockback velocity on unit u in units per second, i.e. in\nthe same units that `add` and `setVel` accept.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 204 }, { "kind": "function", @@ -128600,7 +129775,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 192 + "line": 212 } ], "enumMembers": [], @@ -128635,7 +129810,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 25 + "line": 24 }, { "kind": "extension-function", @@ -128651,7 +129826,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 28 + "line": 27 }, { "kind": "extension-function", @@ -128667,7 +129842,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 36 + "line": 35 }, { "kind": "extension-function", @@ -128683,7 +129858,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 39 + "line": 38 }, { "kind": "function", @@ -128699,7 +129874,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 43 + "line": 42 } ] }, @@ -128916,7 +130091,7 @@ "typeParams": "", "receiver": null, "signature": "static function error(string msg)", - "doc": "Prints a warning logmessage", + "doc": "Prints an error logmessage", "deprecated": { "flag": false, "message": null @@ -129016,7 +130191,7 @@ "typeParams": "", "receiver": null, "signature": "public function printLog(Loglevel loglvl, string msg)", - "doc": "Prints a special motification-message", + "doc": "Prints a special notification-message", "deprecated": { "flag": false, "message": null @@ -130043,7 +131218,7 @@ "categoryLabel": "Utilities", "sourcePath": "wurst/util/StringUtils.wurst", "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/StringUtils.wurst", - "summary": "Returns the width of the string.\n\tOnly accounts for single byte (latin) characters, multibyte characters\n\tcontribute no width.", + "summary": "Returns the width of the string.\n\tOnly meaningful for single byte (latin) characters. Each byte of a\n\tmultibyte (non-latin) character is looked up individually and falls back to\n\tthe width of a space, so the result for non-latin text is an approximation\n\trather than a true width.", "summaryFirstLine": "Returns the width of the string.", "tags": [ "util" @@ -130112,7 +131287,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 43 + "line": 45 }, { "kind": "function", @@ -130128,7 +131303,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 49 + "line": 51 }, { "kind": "extension-function", @@ -130144,7 +131319,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 59 + "line": 61 }, { "kind": "extension-function", @@ -130160,7 +131335,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 64 + "line": 66 }, { "kind": "extension-function", @@ -130176,7 +131351,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 67 + "line": 69 }, { "kind": "extension-function", @@ -130192,7 +131367,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 72 + "line": 74 }, { "kind": "extension-function", @@ -130208,7 +131383,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 77 + "line": 79 }, { "kind": "extension-function", @@ -130224,7 +131399,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 83 + "line": 85 }, { "kind": "function", @@ -130240,7 +131415,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 86 + "line": 88 }, { "kind": "function", @@ -130256,7 +131431,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 89 + "line": 91 }, { "kind": "extension-function", @@ -130272,7 +131447,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 94 + "line": 96 }, { "kind": "extension-function", @@ -130288,7 +131463,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 111 + "line": 113 }, { "kind": "extension-function", @@ -130304,7 +131479,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 127 + "line": 129 }, { "kind": "interface", @@ -130333,11 +131508,11 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 131 + "line": 133 } ], "enumMembers": [], - "line": 130 + "line": 132 }, { "kind": "extension-function", @@ -130353,7 +131528,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 138 + "line": 140 }, { "kind": "extension-function", @@ -130361,7 +131536,7 @@ "typeParams": "", "receiver": "string", "signature": "public function string.isNumber() returns bool", - "doc": "Checks whether a string is a number or not.", + "doc": "Checks whether a string is a decimal number: an optional leading \"-\",\n\tat least one digit, and at most one decimal point.\n\t\"\", \"-\", \".\" and \"-.\" are not numbers.", "deprecated": { "flag": false, "message": null @@ -130369,7 +131544,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 155 + "line": 159 }, { "kind": "extension-function", @@ -130385,7 +131560,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 169 + "line": 177 }, { "kind": "extension-function", @@ -130401,7 +131576,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 177 + "line": 185 } ] }, @@ -130432,7 +131607,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 11 + "line": 10 }, { "kind": "extension-function", @@ -130448,7 +131623,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 14 + "line": 13 }, { "kind": "extension-function", @@ -130464,7 +131639,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 17 + "line": 16 }, { "kind": "extension-function", @@ -130480,7 +131655,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 20 + "line": 19 }, { "kind": "extension-function", @@ -130496,7 +131671,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 25 + "line": 24 }, { "kind": "extension-function", @@ -130512,7 +131687,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 29 + "line": 28 }, { "kind": "extension-function", @@ -130528,7 +131703,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 34 + "line": 33 }, { "kind": "extension-function", @@ -130544,7 +131719,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 38 + "line": 37 }, { "kind": "extension-function", @@ -130560,7 +131735,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 42 + "line": 41 }, { "kind": "extension-function", @@ -130576,7 +131751,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 45 + "line": 44 }, { "kind": "extension-function", @@ -130592,7 +131767,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 48 + "line": 47 }, { "kind": "extension-function", @@ -130608,7 +131783,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 51 + "line": 50 }, { "kind": "extension-function", @@ -130624,7 +131799,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 54 + "line": 53 }, { "kind": "extension-function", @@ -130640,7 +131815,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 63 + "line": 62 }, { "kind": "tuple", @@ -130656,7 +131831,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 88 + "line": 87 }, { "kind": "constant", @@ -130672,7 +131847,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 97 + "line": 96 }, { "kind": "constant", @@ -130688,7 +131863,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 98 + "line": 97 }, { "kind": "constant", @@ -130704,7 +131879,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 99 + "line": 98 }, { "kind": "function", @@ -130720,7 +131895,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 101 + "line": 100 }, { "kind": "function", @@ -130736,7 +131911,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 106 + "line": 105 }, { "kind": "extension-function", @@ -130752,7 +131927,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 113 + "line": 112 }, { "kind": "extension-function", @@ -130768,7 +131943,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 116 + "line": 115 }, { "kind": "extension-function", @@ -130784,7 +131959,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 122 + "line": 121 }, { "kind": "extension-function", @@ -130800,7 +131975,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 125 + "line": 124 }, { "kind": "extension-function", @@ -130816,7 +131991,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 130 + "line": 129 }, { "kind": "extension-function", @@ -130832,7 +132007,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 133 + "line": 132 }, { "kind": "extension-function", @@ -130848,7 +132023,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 136 + "line": 135 }, { "kind": "extension-function", @@ -130864,7 +132039,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 139 + "line": 138 }, { "kind": "extension-function", @@ -130880,7 +132055,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 142 + "line": 141 }, { "kind": "extension-function", @@ -130896,7 +132071,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 145 + "line": 144 }, { "kind": "extension-function", @@ -130912,7 +132087,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 149 + "line": 148 } ] }, @@ -131431,7 +132606,7 @@ "typeParams": "", "receiver": "instant", "signature": "public function instant.isOlderThan(instant other) returns bool", - "doc": "Instant > instant ?", + "doc": "True if this instant happened before `other`.", "deprecated": { "flag": false, "message": null @@ -131447,7 +132622,7 @@ "typeParams": "", "receiver": "instant", "signature": "public function instant.isNewerThan(instant other) returns bool", - "doc": "Instant < instant ?", + "doc": "True if this instant happens after `other`.", "deprecated": { "flag": false, "message": null @@ -131527,7 +132702,7 @@ "typeParams": "", "receiver": "duration", "signature": "public function duration.displayVerbose() returns string", - "doc": "Tranform a duration to a verbose string. Example:\n\n61..seconds().displayVerbose()\n> \"1 minutes, and 1 seconds\"", + "doc": "Transform a duration to a verbose string. Example:\n\n61..seconds().displayVerbose()\n> \"1 minutes, and 1 seconds\"", "deprecated": { "flag": false, "message": null @@ -131535,7 +132710,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 231 + "line": 240 }, { "kind": "extension-function", @@ -131543,7 +132718,7 @@ "typeParams": "", "receiver": "duration", "signature": "public function duration.display(string prefix) returns string", - "doc": "Tranform a duration to a short string. Example:\n\n61..minutes().display(\"T-\")\n> \"T-1H1M0S\"", + "doc": "Transform a duration to a short string. Example:\n\n61..minutes().display(\"T-\")\n> \"T-1H1M0S\"", "deprecated": { "flag": false, "message": null @@ -131551,7 +132726,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 240 + "line": 249 }, { "kind": "extension-function", @@ -131567,7 +132742,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 249 + "line": 258 }, { "kind": "extension-function", @@ -131583,7 +132758,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 257 + "line": 266 }, { "kind": "extension-function", @@ -131599,7 +132774,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 265 + "line": 274 }, { "kind": "function", @@ -131615,7 +132790,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 270 + "line": 279 }, { "kind": "function", @@ -131631,7 +132806,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 273 + "line": 282 }, { "kind": "function", @@ -131647,7 +132822,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 276 + "line": 285 }, { "kind": "function", @@ -131663,7 +132838,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 279 + "line": 288 } ] }, @@ -131794,7 +132969,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 105 + "line": 110 }, { "kind": "function", @@ -131802,7 +132977,7 @@ "typeParams": "", "receiver": null, "signature": "function getPeriod() returns real", - "doc": "Returns the period of the timed loop.\n\t\tOvewrite this to set a custom period", + "doc": "Returns the period of the timed loop.\n\t\tOverwrite this to set a custom period. It is read once, when the first\n\t\tinstance of this class starts its loop.", "deprecated": { "flag": false, "message": null @@ -131810,7 +132985,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 109 + "line": 115 }, { "kind": "function", @@ -131826,7 +133001,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 135 + "line": 142 }, { "kind": "function", @@ -131842,7 +133017,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 139 + "line": 146 }, { "kind": "function", @@ -131850,7 +133025,7 @@ "typeParams": "", "receiver": null, "signature": "function startTimedLoop()", - "doc": "Starts the periodic updates for this object", + "doc": "Starts the periodic updates for this object.\n\t\tCalling this on an already running instance has no effect.", "deprecated": { "flag": false, "message": null @@ -131858,7 +133033,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 143 + "line": 151 } ], "enumMembers": [], @@ -131895,7 +133070,7 @@ "configurable": true, "members": [], "enumMembers": [], - "line": 121 + "line": 142 }, { "kind": "extension-function", @@ -131911,7 +133086,7 @@ "configurable": true, "members": [], "enumMembers": [], - "line": 127 + "line": 148 }, { "kind": "extension-function", @@ -131927,7 +133102,7 @@ "configurable": true, "members": [], "enumMembers": [], - "line": 131 + "line": 152 }, { "kind": "function", @@ -131943,7 +133118,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 142 + "line": 163 }, { "kind": "function", @@ -131959,7 +133134,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 149 + "line": 170 }, { "kind": "function", @@ -131975,7 +133150,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 154 + "line": 175 }, { "kind": "extension-function", @@ -131991,7 +133166,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 159 + "line": 180 }, { "kind": "class", @@ -132020,7 +133195,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 169 + "line": 190 }, { "kind": "function", @@ -132036,7 +133211,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 172 + "line": 193 }, { "kind": "function", @@ -132052,11 +133227,441 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 175 + "line": 196 } ], "enumMembers": [], - "line": 166 + "line": 187 + } + ] + }, + { + "package": "UnitSpatialIndex", + "category": "util", + "categoryLabel": "Utilities", + "sourcePath": "wurst/util/UnitSpatialIndex.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/UnitSpatialIndex.wurst", + "summary": "Registers or re-buckets one unit immediately. Ordinary movement does not need this - the sweep\ncovers it - but an engine-side teleport or a raw `SetUnitX` call does, because neither is\nobservable.", + "summaryFirstLine": "Registers or re-buckets one unit immediately. Ordinary movement does not need this - the sweep", + "tags": [ + "util" + ], + "imports": [], + "entities": [ + { + "kind": "constant", + "name": "USE_UNIT_SPATIAL_INDEX", + "typeParams": "", + "receiver": null, + "signature": "public constant USE_UNIT_SPATIAL_INDEX = true", + "doc": "Master switch; override from `UnitSpatialIndex_config` to disable the native-less index.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": true, + "members": [], + "enumMembers": [], + "line": 16 + }, + { + "kind": "constant", + "name": "SPATIAL_INDEX_CELL_SIZE", + "typeParams": "", + "receiver": null, + "signature": "public constant SPATIAL_INDEX_CELL_SIZE = 256.", + "doc": "Grid cell edge in world units; smaller cells tighten windows but increase cells walked.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": true, + "members": [], + "enumMembers": [], + "line": 19 + }, + { + "kind": "constant", + "name": "SPATIAL_INDEX_UNITS_PER_TICK", + "typeParams": "", + "receiver": null, + "signature": "public constant SPATIAL_INDEX_UNITS_PER_TICK = 128", + "doc": "Units re-bucketed per tick; raising this shortens the cycle and query padding.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": true, + "members": [], + "enumMembers": [], + "line": 22 + }, + { + "kind": "constant", + "name": "SPATIAL_INDEX_MAX_UNIT_SPEED", + "typeParams": "", + "receiver": null, + "signature": "public constant SPATIAL_INDEX_MAX_UNIT_SPEED = 522.", + "doc": "Engine movement-speed cap. Configurable because gameplay constants can raise the default 522.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": true, + "members": [], + "enumMembers": [], + "line": 25 + }, + { + "kind": "constant", + "name": "SPATIAL_INDEX_CHECK_HIDDEN", + "typeParams": "", + "receiver": null, + "signature": "public constant SPATIAL_INDEX_CHECK_HIDDEN = true", + "doc": "Disable when hidden units are never used to save one native per hit.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": true, + "members": [], + "enumMembers": [], + "line": 28 + }, + { + "kind": "extension-function", + "name": "updateSpatialIndex", + "typeParams": "", + "receiver": "unit", + "signature": "public function unit.updateSpatialIndex()", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 191 + }, + { + "kind": "function", + "name": "spatialIndexHealthy", + "typeParams": "", + "receiver": null, + "signature": "public function spatialIndexHealthy() returns boolean", + "doc": "Whether the Lua spatial index is active and can serve indexed queries.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 257 + }, + { + "kind": "function", + "name": "spatialIndexWorstStaleness", + "typeParams": "", + "receiver": null, + "signature": "public function spatialIndexWorstStaleness() returns real", + "doc": "Guaranteed upper staleness bound in seconds used to derive query padding.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 263 + }, + { + "kind": "function", + "name": "spatialIndexObservedStaleness", + "typeParams": "", + "receiver": null, + "signature": "public function spatialIndexObservedStaleness() returns real", + "doc": "Observed staleness in seconds; diagnostic only, never safe for padding.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 267 + }, + { + "kind": "function", + "name": "spatialIndexTrackedUnits", + "typeParams": "", + "receiver": null, + "signature": "public function spatialIndexTrackedUnits() returns int", + "doc": "How many units the sweep currently cycles over.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 271 + }, + { + "kind": "function", + "name": "spatialIndexAllocatedSlots", + "typeParams": "", + "receiver": null, + "signature": "public function spatialIndexAllocatedSlots() returns int", + "doc": "Allocated cache slots; ID reuse keeps this at peak concurrent population.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 275 + }, + { + "kind": "function", + "name": "spatialIndexPadCells", + "typeParams": "", + "receiver": null, + "signature": "public function spatialIndexPadCells() returns int", + "doc": "Current query padding in whole cells, derived from guaranteed staleness.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 279 + }, + { + "kind": "function", + "name": "rebuildSpatialIndexGrid", + "typeParams": "", + "receiver": null, + "signature": "public function rebuildSpatialIndexGrid(vec2 worldMin, vec2 worldMax)", + "doc": "Rebuilds the extent and re-buckets all units. Unguarded so grid math remains testable on Jass.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 283 + }, + { + "kind": "function", + "name": "spatialIndexCellOf", + "typeParams": "", + "receiver": null, + "signature": "public function spatialIndexCellOf(vec2 pos) returns int", + "doc": "Internal-grid cell for tests and diagnostics.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 301 + }, + { + "kind": "function", + "name": "spatialIndexGridWidth", + "typeParams": "", + "receiver": null, + "signature": "public function spatialIndexGridWidth() returns int", + "doc": "Grid dimensions in cells, for tests and diagnostics.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 305 + }, + { + "kind": "function", + "name": "spatialIndexGridHeight", + "typeParams": "", + "receiver": null, + "signature": "public function spatialIndexGridHeight() returns int", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 308 + }, + { + "kind": "function", + "name": "spatialIndexBeginQuery", + "typeParams": "", + "receiver": null, + "signature": "public function spatialIndexBeginQuery(vec2 center, real radius, boolean collisionSizeFiltering) returns int", + "doc": "Collects every unit whose origin lies within `radius` of `center` into the query snapshot and\nreturns how many matched. Must be paired with `spatialIndexEndQuery()`.\n\nWith `collisionSizeFiltering` the test becomes `IsUnitInRangeXY`, matching\n`ClosureForGroups.forUnitsInRange(pos, radius, true, cb)`.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 327 + }, + { + "kind": "function", + "name": "spatialIndexBeginBoxQuery", + "typeParams": "", + "receiver": null, + "signature": "public function spatialIndexBeginBoxQuery(vec2 boxMin, vec2 boxMax) returns int", + "doc": "Collects units inside the box into the query snapshot.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 386 + }, + { + "kind": "function", + "name": "spatialIndexBeginPlayerQuery", + "typeParams": "", + "receiver": null, + "signature": "public function spatialIndexBeginPlayerQuery(player owner) returns int", + "doc": "Collects currently indexed units owned by owner without a native group scan.\n\n Player enumeration intentionally does not apply the range/box visibility filter: Warcraft's\n GroupEnumUnitsOfPlayer includes hidden and Locust units, so this query does too.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 439 + }, + { + "kind": "function", + "name": "spatialIndexQueryUnit", + "typeParams": "", + "receiver": null, + "signature": "public function spatialIndexQueryUnit(int i) returns unit", + "doc": "Returns the i-th match of the innermost open query.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 449 + }, + { + "kind": "function", + "name": "spatialIndexEndQuery", + "typeParams": "", + "receiver": null, + "signature": "public function spatialIndexEndQuery()", + "doc": "Closes the innermost open query and releases its snapshot.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 453 + } + ] + }, + { + "package": "UnitSpatialIndexRemoval", + "category": "util", + "categoryLabel": "Utilities", + "sourcePath": "wurst/util/UnitSpatialIndexRemoval.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/UnitSpatialIndexRemoval.wurst", + "summary": "", + "summaryFirstLine": "", + "tags": [ + "util" + ], + "imports": [], + "entities": [ + { + "kind": "function", + "name": "getSpatialRemovingUnit", + "typeParams": "", + "receiver": null, + "signature": "public function getSpatialRemovingUnit() returns unit", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 21 + }, + { + "kind": "function", + "name": "onSpatialUnitRemove", + "typeParams": "", + "receiver": null, + "signature": "public function onSpatialUnitRemove(code callback)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 26 + }, + { + "kind": "extension-function", + "name": "trackSpatialRemoval", + "typeParams": "", + "receiver": "unit", + "signature": "public function unit.trackSpatialRemoval()", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 29 + }, + { + "kind": "function", + "name": "initializeSpatialRemovalTracking", + "typeParams": "", + "receiver": null, + "signature": "public function initializeSpatialRemovalTracking()", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 33 } ] }, @@ -135780,7 +137385,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 6 + "line": 5 }, { "kind": "function", @@ -135796,7 +137401,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 9 + "line": 8 }, { "kind": "extension-function", @@ -135812,7 +137417,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 12 + "line": 11 }, { "kind": "extension-function", @@ -135828,7 +137433,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 15 + "line": 14 }, { "kind": "extension-function", @@ -135844,7 +137449,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 18 + "line": 17 }, { "kind": "extension-function", @@ -135860,7 +137465,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 21 + "line": 20 }, { "kind": "extension-function", @@ -135876,7 +137481,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 24 + "line": 23 }, { "kind": "extension-function", @@ -135892,7 +137497,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 27 + "line": 26 }, { "kind": "extension-function", @@ -135908,7 +137513,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 30 + "line": 29 }, { "kind": "extension-function", @@ -135924,7 +137529,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 33 + "line": 32 }, { "kind": "extension-function", @@ -135940,7 +137545,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 36 + "line": 35 }, { "kind": "extension-function", @@ -135956,7 +137561,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 39 + "line": 38 }, { "kind": "extension-function", @@ -135972,7 +137577,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 42 + "line": 41 }, { "kind": "extension-function", @@ -135988,7 +137593,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 45 + "line": 44 }, { "kind": "extension-function", @@ -136004,7 +137609,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 48 + "line": 47 }, { "kind": "extension-function", @@ -136020,7 +137625,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 51 + "line": 50 }, { "kind": "extension-function", @@ -136036,7 +137641,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 54 + "line": 53 }, { "kind": "extension-function", @@ -136052,7 +137657,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 57 + "line": 56 }, { "kind": "extension-function", @@ -136068,7 +137673,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 60 + "line": 59 }, { "kind": "extension-function", @@ -136084,7 +137689,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 63 + "line": 62 }, { "kind": "extension-function", @@ -136100,7 +137705,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 66 + "line": 65 }, { "kind": "extension-function", @@ -136116,7 +137721,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 69 + "line": 68 }, { "kind": "tuple", @@ -136132,7 +137737,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 75 + "line": 74 }, { "kind": "extension-function", @@ -136148,7 +137753,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 78 + "line": 77 }, { "kind": "extension-function", @@ -136164,7 +137769,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 83 + "line": 82 }, { "kind": "extension-function", @@ -136180,7 +137785,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 89 + "line": 88 }, { "kind": "extension-function", @@ -136196,7 +137801,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 94 + "line": 93 }, { "kind": "tuple", @@ -136212,7 +137817,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 101 + "line": 100 }, { "kind": "extension-function", @@ -136228,7 +137833,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 107 + "line": 106 }, { "kind": "extension-function", @@ -136244,7 +137849,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 111 + "line": 110 }, { "kind": "extension-function", @@ -136260,7 +137865,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 115 + "line": 114 }, { "kind": "extension-function", @@ -136276,7 +137881,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 119 + "line": 118 }, { "kind": "function", @@ -136292,7 +137897,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 124 + "line": 123 }, { "kind": "function", @@ -136308,7 +137913,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 128 + "line": 127 }, { "kind": "extension-function", @@ -136324,7 +137929,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 132 + "line": 131 } ] }, @@ -136355,7 +137960,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 11 + "line": 10 }, { "kind": "extension-function", @@ -136371,7 +137976,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 14 + "line": 13 }, { "kind": "extension-function", @@ -136387,7 +137992,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 18 + "line": 17 }, { "kind": "extension-function", @@ -136403,7 +138008,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 22 + "line": 21 }, { "kind": "extension-function", @@ -136419,7 +138024,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 27 + "line": 26 }, { "kind": "extension-function", @@ -136435,7 +138040,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 31 + "line": 30 }, { "kind": "extension-function", @@ -136451,7 +138056,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 34 + "line": 33 }, { "kind": "extension-function", @@ -136467,7 +138072,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 39 + "line": 38 }, { "kind": "extension-function", @@ -136483,7 +138088,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 42 + "line": 41 } ] }, @@ -136514,7 +138119,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 7 + "line": 6 }, { "kind": "function", @@ -136530,7 +138135,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 10 + "line": 9 }, { "kind": "function", @@ -136546,7 +138151,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 13 + "line": 12 }, { "kind": "function", @@ -136562,7 +138167,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 16 + "line": 15 }, { "kind": "function", @@ -136578,7 +138183,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 19 + "line": 18 }, { "kind": "function", @@ -136594,7 +138199,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 22 + "line": 21 }, { "kind": "function", @@ -136610,7 +138215,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 25 + "line": 24 }, { "kind": "function", @@ -136626,7 +138231,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 28 + "line": 27 }, { "kind": "function", @@ -136642,7 +138247,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 33 + "line": 32 }, { "kind": "function", @@ -136658,7 +138263,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 38 + "line": 37 }, { "kind": "function", @@ -136674,7 +138279,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 43 + "line": 42 }, { "kind": "function", @@ -136690,7 +138295,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 46 + "line": 45 }, { "kind": "function", @@ -136706,7 +138311,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 49 + "line": 48 }, { "kind": "function", @@ -136722,7 +138327,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 52 + "line": 51 }, { "kind": "function", @@ -136738,7 +138343,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 57 + "line": 56 }, { "kind": "function", @@ -136754,7 +138359,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 62 + "line": 61 }, { "kind": "function", @@ -136770,7 +138375,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 67 + "line": 66 }, { "kind": "extension-function", @@ -136786,7 +138391,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 70 + "line": 69 }, { "kind": "extension-function", @@ -136802,7 +138407,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 73 + "line": 72 }, { "kind": "extension-function", @@ -136818,7 +138423,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 76 + "line": 75 }, { "kind": "extension-function", @@ -136834,7 +138439,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 79 + "line": 78 }, { "kind": "extension-function", @@ -136850,7 +138455,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 82 + "line": 81 }, { "kind": "extension-function", @@ -136866,7 +138471,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 85 + "line": 84 }, { "kind": "extension-function", @@ -136882,7 +138487,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 88 + "line": 87 }, { "kind": "extension-function", @@ -136898,7 +138503,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 91 + "line": 90 }, { "kind": "extension-function", @@ -136914,7 +138519,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 94 + "line": 93 }, { "kind": "extension-function", @@ -136930,7 +138535,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 97 + "line": 96 }, { "kind": "extension-function", @@ -136946,7 +138551,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 101 + "line": 100 }, { "kind": "extension-function", @@ -136962,7 +138567,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 105 + "line": 104 }, { "kind": "extension-function", @@ -136978,7 +138583,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 108 + "line": 107 }, { "kind": "extension-function", @@ -136994,7 +138599,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 111 + "line": 110 }, { "kind": "extension-function", @@ -137010,7 +138615,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 114 + "line": 113 }, { "kind": "extension-function", @@ -137026,7 +138631,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 117 + "line": 116 }, { "kind": "extension-function", @@ -137042,7 +138647,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 120 + "line": 119 }, { "kind": "extension-function", @@ -137058,7 +138663,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 123 + "line": 122 }, { "kind": "function", @@ -137074,7 +138679,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 128 + "line": 127 }, { "kind": "extension-function", @@ -137090,7 +138695,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 131 + "line": 130 }, { "kind": "extension-function", @@ -137106,7 +138711,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 134 + "line": 133 }, { "kind": "extension-function", @@ -137122,7 +138727,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 137 + "line": 136 }, { "kind": "extension-function", @@ -137138,7 +138743,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 140 + "line": 139 }, { "kind": "extension-function", @@ -137154,7 +138759,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 143 + "line": 142 }, { "kind": "extension-function", @@ -137170,7 +138775,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 146 + "line": 145 }, { "kind": "extension-function", @@ -137186,7 +138791,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 149 + "line": 148 }, { "kind": "extension-function", @@ -137202,7 +138807,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 152 + "line": 151 }, { "kind": "extension-function", @@ -137218,7 +138823,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 155 + "line": 154 }, { "kind": "extension-function", @@ -137234,7 +138839,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 165 + "line": 164 }, { "kind": "extension-function", @@ -137250,7 +138855,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 170 + "line": 169 }, { "kind": "extension-function", @@ -137266,7 +138871,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 177 + "line": 176 }, { "kind": "extension-function", @@ -137282,7 +138887,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 181 + "line": 180 }, { "kind": "extension-function", @@ -137298,7 +138903,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 185 + "line": 184 }, { "kind": "extension-function", @@ -137314,7 +138919,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 189 + "line": 188 }, { "kind": "extension-function", @@ -137330,7 +138935,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 193 + "line": 192 }, { "kind": "extension-function", @@ -137346,7 +138951,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 196 + "line": 195 }, { "kind": "extension-function", @@ -137362,7 +138967,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 199 + "line": 198 }, { "kind": "extension-function", @@ -137378,7 +138983,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 202 + "line": 201 }, { "kind": "extension-function", @@ -137394,7 +138999,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 206 + "line": 205 }, { "kind": "extension-function", @@ -137410,7 +139015,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 210 + "line": 209 }, { "kind": "extension-function", @@ -137426,7 +139031,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 214 + "line": 213 } ] }, @@ -142847,8 +144452,8 @@ "categoryLabel": "Handle Wrappers", "sourcePath": "wurst/_handles/primitives/Integer.wurst", "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/_handles/primitives/Integer.wurst", - "summary": "", - "summaryFirstLine": "", + "summary": "Returns this int to the power of the argument int.\n\tA negative exponent yields 1, since the true result is not an integer.\n\tOverflow wraps silently.", + "summaryFirstLine": "Returns this int to the power of the argument int.", "tags": [ "handles" ], @@ -142982,13 +144587,29 @@ "enumMembers": [], "line": 29 }, + { + "kind": "extension-function", + "name": "toStringOrdinal", + "typeParams": "", + "receiver": "int", + "signature": "public function int.toStringOrdinal() returns string", + "doc": "Returns this int with its English ordinal suffix, e.g. 1 -> \"1st\", 2 -> \"2nd\", 3 -> \"3rd\", 4 -> \"4th\".\n\tHandles the 11/12/13 exceptions correctly.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 34 + }, { "kind": "extension-function", "name": "pow", "typeParams": "", "receiver": "int", "signature": "public function int.pow(int x) returns int", - "doc": "Returns this int to the power of the argument int", + "doc": "", "deprecated": { "flag": false, "message": null @@ -142996,7 +144617,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 33 + "line": 50 }, { "kind": "extension-function", @@ -143012,7 +144633,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 40 + "line": 57 }, { "kind": "extension-function", @@ -143028,7 +144649,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 44 + "line": 61 }, { "kind": "extension-function", @@ -143044,7 +144665,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 48 + "line": 65 }, { "kind": "extension-function", @@ -143060,7 +144681,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 52 + "line": 69 }, { "kind": "extension-function", @@ -143076,7 +144697,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 56 + "line": 73 }, { "kind": "extension-function", @@ -143092,7 +144713,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 60 + "line": 77 }, { "kind": "extension-function", @@ -143108,7 +144729,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 64 + "line": 81 }, { "kind": "extension-function", @@ -143124,7 +144745,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 68 + "line": 85 }, { "kind": "extension-function", @@ -143140,7 +144761,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 76 + "line": 93 } ] }, @@ -145346,7 +146967,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 10 + "line": 9 }, { "kind": "extension-function", @@ -145362,7 +146983,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 18 + "line": 17 }, { "kind": "extension-function", @@ -145378,7 +146999,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 21 + "line": 20 }, { "kind": "extension-function", @@ -145394,7 +147015,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 24 + "line": 23 }, { "kind": "extension-function", @@ -145410,7 +147031,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 27 + "line": 26 }, { "kind": "extension-function", @@ -145426,7 +147047,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 30 + "line": 29 }, { "kind": "extension-function", @@ -145442,7 +147063,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 35 + "line": 34 }, { "kind": "extension-function", @@ -145458,7 +147079,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 40 + "line": 39 }, { "kind": "extension-function", @@ -145474,7 +147095,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 46 + "line": 45 }, { "kind": "extension-function", @@ -145490,7 +147111,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 52 + "line": 51 }, { "kind": "extension-function", @@ -145506,7 +147127,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 57 + "line": 56 }, { "kind": "extension-function", @@ -145522,7 +147143,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 61 + "line": 60 }, { "kind": "extension-function", @@ -145538,7 +147159,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 64 + "line": 63 }, { "kind": "extension-function", @@ -145554,7 +147175,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 67 + "line": 66 }, { "kind": "extension-function", @@ -145570,7 +147191,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 70 + "line": 69 }, { "kind": "extension-function", @@ -145586,7 +147207,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 73 + "line": 72 }, { "kind": "extension-function", @@ -145602,7 +147223,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 76 + "line": 75 }, { "kind": "extension-function", @@ -145618,7 +147239,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 79 + "line": 78 }, { "kind": "extension-function", @@ -145634,7 +147255,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 82 + "line": 81 }, { "kind": "extension-function", @@ -145650,7 +147271,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 86 + "line": 85 }, { "kind": "extension-function", @@ -145666,7 +147287,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 89 + "line": 88 }, { "kind": "extension-function", @@ -145682,7 +147303,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 92 + "line": 91 }, { "kind": "extension-function", @@ -145698,7 +147319,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 95 + "line": 94 }, { "kind": "extension-function", @@ -145714,7 +147335,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 98 + "line": 97 }, { "kind": "extension-function", @@ -145730,7 +147351,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 101 + "line": 100 }, { "kind": "extension-function", @@ -145746,7 +147367,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 104 + "line": 103 }, { "kind": "extension-function", @@ -145762,7 +147383,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 108 + "line": 107 }, { "kind": "extension-function", @@ -145778,7 +147399,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 112 + "line": 111 }, { "kind": "extension-function", @@ -145794,7 +147415,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 117 + "line": 116 }, { "kind": "extension-function", @@ -145810,7 +147431,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 120 + "line": 119 }, { "kind": "extension-function", @@ -145826,7 +147447,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 123 + "line": 122 }, { "kind": "extension-function", @@ -145842,7 +147463,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 126 + "line": 125 }, { "kind": "extension-function", @@ -145858,7 +147479,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 129 + "line": 128 }, { "kind": "extension-function", @@ -145874,7 +147495,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 133 + "line": 132 }, { "kind": "extension-function", @@ -145890,7 +147511,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 137 + "line": 136 }, { "kind": "extension-function", @@ -145906,7 +147527,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 141 + "line": 140 }, { "kind": "extension-function", @@ -145922,7 +147543,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 144 + "line": 143 }, { "kind": "extension-function", @@ -145938,7 +147559,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 147 + "line": 146 }, { "kind": "extension-function", @@ -145954,7 +147575,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 150 + "line": 149 }, { "kind": "extension-function", @@ -145970,7 +147591,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 153 + "line": 152 }, { "kind": "extension-function", @@ -145986,7 +147607,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 156 + "line": 155 }, { "kind": "extension-function", @@ -146002,7 +147623,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 159 + "line": 158 }, { "kind": "extension-function", @@ -146018,7 +147639,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 162 + "line": 161 }, { "kind": "extension-function", @@ -146034,7 +147655,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 165 + "line": 164 }, { "kind": "extension-function", @@ -146050,7 +147671,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 168 + "line": 167 }, { "kind": "extension-function", @@ -146066,7 +147687,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 171 + "line": 170 }, { "kind": "extension-function", @@ -146082,7 +147703,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 174 + "line": 173 }, { "kind": "extension-function", @@ -146098,7 +147719,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 178 + "line": 177 }, { "kind": "extension-function", @@ -146114,7 +147735,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 182 + "line": 181 }, { "kind": "extension-function", @@ -146130,7 +147751,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 186 + "line": 185 }, { "kind": "extension-function", @@ -146146,7 +147767,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 190 + "line": 189 }, { "kind": "extension-function", @@ -146162,7 +147783,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 194 + "line": 193 }, { "kind": "extension-function", @@ -146178,7 +147799,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 199 + "line": 198 }, { "kind": "extension-function", @@ -146194,7 +147815,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 204 + "line": 203 }, { "kind": "extension-function", @@ -146210,7 +147831,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 209 + "line": 208 }, { "kind": "extension-function", @@ -146226,7 +147847,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 212 + "line": 211 }, { "kind": "extension-function", @@ -146242,7 +147863,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 215 + "line": 214 }, { "kind": "extension-function", @@ -146258,7 +147879,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 218 + "line": 217 }, { "kind": "extension-function", @@ -146274,7 +147895,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 222 + "line": 221 }, { "kind": "extension-function", @@ -146290,7 +147911,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 225 + "line": 224 }, { "kind": "extension-function", @@ -146306,7 +147927,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 228 + "line": 227 } ] }, @@ -146337,7 +147958,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 7 + "line": 6 }, { "kind": "constant", @@ -146353,7 +147974,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 8 + "line": 7 }, { "kind": "constant", @@ -146369,7 +147990,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 9 + "line": 8 }, { "kind": "constant", @@ -146385,7 +148006,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 10 + "line": 9 }, { "kind": "extension-function", @@ -146401,7 +148022,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 42 + "line": 41 }, { "kind": "extension-function", @@ -146417,7 +148038,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 45 + "line": 44 }, { "kind": "extension-function", @@ -146433,7 +148054,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 48 + "line": 47 }, { "kind": "extension-function", @@ -146449,7 +148070,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 51 + "line": 50 }, { "kind": "extension-function", @@ -146465,7 +148086,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 62 + "line": 61 }, { "kind": "extension-function", @@ -146481,7 +148102,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 67 + "line": 66 } ] }, @@ -147053,7 +148674,7 @@ "typeParams": "", "receiver": "real", "signature": "public function real.abs() returns real", - "doc": "Returns the abolsute value of the given real.\nThis means, negative values will be return positive.", + "doc": "Returns the absolute value of the given real.\nThis means, negative values will be return positive.", "deprecated": { "flag": false, "message": null @@ -147476,7 +149097,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 6 + "line": 5 }, { "kind": "extension-function", @@ -147492,7 +149113,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 9 + "line": 8 }, { "kind": "extension-function", @@ -147508,7 +149129,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 12 + "line": 11 }, { "kind": "extension-function", @@ -147524,7 +149145,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 15 + "line": 14 }, { "kind": "extension-function", @@ -147540,7 +149161,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 18 + "line": 17 }, { "kind": "extension-function", @@ -147556,7 +149177,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 21 + "line": 20 }, { "kind": "extension-function", @@ -147572,7 +149193,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 24 + "line": 23 }, { "kind": "extension-function", @@ -147588,7 +149209,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 27 + "line": 26 }, { "kind": "extension-function", @@ -147604,7 +149225,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 30 + "line": 29 }, { "kind": "extension-function", @@ -147620,7 +149241,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 33 + "line": 32 }, { "kind": "extension-function", @@ -147636,7 +149257,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 36 + "line": 35 }, { "kind": "extension-function", @@ -147652,7 +149273,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 39 + "line": 38 }, { "kind": "extension-function", @@ -147668,7 +149289,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 42 + "line": 41 }, { "kind": "extension-function", @@ -147684,7 +149305,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 45 + "line": 44 }, { "kind": "extension-function", @@ -147700,7 +149321,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 48 + "line": 47 }, { "kind": "extension-function", @@ -147716,7 +149337,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 51 + "line": 50 }, { "kind": "extension-function", @@ -147732,7 +149353,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 54 + "line": 53 }, { "kind": "extension-function", @@ -147748,7 +149369,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 57 + "line": 56 }, { "kind": "extension-function", @@ -147764,7 +149385,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 60 + "line": 59 }, { "kind": "extension-function", @@ -147780,7 +149401,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 63 + "line": 62 }, { "kind": "extension-function", @@ -147796,7 +149417,55 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 66 + "line": 65 + }, + { + "kind": "extension-function", + "name": "toRegion", + "typeParams": "", + "receiver": "rect", + "signature": "public function rect.toRegion() returns region", + "doc": "Converts this rect to a region.\n\tWARNING: Creates a new region; caller owns it and must call .destr() to avoid a handle leak.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 70 + }, + { + "kind": "extension-function", + "name": "fromCenter", + "typeParams": "", + "receiver": "rect", + "signature": "public function rect.fromCenter(real sizeX, real sizeY) returns rect", + "doc": "Creates a rect centered at this rect's center with the given full width and height.\n\tExample: A rect at (100,100) with sizeX=20, sizeY=30 spans from (90,85) to (110,115).", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 77 + }, + { + "kind": "extension-function", + "name": "fromCenterWithOffset", + "typeParams": "", + "receiver": "rect", + "signature": "public function rect.fromCenterWithOffset(real sizeX, real sizeY, vec2 offset) returns rect", + "doc": "Creates a rect centered at this rect's center plus offset, with the given full width and height.\n\tExample: A rect at (100,100) with offset (10,0), sizeX=20, sizeY=30 spans from (100,85) to (120,115).", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 83 }, { "kind": "extension-function", @@ -147812,7 +149481,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 92 + "line": 86 }, { "kind": "extension-function", @@ -147828,7 +149497,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 95 + "line": 89 }, { "kind": "extension-function", @@ -147844,7 +149513,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 98 + "line": 92 }, { "kind": "extension-function", @@ -147860,7 +149529,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 101 + "line": 95 }, { "kind": "extension-function", @@ -147876,7 +149545,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 104 + "line": 98 }, { "kind": "extension-function", @@ -147892,7 +149561,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 107 + "line": 101 } ] }, @@ -148689,7 +150358,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 54 + "line": 50 }, { "kind": "extension-function", @@ -148705,7 +150374,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 71 + "line": 121 }, { "kind": "extension-function", @@ -148721,7 +150390,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 77 + "line": 127 }, { "kind": "extension-function", @@ -148737,7 +150406,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 87 + "line": 137 }, { "kind": "extension-function", @@ -148753,7 +150422,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 91 + "line": 141 }, { "kind": "extension-function", @@ -148769,7 +150438,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 95 + "line": 145 }, { "kind": "extension-function", @@ -148785,7 +150454,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 101 + "line": 151 }, { "kind": "extension-function", @@ -148801,7 +150470,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 106 + "line": 156 }, { "kind": "extension-function", @@ -148817,7 +150486,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 112 + "line": 162 }, { "kind": "extension-function", @@ -148833,7 +150502,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 118 + "line": 168 }, { "kind": "extension-function", @@ -148849,7 +150518,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 122 + "line": 172 }, { "kind": "extension-function", @@ -148865,7 +150534,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 126 + "line": 176 }, { "kind": "extension-function", @@ -148881,7 +150550,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 135 + "line": 185 }, { "kind": "extension-function", @@ -148897,7 +150566,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 142 + "line": 192 }, { "kind": "extension-function", @@ -148913,7 +150582,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 146 + "line": 196 }, { "kind": "extension-function", @@ -148929,7 +150598,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 150 + "line": 200 }, { "kind": "extension-function", @@ -148945,7 +150614,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 154 + "line": 204 }, { "kind": "extension-function", @@ -148953,7 +150622,7 @@ "typeParams": "", "receiver": "string", "signature": "public function string.trim() returns string", - "doc": "Returns the given string with whitespaces removed from both ends", + "doc": "Returns the given string with whitespace (\" \", \\n, \\t, \\r) removed from both ends", "deprecated": { "flag": false, "message": null @@ -148961,7 +150630,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 158 + "line": 208 }, { "kind": "extension-function", @@ -148969,7 +150638,7 @@ "typeParams": "", "receiver": "string", "signature": "public function string.ltrim() returns string", - "doc": "Returns the given string with whitespaces removed from the left end", + "doc": "Returns the given string with whitespace (\" \", \\n, \\t, \\r) removed from the left end", "deprecated": { "flag": false, "message": null @@ -148977,7 +150646,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 168 + "line": 218 }, { "kind": "extension-function", @@ -148985,7 +150654,7 @@ "typeParams": "", "receiver": "string", "signature": "public function string.rtrim() returns string", - "doc": "Returns the given string with whitespaces removed from the right end", + "doc": "Returns the given string with whitespace (\" \", \\n, \\t, \\r) removed from the right end", "deprecated": { "flag": false, "message": null @@ -148993,7 +150662,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 176 + "line": 226 }, { "kind": "extension-function", @@ -149009,7 +150678,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 183 + "line": 233 }, { "kind": "extension-function", @@ -149025,7 +150694,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 190 + "line": 240 }, { "kind": "extension-function", @@ -149041,7 +150710,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 197 + "line": 247 }, { "kind": "extension-function", @@ -149057,7 +150726,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 204 + "line": 254 }, { "kind": "extension-function", @@ -149073,7 +150742,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 216 + "line": 266 }, { "kind": "extension-function", @@ -149089,7 +150758,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 226 + "line": 276 }, { "kind": "extension-function", @@ -149105,7 +150774,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 233 + "line": 283 }, { "kind": "extension-function", @@ -149121,7 +150790,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 245 + "line": 295 }, { "kind": "extension-function", @@ -149137,7 +150806,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 249 + "line": 299 }, { "kind": "extension-function", @@ -149153,7 +150822,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 253 + "line": 303 }, { "kind": "extension-function", @@ -149169,7 +150838,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 259 + "line": 309 }, { "kind": "extension-function", @@ -149185,7 +150854,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 265 + "line": 315 }, { "kind": "function", @@ -149193,7 +150862,7 @@ "typeParams": "", "receiver": null, "signature": "public function stringCompare(string s1, string s2) returns int", - "doc": "Returns an integer result based on a lexicographic string comparison of strings s1 and s2.", + "doc": "Returns a negative number if s1 sorts before s2, a positive number if it\nsorts after, and 0 only if the two strings are equal.\n\nAlphanumerics keep their long standing order: digits, then lowercase, then\nuppercase, so \"Hello\" sorts after \"hello\". Every other printable ascii\ncharacter sorts after all alphanumerics, ordered by ascii code point among\nthemselves. Bytes outside printable ascii - control characters and the\nindividual bytes of multibyte characters - sort last, tie-broken by string\nhash so the result stays consistent.", "deprecated": { "flag": false, "message": null @@ -149201,7 +150870,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 275 + "line": 333 }, { "kind": "extension-function", @@ -149217,7 +150886,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 292 + "line": 359 }, { "kind": "extension-function", @@ -149233,7 +150902,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 297 + "line": 364 }, { "kind": "extension-function", @@ -149249,7 +150918,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 307 + "line": 374 }, { "kind": "class", @@ -149278,7 +150947,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 315 + "line": 382 }, { "kind": "function", @@ -149294,7 +150963,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 320 + "line": 387 }, { "kind": "function", @@ -149310,7 +150979,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 323 + "line": 390 }, { "kind": "function", @@ -149326,11 +150995,11 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 342 + "line": 409 } ], "enumMembers": [], - "line": 310 + "line": 377 }, { "kind": "class", @@ -149359,7 +151028,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 352 + "line": 419 }, { "kind": "function", @@ -149375,7 +151044,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 358 + "line": 425 }, { "kind": "function", @@ -149391,7 +151060,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 362 + "line": 429 }, { "kind": "function", @@ -149407,7 +151076,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 366 + "line": 433 }, { "kind": "function", @@ -149423,11 +151092,11 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 373 + "line": 440 } ], "enumMembers": [], - "line": 346 + "line": 413 }, { "kind": "extension-function", @@ -149443,7 +151112,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 379 + "line": 446 } ] }, @@ -154374,6 +156043,22 @@ "enumMembers": [], "line": 749 }, + { + "kind": "extension-function", + "name": "disableAttackEx", + "typeParams": "", + "receiver": "unit", + "signature": "public function unit.disableAttackEx(int index, bool flag)", + "doc": "Enables/disables a single weapon by index (0 = the unit's first/regular attack).\n\tUnlike disableAttack this toggles the weapon field directly, so it can disable one\n\tweapon on a multi-weapon unit without hiding the attack command.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 755 + }, { "kind": "extension-function", "name": "disableWorkQueue", @@ -154388,7 +156073,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 752 + "line": 758 }, { "kind": "extension-function", @@ -154404,7 +156089,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 755 + "line": 761 }, { "kind": "extension-function", @@ -154420,7 +156105,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 758 + "line": 764 }, { "kind": "extension-function", @@ -154436,7 +156121,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 761 + "line": 767 }, { "kind": "extension-function", @@ -154452,7 +156137,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 764 + "line": 770 }, { "kind": "extension-function", @@ -154468,7 +156153,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 767 + "line": 773 }, { "kind": "extension-function", @@ -154484,7 +156169,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 770 + "line": 776 }, { "kind": "extension-function", @@ -154500,7 +156185,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 774 + "line": 780 }, { "kind": "extension-function", @@ -154516,7 +156201,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 778 + "line": 784 }, { "kind": "extension-function", @@ -154532,7 +156217,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 781 + "line": 787 }, { "kind": "extension-function", @@ -154548,7 +156233,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 784 + "line": 790 }, { "kind": "extension-function", @@ -154564,7 +156249,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 787 + "line": 793 }, { "kind": "extension-function", @@ -154580,7 +156265,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 790 + "line": 796 }, { "kind": "extension-function", @@ -154596,7 +156281,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 793 + "line": 799 }, { "kind": "extension-function", @@ -154612,7 +156297,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 796 + "line": 802 }, { "kind": "extension-function", @@ -154628,7 +156313,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 799 + "line": 805 }, { "kind": "extension-function", @@ -154644,7 +156329,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 802 + "line": 808 }, { "kind": "extension-function", @@ -154660,7 +156345,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 805 + "line": 811 }, { "kind": "extension-function", @@ -154676,7 +156361,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 808 + "line": 814 }, { "kind": "extension-function", @@ -154692,7 +156377,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 811 + "line": 817 }, { "kind": "extension-function", @@ -154708,7 +156393,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 814 + "line": 820 }, { "kind": "extension-function", @@ -154724,7 +156409,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 817 + "line": 823 }, { "kind": "extension-function", @@ -154740,7 +156425,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 820 + "line": 826 }, { "kind": "extension-function", @@ -154756,7 +156441,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 823 + "line": 829 }, { "kind": "extension-function", @@ -154772,7 +156457,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 829 + "line": 835 }, { "kind": "extension-function", @@ -154788,7 +156473,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 832 + "line": 838 }, { "kind": "enum", @@ -154808,7 +156493,7 @@ "UNIT", "DESTRUCTABLE" ], - "line": 835 + "line": 841 }, { "kind": "tuple", @@ -154824,7 +156509,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 840 + "line": 846 }, { "kind": "extension-function", @@ -154840,7 +156525,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 843 + "line": 849 }, { "kind": "extension-function", @@ -154856,7 +156541,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 881 + "line": 887 }, { "kind": "extension-function", @@ -154872,7 +156557,7 @@ "configurable": true, "members": [], "enumMembers": [], - "line": 886 + "line": 892 }, { "kind": "extension-function", @@ -154888,7 +156573,7 @@ "configurable": true, "members": [], "enumMembers": [], - "line": 894 + "line": 900 }, { "kind": "extension-function", @@ -154904,7 +156589,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 901 + "line": 907 }, { "kind": "extension-function", @@ -154920,7 +156605,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 904 + "line": 910 }, { "kind": "extension-function", @@ -154936,7 +156621,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 907 + "line": 913 }, { "kind": "extension-function", @@ -154952,7 +156637,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 910 + "line": 916 }, { "kind": "extension-function", @@ -154968,7 +156653,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 913 + "line": 919 }, { "kind": "extension-function", @@ -154984,7 +156669,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 916 + "line": 922 }, { "kind": "extension-function", @@ -155000,7 +156685,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 919 + "line": 925 }, { "kind": "extension-function", @@ -155016,7 +156701,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 922 + "line": 928 }, { "kind": "extension-function", @@ -155032,7 +156717,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 926 + "line": 932 }, { "kind": "extension-function", @@ -155048,7 +156733,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 929 + "line": 935 }, { "kind": "extension-function", @@ -155064,7 +156749,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 932 + "line": 938 }, { "kind": "extension-function", @@ -155080,7 +156765,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 935 + "line": 941 }, { "kind": "extension-function", @@ -155096,7 +156781,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 938 + "line": 944 }, { "kind": "extension-function", @@ -155112,7 +156797,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 941 + "line": 947 }, { "kind": "extension-function", @@ -155128,7 +156813,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 944 + "line": 950 }, { "kind": "extension-function", @@ -155144,7 +156829,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 947 + "line": 953 }, { "kind": "extension-function", @@ -155160,7 +156845,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 950 + "line": 956 }, { "kind": "extension-function", @@ -155176,7 +156861,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 953 + "line": 959 }, { "kind": "extension-function", @@ -155192,7 +156877,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 956 + "line": 962 }, { "kind": "extension-function", @@ -155208,7 +156893,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 959 + "line": 965 }, { "kind": "extension-function", @@ -155224,7 +156909,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 962 + "line": 968 }, { "kind": "extension-function", @@ -155240,7 +156925,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 965 + "line": 971 }, { "kind": "extension-function", @@ -155256,7 +156941,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 968 + "line": 974 }, { "kind": "extension-function", @@ -155272,7 +156957,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 971 + "line": 977 }, { "kind": "extension-function", @@ -155288,7 +156973,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 974 + "line": 980 }, { "kind": "extension-function", @@ -155304,7 +156989,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 977 + "line": 983 }, { "kind": "extension-function", @@ -155320,7 +157005,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 980 + "line": 986 }, { "kind": "extension-function", @@ -155336,7 +157021,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 983 + "line": 989 }, { "kind": "extension-function", @@ -155352,7 +157037,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 986 + "line": 992 }, { "kind": "extension-function", @@ -155368,7 +157053,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 989 + "line": 995 }, { "kind": "extension-function", @@ -155384,7 +157069,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 992 + "line": 998 }, { "kind": "extension-function", @@ -155400,7 +157085,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 995 + "line": 1001 }, { "kind": "extension-function", @@ -155416,7 +157101,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 998 + "line": 1004 }, { "kind": "extension-function", @@ -155432,7 +157117,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 1001 + "line": 1007 }, { "kind": "extension-function", @@ -155448,7 +157133,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 1004 + "line": 1010 }, { "kind": "extension-function", @@ -155464,7 +157149,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 1007 + "line": 1013 }, { "kind": "extension-function", @@ -155480,7 +157165,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 1010 + "line": 1016 }, { "kind": "extension-function", @@ -155496,7 +157181,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 1013 + "line": 1019 }, { "kind": "extension-function", @@ -155512,7 +157197,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 1016 + "line": 1022 }, { "kind": "extension-function", @@ -155528,7 +157213,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 1019 + "line": 1025 }, { "kind": "extension-function", @@ -155544,7 +157229,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 1022 + "line": 1028 }, { "kind": "extension-function", @@ -155560,7 +157245,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 1025 + "line": 1031 }, { "kind": "extension-function", @@ -155576,7 +157261,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 1028 + "line": 1034 }, { "kind": "extension-function", @@ -155592,7 +157277,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 1031 + "line": 1037 }, { "kind": "extension-function", @@ -155608,7 +157293,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 1034 + "line": 1040 }, { "kind": "extension-function", @@ -155624,7 +157309,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 1037 + "line": 1043 }, { "kind": "extension-function", @@ -155640,7 +157325,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 1040 + "line": 1046 }, { "kind": "extension-function", @@ -155656,7 +157341,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 1043 + "line": 1049 }, { "kind": "extension-function", @@ -155672,7 +157357,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 1046 + "line": 1052 }, { "kind": "extension-function", @@ -155688,7 +157373,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 1049 + "line": 1055 }, { "kind": "extension-function", @@ -155704,7 +157389,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 1052 + "line": 1058 }, { "kind": "extension-function", @@ -155720,7 +157405,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 1055 + "line": 1061 }, { "kind": "extension-function", @@ -155736,7 +157421,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 1058 + "line": 1064 }, { "kind": "extension-function", @@ -155752,7 +157437,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 1061 + "line": 1067 }, { "kind": "extension-function", @@ -155768,7 +157453,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 1064 + "line": 1070 }, { "kind": "extension-function", @@ -155784,7 +157469,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 1067 + "line": 1073 }, { "kind": "extension-function", @@ -155800,7 +157485,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 1070 + "line": 1076 }, { "kind": "extension-function", @@ -155816,7 +157501,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 1073 + "line": 1079 } ] }, diff --git a/_doc/stdlib/ref/_handles/Integer.md b/_doc/stdlib/ref/_handles/Integer.md index dee78d4..c8f0b7b 100644 --- a/_doc/stdlib/ref/_handles/Integer.md +++ b/_doc/stdlib/ref/_handles/Integer.md @@ -10,6 +10,10 @@ generated: true toc: sections --- +Returns this int to the power of the argument int. + A negative exponent yields 1, since the true result is not an integer. + Overflow wraps silently. + **[Source on GitHub](https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/_handles/primitives/Integer.wurst)** ## Extension Functions @@ -62,14 +66,21 @@ public function int.toString() returns string Returns the string representation of this int +### int.toStringOrdinal + +```wurst +public function int.toStringOrdinal() returns string +``` + +Returns this int with its English ordinal suffix, e.g. 1 -> "1st", 2 -> "2nd", 3 -> "3rd", 4 -> "4th". + Handles the 11/12/13 exceptions correctly. + ### int.pow ```wurst public function int.pow(int x) returns int ``` -Returns this int to the power of the argument int - ### int.lerp ```wurst diff --git a/_doc/stdlib/ref/_handles/Real.md b/_doc/stdlib/ref/_handles/Real.md index b6f3d15..b595a0a 100644 --- a/_doc/stdlib/ref/_handles/Real.md +++ b/_doc/stdlib/ref/_handles/Real.md @@ -24,7 +24,7 @@ The arctangent function with two arguments. public function real.abs() returns real ``` -Returns the abolsute value of the given real. +Returns the absolute value of the given real. This means, negative values will be return positive. ### real.squared diff --git a/_doc/stdlib/ref/_handles/Rect.md b/_doc/stdlib/ref/_handles/Rect.md index 35de573..d76dd44 100644 --- a/_doc/stdlib/ref/_handles/Rect.md +++ b/_doc/stdlib/ref/_handles/Rect.md @@ -140,6 +140,33 @@ public function rect.remove() public function rect.copy() returns rect ``` +### rect.toRegion + +```wurst +public function rect.toRegion() returns region +``` + +Converts this rect to a region. + WARNING: Creates a new region; caller owns it and must call .destr() to avoid a handle leak. + +### rect.fromCenter + +```wurst +public function rect.fromCenter(real sizeX, real sizeY) returns rect +``` + +Creates a rect centered at this rect's center with the given full width and height. + Example: A rect at (100,100) with sizeX=20, sizeY=30 spans from (90,85) to (110,115). + +### rect.fromCenterWithOffset + +```wurst +public function rect.fromCenterWithOffset(real sizeX, real sizeY, vec2 offset) returns rect +``` + +Creates a rect centered at this rect's center plus offset, with the given full width and height. + Example: A rect at (100,100) with offset (10,0), sizeX=20, sizeY=30 spans from (100,85) to (120,115). + ### rect.setRectFromLoc ```wurst diff --git a/_doc/stdlib/ref/_handles/String.md b/_doc/stdlib/ref/_handles/String.md index 75f1588..74dd220 100644 --- a/_doc/stdlib/ref/_handles/String.md +++ b/_doc/stdlib/ref/_handles/String.md @@ -61,7 +61,15 @@ public class StringLines public function stringCompare(string s1, string s2) returns int ``` -Returns an integer result based on a lexicographic string comparison of strings s1 and s2. +Returns a negative number if s1 sorts before s2, a positive number if it +sorts after, and 0 only if the two strings are equal. + +Alphanumerics keep their long standing order: digits, then lowercase, then +uppercase, so "Hello" sorts after "hello". Every other printable ascii +character sorts after all alphanumerics, ordered by ascii code point among +themselves. Bytes outside printable ascii - control characters and the +individual bytes of multibyte characters - sort last, tie-broken by string +hash so the result stays consistent. ## Extension Functions @@ -230,7 +238,7 @@ True when string contains only lowercase letters public function string.trim() returns string ``` -Returns the given string with whitespaces removed from both ends +Returns the given string with whitespace (" ", \n, \t, \r) removed from both ends ### string.ltrim @@ -238,7 +246,7 @@ Returns the given string with whitespaces removed from both ends public function string.ltrim() returns string ``` -Returns the given string with whitespaces removed from the left end +Returns the given string with whitespace (" ", \n, \t, \r) removed from the left end ### string.rtrim @@ -246,7 +254,7 @@ Returns the given string with whitespaces removed from the left end public function string.rtrim() returns string ``` -Returns the given string with whitespaces removed from the right end +Returns the given string with whitespace (" ", \n, \t, \r) removed from the right end ### string.ltrim diff --git a/_doc/stdlib/ref/_handles/Unit.md b/_doc/stdlib/ref/_handles/Unit.md index 8aa6ac1..26ee122 100644 --- a/_doc/stdlib/ref/_handles/Unit.md +++ b/_doc/stdlib/ref/_handles/Unit.md @@ -1386,6 +1386,16 @@ public function unit.disableAbility(int abilId, boolean flag, boolean hideUI) public function unit.disableAttack(boolean flag, boolean hideUI) ``` +### unit.disableAttackEx + +```wurst +public function unit.disableAttackEx(int index, bool flag) +``` + +Enables/disables a single weapon by index (0 = the unit's first/regular attack). + Unlike disableAttack this toggles the weapon field directly, so it can disable one + weapon on a multi-weapon unit without hiding the attack command. + ### unit.disableWorkQueue ```wurst diff --git a/_doc/stdlib/ref/closures/ClosureForGroups.md b/_doc/stdlib/ref/closures/ClosureForGroups.md index 806c705..c042ba2 100644 --- a/_doc/stdlib/ref/closures/ClosureForGroups.md +++ b/_doc/stdlib/ref/closures/ClosureForGroups.md @@ -13,9 +13,9 @@ toc: sections curated: /stdlib/closure_for_groups --- -Executes the given closure for every unit in this group, - removing the units from the group as processed. - Return true to continue iteration, false to stop. +Executes the given closure for every unit of the given type. + Stops invoking the closure after *count* units. The underlying enumeration + cannot be aborted, so it still visits every match. **[Source on GitHub](https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/closures/ClosureForGroups.wurst)** @@ -72,9 +72,6 @@ Executes the given closure for every unit of the given type. public function forUnitsOfTypeCounted(string unitname, int count, ForGroupCallback c) ``` -Executes the given closure for every unit of the given player. - Cancels itself after *count* iterations - ### forUnitsOfPlayer ```wurst @@ -106,7 +103,8 @@ public function forUnitsInRectCounted(rect r, int count, ForGroupCallback c) ``` Executes the given closure for every unit in the given rect. - Cancels itself after *count* iterations + Stops invoking the closure after *count* units. The underlying enumeration + cannot be aborted, so it still visits every unit in the rect. ### forUnitsInRange @@ -131,8 +129,9 @@ Executes the given closure for every unit in range of the given position public function forUnitsInRangeCounted(vec2 pos, real radius, int count, ForGroupCallback c) ``` -Executes the given closure for every unit in range of the given position - Cancels itself after *count* iterations +Executes the given closure for every unit in range of the given position. + Stops invoking the closure after *count* units. The underlying enumeration + cannot be aborted, so it still visits every unit in range. ### forUnitsSelected @@ -212,7 +211,7 @@ public function forDestructablesInRange(vec2 pos, real range, ForGroupCallbackD ``` Executes the given closure for all destructables in a rect - that incompasses the circle with the range radius at the given position. + that encompasses the circle with the range radius at the given position. ### forDestructablesInRange @@ -221,7 +220,7 @@ public function forDestructablesInRange(vec2 pos, real range, boolexpr filter, F ``` Executes the given closure for all destructables in a rect - that incompasses the circle with the range radius at the given position. + that encompasses the circle with the range radius at the given position. ### forDestructablesInRect @@ -245,7 +244,7 @@ Executes the given closure for all destructables in the given rect public function forNearestDestructable(vec2 pos, real range, ForGroupCallbackD c) ``` -Executes the given closure for the closes destructable in the given rect. +Executes the given closure for the closest destructable in the given range. If there is no destructable in range, the closure will be run with "null" ## Extension Functions @@ -274,6 +273,10 @@ Executes the given closure for every unit in this group, public function group.forEachFromUntil(ForGroupCallbackUntil cb) ``` +Executes the given closure for every unit in this group, + removing the units from the group as processed. + Return true to continue iteration, false to stop. + ### group.forEachInUntil ```wurst diff --git a/_doc/stdlib/ref/closures/ClosureTimers.md b/_doc/stdlib/ref/closures/ClosureTimers.md index 9dc3106..29a1b90 100644 --- a/_doc/stdlib/ref/closures/ClosureTimers.md +++ b/_doc/stdlib/ref/closures/ClosureTimers.md @@ -49,6 +49,10 @@ public abstract class CallbackPeriodic **Members:** - `abstract function call(thistype cb)` +- `disable()` + Pauses this periodic callback without destroying it. Safe to call when already disabled. +- `enable()` + Resumes a previously disabled periodic callback. Safe to call when already enabled. ### CallbackCounted @@ -61,9 +65,14 @@ public abstract class CallbackCounted - `abstract function call(thistype cb)` - `isLast() returns boolean` - `getCount() returns int` + The number of this call, counting down: maxCount on the first call and + 1 on the last. Returns maxCount before the first call. - `progress() returns real` - Returns a value between 0 and 1. + Progress through the run as a value between 0 and 1. + Returns 0 if the callback was started with a call count of 0. - `stop()` + Stops the callback. The remaining calls are skipped and the object is + destroyed on the next tick, not immediately. - `callAndCount()` ## Interfaces diff --git a/_doc/stdlib/ref/closures/SpatialIndexForUnits.md b/_doc/stdlib/ref/closures/SpatialIndexForUnits.md new file mode 100644 index 0000000..7ec797c --- /dev/null +++ b/_doc/stdlib/ref/closures/SpatialIndexForUnits.md @@ -0,0 +1,47 @@ +--- +title: SpatialIndexForUnits +layout: stdlibref +category: closures +categoryLabel: Closures +tags: + - closures +source: 'https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/closures/SpatialIndexForUnits.wurst' +generated: true +toc: sections +--- + +**[Source on GitHub](https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/closures/SpatialIndexForUnits.wurst)** + +## Functions + +### unitsInRange + +```wurst +public function unitsInRange(vec2 center, real radius) returns SparseSet +``` + +Returns units whose origins are within radius of center. + +### unitsInRange + +```wurst +public function unitsInRange(vec2 center, real radius, boolean collisionFiltering) returns SparseSet +``` + +Returns units in range, optionally applying collision-size filtering. + +### unitsInBox + +```wurst +public function unitsInBox(vec2 boxMin, vec2 boxMax) returns SparseSet +``` + +Returns units whose origins are inside the axis-aligned box. + +### unitsOfPlayer + +```wurst +public function unitsOfPlayer(player owner) returns SparseSet +``` + +Returns currently indexed units owned by owner. diff --git a/_doc/stdlib/ref/data/ArrayList.md b/_doc/stdlib/ref/data/ArrayList.md index fa59b95..d661915 100644 --- a/_doc/stdlib/ref/data/ArrayList.md +++ b/_doc/stdlib/ref/data/ArrayList.md @@ -197,3 +197,23 @@ public function ArrayList.join() returns string ``` Joins elements from a string list into one string + +## Constants + +### intComparator + +```wurst +public constant Comparator intComparator = (i1, i2) -> i1 < i2 ? -1 : (i1 > i2 ? 1 : 0) +``` + +### realComparator + +```wurst +public constant Comparator realComparator = (r1, r2) -> r1 < r2 ? -1 : (r1 > r2 ? 1 : 0) +``` + +### stringComparator + +```wurst +public constant Comparator stringComparator = (s1, s2) -> stringCompare(s1, s2) +``` diff --git a/_doc/stdlib/ref/data/HashList.md b/_doc/stdlib/ref/data/HashList.md index 6d3b02d..921e681 100644 --- a/_doc/stdlib/ref/data/HashList.md +++ b/_doc/stdlib/ref/data/HashList.md @@ -57,7 +57,8 @@ public class HashList - `isEmpty() returns bool` Return whether the list is empty - `get(int index) returns T` - Get the element at the given index from this list + Get the element at the given index from this list. + Indices outside [0, size) are not validated and yield the null/zero value. - `has(T elem) returns bool` Return whether the element exists in the list - `hasAt(int index) returns bool` @@ -71,7 +72,9 @@ public class HashList - `staticItr() returns HLIterator` get the static iterator for this list - `removeIf(RemovePredicate predicate)` - Removes the element if the predicates returns true + Removes the element if the predicates returns true. + Single pass compaction - removing through the iterator instead would + shift the tail once per removal, making this O(n^2). - `getRandomElement() returns T` ### HLIterator diff --git a/_doc/stdlib/ref/data/HashMap.md b/_doc/stdlib/ref/data/HashMap.md index 7242435..e0ff01a 100644 --- a/_doc/stdlib/ref/data/HashMap.md +++ b/_doc/stdlib/ref/data/HashMap.md @@ -64,7 +64,9 @@ Iterable generic Table Wrapper - `override function flush()` Remove all data from this map - `override function getAndRemove(K key) returns V` - Retrieves the value saved under the given key and removes it + Retrieves the value saved under the given key and removes it. + super.getAndRemove dispatches back into this class's remove(), which + already drops the key, so no second keys.remove() is needed here. - `iterator() returns HLIterator` Returns an iterator that iterates over the map's keys - `hasKey(K key) returns bool` diff --git a/_doc/stdlib/ref/data/LinkedList.md b/_doc/stdlib/ref/data/LinkedList.md index 883790c..abe22ab 100644 --- a/_doc/stdlib/ref/data/LinkedList.md +++ b/_doc/stdlib/ref/data/LinkedList.md @@ -48,17 +48,19 @@ public class LinkedList It does not add/remove elements internally, only the internal pointers of the list nodes are re-pointed. The other list will be empty, but not destroyed. - `get(int index) returns T` - Returns the element at the specified index + Returns the element at the specified index. + Errors if the index is outside [0, size). - `indexOf(T t) returns int` Returns the index of the specified element or -1 is it doesn't exist - `set(int index, T elem)` - Sets the element at the specified index + Sets the element at the specified index. + Errors if the index is outside [0, size). - `push(T elem)` Adds an element to the end of the list (top of stack, beginning of queue) - `getFirst() returns T` - Returns the first element in the list + Returns the first element in the list, or null if it is empty - `getLast() returns T` - Returns the last element in the list + Returns the last element in the list, or null if it is empty - `dequeue() returns T` Returns and removes the first added Element (FIFO) - `pop() returns T` @@ -101,24 +103,29 @@ public class LinkedList - `updateAll(LinkedListUpdater f)` Updates all elements - `shuffle()` - Performs a Fisher–Yates shuffle on this list + Performs a Fisher-Yates shuffle on this list. + Permutes the elements in place - no nodes are destroyed or reallocated. - `getRandomElement() returns T` - Returns a random element from this list or null, if empty + Returns a random element from this list, or null if it is empty - `addAt(T elem, int index)` - Adds the given element directly behind the element at the given index + Inserts the given element at the given index, shifting the element that + was there (and everything after it) one position to the right. + An index equal to the list's size appends to the end. - `sortWith(Comparator comparator)` Sorts the list according the the comparator using merge sort - `map(MapClosure itr) returns LinkedList` Returns the list obtained by applying the given closure to each element of the original list - `filter(LinkedListPredicate predicate) returns LinkedList` - Returns a new list of the elements that satisfy the predicate + Returns a new list of the elements that satisfy the predicate. + Builds the result directly instead of copying and pruning, so only the + matching elements are ever allocated. - `foldl(Q startValue, FoldClosure predicate) returns Q` 'Folds' this list into a single value of type Q Example int-list sum: `list.foldl(0, (i, q) -> q + i)` - `find(LinkedListPredicate predicate) returns T` Returns the first element that satisfies the predicate, or null if none present - `toString() returns string` - Prints the content of the list + Prints the content of the list. Only meaningful for int-like element types. - `clear()` Removes all elements from the list diff --git a/_doc/stdlib/ref/data/LinkedListModule.md b/_doc/stdlib/ref/data/LinkedListModule.md index c1977ce..93f7034 100644 --- a/_doc/stdlib/ref/data/LinkedListModule.md +++ b/_doc/stdlib/ref/data/LinkedListModule.md @@ -28,7 +28,9 @@ public module LinkedListModule - `construct()` - `static function getFirst() returns thistype` - `getNext() returns thistype` + The next instance, wrapping around to the first one at the end of the list - `getPrev() returns thistype` + The previous instance, wrapping around to the last one at the start of the list - `remove()` - `static function iterator() returns Iterator` An iterator which iterates over all instances of this class diff --git a/_doc/stdlib/ref/data/PriorityQueue.md b/_doc/stdlib/ref/data/PriorityQueue.md new file mode 100644 index 0000000..50eea4f --- /dev/null +++ b/_doc/stdlib/ref/data/PriorityQueue.md @@ -0,0 +1,32 @@ +--- +title: PriorityQueue +layout: stdlibref +category: data +categoryLabel: Data Structures +tags: + - data +source: 'https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/data/PriorityQueue.wurst' +generated: true +toc: sections +--- + +A binary heap priority queue. + +The comparator defines priority: a negative result means that the first +value has higher priority, so ArrayList.intComparator creates a min-heap. +Reverse the comparator to create a max-heap. Equal-priority elements are +not stable. + +Adding and removing the highest-priority element are O(log n). Peeking is +O(1). The queue does not support changing an element's priority in place; +remove and re-add it after changing any fields used by the comparator. + +**[Source on GitHub](https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/data/PriorityQueue.wurst)** + +## Classes + +### PriorityQueue + +```wurst +public class PriorityQueue +``` diff --git a/_doc/stdlib/ref/data/ShardedIntStorage.md b/_doc/stdlib/ref/data/ShardedIntStorage.md new file mode 100644 index 0000000..9892bfe --- /dev/null +++ b/_doc/stdlib/ref/data/ShardedIntStorage.md @@ -0,0 +1,33 @@ +--- +title: ShardedIntStorage +layout: stdlibref +category: data +categoryLabel: Data Structures +tags: + - data +source: 'https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/data/ShardedIntStorage.wurst' +generated: true +toc: sections +--- + +A shared integer arena spanning multiple native JASS arrays. Allocations are +contiguous logical address ranges and released adjacent ranges are coalesced. + +**[Source on GitHub](https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/data/ShardedIntStorage.wurst)** + +## Classes + +### ShardedIntStorage + +```wurst +public class ShardedIntStorage +``` + +**Members:** + +- `static function capacity() returns int` +- `static function get(int address) returns int` +- `static function set(int address, int value)` +- `static function tryAllocate(int size) returns int` +- `static function allocate(int size) returns int` +- `static function release(int start, int size)` diff --git a/_doc/stdlib/ref/data/SparseSet.md b/_doc/stdlib/ref/data/SparseSet.md new file mode 100644 index 0000000..bff4e8b --- /dev/null +++ b/_doc/stdlib/ref/data/SparseSet.md @@ -0,0 +1,67 @@ +--- +title: SparseSet +layout: stdlibref +category: data +categoryLabel: Data Structures +tags: + - data +source: 'https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/data/SparseSet.wurst' +generated: true +toc: sections +--- + +A set with O(1) membership checks, insertion, and unordered removal. + +Elements are stored in a dense typed array. The sparse index maps the key +supplied by SparseSetKey to the element's dense index. Keys must be unique +and stable for the lifetime of an element in the set. A key may be reused +after its old value is gone; add() validates the stored value before +accepting the new one. + +Removal swaps the last element into the removed element's slot, so dense +iteration order is not preserved. + +**[Source on GitHub](https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/data/SparseSet.wurst)** + +**Re-exports:** `TypeCasting` + +## Classes + +### SparseSet + +```wurst +public class SparseSet +``` + +### UnitSparseSetKey + +```wurst +public class UnitSparseSetKey implements SparseSetKey +``` + +Key provider for unit sets. + +This deliberately uses the native handle identity rather than UnitIndexer +IDs. That matches native groups: membership is not automatically removed +when a unit is deindexed. SparseSet validates the stored unit when a key is +reused, so a new unit cannot silently inherit stale membership. + +## Interfaces + +### SparseSetKey + +```wurst +public interface SparseSetKey +``` + +Supplies the stable, unique integer key used by a SparseSet. + +## Constants + +### UNIT_SPARSE_SET_KEY + +```wurst +public constant SparseSetKey UNIT_SPARSE_SET_KEY = new UnitSparseSetKey() +``` + +Reusable key provider for SparseSet. diff --git a/_doc/stdlib/ref/data/SparseSetBenchmark.md b/_doc/stdlib/ref/data/SparseSetBenchmark.md new file mode 100644 index 0000000..c656c28 --- /dev/null +++ b/_doc/stdlib/ref/data/SparseSetBenchmark.md @@ -0,0 +1,21 @@ +--- +title: SparseSetBenchmark +layout: stdlibref +category: data +categoryLabel: Data Structures +tags: + - data +source: 'https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/data/SparseSetBenchmark.wurst' +generated: true +toc: sections +--- + +**[Source on GitHub](https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/data/SparseSetBenchmark.wurst)** + +## Functions + +### startSparseSetBenchmark + +```wurst +public function startSparseSetBenchmark() +``` diff --git a/_doc/stdlib/ref/event/DamageEvent.md b/_doc/stdlib/ref/event/DamageEvent.md index 9e28de9..f5cb2d9 100644 --- a/_doc/stdlib/ref/event/DamageEvent.md +++ b/_doc/stdlib/ref/event/DamageEvent.md @@ -17,7 +17,10 @@ This package provides a light-weight damage detection system with priority-order **IMPORTANT** This package **doesn't** provide protection from cyclic damage. Damage from code **must** be declared by the user using DamageEvent.setNextDamageFromCode() before dealing damage. - If you set damage amount to zero or less in the unreduced listeners, reduced listeners will not fire. + Setting the damage amount to zero or less in the unreduced listeners does **not** skip the reduced + listeners: EVENT_PLAYER_UNIT_DAMAGED still fires and they run with an amount of zero. + (This corrects an older note here which claimed the opposite. Verified in game by check 10 of + package StdlibIngameTests.) if DETECT_NATIVE_ABILITIES is true: ```wurst @@ -36,7 +39,7 @@ If the order of firing of the listeners is important, the user can give a priori DamageEvent.addListener(0) -> print("This fires before.") -If you want to catch the damage instance before it has been reduced by any damage reducing effect (such as armor) you can use the unreduced verions of the listeners: +If you want to catch the damage instance before it has been reduced by any damage reducing effect (such as armor) you can use the unreduced versions of the listeners: DamageEvent.addUnreducedListener() -> print("this fire before any damage reduction") @@ -87,7 +90,7 @@ Each damage instance can have a DamageElement associated to it. DAMAGE_ELEMENT_FIRE = new DamageElement("Fire", colorA(255, 0, 0, 255)) DAMAGE_ELEMENT_WATER = new DamageElement("Water", colorA(0, 0, 255, 255)) - The user can extends from DamageElement to add his own settings. + DamageElement can be extended to carry additional per-element settings. ### DamageEvent @@ -156,4 +159,4 @@ public constant DAMAGE_ELEMENT_ATTACK = new DamageElement("Physical", colorA(223 > 🔧 **Configurable.** Override it in your map's config package. A damage instance can have an element. - DAMAGE_ELEMENT_ATTACK is the defaut element added to any damage instances of DamageType ATTACK + DAMAGE_ELEMENT_ATTACK is the default element added to any damage instances of DamageType ATTACK diff --git a/_doc/stdlib/ref/file/ByteBuffer.md b/_doc/stdlib/ref/file/ByteBuffer.md index cb7d288..82a40c6 100644 --- a/_doc/stdlib/ref/file/ByteBuffer.md +++ b/_doc/stdlib/ref/file/ByteBuffer.md @@ -35,8 +35,13 @@ public class ByteBuffer - `writeInt(int n)` Writes a signed integer into the buffer. - `hasByte() returns bool` + Returns whether at least one unread byte remains. + Compares against the total byte count rather than the internal int index, + so a buffer whose size is an exact multiple of 4 does not report a + phantom trailing byte from the empty write buffer. - `readByte() returns int` - Reads a single unsigned byte from this buffer. The returned value will be in the range [0, 255]. * + Reads a single unsigned byte from this buffer. The returned value will be in the range [0, 255]. + Reading past the end yields 0; guard with hasByte(). * - `readShort() returns int` Reads a single unsigned short from this buffer. The returned value will be in the range [0, 65535]. * - `readInt() returns int` @@ -44,6 +49,8 @@ public class ByteBuffer - `resetRead()` - `getInt(int i) returns int` - `getIntCount() returns int` + Number of ints backing this buffer, counting the partially filled write + buffer as one. An empty buffer therefore reports 1, not 0. - `size() returns int` Returns the number of bytes in the buffer. * - `getByte(int i) returns int` diff --git a/_doc/stdlib/ref/file/FileIO.md b/_doc/stdlib/ref/file/FileIO.md index df7f641..5e8252b 100644 --- a/_doc/stdlib/ref/file/FileIO.md +++ b/_doc/stdlib/ref/file/FileIO.md @@ -29,7 +29,11 @@ public class File - `write(player p, ChunkedString buffer)` - `close()` - `read(player p) returns ChunkedString` + Reads the file's contents. Only the given player actually reads from + disk; every other client gets an empty ChunkedString, so the result is + not synchronised - see the desync warning at the top of this package. - `readAsString(player p) returns string` + Reads the file's contents as one string. Not synchronised - see read(). ## Constants diff --git a/_doc/stdlib/ref/file/SyncSimple.md b/_doc/stdlib/ref/file/SyncSimple.md index 06ce47d..ba72cf2 100644 --- a/_doc/stdlib/ref/file/SyncSimple.md +++ b/_doc/stdlib/ref/file/SyncSimple.md @@ -10,6 +10,10 @@ generated: true toc: sections --- +Generic sync listener for arbitrary types that can be cast to/from int. + Only works for values representable as an int (class instances, handle ids). + The synced object must already be in sync across all clients. + **[Source on GitHub](https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/file/SyncSimple.wurst)** ## Interfaces @@ -64,6 +68,16 @@ public interface BufferSyncListener - `onDataSynced(ChunkedString buffer)` +### AnySyncListener + +```wurst +public interface AnySyncListener +``` + +**Members:** + +- `onDataSynced(T data)` + ## Extension Functions ### bool.sync @@ -90,6 +104,16 @@ public function real.sync(player p, RealSyncListener listener) Syncs a real from the given player. +### player.sync + +```wurst +public function player.sync(T data, AnySyncListener listener) +``` + +Syncs an arbitrary type from the given player. + Only works for values representable as an int handle/index (class instances, handle ids). + The synced object must already be in sync across clients. Listener is destroyed after firing. + ### string.sync ```wurst diff --git a/_doc/stdlib/ref/index.md b/_doc/stdlib/ref/index.md index 84cd99f..5cd061c 100644 --- a/_doc/stdlib/ref/index.md +++ b/_doc/stdlib/ref/index.md @@ -38,16 +38,21 @@ If you are choosing a capability, start with the [standard library overview](/st - [HashSet](/stdlib/ref/data/HashSet.html): Generic set implementation - [LinkedList](/stdlib/ref/data/LinkedList.html): Doubly-linked list implementation that implements all common list, stack and queue operations. - [LinkedListModule](/stdlib/ref/data/LinkedListModule.html): Turns a class into a linked list where each instance knows it's previous +- [PriorityQueue](/stdlib/ref/data/PriorityQueue.html): A binary heap priority queue. +- [ShardedIntStorage](/stdlib/ref/data/ShardedIntStorage.html): A shared integer arena spanning multiple native JASS arrays. +- [SparseSet](/stdlib/ref/data/SparseSet.html): A set with O(1) membership checks, insertion, and unordered removal. +- [SparseSetBenchmark](/stdlib/ref/data/SparseSetBenchmark.html) - [Table](/stdlib/ref/data/Table.html): Wraps a hashtable to provide single key tables ## Closures - [ClosureEvents](/stdlib/ref/closures/ClosureEvents.html): This package is a comfort wrapper around wc3 events, -- [ClosureForGroups](/stdlib/ref/closures/ClosureForGroups.html): Executes the given closure for every unit in this group, +- [ClosureForGroups](/stdlib/ref/closures/ClosureForGroups.html): Executes the given closure for every unit of the given type. - [ClosureFrames](/stdlib/ref/closures/ClosureFrames.html) - [ClosureKeyPresses](/stdlib/ref/closures/ClosureKeyPresses.html) - [ClosureTimers](/stdlib/ref/closures/ClosureTimers.html): Execute an action after a certain time. - [Execute](/stdlib/ref/closures/Execute.html): This package exposes a single function execute(), +- [SpatialIndexForUnits](/stdlib/ref/closures/SpatialIndexForUnits.html) ## Events @@ -73,8 +78,11 @@ If you are choosing a capability, start with the [standard library overview](/st - [Bitwise](/stdlib/ref/math/Bitwise.html): A tuple containing 4 bytes comprising a 4-byte integer. - [BitwiseInit](/stdlib/ref/math/BitwiseInit.html) - [Interpolation](/stdlib/ref/math/Interpolation.html): Linear Interpolation +- [LineGeometry](/stdlib/ref/math/LineGeometry.html) - [Maths](/stdlib/ref/math/Maths.html): Returns the length of the hypotenuse of a right-angle triangle with the - [Matrices](/stdlib/ref/math/Matrices.html): Matrix 2x2 +- [PathingGrid](/stdlib/ref/math/PathingGrid.html) +- [Polygon](/stdlib/ref/math/Polygon.html): An immutable closed 2D path after seal(). - [Quaternion](/stdlib/ref/math/Quaternion.html): Linear interpolation. - [Raycast](/stdlib/ref/math/Raycast.html): An infinite 2D ray - [Vectors](/stdlib/ref/math/Vectors.html): A vector is a geometric object that has a length and direction. @@ -90,7 +98,7 @@ If you are choosing a capability, start with the [standard library overview](/st - [SaveLoadData](/stdlib/ref/file/SaveLoadData.html): Asynchronously loads the data from the file of the given player - [Serializable](/stdlib/ref/file/Serializable.html) - [SQLite](/stdlib/ref/file/SQLite.html) -- [SyncSimple](/stdlib/ref/file/SyncSimple.html) +- [SyncSimple](/stdlib/ref/file/SyncSimple.html): Generic sync listener for arbitrary types that can be cast to/from int. ## Utilities @@ -99,7 +107,7 @@ If you are choosing a capability, start with the [standard library overview](/st - [Colors](/stdlib/ref/util/Colors.html): Mixes two colors, s would be a number 0<=s<=1 that determines - [DialogBox](/stdlib/ref/util/DialogBox.html): DialogBox lets you create dialogs more easily and associate its buttons with closures. - [EffectUtils](/stdlib/ref/util/EffectUtils.html) -- [GameTimer](/stdlib/ref/util/GameTimer.html) +- [GameTimer](/stdlib/ref/util/GameTimer.html): Seconds elapsed since map start. - [GroupUtils](/stdlib/ref/util/GroupUtils.html): The max number of recyclable groups. - [Knockback3](/stdlib/ref/util/Knockback3.html): Use the `Knockback3.add(..)` functions to apply 3D knockback to units. - [MapBounds](/stdlib/ref/util/MapBounds.html) @@ -114,6 +122,8 @@ If you are choosing a capability, start with the [standard library overview](/st - [Time](/stdlib/ref/util/Time.html): Type-safe wrappers to distinguish durations (an amount of time) from instants (a point in time), and the valid ways - [TimerUtils](/stdlib/ref/util/TimerUtils.html): Get a new timer. - [UnitIndexer](/stdlib/ref/util/UnitIndexer.html): Returns the int index of this unit. +- [UnitSpatialIndex](/stdlib/ref/util/UnitSpatialIndex.html): Registers or re-buckets one unit immediately. +- [UnitSpatialIndexRemoval](/stdlib/ref/util/UnitSpatialIndexRemoval.html) ## Handle Wrappers @@ -134,7 +144,7 @@ If you are choosing a capability, start with the [standard library overview](/st - [Group](/stdlib/ref/_handles/Group.html): Use this group for your non-nested group enum calls - [Hashtable](/stdlib/ref/_handles/Hashtable.html) - [Image](/stdlib/ref/_handles/Image.html): ImageLayer influences the order in which the images are drawn above one another -- [Integer](/stdlib/ref/_handles/Integer.html) +- [Integer](/stdlib/ref/_handles/Integer.html): Returns this int to the power of the argument int. - [Item](/stdlib/ref/_handles/Item.html): Updates the item's name, tooltip, extendedtooltip, description or icon for the specific player. - [Lightning](/stdlib/ref/_handles/Lightning.html) - [Multiboard](/stdlib/ref/_handles/Multiboard.html) diff --git a/_doc/stdlib/ref/math/Angle.md b/_doc/stdlib/ref/math/Angle.md index dddc560..148be14 100644 --- a/_doc/stdlib/ref/math/Angle.md +++ b/_doc/stdlib/ref/math/Angle.md @@ -66,7 +66,7 @@ interpret this real as an angle given in degrees public function real.fromRad() returns angle ``` -interpret this real as an angle given in degrees +interpret this real as an angle given in radians ### int.fromRad @@ -74,7 +74,7 @@ interpret this real as an angle given in degrees public function int.fromRad() returns angle ``` -interpret this int as an angle given in degrees +interpret this int as an angle given in radians ### int.asAngleRadians diff --git a/_doc/stdlib/ref/math/Bitwise.md b/_doc/stdlib/ref/math/Bitwise.md index 927e30d..dcbee4a 100644 --- a/_doc/stdlib/ref/math/Bitwise.md +++ b/_doc/stdlib/ref/math/Bitwise.md @@ -118,7 +118,8 @@ Input string may contain whitespace for padding. public function int.toBitString() returns string ``` -Produces a bistring from this integer. +Produces a bitstring from this integer. Zero yields "0", and negative +values yield their full 32 bit two's complement representation. * ### int.not8 @@ -222,6 +223,8 @@ public function int.shiftl(int amount) returns int 32-bit SHIFTL (<<) number.shiftl(amount) equivalent to (number << amount) +Bits shifted past bit 31 are discarded, so a shift of 32 yields 0. +`amount` must be in [0, 32]; other values read outside the shift table. * ### int.shiftr @@ -230,7 +233,13 @@ number.shiftl(amount) equivalent to (number << amount) public function int.shiftr(int amount) returns int ``` -32-bit SHIFTR (>>) +32-bit logical SHIFTR (>>>) -number.shiftr(amount) equivalent to (number >> amount) +number.shiftr(amount) equivalent to (number >>> amount): the sign bit is +shifted in as data rather than replicated, so negative inputs produce a +positive result for any amount > 0. + +`amount` must be in [0, 31] - one less than shiftl accepts. The shift table +holds 2^32 as 0 after wrapping, so an amount of 32 divides by zero rather +than returning 0. Guard the call if the amount is computed. * diff --git a/_doc/stdlib/ref/math/Interpolation.md b/_doc/stdlib/ref/math/Interpolation.md index c606795..376ad97 100644 --- a/_doc/stdlib/ref/math/Interpolation.md +++ b/_doc/stdlib/ref/math/Interpolation.md @@ -76,7 +76,9 @@ This function returns the derivate of the 4-Point-Bezier curve on certain point. public function hermite(real start, real stop, real tangent1, real tangent2, real s) returns real ``` -Hermite Interpolation +Cubic Hermite interpolation between `start` and `stop` for s in [0, 1], + with `tangent1` and `tangent2` as the derivatives at s = 0 and s = 1. + The basis is h00 = 2s^3-3s^2+1, h10 = s^3-2s^2+s, h01 = -2s^3+3s^2, h11 = s^3-s^2. ### inTan diff --git a/_doc/stdlib/ref/math/LineGeometry.md b/_doc/stdlib/ref/math/LineGeometry.md new file mode 100644 index 0000000..79a735b --- /dev/null +++ b/_doc/stdlib/ref/math/LineGeometry.md @@ -0,0 +1,66 @@ +--- +title: LineGeometry +layout: stdlibref +category: math +categoryLabel: Math +tags: + - math +source: 'https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/math/LineGeometry.wurst' +generated: true +toc: sections +--- + +**[Source on GitHub](https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/math/LineGeometry.wurst)** + +## Tuples + +### lineFormular + +```wurst +public tuple lineFormular(real m, real b) +``` + +Line formula tuple representing y = m*x + b where m is slope and b is y-intercept + +## Extension Functions + +### real.getYOnLine + +```wurst +public function real.getYOnLine(lineFormular line) returns real +``` + +Returns f(x) = m*x + b for a given x value on a line + +### real.getXOnLine + +```wurst +public function real.getXOnLine(lineFormular line) returns real +``` + +Returns the x value for a given y on a line: x = (y - b) / m + +### vec2.getLineFormular + +```wurst +public function vec2.getLineFormular(vec2 p) returns lineFormular +``` + +Returns the line formula for the line passing through this point and p. + WARNING: Undefined behavior for vertical lines (p.x == this.x causes division by zero). + +### lineFormular.getParallelLineWithOrthogonalDistance + +```wurst +public function lineFormular.getParallelLineWithOrthogonalDistance(real d) returns lineFormular +``` + +Returns a parallel line with orthogonal distance d from the original line + +### vec2.getOrthogonalSidePoint + +```wurst +public function vec2.getOrthogonalSidePoint(lineFormular line, real d) returns vec2 +``` + +Returns a point on the side of a line at orthogonal distance d diff --git a/_doc/stdlib/ref/math/Maths.md b/_doc/stdlib/ref/math/Maths.md index 9aa1beb..a86e775 100644 --- a/_doc/stdlib/ref/math/Maths.md +++ b/_doc/stdlib/ref/math/Maths.md @@ -99,7 +99,7 @@ PI constant ### PI2 ```wurst -public constant real PI2 = 6.28318 +public constant real PI2 = 6.283185307 ``` PI * 2 constant diff --git a/_doc/stdlib/ref/math/PathingGrid.md b/_doc/stdlib/ref/math/PathingGrid.md new file mode 100644 index 0000000..c2ab8f3 --- /dev/null +++ b/_doc/stdlib/ref/math/PathingGrid.md @@ -0,0 +1,65 @@ +--- +title: PathingGrid +layout: stdlibref +category: math +categoryLabel: Math +tags: + - math +source: 'https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/math/PathingGrid.wurst' +generated: true +toc: sections +--- + +**[Source on GitHub](https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/math/PathingGrid.wurst)** + +## Tuples + +### pathingCell + +```wurst +public tuple pathingCell(int x, int y) +``` + +Global pathing-grid coordinates. Cell bounds are inclusive at min and exclusive at max. + +## Extension Functions + +### vec2.toPathingCell + +```wurst +public function vec2.toPathingCell() returns pathingCell +``` + +### vec3.toPathingCell + +```wurst +public function vec3.toPathingCell() returns pathingCell +``` + +### pathingCell.min + +```wurst +public function pathingCell.min() returns vec2 +``` + +### pathingCell.max + +```wurst +public function pathingCell.max() returns vec2 +``` + +### pathingCell.center + +```wurst +public function pathingCell.center() returns vec2 +``` + +## Constants + +### PATHING_CELL_SIZE + +```wurst +public constant real PATHING_CELL_SIZE = 32. +``` + +Warcraft III pathing cells are 32 world units wide and high. diff --git a/_doc/stdlib/ref/math/Polygon.md b/_doc/stdlib/ref/math/Polygon.md new file mode 100644 index 0000000..9e6d349 --- /dev/null +++ b/_doc/stdlib/ref/math/Polygon.md @@ -0,0 +1,89 @@ +--- +title: Polygon +layout: stdlibref +category: math +categoryLabel: Math +tags: + - math +source: 'https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/math/Polygon.wurst' +generated: true +toc: sections +--- + +An immutable closed 2D path after seal(). Polygon owns its copied vertex +storage and cached bounds rect. Call destroy when finished: it releases both, +and invalidates every rect previously borrowed from bounds(). + +**[Source on GitHub](https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/math/Polygon.wurst)** + +## Classes + +### Polygon + +```wurst +public class Polygon +``` + +**Members:** + +- `construct(int expectedVertexCount)` + Builder form. expectedVertexCount is a capacity hint. Call seal() before querying. +- `construct(vararg vec2 initialVertices)` + Convenience form. Copies the supplied vertices and seals immediately. +- `addVertex(vec2 vertex) returns thistype` + Appends a copied vertex before seal(). Adding after seal() is a programmer error. +- `seal() returns thistype` + Finalizes immutable query state and creates Polygon's owned bounds rect. + Repeated calls preserve the same rect handle. Polygon removes that rect + when it is destroyed; callers must not remove its borrowed bounds(). +- `isSealed() returns bool` +- `vertexCount() returns int` +- `vertexAt(int index) returns vec2` +- `bounds() returns rect` + Returns Polygon's borrowed cached rect. Polygon retains ownership: callers + must not remove or destroy it, and must not use it after Polygon is + destroyed. +- `boundsCenter() returns vec2` +- `classifyLinear(vec2 point) returns PolygonPointRelation` + Exact division-free O(n) reference implementation and grid fallback. +- `cellCoverage(vec2 point) returns PolygonCellCoverage` +- `cellCoverage(vec3 point) returns PolygonCellCoverage` +- `cellCandidateEdgeCount(vec2 point) returns int` + Number of exact edge candidates classify() examines for this point. +- `classify(vec2 point) returns PolygonPointRelation` +- `contains(vec2 point) returns bool` +- `containsStrict(vec2 point) returns bool` +- `debugRender() returns ArrayList` + Draws every edge in standard green. Ownership transfers to the caller: + destroy every returned lightning handle, then destroy the returned list. +- `debugRender(color col) returns ArrayList` + Draws every edge in the requested color. Ownership transfers to the caller: + destroy every returned lightning handle, then destroy the returned list. +- `debugRenderTimed(real duration)` + Draws in standard green. Polygon retains ownership of all created lightning + handles and its internal list, and destroys both after duration. duration + must be positive. +- `debugRenderTimed(real duration, color col)` + Draws in the requested color. Polygon retains ownership of all created + lightning handles and its internal list, and destroys both after duration. + duration must be positive. + +## Enums + +### PolygonPointRelation + +```wurst +public enum PolygonPointRelation +``` + +**Values:** `OUTSIDE`, `BOUNDARY`, `INSIDE` + +### PolygonCellCoverage + +```wurst +public enum PolygonCellCoverage +``` + +Coverage of one cached pathing-grid cell, not the relation of one point. + +**Values:** `OUTSIDE`, `MIXED`, `INSIDE` diff --git a/_doc/stdlib/ref/math/Vectors.md b/_doc/stdlib/ref/math/Vectors.md index fca2fb6..01235ab 100644 --- a/_doc/stdlib/ref/math/Vectors.md +++ b/_doc/stdlib/ref/math/Vectors.md @@ -88,7 +88,7 @@ Operator public function vec2.op_mult(vec2 v) returns vec2 ``` -dot product Operator +Operator, component-wise (Hadamard) product. For the dot product use vec2.dot ### vec2.op_divReal @@ -291,8 +291,6 @@ Checks whether the point is in a triangle defined by 3 points. public function vec2.isInPolygon(vararg vec2 args) returns bool ``` -Checks whether the point is in a polygon defined by a sequence of connected points. - ### vec3.op_plus ```wurst @@ -339,7 +337,7 @@ Operator public function real.op_mult(vec3 v) returns vec3 ``` -dot Operator +Operator, scales the vector by this scalar ### vec3.add @@ -379,7 +377,9 @@ Rotate this vector around an axis public function vec3.setLengthSq(real lengthSq) returns vec3 ``` -Sets the length of the given Vector +Returns this vector rescaled so that its *squared* length equals the given + value. Scaling by lengthSq/currentSq would give a squared length of + lengthSq^2/currentSq, so the factor has to be the square root of the ratio. ### vec3.setLength @@ -435,7 +435,18 @@ Convert a vec3 to a vec2 (z-coordinate gets removed) public function vec3.inRange(vec3 v2, real radius) returns boolean ``` -Is this vector inside the given circle +Is this vector inside the given circle. Only the x and y coordinates are + compared - the height difference is ignored. Use inRange3d for a spherical + test that includes z. + +### vec3.inRange3d + +```wurst +public function vec3.inRange3d(vec3 v2, real radius) returns boolean +``` + +Is this vector inside the given sphere, taking the z coordinate into + account. Compare vec3.inRange, which only compares x and y. ### vec3.distanceTo @@ -601,9 +612,6 @@ Works as for vec2.isInTriangle, Z-coords are discarded. public function vec3.isInPolygon2d(vararg vec3 args) returns bool ``` -Checks whether the point is in a 2d polygon defined by a sequence of connected points. -Works as for vec2.isInPolygon, Z-coords are discarded. - ## Constants ### ZERO2 diff --git a/_doc/stdlib/ref/objediting/ObjectIdGenerator.md b/_doc/stdlib/ref/objediting/ObjectIdGenerator.md index 80f3926..50030eb 100644 --- a/_doc/stdlib/ref/objediting/ObjectIdGenerator.md +++ b/_doc/stdlib/ref/objediting/ObjectIdGenerator.md @@ -46,6 +46,8 @@ public constant HERO_ID_GEN = new IdGenerator('HM00') public constant ABIL_ID_GEN = new IdGenerator('AM00') ``` +> 🔧 **Configurable.** Override it in your map's config package. + ### BUFF_ID_GEN ```wurst diff --git a/_doc/stdlib/ref/objediting/ObjectIds.md b/_doc/stdlib/ref/objediting/ObjectIds.md index 8cdbc6c..a51a18a 100644 --- a/_doc/stdlib/ref/objediting/ObjectIds.md +++ b/_doc/stdlib/ref/objediting/ObjectIds.md @@ -12,6 +12,8 @@ toc: sections **[Source on GitHub](https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/objediting/ObjectIds.wurst)** +**Re-exports:** `TypeCasting` + ## Functions ### toRawCode diff --git a/_doc/stdlib/ref/util/Colors.md b/_doc/stdlib/ref/util/Colors.md index 42cc3f3..01b2dce 100644 --- a/_doc/stdlib/ref/util/Colors.md +++ b/_doc/stdlib/ref/util/Colors.md @@ -285,6 +285,9 @@ public constant COLOR_WHITE = colorA(255,255,255,255) public constant COLOR_BLACK = colorA(0,0,0,0) ``` +Black with alpha 0, i.e. fully transparent. COLOR_BLACK_STR therefore + renders text invisible - use colorA(0, 0, 0, 255) for opaque black. + ### COLOR_GOLD ```wurst diff --git a/_doc/stdlib/ref/util/GameTimer.md b/_doc/stdlib/ref/util/GameTimer.md index ae939f3..2a2dab2 100644 --- a/_doc/stdlib/ref/util/GameTimer.md +++ b/_doc/stdlib/ref/util/GameTimer.md @@ -10,6 +10,14 @@ generated: true toc: sections --- +Seconds elapsed since map start. + +Caveat for @Test code: the compiletime interpreter backs this with the +wall clock, so it returns a unix epoch timestamp (~1.7e9). At that +magnitude a 32 bit real only resolves ~128 second steps, so instants built +from smaller offsets are indistinguishable from instantNow() there. Build +instants explicitly, e.g. instant(10.), when unit testing package Time. + **[Source on GitHub](https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/GameTimer.wurst)** ## Functions diff --git a/_doc/stdlib/ref/util/GroupUtils.md b/_doc/stdlib/ref/util/GroupUtils.md index 45158a2..871d00c 100644 --- a/_doc/stdlib/ref/util/GroupUtils.md +++ b/_doc/stdlib/ref/util/GroupUtils.md @@ -45,6 +45,32 @@ Recycles a group if it is created through GroupUtils, otherwise just destroys it public function group.recyclableIterator() returns group ``` +Copies this group's units into a freshly acquired recyclable group and + returns it, so the copy can be iterated while the original is modified. + The caller owns the result and must call .release() on it. + + Not re-entrant: the copy is staged through a single package global, so this + must not be called again from inside an iteration over its own result. + +### group.getClosestUnit + +```wurst +public function group.getClosestUnit(vec2 pos) returns unit +``` + +Returns the closest unit in this group to the given position. + Returns null if the group is empty. + +### group.filterAliveUnits + +```wurst +public function group.filterAliveUnits(unit mustBeEnemyOf, int ownerId) returns group +``` + +Filters this group to include only alive units, optionally filtering by allegiance and owner. + mustBeEnemyOf: If not null, only units that are enemies of this unit are kept. Pass null to ignore allegiance. + ownerId: If not -1, only units owned by this player ID are kept. Pass -1 to ignore owner. + ## Constants ### GROUP_NUMBER_LIMIT diff --git a/_doc/stdlib/ref/util/Knockback3.md b/_doc/stdlib/ref/util/Knockback3.md index 0c1085d..f5c190f 100644 --- a/_doc/stdlib/ref/util/Knockback3.md +++ b/_doc/stdlib/ref/util/Knockback3.md @@ -52,16 +52,29 @@ public class Knockback3 Apply a knockback vector to unit u. `velocity` is initial speed in units per second. `groundAngle` and `airAngle` are the direction and trajectory parameters, respectively. Example: + + ```wurst + Knockback3.add(u, 1000., 0 .fromDeg(), 45 .fromDeg()) + ``` - `static function add(unit u, vec2 target, real groundSpeed)` Apply a knockback vector to unit u. If the unit is stopped, this vector will throw the unit to the position at vec2 `target`. Along the XY-plane, the unit will move `groundSpeed` units per second. Note that the more vertical angle will always be used from the pair of possible trajectories. Example: + + ```wurst + Knockback3.add(caster, getSpellTargetPos(), 500.) + ``` - `static function setVel(unit u, real velocity, angle groundAngle, angle airAngle)` Setter for the knockback vector on unit u. If the unit is not already tracked, this has the same behavior as `add`. - `static function getVel(unit u) returns vec3` - Getter for the knockback vector on unit u. If the unit is not already tracked, returns (0, 0, 0). + Getter for the knockback vector on unit u, as a per-tick displacement + (speed * ANIMATION_PERIOD) - note that `add` and `setVel` take units per + *second*. Returns (0, 0, 0) if the unit is not tracked. +- `static function getVelPerSecond(unit u) returns vec3` + Getter for the knockback velocity on unit u in units per second, i.e. in + the same units that `add` and `setVel` accept. - `static function forget(unit u)` Stop tracking unit u. If the unit is middair it will simply stop moving. If the unit is already untracked, nothing happens. diff --git a/_doc/stdlib/ref/util/Printing.md b/_doc/stdlib/ref/util/Printing.md index 93955f7..978599c 100644 --- a/_doc/stdlib/ref/util/Printing.md +++ b/_doc/stdlib/ref/util/Printing.md @@ -31,7 +31,7 @@ public class Log - `static function warn(string msg)` Prints a warning logmessage - `static function error(string msg)` - Prints a warning logmessage + Prints an error logmessage - `static function setLevel(Loglevel lvl)` ## Enums @@ -94,7 +94,7 @@ public function printLog(Loglevel loglvl, string msg) > 🔧 **Configurable.** Override it in your map's config package. -Prints a special motification-message +Prints a special notification-message ### printLog diff --git a/_doc/stdlib/ref/util/StringUtils.md b/_doc/stdlib/ref/util/StringUtils.md index f2dc6b6..5b648ee 100644 --- a/_doc/stdlib/ref/util/StringUtils.md +++ b/_doc/stdlib/ref/util/StringUtils.md @@ -11,8 +11,10 @@ toc: sections --- Returns the width of the string. - Only accounts for single byte (latin) characters, multibyte characters - contribute no width. + Only meaningful for single byte (latin) characters. Each byte of a + multibyte (non-latin) character is looked up individually and falls back to + the width of a space, so the result for non-latin text is an approximation + rather than a true width. **[Source on GitHub](https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/StringUtils.wurst)** @@ -160,7 +162,9 @@ Custom Function which can split strings and runs callback for each string. public function string.isNumber() returns bool ``` -Checks whether a string is a number or not. +Checks whether a string is a decimal number: an optional leading "-", + at least one digit, and at most one decimal point. + "", "-", "." and "-." are not numbers. ### string.isValidDescription diff --git a/_doc/stdlib/ref/util/Time.md b/_doc/stdlib/ref/util/Time.md index 15931e5..8ca31e8 100644 --- a/_doc/stdlib/ref/util/Time.md +++ b/_doc/stdlib/ref/util/Time.md @@ -326,7 +326,7 @@ Provides duration until an instant. Convenience for the negative of durationSinc public function instant.isOlderThan(instant other) returns bool ``` -Instant > instant ? +True if this instant happened before `other`. ### instant.isNewerThan @@ -334,7 +334,7 @@ Instant > instant ? public function instant.isNewerThan(instant other) returns bool ``` -Instant < instant ? +True if this instant happens after `other`. ### duration.greaterThan @@ -374,7 +374,7 @@ Convenience for checking if an instant comes before instantNow. public function duration.displayVerbose() returns string ``` -Tranform a duration to a verbose string. Example: +Transform a duration to a verbose string. Example: 61..seconds().displayVerbose() ```wurst @@ -387,7 +387,7 @@ Tranform a duration to a verbose string. Example: public function duration.display(string prefix) returns string ``` -Tranform a duration to a short string. Example: +Transform a duration to a short string. Example: 61..minutes().display("T-") ```wurst diff --git a/_doc/stdlib/ref/util/TimerUtils.md b/_doc/stdlib/ref/util/TimerUtils.md index 15b614a..86f45cd 100644 --- a/_doc/stdlib/ref/util/TimerUtils.md +++ b/_doc/stdlib/ref/util/TimerUtils.md @@ -41,13 +41,15 @@ public module TimedLoop - `abstract function onTimedLoop()` - `getPeriod() returns real` Returns the period of the timed loop. - Ovewrite this to set a custom period + Overwrite this to set a custom period. It is read once, when the first + instance of this class starts its loop. - `stopTimedLoop()` Stops the periodic update of this object. - `stopTimedLoopAndDestroy()` Stops the periodic update and destroys the object. - `startTimedLoop()` - Starts the periodic updates for this object + Starts the periodic updates for this object. + Calling this on an already running instance has no effect. ## Functions diff --git a/_doc/stdlib/ref/util/UnitSpatialIndex.md b/_doc/stdlib/ref/util/UnitSpatialIndex.md new file mode 100644 index 0000000..038aef1 --- /dev/null +++ b/_doc/stdlib/ref/util/UnitSpatialIndex.md @@ -0,0 +1,204 @@ +--- +title: UnitSpatialIndex +layout: stdlibref +category: util +categoryLabel: Utilities +tags: + - util +source: 'https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/UnitSpatialIndex.wurst' +generated: true +toc: sections +--- + +Registers or re-buckets one unit immediately. Ordinary movement does not need this - the sweep +covers it - but an engine-side teleport or a raw `SetUnitX` call does, because neither is +observable. + +**[Source on GitHub](https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/UnitSpatialIndex.wurst)** + +## Functions + +### spatialIndexHealthy + +```wurst +public function spatialIndexHealthy() returns boolean +``` + +Whether the Lua spatial index is active and can serve indexed queries. + +### spatialIndexWorstStaleness + +```wurst +public function spatialIndexWorstStaleness() returns real +``` + +Guaranteed upper staleness bound in seconds used to derive query padding. + +### spatialIndexObservedStaleness + +```wurst +public function spatialIndexObservedStaleness() returns real +``` + +Observed staleness in seconds; diagnostic only, never safe for padding. + +### spatialIndexTrackedUnits + +```wurst +public function spatialIndexTrackedUnits() returns int +``` + +How many units the sweep currently cycles over. + +### spatialIndexAllocatedSlots + +```wurst +public function spatialIndexAllocatedSlots() returns int +``` + +Allocated cache slots; ID reuse keeps this at peak concurrent population. + +### spatialIndexPadCells + +```wurst +public function spatialIndexPadCells() returns int +``` + +Current query padding in whole cells, derived from guaranteed staleness. + +### rebuildSpatialIndexGrid + +```wurst +public function rebuildSpatialIndexGrid(vec2 worldMin, vec2 worldMax) +``` + +Rebuilds the extent and re-buckets all units. Unguarded so grid math remains testable on Jass. + +### spatialIndexCellOf + +```wurst +public function spatialIndexCellOf(vec2 pos) returns int +``` + +Internal-grid cell for tests and diagnostics. + +### spatialIndexGridWidth + +```wurst +public function spatialIndexGridWidth() returns int +``` + +Grid dimensions in cells, for tests and diagnostics. + +### spatialIndexGridHeight + +```wurst +public function spatialIndexGridHeight() returns int +``` + +### spatialIndexBeginQuery + +```wurst +public function spatialIndexBeginQuery(vec2 center, real radius, boolean collisionSizeFiltering) returns int +``` + +Collects every unit whose origin lies within `radius` of `center` into the query snapshot and +returns how many matched. Must be paired with `spatialIndexEndQuery()`. + +With `collisionSizeFiltering` the test becomes `IsUnitInRangeXY`, matching +`ClosureForGroups.forUnitsInRange(pos, radius, true, cb)`. + +### spatialIndexBeginBoxQuery + +```wurst +public function spatialIndexBeginBoxQuery(vec2 boxMin, vec2 boxMax) returns int +``` + +Collects units inside the box into the query snapshot. + +### spatialIndexBeginPlayerQuery + +```wurst +public function spatialIndexBeginPlayerQuery(player owner) returns int +``` + +Collects currently indexed units owned by owner without a native group scan. + + Player enumeration intentionally does not apply the range/box visibility filter: Warcraft's + GroupEnumUnitsOfPlayer includes hidden and Locust units, so this query does too. + +### spatialIndexQueryUnit + +```wurst +public function spatialIndexQueryUnit(int i) returns unit +``` + +Returns the i-th match of the innermost open query. + +### spatialIndexEndQuery + +```wurst +public function spatialIndexEndQuery() +``` + +Closes the innermost open query and releases its snapshot. + +## Extension Functions + +### unit.updateSpatialIndex + +```wurst +public function unit.updateSpatialIndex() +``` + +## Constants + +### USE_UNIT_SPATIAL_INDEX + +```wurst +public constant USE_UNIT_SPATIAL_INDEX = true +``` + +> 🔧 **Configurable.** Override it in your map's config package. + +Master switch; override from `UnitSpatialIndex_config` to disable the native-less index. + +### SPATIAL_INDEX_CELL_SIZE + +```wurst +public constant SPATIAL_INDEX_CELL_SIZE = 256. +``` + +> 🔧 **Configurable.** Override it in your map's config package. + +Grid cell edge in world units; smaller cells tighten windows but increase cells walked. + +### SPATIAL_INDEX_UNITS_PER_TICK + +```wurst +public constant SPATIAL_INDEX_UNITS_PER_TICK = 128 +``` + +> 🔧 **Configurable.** Override it in your map's config package. + +Units re-bucketed per tick; raising this shortens the cycle and query padding. + +### SPATIAL_INDEX_MAX_UNIT_SPEED + +```wurst +public constant SPATIAL_INDEX_MAX_UNIT_SPEED = 522. +``` + +> 🔧 **Configurable.** Override it in your map's config package. + +Engine movement-speed cap. Configurable because gameplay constants can raise the default 522. + +### SPATIAL_INDEX_CHECK_HIDDEN + +```wurst +public constant SPATIAL_INDEX_CHECK_HIDDEN = true +``` + +> 🔧 **Configurable.** Override it in your map's config package. + +Disable when hidden units are never used to save one native per hit. diff --git a/_doc/stdlib/ref/util/UnitSpatialIndexRemoval.md b/_doc/stdlib/ref/util/UnitSpatialIndexRemoval.md new file mode 100644 index 0000000..9082cc0 --- /dev/null +++ b/_doc/stdlib/ref/util/UnitSpatialIndexRemoval.md @@ -0,0 +1,41 @@ +--- +title: UnitSpatialIndexRemoval +layout: stdlibref +category: util +categoryLabel: Utilities +tags: + - util +source: 'https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/UnitSpatialIndexRemoval.wurst' +generated: true +toc: sections +--- + +**[Source on GitHub](https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/UnitSpatialIndexRemoval.wurst)** + +## Functions + +### getSpatialRemovingUnit + +```wurst +public function getSpatialRemovingUnit() returns unit +``` + +### onSpatialUnitRemove + +```wurst +public function onSpatialUnitRemove(code callback) +``` + +### initializeSpatialRemovalTracking + +```wurst +public function initializeSpatialRemovalTracking() +``` + +## Extension Functions + +### unit.trackSpatialRemoval + +```wurst +public function unit.trackSpatialRemoval() +```