isaacscript-common 11.0.1 → 11.2.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/index.d.ts +15 -1
- package/dist/isaacscript-common.lua +337 -193
- package/dist/package.lua +2 -2
- package/dist/src/features/extraConsoleCommands/init.d.ts.map +1 -1
- package/dist/src/features/extraConsoleCommands/init.lua +14 -21
- package/dist/src/features/extraConsoleCommands/listCommands.d.ts +26 -7
- package/dist/src/features/extraConsoleCommands/listCommands.d.ts.map +1 -1
- package/dist/src/features/extraConsoleCommands/listCommands.lua +114 -23
- package/dist/src/features/extraConsoleCommands/v.d.ts +7 -6
- package/dist/src/features/extraConsoleCommands/v.d.ts.map +1 -1
- package/dist/src/features/extraConsoleCommands/v.lua +9 -7
- package/dist/src/features/saveDataManager/main.d.ts.map +1 -1
- package/dist/src/features/saveDataManager/main.lua +6 -1
- package/dist/src/functions/collectibles.d.ts +4 -0
- package/dist/src/functions/collectibles.d.ts.map +1 -1
- package/dist/src/functions/collectibles.lua +4 -0
- package/dist/src/functions/map.d.ts +1 -1
- package/dist/src/functions/map.lua +1 -1
- package/dist/src/functions/tears.d.ts +6 -0
- package/dist/src/functions/tears.d.ts.map +1 -1
- package/dist/src/functions/tears.lua +6 -0
- package/dist/src/functions/trinkets.d.ts +4 -0
- package/dist/src/functions/trinkets.d.ts.map +1 -1
- package/dist/src/functions/trinkets.lua +4 -0
- package/dist/src/maps/transformationNameToPlayerForm.d.ts +4 -0
- package/dist/src/maps/transformationNameToPlayerForm.d.ts.map +1 -0
- package/dist/src/maps/transformationNameToPlayerForm.lua +37 -0
- package/package.json +2 -2
- package/src/features/extraConsoleCommands/init.ts +20 -26
- package/src/features/extraConsoleCommands/listCommands.ts +128 -24
- package/src/features/extraConsoleCommands/v.ts +11 -7
- package/src/features/saveDataManager/main.ts +12 -1
- package/src/functions/collectibles.ts +4 -0
- package/src/functions/map.ts +1 -1
- package/src/functions/tears.ts +6 -0
- package/src/functions/trinkets.ts +4 -0
- package/src/maps/transformationNameToPlayerForm.ts +35 -0
package/dist/package.lua
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
return {
|
|
2
2
|
name = "isaacscript-common",
|
|
3
|
-
version = "11.0
|
|
3
|
+
version = "11.2.0",
|
|
4
4
|
description = "Helper functions and features for IsaacScript mods.",
|
|
5
5
|
keywords = {"isaac", "rebirth", "afterbirth", "repentance"},
|
|
6
6
|
homepage = "https://isaacscript.github.io/",
|
|
@@ -11,5 +11,5 @@ return {
|
|
|
11
11
|
type = "commonjs",
|
|
12
12
|
main = "dist/src/index",
|
|
13
13
|
types = "dist/src/index.d.ts",
|
|
14
|
-
dependencies = {["isaac-typescript-definitions"] = "^7.2.
|
|
14
|
+
dependencies = {["isaac-typescript-definitions"] = "^7.2.3"}
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../src/features/extraConsoleCommands/init.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../src/features/extraConsoleCommands/init.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAUxD,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAK/D"}
|
|
@@ -2,16 +2,13 @@ local ____lualib = require("lualib_bundle")
|
|
|
2
2
|
local Map = ____lualib.Map
|
|
3
3
|
local __TS__ObjectEntries = ____lualib.__TS__ObjectEntries
|
|
4
4
|
local ____exports = {}
|
|
5
|
-
local initCommandMap, initCallbacks, postUpdate, evaluateCacheFireDelay, evaluateCacheSpeed, evaluateCacheFlying, entityTakeDmgPlayer, postCurseEval, executeCmd
|
|
5
|
+
local initCommandMap, initCallbacks, postUpdate, evaluateCacheDamage, evaluateCacheFireDelay, evaluateCacheSpeed, evaluateCacheFlying, entityTakeDmgPlayer, postCurseEval, executeCmd
|
|
6
6
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
7
7
|
local CacheFlag = ____isaac_2Dtypescript_2Ddefinitions.CacheFlag
|
|
8
8
|
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
9
9
|
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
10
10
|
local LevelCurse = ____isaac_2Dtypescript_2Ddefinitions.LevelCurse
|
|
11
11
|
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
12
|
-
local TearVariant = ____isaac_2Dtypescript_2Ddefinitions.TearVariant
|
|
13
|
-
local ____constants = require("src.core.constants")
|
|
14
|
-
local MAX_SPEED_STAT = ____constants.MAX_SPEED_STAT
|
|
15
12
|
local ____flag = require("src.functions.flag")
|
|
16
13
|
local addFlag = ____flag.addFlag
|
|
17
14
|
local bitFlags = ____flag.bitFlags
|
|
@@ -42,37 +39,42 @@ function initCommandMap(self)
|
|
|
42
39
|
end
|
|
43
40
|
function initCallbacks(self, mod)
|
|
44
41
|
mod:AddCallback(ModCallback.POST_UPDATE, postUpdate)
|
|
42
|
+
mod:AddCallback(ModCallback.EVALUATE_CACHE, evaluateCacheDamage, CacheFlag.DAMAGE)
|
|
45
43
|
mod:AddCallback(ModCallback.EVALUATE_CACHE, evaluateCacheFireDelay, CacheFlag.FIRE_DELAY)
|
|
46
44
|
mod:AddCallback(ModCallback.EVALUATE_CACHE, evaluateCacheSpeed, CacheFlag.SPEED)
|
|
47
45
|
mod:AddCallback(ModCallback.EVALUATE_CACHE, evaluateCacheFlying, CacheFlag.FLYING)
|
|
48
46
|
mod:AddCallback(ModCallback.ENTITY_TAKE_DMG, entityTakeDmgPlayer, EntityType.PLAYER)
|
|
49
47
|
mod:AddCallback(ModCallback.POST_CURSE_EVAL, postCurseEval)
|
|
50
48
|
mod:AddCallback(ModCallback.EXECUTE_CMD, executeCmd)
|
|
51
|
-
mod:AddCallback(ModCallback.POST_FIRE_TEAR, postFireTear)
|
|
52
49
|
end
|
|
53
50
|
function postUpdate(self)
|
|
54
|
-
if v.
|
|
51
|
+
if v.persistent.spamBloodRights then
|
|
55
52
|
local player = Isaac.GetPlayer()
|
|
56
53
|
player:UseActiveItem(CollectibleType.BLOOD_RIGHTS)
|
|
57
54
|
end
|
|
58
55
|
end
|
|
56
|
+
function evaluateCacheDamage(self, player)
|
|
57
|
+
if v.persistent.damage then
|
|
58
|
+
player.Damage = v.persistent.damageAmount
|
|
59
|
+
end
|
|
60
|
+
end
|
|
59
61
|
function evaluateCacheFireDelay(self, player)
|
|
60
|
-
if v.
|
|
61
|
-
player.FireDelay =
|
|
62
|
+
if v.persistent.tears then
|
|
63
|
+
player.FireDelay = v.persistent.tearsAmount
|
|
62
64
|
end
|
|
63
65
|
end
|
|
64
66
|
function evaluateCacheSpeed(self, player)
|
|
65
|
-
if v.
|
|
66
|
-
player.MoveSpeed =
|
|
67
|
+
if v.persistent.speed then
|
|
68
|
+
player.MoveSpeed = v.persistent.speedAmount
|
|
67
69
|
end
|
|
68
70
|
end
|
|
69
71
|
function evaluateCacheFlying(self, player)
|
|
70
|
-
if v.
|
|
72
|
+
if v.persistent.flight then
|
|
71
73
|
player.CanFly = true
|
|
72
74
|
end
|
|
73
75
|
end
|
|
74
76
|
function entityTakeDmgPlayer(self, _entity, _damageAmount, _damageFlags, _damageSource, _damageCountdownFrames)
|
|
75
|
-
if v.
|
|
77
|
+
if v.persistent.spamBloodRights then
|
|
76
78
|
return false
|
|
77
79
|
end
|
|
78
80
|
return nil
|
|
@@ -124,15 +126,6 @@ function executeCmd(self, command, params)
|
|
|
124
126
|
printConsole(nil, "Command: " .. commandName)
|
|
125
127
|
commandFunction(nil, params)
|
|
126
128
|
end
|
|
127
|
-
function postFireTear(self, tear)
|
|
128
|
-
if v.run.chaosCardTears then
|
|
129
|
-
tear:ChangeVariant(TearVariant.CHAOS_CARD)
|
|
130
|
-
end
|
|
131
|
-
if v.run.maxDamage then
|
|
132
|
-
tear.CollisionDamage = tear.CollisionDamage * 1000
|
|
133
|
-
tear:ChangeVariant(TearVariant.TOOTH)
|
|
134
|
-
end
|
|
135
|
-
end
|
|
136
129
|
function ____exports.extraConsoleCommandsInit(self, mod)
|
|
137
130
|
saveDataManager(nil, "extraConsoleCommands", v, false)
|
|
138
131
|
initCommandMap(nil)
|
|
@@ -107,8 +107,11 @@ export declare function d20(): void;
|
|
|
107
107
|
export declare function d6(): void;
|
|
108
108
|
/** Warps to the Mausoleum 2 Boss Room that has Dad's Note in it. */
|
|
109
109
|
export declare function dadsNote(): void;
|
|
110
|
-
/**
|
|
111
|
-
|
|
110
|
+
/**
|
|
111
|
+
* Toggles a set damage stat for the player. You can provide an optional argument to this command in
|
|
112
|
+
* order to set the damage to a specific amount. Default is 500.
|
|
113
|
+
*/
|
|
114
|
+
export declare function damage(params: string): void;
|
|
112
115
|
/** Toggles permanent Curse of Darkness. */
|
|
113
116
|
export declare function darkness(): void;
|
|
114
117
|
/** Alias for the "devil" command. */
|
|
@@ -268,6 +271,8 @@ export declare function pills(): void;
|
|
|
268
271
|
export declare function planetarium(): void;
|
|
269
272
|
/** Alias for the "sound" command. */
|
|
270
273
|
export declare function playSound(params: string): void;
|
|
274
|
+
/** Alias for the "transformation" command. */
|
|
275
|
+
export declare function playerForm(params: string): void;
|
|
271
276
|
/** Sets the player's pocket item to the specified collectible type. */
|
|
272
277
|
export declare function pocket(params: string): void;
|
|
273
278
|
/**
|
|
@@ -358,8 +363,12 @@ export declare function spawnCollectible(params: string): void;
|
|
|
358
363
|
/** Spawns a golden version of the specified trinket type. */
|
|
359
364
|
export declare function spawnGoldenTrinket(params: string): void;
|
|
360
365
|
export declare function spawnTrinket(params: string): void;
|
|
361
|
-
/**
|
|
362
|
-
|
|
366
|
+
/**
|
|
367
|
+
* Toggles a set movement speed and flight for the player. You can provide an optional argument to
|
|
368
|
+
* this command in order to set the speed to a specific amount. Default is 2.0 (which is the maximum
|
|
369
|
+
* that the stat can be set to).
|
|
370
|
+
*/
|
|
371
|
+
export declare function speed(params: string): void;
|
|
363
372
|
/** Alias for the "startingRoom" command. */
|
|
364
373
|
export declare function startRoom(): void;
|
|
365
374
|
/** Warps to the starting room of the floor. */
|
|
@@ -367,12 +376,22 @@ export declare function startingRoom(): void;
|
|
|
367
376
|
/** Warps to the first Super Secret Room on the floor. */
|
|
368
377
|
export declare function superSecretRoom(): void;
|
|
369
378
|
/**
|
|
370
|
-
* Toggles
|
|
371
|
-
*
|
|
379
|
+
* Toggles a set tear delay (e.g. fire rate) for the player. You can provide an optional argument to
|
|
380
|
+
* this command in order to set the tear delay to a specific amount. Default is 1 (which is
|
|
381
|
+
* equivalent to the Soy Milk tear rate).
|
|
372
382
|
*/
|
|
373
|
-
export declare function tears(): void;
|
|
383
|
+
export declare function tears(params: string): void;
|
|
374
384
|
/** Alias for the "runTests" command. */
|
|
375
385
|
export declare function tests(): void;
|
|
386
|
+
/**
|
|
387
|
+
* Gives the specified transformation. Accepts either the transformation number or the partial name
|
|
388
|
+
* of the transformation.
|
|
389
|
+
*
|
|
390
|
+
* For example:
|
|
391
|
+
* - transformation 1 - Gives the Beelzebub transformation.
|
|
392
|
+
* - transformation gup - Gives the Guppy transformation.
|
|
393
|
+
*/
|
|
394
|
+
export declare function transformation(params: string): void;
|
|
376
395
|
/** Creates a trapdoor next to the player. */
|
|
377
396
|
export declare function trapdoor(): void;
|
|
378
397
|
/** Warps to the first Treasure Room on the floor. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listCommands.d.ts","sourceRoot":"","sources":["../../../../src/features/extraConsoleCommands/listCommands.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"listCommands.d.ts","sourceRoot":"","sources":["../../../../src/features/extraConsoleCommands/listCommands.ts"],"names":[],"mappings":"AAwIA;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CA2C/C;AAED;;;GAGG;AACH,wB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,MAAM,GAAG,IAAI,CA4CnD;AAED,6CAA6C;AAC7C,wBAAgB,QAAQ,IAAI,IAAI,CAE/B;AAED,qDAAqD;AACrD,wBAAgB,YAAY,IAAI,IAAI,CAEnC;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"}
|
|
@@ -17,6 +17,7 @@ local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
|
17
17
|
local GridRoom = ____isaac_2Dtypescript_2Ddefinitions.GridRoom
|
|
18
18
|
local LevelStage = ____isaac_2Dtypescript_2Ddefinitions.LevelStage
|
|
19
19
|
local PillColor = ____isaac_2Dtypescript_2Ddefinitions.PillColor
|
|
20
|
+
local PlayerForm = ____isaac_2Dtypescript_2Ddefinitions.PlayerForm
|
|
20
21
|
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
21
22
|
local StageType = ____isaac_2Dtypescript_2Ddefinitions.StageType
|
|
22
23
|
local ____cachedClasses = require("src.core.cachedClasses")
|
|
@@ -49,6 +50,7 @@ local ____entitiesSpecific = require("src.functions.entitiesSpecific")
|
|
|
49
50
|
local getNPCs = ____entitiesSpecific.getNPCs
|
|
50
51
|
local ____enums = require("src.functions.enums")
|
|
51
52
|
local getEnumValues = ____enums.getEnumValues
|
|
53
|
+
local getLastEnumValue = ____enums.getLastEnumValue
|
|
52
54
|
local ____flag = require("src.functions.flag")
|
|
53
55
|
local addFlag = ____flag.addFlag
|
|
54
56
|
local ____gridEntities = require("src.functions.gridEntities")
|
|
@@ -87,10 +89,15 @@ local ____run = require("src.functions.run")
|
|
|
87
89
|
local onSetSeed = ____run.onSetSeed
|
|
88
90
|
local restart = ____run.restart
|
|
89
91
|
local setUnseeded = ____run.setUnseeded
|
|
92
|
+
local ____set = require("src.functions.set")
|
|
93
|
+
local getSortedSetValues = ____set.getSortedSetValues
|
|
90
94
|
local ____spawnCollectible = require("src.functions.spawnCollectible")
|
|
91
95
|
local spawnCollectibleFunction = ____spawnCollectible.spawnCollectible
|
|
92
96
|
local ____stage = require("src.functions.stage")
|
|
93
97
|
local setStage = ____stage.setStage
|
|
98
|
+
local ____transformations = require("src.functions.transformations")
|
|
99
|
+
local getCollectibleTypesForTransformation = ____transformations.getCollectibleTypesForTransformation
|
|
100
|
+
local getTransformationName = ____transformations.getTransformationName
|
|
94
101
|
local ____trinkets = require("src.functions.trinkets")
|
|
95
102
|
local getGoldenTrinketType = ____trinkets.getGoldenTrinketType
|
|
96
103
|
local ____types = require("src.functions.types")
|
|
@@ -111,6 +118,8 @@ local ____pillNameToEffectMap = require("src.maps.pillNameToEffectMap")
|
|
|
111
118
|
local PILL_NAME_TO_EFFECT_MAP = ____pillNameToEffectMap.PILL_NAME_TO_EFFECT_MAP
|
|
112
119
|
local ____roomNameToTypeMap = require("src.maps.roomNameToTypeMap")
|
|
113
120
|
local ROOM_NAME_TO_TYPE_MAP = ____roomNameToTypeMap.ROOM_NAME_TO_TYPE_MAP
|
|
121
|
+
local ____transformationNameToPlayerForm = require("src.maps.transformationNameToPlayerForm")
|
|
122
|
+
local TRANSFORMATION_NAME_TO_PLAYER_FORM_MAP = ____transformationNameToPlayerForm.TRANSFORMATION_NAME_TO_PLAYER_FORM_MAP
|
|
114
123
|
local ____trinketNameToTypeMap = require("src.maps.trinketNameToTypeMap")
|
|
115
124
|
local TRINKET_NAME_TO_TYPE_MAP = ____trinketNameToTypeMap.TRINKET_NAME_TO_TYPE_MAP
|
|
116
125
|
local ____firstLast = require("src.features.firstLast")
|
|
@@ -134,8 +143,8 @@ end
|
|
|
134
143
|
--- Toggles Chaos Card tears for the player. Useful for killing enemies very fast without using
|
|
135
144
|
-- "debug 10".
|
|
136
145
|
function ____exports.chaosCardTears(self)
|
|
137
|
-
v.
|
|
138
|
-
printEnabled(nil, v.
|
|
146
|
+
v.persistent.chaosCardTears = not v.persistent.chaosCardTears
|
|
147
|
+
printEnabled(nil, v.persistent.chaosCardTears, "Chaos Card tears")
|
|
139
148
|
end
|
|
140
149
|
--- Warps to the Devil Room for the floor. If the Angel Room has already been visited or initialized,
|
|
141
150
|
-- this will uninitialize it and make an Devil Room instead.
|
|
@@ -205,6 +214,56 @@ function ____exports.startingRoom(self)
|
|
|
205
214
|
local startingRoomIndex = level:GetStartingRoomIndex()
|
|
206
215
|
changeRoom(nil, startingRoomIndex)
|
|
207
216
|
end
|
|
217
|
+
--- Gives the specified transformation. Accepts either the transformation number or the partial name
|
|
218
|
+
-- of the transformation.
|
|
219
|
+
--
|
|
220
|
+
-- For example:
|
|
221
|
+
-- - transformation 1 - Gives the Beelzebub transformation.
|
|
222
|
+
-- - transformation gup - Gives the Guppy transformation.
|
|
223
|
+
function ____exports.transformation(self, params)
|
|
224
|
+
if params == "" then
|
|
225
|
+
printConsole(nil, "You must specify a transformation name or number.")
|
|
226
|
+
return
|
|
227
|
+
end
|
|
228
|
+
local targetPlayerForm
|
|
229
|
+
local num = tonumber(params)
|
|
230
|
+
if num == nil then
|
|
231
|
+
local match = getMapPartialMatch(nil, params, TRANSFORMATION_NAME_TO_PLAYER_FORM_MAP)
|
|
232
|
+
if match == nil then
|
|
233
|
+
printConsole(nil, "Unknown transformation: " .. params)
|
|
234
|
+
return
|
|
235
|
+
end
|
|
236
|
+
targetPlayerForm = match[2]
|
|
237
|
+
else
|
|
238
|
+
local lastPlayerForm = getLastEnumValue(nil, PlayerForm)
|
|
239
|
+
if num < PlayerForm.GUPPY or num > lastPlayerForm then
|
|
240
|
+
printConsole(
|
|
241
|
+
nil,
|
|
242
|
+
"Invalid transformation number: " .. tostring(num)
|
|
243
|
+
)
|
|
244
|
+
return
|
|
245
|
+
end
|
|
246
|
+
targetPlayerForm = num
|
|
247
|
+
end
|
|
248
|
+
local transformationName = getTransformationName(nil, targetPlayerForm)
|
|
249
|
+
local player = Isaac.GetPlayer()
|
|
250
|
+
local collectibleTypesSet = getCollectibleTypesForTransformation(nil, targetPlayerForm)
|
|
251
|
+
local collectiblesTypes = getSortedSetValues(nil, collectibleTypesSet)
|
|
252
|
+
do
|
|
253
|
+
local i = 0
|
|
254
|
+
while i < 3 do
|
|
255
|
+
local collectibleType = collectiblesTypes[i + 1]
|
|
256
|
+
if collectibleType ~= nil then
|
|
257
|
+
player:AddCollectible(collectibleType)
|
|
258
|
+
end
|
|
259
|
+
i = i + 1
|
|
260
|
+
end
|
|
261
|
+
end
|
|
262
|
+
printConsole(
|
|
263
|
+
nil,
|
|
264
|
+
((("Gave transformation: " .. transformationName) .. " (") .. tostring(targetPlayerForm)) .. ")"
|
|
265
|
+
)
|
|
266
|
+
end
|
|
208
267
|
--- Adds a single charge to the player's specified active item. You must provide the active slot
|
|
209
268
|
-- number. Provide a second number to give a custom amount of charges. (You can use negative numbers
|
|
210
269
|
-- to remove charge.)
|
|
@@ -524,10 +583,19 @@ function ____exports.dadsNote(self)
|
|
|
524
583
|
setStage(nil, LevelStage.DEPTHS_2, StageType.REPENTANCE)
|
|
525
584
|
____exports.bossRoom(nil)
|
|
526
585
|
end
|
|
527
|
-
--- Toggles
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
586
|
+
--- Toggles a set damage stat for the player. You can provide an optional argument to this command in
|
|
587
|
+
-- order to set the damage to a specific amount. Default is 500.
|
|
588
|
+
function ____exports.damage(self, params)
|
|
589
|
+
if params ~= "" then
|
|
590
|
+
local num = tonumber(params)
|
|
591
|
+
if num == nil then
|
|
592
|
+
printConsole(nil, "The provided damage amount is invalid: " .. params)
|
|
593
|
+
return
|
|
594
|
+
end
|
|
595
|
+
v.persistent.damageAmount = num
|
|
596
|
+
end
|
|
597
|
+
v.persistent.damage = not v.persistent.damage
|
|
598
|
+
printEnabled(nil, v.persistent.damage, "debug damage")
|
|
531
599
|
end
|
|
532
600
|
--- Toggles permanent Curse of Darkness.
|
|
533
601
|
function ____exports.darkness(self)
|
|
@@ -573,21 +641,21 @@ end
|
|
|
573
641
|
--- Toggles flight for the player.
|
|
574
642
|
function ____exports.flight(self, params)
|
|
575
643
|
local player = Isaac.GetPlayer()
|
|
576
|
-
v.
|
|
644
|
+
v.persistent.flight = not v.persistent.flight
|
|
577
645
|
if params == "true" then
|
|
578
|
-
v.
|
|
646
|
+
v.persistent.flight = true
|
|
579
647
|
elseif params == "false" then
|
|
580
|
-
v.
|
|
648
|
+
v.persistent.flight = false
|
|
581
649
|
end
|
|
582
650
|
player:AddCacheFlags(CacheFlag.FLYING)
|
|
583
651
|
player:EvaluateItems()
|
|
584
652
|
local collectibleUsedToShowFlight = CollectibleType.FATE
|
|
585
|
-
if v.
|
|
653
|
+
if v.persistent.flight then
|
|
586
654
|
addCollectibleCostume(nil, player, collectibleUsedToShowFlight)
|
|
587
655
|
else
|
|
588
656
|
removeCollectibleCostume(nil, player, collectibleUsedToShowFlight)
|
|
589
657
|
end
|
|
590
|
-
printEnabled(nil, v.
|
|
658
|
+
printEnabled(nil, v.persistent.speed, "max speed")
|
|
591
659
|
end
|
|
592
660
|
--- Alias for the "startingRoom" command.
|
|
593
661
|
function ____exports.fool(self)
|
|
@@ -877,6 +945,10 @@ end
|
|
|
877
945
|
function ____exports.playSound(self, params)
|
|
878
946
|
____exports.sound(nil, params)
|
|
879
947
|
end
|
|
948
|
+
--- Alias for the "transformation" command.
|
|
949
|
+
function ____exports.playerForm(self, params)
|
|
950
|
+
____exports.transformation(nil, params)
|
|
951
|
+
end
|
|
880
952
|
--- Sets the player's pocket item to the specified collectible type.
|
|
881
953
|
function ____exports.pocket(self, params)
|
|
882
954
|
if params == "" then
|
|
@@ -1109,8 +1181,8 @@ end
|
|
|
1109
1181
|
--- Toggles spamming Blood Rights on every frame. Useful for killing enemies very fast without using
|
|
1110
1182
|
-- "debug 10".
|
|
1111
1183
|
function ____exports.spam(self)
|
|
1112
|
-
v.
|
|
1113
|
-
printEnabled(nil, v.
|
|
1184
|
+
v.persistent.spamBloodRights = not v.persistent.spamBloodRights
|
|
1185
|
+
printEnabled(nil, v.persistent.spamBloodRights, "spamming Blood Rights")
|
|
1114
1186
|
end
|
|
1115
1187
|
function ____exports.spawnCollectible(self, params)
|
|
1116
1188
|
if params == "" then
|
|
@@ -1177,15 +1249,25 @@ function ____exports.spawnTrinket(self, params)
|
|
|
1177
1249
|
local centerPos = roomClass:GetCenterPos()
|
|
1178
1250
|
spawnTrinketFunction(nil, trinketType, centerPos)
|
|
1179
1251
|
end
|
|
1180
|
-
--- Toggles
|
|
1181
|
-
|
|
1252
|
+
--- Toggles a set movement speed and flight for the player. You can provide an optional argument to
|
|
1253
|
+
-- this command in order to set the speed to a specific amount. Default is 2.0 (which is the maximum
|
|
1254
|
+
-- that the stat can be set to).
|
|
1255
|
+
function ____exports.speed(self, params)
|
|
1182
1256
|
local player = Isaac.GetPlayer()
|
|
1183
|
-
|
|
1257
|
+
if params ~= "" then
|
|
1258
|
+
local num = tonumber(params)
|
|
1259
|
+
if num == nil then
|
|
1260
|
+
printConsole(nil, "The provided speed amount is invalid: " .. params)
|
|
1261
|
+
return
|
|
1262
|
+
end
|
|
1263
|
+
v.persistent.damageAmount = num
|
|
1264
|
+
end
|
|
1265
|
+
v.persistent.speed = not v.persistent.speed
|
|
1184
1266
|
player:AddCacheFlags(CacheFlag.SPEED)
|
|
1185
1267
|
player:EvaluateItems()
|
|
1186
|
-
local value = tostring(v.
|
|
1268
|
+
local value = tostring(v.persistent.speed)
|
|
1187
1269
|
____exports.flight(nil, value)
|
|
1188
|
-
printEnabled(nil, v.
|
|
1270
|
+
printEnabled(nil, v.persistent.speed, "max speed and flight")
|
|
1189
1271
|
end
|
|
1190
1272
|
--- Alias for the "startingRoom" command.
|
|
1191
1273
|
function ____exports.startRoom(self)
|
|
@@ -1195,14 +1277,23 @@ end
|
|
|
1195
1277
|
function ____exports.superSecretRoom(self)
|
|
1196
1278
|
warpToRoomType(nil, RoomType.SUPER_SECRET)
|
|
1197
1279
|
end
|
|
1198
|
-
--- Toggles
|
|
1199
|
-
--
|
|
1200
|
-
|
|
1201
|
-
|
|
1280
|
+
--- Toggles a set tear delay (e.g. fire rate) for the player. You can provide an optional argument to
|
|
1281
|
+
-- this command in order to set the tear delay to a specific amount. Default is 1 (which is
|
|
1282
|
+
-- equivalent to the Soy Milk tear rate).
|
|
1283
|
+
function ____exports.tears(self, params)
|
|
1284
|
+
if params ~= "" then
|
|
1285
|
+
local num = tonumber(params)
|
|
1286
|
+
if num == nil then
|
|
1287
|
+
printConsole(nil, "The provided tear delay amount is invalid: " .. params)
|
|
1288
|
+
return
|
|
1289
|
+
end
|
|
1290
|
+
v.persistent.tearsAmount = num
|
|
1291
|
+
end
|
|
1292
|
+
v.persistent.tears = not v.persistent.tears
|
|
1202
1293
|
local player = Isaac.GetPlayer()
|
|
1203
1294
|
player:AddCacheFlags(CacheFlag.FIRE_DELAY)
|
|
1204
1295
|
player:EvaluateItems()
|
|
1205
|
-
printEnabled(nil, v.
|
|
1296
|
+
printEnabled(nil, v.persistent.damage, "debug tear-rate")
|
|
1206
1297
|
end
|
|
1207
1298
|
--- Alias for the "runTests" command.
|
|
1208
1299
|
function ____exports.tests(self)
|
|
@@ -9,14 +9,15 @@ declare const v: {
|
|
|
9
9
|
blind: boolean;
|
|
10
10
|
giant: boolean;
|
|
11
11
|
disableCurses: boolean;
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
damage: boolean;
|
|
13
|
+
damageAmount: number;
|
|
14
|
+
speed: boolean;
|
|
15
|
+
speedAmount: number;
|
|
16
|
+
tears: boolean;
|
|
17
|
+
tearsAmount: number;
|
|
18
|
+
flight: boolean;
|
|
14
19
|
chaosCardTears: boolean;
|
|
15
20
|
spamBloodRights: boolean;
|
|
16
|
-
maxDamage: boolean;
|
|
17
|
-
maxSpeed: boolean;
|
|
18
|
-
maxTears: boolean;
|
|
19
|
-
flight: boolean;
|
|
20
21
|
};
|
|
21
22
|
};
|
|
22
23
|
export default v;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v.d.ts","sourceRoot":"","sources":["../../../../src/features/extraConsoleCommands/v.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC
|
|
1
|
+
{"version":3,"file":"v.d.ts","sourceRoot":"","sources":["../../../../src/features/extraConsoleCommands/v.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;CA0BN,CAAC;AACF,eAAe,CAAC,CAAC;AAEjB,qEAAqE;AACrE,eAAO,MAAM,+BAA+B,uBAEjC,MAAM,KAAK,IAAI,CACvB,CAAC;AAEJ;;;;GAIG;AACH,wBAAgB,iCAAiC,IAAI,OAAO,CAE3D"}
|
|
@@ -11,14 +11,16 @@ local v = {persistent = {
|
|
|
11
11
|
maze = false,
|
|
12
12
|
blind = false,
|
|
13
13
|
giant = false,
|
|
14
|
-
disableCurses = false
|
|
15
|
-
|
|
14
|
+
disableCurses = false,
|
|
15
|
+
damage = false,
|
|
16
|
+
damageAmount = 500,
|
|
17
|
+
speed = false,
|
|
18
|
+
speedAmount = 2,
|
|
19
|
+
tears = false,
|
|
20
|
+
tearsAmount = 1,
|
|
21
|
+
flight = false,
|
|
16
22
|
chaosCardTears = false,
|
|
17
|
-
spamBloodRights = false
|
|
18
|
-
maxDamage = false,
|
|
19
|
-
maxSpeed = false,
|
|
20
|
-
maxTears = false,
|
|
21
|
-
flight = false
|
|
23
|
+
spamBloodRights = false
|
|
22
24
|
}}
|
|
23
25
|
____exports.default = v
|
|
24
26
|
--- The contents of the map are initialized in the "init.ts" file.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../../src/features/saveDataManager/main.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGxD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAMtD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAsBrD,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../../src/features/saveDataManager/main.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGxD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAMtD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAsBrD,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAelE;AA2FD,wBAAgB,sBAAsB,CACpC,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,WAAW,GACvB,IAAI,CA4CN;AAiBD,wBAAgB,wBAAwB,IAAI,IAAI,CAM/C;AAED,wBAAgB,wBAAwB,IAAI,IAAI,CAM/C"}
|
|
@@ -2,8 +2,9 @@ local ____lualib = require("lualib_bundle")
|
|
|
2
2
|
local Set = ____lualib.Set
|
|
3
3
|
local __TS__New = ____lualib.__TS__New
|
|
4
4
|
local ____exports = {}
|
|
5
|
-
local postPlayerInit, preGameExit, postNewLevel, postNewRoomEarly, restoreDefaultsAll, restoreDefaults, clearAndCopyAllElements, RESETTABLE_SAVE_DATA_KEYS, mod, loadedDataOnThisRun
|
|
5
|
+
local postUseItemGlowingHourGlass, postPlayerInit, preGameExit, postNewLevel, postNewRoomEarly, restoreDefaultsAll, restoreDefaults, clearAndCopyAllElements, RESETTABLE_SAVE_DATA_KEYS, mod, loadedDataOnThisRun
|
|
6
6
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
7
|
+
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
7
8
|
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
8
9
|
local ____cachedClasses = require("src.core.cachedClasses")
|
|
9
10
|
local game = ____cachedClasses.game
|
|
@@ -33,6 +34,9 @@ local saveToDisk = ____save.saveToDisk
|
|
|
33
34
|
local ____saveDataManagerConstants = require("src.features.saveDataManager.saveDataManagerConstants")
|
|
34
35
|
local SAVE_DATA_MANAGER_DEBUG = ____saveDataManagerConstants.SAVE_DATA_MANAGER_DEBUG
|
|
35
36
|
local SAVE_DATA_MANAGER_FEATURE_NAME = ____saveDataManagerConstants.SAVE_DATA_MANAGER_FEATURE_NAME
|
|
37
|
+
function postUseItemGlowingHourGlass(self)
|
|
38
|
+
return nil
|
|
39
|
+
end
|
|
36
40
|
function postPlayerInit(self)
|
|
37
41
|
if mod == nil then
|
|
38
42
|
error(("The mod for the " .. SAVE_DATA_MANAGER_FEATURE_NAME) .. " was not initialized.")
|
|
@@ -115,6 +119,7 @@ mod = nil
|
|
|
115
119
|
loadedDataOnThisRun = false
|
|
116
120
|
function ____exports.saveDataManagerInit(self, incomingMod)
|
|
117
121
|
mod = incomingMod
|
|
122
|
+
mod:AddCallback(ModCallback.POST_USE_ITEM, postUseItemGlowingHourGlass, CollectibleType.GLOWING_HOUR_GLASS)
|
|
118
123
|
mod:AddCallback(ModCallback.POST_PLAYER_INIT, postPlayerInit)
|
|
119
124
|
mod:AddCallback(ModCallback.PRE_GAME_EXIT, preGameExit)
|
|
120
125
|
mod:AddCallback(ModCallback.POST_NEW_LEVEL, postNewLevel)
|
|
@@ -11,6 +11,8 @@ export declare function getCollectibleChargeType(collectibleType: CollectibleTyp
|
|
|
11
11
|
/**
|
|
12
12
|
* Helper function to get the in-game description for a collectible. Returns "Unknown" if the
|
|
13
13
|
* provided collectible type was not valid.
|
|
14
|
+
*
|
|
15
|
+
* This function works for both vanilla and modded collectibles.
|
|
14
16
|
*/
|
|
15
17
|
export declare function getCollectibleDescription(collectibleType: CollectibleType): string;
|
|
16
18
|
/**
|
|
@@ -103,6 +105,8 @@ export declare function getCollectibleMaxCharges(collectibleType: CollectibleTyp
|
|
|
103
105
|
* type is not valid.
|
|
104
106
|
*
|
|
105
107
|
* For example, `getCollectibleName(CollectibleType.SAD_ONION)` would return "Sad Onion".
|
|
108
|
+
*
|
|
109
|
+
* This function works for both vanilla and modded collectibles.
|
|
106
110
|
*/
|
|
107
111
|
export declare function getCollectibleName(collectibleType: CollectibleType): string;
|
|
108
112
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collectibles.d.ts","sourceRoot":"","sources":["../../../src/functions/collectibles.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EAEvB,eAAe,EAEf,oBAAoB,EACpB,aAAa,EAEb,QAAQ,EACR,WAAW,EAGZ,MAAM,8BAA8B,CAAC;AAgBtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAwB7D,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAEtE;AAED,6FAA6F;AAC7F,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,OAAO,CAsBT;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,eAAe,EAAE,eAAe,GAC/B,oBAAoB,CAOtB;AAED
|
|
1
|
+
{"version":3,"file":"collectibles.d.ts","sourceRoot":"","sources":["../../../src/functions/collectibles.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EAEvB,eAAe,EAEf,oBAAoB,EACpB,aAAa,EAEb,QAAQ,EACR,WAAW,EAGZ,MAAM,8BAA8B,CAAC;AAgBtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAwB7D,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAEtE;AAED,6FAA6F;AAC7F,wBAA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WG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,YAAY,EACzB,OAAO,EAAE,MAAM,GAAG,SAAS,GAC1B,IAAI,CAqBN;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,YAAY,EACzB,kBAAkB,EAAE,eAAe,GAClC,IAAI,CA2BN;AAED;;;GAGG;AACH,wBAAgB,qCAAqC,IAAI,IAAI,CAK5D"}
|
|
@@ -142,6 +142,8 @@ function ____exports.getCollectibleChargeType(self, collectibleType)
|
|
|
142
142
|
end
|
|
143
143
|
--- Helper function to get the in-game description for a collectible. Returns "Unknown" if the
|
|
144
144
|
-- provided collectible type was not valid.
|
|
145
|
+
--
|
|
146
|
+
-- This function works for both vanilla and modded collectibles.
|
|
145
147
|
function ____exports.getCollectibleDescription(self, collectibleType)
|
|
146
148
|
local collectibleDescription = COLLECTIBLE_DESCRIPTION_MAP:get(collectibleType)
|
|
147
149
|
if collectibleDescription ~= nil then
|
|
@@ -293,6 +295,8 @@ end
|
|
|
293
295
|
-- type is not valid.
|
|
294
296
|
--
|
|
295
297
|
-- For example, `getCollectibleName(CollectibleType.SAD_ONION)` would return "Sad Onion".
|
|
298
|
+
--
|
|
299
|
+
-- This function works for both vanilla and modded collectibles.
|
|
296
300
|
function ____exports.getCollectibleName(self, collectibleType)
|
|
297
301
|
local collectibleName = COLLECTIBLE_TYPE_TO_NAME_MAP:get(collectibleType)
|
|
298
302
|
if collectibleName ~= nil then
|
|
@@ -13,7 +13,7 @@ export declare function copyMap<K, V>(oldMap: Map<K, V>): Map<K, V>;
|
|
|
13
13
|
* ["bar", 456],
|
|
14
14
|
* ]);
|
|
15
15
|
* const searchText = "f";
|
|
16
|
-
* const match = getMapPartialMatch(map, searchText); // match is now equal to 123
|
|
16
|
+
* const match = getMapPartialMatch(map, searchText); // match is now equal to ["foo", 123]
|
|
17
17
|
*
|
|
18
18
|
* @returns If a match was found, returns a tuple of the map key and value. If a match was not
|
|
19
19
|
* found, returns undefined.
|
|
@@ -30,7 +30,7 @@ end
|
|
|
30
30
|
-- ["bar", 456],
|
|
31
31
|
-- ]);
|
|
32
32
|
-- const searchText = "f";
|
|
33
|
-
-- const match = getMapPartialMatch(map, searchText); // match is now equal to 123
|
|
33
|
+
-- const match = getMapPartialMatch(map, searchText); // match is now equal to ["foo", 123]
|
|
34
34
|
--
|
|
35
35
|
-- @returns If a match was found, returns a tuple of the map key and value. If a match was not
|
|
36
36
|
-- found, returns undefined.
|
|
@@ -33,6 +33,9 @@ export declare function getTearsStat(fireDelay: float): float;
|
|
|
33
33
|
* only use this function in the `POST_TEAR_INIT_VERY_LATE` callback or on frame 1+.
|
|
34
34
|
*
|
|
35
35
|
* If this function is called on frame 0, it will throw a run-time error.
|
|
36
|
+
*
|
|
37
|
+
* Note that this function does not work properly when the tear is from a Lead Pencil barrage. In
|
|
38
|
+
* this case, it will always appear as if the tear is coming from a player.
|
|
36
39
|
*/
|
|
37
40
|
export declare function isTearFromFamiliar(tear: EntityTear): boolean;
|
|
38
41
|
/**
|
|
@@ -45,6 +48,9 @@ export declare function isTearFromFamiliar(tear: EntityTear): boolean;
|
|
|
45
48
|
* only use this function in the `POST_TEAR_INIT_VERY_LATE` callback or on frame 1+.
|
|
46
49
|
*
|
|
47
50
|
* If this function is called on frame 0, it will throw a run-time error.
|
|
51
|
+
*
|
|
52
|
+
* Note that this function does not work properly when the tear is from a Lead Pencil barrage. In
|
|
53
|
+
* this case, it will always appear as if the tear is coming from a player.
|
|
48
54
|
*/
|
|
49
55
|
export declare function isTearFromPlayer(tear: EntityTear): boolean;
|
|
50
56
|
//# sourceMappingURL=tears.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tears.d.ts","sourceRoot":"","sources":["../../../src/functions/tears.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,KAAK,GAAG,IAAI,CAKzE;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,KAAK,GAAG,KAAK,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,KAAK,GAAG,KAAK,CAEpD;AAED
|
|
1
|
+
{"version":3,"file":"tears.d.ts","sourceRoot":"","sources":["../../../src/functions/tears.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,KAAK,GAAG,IAAI,CAKzE;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,KAAK,GAAG,KAAK,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,KAAK,GAAG,KAAK,CAEpD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAgB5D;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAgB1D"}
|