isaacscript-common 6.11.2 → 6.14.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/callbacks/postGridEntityCustomRender.d.ts +2 -0
- package/dist/callbacks/postGridEntityCustomRender.d.ts.map +1 -0
- package/dist/callbacks/postGridEntityCustomRender.lua +36 -0
- package/dist/callbacks/postGridEntityCustomUpdate.d.ts +2 -0
- package/dist/callbacks/postGridEntityCustomUpdate.d.ts.map +1 -0
- package/dist/callbacks/postGridEntityCustomUpdate.lua +36 -0
- package/dist/callbacks/postNewRoomEarly.lua +2 -2
- package/dist/callbacks/postPickupInitFirst.lua +1 -20
- package/dist/callbacks/reorderedCallbacks.d.ts +5 -5
- package/dist/callbacks/reorderedCallbacks.d.ts.map +1 -1
- package/dist/callbacks/reorderedCallbacks.lua +5 -5
- package/dist/callbacks/subscriptions/postGridEntityCustomRender.d.ts +6 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomRender.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomRender.lua +29 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomUpdate.d.ts +6 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomUpdate.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomUpdate.lua +29 -0
- package/dist/constants.d.ts +1 -5
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.lua +0 -7
- package/dist/constantsFirstLast.d.ts +5 -1
- package/dist/constantsFirstLast.d.ts.map +1 -1
- package/dist/constantsFirstLast.lua +6 -0
- package/dist/enums/ModCallbackCustom.d.ts +89 -66
- package/dist/enums/ModCallbackCustom.d.ts.map +1 -1
- package/dist/enums/ModCallbackCustom.lua +62 -58
- package/dist/enums/private/SerializationBrand.d.ts +1 -1
- package/dist/enums/private/SerializationBrand.lua +1 -1
- package/dist/features/collectibleItemPoolType.d.ts +2 -2
- package/dist/features/collectibleItemPoolType.lua +2 -2
- package/dist/features/customGridEntity.d.ts +11 -2
- package/dist/features/customGridEntity.d.ts.map +1 -1
- package/dist/features/customGridEntity.lua +22 -2
- package/dist/features/customTrapdoor/blackSprite.d.ts.map +1 -1
- package/dist/features/customTrapdoor/blackSprite.lua +6 -6
- package/dist/features/customTrapdoor/customTrapdoorConstants.d.ts +2 -2
- package/dist/features/customTrapdoor/customTrapdoorConstants.d.ts.map +1 -1
- package/dist/features/customTrapdoor/customTrapdoorConstants.lua +2 -2
- package/dist/features/customTrapdoor/init.d.ts.map +1 -1
- package/dist/features/customTrapdoor/init.lua +4 -3
- package/dist/features/customTrapdoor/touched.d.ts.map +1 -1
- package/dist/features/customTrapdoor/touched.lua +51 -33
- package/dist/features/deployJSONRoom.d.ts +2 -2
- package/dist/features/deployJSONRoom.lua +2 -2
- package/dist/features/extraConsoleCommands/exports.d.ts +4 -3
- package/dist/features/extraConsoleCommands/exports.d.ts.map +1 -1
- package/dist/features/extraConsoleCommands/exports.lua +4 -3
- package/dist/features/extraConsoleCommands/init.lua +12 -14
- package/dist/features/extraConsoleCommands/listCommands.d.ts +15 -19
- package/dist/features/extraConsoleCommands/listCommands.d.ts.map +1 -1
- package/dist/features/extraConsoleCommands/listCommands.lua +34 -42
- package/dist/features/pause.d.ts +1 -1
- package/dist/features/pause.d.ts.map +1 -1
- package/dist/features/pause.lua +87 -8
- package/dist/features/persistentEntities.d.ts.map +1 -1
- package/dist/features/persistentEntities.lua +7 -7
- package/dist/features/pickupIndex.d.ts +19 -0
- package/dist/features/pickupIndex.d.ts.map +1 -0
- package/dist/features/pickupIndex.lua +197 -0
- package/dist/features/roomHistory.d.ts +24 -0
- package/dist/features/roomHistory.d.ts.map +1 -0
- package/dist/features/roomHistory.lua +89 -0
- package/dist/functions/collectibles.d.ts +26 -13
- package/dist/functions/collectibles.d.ts.map +1 -1
- package/dist/functions/collectibles.lua +26 -13
- package/dist/functions/color.d.ts +10 -0
- package/dist/functions/color.d.ts.map +1 -1
- package/dist/functions/color.lua +24 -0
- package/dist/functions/entities.d.ts +3 -3
- package/dist/functions/entities.d.ts.map +1 -1
- package/dist/functions/entities.lua +8 -3
- package/dist/functions/gridEntities.d.ts +4 -22
- package/dist/functions/gridEntities.d.ts.map +1 -1
- package/dist/functions/gridEntities.lua +4 -61
- package/dist/functions/isaacAPIClass.d.ts +64 -0
- package/dist/functions/isaacAPIClass.d.ts.map +1 -1
- package/dist/functions/isaacAPIClass.lua +84 -1
- package/dist/functions/kColor.d.ts +10 -0
- package/dist/functions/kColor.d.ts.map +1 -1
- package/dist/functions/kColor.lua +24 -0
- package/dist/functions/map.d.ts +2 -0
- package/dist/functions/map.d.ts.map +1 -1
- package/dist/functions/map.lua +7 -0
- package/dist/functions/npcs.d.ts +2 -2
- package/dist/functions/npcs.lua +2 -2
- package/dist/functions/pickupVariants.d.ts +2 -2
- package/dist/functions/pickupVariants.d.ts.map +1 -1
- package/dist/functions/pickupVariants.lua +2 -2
- package/dist/functions/playerCenter.lua +2 -2
- package/dist/functions/playerIndex.d.ts +0 -3
- package/dist/functions/playerIndex.d.ts.map +1 -1
- package/dist/functions/playerIndex.lua +4 -23
- package/dist/functions/random.d.ts +1 -1
- package/dist/functions/random.lua +1 -1
- package/dist/functions/rockAlt.d.ts +28 -0
- package/dist/functions/rockAlt.d.ts.map +1 -0
- package/dist/functions/rockAlt.lua +140 -0
- package/dist/functions/roomData.d.ts +3 -2
- package/dist/functions/roomData.d.ts.map +1 -1
- package/dist/functions/roomData.lua +3 -2
- package/dist/functions/rooms.d.ts +6 -6
- package/dist/functions/rooms.lua +6 -6
- package/dist/functions/set.d.ts +2 -0
- package/dist/functions/set.d.ts.map +1 -1
- package/dist/functions/set.lua +6 -0
- package/dist/functions/stage.d.ts +1 -0
- package/dist/functions/stage.d.ts.map +1 -1
- package/dist/functions/stage.lua +4 -0
- package/dist/functions/vector.d.ts +11 -0
- package/dist/functions/vector.d.ts.map +1 -1
- package/dist/functions/vector.lua +23 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.lua +31 -0
- package/dist/initCustomCallbacks.d.ts.map +1 -1
- package/dist/initCustomCallbacks.lua +6 -0
- package/dist/initFeatures.d.ts.map +1 -1
- package/dist/initFeatures.lua +6 -0
- package/dist/interfaces/AddCallbackParameterCustom.d.ts +4 -0
- package/dist/interfaces/AddCallbackParameterCustom.d.ts.map +1 -1
- package/dist/interfaces/RoomDescription.d.ts +14 -0
- package/dist/interfaces/RoomDescription.d.ts.map +1 -0
- package/dist/interfaces/RoomDescription.lua +2 -0
- package/dist/objects/callbackRegisterFunctions.d.ts.map +1 -1
- package/dist/objects/callbackRegisterFunctions.lua +6 -0
- package/dist/types/CollectibleIndex.d.ts +1 -1
- package/dist/types/PickupIndex.d.ts +17 -0
- package/dist/types/PickupIndex.d.ts.map +1 -0
- package/dist/types/PickupIndex.lua +2 -0
- package/dist/types/PlayerIndex.d.ts +1 -1
- package/dist/upgradeMod.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/callbacks/postGridEntityCustomRender.ts +44 -0
- package/src/callbacks/postGridEntityCustomUpdate.ts +44 -0
- package/src/callbacks/postNewRoomEarly.ts +2 -2
- package/src/callbacks/postPickupInitFirst.ts +3 -32
- package/src/callbacks/postPlayerReorderedCallbacks.ts +3 -3
- package/src/callbacks/reorderedCallbacks.ts +9 -8
- package/src/callbacks/subscriptions/postGridEntityCustomRender.ts +41 -0
- package/src/callbacks/subscriptions/postGridEntityCustomUpdate.ts +41 -0
- package/src/constants.ts +1 -9
- package/src/constantsFirstLast.ts +16 -0
- package/src/enums/ModCallbackCustom.ts +33 -8
- package/src/enums/private/SerializationBrand.ts +1 -1
- package/src/features/collectibleItemPoolType.ts +3 -3
- package/src/features/customGridEntity.ts +27 -2
- package/src/features/customTrapdoor/blackSprite.ts +11 -5
- package/src/features/customTrapdoor/customTrapdoorConstants.ts +2 -2
- package/src/features/customTrapdoor/init.ts +7 -5
- package/src/features/customTrapdoor/touched.ts +59 -39
- package/src/features/deployJSONRoom.ts +4 -4
- package/src/features/extraConsoleCommands/exports.ts +4 -3
- package/src/features/extraConsoleCommands/init.ts +18 -14
- package/src/features/extraConsoleCommands/listCommands.ts +38 -43
- package/src/features/pause.ts +97 -7
- package/src/features/persistentEntities.ts +9 -8
- package/src/features/pickupIndex.ts +257 -0
- package/src/features/playerInventory.ts +2 -2
- package/src/features/roomHistory.ts +113 -0
- package/src/features/saveDataManager/main.ts +2 -2
- package/src/features/taintedLazarusPlayers.ts +5 -5
- package/src/functions/collectibles.ts +26 -13
- package/src/functions/color.ts +22 -0
- package/src/functions/entities.ts +6 -3
- package/src/functions/gridEntities.ts +4 -56
- package/src/functions/isaacAPIClass.ts +106 -1
- package/src/functions/kColor.ts +22 -0
- package/src/functions/map.ts +10 -0
- package/src/functions/npcs.ts +2 -2
- package/src/functions/pickupVariants.ts +2 -2
- package/src/functions/playerCenter.ts +2 -2
- package/src/functions/playerIndex.ts +8 -21
- package/src/functions/random.ts +1 -1
- package/src/functions/rockAlt.ts +117 -0
- package/src/functions/roomData.ts +3 -2
- package/src/functions/rooms.ts +6 -6
- package/src/functions/set.ts +7 -1
- package/src/functions/stage.ts +10 -1
- package/src/functions/vector.ts +23 -0
- package/src/index.ts +4 -0
- package/src/initCustomCallbacks.ts +4 -0
- package/src/initFeatures.ts +4 -0
- package/src/interfaces/AddCallbackParameterCustom.ts +4 -0
- package/src/interfaces/RoomDescription.ts +19 -0
- package/src/objects/callbackRegisterFunctions.ts +6 -0
- package/src/types/CollectibleIndex.ts +1 -1
- package/src/types/PickupIndex.ts +15 -0
- package/src/types/PlayerIndex.ts +1 -1
- package/src/upgradeMod.ts +2 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// The item pool type of a collectible is not stored on the collectible. Thus, we scan for incoming
|
|
2
|
-
// item pool types in the
|
|
2
|
+
// item pool types in the `PRE_GET_COLLECTIBLE` callback, and then assume that the next spawned
|
|
3
3
|
// collectible has this item pool type.
|
|
4
4
|
|
|
5
5
|
import {
|
|
@@ -45,8 +45,8 @@ function postPickupInitCollectible(pickup: EntityPickup) {
|
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
47
|
* Helper function to get the item pool type that a given collectible came from. Since there is no
|
|
48
|
-
* native method in the API to get this, we listen in the
|
|
49
|
-
* types, and then assume that the next spawned collectible will match.
|
|
48
|
+
* native method in the API to get this, we listen in the `PRE_GET_COLLECTIBLE` callback for item
|
|
49
|
+
* pool types, and then assume that the next spawned collectible will match.
|
|
50
50
|
*/
|
|
51
51
|
export function getCollectibleItemPoolType(
|
|
52
52
|
collectible: EntityPickup,
|
|
@@ -228,8 +228,8 @@ export function spawnCustomGridEntity(
|
|
|
228
228
|
* Default is true. This is generally a good idea because if the room is not
|
|
229
229
|
* updated, you will be unable to spawn another grid entity on the same tile until
|
|
230
230
|
* a frame has passed. However, doing this is expensive, since it involves a call
|
|
231
|
-
* to `Isaac.GetRoomEntities`, so set it to false if you need to
|
|
232
|
-
*
|
|
231
|
+
* to `Isaac.GetRoomEntities`, so set it to false if you need to run this function
|
|
232
|
+
* multiple times.
|
|
233
233
|
* @returns The grid entity that was removed. Returns undefined if no grid entity was found at the
|
|
234
234
|
* given location or if the given grid entity was not a custom grid entity.
|
|
235
235
|
*/
|
|
@@ -274,3 +274,28 @@ export function removeCustomGrid(
|
|
|
274
274
|
|
|
275
275
|
return decoration;
|
|
276
276
|
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Helper function to get the custom grid entities in the current room. Returns an array of tuples
|
|
280
|
+
* containing the raw decoration grid entity and the associated entity data.
|
|
281
|
+
*/
|
|
282
|
+
export function getCustomGridEntities(): Array<
|
|
283
|
+
[gridEntity: GridEntity, data: CustomGridEntityData]
|
|
284
|
+
> {
|
|
285
|
+
const roomListIndex = getRoomListIndex();
|
|
286
|
+
const roomCustomGridEntities = v.level.customGridEntities.get(roomListIndex);
|
|
287
|
+
if (roomCustomGridEntities === undefined) {
|
|
288
|
+
return [];
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
const room = game.GetRoom();
|
|
292
|
+
const customGridEntities: Array<[GridEntity, CustomGridEntityData]> = [];
|
|
293
|
+
for (const [gridIndex, data] of roomCustomGridEntities.entries()) {
|
|
294
|
+
const gridEntity = room.GetGridEntity(gridIndex);
|
|
295
|
+
if (gridEntity !== undefined) {
|
|
296
|
+
customGridEntities.push([gridEntity, data]);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
return customGridEntities;
|
|
301
|
+
}
|
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
import { VectorZero } from "../../constants";
|
|
2
2
|
import { StageTravelState } from "../../enums/private/StageTravelState";
|
|
3
|
-
import { ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH } from "../customStage/customStageConstants";
|
|
4
3
|
import v from "./v";
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
// In order to represent a black sprite, we just use the first frame of the boss versus screen
|
|
6
|
+
// animation. However, we must lazy load the sprite in order to prevent issues with mods that
|
|
7
|
+
// replace the vanilla files. (For some reason, loading the sprites will cause the overwrite to no
|
|
8
|
+
// longer apply on the second and subsequent runs.)
|
|
9
|
+
const blackSprite = Sprite();
|
|
9
10
|
|
|
10
11
|
export function drawBlackSprite(): void {
|
|
11
12
|
if (v.run.state !== StageTravelState.PAUSING_ON_BLACK) {
|
|
12
13
|
return;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
if (!blackSprite.IsLoaded()) {
|
|
17
|
+
blackSprite.Load("gfx/ui/boss/versusscreen.anm2", true);
|
|
18
|
+
blackSprite.SetFrame("Scene", 0);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
blackSprite.RenderLayer(0, VectorZero);
|
|
16
22
|
}
|
|
@@ -19,5 +19,5 @@ export const ANIMATIONS_THAT_PREVENT_STAGE_TRAVEL: ReadonlySet<string> =
|
|
|
19
19
|
|
|
20
20
|
export const PIXELATION_TO_BLACK_FRAMES = 52;
|
|
21
21
|
|
|
22
|
-
export const OTHER_PLAYER_TRAPDOOR_JUMP_DELAY_GAME_FRAMES =
|
|
23
|
-
export const OTHER_PLAYER_TRAPDOOR_JUMP_DURATION_GAME_FRAMES =
|
|
22
|
+
export const OTHER_PLAYER_TRAPDOOR_JUMP_DELAY_GAME_FRAMES = 6;
|
|
23
|
+
export const OTHER_PLAYER_TRAPDOOR_JUMP_DURATION_GAME_FRAMES = 5;
|
|
@@ -21,6 +21,7 @@ import { saveDataManager } from "../saveDataManager/exports";
|
|
|
21
21
|
import { drawBlackSprite } from "./blackSprite";
|
|
22
22
|
import {
|
|
23
23
|
CUSTOM_TRAPDOOR_FEATURE_NAME,
|
|
24
|
+
GridEntityTypeCustom,
|
|
24
25
|
PIXELATION_TO_BLACK_FRAMES,
|
|
25
26
|
} from "./customTrapdoorConstants";
|
|
26
27
|
import { checkCustomTrapdoorOpenClose } from "./openClose";
|
|
@@ -33,8 +34,9 @@ export function customTrapdoorInit(mod: ModUpgraded): void {
|
|
|
33
34
|
mod.AddCallback(ModCallback.POST_RENDER, postRender); // 2
|
|
34
35
|
mod.AddCallback(ModCallback.POST_PEFFECT_UPDATE, postPEffectUpdate); // 4
|
|
35
36
|
mod.AddCallbackCustom(
|
|
36
|
-
ModCallbackCustom.
|
|
37
|
-
|
|
37
|
+
ModCallbackCustom.POST_GRID_ENTITY_CUSTOM_UPDATE,
|
|
38
|
+
postGridEntityCustomUpdateTrapdoor,
|
|
39
|
+
GridEntityTypeCustom.TRAPDOOR_CUSTOM,
|
|
38
40
|
);
|
|
39
41
|
}
|
|
40
42
|
|
|
@@ -198,9 +200,9 @@ function checkJumpComplete(player: EntityPlayer) {
|
|
|
198
200
|
}
|
|
199
201
|
}
|
|
200
202
|
|
|
201
|
-
// ModCallbackCustom.
|
|
202
|
-
//
|
|
203
|
-
function
|
|
203
|
+
// ModCallbackCustom.POST_GRID_ENTITY_CUSTOM_UPDATE
|
|
204
|
+
// GridEntityTypeCustom.TRAPDOOR_CUSTOM
|
|
205
|
+
function postGridEntityCustomUpdateTrapdoor(gridEntity: GridEntity) {
|
|
204
206
|
const roomListIndex = getRoomListIndex();
|
|
205
207
|
const gridIndex = gridEntity.GetGridIndex();
|
|
206
208
|
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ButtonAction,
|
|
2
3
|
EntityCollisionClass,
|
|
4
|
+
EntityGridCollisionClass,
|
|
3
5
|
EntityPartition,
|
|
4
6
|
PlayerType,
|
|
5
7
|
} from "isaac-typescript-definitions";
|
|
6
8
|
import { VectorZero } from "../../constants";
|
|
7
9
|
import { StageTravelState } from "../../enums/private/StageTravelState";
|
|
10
|
+
import { easeOutSine } from "../../functions/easing";
|
|
8
11
|
import {
|
|
12
|
+
getAllPlayers,
|
|
9
13
|
getOtherPlayers,
|
|
10
|
-
getPlayers,
|
|
11
14
|
isChildPlayer,
|
|
12
15
|
} from "../../functions/playerIndex";
|
|
13
16
|
import { isCharacter } from "../../functions/players";
|
|
14
17
|
import { CustomTrapdoorDescription } from "../../interfaces/private/CustomTrapdoorDescription";
|
|
15
|
-
import {
|
|
18
|
+
import { disableAllInputsExceptFor } from "../disableInputs";
|
|
16
19
|
import { isPlayerUsingPony } from "../ponyDetection";
|
|
17
|
-
import { runInNGameFrames,
|
|
20
|
+
import { runInNGameFrames, runNextRenderFrame } from "../runInNFrames";
|
|
18
21
|
import {
|
|
19
22
|
ANIMATIONS_THAT_PREVENT_STAGE_TRAVEL,
|
|
20
23
|
CUSTOM_TRAPDOOR_FEATURE_NAME,
|
|
@@ -78,7 +81,8 @@ function playerTouchedCustomTrapdoor(
|
|
|
78
81
|
v.run.state = StageTravelState.PLAYERS_JUMPING_DOWN;
|
|
79
82
|
v.run.destination = trapdoorDescription.destination;
|
|
80
83
|
|
|
81
|
-
|
|
84
|
+
const whitelist = new Set([ButtonAction.CONSOLE]);
|
|
85
|
+
disableAllInputsExceptFor(CUSTOM_TRAPDOOR_FEATURE_NAME, whitelist);
|
|
82
86
|
setPlayerAttributes(player, gridEntity.Position);
|
|
83
87
|
dropTaintedForgotten(player);
|
|
84
88
|
|
|
@@ -95,6 +99,35 @@ function playerTouchedCustomTrapdoor(
|
|
|
95
99
|
});
|
|
96
100
|
}
|
|
97
101
|
|
|
102
|
+
function setPlayerAttributes(trapdoorPlayer: EntityPlayer, position: Vector) {
|
|
103
|
+
// Snap the player to the exact position of the trapdoor so that they cleanly jump down the hole.
|
|
104
|
+
trapdoorPlayer.Position = position;
|
|
105
|
+
|
|
106
|
+
for (const player of getAllPlayers()) {
|
|
107
|
+
// Disable the controls to prevent the player from moving, shooting, and so on. (We also disable
|
|
108
|
+
// the inputs in the `INPUT_ACTION` callback, but that does not prevent mouse inputs.)
|
|
109
|
+
player.ControlsEnabled = false;
|
|
110
|
+
|
|
111
|
+
// Freeze all players.
|
|
112
|
+
player.Velocity = VectorZero;
|
|
113
|
+
|
|
114
|
+
// We don't want enemy attacks to move the players.
|
|
115
|
+
player.EntityCollisionClass = EntityCollisionClass.NONE;
|
|
116
|
+
player.GridCollisionClass = EntityGridCollisionClass.NONE;
|
|
117
|
+
|
|
118
|
+
player.SubType = -1;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function dropTaintedForgotten(player: EntityPlayer) {
|
|
123
|
+
if (isCharacter(player, PlayerType.THE_FORGOTTEN_B)) {
|
|
124
|
+
const taintedSoul = player.GetOtherTwin();
|
|
125
|
+
if (taintedSoul !== undefined) {
|
|
126
|
+
taintedSoul.ThrowHeldEntity(VectorZero);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
98
131
|
function startDelayedJump(entityPtr: EntityPtr, trapdoorPosition: Vector) {
|
|
99
132
|
const entity = entityPtr.Ref;
|
|
100
133
|
if (entity === undefined) {
|
|
@@ -108,14 +141,18 @@ function startDelayedJump(entityPtr: EntityPtr, trapdoorPosition: Vector) {
|
|
|
108
141
|
|
|
109
142
|
player.PlayExtraAnimation("Trapdoor");
|
|
110
143
|
|
|
111
|
-
|
|
144
|
+
adjustPlayerPositionToTrapdoor(entityPtr, player.Position, trapdoorPosition);
|
|
112
145
|
}
|
|
113
146
|
|
|
114
|
-
function
|
|
147
|
+
function adjustPlayerPositionToTrapdoor(
|
|
115
148
|
entityPtr: EntityPtr,
|
|
116
149
|
startPos: Vector,
|
|
117
150
|
endPos: Vector,
|
|
118
151
|
) {
|
|
152
|
+
if (v.run.state !== StageTravelState.PLAYERS_JUMPING_DOWN) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
|
|
119
156
|
const entity = entityPtr.Ref;
|
|
120
157
|
if (entity === undefined) {
|
|
121
158
|
return;
|
|
@@ -126,50 +163,33 @@ function adjustPlayerVelocityToTrapdoor(
|
|
|
126
163
|
return;
|
|
127
164
|
}
|
|
128
165
|
|
|
166
|
+
runNextRenderFrame(() => {
|
|
167
|
+
adjustPlayerPositionToTrapdoor(entityPtr, startPos, endPos);
|
|
168
|
+
});
|
|
169
|
+
|
|
129
170
|
const sprite = player.GetSprite();
|
|
130
171
|
if (sprite.IsFinished("Trapdoor")) {
|
|
172
|
+
player.Position = endPos;
|
|
173
|
+
player.Velocity = VectorZero;
|
|
131
174
|
return;
|
|
132
175
|
}
|
|
133
176
|
|
|
134
177
|
const frame = sprite.GetFrame();
|
|
135
|
-
if (frame
|
|
178
|
+
if (frame >= OTHER_PLAYER_TRAPDOOR_JUMP_DURATION_GAME_FRAMES) {
|
|
136
179
|
// We have already arrived at the trapdoor.
|
|
180
|
+
player.Position = endPos;
|
|
181
|
+
player.Velocity = VectorZero;
|
|
137
182
|
return;
|
|
138
183
|
}
|
|
139
184
|
|
|
185
|
+
// Make the player jump towards the trapdoor. We use an easing function so that the distance
|
|
186
|
+
// traveled is not linear, emulating what the game does.
|
|
140
187
|
const totalDifference = endPos.sub(startPos);
|
|
141
|
-
const
|
|
142
|
-
|
|
143
|
-
);
|
|
144
|
-
const differenceForThisFrame = differencePerFrame.mul(frame + 1);
|
|
188
|
+
const progress = frame / OTHER_PLAYER_TRAPDOOR_JUMP_DURATION_GAME_FRAMES;
|
|
189
|
+
const easeProgress = easeOutSine(progress);
|
|
190
|
+
const differenceForThisFrame = totalDifference.mul(easeProgress);
|
|
145
191
|
const targetPosition = startPos.add(differenceForThisFrame);
|
|
146
|
-
const calculatedVelocity = player.Position.sub(targetPosition);
|
|
147
|
-
|
|
148
|
-
player.Velocity = calculatedVelocity;
|
|
149
|
-
|
|
150
|
-
runNextGameFrame(() => {
|
|
151
|
-
adjustPlayerVelocityToTrapdoor(entityPtr, startPos, endPos);
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
192
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
trapdoorPlayer.Position = position;
|
|
158
|
-
|
|
159
|
-
for (const player of getPlayers()) {
|
|
160
|
-
// Freeze all players.
|
|
161
|
-
player.Velocity = VectorZero;
|
|
162
|
-
|
|
163
|
-
// We don't want enemy attacks to move the players.
|
|
164
|
-
player.EntityCollisionClass = EntityCollisionClass.NONE;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
function dropTaintedForgotten(player: EntityPlayer) {
|
|
169
|
-
if (isCharacter(player, PlayerType.THE_FORGOTTEN_B)) {
|
|
170
|
-
const taintedSoul = player.GetOtherTwin();
|
|
171
|
-
if (taintedSoul !== undefined) {
|
|
172
|
-
taintedSoul.ThrowHeldEntity(VectorZero);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
193
|
+
player.Position = targetPosition;
|
|
194
|
+
player.Velocity = VectorZero;
|
|
175
195
|
}
|
|
@@ -225,7 +225,7 @@ function respawnPersistentEntities() {
|
|
|
225
225
|
* Specifically, this will clear the current room of all entities and grid entities, and then spawn
|
|
226
226
|
* all of the entries and grid entities in the provided JSON room.
|
|
227
227
|
*
|
|
228
|
-
* This function is meant to be used in the
|
|
228
|
+
* This function is meant to be used in the `POST_NEW_ROOM` callback.
|
|
229
229
|
*
|
|
230
230
|
* For example:
|
|
231
231
|
*
|
|
@@ -277,7 +277,7 @@ export function deployJSONRoom(
|
|
|
277
277
|
* Specifically, this will clear the current room of all entities and grid entities, and then spawn
|
|
278
278
|
* all of the entries and grid entities in one of the provided JSON rooms.
|
|
279
279
|
*
|
|
280
|
-
* This function is meant to be used in the
|
|
280
|
+
* This function is meant to be used in the `POST_NEW_ROOM` callback.
|
|
281
281
|
*
|
|
282
282
|
* Note that this function does not simply choose a random element in the provided array; it will
|
|
283
283
|
* properly account for each room weight using the algorithm from:
|
|
@@ -355,8 +355,8 @@ export function emptyRoom(fillWithDecorations: boolean): void {
|
|
|
355
355
|
}
|
|
356
356
|
|
|
357
357
|
/**
|
|
358
|
-
* We remove entities in the
|
|
359
|
-
* that they will not re-appear when we re-enter the room.
|
|
358
|
+
* We remove entities in the `POST_NEW_ROOM` callback instead of in the PreRoomEntitySpawn callback
|
|
359
|
+
* so that they will not re-appear when we re-enter the room.
|
|
360
360
|
*/
|
|
361
361
|
function removeSpecificNPCs() {
|
|
362
362
|
const room = game.GetRoom();
|
|
@@ -24,9 +24,10 @@ export function enableExtraConsoleCommands(mod: ModUpgraded): void {
|
|
|
24
24
|
*
|
|
25
25
|
* The standard library comes with many existing console commands that are useful for debugging, but
|
|
26
26
|
* you can also add your own commands that are useful for your particular mod. It's easier to add
|
|
27
|
-
* commands to the existing command system than to add logic manually to the
|
|
27
|
+
* commands to the existing command system than to add your own logic manually to the `EXECUTE_CMD`
|
|
28
|
+
* callback.
|
|
28
29
|
*
|
|
29
|
-
* Before using this function, you must first
|
|
30
|
+
* Before using this function, you must first run the `enableExtraConsoleCommands` function.
|
|
30
31
|
*/
|
|
31
32
|
export function addConsoleCommand(
|
|
32
33
|
commandName: string,
|
|
@@ -59,7 +60,7 @@ export function addConsoleCommand(
|
|
|
59
60
|
* The standard library comes with many existing console commands that are useful for debugging. If
|
|
60
61
|
* you want to disable one of them, use this function.
|
|
61
62
|
*
|
|
62
|
-
* Before using this function, you must first
|
|
63
|
+
* Before using this function, you must first run the `enableExtraConsoleCommands` function.
|
|
63
64
|
*/
|
|
64
65
|
export function removeConsoleCommand(commandName: string): void {
|
|
65
66
|
if (!isExtraConsoleCommandsInitialized()) {
|
|
@@ -27,7 +27,7 @@ export function extraConsoleCommandsInit(mod: ModUpgraded): void {
|
|
|
27
27
|
function initMap() {
|
|
28
28
|
extraConsoleCommandsFunctionMap.set("1hp", commands.oneHP);
|
|
29
29
|
extraConsoleCommandsFunctionMap.set("addCharges", commands.addCharges);
|
|
30
|
-
extraConsoleCommandsFunctionMap.set("
|
|
30
|
+
extraConsoleCommandsFunctionMap.set("angelRoom", commands.angelRoom);
|
|
31
31
|
extraConsoleCommandsFunctionMap.set("ascent", commands.ascent);
|
|
32
32
|
extraConsoleCommandsFunctionMap.set("bedroom", commands.bedroom);
|
|
33
33
|
extraConsoleCommandsFunctionMap.set("bh", commands.bh);
|
|
@@ -46,7 +46,7 @@ function initMap() {
|
|
|
46
46
|
);
|
|
47
47
|
extraConsoleCommandsFunctionMap.set("bombs", commands.bombs);
|
|
48
48
|
extraConsoleCommandsFunctionMap.set("boneHearts", commands.boneHearts);
|
|
49
|
-
extraConsoleCommandsFunctionMap.set("
|
|
49
|
+
extraConsoleCommandsFunctionMap.set("bossRoom", commands.bossRoom);
|
|
50
50
|
extraConsoleCommandsFunctionMap.set("bossRush", commands.bossRush);
|
|
51
51
|
extraConsoleCommandsFunctionMap.set("brokenHearts", commands.brokenHearts);
|
|
52
52
|
extraConsoleCommandsFunctionMap.set("card", commands.card);
|
|
@@ -66,7 +66,7 @@ function initMap() {
|
|
|
66
66
|
extraConsoleCommandsFunctionMap.set("d6", commands.d6);
|
|
67
67
|
extraConsoleCommandsFunctionMap.set("damage", commands.damage);
|
|
68
68
|
extraConsoleCommandsFunctionMap.set("dd", commands.dd);
|
|
69
|
-
extraConsoleCommandsFunctionMap.set("
|
|
69
|
+
extraConsoleCommandsFunctionMap.set("devilRoom", commands.devilRoom);
|
|
70
70
|
extraConsoleCommandsFunctionMap.set("dirtyBedroom", commands.dirtyBedroom);
|
|
71
71
|
extraConsoleCommandsFunctionMap.set("disableCurses", commands.disableCurses);
|
|
72
72
|
extraConsoleCommandsFunctionMap.set(
|
|
@@ -89,7 +89,7 @@ function initMap() {
|
|
|
89
89
|
commandsDisplay.effectsDisplay,
|
|
90
90
|
);
|
|
91
91
|
extraConsoleCommandsFunctionMap.set("eh", commands.eh);
|
|
92
|
-
extraConsoleCommandsFunctionMap.set("
|
|
92
|
+
extraConsoleCommandsFunctionMap.set("errorRoom", commands.errorRoom);
|
|
93
93
|
extraConsoleCommandsFunctionMap.set("eternalHearts", commands.eternalHearts);
|
|
94
94
|
extraConsoleCommandsFunctionMap.set(
|
|
95
95
|
"familiarDisplay",
|
|
@@ -113,10 +113,9 @@ function initMap() {
|
|
|
113
113
|
extraConsoleCommandsFunctionMap.set("grid2", commands.grid2);
|
|
114
114
|
extraConsoleCommandsFunctionMap.set("gridCosts", commands.gridCosts);
|
|
115
115
|
extraConsoleCommandsFunctionMap.set("gridEntities", commands.gridEntities);
|
|
116
|
-
extraConsoleCommandsFunctionMap.set("h", commands.h);
|
|
117
116
|
extraConsoleCommandsFunctionMap.set("hearts", commands.hearts);
|
|
118
117
|
extraConsoleCommandsFunctionMap.set("hitboxes", commands.hitboxes);
|
|
119
|
-
extraConsoleCommandsFunctionMap.set("
|
|
118
|
+
extraConsoleCommandsFunctionMap.set("iAmErrorRoom", commands.iAmErrorRoom);
|
|
120
119
|
extraConsoleCommandsFunctionMap.set("key", commands.key);
|
|
121
120
|
extraConsoleCommandsFunctionMap.set("keys", commands.keys);
|
|
122
121
|
extraConsoleCommandsFunctionMap.set(
|
|
@@ -146,7 +145,6 @@ function initMap() {
|
|
|
146
145
|
extraConsoleCommandsFunctionMap.set("mana", commands.mana);
|
|
147
146
|
extraConsoleCommandsFunctionMap.set("map", commands.map);
|
|
148
147
|
extraConsoleCommandsFunctionMap.set("maxHearts", commands.maxHearts);
|
|
149
|
-
extraConsoleCommandsFunctionMap.set("mh", commands.mh);
|
|
150
148
|
extraConsoleCommandsFunctionMap.set("miniboss", commands.miniboss);
|
|
151
149
|
extraConsoleCommandsFunctionMap.set("noCurses", commands.noCurses);
|
|
152
150
|
extraConsoleCommandsFunctionMap.set("npcDisplay", commandsDisplay.npcDisplay);
|
|
@@ -207,7 +205,6 @@ function initMap() {
|
|
|
207
205
|
commandsDisplay.projectilesDisplay,
|
|
208
206
|
);
|
|
209
207
|
extraConsoleCommandsFunctionMap.set("redHearts", commands.redHearts);
|
|
210
|
-
extraConsoleCommandsFunctionMap.set("rh", commands.rh);
|
|
211
208
|
extraConsoleCommandsFunctionMap.set("right", commands.right);
|
|
212
209
|
extraConsoleCommandsFunctionMap.set(
|
|
213
210
|
"rockDisplay",
|
|
@@ -221,13 +218,12 @@ function initMap() {
|
|
|
221
218
|
extraConsoleCommandsFunctionMap.set("rottenHearts", commands.rottenHearts);
|
|
222
219
|
extraConsoleCommandsFunctionMap.set("runTests", commands.runTests);
|
|
223
220
|
extraConsoleCommandsFunctionMap.set("s", commands.s);
|
|
224
|
-
extraConsoleCommandsFunctionMap.set("
|
|
225
|
-
extraConsoleCommandsFunctionMap.set("
|
|
221
|
+
extraConsoleCommandsFunctionMap.set("sacrificeRoom", commands.sacrificeRoom);
|
|
222
|
+
extraConsoleCommandsFunctionMap.set("secretRoom", commands.secretRoom);
|
|
226
223
|
extraConsoleCommandsFunctionMap.set("seedStick", commands.seedStick);
|
|
227
224
|
extraConsoleCommandsFunctionMap.set("seeds", commands.seedsCommand);
|
|
228
225
|
extraConsoleCommandsFunctionMap.set("setCharges", commands.setCharges);
|
|
229
226
|
extraConsoleCommandsFunctionMap.set("setPosition", commands.setPosition);
|
|
230
|
-
extraConsoleCommandsFunctionMap.set("sh", commands.sh);
|
|
231
227
|
extraConsoleCommandsFunctionMap.set("shop", commands.shop);
|
|
232
228
|
extraConsoleCommandsFunctionMap.set(
|
|
233
229
|
"slotDisplay",
|
|
@@ -256,8 +252,12 @@ function initMap() {
|
|
|
256
252
|
"spikesDisplay",
|
|
257
253
|
commandsDisplay.spikesDisplay,
|
|
258
254
|
);
|
|
259
|
-
extraConsoleCommandsFunctionMap.set(
|
|
255
|
+
extraConsoleCommandsFunctionMap.set(
|
|
256
|
+
"superSecretRoom",
|
|
257
|
+
commands.superSecretRoom,
|
|
258
|
+
);
|
|
260
259
|
extraConsoleCommandsFunctionMap.set("startingRoom", commands.startingRoom);
|
|
260
|
+
extraConsoleCommandsFunctionMap.set("startRoom", commands.startRoom);
|
|
261
261
|
extraConsoleCommandsFunctionMap.set(
|
|
262
262
|
"tearDisplay",
|
|
263
263
|
commandsDisplay.tearDisplay,
|
|
@@ -267,14 +267,18 @@ function initMap() {
|
|
|
267
267
|
"tearsDisplay",
|
|
268
268
|
commandsDisplay.tearsDisplay,
|
|
269
269
|
);
|
|
270
|
+
extraConsoleCommandsFunctionMap.set("tests", commands.tests);
|
|
270
271
|
extraConsoleCommandsFunctionMap.set("tntDisplay", commandsDisplay.tntDisplay);
|
|
271
272
|
extraConsoleCommandsFunctionMap.set(
|
|
272
273
|
"tntsDisplay",
|
|
273
274
|
commandsDisplay.tntsDisplay,
|
|
274
275
|
);
|
|
275
276
|
extraConsoleCommandsFunctionMap.set("trapdoor", commands.trapdoorCommand);
|
|
276
|
-
extraConsoleCommandsFunctionMap.set("
|
|
277
|
-
extraConsoleCommandsFunctionMap.set(
|
|
277
|
+
extraConsoleCommandsFunctionMap.set("treasureRoom", commands.treasureRoom);
|
|
278
|
+
extraConsoleCommandsFunctionMap.set(
|
|
279
|
+
"ultraSecretRoom",
|
|
280
|
+
commands.ultraSecretRoom,
|
|
281
|
+
);
|
|
278
282
|
extraConsoleCommandsFunctionMap.set("unseed", commands.unseed);
|
|
279
283
|
extraConsoleCommandsFunctionMap.set("up", commands.up);
|
|
280
284
|
extraConsoleCommandsFunctionMap.set("warp", commands.warp);
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
// This file is arbitrarily named "listCommands.ts" instead of "commands.ts" so that it will appear
|
|
2
|
-
// below
|
|
2
|
+
// below "exports.ts".
|
|
3
3
|
|
|
4
4
|
// cspell:ignore addcharges
|
|
5
5
|
/**
|
|
6
6
|
* This is a list of custom console commands that are included with the standard library.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
8
|
+
* As a quality of life feature, you do not have to match the casing of the command. For example,
|
|
9
|
+
* you can type the "addCharges" command as "addcharges", and it will still work the same.
|
|
10
|
+
*
|
|
11
|
+
* Additionally, you can also abbreviate any command by omitting letters that do not overlap with
|
|
12
|
+
* any other command. For example, the command of "c" will be interpreted as the "card" command.
|
|
10
13
|
*
|
|
11
14
|
* In order for the custom console commands to work, you first have to call
|
|
12
15
|
* `enableExtraConsoleCommands`. (See the "Extra Console Commands (Init)" page for more details.)
|
|
13
16
|
*
|
|
17
|
+
* Each command has a corresponding function of the same name, but these functions are not actually
|
|
18
|
+
* exported for end-user consumption. (This is to cut down on namespace conflicts and because the
|
|
19
|
+
* names of the functions are not very descriptive.)
|
|
20
|
+
*
|
|
14
21
|
* @module
|
|
15
22
|
*/
|
|
16
23
|
|
|
@@ -33,19 +40,17 @@ import {
|
|
|
33
40
|
TrinketType,
|
|
34
41
|
} from "isaac-typescript-definitions";
|
|
35
42
|
import { game, sfxManager } from "../../cachedClasses";
|
|
36
|
-
import {
|
|
37
|
-
FIRST_ROOM_TYPE,
|
|
38
|
-
FIRST_STAGE,
|
|
39
|
-
LAST_ROOM_TYPE,
|
|
40
|
-
LAST_STAGE,
|
|
41
|
-
MAX_LEVEL_GRID_INDEX,
|
|
42
|
-
} from "../../constants";
|
|
43
|
+
import { MAX_LEVEL_GRID_INDEX } from "../../constants";
|
|
43
44
|
import {
|
|
44
45
|
FIRST_CARD,
|
|
45
46
|
FIRST_CHARACTER,
|
|
46
47
|
FIRST_PILL_EFFECT,
|
|
48
|
+
FIRST_ROOM_TYPE,
|
|
49
|
+
FIRST_STAGE,
|
|
47
50
|
LAST_CARD,
|
|
48
51
|
LAST_PILL_EFFECT,
|
|
52
|
+
LAST_ROOM_TYPE,
|
|
53
|
+
LAST_STAGE,
|
|
49
54
|
LAST_VANILLA_CHARACTER,
|
|
50
55
|
} from "../../constantsFirstLast";
|
|
51
56
|
import { HealthType } from "../../enums/HealthType";
|
|
@@ -153,7 +158,7 @@ export function addCharges(params: string): void {
|
|
|
153
158
|
* Warps to the Angel Room for the floor. If the Devil Room has already been visited or initialized,
|
|
154
159
|
* this will uninitialize it and make an Angel Room instead.
|
|
155
160
|
*/
|
|
156
|
-
export function
|
|
161
|
+
export function angelRoom(): void {
|
|
157
162
|
devilAngel(false);
|
|
158
163
|
}
|
|
159
164
|
|
|
@@ -278,7 +283,7 @@ export function boneHearts(params: string): void {
|
|
|
278
283
|
}
|
|
279
284
|
|
|
280
285
|
/** Warps to the first Boss Room on the floor. */
|
|
281
|
-
export function
|
|
286
|
+
export function bossRoom(): void {
|
|
282
287
|
warpToRoomType(RoomType.BOSS);
|
|
283
288
|
}
|
|
284
289
|
|
|
@@ -475,14 +480,14 @@ export function damage(): void {
|
|
|
475
480
|
|
|
476
481
|
/** Alias for the "devil" command. */
|
|
477
482
|
export function dd(): void {
|
|
478
|
-
|
|
483
|
+
devilRoom();
|
|
479
484
|
}
|
|
480
485
|
|
|
481
486
|
/**
|
|
482
487
|
* Warps to the Devil Room for the floor. If the Angel Room has already been visited or initialized,
|
|
483
488
|
* this will uninitialize it and make an Devil Room instead.
|
|
484
489
|
*/
|
|
485
|
-
export function
|
|
490
|
+
export function devilRoom(): void {
|
|
486
491
|
devilAngel(true);
|
|
487
492
|
}
|
|
488
493
|
|
|
@@ -502,7 +507,7 @@ export function down(params: string): void {
|
|
|
502
507
|
movePlayer(params, Direction.DOWN);
|
|
503
508
|
}
|
|
504
509
|
|
|
505
|
-
/** Warps to the Dungeon (i.e. crawl space) for the floor. */
|
|
510
|
+
/** Warps to the Dungeon (i.e. the crawl space room) for the floor. */
|
|
506
511
|
export function dungeon(): void {
|
|
507
512
|
changeRoom(GridRoom.DUNGEON);
|
|
508
513
|
}
|
|
@@ -520,8 +525,8 @@ export function eh(params: string): void {
|
|
|
520
525
|
}
|
|
521
526
|
|
|
522
527
|
/** Alias for the "iAmError" command. */
|
|
523
|
-
export function
|
|
524
|
-
|
|
528
|
+
export function errorRoom(): void {
|
|
529
|
+
iAmErrorRoom();
|
|
525
530
|
}
|
|
526
531
|
|
|
527
532
|
/**
|
|
@@ -665,11 +670,6 @@ export function gridEntities(): void {
|
|
|
665
670
|
}
|
|
666
671
|
}
|
|
667
672
|
|
|
668
|
-
/** Alias for the "hearts" command. */
|
|
669
|
-
export function h(params: string): void {
|
|
670
|
-
hearts(params);
|
|
671
|
-
}
|
|
672
|
-
|
|
673
673
|
/**
|
|
674
674
|
* Gives a half red heart. Provide a number to give a custom amount of hearts. (You can use negative
|
|
675
675
|
* numbers to remove hearts.)
|
|
@@ -684,7 +684,7 @@ export function hitboxes(): void {
|
|
|
684
684
|
}
|
|
685
685
|
|
|
686
686
|
/** Warps to the I AM ERROR room for the floor. */
|
|
687
|
-
export function
|
|
687
|
+
export function iAmErrorRoom(): void {
|
|
688
688
|
changeRoom(GridRoom.ERROR);
|
|
689
689
|
}
|
|
690
690
|
|
|
@@ -818,11 +818,6 @@ export function maxHearts(params: string): void {
|
|
|
818
818
|
addHeart(params, HealthType.MAX_HEARTS);
|
|
819
819
|
}
|
|
820
820
|
|
|
821
|
-
/** Alias for the "maxHearts" command. */
|
|
822
|
-
export function mh(params: string): void {
|
|
823
|
-
maxHearts(params);
|
|
824
|
-
}
|
|
825
|
-
|
|
826
821
|
/** Warps to the first Miniboss Room on the floor. */
|
|
827
822
|
export function miniboss(): void {
|
|
828
823
|
warpToRoomType(RoomType.MINI_BOSS);
|
|
@@ -966,11 +961,6 @@ export function redHearts(params: string): void {
|
|
|
966
961
|
hearts(params);
|
|
967
962
|
}
|
|
968
963
|
|
|
969
|
-
/** Alias for the "redHearts" command. */
|
|
970
|
-
export function rh(params: string): void {
|
|
971
|
-
redHearts(params);
|
|
972
|
-
}
|
|
973
|
-
|
|
974
964
|
/** Moves the player 0.5 units right. Provide a number to move a custom amount of units. */
|
|
975
965
|
export function right(params: string): void {
|
|
976
966
|
movePlayer(params, Direction.RIGHT);
|
|
@@ -1050,12 +1040,12 @@ export function s(params: string): void {
|
|
|
1050
1040
|
}
|
|
1051
1041
|
|
|
1052
1042
|
/** Warps to the first Sacrifice Room on the floor. */
|
|
1053
|
-
export function
|
|
1043
|
+
export function sacrificeRoom(): void {
|
|
1054
1044
|
warpToRoomType(RoomType.SACRIFICE);
|
|
1055
1045
|
}
|
|
1056
1046
|
|
|
1057
1047
|
/** Warps to the first Secret Room on the floor. */
|
|
1058
|
-
export function
|
|
1048
|
+
export function secretRoom(): void {
|
|
1059
1049
|
warpToRoomType(RoomType.SECRET);
|
|
1060
1050
|
}
|
|
1061
1051
|
|
|
@@ -1162,11 +1152,6 @@ export function setPosition(params: string): void {
|
|
|
1162
1152
|
player.Position = position;
|
|
1163
1153
|
}
|
|
1164
1154
|
|
|
1165
|
-
/** Alias for the "soulHearts" command. */
|
|
1166
|
-
export function sh(params: string): void {
|
|
1167
|
-
soulHearts(params);
|
|
1168
|
-
}
|
|
1169
|
-
|
|
1170
1155
|
/** Warps to the first shop on the floor. */
|
|
1171
1156
|
export function shop(): void {
|
|
1172
1157
|
warpToRoomType(RoomType.SHOP);
|
|
@@ -1282,8 +1267,13 @@ export function startingRoom(): void {
|
|
|
1282
1267
|
changeRoom(startingRoomIndex);
|
|
1283
1268
|
}
|
|
1284
1269
|
|
|
1270
|
+
/** Alias for the "startingRoom" command. */
|
|
1271
|
+
export function startRoom(): void {
|
|
1272
|
+
startingRoom();
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1285
1275
|
/** Warps to the first Super Secret Room on the floor. */
|
|
1286
|
-
export function
|
|
1276
|
+
export function superSecretRoom(): void {
|
|
1287
1277
|
warpToRoomType(RoomType.SUPER_SECRET);
|
|
1288
1278
|
}
|
|
1289
1279
|
|
|
@@ -1301,18 +1291,23 @@ export function tears(): void {
|
|
|
1301
1291
|
printEnabled(v.run.maxDamage, "debug tear-rate");
|
|
1302
1292
|
}
|
|
1303
1293
|
|
|
1294
|
+
/** Alias for the "runTests" command. */
|
|
1295
|
+
export function tests(): void {
|
|
1296
|
+
runTests();
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1304
1299
|
/** Creates a trapdoor next to the player. */
|
|
1305
1300
|
export function trapdoorCommand(): void {
|
|
1306
1301
|
spawnTrapdoorOrCrawlSpace(true);
|
|
1307
1302
|
}
|
|
1308
1303
|
|
|
1309
1304
|
/** Warps to the first Treasure Room on the floor. */
|
|
1310
|
-
export function
|
|
1305
|
+
export function treasureRoom(): void {
|
|
1311
1306
|
warpToRoomType(RoomType.TREASURE);
|
|
1312
1307
|
}
|
|
1313
1308
|
|
|
1314
1309
|
/** Warps to the first Ultra Secret Room on the floor. */
|
|
1315
|
-
export function
|
|
1310
|
+
export function ultraSecretRoom(): void {
|
|
1316
1311
|
warpToRoomType(RoomType.ULTRA_SECRET);
|
|
1317
1312
|
}
|
|
1318
1313
|
|