Skip to content

Commit bb439d0

Browse files
Frottygithub-actions[bot]
authored andcommitted
docs(stdlib): regenerate API reference
1 parent 3d1be71 commit bb439d0

5 files changed

Lines changed: 49 additions & 466 deletions

File tree

_data/stdlib_index.json

Lines changed: 36 additions & 260 deletions
Original file line numberDiff line numberDiff line change
@@ -104174,7 +104174,7 @@
104174104174
"name": "setModelFileExtraVersions",
104175104175
"typeParams": "",
104176104176
"receiver": null,
104177-
"signature": "function setModelFileExtraVersions(string data)",
104177+
"signature": "function setModelFileExtraVersions(int data)",
104178104178
"doc": "",
104179104179
"deprecated": {
104180104180
"flag": false,
@@ -108723,263 +108723,6 @@
108723108723
}
108724108724
]
108725108725
},
108726-
{
108727-
"package": "ArrayList",
108728-
"category": "data",
108729-
"categoryLabel": "Data Structures",
108730-
"sourcePath": "wurst/data/ArrayList.wurst",
108731-
"githubUrl": "https://github.com/wurstscript/WurstStdlib2/blob/master/wurst/data/ArrayList.wurst",
108732-
"summary": "High-performance array-based list using static shared storage per type.\nIn most cases, a LinkedList is a better choice due to its flexibility.\nThis data structure is only recommended for performance-critical code\nand requires careful use to avoid fragmentation.\n\nWHEN TO USE:\n===========\nArrayList is faster than LinkedList for:\n- Iterating large lists (1000+ elements) - no node indirection\n- Index based operations - O(1) vs O(n)\n- When only appending elements to the end\n\nLinkedList is better for:\n- Insertion anywhere except the end of the list\n- Deletions while retaining order\n- Unknown size requirements\n- No resize performance risk\n\nTYPE SYSTEM IMPLICATIONS:\n========================\nEach ArrayList<T> type gets its own static storage array.\n- ArrayList<int>, ArrayList<unit>, ArrayList<string> = 3 separate arrays\n- On the Jass target each type holds up to JASS_MAX_ARRAY_SIZE elements total across all\n instances (the Lua target grows dynamically and is not bounded by this)\n\nChoose wisely based on how many types you have.\n\nPERFORMANCE RULES:\n==================\n\n1. PRESIZE, DON'T RESIZE\n Bad: new ArrayList<int>() // Might resize multiple times\n Good: new ArrayList<int>(maxSize) // One allocation\n\n Why: Resize operations copy ALL elements to new memory. Expensive!\n\n2. REUSE, DON'T RECREATE\n Bad: In loop `let temp = new ArrayList<int>() ... destroy temp`\n Good: `let temp = new ArrayList<int>() ... temp.clear()` in loop\n\n Why: Allocation/Deallocation is moderately expensive and causes fragmentation\n\n3. ORDERED REMOVAL IS SLOW\n Bad: list.removeAt(i) // O(n) - shifts all elements\n Good: list.removeAtUnordered(i) // O(1) - swaps with last element\n\n Only use removeAtUnordered() if order doesn't matter\n\n4. ITERATE BY INDEX\n Good: for i = 0 to list.size()-1 // Zero allocation\n Good: list[i] // Indexing operator\n\n ArrayList has no iterator by design - index loops keep hot paths\n allocation-free.\n\n5. AVOID FREQUENT INSERTS AT START\n Bad: list.addtoStart(x) // O(n) every time\n Good: Use LinkedList or add in reverse order\n\nPERFORMANCE TABLE:\n==================\nOperation | ArrayList | LinkedList | Notes\n-------------------|-----------|------------|---------------------------\nadd(elem) | O(1)* | O(1) | *O(n) on resize!\naddtoStart(elem) | O(n) | O(1) | Shifts all elements\nget(index) | O(1) | O(n) | Major ArrayList advantage\nremoveAt(index) | O(n) | O(1) | Shifts remaining elements\nremoveAtUnordered | O(1) | N/A | Doesn't preserve order\nIterate all | Faster | Fast | LinkedList does double the work, but is still fast\nMemory per element | 1 slot | 3 slots | Element + 2 pointers\nCreate/destroy | Varies | High | AL might need memory management, LL needs to process Nodes\n\nMEMORY MANAGEMENT:\n==================\nArrayList uses section allocation in a shared static array per type.\nDestroyed lists return sections to a free pool for reuse.\nFree sections are compacted to reduce fragmentation.\n\nFragmentation occurs when lists grow - the old section becomes a gap.\nThis is why presizing matters: growth = copy to new location = wasted space.\n\nHard limit (wc3 / Jass native target): the shared store is a fixed-size array, so it is\nbounded by JASS_MAX_ARRAY_SIZE total slots per type across all live instances; exceeding\nit raises an error. On the Lua target the store is a dynamically growing table, so the\ncap does not apply - allocateStorage branches on the magic isLua constant and skips the\nerror. ArrayList's added value on Lua is keeping element types static instead of relying\non typecasting.",
108733-
"summaryFirstLine": "High-performance array-based list using static shared storage per type.",
108734-
"tags": [
108735-
"collection",
108736-
"data",
108737-
"list"
108738-
],
108739-
"imports": [],
108740-
"entities": [
108741-
{
108742-
"kind": "class",
108743-
"name": "ArrayList",
108744-
"typeParams": "<T:>",
108745-
"receiver": null,
108746-
"signature": "public class ArrayList<T:>",
108747-
"doc": "",
108748-
"deprecated": {
108749-
"flag": false,
108750-
"message": null
108751-
},
108752-
"configurable": false,
108753-
"members": [],
108754-
"enumMembers": [],
108755-
"line": 98
108756-
},
108757-
{
108758-
"kind": "function",
108759-
"name": "asArrayList",
108760-
"typeParams": "<T:>",
108761-
"receiver": null,
108762-
"signature": "public function asArrayList<T:>(vararg T ts) returns ArrayList<T>",
108763-
"doc": "",
108764-
"deprecated": {
108765-
"flag": false,
108766-
"message": null
108767-
},
108768-
"configurable": false,
108769-
"members": [],
108770-
"enumMembers": [],
108771-
"line": 610
108772-
},
108773-
{
108774-
"kind": "interface",
108775-
"name": "ArrayListPredicate",
108776-
"typeParams": "<T:>",
108777-
"receiver": null,
108778-
"signature": "public interface ArrayListPredicate<T:>",
108779-
"doc": "",
108780-
"deprecated": {
108781-
"flag": false,
108782-
"message": null
108783-
},
108784-
"configurable": false,
108785-
"members": [],
108786-
"enumMembers": [],
108787-
"line": 620
108788-
},
108789-
{
108790-
"kind": "interface",
108791-
"name": "ALItrClosure",
108792-
"typeParams": "<T:>",
108793-
"receiver": null,
108794-
"signature": "public interface ALItrClosure<T:>",
108795-
"doc": "",
108796-
"deprecated": {
108797-
"flag": false,
108798-
"message": null
108799-
},
108800-
"configurable": false,
108801-
"members": [],
108802-
"enumMembers": [],
108803-
"line": 623
108804-
},
108805-
{
108806-
"kind": "interface",
108807-
"name": "ArrayListUpdater",
108808-
"typeParams": "<T:>",
108809-
"receiver": null,
108810-
"signature": "public interface ArrayListUpdater<T:>",
108811-
"doc": "",
108812-
"deprecated": {
108813-
"flag": false,
108814-
"message": null
108815-
},
108816-
"configurable": false,
108817-
"members": [],
108818-
"enumMembers": [],
108819-
"line": 626
108820-
},
108821-
{
108822-
"kind": "interface",
108823-
"name": "MapClosure",
108824-
"typeParams": "<T:, Q:>",
108825-
"receiver": null,
108826-
"signature": "public interface MapClosure<T:, Q:>",
108827-
"doc": "",
108828-
"deprecated": {
108829-
"flag": false,
108830-
"message": null
108831-
},
108832-
"configurable": false,
108833-
"members": [],
108834-
"enumMembers": [],
108835-
"line": 629
108836-
},
108837-
{
108838-
"kind": "interface",
108839-
"name": "FoldClosure",
108840-
"typeParams": "<T:, Q:>",
108841-
"receiver": null,
108842-
"signature": "public interface FoldClosure<T:, Q:>",
108843-
"doc": "",
108844-
"deprecated": {
108845-
"flag": false,
108846-
"message": null
108847-
},
108848-
"configurable": false,
108849-
"members": [],
108850-
"enumMembers": [],
108851-
"line": 632
108852-
},
108853-
{
108854-
"kind": "interface",
108855-
"name": "Comparator",
108856-
"typeParams": "<T:>",
108857-
"receiver": null,
108858-
"signature": "public interface Comparator<T:>",
108859-
"doc": "",
108860-
"deprecated": {
108861-
"flag": false,
108862-
"message": null
108863-
},
108864-
"configurable": false,
108865-
"members": [],
108866-
"enumMembers": [],
108867-
"line": 635
108868-
},
108869-
{
108870-
"kind": "extension-function",
108871-
"name": "sort",
108872-
"typeParams": "",
108873-
"receiver": "ArrayList<int>",
108874-
"signature": "public function ArrayList<int>.sort()",
108875-
"doc": "",
108876-
"deprecated": {
108877-
"flag": false,
108878-
"message": null
108879-
},
108880-
"configurable": false,
108881-
"members": [],
108882-
"enumMembers": [],
108883-
"line": 643
108884-
},
108885-
{
108886-
"kind": "extension-function",
108887-
"name": "sort",
108888-
"typeParams": "",
108889-
"receiver": "ArrayList<real>",
108890-
"signature": "public function ArrayList<real>.sort()",
108891-
"doc": "",
108892-
"deprecated": {
108893-
"flag": false,
108894-
"message": null
108895-
},
108896-
"configurable": false,
108897-
"members": [],
108898-
"enumMembers": [],
108899-
"line": 647
108900-
},
108901-
{
108902-
"kind": "extension-function",
108903-
"name": "sort",
108904-
"typeParams": "",
108905-
"receiver": "ArrayList<string>",
108906-
"signature": "public function ArrayList<string>.sort()",
108907-
"doc": "",
108908-
"deprecated": {
108909-
"flag": false,
108910-
"message": null
108911-
},
108912-
"configurable": false,
108913-
"members": [],
108914-
"enumMembers": [],
108915-
"line": 651
108916-
},
108917-
{
108918-
"kind": "extension-function",
108919-
"name": "joinBy",
108920-
"typeParams": "",
108921-
"receiver": "ArrayList<string>",
108922-
"signature": "public function ArrayList<string>.joinBy(string separator) returns string",
108923-
"doc": "Joins elements from a string list into one string using a separator",
108924-
"deprecated": {
108925-
"flag": false,
108926-
"message": null
108927-
},
108928-
"configurable": false,
108929-
"members": [],
108930-
"enumMembers": [],
108931-
"line": 659
108932-
},
108933-
{
108934-
"kind": "extension-function",
108935-
"name": "join",
108936-
"typeParams": "",
108937-
"receiver": "ArrayList<string>",
108938-
"signature": "public function ArrayList<string>.join() returns string",
108939-
"doc": "Joins elements from a string list into one string",
108940-
"deprecated": {
108941-
"flag": false,
108942-
"message": null
108943-
},
108944-
"configurable": false,
108945-
"members": [],
108946-
"enumMembers": [],
108947-
"line": 668
108948-
},
108949-
{
108950-
"kind": "extension-function",
108951-
"name": "op_index",
108952-
"typeParams": "<T>",
108953-
"receiver": "ArrayList<T>",
108954-
"signature": "public function ArrayList<T>.op_index<T>(int index) returns T",
108955-
"doc": "",
108956-
"deprecated": {
108957-
"flag": false,
108958-
"message": null
108959-
},
108960-
"configurable": false,
108961-
"members": [],
108962-
"enumMembers": [],
108963-
"line": 672
108964-
},
108965-
{
108966-
"kind": "extension-function",
108967-
"name": "op_indexAssign",
108968-
"typeParams": "<T>",
108969-
"receiver": "ArrayList<T>",
108970-
"signature": "public function ArrayList<T>.op_indexAssign<T>(int index, T value)",
108971-
"doc": "",
108972-
"deprecated": {
108973-
"flag": false,
108974-
"message": null
108975-
},
108976-
"configurable": false,
108977-
"members": [],
108978-
"enumMembers": [],
108979-
"line": 675
108980-
}
108981-
]
108982-
},
108983108726
{
108984108727
"package": "BitSet",
108985108728
"category": "data",
@@ -154542,7 +154285,40 @@
154542154285
"message": null
154543154286
},
154544154287
"configurable": false,
154545-
"members": [],
154288+
"members": [
154289+
{
154290+
"kind": "function",
154291+
"name": "commandButton",
154292+
"typeParams": "",
154293+
"receiver": null,
154294+
"signature": "static function commandButton(int index) returns string",
154295+
"doc": "Name of a command card button, index 0 to 11 (1.32+): 0 is the top-left (0,0) button, 11 the\n\t\tbottom-right (3,2). Move/hide via these named frames, not ORIGIN_FRAME_COMMAND_BUTTON (moving\n\t\tthe origin frames glitches in 1.32+). NOTE: command buttons reappear/update on every unit\n\t\tselection, even while hidden via BlzHideOriginFrames - re-hide on selection if needed.",
154296+
"deprecated": {
154297+
"flag": false,
154298+
"message": null
154299+
},
154300+
"configurable": false,
154301+
"members": [],
154302+
"enumMembers": [],
154303+
"line": 103
154304+
},
154305+
{
154306+
"kind": "function",
154307+
"name": "inventoryButton",
154308+
"typeParams": "",
154309+
"receiver": null,
154310+
"signature": "static function inventoryButton(int index) returns string",
154311+
"doc": "Name of an inventory item button, index 0 to 5 (1.32+). Move/hide via these named frames, not\n\t\tORIGIN_FRAME_ITEM_BUTTON (moving the origin frames glitches in 1.32+). NOTE: like command\n\t\tbuttons, they reappear/update on every unit selection.",
154312+
"deprecated": {
154313+
"flag": false,
154314+
"message": null
154315+
},
154316+
"configurable": false,
154317+
"members": [],
154318+
"enumMembers": [],
154319+
"line": 268
154320+
}
154321+
],
154546154322
"enumMembers": [],
154547154323
"line": 58
154548154324
},
@@ -154560,7 +154336,7 @@
154560154336
"configurable": false,
154561154337
"members": [],
154562154338
"enumMembers": [],
154563-
"line": 476
154339+
"line": 525
154564154340
}
154565154341
]
154566154342
},

_doc/stdlib/ref/_wurst/FramehandleNames.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,18 @@ public class FramehandleDefaultNames
3333
These default frames can be obtained with getFrameByName(..) [BlzGetFrameByName]
3434
(the createContext (subframe-id) parameter is by default 0, some frames does contain subframes)
3535

36+
**Members:**
37+
38+
- `static function commandButton(int index) returns string`
39+
Name of a command card button, index 0 to 11 (1.32+): 0 is the top-left (0,0) button, 11 the
40+
bottom-right (3,2). Move/hide via these named frames, not ORIGIN_FRAME_COMMAND_BUTTON (moving
41+
the origin frames glitches in 1.32+). NOTE: command buttons reappear/update on every unit
42+
selection, even while hidden via BlzHideOriginFrames - re-hide on selection if needed.
43+
- `static function inventoryButton(int index) returns string`
44+
Name of an inventory item button, index 0 to 5 (1.32+). Move/hide via these named frames, not
45+
ORIGIN_FRAME_ITEM_BUTTON (moving the origin frames glitches in 1.32+). NOTE: like command
46+
buttons, they reappear/update on every unit selection.
47+
3648
### FramehandleNames
3749

3850
```wurst

0 commit comments

Comments
 (0)