isaacscript-common 6.6.4 → 6.7.1
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/customRevive.lua +4 -4
- package/dist/callbacks/postCursedTeleport.lua +2 -2
- package/dist/callbacks/postCustomDoorEnter.d.ts +1 -1
- package/dist/callbacks/postCustomDoorEnter.lua +6 -6
- package/dist/callbacks/postDiceRoomActivated.lua +2 -2
- package/dist/callbacks/postFlip.lua +3 -3
- package/dist/callbacks/postGridEntity.lua +3 -3
- package/dist/callbacks/postGridEntityCollision.lua +3 -3
- package/dist/callbacks/postGridEntityRender.lua +2 -2
- package/dist/callbacks/postNewRoomEarly.lua +5 -5
- package/dist/callbacks/postPickupCollect.lua +2 -2
- package/dist/callbacks/postPitRender.lua +2 -2
- package/dist/callbacks/postPitUpdate.lua +2 -2
- package/dist/callbacks/postPlayerCollectible.lua +2 -2
- package/dist/callbacks/postPoopRender.lua +2 -2
- package/dist/callbacks/postPoopUpdate.lua +2 -2
- package/dist/callbacks/postPressurePlateRender.lua +2 -2
- package/dist/callbacks/postPressurePlateUpdate.lua +2 -2
- package/dist/callbacks/postPurchase.lua +2 -2
- package/dist/callbacks/postRockRender.lua +2 -2
- package/dist/callbacks/postRockUpdate.lua +2 -2
- package/dist/callbacks/postSlotInitUpdate.lua +2 -2
- package/dist/callbacks/postSlotRender.lua +2 -2
- package/dist/callbacks/postSpikesRender.lua +2 -2
- package/dist/callbacks/postSpikesUpdate.lua +2 -2
- package/dist/callbacks/postTNTRender.lua +2 -2
- package/dist/callbacks/postTNTUpdate.lua +2 -2
- package/dist/callbacks/preBerserkDeath.lua +2 -2
- package/dist/callbacks/preNewLevel.lua +2 -2
- package/dist/callbacks/subscriptions/postDoorRender.d.ts +2 -3
- package/dist/callbacks/subscriptions/postDoorRender.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postDoorRender.lua +3 -3
- package/dist/callbacks/subscriptions/postDoorUpdate.d.ts +2 -3
- package/dist/callbacks/subscriptions/postDoorUpdate.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postDoorUpdate.lua +3 -3
- package/dist/callbacks/subscriptions/postPitRender.d.ts +2 -3
- package/dist/callbacks/subscriptions/postPitRender.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postPitRender.lua +3 -3
- package/dist/callbacks/subscriptions/postPitUpdate.d.ts +2 -3
- package/dist/callbacks/subscriptions/postPitUpdate.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postPitUpdate.lua +3 -3
- package/dist/callbacks/subscriptions/postPoopRender.d.ts +2 -3
- package/dist/callbacks/subscriptions/postPoopRender.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postPoopRender.lua +3 -3
- package/dist/callbacks/subscriptions/postPoopUpdate.d.ts +2 -3
- package/dist/callbacks/subscriptions/postPoopUpdate.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postPoopUpdate.lua +3 -3
- package/dist/callbacks/subscriptions/postPressurePlateRender.d.ts +2 -3
- package/dist/callbacks/subscriptions/postPressurePlateRender.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postPressurePlateRender.lua +3 -3
- package/dist/callbacks/subscriptions/postPressurePlateUpdate.d.ts +2 -3
- package/dist/callbacks/subscriptions/postPressurePlateUpdate.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postPressurePlateUpdate.lua +3 -3
- package/dist/enums/private/SerializationBrand.d.ts +0 -4
- package/dist/enums/private/SerializationBrand.d.ts.map +1 -1
- package/dist/features/characterStats.lua +2 -2
- package/dist/features/collectibleItemPoolType.lua +2 -2
- package/dist/features/customGridEntity.d.ts.map +1 -1
- package/dist/features/customGridEntity.lua +5 -5
- package/dist/features/customStage/backdrop.lua +2 -2
- package/dist/features/customStage/{gridEntities.d.ts → customStageGridEntities.d.ts} +1 -1
- package/dist/features/customStage/customStageGridEntities.d.ts.map +1 -0
- package/dist/features/customStage/{gridEntities.lua → customStageGridEntities.lua} +8 -8
- package/dist/features/customStage/{util.d.ts → customStageUtils.d.ts} +1 -1
- package/dist/features/customStage/customStageUtils.d.ts.map +1 -0
- package/dist/features/customStage/{util.lua → customStageUtils.lua} +0 -0
- package/dist/features/customStage/exports.lua +4 -4
- package/dist/features/customStage/init.lua +6 -6
- package/dist/features/customStage/shadows.lua +2 -2
- package/dist/features/customStage/versusScreen.lua +4 -4
- package/dist/features/debugDisplay/v.lua +4 -4
- package/dist/features/deployJSONRoom.lua +20 -20
- package/dist/features/extraConsoleCommands/commandsSubroutines.lua +3 -3
- package/dist/features/extraConsoleCommands/listCommands.d.ts.map +1 -1
- package/dist/features/extraConsoleCommands/listCommands.lua +14 -14
- package/dist/features/pause.lua +2 -2
- package/dist/features/persistentEntities.lua +2 -2
- package/dist/features/preventCollectibleRotation.lua +2 -2
- package/dist/features/saveDataManager/exports.d.ts.map +1 -1
- package/dist/features/sirenHelpers.lua +2 -2
- package/dist/functions/ambush.lua +5 -5
- package/dist/functions/{boss.d.ts → bosses.d.ts} +22 -4
- package/dist/functions/bosses.d.ts.map +1 -0
- package/dist/functions/{boss.lua → bosses.lua} +38 -13
- package/dist/functions/collectibleTag.lua +2 -2
- package/dist/functions/collectibles.lua +5 -5
- package/dist/functions/deepCopy.d.ts +8 -5
- package/dist/functions/deepCopy.d.ts.map +1 -1
- package/dist/functions/deepCopy.lua +142 -38
- package/dist/functions/{entity.d.ts → entities.d.ts} +21 -19
- package/dist/functions/entities.d.ts.map +1 -0
- package/dist/functions/{entity.lua → entities.lua} +25 -20
- package/dist/functions/{entitySpecific.d.ts → entitiesSpecific.d.ts} +145 -68
- package/dist/functions/entitiesSpecific.d.ts.map +1 -0
- package/dist/functions/{entitySpecific.lua → entitiesSpecific.lua} +203 -65
- package/dist/functions/familiars.lua +2 -2
- package/dist/functions/{gridEntity.d.ts → gridEntities.d.ts} +48 -17
- package/dist/functions/gridEntities.d.ts.map +1 -0
- package/dist/functions/{gridEntity.lua → gridEntities.lua} +140 -90
- package/dist/functions/gridEntitiesSpecific.d.ts +141 -0
- package/dist/functions/gridEntitiesSpecific.d.ts.map +1 -0
- package/dist/functions/gridEntitiesSpecific.lua +366 -0
- package/dist/functions/log.d.ts +1 -1
- package/dist/functions/log.lua +9 -9
- package/dist/functions/{npc.d.ts → npcs.d.ts} +24 -2
- package/dist/functions/npcs.d.ts.map +1 -0
- package/dist/functions/{npc.lua → npcs.lua} +44 -9
- package/dist/functions/pickups.d.ts +4 -119
- package/dist/functions/pickups.d.ts.map +1 -1
- package/dist/functions/pickups.lua +10 -439
- package/dist/functions/pickupsSpecific.d.ts +229 -0
- package/dist/functions/pickupsSpecific.d.ts.map +1 -0
- package/dist/functions/pickupsSpecific.lua +560 -0
- package/dist/functions/playerHealth.lua +6 -6
- package/dist/functions/{player.d.ts → players.d.ts} +1 -1
- package/dist/functions/players.d.ts.map +1 -0
- package/dist/functions/{player.lua → players.lua} +0 -0
- package/dist/functions/pocketItems.lua +2 -2
- package/dist/functions/positionVelocity.lua +6 -6
- package/dist/functions/pressurePlate.d.ts +10 -0
- package/dist/functions/pressurePlate.d.ts.map +1 -0
- package/dist/functions/pressurePlate.lua +29 -0
- package/dist/functions/revive.lua +7 -7
- package/dist/functions/rooms.lua +2 -2
- package/dist/functions/saveFile.lua +3 -3
- package/dist/functions/spawnCollectible.lua +4 -4
- package/dist/functions/{sprite.d.ts → sprites.d.ts} +1 -1
- package/dist/functions/sprites.d.ts.map +1 -0
- package/dist/functions/{sprite.lua → sprites.lua} +0 -0
- package/dist/functions/table.d.ts +1 -1
- package/dist/functions/table.lua +1 -1
- package/dist/functions/transformations.lua +2 -2
- package/dist/functions/trinketGive.lua +2 -2
- package/dist/functions/trinkets.lua +6 -6
- package/dist/functions/utils.d.ts +7 -0
- package/dist/functions/utils.d.ts.map +1 -1
- package/dist/functions/utils.lua +35 -22
- package/dist/index.d.ts +10 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.lua +26 -10
- package/dist/types/AnyGridEntity.d.ts +10 -0
- package/dist/types/AnyGridEntity.d.ts.map +1 -0
- package/dist/types/AnyGridEntity.lua +2 -0
- package/package.json +2 -2
- package/src/callbacks/customRevive.ts +2 -2
- package/src/callbacks/postCursedTeleport.ts +2 -2
- package/src/callbacks/postCustomDoorEnter.ts +3 -3
- package/src/callbacks/postDiceRoomActivated.ts +1 -1
- package/src/callbacks/postFlip.ts +1 -1
- package/src/callbacks/postGridEntity.ts +1 -1
- package/src/callbacks/postGridEntityCollision.ts +1 -1
- package/src/callbacks/postGridEntityRender.ts +1 -1
- package/src/callbacks/postNewRoomEarly.ts +9 -3
- package/src/callbacks/postPickupCollect.ts +1 -1
- package/src/callbacks/postPitRender.ts +1 -1
- package/src/callbacks/postPitUpdate.ts +1 -1
- package/src/callbacks/postPlayerCollectible.ts +2 -2
- package/src/callbacks/postPoopRender.ts +1 -1
- package/src/callbacks/postPoopUpdate.ts +1 -1
- package/src/callbacks/postPressurePlateRender.ts +1 -1
- package/src/callbacks/postPressurePlateUpdate.ts +1 -1
- package/src/callbacks/postPurchase.ts +1 -1
- package/src/callbacks/postRockRender.ts +1 -1
- package/src/callbacks/postRockUpdate.ts +1 -1
- package/src/callbacks/postSacrifice.ts +1 -1
- package/src/callbacks/postSlotInitUpdate.ts +1 -1
- package/src/callbacks/postSlotRender.ts +1 -1
- package/src/callbacks/postSpikesRender.ts +1 -1
- package/src/callbacks/postSpikesUpdate.ts +1 -1
- package/src/callbacks/postTNTRender.ts +1 -1
- package/src/callbacks/postTNTUpdate.ts +1 -1
- package/src/callbacks/preBerserkDeath.ts +1 -1
- package/src/callbacks/preNewLevel.ts +1 -1
- package/src/callbacks/subscriptions/postDoorRender.ts +7 -5
- package/src/callbacks/subscriptions/postDoorUpdate.ts +7 -5
- package/src/callbacks/subscriptions/postPitRender.ts +6 -7
- package/src/callbacks/subscriptions/postPitUpdate.ts +6 -7
- package/src/callbacks/subscriptions/postPoopRender.ts +7 -5
- package/src/callbacks/subscriptions/postPoopUpdate.ts +7 -5
- package/src/callbacks/subscriptions/postPressurePlateRender.ts +7 -5
- package/src/callbacks/subscriptions/postPressurePlateUpdate.ts +7 -5
- package/src/enums/private/SerializationBrand.ts +0 -4
- package/src/features/characterStats.ts +1 -1
- package/src/features/collectibleItemPoolType.ts +1 -1
- package/src/features/customGridEntity.ts +6 -3
- package/src/features/customStage/backdrop.ts +1 -1
- package/src/features/customStage/{gridEntities.ts → customStageGridEntities.ts} +3 -3
- package/src/features/customStage/{util.ts → customStageUtils.ts} +0 -0
- package/src/features/customStage/exports.ts +2 -2
- package/src/features/customStage/init.ts +1 -1
- package/src/features/customStage/shadows.ts +1 -1
- package/src/features/customStage/versusScreen.ts +2 -2
- package/src/features/debugDisplay/v.ts +2 -2
- package/src/features/deployJSONRoom.ts +11 -7
- package/src/features/extraConsoleCommands/commandsSubroutines.ts +2 -2
- package/src/features/extraConsoleCommands/listCommands.ts +13 -9
- package/src/features/pause.ts +1 -1
- package/src/features/persistentEntities.ts +2 -2
- package/src/features/preventCollectibleRotation.ts +1 -1
- package/src/features/saveDataManager/exports.ts +7 -4
- package/src/features/sirenHelpers.ts +1 -1
- package/src/functions/ambush.ts +2 -2
- package/src/functions/array.ts +1 -1
- package/src/functions/bitwise.ts +2 -2
- package/src/functions/{boss.ts → bosses.ts} +29 -21
- package/src/functions/collectibleTag.ts +1 -1
- package/src/functions/collectibles.ts +2 -2
- package/src/functions/deepCopy.ts +98 -19
- package/src/functions/deepCopyTests.ts +6 -4
- package/src/functions/{entity.ts → entities.ts} +23 -21
- package/src/functions/{entitySpecific.ts → entitiesSpecific.ts} +170 -99
- package/src/functions/familiars.ts +1 -1
- package/src/functions/{gridEntity.ts → gridEntities.ts} +110 -34
- package/src/functions/gridEntitiesSpecific.ts +490 -0
- package/src/functions/log.ts +6 -6
- package/src/functions/{npc.ts → npcs.ts} +42 -11
- package/src/functions/pickups.ts +8 -475
- package/src/functions/pickupsSpecific.ts +613 -0
- package/src/functions/playerHealth.ts +1 -1
- package/src/functions/{player.ts → players.ts} +0 -0
- package/src/functions/pocketItems.ts +1 -1
- package/src/functions/positionVelocity.ts +3 -3
- package/src/functions/pressurePlate.ts +29 -0
- package/src/functions/revive.ts +2 -2
- package/src/functions/rooms.ts +1 -1
- package/src/functions/saveFile.ts +1 -1
- package/src/functions/spawnCollectible.ts +2 -2
- package/src/functions/{sprite.ts → sprites.ts} +0 -0
- package/src/functions/table.ts +1 -1
- package/src/functions/transformations.ts +1 -1
- package/src/functions/trinketGive.ts +4 -4
- package/src/functions/trinkets.ts +3 -3
- package/src/functions/tstlClass.ts +1 -1
- package/src/functions/ui.ts +3 -3
- package/src/functions/utils.ts +32 -13
- package/src/index.ts +10 -8
- package/src/types/AnyGridEntity.ts +9 -0
- package/dist/features/customStage/gridEntities.d.ts.map +0 -1
- package/dist/features/customStage/util.d.ts.map +0 -1
- package/dist/functions/boss.d.ts.map +0 -1
- package/dist/functions/entity.d.ts.map +0 -1
- package/dist/functions/entitySpecific.d.ts.map +0 -1
- package/dist/functions/gridEntity.d.ts.map +0 -1
- package/dist/functions/gridEntitySpecific.d.ts +0 -29
- package/dist/functions/gridEntitySpecific.d.ts.map +0 -1
- package/dist/functions/gridEntitySpecific.lua +0 -114
- package/dist/functions/npc.d.ts.map +0 -1
- package/dist/functions/player.d.ts.map +0 -1
- package/dist/functions/sprite.d.ts.map +0 -1
- package/src/functions/gridEntitySpecific.ts +0 -143
|
@@ -32,8 +32,10 @@ local ____rng = require("functions.rng")
|
|
|
32
32
|
local getRandomSeed = ____rng.getRandomSeed
|
|
33
33
|
local ____rooms = require("functions.rooms")
|
|
34
34
|
local roomUpdateSafe = ____rooms.roomUpdateSafe
|
|
35
|
-
local
|
|
36
|
-
local clearSprite =
|
|
35
|
+
local ____sprites = require("functions.sprites")
|
|
36
|
+
local clearSprite = ____sprites.clearSprite
|
|
37
|
+
local ____types = require("functions.types")
|
|
38
|
+
local isNumber = ____types.isNumber
|
|
37
39
|
local ____utils = require("functions.utils")
|
|
38
40
|
local erange = ____utils.erange
|
|
39
41
|
local ____vector = require("functions.vector")
|
|
@@ -46,6 +48,43 @@ function ____exports.getAllGridIndexes(self)
|
|
|
46
48
|
local gridSize = room:GetGridSize()
|
|
47
49
|
return erange(nil, gridSize)
|
|
48
50
|
end
|
|
51
|
+
--- Helper function to get every grid entity in the current room.
|
|
52
|
+
--
|
|
53
|
+
-- Use this function with no arguments to get every grid entity, or specify a variadic amount of
|
|
54
|
+
-- arguments to match specific grid entity types.
|
|
55
|
+
--
|
|
56
|
+
-- For example:
|
|
57
|
+
--
|
|
58
|
+
-- ```ts
|
|
59
|
+
-- for (const gridEntity of getGridEntities()) {
|
|
60
|
+
-- print(gridEntity.GetType())
|
|
61
|
+
-- }
|
|
62
|
+
-- ```
|
|
63
|
+
--
|
|
64
|
+
-- For example:
|
|
65
|
+
--
|
|
66
|
+
-- ```ts
|
|
67
|
+
-- const rocks = getGridEntities(
|
|
68
|
+
-- GridEntityType.ROCK,
|
|
69
|
+
-- GridEntityType.BLOCK,
|
|
70
|
+
-- GridEntityType.ROCK_TINTED,
|
|
71
|
+
-- );
|
|
72
|
+
-- ```
|
|
73
|
+
function ____exports.getGridEntities(self, ...)
|
|
74
|
+
local gridEntityTypes = {...}
|
|
75
|
+
local gridEntities = getAllGridEntities(nil)
|
|
76
|
+
if #gridEntityTypes == 0 then
|
|
77
|
+
return gridEntities
|
|
78
|
+
end
|
|
79
|
+
local gridEntityTypesSet = __TS__New(Set, gridEntityTypes)
|
|
80
|
+
return __TS__ArrayFilter(
|
|
81
|
+
gridEntities,
|
|
82
|
+
function(____, gridEntity)
|
|
83
|
+
local gridEntityType = gridEntity:GetType()
|
|
84
|
+
return gridEntityTypesSet:has(gridEntityType)
|
|
85
|
+
end
|
|
86
|
+
)
|
|
87
|
+
end
|
|
49
88
|
function getAllGridEntities(self)
|
|
50
89
|
local room = game:GetRoom()
|
|
51
90
|
local gridEntities = {}
|
|
@@ -57,6 +96,17 @@ function getAllGridEntities(self)
|
|
|
57
96
|
end
|
|
58
97
|
return gridEntities
|
|
59
98
|
end
|
|
99
|
+
--- Helper function to get all of the grid entities in the room that specifically match the type and
|
|
100
|
+
-- variant provided.
|
|
101
|
+
--
|
|
102
|
+
-- If you want to match every variant, use the `getGridEntities` function instead.
|
|
103
|
+
function ____exports.getMatchingGridEntities(self, gridEntityType, variant)
|
|
104
|
+
local gridEntities = ____exports.getGridEntities(nil, gridEntityType)
|
|
105
|
+
return __TS__ArrayFilter(
|
|
106
|
+
gridEntities,
|
|
107
|
+
function(____, gridEntity) return gridEntity:GetVariant() == variant end
|
|
108
|
+
)
|
|
109
|
+
end
|
|
60
110
|
--- Helper function to get the grid index of the top left wall. (This will depend on what the current
|
|
61
111
|
-- room shape is.)
|
|
62
112
|
function ____exports.getTopLeftWallGridIndex(self)
|
|
@@ -65,22 +115,18 @@ function ____exports.getTopLeftWallGridIndex(self)
|
|
|
65
115
|
local topLeftWallGridIndex = ROOM_SHAPE_TO_TOP_LEFT_WALL_GRID_INDEX_MAP:get(roomShape)
|
|
66
116
|
return topLeftWallGridIndex == nil and DEFAULT_TOP_LEFT_WALL_GRID_INDEX or topLeftWallGridIndex
|
|
67
117
|
end
|
|
68
|
-
--- Helper function to remove a grid entity
|
|
69
|
-
--
|
|
118
|
+
--- Helper function to remove a grid entity by providing the grid entity object or the grid index
|
|
119
|
+
-- inside of the room.
|
|
70
120
|
--
|
|
71
121
|
-- @param gridEntityOrGridIndex The grid entity or grid index to remove.
|
|
72
|
-
-- @param updateRoom
|
|
73
|
-
--
|
|
74
|
-
--
|
|
75
|
-
--
|
|
76
|
-
--
|
|
77
|
-
|
|
78
|
-
function ____exports.removeGrid(self, gridEntityOrGridIndex, updateRoom)
|
|
79
|
-
if updateRoom == nil then
|
|
80
|
-
updateRoom = true
|
|
81
|
-
end
|
|
122
|
+
-- @param updateRoom Whether or not to update the room after the grid entity is removed. This is
|
|
123
|
+
-- generally a good idea because if the room is not updated, you will be unable to
|
|
124
|
+
-- spawn another grid entity on the same tile until a frame has passed. However,
|
|
125
|
+
-- doing this is expensive, since it involves a call to `Isaac.GetRoomEntities`,
|
|
126
|
+
-- so set this to false if you need to invoke this function multiple times.
|
|
127
|
+
function ____exports.removeGridEntity(self, gridEntityOrGridIndex, updateRoom)
|
|
82
128
|
local room = game:GetRoom()
|
|
83
|
-
local gridIndex = gridEntityOrGridIndex:GetGridIndex()
|
|
129
|
+
local gridIndex = isNumber(nil, gridEntityOrGridIndex) and gridEntityOrGridIndex or gridEntityOrGridIndex:GetGridIndex()
|
|
84
130
|
room:RemoveGridEntity(gridIndex, 0, false)
|
|
85
131
|
if updateRoom then
|
|
86
132
|
roomUpdateSafe(nil)
|
|
@@ -92,7 +138,7 @@ end
|
|
|
92
138
|
-- - handles giving pits collision
|
|
93
139
|
-- - removes existing grid entities on the same tile, if any
|
|
94
140
|
-- - allows you to specify the grid index or the position
|
|
95
|
-
function ____exports.
|
|
141
|
+
function ____exports.spawnGridEntityWithVariant(self, gridEntityType, variant, gridIndexOrPosition)
|
|
96
142
|
local room = game:GetRoom()
|
|
97
143
|
local ____isVector_result_0
|
|
98
144
|
if isVector(nil, gridIndexOrPosition) then
|
|
@@ -102,7 +148,7 @@ function ____exports.spawnGridWithVariant(self, gridEntityType, variant, gridInd
|
|
|
102
148
|
end
|
|
103
149
|
local existingGridEntity = ____isVector_result_0
|
|
104
150
|
if existingGridEntity ~= nil then
|
|
105
|
-
____exports.
|
|
151
|
+
____exports.removeGridEntity(nil, existingGridEntity, true)
|
|
106
152
|
end
|
|
107
153
|
local position = isVector(nil, gridIndexOrPosition) and gridIndexOrPosition or room:GetGridPosition(gridIndexOrPosition)
|
|
108
154
|
local gridEntity = Isaac.GridSpawn(gridEntityType, variant, position)
|
|
@@ -171,42 +217,18 @@ function ____exports.getCollidingEntitiesWithGridEntity(self, gridEntity)
|
|
|
171
217
|
) end
|
|
172
218
|
)
|
|
173
219
|
end
|
|
174
|
-
--- Helper function to get
|
|
175
|
-
--
|
|
176
|
-
-- Use this function with no arguments to get every grid entity, or specify a variadic amount of
|
|
177
|
-
-- arguments to match specific grid entity types.
|
|
178
|
-
--
|
|
179
|
-
-- For example:
|
|
220
|
+
--- Helper function to get all of the crawl spaces in the room.
|
|
180
221
|
--
|
|
181
|
-
--
|
|
182
|
-
--
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
--
|
|
187
|
-
-- For example:
|
|
188
|
-
--
|
|
189
|
-
-- ```ts
|
|
190
|
-
-- const rocks = getGridEntities(
|
|
191
|
-
-- GridEntityType.ROCK,
|
|
192
|
-
-- GridEntityType.BLOCK,
|
|
193
|
-
-- GridEntityType.ROCK_TINTED,
|
|
194
|
-
-- );
|
|
195
|
-
-- ```
|
|
196
|
-
function ____exports.getGridEntities(self, ...)
|
|
197
|
-
local gridEntityTypes = {...}
|
|
198
|
-
local gridEntities = getAllGridEntities(nil)
|
|
199
|
-
if #gridEntityTypes == 0 then
|
|
200
|
-
return gridEntities
|
|
222
|
+
-- @param crawlSpaceVariant Optional. If specified, will only get the crawl spaces that match the
|
|
223
|
+
-- variant. Default is -1, which matches every variant.
|
|
224
|
+
function ____exports.getCrawlSpaces(self, crawlSpaceVariant)
|
|
225
|
+
if crawlSpaceVariant == nil then
|
|
226
|
+
crawlSpaceVariant = -1
|
|
201
227
|
end
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
local gridEntityType = gridEntity:GetType()
|
|
207
|
-
return gridEntityTypesSet:has(gridEntityType)
|
|
208
|
-
end
|
|
209
|
-
)
|
|
228
|
+
if crawlSpaceVariant == -1 then
|
|
229
|
+
return ____exports.getGridEntities(nil, GridEntityType.CRAWL_SPACE)
|
|
230
|
+
end
|
|
231
|
+
return ____exports.getMatchingGridEntities(nil, GridEntityType.CRAWL_SPACE, crawlSpaceVariant)
|
|
210
232
|
end
|
|
211
233
|
--- Helper function to get every grid entity in the current room except for certain specific types.
|
|
212
234
|
--
|
|
@@ -252,15 +274,6 @@ end
|
|
|
252
274
|
function ____exports.getGridEntityIDFromConstituents(self, gridEntityType, variant)
|
|
253
275
|
return (tostring(gridEntityType) .. ".") .. tostring(variant)
|
|
254
276
|
end
|
|
255
|
-
--- Helper function to get all of the grid entities in the room that specifically match the type and
|
|
256
|
-
-- variant provided.
|
|
257
|
-
function ____exports.getMatchingGridEntities(self, gridEntityType, variant)
|
|
258
|
-
local gridEntities = ____exports.getGridEntities(nil, gridEntityType)
|
|
259
|
-
return __TS__ArrayFilter(
|
|
260
|
-
gridEntities,
|
|
261
|
-
function(____, gridEntity) return gridEntity:GetVariant() == variant end
|
|
262
|
-
)
|
|
263
|
-
end
|
|
264
277
|
--- Helper function to get the alternate rock type (i.e. urn, mushroom, etc.) that the current room
|
|
265
278
|
-- will have.
|
|
266
279
|
--
|
|
@@ -306,25 +319,35 @@ function ____exports.getTopLeftWall(self)
|
|
|
306
319
|
local topLeftWallGridIndex = ____exports.getTopLeftWallGridIndex(nil)
|
|
307
320
|
return room:GetGridEntity(topLeftWallGridIndex)
|
|
308
321
|
end
|
|
309
|
-
function
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
322
|
+
--- Helper function to get all of the grid entities of type `GridEntityType.TRAPDOOR` in the room.
|
|
323
|
+
-- Specify a specific trapdoor variant to select only trapdoors of that variant.
|
|
324
|
+
function ____exports.getTrapdoors(self, trapdoorVariant)
|
|
325
|
+
if trapdoorVariant == nil then
|
|
326
|
+
return ____exports.getGridEntities(nil, GridEntityType.TRAPDOOR)
|
|
327
|
+
end
|
|
328
|
+
return ____exports.getMatchingGridEntities(nil, GridEntityType.TRAPDOOR, trapdoorVariant)
|
|
314
329
|
end
|
|
315
330
|
--- Helper function to see if the provided gridEntity is in its respective broken state. See the
|
|
316
331
|
-- `GRID_ENTITY_TYPE_TO_BROKEN_STATE_MAP` constant for more details.
|
|
317
332
|
--
|
|
318
333
|
-- Note that in the case of `GridEntityType.LOCK` (11), the state will turn to being broken before
|
|
319
334
|
-- the actual collision for the entity is removed.
|
|
320
|
-
function ____exports.
|
|
335
|
+
function ____exports.isGridEntityBreakableByExplosion(self, gridEntity)
|
|
321
336
|
local gridEntityType = gridEntity:GetType()
|
|
322
|
-
local
|
|
323
|
-
|
|
337
|
+
local gridEntityVariant = gridEntity:GetVariant()
|
|
338
|
+
local gridEntityTypeVariant = (tostring(gridEntityType) .. ".") .. tostring(gridEntityVariant)
|
|
339
|
+
return BREAKABLE_GRID_ENTITY_TYPES_BY_EXPLOSIONS:has(gridEntityType) or BREAKABLE_GRID_ENTITY_TYPES_VARIANTS_BY_EXPLOSIONS:has(gridEntityTypeVariant)
|
|
324
340
|
end
|
|
325
341
|
--- Helper function to detect whether a given Void Portal is one that randomly spawns after a boss is
|
|
326
342
|
-- defeated or is one that naturally spawns in the room after Hush. (This is determined by looking
|
|
327
343
|
-- at the VarData of the entity.)
|
|
344
|
+
function ____exports.isGridEntityBroken(self, gridEntity)
|
|
345
|
+
local gridEntityType = gridEntity:GetType()
|
|
346
|
+
local brokenState = GRID_ENTITY_TYPE_TO_BROKEN_STATE_MAP:get(gridEntityType)
|
|
347
|
+
return gridEntity.State == brokenState
|
|
348
|
+
end
|
|
349
|
+
--- Helper function to determine if all of the pressure plates in the current room are pushed.
|
|
350
|
+
-- Returns true if there are no pressure plates in the room.
|
|
328
351
|
function ____exports.isPostBossVoidPortal(self, gridEntity)
|
|
329
352
|
local saveState = gridEntity:GetSaveState()
|
|
330
353
|
return saveState.VarData == 1
|
|
@@ -344,7 +367,7 @@ end
|
|
|
344
367
|
-- );
|
|
345
368
|
-- ```
|
|
346
369
|
--
|
|
347
|
-
-- @returns
|
|
370
|
+
-- @returns The grid entities that were removed.
|
|
348
371
|
function ____exports.removeAllGridExcept(self, ...)
|
|
349
372
|
local gridEntityTypes = {...}
|
|
350
373
|
local gridEntityTypeExceptions = __TS__New(Set, gridEntityTypes)
|
|
@@ -353,7 +376,7 @@ function ____exports.removeAllGridExcept(self, ...)
|
|
|
353
376
|
for ____, gridEntity in ipairs(gridEntities) do
|
|
354
377
|
local gridEntityType = gridEntity:GetType()
|
|
355
378
|
if not gridEntityTypeExceptions:has(gridEntityType) then
|
|
356
|
-
____exports.
|
|
379
|
+
____exports.removeGridEntity(nil, gridEntity, false)
|
|
357
380
|
removedGridEntities[#removedGridEntities + 1] = gridEntity
|
|
358
381
|
end
|
|
359
382
|
end
|
|
@@ -385,11 +408,38 @@ function ____exports.removeAllMatchingGridEntities(self, ...)
|
|
|
385
408
|
return {}
|
|
386
409
|
end
|
|
387
410
|
for ____, gridEntity in ipairs(gridEntities) do
|
|
388
|
-
____exports.
|
|
411
|
+
____exports.removeGridEntity(nil, gridEntity, false)
|
|
389
412
|
end
|
|
390
413
|
roomUpdateSafe(nil)
|
|
391
414
|
return gridEntities
|
|
392
415
|
end
|
|
416
|
+
--- Helper function to remove all of the grid entities in the supplied array.
|
|
417
|
+
--
|
|
418
|
+
-- @param gridEntities The array of grid entities to remove.
|
|
419
|
+
-- @param updateRoom Whether or not to update the room after the grid entities are removed. This is
|
|
420
|
+
-- generally a good idea because if the room is not updated, you will be unable to
|
|
421
|
+
-- spawn another grid entity on the same tile until a frame has passed. However,
|
|
422
|
+
-- doing this is expensive, since it involves a call to `Isaac.GetRoomEntities`,
|
|
423
|
+
-- so set this to false if you need to invoke this function multiple times.
|
|
424
|
+
-- @param cap Optional. If specified, will only remove the given amount of entities.
|
|
425
|
+
-- @returns An array of the entities that were removed.
|
|
426
|
+
function ____exports.removeGridEntities(self, gridEntities, updateRoom, cap)
|
|
427
|
+
if #gridEntities == 0 then
|
|
428
|
+
return {}
|
|
429
|
+
end
|
|
430
|
+
local gridEntitiesRemoved = {}
|
|
431
|
+
for ____, gridEntity in ipairs(gridEntities) do
|
|
432
|
+
____exports.removeGridEntity(nil, gridEntity, false)
|
|
433
|
+
gridEntitiesRemoved[#gridEntitiesRemoved + 1] = gridEntity
|
|
434
|
+
if cap ~= nil and #gridEntitiesRemoved >= cap then
|
|
435
|
+
break
|
|
436
|
+
end
|
|
437
|
+
end
|
|
438
|
+
if updateRoom then
|
|
439
|
+
roomUpdateSafe(nil)
|
|
440
|
+
end
|
|
441
|
+
return gridEntitiesRemoved
|
|
442
|
+
end
|
|
393
443
|
--- Helper function to make a grid entity invisible. This is accomplished by setting its sprite to an
|
|
394
444
|
-- empty/missing PNG file.
|
|
395
445
|
--
|
|
@@ -406,22 +456,22 @@ function ____exports.spawnGiantPoop(self, topLeftGridIndex)
|
|
|
406
456
|
local topRightGridIndex = topLeftGridIndex + 1
|
|
407
457
|
local bottomLeftGridIndex = topLeftGridIndex + gridWidth
|
|
408
458
|
local bottomRightGridIndex = bottomLeftGridIndex + 1
|
|
409
|
-
____exports.
|
|
410
|
-
____exports.
|
|
411
|
-
____exports.
|
|
412
|
-
____exports.
|
|
459
|
+
____exports.spawnGridEntityWithVariant(nil, GridEntityType.POOP, PoopGridEntityVariant.GIGA_TOP_LEFT, topLeftGridIndex)
|
|
460
|
+
____exports.spawnGridEntityWithVariant(nil, GridEntityType.POOP, PoopGridEntityVariant.GIGA_TOP_RIGHT, topRightGridIndex)
|
|
461
|
+
____exports.spawnGridEntityWithVariant(nil, GridEntityType.POOP, PoopGridEntityVariant.GIGA_BOTTOM_LEFT, bottomLeftGridIndex)
|
|
462
|
+
____exports.spawnGridEntityWithVariant(nil, GridEntityType.POOP, PoopGridEntityVariant.GIGA_BOTTOM_RIGHT, bottomRightGridIndex)
|
|
413
463
|
end
|
|
414
464
|
--- Helper function to spawn a grid entity.
|
|
415
465
|
--
|
|
416
466
|
-- This function assumes you want to give the grid entity a variant of 0. If you want to specify a
|
|
417
|
-
-- variant, use the `
|
|
467
|
+
-- variant, use the `spawnGridEntityWithVariant` helper function instead.
|
|
418
468
|
--
|
|
419
469
|
-- Use this instead of the `Isaac.GridSpawn` method since it:
|
|
420
470
|
-- - handles giving pits collision
|
|
421
471
|
-- - removes existing grid entities on the same tile, if any
|
|
422
472
|
-- - allows you to specify either the grid index or the position
|
|
423
|
-
function ____exports.
|
|
424
|
-
return ____exports.
|
|
473
|
+
function ____exports.spawnGridEntity(self, gridEntityType, gridIndexOrPosition)
|
|
474
|
+
return ____exports.spawnGridEntityWithVariant(nil, gridEntityType, 0, gridIndexOrPosition)
|
|
425
475
|
end
|
|
426
476
|
--- Helper function for emulating what happens when a vanilla `GridEntityType.ROCK_ALT` grid entity
|
|
427
477
|
-- breaks.
|
|
@@ -443,33 +493,33 @@ function ____exports.spawnRockAltReward(self, rockAltType, _seedOrRNG)
|
|
|
443
493
|
_seedOrRNG = getRandomSeed(nil)
|
|
444
494
|
end
|
|
445
495
|
repeat
|
|
446
|
-
local
|
|
447
|
-
local
|
|
448
|
-
if
|
|
496
|
+
local ____switch66 = rockAltType
|
|
497
|
+
local ____cond66 = ____switch66 == RockAltType.URN
|
|
498
|
+
if ____cond66 then
|
|
449
499
|
do
|
|
450
500
|
return false
|
|
451
501
|
end
|
|
452
502
|
end
|
|
453
|
-
|
|
454
|
-
if
|
|
503
|
+
____cond66 = ____cond66 or ____switch66 == RockAltType.MUSHROOM
|
|
504
|
+
if ____cond66 then
|
|
455
505
|
do
|
|
456
506
|
return false
|
|
457
507
|
end
|
|
458
508
|
end
|
|
459
|
-
|
|
460
|
-
if
|
|
509
|
+
____cond66 = ____cond66 or ____switch66 == RockAltType.SKULL
|
|
510
|
+
if ____cond66 then
|
|
461
511
|
do
|
|
462
512
|
return false
|
|
463
513
|
end
|
|
464
514
|
end
|
|
465
|
-
|
|
466
|
-
if
|
|
515
|
+
____cond66 = ____cond66 or ____switch66 == RockAltType.POLYP
|
|
516
|
+
if ____cond66 then
|
|
467
517
|
do
|
|
468
518
|
return false
|
|
469
519
|
end
|
|
470
520
|
end
|
|
471
|
-
|
|
472
|
-
if
|
|
521
|
+
____cond66 = ____cond66 or ____switch66 == RockAltType.BUCKET
|
|
522
|
+
if ____cond66 then
|
|
473
523
|
do
|
|
474
524
|
return false
|
|
475
525
|
end
|
|
@@ -479,7 +529,7 @@ end
|
|
|
479
529
|
--- Helper function to spawn a Void Portal. This is more complicated than simply spawning a trapdoor
|
|
480
530
|
-- with the appropriate variant, as the game does not give it the correct sprite automatically.
|
|
481
531
|
function ____exports.spawnVoidPortal(self, gridIndex)
|
|
482
|
-
local voidPortal = ____exports.
|
|
532
|
+
local voidPortal = ____exports.spawnGridEntityWithVariant(nil, GridEntityType.TRAPDOOR, TrapdoorVariant.VOID_PORTAL, gridIndex)
|
|
483
533
|
if voidPortal == nil then
|
|
484
534
|
return voidPortal
|
|
485
535
|
end
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { DoorVariant, PitVariant, PoopGridEntityVariant, PressurePlateVariant, RockVariant } from "isaac-typescript-definitions";
|
|
2
|
+
/**
|
|
3
|
+
* Helper function to get all of the `GridEntityPit` in the room.
|
|
4
|
+
*
|
|
5
|
+
* @param pitVariant Optional. If specified, will only get the pits that match the variant. Default
|
|
6
|
+
* is -1, which matches every variant.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getPits(pitVariant?: PitVariant): GridEntityPit[];
|
|
9
|
+
/**
|
|
10
|
+
* Helper function to get all of the `GridEntityPoop` in the room.
|
|
11
|
+
*
|
|
12
|
+
* @param poopVariant Optional. If specified, will only get the poops that match the variant.
|
|
13
|
+
* Default is -1, which matches every variant.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getPoops(poopVariant?: PoopGridEntityVariant): GridEntityPoop[];
|
|
16
|
+
/**
|
|
17
|
+
* Helper function to get all of the `GridEntityPressurePlate` in the room.
|
|
18
|
+
*
|
|
19
|
+
* @param pressurePlateVariant Optional. If specified, will only get the pressure plates that match
|
|
20
|
+
* the variant. Default is -1, which matches every variant.
|
|
21
|
+
*/
|
|
22
|
+
export declare function getPressurePlates(pressurePlateVariant?: PressurePlateVariant): GridEntityPressurePlate[];
|
|
23
|
+
/**
|
|
24
|
+
* Helper function to get all of the `GridEntityRock` in the room.
|
|
25
|
+
*
|
|
26
|
+
* @param variant Optional. If specified, will only get the rocks that match the variant. Default is
|
|
27
|
+
* -1, which matches every variant. Note that this is not the same thing as the
|
|
28
|
+
* `RockVariant` enum, since that only applies to `GridEntityType.ROCK`, and other
|
|
29
|
+
* types of grid entities can be the `GridEntityRock` class.
|
|
30
|
+
*/
|
|
31
|
+
export declare function getRocks(variant?: number): GridEntityRock[];
|
|
32
|
+
/** Helper function to get all of the `GridEntitySpikes` in the room. */
|
|
33
|
+
export declare function getSpikes(variant?: number): GridEntitySpikes[];
|
|
34
|
+
/** Helper function to get all of the `GridEntityTNT` in the room. */
|
|
35
|
+
export declare function getTNT(variant?: number): GridEntityTNT[];
|
|
36
|
+
/**
|
|
37
|
+
* Helper function to remove all of the `GridEntityPit` in the room.
|
|
38
|
+
*
|
|
39
|
+
* @param pitVariant Optional. If specified, will only remove the pits that match this variant.
|
|
40
|
+
* Default is -1, which matches every variant.
|
|
41
|
+
* @param updateRoom Optional. Whether or not to update the room after the pits are removed. Default
|
|
42
|
+
* is false. For more information, see the description of the `removeGridEntities`
|
|
43
|
+
* helper function.
|
|
44
|
+
* @param cap Optional. If specified, will only remove the given amount of pits.
|
|
45
|
+
* @returns The pits that were removed.
|
|
46
|
+
*/
|
|
47
|
+
export declare function removeAllPits(pitVariant?: PitVariant, updateRoom?: boolean, cap?: int): GridEntityPit[];
|
|
48
|
+
/**
|
|
49
|
+
* Helper function to remove all of the `GridEntityPoop` in the room.
|
|
50
|
+
*
|
|
51
|
+
* Note that poops can either be an entity or a grid entity, depending on the situation. This
|
|
52
|
+
* function will only remove the grid entity poops.
|
|
53
|
+
*
|
|
54
|
+
* @param poopVariant Optional. If specified, will only remove the poops that match this variant.
|
|
55
|
+
* Default is -1, which matches every variant.
|
|
56
|
+
* @param updateRoom Optional. Whether or not to update the room after the poops are removed.
|
|
57
|
+
* Default is false. For more information, see the description of the
|
|
58
|
+
* `removeGridEntities` helper function.
|
|
59
|
+
* @param cap Optional. If specified, will only remove the given amount of poops.
|
|
60
|
+
* @returns The poops that were removed.
|
|
61
|
+
*/
|
|
62
|
+
export declare function removeAllPoops(poopVariant?: PoopGridEntityVariant, updateRoom?: boolean, cap?: int): GridEntityPoop[];
|
|
63
|
+
/**
|
|
64
|
+
* Helper function to remove all of the `GridEntityPressurePlate` in the room.
|
|
65
|
+
*
|
|
66
|
+
* @param pressurePlateVariant Optional. If specified, will only remove the pressure plates that
|
|
67
|
+
* match this variant. Default is -1, which matches every variant.
|
|
68
|
+
* @param updateRoom Optional. Whether or not to update the room after the pressure plates are
|
|
69
|
+
* removed. Default is false. For more information, see the description of the
|
|
70
|
+
* `removeGridEntities` helper function.
|
|
71
|
+
* @param cap Optional. If specified, will only remove the given amount of pressure plates.
|
|
72
|
+
* @returns The pressure plates that were removed.
|
|
73
|
+
*/
|
|
74
|
+
export declare function removeAllPressurePlates(pressurePlateVariant?: PressurePlateVariant, updateRoom?: boolean, cap?: int): GridEntityPressurePlate[];
|
|
75
|
+
/**
|
|
76
|
+
* Helper function to remove all of the `GridEntityRock` in the room.
|
|
77
|
+
*
|
|
78
|
+
* @param variant Optional. If specified, will only remove the rocks that match this variant.
|
|
79
|
+
* Default is -1, which matches every variant. Note that this is not the same thing
|
|
80
|
+
* as the `RockVariant` enum, since that only applies to `GridEntityType.ROCK`, and
|
|
81
|
+
* other types of grid entities can be the `GridEntityRock` class.
|
|
82
|
+
* @param updateRoom Optional. Whether or not to update the room after the rocks are removed.
|
|
83
|
+
* Default is false. For more information, see the description of the
|
|
84
|
+
* `removeGridEntities` helper function.
|
|
85
|
+
* @param cap Optional. If specified, will only remove the given amount of rocks.
|
|
86
|
+
* @returns The rocks that were removed.
|
|
87
|
+
*/
|
|
88
|
+
export declare function removeAllRocks(variant?: number, updateRoom?: boolean, cap?: int): GridEntityRock[];
|
|
89
|
+
/**
|
|
90
|
+
* Helper function to remove all of the `GridEntitySpikes` in the room.
|
|
91
|
+
*
|
|
92
|
+
* @param variant Optional. If specified, will only remove the spikes that match this variant.
|
|
93
|
+
* Default is -1, which matches every variant.
|
|
94
|
+
* @param updateRoom Optional. Whether or not to update the room after the spikes are removed.
|
|
95
|
+
* Default is false. For more information, see the description of the
|
|
96
|
+
* `removeGridEntities` helper function.
|
|
97
|
+
* @param cap Optional. If specified, will only remove the given amount of spikes.
|
|
98
|
+
* @returns The spikes that were removed.
|
|
99
|
+
*/
|
|
100
|
+
export declare function removeAllSpikes(variant?: number, updateRoom?: boolean, cap?: int): GridEntitySpikes[];
|
|
101
|
+
/**
|
|
102
|
+
* Helper function to remove all of the `GridEntityTNT` in the room.
|
|
103
|
+
*
|
|
104
|
+
* @param variant Optional. If specified, will only remove the TNTs that match this variant. Default
|
|
105
|
+
* is -1, which matches every variant.
|
|
106
|
+
* @param updateRoom Optional. Whether or not to update the room after the TNTs are removed. Default
|
|
107
|
+
* is false. For more information, see the description of the `removeGridEntities`
|
|
108
|
+
* helper function.
|
|
109
|
+
* @param cap Optional. If specified, will only remove the given amount of TNTs.
|
|
110
|
+
* @returns The TNTs that were removed.
|
|
111
|
+
*/
|
|
112
|
+
export declare function removeAllTNT(variant?: number, updateRoom?: boolean, cap?: int): GridEntityTNT[];
|
|
113
|
+
/** Helper function to spawn a `GridEntityType.DOOR` (16). */
|
|
114
|
+
export declare function spawnDoor(gridIndexOrPosition: int | Vector): GridEntityDoor | undefined;
|
|
115
|
+
/** Helper function to spawn a `GridEntityType.DOOR` (16) with a specific variant. */
|
|
116
|
+
export declare function spawnDoorWithVariant(doorVariant: DoorVariant, gridIndexOrPosition: int | Vector): GridEntityDoor | undefined;
|
|
117
|
+
/** Helper function to spawn a `GridEntityType.PIT` (7). */
|
|
118
|
+
export declare function spawnPit(gridIndexOrPosition: int | Vector): GridEntityPit | undefined;
|
|
119
|
+
/** Helper function to spawn a `GridEntityType.PIT` (7) with a specific variant. */
|
|
120
|
+
export declare function spawnPitWithVariant(pitVariant: PitVariant, gridIndexOrPosition: int | Vector): GridEntityPit | undefined;
|
|
121
|
+
/** Helper function to spawn a `GridEntityType.POOP` (14). */
|
|
122
|
+
export declare function spawnPoop(gridIndexOrPosition: int | Vector): GridEntityPoop | undefined;
|
|
123
|
+
/** Helper function to spawn a `GridEntityType.POOP` (14) with a specific variant. */
|
|
124
|
+
export declare function spawnPoopWithVariant(poopVariant: PoopGridEntityVariant, gridIndexOrPosition: int | Vector): GridEntityPoop | undefined;
|
|
125
|
+
/** Helper function to spawn a `GridEntityType.PRESSURE_PLATE` (20). */
|
|
126
|
+
export declare function spawnPressurePlate(gridIndexOrPosition: int | Vector): GridEntityPressurePlate | undefined;
|
|
127
|
+
/** Helper function to spawn a `GridEntityType.PRESSURE_PLATE` (20) with a specific variant. */
|
|
128
|
+
export declare function spawnPressurePlateWithVariant(pressurePlateVariant: PressurePlateVariant, gridIndexOrPosition: int | Vector): GridEntityPressurePlate | undefined;
|
|
129
|
+
/** Helper function to spawn a `GridEntityType.ROCK` (2). */
|
|
130
|
+
export declare function spawnRock(gridIndexOrPosition: int | Vector): GridEntityRock | undefined;
|
|
131
|
+
/** Helper function to spawn a `GridEntityType.ROCK` (2) with a specific variant. */
|
|
132
|
+
export declare function spawnRockWithVariant(rockVariant: RockVariant, gridIndexOrPosition: int | Vector): GridEntityRock | undefined;
|
|
133
|
+
/** Helper function to spawn a `GridEntityType.SPIKES` (8). */
|
|
134
|
+
export declare function spawnSpikes(gridIndexOrPosition: int | Vector): GridEntitySpikes | undefined;
|
|
135
|
+
/** Helper function to spawn a `GridEntityType.SPIKES` (8) with a specific variant. */
|
|
136
|
+
export declare function spawnSpikesWithVariant(variant: int, gridIndexOrPosition: int | Vector): GridEntitySpikes | undefined;
|
|
137
|
+
/** Helper function to spawn a `GridEntityType.TNT` (12). */
|
|
138
|
+
export declare function spawnTNT(gridIndexOrPosition: int | Vector): GridEntityTNT | undefined;
|
|
139
|
+
/** Helper function to spawn a `GridEntityType.TNT` (12) with a specific variant. */
|
|
140
|
+
export declare function spawnTNTWithVariant(variant: int, gridIndexOrPosition: int | Vector): GridEntityTNT | undefined;
|
|
141
|
+
//# sourceMappingURL=gridEntitiesSpecific.d.ts.map
|
|
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