isaacscript-common 4.2.8 → 4.3.2
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/enums/StageTravelEntityState.d.ts +4 -0
- package/enums/StageTravelEntityState.lua +7 -0
- package/enums/StageTravelState.d.ts +6 -0
- package/enums/StageTravelState.lua +11 -0
- package/features/{getCollectibleItemPoolType.d.ts → collectibleItemPoolType.d.ts} +0 -0
- package/features/{getCollectibleItemPoolType.lua → collectibleItemPoolType.lua} +2 -2
- package/features/customTrapdoor/constants.d.ts +5 -0
- package/features/customTrapdoor/constants.lua +7 -0
- package/features/customTrapdoor/exports.d.ts +37 -0
- package/features/customTrapdoor/exports.lua +120 -0
- package/features/customTrapdoor/init.d.ts +1 -0
- package/features/customTrapdoor/init.lua +11 -0
- package/features/{stageTravel → customTrapdoor}/stageTravel.d.ts +0 -0
- package/features/{stageTravel → customTrapdoor}/stageTravel.lua +0 -0
- package/features/{stageTravel → customTrapdoor}/trapdoor.d.ts +0 -0
- package/features/{stageTravel → customTrapdoor}/trapdoor.lua +0 -0
- package/features/customTrapdoor/v.d.ts +14 -0
- package/features/customTrapdoor/v.lua +16 -0
- package/features/extraConsoleCommands/commandsSubroutines.d.ts +1 -1
- package/features/extraConsoleCommands/commandsSubroutines.lua +1 -1
- package/features/extraConsoleCommands/init.lua +1 -1
- package/features/extraConsoleCommands/listCommands.d.ts +3 -3
- package/features/extraConsoleCommands/listCommands.lua +6 -6
- package/features/ponyDetection.d.ts +6 -1
- package/features/ponyDetection.lua +14 -1
- package/features/roomClearFrame.d.ts +11 -0
- package/features/roomClearFrame.lua +38 -0
- package/features/stageHistory.d.ts +15 -0
- package/features/stageHistory.lua +62 -0
- package/functions/gridEntity.d.ts +5 -0
- package/functions/gridEntity.lua +9 -0
- package/functions/gridEntitySpecific.d.ts +11 -6
- package/functions/gridEntitySpecific.lua +18 -0
- package/functions/log.lua +7 -1
- package/functions/nextStage.d.ts +18 -0
- package/functions/nextStage.lua +245 -0
- package/functions/rooms.d.ts +2 -2
- package/functions/rooms.lua +2 -2
- package/functions/stage.d.ts +10 -0
- package/functions/stage.lua +28 -0
- package/index.d.ts +9 -5
- package/index.lua +58 -20
- package/initFeatures.lua +12 -3
- package/interfaces/StageTravelEntityDescription.d.ts +5 -0
- package/interfaces/StageTravelEntityDescription.lua +2 -0
- package/objects/roomTypeNames.lua +1 -1
- package/package.json +2 -2
- package/enums/StageTravelEntityType.d.ts +0 -5
- package/enums/StageTravelEntityType.lua +0 -9
- package/features/stageTravel/exports.d.ts +0 -23
- package/features/stageTravel/exports.lua +0 -44
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
local ____exports = {}
|
|
2
|
-
____exports.StageTravelEntityType = {}
|
|
3
|
-
____exports.StageTravelEntityType.TRAPDOOR = 0
|
|
4
|
-
____exports.StageTravelEntityType[____exports.StageTravelEntityType.TRAPDOOR] = "TRAPDOOR"
|
|
5
|
-
____exports.StageTravelEntityType.CRAWLSPACE = 1
|
|
6
|
-
____exports.StageTravelEntityType[____exports.StageTravelEntityType.CRAWLSPACE] = "CRAWLSPACE"
|
|
7
|
-
____exports.StageTravelEntityType.HEAVEN_DOOR = 2
|
|
8
|
-
____exports.StageTravelEntityType[____exports.StageTravelEntityType.HEAVEN_DOOR] = "HEAVEN_DOOR"
|
|
9
|
-
return ____exports
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
-
/// <reference types="isaac-typescript-definitions" />
|
|
3
|
-
/// <reference types="isaac-typescript-definitions" />
|
|
4
|
-
/// <reference types="isaac-typescript-definitions" />
|
|
5
|
-
/**
|
|
6
|
-
* Spawn a trapdoor grid entity that will have one or more of the following custom attributes:
|
|
7
|
-
*
|
|
8
|
-
* - custom sprite
|
|
9
|
-
* - custom opening/closing logic
|
|
10
|
-
* - custom destination / logic for after the player enters
|
|
11
|
-
*/
|
|
12
|
-
export declare function spawnCustomTrapdoor(gridIndexOrPosition: int | Vector): GridEntity;
|
|
13
|
-
/**
|
|
14
|
-
* Convert an existing trapdoor into a custom trapdoor that will have one or more of the following
|
|
15
|
-
* custom attributes:
|
|
16
|
-
*
|
|
17
|
-
* - custom sprite
|
|
18
|
-
* - custom opening/closing logic
|
|
19
|
-
* - custom destination / logic for after the player enters
|
|
20
|
-
*/
|
|
21
|
-
export declare function initCustomTrapdoor(_trapdoor: GridEntity, _shouldSpawnOpenFunc?: typeof defaultShouldSpawnOpenFunc): void;
|
|
22
|
-
declare function defaultShouldSpawnOpenFunc(_entity: GridEntity | EntityEffect): boolean;
|
|
23
|
-
export {};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
local ____exports = {}
|
|
2
|
-
local defaultShouldSpawnOpenFunc
|
|
3
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
4
|
-
local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
5
|
-
local ____cachedClasses = require("cachedClasses")
|
|
6
|
-
local game = ____cachedClasses.game
|
|
7
|
-
local ____gridEntity = require("functions.gridEntity")
|
|
8
|
-
local spawnGrid = ____gridEntity.spawnGrid
|
|
9
|
-
--- Convert an existing trapdoor into a custom trapdoor that will have one or more of the following
|
|
10
|
-
-- custom attributes:
|
|
11
|
-
--
|
|
12
|
-
-- - custom sprite
|
|
13
|
-
-- - custom opening/closing logic
|
|
14
|
-
-- - custom destination / logic for after the player enters
|
|
15
|
-
function ____exports.initCustomTrapdoor(self, _trapdoor, _shouldSpawnOpenFunc)
|
|
16
|
-
if _shouldSpawnOpenFunc == nil then
|
|
17
|
-
_shouldSpawnOpenFunc = defaultShouldSpawnOpenFunc
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
function defaultShouldSpawnOpenFunc(self, _entity)
|
|
21
|
-
local room = game:GetRoom()
|
|
22
|
-
local roomFrameCount = room:GetFrameCount()
|
|
23
|
-
local roomClear = room:IsClear()
|
|
24
|
-
if roomFrameCount == 0 then
|
|
25
|
-
if not roomClear then
|
|
26
|
-
return false
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
return false
|
|
30
|
-
end
|
|
31
|
-
--- Spawn a trapdoor grid entity that will have one or more of the following custom attributes:
|
|
32
|
-
--
|
|
33
|
-
-- - custom sprite
|
|
34
|
-
-- - custom opening/closing logic
|
|
35
|
-
-- - custom destination / logic for after the player enters
|
|
36
|
-
function ____exports.spawnCustomTrapdoor(self, gridIndexOrPosition)
|
|
37
|
-
local trapdoor = spawnGrid(nil, GridEntityType.TRAPDOOR, gridIndexOrPosition)
|
|
38
|
-
if trapdoor == nil then
|
|
39
|
-
error("Failed to spawn a custom trapdoor.")
|
|
40
|
-
end
|
|
41
|
-
____exports.initCustomTrapdoor(nil, trapdoor)
|
|
42
|
-
return trapdoor
|
|
43
|
-
end
|
|
44
|
-
return ____exports
|