-
Notifications
You must be signed in to change notification settings - Fork 21
/
poptracker.lua
684 lines (529 loc) · 24.5 KB
/
poptracker.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
---@meta
--
-- PopTracker API definition file.
-- Do NOT load this into your pack.
-- Read doc/PACKS.md#lua-interface for instructions.
--
---- Helpers ----
---@alias AnyObject JsonItem | LuaItem | LocationSection | Location
---- Globals ----
---Currently running PopTracker version as string "x.y.z".
---@type string
PopVersion = "0.27.1"
-- Actual value comes from the program, not from here, but try to keep in sync with API version here.
---Set to true to get more error or debug output.
---@type boolean
DEBUG = false
---If defined in global scope, called when a game is connected (currently memory interfaces only).
---@type fun():nil
autotracker_started = nil
---If defined in global scope, called when auto-tracking is disabled by the user (currently memory interfaces only).
---@type fun():nil
autotracker_stopped = nil
---- Tracker ----
---@class Tracker
Tracker = {}
---@type string
Tracker.ActiveVariantUID = ""
---load items from json
---@param jsonFilename string file to load, relative to variant folder or root of the pack (will try both)
---@return boolean true on success
function Tracker:AddItems(jsonFilename) end
---load maps from json
---@param jsonFilename string file to load, relative to variant folder or root of the pack (will try both)
---@return boolean true on success
function Tracker:AddMaps(jsonFilename) end
---load locations from json
---@param jsonFilename string file to load, relative to variant folder or root of the pack (will try both)
---@return boolean true on success
function Tracker:AddLocations(jsonFilename) end
---load layouts from json
---@param jsonFilename string file to load, relative to variant folder or root of the pack (will try both)
---@return boolean true on success
function Tracker:AddLayouts(jsonFilename) end
---get provided count for an (item) code
---@param code string the (item) code to look up
---@return integer count of items providing the code or the sum of count for consumables
function Tracker:ProviderCountForCode(code) end
---get item for `code`, location for `@location` or location section for `@location/section`
---@param code string the code to look up
---@return AnyObject? object that matches the code
function Tracker:FindObjectForCode(code) end
---@alias UiHintName
---| "ActivateTab" # Activates tab with tab name = hint value. Available since 0.11.0.
---Sends a hint to the UI, see https://github.com/black-sliver/PopTracker/blob/master/doc/PACKS.md#ui-hints .
---Only available in PopTracker, since 0.11.0.
---@param name UiHintName which adjustment the UI should do
---@param value string value or argument for the hint
---@return nil
function Tracker:UiHint(name, value) end
---pause evaluating logic rules when set to true
---@type boolean
Tracker.BulkUpdate = false
---Allow to evaluate logic rules fewer times than items are updated.
---Only available in PopTracker, since 0.28.1.
---Use as: `if Tracker.AllowDeferredLogicUpdate ~= nil then Tracker.AllowDeferredLogicUpdate = true end`
---@type boolean
Tracker.AllowDeferredLogicUpdate = false
---- ScriptHost ----
---@class ScriptHost
ScriptHost = {}
---Load and execute a Lua script from absolute filename inside pack.
---* sets `...` variable to mod name (for relative require) since 0.25.6
---* require can be used instead since 0.25.6 (0.21.0 in some cases)
--- * `require "foo.baz"` will try `/scripts/foo/baz.lua`, `/scripts/foo/baz/init.lua`,
--- `/foo/baz.lua` and `/foo/baz/init.lua`
--- * LoadScript needs an "absolute" path (including `scripts/`) instead
--- * LoadScript needs to use globals, require can return for `local x = require "foo"`
---* require is recommended if backwards compatibility is not required
---@param luaFilename string file to run, relative to variant folder or root of the pack (will try both)
---@return boolean true on success
function ScriptHost:LoadScript(luaFilename) end
---@alias ThreadProxy table -- to be defined
---Execute a Lua script in a separate thread.
---Arg passed here has to be json serializable and will be made available as global arg to the script.
---Once the script finishes, callback will be called on the next frame in the host context with the return value of the script as argument.
---@param luaFilename string file to run, relative to variant folder or root of the pack (will try both)
---@param arg any passed as global arg to the new script
---@param completePallback fun(result:any):nil called when the script finishes
---@param progressCallback fun(progress:any)? optional, called when the script calls ScriptHost:AsyncProgress
---@return ThreadProxy TBD
function ScriptHost:RunScriptAsync(luaFilename, arg, completePallback, progressCallback) end
---Same as RunScriptAsync, but run string instead of file.
---@see ScriptHost.RunScriptAsync
---@param arg any passed as global arg to the new script
---@param completePallback fun(result:any):nil called when the script finishes
---@param progressCallback fun(progress:any)? optional, called when the script calls ScriptHost:AsyncProgress
---@return ThreadProxy TBD
function ScriptHost:RunStringAsync(script, arg, completePallback, progressCallback) end
---Queue call to main Lua's progressCallback with arg on next frame. Can only be used in async context/thread.
---@param arg any passed to progressCallback, has to be json serializable
function ScriptHost:AsyncProgress(arg) end
---add a memory watch for auto-tracking, see [AUTOTRACKING.md](https://github.com/black-sliver/PopTracker/blob/master/doc/AUTOTRACKING.md)
---@param name string identifier/name of this watch
---@param addr integer start address of memory block to watch
---@param len integer length of memory block to watch in bytes
---@param callback fun(segment:Segment):nil called when watched memory changes
---@param interval integer? milliseconds
---@return string reference for RemoveMemoryWatch
function ScriptHost:AddMemoryWatch(name, addr, len, callback, interval) end
---remove memory watch by name/reference, available since 0.11.0
---@param name string
---@return boolean true on success
function ScriptHost:RemoveMemoryWatch(name) end
---callback(code) will be called whenever an item changed state that canProvide(code).
---Only available in PopTracker, since 0.11.0,
---@param name string identifier/name of this watch
---@param code string Code to watch for. Use `"*"` for *all* codes since 0.25.5.
---@param callback fun(code:string):nil called when warched (item) code changes
---@return string reference for RemoveWatchForCode since 0.18.2
function ScriptHost:AddWatchForCode(name, code, callback) end
---remove watch for code by name/reference, available since 0.18.2
---@param name string
---@return boolean true on success
function ScriptHost:RemoveWatchForCode(name) end
---callback(store, {variableName, ...}) will be called whenever a remote variable changes.
---See [AUTOTRACKING.md](https://github.com/black-sliver/PopTracker/blob/master/doc/AUTOTRACKING.md#variable-interface-uat)
-- and [UAT REDME.md](https://github.com/black-sliver/UAT/blob/master/README.md) for more info.
---@param name string identifier/name of this watch
---@param variables string[] array of variable names
---@param callback fun(store:VariableStore, changedKeysArray:table):nil called when any watched variable changes
---@param interval integer? optional, currently unused
---@return string reference for RemoveVariableWatch since 0.18.2
function ScriptHost:AddVariableWatch(name, variables, callback, interval) end
---remove variable watch by name/reference
---@param name string
---@returns boolean true on success
function ScriptHost:RemoveVariableWatch(name) end
---create a new LuaItem
---@return LuaItem
function ScriptHost:CreateLuaItem() end
---Add a handler/callback that runs on every frame.
---Available since 0.25.9.
---@param name string identifier/name of this callback
---@param callback fun(elapsedSeconds:number):nil called every frame, argument is elapsed time in seconds since last call
---@return string reference for RemoveOnFrameHandler
function ScriptHost:AddOnFrameHandler(name, callback) end
---Remove a handler/callback added by AddOnFrameHandler(name).
---Available since 0.25.9.
---@param name string identifier/name of the handler to remove
---@return boolean true on success
function ScriptHost:RemoveOnFrameHandler(name) end
---Add a handler/callback that runs when a location section changed (checks checked/unchecked).
---Any kind of filtering and detection what changed has to be done inside the callback.
---Available since 0.26.2.
---@param name string identifier/name of this callback
---@param callback fun(section:LocationSection):nil called when any location section changed
---@return string reference for RemoveOnLocationSectionChangedHandler
function ScriptHost:AddOnLocationSectionChangedHandler(name, callback) end
---Remove a handler/callback added by RemoveOnLocationSectionChangedHandler.
---Available since 0.26.2.
---@param name string identifier/name of the handler to remove
---@return boolean true on success
function ScriptHost:RemoveOnLocationSectionChangedHandler(name) end
---- AutoTracker ----
---@class AutoTracker
AutoTracker = {}
---read 8bit unsigned integer, may return 0 if not yet cached
---@param baseAddr integer address to read
---@param offset integer? added to baseAddr to get the final address
---@return integer value at address
function AutoTracker:ReadU8(baseAddr, offset) end
---read 16bit unsigned integer, may return 0 if not yet cached
---@param baseAddr integer address to read
---@param offset integer? added to baseAddr to get the final address
---@return integer value at address
function AutoTracker:ReadU16(baseAddr, offset) end
---read 24bit unsigned integer, may return 0 if not yet cached
---@param baseAddr integer address to read
---@param offset integer? added to baseAddr to get the final address
---@return integer value at address
function AutoTracker:ReadU24(baseAddr, offset) end
---read 32bit unsigned integer, may return 0 if not yet cached
---@param baseAddr integer address to read
---@param offset integer? added to baseAddr to get the final address
---@return integer value at address
function AutoTracker:ReadU32(baseAddr, offset) end
---currently an empty table for compatibility
---@type table
AutoTracker.SelectedConnectorType = {}
---Returns what the remote (UAT) sent for the variableName.<br/>
---**This is deprecated** and it's recommended to use `store:ReadVariable` in a callback instead.
---Use `if ScriptHost.AddVariableWatch then` to detect if UAT is available in this version of PopTracker.
---@deprecated
---@param variableName string
---@return any value of variable or nil
function AutoTracker:ReadVariable(variableName) end
---@alias AutoTrackingBackendName "SNES" | "UAT" | "AP"
---@alias AutoTrackingState
---| -1 # Unavailable
---| 0 # Disabled
---| 1 # Disconnected
---| 2 # Socket Connected (not ready)
---| 3 # Game/Console connected (ready)
---get an integer corresponding to the current state of an auto-tracking backend.
-- Available since 0.20.2.
---@param backendName AutoTrackingBackendName name of the backend (case sensitive)
---@return AutoTrackingState state of the backend
function AutoTracker:GetConnectionState(backendName) end
---- Segment ---
---NOTE: the segment API is provided by `AutoTracker`, but this is not backwards compatible.
-- `ReadU8` should only be used on global AutoTracker and `ReadUInt8` on segment from watch callback.
---@class Segment
Segment = {}
---read 8bit unsigned integer, may return 0 if used on AutoTracker instead of Segment
---@param address integer (absolute) address to read
---@return integer value at address
function Segment:ReadUInt8(address) end
---read 16bit unsigned integer, may return 0 if used on AutoTracker instead of Segment
---@param address integer (absolute) address to read
---@return integer value at address
function Segment:ReadUInt16(address) end
---read 24bit unsigned integer, may return 0 if used on AutoTracker instead of Segment
---@param address integer (absolute) address to read
---@return integer value at address
function Segment:ReadUInt24(address) end
---read 32bit unsigned integer, may return 0 if used on AutoTracker instead of Segment
---@param address integer (absolute) address to read
---@return integer value at address
function Segment:ReadUInt32(address) end
---- VariableStore ----
---NOTE: the store API is provided by `AutoTracker`, but this may change in the future.
---@class VariableStore
VariableStore = {}
---Returns what the remote (UAT) sent for the variableName.
---@param variableName string
---@return any value of variable or nil
function VariableStore:ReadVariable(variableName) end
---- Archipelago ----
---@class Archipelago
Archipelago = {}
---@enum archipelagoCientStatus
Archipelago.ClientStatus = {
UNKNOWN = 0,
READY = 10,
PLAYING = 20,
GOAL = 30,
}
---The slot number of the connected player or -1 if not connected.
---@type integer
Archipelago.PlayerNumber = -1
---The team number of the connected player, -1 if not connected or `nil` if unsupported.
---Supported since 0.25.2.
---@type integer
Archipelago.TeamNumber = -1
---Array of already checked location IDs or `nil` if unsupported.
---Supported since 0.25.2.
---@type integer[]
Archipelago.CheckedLocations = {}
---Array of unchecked/missing location IDs or `nil` if unsupported.
---Supported since 0.25.2.
---@type integer[]
Archipelago.MissingLocations = {}
---Add callback to be called when connecting to a (new) server and state should be cleared.
---@param name string identifier/name of this handler (for debugging)
---@param callback fun(slotData:{ [string]: any }):nil
---@return boolean true on success
function Archipelago:AddClearHandler(name, callback) end
---Add callback to be called when called when an item is received.
---(player_number not in callback before 0.20.2)
---@param name string identifier/name of this handler (for debugging)
---@param callback fun(index:integer, itemID:integer, itemName:string, playerNumber:integer):nil
---@return boolean true on success
function Archipelago:AddItemHandler(name, callback) end
---Add callback to be called when a location was checked.
---@param name string identifier/name of this handler (for debugging)
---@param callback fun(locationID:integer, locationName:string):nil
---@return boolean true on success
function Archipelago:AddLocationHandler(name, callback) end
---Add callback to be called when a location was scouted.
---@param name string identifier/name of this handler (for debugging)
---@param callback fun(locationID:integer, locationName:string, itemID:integer, itemName:string, itemPlayer:integer):nil
---@return boolean true on success
function Archipelago:AddScoutHandler(name, callback) end
---Add callback to be called when the server sends a bounce.
---@param name string identifier/name of this handler (for debugging)
---@param callback fun(message:{ [string]: any }):nil called when receiving a bounce
---@return boolean true on success
function Archipelago:AddBouncedHandler(name, callback) end
---Add callback to be called when the server replies to Get.
---@param name string identifier/name of this handler (for debugging)
---@param callback fun(key:string, value:any):nil
---@return boolean true on success
function Archipelago:AddRetrievedHandler(name, callback) end
---Add callback to be called when a watched data storage value is changed.
---@param name string identifier/name of this handler (for debugging)
---@param callback fun(key:string, value:any, oldValue:any):nil
---@return boolean true on success
function Archipelago:AddSetReplyHandler(name, callback) end
---Ask the server for values from data storage, run this from a ClearHandler, keys is an array of strings.
---@param keys string[] keys to get
---@return boolean true on success
function Archipelago:Get(keys) end
---Ask the server to notify when a data storage value is changed.
---Run this from a ClearHandler, keys is an array of strings.
---@param keys string[] keys to watch
---@return boolean true on success
function Archipelago:SetNotify(keys) end
---Send locations as checked to the server.
---Supported since 0.26.2, only allowed if "apmanual" flag is set in manifest.
---@param locations integer[] locations to check
---@return boolean true on success
function Archipelago:LocationChecks(locations) end
---Send locations as scouted to the server.
---Supported since 0.26.2, only allowed if "apmanual" or "aphintgame" flag is set in manifest.
---@param locations integer[]
---@param sendAsHint integer
---@return boolean true on success
function Archipelago:LocationScouts(locations, sendAsHint) end
---Send client status to the server. This is used to send the goal / win condition.
---Supported since 0.27.1, only allowed if "apmanual" flag is set in manifest.
---@param status archipelagoCientStatus
---@return boolean true on success
function Archipelago:StatusUpdate(status) end
---Get alias/name of a player.
---Supported since 0.28.1.
---@param slot integer
---@return string alias of the player or "Unknown" if not found
function Archipelago:GetPlayerAlias(slot) end
---Get game name of a player.
---Supported since 0.28.1.
---@param slot integer
---@return string name of the game or "Unknown" if not found
function Archipelago:GetPlayerGame(slot) end
---Get item name for a specific game.
---Supported since 0.28.1.
---@param id integer item id
---@param game string name of the game
---@return string name of the item or "Unknown" if not found
function Archipelago:GetItemName(id, game) end
---Get item name for a specific game.
---Supported since 0.28.1.
---@param id integer item id
---@param game string name of the game
---@return string name of the location or "Unknown" if not found
function Archipelago:GetLocationName(id, game) end
---- ImageRef ----
---reference to a single image (currently a string)
---@class ImageRef
ImageRef = {}
---- ImageReference ----
---utility to create `ImageRef`s
---@class ImageReference
ImageReference = {}
---Create an image reference from filename.
---Note: currently path resultion happens when the ImageRef is being used, so there is no way to detect errors.
---@param filename string
---@return ImageRef reference to the image for filename
function ImageReference:FromPackRelativePath(filename) end
---Create an image reference with mods applied on top of another image reference.
---@param original ImageRef the base image
---@param mod string Mod(s) to apply. Separate with ',' for multiple.
---@return ImageRef reference to the new image
function ImageReference:FromImageReference(original, mod) end
---- AccessibilityLevel (enum) ----
---@enum accessibilityLevel
AccessibilityLevel = {
None = 0,
Partial = 1,
Inspect = 3,
SequenceBreak = 5,
Normal = 6,
Cleared = 7,
}
---- LuaItem ----
---@class LuaItem
LuaItem = {}
---Name of the item, displayed in tooltip.
---@type string
LuaItem.Name = ""
---Get or set the item's image. Use `ImageReference:FromPackRelativePath` to create an `ImageRef`.
---@type ImageRef?
LuaItem.Icon = nil
---Optional container to store item's state. Keys have to be string for `:Get` and `:Set` to work.
---@type table?
LuaItem.ItemState = nil
---At the moment (since 0.18.2) an empty table for compatibility reasons.
---@type table
LuaItem.Owner = {}
---Type of the item (since 0.23.0). Always "custom" for LuaItem.
---@type string
LuaItem.Type = "custom"
---Called to match item to code (to place it in layouts).
---Note: LuaItems have to be created before the corresponding layout is loaded.
---@type fun(self:LuaItem, code:string):boolean
LuaItem.CanProvideCodeFunc = nil
---Called to check if item provides code for access rules (ProviderCountForCode).
---@type fun(self:LuaItem, code:string):boolean
LuaItem.ProvidesCodeFunc = nil
---Called to change item's stage to provide code (not in use yet).
---@type fun(self:LuaItem, code:string)
LuaItem.AdvanceToCodeFunc = nil
---Called when item is left-clicked.
---@type fun(self:LuaItem):nil
LuaItem.OnLeftClickFunc = nil
---Called when item is right-clicked.
---@type fun(self:LuaItem):nil
LuaItem.OnRightClickFunc = nil
---Called when item is middle-clicked.
---PopTracker, since 0.25.8.
---@type fun(self:LuaItem):nil
LuaItem.OnMiddleClickFunc = nil
---Called when saving. Should return a Lua object that works in `LoadFunc`.
---@type fun(self:LuaItem):any
LuaItem.SaveFunc = nil
---Callend when loading, data as returned by `SaveFunc`.
---@type fun(self:LuaItem, data:any):nil
LuaItem.LoadFunc = nil
---Called when :Set was called and the value changed.
---Can be used to update `.Icon`, etc. from `.ItemState` or `:Get()`.
---@type fun(self:LuaItem, key:string, value:any):nil
LuaItem.PropertyChangedFunc = nil
---Write to property store. If the value changed, this will call `.PropertyChangedFunc`.
---NOTE: if `.ItemState` is set, that is the property store, otherwise there is an automatic one.
---@param key string
---@param value any
function LuaItem:Set(key, value) end
---Read from property store.
---NOTE: if `.ItemState` is set, that is the property store and you can use `.ItemState` directly instead.
---@param key string
---@return any value
function LuaItem:Get(key) end
---Set item overlay text (like count, but also for non-consumables).
---Only available in PopTracker.
---@param text string
function LuaItem:SetOverlay(text) end
---Set item overlay background color (default transparent).
---PopTracker, since 0.17.0.
---@param background string "#rgb", "#rrggbb", "#argb", "#aarrggbb" or "" (transparent)
function LuaItem:SetOverlayBackground(background) end
---Set font size for item overlay text in ~pixels.
---PopTracker, since 0.17.2
---@param fontSize integer
function LuaItem:SetOverlayFontSize(fontSize) end
---@alias HAlign "left" | "center" | "right"
---Set item overlay text alignment (default right).
---PopTracker, since 0.25.9
---@param align HAlign "horizontal alignment of overlay text"
function LuaItem:SetOverlayAlign(align) end
---- JsonItem ----
---@class JsonItem
JsonItem = {}
---Get or set the item's image. Use `ImageReference:FromPackRelativePath` to create an `ImageRef`.
---For performance reasons, using a staged item is recommended.
-- Available since 0.26.0. Changed to include mods and reset on change in 0.26.2.
---@type ImageRef?
JsonItem.Icon = nil
---Enable/disable item
---@type boolean
JsonItem.Active = false
---Set/get stage for staged items.
---@type integer
JsonItem.CurrentStage = 0
---Set/get current amount for consumables.
---@type integer
JsonItem.AcquiredCount = 0
---Set/get min amount for consumables.
---Available since 0.21.0.
---@type integer
JsonItem.MinCount = 0
---Set/get max amount for consumables.
---Available since 0.14.0.
---@type integer
JsonItem.MaxCount = 0
---Set/get the increment (left-click) value of consumables.
---@type integer
JsonItem.Increment = 1
---Set/get the decrement (right-click) value of consumables.
JsonItem.Decrement = 1
---At the moment (since 0.18.2) an empty table for compatibility reasons.
---@type table
JsonItem.Owner = {}
---Gets the type of the item as string ("toggle, ...").
---Available since 0.23.0.
JsonItem.Type = ""
---Disables state/stage changes when clicking the item.
---Available since 0.26.2.
---@type boolean
JsonItem.IgnoreUserInput = false
---Set item overlay text (like count, but also for non-consumables).
---Only available in PopTracker.
---@param text string
function JsonItem:SetOverlay(text) end
---Set item overlay background color (default transparent).
---PopTracker, since 0.17.0.
---@param background string "#rgb", "#rrggbb", "#argb", "#aarrggbb" or "" (transparent)
function JsonItem:SetOverlayBackground(background) end
---Set font size for item overlay text in ~pixels.
---PopTracker, since 0.17.2
---@param fontSize integer
function JsonItem:SetOverlayFontSize(fontSize) end
---Set item overlay text / consumable amount alignment (default right).
---PopTracker, since 0.25.9
---@param align HAlign "horizontal alignment of overlay text"
function JsonItem:SetOverlayAlign(align) end
---- Location ----
---@class Location
Location = {}
---Read-only, giving one of the `AccssibilityLevel` constants (will not give CLEARED at the moment).
---Available since 0.25.5.
---@type accessibilityLevel
Location.AccessibilityLevel = 0
---- LocationSection ----
---@class LocationSection
LocationSection = {}
---Is an empty table at the moment for compatibility reasons.
---@type table
LocationSection.Owner = {}
---Read-only, total number of Chests in the section.
---@type integer
LocationSection.ChestCount = 1
---Read/write how many chests are NOT checked/opened.
---@type integer
LocationSection.AvailableChestCount = 1
---Read-only, giving one of the `AccessibilityLevel` constants.
---@type accessibilityLevel
LocationSection.AccessibilityLevel = 0
---Read-only, returning the full id as string such as "Location/Section"
---@type string
LocationSection.FullID = ""