From 6a5b880eecac24d7c753a1d2e2e1273aa4dc9eaf Mon Sep 17 00:00:00 2001 From: Frotty <1486037+Frotty@users.noreply.github.com> Date: Mon, 14 Sep 2026 12:30:39 +0000 Subject: [PATCH] docs(stdlib): regenerate API reference --- _data/stdlib_index.json | 9288 +++++++++++++---- _doc/stdlib/ref/_handles/Camera.md | 48 + _doc/stdlib/ref/_handles/Destructable.md | 156 + _doc/stdlib/ref/_handles/Doodad.md | 99 + _doc/stdlib/ref/_handles/Effect.md | 22 + _doc/stdlib/ref/_handles/Framehandle.md | 22 + _doc/stdlib/ref/_handles/Item.md | 126 + _doc/stdlib/ref/_handles/Player.md | 6 + _doc/stdlib/ref/_handles/Trigger.md | 46 + _doc/stdlib/ref/_handles/Unit.md | 82 + _doc/stdlib/ref/_handles/_Handles.md | 2 +- _doc/stdlib/ref/_wurst/Annotations.md | 11 + _doc/stdlib/ref/_wurst/MagicFunctions.md | 92 + _doc/stdlib/ref/_wurst/TypeCasting.md | 24 + _doc/stdlib/ref/closures/ClosureTimers.md | 12 +- .../closures/SpatialIndexForDestructables.md | 61 + .../ref/closures/SpatialIndexForUnits.md | 142 +- _doc/stdlib/ref/data/IntMap.md | 27 + _doc/stdlib/ref/data/SparseSet.md | 67 - _doc/stdlib/ref/data/SparseSetBenchmark.md | 21 - .../ref/file/StructuredSerialization.md | 241 + .../ref/file/StructuredSerializationCore.md | 182 + _doc/stdlib/ref/index.md | 16 +- _doc/stdlib/ref/util/Cinematic.md | 44 + .../ref/util/DestructableSpatialIndex.md | 124 + _doc/stdlib/ref/util/SpatialPartition.md | 367 + _doc/stdlib/ref/util/TerrainEnvironment.md | 185 + _doc/stdlib/ref/util/UnitSpatialIndex.md | 41 +- 28 files changed, 9219 insertions(+), 2335 deletions(-) create mode 100644 _doc/stdlib/ref/_handles/Doodad.md create mode 100644 _doc/stdlib/ref/closures/SpatialIndexForDestructables.md create mode 100644 _doc/stdlib/ref/data/IntMap.md delete mode 100644 _doc/stdlib/ref/data/SparseSet.md delete mode 100644 _doc/stdlib/ref/data/SparseSetBenchmark.md create mode 100644 _doc/stdlib/ref/file/StructuredSerialization.md create mode 100644 _doc/stdlib/ref/file/StructuredSerializationCore.md create mode 100644 _doc/stdlib/ref/util/DestructableSpatialIndex.md create mode 100644 _doc/stdlib/ref/util/SpatialPartition.md create mode 100644 _doc/stdlib/ref/util/TerrainEnvironment.md diff --git a/_data/stdlib_index.json b/_data/stdlib_index.json index 8cb0fcc..0e41218 100644 --- a/_data/stdlib_index.json +++ b/_data/stdlib_index.json @@ -110811,7 +110811,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 716 + "line": 774 }, { "kind": "interface", @@ -110827,7 +110827,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 726 + "line": 784 }, { "kind": "interface", @@ -110843,7 +110843,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 729 + "line": 787 }, { "kind": "interface", @@ -110859,7 +110859,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 732 + "line": 790 }, { "kind": "interface", @@ -110875,7 +110875,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 735 + "line": 793 }, { "kind": "interface", @@ -110891,7 +110891,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 738 + "line": 796 }, { "kind": "interface", @@ -110907,7 +110907,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 741 + "line": 799 }, { "kind": "constant", @@ -110923,7 +110923,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 748 + "line": 806 }, { "kind": "extension-function", @@ -110939,7 +110939,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 749 + "line": 807 }, { "kind": "constant", @@ -110955,7 +110955,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 752 + "line": 810 }, { "kind": "extension-function", @@ -110971,7 +110971,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 753 + "line": 811 }, { "kind": "constant", @@ -110987,7 +110987,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 756 + "line": 814 }, { "kind": "extension-function", @@ -111003,7 +111003,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 757 + "line": 815 }, { "kind": "extension-function", @@ -111019,7 +111019,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 765 + "line": 823 }, { "kind": "extension-function", @@ -111035,7 +111035,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 774 + "line": 832 } ] }, @@ -112352,6 +112352,37 @@ } ] }, + { + "package": "IntMap", + "category": "data", + "categoryLabel": "Data Structures", + "sourcePath": "wurst/data/IntMap.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/data/IntMap.wurst", + "summary": "O(1) integer-keyed map with compiler-specialized value storage.\n\nJASS hashtables use integer child keys, so fixing the key type avoids an artificial generic\nhash adapter while `V:` keeps strings, reals, booleans, handles, tuples, and class references\nin typed arrays. Removal is unordered. The map does not own stored values.", + "summaryFirstLine": "O(1) integer-keyed map with compiler-specialized value storage.", + "tags": [ + "data" + ], + "imports": [], + "entities": [ + { + "kind": "class", + "name": "IntMap", + "typeParams": "", + "receiver": null, + "signature": "public class IntMap", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 13 + } + ] + }, { "package": "LinkedList", "category": "data", @@ -114041,118 +114072,6 @@ } ] }, - { - "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", @@ -117020,7 +116939,7 @@ "typeParams": "", "receiver": "timer", "signature": "public function timer.doPeriodically(real time, CallbackPeriodic cb) returns CallbackPeriodic", - "doc": "Execute an action periodically.\n\tThe callback has to be destroyed manually.\n\tMust be used on a timer acquired with `getTimer()`\n\n\tExample use:\n\t| someTimer.doPeriodically(0.5) cb ->\n\t|\t if i > 10\n\t|\t\tdestroy cb", + "doc": "Execute an action periodically.\n\tThe callback has to be destroyed manually.\n\tMust be used on a timer acquired with `getTimer()`\n\n\tExample use:\n\t| someTimer.doPeriodically(0.5) (_) ->\n\t|\t if i > 10\n\t|\t\tdestroy it", "deprecated": { "flag": false, "message": null @@ -117036,7 +116955,7 @@ "typeParams": "", "receiver": null, "signature": "public function doPeriodically(real time, CallbackPeriodic cb) returns CallbackPeriodic", - "doc": "Execute an action periodically.\n\tThe callback has to be destroyed manually.\n\n\tExample use:\n\t| doPeriodically(0.5) cb ->\n\t|\t if i > 10\n\t|\t\tdestroy cb", + "doc": "Execute an action periodically.\n\tThe callback has to be destroyed manually.\n\n\tExample use:\n\t| doPeriodically(0.5) (_) ->\n\t|\t if i > 10\n\t|\t\tdestroy it", "deprecated": { "flag": false, "message": null @@ -117052,7 +116971,7 @@ "typeParams": "", "receiver": "timer", "signature": "public function timer.doPeriodicallyCounted(real time, int callAmount, CallbackCounted cb) returns CallbackCounted", - "doc": "execute an action periodically, with a limited amount of calls\n\tThe callback object is destroyed after the action has been executed callAmount times.\n\tMust be used on a timer acquired with `getTimer()`\n\n\tExample use:\n\t| someTimer.doPeriodicallyCounted(0.5, 100) cb ->\n\t|\t doSomething()", + "doc": "execute an action periodically, with a limited amount of calls\n\tThe callback object is destroyed after the action has been executed callAmount times.\n\tMust be used on a timer acquired with `getTimer()`\n\n\tExample use:\n\t| someTimer.doPeriodicallyCounted(0.5, 100) (_) ->\n\t|\t doSomething()", "deprecated": { "flag": false, "message": null @@ -117068,7 +116987,7 @@ "typeParams": "", "receiver": null, "signature": "public function doPeriodicallyCounted(real time, int callAmount, CallbackCounted cb) returns CallbackCounted", - "doc": "execute an action periodically, with a limited amount of calls\n\tThe callback object is destroyed after the action has been executed callAmount times.\n\n\tExample use:\n\t| doPeriodicallyCounted(0.5, 100) cb ->\n\t|\t doSomething()", + "doc": "execute an action periodically, with a limited amount of calls\n\tThe callback object is destroyed after the action has been executed callAmount times.\n\n\tExample use:\n\t| doPeriodicallyCounted(0.5, 100) (_) ->\n\t|\t doSomething()", "deprecated": { "flag": false, "message": null @@ -117468,26 +117387,171 @@ } ] }, + { + "package": "SpatialIndexForDestructables", + "category": "closures", + "categoryLabel": "Closures", + "sourcePath": "wurst/closures/SpatialIndexForDestructables.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/closures/SpatialIndexForDestructables.wurst", + "summary": "Native-less Lua spatial queries for destructables.\n\nPass a reusable ArrayList and the query fills it. The target is reset before it is\npopulated, so one scratch list serves every call. To narrow what comes back, pass a filter rather\nthan collecting everything and testing membership afterwards.\nFilters are caller-owned, and nested queries must use separate result collections.\nThe range query intentionally matches\nClosureForGroups.forDestructablesInRange: it returns the square that encloses the circle rather\nthan applying a second distance test. Runtime-created destructables must be registered explicitly.", + "summaryFirstLine": "Native-less Lua spatial queries for destructables.", + "tags": [ + "closures" + ], + "imports": [], + "entities": [ + { + "kind": "interface", + "name": "DestructableSpatialFilter", + "typeParams": "", + "receiver": null, + "signature": "public interface DestructableSpatialFilter", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [ + { + "kind": "function", + "name": "matches", + "typeParams": "", + "receiver": null, + "signature": "function matches(destructable whichDestructable) returns boolean", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 20 + } + ], + "enumMembers": [], + "line": 19 + }, + { + "kind": "function", + "name": "destructablesInRect", + "typeParams": "", + "receiver": null, + "signature": "public function destructablesInRect(ArrayList result, rect area, DestructableSpatialFilter filter)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 44 + }, + { + "kind": "function", + "name": "destructablesInRect", + "typeParams": "", + "receiver": null, + "signature": "public function destructablesInRect(ArrayList result, rect area)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 51 + }, + { + "kind": "function", + "name": "destructablesInRange", + "typeParams": "", + "receiver": null, + "signature": "public function destructablesInRange(ArrayList result, vec2 center, real range, DestructableSpatialFilter filter)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 54 + }, + { + "kind": "function", + "name": "destructablesInRange", + "typeParams": "", + "receiver": null, + "signature": "public function destructablesInRange(ArrayList result, vec2 center, real range)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 60 + } + ] + }, { "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": "", + "summary": "Native-less Lua spatial queries.\n\nPass a reusable ArrayList and the query fills it. The target is reset before it is\npopulated, so one scratch list serves every call on a hot path. No Warcraft group, result\ncollection, or filter is allocated or destroyed by these overloads.\n\nA query result is something you walk, so a list is the shape it wants. To narrow what comes back,\npass a UnitSpatialFilter rather than collecting everything and testing membership afterwards -\nthe filter runs once per match, before the result is built.\n\nFilters are caller-owned so one instance can be reused across queries. A capturing lambda creates\na closure at its declaration site; keep it outside hot loops when allocation matters.\nNested queries must use separate result collections because each call resets its target.\n\nThese APIs are intentionally Lua-oriented: on Jass or while disabled, the target remains empty\nbecause no native fallback is hidden behind the generic result type.", + "summaryFirstLine": "Native-less Lua spatial queries.", "tags": [ "closures" ], "imports": [], "entities": [ + { + "kind": "interface", + "name": "UnitSpatialFilter", + "typeParams": "", + "receiver": null, + "signature": "public interface UnitSpatialFilter", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [ + { + "kind": "function", + "name": "matches", + "typeParams": "", + "receiver": null, + "signature": "function matches(unit whichUnit) returns boolean", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 28 + } + ], + "enumMembers": [], + "line": 27 + }, { "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.", + "signature": "public function unitsInRange(ArrayList result, vec2 center, real radius)", + "doc": "Replaces result with units whose origins are within radius of center.", "deprecated": { "flag": false, "message": null @@ -117495,15 +117559,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 23 + "line": 53 }, { "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.", + "signature": "public function unitsInRange(ArrayList result, vec2 center, real radius, UnitSpatialFilter filter)", + "doc": "Replaces result with filtered units whose origins are within radius of center.", "deprecated": { "flag": false, "message": null @@ -117511,15 +117575,47 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 27 + "line": 57 + }, + { + "kind": "function", + "name": "unitsInRange", + "typeParams": "", + "receiver": null, + "signature": "public function unitsInRange(ArrayList result, vec2 center, real radius, boolean collisionFiltering)", + "doc": "Replaces result with units in range, optionally applying collision-size filtering.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 62 + }, + { + "kind": "function", + "name": "unitsInRange", + "typeParams": "", + "receiver": null, + "signature": "public function unitsInRange(ArrayList result, vec2 center, real radius, boolean collisionFiltering, UnitSpatialFilter filter)", + "doc": "Replaces result with filtered units in range, optionally applying collision-size filtering.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 67 }, { "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.", + "signature": "public function unitsInBox(ArrayList result, vec2 boxMin, vec2 boxMax, UnitSpatialFilter filter)", + "doc": "Replaces result with filtered units whose origins are inside the axis-aligned box.", "deprecated": { "flag": false, "message": null @@ -117527,15 +117623,63 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 34 + "line": 74 + }, + { + "kind": "function", + "name": "unitsInBox", + "typeParams": "", + "receiver": null, + "signature": "public function unitsInBox(ArrayList result, vec2 boxMin, vec2 boxMax)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 80 + }, + { + "kind": "function", + "name": "unitsInRect", + "typeParams": "", + "receiver": null, + "signature": "public function unitsInRect(ArrayList result, rect area, UnitSpatialFilter filter)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 83 + }, + { + "kind": "function", + "name": "unitsInRect", + "typeParams": "", + "receiver": null, + "signature": "public function unitsInRect(ArrayList result, rect area)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 88 }, { "kind": "function", "name": "unitsOfPlayer", "typeParams": "", "receiver": null, - "signature": "public function unitsOfPlayer(player owner) returns SparseSet", - "doc": "Returns currently indexed units owned by owner.", + "signature": "public function unitsOfPlayer(ArrayList result, player owner, UnitSpatialFilter filter)", + "doc": "Replaces result with currently indexed units owned by owner. This is a linear registry scan;\n\tper-player secondary sets are intentionally not maintained.", "deprecated": { "flag": false, "message": null @@ -117543,7 +117687,135 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 44 + "line": 93 + }, + { + "kind": "function", + "name": "unitsOfPlayer", + "typeParams": "", + "receiver": null, + "signature": "public function unitsOfPlayer(ArrayList result, player owner)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 98 + }, + { + "kind": "function", + "name": "forEachUnitInRange", + "typeParams": "", + "receiver": null, + "signature": "public function forEachUnitInRange(vec2 center, real radius, ForGroupCallback cb)", + "doc": "Runs the callback for every unit whose origin is within radius of center.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 134 + }, + { + "kind": "function", + "name": "forEachUnitInRange", + "typeParams": "", + "receiver": null, + "signature": "public function forEachUnitInRange(vec2 center, real radius, bool collisionFiltering, ForGroupCallback cb)", + "doc": "Runs the callback for every unit in range, optionally applying collision-size filtering.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 138 + }, + { + "kind": "function", + "name": "forEachUnitInRect", + "typeParams": "", + "receiver": null, + "signature": "public function forEachUnitInRect(rect area, ForGroupCallback cb)", + "doc": "Runs the callback for every unit whose origin is inside the rect.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 148 + }, + { + "kind": "function", + "name": "forEachUnitOfPlayer", + "typeParams": "", + "receiver": null, + "signature": "public function forEachUnitOfPlayer(player owner, ForGroupCallback cb)", + "doc": "Runs the callback for every unit owned by the player.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 157 + }, + { + "kind": "function", + "name": "forEachUnitInRangeUntil", + "typeParams": "", + "receiver": null, + "signature": "public function forEachUnitInRangeUntil(vec2 center, real radius, ForGroupCallbackUntil cb)", + "doc": "As forEachUnitInRange, stopping as soon as the callback returns false.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 166 + }, + { + "kind": "function", + "name": "forEachUnitInRectUntil", + "typeParams": "", + "receiver": null, + "signature": "public function forEachUnitInRectUntil(rect area, ForGroupCallbackUntil cb)", + "doc": "As forEachUnitInRect, stopping as soon as the callback returns false.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 176 + }, + { + "kind": "function", + "name": "forEachUnitOfPlayerUntil", + "typeParams": "", + "receiver": null, + "signature": "public function forEachUnitOfPlayerUntil(player owner, ForGroupCallbackUntil cb)", + "doc": "As forEachUnitOfPlayer, stopping as soon as the callback returns false.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 186 } ] }, @@ -120639,7 +120911,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 78 + "line": 77 }, { "kind": "function", @@ -120655,7 +120927,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 82 + "line": 81 }, { "kind": "function", @@ -120671,7 +120943,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 86 + "line": 85 }, { "kind": "function", @@ -120687,7 +120959,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 90 + "line": 89 }, { "kind": "function", @@ -120703,7 +120975,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 96 + "line": 95 }, { "kind": "function", @@ -120719,7 +120991,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 102 + "line": 101 }, { "kind": "function", @@ -120735,7 +121007,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 106 + "line": 105 }, { "kind": "function", @@ -120751,7 +121023,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 110 + "line": 109 }, { "kind": "function", @@ -120767,7 +121039,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 114 + "line": 113 }, { "kind": "function", @@ -120783,7 +121055,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 121 + "line": 120 }, { "kind": "function", @@ -120799,7 +121071,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 125 + "line": 124 }, { "kind": "function", @@ -120815,7 +121087,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 135 + "line": 134 }, { "kind": "function", @@ -120831,7 +121103,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 139 + "line": 138 }, { "kind": "function", @@ -120847,7 +121119,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 143 + "line": 142 }, { "kind": "function", @@ -120863,7 +121135,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 147 + "line": 146 }, { "kind": "function", @@ -120879,7 +121151,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 151 + "line": 150 } ], "enumMembers": [], @@ -127745,7 +128017,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 62 + "line": 104 } ] }, @@ -127829,271 +128101,155 @@ ] }, { - "package": "SyncSimple", + "package": "StructuredSerialization", "category": "file", "categoryLabel": "File & Network", - "sourcePath": "wurst/file/SyncSimple.wurst", - "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/file/SyncSimple.wurst", - "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.", + "sourcePath": "wurst/file/StructuredSerialization.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/file/StructuredSerialization.wurst", + "summary": "Standard tuple codecs.\n\nField names passed to these codecs are converted by `FieldSerializationWriter` to fixed-width\nnumeric IDs; names are not stored in the save string. Classes and tuples therefore use the same\nwire representation and migration rules. The compiler does not derive persistence IDs from field\nannotations; serialization metadata deliberately remains owned by this library.\n\nCustom tuples need three overloads because tuples cannot implement `FieldSerializable`. The field\nintrinsics keep the codec concise and support mixed component types through overload resolution:\n\n```\ntuple InventorySlot(int itemId, int charges)\n\npublic function FieldSerializationWriter.write(string name, InventorySlot value)\nlet child = new FieldSerializationWriter(1, this.getIntegrityKey())\nwurstForFields(value, (fieldName, fieldValue) -> child.write(fieldName, fieldValue))\nthis.writeObject(name, child)\n\npublic function FieldSerializationReader.read(string name, InventorySlot oldValue) returns InventorySlot\nlet child = this.readObject(name)\nvar result = oldValue\nif child.isValid()\n\twurstMapFields(result, (fieldName, fieldValue) -> fieldValue.readSerializedField(child, fieldName))\ndestroy child\nreturn result\n\npublic function InventorySlot.readSerializedField(FieldSerializationReader reader, string name) returns InventorySlot\nreturn reader.read(name, this)\n\nclass InventoryState implements FieldSerializable\nuse FieldSerializableLifecycle\nInventorySlot slot = InventorySlot(0, 0)\n\noverride function writeSerializedFields(FieldSerializationWriter writer)\n\twurstForFields((fieldName, fieldValue) -> writer.write(fieldName, fieldValue))\n\noverride function readSerializedFields(FieldSerializationReader reader)\n\twurstMapFields((fieldName, fieldValue) -> fieldValue.readSerializedField(reader, fieldName))\n```\n\n`SerializableFields` can automatically use codecs declared by `StructuredSerialization`. For\npackage-local codecs, use `FieldSerializableLifecycle` and keep the two intrinsic mapping methods\nin the same package as the overloads, as above. Nested custom tuples then compose once each tuple\ntype provides the three overloads. Keep component names stable. For tuple-specific schema changes,\nincrement the child writer's schema version and call `child.renameField(oldName, newName)` before\n`wurstMapFields` when reading older versions.", + "summaryFirstLine": "Standard tuple codecs.", "tags": [ "file" ], - "imports": [], + "imports": [ + "StructuredSerializationCore" + ], "entities": [ { - "kind": "constant", - "name": "DEFAULT_PREFIX", + "kind": "extension-function", + "name": "write", "typeParams": "", - "receiver": null, - "signature": "public constant DEFAULT_PREFIX = \"S\"", + "receiver": "FieldSerializationWriter", + "signature": "public function FieldSerializationWriter.write(string name, vec2 value)", "doc": "", "deprecated": { "flag": false, "message": null }, - "configurable": true, + "configurable": false, "members": [], "enumMembers": [], - "line": 20 + "line": 59 }, { - "kind": "constant", - "name": "LAST_CHUNK_PREFIX", + "kind": "extension-function", + "name": "read", "typeParams": "", - "receiver": null, - "signature": "public constant LAST_CHUNK_PREFIX = \"T\"", + "receiver": "FieldSerializationReader", + "signature": "public function FieldSerializationReader.read(string name, vec2 oldValue) returns vec2", "doc": "", "deprecated": { "flag": false, "message": null }, - "configurable": true, + "configurable": false, "members": [], "enumMembers": [], - "line": 21 + "line": 65 }, { - "kind": "constant", - "name": "SYNC_IN_REPLAYS", + "kind": "extension-function", + "name": "readSerializedField", "typeParams": "", - "receiver": null, - "signature": "public constant SYNC_IN_REPLAYS = false", + "receiver": "vec2", + "signature": "public function vec2.readSerializedField(FieldSerializationReader reader, string name) returns vec2", "doc": "", "deprecated": { "flag": false, "message": null }, - "configurable": true, + "configurable": false, "members": [], "enumMembers": [], - "line": 22 + "line": 71 }, { - "kind": "interface", - "name": "BoolSyncListener", + "kind": "extension-function", + "name": "write", "typeParams": "", - "receiver": null, - "signature": "public interface BoolSyncListener", + "receiver": "FieldSerializationWriter", + "signature": "public function FieldSerializationWriter.write(string name, vec3 value)", "doc": "", "deprecated": { "flag": false, "message": null }, "configurable": false, - "members": [ - { - "kind": "function", - "name": "onDataSynced", - "typeParams": "", - "receiver": null, - "signature": "function onDataSynced(bool data)", - "doc": "", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 26 - } - ], + "members": [], "enumMembers": [], - "line": 25 + "line": 74 }, { - "kind": "interface", - "name": "IntSyncListener", + "kind": "extension-function", + "name": "read", "typeParams": "", - "receiver": null, - "signature": "public interface IntSyncListener", + "receiver": "FieldSerializationReader", + "signature": "public function FieldSerializationReader.read(string name, vec3 oldValue) returns vec3", "doc": "", "deprecated": { "flag": false, "message": null }, "configurable": false, - "members": [ - { - "kind": "function", - "name": "onDataSynced", - "typeParams": "", - "receiver": null, - "signature": "function onDataSynced(int data)", - "doc": "", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 29 - } - ], + "members": [], "enumMembers": [], - "line": 28 + "line": 81 }, { - "kind": "interface", - "name": "RealSyncListener", + "kind": "extension-function", + "name": "readSerializedField", "typeParams": "", - "receiver": null, - "signature": "public interface RealSyncListener", + "receiver": "vec3", + "signature": "public function vec3.readSerializedField(FieldSerializationReader reader, string name) returns vec3", "doc": "", "deprecated": { "flag": false, "message": null }, "configurable": false, - "members": [ - { - "kind": "function", - "name": "onDataSynced", - "typeParams": "", - "receiver": null, - "signature": "function onDataSynced(real data)", - "doc": "", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 32 - } - ], + "members": [], "enumMembers": [], - "line": 31 + "line": 87 }, { - "kind": "interface", - "name": "StringSyncListener", + "kind": "extension-function", + "name": "write", "typeParams": "", - "receiver": null, - "signature": "public interface StringSyncListener", + "receiver": "FieldSerializationWriter", + "signature": "public function FieldSerializationWriter.write(string name, angle value)", "doc": "", "deprecated": { "flag": false, "message": null }, "configurable": false, - "members": [ - { - "kind": "function", - "name": "onDataSynced", - "typeParams": "", - "receiver": null, - "signature": "function onDataSynced(string data)", - "doc": "", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 35 - } - ], + "members": [], "enumMembers": [], - "line": 34 + "line": 90 }, { - "kind": "interface", - "name": "BufferSyncListener", + "kind": "extension-function", + "name": "read", "typeParams": "", - "receiver": null, - "signature": "public interface BufferSyncListener", - "doc": "", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [ - { - "kind": "function", - "name": "onDataSynced", - "typeParams": "", - "receiver": null, - "signature": "function onDataSynced(ChunkedString buffer)", - "doc": "", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 38 - } - ], - "enumMembers": [], - "line": 37 - }, - { - "kind": "interface", - "name": "AnySyncListener", - "typeParams": "", - "receiver": null, - "signature": "public interface AnySyncListener", + "receiver": "FieldSerializationReader", + "signature": "public function FieldSerializationReader.read(string name, angle oldValue) returns angle", "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 - } - ], + "members": [], "enumMembers": [], - "line": 43 + "line": 95 }, { "kind": "extension-function", - "name": "sync", + "name": "readSerializedField", "typeParams": "", - "receiver": "bool", - "signature": "public function bool.sync(player p, BoolSyncListener listener)", - "doc": "Syncs a bool from the given player.", + "receiver": "angle", + "signature": "public function angle.readSerializedField(FieldSerializationReader reader, string name) returns angle", + "doc": "", "deprecated": { "flag": false, "message": null @@ -128101,15 +128257,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 49 + "line": 101 }, { "kind": "extension-function", - "name": "sync", + "name": "write", "typeParams": "", - "receiver": "int", - "signature": "public function int.sync(player p, IntSyncListener listener)", - "doc": "Syncs an int from the given player.", + "receiver": "FieldSerializationWriter", + "signature": "public function FieldSerializationWriter.write(string name, color value)", + "doc": "", "deprecated": { "flag": false, "message": null @@ -128117,15 +128273,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 55 + "line": 104 }, { "kind": "extension-function", - "name": "sync", + "name": "read", "typeParams": "", - "receiver": "real", - "signature": "public function real.sync(player p, RealSyncListener listener)", - "doc": "Syncs a real from the given player.", + "receiver": "FieldSerializationReader", + "signature": "public function FieldSerializationReader.read(string name, color oldValue) returns color", + "doc": "", "deprecated": { "flag": false, "message": null @@ -128133,15 +128289,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 61 + "line": 111 }, { "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.", + "name": "readSerializedField", + "typeParams": "", + "receiver": "color", + "signature": "public function color.readSerializedField(FieldSerializationReader reader, string name) returns color", + "doc": "", "deprecated": { "flag": false, "message": null @@ -128149,15 +128305,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 69 + "line": 117 }, { "kind": "extension-function", - "name": "sync", + "name": "write", "typeParams": "", - "receiver": "string", - "signature": "public function string.sync(player p, StringSyncListener listener)", - "doc": "Syncs a single string from the given player.", + "receiver": "FieldSerializationWriter", + "signature": "public function FieldSerializationWriter.write(string name, colorA value)", + "doc": "", "deprecated": { "flag": false, "message": null @@ -128165,45 +128321,14 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 76 + "line": 120 }, { "kind": "extension-function", - "name": "sync", + "name": "read", "typeParams": "", - "receiver": "ChunkedString", - "signature": "public function ChunkedString.sync(player p, BufferSyncListener listener)", - "doc": "Syncs a chunked string from the given player.", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 83 - } - ] - }, - { - "package": "Board", - "category": "util", - "categoryLabel": "Utilities", - "sourcePath": "wurst/util/Board.wurst", - "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/Board.wurst", - "summary": "This Board library allows you to create a simple multi board with dynamic cell values.\n 1. Create a board\n `let board = new Board(\"myBoard\", 0.02)`\n\n 2. Define columns. The second parameter is width relative to board width.\n `board.columns(asList(new BoardColumn(\"Player\", 0.7), new BoardColumn(COLOR_GOLD.toColorString() + \"Kills\", 0.3)))`\n\n 3. Add rows and cells\n `let killcount = dynamicCell(0, i -> i.toString())\n board.addRow()\n ..addCell(\"My Name\")\n ..addDynamic(killcount)`\n\n 4. Show board\n `board.show()`\n\n 5. Update dynamic value\n `killcount.updateValue(killcount.value + 1)`", - "summaryFirstLine": "This Board library allows you to create a simple multi board with dynamic cell values.", - "tags": [ - "util" - ], - "imports": [], - "entities": [ - { - "kind": "function", - "name": "dynamicCellIcon", - "typeParams": "", - "receiver": null, - "signature": "public function dynamicCellIcon(string icon, DynamicCellValue observer) returns DynamicCellValue", + "receiver": "FieldSerializationReader", + "signature": "public function FieldSerializationReader.read(string name, colorA oldValue) returns colorA", "doc": "", "deprecated": { "flag": false, @@ -128212,14 +128337,14 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 25 + "line": 128 }, { - "kind": "function", - "name": "dynamicCell", - "typeParams": "", - "receiver": null, - "signature": "public function dynamicCell(T defaultValue, DynamicCellValue observer) returns DynamicCellValue", + "kind": "extension-function", + "name": "readSerializedField", + "typeParams": "", + "receiver": "colorA", + "signature": "public function colorA.readSerializedField(FieldSerializationReader reader, string name) returns colorA", "doc": "", "deprecated": { "flag": false, @@ -128228,14 +128353,14 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 29 + "line": 134 }, { - "kind": "class", - "name": "DynamicCellValue", - "typeParams": "", - "receiver": null, - "signature": "public abstract class DynamicCellValue", + "kind": "extension-function", + "name": "write", + "typeParams": "", + "receiver": "FieldSerializationWriter", + "signature": "public function FieldSerializationWriter.write(string name, colorHSV value)", "doc": "", "deprecated": { "flag": false, @@ -128244,14 +128369,14 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 33 + "line": 137 }, { - "kind": "class", - "name": "BoardColumn", + "kind": "extension-function", + "name": "read", "typeParams": "", - "receiver": null, - "signature": "public class BoardColumn", + "receiver": "FieldSerializationReader", + "signature": "public function FieldSerializationReader.read(string name, colorHSV oldValue) returns colorHSV", "doc": "", "deprecated": { "flag": false, @@ -128260,14 +128385,14 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 58 + "line": 144 }, { - "kind": "class", - "name": "BoardCell", + "kind": "extension-function", + "name": "readSerializedField", "typeParams": "", - "receiver": null, - "signature": "public class BoardCell", + "receiver": "colorHSV", + "signature": "public function colorHSV.readSerializedField(FieldSerializationReader reader, string name) returns colorHSV", "doc": "", "deprecated": { "flag": false, @@ -128276,124 +128401,3461 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 74 + "line": 150 }, { - "kind": "class", - "name": "BoardRow", + "kind": "module", + "name": "FieldSerializableLifecycle", "typeParams": "", "receiver": null, - "signature": "public class BoardRow", - "doc": "", + "signature": "public module FieldSerializableLifecycle", + "doc": "Shared typed lifecycle for `FieldSerializable` classes that provide their own field mapping.\n\nPrefer `SerializableFields` when all field codecs come from `StructuredSerialization`. Use this\nmodule when mapping fields in the class package is necessary, notably for package-local tuple\ncodecs. Implement `writeSerializedFields` and `readSerializedFields`; serialization, integrity,\nmigration, nested-object loading, and typed `load` remain provided here.", "deprecated": { "flag": false, "message": null }, "configurable": false, - "members": [], + "members": [ + { + "kind": "function", + "name": "writeSerializedFields", + "typeParams": "", + "receiver": null, + "signature": "abstract function writeSerializedFields(FieldSerializationWriter writer)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 162 + }, + { + "kind": "function", + "name": "readSerializedFields", + "typeParams": "", + "receiver": null, + "signature": "abstract function readSerializedFields(FieldSerializationReader reader)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 163 + }, + { + "kind": "function", + "name": "readSerializedField", + "typeParams": "", + "receiver": null, + "signature": "function readSerializedField(FieldSerializationReader reader, string name) returns thistype", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 165 + }, + { + "kind": "function", + "name": "serialize", + "typeParams": "", + "receiver": null, + "signature": "function serialize() returns ChunkedString", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 172 + }, + { + "kind": "function", + "name": "serialize", + "typeParams": "", + "receiver": null, + "signature": "function serialize(int schemaVersion) returns ChunkedString", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 175 + }, + { + "kind": "function", + "name": "serialize", + "typeParams": "", + "receiver": null, + "signature": "function serialize(int schemaVersion, int integrityKey) returns ChunkedString", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 178 + }, + { + "kind": "function", + "name": "deserialize", + "typeParams": "", + "receiver": null, + "signature": "function deserialize(ChunkedString input) returns boolean", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 185 + }, + { + "kind": "function", + "name": "deserialize", + "typeParams": "", + "receiver": null, + "signature": "function deserialize(ChunkedString input, int integrityKey) returns boolean", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 188 + }, + { + "kind": "function", + "name": "deserialize", + "typeParams": "", + "receiver": null, + "signature": "function deserialize(ChunkedString input, int integrityKey, SerializationMigration migration) returns boolean", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 191 + }, + { + "kind": "function", + "name": "load", + "typeParams": "", + "receiver": null, + "signature": "function load(ChunkedString input) returns thistype", + "doc": "Loads valid data into this instance and returns it for concise construction and chaining.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 201 + } + ], "enumMembers": [], - "line": 107 + "line": 161 }, { - "kind": "class", - "name": "Board", + "kind": "module", + "name": "SerializableFieldMapping", "typeParams": "", "receiver": null, - "signature": "public class Board", - "doc": "", + "signature": "public module SerializableFieldMapping", + "doc": "Automatic field mapping without adding a second `serialize`/`deserialize` lifecycle.\n\nUse this during a compatibility window when a data class still extends legacy `Serializable`, or\nwhen another base class already owns lifecycle methods. The class must implement `FieldSerializable`.\nAll of its accessible mutable instance fields participate; keep runtime-only state in a separate\nclass because persisted-field annotation filtering is not available.", "deprecated": { "flag": false, "message": null }, "configurable": false, - "members": [], - "enumMembers": [], - "line": 144 - } - ] - }, - { - "package": "Cinematic", - "category": "util", - "categoryLabel": "Utilities", - "sourcePath": "wurst/util/Cinematic.wurst", - "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/Cinematic.wurst", - "summary": "Create a cinematic by composing cinematic sequences:\n\nlet cine = new Cinematic(\nasList(\n Cinematic.fadeOutSeq(0.5.seconds()),\n Cinematic.snapCameraPosSeq(ZERO2),\n Cinematic.fadeInSeq(1..seconds()),\n () -> begin\n print(\"Cinematic!\")\n return 5..seconds()\n end,\n Cinematic.fadeOutSeq(0.5.seconds())\n),\n// This final cinematic seq is always run, even if cinematic is skipped. Use this for cleanup.\n() -> begin\n FogEnable(true)\n SelectUnit(u, true)\n reurn 0..seconds()\nend,\n)\n\nA cinematic can be skipped, which signals the controller to halt processing sequences and play the closing sequence.\ncine.skip_()", - "summaryFirstLine": "Create a cinematic by composing cinematic sequences:", - "tags": [ + "members": [ + { + "kind": "function", + "name": "writeSerializedFields", + "typeParams": "", + "receiver": null, + "signature": "function writeSerializedFields(FieldSerializationWriter writer)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 214 + }, + { + "kind": "function", + "name": "readSerializedFields", + "typeParams": "", + "receiver": null, + "signature": "function readSerializedFields(FieldSerializationReader reader)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 217 + }, + { + "kind": "function", + "name": "readSerializedField", + "typeParams": "", + "receiver": null, + "signature": "function readSerializedField(FieldSerializationReader reader, string name) returns thistype", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 220 + } + ], + "enumMembers": [], + "line": 213 + }, + { + "kind": "module", + "name": "SerializableFields", + "typeParams": "", + "receiver": null, + "signature": "public module SerializableFields", + "doc": "Modern automatic serialization for dedicated state/DAO classes using built-in codecs.\n\nAdd `implements FieldSerializable` and `use SerializableFields`. The compiler expands field\niteration to direct accesses. The tagged format tolerates field reordering, added/removed fields,\nand unknown future wire types. Missing fields retain constructor defaults. Use a schema version and\n`SerializationMigration` for semantic changes or `renameField` for renamed attributes. For custom\ntuple codecs declared in the consuming package, use `FieldSerializableLifecycle` as documented\nabove so overload resolution occurs where those codecs are visible. Classes that must also retain\nlegacy `Serializable` should use `SerializableFieldMapping` to avoid conflicting lifecycle methods.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [ + { + "kind": "function", + "name": "writeSerializedFields", + "typeParams": "", + "receiver": null, + "signature": "override function writeSerializedFields(FieldSerializationWriter writer)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 241 + }, + { + "kind": "function", + "name": "readSerializedFields", + "typeParams": "", + "receiver": null, + "signature": "override function readSerializedFields(FieldSerializationReader reader)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 245 + } + ], + "enumMembers": [], + "line": 238 + } + ] + }, + { + "package": "StructuredSerializationCore", + "category": "file", + "categoryLabel": "File & Network", + "sourcePath": "wurst/file/StructuredSerializationCore.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/file/StructuredSerializationCore.wurst", + "summary": "Default integrity key for structured saves. Override this in map configuration with a private,\nmap-specific value. It is intended to deter edited player save codes, not provide cryptographic\nauthentication against somebody who can inspect the map script.", + "summaryFirstLine": "Default integrity key for structured saves. Override this in map configuration with a private,", + "tags": [ + "file" + ], + "imports": [], + "entities": [ + { + "kind": "constant", + "name": "SERIALIZATION_FORMAT_VERSION", + "typeParams": "", + "receiver": null, + "signature": "public constant SERIALIZATION_FORMAT_VERSION = 2", + "doc": "Current tagged serialization wire format.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 8 + }, + { + "kind": "constant", + "name": "SERIALIZATION_INTEGRITY_KEY", + "typeParams": "", + "receiver": null, + "signature": "public constant SERIALIZATION_INTEGRITY_KEY = 0x6D2B79F5", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": true, + "members": [], + "enumMembers": [], + "line": 15 + }, + { + "kind": "constant", + "name": "SERIALIZATION_REAL_DECIMALS", + "typeParams": "", + "receiver": null, + "signature": "public constant SERIALIZATION_REAL_DECIMALS = 6", + "doc": "Decimal places retained for Jass `real` values. Trailing zeroes are removed on the wire.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": true, + "members": [], + "enumMembers": [], + "line": 18 + }, + { + "kind": "function", + "name": "serializationFieldId", + "typeParams": "", + "receiver": null, + "signature": "public function serializationFieldId(string name) returns int", + "doc": "Returns the stable, case-sensitive numeric ID used for a persisted field name.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 73 + }, + { + "kind": "interface", + "name": "SerializationMigration", + "typeParams": "", + "receiver": null, + "signature": "public interface SerializationMigration", + "doc": "A parsed migration hook. Hooks are invoked but not destroyed by `deserialize`.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [ + { + "kind": "function", + "name": "migrate", + "typeParams": "", + "receiver": null, + "signature": "function migrate(FieldSerializationReader reader)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 171 + } + ], + "enumMembers": [], + "line": 170 + }, + { + "kind": "interface", + "name": "FieldSerializable", + "typeParams": "", + "receiver": null, + "signature": "public interface FieldSerializable", + "doc": "Opt-in contract used for recursively serialized class fields.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [ + { + "kind": "function", + "name": "writeSerializedFields", + "typeParams": "", + "receiver": null, + "signature": "function writeSerializedFields(FieldSerializationWriter writer)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 175 + }, + { + "kind": "function", + "name": "readSerializedFields", + "typeParams": "", + "receiver": null, + "signature": "function readSerializedFields(FieldSerializationReader reader)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 176 + }, + { + "kind": "function", + "name": "readSerializedField", + "typeParams": "", + "receiver": null, + "signature": "function readSerializedField(FieldSerializationReader reader, string name) returns thistype", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 177 + } + ], + "enumMembers": [], + "line": 174 + }, + { + "kind": "class", + "name": "FieldSerializationWriter", + "typeParams": "", + "receiver": null, + "signature": "public class FieldSerializationWriter", + "doc": "Builds one compact, versioned structured-save envelope.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [ + { + "kind": "function", + "name": "construct", + "typeParams": "", + "receiver": null, + "signature": "construct(int schemaVersion)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 186 + }, + { + "kind": "function", + "name": "construct", + "typeParams": "", + "receiver": null, + "signature": "construct(int schemaVersion, int integrityKey)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 189 + }, + { + "kind": "function", + "name": "writeRaw", + "typeParams": "", + "receiver": null, + "signature": "function writeRaw(string name, string token, string payload)", + "doc": "Writes a future-compatible raw field. Custom token values should be one ASCII byte.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 217 + }, + { + "kind": "function", + "name": "writeRaw", + "typeParams": "", + "receiver": null, + "signature": "function writeRaw(string name, string token, ChunkedString payload)", + "doc": "Writes a raw field without flattening its chunked payload. The caller retains ownership.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 222 + }, + { + "kind": "function", + "name": "write", + "typeParams": "", + "receiver": null, + "signature": "function write(string name, int value)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 226 + }, + { + "kind": "function", + "name": "write", + "typeParams": "", + "receiver": null, + "signature": "function write(string name, real value)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 229 + }, + { + "kind": "function", + "name": "write", + "typeParams": "", + "receiver": null, + "signature": "function write(string name, string value)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 232 + }, + { + "kind": "function", + "name": "write", + "typeParams": "", + "receiver": null, + "signature": "function write(string name, boolean value)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 235 + }, + { + "kind": "function", + "name": "getIntegrityKey", + "typeParams": "", + "receiver": null, + "signature": "function getIntegrityKey() returns int", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 238 + }, + { + "kind": "function", + "name": "write", + "typeParams": "", + "receiver": null, + "signature": "function write(string name, FieldSerializable value)", + "doc": "Recursively writes an opted-in non-null class instance.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 242 + }, + { + "kind": "function", + "name": "writeObject", + "typeParams": "", + "receiver": null, + "signature": "function writeObject(string name, FieldSerializationWriter child)", + "doc": "Writes and consumes a child writer as a nested class or tuple envelope.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 248 + }, + { + "kind": "function", + "name": "finish", + "typeParams": "", + "receiver": null, + "signature": "function finish() returns ChunkedString", + "doc": "Completes the envelope. The returned value belongs to the caller.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 255 + } + ], + "enumMembers": [], + "line": 180 + }, + { + "kind": "class", + "name": "FieldSerializationReader", + "typeParams": "", + "receiver": null, + "signature": "public class FieldSerializationReader", + "doc": "Parsed field table. Unknown fields and wire tokens are retained and safely skippable.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [ + { + "kind": "function", + "name": "construct", + "typeParams": "", + "receiver": null, + "signature": "construct()", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 359 + }, + { + "kind": "function", + "name": "construct", + "typeParams": "", + "receiver": null, + "signature": "construct(ChunkedString input)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 361 + }, + { + "kind": "function", + "name": "construct", + "typeParams": "", + "receiver": null, + "signature": "construct(ChunkedString input, int integrityKey)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 364 + }, + { + "kind": "function", + "name": "isValid", + "typeParams": "", + "receiver": null, + "signature": "function isValid() returns boolean", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 391 + }, + { + "kind": "function", + "name": "getSchemaVersion", + "typeParams": "", + "receiver": null, + "signature": "function getSchemaVersion() returns int", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 394 + }, + { + "kind": "function", + "name": "getIntegrityKey", + "typeParams": "", + "receiver": null, + "signature": "function getIntegrityKey() returns int", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 397 + }, + { + "kind": "function", + "name": "hasField", + "typeParams": "", + "receiver": null, + "signature": "function hasField(string name) returns boolean", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 400 + }, + { + "kind": "function", + "name": "hasRaw", + "typeParams": "", + "receiver": null, + "signature": "function hasRaw(string name, string token) returns boolean", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 403 + }, + { + "kind": "function", + "name": "readRaw", + "typeParams": "", + "receiver": null, + "signature": "function readRaw(string name, string token, string oldValue) returns string", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 407 + }, + { + "kind": "function", + "name": "readRawChunked", + "typeParams": "", + "receiver": null, + "signature": "function readRawChunked(string name, string token) returns ChunkedString", + "doc": "Returns an independent chunked copy of a raw payload, or `null` when the field/token is absent.\nThe caller owns and must destroy the returned value.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 415 + }, + { + "kind": "function", + "name": "read", + "typeParams": "", + "receiver": null, + "signature": "function read(string name, int oldValue) returns int", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 421 + }, + { + "kind": "function", + "name": "read", + "typeParams": "", + "receiver": null, + "signature": "function read(string name, real oldValue) returns real", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 425 + }, + { + "kind": "function", + "name": "read", + "typeParams": "", + "receiver": null, + "signature": "function read(string name, string oldValue) returns string", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 429 + }, + { + "kind": "function", + "name": "read", + "typeParams": "", + "receiver": null, + "signature": "function read(string name, boolean oldValue) returns boolean", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 432 + }, + { + "kind": "function", + "name": "setRaw", + "typeParams": "", + "receiver": null, + "signature": "function setRaw(string name, string token, string payload)", + "doc": "Replaces or creates a decoded field during migration.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 437 + }, + { + "kind": "function", + "name": "set", + "typeParams": "", + "receiver": null, + "signature": "function set(string name, int value)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 449 + }, + { + "kind": "function", + "name": "set", + "typeParams": "", + "receiver": null, + "signature": "function set(string name, real value)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 452 + }, + { + "kind": "function", + "name": "set", + "typeParams": "", + "receiver": null, + "signature": "function set(string name, string value)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 455 + }, + { + "kind": "function", + "name": "set", + "typeParams": "", + "receiver": null, + "signature": "function set(string name, boolean value)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 458 + }, + { + "kind": "function", + "name": "removeField", + "typeParams": "", + "receiver": null, + "signature": "function removeField(string name)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 461 + }, + { + "kind": "function", + "name": "readInto", + "typeParams": "", + "receiver": null, + "signature": "function readInto(string name, FieldSerializable oldValue) returns boolean", + "doc": "Mutates an existing opted-in child object when a valid nested envelope is present.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 469 + }, + { + "kind": "function", + "name": "readObject", + "typeParams": "", + "receiver": null, + "signature": "function readObject(string name) returns FieldSerializationReader", + "doc": "Returns a nested reader borrowed from this reader, or an invalid reader when absent.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 478 + }, + { + "kind": "function", + "name": "renameField", + "typeParams": "", + "receiver": null, + "signature": "function renameField(string oldName, string newName)", + "doc": "Moves a persisted value from an old field name to a new one. Call this from a migration before\nfield mapping. Existing data under the new name wins, making repeated migrations idempotent.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 488 + } + ], + "enumMembers": [], + "line": 353 + }, + { + "kind": "extension-function", + "name": "readSerializedField", + "typeParams": "", + "receiver": "int", + "signature": "public function int.readSerializedField(FieldSerializationReader reader, string name) returns int", + "doc": "Type-directed field readers used by the compiler-expanded mapper.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 510 + }, + { + "kind": "extension-function", + "name": "readSerializedField", + "typeParams": "", + "receiver": "real", + "signature": "public function real.readSerializedField(FieldSerializationReader reader, string name) returns real", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 513 + }, + { + "kind": "extension-function", + "name": "readSerializedField", + "typeParams": "", + "receiver": "string", + "signature": "public function string.readSerializedField(FieldSerializationReader reader, string name) returns string", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 516 + }, + { + "kind": "extension-function", + "name": "readSerializedField", + "typeParams": "", + "receiver": "boolean", + "signature": "public function boolean.readSerializedField(FieldSerializationReader reader, string name) returns boolean", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 519 + } + ] + }, + { + "package": "SyncSimple", + "category": "file", + "categoryLabel": "File & Network", + "sourcePath": "wurst/file/SyncSimple.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/file/SyncSimple.wurst", + "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" + ], + "imports": [], + "entities": [ + { + "kind": "constant", + "name": "DEFAULT_PREFIX", + "typeParams": "", + "receiver": null, + "signature": "public constant DEFAULT_PREFIX = \"S\"", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": true, + "members": [], + "enumMembers": [], + "line": 20 + }, + { + "kind": "constant", + "name": "LAST_CHUNK_PREFIX", + "typeParams": "", + "receiver": null, + "signature": "public constant LAST_CHUNK_PREFIX = \"T\"", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": true, + "members": [], + "enumMembers": [], + "line": 21 + }, + { + "kind": "constant", + "name": "SYNC_IN_REPLAYS", + "typeParams": "", + "receiver": null, + "signature": "public constant SYNC_IN_REPLAYS = false", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": true, + "members": [], + "enumMembers": [], + "line": 22 + }, + { + "kind": "interface", + "name": "BoolSyncListener", + "typeParams": "", + "receiver": null, + "signature": "public interface BoolSyncListener", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [ + { + "kind": "function", + "name": "onDataSynced", + "typeParams": "", + "receiver": null, + "signature": "function onDataSynced(bool data)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 26 + } + ], + "enumMembers": [], + "line": 25 + }, + { + "kind": "interface", + "name": "IntSyncListener", + "typeParams": "", + "receiver": null, + "signature": "public interface IntSyncListener", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [ + { + "kind": "function", + "name": "onDataSynced", + "typeParams": "", + "receiver": null, + "signature": "function onDataSynced(int data)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 29 + } + ], + "enumMembers": [], + "line": 28 + }, + { + "kind": "interface", + "name": "RealSyncListener", + "typeParams": "", + "receiver": null, + "signature": "public interface RealSyncListener", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [ + { + "kind": "function", + "name": "onDataSynced", + "typeParams": "", + "receiver": null, + "signature": "function onDataSynced(real data)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 32 + } + ], + "enumMembers": [], + "line": 31 + }, + { + "kind": "interface", + "name": "StringSyncListener", + "typeParams": "", + "receiver": null, + "signature": "public interface StringSyncListener", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [ + { + "kind": "function", + "name": "onDataSynced", + "typeParams": "", + "receiver": null, + "signature": "function onDataSynced(string data)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 35 + } + ], + "enumMembers": [], + "line": 34 + }, + { + "kind": "interface", + "name": "BufferSyncListener", + "typeParams": "", + "receiver": null, + "signature": "public interface BufferSyncListener", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [ + { + "kind": "function", + "name": "onDataSynced", + "typeParams": "", + "receiver": null, + "signature": "function onDataSynced(ChunkedString buffer)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 38 + } + ], + "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", + "typeParams": "", + "receiver": "bool", + "signature": "public function bool.sync(player p, BoolSyncListener listener)", + "doc": "Syncs a bool from the given player.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 49 + }, + { + "kind": "extension-function", + "name": "sync", + "typeParams": "", + "receiver": "int", + "signature": "public function int.sync(player p, IntSyncListener listener)", + "doc": "Syncs an int from the given player.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 55 + }, + { + "kind": "extension-function", + "name": "sync", + "typeParams": "", + "receiver": "real", + "signature": "public function real.sync(player p, RealSyncListener listener)", + "doc": "Syncs a real from the given player.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "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", + "name": "sync", + "typeParams": "", + "receiver": "string", + "signature": "public function string.sync(player p, StringSyncListener listener)", + "doc": "Syncs a single string from the given player.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 76 + }, + { + "kind": "extension-function", + "name": "sync", + "typeParams": "", + "receiver": "ChunkedString", + "signature": "public function ChunkedString.sync(player p, BufferSyncListener listener)", + "doc": "Syncs a chunked string from the given player.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 83 + } + ] + }, + { + "package": "Board", + "category": "util", + "categoryLabel": "Utilities", + "sourcePath": "wurst/util/Board.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/Board.wurst", + "summary": "This Board library allows you to create a simple multi board with dynamic cell values.\n 1. Create a board\n `let board = new Board(\"myBoard\", 0.02)`\n\n 2. Define columns. The second parameter is width relative to board width.\n `board.columns(asList(new BoardColumn(\"Player\", 0.7), new BoardColumn(COLOR_GOLD.toColorString() + \"Kills\", 0.3)))`\n\n 3. Add rows and cells\n `let killcount = dynamicCell(0, i -> i.toString())\n board.addRow()\n ..addCell(\"My Name\")\n ..addDynamic(killcount)`\n\n 4. Show board\n `board.show()`\n\n 5. Update dynamic value\n `killcount.updateValue(killcount.value + 1)`", + "summaryFirstLine": "This Board library allows you to create a simple multi board with dynamic cell values.", + "tags": [ + "util" + ], + "imports": [], + "entities": [ + { + "kind": "function", + "name": "dynamicCellIcon", + "typeParams": "", + "receiver": null, + "signature": "public function dynamicCellIcon(string icon, DynamicCellValue observer) returns DynamicCellValue", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 25 + }, + { + "kind": "function", + "name": "dynamicCell", + "typeParams": "", + "receiver": null, + "signature": "public function dynamicCell(T defaultValue, DynamicCellValue observer) returns DynamicCellValue", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 29 + }, + { + "kind": "class", + "name": "DynamicCellValue", + "typeParams": "", + "receiver": null, + "signature": "public abstract class DynamicCellValue", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 33 + }, + { + "kind": "class", + "name": "BoardColumn", + "typeParams": "", + "receiver": null, + "signature": "public class BoardColumn", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 58 + }, + { + "kind": "class", + "name": "BoardCell", + "typeParams": "", + "receiver": null, + "signature": "public class BoardCell", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 74 + }, + { + "kind": "class", + "name": "BoardRow", + "typeParams": "", + "receiver": null, + "signature": "public class BoardRow", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 107 + }, + { + "kind": "class", + "name": "Board", + "typeParams": "", + "receiver": null, + "signature": "public class Board", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 144 + } + ] + }, + { + "package": "Cinematic", + "category": "util", + "categoryLabel": "Utilities", + "sourcePath": "wurst/util/Cinematic.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/Cinematic.wurst", + "summary": "Create a cinematic by composing cinematic sequences:\n\nlet cine = new Cinematic(\nasList(\n Cinematic.fadeOutSeq(0.5.seconds()),\n Cinematic.snapCameraPosSeq(ZERO2),\n Cinematic.fadeInSeq(1..seconds()),\n () -> begin\n print(\"Cinematic!\")\n return 5..seconds()\n end,\n Cinematic.fadeOutSeq(0.5.seconds())\n),\n// This final cinematic seq is always run, even if cinematic is skipped. Use this for cleanup.\n() -> begin\n FogEnable(true)\n SelectUnit(u, true)\n reurn 0..seconds()\nend,\n)\n\nA cinematic can be skipped, which signals the controller to halt processing sequences and play the closing sequence.\ncine.skip_()", + "summaryFirstLine": "Create a cinematic by composing cinematic sequences:", + "tags": [ + "util" + ], + "imports": [], + "entities": [ + { + "kind": "interface", + "name": "CineSeq", + "typeParams": "", + "receiver": null, + "signature": "public interface CineSeq", + "doc": "A cinematic sequence. Cinematic has built-in cinematic sequences:\n\n- Cinematic.fadeOutSeq(duration)\n- Cinematic.fadeInSeq(duration)\n- Cinematic.applyCameraSetupSeq(camerasetup)\n- Cinematic.snapCameraPosSeq(vec2)\n- Cinematic.doNothingSeq()", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 17 + }, + { + "kind": "class", + "name": "Cinematic", + "typeParams": "", + "receiver": null, + "signature": "public class Cinematic", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 45 + }, + { + "kind": "function", + "name": "preloadModelCinematic", + "typeParams": "", + "receiver": null, + "signature": "public function preloadModelCinematic(string modelPath) returns boolean", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 130 + }, + { + "kind": "function", + "name": "playModelCinematic", + "typeParams": "", + "receiver": null, + "signature": "public function playModelCinematic(string modelPath, vec3 position, angle rotation)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 133 + }, + { + "kind": "function", + "name": "getModelCinematicCurrentShot", + "typeParams": "", + "receiver": null, + "signature": "public function getModelCinematicCurrentShot() returns int", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 136 + }, + { + "kind": "function", + "name": "getModelCinematicShotCount", + "typeParams": "", + "receiver": null, + "signature": "public function getModelCinematicShotCount() returns int", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 139 + }, + { + "kind": "function", + "name": "getModelCinematicRemainingTime", + "typeParams": "", + "receiver": null, + "signature": "public function getModelCinematicRemainingTime() returns real", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 142 + }, + { + "kind": "function", + "name": "setDECinematicsEnabled", + "typeParams": "", + "receiver": null, + "signature": "public function setDECinematicsEnabled(boolean enabled)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 145 + }, + { + "kind": "function", + "name": "setThematicMusicPausedOnFocusLost", + "typeParams": "", + "receiver": null, + "signature": "public function setThematicMusicPausedOnFocusLost(boolean paused)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 148 + } + ] + }, + { + "package": "Colors", + "category": "util", + "categoryLabel": "Utilities", + "sourcePath": "wurst/util/Colors.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/Colors.wurst", + "summary": "Mixes two colors, s would be a number 0<=s<=1 that determines\nthe weight given to color c2.\n\n\tc1.mix(c2,0) = c1\nc1.mix(c2,1) = c2\n\tc1.mix(c2,0.5) = Mixing the colors c1 and c2 in equal proportions.", + "summaryFirstLine": "Mixes two colors, s would be a number 0<=s<=1 that determines", + "tags": [ + "util" + ], + "imports": [], + "entities": [ + { + "kind": "constant", + "name": "hexs", + "typeParams": "", + "receiver": null, + "signature": "public constant hexs = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"A\", \"B\", \"C\", \"D\", \"E\", \"F\"]", + "doc": "Hexadecimal numbers", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 13 + }, + { + "kind": "constant", + "name": "COLOR_WHITE", + "typeParams": "", + "receiver": null, + "signature": "public constant COLOR_WHITE = colorA(255,255,255,255)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 16 + }, + { + "kind": "constant", + "name": "COLOR_BLACK", + "typeParams": "", + "receiver": null, + "signature": "public constant COLOR_BLACK = colorA(0,0,0,0)", + "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 + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 19 + }, + { + "kind": "constant", + "name": "COLOR_GOLD", + "typeParams": "", + "receiver": null, + "signature": "public constant COLOR_GOLD = colorA(255, 204, 0, 255)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 20 + }, + { + "kind": "constant", + "name": "COLOR_WHITE_STR", + "typeParams": "", + "receiver": null, + "signature": "public constant COLOR_WHITE_STR = COLOR_WHITE.toColorString()", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 22 + }, + { + "kind": "constant", + "name": "COLOR_BLACK_STR", + "typeParams": "", + "receiver": null, + "signature": "public constant COLOR_BLACK_STR = COLOR_BLACK.toColorString()", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 23 + }, + { + "kind": "constant", + "name": "COLOR_GOLD_STR", + "typeParams": "", + "receiver": null, + "signature": "public constant COLOR_GOLD_STR = COLOR_GOLD.toColorString()", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 24 + }, + { + "kind": "constant", + "name": "DEFAULT_COLOR_NAME", + "typeParams": "", + "receiver": null, + "signature": "public constant DEFAULT_COLOR_NAME = \"black\"", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 26 + }, + { + "kind": "constant", + "name": "MAX_PLAYER_COLORS", + "typeParams": "", + "receiver": null, + "signature": "public constant MAX_PLAYER_COLORS = 23", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 28 + }, + { + "kind": "constant", + "name": "PLAYER_COLORS", + "typeParams": "", + "receiver": null, + "signature": "public constant PLAYER_COLORS = [", + "doc": "Player color array. Access through playercolor.toColor()", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 30 + }, + { + "kind": "constant", + "name": "PLAYER_COLOR_NAMES", + "typeParams": "", + "receiver": null, + "signature": "public constant PLAYER_COLOR_NAMES = [", + "doc": "Player color names array. Access through playercolor.getName()", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 40 + }, + { + "kind": "extension-function", + "name": "getNameColored", + "typeParams": "", + "receiver": "player", + "signature": "public function player.getNameColored(boolean removeHash) returns string", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 49 + }, + { + "kind": "extension-function", + "name": "getNameColored", + "typeParams": "", + "receiver": "player", + "signature": "public function player.getNameColored() returns string", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 52 + }, + { + "kind": "extension-function", + "name": "getName", + "typeParams": "", + "receiver": "playercolor", + "signature": "public function playercolor.getName() returns string", + "doc": "Returns the name of the player color", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 56 + }, + { + "kind": "extension-function", + "name": "toColor", + "typeParams": "", + "receiver": "playercolor", + "signature": "public function playercolor.toColor() returns color", + "doc": "Returns the color associated with the playercolor", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 60 + }, + { + "kind": "tuple", + "name": "color", + "typeParams": "", + "receiver": null, + "signature": "public tuple color(int red, int green, int blue)", + "doc": "Tuple for your RGB color needs. 0 = black, 255 = full color", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 64 + }, + { + "kind": "tuple", + "name": "colorA", + "typeParams": "", + "receiver": null, + "signature": "public tuple colorA(int red, int green, int blue, int alpha)", + "doc": "Tuple for your RGBA color needs. 0 = black/transparent, 255 = full color/opaque", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 66 + }, + { + "kind": "tuple", + "name": "colorHSV", + "typeParams": "", + "receiver": null, + "signature": "public tuple colorHSV(real h, real s, real v)", + "doc": "Tuple for your HSV(Hue Saturation Value) color needs. All values 0-1", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 69 + }, + { + "kind": "extension-function", + "name": "withAlpha", + "typeParams": "", + "receiver": "color", + "signature": "public function color.withAlpha(int a) returns colorA", + "doc": "Add an alpha value to a simple color tuple", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 72 + }, + { + "kind": "extension-function", + "name": "withoutAlpha", + "typeParams": "", + "receiver": "colorA", + "signature": "public function colorA.withoutAlpha() returns color", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 75 + }, + { + "kind": "extension-function", + "name": "toHSV", + "typeParams": "", + "receiver": "color", + "signature": "public function color.toHSV() returns colorHSV", + "doc": "Returns the HSV equivalent", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 79 + }, + { + "kind": "extension-function", + "name": "toRGB", + "typeParams": "", + "receiver": "colorHSV", + "signature": "public function colorHSV.toRGB() returns color", + "doc": "Returns the RGB equivalent", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 102 + }, + { + "kind": "function", + "name": "fromHexString", + "typeParams": "", + "receiver": null, + "signature": "public function fromHexString(string number) returns colorA", + "doc": "Get a colorA tuple from a hexstring", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 137 + }, + { + "kind": "extension-function", + "name": "normalize", + "typeParams": "", + "receiver": "color", + "signature": "public function color.normalize() returns color", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 144 + }, + { + "kind": "extension-function", + "name": "lerp", + "typeParams": "", + "receiver": "color", + "signature": "public function color.lerp(color target, real smoothness) returns color", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 147 + }, + { + "kind": "function", + "name": "makeColor", + "typeParams": "", + "receiver": null, + "signature": "public function makeColor(int colo) returns colorA", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 150 + }, + { + "kind": "extension-function", + "name": "mix", + "typeParams": "", + "receiver": "colorA", + "signature": "public function colorA.mix(colorA c2, real s) returns colorA", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 179 + }, + { + "kind": "extension-function", + "name": "setVertexColor", + "typeParams": "", + "receiver": "unit", + "signature": "public function unit.setVertexColor(colorA col)", + "doc": "Set a units color to the tuplevalues with alpha", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 186 + }, + { + "kind": "extension-function", + "name": "setVertexColor", + "typeParams": "", + "receiver": "unit", + "signature": "public function unit.setVertexColor(color col)", + "doc": "Set a units color to the tuplevalues without alpha", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 190 + }, + { + "kind": "extension-function", + "name": "toColorString", + "typeParams": "", + "receiver": "colorA", + "signature": "public function colorA.toColorString() returns string", + "doc": "Returns a string that is in the wc3 hexcolor format (|caarrggbb)", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 194 + }, + { + "kind": "extension-function", + "name": "toColorString", + "typeParams": "", + "receiver": "color", + "signature": "public function color.toColorString() returns string", + "doc": "Returns a string that is in the wc3 hexcolor format (|crrggbb)", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 198 + }, + { + "kind": "extension-function", + "name": "toString", + "typeParams": "", + "receiver": "color", + "signature": "public function color.toString() returns string", + "doc": "Returns the tuple in string format color(r,g,b)", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 202 + }, + { + "kind": "extension-function", + "name": "toString", + "typeParams": "", + "receiver": "colorA", + "signature": "public function colorA.toString() returns string", + "doc": "Returns the tuple in string format colorA(r,g,b,a)", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 206 + }, + { + "kind": "extension-function", + "name": "toString", + "typeParams": "", + "receiver": "colorHSV", + "signature": "public function colorHSV.toString() returns string", + "doc": "Returns the tuple in string format colorHSV(h,s,v)", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 210 + }, + { + "kind": "function", + "name": "toHex", + "typeParams": "", + "receiver": null, + "signature": "public function toHex(int number) returns string", + "doc": "Converts and int to a hexnumber", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 214 + }, + { + "kind": "function", + "name": "toDec", + "typeParams": "", + "receiver": null, + "signature": "public function toDec(string twochar) returns int", + "doc": "Converts a twochar string to an int", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 220 + }, + { + "kind": "extension-function", + "name": "getName", + "typeParams": "", + "receiver": "color", + "signature": "public function color.getName() returns string", + "doc": "Gets the name of the color. Only works on player colors. See PLAYER_COLORS.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 230 + }, + { + "kind": "function", + "name": "toPlayerFromColorName", + "typeParams": "", + "receiver": null, + "signature": "public function toPlayerFromColorName(string colorName) returns player", + "doc": "Returns the player that corresponds to described color. Returns null if a\n\tbad string is provided. See PLAYER_COLOR_NAMES for options. Returns players\n\tbased on starting color, not current color (does not respect SetPlayerColor)", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 239 + }, + { + "kind": "extension-function", + "name": "toColor", + "typeParams": "", + "receiver": "string", + "signature": "public function string.toColor() returns color", + "doc": "Returns the color that the string describes. Only works on player colors.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 244 + }, + { + "kind": "extension-function", + "name": "toPlayerColor", + "typeParams": "", + "receiver": "string", + "signature": "public function string.toPlayerColor() returns playercolor", + "doc": "Returns the player color that the string describes. Only works on player colors.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 253 + }, + { + "kind": "extension-function", + "name": "color", + "typeParams": "", + "receiver": "string", + "signature": "public function string.color(string which) returns string", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 261 + }, + { + "kind": "extension-function", + "name": "color", + "typeParams": "", + "receiver": "string", + "signature": "public function string.color(color which) returns string", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 264 + }, + { + "kind": "extension-function", + "name": "color", + "typeParams": "", + "receiver": "string", + "signature": "public function string.color(colorA which) returns string", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 267 + } + ] + }, + { + "package": "DestructableSpatialIndex", + "category": "util", + "categoryLabel": "Utilities", + "sourcePath": "wurst/util/DestructableSpatialIndex.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/DestructableSpatialIndex.wurst", + "summary": "Static Lua spatial index for destructables.\n\nDestructables do not have an observable movement event, so this index only needs registration\nand removal hooks. Preplaced destructables are discovered once during initialization. Runtime\ndestructables created through CreateDestructable must call registerSpatialIndex() before they\ncan be queried.", + "summaryFirstLine": "Static Lua spatial index for destructables.", + "tags": [ + "util" + ], + "imports": [], + "entities": [ + { + "kind": "constant", + "name": "USE_DESTRUCTABLE_SPATIAL_INDEX", + "typeParams": "", + "receiver": null, + "signature": "public constant USE_DESTRUCTABLE_SPATIAL_INDEX = true", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": true, + "members": [], + "enumMembers": [], + "line": 20 + }, + { + "kind": "constant", + "name": "DESTRUCTABLE_SPATIAL_INDEX_CELL_SIZE", + "typeParams": "", + "receiver": null, + "signature": "public constant DESTRUCTABLE_SPATIAL_INDEX_CELL_SIZE = 256.", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": true, + "members": [], + "enumMembers": [], + "line": 22 + }, + { + "kind": "extension-function", + "name": "registerSpatialIndex", + "typeParams": "", + "receiver": "destructable", + "signature": "public function destructable.registerSpatialIndex()", + "doc": "Registers one destructable in the index.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 82 + }, + { + "kind": "extension-function", + "name": "unregisterSpatialIndex", + "typeParams": "", + "receiver": "destructable", + "signature": "public function destructable.unregisterSpatialIndex()", + "doc": "Removes one destructable from the index before RemoveDestructable is called.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 95 + }, + { + "kind": "function", + "name": "rebuildDestructableSpatialIndexGrid", + "typeParams": "", + "receiver": null, + "signature": "public function rebuildDestructableSpatialIndexGrid(vec2 worldMin, vec2 worldMax)", + "doc": "Rebuilds the grid around the current membership. Useful after changing the configured map bounds.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 113 + }, + { + "kind": "function", + "name": "destructableSpatialIndexBeginBoxQuery", + "typeParams": "", + "receiver": null, + "signature": "public function destructableSpatialIndexBeginBoxQuery(vec2 boxMin, vec2 boxMax) returns int", + "doc": "Collects indexed destructables whose cached position is inside the axis-aligned box.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 129 + }, + { + "kind": "function", + "name": "destructableSpatialIndexBeginRangeQuery", + "typeParams": "", + "receiver": null, + "signature": "public function destructableSpatialIndexBeginRangeQuery(vec2 center, real range) returns int", + "doc": "Collects indexed destructables in the square used by forDestructablesInRange.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 155 + }, + { + "kind": "function", + "name": "destructableSpatialIndexQuery", + "typeParams": "", + "receiver": null, + "signature": "public function destructableSpatialIndexQuery(int i) returns destructable", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 159 + }, + { + "kind": "function", + "name": "destructableSpatialIndexEndQuery", + "typeParams": "", + "receiver": null, + "signature": "public function destructableSpatialIndexEndQuery()", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 163 + }, + { + "kind": "function", + "name": "destructableSpatialIndexHealthy", + "typeParams": "", + "receiver": null, + "signature": "public function destructableSpatialIndexHealthy() returns boolean", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 170 + }, + { + "kind": "function", + "name": "destructableSpatialIndexTracked", + "typeParams": "", + "receiver": null, + "signature": "public function destructableSpatialIndexTracked() returns int", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 173 + }, + { + "kind": "function", + "name": "destructableSpatialIndexCellOf", + "typeParams": "", + "receiver": null, + "signature": "public function destructableSpatialIndexCellOf(vec2 pos) returns int", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 176 + }, + { + "kind": "function", + "name": "destructableSpatialIndexGridWidth", + "typeParams": "", + "receiver": null, + "signature": "public function destructableSpatialIndexGridWidth() returns int", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 179 + }, + { + "kind": "function", + "name": "destructableSpatialIndexGridHeight", + "typeParams": "", + "receiver": null, + "signature": "public function destructableSpatialIndexGridHeight() returns int", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 182 + } + ] + }, + { + "package": "DialogBox", + "category": "util", + "categoryLabel": "Utilities", + "sourcePath": "wurst/util/DialogBox.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/DialogBox.wurst", + "summary": "DialogBox lets you create dialogs more easily and associate its buttons with closures.\n\tWARNING: Dialogs cannot be displayed at map init!\n\n\tThe DialogBox should be destroyed after it is no longer needed.\n\tExample use:\n\t\tlet dBox = new DialogBox(\"Extra starting gold?\")\n\t\tdBox.addButton(\"Yes\") ->\n\t\t\tplayers[0].addGold(500)\n\t\t\tdestroy dBox\n\n\t\tdBox.addButton(\"No\", () -> destroy dBox)\n\t\t// Make sure to not call display at map initialization\n\t\tdBox.display(players[0], true)", + "summaryFirstLine": "DialogBox lets you create dialogs more easily and associate its buttons with closures.", + "tags": [ + "util" + ], + "imports": [], + "entities": [ + { + "kind": "interface", + "name": "DialogBoxButtonClosure", + "typeParams": "", + "receiver": null, + "signature": "public interface DialogBoxButtonClosure", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [ + { + "kind": "function", + "name": "run", + "typeParams": "", + "receiver": null, + "signature": "function run()", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 7 + } + ], + "enumMembers": [], + "line": 6 + }, + { + "kind": "class", + "name": "DialogBox", + "typeParams": "", + "receiver": null, + "signature": "public class DialogBox", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [ + { + "kind": "function", + "name": "construct", + "typeParams": "", + "receiver": null, + "signature": "construct(string title)", + "doc": "Creates a new DialogBox with a title.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 34 + }, + { + "kind": "function", + "name": "addButton", + "typeParams": "", + "receiver": null, + "signature": "function addButton(string buttonText)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 46 + }, + { + "kind": "function", + "name": "addButton", + "typeParams": "", + "receiver": null, + "signature": "function addButton(string buttonText, DialogBoxButtonClosure cb)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 49 + }, + { + "kind": "function", + "name": "addButton", + "typeParams": "", + "receiver": null, + "signature": "function addButton(string buttonText, int hotkey)", + "doc": "Hotkey: use ASCII number of the capital letter.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 53 + }, + { + "kind": "function", + "name": "addButton", + "typeParams": "", + "receiver": null, + "signature": "function addButton(string buttonText, int hotkey, DialogBoxButtonClosure cb)", + "doc": "Hotkey: use ASCII number of the capital letter.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 57 + }, + { + "kind": "function", + "name": "addQuitButton", + "typeParams": "", + "receiver": null, + "signature": "function addQuitButton(boolean doScoreScreen, string buttonText)", + "doc": "Adds a quit button to this dialog. If it is clicked, it ends the game for that player.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 63 + }, + { + "kind": "function", + "name": "addQuitButton", + "typeParams": "", + "receiver": null, + "signature": "function addQuitButton(boolean doScoreScreen, string buttonText, DialogBoxButtonClosure cb)", + "doc": "Adds a quit button to this dialog. If it is clicked, it ends the game for that player.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 67 + }, + { + "kind": "function", + "name": "addQuitButton", + "typeParams": "", + "receiver": null, + "signature": "function addQuitButton(boolean doScoreScreen, string buttonText, int hotkey)", + "doc": "Adds a quit button to this dialog. If it is clicked, it ends the game for that player.\n\tHotkey: use ASCII numbers of the capital letter.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 72 + }, + { + "kind": "function", + "name": "addQuitButton", + "typeParams": "", + "receiver": null, + "signature": "function addQuitButton(boolean doScoreScreen, string buttonText, int hotkey, DialogBoxButtonClosure cb)", + "doc": "Adds a quit button to this dialog. If it is clicked, it ends the game for that player.\n\tHotkey: use ASCII numbers of the capital letter.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 79 + }, + { + "kind": "function", + "name": "display", + "typeParams": "", + "receiver": null, + "signature": "function display(player whichPlayer, boolean flag)", + "doc": "Toggles visibility of the DialogBox for a player. Dialogs are invisible by default\n\t\tWARNING: Dialogs cannot be shown at map initialization", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 86 + }, + { + "kind": "function", + "name": "setTitle", + "typeParams": "", + "receiver": null, + "signature": "function setTitle(string title)", + "doc": "Changes the title of the DialogBox.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 90 + }, + { + "kind": "function", + "name": "getTitle", + "typeParams": "", + "receiver": null, + "signature": "function getTitle() returns string", + "doc": "Returns the title of the DialogBox.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 95 + } + ], + "enumMembers": [], + "line": 23 + } + ] + }, + { + "package": "EffectUtils", + "category": "util", + "categoryLabel": "Utilities", + "sourcePath": "wurst/util/EffectUtils.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/EffectUtils.wurst", + "summary": "", + "summaryFirstLine": "", + "tags": [ + "util" + ], + "imports": [], + "entities": [ + { + "kind": "extension-function", + "name": "destrAfter", + "typeParams": "", + "receiver": "effect", + "signature": "public function effect.destrAfter(real time)", + "doc": "remove effect after \"time\" expires", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 8 + }, + { + "kind": "extension-function", + "name": "destrHiddenAfter", + "typeParams": "", + "receiver": "effect", + "signature": "public function effect.destrHiddenAfter(real time)", + "doc": "After \"time\", move effect to invisible part of map before removing it (which plays death animation).\n\tDoes not work on effects attached to units!", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 15 + }, + { + "kind": "extension-function", + "name": "destrHidden", + "typeParams": "", + "receiver": "effect", + "signature": "public function effect.destrHidden()", + "doc": "Move effect to invisible part of map before removing it (which plays death animation).\n\tDoes not work on effects attached to units!", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 22 + } + ] + }, + { + "package": "GameTimer", + "category": "util", + "categoryLabel": "Utilities", + "sourcePath": "wurst/util/GameTimer.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/GameTimer.wurst", + "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" + ], + "imports": [], + "entities": [ + { + "kind": "function", + "name": "getElapsedGameTime", + "typeParams": "", + "receiver": null, + "signature": "public function getElapsedGameTime() returns real", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 17 + } + ] + }, + { + "package": "GroupUtils", + "category": "util", + "categoryLabel": "Utilities", + "sourcePath": "wurst/util/GroupUtils.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/GroupUtils.wurst", + "summary": "The max number of recyclable groups. Even if this number is reached,\n\tthe system will create new groups on following requests, but they won't be recyclable.\n\tThe maximum number for this setting is JASS_MAX_ARRAY_SIZE - 1.", + "summaryFirstLine": "The max number of recyclable groups. Even if this number is reached,", + "tags": [ + "util" + ], + "imports": [], + "entities": [ + { + "kind": "constant", + "name": "GROUP_NUMBER_LIMIT", + "typeParams": "", + "receiver": null, + "signature": "constant GROUP_NUMBER_LIMIT = 1024", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": true, + "members": [], + "enumMembers": [], + "line": 24 + }, + { + "kind": "constant", + "name": "NEED_CREATE_GROUPS", + "typeParams": "", + "receiver": null, + "signature": "constant NEED_CREATE_GROUPS = 64", + "doc": "The number of groups created when more are needed", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": true, + "members": [], + "enumMembers": [], + "line": 27 + }, + { + "kind": "constant", + "name": "START_CREATE_GROUPS", + "typeParams": "", + "receiver": null, + "signature": "constant START_CREATE_GROUPS = 64", + "doc": "The number of groups created at start", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": true, + "members": [], + "enumMembers": [], + "line": 30 + }, + { + "kind": "function", + "name": "getGroup", + "typeParams": "", + "receiver": null, + "signature": "public function getGroup() returns group", + "doc": "Returns a reusable group from the GroupUtils stack is possible.\n\tCreates new groups if none are found on the reusable stack.\n\tIf that is not possible, returns a non-recyclable group and displays a warning.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 42 + }, + { + "kind": "extension-function", + "name": "release", + "typeParams": "", + "receiver": "group", + "signature": "public function group.release()", + "doc": "Recycles a group if it is created through GroupUtils, otherwise just destroys it.\n\tDoesn't affect ENUM_GROUP.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 55 + }, + { + "kind": "extension-function", + "name": "recyclableIterator", + "typeParams": "", + "receiver": "group", + "signature": "public function group.recyclableIterator() returns group", + "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 + }, + "configurable": false, + "members": [], + "enumMembers": [], + "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 + } + ] + }, + { + "package": "Knockback3", + "category": "util", + "categoryLabel": "Utilities", + "sourcePath": "wurst/util/Knockback3.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/Knockback3.wurst", + "summary": "Use the `Knockback3.add(..)` functions to apply 3D knockback to units.\nUsing angles:\n\timport Knockback3\n\t...\n\tlet u = ...\n\tKnockback3.add(u, 1000., 0 .fromDeg(), 45 .fromDeg())\n\nUsing a target position:\n\tlet caster = GetSpellAbilityUnit()\n\tlet target = getSpellTargetPos()\n\n\tKnockback3.add(caster, target, 500.)\n\nConfigure this system by overriding the @configurable globals and setting\nthe static class members:\n\n\tKnockback3.gravity = 25.\n\nBy default, this package allows units to collide with destructables and\ndestroy them. To disable this feature, make the global\ndestroyDestructableSpeedThreshold a very high value:\n\n\tKnockback3.destroyDestructableSpeedThreshold = 999999999.\n\nThis value defaults to 300.", + "summaryFirstLine": "Use the `Knockback3.add(..)` functions to apply 3D knockback to units.", + "tags": [ "util" ], "imports": [], "entities": [ { "kind": "interface", - "name": "CineSeq", + "name": "TerrainZProvider", + "typeParams": "", + "receiver": null, + "signature": "public interface TerrainZProvider", + "doc": "A vec3 -> real function.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [ + { + "kind": "function", + "name": "get", + "typeParams": "", + "receiver": null, + "signature": "function get(vec3 where) returns real", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 37 + } + ], + "enumMembers": [], + "line": 36 + }, + { + "kind": "interface", + "name": "UnitFilter", + "typeParams": "", + "receiver": null, + "signature": "public interface UnitFilter", + "doc": "A unit -> bool function.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [ + { + "kind": "function", + "name": "get", + "typeParams": "", + "receiver": null, + "signature": "function get(unit which) returns bool", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 41 + } + ], + "enumMembers": [], + "line": 40 + }, + { + "kind": "interface", + "name": "WallHitTransform", "typeParams": "", "receiver": null, - "signature": "public interface CineSeq", - "doc": "A cinematic sequence. Cinematic has built-in cinematic sequences:\n\n- Cinematic.fadeOutSeq(duration)\n- Cinematic.fadeInSeq(duration)\n- Cinematic.applyCameraSetupSeq(camerasetup)\n- Cinematic.snapCameraPosSeq(vec2)\n- Cinematic.doNothingSeq()", + "signature": "public interface WallHitTransform", + "doc": "A vec3 -> vec3 closure.", "deprecated": { "flag": false, "message": null }, "configurable": false, - "members": [], + "members": [ + { + "kind": "function", + "name": "apply", + "typeParams": "", + "receiver": null, + "signature": "function apply(vec3 vel) returns vec3", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 45 + } + ], "enumMembers": [], - "line": 16 + "line": 44 }, { "kind": "class", - "name": "Cinematic", + "name": "Knockback3", "typeParams": "", "receiver": null, - "signature": "public class Cinematic", + "signature": "public class Knockback3", "doc": "", "deprecated": { "flag": false, "message": null }, "configurable": false, - "members": [], + "members": [ + { + "kind": "function", + "name": "add", + "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:\n\n> Knockback3.add(u, 1000., 0 .fromDeg(), 45 .fromDeg())", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 138 + }, + { + "kind": "function", + "name": "add", + "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:\n\n> Knockback3.add(caster, getSpellTargetPos(), 500.)", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 166 + }, + { + "kind": "function", + "name": "setVel", + "typeParams": "", + "receiver": null, + "signature": "static function setVel(unit u, real velocity, angle groundAngle, angle airAngle)", + "doc": "Setter for the knockback vector on unit u. If the unit is not already tracked, this has the same behavior as\n`add`.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 182 + }, + { + "kind": "function", + "name": "getVel", + "typeParams": "", + "receiver": null, + "signature": "static function getVel(unit u) returns vec3", + "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 + }, + "configurable": false, + "members": [], + "enumMembers": [], + "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", + "name": "forget", + "typeParams": "", + "receiver": null, + "signature": "static function forget(unit u)", + "doc": "Stop tracking unit u. If the unit is middair it will simply stop moving. If the unit is already untracked,\nnothing happens.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 212 + } + ], "enumMembers": [], - "line": 44 + "line": 82 } ] }, { - "package": "Colors", + "package": "MapBounds", "category": "util", "categoryLabel": "Utilities", - "sourcePath": "wurst/util/Colors.wurst", - "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/Colors.wurst", - "summary": "Mixes two colors, s would be a number 0<=s<=1 that determines\nthe weight given to color c2.\n\n\tc1.mix(c2,0) = c1\nc1.mix(c2,1) = c2\n\tc1.mix(c2,0.5) = Mixing the colors c1 and c2 in equal proportions.", - "summaryFirstLine": "Mixes two colors, s would be a number 0<=s<=1 that determines", + "sourcePath": "wurst/util/MapBounds.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/MapBounds.wurst", + "summary": "", + "summaryFirstLine": "", "tags": [ "util" ], "imports": [], "entities": [ { - "kind": "constant", - "name": "hexs", - "typeParams": "", - "receiver": null, - "signature": "public constant hexs = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"A\", \"B\", \"C\", \"D\", \"E\", \"F\"]", - "doc": "Hexadecimal numbers", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 13 - }, - { - "kind": "constant", - "name": "COLOR_WHITE", + "kind": "extension-function", + "name": "inPlayable", "typeParams": "", - "receiver": null, - "signature": "public constant COLOR_WHITE = colorA(255,255,255,255)", + "receiver": "vec2", + "signature": "public function vec2.inPlayable() returns boolean", "doc": "", "deprecated": { "flag": false, @@ -128402,30 +131864,14 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 16 - }, - { - "kind": "constant", - "name": "COLOR_BLACK", - "typeParams": "", - "receiver": null, - "signature": "public constant COLOR_BLACK = colorA(0,0,0,0)", - "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 - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 19 + "line": 24 }, { - "kind": "constant", - "name": "COLOR_GOLD", + "kind": "extension-function", + "name": "inPlayable", "typeParams": "", - "receiver": null, - "signature": "public constant COLOR_GOLD = colorA(255, 204, 0, 255)", + "receiver": "vec3", + "signature": "public function vec3.inPlayable() returns boolean", "doc": "", "deprecated": { "flag": false, @@ -128434,14 +131880,14 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 20 + "line": 27 }, { - "kind": "constant", - "name": "COLOR_WHITE_STR", + "kind": "extension-function", + "name": "inBounds", "typeParams": "", - "receiver": null, - "signature": "public constant COLOR_WHITE_STR = COLOR_WHITE.toColorString()", + "receiver": "vec2", + "signature": "public function vec2.inBounds() returns boolean", "doc": "", "deprecated": { "flag": false, @@ -128450,14 +131896,14 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 22 + "line": 35 }, { - "kind": "constant", - "name": "COLOR_BLACK_STR", + "kind": "extension-function", + "name": "inBounds", "typeParams": "", - "receiver": null, - "signature": "public constant COLOR_BLACK_STR = COLOR_BLACK.toColorString()", + "receiver": "vec3", + "signature": "public function vec3.inBounds() returns boolean", "doc": "", "deprecated": { "flag": false, @@ -128466,14 +131912,14 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 23 + "line": 38 }, { - "kind": "constant", - "name": "COLOR_GOLD_STR", + "kind": "function", + "name": "randomPointOnMap", "typeParams": "", "receiver": null, - "signature": "public constant COLOR_GOLD_STR = COLOR_GOLD.toColorString()", + "signature": "public function randomPointOnMap() returns vec2", "doc": "", "deprecated": { "flag": false, @@ -128482,31 +131928,46 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 24 - }, + "line": 42 + } + ] + }, + { + "package": "Preloader", + "category": "util", + "categoryLabel": "Utilities", + "sourcePath": "wurst/util/Preloader.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/Preloader.wurst", + "summary": "", + "summaryFirstLine": "", + "tags": [ + "util" + ], + "imports": [], + "entities": [ { "kind": "constant", - "name": "DEFAULT_COLOR_NAME", + "name": "autoFinish", "typeParams": "", "receiver": null, - "signature": "public constant DEFAULT_COLOR_NAME = \"black\"", - "doc": "", + "signature": "constant autoFinish = true", + "doc": "Whether to finish preloading automatically", "deprecated": { "flag": false, "message": null }, - "configurable": false, + "configurable": true, "members": [], "enumMembers": [], - "line": 26 + "line": 18 }, { - "kind": "constant", - "name": "MAX_PLAYER_COLORS", + "kind": "function", + "name": "preloadAbility", "typeParams": "", "receiver": null, - "signature": "public constant MAX_PLAYER_COLORS = 23", - "doc": "", + "signature": "public function preloadAbility(vararg int abilIds) returns boolean", + "doc": "Preloads the given abilitytype", "deprecated": { "flag": false, "message": null @@ -128514,15 +131975,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 28 + "line": 23 }, { - "kind": "constant", - "name": "PLAYER_COLORS", + "kind": "function", + "name": "preloadUnit", "typeParams": "", "receiver": null, - "signature": "public constant PLAYER_COLORS = [", - "doc": "Player color array. Access through playercolor.toColor()", + "signature": "public function preloadUnit(vararg int unitIds) returns boolean", + "doc": "Preloads the given unittype", "deprecated": { "flag": false, "message": null @@ -128530,15 +131991,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 30 + "line": 35 }, { - "kind": "constant", - "name": "PLAYER_COLOR_NAMES", + "kind": "function", + "name": "finishPreload", "typeParams": "", "receiver": null, - "signature": "public constant PLAYER_COLOR_NAMES = [", - "doc": "Player color names array. Access through playercolor.getName()", + "signature": "public function finishPreload()", + "doc": "If autoFinish is false you need to call this function manually", "deprecated": { "flag": false, "message": null @@ -128546,14 +132007,29 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 40 - }, + "line": 46 + } + ] + }, + { + "package": "Printing", + "category": "util", + "categoryLabel": "Utilities", + "sourcePath": "wurst/util/Printing.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/Printing.wurst", + "summary": "", + "summaryFirstLine": "", + "tags": [ + "util" + ], + "imports": [], + "entities": [ { - "kind": "extension-function", - "name": "getNameColored", + "kind": "enum", + "name": "Loglevel", "typeParams": "", - "receiver": "player", - "signature": "public function player.getNameColored(boolean removeHash) returns string", + "receiver": null, + "signature": "public enum Loglevel", "doc": "", "deprecated": { "flag": false, @@ -128561,160 +132037,263 @@ }, "configurable": false, "members": [], - "enumMembers": [], - "line": 49 + "enumMembers": [ + "TRACE", + "DEBUG", + "INFO", + "WARNING", + "ERROR" + ], + "line": 9 }, { "kind": "extension-function", - "name": "getNameColored", + "name": "getTag", "typeParams": "", - "receiver": "player", - "signature": "public function player.getNameColored() returns string", + "receiver": "Loglevel", + "signature": "public function Loglevel.getTag() returns string", "doc": "", "deprecated": { "flag": false, "message": null }, - "configurable": false, + "configurable": true, "members": [], "enumMembers": [], - "line": 52 + "line": 16 }, { - "kind": "extension-function", - "name": "getName", + "kind": "class", + "name": "Log", "typeParams": "", - "receiver": "playercolor", - "signature": "public function playercolor.getName() returns string", - "doc": "Returns the name of the player color", + "receiver": null, + "signature": "public class Log", + "doc": "", "deprecated": { "flag": false, "message": null }, "configurable": false, - "members": [], + "members": [ + { + "kind": "function", + "name": "trace", + "typeParams": "", + "receiver": null, + "signature": "static function trace(string msg)", + "doc": "Prints a trace logmessage", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 32 + }, + { + "kind": "function", + "name": "debug", + "typeParams": "", + "receiver": null, + "signature": "static function debug(string msg)", + "doc": "Prints a debug logmessage", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 36 + }, + { + "kind": "function", + "name": "info", + "typeParams": "", + "receiver": null, + "signature": "static function info(string msg)", + "doc": "Prints a info logmessage", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 40 + }, + { + "kind": "function", + "name": "warn", + "typeParams": "", + "receiver": null, + "signature": "static function warn(string msg)", + "doc": "Prints a warning logmessage", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 44 + }, + { + "kind": "function", + "name": "error", + "typeParams": "", + "receiver": null, + "signature": "static function error(string msg)", + "doc": "Prints an error logmessage", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 48 + }, + { + "kind": "function", + "name": "setLevel", + "typeParams": "", + "receiver": null, + "signature": "static function setLevel(Loglevel lvl)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 51 + } + ], "enumMembers": [], - "line": 56 + "line": 30 }, { - "kind": "extension-function", - "name": "toColor", + "kind": "function", + "name": "print", "typeParams": "", - "receiver": "playercolor", - "signature": "public function playercolor.toColor() returns color", - "doc": "Returns the color associated with the playercolor", + "receiver": null, + "signature": "public function print(string msg)", + "doc": "Prints a simple message.", "deprecated": { "flag": false, "message": null }, - "configurable": false, + "configurable": true, "members": [], "enumMembers": [], - "line": 60 + "line": 55 }, { - "kind": "tuple", - "name": "color", + "kind": "function", + "name": "print", "typeParams": "", "receiver": null, - "signature": "public tuple color(int red, int green, int blue)", - "doc": "Tuple for your RGB color needs. 0 = black, 255 = full color", + "signature": "public function print(int msg)", + "doc": "Prints a simple message.", "deprecated": { "flag": false, "message": null }, - "configurable": false, + "configurable": true, "members": [], "enumMembers": [], - "line": 64 + "line": 59 }, { - "kind": "tuple", - "name": "colorA", + "kind": "function", + "name": "print", "typeParams": "", "receiver": null, - "signature": "public tuple colorA(int red, int green, int blue, int alpha)", - "doc": "Tuple for your RGBA color needs. 0 = black/transparent, 255 = full color/opaque", + "signature": "public function print(real msg)", + "doc": "Prints a simple message.", "deprecated": { "flag": false, "message": null }, - "configurable": false, + "configurable": true, "members": [], "enumMembers": [], - "line": 66 + "line": 65 }, { - "kind": "tuple", - "name": "colorHSV", + "kind": "function", + "name": "print", "typeParams": "", "receiver": null, - "signature": "public tuple colorHSV(real h, real s, real v)", - "doc": "Tuple for your HSV(Hue Saturation Value) color needs. All values 0-1", + "signature": "public function print(bool msg)", + "doc": "Prints a simple message.", "deprecated": { "flag": false, "message": null }, - "configurable": false, + "configurable": true, "members": [], "enumMembers": [], "line": 69 }, { - "kind": "extension-function", - "name": "withAlpha", + "kind": "function", + "name": "printLog", "typeParams": "", - "receiver": "color", - "signature": "public function color.withAlpha(int a) returns colorA", - "doc": "Add an alpha value to a simple color tuple", + "receiver": null, + "signature": "public function printLog(Loglevel loglvl, string msg)", + "doc": "Prints a special notification-message", "deprecated": { "flag": false, "message": null }, - "configurable": false, + "configurable": true, "members": [], "enumMembers": [], - "line": 72 + "line": 76 }, { - "kind": "extension-function", - "name": "withoutAlpha", + "kind": "function", + "name": "printLog", "typeParams": "", - "receiver": "colorA", - "signature": "public function colorA.withoutAlpha() returns color", + "receiver": null, + "signature": "public function printLog(player showTo, Loglevel loglvl, string msg)", "doc": "", "deprecated": { "flag": false, "message": null }, - "configurable": false, + "configurable": true, "members": [], "enumMembers": [], - "line": 75 + "line": 79 }, { - "kind": "extension-function", - "name": "toHSV", + "kind": "function", + "name": "printTimed", "typeParams": "", - "receiver": "color", - "signature": "public function color.toHSV() returns colorHSV", - "doc": "Returns the HSV equivalent", + "receiver": null, + "signature": "public function printTimed(string msg, real duration)", + "doc": "Prints a simple message that is shown for the given duration", "deprecated": { "flag": false, "message": null }, - "configurable": false, + "configurable": true, "members": [], "enumMembers": [], - "line": 79 + "line": 85 }, { - "kind": "extension-function", - "name": "toRGB", + "kind": "function", + "name": "print", "typeParams": "", - "receiver": "colorHSV", - "signature": "public function colorHSV.toRGB() returns color", - "doc": "Returns the RGB equivalent", + "receiver": null, + "signature": "public function print(string msg, real duration)", + "doc": "Prints a simple message that is shown for the given duration", "deprecated": { "flag": false, "message": null @@ -128722,31 +132301,31 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 102 + "line": 89 }, { "kind": "function", - "name": "fromHexString", + "name": "printTimedToPlayer", "typeParams": "", "receiver": null, - "signature": "public function fromHexString(string number) returns colorA", - "doc": "Get a colorA tuple from a hexstring", + "signature": "public function printTimedToPlayer(string msg, real duration, player p)", + "doc": "Prints a simple message that is shown to the player for the given duration", "deprecated": { "flag": false, "message": null }, - "configurable": false, + "configurable": true, "members": [], "enumMembers": [], - "line": 137 + "line": 93 }, { "kind": "extension-function", - "name": "normalize", + "name": "print", "typeParams": "", - "receiver": "color", - "signature": "public function color.normalize() returns color", - "doc": "", + "receiver": "player", + "signature": "public function player.print(string msg, real duration)", + "doc": "Prints a timed message that is shown to the player for the given duration", "deprecated": { "flag": false, "message": null @@ -128754,15 +132333,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 144 + "line": 97 }, { "kind": "extension-function", - "name": "lerp", + "name": "print", "typeParams": "", - "receiver": "color", - "signature": "public function color.lerp(color target, real smoothness) returns color", - "doc": "", + "receiver": "player", + "signature": "public function player.print(string msg)", + "doc": "Prints a simple message that is shown to the player", "deprecated": { "flag": false, "message": null @@ -128770,15 +132349,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 147 + "line": 101 }, { "kind": "function", - "name": "makeColor", + "name": "printTimedToPlayerClear", "typeParams": "", "receiver": null, - "signature": "public function makeColor(int colo) returns colorA", - "doc": "", + "signature": "public function printTimedToPlayerClear(string msg, real duration, player p)", + "doc": "Prints a simple message after clearing all messages that is shown to the player for the given duration", "deprecated": { "flag": false, "message": null @@ -128786,47 +132365,142 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 150 - }, + "line": 105 + } + ] + }, + { + "package": "SafetyChecks", + "category": "util", + "categoryLabel": "Utilities", + "sourcePath": "wurst/util/SafetyChecks.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/SafetyChecks.wurst", + "summary": "Enables or disables various safety checks in miscellaneous libraries in Wurst.\nDo not disable this unless you are 100% sure your code works correctly.\n*", + "summaryFirstLine": "Enables or disables various safety checks in miscellaneous libraries in Wurst.", + "tags": [ + "util" + ], + "imports": [], + "entities": [ { - "kind": "extension-function", - "name": "mix", + "kind": "constant", + "name": "SAFETY_CHECKS_ENABLED", "typeParams": "", - "receiver": "colorA", - "signature": "public function colorA.mix(colorA c2, real s) returns colorA", + "receiver": null, + "signature": "public constant SAFETY_CHECKS_ENABLED = true", "doc": "", "deprecated": { "flag": false, "message": null }, - "configurable": false, + "configurable": true, "members": [], "enumMembers": [], - "line": 179 - }, + "line": 7 + } + ] + }, + { + "package": "Simulate3dSound", + "category": "util", + "categoryLabel": "Utilities", + "sourcePath": "wurst/util/Simulate3dSound.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/Simulate3dSound.wurst", + "summary": "", + "summaryFirstLine": "", + "tags": [ + "util" + ], + "imports": [], + "entities": [ { - "kind": "extension-function", - "name": "setVertexColor", + "kind": "class", + "name": "Sim3DSound", "typeParams": "", - "receiver": "unit", - "signature": "public function unit.setVertexColor(colorA col)", - "doc": "Set a units color to the tuplevalues with alpha", + "receiver": null, + "signature": "public class Sim3DSound", + "doc": "", "deprecated": { "flag": false, "message": null }, "configurable": false, - "members": [], + "members": [ + { + "kind": "function", + "name": "setSoundPosition", + "typeParams": "", + "receiver": null, + "signature": "function setSoundPosition(vec2 pos)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 126 + }, + { + "kind": "function", + "name": "setSoundPosition", + "typeParams": "", + "receiver": null, + "signature": "function setSoundPosition(unit u)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 130 + }, + { + "kind": "function", + "name": "construct", + "typeParams": "", + "receiver": null, + "signature": "construct(sound s, real x, real y, real minDist, real maxDist, real distCutoff)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 134 + }, + { + "kind": "function", + "name": "construct", + "typeParams": "", + "receiver": null, + "signature": "construct(sound s, unit u, real minDist, real maxDist, real distCutoff)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 153 + } + ], "enumMembers": [], - "line": 186 + "line": 87 }, { - "kind": "extension-function", - "name": "setVertexColor", + "kind": "function", + "name": "bindSoundToUnit", "typeParams": "", - "receiver": "unit", - "signature": "public function unit.setVertexColor(color col)", - "doc": "Set a units color to the tuplevalues without alpha", + "receiver": null, + "signature": "public function bindSoundToUnit(sound s, unit u, real minD, real maxD, real distCut) returns Sim3DSound", + "doc": "", "deprecated": { "flag": false, "message": null @@ -128834,15 +132508,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 190 + "line": 171 }, { - "kind": "extension-function", - "name": "toColorString", + "kind": "function", + "name": "bindSoundToPoint", "typeParams": "", - "receiver": "colorA", - "signature": "public function colorA.toColorString() returns string", - "doc": "Returns a string that is in the wc3 hexcolor format (|caarrggbb)", + "receiver": null, + "signature": "public function bindSoundToPoint(sound s, real x, real y, real minD, real maxD, real distCut) returns Sim3DSound", + "doc": "", "deprecated": { "flag": false, "message": null @@ -128850,15 +132524,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 194 + "line": 177 }, { - "kind": "extension-function", - "name": "toColorString", + "kind": "function", + "name": "bindSoundToUnitForPlayer", "typeParams": "", - "receiver": "color", - "signature": "public function color.toColorString() returns string", - "doc": "Returns a string that is in the wc3 hexcolor format (|crrggbb)", + "receiver": null, + "signature": "public function bindSoundToUnitForPlayer(player p, sound s, unit u, real minD, real maxD, real distCut) returns Sim3DSound", + "doc": "", "deprecated": { "flag": false, "message": null @@ -128866,15 +132540,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 198 + "line": 183 }, { - "kind": "extension-function", - "name": "toString", + "kind": "function", + "name": "bindSoundToPointForPlayer", "typeParams": "", - "receiver": "color", - "signature": "public function color.toString() returns string", - "doc": "Returns the tuple in string format color(r,g,b)", + "receiver": null, + "signature": "public function bindSoundToPointForPlayer(player p, sound s, real x, real y, real minD, real maxD, real distCut) returns Sim3DSound", + "doc": "", "deprecated": { "flag": false, "message": null @@ -128882,174 +132556,207 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 202 + "line": 191 + } + ] + }, + { + "package": "SoundUtils", + "category": "util", + "categoryLabel": "Utilities", + "sourcePath": "wurst/util/SoundUtils.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/SoundUtils.wurst", + "summary": "", + "summaryFirstLine": "", + "tags": [ + "util" + ], + "imports": [ + "Sounds" + ], + "entities": [ + { + "kind": "constant", + "name": "DEFAULT_SOUND_STOPS_ON_LEAVE_RANGE", + "typeParams": "", + "receiver": null, + "signature": "constant DEFAULT_SOUND_STOPS_ON_LEAVE_RANGE = true", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": true, + "members": [], + "enumMembers": [], + "line": 24 }, { - "kind": "extension-function", - "name": "toString", + "kind": "constant", + "name": "DEFAULT_SOUND_FADE_IN_RATE", "typeParams": "", - "receiver": "colorA", - "signature": "public function colorA.toString() returns string", - "doc": "Returns the tuple in string format colorA(r,g,b,a)", + "receiver": null, + "signature": "constant DEFAULT_SOUND_FADE_IN_RATE = 10", + "doc": "", "deprecated": { "flag": false, "message": null }, - "configurable": false, + "configurable": true, "members": [], "enumMembers": [], - "line": 206 + "line": 25 }, { - "kind": "extension-function", - "name": "toString", + "kind": "constant", + "name": "DEFAULT_SOUND_FADE_OUT_RATE", "typeParams": "", - "receiver": "colorHSV", - "signature": "public function colorHSV.toString() returns string", - "doc": "Returns the tuple in string format colorHSV(h,s,v)", + "receiver": null, + "signature": "constant DEFAULT_SOUND_FADE_OUT_RATE = 10", + "doc": "", "deprecated": { "flag": false, "message": null }, - "configurable": false, + "configurable": true, "members": [], "enumMembers": [], - "line": 210 + "line": 26 }, { - "kind": "function", - "name": "toHex", + "kind": "constant", + "name": "DEFAULT_SOUND_EAX_SETTINGS", "typeParams": "", "receiver": null, - "signature": "public function toHex(int number) returns string", - "doc": "Converts and int to a hexnumber", + "signature": "constant DEFAULT_SOUND_EAX_SETTINGS = \"CombatSoundsEAX\"", + "doc": "", "deprecated": { "flag": false, "message": null }, - "configurable": false, + "configurable": true, "members": [], "enumMembers": [], - "line": 214 + "line": 27 }, { - "kind": "function", - "name": "toDec", + "kind": "constant", + "name": "DEFAULT_SOUND_VOLUME", "typeParams": "", "receiver": null, - "signature": "public function toDec(string twochar) returns int", - "doc": "Converts a twochar string to an int", + "signature": "constant DEFAULT_SOUND_VOLUME = 127", + "doc": "", "deprecated": { "flag": false, "message": null }, - "configurable": false, + "configurable": true, "members": [], "enumMembers": [], - "line": 220 + "line": 28 }, { - "kind": "extension-function", - "name": "getName", + "kind": "constant", + "name": "DEFAULT_SOUND_PITCH", "typeParams": "", - "receiver": "color", - "signature": "public function color.getName() returns string", - "doc": "Gets the name of the color. Only works on player colors. See PLAYER_COLORS.", + "receiver": null, + "signature": "constant DEFAULT_SOUND_PITCH = 1.", + "doc": "", "deprecated": { "flag": false, "message": null }, - "configurable": false, + "configurable": true, "members": [], "enumMembers": [], - "line": 230 + "line": 29 }, { - "kind": "function", - "name": "toPlayerFromColorName", + "kind": "constant", + "name": "DEFAULT_SOUND_DURATION", "typeParams": "", "receiver": null, - "signature": "public function toPlayerFromColorName(string colorName) returns player", - "doc": "Returns the player that corresponds to described color. Returns null if a\n\tbad string is provided. See PLAYER_COLOR_NAMES for options. Returns players\n\tbased on starting color, not current color (does not respect SetPlayerColor)", + "signature": "constant DEFAULT_SOUND_DURATION = 10000", + "doc": "", "deprecated": { "flag": false, "message": null }, - "configurable": false, + "configurable": true, "members": [], "enumMembers": [], - "line": 239 + "line": 30 }, { - "kind": "extension-function", - "name": "toColor", + "kind": "constant", + "name": "SOUND_CHANNEL", "typeParams": "", - "receiver": "string", - "signature": "public function string.toColor() returns color", - "doc": "Returns the color that the string describes. Only works on player colors.", + "receiver": null, + "signature": "constant SOUND_CHANNEL = 5", + "doc": "", "deprecated": { "flag": false, "message": null }, - "configurable": false, + "configurable": true, "members": [], "enumMembers": [], - "line": 244 + "line": 32 }, { - "kind": "extension-function", - "name": "toPlayerColor", + "kind": "constant", + "name": "SOUND_MIN_DIST", "typeParams": "", - "receiver": "string", - "signature": "public function string.toPlayerColor() returns playercolor", - "doc": "Returns the player color that the string describes. Only works on player colors.", + "receiver": null, + "signature": "constant SOUND_MIN_DIST = 600.", + "doc": "", "deprecated": { "flag": false, "message": null }, - "configurable": false, + "configurable": true, "members": [], "enumMembers": [], - "line": 253 + "line": 33 }, { - "kind": "extension-function", - "name": "color", + "kind": "constant", + "name": "SOUND_MAX_DIST", "typeParams": "", - "receiver": "string", - "signature": "public function string.color(string which) returns string", + "receiver": null, + "signature": "constant SOUND_MAX_DIST = 8000.", "doc": "", "deprecated": { "flag": false, "message": null }, - "configurable": false, + "configurable": true, "members": [], "enumMembers": [], - "line": 261 + "line": 34 }, { - "kind": "extension-function", - "name": "color", + "kind": "constant", + "name": "SOUND_DIST_CUT", "typeParams": "", - "receiver": "string", - "signature": "public function string.color(color which) returns string", + "receiver": null, + "signature": "constant SOUND_DIST_CUT = 1500.", "doc": "", "deprecated": { "flag": false, "message": null }, - "configurable": false, + "configurable": true, "members": [], "enumMembers": [], - "line": 264 + "line": 35 }, { - "kind": "extension-function", - "name": "color", + "kind": "class", + "name": "SoundInstance", "typeParams": "", - "receiver": "string", - "signature": "public function string.color(colorA which) returns string", + "receiver": null, + "signature": "public class SoundInstance", "doc": "", "deprecated": { "flag": false, @@ -129058,29 +132765,14 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 267 - } - ] - }, - { - "package": "DialogBox", - "category": "util", - "categoryLabel": "Utilities", - "sourcePath": "wurst/util/DialogBox.wurst", - "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/DialogBox.wurst", - "summary": "DialogBox lets you create dialogs more easily and associate its buttons with closures.\n\tWARNING: Dialogs cannot be displayed at map init!\n\n\tThe DialogBox should be destroyed after it is no longer needed.\n\tExample use:\n\t\tlet dBox = new DialogBox(\"Extra starting gold?\")\n\t\tdBox.addButton(\"Yes\") ->\n\t\t\tplayers[0].addGold(500)\n\t\t\tdestroy dBox\n\n\t\tdBox.addButton(\"No\", () -> destroy dBox)\n\t\t// Make sure to not call display at map initialization\n\t\tdBox.display(players[0], true)", - "summaryFirstLine": "DialogBox lets you create dialogs more easily and associate its buttons with closures.", - "tags": [ - "util" - ], - "imports": [], - "entities": [ + "line": 37 + }, { - "kind": "interface", - "name": "DialogBoxButtonClosure", + "kind": "class", + "name": "SoundDefinition", "typeParams": "", "receiver": null, - "signature": "public interface DialogBoxButtonClosure", + "signature": "public class SoundDefinition", "doc": "", "deprecated": { "flag": false, @@ -129090,10 +132782,10 @@ "members": [ { "kind": "function", - "name": "run", + "name": "construct", "typeParams": "", "receiver": null, - "signature": "function run()", + "signature": "construct(string file)", "doc": "", "deprecated": { "flag": false, @@ -129102,32 +132794,47 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 7 - } - ], - "enumMembers": [], - "line": 6 - }, - { - "kind": "class", - "name": "DialogBox", - "typeParams": "", - "receiver": null, - "signature": "public class DialogBox", - "doc": "", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [ + "line": 60 + }, + { + "kind": "function", + "name": "construct", + "typeParams": "", + "receiver": null, + "signature": "construct(string file, boolean looping)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 63 + }, + { + "kind": "function", + "name": "construct", + "typeParams": "", + "receiver": null, + "signature": "construct(string file, boolean looping, boolean is3D)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 67 + }, { "kind": "function", "name": "construct", "typeParams": "", "receiver": null, - "signature": "construct(string title)", - "doc": "Creates a new DialogBox with a title.", + "signature": "construct(SoundDefinition cloneFrom)", + "doc": "", "deprecated": { "flag": false, "message": null @@ -129135,15 +132842,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 34 + "line": 72 }, { "kind": "function", - "name": "addButton", + "name": "play", "typeParams": "", "receiver": null, - "signature": "function addButton(string buttonText)", - "doc": "", + "signature": "function play() returns SoundInstance", + "doc": "Plays this sound for all Players with a default duration.\n\t\tUse this if you don't care when the SoundHandle gets recycled.", "deprecated": { "flag": false, "message": null @@ -129151,15 +132858,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 47 + "line": 106 }, { "kind": "function", - "name": "addButton", + "name": "play", "typeParams": "", "receiver": null, - "signature": "function addButton(string buttonText, DialogBoxButtonClosure cb)", - "doc": "", + "signature": "function play(int duration) returns SoundInstance", + "doc": "Plays this sound for all Players with the given duration.\n\t\tThe duration should be close to the length of the soundfile.\n\t\tUse this to recycle soundhandles immeditely when they finish,\n\t\tallowing for rapid succession of sounds.", "deprecated": { "flag": false, "message": null @@ -129167,15 +132874,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 50 + "line": 113 }, { "kind": "function", - "name": "addButton", + "name": "play", "typeParams": "", "receiver": null, - "signature": "function addButton(string buttonText, int hotkey)", - "doc": "Hotkey: use ASCII number of the capital letter.", + "signature": "function play(int duration, int volume) returns SoundInstance", + "doc": "", "deprecated": { "flag": false, "message": null @@ -129183,15 +132890,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 54 + "line": 116 }, { "kind": "function", - "name": "addButton", + "name": "playForPlayer", "typeParams": "", "receiver": null, - "signature": "function addButton(string buttonText, int hotkey, DialogBoxButtonClosure cb)", - "doc": "Hotkey: use ASCII number of the capital letter.", + "signature": "function playForPlayer(player p) returns SoundInstance", + "doc": "Plays this sound for the given Player with a default duration.\n\t\tSee play() for more info", "deprecated": { "flag": false, "message": null @@ -129199,15 +132906,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 58 + "line": 125 }, { "kind": "function", - "name": "addQuitButton", + "name": "playForPlayer", "typeParams": "", "receiver": null, - "signature": "function addQuitButton(boolean doScoreScreen, string buttonText)", - "doc": "Adds a quit button to this dialog. If it is clicked, it ends the game for that player.", + "signature": "function playForPlayer(player p, int duration) returns SoundInstance", + "doc": "Plays this sound for the given Player with the given duration.\n\t\tSee play() for more info", "deprecated": { "flag": false, "message": null @@ -129215,15 +132922,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 64 + "line": 130 }, { "kind": "function", - "name": "addQuitButton", + "name": "playOnPoint", "typeParams": "", "receiver": null, - "signature": "function addQuitButton(boolean doScoreScreen, string buttonText, DialogBoxButtonClosure cb)", - "doc": "Adds a quit button to this dialog. If it is clicked, it ends the game for that player.", + "signature": "function playOnPoint(vec3 target) returns SoundInstance", + "doc": "", "deprecated": { "flag": false, "message": null @@ -129231,15 +132938,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 68 + "line": 138 }, { "kind": "function", - "name": "addQuitButton", + "name": "playOnPoint", "typeParams": "", "receiver": null, - "signature": "function addQuitButton(boolean doScoreScreen, string buttonText, int hotkey)", - "doc": "Adds a quit button to this dialog. If it is clicked, it ends the game for that player.\n\tHotkey: use ASCII numbers of the capital letter.", + "signature": "function playOnPoint(vec3 target, int duration) returns SoundInstance", + "doc": "", "deprecated": { "flag": false, "message": null @@ -129247,15 +132954,48 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 73 + "line": 141 + } + ], + "enumMembers": [], + "line": 48 + }, + { + "kind": "class", + "name": "DynamicSound", + "typeParams": "", + "receiver": null, + "signature": "public class DynamicSound", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [ + { + "kind": "function", + "name": "construct", + "typeParams": "", + "receiver": null, + "signature": "construct(SoundDefinition soundHandle)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 183 }, { "kind": "function", - "name": "addQuitButton", + "name": "setTargetPitch", "typeParams": "", "receiver": null, - "signature": "function addQuitButton(boolean doScoreScreen, string buttonText, int hotkey, DialogBoxButtonClosure cb)", - "doc": "Adds a quit button to this dialog. If it is clicked, it ends the game for that player.\n\tHotkey: use ASCII numbers of the capital letter.", + "signature": "function setTargetPitch(real pitch)", + "doc": "", "deprecated": { "flag": false, "message": null @@ -129263,15 +133003,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 80 + "line": 187 }, { "kind": "function", - "name": "display", + "name": "play", "typeParams": "", "receiver": null, - "signature": "function display(player whichPlayer, boolean flag)", - "doc": "Toggles visibility of the DialogBox for a player. Dialogs are invisible by default\n\t\tWARNING: Dialogs cannot be shown at map initialization", + "signature": "function play()", + "doc": "", "deprecated": { "flag": false, "message": null @@ -129279,15 +133019,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 87 + "line": 190 }, { "kind": "function", - "name": "setTitle", + "name": "setAbsolutePitch", "typeParams": "", "receiver": null, - "signature": "function setTitle(string title)", - "doc": "Changes the title of the DialogBox.", + "signature": "function setAbsolutePitch(real pitch)", + "doc": "", "deprecated": { "flag": false, "message": null @@ -129295,15 +133035,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 91 + "line": 195 }, { "kind": "function", - "name": "getTitle", + "name": "onTimedLoop", "typeParams": "", "receiver": null, - "signature": "function getTitle() returns string", - "doc": "Returns the title of the DialogBox.", + "signature": "override function onTimedLoop()", + "doc": "", "deprecated": { "flag": false, "message": null @@ -129311,128 +133051,50 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 96 + "line": 208 } ], "enumMembers": [], - "line": 23 - } - ] - }, - { - "package": "EffectUtils", - "category": "util", - "categoryLabel": "Utilities", - "sourcePath": "wurst/util/EffectUtils.wurst", - "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/EffectUtils.wurst", - "summary": "", - "summaryFirstLine": "", - "tags": [ - "util" - ], - "imports": [], - "entities": [ - { - "kind": "extension-function", - "name": "destrAfter", - "typeParams": "", - "receiver": "effect", - "signature": "public function effect.destrAfter(real time)", - "doc": "remove effect after \"time\" expires", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 8 - }, - { - "kind": "extension-function", - "name": "destrHiddenAfter", - "typeParams": "", - "receiver": "effect", - "signature": "public function effect.destrHiddenAfter(real time)", - "doc": "After \"time\", move effect to invisible part of map before removing it (which plays death animation).\n\tDoes not work on effects attached to units!", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 16 - }, - { - "kind": "extension-function", - "name": "destrHidden", - "typeParams": "", - "receiver": "effect", - "signature": "public function effect.destrHidden()", - "doc": "Move effect to invisible part of map before removing it (which plays death animation).\n\tDoes not work on effects attached to units!", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 24 + "line": 173 } ] }, { - "package": "GameTimer", + "package": "SpatialPartition", "category": "util", "categoryLabel": "Utilities", - "sourcePath": "wurst/util/GameTimer.wurst", - "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/GameTimer.wurst", - "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.", + "sourcePath": "wurst/util/SpatialPartition.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/SpatialPartition.wurst", + "summary": "Cell-head slots the given extent would need, so a caller can size cells and groups before committing\nto it - or -1 when that count is not representable, which is itself a reason to refuse the extent.\n\nComputed with divisions rather than by multiplying and inspecting the result: at a small cell size\nthe product overflows, and a wrapped negative reads as \"comfortably within budget\" to any comparison\nmade afterwards.", + "summaryFirstLine": "Cell-head slots the given extent would need, so a caller can size cells and groups before committing", "tags": [ "util" ], "imports": [], "entities": [ { - "kind": "function", - "name": "getElapsedGameTime", + "kind": "constant", + "name": "SPATIAL_PARTITION_CELL_SIZE", "typeParams": "", "receiver": null, - "signature": "public function getElapsedGameTime() returns real", - "doc": "", + "signature": "public constant SPATIAL_PARTITION_CELL_SIZE = 256.", + "doc": "Fine cell edge in world units. Smaller tightens windows but walks more cells.", "deprecated": { "flag": false, "message": null }, - "configurable": false, + "configurable": true, "members": [], "enumMembers": [], - "line": 17 - } - ] - }, - { - "package": "GroupUtils", - "category": "util", - "categoryLabel": "Utilities", - "sourcePath": "wurst/util/GroupUtils.wurst", - "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/GroupUtils.wurst", - "summary": "The max number of recyclable groups. Even if this number is reached,\n\tthe system will create new groups on following requests, but they won't be recyclable.\n\tThe maximum number for this setting is JASS_MAX_ARRAY_SIZE - 1.", - "summaryFirstLine": "The max number of recyclable groups. Even if this number is reached,", - "tags": [ - "util" - ], - "imports": [], - "entities": [ + "line": 54 + }, { "kind": "constant", - "name": "GROUP_NUMBER_LIMIT", + "name": "SPATIAL_PARTITION_COARSE_FACTOR", "typeParams": "", "receiver": null, - "signature": "constant GROUP_NUMBER_LIMIT = 1024", - "doc": "", + "signature": "public constant SPATIAL_PARTITION_COARSE_FACTOR = 8", + "doc": "Fine cells per coarse block edge, so 8 means a block covers 8x8 cells. The coarse level exists so\na large query skips empty regions with one test per block instead of one per cell.", "deprecated": { "flag": false, "message": null @@ -129440,15 +133102,15 @@ "configurable": true, "members": [], "enumMembers": [], - "line": 24 + "line": 58 }, { "kind": "constant", - "name": "NEED_CREATE_GROUPS", + "name": "SPATIAL_PARTITION_MAX_GROUPS", "typeParams": "", "receiver": null, - "signature": "constant NEED_CREATE_GROUPS = 64", - "doc": "The number of groups created when more are needed", + "signature": "public constant SPATIAL_PARTITION_MAX_GROUPS = 8", + "doc": "Concurrently declared groups. Each costs one chain pointer per entry and one head per cell, so\nraise it only as far as a project uses.", "deprecated": { "flag": false, "message": null @@ -129456,15 +133118,15 @@ "configurable": true, "members": [], "enumMembers": [], - "line": 27 + "line": 62 }, { "kind": "constant", - "name": "START_CREATE_GROUPS", + "name": "SPATIAL_PARTITION_MAX_QUERY_DEPTH", "typeParams": "", "receiver": null, - "signature": "constant START_CREATE_GROUPS = 64", - "doc": "The number of groups created at start", + "signature": "public constant SPATIAL_PARTITION_MAX_QUERY_DEPTH = 8", + "doc": "Deepest nesting of simultaneously open queries. Every open level keeps its own results in the shared\nsnapshot, so this multiplies snapshot storage and is part of the capacity budget below.", "deprecated": { "flag": false, "message": null @@ -129472,15 +133134,15 @@ "configurable": true, "members": [], "enumMembers": [], - "line": 30 + "line": 66 }, { "kind": "function", - "name": "getGroup", + "name": "spatialPartitionCellOf", "typeParams": "", "receiver": null, - "signature": "public function getGroup() returns group", - "doc": "Returns a reusable group from the GroupUtils stack is possible.\n\tCreates new groups if none are found on the reusable stack.\n\tIf that is not possible, returns a non-recyclable group and displays a warning.", + "signature": "public function spatialPartitionCellOf(vec2 pos) returns int", + "doc": "Fine cell for a position, for tests and diagnostics.", "deprecated": { "flag": false, "message": null @@ -129488,15 +133150,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 42 + "line": 142 }, { - "kind": "extension-function", - "name": "release", + "kind": "function", + "name": "spatialPartitionGridWidth", "typeParams": "", - "receiver": "group", - "signature": "public function group.release()", - "doc": "Recycles a group if it is created through GroupUtils, otherwise just destroys it.\n\tDoesn't affect ENUM_GROUP.", + "receiver": null, + "signature": "public function spatialPartitionGridWidth() returns int", + "doc": "", "deprecated": { "flag": false, "message": null @@ -129504,15 +133166,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 55 + "line": 145 }, { - "kind": "extension-function", - "name": "recyclableIterator", + "kind": "function", + "name": "spatialPartitionGridHeight", "typeParams": "", - "receiver": "group", - "signature": "public function group.recyclableIterator() returns group", - "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.", + "receiver": null, + "signature": "public function spatialPartitionGridHeight() returns int", + "doc": "", "deprecated": { "flag": false, "message": null @@ -129520,15 +133182,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 78 + "line": 148 }, { - "kind": "extension-function", - "name": "getClosestUnit", + "kind": "function", + "name": "spatialPartitionCoarseWidth", "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.", + "receiver": null, + "signature": "public function spatialPartitionCoarseWidth() returns int", + "doc": "", "deprecated": { "flag": false, "message": null @@ -129536,15 +133198,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 150 + "line": 151 }, { - "kind": "extension-function", - "name": "filterAliveUnits", + "kind": "function", + "name": "spatialPartitionCellSlotCount", "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.", + "receiver": null, + "signature": "public function spatialPartitionCellSlotCount() returns int", + "doc": "Flattened cell-head slots the current grid occupies: one per cell per group. On Jass this must stay\nwithin `JASS_MAX_ARRAY_SIZE`; on Lua arrays grow and it is only a memory figure.", "deprecated": { "flag": false, "message": null @@ -129552,257 +133214,79 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 163 - } - ] - }, - { - "package": "Knockback3", - "category": "util", - "categoryLabel": "Utilities", - "sourcePath": "wurst/util/Knockback3.wurst", - "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/Knockback3.wurst", - "summary": "Use the `Knockback3.add(..)` functions to apply 3D knockback to units.\nUsing angles:\n\timport Knockback3\n\t...\n\tlet u = ...\n\tKnockback3.add(u, 1000., 0 .fromDeg(), 45 .fromDeg())\n\nUsing a target position:\n\tlet caster = GetSpellAbilityUnit()\n\tlet target = getSpellTargetPos()\n\n\tKnockback3.add(caster, target, 500.)\n\nConfigure this system by overriding the @configurable globals and setting\nthe static class members:\n\n\tKnockback3.gravity = 25.\n\nBy default, this package allows units to collide with destructables and\ndestroy them. To disable this feature, make the global\ndestroyDestructableSpeedThreshold a very high value:\n\n\tKnockback3.destroyDestructableSpeedThreshold = 999999999.\n\nThis value defaults to 300.", - "summaryFirstLine": "Use the `Knockback3.add(..)` functions to apply 3D knockback to units.", - "tags": [ - "util" - ], - "imports": [], - "entities": [ + "line": 156 + }, { - "kind": "interface", - "name": "TerrainZProvider", + "kind": "function", + "name": "spatialPartitionRequiredCellSlots", "typeParams": "", "receiver": null, - "signature": "public interface TerrainZProvider", - "doc": "A vec3 -> real function.", + "signature": "public function spatialPartitionRequiredCellSlots(vec2 worldMin, vec2 worldMax) returns int", + "doc": "", "deprecated": { "flag": false, "message": null }, "configurable": false, - "members": [ - { - "kind": "function", - "name": "get", - "typeParams": "", - "receiver": null, - "signature": "function get(vec3 where) returns real", - "doc": "", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 37 - } - ], + "members": [], "enumMembers": [], - "line": 36 + "line": 174 }, { - "kind": "interface", - "name": "UnitFilter", + "kind": "function", + "name": "spatialPartitionExtentFits", "typeParams": "", "receiver": null, - "signature": "public interface UnitFilter", - "doc": "A unit -> bool function.", + "signature": "public function spatialPartitionExtentFits(vec2 worldMin, vec2 worldMax) returns boolean", + "doc": "Whether an extent's cell storage is both representable and within this target's array limit.", "deprecated": { "flag": false, "message": null }, "configurable": false, - "members": [ - { - "kind": "function", - "name": "get", - "typeParams": "", - "receiver": null, - "signature": "function get(unit which) returns bool", - "doc": "", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 41 - } - ], + "members": [], "enumMembers": [], - "line": 40 + "line": 189 }, { - "kind": "interface", - "name": "WallHitTransform", + "kind": "function", + "name": "spatialPartitionLastQueryVisits", "typeParams": "", "receiver": null, - "signature": "public interface WallHitTransform", - "doc": "A vec3 -> vec3 closure.", + "signature": "public function spatialPartitionLastQueryVisits() returns int", + "doc": "Entries the last query walked, whether or not they matched.", "deprecated": { "flag": false, "message": null }, "configurable": false, - "members": [ - { - "kind": "function", - "name": "apply", - "typeParams": "", - "receiver": null, - "signature": "function apply(vec3 vel) returns vec3", - "doc": "", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 45 - } - ], + "members": [], "enumMembers": [], - "line": 44 + "line": 194 }, { - "kind": "class", - "name": "Knockback3", - "typeParams": "", - "receiver": null, - "signature": "public class Knockback3", - "doc": "", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [ - { - "kind": "function", - "name": "add", - "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:\n\n> Knockback3.add(u, 1000., 0 .fromDeg(), 45 .fromDeg())", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 138 - }, - { - "kind": "function", - "name": "add", - "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:\n\n> Knockback3.add(caster, getSpellTargetPos(), 500.)", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 166 - }, - { - "kind": "function", - "name": "setVel", - "typeParams": "", - "receiver": null, - "signature": "static function setVel(unit u, real velocity, angle groundAngle, angle airAngle)", - "doc": "Setter for the knockback vector on unit u. If the unit is not already tracked, this has the same behavior as\n`add`.", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 182 - }, - { - "kind": "function", - "name": "getVel", - "typeParams": "", - "receiver": null, - "signature": "static function getVel(unit u) returns vec3", - "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 - }, - "configurable": false, - "members": [], - "enumMembers": [], - "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", - "name": "forget", - "typeParams": "", - "receiver": null, - "signature": "static function forget(unit u)", - "doc": "Stop tracking unit u. If the unit is middair it will simply stop moving. If the unit is already untracked,\nnothing happens.", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 212 - } - ], - "enumMembers": [], - "line": 82 - } - ] - }, - { - "package": "MapBounds", - "category": "util", - "categoryLabel": "Utilities", - "sourcePath": "wurst/util/MapBounds.wurst", - "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/MapBounds.wurst", - "summary": "", - "summaryFirstLine": "", - "tags": [ - "util" - ], - "imports": [], - "entities": [ + "kind": "function", + "name": "spatialPartitionLastQueryBlocksSkipped", + "typeParams": "", + "receiver": null, + "signature": "public function spatialPartitionLastQueryBlocksSkipped() returns int", + "doc": "Coarse blocks the last query rejected without descending into their cells.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 198 + }, { - "kind": "extension-function", - "name": "inPlayable", + "kind": "function", + "name": "spatialPartitionMaxEntryId", "typeParams": "", - "receiver": "vec2", - "signature": "public function vec2.inPlayable() returns boolean", - "doc": "", + "receiver": null, + "signature": "public function spatialPartitionMaxEntryId() returns int", + "doc": "Largest usable entry id on this target. Whichever of the two ceilings binds first: the flattened\nper-entry links, or the snapshot with every query level open at once. Effectively unbounded on Lua.", "deprecated": { "flag": false, "message": null @@ -129810,15 +133294,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 24 + "line": 225 }, { - "kind": "extension-function", - "name": "inPlayable", + "kind": "function", + "name": "spatialPartitionIsValidEntryId", "typeParams": "", - "receiver": "vec3", - "signature": "public function vec3.inPlayable() returns boolean", - "doc": "", + "receiver": null, + "signature": "public function spatialPartitionIsValidEntryId(int id) returns boolean", + "doc": "Whether an id may be used as an entry. Ids are 1-based, because 0 is reserved as the chain\nsentinel, and bounded above on Jass by what the flattened entry slots can address.", "deprecated": { "flag": false, "message": null @@ -129826,15 +133310,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 27 + "line": 231 }, { - "kind": "extension-function", - "name": "inBounds", + "kind": "function", + "name": "spatialPartitionIsValidGroupId", "typeParams": "", - "receiver": "vec2", - "signature": "public function vec2.inBounds() returns boolean", - "doc": "", + "receiver": null, + "signature": "public function spatialPartitionIsValidGroupId(int groupId) returns boolean", + "doc": "Whether a group id addresses a real group.", "deprecated": { "flag": false, "message": null @@ -129842,15 +133326,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 35 + "line": 235 }, { - "kind": "extension-function", - "name": "inBounds", + "kind": "function", + "name": "spatialPartitionAllocateEntryId", "typeParams": "", - "receiver": "vec3", - "signature": "public function vec3.inBounds() returns boolean", - "doc": "", + "receiver": null, + "signature": "public function spatialPartitionAllocateEntryId() returns int", + "doc": "Reserves an entry id no other consumer will be handed. Release it with\n`spatialPartitionReleaseEntryId` after removing the entry, or ids are never reused. Answers 0 when\nthe target's id space is exhausted, which a caller must treat as \"cannot index this\".", "deprecated": { "flag": false, "message": null @@ -129858,15 +133342,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 38 + "line": 257 }, { "kind": "function", - "name": "randomPointOnMap", + "name": "spatialPartitionEntryIdIsReserved", "typeParams": "", "receiver": null, - "signature": "public function randomPointOnMap() returns vec2", - "doc": "", + "signature": "public function spatialPartitionEntryIdIsReserved(int id) returns boolean", + "doc": "Whether an id is currently handed out to some consumer.", "deprecated": { "flag": false, "message": null @@ -129874,46 +133358,31 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 42 - } - ] - }, - { - "package": "Preloader", - "category": "util", - "categoryLabel": "Utilities", - "sourcePath": "wurst/util/Preloader.wurst", - "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/Preloader.wurst", - "summary": "", - "summaryFirstLine": "", - "tags": [ - "util" - ], - "imports": [], - "entities": [ + "line": 286 + }, { - "kind": "constant", - "name": "autoFinish", + "kind": "function", + "name": "spatialPartitionReleaseEntryId", "typeParams": "", "receiver": null, - "signature": "constant autoFinish = true", - "doc": "Whether to finish preloading automatically", + "signature": "public function spatialPartitionReleaseEntryId(int id)", + "doc": "Returns an id to the pool. The entry must already be removed: recycling one that is still linked\nwould hand a live row to the next caller.", "deprecated": { "flag": false, "message": null }, - "configurable": true, + "configurable": false, "members": [], "enumMembers": [], - "line": 18 + "line": 291 }, { "kind": "function", - "name": "preloadAbility", + "name": "spatialPartitionAllocatedEntryIds", "typeParams": "", "receiver": null, - "signature": "public function preloadAbility(vararg int abilIds) returns boolean", - "doc": "Preloads the given abilitytype", + "signature": "public function spatialPartitionAllocatedEntryIds() returns int", + "doc": "Highest id in use across every consumer, which is what the arrays keyed by an id are sized to.\nNot the fresh-allocation cursor: a high row taken directly and later recycled is handed out again\nfrom the free list without the cursor ever reaching it, so the cursor can read far below the rows\nthat are actually live.", "deprecated": { "flag": false, "message": null @@ -129921,15 +133390,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 23 + "line": 311 }, { "kind": "function", - "name": "preloadUnit", + "name": "spatialPartitionAllocateGroup", "typeParams": "", "receiver": null, - "signature": "public function preloadUnit(vararg int unitIds) returns boolean", - "doc": "Preloads the given unittype", + "signature": "public function spatialPartitionAllocateGroup() returns int", + "doc": "Reserves a group no other consumer will be given, or -1 when none are left. Hold on to it: groups\nare long-lived, there is no release, and asking twice consumes two.", "deprecated": { "flag": false, "message": null @@ -129937,15 +133406,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 35 + "line": 321 }, { "kind": "function", - "name": "finishPreload", + "name": "spatialPartitionGroupIsReserved", "typeParams": "", "receiver": null, - "signature": "public function finishPreload()", - "doc": "If autoFinish is false you need to call this function manually", + "signature": "public function spatialPartitionGroupIsReserved(int groupId) returns boolean", + "doc": "Whether a group has been claimed, by the allocator or by being used directly.", "deprecated": { "flag": false, "message": null @@ -129953,293 +133422,175 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 46 - } - ] - }, - { - "package": "Printing", - "category": "util", - "categoryLabel": "Utilities", - "sourcePath": "wurst/util/Printing.wurst", - "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/Printing.wurst", - "summary": "", - "summaryFirstLine": "", - "tags": [ - "util" - ], - "imports": [], - "entities": [ + "line": 331 + }, { - "kind": "enum", - "name": "Loglevel", + "kind": "function", + "name": "spatialPartitionIsReady", "typeParams": "", "receiver": null, - "signature": "public enum Loglevel", - "doc": "", + "signature": "public function spatialPartitionIsReady() returns boolean", + "doc": "Whether the grid has been given an extent yet. Nothing can be linked before it has.", "deprecated": { "flag": false, "message": null }, "configurable": false, "members": [], - "enumMembers": [ - "TRACE", - "DEBUG", - "INFO", - "WARNING", - "ERROR" - ], - "line": 9 + "enumMembers": [], + "line": 335 }, { - "kind": "extension-function", - "name": "getTag", + "kind": "function", + "name": "spatialPartitionIsValidExtent", "typeParams": "", - "receiver": "Loglevel", - "signature": "public function Loglevel.getTag() returns string", - "doc": "", + "receiver": null, + "signature": "public function spatialPartitionIsValidExtent(vec2 worldMin, vec2 worldMax) returns boolean", + "doc": "Whether an extent describes a real area. An inverted axis yields a zero or negative dimension, and\nthe coarse block index divides by the grid width, so this has to be caught before any state moves.", "deprecated": { "flag": false, "message": null }, - "configurable": true, + "configurable": false, "members": [], "enumMembers": [], - "line": 16 + "line": 340 }, { - "kind": "class", - "name": "Log", + "kind": "function", + "name": "spatialPartitionSetPos", "typeParams": "", "receiver": null, - "signature": "public class Log", - "doc": "", + "signature": "public function spatialPartitionSetPos(int id, real x, real y)", + "doc": "Records where an entry is, re-bucketing it in every group it belongs to. Call this before adding\nthe entry to any group, and again whenever it has moved.", "deprecated": { "flag": false, "message": null }, "configurable": false, - "members": [ - { - "kind": "function", - "name": "trace", - "typeParams": "", - "receiver": null, - "signature": "static function trace(string msg)", - "doc": "Prints a trace logmessage", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 32 - }, - { - "kind": "function", - "name": "debug", - "typeParams": "", - "receiver": null, - "signature": "static function debug(string msg)", - "doc": "Prints a debug logmessage", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 36 - }, - { - "kind": "function", - "name": "info", - "typeParams": "", - "receiver": null, - "signature": "static function info(string msg)", - "doc": "Prints a info logmessage", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 40 - }, - { - "kind": "function", - "name": "warn", - "typeParams": "", - "receiver": null, - "signature": "static function warn(string msg)", - "doc": "Prints a warning logmessage", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 44 - }, - { - "kind": "function", - "name": "error", - "typeParams": "", - "receiver": null, - "signature": "static function error(string msg)", - "doc": "Prints an error logmessage", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 48 - }, - { - "kind": "function", - "name": "setLevel", - "typeParams": "", - "receiver": null, - "signature": "static function setLevel(Loglevel lvl)", - "doc": "", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 51 - } - ], + "members": [], "enumMembers": [], - "line": 30 + "line": 400 }, { "kind": "function", - "name": "print", + "name": "spatialPartitionSetGroup", "typeParams": "", "receiver": null, - "signature": "public function print(string msg)", - "doc": "Prints a simple message.", + "signature": "public function spatialPartitionSetGroup(int id, int groupId, boolean member)", + "doc": "Adds or removes an entry from one group. The caller owns the policy of when membership changes,\nwhich keeps predicate evaluation out of the walk entirely.", "deprecated": { "flag": false, "message": null }, - "configurable": true, + "configurable": false, "members": [], "enumMembers": [], - "line": 55 + "line": 423 }, { "kind": "function", - "name": "print", + "name": "spatialPartitionEntryX", "typeParams": "", "receiver": null, - "signature": "public function print(int msg)", - "doc": "Prints a simple message.", + "signature": "public function spatialPartitionEntryX(int id) returns real", + "doc": "Cached x of an entry, so a consumer can re-decide an uncertain result under its own staleness\n\tmodel before paying for a live position. Zero for an id the partition does not hold.", "deprecated": { "flag": false, "message": null }, - "configurable": true, + "configurable": false, "members": [], "enumMembers": [], - "line": 59 + "line": 438 }, { "kind": "function", - "name": "print", + "name": "spatialPartitionEntryY", "typeParams": "", "receiver": null, - "signature": "public function print(real msg)", - "doc": "Prints a simple message.", + "signature": "public function spatialPartitionEntryY(int id) returns real", + "doc": "Cached y of an entry. See `spatialPartitionEntryX`.", "deprecated": { "flag": false, "message": null }, - "configurable": true, + "configurable": false, "members": [], "enumMembers": [], - "line": 65 + "line": 442 }, { "kind": "function", - "name": "print", + "name": "spatialPartitionInGroup", "typeParams": "", "receiver": null, - "signature": "public function print(bool msg)", - "doc": "Prints a simple message.", + "signature": "public function spatialPartitionInGroup(int id, int groupId) returns boolean", + "doc": "Whether an entry is currently in a group.", "deprecated": { "flag": false, "message": null }, - "configurable": true, + "configurable": false, "members": [], "enumMembers": [], - "line": 69 + "line": 451 }, { "kind": "function", - "name": "printLog", + "name": "spatialPartitionRemove", "typeParams": "", "receiver": null, - "signature": "public function printLog(Loglevel loglvl, string msg)", - "doc": "Prints a special notification-message", + "signature": "public function spatialPartitionRemove(int id)", + "doc": "Drops an entry from every group. Call before recycling its id, or a later entry inherits it.", "deprecated": { "flag": false, "message": null }, - "configurable": true, + "configurable": false, "members": [], "enumMembers": [], - "line": 76 + "line": 459 }, { "kind": "function", - "name": "printLog", + "name": "spatialPartitionEntryCount", "typeParams": "", "receiver": null, - "signature": "public function printLog(player showTo, Loglevel loglvl, string msg)", - "doc": "", + "signature": "public function spatialPartitionEntryCount() returns int", + "doc": "Live entries the partition holds.", "deprecated": { "flag": false, "message": null }, - "configurable": true, + "configurable": false, "members": [], "enumMembers": [], - "line": 79 + "line": 478 }, { "kind": "function", - "name": "printTimed", + "name": "spatialPartitionClear", "typeParams": "", "receiver": null, - "signature": "public function printTimed(string msg, real duration)", - "doc": "Prints a simple message that is shown for the given duration", + "signature": "public function spatialPartitionClear()", + "doc": "Drops every entry and every group link, across every consumer - the partition has one population,\nnot one per group. A layer that wants to drop only its own entries removes them by id; there is no\nway to ask for that here, because groups say what a query sees, not who owns a row. Ids are not\nreturned to the allocator either, so a consumer that clears must release the ones it held.", "deprecated": { "flag": false, "message": null }, - "configurable": true, + "configurable": false, "members": [], "enumMembers": [], - "line": 85 + "line": 485 }, { "kind": "function", - "name": "print", + "name": "rebuildSpatialPartition", "typeParams": "", "receiver": null, - "signature": "public function print(string msg, real duration)", - "doc": "Prints a simple message that is shown for the given duration", + "signature": "public function rebuildSpatialPartition(vec2 worldMin, vec2 worldMax)", + "doc": "Re-derives the extent and re-links every entry into the new grid, keeping the groups they were in.\n\nEvery cell index means something different afterwards, so this cannot just clear the heads: an\nentry still carrying its old link would be invisible to the new grid and would corrupt the chain it\nis eventually unlinked from.", "deprecated": { "flag": false, "message": null @@ -130247,31 +133598,31 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 89 + "line": 494 }, { "kind": "function", - "name": "printTimedToPlayer", + "name": "spatialPartitionBeginRangeQuery", "typeParams": "", "receiver": null, - "signature": "public function printTimedToPlayer(string msg, real duration, player p)", - "doc": "Prints a simple message that is shown to the player for the given duration", + "signature": "public function spatialPartitionBeginRangeQuery(vec2 center, real radius, real maxDisplacement, int groupId) returns int", + "doc": "Collects the members of `groupId` within `radius` of the point, allowing for entries whose cached\nposition may be up to `maxDisplacement` out of date.\n\nCertainly-in and certainly-out are settled from the cached position alone. Entries in the\n`maxDisplacement`-wide band around the boundary cannot be decided from stale data, so they come\nback flagged: check `spatialPartitionQueryUncertain(i)` and resolve those against a live position.\nPass a zero displacement and no result is ever flagged.\n\nMust be paired with `spatialPartitionEndQuery()`.", "deprecated": { "flag": false, "message": null }, - "configurable": true, + "configurable": false, "members": [], "enumMembers": [], - "line": 93 + "line": 554 }, { - "kind": "extension-function", - "name": "print", + "kind": "function", + "name": "spatialPartitionBeginBoxQuery", "typeParams": "", - "receiver": "player", - "signature": "public function player.print(string msg, real duration)", - "doc": "Prints a timed message that is shown to the player for the given duration", + "receiver": null, + "signature": "public function spatialPartitionBeginBoxQuery(vec2 boxMin, vec2 boxMax, real maxDisplacement, int groupId) returns int", + "doc": "Collects the members of `groupId` inside the axis-aligned box, allowing for entries whose cached\nposition may be up to `maxDisplacement` out of date.\n\nSame three-way split as the range query, applied per axis: a cached position more than\n`maxDisplacement` outside the box cannot be inside it, one that far within cannot be outside, and\nthe band between is flagged for the caller to resolve. Pass a zero displacement and nothing is\nflagged.\n\nMust be paired with `spatialPartitionEndQuery()`.", "deprecated": { "flag": false, "message": null @@ -130279,15 +133630,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 97 + "line": 635 }, { - "kind": "extension-function", - "name": "print", + "kind": "function", + "name": "spatialPartitionQueryId", "typeParams": "", - "receiver": "player", - "signature": "public function player.print(string msg)", - "doc": "Prints a simple message that is shown to the player", + "receiver": null, + "signature": "public function spatialPartitionQueryId(int i) returns int", + "doc": "Entry id `i` of the innermost active query, or 0 if there is no such result.", "deprecated": { "flag": false, "message": null @@ -130295,15 +133646,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 101 + "line": 703 }, { "kind": "function", - "name": "printTimedToPlayerClear", + "name": "spatialPartitionQueryUncertain", "typeParams": "", "receiver": null, - "signature": "public function printTimedToPlayerClear(string msg, real duration, player p)", - "doc": "Prints a simple message after clearing all messages that is shown to the player for the given duration", + "signature": "public function spatialPartitionQueryUncertain(int i) returns boolean", + "doc": "Whether entry `i` could not be decided from its cached position and needs a live check against the\nrequested radius. Always false when the query passed a zero displacement.", "deprecated": { "flag": false, "message": null @@ -130311,47 +133662,32 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 105 - } - ] - }, - { - "package": "SafetyChecks", - "category": "util", - "categoryLabel": "Utilities", - "sourcePath": "wurst/util/SafetyChecks.wurst", - "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/SafetyChecks.wurst", - "summary": "Enables or disables various safety checks in miscellaneous libraries in Wurst.\nDo not disable this unless you are 100% sure your code works correctly.\n*", - "summaryFirstLine": "Enables or disables various safety checks in miscellaneous libraries in Wurst.", - "tags": [ - "util" - ], - "imports": [], - "entities": [ + "line": 713 + }, { - "kind": "constant", - "name": "SAFETY_CHECKS_ENABLED", + "kind": "function", + "name": "spatialPartitionEndQuery", "typeParams": "", "receiver": null, - "signature": "public constant SAFETY_CHECKS_ENABLED = true", + "signature": "public function spatialPartitionEndQuery()", "doc": "", "deprecated": { "flag": false, "message": null }, - "configurable": true, + "configurable": false, "members": [], "enumMembers": [], - "line": 7 + "line": 718 } ] }, { - "package": "Simulate3dSound", + "package": "StandardTextTags", "category": "util", "categoryLabel": "Utilities", - "sourcePath": "wurst/util/Simulate3dSound.wurst", - "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/Simulate3dSound.wurst", + "sourcePath": "wurst/util/StandardTextTags.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/StandardTextTags.wurst", "summary": "", "summaryFirstLine": "", "tags": [ @@ -130360,93 +133696,124 @@ "imports": [], "entities": [ { - "kind": "class", - "name": "Sim3DSound", + "kind": "extension-function", + "name": "setScaledText", + "typeParams": "", + "receiver": "texttag", + "signature": "public function texttag.setScaledText(string text, real scale)", + "doc": "Set the text with the standard font size scaled by a factor.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 6 + }, + { + "kind": "extension-function", + "name": "setText", + "typeParams": "", + "receiver": "texttag", + "signature": "public function texttag.setText(string text)", + "doc": "Set the text with the standard font size.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 10 + }, + { + "kind": "function", + "name": "standardTextTag", "typeParams": "", "receiver": null, - "signature": "public class Sim3DSound", + "signature": "public function standardTextTag() returns texttag", + "doc": "Creates a text tag with default values matching standard built-in text tags", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 14 + }, + { + "kind": "function", + "name": "standardTextTag", + "typeParams": "", + "receiver": null, + "signature": "public function standardTextTag(vec2 pos, string text) returns texttag", "doc": "", "deprecated": { "flag": false, "message": null }, "configurable": false, - "members": [ - { - "kind": "function", - "name": "setSoundPosition", - "typeParams": "", - "receiver": null, - "signature": "function setSoundPosition(vec2 pos)", - "doc": "", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 126 - }, - { - "kind": "function", - "name": "setSoundPosition", - "typeParams": "", - "receiver": null, - "signature": "function setSoundPosition(unit u)", - "doc": "", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 130 - }, - { - "kind": "function", - "name": "construct", - "typeParams": "", - "receiver": null, - "signature": "construct(sound s, real x, real y, real minDist, real maxDist, real distCutoff)", - "doc": "", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 134 - }, - { - "kind": "function", - "name": "construct", - "typeParams": "", - "receiver": null, - "signature": "construct(sound s, unit u, real minDist, real maxDist, real distCutoff)", - "doc": "", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 153 - } - ], + "members": [], + "enumMembers": [], + "line": 23 + }, + { + "kind": "function", + "name": "createCriticalStrikeTextTag", + "typeParams": "", + "receiver": null, + "signature": "public function createCriticalStrikeTextTag(unit u, int damage) returns texttag", + "doc": "Create a texttag that matches the style of the standard warcraft 3 Critical\n\tStrike ability.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 32 + }, + { + "kind": "function", + "name": "createGoldBountyTextTag", + "typeParams": "", + "receiver": null, + "signature": "public function createGoldBountyTextTag(unit u, int bounty, player killer) returns texttag", + "doc": "Create a texttag that matches the style of the standard warcraft 3 gold\n\tbounty.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 42 + }, + { + "kind": "function", + "name": "createGoldBountyTextTag", + "typeParams": "", + "receiver": null, + "signature": "public function createGoldBountyTextTag(unit u, int bounty) returns texttag", + "doc": "Create a texttag that matches the style of the standard warcraft 3 gold\n\tbounty.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], "enumMembers": [], - "line": 87 + "line": 51 }, { "kind": "function", - "name": "bindSoundToUnit", + "name": "createLumberBountyTextTag", "typeParams": "", "receiver": null, - "signature": "public function bindSoundToUnit(sound s, unit u, real minD, real maxD, real distCut) returns Sim3DSound", - "doc": "", + "signature": "public function createLumberBountyTextTag(unit u, int bounty, player killer) returns texttag", + "doc": "Create a texttag that matches the style of the standard warcraft 3 lumber\n\tbounty.", "deprecated": { "flag": false, "message": null @@ -130454,15 +133821,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 171 + "line": 59 }, { "kind": "function", - "name": "bindSoundToPoint", + "name": "createLumberBountyTextTag", "typeParams": "", "receiver": null, - "signature": "public function bindSoundToPoint(sound s, real x, real y, real minD, real maxD, real distCut) returns Sim3DSound", - "doc": "", + "signature": "public function createLumberBountyTextTag(unit u, int bounty) returns texttag", + "doc": "Create a texttag that matches the style of the standard warcraft 3 lumber\n\tbounty.", "deprecated": { "flag": false, "message": null @@ -130470,15 +133837,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 177 + "line": 68 }, { "kind": "function", - "name": "bindSoundToUnitForPlayer", + "name": "createManaBurnTextTag", "typeParams": "", "receiver": null, - "signature": "public function bindSoundToUnitForPlayer(player p, sound s, unit u, real minD, real maxD, real distCut) returns Sim3DSound", - "doc": "", + "signature": "public function createManaBurnTextTag(unit u, int damage) returns texttag", + "doc": "Create a texttag that matches the style of the standard warcraft 3 Mana Burn\n\tability.", "deprecated": { "flag": false, "message": null @@ -130486,15 +133853,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 183 + "line": 76 }, { "kind": "function", - "name": "bindSoundToPointForPlayer", + "name": "createMissTextTag", "typeParams": "", "receiver": null, - "signature": "public function bindSoundToPointForPlayer(player p, sound s, real x, real y, real minD, real maxD, real distCut) returns Sim3DSound", - "doc": "", + "signature": "public function createMissTextTag(unit u) returns texttag", + "doc": "Create a texttag that matches the style of the standard warcraft 3 attack\n\tmiss indication.", "deprecated": { "flag": false, "message": null @@ -130502,207 +133869,221 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 191 + "line": 87 + }, + { + "kind": "function", + "name": "createShadowStrikeTextTag", + "typeParams": "", + "receiver": null, + "signature": "public function createShadowStrikeTextTag(unit u, int damage, bool isInitialDamage) returns texttag", + "doc": "Create a texttag that matches the style of the standard warcraft 3 Shadow\n\tStrike ability.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 95 } ] }, { - "package": "SoundUtils", + "package": "StringUtils", "category": "util", "categoryLabel": "Utilities", - "sourcePath": "wurst/util/SoundUtils.wurst", - "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/SoundUtils.wurst", - "summary": "", - "summaryFirstLine": "", + "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 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" ], - "imports": [ - "Sounds" - ], + "imports": [], "entities": [ { - "kind": "constant", - "name": "DEFAULT_SOUND_STOPS_ON_LEAVE_RANGE", + "kind": "extension-function", + "name": "center", "typeParams": "", - "receiver": null, - "signature": "constant DEFAULT_SOUND_STOPS_ON_LEAVE_RANGE = true", + "receiver": "texttag", + "signature": "public function texttag.center(vec3 pos, string message, real size) returns texttag", "doc": "", "deprecated": { "flag": false, "message": null }, - "configurable": true, + "configurable": false, "members": [], "enumMembers": [], - "line": 24 + "line": 22 }, { - "kind": "constant", - "name": "DEFAULT_SOUND_FADE_IN_RATE", + "kind": "function", + "name": "createCenteredTexttag", "typeParams": "", "receiver": null, - "signature": "constant DEFAULT_SOUND_FADE_IN_RATE = 10", + "signature": "public function createCenteredTexttag(vec3 pos, string message, real size) returns texttag", "doc": "", "deprecated": { "flag": false, "message": null }, - "configurable": true, + "configurable": false, "members": [], "enumMembers": [], - "line": 25 + "line": 31 }, { - "kind": "constant", - "name": "DEFAULT_SOUND_FADE_OUT_RATE", + "kind": "tuple", + "name": "char", "typeParams": "", "receiver": null, - "signature": "constant DEFAULT_SOUND_FADE_OUT_RATE = 10", + "signature": "public tuple char(int c)", "doc": "", "deprecated": { "flag": false, "message": null }, - "configurable": true, + "configurable": false, "members": [], "enumMembers": [], - "line": 26 + "line": 38 }, { - "kind": "constant", - "name": "DEFAULT_SOUND_EAX_SETTINGS", + "kind": "extension-function", + "name": "getWidth", "typeParams": "", - "receiver": null, - "signature": "constant DEFAULT_SOUND_EAX_SETTINGS = \"CombatSoundsEAX\"", + "receiver": "string", + "signature": "public function string.getWidth() returns int", "doc": "", "deprecated": { "flag": false, "message": null }, - "configurable": true, + "configurable": false, "members": [], "enumMembers": [], - "line": 27 + "line": 45 }, { - "kind": "constant", - "name": "DEFAULT_SOUND_VOLUME", + "kind": "function", + "name": "char", "typeParams": "", "receiver": null, - "signature": "constant DEFAULT_SOUND_VOLUME = 127", + "signature": "public function char(string s) returns char", "doc": "", "deprecated": { "flag": false, "message": null }, - "configurable": true, + "configurable": false, "members": [], "enumMembers": [], - "line": 28 + "line": 51 }, { - "kind": "constant", - "name": "DEFAULT_SOUND_PITCH", + "kind": "extension-function", + "name": "toString", "typeParams": "", - "receiver": null, - "signature": "constant DEFAULT_SOUND_PITCH = 1.", + "receiver": "char", + "signature": "public function char.toString() returns string", "doc": "", "deprecated": { "flag": false, "message": null }, - "configurable": true, + "configurable": false, "members": [], "enumMembers": [], - "line": 29 + "line": 61 }, { - "kind": "constant", - "name": "DEFAULT_SOUND_DURATION", + "kind": "extension-function", + "name": "toInt", "typeParams": "", - "receiver": null, - "signature": "constant DEFAULT_SOUND_DURATION = 10000", + "receiver": "char", + "signature": "public function char.toInt() returns int", "doc": "", "deprecated": { "flag": false, "message": null }, - "configurable": true, + "configurable": false, "members": [], "enumMembers": [], - "line": 30 + "line": 66 }, { - "kind": "constant", - "name": "SOUND_CHANNEL", + "kind": "extension-function", + "name": "getWidth", "typeParams": "", - "receiver": null, - "signature": "constant SOUND_CHANNEL = 5", + "receiver": "char", + "signature": "public function char.getWidth() returns int", "doc": "", "deprecated": { "flag": false, "message": null }, - "configurable": true, + "configurable": false, "members": [], "enumMembers": [], - "line": 32 + "line": 69 }, { - "kind": "constant", - "name": "SOUND_MIN_DIST", + "kind": "extension-function", + "name": "toChar", "typeParams": "", - "receiver": null, - "signature": "constant SOUND_MIN_DIST = 600.", + "receiver": "string", + "signature": "public function string.toChar() returns char", "doc": "", "deprecated": { "flag": false, "message": null }, - "configurable": true, + "configurable": false, "members": [], "enumMembers": [], - "line": 33 + "line": 74 }, { - "kind": "constant", - "name": "SOUND_MAX_DIST", + "kind": "extension-function", + "name": "toCharList", "typeParams": "", - "receiver": null, - "signature": "constant SOUND_MAX_DIST = 8000.", - "doc": "", + "receiver": "string", + "signature": "public function string.toCharList() returns LinkedList", + "doc": "Splits the string into chars. Only valid for single byte (latin) characters,\n\tmultibyte characters are split into their individual bytes.", "deprecated": { "flag": false, "message": null }, - "configurable": true, + "configurable": false, "members": [], "enumMembers": [], - "line": 34 + "line": 79 }, { - "kind": "constant", - "name": "SOUND_DIST_CUT", + "kind": "extension-function", + "name": "toChar", "typeParams": "", - "receiver": null, - "signature": "constant SOUND_DIST_CUT = 1500.", + "receiver": "int", + "signature": "public function int.toChar() returns char", "doc": "", "deprecated": { "flag": false, "message": null }, - "configurable": true, + "configurable": false, "members": [], "enumMembers": [], - "line": 35 + "line": 85 }, { - "kind": "class", - "name": "SoundInstance", + "kind": "function", + "name": "charToIndex", "typeParams": "", "receiver": null, - "signature": "public class SoundInstance", + "signature": "public function charToIndex(char c) returns int", "doc": "", "deprecated": { "flag": false, @@ -130711,207 +134092,78 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 37 + "line": 88 }, { - "kind": "class", - "name": "SoundDefinition", + "kind": "function", + "name": "charFromIndex", "typeParams": "", "receiver": null, - "signature": "public class SoundDefinition", + "signature": "public function charFromIndex(int index) returns char", "doc": "", "deprecated": { "flag": false, "message": null }, "configurable": false, - "members": [ - { - "kind": "function", - "name": "construct", - "typeParams": "", - "receiver": null, - "signature": "construct(string file)", - "doc": "", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 60 - }, - { - "kind": "function", - "name": "construct", - "typeParams": "", - "receiver": null, - "signature": "construct(string file, boolean looping)", - "doc": "", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 63 - }, - { - "kind": "function", - "name": "construct", - "typeParams": "", - "receiver": null, - "signature": "construct(string file, boolean looping, boolean is3D)", - "doc": "", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 67 - }, - { - "kind": "function", - "name": "construct", - "typeParams": "", - "receiver": null, - "signature": "construct(SoundDefinition cloneFrom)", - "doc": "", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 72 - }, - { - "kind": "function", - "name": "play", - "typeParams": "", - "receiver": null, - "signature": "function play() returns SoundInstance", - "doc": "Plays this sound for all Players with a default duration.\n\t\tUse this if you don't care when the SoundHandle gets recycled.", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 106 - }, - { - "kind": "function", - "name": "play", - "typeParams": "", - "receiver": null, - "signature": "function play(int duration) returns SoundInstance", - "doc": "Plays this sound for all Players with the given duration.\n\t\tThe duration should be close to the length of the soundfile.\n\t\tUse this to recycle soundhandles immeditely when they finish,\n\t\tallowing for rapid succession of sounds.", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 113 - }, - { - "kind": "function", - "name": "play", - "typeParams": "", - "receiver": null, - "signature": "function play(int duration, int volume) returns SoundInstance", - "doc": "", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 116 - }, - { - "kind": "function", - "name": "playForPlayer", - "typeParams": "", - "receiver": null, - "signature": "function playForPlayer(player p) returns SoundInstance", - "doc": "Plays this sound for the given Player with a default duration.\n\t\tSee play() for more info", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 125 - }, - { - "kind": "function", - "name": "playForPlayer", - "typeParams": "", - "receiver": null, - "signature": "function playForPlayer(player p, int duration) returns SoundInstance", - "doc": "Plays this sound for the given Player with the given duration.\n\t\tSee play() for more info", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 130 - }, - { - "kind": "function", - "name": "playOnPoint", - "typeParams": "", - "receiver": null, - "signature": "function playOnPoint(vec3 target) returns SoundInstance", - "doc": "", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 138 - }, - { - "kind": "function", - "name": "playOnPoint", - "typeParams": "", - "receiver": null, - "signature": "function playOnPoint(vec3 target, int duration) returns SoundInstance", - "doc": "", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 141 - } - ], + "members": [], "enumMembers": [], - "line": 48 + "line": 91 }, { - "kind": "class", - "name": "DynamicSound", + "kind": "extension-function", + "name": "split", + "typeParams": "", + "receiver": "string", + "signature": "public function string.split(string splitBy) returns LinkedList", + "doc": "Splits the string by another string\n\t\"this..is..an..example\" split by the string \"..\" splits into a list containing four strings [\"this\", \"is\", \"an\", \"example\"]", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 96 + }, + { + "kind": "extension-function", + "name": "reduce", + "typeParams": "", + "receiver": "string", + "signature": "public function string.reduce(string reduced) returns string", + "doc": "Replaces consecutive repeats of the same string with a single instance\n\tTurns \"strstr\" into \"str\"", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 113 + }, + { + "kind": "extension-function", + "name": "reduce", + "typeParams": "", + "receiver": "string", + "signature": "public function string.reduce() returns string", + "doc": "Replaces consecutive repeats of the whitespace character with a single instance\n\tTurns \" \" into \" \"", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 129 + }, + { + "kind": "interface", + "name": "ForStringSplitCallback", "typeParams": "", "receiver": null, - "signature": "public class DynamicSound", + "signature": "public interface ForStringSplitCallback", "doc": "", "deprecated": { "flag": false, @@ -130921,74 +134173,10 @@ "members": [ { "kind": "function", - "name": "construct", - "typeParams": "", - "receiver": null, - "signature": "construct(SoundDefinition soundHandle)", - "doc": "", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 183 - }, - { - "kind": "function", - "name": "setTargetPitch", - "typeParams": "", - "receiver": null, - "signature": "function setTargetPitch(real pitch)", - "doc": "", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 187 - }, - { - "kind": "function", - "name": "play", - "typeParams": "", - "receiver": null, - "signature": "function play()", - "doc": "", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 190 - }, - { - "kind": "function", - "name": "setAbsolutePitch", - "typeParams": "", - "receiver": null, - "signature": "function setAbsolutePitch(real pitch)", - "doc": "", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 195 - }, - { - "kind": "function", - "name": "onTimedLoop", + "name": "callback", "typeParams": "", "receiver": null, - "signature": "override function onTimedLoop()", + "signature": "function callback(string str)", "doc": "", "deprecated": { "flag": false, @@ -130997,34 +134185,19 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 208 + "line": 133 } ], "enumMembers": [], - "line": 173 - } - ] - }, - { - "package": "StandardTextTags", - "category": "util", - "categoryLabel": "Utilities", - "sourcePath": "wurst/util/StandardTextTags.wurst", - "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/StandardTextTags.wurst", - "summary": "", - "summaryFirstLine": "", - "tags": [ - "util" - ], - "imports": [], - "entities": [ + "line": 132 + }, { "kind": "extension-function", - "name": "setScaledText", + "name": "forEachIn", "typeParams": "", - "receiver": "texttag", - "signature": "public function texttag.setScaledText(string text, real scale)", - "doc": "Set the text with the standard font size scaled by a factor.", + "receiver": "string", + "signature": "public function string.forEachIn(string delim, ForStringSplitCallback cb)", + "doc": "Custom Function which can split strings and runs callback for each string.\n\tIt can run even with no delimiter present (with single element).\n\tExample usage:\n\t\"H001,H002\".forEachIn(\",\") ->\n\t\tdoSomething()", "deprecated": { "flag": false, "message": null @@ -131032,15 +134205,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 6 + "line": 140 }, { "kind": "extension-function", - "name": "setText", + "name": "isNumber", "typeParams": "", - "receiver": "texttag", - "signature": "public function texttag.setText(string text)", - "doc": "Set the text with the standard font size.", + "receiver": "string", + "signature": "public function string.isNumber() returns bool", + "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 @@ -131048,15 +134221,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 10 + "line": 159 }, { - "kind": "function", - "name": "standardTextTag", + "kind": "extension-function", + "name": "isValidDescription", "typeParams": "", - "receiver": null, - "signature": "public function standardTextTag() returns texttag", - "doc": "Creates a text tag with default values matching standard built-in text tags", + "receiver": "string", + "signature": "public function string.isValidDescription() returns bool", + "doc": "Checks whether a string is valid in terms of max WC3 string length for various usages (Ability Description, Quest Description,...).", "deprecated": { "flag": false, "message": null @@ -131064,15 +134237,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 14 + "line": 177 }, { - "kind": "function", - "name": "standardTextTag", + "kind": "extension-function", + "name": "replaceChars", "typeParams": "", - "receiver": null, - "signature": "public function standardTextTag(vec2 pos, string text) returns texttag", - "doc": "", + "receiver": "string", + "signature": "public function string.replaceChars(string charset, string replacementChar) returns string", + "doc": "Replaces all occurences of any character from given charlist by a given replacement string.", "deprecated": { "flag": false, "message": null @@ -131080,15 +134253,30 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 23 - }, + "line": 185 + } + ] + }, + { + "package": "TerrainEnvironment", + "category": "util", + "categoryLabel": "Utilities", + "sourcePath": "wurst/util/TerrainEnvironment.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/TerrainEnvironment.wurst", + "summary": "", + "summaryFirstLine": "", + "tags": [ + "util" + ], + "imports": [], + "entities": [ { - "kind": "function", - "name": "createCriticalStrikeTextTag", + "kind": "tuple", + "name": "terrainFogSettings", "typeParams": "", "receiver": null, - "signature": "public function createCriticalStrikeTextTag(unit u, int damage) returns texttag", - "doc": "Create a texttag that matches the style of the standard warcraft 3 Critical\n\tStrike ability.", + "signature": "public tuple terrainFogSettings(int style, real zStart, real zEnd, real density, real heightStart, real heightEnd, real linearStart, real linearEnd, color tint)", + "doc": "Complete terrain-fog configuration used by the v3 renderer.", "deprecated": { "flag": false, "message": null @@ -131096,15 +134284,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 32 + "line": 7 }, { "kind": "function", - "name": "createGoldBountyTextTag", + "name": "setTerrainFog", "typeParams": "", "receiver": null, - "signature": "public function createGoldBountyTextTag(unit u, int bounty, player killer) returns texttag", - "doc": "Create a texttag that matches the style of the standard warcraft 3 gold\n\tbounty.", + "signature": "public function setTerrainFog(terrainFogSettings settings)", + "doc": "", "deprecated": { "flag": false, "message": null @@ -131112,15 +134300,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 42 + "line": 10 }, { "kind": "function", - "name": "createGoldBountyTextTag", + "name": "setTerrainFogStyle", "typeParams": "", "receiver": null, - "signature": "public function createGoldBountyTextTag(unit u, int bounty) returns texttag", - "doc": "Create a texttag that matches the style of the standard warcraft 3 gold\n\tbounty.", + "signature": "public function setTerrainFogStyle(fogstyle style)", + "doc": "", "deprecated": { "flag": false, "message": null @@ -131128,15 +134316,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 51 + "line": 15 }, { "kind": "function", - "name": "createLumberBountyTextTag", + "name": "setTerrainFogZRange", "typeParams": "", "receiver": null, - "signature": "public function createLumberBountyTextTag(unit u, int bounty, player killer) returns texttag", - "doc": "Create a texttag that matches the style of the standard warcraft 3 lumber\n\tbounty.", + "signature": "public function setTerrainFogZRange(real start, real stop)", + "doc": "", "deprecated": { "flag": false, "message": null @@ -131144,15 +134332,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 59 + "line": 18 }, { "kind": "function", - "name": "createLumberBountyTextTag", + "name": "setTerrainFogHeightRange", "typeParams": "", "receiver": null, - "signature": "public function createLumberBountyTextTag(unit u, int bounty) returns texttag", - "doc": "Create a texttag that matches the style of the standard warcraft 3 lumber\n\tbounty.", + "signature": "public function setTerrainFogHeightRange(real start, real stop)", + "doc": "", "deprecated": { "flag": false, "message": null @@ -131160,15 +134348,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 68 + "line": 22 }, { "kind": "function", - "name": "createManaBurnTextTag", + "name": "setTerrainFogLinearRange", "typeParams": "", "receiver": null, - "signature": "public function createManaBurnTextTag(unit u, int damage) returns texttag", - "doc": "Create a texttag that matches the style of the standard warcraft 3 Mana Burn\n\tability.", + "signature": "public function setTerrainFogLinearRange(real start, real stop)", + "doc": "", "deprecated": { "flag": false, "message": null @@ -131176,15 +134364,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 76 + "line": 26 }, { "kind": "function", - "name": "createMissTextTag", + "name": "setTerrainFogDensity", "typeParams": "", "receiver": null, - "signature": "public function createMissTextTag(unit u) returns texttag", - "doc": "Create a texttag that matches the style of the standard warcraft 3 attack\n\tmiss indication.", + "signature": "public function setTerrainFogDensity(real density)", + "doc": "", "deprecated": { "flag": false, "message": null @@ -131192,15 +134380,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 87 + "line": 30 }, { "kind": "function", - "name": "createShadowStrikeTextTag", + "name": "setTerrainFogMaxLinearDensity", "typeParams": "", "receiver": null, - "signature": "public function createShadowStrikeTextTag(unit u, int damage, bool isInitialDamage) returns texttag", - "doc": "Create a texttag that matches the style of the standard warcraft 3 Shadow\n\tStrike ability.", + "signature": "public function setTerrainFogMaxLinearDensity(real density)", + "doc": "", "deprecated": { "flag": false, "message": null @@ -131208,29 +134396,14 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 95 - } - ] - }, - { - "package": "StringUtils", - "category": "util", - "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 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" - ], - "imports": [], - "entities": [ + "line": 33 + }, { - "kind": "extension-function", - "name": "center", + "kind": "function", + "name": "setTerrainFogColor", "typeParams": "", - "receiver": "texttag", - "signature": "public function texttag.center(vec3 pos, string message, real size) returns texttag", + "receiver": null, + "signature": "public function setTerrainFogColor(color tint)", "doc": "", "deprecated": { "flag": false, @@ -131239,14 +134412,14 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 22 + "line": 36 }, { "kind": "function", - "name": "createCenteredTexttag", + "name": "setTerrainFogDrawOverSky", "typeParams": "", "receiver": null, - "signature": "public function createCenteredTexttag(vec3 pos, string message, real size) returns texttag", + "signature": "public function setTerrainFogDrawOverSky(boolean drawOverSky)", "doc": "", "deprecated": { "flag": false, @@ -131255,15 +134428,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 31 + "line": 39 }, { "kind": "tuple", - "name": "char", + "name": "hdWaterSettings", "typeParams": "", "receiver": null, - "signature": "public tuple char(int c)", - "doc": "", + "signature": "public tuple hdWaterSettings(color tint, boolean overrideColor, int vertexDisplacement, int minOpacity, int maxOpacity, int reflectivity, int emissivity, int edgeSoftness, int waveStrength, int environmentMapStrength)", + "doc": "HD-water renderer parameters. Integer fields use the native engine ranges.", "deprecated": { "flag": false, "message": null @@ -131271,14 +134444,14 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 38 + "line": 43 }, { - "kind": "extension-function", - "name": "getWidth", + "kind": "function", + "name": "setHDWater", "typeParams": "", - "receiver": "string", - "signature": "public function string.getWidth() returns int", + "receiver": null, + "signature": "public function setHDWater(hdWaterSettings settings)", "doc": "", "deprecated": { "flag": false, @@ -131287,14 +134460,14 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 45 + "line": 47 }, { "kind": "function", - "name": "char", + "name": "setHDWater", "typeParams": "", "receiver": null, - "signature": "public function char(string s) returns char", + "signature": "public function setHDWater(color tint, boolean useColor, int vertexDisplacement, int minOpacity, int maxOpacity, int reflectivity, int emissivity, int edgeSoftness, int waveStrength)", "doc": "", "deprecated": { "flag": false, @@ -131303,14 +134476,14 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 51 + "line": 53 }, { - "kind": "extension-function", - "name": "toString", + "kind": "function", + "name": "setHDWaterColor", "typeParams": "", - "receiver": "char", - "signature": "public function char.toString() returns string", + "receiver": null, + "signature": "public function setHDWaterColor(color tint)", "doc": "", "deprecated": { "flag": false, @@ -131319,14 +134492,14 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 61 + "line": 59 }, { - "kind": "extension-function", - "name": "toInt", + "kind": "function", + "name": "setHDWaterColorOverride", "typeParams": "", - "receiver": "char", - "signature": "public function char.toInt() returns int", + "receiver": null, + "signature": "public function setHDWaterColorOverride(boolean enabled)", "doc": "", "deprecated": { "flag": false, @@ -131335,14 +134508,14 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 66 + "line": 62 }, { - "kind": "extension-function", - "name": "getWidth", + "kind": "function", + "name": "setHDWaterVertexDisplacement", "typeParams": "", - "receiver": "char", - "signature": "public function char.getWidth() returns int", + "receiver": null, + "signature": "public function setHDWaterVertexDisplacement(int value)", "doc": "", "deprecated": { "flag": false, @@ -131351,14 +134524,14 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 69 + "line": 65 }, { - "kind": "extension-function", - "name": "toChar", + "kind": "function", + "name": "setHDWaterOpacity", "typeParams": "", - "receiver": "string", - "signature": "public function string.toChar() returns char", + "receiver": null, + "signature": "public function setHDWaterOpacity(int min, int max)", "doc": "", "deprecated": { "flag": false, @@ -131367,15 +134540,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 74 + "line": 68 }, { - "kind": "extension-function", - "name": "toCharList", + "kind": "function", + "name": "setHDWaterReflectivity", "typeParams": "", - "receiver": "string", - "signature": "public function string.toCharList() returns LinkedList", - "doc": "Splits the string into chars. Only valid for single byte (latin) characters,\n\tmultibyte characters are split into their individual bytes.", + "receiver": null, + "signature": "public function setHDWaterReflectivity(int value)", + "doc": "", "deprecated": { "flag": false, "message": null @@ -131383,14 +134556,14 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 79 + "line": 72 }, { - "kind": "extension-function", - "name": "toChar", + "kind": "function", + "name": "setHDWaterEmissivity", "typeParams": "", - "receiver": "int", - "signature": "public function int.toChar() returns char", + "receiver": null, + "signature": "public function setHDWaterEmissivity(int value)", "doc": "", "deprecated": { "flag": false, @@ -131399,14 +134572,14 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 85 + "line": 75 }, { "kind": "function", - "name": "charToIndex", + "name": "setHDWaterEdgeSoftness", "typeParams": "", "receiver": null, - "signature": "public function charToIndex(char c) returns int", + "signature": "public function setHDWaterEdgeSoftness(int value)", "doc": "", "deprecated": { "flag": false, @@ -131415,14 +134588,14 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 88 + "line": 78 }, { "kind": "function", - "name": "charFromIndex", + "name": "setHDWaterWaveStrength", "typeParams": "", "receiver": null, - "signature": "public function charFromIndex(int index) returns char", + "signature": "public function setHDWaterWaveStrength(int value)", "doc": "", "deprecated": { "flag": false, @@ -131431,15 +134604,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 91 + "line": 81 }, { - "kind": "extension-function", - "name": "split", + "kind": "function", + "name": "setHDWaterEnvironmentMapStrength", "typeParams": "", - "receiver": "string", - "signature": "public function string.split(string splitBy) returns LinkedList", - "doc": "Splits the string by another string\n\t\"this..is..an..example\" split by the string \"..\" splits into a list containing four strings [\"this\", \"is\", \"an\", \"example\"]", + "receiver": null, + "signature": "public function setHDWaterEnvironmentMapStrength(int value)", + "doc": "", "deprecated": { "flag": false, "message": null @@ -131447,15 +134620,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 96 + "line": 84 }, { "kind": "extension-function", - "name": "reduce", + "name": "isTerrainPathable", "typeParams": "", - "receiver": "string", - "signature": "public function string.reduce(string reduced) returns string", - "doc": "Replaces consecutive repeats of the same string with a single instance\n\tTurns \"strstr\" into \"str\"", + "receiver": "vec2", + "signature": "public function vec2.isTerrainPathable(pathingtype whichType) returns boolean", + "doc": "", "deprecated": { "flag": false, "message": null @@ -131463,80 +134636,31 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 113 + "line": 87 }, { "kind": "extension-function", - "name": "reduce", + "name": "setDoodadColor", "typeParams": "", - "receiver": "string", - "signature": "public function string.reduce() returns string", - "doc": "Replaces consecutive repeats of the whitespace character with a single instance\n\tTurns \" \" into \" \"", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 129 - }, - { - "kind": "interface", - "name": "ForStringSplitCallback", - "typeParams": "", - "receiver": null, - "signature": "public interface ForStringSplitCallback", + "receiver": "vec2", + "signature": "public function vec2.setDoodadColor(real radius, int doodadId, boolean nearestOnly, playercolor whichColor)", "doc": "", "deprecated": { "flag": false, "message": null }, "configurable": false, - "members": [ - { - "kind": "function", - "name": "callback", - "typeParams": "", - "receiver": null, - "signature": "function callback(string str)", - "doc": "", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, - "members": [], - "enumMembers": [], - "line": 133 - } - ], - "enumMembers": [], - "line": 132 - }, - { - "kind": "extension-function", - "name": "forEachIn", - "typeParams": "", - "receiver": "string", - "signature": "public function string.forEachIn(string delim, ForStringSplitCallback cb)", - "doc": "Custom Function which can split strings and runs callback for each string.\n\tIt can run even with no delimiter present (with single element).\n\tExample usage:\n\t\"H001,H002\".forEachIn(\",\") ->\n\t\tdoSomething()", - "deprecated": { - "flag": false, - "message": null - }, - "configurable": false, "members": [], "enumMembers": [], - "line": 140 + "line": 90 }, { "kind": "extension-function", - "name": "isNumber", + "name": "setDoodadColor", "typeParams": "", - "receiver": "string", - "signature": "public function string.isNumber() returns bool", - "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.", + "receiver": "rect", + "signature": "public function rect.setDoodadColor(int doodadId, playercolor whichColor)", + "doc": "", "deprecated": { "flag": false, "message": null @@ -131544,15 +134668,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 159 + "line": 93 }, { - "kind": "extension-function", - "name": "isValidDescription", + "kind": "function", + "name": "setMinShadowCastingPointLightCount", "typeParams": "", - "receiver": "string", - "signature": "public function string.isValidDescription() returns bool", - "doc": "Checks whether a string is valid in terms of max WC3 string length for various usages (Ability Description, Quest Description,...).", + "receiver": null, + "signature": "public function setMinShadowCastingPointLightCount(int count)", + "doc": "", "deprecated": { "flag": false, "message": null @@ -131560,15 +134684,15 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 177 + "line": 96 }, { - "kind": "extension-function", - "name": "replaceChars", + "kind": "function", + "name": "getMinShadowCastingPointLightCount", "typeParams": "", - "receiver": "string", - "signature": "public function string.replaceChars(string charset, string replacementChar) returns string", - "doc": "Replaces all occurences of any character from given charlist by a given replacement string.", + "receiver": null, + "signature": "public function getMinShadowCastingPointLightCount() returns int", + "doc": "", "deprecated": { "flag": false, "message": null @@ -131576,7 +134700,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 185 + "line": 99 } ] }, @@ -133241,8 +136365,8 @@ "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", + "summary": "Deprecated. Cell geometry belongs to the shared grid now, so `SPATIAL_PARTITION_CELL_SIZE` is the\nsetting; one grid cannot have a second cell size for units alone.\n\nKept exported so an existing `UnitSpatialIndex_config` still compiles, and defaulted to agree. It\nis checked at init rather than ignored: a map that had tuned this and upgrades gets told its\nvalue is no longer in effect, instead of quietly running on a different grid.", + "summaryFirstLine": "Deprecated. Cell geometry belongs to the shared grid now, so `SPATIAL_PARTITION_CELL_SIZE` is the", "tags": [ "util" ], @@ -133262,15 +136386,15 @@ "configurable": true, "members": [], "enumMembers": [], - "line": 16 + "line": 35 }, { "kind": "constant", - "name": "SPATIAL_INDEX_CELL_SIZE", + "name": "SPATIAL_INDEX_UNITS_PER_TICK", "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.", + "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 @@ -133278,15 +136402,15 @@ "configurable": true, "members": [], "enumMembers": [], - "line": 19 + "line": 38 }, { "kind": "constant", - "name": "SPATIAL_INDEX_UNITS_PER_TICK", + "name": "SPATIAL_INDEX_SWEEP_PERIOD", "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.", + "signature": "public constant SPATIAL_INDEX_SWEEP_PERIOD = ANIMATION_PERIOD", + "doc": "Time between sweep steps. Raising this reduces timer and refresh work but increases query padding.", "deprecated": { "flag": false, "message": null @@ -133294,7 +136418,7 @@ "configurable": true, "members": [], "enumMembers": [], - "line": 22 + "line": 41 }, { "kind": "constant", @@ -133310,7 +136434,7 @@ "configurable": true, "members": [], "enumMembers": [], - "line": 25 + "line": 44 }, { "kind": "constant", @@ -133326,7 +136450,23 @@ "configurable": true, "members": [], "enumMembers": [], - "line": 28 + "line": 47 + }, + { + "kind": "constant", + "name": "SPATIAL_INDEX_CELL_SIZE", + "typeParams": "", + "receiver": null, + "signature": "public constant SPATIAL_INDEX_CELL_SIZE = SPATIAL_PARTITION_CELL_SIZE", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": true, + "members": [], + "enumMembers": [], + "line": 55 }, { "kind": "extension-function", @@ -133334,7 +136474,7 @@ "typeParams": "", "receiver": "unit", "signature": "public function unit.updateSpatialIndex()", - "doc": "", + "doc": "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.", "deprecated": { "flag": false, "message": null @@ -133342,7 +136482,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 191 + "line": 197 }, { "kind": "function", @@ -133358,7 +136498,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 257 + "line": 256 }, { "kind": "function", @@ -133374,7 +136514,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 263 + "line": 262 }, { "kind": "function", @@ -133390,7 +136530,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 267 + "line": 266 }, { "kind": "function", @@ -133406,7 +136546,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 271 + "line": 270 }, { "kind": "function", @@ -133414,7 +136554,7 @@ "typeParams": "", "receiver": null, "signature": "public function spatialIndexAllocatedSlots() returns int", - "doc": "Allocated cache slots; ID reuse keeps this at peak concurrent population.", + "doc": "Allocated cache slots; ID reuse keeps this at peak concurrent population. Ids are shared across\npartition consumers now, so this counts every entry id handed out, not only this layer's - which\nis the right figure for the arrays here, since they are indexed by that same id.", "deprecated": { "flag": false, "message": null @@ -133422,7 +136562,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 275 + "line": 276 }, { "kind": "function", @@ -133438,7 +136578,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 279 + "line": 280 }, { "kind": "function", @@ -133446,7 +136586,7 @@ "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.", + "doc": "Rebuilds the extent and re-buckets all units. Unguarded so grid math remains testable on Jass.\n\nThe grid is shared, so this re-derives it for every partition consumer, not only for units: there\nis one extent, and an entry linked under the old cell indices would be invisible to the new grid.\nThat is why the rebuild re-links everything rather than only this layer's entries.", "deprecated": { "flag": false, "message": null @@ -133454,7 +136594,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 283 + "line": 288 }, { "kind": "function", @@ -133470,7 +136610,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 301 + "line": 302 }, { "kind": "function", @@ -133486,7 +136626,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 305 + "line": 306 }, { "kind": "function", @@ -133502,7 +136642,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 308 + "line": 309 }, { "kind": "function", @@ -133518,7 +136658,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 327 + "line": 342 }, { "kind": "function", @@ -133534,7 +136674,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 386 + "line": 392 }, { "kind": "function", @@ -133550,7 +136690,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 439 + "line": 431 }, { "kind": "function", @@ -133566,7 +136706,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 449 + "line": 441 }, { "kind": "function", @@ -133582,7 +136722,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 453 + "line": 445 } ] }, @@ -133683,6 +136823,7 @@ "Camera", "CommonNativeExtensions", "Destructable", + "Doodad", "Effect", "Fogmodifier", "Force", @@ -135900,6 +139041,134 @@ "members": [], "enumMembers": [], "line": 189 + }, + { + "kind": "function", + "name": "setCameraType", + "typeParams": "", + "receiver": null, + "signature": "public function setCameraType(int cameraType)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 192 + }, + { + "kind": "function", + "name": "getCameraType", + "typeParams": "", + "receiver": null, + "signature": "public function getCameraType() returns int", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 195 + }, + { + "kind": "extension-function", + "name": "setCameraType", + "typeParams": "", + "receiver": "camerasetup", + "signature": "public function camerasetup.setCameraType(int cameraType)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 198 + }, + { + "kind": "extension-function", + "name": "getCameraType", + "typeParams": "", + "receiver": "camerasetup", + "signature": "public function camerasetup.getCameraType() returns int", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 201 + }, + { + "kind": "extension-function", + "name": "setControlledByInput", + "typeParams": "", + "receiver": "camerafield", + "signature": "public function camerafield.setControlledByInput(boolean controlled)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 204 + }, + { + "kind": "extension-function", + "name": "isControlledByInput", + "typeParams": "", + "receiver": "camerafield", + "signature": "public function camerafield.isControlledByInput() returns boolean", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 207 + }, + { + "kind": "extension-function", + "name": "addCameraBlocker", + "typeParams": "", + "receiver": "rect", + "signature": "public function rect.addCameraBlocker()", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 210 + }, + { + "kind": "extension-function", + "name": "setCameraBlockerEnabled", + "typeParams": "", + "receiver": "rect", + "signature": "public function rect.setCameraBlockerEnabled(boolean enabled)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 213 } ] }, @@ -137403,6 +140672,390 @@ "enumMembers": [], "line": 8 }, + { + "kind": "function", + "name": "createDestructable", + "typeParams": "", + "receiver": null, + "signature": "public function createDestructable(int id, vec2 pos, angle direction, real scale, int variation, playercolor whichColor) returns destructable", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 11 + }, + { + "kind": "function", + "name": "createDestructable", + "typeParams": "", + "receiver": null, + "signature": "public function createDestructable(int id, vec3 pos, angle direction, real scale, int variation, playercolor whichColor) returns destructable", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 14 + }, + { + "kind": "function", + "name": "createDestructable", + "typeParams": "", + "receiver": null, + "signature": "public function createDestructable(int id, vec2 pos, angle direction, real scale, int variation, int skinId, playercolor whichColor) returns destructable", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 17 + }, + { + "kind": "function", + "name": "createDestructable", + "typeParams": "", + "receiver": null, + "signature": "public function createDestructable(int id, vec3 pos, angle direction, real scale, int variation, int skinId, playercolor whichColor) returns destructable", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 20 + }, + { + "kind": "function", + "name": "createDestructable", + "typeParams": "", + "receiver": null, + "signature": "public function createDestructable(int id, vec2 pos, angle direction, angle roll, angle pitch, real scale, int variation) returns destructable", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 23 + }, + { + "kind": "function", + "name": "createDestructable", + "typeParams": "", + "receiver": null, + "signature": "public function createDestructable(int id, vec3 pos, angle direction, angle roll, angle pitch, real scale, int variation) returns destructable", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 26 + }, + { + "kind": "function", + "name": "createDestructable", + "typeParams": "", + "receiver": null, + "signature": "public function createDestructable(int id, vec2 pos, angle direction, angle roll, angle pitch, real scale, int variation, playercolor whichColor) returns destructable", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 29 + }, + { + "kind": "function", + "name": "createDestructable", + "typeParams": "", + "receiver": null, + "signature": "public function createDestructable(int id, vec3 pos, angle direction, angle roll, angle pitch, real scale, int variation, playercolor whichColor) returns destructable", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 32 + }, + { + "kind": "function", + "name": "createDestructable", + "typeParams": "", + "receiver": null, + "signature": "public function createDestructable(int id, vec2 pos, angle direction, angle roll, angle pitch, real scale, int variation, int skinId) returns destructable", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 35 + }, + { + "kind": "function", + "name": "createDestructable", + "typeParams": "", + "receiver": null, + "signature": "public function createDestructable(int id, vec3 pos, angle direction, angle roll, angle pitch, real scale, int variation, int skinId) returns destructable", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 38 + }, + { + "kind": "function", + "name": "createDestructable", + "typeParams": "", + "receiver": null, + "signature": "public function createDestructable(int id, vec2 pos, angle direction, angle roll, angle pitch, real scale, int variation, int skinId, playercolor whichColor) returns destructable", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 41 + }, + { + "kind": "function", + "name": "createDestructable", + "typeParams": "", + "receiver": null, + "signature": "public function createDestructable(int id, vec3 pos, angle direction, angle roll, angle pitch, real scale, int variation, int skinId, playercolor whichColor) returns destructable", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 44 + }, + { + "kind": "function", + "name": "createDeadDestructable", + "typeParams": "", + "receiver": null, + "signature": "public function createDeadDestructable(int id, vec2 pos, angle direction, real scale, int variation, playercolor whichColor) returns destructable", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 47 + }, + { + "kind": "function", + "name": "createDeadDestructable", + "typeParams": "", + "receiver": null, + "signature": "public function createDeadDestructable(int id, vec3 pos, angle direction, real scale, int variation, playercolor whichColor) returns destructable", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 50 + }, + { + "kind": "function", + "name": "createDeadDestructable", + "typeParams": "", + "receiver": null, + "signature": "public function createDeadDestructable(int id, vec2 pos, angle direction, real scale, int variation, int skinId, playercolor whichColor) returns destructable", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 53 + }, + { + "kind": "function", + "name": "createDeadDestructable", + "typeParams": "", + "receiver": null, + "signature": "public function createDeadDestructable(int id, vec3 pos, angle direction, real scale, int variation, int skinId, playercolor whichColor) returns destructable", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 56 + }, + { + "kind": "function", + "name": "createDeadDestructable", + "typeParams": "", + "receiver": null, + "signature": "public function createDeadDestructable(int id, vec2 pos, angle direction, angle roll, angle pitch, real scale, int variation) returns destructable", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 59 + }, + { + "kind": "function", + "name": "createDeadDestructable", + "typeParams": "", + "receiver": null, + "signature": "public function createDeadDestructable(int id, vec3 pos, angle direction, angle roll, angle pitch, real scale, int variation) returns destructable", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 62 + }, + { + "kind": "function", + "name": "createDeadDestructable", + "typeParams": "", + "receiver": null, + "signature": "public function createDeadDestructable(int id, vec2 pos, angle direction, angle roll, angle pitch, real scale, int variation, playercolor whichColor) returns destructable", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 65 + }, + { + "kind": "function", + "name": "createDeadDestructable", + "typeParams": "", + "receiver": null, + "signature": "public function createDeadDestructable(int id, vec3 pos, angle direction, angle roll, angle pitch, real scale, int variation, playercolor whichColor) returns destructable", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 68 + }, + { + "kind": "function", + "name": "createDeadDestructable", + "typeParams": "", + "receiver": null, + "signature": "public function createDeadDestructable(int id, vec2 pos, angle direction, angle roll, angle pitch, real scale, int variation, int skinId) returns destructable", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 71 + }, + { + "kind": "function", + "name": "createDeadDestructable", + "typeParams": "", + "receiver": null, + "signature": "public function createDeadDestructable(int id, vec3 pos, angle direction, angle roll, angle pitch, real scale, int variation, int skinId) returns destructable", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 74 + }, + { + "kind": "function", + "name": "createDeadDestructable", + "typeParams": "", + "receiver": null, + "signature": "public function createDeadDestructable(int id, vec2 pos, angle direction, angle roll, angle pitch, real scale, int variation, int skinId, playercolor whichColor) returns destructable", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 77 + }, + { + "kind": "function", + "name": "createDeadDestructable", + "typeParams": "", + "receiver": null, + "signature": "public function createDeadDestructable(int id, vec3 pos, angle direction, angle roll, angle pitch, real scale, int variation, int skinId, playercolor whichColor) returns destructable", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 80 + }, { "kind": "extension-function", "name": "getPos", @@ -137417,7 +141070,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 11 + "line": 83 }, { "kind": "extension-function", @@ -137433,7 +141086,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 14 + "line": 86 }, { "kind": "extension-function", @@ -137449,7 +141102,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 17 + "line": 89 }, { "kind": "extension-function", @@ -137465,7 +141118,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 20 + "line": 92 }, { "kind": "extension-function", @@ -137481,7 +141134,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 23 + "line": 95 }, { "kind": "extension-function", @@ -137497,7 +141150,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 26 + "line": 98 }, { "kind": "extension-function", @@ -137513,7 +141166,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 29 + "line": 101 }, { "kind": "extension-function", @@ -137529,7 +141182,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 32 + "line": 104 }, { "kind": "extension-function", @@ -137545,7 +141198,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 35 + "line": 107 }, { "kind": "extension-function", @@ -137561,7 +141214,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 38 + "line": 110 }, { "kind": "extension-function", @@ -137577,7 +141230,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 41 + "line": 113 }, { "kind": "extension-function", @@ -137593,7 +141246,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 44 + "line": 116 }, { "kind": "extension-function", @@ -137609,7 +141262,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 47 + "line": 119 }, { "kind": "extension-function", @@ -137625,7 +141278,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 50 + "line": 122 }, { "kind": "extension-function", @@ -137641,7 +141294,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 53 + "line": 125 }, { "kind": "extension-function", @@ -137657,7 +141310,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 56 + "line": 128 }, { "kind": "extension-function", @@ -137673,7 +141326,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 59 + "line": 131 }, { "kind": "extension-function", @@ -137689,7 +141342,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 62 + "line": 134 }, { "kind": "extension-function", @@ -137705,7 +141358,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 65 + "line": 137 }, { "kind": "extension-function", @@ -137721,7 +141374,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 68 + "line": 140 }, { "kind": "tuple", @@ -137737,7 +141390,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 74 + "line": 146 }, { "kind": "extension-function", @@ -137753,7 +141406,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 77 + "line": 149 }, { "kind": "extension-function", @@ -137769,7 +141422,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 82 + "line": 154 }, { "kind": "extension-function", @@ -137785,7 +141438,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 88 + "line": 160 }, { "kind": "extension-function", @@ -137801,7 +141454,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 93 + "line": 165 }, { "kind": "tuple", @@ -137817,7 +141470,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 100 + "line": 172 }, { "kind": "extension-function", @@ -137833,7 +141486,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 106 + "line": 178 }, { "kind": "extension-function", @@ -137849,7 +141502,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 110 + "line": 182 }, { "kind": "extension-function", @@ -137865,7 +141518,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 114 + "line": 186 }, { "kind": "extension-function", @@ -137881,7 +141534,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 118 + "line": 190 }, { "kind": "function", @@ -137897,7 +141550,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 123 + "line": 195 }, { "kind": "function", @@ -137913,7 +141566,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 127 + "line": 199 }, { "kind": "extension-function", @@ -137929,7 +141582,39 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 131 + "line": 203 + }, + { + "kind": "extension-function", + "name": "setColor", + "typeParams": "", + "receiver": "destructable", + "signature": "public function destructable.setColor(playercolor whichColor)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 224 + }, + { + "kind": "extension-function", + "name": "setVertexColor", + "typeParams": "", + "receiver": "destructable", + "signature": "public function destructable.setVertexColor(int red, int green, int blue, int alpha)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 227 } ] }, @@ -138092,6 +141777,229 @@ } ] }, + { + "package": "Doodad", + "category": "_handles", + "categoryLabel": "Handle Wrappers", + "sourcePath": "wurst/_handles/Doodad.wurst", + "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/_handles/Doodad.wurst", + "summary": "", + "summaryFirstLine": "", + "tags": [ + "handles" + ], + "imports": [], + "entities": [ + { + "kind": "tuple", + "name": "doodad", + "typeParams": "", + "receiver": null, + "signature": "public tuple doodad(int index)", + "doc": "A placed map doodad addressed by its zero-based map index.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 6 + }, + { + "kind": "function", + "name": "getDoodadCount", + "typeParams": "", + "receiver": null, + "signature": "public function getDoodadCount() returns int", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 8 + }, + { + "kind": "function", + "name": "getDoodad", + "typeParams": "", + "receiver": null, + "signature": "public function getDoodad(int index) returns doodad", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 11 + }, + { + "kind": "extension-function", + "name": "getTypeId", + "typeParams": "", + "receiver": "doodad", + "signature": "public function doodad.getTypeId() returns int", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 14 + }, + { + "kind": "extension-function", + "name": "getVariation", + "typeParams": "", + "receiver": "doodad", + "signature": "public function doodad.getVariation() returns int", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 17 + }, + { + "kind": "extension-function", + "name": "getPos", + "typeParams": "", + "receiver": "doodad", + "signature": "public function doodad.getPos() returns vec3", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 20 + }, + { + "kind": "extension-function", + "name": "getScale", + "typeParams": "", + "receiver": "doodad", + "signature": "public function doodad.getScale() returns vec3", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 23 + }, + { + "kind": "extension-function", + "name": "getYaw", + "typeParams": "", + "receiver": "doodad", + "signature": "public function doodad.getYaw() returns angle", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 26 + }, + { + "kind": "extension-function", + "name": "getPitch", + "typeParams": "", + "receiver": "doodad", + "signature": "public function doodad.getPitch() returns angle", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 29 + }, + { + "kind": "extension-function", + "name": "getRoll", + "typeParams": "", + "receiver": "doodad", + "signature": "public function doodad.getRoll() returns angle", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 32 + }, + { + "kind": "extension-function", + "name": "isUsingModelAxes", + "typeParams": "", + "receiver": "doodad", + "signature": "public function doodad.isUsingModelAxes() returns boolean", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 35 + }, + { + "kind": "extension-function", + "name": "setAnimation", + "typeParams": "", + "receiver": "doodad", + "signature": "public function doodad.setAnimation(string animation, boolean randomize)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 38 + }, + { + "kind": "extension-function", + "name": "setColor", + "typeParams": "", + "receiver": "doodad", + "signature": "public function doodad.setColor(playercolor whichColor)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 41 + } + ] + }, { "package": "Effect", "category": "_handles", @@ -139032,6 +142940,54 @@ "members": [], "enumMembers": [], "line": 213 + }, + { + "kind": "extension-function", + "name": "setAnimation", + "typeParams": "", + "receiver": "effect", + "signature": "public function effect.setAnimation(string animation)", + "doc": "Immediately selects an animation by model sequence name.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 217 + }, + { + "kind": "extension-function", + "name": "queueAnimation", + "typeParams": "", + "receiver": "effect", + "signature": "public function effect.queueAnimation(string animation)", + "doc": "Adds an animation by model sequence name to the effect's queue.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 221 + }, + { + "kind": "extension-function", + "name": "setAnimationBlendTime", + "typeParams": "", + "receiver": "effect", + "signature": "public function effect.setAnimationBlendTime(real blendTime)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 224 } ] }, @@ -141638,6 +145594,54 @@ "members": [], "enumMembers": [], "line": 675 + }, + { + "kind": "extension-function", + "name": "setTextAreaAutoScroll", + "typeParams": "", + "receiver": "framehandle", + "signature": "public function framehandle.setTextAreaAutoScroll(boolean enabled)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 678 + }, + { + "kind": "extension-function", + "name": "frameToPixel", + "typeParams": "", + "receiver": "vec2", + "signature": "public function vec2.frameToPixel() returns vec2", + "doc": "Converts frame coordinates to window pixels.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 682 + }, + { + "kind": "extension-function", + "name": "pixelToFrame", + "typeParams": "", + "receiver": "vec2", + "signature": "public function vec2.pixelToFrame() returns vec2", + "doc": "Converts window pixels to frame coordinates.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 686 } ] }, @@ -145691,6 +149695,326 @@ "members": [], "enumMembers": [], "line": 204 + }, + { + "kind": "extension-function", + "name": "setColor", + "typeParams": "", + "receiver": "item", + "signature": "public function item.setColor(playercolor whichColor)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 207 + }, + { + "kind": "extension-function", + "name": "getEquipmentType", + "typeParams": "", + "receiver": "item", + "signature": "public function item.getEquipmentType() returns equipmentType", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 210 + }, + { + "kind": "extension-function", + "name": "getTag", + "typeParams": "", + "receiver": "item", + "signature": "public function item.getTag() returns itemTag", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 213 + }, + { + "kind": "extension-function", + "name": "isEquipped", + "typeParams": "", + "receiver": "item", + "signature": "public function item.isEquipped() returns boolean", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 216 + }, + { + "kind": "extension-function", + "name": "isInBag", + "typeParams": "", + "receiver": "item", + "signature": "public function item.isInBag() returns boolean", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 219 + }, + { + "kind": "extension-function", + "name": "equipItem", + "typeParams": "", + "receiver": "unit", + "signature": "public function unit.equipItem(item whichItem) returns boolean", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 222 + }, + { + "kind": "extension-function", + "name": "unequipItem", + "typeParams": "", + "receiver": "unit", + "signature": "public function unit.unequipItem(item whichItem)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 225 + }, + { + "kind": "extension-function", + "name": "unequipItem", + "typeParams": "", + "receiver": "unit", + "signature": "public function unit.unequipItem(loadoutslot slot) returns item", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 228 + }, + { + "kind": "extension-function", + "name": "getExtendedInventorySize", + "typeParams": "", + "receiver": "unit", + "signature": "public function unit.getExtendedInventorySize() returns int", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 231 + }, + { + "kind": "extension-function", + "name": "getItemInBagSlot", + "typeParams": "", + "receiver": "unit", + "signature": "public function unit.getItemInBagSlot(int slot) returns item", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 234 + }, + { + "kind": "extension-function", + "name": "getItemInEquipmentSlot", + "typeParams": "", + "receiver": "unit", + "signature": "public function unit.getItemInEquipmentSlot(loadoutslot slot) returns item", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 237 + }, + { + "kind": "extension-function", + "name": "hasItemBagged", + "typeParams": "", + "receiver": "unit", + "signature": "public function unit.hasItemBagged(item whichItem) returns boolean", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 240 + }, + { + "kind": "extension-function", + "name": "hasItemEquipped", + "typeParams": "", + "receiver": "unit", + "signature": "public function unit.hasItemEquipped(item whichItem) returns boolean", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 243 + }, + { + "kind": "extension-function", + "name": "isLoadoutSlotEmpty", + "typeParams": "", + "receiver": "unit", + "signature": "public function unit.isLoadoutSlotEmpty(loadoutslot slot) returns boolean", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 246 + }, + { + "kind": "extension-function", + "name": "hasAnyItemEquipped", + "typeParams": "", + "receiver": "unit", + "signature": "public function unit.hasAnyItemEquipped() returns boolean", + "doc": "Correctly-spelled wrapper for the native UnitHasAnyItemEquiped.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 250 + }, + { + "kind": "extension-function", + "name": "hasEquipmentType", + "typeParams": "", + "receiver": "unit", + "signature": "public function unit.hasEquipmentType(equipmentType whichType) returns boolean", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 253 + }, + { + "kind": "extension-function", + "name": "canEquipItemOfType", + "typeParams": "", + "receiver": "unit", + "signature": "public function unit.canEquipItemOfType(equipmentType whichType) returns boolean", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 256 + }, + { + "kind": "extension-function", + "name": "chooseRandomItem", + "typeParams": "", + "receiver": "itemtype", + "signature": "public function itemtype.chooseRandomItem(int level, equipmentType whichEquipmentType, itemTag whichTag) returns int", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 259 + }, + { + "kind": "function", + "name": "getEquippedItem", + "typeParams": "", + "receiver": null, + "signature": "public function getEquippedItem() returns item", + "doc": "Event response for an item-equipment event.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 263 + }, + { + "kind": "function", + "name": "getUnequippedItem", + "typeParams": "", + "receiver": null, + "signature": "public function getUnequippedItem() returns item", + "doc": "Event response for an item-unequipment event.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 267 } ] }, @@ -147928,6 +152252,22 @@ "members": [], "enumMembers": [], "line": 227 + }, + { + "kind": "extension-function", + "name": "setRaceSkin", + "typeParams": "", + "receiver": "player", + "signature": "public function player.setRaceSkin(racepreference raceSkin)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 230 } ] }, @@ -151880,7 +156220,7 @@ "METAALTCTRL", "ALL" ], - "line": 12 + "line": 13 }, { "kind": "extension-function", @@ -151896,7 +156236,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 30 + "line": 31 }, { "kind": "extension-function", @@ -151912,7 +156252,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 33 + "line": 34 }, { "kind": "extension-function", @@ -151928,7 +156268,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 36 + "line": 37 }, { "kind": "extension-function", @@ -151944,7 +156284,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 39 + "line": 40 }, { "kind": "extension-function", @@ -151960,7 +156300,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 42 + "line": 43 }, { "kind": "extension-function", @@ -151976,7 +156316,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 45 + "line": 46 }, { "kind": "extension-function", @@ -151992,7 +156332,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 48 + "line": 49 }, { "kind": "extension-function", @@ -152008,7 +156348,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 51 + "line": 52 }, { "kind": "extension-function", @@ -152024,7 +156364,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 54 + "line": 55 }, { "kind": "extension-function", @@ -152040,7 +156380,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 57 + "line": 58 }, { "kind": "extension-function", @@ -152056,7 +156396,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 60 + "line": 61 }, { "kind": "extension-function", @@ -152072,7 +156412,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 63 + "line": 64 }, { "kind": "extension-function", @@ -152088,7 +156428,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 66 + "line": 67 }, { "kind": "extension-function", @@ -152104,7 +156444,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 69 + "line": 70 }, { "kind": "extension-function", @@ -152120,7 +156460,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 72 + "line": 73 }, { "kind": "extension-function", @@ -152136,7 +156476,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 75 + "line": 76 }, { "kind": "extension-function", @@ -152152,7 +156492,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 78 + "line": 79 }, { "kind": "extension-function", @@ -152168,7 +156508,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 82 + "line": 83 }, { "kind": "extension-function", @@ -152184,7 +156524,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 85 + "line": 86 }, { "kind": "extension-function", @@ -152200,7 +156540,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 88 + "line": 89 }, { "kind": "extension-function", @@ -152216,7 +156556,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 91 + "line": 92 }, { "kind": "extension-function", @@ -152232,7 +156572,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 94 + "line": 95 }, { "kind": "extension-function", @@ -152248,7 +156588,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 97 + "line": 98 }, { "kind": "extension-function", @@ -152264,7 +156604,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 100 + "line": 101 }, { "kind": "extension-function", @@ -152280,7 +156620,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 103 + "line": 104 }, { "kind": "extension-function", @@ -152296,7 +156636,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 106 + "line": 107 }, { "kind": "extension-function", @@ -152312,7 +156652,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 109 + "line": 110 }, { "kind": "extension-function", @@ -152328,7 +156668,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 112 + "line": 113 }, { "kind": "extension-function", @@ -152344,7 +156684,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 115 + "line": 116 }, { "kind": "extension-function", @@ -152360,7 +156700,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 118 + "line": 119 }, { "kind": "extension-function", @@ -152376,7 +156716,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 121 + "line": 122 }, { "kind": "extension-function", @@ -152392,7 +156732,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 124 + "line": 125 }, { "kind": "extension-function", @@ -152408,7 +156748,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 127 + "line": 128 }, { "kind": "extension-function", @@ -152424,7 +156764,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 130 + "line": 131 }, { "kind": "extension-function", @@ -152440,7 +156780,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 133 + "line": 134 }, { "kind": "extension-function", @@ -152456,7 +156796,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 136 + "line": 137 }, { "kind": "extension-function", @@ -152472,7 +156812,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 139 + "line": 140 }, { "kind": "extension-function", @@ -152488,7 +156828,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 142 + "line": 143 }, { "kind": "extension-function", @@ -152504,7 +156844,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 145 + "line": 146 }, { "kind": "extension-function", @@ -152520,7 +156860,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 156 + "line": 157 }, { "kind": "extension-function", @@ -152536,7 +156876,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 159 + "line": 160 }, { "kind": "extension-function", @@ -152552,7 +156892,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 162 + "line": 163 }, { "kind": "extension-function", @@ -152568,7 +156908,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 165 + "line": 166 }, { "kind": "extension-function", @@ -152584,7 +156924,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 168 + "line": 169 }, { "kind": "extension-function", @@ -152600,7 +156940,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 171 + "line": 172 }, { "kind": "extension-function", @@ -152616,7 +156956,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 174 + "line": 175 }, { "kind": "extension-function", @@ -152632,7 +156972,103 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 177 + "line": 178 + }, + { + "kind": "extension-function", + "name": "isRunning", + "typeParams": "", + "receiver": "trigger", + "signature": "public function trigger.isRunning() returns boolean", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 181 + }, + { + "kind": "extension-function", + "name": "interrupt", + "typeParams": "", + "receiver": "trigger", + "signature": "public function trigger.interrupt()", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 184 + }, + { + "kind": "extension-function", + "name": "isPressed", + "typeParams": "", + "receiver": "oskeytype", + "signature": "public function oskeytype.isPressed() returns boolean", + "doc": "Returns local input state. Never use it to drive synchronized game state.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 188 + }, + { + "kind": "extension-function", + "name": "isPressed", + "typeParams": "", + "receiver": "OSKEY_META", + "signature": "public function OSKEY_META.isPressed() returns boolean", + "doc": "Returns local input state. Never use it to drive synchronized game state.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 192 + }, + { + "kind": "extension-function", + "name": "isPressed", + "typeParams": "", + "receiver": "mousebuttontype", + "signature": "public function mousebuttontype.isPressed() returns boolean", + "doc": "Returns local input state. Never use it to drive synchronized game state.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 196 + }, + { + "kind": "function", + "name": "getMouseScreenPosition", + "typeParams": "", + "receiver": null, + "signature": "public function getMouseScreenPosition() returns vec2", + "doc": "Returns the local mouse position in window pixels.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 200 } ] }, @@ -155158,7 +159594,7 @@ "flag": false, "message": null }, - "configurable": false, + "configurable": true, "members": [], "enumMembers": [], "line": 542 @@ -155206,7 +159642,7 @@ "flag": false, "message": null }, - "configurable": false, + "configurable": true, "members": [], "enumMembers": [], "line": 553 @@ -155414,7 +159850,7 @@ "flag": false, "message": null }, - "configurable": false, + "configurable": true, "members": [], "enumMembers": [], "line": 596 @@ -155430,7 +159866,7 @@ "flag": false, "message": null }, - "configurable": false, + "configurable": true, "members": [], "enumMembers": [], "line": 601 @@ -155446,7 +159882,7 @@ "flag": false, "message": null }, - "configurable": false, + "configurable": true, "members": [], "enumMembers": [], "line": 606 @@ -155462,7 +159898,7 @@ "flag": false, "message": null }, - "configurable": false, + "configurable": true, "members": [], "enumMembers": [], "line": 611 @@ -155478,7 +159914,7 @@ "flag": false, "message": null }, - "configurable": false, + "configurable": true, "members": [], "enumMembers": [], "line": 615 @@ -155494,7 +159930,7 @@ "flag": false, "message": null }, - "configurable": false, + "configurable": true, "members": [], "enumMembers": [], "line": 620 @@ -157502,6 +161938,182 @@ "members": [], "enumMembers": [], "line": 1079 + }, + { + "kind": "extension-function", + "name": "setAbilityCooldownPercent", + "typeParams": "", + "receiver": "unit", + "signature": "public function unit.setAbilityCooldownPercent(int abilityId, real percent)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 1082 + }, + { + "kind": "extension-function", + "name": "adjustAbilityCooldownPercent", + "typeParams": "", + "receiver": "unit", + "signature": "public function unit.adjustAbilityCooldownPercent(int abilityId, real percent)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 1085 + }, + { + "kind": "extension-function", + "name": "getAbilityCooldownPercent", + "typeParams": "", + "receiver": "unit", + "signature": "public function unit.getAbilityCooldownPercent(int abilityId) returns real", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 1088 + }, + { + "kind": "extension-function", + "name": "setAbilityCooldownRemaining", + "typeParams": "", + "receiver": "unit", + "signature": "public function unit.setAbilityCooldownRemaining(int abilityId, real duration)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 1091 + }, + { + "kind": "extension-function", + "name": "adjustAbilityCooldownRemaining", + "typeParams": "", + "receiver": "unit", + "signature": "public function unit.adjustAbilityCooldownRemaining(int abilityId, real duration)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 1094 + }, + { + "kind": "extension-function", + "name": "getAnimationDuration", + "typeParams": "", + "receiver": "unit", + "signature": "public function unit.getAnimationDuration(string animation) returns real", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 1097 + }, + { + "kind": "extension-function", + "name": "getAnimationDuration", + "typeParams": "", + "receiver": "unit", + "signature": "public function unit.getAnimationDuration(int animationIndex) returns real", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 1100 + }, + { + "kind": "extension-function", + "name": "resetAttack", + "typeParams": "", + "receiver": "unit", + "signature": "public function unit.resetAttack(int weaponIndex)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 1103 + }, + { + "kind": "extension-function", + "name": "setAurasEnabled", + "typeParams": "", + "receiver": "unit", + "signature": "public function unit.setAurasEnabled(boolean enabled, boolean affectsUI)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 1106 + }, + { + "kind": "extension-function", + "name": "setHeroGlowAllowed", + "typeParams": "", + "receiver": "unit", + "signature": "public function unit.setHeroGlowAllowed(boolean allowed)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 1109 + }, + { + "kind": "extension-function", + "name": "isHeroGlowAllowed", + "typeParams": "", + "receiver": "unit", + "signature": "public function unit.isHeroGlowAllowed() returns boolean", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 1115 } ] }, @@ -157799,8 +162411,8 @@ "categoryLabel": "Core Language", "sourcePath": "wurst/_wurst/Annotations.wurst", "githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/_wurst/Annotations.wurst", - "summary": "", - "summaryFirstLine": "", + "summary": "Marks a documented declaration whose calls are expanded by the compiler.\n\nUnlike a normal fallback declaration, this does not suppress intrinsic lowering. The declaration\nexists so intrinsic APIs remain visible to completion, navigation, and documentation tools.", + "summaryFirstLine": "Marks a documented declaration whose calls are expanded by the compiler.", "tags": [ "wurst" ], @@ -157886,6 +162498,22 @@ "enumMembers": [], "line": 22 }, + { + "kind": "function", + "name": "compilerintrinsic", + "typeParams": "", + "receiver": null, + "signature": "public function compilerintrinsic()", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 30 + }, { "kind": "function", "name": "configurable", @@ -157900,7 +162528,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 25 + "line": 33 }, { "kind": "function", @@ -157916,7 +162544,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 28 + "line": 36 }, { "kind": "function", @@ -157932,7 +162560,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 31 + "line": 39 }, { "kind": "function", @@ -157948,7 +162576,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 34 + "line": 42 }, { "kind": "function", @@ -157964,7 +162592,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 37 + "line": 45 }, { "kind": "function", @@ -157980,7 +162608,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 40 + "line": 48 } ] }, @@ -158668,6 +163296,22 @@ "enumMembers": [], "line": 33 }, + { + "kind": "function", + "name": "preserveName", + "typeParams": "", + "receiver": null, + "signature": "public function preserveName()", + "doc": "Prevents -opt name minification for a top-level function whose name is used externally.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 36 + }, { "kind": "constant", "name": "compiletime", @@ -158682,7 +163326,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 38 + "line": 41 }, { "kind": "constant", @@ -158698,7 +163342,7 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 44 + "line": 47 }, { "kind": "function", @@ -158714,7 +163358,153 @@ "configurable": false, "members": [], "enumMembers": [], - "line": 49 + "line": 52 + }, + { + "kind": "interface", + "name": "WurstFieldCallback", + "typeParams": "", + "receiver": null, + "signature": "public interface WurstFieldCallback", + "doc": "Tooling signature used by the field-iteration compiler intrinsics.\nThe compiler specializes `value` to the concrete type of each visited field.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [ + { + "kind": "function", + "name": "apply", + "typeParams": "", + "receiver": null, + "signature": "function apply(string fieldName, int value)", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 58 + } + ], + "enumMembers": [], + "line": 57 + }, + { + "kind": "interface", + "name": "WurstFieldMapper", + "typeParams": "", + "receiver": null, + "signature": "public interface WurstFieldMapper", + "doc": "Tooling signature used by the field-mapping compiler intrinsic.\nThe compiler specializes both the parameter and result to each concrete field type.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [ + { + "kind": "function", + "name": "apply", + "typeParams": "", + "receiver": null, + "signature": "function apply(string fieldName, int value) returns int", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 63 + } + ], + "enumMembers": [], + "line": 62 + }, + { + "kind": "function", + "name": "wurstForFields", + "typeParams": "", + "receiver": null, + "signature": "public function wurstForFields(WurstFieldCallback _callback)", + "doc": "Emits the callback once for every accessible non-static field of the enclosing class.\n\nThe callback receives the source field name and its concrete value. This is compile-time code\ngeneration: the generated Jass or Lua contains direct field accesses and no runtime reflection.\nUse the explicit-target form `wurstForFields(target, callback)` for classes and tuples.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 72 + }, + { + "kind": "function", + "name": "wurstForFields", + "typeParams": "", + "receiver": null, + "signature": "public function wurstForFields(T _target, WurstFieldCallback _callback)", + "doc": "Emits the callback once for every accessible non-static field of `target`.\n\nThis overload supports class instances and tuple values. The target expression is evaluated\nonce, and the compiler specializes the callback value to each field's concrete type.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 80 + }, + { + "kind": "function", + "name": "wurstMapFields", + "typeParams": "", + "receiver": null, + "signature": "public function wurstMapFields(WurstFieldMapper _callback)", + "doc": "Maps every accessible mutable non-static field of the enclosing class.\n\nEach callback result is assigned back to its field. Use the explicit-target form\n`wurstMapFields(target, callback)` for classes and tuple variables.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 88 + }, + { + "kind": "function", + "name": "wurstMapFields", + "typeParams": "", + "receiver": null, + "signature": "public function wurstMapFields(T _target, WurstFieldMapper _callback)", + "doc": "Maps every accessible mutable non-static field of `target`.\n\nThis overload supports class instances and tuple variables. The target expression is evaluated\nonce, and each specialized callback result is assigned directly back to its field.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 96 + }, + { + "kind": "function", + "name": "wurstNewInstance", + "typeParams": "", + "receiver": null, + "signature": "public function wurstNewInstance() returns T", + "doc": "Constructs the concrete class `T` through its accessible zero-argument constructor.\n\nThis is an intrinsic rather than runtime reflection. Consequently `T` must be known concretely\nat the call site and normal constructor visibility and abstract-class checks still apply.", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 104 } ] }, @@ -160033,6 +164823,70 @@ "members": [], "enumMembers": [], "line": 243 + }, + { + "kind": "extension-function", + "name": "toFogStyle", + "typeParams": "", + "receiver": "int", + "signature": "public function int.toFogStyle() returns fogstyle", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 246 + }, + { + "kind": "extension-function", + "name": "toEquipmentType", + "typeParams": "", + "receiver": "int", + "signature": "public function int.toEquipmentType() returns equipmentType", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 249 + }, + { + "kind": "extension-function", + "name": "toItemTag", + "typeParams": "", + "receiver": "int", + "signature": "public function int.toItemTag() returns itemTag", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 252 + }, + { + "kind": "extension-function", + "name": "toLoadoutSlot", + "typeParams": "", + "receiver": "int", + "signature": "public function int.toLoadoutSlot() returns loadoutslot", + "doc": "", + "deprecated": { + "flag": false, + "message": null + }, + "configurable": false, + "members": [], + "enumMembers": [], + "line": 255 } ] }, diff --git a/_doc/stdlib/ref/_handles/Camera.md b/_doc/stdlib/ref/_handles/Camera.md index 722f0e4..b0ecb8b 100644 --- a/_doc/stdlib/ref/_handles/Camera.md +++ b/_doc/stdlib/ref/_handles/Camera.md @@ -114,6 +114,18 @@ Runs the camera through the cinematic camera specified in cameraModelFile. Existing cameras are available via Objects.cameraXXX paths" +### setCameraType + +```wurst +public function setCameraType(int cameraType) +``` + +### getCameraType + +```wurst +public function getCameraType() returns int +``` + ## Extension Functions ### camerafield.set @@ -362,3 +374,39 @@ public function unit.setCameraOrientController(vec2 offset) ```wurst public function unit.setCameraOrientControllerForPlayer(vec2 offset, player whichPlayer) ``` + +### camerasetup.setCameraType + +```wurst +public function camerasetup.setCameraType(int cameraType) +``` + +### camerasetup.getCameraType + +```wurst +public function camerasetup.getCameraType() returns int +``` + +### camerafield.setControlledByInput + +```wurst +public function camerafield.setControlledByInput(boolean controlled) +``` + +### camerafield.isControlledByInput + +```wurst +public function camerafield.isControlledByInput() returns boolean +``` + +### rect.addCameraBlocker + +```wurst +public function rect.addCameraBlocker() +``` + +### rect.setCameraBlockerEnabled + +```wurst +public function rect.setCameraBlockerEnabled(boolean enabled) +``` diff --git a/_doc/stdlib/ref/_handles/Destructable.md b/_doc/stdlib/ref/_handles/Destructable.md index 1561c39..214e2fc 100644 --- a/_doc/stdlib/ref/_handles/Destructable.md +++ b/_doc/stdlib/ref/_handles/Destructable.md @@ -44,6 +44,150 @@ public function createDestructable(int id, vec3 pos, angle direction, real scale public function createDestructable(int id, vec2 pos, angle direction, real scale, int variation) returns destructable ``` +### createDestructable + +```wurst +public function createDestructable(int id, vec2 pos, angle direction, real scale, int variation, playercolor whichColor) returns destructable +``` + +### createDestructable + +```wurst +public function createDestructable(int id, vec3 pos, angle direction, real scale, int variation, playercolor whichColor) returns destructable +``` + +### createDestructable + +```wurst +public function createDestructable(int id, vec2 pos, angle direction, real scale, int variation, int skinId, playercolor whichColor) returns destructable +``` + +### createDestructable + +```wurst +public function createDestructable(int id, vec3 pos, angle direction, real scale, int variation, int skinId, playercolor whichColor) returns destructable +``` + +### createDestructable + +```wurst +public function createDestructable(int id, vec2 pos, angle direction, angle roll, angle pitch, real scale, int variation) returns destructable +``` + +### createDestructable + +```wurst +public function createDestructable(int id, vec3 pos, angle direction, angle roll, angle pitch, real scale, int variation) returns destructable +``` + +### createDestructable + +```wurst +public function createDestructable(int id, vec2 pos, angle direction, angle roll, angle pitch, real scale, int variation, playercolor whichColor) returns destructable +``` + +### createDestructable + +```wurst +public function createDestructable(int id, vec3 pos, angle direction, angle roll, angle pitch, real scale, int variation, playercolor whichColor) returns destructable +``` + +### createDestructable + +```wurst +public function createDestructable(int id, vec2 pos, angle direction, angle roll, angle pitch, real scale, int variation, int skinId) returns destructable +``` + +### createDestructable + +```wurst +public function createDestructable(int id, vec3 pos, angle direction, angle roll, angle pitch, real scale, int variation, int skinId) returns destructable +``` + +### createDestructable + +```wurst +public function createDestructable(int id, vec2 pos, angle direction, angle roll, angle pitch, real scale, int variation, int skinId, playercolor whichColor) returns destructable +``` + +### createDestructable + +```wurst +public function createDestructable(int id, vec3 pos, angle direction, angle roll, angle pitch, real scale, int variation, int skinId, playercolor whichColor) returns destructable +``` + +### createDeadDestructable + +```wurst +public function createDeadDestructable(int id, vec2 pos, angle direction, real scale, int variation, playercolor whichColor) returns destructable +``` + +### createDeadDestructable + +```wurst +public function createDeadDestructable(int id, vec3 pos, angle direction, real scale, int variation, playercolor whichColor) returns destructable +``` + +### createDeadDestructable + +```wurst +public function createDeadDestructable(int id, vec2 pos, angle direction, real scale, int variation, int skinId, playercolor whichColor) returns destructable +``` + +### createDeadDestructable + +```wurst +public function createDeadDestructable(int id, vec3 pos, angle direction, real scale, int variation, int skinId, playercolor whichColor) returns destructable +``` + +### createDeadDestructable + +```wurst +public function createDeadDestructable(int id, vec2 pos, angle direction, angle roll, angle pitch, real scale, int variation) returns destructable +``` + +### createDeadDestructable + +```wurst +public function createDeadDestructable(int id, vec3 pos, angle direction, angle roll, angle pitch, real scale, int variation) returns destructable +``` + +### createDeadDestructable + +```wurst +public function createDeadDestructable(int id, vec2 pos, angle direction, angle roll, angle pitch, real scale, int variation, playercolor whichColor) returns destructable +``` + +### createDeadDestructable + +```wurst +public function createDeadDestructable(int id, vec3 pos, angle direction, angle roll, angle pitch, real scale, int variation, playercolor whichColor) returns destructable +``` + +### createDeadDestructable + +```wurst +public function createDeadDestructable(int id, vec2 pos, angle direction, angle roll, angle pitch, real scale, int variation, int skinId) returns destructable +``` + +### createDeadDestructable + +```wurst +public function createDeadDestructable(int id, vec3 pos, angle direction, angle roll, angle pitch, real scale, int variation, int skinId) returns destructable +``` + +### createDeadDestructable + +```wurst +public function createDeadDestructable(int id, vec2 pos, angle direction, angle roll, angle pitch, real scale, int variation, int skinId, playercolor whichColor) returns destructable +``` + +### createDeadDestructable + +```wurst +public function createDeadDestructable(int id, vec3 pos, angle direction, angle roll, angle pitch, real scale, int variation, int skinId, playercolor whichColor) returns destructable +``` + ### isElevatorHeightInBounds ```wurst @@ -253,3 +397,15 @@ public function elevator.setHeight(int height) ``` Set elevator height to given value. + +### destructable.setColor + +```wurst +public function destructable.setColor(playercolor whichColor) +``` + +### destructable.setVertexColor + +```wurst +public function destructable.setVertexColor(int red, int green, int blue, int alpha) +``` diff --git a/_doc/stdlib/ref/_handles/Doodad.md b/_doc/stdlib/ref/_handles/Doodad.md new file mode 100644 index 0000000..937333d --- /dev/null +++ b/_doc/stdlib/ref/_handles/Doodad.md @@ -0,0 +1,99 @@ +--- +title: Doodad +layout: stdlibref +category: _handles +categoryLabel: Handle Wrappers +tags: + - handles +source: 'https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/_handles/Doodad.wurst' +generated: true +toc: sections +--- + +**[Source on GitHub](https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/_handles/Doodad.wurst)** + +## Tuples + +### doodad + +```wurst +public tuple doodad(int index) +``` + +A placed map doodad addressed by its zero-based map index. + +## Functions + +### getDoodadCount + +```wurst +public function getDoodadCount() returns int +``` + +### getDoodad + +```wurst +public function getDoodad(int index) returns doodad +``` + +## Extension Functions + +### doodad.getTypeId + +```wurst +public function doodad.getTypeId() returns int +``` + +### doodad.getVariation + +```wurst +public function doodad.getVariation() returns int +``` + +### doodad.getPos + +```wurst +public function doodad.getPos() returns vec3 +``` + +### doodad.getScale + +```wurst +public function doodad.getScale() returns vec3 +``` + +### doodad.getYaw + +```wurst +public function doodad.getYaw() returns angle +``` + +### doodad.getPitch + +```wurst +public function doodad.getPitch() returns angle +``` + +### doodad.getRoll + +```wurst +public function doodad.getRoll() returns angle +``` + +### doodad.isUsingModelAxes + +```wurst +public function doodad.isUsingModelAxes() returns boolean +``` + +### doodad.setAnimation + +```wurst +public function doodad.setAnimation(string animation, boolean randomize) +``` + +### doodad.setColor + +```wurst +public function doodad.setColor(playercolor whichColor) +``` diff --git a/_doc/stdlib/ref/_handles/Effect.md b/_doc/stdlib/ref/_handles/Effect.md index a00d80a..5bb26cc 100644 --- a/_doc/stdlib/ref/_handles/Effect.md +++ b/_doc/stdlib/ref/_handles/Effect.md @@ -409,3 +409,25 @@ public function effect.resetScale() ``` Reset effect scale. + +### effect.setAnimation + +```wurst +public function effect.setAnimation(string animation) +``` + +Immediately selects an animation by model sequence name. + +### effect.queueAnimation + +```wurst +public function effect.queueAnimation(string animation) +``` + +Adds an animation by model sequence name to the effect's queue. + +### effect.setAnimationBlendTime + +```wurst +public function effect.setAnimationBlendTime(real blendTime) +``` diff --git a/_doc/stdlib/ref/_handles/Framehandle.md b/_doc/stdlib/ref/_handles/Framehandle.md index 79c447e..48f2018 100644 --- a/_doc/stdlib/ref/_handles/Framehandle.md +++ b/_doc/stdlib/ref/_handles/Framehandle.md @@ -974,6 +974,28 @@ public function framehandle.getChild(int index) returns framehandle Get child frame handle from given index. The index must be in the range 0 <= index < getChildrenCount(). Out-of-bounds access can crash. +### framehandle.setTextAreaAutoScroll + +```wurst +public function framehandle.setTextAreaAutoScroll(boolean enabled) +``` + +### vec2.frameToPixel + +```wurst +public function vec2.frameToPixel() returns vec2 +``` + +Converts frame coordinates to window pixels. + +### vec2.pixelToFrame + +```wurst +public function vec2.pixelToFrame() returns vec2 +``` + +Converts window pixels to frame coordinates. + ## Constants ### GAME_UI diff --git a/_doc/stdlib/ref/_handles/Item.md b/_doc/stdlib/ref/_handles/Item.md index 8ff1984..c1d0893 100644 --- a/_doc/stdlib/ref/_handles/Item.md +++ b/_doc/stdlib/ref/_handles/Item.md @@ -32,6 +32,22 @@ public function createItem(int itemId, vec2 pos) returns item public function createItem(int itemId, vec3 pos) returns item ``` +### getEquippedItem + +```wurst +public function getEquippedItem() returns item +``` + +Event response for an item-equipment event. + +### getUnequippedItem + +```wurst +public function getUnequippedItem() returns item +``` + +Event response for an item-unequipment event. + ## Extension Functions ### item.remove @@ -373,3 +389,113 @@ public function item.setItemDropID(integer unitId) ```wurst public function item.blzSetItemSkin(integer skinId) ``` + +### item.setColor + +```wurst +public function item.setColor(playercolor whichColor) +``` + +### item.getEquipmentType + +```wurst +public function item.getEquipmentType() returns equipmentType +``` + +### item.getTag + +```wurst +public function item.getTag() returns itemTag +``` + +### item.isEquipped + +```wurst +public function item.isEquipped() returns boolean +``` + +### item.isInBag + +```wurst +public function item.isInBag() returns boolean +``` + +### unit.equipItem + +```wurst +public function unit.equipItem(item whichItem) returns boolean +``` + +### unit.unequipItem + +```wurst +public function unit.unequipItem(item whichItem) +``` + +### unit.unequipItem + +```wurst +public function unit.unequipItem(loadoutslot slot) returns item +``` + +### unit.getExtendedInventorySize + +```wurst +public function unit.getExtendedInventorySize() returns int +``` + +### unit.getItemInBagSlot + +```wurst +public function unit.getItemInBagSlot(int slot) returns item +``` + +### unit.getItemInEquipmentSlot + +```wurst +public function unit.getItemInEquipmentSlot(loadoutslot slot) returns item +``` + +### unit.hasItemBagged + +```wurst +public function unit.hasItemBagged(item whichItem) returns boolean +``` + +### unit.hasItemEquipped + +```wurst +public function unit.hasItemEquipped(item whichItem) returns boolean +``` + +### unit.isLoadoutSlotEmpty + +```wurst +public function unit.isLoadoutSlotEmpty(loadoutslot slot) returns boolean +``` + +### unit.hasAnyItemEquipped + +```wurst +public function unit.hasAnyItemEquipped() returns boolean +``` + +Correctly-spelled wrapper for the native UnitHasAnyItemEquiped. + +### unit.hasEquipmentType + +```wurst +public function unit.hasEquipmentType(equipmentType whichType) returns boolean +``` + +### unit.canEquipItemOfType + +```wurst +public function unit.canEquipItemOfType(equipmentType whichType) returns boolean +``` + +### itemtype.chooseRandomItem + +```wurst +public function itemtype.chooseRandomItem(int level, equipmentType whichEquipmentType, itemTag whichTag) returns int +``` diff --git a/_doc/stdlib/ref/_handles/Player.md b/_doc/stdlib/ref/_handles/Player.md index dd2bed3..558c298 100644 --- a/_doc/stdlib/ref/_handles/Player.md +++ b/_doc/stdlib/ref/_handles/Player.md @@ -409,6 +409,12 @@ public function player.hasVisibility(unit target) returns bool public function player.hasVisibility(vec2 pos) returns bool ``` +### player.setRaceSkin + +```wurst +public function player.setRaceSkin(racepreference raceSkin) +``` + ## Constants ### localPlayer diff --git a/_doc/stdlib/ref/_handles/Trigger.md b/_doc/stdlib/ref/_handles/Trigger.md index 3ebb324..3af4e28 100644 --- a/_doc/stdlib/ref/_handles/Trigger.md +++ b/_doc/stdlib/ref/_handles/Trigger.md @@ -30,6 +30,16 @@ public enum OSKEY_META **Values:** `NONE`, `SHIFT`, `CTRL`, `CTRLSHIFT`, `ALT`, `ALTSHIFT`, `ALTCTRL`, `CTRLALTSHIT`, `META`, `METASHIFT`, `METACTRL`, `METACTRLSHIFT`, `METAALT`, `METAALTSHIFT`, `METAALTCTRL`, `ALL` +## Functions + +### getMouseScreenPosition + +```wurst +public function getMouseScreenPosition() returns vec2 +``` + +Returns the local mouse position in window pixels. + ## Extension Functions ### OSKEY_META.toInt @@ -321,3 +331,39 @@ public function trigger.registerUpgradeCommandEvent(integer whichUpgrade) return ```wurst public function trigger.blzTriggerRegisterPlayerSyncEvent(player whichPlayer, string prefix, boolean fromServer) returns event ``` + +### trigger.isRunning + +```wurst +public function trigger.isRunning() returns boolean +``` + +### trigger.interrupt + +```wurst +public function trigger.interrupt() +``` + +### oskeytype.isPressed + +```wurst +public function oskeytype.isPressed() returns boolean +``` + +Returns local input state. Never use it to drive synchronized game state. + +### OSKEY_META.isPressed + +```wurst +public function OSKEY_META.isPressed() returns boolean +``` + +Returns local input state. Never use it to drive synchronized game state. + +### mousebuttontype.isPressed + +```wurst +public function mousebuttontype.isPressed() returns boolean +``` + +Returns local input state. Never use it to drive synchronized game state. diff --git a/_doc/stdlib/ref/_handles/Unit.md b/_doc/stdlib/ref/_handles/Unit.md index 26ee122..b89c769 100644 --- a/_doc/stdlib/ref/_handles/Unit.md +++ b/_doc/stdlib/ref/_handles/Unit.md @@ -1028,6 +1028,8 @@ public function unit.setPathing(boolean value) public function unit.setPos(vec2 pos) ``` +> 🔧 **Configurable.** Override it in your map's config package. + ### unit.setPosFly ```wurst @@ -1046,6 +1048,8 @@ public function unit.setPosReal(vec3 pos) public function unit.setPos(real x, real y) ``` +> 🔧 **Configurable.** Override it in your map's config package. + ### unit.setPropWindow ```wurst @@ -1129,12 +1133,16 @@ public function unit.setVertexColor(int r, int g, int b, int a) public function unit.setX(real x) ``` +> 🔧 **Configurable.** Override it in your map's config package. + ### unit.setXY ```wurst public function unit.setXY(vec2 pos) ``` +> 🔧 **Configurable.** Override it in your map's config package. + Sets the coordinmates of the unit to the given position. Uses the SetUnitX/Y natives @@ -1144,6 +1152,8 @@ Sets the coordinmates of the unit to the given position. public function unit.setXY(vec3 pos) ``` +> 🔧 **Configurable.** Override it in your map's config package. + Sets the coordinmates of the unit to the given position. Uses the SetUnitX/Y natives @@ -1153,6 +1163,8 @@ Sets the coordinmates of the unit to the given position. public function unit.setXYZ(vec3 pos) ``` +> 🔧 **Configurable.** Override it in your map's config package. + Sets the coordinmates of the unit to the given position. Z is being set as flyheight. Uses the SetUnitX/Y natives @@ -1162,12 +1174,16 @@ Sets the coordinmates of the unit to the given position. public function unit.setXYZReal(vec3 pos) ``` +> 🔧 **Configurable.** Override it in your map's config package. + ### unit.setY ```wurst public function unit.setY(real y) ``` +> 🔧 **Configurable.** Override it in your map's config package. + ### unit.show ```wurst @@ -1942,3 +1958,69 @@ public function unit.clearOrders(boolean onlyQueued) ```wurst public function unit.forceStopOrder(boolean clearQueue) ``` + +### unit.setAbilityCooldownPercent + +```wurst +public function unit.setAbilityCooldownPercent(int abilityId, real percent) +``` + +### unit.adjustAbilityCooldownPercent + +```wurst +public function unit.adjustAbilityCooldownPercent(int abilityId, real percent) +``` + +### unit.getAbilityCooldownPercent + +```wurst +public function unit.getAbilityCooldownPercent(int abilityId) returns real +``` + +### unit.setAbilityCooldownRemaining + +```wurst +public function unit.setAbilityCooldownRemaining(int abilityId, real duration) +``` + +### unit.adjustAbilityCooldownRemaining + +```wurst +public function unit.adjustAbilityCooldownRemaining(int abilityId, real duration) +``` + +### unit.getAnimationDuration + +```wurst +public function unit.getAnimationDuration(string animation) returns real +``` + +### unit.getAnimationDuration + +```wurst +public function unit.getAnimationDuration(int animationIndex) returns real +``` + +### unit.resetAttack + +```wurst +public function unit.resetAttack(int weaponIndex) +``` + +### unit.setAurasEnabled + +```wurst +public function unit.setAurasEnabled(boolean enabled, boolean affectsUI) +``` + +### unit.setHeroGlowAllowed + +```wurst +public function unit.setHeroGlowAllowed(boolean allowed) +``` + +### unit.isHeroGlowAllowed + +```wurst +public function unit.isHeroGlowAllowed() returns boolean +``` diff --git a/_doc/stdlib/ref/_handles/_Handles.md b/_doc/stdlib/ref/_handles/_Handles.md index 9cdd48e..8aaa47a 100644 --- a/_doc/stdlib/ref/_handles/_Handles.md +++ b/_doc/stdlib/ref/_handles/_Handles.md @@ -12,4 +12,4 @@ toc: sections **[Source on GitHub](https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/_handles/_Handles.wurst)** -**Re-exports:** `_Primitives`, `Ability`, `Boolexpr`, `Camera`, `CommonNativeExtensions`, `Destructable`, `Effect`, `Fogmodifier`, `Force`, `Framehandle`, `GameCache`, `Group`, `Hashtable`, `Image`, `Item`, `Lightning`, `Multiboard`, `Player`, `Playercolor`, `Rect`, `Region`, `Sound`, `Texttag`, `Timer`, `TimerDialog`, `Trigger`, `Unit`, `Weather`, `Widget` +**Re-exports:** `_Primitives`, `Ability`, `Boolexpr`, `Camera`, `CommonNativeExtensions`, `Destructable`, `Doodad`, `Effect`, `Fogmodifier`, `Force`, `Framehandle`, `GameCache`, `Group`, `Hashtable`, `Image`, `Item`, `Lightning`, `Multiboard`, `Player`, `Playercolor`, `Rect`, `Region`, `Sound`, `Texttag`, `Timer`, `TimerDialog`, `Trigger`, `Unit`, `Weather`, `Widget` diff --git a/_doc/stdlib/ref/_wurst/Annotations.md b/_doc/stdlib/ref/_wurst/Annotations.md index 86f8aca..4c59d96 100644 --- a/_doc/stdlib/ref/_wurst/Annotations.md +++ b/_doc/stdlib/ref/_wurst/Annotations.md @@ -10,6 +10,11 @@ generated: true toc: sections --- +Marks a documented declaration whose calls are expanded by the compiler. + +Unlike a normal fallback declaration, this does not suppress intrinsic lowering. The declaration +exists so intrinsic APIs remain visible to completion, navigation, and documentation tools. + **[Source on GitHub](https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/_wurst/Annotations.wurst)** ## Functions @@ -55,6 +60,12 @@ public function compiletimenative() Functions annotated with @compiletimenative are natives that are only available at compiletime, but not ingame. +### compilerintrinsic + +```wurst +public function compilerintrinsic() +``` + ### configurable ```wurst diff --git a/_doc/stdlib/ref/_wurst/MagicFunctions.md b/_doc/stdlib/ref/_wurst/MagicFunctions.md index 0c37fe9..a35216e 100644 --- a/_doc/stdlib/ref/_wurst/MagicFunctions.md +++ b/_doc/stdlib/ref/_wurst/MagicFunctions.md @@ -17,6 +17,34 @@ The called functions must not take any parameters. **[Source on GitHub](https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/_wurst/MagicFunctions.wurst)** +## Interfaces + +### WurstFieldCallback + +```wurst +public interface WurstFieldCallback +``` + +Tooling signature used by the field-iteration compiler intrinsics. +The compiler specializes `value` to the concrete type of each visited field. + +**Members:** + +- `apply(string fieldName, int value)` + +### WurstFieldMapper + +```wurst +public interface WurstFieldMapper +``` + +Tooling signature used by the field-mapping compiler intrinsic. +The compiler specializes both the parameter and result to each concrete field type. + +**Members:** + +- `apply(string fieldName, int value) returns int` + ## Functions ### compileError @@ -66,6 +94,14 @@ If stack traces are disabled, this function returns the empty string. public function callFunctionsWithAnnotation(string _annotation) ``` +### preserveName + +```wurst +public function preserveName() +``` + +Prevents -opt name minification for a top-level function whose name is used externally. + ### compiletime ```wurst @@ -75,6 +111,62 @@ public function compiletime(T expr) returns T This is a builtin magic function. * It evaluates it's argument at compiletime and replaces the call with the result. +### wurstForFields + +```wurst +public function wurstForFields(WurstFieldCallback _callback) +``` + +Emits the callback once for every accessible non-static field of the enclosing class. + +The callback receives the source field name and its concrete value. This is compile-time code +generation: the generated Jass or Lua contains direct field accesses and no runtime reflection. +Use the explicit-target form `wurstForFields(target, callback)` for classes and tuples. + +### wurstForFields + +```wurst +public function wurstForFields(T _target, WurstFieldCallback _callback) +``` + +Emits the callback once for every accessible non-static field of `target`. + +This overload supports class instances and tuple values. The target expression is evaluated +once, and the compiler specializes the callback value to each field's concrete type. + +### wurstMapFields + +```wurst +public function wurstMapFields(WurstFieldMapper _callback) +``` + +Maps every accessible mutable non-static field of the enclosing class. + +Each callback result is assigned back to its field. Use the explicit-target form +`wurstMapFields(target, callback)` for classes and tuple variables. + +### wurstMapFields + +```wurst +public function wurstMapFields(T _target, WurstFieldMapper _callback) +``` + +Maps every accessible mutable non-static field of `target`. + +This overload supports class instances and tuple variables. The target expression is evaluated +once, and each specialized callback result is assigned directly back to its field. + +### wurstNewInstance + +```wurst +public function wurstNewInstance() returns T +``` + +Constructs the concrete class `T` through its accessible zero-argument constructor. + +This is an intrinsic rather than runtime reflection. Consequently `T` must be known concretely +at the call site and normal constructor visibility and abstract-class checks still apply. + ## Constants ### compiletime diff --git a/_doc/stdlib/ref/_wurst/TypeCasting.md b/_doc/stdlib/ref/_wurst/TypeCasting.md index ce288cb..686948f 100644 --- a/_doc/stdlib/ref/_wurst/TypeCasting.md +++ b/_doc/stdlib/ref/_wurst/TypeCasting.md @@ -394,6 +394,30 @@ public function booleanFromIndex(int index) returns boolean public function handle.getTCHandleId() returns int ``` +### int.toFogStyle + +```wurst +public function int.toFogStyle() returns fogstyle +``` + +### int.toEquipmentType + +```wurst +public function int.toEquipmentType() returns equipmentType +``` + +### int.toItemTag + +```wurst +public function int.toItemTag() returns itemTag +``` + +### int.toLoadoutSlot + +```wurst +public function int.toLoadoutSlot() returns loadoutslot +``` + ## Constants ### R2I_PRECISION diff --git a/_doc/stdlib/ref/closures/ClosureTimers.md b/_doc/stdlib/ref/closures/ClosureTimers.md index 29a1b90..62f5408 100644 --- a/_doc/stdlib/ref/closures/ClosureTimers.md +++ b/_doc/stdlib/ref/closures/ClosureTimers.md @@ -141,9 +141,9 @@ Execute an action periodically. Example use: ```wurst - doPeriodically(0.5) cb -> + doPeriodically(0.5) (_) -> if i > 10 - destroy cb + destroy it ``` ### doPeriodicallyCounted @@ -157,7 +157,7 @@ execute an action periodically, with a limited amount of calls Example use: ```wurst - doPeriodicallyCounted(0.5, 100) cb -> + doPeriodicallyCounted(0.5, 100) (_) -> doSomething() ``` @@ -196,9 +196,9 @@ Execute an action periodically. Example use: ```wurst - someTimer.doPeriodically(0.5) cb -> + someTimer.doPeriodically(0.5) (_) -> if i > 10 - destroy cb + destroy it ``` ### timer.doPeriodicallyCounted @@ -213,7 +213,7 @@ execute an action periodically, with a limited amount of calls Example use: ```wurst - someTimer.doPeriodicallyCounted(0.5, 100) cb -> + someTimer.doPeriodicallyCounted(0.5, 100) (_) -> doSomething() ``` diff --git a/_doc/stdlib/ref/closures/SpatialIndexForDestructables.md b/_doc/stdlib/ref/closures/SpatialIndexForDestructables.md new file mode 100644 index 0000000..78528c1 --- /dev/null +++ b/_doc/stdlib/ref/closures/SpatialIndexForDestructables.md @@ -0,0 +1,61 @@ +--- +title: SpatialIndexForDestructables +layout: stdlibref +category: closures +categoryLabel: Closures +tags: + - closures +source: 'https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/closures/SpatialIndexForDestructables.wurst' +generated: true +toc: sections +--- + +Native-less Lua spatial queries for destructables. + +Pass a reusable ArrayList and the query fills it. The target is reset before it is +populated, so one scratch list serves every call. To narrow what comes back, pass a filter rather +than collecting everything and testing membership afterwards. +Filters are caller-owned, and nested queries must use separate result collections. +The range query intentionally matches +ClosureForGroups.forDestructablesInRange: it returns the square that encloses the circle rather +than applying a second distance test. Runtime-created destructables must be registered explicitly. + +**[Source on GitHub](https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/closures/SpatialIndexForDestructables.wurst)** + +## Interfaces + +### DestructableSpatialFilter + +```wurst +public interface DestructableSpatialFilter +``` + +**Members:** + +- `matches(destructable whichDestructable) returns boolean` + +## Functions + +### destructablesInRect + +```wurst +public function destructablesInRect(ArrayList result, rect area, DestructableSpatialFilter filter) +``` + +### destructablesInRect + +```wurst +public function destructablesInRect(ArrayList result, rect area) +``` + +### destructablesInRange + +```wurst +public function destructablesInRange(ArrayList result, vec2 center, real range, DestructableSpatialFilter filter) +``` + +### destructablesInRange + +```wurst +public function destructablesInRange(ArrayList result, vec2 center, real range) +``` diff --git a/_doc/stdlib/ref/closures/SpatialIndexForUnits.md b/_doc/stdlib/ref/closures/SpatialIndexForUnits.md index 7ec797c..25d8a05 100644 --- a/_doc/stdlib/ref/closures/SpatialIndexForUnits.md +++ b/_doc/stdlib/ref/closures/SpatialIndexForUnits.md @@ -10,38 +10,164 @@ generated: true toc: sections --- +Native-less Lua spatial queries. + +Pass a reusable ArrayList and the query fills it. The target is reset before it is +populated, so one scratch list serves every call on a hot path. No Warcraft group, result +collection, or filter is allocated or destroyed by these overloads. + +A query result is something you walk, so a list is the shape it wants. To narrow what comes back, +pass a UnitSpatialFilter rather than collecting everything and testing membership afterwards - +the filter runs once per match, before the result is built. + +Filters are caller-owned so one instance can be reused across queries. A capturing lambda creates +a closure at its declaration site; keep it outside hot loops when allocation matters. +Nested queries must use separate result collections because each call resets its target. + +These APIs are intentionally Lua-oriented: on Jass or while disabled, the target remains empty +because no native fallback is hidden behind the generic result type. + **[Source on GitHub](https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/closures/SpatialIndexForUnits.wurst)** +## Interfaces + +### UnitSpatialFilter + +```wurst +public interface UnitSpatialFilter +``` + +**Members:** + +- `matches(unit whichUnit) returns boolean` + ## Functions ### unitsInRange ```wurst -public function unitsInRange(vec2 center, real radius) returns SparseSet +public function unitsInRange(ArrayList result, vec2 center, real radius) +``` + +Replaces result with units whose origins are within radius of center. + +### unitsInRange + +```wurst +public function unitsInRange(ArrayList result, vec2 center, real radius, UnitSpatialFilter filter) ``` -Returns units whose origins are within radius of center. +Replaces result with filtered units whose origins are within radius of center. ### unitsInRange ```wurst -public function unitsInRange(vec2 center, real radius, boolean collisionFiltering) returns SparseSet +public function unitsInRange(ArrayList result, vec2 center, real radius, boolean collisionFiltering) ``` -Returns units in range, optionally applying collision-size filtering. +Replaces result with units in range, optionally applying collision-size filtering. + +### unitsInRange + +```wurst +public function unitsInRange(ArrayList result, vec2 center, real radius, boolean collisionFiltering, UnitSpatialFilter filter) +``` + +Replaces result with filtered units in range, optionally applying collision-size filtering. + +### unitsInBox + +```wurst +public function unitsInBox(ArrayList result, vec2 boxMin, vec2 boxMax, UnitSpatialFilter filter) +``` + +Replaces result with filtered units whose origins are inside the axis-aligned box. ### unitsInBox ```wurst -public function unitsInBox(vec2 boxMin, vec2 boxMax) returns SparseSet +public function unitsInBox(ArrayList result, vec2 boxMin, vec2 boxMax) ``` -Returns units whose origins are inside the axis-aligned box. +### unitsInRect + +```wurst +public function unitsInRect(ArrayList result, rect area, UnitSpatialFilter filter) +``` + +### unitsInRect + +```wurst +public function unitsInRect(ArrayList result, rect area) +``` ### unitsOfPlayer ```wurst -public function unitsOfPlayer(player owner) returns SparseSet +public function unitsOfPlayer(ArrayList result, player owner, UnitSpatialFilter filter) +``` + +Replaces result with currently indexed units owned by owner. This is a linear registry scan; + per-player secondary sets are intentionally not maintained. + +### unitsOfPlayer + +```wurst +public function unitsOfPlayer(ArrayList result, player owner) +``` + +### forEachUnitInRange + +```wurst +public function forEachUnitInRange(vec2 center, real radius, ForGroupCallback cb) +``` + +Runs the callback for every unit whose origin is within radius of center. + +### forEachUnitInRange + +```wurst +public function forEachUnitInRange(vec2 center, real radius, bool collisionFiltering, ForGroupCallback cb) +``` + +Runs the callback for every unit in range, optionally applying collision-size filtering. + +### forEachUnitInRect + +```wurst +public function forEachUnitInRect(rect area, ForGroupCallback cb) +``` + +Runs the callback for every unit whose origin is inside the rect. + +### forEachUnitOfPlayer + +```wurst +public function forEachUnitOfPlayer(player owner, ForGroupCallback cb) +``` + +Runs the callback for every unit owned by the player. + +### forEachUnitInRangeUntil + +```wurst +public function forEachUnitInRangeUntil(vec2 center, real radius, ForGroupCallbackUntil cb) +``` + +As forEachUnitInRange, stopping as soon as the callback returns false. + +### forEachUnitInRectUntil + +```wurst +public function forEachUnitInRectUntil(rect area, ForGroupCallbackUntil cb) +``` + +As forEachUnitInRect, stopping as soon as the callback returns false. + +### forEachUnitOfPlayerUntil + +```wurst +public function forEachUnitOfPlayerUntil(player owner, ForGroupCallbackUntil cb) ``` -Returns currently indexed units owned by owner. +As forEachUnitOfPlayer, stopping as soon as the callback returns false. diff --git a/_doc/stdlib/ref/data/IntMap.md b/_doc/stdlib/ref/data/IntMap.md new file mode 100644 index 0000000..54b053b --- /dev/null +++ b/_doc/stdlib/ref/data/IntMap.md @@ -0,0 +1,27 @@ +--- +title: IntMap +layout: stdlibref +category: data +categoryLabel: Data Structures +tags: + - data +source: 'https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/data/IntMap.wurst' +generated: true +toc: sections +--- + +O(1) integer-keyed map with compiler-specialized value storage. + +JASS hashtables use integer child keys, so fixing the key type avoids an artificial generic +hash adapter while `V:` keeps strings, reals, booleans, handles, tuples, and class references +in typed arrays. Removal is unordered. The map does not own stored values. + +**[Source on GitHub](https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/data/IntMap.wurst)** + +## Classes + +### IntMap + +```wurst +public class IntMap +``` diff --git a/_doc/stdlib/ref/data/SparseSet.md b/_doc/stdlib/ref/data/SparseSet.md deleted file mode 100644 index bff4e8b..0000000 --- a/_doc/stdlib/ref/data/SparseSet.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -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 deleted file mode 100644 index c656c28..0000000 --- a/_doc/stdlib/ref/data/SparseSetBenchmark.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -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/file/StructuredSerialization.md b/_doc/stdlib/ref/file/StructuredSerialization.md new file mode 100644 index 0000000..e81b76d --- /dev/null +++ b/_doc/stdlib/ref/file/StructuredSerialization.md @@ -0,0 +1,241 @@ +--- +title: StructuredSerialization +layout: stdlibref +category: file +categoryLabel: File & Network +tags: + - file +source: 'https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/file/StructuredSerialization.wurst' +generated: true +toc: sections +--- + +Standard tuple codecs. + +Field names passed to these codecs are converted by `FieldSerializationWriter` to fixed-width +numeric IDs; names are not stored in the save string. Classes and tuples therefore use the same +wire representation and migration rules. The compiler does not derive persistence IDs from field +annotations; serialization metadata deliberately remains owned by this library. + +Custom tuples need three overloads because tuples cannot implement `FieldSerializable`. The field +intrinsics keep the codec concise and support mixed component types through overload resolution: + +``` +tuple InventorySlot(int itemId, int charges) + +public function FieldSerializationWriter.write(string name, InventorySlot value) +let child = new FieldSerializationWriter(1, this.getIntegrityKey()) +wurstForFields(value, (fieldName, fieldValue) -> child.write(fieldName, fieldValue)) +this.writeObject(name, child) + +public function FieldSerializationReader.read(string name, InventorySlot oldValue) returns InventorySlot +let child = this.readObject(name) +var result = oldValue +if child.isValid() + wurstMapFields(result, (fieldName, fieldValue) -> fieldValue.readSerializedField(child, fieldName)) +destroy child +return result + +public function InventorySlot.readSerializedField(FieldSerializationReader reader, string name) returns InventorySlot +return reader.read(name, this) + +class InventoryState implements FieldSerializable +use FieldSerializableLifecycle +InventorySlot slot = InventorySlot(0, 0) + +override function writeSerializedFields(FieldSerializationWriter writer) + wurstForFields((fieldName, fieldValue) -> writer.write(fieldName, fieldValue)) + +override function readSerializedFields(FieldSerializationReader reader) + wurstMapFields((fieldName, fieldValue) -> fieldValue.readSerializedField(reader, fieldName)) +``` + +`SerializableFields` can automatically use codecs declared by `StructuredSerialization`. For +package-local codecs, use `FieldSerializableLifecycle` and keep the two intrinsic mapping methods +in the same package as the overloads, as above. Nested custom tuples then compose once each tuple +type provides the three overloads. Keep component names stable. For tuple-specific schema changes, +increment the child writer's schema version and call `child.renameField(oldName, newName)` before +`wurstMapFields` when reading older versions. + +**[Source on GitHub](https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/file/StructuredSerialization.wurst)** + +**Re-exports:** `StructuredSerializationCore` + +## Modules + +### FieldSerializableLifecycle + +```wurst +public module FieldSerializableLifecycle +``` + +Shared typed lifecycle for `FieldSerializable` classes that provide their own field mapping. + +Prefer `SerializableFields` when all field codecs come from `StructuredSerialization`. Use this +module when mapping fields in the class package is necessary, notably for package-local tuple +codecs. Implement `writeSerializedFields` and `readSerializedFields`; serialization, integrity, +migration, nested-object loading, and typed `load` remain provided here. + +**Members:** + +- `abstract function writeSerializedFields(FieldSerializationWriter writer)` +- `abstract function readSerializedFields(FieldSerializationReader reader)` +- `readSerializedField(FieldSerializationReader reader, string name) returns thistype` +- `serialize() returns ChunkedString` +- `serialize(int schemaVersion) returns ChunkedString` +- `serialize(int schemaVersion, int integrityKey) returns ChunkedString` +- `deserialize(ChunkedString input) returns boolean` +- `deserialize(ChunkedString input, int integrityKey) returns boolean` +- `deserialize(ChunkedString input, int integrityKey, SerializationMigration migration) returns boolean` +- `load(ChunkedString input) returns thistype` + Loads valid data into this instance and returns it for concise construction and chaining. + +### SerializableFieldMapping + +```wurst +public module SerializableFieldMapping +``` + +Automatic field mapping without adding a second `serialize`/`deserialize` lifecycle. + +Use this during a compatibility window when a data class still extends legacy `Serializable`, or +when another base class already owns lifecycle methods. The class must implement `FieldSerializable`. +All of its accessible mutable instance fields participate; keep runtime-only state in a separate +class because persisted-field annotation filtering is not available. + +**Members:** + +- `writeSerializedFields(FieldSerializationWriter writer)` +- `readSerializedFields(FieldSerializationReader reader)` +- `readSerializedField(FieldSerializationReader reader, string name) returns thistype` + +### SerializableFields + +```wurst +public module SerializableFields +``` + +Modern automatic serialization for dedicated state/DAO classes using built-in codecs. + +Add `implements FieldSerializable` and `use SerializableFields`. The compiler expands field +iteration to direct accesses. The tagged format tolerates field reordering, added/removed fields, +and unknown future wire types. Missing fields retain constructor defaults. Use a schema version and +`SerializationMigration` for semantic changes or `renameField` for renamed attributes. For custom +tuple codecs declared in the consuming package, use `FieldSerializableLifecycle` as documented +above so overload resolution occurs where those codecs are visible. Classes that must also retain +legacy `Serializable` should use `SerializableFieldMapping` to avoid conflicting lifecycle methods. + +**Members:** + +- `override function writeSerializedFields(FieldSerializationWriter writer)` +- `override function readSerializedFields(FieldSerializationReader reader)` + +## Extension Functions + +### FieldSerializationWriter.write + +```wurst +public function FieldSerializationWriter.write(string name, vec2 value) +``` + +### FieldSerializationReader.read + +```wurst +public function FieldSerializationReader.read(string name, vec2 oldValue) returns vec2 +``` + +### vec2.readSerializedField + +```wurst +public function vec2.readSerializedField(FieldSerializationReader reader, string name) returns vec2 +``` + +### FieldSerializationWriter.write + +```wurst +public function FieldSerializationWriter.write(string name, vec3 value) +``` + +### FieldSerializationReader.read + +```wurst +public function FieldSerializationReader.read(string name, vec3 oldValue) returns vec3 +``` + +### vec3.readSerializedField + +```wurst +public function vec3.readSerializedField(FieldSerializationReader reader, string name) returns vec3 +``` + +### FieldSerializationWriter.write + +```wurst +public function FieldSerializationWriter.write(string name, angle value) +``` + +### FieldSerializationReader.read + +```wurst +public function FieldSerializationReader.read(string name, angle oldValue) returns angle +``` + +### angle.readSerializedField + +```wurst +public function angle.readSerializedField(FieldSerializationReader reader, string name) returns angle +``` + +### FieldSerializationWriter.write + +```wurst +public function FieldSerializationWriter.write(string name, color value) +``` + +### FieldSerializationReader.read + +```wurst +public function FieldSerializationReader.read(string name, color oldValue) returns color +``` + +### color.readSerializedField + +```wurst +public function color.readSerializedField(FieldSerializationReader reader, string name) returns color +``` + +### FieldSerializationWriter.write + +```wurst +public function FieldSerializationWriter.write(string name, colorA value) +``` + +### FieldSerializationReader.read + +```wurst +public function FieldSerializationReader.read(string name, colorA oldValue) returns colorA +``` + +### colorA.readSerializedField + +```wurst +public function colorA.readSerializedField(FieldSerializationReader reader, string name) returns colorA +``` + +### FieldSerializationWriter.write + +```wurst +public function FieldSerializationWriter.write(string name, colorHSV value) +``` + +### FieldSerializationReader.read + +```wurst +public function FieldSerializationReader.read(string name, colorHSV oldValue) returns colorHSV +``` + +### colorHSV.readSerializedField + +```wurst +public function colorHSV.readSerializedField(FieldSerializationReader reader, string name) returns colorHSV +``` diff --git a/_doc/stdlib/ref/file/StructuredSerializationCore.md b/_doc/stdlib/ref/file/StructuredSerializationCore.md new file mode 100644 index 0000000..4fe310e --- /dev/null +++ b/_doc/stdlib/ref/file/StructuredSerializationCore.md @@ -0,0 +1,182 @@ +--- +title: StructuredSerializationCore +layout: stdlibref +category: file +categoryLabel: File & Network +tags: + - file +source: 'https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/file/StructuredSerializationCore.wurst' +generated: true +toc: sections +--- + +Default integrity key for structured saves. Override this in map configuration with a private, +map-specific value. It is intended to deter edited player save codes, not provide cryptographic +authentication against somebody who can inspect the map script. + +**[Source on GitHub](https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/file/StructuredSerializationCore.wurst)** + +## Classes + +### FieldSerializationWriter + +```wurst +public class FieldSerializationWriter +``` + +Builds one compact, versioned structured-save envelope. + +**Members:** + +- `construct(int schemaVersion)` +- `construct(int schemaVersion, int integrityKey)` +- `writeRaw(string name, string token, string payload)` + Writes a future-compatible raw field. Custom token values should be one ASCII byte. +- `writeRaw(string name, string token, ChunkedString payload)` + Writes a raw field without flattening its chunked payload. The caller retains ownership. +- `write(string name, int value)` +- `write(string name, real value)` +- `write(string name, string value)` +- `write(string name, boolean value)` +- `getIntegrityKey() returns int` +- `write(string name, FieldSerializable value)` + Recursively writes an opted-in non-null class instance. +- `writeObject(string name, FieldSerializationWriter child)` + Writes and consumes a child writer as a nested class or tuple envelope. +- `finish() returns ChunkedString` + Completes the envelope. The returned value belongs to the caller. + +### FieldSerializationReader + +```wurst +public class FieldSerializationReader +``` + +Parsed field table. Unknown fields and wire tokens are retained and safely skippable. + +**Members:** + +- `construct()` +- `construct(ChunkedString input)` +- `construct(ChunkedString input, int integrityKey)` +- `isValid() returns boolean` +- `getSchemaVersion() returns int` +- `getIntegrityKey() returns int` +- `hasField(string name) returns boolean` +- `hasRaw(string name, string token) returns boolean` +- `readRaw(string name, string token, string oldValue) returns string` +- `readRawChunked(string name, string token) returns ChunkedString` + Returns an independent chunked copy of a raw payload, or `null` when the field/token is absent. + The caller owns and must destroy the returned value. +- `read(string name, int oldValue) returns int` +- `read(string name, real oldValue) returns real` +- `read(string name, string oldValue) returns string` +- `read(string name, boolean oldValue) returns boolean` +- `setRaw(string name, string token, string payload)` + Replaces or creates a decoded field during migration. +- `set(string name, int value)` +- `set(string name, real value)` +- `set(string name, string value)` +- `set(string name, boolean value)` +- `removeField(string name)` +- `readInto(string name, FieldSerializable oldValue) returns boolean` + Mutates an existing opted-in child object when a valid nested envelope is present. +- `readObject(string name) returns FieldSerializationReader` + Returns a nested reader borrowed from this reader, or an invalid reader when absent. +- `renameField(string oldName, string newName)` + Moves a persisted value from an old field name to a new one. Call this from a migration before + field mapping. Existing data under the new name wins, making repeated migrations idempotent. + +## Interfaces + +### SerializationMigration + +```wurst +public interface SerializationMigration +``` + +A parsed migration hook. Hooks are invoked but not destroyed by `deserialize`. + +**Members:** + +- `migrate(FieldSerializationReader reader)` + +### FieldSerializable + +```wurst +public interface FieldSerializable +``` + +Opt-in contract used for recursively serialized class fields. + +**Members:** + +- `writeSerializedFields(FieldSerializationWriter writer)` +- `readSerializedFields(FieldSerializationReader reader)` +- `readSerializedField(FieldSerializationReader reader, string name) returns thistype` + +## Functions + +### serializationFieldId + +```wurst +public function serializationFieldId(string name) returns int +``` + +Returns the stable, case-sensitive numeric ID used for a persisted field name. + +## Extension Functions + +### int.readSerializedField + +```wurst +public function int.readSerializedField(FieldSerializationReader reader, string name) returns int +``` + +Type-directed field readers used by the compiler-expanded mapper. + +### real.readSerializedField + +```wurst +public function real.readSerializedField(FieldSerializationReader reader, string name) returns real +``` + +### string.readSerializedField + +```wurst +public function string.readSerializedField(FieldSerializationReader reader, string name) returns string +``` + +### boolean.readSerializedField + +```wurst +public function boolean.readSerializedField(FieldSerializationReader reader, string name) returns boolean +``` + +## Constants + +### SERIALIZATION_FORMAT_VERSION + +```wurst +public constant SERIALIZATION_FORMAT_VERSION = 2 +``` + +Current tagged serialization wire format. + +### SERIALIZATION_INTEGRITY_KEY + +```wurst +public constant SERIALIZATION_INTEGRITY_KEY = 0x6D2B79F5 +``` + +> 🔧 **Configurable.** Override it in your map's config package. + +### SERIALIZATION_REAL_DECIMALS + +```wurst +public constant SERIALIZATION_REAL_DECIMALS = 6 +``` + +> 🔧 **Configurable.** Override it in your map's config package. + +Decimal places retained for Jass `real` values. Trailing zeroes are removed on the wire. diff --git a/_doc/stdlib/ref/index.md b/_doc/stdlib/ref/index.md index 5cd061c..b691a2b 100644 --- a/_doc/stdlib/ref/index.md +++ b/_doc/stdlib/ref/index.md @@ -36,12 +36,11 @@ If you are choosing a capability, start with the [standard library overview](/st - [HashList](/stdlib/ref/data/HashList.html): HashLists are used if you require quick contains operations - [HashMap](/stdlib/ref/data/HashMap.html): Generic Table Wrapper - [HashSet](/stdlib/ref/data/HashSet.html): Generic set implementation +- [IntMap](/stdlib/ref/data/IntMap.html): O(1) integer-keyed map with compiler-specialized value storage. - [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 @@ -52,7 +51,8 @@ If you are choosing a capability, start with the [standard library overview](/st - [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) +- [SpatialIndexForDestructables](/stdlib/ref/closures/SpatialIndexForDestructables.html): Native-less Lua spatial queries for destructables. +- [SpatialIndexForUnits](/stdlib/ref/closures/SpatialIndexForUnits.html): Native-less Lua spatial queries. ## Events @@ -98,6 +98,8 @@ 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) +- [StructuredSerialization](/stdlib/ref/file/StructuredSerialization.html): Standard tuple codecs. +- [StructuredSerializationCore](/stdlib/ref/file/StructuredSerializationCore.html): Default integrity key for structured saves. - [SyncSimple](/stdlib/ref/file/SyncSimple.html): Generic sync listener for arbitrary types that can be cast to/from int. ## Utilities @@ -105,6 +107,7 @@ If you are choosing a capability, start with the [standard library overview](/st - [Board](/stdlib/ref/util/Board.html): This Board library allows you to create a simple multi board with dynamic cell values. - [Cinematic](/stdlib/ref/util/Cinematic.html): Create a cinematic by composing cinematic sequences - [Colors](/stdlib/ref/util/Colors.html): Mixes two colors, s would be a number 0<=s<=1 that determines +- [DestructableSpatialIndex](/stdlib/ref/util/DestructableSpatialIndex.html): Static Lua spatial index for destructables. - [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): Seconds elapsed since map start. @@ -116,13 +119,15 @@ If you are choosing a capability, start with the [standard library overview](/st - [SafetyChecks](/stdlib/ref/util/SafetyChecks.html): Enables or disables various safety checks in miscellaneous libraries in Wurst. - [Simulate3dSound](/stdlib/ref/util/Simulate3dSound.html) - [SoundUtils](/stdlib/ref/util/SoundUtils.html) +- [SpatialPartition](/stdlib/ref/util/SpatialPartition.html): Cell-head slots the given extent would need, so a caller can size cells and groups before committing - [StandardTextTags](/stdlib/ref/util/StandardTextTags.html) - [StringUtils](/stdlib/ref/util/StringUtils.html): Returns the width of the string. +- [TerrainEnvironment](/stdlib/ref/util/TerrainEnvironment.html) - [TerrainUtils](/stdlib/ref/util/TerrainUtils.html) - [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. +- [UnitSpatialIndex](/stdlib/ref/util/UnitSpatialIndex.html): Deprecated. - [UnitSpatialIndexRemoval](/stdlib/ref/util/UnitSpatialIndexRemoval.html) ## Handle Wrappers @@ -136,6 +141,7 @@ If you are choosing a capability, start with the [standard library overview](/st - [CommonNativeExtensions](/stdlib/ref/_handles/CommonNativeExtensions.html) - [Destructable](/stdlib/ref/_handles/Destructable.html) - [Dialog](/stdlib/ref/_handles/Dialog.html): Dialogs are big dialog boxes at the center of the screen. +- [Doodad](/stdlib/ref/_handles/Doodad.html) - [Effect](/stdlib/ref/_handles/Effect.html): Change the orientation of the special effect. - [Fogmodifier](/stdlib/ref/_handles/Fogmodifier.html) - [Force](/stdlib/ref/_handles/Force.html) @@ -170,7 +176,7 @@ If you are choosing a capability, start with the [standard library overview](/st - [Abilities](/stdlib/ref/_wurst/Abilities.html) - [AbilityIds](/stdlib/ref/_wurst/AbilityIds.html) -- [Annotations](/stdlib/ref/_wurst/Annotations.html) +- [Annotations](/stdlib/ref/_wurst/Annotations.html): Marks a documented declaration whose calls are expanded by the compiler. - [Assets](/stdlib/ref/_wurst/Assets.html) - [AttachmentPoints](/stdlib/ref/_wurst/AttachmentPoints.html): Class that contains every known attachmentpoint in game - [Basics](/stdlib/ref/_wurst/Basics.html) diff --git a/_doc/stdlib/ref/util/Cinematic.md b/_doc/stdlib/ref/util/Cinematic.md index 8d617f0..6f940f4 100644 --- a/_doc/stdlib/ref/util/Cinematic.md +++ b/_doc/stdlib/ref/util/Cinematic.md @@ -59,3 +59,47 @@ A cinematic sequence. Cinematic has built-in cinematic sequences: - Cinematic.applyCameraSetupSeq(camerasetup) - Cinematic.snapCameraPosSeq(vec2) - Cinematic.doNothingSeq() + +## Functions + +### preloadModelCinematic + +```wurst +public function preloadModelCinematic(string modelPath) returns boolean +``` + +### playModelCinematic + +```wurst +public function playModelCinematic(string modelPath, vec3 position, angle rotation) +``` + +### getModelCinematicCurrentShot + +```wurst +public function getModelCinematicCurrentShot() returns int +``` + +### getModelCinematicShotCount + +```wurst +public function getModelCinematicShotCount() returns int +``` + +### getModelCinematicRemainingTime + +```wurst +public function getModelCinematicRemainingTime() returns real +``` + +### setDECinematicsEnabled + +```wurst +public function setDECinematicsEnabled(boolean enabled) +``` + +### setThematicMusicPausedOnFocusLost + +```wurst +public function setThematicMusicPausedOnFocusLost(boolean paused) +``` diff --git a/_doc/stdlib/ref/util/DestructableSpatialIndex.md b/_doc/stdlib/ref/util/DestructableSpatialIndex.md new file mode 100644 index 0000000..ddf2c08 --- /dev/null +++ b/_doc/stdlib/ref/util/DestructableSpatialIndex.md @@ -0,0 +1,124 @@ +--- +title: DestructableSpatialIndex +layout: stdlibref +category: util +categoryLabel: Utilities +tags: + - util +source: 'https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/DestructableSpatialIndex.wurst' +generated: true +toc: sections +--- + +Static Lua spatial index for destructables. + +Destructables do not have an observable movement event, so this index only needs registration +and removal hooks. Preplaced destructables are discovered once during initialization. Runtime +destructables created through CreateDestructable must call registerSpatialIndex() before they +can be queried. + +**[Source on GitHub](https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/DestructableSpatialIndex.wurst)** + +## Functions + +### rebuildDestructableSpatialIndexGrid + +```wurst +public function rebuildDestructableSpatialIndexGrid(vec2 worldMin, vec2 worldMax) +``` + +Rebuilds the grid around the current membership. Useful after changing the configured map bounds. + +### destructableSpatialIndexBeginBoxQuery + +```wurst +public function destructableSpatialIndexBeginBoxQuery(vec2 boxMin, vec2 boxMax) returns int +``` + +Collects indexed destructables whose cached position is inside the axis-aligned box. + +### destructableSpatialIndexBeginRangeQuery + +```wurst +public function destructableSpatialIndexBeginRangeQuery(vec2 center, real range) returns int +``` + +Collects indexed destructables in the square used by forDestructablesInRange. + +### destructableSpatialIndexQuery + +```wurst +public function destructableSpatialIndexQuery(int i) returns destructable +``` + +### destructableSpatialIndexEndQuery + +```wurst +public function destructableSpatialIndexEndQuery() +``` + +### destructableSpatialIndexHealthy + +```wurst +public function destructableSpatialIndexHealthy() returns boolean +``` + +### destructableSpatialIndexTracked + +```wurst +public function destructableSpatialIndexTracked() returns int +``` + +### destructableSpatialIndexCellOf + +```wurst +public function destructableSpatialIndexCellOf(vec2 pos) returns int +``` + +### destructableSpatialIndexGridWidth + +```wurst +public function destructableSpatialIndexGridWidth() returns int +``` + +### destructableSpatialIndexGridHeight + +```wurst +public function destructableSpatialIndexGridHeight() returns int +``` + +## Extension Functions + +### destructable.registerSpatialIndex + +```wurst +public function destructable.registerSpatialIndex() +``` + +Registers one destructable in the index. + +### destructable.unregisterSpatialIndex + +```wurst +public function destructable.unregisterSpatialIndex() +``` + +Removes one destructable from the index before RemoveDestructable is called. + +## Constants + +### USE_DESTRUCTABLE_SPATIAL_INDEX + +```wurst +public constant USE_DESTRUCTABLE_SPATIAL_INDEX = true +``` + +> 🔧 **Configurable.** Override it in your map's config package. + +### DESTRUCTABLE_SPATIAL_INDEX_CELL_SIZE + +```wurst +public constant DESTRUCTABLE_SPATIAL_INDEX_CELL_SIZE = 256. +``` + +> 🔧 **Configurable.** Override it in your map's config package. diff --git a/_doc/stdlib/ref/util/SpatialPartition.md b/_doc/stdlib/ref/util/SpatialPartition.md new file mode 100644 index 0000000..2092265 --- /dev/null +++ b/_doc/stdlib/ref/util/SpatialPartition.md @@ -0,0 +1,367 @@ +--- +title: SpatialPartition +layout: stdlibref +category: util +categoryLabel: Utilities +tags: + - util +source: 'https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/SpatialPartition.wurst' +generated: true +toc: sections +--- + +Cell-head slots the given extent would need, so a caller can size cells and groups before committing +to it - or -1 when that count is not representable, which is itself a reason to refuse the extent. + +Computed with divisions rather than by multiplying and inspecting the result: at a small cell size +the product overflows, and a wrapped negative reads as "comfortably within budget" to any comparison +made afterwards. + +**[Source on GitHub](https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/SpatialPartition.wurst)** + +## Functions + +### spatialPartitionCellOf + +```wurst +public function spatialPartitionCellOf(vec2 pos) returns int +``` + +Fine cell for a position, for tests and diagnostics. + +### spatialPartitionGridWidth + +```wurst +public function spatialPartitionGridWidth() returns int +``` + +### spatialPartitionGridHeight + +```wurst +public function spatialPartitionGridHeight() returns int +``` + +### spatialPartitionCoarseWidth + +```wurst +public function spatialPartitionCoarseWidth() returns int +``` + +### spatialPartitionCellSlotCount + +```wurst +public function spatialPartitionCellSlotCount() returns int +``` + +Flattened cell-head slots the current grid occupies: one per cell per group. On Jass this must stay +within `JASS_MAX_ARRAY_SIZE`; on Lua arrays grow and it is only a memory figure. + +### spatialPartitionRequiredCellSlots + +```wurst +public function spatialPartitionRequiredCellSlots(vec2 worldMin, vec2 worldMax) returns int +``` + +### spatialPartitionExtentFits + +```wurst +public function spatialPartitionExtentFits(vec2 worldMin, vec2 worldMax) returns boolean +``` + +Whether an extent's cell storage is both representable and within this target's array limit. + +### spatialPartitionLastQueryVisits + +```wurst +public function spatialPartitionLastQueryVisits() returns int +``` + +Entries the last query walked, whether or not they matched. + +### spatialPartitionLastQueryBlocksSkipped + +```wurst +public function spatialPartitionLastQueryBlocksSkipped() returns int +``` + +Coarse blocks the last query rejected without descending into their cells. + +### spatialPartitionMaxEntryId + +```wurst +public function spatialPartitionMaxEntryId() returns int +``` + +Largest usable entry id on this target. Whichever of the two ceilings binds first: the flattened +per-entry links, or the snapshot with every query level open at once. Effectively unbounded on Lua. + +### spatialPartitionIsValidEntryId + +```wurst +public function spatialPartitionIsValidEntryId(int id) returns boolean +``` + +Whether an id may be used as an entry. Ids are 1-based, because 0 is reserved as the chain +sentinel, and bounded above on Jass by what the flattened entry slots can address. + +### spatialPartitionIsValidGroupId + +```wurst +public function spatialPartitionIsValidGroupId(int groupId) returns boolean +``` + +Whether a group id addresses a real group. + +### spatialPartitionAllocateEntryId + +```wurst +public function spatialPartitionAllocateEntryId() returns int +``` + +Reserves an entry id no other consumer will be handed. Release it with +`spatialPartitionReleaseEntryId` after removing the entry, or ids are never reused. Answers 0 when +the target's id space is exhausted, which a caller must treat as "cannot index this". + +### spatialPartitionEntryIdIsReserved + +```wurst +public function spatialPartitionEntryIdIsReserved(int id) returns boolean +``` + +Whether an id is currently handed out to some consumer. + +### spatialPartitionReleaseEntryId + +```wurst +public function spatialPartitionReleaseEntryId(int id) +``` + +Returns an id to the pool. The entry must already be removed: recycling one that is still linked +would hand a live row to the next caller. + +### spatialPartitionAllocatedEntryIds + +```wurst +public function spatialPartitionAllocatedEntryIds() returns int +``` + +Highest id in use across every consumer, which is what the arrays keyed by an id are sized to. +Not the fresh-allocation cursor: a high row taken directly and later recycled is handed out again +from the free list without the cursor ever reaching it, so the cursor can read far below the rows +that are actually live. + +### spatialPartitionAllocateGroup + +```wurst +public function spatialPartitionAllocateGroup() returns int +``` + +Reserves a group no other consumer will be given, or -1 when none are left. Hold on to it: groups +are long-lived, there is no release, and asking twice consumes two. + +### spatialPartitionGroupIsReserved + +```wurst +public function spatialPartitionGroupIsReserved(int groupId) returns boolean +``` + +Whether a group has been claimed, by the allocator or by being used directly. + +### spatialPartitionIsReady + +```wurst +public function spatialPartitionIsReady() returns boolean +``` + +Whether the grid has been given an extent yet. Nothing can be linked before it has. + +### spatialPartitionIsValidExtent + +```wurst +public function spatialPartitionIsValidExtent(vec2 worldMin, vec2 worldMax) returns boolean +``` + +Whether an extent describes a real area. An inverted axis yields a zero or negative dimension, and +the coarse block index divides by the grid width, so this has to be caught before any state moves. + +### spatialPartitionSetPos + +```wurst +public function spatialPartitionSetPos(int id, real x, real y) +``` + +Records where an entry is, re-bucketing it in every group it belongs to. Call this before adding +the entry to any group, and again whenever it has moved. + +### spatialPartitionSetGroup + +```wurst +public function spatialPartitionSetGroup(int id, int groupId, boolean member) +``` + +Adds or removes an entry from one group. The caller owns the policy of when membership changes, +which keeps predicate evaluation out of the walk entirely. + +### spatialPartitionEntryX + +```wurst +public function spatialPartitionEntryX(int id) returns real +``` + +Cached x of an entry, so a consumer can re-decide an uncertain result under its own staleness + model before paying for a live position. Zero for an id the partition does not hold. + +### spatialPartitionEntryY + +```wurst +public function spatialPartitionEntryY(int id) returns real +``` + +Cached y of an entry. See `spatialPartitionEntryX`. + +### spatialPartitionInGroup + +```wurst +public function spatialPartitionInGroup(int id, int groupId) returns boolean +``` + +Whether an entry is currently in a group. + +### spatialPartitionRemove + +```wurst +public function spatialPartitionRemove(int id) +``` + +Drops an entry from every group. Call before recycling its id, or a later entry inherits it. + +### spatialPartitionEntryCount + +```wurst +public function spatialPartitionEntryCount() returns int +``` + +Live entries the partition holds. + +### spatialPartitionClear + +```wurst +public function spatialPartitionClear() +``` + +Drops every entry and every group link, across every consumer - the partition has one population, +not one per group. A layer that wants to drop only its own entries removes them by id; there is no +way to ask for that here, because groups say what a query sees, not who owns a row. Ids are not +returned to the allocator either, so a consumer that clears must release the ones it held. + +### rebuildSpatialPartition + +```wurst +public function rebuildSpatialPartition(vec2 worldMin, vec2 worldMax) +``` + +Re-derives the extent and re-links every entry into the new grid, keeping the groups they were in. + +Every cell index means something different afterwards, so this cannot just clear the heads: an +entry still carrying its old link would be invisible to the new grid and would corrupt the chain it +is eventually unlinked from. + +### spatialPartitionBeginRangeQuery + +```wurst +public function spatialPartitionBeginRangeQuery(vec2 center, real radius, real maxDisplacement, int groupId) returns int +``` + +Collects the members of `groupId` within `radius` of the point, allowing for entries whose cached +position may be up to `maxDisplacement` out of date. + +Certainly-in and certainly-out are settled from the cached position alone. Entries in the +`maxDisplacement`-wide band around the boundary cannot be decided from stale data, so they come +back flagged: check `spatialPartitionQueryUncertain(i)` and resolve those against a live position. +Pass a zero displacement and no result is ever flagged. + +Must be paired with `spatialPartitionEndQuery()`. + +### spatialPartitionBeginBoxQuery + +```wurst +public function spatialPartitionBeginBoxQuery(vec2 boxMin, vec2 boxMax, real maxDisplacement, int groupId) returns int +``` + +Collects the members of `groupId` inside the axis-aligned box, allowing for entries whose cached +position may be up to `maxDisplacement` out of date. + +Same three-way split as the range query, applied per axis: a cached position more than +`maxDisplacement` outside the box cannot be inside it, one that far within cannot be outside, and +the band between is flagged for the caller to resolve. Pass a zero displacement and nothing is +flagged. + +Must be paired with `spatialPartitionEndQuery()`. + +### spatialPartitionQueryId + +```wurst +public function spatialPartitionQueryId(int i) returns int +``` + +Entry id `i` of the innermost active query, or 0 if there is no such result. + +### spatialPartitionQueryUncertain + +```wurst +public function spatialPartitionQueryUncertain(int i) returns boolean +``` + +Whether entry `i` could not be decided from its cached position and needs a live check against the +requested radius. Always false when the query passed a zero displacement. + +### spatialPartitionEndQuery + +```wurst +public function spatialPartitionEndQuery() +``` + +## Constants + +### SPATIAL_PARTITION_CELL_SIZE + +```wurst +public constant SPATIAL_PARTITION_CELL_SIZE = 256. +``` + +> 🔧 **Configurable.** Override it in your map's config package. + +Fine cell edge in world units. Smaller tightens windows but walks more cells. + +### SPATIAL_PARTITION_COARSE_FACTOR + +```wurst +public constant SPATIAL_PARTITION_COARSE_FACTOR = 8 +``` + +> 🔧 **Configurable.** Override it in your map's config package. + +Fine cells per coarse block edge, so 8 means a block covers 8x8 cells. The coarse level exists so +a large query skips empty regions with one test per block instead of one per cell. + +### SPATIAL_PARTITION_MAX_GROUPS + +```wurst +public constant SPATIAL_PARTITION_MAX_GROUPS = 8 +``` + +> 🔧 **Configurable.** Override it in your map's config package. + +Concurrently declared groups. Each costs one chain pointer per entry and one head per cell, so +raise it only as far as a project uses. + +### SPATIAL_PARTITION_MAX_QUERY_DEPTH + +```wurst +public constant SPATIAL_PARTITION_MAX_QUERY_DEPTH = 8 +``` + +> 🔧 **Configurable.** Override it in your map's config package. + +Deepest nesting of simultaneously open queries. Every open level keeps its own results in the shared +snapshot, so this multiplies snapshot storage and is part of the capacity budget below. diff --git a/_doc/stdlib/ref/util/TerrainEnvironment.md b/_doc/stdlib/ref/util/TerrainEnvironment.md new file mode 100644 index 0000000..dfcb4d8 --- /dev/null +++ b/_doc/stdlib/ref/util/TerrainEnvironment.md @@ -0,0 +1,185 @@ +--- +title: TerrainEnvironment +layout: stdlibref +category: util +categoryLabel: Utilities +tags: + - util +source: 'https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/TerrainEnvironment.wurst' +generated: true +toc: sections +--- + +**[Source on GitHub](https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/TerrainEnvironment.wurst)** + +## Tuples + +### terrainFogSettings + +```wurst +public tuple terrainFogSettings(int style, real zStart, real zEnd, real density, real heightStart, real heightEnd, real linearStart, real linearEnd, color tint) +``` + +Complete terrain-fog configuration used by the v3 renderer. + +### hdWaterSettings + +```wurst +public tuple hdWaterSettings(color tint, boolean overrideColor, int vertexDisplacement, int minOpacity, int maxOpacity, int reflectivity, int emissivity, int edgeSoftness, int waveStrength, int environmentMapStrength) +``` + +HD-water renderer parameters. Integer fields use the native engine ranges. + +## Functions + +### setTerrainFog + +```wurst +public function setTerrainFog(terrainFogSettings settings) +``` + +### setTerrainFogStyle + +```wurst +public function setTerrainFogStyle(fogstyle style) +``` + +### setTerrainFogZRange + +```wurst +public function setTerrainFogZRange(real start, real stop) +``` + +### setTerrainFogHeightRange + +```wurst +public function setTerrainFogHeightRange(real start, real stop) +``` + +### setTerrainFogLinearRange + +```wurst +public function setTerrainFogLinearRange(real start, real stop) +``` + +### setTerrainFogDensity + +```wurst +public function setTerrainFogDensity(real density) +``` + +### setTerrainFogMaxLinearDensity + +```wurst +public function setTerrainFogMaxLinearDensity(real density) +``` + +### setTerrainFogColor + +```wurst +public function setTerrainFogColor(color tint) +``` + +### setTerrainFogDrawOverSky + +```wurst +public function setTerrainFogDrawOverSky(boolean drawOverSky) +``` + +### setHDWater + +```wurst +public function setHDWater(hdWaterSettings settings) +``` + +### setHDWater + +```wurst +public function setHDWater(color tint, boolean useColor, int vertexDisplacement, int minOpacity, int maxOpacity, int reflectivity, int emissivity, int edgeSoftness, int waveStrength) +``` + +### setHDWaterColor + +```wurst +public function setHDWaterColor(color tint) +``` + +### setHDWaterColorOverride + +```wurst +public function setHDWaterColorOverride(boolean enabled) +``` + +### setHDWaterVertexDisplacement + +```wurst +public function setHDWaterVertexDisplacement(int value) +``` + +### setHDWaterOpacity + +```wurst +public function setHDWaterOpacity(int min, int max) +``` + +### setHDWaterReflectivity + +```wurst +public function setHDWaterReflectivity(int value) +``` + +### setHDWaterEmissivity + +```wurst +public function setHDWaterEmissivity(int value) +``` + +### setHDWaterEdgeSoftness + +```wurst +public function setHDWaterEdgeSoftness(int value) +``` + +### setHDWaterWaveStrength + +```wurst +public function setHDWaterWaveStrength(int value) +``` + +### setHDWaterEnvironmentMapStrength + +```wurst +public function setHDWaterEnvironmentMapStrength(int value) +``` + +### setMinShadowCastingPointLightCount + +```wurst +public function setMinShadowCastingPointLightCount(int count) +``` + +### getMinShadowCastingPointLightCount + +```wurst +public function getMinShadowCastingPointLightCount() returns int +``` + +## Extension Functions + +### vec2.isTerrainPathable + +```wurst +public function vec2.isTerrainPathable(pathingtype whichType) returns boolean +``` + +### vec2.setDoodadColor + +```wurst +public function vec2.setDoodadColor(real radius, int doodadId, boolean nearestOnly, playercolor whichColor) +``` + +### rect.setDoodadColor + +```wurst +public function rect.setDoodadColor(int doodadId, playercolor whichColor) +``` diff --git a/_doc/stdlib/ref/util/UnitSpatialIndex.md b/_doc/stdlib/ref/util/UnitSpatialIndex.md index 038aef1..3f99e14 100644 --- a/_doc/stdlib/ref/util/UnitSpatialIndex.md +++ b/_doc/stdlib/ref/util/UnitSpatialIndex.md @@ -10,9 +10,12 @@ 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. +Deprecated. Cell geometry belongs to the shared grid now, so `SPATIAL_PARTITION_CELL_SIZE` is the +setting; one grid cannot have a second cell size for units alone. + +Kept exported so an existing `UnitSpatialIndex_config` still compiles, and defaulted to agree. It +is checked at init rather than ignored: a map that had tuned this and upgrades gets told its +value is no longer in effect, instead of quietly running on a different grid. **[Source on GitHub](https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/util/UnitSpatialIndex.wurst)** @@ -56,7 +59,9 @@ How many units the sweep currently cycles over. public function spatialIndexAllocatedSlots() returns int ``` -Allocated cache slots; ID reuse keeps this at peak concurrent population. +Allocated cache slots; ID reuse keeps this at peak concurrent population. Ids are shared across +partition consumers now, so this counts every entry id handed out, not only this layer's - which +is the right figure for the arrays here, since they are indexed by that same id. ### spatialIndexPadCells @@ -74,6 +79,10 @@ public function rebuildSpatialIndexGrid(vec2 worldMin, vec2 worldMax) Rebuilds the extent and re-buckets all units. Unguarded so grid math remains testable on Jass. +The grid is shared, so this re-derives it for every partition consumer, not only for units: there +is one extent, and an entry linked under the old cell indices would be invisible to the new grid. +That is why the rebuild re-links everything rather than only this layer's entries. + ### spatialIndexCellOf ```wurst @@ -151,6 +160,10 @@ Closes the innermost open query and releases its snapshot. public function unit.updateSpatialIndex() ``` +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. + ## Constants ### USE_UNIT_SPATIAL_INDEX @@ -163,25 +176,25 @@ public constant USE_UNIT_SPATIAL_INDEX = true Master switch; override from `UnitSpatialIndex_config` to disable the native-less index. -### SPATIAL_INDEX_CELL_SIZE +### SPATIAL_INDEX_UNITS_PER_TICK ```wurst -public constant SPATIAL_INDEX_CELL_SIZE = 256. +public constant SPATIAL_INDEX_UNITS_PER_TICK = 128 ``` > 🔧 **Configurable.** Override it in your map's config package. -Grid cell edge in world units; smaller cells tighten windows but increase cells walked. +Units re-bucketed per tick; raising this shortens the cycle and query padding. -### SPATIAL_INDEX_UNITS_PER_TICK +### SPATIAL_INDEX_SWEEP_PERIOD ```wurst -public constant SPATIAL_INDEX_UNITS_PER_TICK = 128 +public constant SPATIAL_INDEX_SWEEP_PERIOD = ANIMATION_PERIOD ``` > 🔧 **Configurable.** Override it in your map's config package. -Units re-bucketed per tick; raising this shortens the cycle and query padding. +Time between sweep steps. Raising this reduces timer and refresh work but increases query padding. ### SPATIAL_INDEX_MAX_UNIT_SPEED @@ -202,3 +215,11 @@ 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. + +### SPATIAL_INDEX_CELL_SIZE + +```wurst +public constant SPATIAL_INDEX_CELL_SIZE = SPATIAL_PARTITION_CELL_SIZE +``` + +> 🔧 **Configurable.** Override it in your map's config package.