isaacscript-common 9.8.1 → 9.8.4
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/callbacks/postPlayerFatalDamage.lua +1 -1
- package/dist/features/debugDisplay/debugDisplay.lua +1 -6
- package/dist/features/extraConsoleCommands/init.lua +51 -160
- package/dist/features/extraConsoleCommands/listCommands.d.ts +25 -9
- package/dist/features/extraConsoleCommands/listCommands.d.ts.map +1 -1
- package/dist/features/extraConsoleCommands/listCommands.lua +70 -30
- package/dist/features/extraConsoleCommands/v.d.ts +8 -0
- package/dist/features/extraConsoleCommands/v.d.ts.map +1 -1
- package/dist/features/extraConsoleCommands/v.lua +11 -1
- package/dist/functions/charge.lua +2 -2
- package/dist/functions/log.d.ts.map +1 -1
- package/dist/functions/log.lua +3 -0
- package/package.json +2 -2
- package/src/callbacks/postPlayerFatalDamage.ts +1 -1
- package/src/features/debugDisplay/debugDisplay.ts +1 -1
- package/src/features/extraConsoleCommands/init.ts +58 -266
- package/src/features/extraConsoleCommands/listCommands.ts +97 -39
- package/src/features/extraConsoleCommands/v.ts +9 -0
- package/src/functions/charge.ts +2 -2
- package/src/functions/log.ts +3 -0
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "isaac-typescript-definitions";
|
|
10
10
|
import { ModUpgraded } from "../../classes/ModUpgraded";
|
|
11
11
|
import { MAX_SPEED_STAT } from "../../core/constants";
|
|
12
|
-
import { bitFlags } from "../../functions/flag";
|
|
12
|
+
import { addFlag, bitFlags } from "../../functions/flag";
|
|
13
13
|
import { getMapPartialMatch } from "../../functions/map";
|
|
14
14
|
import { printConsole } from "../../functions/utils";
|
|
15
15
|
import { debugDisplayInit } from "../debugDisplay/debugDisplay";
|
|
@@ -19,274 +19,20 @@ import * as commands from "./listCommands";
|
|
|
19
19
|
import v, { extraConsoleCommandsFunctionMap } from "./v";
|
|
20
20
|
|
|
21
21
|
export function extraConsoleCommandsInit(mod: ModUpgraded): void {
|
|
22
|
-
saveDataManager("extraConsoleCommands", v,
|
|
23
|
-
|
|
22
|
+
saveDataManager("extraConsoleCommands", v, false);
|
|
23
|
+
initCommandMap();
|
|
24
24
|
initCallbacks(mod);
|
|
25
25
|
debugDisplayInit(mod);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
extraConsoleCommandsFunctionMap.set("blackMarket", commands.blackMarket);
|
|
37
|
-
extraConsoleCommandsFunctionMap.set("bloodCharges", commands.bloodCharges);
|
|
38
|
-
extraConsoleCommandsFunctionMap.set("bm", commands.bm);
|
|
39
|
-
extraConsoleCommandsFunctionMap.set("bomb", commands.bomb);
|
|
40
|
-
extraConsoleCommandsFunctionMap.set(
|
|
41
|
-
"bombDisplay",
|
|
42
|
-
commandsDisplay.bombDisplay,
|
|
43
|
-
);
|
|
44
|
-
extraConsoleCommandsFunctionMap.set(
|
|
45
|
-
"bombsDisplay",
|
|
46
|
-
commandsDisplay.bombsDisplay,
|
|
47
|
-
);
|
|
48
|
-
extraConsoleCommandsFunctionMap.set("bombs", commands.bombs);
|
|
49
|
-
extraConsoleCommandsFunctionMap.set("boneHearts", commands.boneHearts);
|
|
50
|
-
extraConsoleCommandsFunctionMap.set("boss", commands.boss);
|
|
51
|
-
extraConsoleCommandsFunctionMap.set("bossNextRoom", commands.bossNextRoom);
|
|
52
|
-
extraConsoleCommandsFunctionMap.set("bossRoom", commands.bossRoom);
|
|
53
|
-
extraConsoleCommandsFunctionMap.set("bossRush", commands.bossRush);
|
|
54
|
-
extraConsoleCommandsFunctionMap.set("brokenHearts", commands.brokenHearts);
|
|
55
|
-
extraConsoleCommandsFunctionMap.set("card", commands.card);
|
|
56
|
-
extraConsoleCommandsFunctionMap.set("cards", commands.cards);
|
|
57
|
-
extraConsoleCommandsFunctionMap.set("cc", commands.cc);
|
|
58
|
-
extraConsoleCommandsFunctionMap.set("getChallenge", commands.getChallenge);
|
|
59
|
-
extraConsoleCommandsFunctionMap.set(
|
|
60
|
-
"chaosCardTears",
|
|
61
|
-
commands.chaosCardTears,
|
|
62
|
-
);
|
|
63
|
-
extraConsoleCommandsFunctionMap.set("character", commands.characterCommand);
|
|
64
|
-
extraConsoleCommandsFunctionMap.set("charge", commands.charge);
|
|
65
|
-
extraConsoleCommandsFunctionMap.set("cleanBedroom", commands.cleanBedroom);
|
|
66
|
-
extraConsoleCommandsFunctionMap.set("coin", commands.coin);
|
|
67
|
-
extraConsoleCommandsFunctionMap.set("coins", commands.coins);
|
|
68
|
-
extraConsoleCommandsFunctionMap.set("crawlSpace", commands.crawlSpace);
|
|
69
|
-
extraConsoleCommandsFunctionMap.set("d20", commands.d20);
|
|
70
|
-
extraConsoleCommandsFunctionMap.set("d6", commands.d6);
|
|
71
|
-
extraConsoleCommandsFunctionMap.set("dadsNote", commands.dadsNote);
|
|
72
|
-
extraConsoleCommandsFunctionMap.set("damage", commands.damage);
|
|
73
|
-
extraConsoleCommandsFunctionMap.set("dd", commands.dd);
|
|
74
|
-
extraConsoleCommandsFunctionMap.set("devilRoom", commands.devilRoom);
|
|
75
|
-
extraConsoleCommandsFunctionMap.set("dirtyBedroom", commands.dirtyBedroom);
|
|
76
|
-
extraConsoleCommandsFunctionMap.set("disableCurses", commands.disableCurses);
|
|
77
|
-
extraConsoleCommandsFunctionMap.set(
|
|
78
|
-
"doorDisplay",
|
|
79
|
-
commandsDisplay.doorDisplay,
|
|
80
|
-
);
|
|
81
|
-
extraConsoleCommandsFunctionMap.set(
|
|
82
|
-
"doorsDisplay",
|
|
83
|
-
commandsDisplay.doorsDisplay,
|
|
84
|
-
);
|
|
85
|
-
extraConsoleCommandsFunctionMap.set("down", commands.down);
|
|
86
|
-
extraConsoleCommandsFunctionMap.set("dungeon", commands.dungeon);
|
|
87
|
-
extraConsoleCommandsFunctionMap.set(
|
|
88
|
-
"effectDisplay",
|
|
89
|
-
commandsDisplay.effectDisplay,
|
|
90
|
-
);
|
|
91
|
-
extraConsoleCommandsFunctionMap.set("effects", commands.effects);
|
|
92
|
-
extraConsoleCommandsFunctionMap.set(
|
|
93
|
-
"effectsDisplay",
|
|
94
|
-
commandsDisplay.effectsDisplay,
|
|
95
|
-
);
|
|
96
|
-
extraConsoleCommandsFunctionMap.set("eh", commands.eh);
|
|
97
|
-
extraConsoleCommandsFunctionMap.set("errorRoom", commands.errorRoom);
|
|
98
|
-
extraConsoleCommandsFunctionMap.set("eternalHearts", commands.eternalHearts);
|
|
99
|
-
extraConsoleCommandsFunctionMap.set(
|
|
100
|
-
"familiarDisplay",
|
|
101
|
-
commandsDisplay.familiarDisplay,
|
|
102
|
-
);
|
|
103
|
-
extraConsoleCommandsFunctionMap.set(
|
|
104
|
-
"familiarsDisplay",
|
|
105
|
-
commandsDisplay.familiarsDisplay,
|
|
106
|
-
);
|
|
107
|
-
extraConsoleCommandsFunctionMap.set("flight", commands.flight);
|
|
108
|
-
extraConsoleCommandsFunctionMap.set("fool", commands.fool);
|
|
109
|
-
extraConsoleCommandsFunctionMap.set("getPosition", commands.getPosition);
|
|
110
|
-
extraConsoleCommandsFunctionMap.set("gigaBomb", commands.gigaBomb);
|
|
111
|
-
extraConsoleCommandsFunctionMap.set("goldBomb", commands.goldBomb);
|
|
112
|
-
extraConsoleCommandsFunctionMap.set("goldHearts", commands.goldHearts);
|
|
113
|
-
extraConsoleCommandsFunctionMap.set("goldKey", commands.goldKey);
|
|
114
|
-
extraConsoleCommandsFunctionMap.set("goldenBomb", commands.goldenBomb);
|
|
115
|
-
extraConsoleCommandsFunctionMap.set("goldenHearts", commands.goldenHearts);
|
|
116
|
-
extraConsoleCommandsFunctionMap.set("goldenKey", commands.goldenKey);
|
|
117
|
-
extraConsoleCommandsFunctionMap.set("grid", commands.grid);
|
|
118
|
-
extraConsoleCommandsFunctionMap.set("grid2", commands.grid2);
|
|
119
|
-
extraConsoleCommandsFunctionMap.set("gridCosts", commands.gridCosts);
|
|
120
|
-
extraConsoleCommandsFunctionMap.set("gridEntities", commands.gridEntities);
|
|
121
|
-
extraConsoleCommandsFunctionMap.set("hearts", commands.hearts);
|
|
122
|
-
extraConsoleCommandsFunctionMap.set("hitboxes", commands.hitboxes);
|
|
123
|
-
extraConsoleCommandsFunctionMap.set("iAmErrorRoom", commands.iAmErrorRoom);
|
|
124
|
-
extraConsoleCommandsFunctionMap.set("key", commands.key);
|
|
125
|
-
extraConsoleCommandsFunctionMap.set("keys", commands.keys);
|
|
126
|
-
extraConsoleCommandsFunctionMap.set(
|
|
127
|
-
"knifeDisplay",
|
|
128
|
-
commandsDisplay.knifeDisplay,
|
|
129
|
-
);
|
|
130
|
-
extraConsoleCommandsFunctionMap.set(
|
|
131
|
-
"knivesDisplay",
|
|
132
|
-
commandsDisplay.knivesDisplay,
|
|
133
|
-
);
|
|
134
|
-
extraConsoleCommandsFunctionMap.set(
|
|
135
|
-
"laserDisplay",
|
|
136
|
-
commandsDisplay.laserDisplay,
|
|
137
|
-
);
|
|
138
|
-
extraConsoleCommandsFunctionMap.set(
|
|
139
|
-
"lasersDisplay",
|
|
140
|
-
commandsDisplay.lasersDisplay,
|
|
141
|
-
);
|
|
142
|
-
extraConsoleCommandsFunctionMap.set("left", commands.left);
|
|
143
|
-
extraConsoleCommandsFunctionMap.set("library", commands.library);
|
|
144
|
-
extraConsoleCommandsFunctionMap.set("list", commands.list);
|
|
145
|
-
extraConsoleCommandsFunctionMap.set("listAll", commands.listAll);
|
|
146
|
-
extraConsoleCommandsFunctionMap.set("listGrid", commands.listGrid);
|
|
147
|
-
extraConsoleCommandsFunctionMap.set("listGridAll", commands.listGridAll);
|
|
148
|
-
extraConsoleCommandsFunctionMap.set("lowHP", commands.lowHP);
|
|
149
|
-
extraConsoleCommandsFunctionMap.set("luck", commands.luck);
|
|
150
|
-
extraConsoleCommandsFunctionMap.set("mana", commands.mana);
|
|
151
|
-
extraConsoleCommandsFunctionMap.set("map", commands.map);
|
|
152
|
-
extraConsoleCommandsFunctionMap.set("maxHearts", commands.maxHearts);
|
|
153
|
-
extraConsoleCommandsFunctionMap.set("miniboss", commands.miniboss);
|
|
154
|
-
extraConsoleCommandsFunctionMap.set("noCurses", commands.noCurses);
|
|
155
|
-
extraConsoleCommandsFunctionMap.set("npcDisplay", commandsDisplay.npcDisplay);
|
|
156
|
-
extraConsoleCommandsFunctionMap.set(
|
|
157
|
-
"npcsDisplay",
|
|
158
|
-
commandsDisplay.npcsDisplay,
|
|
159
|
-
);
|
|
160
|
-
extraConsoleCommandsFunctionMap.set(
|
|
161
|
-
"pickupDisplay",
|
|
162
|
-
commandsDisplay.pickupDisplay,
|
|
163
|
-
);
|
|
164
|
-
extraConsoleCommandsFunctionMap.set(
|
|
165
|
-
"pickupsDisplay",
|
|
166
|
-
commandsDisplay.pickupsDisplay,
|
|
167
|
-
);
|
|
168
|
-
extraConsoleCommandsFunctionMap.set("pill", commands.pill);
|
|
169
|
-
extraConsoleCommandsFunctionMap.set("pills", commands.pills);
|
|
170
|
-
extraConsoleCommandsFunctionMap.set("pitDisplay", commandsDisplay.pitDisplay);
|
|
171
|
-
extraConsoleCommandsFunctionMap.set(
|
|
172
|
-
"pitsDisplay",
|
|
173
|
-
commandsDisplay.pitsDisplay,
|
|
174
|
-
);
|
|
175
|
-
extraConsoleCommandsFunctionMap.set("planetarium", commands.planetarium);
|
|
176
|
-
extraConsoleCommandsFunctionMap.set(
|
|
177
|
-
"playerDisplay",
|
|
178
|
-
commandsDisplay.playerDisplay,
|
|
179
|
-
);
|
|
180
|
-
extraConsoleCommandsFunctionMap.set(
|
|
181
|
-
"playersDisplay",
|
|
182
|
-
commandsDisplay.playersDisplay,
|
|
183
|
-
);
|
|
184
|
-
extraConsoleCommandsFunctionMap.set("playSound", commands.playSound);
|
|
185
|
-
extraConsoleCommandsFunctionMap.set("pocket", commands.pocket);
|
|
186
|
-
extraConsoleCommandsFunctionMap.set(
|
|
187
|
-
"poopDisplay",
|
|
188
|
-
commandsDisplay.poopDisplay,
|
|
189
|
-
);
|
|
190
|
-
extraConsoleCommandsFunctionMap.set("poopMana", commands.poopMana);
|
|
191
|
-
extraConsoleCommandsFunctionMap.set(
|
|
192
|
-
"poopsDisplay",
|
|
193
|
-
commandsDisplay.poopsDisplay,
|
|
194
|
-
);
|
|
195
|
-
extraConsoleCommandsFunctionMap.set("position", commands.positionCommand);
|
|
196
|
-
extraConsoleCommandsFunctionMap.set(
|
|
197
|
-
"pressurePlateDisplay",
|
|
198
|
-
commandsDisplay.pressurePlateDisplay,
|
|
199
|
-
);
|
|
200
|
-
extraConsoleCommandsFunctionMap.set(
|
|
201
|
-
"pressurePlatesDisplay",
|
|
202
|
-
commandsDisplay.pressurePlatesDisplay,
|
|
203
|
-
);
|
|
204
|
-
extraConsoleCommandsFunctionMap.set(
|
|
205
|
-
"projectileDisplay",
|
|
206
|
-
commandsDisplay.projectileDisplay,
|
|
207
|
-
);
|
|
208
|
-
extraConsoleCommandsFunctionMap.set(
|
|
209
|
-
"projectilesDisplay",
|
|
210
|
-
commandsDisplay.projectilesDisplay,
|
|
211
|
-
);
|
|
212
|
-
extraConsoleCommandsFunctionMap.set("redHearts", commands.redHearts);
|
|
213
|
-
extraConsoleCommandsFunctionMap.set("right", commands.right);
|
|
214
|
-
extraConsoleCommandsFunctionMap.set(
|
|
215
|
-
"rockDisplay",
|
|
216
|
-
commandsDisplay.rockDisplay,
|
|
217
|
-
);
|
|
218
|
-
extraConsoleCommandsFunctionMap.set(
|
|
219
|
-
"rocksDisplay",
|
|
220
|
-
commandsDisplay.rocksDisplay,
|
|
221
|
-
);
|
|
222
|
-
extraConsoleCommandsFunctionMap.set("room", commands.roomCommand);
|
|
223
|
-
extraConsoleCommandsFunctionMap.set("rottenHearts", commands.rottenHearts);
|
|
224
|
-
extraConsoleCommandsFunctionMap.set("runTests", commands.runTests);
|
|
225
|
-
extraConsoleCommandsFunctionMap.set("s", commands.s);
|
|
226
|
-
extraConsoleCommandsFunctionMap.set("sacrificeRoom", commands.sacrificeRoom);
|
|
227
|
-
extraConsoleCommandsFunctionMap.set("secretRoom", commands.secretRoom);
|
|
228
|
-
extraConsoleCommandsFunctionMap.set("seedStick", commands.seedStick);
|
|
229
|
-
extraConsoleCommandsFunctionMap.set("seeds", commands.seedsCommand);
|
|
230
|
-
extraConsoleCommandsFunctionMap.set("setCharges", commands.setCharges);
|
|
231
|
-
extraConsoleCommandsFunctionMap.set("setPosition", commands.setPosition);
|
|
232
|
-
extraConsoleCommandsFunctionMap.set("shop", commands.shop);
|
|
233
|
-
extraConsoleCommandsFunctionMap.set(
|
|
234
|
-
"slotDisplay",
|
|
235
|
-
commandsDisplay.slotDisplay,
|
|
236
|
-
);
|
|
237
|
-
extraConsoleCommandsFunctionMap.set(
|
|
238
|
-
"slotsDisplay",
|
|
239
|
-
commandsDisplay.slotsDisplay,
|
|
240
|
-
);
|
|
241
|
-
extraConsoleCommandsFunctionMap.set("smelt", commands.smelt);
|
|
242
|
-
extraConsoleCommandsFunctionMap.set("soulCharges", commands.soulCharges);
|
|
243
|
-
extraConsoleCommandsFunctionMap.set("soulHearts", commands.soulHearts);
|
|
244
|
-
extraConsoleCommandsFunctionMap.set("sound", commands.sound);
|
|
245
|
-
extraConsoleCommandsFunctionMap.set("sounds", commands.sounds);
|
|
246
|
-
extraConsoleCommandsFunctionMap.set("spam", commands.spam);
|
|
247
|
-
extraConsoleCommandsFunctionMap.set(
|
|
248
|
-
"spawnGoldenTrinket",
|
|
249
|
-
commands.spawnGoldenTrinket,
|
|
250
|
-
);
|
|
251
|
-
extraConsoleCommandsFunctionMap.set("speed", commands.speed);
|
|
252
|
-
extraConsoleCommandsFunctionMap.set(
|
|
253
|
-
"spikeDisplay",
|
|
254
|
-
commandsDisplay.spikeDisplay,
|
|
255
|
-
);
|
|
256
|
-
extraConsoleCommandsFunctionMap.set(
|
|
257
|
-
"spikesDisplay",
|
|
258
|
-
commandsDisplay.spikesDisplay,
|
|
259
|
-
);
|
|
260
|
-
extraConsoleCommandsFunctionMap.set(
|
|
261
|
-
"superSecretRoom",
|
|
262
|
-
commands.superSecretRoom,
|
|
263
|
-
);
|
|
264
|
-
extraConsoleCommandsFunctionMap.set("startingRoom", commands.startingRoom);
|
|
265
|
-
extraConsoleCommandsFunctionMap.set("startRoom", commands.startRoom);
|
|
266
|
-
extraConsoleCommandsFunctionMap.set(
|
|
267
|
-
"tearDisplay",
|
|
268
|
-
commandsDisplay.tearDisplay,
|
|
269
|
-
);
|
|
270
|
-
extraConsoleCommandsFunctionMap.set("tears", commands.tears);
|
|
271
|
-
extraConsoleCommandsFunctionMap.set(
|
|
272
|
-
"tearsDisplay",
|
|
273
|
-
commandsDisplay.tearsDisplay,
|
|
274
|
-
);
|
|
275
|
-
extraConsoleCommandsFunctionMap.set("tests", commands.tests);
|
|
276
|
-
extraConsoleCommandsFunctionMap.set("tntDisplay", commandsDisplay.tntDisplay);
|
|
277
|
-
extraConsoleCommandsFunctionMap.set(
|
|
278
|
-
"tntsDisplay",
|
|
279
|
-
commandsDisplay.tntsDisplay,
|
|
280
|
-
);
|
|
281
|
-
extraConsoleCommandsFunctionMap.set("trapdoor", commands.trapdoorCommand);
|
|
282
|
-
extraConsoleCommandsFunctionMap.set("treasureRoom", commands.treasureRoom);
|
|
283
|
-
extraConsoleCommandsFunctionMap.set(
|
|
284
|
-
"ultraSecretRoom",
|
|
285
|
-
commands.ultraSecretRoom,
|
|
286
|
-
);
|
|
287
|
-
extraConsoleCommandsFunctionMap.set("unseed", commands.unseed);
|
|
288
|
-
extraConsoleCommandsFunctionMap.set("up", commands.up);
|
|
289
|
-
extraConsoleCommandsFunctionMap.set("warp", commands.warp);
|
|
28
|
+
function initCommandMap() {
|
|
29
|
+
for (const [funcName, func] of Object.entries(commands)) {
|
|
30
|
+
extraConsoleCommandsFunctionMap.set(funcName, func);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
for (const [funcName, func] of Object.entries(commandsDisplay)) {
|
|
34
|
+
extraConsoleCommandsFunctionMap.set(funcName, func);
|
|
35
|
+
}
|
|
290
36
|
}
|
|
291
37
|
|
|
292
38
|
function initCallbacks(mod: ModUpgraded) {
|
|
@@ -368,7 +114,53 @@ function entityTakeDmgPlayer(
|
|
|
368
114
|
function postCurseEval(
|
|
369
115
|
curses: BitFlags<LevelCurse>,
|
|
370
116
|
): BitFlags<LevelCurse> | undefined {
|
|
371
|
-
|
|
117
|
+
if (v.persistent.disableCurses) {
|
|
118
|
+
return bitFlags(LevelCurse.NONE);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
let newCurses = curses;
|
|
122
|
+
|
|
123
|
+
// 1
|
|
124
|
+
if (v.persistent.darkness) {
|
|
125
|
+
newCurses = addFlag(newCurses, LevelCurse.DARKNESS);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// 2
|
|
129
|
+
if (v.persistent.labyrinth) {
|
|
130
|
+
newCurses = addFlag(newCurses, LevelCurse.LABYRINTH);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// 3
|
|
134
|
+
if (v.persistent.lost) {
|
|
135
|
+
newCurses = addFlag(newCurses, LevelCurse.LOST);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// 4
|
|
139
|
+
if (v.persistent.unknown) {
|
|
140
|
+
newCurses = addFlag(newCurses, LevelCurse.UNKNOWN);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// 5
|
|
144
|
+
if (v.persistent.cursed) {
|
|
145
|
+
newCurses = addFlag(newCurses, LevelCurse.CURSED);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// 6
|
|
149
|
+
if (v.persistent.maze) {
|
|
150
|
+
newCurses = addFlag(newCurses, LevelCurse.MAZE);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// 7
|
|
154
|
+
if (v.persistent.blind) {
|
|
155
|
+
newCurses = addFlag(newCurses, LevelCurse.BLIND);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// 8
|
|
159
|
+
if (v.persistent.giant) {
|
|
160
|
+
newCurses = addFlag(newCurses, LevelCurse.GIANT);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
return curses === newCurses ? undefined : newCurses;
|
|
372
164
|
}
|
|
373
165
|
|
|
374
166
|
// ModCallback.EXECUTE_CMD (22)
|
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
// below "exports.ts".
|
|
3
3
|
|
|
4
4
|
// cspell:ignore addcharges
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
eslint "sort-exports/sort-exports": [
|
|
8
|
+
"error",
|
|
9
|
+
{
|
|
10
|
+
sortDir: "asc",
|
|
11
|
+
},
|
|
12
|
+
],
|
|
13
|
+
*/
|
|
14
|
+
|
|
5
15
|
/**
|
|
6
16
|
* This is a list of custom console commands that are included with the standard library.
|
|
7
17
|
*
|
|
@@ -214,6 +224,12 @@ export function blackMarket(): void {
|
|
|
214
224
|
changeRoom(GridRoom.BLACK_MARKET);
|
|
215
225
|
}
|
|
216
226
|
|
|
227
|
+
/** Toggles permanent Curse of the Blind. */
|
|
228
|
+
export function blind(): void {
|
|
229
|
+
v.persistent.blind = !v.persistent.blind;
|
|
230
|
+
printEnabled(v.persistent.blind, "permanent Curse of the Blind");
|
|
231
|
+
}
|
|
232
|
+
|
|
217
233
|
/**
|
|
218
234
|
* Gives a blood charge. This only affects Bethany. Provide a number to give a custom amount of
|
|
219
235
|
* charges. (You can use negative numbers to remove charges.)
|
|
@@ -364,8 +380,8 @@ export function cards(): void {
|
|
|
364
380
|
return;
|
|
365
381
|
}
|
|
366
382
|
|
|
367
|
-
const
|
|
368
|
-
spawnCard(asCardType(cardType),
|
|
383
|
+
const worldPosition = gridCoordinatesToWorldPosition(x, y);
|
|
384
|
+
spawnCard(asCardType(cardType), worldPosition);
|
|
369
385
|
cardType++;
|
|
370
386
|
}
|
|
371
387
|
}
|
|
@@ -376,17 +392,6 @@ export function cc(): void {
|
|
|
376
392
|
chaosCardTears();
|
|
377
393
|
}
|
|
378
394
|
|
|
379
|
-
/** Displays the current challenge, if any. */
|
|
380
|
-
export function getChallenge(): void {
|
|
381
|
-
const challenge = Isaac.GetChallenge();
|
|
382
|
-
const challengeName = Challenge[challenge];
|
|
383
|
-
const challengeDescription =
|
|
384
|
-
challengeName === undefined
|
|
385
|
-
? `${challenge} (custom)`
|
|
386
|
-
: `Challenge.${challengeName} (${challenge})`;
|
|
387
|
-
printConsole(`The current challenge is: ${challengeDescription}`);
|
|
388
|
-
}
|
|
389
|
-
|
|
390
395
|
/**
|
|
391
396
|
* Toggles Chaos Card tears for the player. Useful for killing enemies very fast without using
|
|
392
397
|
* "debug 10".
|
|
@@ -404,13 +409,13 @@ export function chaosCardTears(): void {
|
|
|
404
409
|
* - character 2 - Restarts as Cain.
|
|
405
410
|
* - character ta - Restarts as Tainted Azazel.
|
|
406
411
|
*/
|
|
407
|
-
export function
|
|
412
|
+
export function character(params: string): void {
|
|
408
413
|
if (params === "") {
|
|
409
414
|
printConsole("You must specify a character name or number.");
|
|
410
415
|
return;
|
|
411
416
|
}
|
|
412
417
|
|
|
413
|
-
let
|
|
418
|
+
let playerType: PlayerType;
|
|
414
419
|
const num = tonumber(params) as PlayerType | undefined;
|
|
415
420
|
if (num === undefined) {
|
|
416
421
|
const match = getMapPartialMatch(params, CHARACTER_MAP);
|
|
@@ -419,19 +424,19 @@ export function characterCommand(params: string): void {
|
|
|
419
424
|
return;
|
|
420
425
|
}
|
|
421
426
|
|
|
422
|
-
|
|
427
|
+
playerType = match[1];
|
|
423
428
|
} else {
|
|
424
429
|
if (num < FIRST_CHARACTER || num > LAST_VANILLA_CHARACTER) {
|
|
425
430
|
printConsole(`Invalid player sub-type: ${num}`);
|
|
426
431
|
return;
|
|
427
432
|
}
|
|
428
433
|
|
|
429
|
-
|
|
434
|
+
playerType = num;
|
|
430
435
|
}
|
|
431
436
|
|
|
432
|
-
const characterName = getCharacterName(
|
|
433
|
-
restart(
|
|
434
|
-
printConsole(`Restarting as character: ${characterName} (${
|
|
437
|
+
const characterName = getCharacterName(playerType);
|
|
438
|
+
restart(playerType);
|
|
439
|
+
printConsole(`Restarting as character: ${characterName} (${playerType})`);
|
|
435
440
|
}
|
|
436
441
|
|
|
437
442
|
/** Alias for the "addCharges" command. */
|
|
@@ -489,6 +494,12 @@ export function crawlSpace(): void {
|
|
|
489
494
|
spawnTrapdoorOrCrawlSpace(false);
|
|
490
495
|
}
|
|
491
496
|
|
|
497
|
+
/** Toggles permanent Curse of the Cursed. */
|
|
498
|
+
export function cursed(): void {
|
|
499
|
+
v.persistent.cursed = !v.persistent.cursed;
|
|
500
|
+
printEnabled(v.persistent.cursed, "permanent Curse of the Cursed");
|
|
501
|
+
}
|
|
502
|
+
|
|
492
503
|
/** Uses the D20. */
|
|
493
504
|
export function d20(): void {
|
|
494
505
|
const player = Isaac.GetPlayer();
|
|
@@ -514,6 +525,12 @@ export function damage(): void {
|
|
|
514
525
|
printEnabled(v.run.maxDamage, "debug damage");
|
|
515
526
|
}
|
|
516
527
|
|
|
528
|
+
/** Toggles permanent Curse of Darkness. */
|
|
529
|
+
export function darkness(): void {
|
|
530
|
+
v.persistent.darkness = !v.persistent.darkness;
|
|
531
|
+
printEnabled(v.persistent.darkness, "permanent Curse of Darkness");
|
|
532
|
+
}
|
|
533
|
+
|
|
517
534
|
/** Alias for the "devil" command. */
|
|
518
535
|
export function dd(): void {
|
|
519
536
|
devilRoom();
|
|
@@ -604,6 +621,17 @@ export function fool(): void {
|
|
|
604
621
|
startingRoom();
|
|
605
622
|
}
|
|
606
623
|
|
|
624
|
+
/** Displays the current challenge, if any. */
|
|
625
|
+
export function getChallenge(): void {
|
|
626
|
+
const challenge = Isaac.GetChallenge();
|
|
627
|
+
const challengeName = Challenge[challenge];
|
|
628
|
+
const challengeDescription =
|
|
629
|
+
challengeName === undefined
|
|
630
|
+
? `${challenge} (custom)`
|
|
631
|
+
: `Challenge.${challengeName} (${challenge})`;
|
|
632
|
+
printConsole(`The current challenge is: ${challengeDescription}`);
|
|
633
|
+
}
|
|
634
|
+
|
|
607
635
|
/** Prints the current position of all players. */
|
|
608
636
|
export function getPosition(): void {
|
|
609
637
|
for (const player of getPlayers()) {
|
|
@@ -614,6 +642,12 @@ export function getPosition(): void {
|
|
|
614
642
|
}
|
|
615
643
|
}
|
|
616
644
|
|
|
645
|
+
/** Toggles permanent Curse of the Giant. */
|
|
646
|
+
export function giant(): void {
|
|
647
|
+
v.persistent.giant = !v.persistent.giant;
|
|
648
|
+
printEnabled(v.persistent.giant, "permanent Curse of the Giant");
|
|
649
|
+
}
|
|
650
|
+
|
|
617
651
|
/**
|
|
618
652
|
* Gives a Giga Bomb. Provide a number to give a custom amount of Giga Bombs. (You can use negative
|
|
619
653
|
* numbers to remove bombs.)
|
|
@@ -700,8 +734,8 @@ export function gridEntities(): void {
|
|
|
700
734
|
return;
|
|
701
735
|
}
|
|
702
736
|
|
|
703
|
-
const
|
|
704
|
-
spawnGridEntity(gridEntityType,
|
|
737
|
+
const worldPosition = gridCoordinatesToWorldPosition(x, y);
|
|
738
|
+
spawnGridEntity(gridEntityType, worldPosition);
|
|
705
739
|
}
|
|
706
740
|
}
|
|
707
741
|
}
|
|
@@ -764,6 +798,12 @@ export function keys(params: string): void {
|
|
|
764
798
|
player.AddKeys(numKeys);
|
|
765
799
|
}
|
|
766
800
|
|
|
801
|
+
/** Toggles permanent Curse of the Labyrinth. */
|
|
802
|
+
export function labyrinth(): void {
|
|
803
|
+
v.persistent.labyrinth = !v.persistent.labyrinth;
|
|
804
|
+
printEnabled(v.persistent.labyrinth, "permanent Curse of the Labyrinth");
|
|
805
|
+
}
|
|
806
|
+
|
|
767
807
|
/** Moves the player 0.5 units left. Provide a number to move a custom amount of units. */
|
|
768
808
|
export function left(params: string): void {
|
|
769
809
|
movePlayer(params, Direction.LEFT);
|
|
@@ -812,6 +852,12 @@ export function listGridAll(params: string): void {
|
|
|
812
852
|
listGridEntities(params, true);
|
|
813
853
|
}
|
|
814
854
|
|
|
855
|
+
/** Toggles permanent Curse of the Lost. */
|
|
856
|
+
export function lost(): void {
|
|
857
|
+
v.persistent.lost = !v.persistent.lost;
|
|
858
|
+
printEnabled(v.persistent.lost, "permanent Curse of the Lost");
|
|
859
|
+
}
|
|
860
|
+
|
|
815
861
|
/** Alias for the "1hp" command. */
|
|
816
862
|
export function lowHP(): void {
|
|
817
863
|
oneHP();
|
|
@@ -854,6 +900,12 @@ export function maxHearts(params: string): void {
|
|
|
854
900
|
addHeart(params, HealthType.MAX_HEARTS);
|
|
855
901
|
}
|
|
856
902
|
|
|
903
|
+
/** Toggles permanent Curse of the Maze. */
|
|
904
|
+
export function maze(): void {
|
|
905
|
+
v.persistent.maze = !v.persistent.maze;
|
|
906
|
+
printEnabled(v.persistent.maze, "permanent Curse of the Maze");
|
|
907
|
+
}
|
|
908
|
+
|
|
857
909
|
/** Warps to the first Miniboss Room on the floor. */
|
|
858
910
|
export function miniboss(): void {
|
|
859
911
|
warpToRoomType(RoomType.MINI_BOSS);
|
|
@@ -928,8 +980,8 @@ export function pills(): void {
|
|
|
928
980
|
return;
|
|
929
981
|
}
|
|
930
982
|
|
|
931
|
-
const
|
|
932
|
-
spawnPill(pillColor,
|
|
983
|
+
const worldPosition = gridCoordinatesToWorldPosition(x, y);
|
|
984
|
+
spawnPill(pillColor, worldPosition);
|
|
933
985
|
}
|
|
934
986
|
}
|
|
935
987
|
}
|
|
@@ -989,7 +1041,7 @@ export function poopMana(params: string): void {
|
|
|
989
1041
|
}
|
|
990
1042
|
|
|
991
1043
|
/** Alias for the "getPosition" command. */
|
|
992
|
-
export function
|
|
1044
|
+
export function position(): void {
|
|
993
1045
|
getPosition();
|
|
994
1046
|
}
|
|
995
1047
|
|
|
@@ -1004,7 +1056,7 @@ export function right(params: string): void {
|
|
|
1004
1056
|
}
|
|
1005
1057
|
|
|
1006
1058
|
/** Logs information about the room to the "log.txt" file. */
|
|
1007
|
-
export function
|
|
1059
|
+
export function room(): void {
|
|
1008
1060
|
logRoom();
|
|
1009
1061
|
printConsole('Logged room information to the "log.txt" file.');
|
|
1010
1062
|
}
|
|
@@ -1088,13 +1140,13 @@ export function secretRoom(): void {
|
|
|
1088
1140
|
|
|
1089
1141
|
/** Changes to a seeded run, using the seed of the current run. */
|
|
1090
1142
|
export function seedStick(): void {
|
|
1091
|
-
const
|
|
1092
|
-
const startSeedString =
|
|
1143
|
+
const seedsClass = game.GetSeeds();
|
|
1144
|
+
const startSeedString = seedsClass.GetStartSeedString();
|
|
1093
1145
|
Isaac.ExecuteCommand(`seed ${startSeedString}`);
|
|
1094
1146
|
}
|
|
1095
1147
|
|
|
1096
1148
|
/** Logs all of the current run's seed effects to the "log.txt" file. */
|
|
1097
|
-
export function
|
|
1149
|
+
export function seeds(): void {
|
|
1098
1150
|
logSeedEffects();
|
|
1099
1151
|
printConsole('Logged the seed effects to the "log.txt" file.');
|
|
1100
1152
|
}
|
|
@@ -1185,8 +1237,8 @@ export function setPosition(params: string): void {
|
|
|
1185
1237
|
}
|
|
1186
1238
|
|
|
1187
1239
|
const player = Isaac.GetPlayer();
|
|
1188
|
-
const
|
|
1189
|
-
player.Position =
|
|
1240
|
+
const newPosition = Vector(x, y);
|
|
1241
|
+
player.Position = newPosition;
|
|
1190
1242
|
}
|
|
1191
1243
|
|
|
1192
1244
|
/** Warps to the first shop on the floor. */
|
|
@@ -1277,8 +1329,8 @@ export function spawnGoldenTrinket(params: string): void {
|
|
|
1277
1329
|
}
|
|
1278
1330
|
|
|
1279
1331
|
const goldenTrinketType = getGoldenTrinketType(trinketType);
|
|
1280
|
-
const
|
|
1281
|
-
const centerPos =
|
|
1332
|
+
const roomClass = game.GetRoom();
|
|
1333
|
+
const centerPos = roomClass.GetCenterPos();
|
|
1282
1334
|
spawnTrinket(goldenTrinketType, centerPos);
|
|
1283
1335
|
}
|
|
1284
1336
|
|
|
@@ -1297,6 +1349,11 @@ export function speed(): void {
|
|
|
1297
1349
|
printEnabled(v.run.maxSpeed, "max speed and flight");
|
|
1298
1350
|
}
|
|
1299
1351
|
|
|
1352
|
+
/** Alias for the "startingRoom" command. */
|
|
1353
|
+
export function startRoom(): void {
|
|
1354
|
+
startingRoom();
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1300
1357
|
/** Warps to the starting room of the floor. */
|
|
1301
1358
|
export function startingRoom(): void {
|
|
1302
1359
|
const level = game.GetLevel();
|
|
@@ -1304,11 +1361,6 @@ export function startingRoom(): void {
|
|
|
1304
1361
|
changeRoom(startingRoomIndex);
|
|
1305
1362
|
}
|
|
1306
1363
|
|
|
1307
|
-
/** Alias for the "startingRoom" command. */
|
|
1308
|
-
export function startRoom(): void {
|
|
1309
|
-
startingRoom();
|
|
1310
|
-
}
|
|
1311
|
-
|
|
1312
1364
|
/** Warps to the first Super Secret Room on the floor. */
|
|
1313
1365
|
export function superSecretRoom(): void {
|
|
1314
1366
|
warpToRoomType(RoomType.SUPER_SECRET);
|
|
@@ -1334,7 +1386,7 @@ export function tests(): void {
|
|
|
1334
1386
|
}
|
|
1335
1387
|
|
|
1336
1388
|
/** Creates a trapdoor next to the player. */
|
|
1337
|
-
export function
|
|
1389
|
+
export function trapdoor(): void {
|
|
1338
1390
|
spawnTrapdoorOrCrawlSpace(true);
|
|
1339
1391
|
}
|
|
1340
1392
|
|
|
@@ -1348,6 +1400,12 @@ export function ultraSecretRoom(): void {
|
|
|
1348
1400
|
warpToRoomType(RoomType.ULTRA_SECRET);
|
|
1349
1401
|
}
|
|
1350
1402
|
|
|
1403
|
+
/** Toggles permanent Curse of the Unknown. */
|
|
1404
|
+
export function unknown(): void {
|
|
1405
|
+
v.persistent.unknown = !v.persistent.unknown;
|
|
1406
|
+
printEnabled(v.persistent.unknown, "permanent Curse of the Unknown");
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1351
1409
|
/** If currently on a set seed, changes to an unseeded state and restarts the game. */
|
|
1352
1410
|
export function unseed(): void {
|
|
1353
1411
|
if (!onSetSeed()) {
|
package/src/functions/charge.ts
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "isaac-typescript-definitions";
|
|
7
7
|
import { game, sfxManager } from "../core/cachedClasses";
|
|
8
8
|
import { getCollectibleMaxCharges } from "./collectibles";
|
|
9
|
-
import {
|
|
9
|
+
import { getPlayers } from "./playerIndex";
|
|
10
10
|
import { getRoomShapeCharges } from "./roomShape";
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -208,7 +208,7 @@ function getChargesToAddWithAAAModifier(
|
|
|
208
208
|
* is true.
|
|
209
209
|
*/
|
|
210
210
|
export function addRoomClearCharges(bigRoomDoubleCharge = true): void {
|
|
211
|
-
for (const player of
|
|
211
|
+
for (const player of getPlayers()) {
|
|
212
212
|
addRoomClearCharge(player, bigRoomDoubleCharge);
|
|
213
213
|
}
|
|
214
214
|
}
|