isaacscript-common 33.14.0 → 33.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/isaacscript-common.lua +120 -56
- package/dist/lualib_bundle.lua +9 -0
- package/dist/src/classes/features/other/extraConsoleCommands/commands.d.ts +76 -2
- package/dist/src/classes/features/other/extraConsoleCommands/commands.d.ts.map +1 -1
- package/dist/src/classes/features/other/extraConsoleCommands/commands.lua +165 -56
- package/package.json +1 -1
- package/src/classes/features/other/extraConsoleCommands/commands.ts +155 -19
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 33.
|
|
3
|
+
isaacscript-common 33.15.0
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -49,6 +49,14 @@ local function require(file, ...)
|
|
|
49
49
|
end
|
|
50
50
|
____modules = {
|
|
51
51
|
["lualib_bundle"] = function(...)
|
|
52
|
+
local function __TS__ArrayAt(self, relativeIndex)
|
|
53
|
+
local absoluteIndex = relativeIndex < 0 and #self + relativeIndex or relativeIndex
|
|
54
|
+
if absoluteIndex >= 0 and absoluteIndex < #self then
|
|
55
|
+
return self[absoluteIndex + 1]
|
|
56
|
+
end
|
|
57
|
+
return nil
|
|
58
|
+
end
|
|
59
|
+
|
|
52
60
|
local function __TS__ArrayIsArray(value)
|
|
53
61
|
return type(value) == "table" and (value[1] ~= nil or next(value) == nil)
|
|
54
62
|
end
|
|
@@ -2524,6 +2532,7 @@ local function __TS__UsingAsync(self, cb, ...)
|
|
|
2524
2532
|
end
|
|
2525
2533
|
|
|
2526
2534
|
return {
|
|
2535
|
+
__TS__ArrayAt = __TS__ArrayAt,
|
|
2527
2536
|
__TS__ArrayConcat = __TS__ArrayConcat,
|
|
2528
2537
|
__TS__ArrayEntries = __TS__ArrayEntries,
|
|
2529
2538
|
__TS__ArrayEvery = __TS__ArrayEvery,
|
|
@@ -49725,6 +49734,84 @@ function ____exports.sound(self, params)
|
|
|
49725
49734
|
end
|
|
49726
49735
|
sfxManager:Play(soundEffect)
|
|
49727
49736
|
end
|
|
49737
|
+
function ____exports.spawnCollectible(self, params)
|
|
49738
|
+
if params == "" then
|
|
49739
|
+
print("You must specify the collectible name or the number corresponding to the collectible type.")
|
|
49740
|
+
return
|
|
49741
|
+
end
|
|
49742
|
+
local collectibleTypeNumber = tonumber(params)
|
|
49743
|
+
local collectibleType
|
|
49744
|
+
if collectibleTypeNumber == nil then
|
|
49745
|
+
local match = getMapPartialMatch(nil, params, COLLECTIBLE_NAME_TO_TYPE_MAP)
|
|
49746
|
+
if match == nil then
|
|
49747
|
+
print("Unknown collectible: " .. params)
|
|
49748
|
+
return
|
|
49749
|
+
end
|
|
49750
|
+
collectibleType = match[2]
|
|
49751
|
+
else
|
|
49752
|
+
collectibleType = asCollectibleType(nil, collectibleTypeNumber)
|
|
49753
|
+
end
|
|
49754
|
+
local roomClass = game:GetRoom()
|
|
49755
|
+
local centerPos = roomClass:GetCenterPos()
|
|
49756
|
+
spawnCollectibleUnsafe(nil, collectibleType, centerPos)
|
|
49757
|
+
end
|
|
49758
|
+
function ____exports.spawnGoldenTrinket(self, params)
|
|
49759
|
+
____exports.spawnTrinket(nil, params, true)
|
|
49760
|
+
end
|
|
49761
|
+
function ____exports.spawnTrinket(self, params, golden)
|
|
49762
|
+
if golden == nil then
|
|
49763
|
+
golden = false
|
|
49764
|
+
end
|
|
49765
|
+
if params == "" then
|
|
49766
|
+
print("You must specify the name or number corresponding to the trinket type.")
|
|
49767
|
+
return
|
|
49768
|
+
end
|
|
49769
|
+
local trinketTypeNumber = tonumber(params)
|
|
49770
|
+
local trinketType
|
|
49771
|
+
if trinketTypeNumber == nil then
|
|
49772
|
+
local match = getMapPartialMatch(nil, params, TRINKET_NAME_TO_TYPE_MAP)
|
|
49773
|
+
if match == nil then
|
|
49774
|
+
print("Unknown trinket: " .. params)
|
|
49775
|
+
return
|
|
49776
|
+
end
|
|
49777
|
+
trinketType = match[2]
|
|
49778
|
+
else
|
|
49779
|
+
trinketType = asTrinketType(nil, trinketTypeNumber)
|
|
49780
|
+
end
|
|
49781
|
+
local roomClass = game:GetRoom()
|
|
49782
|
+
local centerPos = roomClass:GetCenterPos()
|
|
49783
|
+
local goldenTrinketType = getGoldenTrinketType(nil, trinketType)
|
|
49784
|
+
local trinketTypeToSpawn = golden and goldenTrinketType or trinketType
|
|
49785
|
+
spawnTrinketFunction(nil, trinketTypeToSpawn, centerPos)
|
|
49786
|
+
end
|
|
49787
|
+
function ____exports.spawnTrinketAt(self, params, golden)
|
|
49788
|
+
if golden == nil then
|
|
49789
|
+
golden = false
|
|
49790
|
+
end
|
|
49791
|
+
if params == "" then
|
|
49792
|
+
print("You must specify the number corresponding to the trinket type and the number corresponding to the grid tile location.")
|
|
49793
|
+
return
|
|
49794
|
+
end
|
|
49795
|
+
local args = __TS__StringSplit(params, " ")
|
|
49796
|
+
if #args ~= 2 then
|
|
49797
|
+
print("You must specify the number corresponding to the trinket type and the number corresponding to the grid tile location.")
|
|
49798
|
+
return
|
|
49799
|
+
end
|
|
49800
|
+
local trinketTypeNumber = tonumber(args[1])
|
|
49801
|
+
if trinketTypeNumber == nil or trinketTypeNumber < 0 then
|
|
49802
|
+
print("Failed to parse the trinket type of: " .. tostring(args[1]))
|
|
49803
|
+
return
|
|
49804
|
+
end
|
|
49805
|
+
local gridIndex = tonumber(args[2])
|
|
49806
|
+
if gridIndex == nil or gridIndex < 0 then
|
|
49807
|
+
print("Failed to parse the grid index of: " .. tostring(args[2]))
|
|
49808
|
+
return
|
|
49809
|
+
end
|
|
49810
|
+
local trinketType = asTrinketType(nil, trinketTypeNumber)
|
|
49811
|
+
local goldenTrinketType = getGoldenTrinketType(nil, trinketType)
|
|
49812
|
+
local trinketTypeToSpawn = golden and goldenTrinketType or trinketType
|
|
49813
|
+
spawnTrinketFunction(nil, trinketTypeToSpawn, gridIndex)
|
|
49814
|
+
end
|
|
49728
49815
|
function ____exports.startingRoom(self)
|
|
49729
49816
|
local level = game:GetLevel()
|
|
49730
49817
|
local startingRoomIndex = level:GetStartingRoomIndex()
|
|
@@ -49960,6 +50047,9 @@ function ____exports.coins(self, params)
|
|
|
49960
50047
|
local player = Isaac.GetPlayer()
|
|
49961
50048
|
player:AddCoins(numCoins)
|
|
49962
50049
|
end
|
|
50050
|
+
function ____exports.collectible(self, params)
|
|
50051
|
+
____exports.spawnCollectible(nil, params)
|
|
50052
|
+
end
|
|
49963
50053
|
function ____exports.crawlSpace(self)
|
|
49964
50054
|
spawnTrapdoorOrCrawlSpace(nil, false)
|
|
49965
50055
|
end
|
|
@@ -50107,6 +50197,12 @@ end
|
|
|
50107
50197
|
function ____exports.goldKey(self)
|
|
50108
50198
|
____exports.goldenKey(nil)
|
|
50109
50199
|
end
|
|
50200
|
+
function ____exports.goldTrinket(self, params)
|
|
50201
|
+
____exports.spawnGoldenTrinket(nil, params)
|
|
50202
|
+
end
|
|
50203
|
+
function ____exports.goldenTrinket(self, params)
|
|
50204
|
+
____exports.spawnGoldenTrinket(nil, params)
|
|
50205
|
+
end
|
|
50110
50206
|
function ____exports.grid(self)
|
|
50111
50207
|
Isaac.ExecuteCommand("debug 11")
|
|
50112
50208
|
end
|
|
@@ -50482,69 +50578,34 @@ function ____exports.spam(self)
|
|
|
50482
50578
|
v.persistent.spamBloodRights = not v.persistent.spamBloodRights
|
|
50483
50579
|
printEnabled(nil, v.persistent.spamBloodRights, "spamming Blood Rights")
|
|
50484
50580
|
end
|
|
50485
|
-
function ____exports.
|
|
50581
|
+
function ____exports.spawnCollectibleAt(self, params)
|
|
50486
50582
|
if params == "" then
|
|
50487
|
-
print("You must specify the
|
|
50583
|
+
print("You must specify the number corresponding to the collectible type and the number corresponding to the grid tile location.")
|
|
50488
50584
|
return
|
|
50489
50585
|
end
|
|
50490
|
-
local
|
|
50491
|
-
|
|
50492
|
-
|
|
50493
|
-
local match = getMapPartialMatch(nil, params, COLLECTIBLE_NAME_TO_TYPE_MAP)
|
|
50494
|
-
if match == nil then
|
|
50495
|
-
print("Unknown collectible: " .. params)
|
|
50496
|
-
return
|
|
50497
|
-
end
|
|
50498
|
-
collectibleType = match[2]
|
|
50499
|
-
else
|
|
50500
|
-
collectibleType = asCollectibleType(nil, collectibleTypeNumber)
|
|
50501
|
-
end
|
|
50502
|
-
local roomClass = game:GetRoom()
|
|
50503
|
-
local centerPos = roomClass:GetCenterPos()
|
|
50504
|
-
spawnCollectibleUnsafe(nil, collectibleType, centerPos)
|
|
50505
|
-
end
|
|
50506
|
-
function ____exports.spawnGoldenTrinket(self, params)
|
|
50507
|
-
if params == "" then
|
|
50508
|
-
print("You must specify the name or number corresponding to the trinket type.")
|
|
50586
|
+
local args = __TS__StringSplit(params, " ")
|
|
50587
|
+
if #args ~= 2 then
|
|
50588
|
+
print("You must specify the number corresponding to the collectible type and the number corresponding to the grid tile location.")
|
|
50509
50589
|
return
|
|
50510
50590
|
end
|
|
50511
|
-
local
|
|
50512
|
-
|
|
50513
|
-
|
|
50514
|
-
local match = getMapPartialMatch(nil, params, TRINKET_NAME_TO_TYPE_MAP)
|
|
50515
|
-
if match == nil then
|
|
50516
|
-
print("Unknown trinket: " .. params)
|
|
50517
|
-
return
|
|
50518
|
-
end
|
|
50519
|
-
trinketType = match[2]
|
|
50520
|
-
else
|
|
50521
|
-
trinketType = asTrinketType(nil, trinketTypeNumber)
|
|
50522
|
-
end
|
|
50523
|
-
local roomClass = game:GetRoom()
|
|
50524
|
-
local centerPos = roomClass:GetCenterPos()
|
|
50525
|
-
local goldenTrinketType = getGoldenTrinketType(nil, trinketType)
|
|
50526
|
-
spawnTrinketFunction(nil, goldenTrinketType, centerPos)
|
|
50527
|
-
end
|
|
50528
|
-
function ____exports.spawnTrinket(self, params)
|
|
50529
|
-
if params == "" then
|
|
50530
|
-
print("You must specify the name or number corresponding to the trinket type.")
|
|
50591
|
+
local collectibleTypeNumber = tonumber(args[1])
|
|
50592
|
+
if collectibleTypeNumber == nil or collectibleTypeNumber < 0 then
|
|
50593
|
+
print("Failed to parse the collectible type of: " .. tostring(args[1]))
|
|
50531
50594
|
return
|
|
50532
50595
|
end
|
|
50533
|
-
local
|
|
50534
|
-
|
|
50535
|
-
|
|
50536
|
-
|
|
50537
|
-
if match == nil then
|
|
50538
|
-
print("Unknown trinket: " .. params)
|
|
50539
|
-
return
|
|
50540
|
-
end
|
|
50541
|
-
trinketType = match[2]
|
|
50542
|
-
else
|
|
50543
|
-
trinketType = asTrinketType(nil, trinketTypeNumber)
|
|
50596
|
+
local gridIndex = tonumber(args[2])
|
|
50597
|
+
if gridIndex == nil or gridIndex < 0 then
|
|
50598
|
+
print("Failed to parse the grid index of: " .. tostring(args[2]))
|
|
50599
|
+
return
|
|
50544
50600
|
end
|
|
50545
|
-
local
|
|
50546
|
-
|
|
50547
|
-
|
|
50601
|
+
local collectibleType = asCollectibleType(nil, collectibleTypeNumber)
|
|
50602
|
+
spawnCollectibleUnsafe(nil, collectibleType, gridIndex)
|
|
50603
|
+
end
|
|
50604
|
+
function ____exports.spawnGoldTrinket(self, params)
|
|
50605
|
+
____exports.spawnGoldenTrinket(nil, params)
|
|
50606
|
+
end
|
|
50607
|
+
function ____exports.spawnGoldenTrinketAt(self, params)
|
|
50608
|
+
____exports.spawnTrinketAt(nil, params, true)
|
|
50548
50609
|
end
|
|
50549
50610
|
function ____exports.speed(self, params)
|
|
50550
50611
|
local player = Isaac.GetPlayer()
|
|
@@ -50599,6 +50660,9 @@ end
|
|
|
50599
50660
|
function ____exports.treasureRoom(self)
|
|
50600
50661
|
warpToRoomType(nil, RoomType.TREASURE)
|
|
50601
50662
|
end
|
|
50663
|
+
function ____exports.trinket(self, params)
|
|
50664
|
+
____exports.spawnTrinket(nil, params)
|
|
50665
|
+
end
|
|
50602
50666
|
function ____exports.ultraSecretRoom(self)
|
|
50603
50667
|
warpToRoomType(nil, RoomType.ULTRA_SECRET)
|
|
50604
50668
|
end
|
package/dist/lualib_bundle.lua
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
local function __TS__ArrayAt(self, relativeIndex)
|
|
2
|
+
local absoluteIndex = relativeIndex < 0 and #self + relativeIndex or relativeIndex
|
|
3
|
+
if absoluteIndex >= 0 and absoluteIndex < #self then
|
|
4
|
+
return self[absoluteIndex + 1]
|
|
5
|
+
end
|
|
6
|
+
return nil
|
|
7
|
+
end
|
|
8
|
+
|
|
1
9
|
local function __TS__ArrayIsArray(value)
|
|
2
10
|
return type(value) == "table" and (value[1] ~= nil or next(value) == nil)
|
|
3
11
|
end
|
|
@@ -2473,6 +2481,7 @@ local function __TS__UsingAsync(self, cb, ...)
|
|
|
2473
2481
|
end
|
|
2474
2482
|
|
|
2475
2483
|
return {
|
|
2484
|
+
__TS__ArrayAt = __TS__ArrayAt,
|
|
2476
2485
|
__TS__ArrayConcat = __TS__ArrayConcat,
|
|
2477
2486
|
__TS__ArrayEntries = __TS__ArrayEntries,
|
|
2478
2487
|
__TS__ArrayEvery = __TS__ArrayEvery,
|
|
@@ -97,6 +97,8 @@ export declare function coin(params: string): void;
|
|
|
97
97
|
* to remove coins.)
|
|
98
98
|
*/
|
|
99
99
|
export declare function coins(params: string): void;
|
|
100
|
+
/** Alias for the "spawnCollectible" command. */
|
|
101
|
+
export declare function collectible(params: string): void;
|
|
100
102
|
/** Creates a crawl space next to the player. */
|
|
101
103
|
export declare function crawlSpace(): void;
|
|
102
104
|
/** Toggles permanent Curse of the Cursed. */
|
|
@@ -165,6 +167,8 @@ export declare function goldBomb(): void;
|
|
|
165
167
|
export declare function goldHearts(params: string): void;
|
|
166
168
|
/** Alias for the "goldenKey" command. */
|
|
167
169
|
export declare function goldKey(): void;
|
|
170
|
+
/** Alias for the "spawnGoldenTrinket" command. */
|
|
171
|
+
export declare function goldTrinket(params: string): void;
|
|
168
172
|
/** Gives the player a golden bomb. */
|
|
169
173
|
export declare function goldenBomb(): void;
|
|
170
174
|
/**
|
|
@@ -174,6 +178,8 @@ export declare function goldenBomb(): void;
|
|
|
174
178
|
export declare function goldenHearts(params: string): void;
|
|
175
179
|
/** Gives the player a golden key. */
|
|
176
180
|
export declare function goldenKey(): void;
|
|
181
|
+
/** Alias for the "spawnGoldenTrinket" command. */
|
|
182
|
+
export declare function goldenTrinket(params: string): void;
|
|
177
183
|
/**
|
|
178
184
|
* Alias for the "debug 11" command. Useful for seeing the coordinates and grid index of each tile
|
|
179
185
|
* in the room.
|
|
@@ -369,10 +375,76 @@ export declare function sounds(): void;
|
|
|
369
375
|
* "debug 10".
|
|
370
376
|
*/
|
|
371
377
|
export declare function spam(): void;
|
|
378
|
+
/**
|
|
379
|
+
* Spawns a collectible in the center of the room. You must specify the collectible name or the
|
|
380
|
+
* number corresponding to the collectible type.
|
|
381
|
+
*
|
|
382
|
+
* For example, all of the following commands would spawn Spoon Bender:
|
|
383
|
+
*
|
|
384
|
+
* ```text
|
|
385
|
+
* spawnCollectible spoon bender
|
|
386
|
+
* spawnCollectible spoon
|
|
387
|
+
* spawnCollectible spo
|
|
388
|
+
* spawnCollectible 3
|
|
389
|
+
* ```
|
|
390
|
+
*/
|
|
372
391
|
export declare function spawnCollectible(params: string): void;
|
|
373
|
-
/**
|
|
392
|
+
/**
|
|
393
|
+
* Spawns a collectible at a specific grid tile location. You must specify the number corresponding
|
|
394
|
+
* to the collectible type and the number corresponding to the grid tile location.
|
|
395
|
+
*
|
|
396
|
+
* For example, this would spawn Spoon Bender in the top-left corner of a 1x1 room:
|
|
397
|
+
*
|
|
398
|
+
* ```text
|
|
399
|
+
* spawnCollectibleAt 3 16
|
|
400
|
+
* ```
|
|
401
|
+
*
|
|
402
|
+
* (You can use the "grid" command to toggle displaying the numerical grid indexes corresponding to
|
|
403
|
+
* a grid tile.)
|
|
404
|
+
*/
|
|
405
|
+
export declare function spawnCollectibleAt(params: string): void;
|
|
406
|
+
/** Alias for the `spawnGoldenTrinket` command. */
|
|
407
|
+
export declare function spawnGoldTrinket(params: string): void;
|
|
408
|
+
/**
|
|
409
|
+
* The same thing as the `spawnTrinket` command but spawns a golden version of the specified
|
|
410
|
+
* trinket.
|
|
411
|
+
*/
|
|
374
412
|
export declare function spawnGoldenTrinket(params: string): void;
|
|
375
|
-
|
|
413
|
+
/**
|
|
414
|
+
* The same thing as the `spawnTrinketAt` command but spawns a golden version of the specified
|
|
415
|
+
* trinket.
|
|
416
|
+
*/
|
|
417
|
+
export declare function spawnGoldenTrinketAt(params: string): void;
|
|
418
|
+
/**
|
|
419
|
+
* Spawns a trinket in the center of the room. You must specify the trinket name or the number
|
|
420
|
+
* corresponding to the trinket type.
|
|
421
|
+
*
|
|
422
|
+
* For example, all of the following commands would spawn the Wiggle Worm trinket:
|
|
423
|
+
*
|
|
424
|
+
* ```text
|
|
425
|
+
* spawnTrinket wiggle worm
|
|
426
|
+
* spawnTrinket wiggle
|
|
427
|
+
* spawnTrinket wig
|
|
428
|
+
* spawnTrinket 10
|
|
429
|
+
* ```
|
|
430
|
+
*
|
|
431
|
+
* Also see the `spawnGoldenTrinket` command.
|
|
432
|
+
*/
|
|
433
|
+
export declare function spawnTrinket(params: string, golden?: boolean): void;
|
|
434
|
+
/**
|
|
435
|
+
* Spawns a trinket at a specific grid tile location. You must specify the number corresponding to
|
|
436
|
+
* the trinket type and the number corresponding to the grid tile location.
|
|
437
|
+
*
|
|
438
|
+
* For example, this would spawn Wiggle Worm in the top-left corner of a 1x1 room:
|
|
439
|
+
*
|
|
440
|
+
* ```text
|
|
441
|
+
* spawnTrinketAt 10 16
|
|
442
|
+
* ```
|
|
443
|
+
*
|
|
444
|
+
* (You can use the "grid" command to toggle displaying the numerical grid indexes corresponding to
|
|
445
|
+
* a grid tile.)
|
|
446
|
+
*/
|
|
447
|
+
export declare function spawnTrinketAt(params: string, golden?: boolean): void;
|
|
376
448
|
/**
|
|
377
449
|
* Toggles a set movement speed and flight for the player. You can provide an optional argument to
|
|
378
450
|
* this command in order to set the speed to a specific amount. Default is 2.0 (which is the maximum
|
|
@@ -399,6 +471,8 @@ export declare function tests(): void;
|
|
|
399
471
|
export declare function trapdoor(): void;
|
|
400
472
|
/** Warps to the first Treasure Room on the floor. */
|
|
401
473
|
export declare function treasureRoom(): void;
|
|
474
|
+
/** Alias for the "spawnTrinket" command. */
|
|
475
|
+
export declare function trinket(params: string): void;
|
|
402
476
|
/** Warps to the first Ultra Secret Room on the floor. */
|
|
403
477
|
export declare function ultraSecretRoom(): void;
|
|
404
478
|
/** Toggles permanent Curse of the Unknown. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../../../../src/classes/features/other/extraConsoleCommands/commands.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../../../../src/classes/features/other/extraConsoleCommands/commands.ts"],"names":[],"mappings":"AAoJA;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CA2C/C;AAED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,IAAI,CAEhC;AAED,gEAAgE;AAChE,wBAAgB,MAAM,IAAI,IAAI,CAK7B;AAED,sEAAsE;AACtE,wBAAgB,OAAO,IAAI,IAAI,CAkB9B;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEhD;AAED,+CAA+C;AAC/C,wBAAgB,WAAW,IAAI,IAAI,CAElC;AAED,4CAA4C;AAC5C,wBAAgB,KAAK,IAAI,IAAI,CAG5B;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAcjD;AAED,2CAA2C;AAC3C,wBAAgB,EAAE,IAAI,IAAI,CAEzB;AAED;;;GAGG;AACH,wBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAczC;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CA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B,MAAM,IAAI,IAAI,CAM7B;AAED,4CAA4C;AAC5C,wBAAgB,SAAS,IAAI,IAAI,CAEhC;AAED,+CAA+C;AAC/C,wBAAgB,YAAY,IAAI,IAAI,CAInC;AAED,yDAAyD;AACzD,wBAAgB,eAAe,IAAI,IAAI,CAEtC;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAkB1C;AAED,wCAAwC;AACxC,wBAAgB,KAAK,IAAI,IAAI,CAE5B;AAED,6CAA6C;AAC7C,wBAAgB,QAAQ,IAAI,IAAI,CAE/B;AAED,qDAAqD;AACrD,wBAAgB,YAAY,IAAI,IAAI,CAEnC;AAED,4CAA4C;AAC5C,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAE5C;AAED,yDAAyD;AACzD,wBAAgB,eAAe,IAAI,IAAI,CAEtC;AAED,8CAA8C;AAC9C,wBAAgB,OAAO,IAAI,IAAI,CAG9B;AAED,sFAAsF;AACtF,wBAAgB,MAAM,IAAI,IAAI,CAQ7B;AAED,wFAAwF;AACxF,wBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEvC;AAED;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CA0BzC"}
|
|
@@ -202,6 +202,121 @@ function ____exports.sound(self, params)
|
|
|
202
202
|
end
|
|
203
203
|
sfxManager:Play(soundEffect)
|
|
204
204
|
end
|
|
205
|
+
--- Spawns a collectible in the center of the room. You must specify the collectible name or the
|
|
206
|
+
-- number corresponding to the collectible type.
|
|
207
|
+
--
|
|
208
|
+
-- For example, all of the following commands would spawn Spoon Bender:
|
|
209
|
+
--
|
|
210
|
+
-- ```text
|
|
211
|
+
-- spawnCollectible spoon bender
|
|
212
|
+
-- spawnCollectible spoon
|
|
213
|
+
-- spawnCollectible spo
|
|
214
|
+
-- spawnCollectible 3
|
|
215
|
+
-- ```
|
|
216
|
+
function ____exports.spawnCollectible(self, params)
|
|
217
|
+
if params == "" then
|
|
218
|
+
print("You must specify the collectible name or the number corresponding to the collectible type.")
|
|
219
|
+
return
|
|
220
|
+
end
|
|
221
|
+
local collectibleTypeNumber = tonumber(params)
|
|
222
|
+
local collectibleType
|
|
223
|
+
if collectibleTypeNumber == nil then
|
|
224
|
+
local match = getMapPartialMatch(nil, params, COLLECTIBLE_NAME_TO_TYPE_MAP)
|
|
225
|
+
if match == nil then
|
|
226
|
+
print("Unknown collectible: " .. params)
|
|
227
|
+
return
|
|
228
|
+
end
|
|
229
|
+
collectibleType = match[2]
|
|
230
|
+
else
|
|
231
|
+
collectibleType = asCollectibleType(nil, collectibleTypeNumber)
|
|
232
|
+
end
|
|
233
|
+
local roomClass = game:GetRoom()
|
|
234
|
+
local centerPos = roomClass:GetCenterPos()
|
|
235
|
+
spawnCollectibleUnsafe(nil, collectibleType, centerPos)
|
|
236
|
+
end
|
|
237
|
+
--- The same thing as the `spawnTrinket` command but spawns a golden version of the specified
|
|
238
|
+
-- trinket.
|
|
239
|
+
function ____exports.spawnGoldenTrinket(self, params)
|
|
240
|
+
____exports.spawnTrinket(nil, params, true)
|
|
241
|
+
end
|
|
242
|
+
--- Spawns a trinket in the center of the room. You must specify the trinket name or the number
|
|
243
|
+
-- corresponding to the trinket type.
|
|
244
|
+
--
|
|
245
|
+
-- For example, all of the following commands would spawn the Wiggle Worm trinket:
|
|
246
|
+
--
|
|
247
|
+
-- ```text
|
|
248
|
+
-- spawnTrinket wiggle worm
|
|
249
|
+
-- spawnTrinket wiggle
|
|
250
|
+
-- spawnTrinket wig
|
|
251
|
+
-- spawnTrinket 10
|
|
252
|
+
-- ```
|
|
253
|
+
--
|
|
254
|
+
-- Also see the `spawnGoldenTrinket` command.
|
|
255
|
+
function ____exports.spawnTrinket(self, params, golden)
|
|
256
|
+
if golden == nil then
|
|
257
|
+
golden = false
|
|
258
|
+
end
|
|
259
|
+
if params == "" then
|
|
260
|
+
print("You must specify the name or number corresponding to the trinket type.")
|
|
261
|
+
return
|
|
262
|
+
end
|
|
263
|
+
local trinketTypeNumber = tonumber(params)
|
|
264
|
+
local trinketType
|
|
265
|
+
if trinketTypeNumber == nil then
|
|
266
|
+
local match = getMapPartialMatch(nil, params, TRINKET_NAME_TO_TYPE_MAP)
|
|
267
|
+
if match == nil then
|
|
268
|
+
print("Unknown trinket: " .. params)
|
|
269
|
+
return
|
|
270
|
+
end
|
|
271
|
+
trinketType = match[2]
|
|
272
|
+
else
|
|
273
|
+
trinketType = asTrinketType(nil, trinketTypeNumber)
|
|
274
|
+
end
|
|
275
|
+
local roomClass = game:GetRoom()
|
|
276
|
+
local centerPos = roomClass:GetCenterPos()
|
|
277
|
+
local goldenTrinketType = getGoldenTrinketType(nil, trinketType)
|
|
278
|
+
local trinketTypeToSpawn = golden and goldenTrinketType or trinketType
|
|
279
|
+
spawnTrinketFunction(nil, trinketTypeToSpawn, centerPos)
|
|
280
|
+
end
|
|
281
|
+
--- Spawns a trinket at a specific grid tile location. You must specify the number corresponding to
|
|
282
|
+
-- the trinket type and the number corresponding to the grid tile location.
|
|
283
|
+
--
|
|
284
|
+
-- For example, this would spawn Wiggle Worm in the top-left corner of a 1x1 room:
|
|
285
|
+
--
|
|
286
|
+
-- ```text
|
|
287
|
+
-- spawnTrinketAt 10 16
|
|
288
|
+
-- ```
|
|
289
|
+
--
|
|
290
|
+
-- (You can use the "grid" command to toggle displaying the numerical grid indexes corresponding to
|
|
291
|
+
-- a grid tile.)
|
|
292
|
+
function ____exports.spawnTrinketAt(self, params, golden)
|
|
293
|
+
if golden == nil then
|
|
294
|
+
golden = false
|
|
295
|
+
end
|
|
296
|
+
if params == "" then
|
|
297
|
+
print("You must specify the number corresponding to the trinket type and the number corresponding to the grid tile location.")
|
|
298
|
+
return
|
|
299
|
+
end
|
|
300
|
+
local args = __TS__StringSplit(params, " ")
|
|
301
|
+
if #args ~= 2 then
|
|
302
|
+
print("You must specify the number corresponding to the trinket type and the number corresponding to the grid tile location.")
|
|
303
|
+
return
|
|
304
|
+
end
|
|
305
|
+
local trinketTypeNumber = tonumber(args[1])
|
|
306
|
+
if trinketTypeNumber == nil or trinketTypeNumber < 0 then
|
|
307
|
+
print("Failed to parse the trinket type of: " .. tostring(args[1]))
|
|
308
|
+
return
|
|
309
|
+
end
|
|
310
|
+
local gridIndex = tonumber(args[2])
|
|
311
|
+
if gridIndex == nil or gridIndex < 0 then
|
|
312
|
+
print("Failed to parse the grid index of: " .. tostring(args[2]))
|
|
313
|
+
return
|
|
314
|
+
end
|
|
315
|
+
local trinketType = asTrinketType(nil, trinketTypeNumber)
|
|
316
|
+
local goldenTrinketType = getGoldenTrinketType(nil, trinketType)
|
|
317
|
+
local trinketTypeToSpawn = golden and goldenTrinketType or trinketType
|
|
318
|
+
spawnTrinketFunction(nil, trinketTypeToSpawn, gridIndex)
|
|
319
|
+
end
|
|
205
320
|
--- Warps to the starting room of the floor.
|
|
206
321
|
function ____exports.startingRoom(self)
|
|
207
322
|
local level = game:GetLevel()
|
|
@@ -482,6 +597,10 @@ function ____exports.coins(self, params)
|
|
|
482
597
|
local player = Isaac.GetPlayer()
|
|
483
598
|
player:AddCoins(numCoins)
|
|
484
599
|
end
|
|
600
|
+
--- Alias for the "spawnCollectible" command.
|
|
601
|
+
function ____exports.collectible(self, params)
|
|
602
|
+
____exports.spawnCollectible(nil, params)
|
|
603
|
+
end
|
|
485
604
|
--- Creates a crawl space next to the player.
|
|
486
605
|
function ____exports.crawlSpace(self)
|
|
487
606
|
spawnTrapdoorOrCrawlSpace(nil, false)
|
|
@@ -659,6 +778,14 @@ end
|
|
|
659
778
|
function ____exports.goldKey(self)
|
|
660
779
|
____exports.goldenKey(nil)
|
|
661
780
|
end
|
|
781
|
+
--- Alias for the "spawnGoldenTrinket" command.
|
|
782
|
+
function ____exports.goldTrinket(self, params)
|
|
783
|
+
____exports.spawnGoldenTrinket(nil, params)
|
|
784
|
+
end
|
|
785
|
+
--- Alias for the "spawnGoldenTrinket" command.
|
|
786
|
+
function ____exports.goldenTrinket(self, params)
|
|
787
|
+
____exports.spawnGoldenTrinket(nil, params)
|
|
788
|
+
end
|
|
662
789
|
--- Alias for the "debug 11" command. Useful for seeing the coordinates and grid index of each tile
|
|
663
790
|
-- in the room.
|
|
664
791
|
function ____exports.grid(self)
|
|
@@ -1123,70 +1250,48 @@ function ____exports.spam(self)
|
|
|
1123
1250
|
v.persistent.spamBloodRights = not v.persistent.spamBloodRights
|
|
1124
1251
|
printEnabled(nil, v.persistent.spamBloodRights, "spamming Blood Rights")
|
|
1125
1252
|
end
|
|
1126
|
-
|
|
1253
|
+
--- Spawns a collectible at a specific grid tile location. You must specify the number corresponding
|
|
1254
|
+
-- to the collectible type and the number corresponding to the grid tile location.
|
|
1255
|
+
--
|
|
1256
|
+
-- For example, this would spawn Spoon Bender in the top-left corner of a 1x1 room:
|
|
1257
|
+
--
|
|
1258
|
+
-- ```text
|
|
1259
|
+
-- spawnCollectibleAt 3 16
|
|
1260
|
+
-- ```
|
|
1261
|
+
--
|
|
1262
|
+
-- (You can use the "grid" command to toggle displaying the numerical grid indexes corresponding to
|
|
1263
|
+
-- a grid tile.)
|
|
1264
|
+
function ____exports.spawnCollectibleAt(self, params)
|
|
1127
1265
|
if params == "" then
|
|
1128
|
-
print("You must specify the
|
|
1266
|
+
print("You must specify the number corresponding to the collectible type and the number corresponding to the grid tile location.")
|
|
1129
1267
|
return
|
|
1130
1268
|
end
|
|
1131
|
-
local
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
local match = getMapPartialMatch(nil, params, COLLECTIBLE_NAME_TO_TYPE_MAP)
|
|
1135
|
-
if match == nil then
|
|
1136
|
-
print("Unknown collectible: " .. params)
|
|
1137
|
-
return
|
|
1138
|
-
end
|
|
1139
|
-
collectibleType = match[2]
|
|
1140
|
-
else
|
|
1141
|
-
collectibleType = asCollectibleType(nil, collectibleTypeNumber)
|
|
1142
|
-
end
|
|
1143
|
-
local roomClass = game:GetRoom()
|
|
1144
|
-
local centerPos = roomClass:GetCenterPos()
|
|
1145
|
-
spawnCollectibleUnsafe(nil, collectibleType, centerPos)
|
|
1146
|
-
end
|
|
1147
|
-
--- Spawns a golden version of the specified trinket type.
|
|
1148
|
-
function ____exports.spawnGoldenTrinket(self, params)
|
|
1149
|
-
if params == "" then
|
|
1150
|
-
print("You must specify the name or number corresponding to the trinket type.")
|
|
1269
|
+
local args = __TS__StringSplit(params, " ")
|
|
1270
|
+
if #args ~= 2 then
|
|
1271
|
+
print("You must specify the number corresponding to the collectible type and the number corresponding to the grid tile location.")
|
|
1151
1272
|
return
|
|
1152
1273
|
end
|
|
1153
|
-
local
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
local match = getMapPartialMatch(nil, params, TRINKET_NAME_TO_TYPE_MAP)
|
|
1157
|
-
if match == nil then
|
|
1158
|
-
print("Unknown trinket: " .. params)
|
|
1159
|
-
return
|
|
1160
|
-
end
|
|
1161
|
-
trinketType = match[2]
|
|
1162
|
-
else
|
|
1163
|
-
trinketType = asTrinketType(nil, trinketTypeNumber)
|
|
1164
|
-
end
|
|
1165
|
-
local roomClass = game:GetRoom()
|
|
1166
|
-
local centerPos = roomClass:GetCenterPos()
|
|
1167
|
-
local goldenTrinketType = getGoldenTrinketType(nil, trinketType)
|
|
1168
|
-
spawnTrinketFunction(nil, goldenTrinketType, centerPos)
|
|
1169
|
-
end
|
|
1170
|
-
function ____exports.spawnTrinket(self, params)
|
|
1171
|
-
if params == "" then
|
|
1172
|
-
print("You must specify the name or number corresponding to the trinket type.")
|
|
1274
|
+
local collectibleTypeNumber = tonumber(args[1])
|
|
1275
|
+
if collectibleTypeNumber == nil or collectibleTypeNumber < 0 then
|
|
1276
|
+
print("Failed to parse the collectible type of: " .. tostring(args[1]))
|
|
1173
1277
|
return
|
|
1174
1278
|
end
|
|
1175
|
-
local
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
if match == nil then
|
|
1180
|
-
print("Unknown trinket: " .. params)
|
|
1181
|
-
return
|
|
1182
|
-
end
|
|
1183
|
-
trinketType = match[2]
|
|
1184
|
-
else
|
|
1185
|
-
trinketType = asTrinketType(nil, trinketTypeNumber)
|
|
1279
|
+
local gridIndex = tonumber(args[2])
|
|
1280
|
+
if gridIndex == nil or gridIndex < 0 then
|
|
1281
|
+
print("Failed to parse the grid index of: " .. tostring(args[2]))
|
|
1282
|
+
return
|
|
1186
1283
|
end
|
|
1187
|
-
local
|
|
1188
|
-
|
|
1189
|
-
|
|
1284
|
+
local collectibleType = asCollectibleType(nil, collectibleTypeNumber)
|
|
1285
|
+
spawnCollectibleUnsafe(nil, collectibleType, gridIndex)
|
|
1286
|
+
end
|
|
1287
|
+
--- Alias for the `spawnGoldenTrinket` command.
|
|
1288
|
+
function ____exports.spawnGoldTrinket(self, params)
|
|
1289
|
+
____exports.spawnGoldenTrinket(nil, params)
|
|
1290
|
+
end
|
|
1291
|
+
--- The same thing as the `spawnTrinketAt` command but spawns a golden version of the specified
|
|
1292
|
+
-- trinket.
|
|
1293
|
+
function ____exports.spawnGoldenTrinketAt(self, params)
|
|
1294
|
+
____exports.spawnTrinketAt(nil, params, true)
|
|
1190
1295
|
end
|
|
1191
1296
|
--- Toggles a set movement speed and flight for the player. You can provide an optional argument to
|
|
1192
1297
|
-- this command in order to set the speed to a specific amount. Default is 2.0 (which is the maximum
|
|
@@ -1253,6 +1358,10 @@ end
|
|
|
1253
1358
|
function ____exports.treasureRoom(self)
|
|
1254
1359
|
warpToRoomType(nil, RoomType.TREASURE)
|
|
1255
1360
|
end
|
|
1361
|
+
--- Alias for the "spawnTrinket" command.
|
|
1362
|
+
function ____exports.trinket(self, params)
|
|
1363
|
+
____exports.spawnTrinket(nil, params)
|
|
1364
|
+
end
|
|
1256
1365
|
--- Warps to the first Ultra Secret Room on the floor.
|
|
1257
1366
|
function ____exports.ultraSecretRoom(self)
|
|
1258
1367
|
warpToRoomType(nil, RoomType.ULTRA_SECRET)
|
package/package.json
CHANGED
|
@@ -9,6 +9,8 @@ eslint "sort-exports/sort-exports": [
|
|
|
9
9
|
],
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
+
/* eslint "require-jsdoc": "error" */
|
|
13
|
+
|
|
12
14
|
/**
|
|
13
15
|
* __DOCS_LINE_THAT_WILL_BE_AUTOMATICALLY_REMOVED__
|
|
14
16
|
*
|
|
@@ -506,6 +508,11 @@ export function coins(params: string): void {
|
|
|
506
508
|
player.AddCoins(numCoins);
|
|
507
509
|
}
|
|
508
510
|
|
|
511
|
+
/** Alias for the "spawnCollectible" command. */
|
|
512
|
+
export function collectible(params: string): void {
|
|
513
|
+
spawnCollectible(params);
|
|
514
|
+
}
|
|
515
|
+
|
|
509
516
|
/** Creates a crawl space next to the player. */
|
|
510
517
|
export function crawlSpace(): void {
|
|
511
518
|
spawnTrapdoorOrCrawlSpace(false);
|
|
@@ -747,6 +754,11 @@ export function goldKey(): void {
|
|
|
747
754
|
goldenKey();
|
|
748
755
|
}
|
|
749
756
|
|
|
757
|
+
/** Alias for the "spawnGoldenTrinket" command. */
|
|
758
|
+
export function goldTrinket(params: string): void {
|
|
759
|
+
spawnGoldenTrinket(params);
|
|
760
|
+
}
|
|
761
|
+
|
|
750
762
|
/** Gives the player a golden bomb. */
|
|
751
763
|
export function goldenBomb(): void {
|
|
752
764
|
const player = Isaac.GetPlayer();
|
|
@@ -767,6 +779,11 @@ export function goldenKey(): void {
|
|
|
767
779
|
player.AddGoldenKey();
|
|
768
780
|
}
|
|
769
781
|
|
|
782
|
+
/** Alias for the "spawnGoldenTrinket" command. */
|
|
783
|
+
export function goldenTrinket(params: string): void {
|
|
784
|
+
spawnGoldenTrinket(params);
|
|
785
|
+
}
|
|
786
|
+
|
|
770
787
|
/**
|
|
771
788
|
* Alias for the "debug 11" command. Useful for seeing the coordinates and grid index of each tile
|
|
772
789
|
* in the room.
|
|
@@ -1415,10 +1432,23 @@ export function spam(): void {
|
|
|
1415
1432
|
printEnabled(v.persistent.spamBloodRights, "spamming Blood Rights");
|
|
1416
1433
|
}
|
|
1417
1434
|
|
|
1435
|
+
/**
|
|
1436
|
+
* Spawns a collectible in the center of the room. You must specify the collectible name or the
|
|
1437
|
+
* number corresponding to the collectible type.
|
|
1438
|
+
*
|
|
1439
|
+
* For example, all of the following commands would spawn Spoon Bender:
|
|
1440
|
+
*
|
|
1441
|
+
* ```text
|
|
1442
|
+
* spawnCollectible spoon bender
|
|
1443
|
+
* spawnCollectible spoon
|
|
1444
|
+
* spawnCollectible spo
|
|
1445
|
+
* spawnCollectible 3
|
|
1446
|
+
* ```
|
|
1447
|
+
*/
|
|
1418
1448
|
export function spawnCollectible(params: string): void {
|
|
1419
1449
|
if (params === "") {
|
|
1420
1450
|
print(
|
|
1421
|
-
"You must specify the name or number corresponding to the collectible type.",
|
|
1451
|
+
"You must specify the collectible name or the number corresponding to the collectible type.",
|
|
1422
1452
|
);
|
|
1423
1453
|
return;
|
|
1424
1454
|
}
|
|
@@ -1442,8 +1472,88 @@ export function spawnCollectible(params: string): void {
|
|
|
1442
1472
|
spawnCollectibleUnsafe(collectibleType, centerPos);
|
|
1443
1473
|
}
|
|
1444
1474
|
|
|
1445
|
-
/**
|
|
1475
|
+
/**
|
|
1476
|
+
* Spawns a collectible at a specific grid tile location. You must specify the number corresponding
|
|
1477
|
+
* to the collectible type and the number corresponding to the grid tile location.
|
|
1478
|
+
*
|
|
1479
|
+
* For example, this would spawn Spoon Bender in the top-left corner of a 1x1 room:
|
|
1480
|
+
*
|
|
1481
|
+
* ```text
|
|
1482
|
+
* spawnCollectibleAt 3 16
|
|
1483
|
+
* ```
|
|
1484
|
+
*
|
|
1485
|
+
* (You can use the "grid" command to toggle displaying the numerical grid indexes corresponding to
|
|
1486
|
+
* a grid tile.)
|
|
1487
|
+
*/
|
|
1488
|
+
export function spawnCollectibleAt(params: string): void {
|
|
1489
|
+
if (params === "") {
|
|
1490
|
+
print(
|
|
1491
|
+
"You must specify the number corresponding to the collectible type and the number corresponding to the grid tile location.",
|
|
1492
|
+
);
|
|
1493
|
+
return;
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
const args = params.split(" ");
|
|
1497
|
+
if (args.length !== 2) {
|
|
1498
|
+
print(
|
|
1499
|
+
"You must specify the number corresponding to the collectible type and the number corresponding to the grid tile location.",
|
|
1500
|
+
);
|
|
1501
|
+
return;
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
const collectibleTypeNumber = tonumber(args[0]);
|
|
1505
|
+
if (collectibleTypeNumber === undefined || collectibleTypeNumber < 0) {
|
|
1506
|
+
print(`Failed to parse the collectible type of: ${args[0]}`);
|
|
1507
|
+
return;
|
|
1508
|
+
}
|
|
1509
|
+
|
|
1510
|
+
const gridIndex = tonumber(args[1]);
|
|
1511
|
+
if (gridIndex === undefined || gridIndex < 0) {
|
|
1512
|
+
print(`Failed to parse the grid index of: ${args[1]}`);
|
|
1513
|
+
return;
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
const collectibleType = asCollectibleType(collectibleTypeNumber);
|
|
1517
|
+
spawnCollectibleUnsafe(collectibleType, gridIndex);
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1520
|
+
/** Alias for the `spawnGoldenTrinket` command. */
|
|
1521
|
+
export function spawnGoldTrinket(params: string): void {
|
|
1522
|
+
spawnGoldenTrinket(params);
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
/**
|
|
1526
|
+
* The same thing as the `spawnTrinket` command but spawns a golden version of the specified
|
|
1527
|
+
* trinket.
|
|
1528
|
+
*/
|
|
1446
1529
|
export function spawnGoldenTrinket(params: string): void {
|
|
1530
|
+
spawnTrinket(params, true);
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1533
|
+
/**
|
|
1534
|
+
* The same thing as the `spawnTrinketAt` command but spawns a golden version of the specified
|
|
1535
|
+
* trinket.
|
|
1536
|
+
*/
|
|
1537
|
+
export function spawnGoldenTrinketAt(params: string): void {
|
|
1538
|
+
spawnTrinketAt(params, true);
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1541
|
+
/**
|
|
1542
|
+
* Spawns a trinket in the center of the room. You must specify the trinket name or the number
|
|
1543
|
+
* corresponding to the trinket type.
|
|
1544
|
+
*
|
|
1545
|
+
* For example, all of the following commands would spawn the Wiggle Worm trinket:
|
|
1546
|
+
*
|
|
1547
|
+
* ```text
|
|
1548
|
+
* spawnTrinket wiggle worm
|
|
1549
|
+
* spawnTrinket wiggle
|
|
1550
|
+
* spawnTrinket wig
|
|
1551
|
+
* spawnTrinket 10
|
|
1552
|
+
* ```
|
|
1553
|
+
*
|
|
1554
|
+
* Also see the `spawnGoldenTrinket` command.
|
|
1555
|
+
*/
|
|
1556
|
+
export function spawnTrinket(params: string, golden = false): void {
|
|
1447
1557
|
if (params === "") {
|
|
1448
1558
|
print(
|
|
1449
1559
|
"You must specify the name or number corresponding to the trinket type.",
|
|
@@ -1468,34 +1578,55 @@ export function spawnGoldenTrinket(params: string): void {
|
|
|
1468
1578
|
const roomClass = game.GetRoom();
|
|
1469
1579
|
const centerPos = roomClass.GetCenterPos();
|
|
1470
1580
|
const goldenTrinketType = getGoldenTrinketType(trinketType);
|
|
1471
|
-
|
|
1581
|
+
const trinketTypeToSpawn = golden ? goldenTrinketType : trinketType;
|
|
1582
|
+
spawnTrinketFunction(trinketTypeToSpawn, centerPos);
|
|
1472
1583
|
}
|
|
1473
1584
|
|
|
1474
|
-
|
|
1585
|
+
/**
|
|
1586
|
+
* Spawns a trinket at a specific grid tile location. You must specify the number corresponding to
|
|
1587
|
+
* the trinket type and the number corresponding to the grid tile location.
|
|
1588
|
+
*
|
|
1589
|
+
* For example, this would spawn Wiggle Worm in the top-left corner of a 1x1 room:
|
|
1590
|
+
*
|
|
1591
|
+
* ```text
|
|
1592
|
+
* spawnTrinketAt 10 16
|
|
1593
|
+
* ```
|
|
1594
|
+
*
|
|
1595
|
+
* (You can use the "grid" command to toggle displaying the numerical grid indexes corresponding to
|
|
1596
|
+
* a grid tile.)
|
|
1597
|
+
*/
|
|
1598
|
+
export function spawnTrinketAt(params: string, golden = false): void {
|
|
1475
1599
|
if (params === "") {
|
|
1476
1600
|
print(
|
|
1477
|
-
"You must specify the
|
|
1601
|
+
"You must specify the number corresponding to the trinket type and the number corresponding to the grid tile location.",
|
|
1478
1602
|
);
|
|
1479
1603
|
return;
|
|
1480
1604
|
}
|
|
1481
1605
|
|
|
1482
|
-
const
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
}
|
|
1606
|
+
const args = params.split(" ");
|
|
1607
|
+
if (args.length !== 2) {
|
|
1608
|
+
print(
|
|
1609
|
+
"You must specify the number corresponding to the trinket type and the number corresponding to the grid tile location.",
|
|
1610
|
+
);
|
|
1611
|
+
return;
|
|
1612
|
+
}
|
|
1490
1613
|
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1614
|
+
const trinketTypeNumber = tonumber(args[0]);
|
|
1615
|
+
if (trinketTypeNumber === undefined || trinketTypeNumber < 0) {
|
|
1616
|
+
print(`Failed to parse the trinket type of: ${args[0]}`);
|
|
1617
|
+
return;
|
|
1494
1618
|
}
|
|
1495
1619
|
|
|
1496
|
-
const
|
|
1497
|
-
|
|
1498
|
-
|
|
1620
|
+
const gridIndex = tonumber(args[1]);
|
|
1621
|
+
if (gridIndex === undefined || gridIndex < 0) {
|
|
1622
|
+
print(`Failed to parse the grid index of: ${args[1]}`);
|
|
1623
|
+
return;
|
|
1624
|
+
}
|
|
1625
|
+
|
|
1626
|
+
const trinketType = asTrinketType(trinketTypeNumber);
|
|
1627
|
+
const goldenTrinketType = getGoldenTrinketType(trinketType);
|
|
1628
|
+
const trinketTypeToSpawn = golden ? goldenTrinketType : trinketType;
|
|
1629
|
+
spawnTrinketFunction(trinketTypeToSpawn, gridIndex);
|
|
1499
1630
|
}
|
|
1500
1631
|
|
|
1501
1632
|
/**
|
|
@@ -1593,6 +1724,11 @@ export function treasureRoom(): void {
|
|
|
1593
1724
|
warpToRoomType(RoomType.TREASURE);
|
|
1594
1725
|
}
|
|
1595
1726
|
|
|
1727
|
+
/** Alias for the "spawnTrinket" command. */
|
|
1728
|
+
export function trinket(params: string): void {
|
|
1729
|
+
spawnTrinket(params);
|
|
1730
|
+
}
|
|
1731
|
+
|
|
1596
1732
|
/** Warps to the first Ultra Secret Room on the floor. */
|
|
1597
1733
|
export function ultraSecretRoom(): void {
|
|
1598
1734
|
warpToRoomType(RoomType.ULTRA_SECRET);
|