isaacscript-common 6.6.3 → 6.7.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/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/saveDataManager/merge.lua +4 -3
- package/dist/features/sirenHelpers.lua +2 -2
- package/dist/functions/ambush.lua +5 -5
- package/dist/functions/array.d.ts.map +1 -1
- package/dist/functions/array.lua +1 -1
- 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/deepCopyTests.d.ts +6 -1
- package/dist/functions/deepCopyTests.d.ts.map +1 -1
- package/dist/functions/deepCopyTests.lua +19 -16
- 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.d.ts.map +1 -1
- package/dist/functions/log.lua +16 -12
- package/dist/functions/mergeTests.d.ts +7 -1
- package/dist/functions/mergeTests.d.ts.map +1 -1
- package/dist/functions/mergeTests.lua +86 -7
- 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/saveDataManager/merge.ts +3 -3
- package/src/features/sirenHelpers.ts +1 -1
- package/src/functions/ambush.ts +2 -2
- package/src/functions/array.ts +5 -2
- 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 +75 -19
- 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 +19 -10
- package/src/functions/mergeTests.ts +152 -4
- 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
|
@@ -0,0 +1,560 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
|
+
local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
|
|
4
|
+
local ____constants = require("constants")
|
|
5
|
+
local VectorZero = ____constants.VectorZero
|
|
6
|
+
local ____entitiesSpecific = require("functions.entitiesSpecific")
|
|
7
|
+
local getPickups = ____entitiesSpecific.getPickups
|
|
8
|
+
local removeAllPickups = ____entitiesSpecific.removeAllPickups
|
|
9
|
+
local spawnPickup = ____entitiesSpecific.spawnPickup
|
|
10
|
+
--- Helper function to get all of the battery entities in the room.
|
|
11
|
+
--
|
|
12
|
+
-- @param batterySubType Optional. If specified, will only get the batteries that match the
|
|
13
|
+
-- sub-type. Default is -1, which matches every sub-type.
|
|
14
|
+
function ____exports.getBatteries(self, batterySubType)
|
|
15
|
+
if batterySubType == nil then
|
|
16
|
+
batterySubType = -1
|
|
17
|
+
end
|
|
18
|
+
return getPickups(nil, PickupVariant.LIL_BATTERY, batterySubType)
|
|
19
|
+
end
|
|
20
|
+
--- Helper function to get all of the bomb entities in the room. (Specifically, this refers to bomb
|
|
21
|
+
-- pickups, not the `EntityBomb` class.)
|
|
22
|
+
--
|
|
23
|
+
-- @param bombSubType Optional. If specified, will only get the bombs that match the sub-type.
|
|
24
|
+
-- Default is -1, which matches every sub-type.
|
|
25
|
+
function ____exports.getBombPickups(self, bombSubType)
|
|
26
|
+
if bombSubType == nil then
|
|
27
|
+
bombSubType = -1
|
|
28
|
+
end
|
|
29
|
+
return getPickups(nil, PickupVariant.BOMB, bombSubType)
|
|
30
|
+
end
|
|
31
|
+
--- Helper function to get all of the card entities in the room.
|
|
32
|
+
--
|
|
33
|
+
-- @param card Optional. If specified, will only get the cards that match the sub-type. Default is
|
|
34
|
+
-- -1, which matches every sub-type.
|
|
35
|
+
function ____exports.getCards(self, card)
|
|
36
|
+
if card == nil then
|
|
37
|
+
card = -1
|
|
38
|
+
end
|
|
39
|
+
return getPickups(nil, PickupVariant.TAROT_CARD, card)
|
|
40
|
+
end
|
|
41
|
+
--- Helper function to get all of the coin pickup entities in the room.
|
|
42
|
+
--
|
|
43
|
+
-- @param coinSubType Optional. If specified, will only get the coins that match the sub-type.
|
|
44
|
+
-- Default is -1, which matches every sub-type.
|
|
45
|
+
function ____exports.getCoins(self, coinSubType)
|
|
46
|
+
if coinSubType == nil then
|
|
47
|
+
coinSubType = -1
|
|
48
|
+
end
|
|
49
|
+
return getPickups(nil, PickupVariant.COIN, coinSubType)
|
|
50
|
+
end
|
|
51
|
+
--- Helper function to get all of the collectible entities in the room.
|
|
52
|
+
--
|
|
53
|
+
-- @param collectibleType Optional. If specified, will only get the collectibles that match the
|
|
54
|
+
-- sub-type. Default is -1, which matches every sub-type.
|
|
55
|
+
function ____exports.getCollectibles(self, collectibleType)
|
|
56
|
+
if collectibleType == nil then
|
|
57
|
+
collectibleType = -1
|
|
58
|
+
end
|
|
59
|
+
return getPickups(nil, PickupVariant.COLLECTIBLE, collectibleType)
|
|
60
|
+
end
|
|
61
|
+
--- Helper function to get all of the heart pickup entities in the room.
|
|
62
|
+
--
|
|
63
|
+
-- @param heartSubType Optional. If specified, will only get the hearts that match the sub-type.
|
|
64
|
+
-- Default is -1, which matches every sub-type.
|
|
65
|
+
function ____exports.getHearts(self, heartSubType)
|
|
66
|
+
if heartSubType == nil then
|
|
67
|
+
heartSubType = -1
|
|
68
|
+
end
|
|
69
|
+
return getPickups(nil, PickupVariant.HEART, heartSubType)
|
|
70
|
+
end
|
|
71
|
+
--- Helper function to get all of the key pickup entities in the room.
|
|
72
|
+
--
|
|
73
|
+
-- @param keySubType Optional. If specified, will only get the keys that match the sub-type. Default
|
|
74
|
+
-- is -1, which matches every sub-type.
|
|
75
|
+
function ____exports.getKeys(self, keySubType)
|
|
76
|
+
if keySubType == nil then
|
|
77
|
+
keySubType = -1
|
|
78
|
+
end
|
|
79
|
+
return getPickups(nil, PickupVariant.KEY, keySubType)
|
|
80
|
+
end
|
|
81
|
+
--- Helper function to get all of the pill entities in the room.
|
|
82
|
+
--
|
|
83
|
+
-- @param pillColor Optional. If specified, will only get the pills that match the sub-type. Default
|
|
84
|
+
-- is -1, which matches every sub-type.
|
|
85
|
+
function ____exports.getPills(self, pillColor)
|
|
86
|
+
if pillColor == nil then
|
|
87
|
+
pillColor = -1
|
|
88
|
+
end
|
|
89
|
+
return getPickups(nil, PickupVariant.PILL, pillColor)
|
|
90
|
+
end
|
|
91
|
+
--- Helper function to get all of the sack (i.e. grab bag) entities in the room.
|
|
92
|
+
--
|
|
93
|
+
-- @param sackSubType Optional. If specified, will only get the sacks that match the sub-type.
|
|
94
|
+
-- Default is -1, which matches every sub-type.
|
|
95
|
+
function ____exports.getSacks(self, sackSubType)
|
|
96
|
+
if sackSubType == nil then
|
|
97
|
+
sackSubType = -1
|
|
98
|
+
end
|
|
99
|
+
return getPickups(nil, PickupVariant.SACK, sackSubType)
|
|
100
|
+
end
|
|
101
|
+
--- Helper function to get all of the trinket entities in the room.
|
|
102
|
+
--
|
|
103
|
+
-- @param trinketType Optional. If specified, will only get the trinkets that match the sub-type.
|
|
104
|
+
-- Default is -1, which matches every sub-type.
|
|
105
|
+
function ____exports.getTrinkets(self, trinketType)
|
|
106
|
+
if trinketType == nil then
|
|
107
|
+
trinketType = -1
|
|
108
|
+
end
|
|
109
|
+
return getPickups(nil, PickupVariant.TRINKET, trinketType)
|
|
110
|
+
end
|
|
111
|
+
--- Helper function to remove all of the batteries in the room.
|
|
112
|
+
--
|
|
113
|
+
-- @param batterySubType Optional. If specified, will only remove the batteries that match this
|
|
114
|
+
-- sub-type. Default is -1, which matches every sub-type.
|
|
115
|
+
-- @param cap Optional. If specified, will only remove the given amount of cards.
|
|
116
|
+
-- @returns The batteries that were removed.
|
|
117
|
+
function ____exports.removeAllBatteries(self, batterySubType, cap)
|
|
118
|
+
if batterySubType == nil then
|
|
119
|
+
batterySubType = -1
|
|
120
|
+
end
|
|
121
|
+
return removeAllPickups(nil, PickupVariant.LIL_BATTERY, batterySubType, cap)
|
|
122
|
+
end
|
|
123
|
+
--- Helper function to remove all of the bomb pickups in the room. (Specifically, this refers to bomb
|
|
124
|
+
-- pickups, not the `EntityBomb` class.)
|
|
125
|
+
--
|
|
126
|
+
-- @param bombSubType Optional. If specified, will only remove bombs that match this sub-type.
|
|
127
|
+
-- Default is -1, which matches every sub-type.
|
|
128
|
+
-- @param cap Optional. If specified, will only remove the given amount of bombs.
|
|
129
|
+
-- @returns The bombs that were removed.
|
|
130
|
+
function ____exports.removeAllBombPickups(self, bombSubType, cap)
|
|
131
|
+
if bombSubType == nil then
|
|
132
|
+
bombSubType = -1
|
|
133
|
+
end
|
|
134
|
+
return removeAllPickups(nil, PickupVariant.BOMB, bombSubType, cap)
|
|
135
|
+
end
|
|
136
|
+
--- Helper function to remove all of the cards in the room.
|
|
137
|
+
--
|
|
138
|
+
-- @param card Optional. If specified, will only remove cards that match this sub-type. Default is
|
|
139
|
+
-- -1, which matches every sub-type.
|
|
140
|
+
-- @param cap Optional. If specified, will only remove the given amount of cards.
|
|
141
|
+
-- @returns The cards that were removed.
|
|
142
|
+
function ____exports.removeAllCards(self, card, cap)
|
|
143
|
+
if card == nil then
|
|
144
|
+
card = -1
|
|
145
|
+
end
|
|
146
|
+
return removeAllPickups(nil, PickupVariant.TAROT_CARD, card, cap)
|
|
147
|
+
end
|
|
148
|
+
--- Helper function to remove all of the coins in the room.
|
|
149
|
+
--
|
|
150
|
+
-- @param coinSubType Optional. If specified, will only remove coins that match this sub-type.
|
|
151
|
+
-- Default is -1, which matches every sub-type.
|
|
152
|
+
-- @param cap Optional. If specified, will only remove the given amount of coins.
|
|
153
|
+
-- @returns The coins that were removed.
|
|
154
|
+
function ____exports.removeAllCoins(self, coinSubType, cap)
|
|
155
|
+
return removeAllPickups(nil, PickupVariant.COIN, coinSubType, cap)
|
|
156
|
+
end
|
|
157
|
+
--- Helper function to remove all of the collectibles in the room.
|
|
158
|
+
--
|
|
159
|
+
-- @param collectibleType Optional. If specified, will only remove collectibles that match this
|
|
160
|
+
-- sub-type. Default is -1, which matches every sub-type.
|
|
161
|
+
-- @param cap Optional. If specified, will only remove the given amount of collectibles.
|
|
162
|
+
-- @returns The collectibles that were removed.
|
|
163
|
+
function ____exports.removeAllCollectibles(self, collectibleType, cap)
|
|
164
|
+
return removeAllPickups(nil, PickupVariant.COLLECTIBLE, collectibleType, cap)
|
|
165
|
+
end
|
|
166
|
+
--- Helper function to remove all of the heart pickup entities in the room.
|
|
167
|
+
--
|
|
168
|
+
-- @param heartSubType Optional. If specified, will only remove hearts that match this sub-type.
|
|
169
|
+
-- Default is -1, which matches every sub-type.
|
|
170
|
+
-- @param cap Optional. If specified, will only remove the given amount of hearts.
|
|
171
|
+
-- @returns The hearts that were removed.
|
|
172
|
+
function ____exports.removeAllHearts(self, heartSubType, cap)
|
|
173
|
+
return removeAllPickups(nil, PickupVariant.HEART, heartSubType, cap)
|
|
174
|
+
end
|
|
175
|
+
--- Helper function to remove all of the keys in the room.
|
|
176
|
+
--
|
|
177
|
+
-- @param keySubType Optional. If specified, will only remove keys that match this sub-type. Default
|
|
178
|
+
-- is -1, which matches every sub-type.
|
|
179
|
+
-- @param cap Optional. If specified, will only remove the given amount of keys.
|
|
180
|
+
-- @returns The keys that were removed.
|
|
181
|
+
function ____exports.removeAllKeys(self, keySubType, cap)
|
|
182
|
+
return removeAllPickups(nil, PickupVariant.KEY, keySubType, cap)
|
|
183
|
+
end
|
|
184
|
+
--- Helper function to remove all of the pills in the room.
|
|
185
|
+
--
|
|
186
|
+
-- @param pillColor Optional. If specified, will only remove pills that match this sub-type. Default
|
|
187
|
+
-- is -1, which matches every sub-type.
|
|
188
|
+
-- @param cap Optional. If specified, will only remove the given amount of pills.
|
|
189
|
+
-- @returns The pills that were removed.
|
|
190
|
+
function ____exports.removeAllPills(self, pillColor, cap)
|
|
191
|
+
return removeAllPickups(nil, PickupVariant.PILL, pillColor, cap)
|
|
192
|
+
end
|
|
193
|
+
--- Helper function to remove all of the sacks (i.e. grab bags) in the room.
|
|
194
|
+
--
|
|
195
|
+
-- @param sackSubType Optional. If specified, will only remove sacks that match this sub-type.
|
|
196
|
+
-- Default is -1, which matches every sub-type.
|
|
197
|
+
-- @param cap Optional. If specified, will only remove the given amount of sacks.
|
|
198
|
+
-- @returns The sacks that were removed.
|
|
199
|
+
function ____exports.removeAllSacks(self, sackSubType, cap)
|
|
200
|
+
return removeAllPickups(nil, PickupVariant.TRINKET, sackSubType, cap)
|
|
201
|
+
end
|
|
202
|
+
--- Helper function to remove all of the trinkets in the room.
|
|
203
|
+
--
|
|
204
|
+
-- @param trinketType Optional. If specified, will only remove trinkets that match this sub-type.
|
|
205
|
+
-- Default is -1, which matches every sub-type.
|
|
206
|
+
-- @param cap Optional. If specified, will only remove the given amount of trinkets.
|
|
207
|
+
-- @returns The trinkets that were removed.
|
|
208
|
+
function ____exports.removeAllTrinkets(self, trinketType, cap)
|
|
209
|
+
return removeAllPickups(nil, PickupVariant.TRINKET, trinketType, cap)
|
|
210
|
+
end
|
|
211
|
+
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.LIL_BATTERY` (90).
|
|
212
|
+
function ____exports.spawnBattery(self, batterySubType, position, velocity, spawner, seedOrRNG)
|
|
213
|
+
if velocity == nil then
|
|
214
|
+
velocity = VectorZero
|
|
215
|
+
end
|
|
216
|
+
if spawner == nil then
|
|
217
|
+
spawner = nil
|
|
218
|
+
end
|
|
219
|
+
if seedOrRNG == nil then
|
|
220
|
+
seedOrRNG = nil
|
|
221
|
+
end
|
|
222
|
+
return spawnPickup(
|
|
223
|
+
nil,
|
|
224
|
+
PickupVariant.LIL_BATTERY,
|
|
225
|
+
batterySubType,
|
|
226
|
+
position,
|
|
227
|
+
velocity,
|
|
228
|
+
spawner,
|
|
229
|
+
seedOrRNG
|
|
230
|
+
)
|
|
231
|
+
end
|
|
232
|
+
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.LIL_BATTERY` (90)
|
|
233
|
+
-- and a specific seed.
|
|
234
|
+
function ____exports.spawnBatteryWithSeed(self, batterySubType, position, seedOrRNG, velocity, spawner)
|
|
235
|
+
if velocity == nil then
|
|
236
|
+
velocity = VectorZero
|
|
237
|
+
end
|
|
238
|
+
if spawner == nil then
|
|
239
|
+
spawner = nil
|
|
240
|
+
end
|
|
241
|
+
return ____exports.spawnBattery(
|
|
242
|
+
nil,
|
|
243
|
+
batterySubType,
|
|
244
|
+
position,
|
|
245
|
+
velocity,
|
|
246
|
+
spawner,
|
|
247
|
+
seedOrRNG
|
|
248
|
+
)
|
|
249
|
+
end
|
|
250
|
+
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.BOMB` (40).
|
|
251
|
+
function ____exports.spawnBombPickup(self, bombSubType, position, velocity, spawner, seedOrRNG)
|
|
252
|
+
if velocity == nil then
|
|
253
|
+
velocity = VectorZero
|
|
254
|
+
end
|
|
255
|
+
if spawner == nil then
|
|
256
|
+
spawner = nil
|
|
257
|
+
end
|
|
258
|
+
if seedOrRNG == nil then
|
|
259
|
+
seedOrRNG = nil
|
|
260
|
+
end
|
|
261
|
+
return spawnPickup(
|
|
262
|
+
nil,
|
|
263
|
+
PickupVariant.BOMB,
|
|
264
|
+
bombSubType,
|
|
265
|
+
position,
|
|
266
|
+
velocity,
|
|
267
|
+
spawner,
|
|
268
|
+
seedOrRNG
|
|
269
|
+
)
|
|
270
|
+
end
|
|
271
|
+
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.BOMB` (40) and a
|
|
272
|
+
-- specific seed.
|
|
273
|
+
function ____exports.spawnBombPickupWithSeed(self, bombSubType, position, seedOrRNG, velocity, spawner)
|
|
274
|
+
if velocity == nil then
|
|
275
|
+
velocity = VectorZero
|
|
276
|
+
end
|
|
277
|
+
if spawner == nil then
|
|
278
|
+
spawner = nil
|
|
279
|
+
end
|
|
280
|
+
return ____exports.spawnBombPickup(
|
|
281
|
+
nil,
|
|
282
|
+
bombSubType,
|
|
283
|
+
position,
|
|
284
|
+
velocity,
|
|
285
|
+
spawner,
|
|
286
|
+
seedOrRNG
|
|
287
|
+
)
|
|
288
|
+
end
|
|
289
|
+
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TAROT_CARD` (300).
|
|
290
|
+
function ____exports.spawnCard(self, subType, position, velocity, spawner, seedOrRNG)
|
|
291
|
+
if velocity == nil then
|
|
292
|
+
velocity = VectorZero
|
|
293
|
+
end
|
|
294
|
+
if spawner == nil then
|
|
295
|
+
spawner = nil
|
|
296
|
+
end
|
|
297
|
+
if seedOrRNG == nil then
|
|
298
|
+
seedOrRNG = nil
|
|
299
|
+
end
|
|
300
|
+
return spawnPickup(
|
|
301
|
+
nil,
|
|
302
|
+
PickupVariant.TAROT_CARD,
|
|
303
|
+
subType,
|
|
304
|
+
position,
|
|
305
|
+
velocity,
|
|
306
|
+
spawner,
|
|
307
|
+
seedOrRNG
|
|
308
|
+
)
|
|
309
|
+
end
|
|
310
|
+
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TAROT_CARD` (300)
|
|
311
|
+
-- and a specific seed.
|
|
312
|
+
function ____exports.spawnCardWithSeed(self, subType, position, seedOrRNG, velocity, spawner)
|
|
313
|
+
if velocity == nil then
|
|
314
|
+
velocity = VectorZero
|
|
315
|
+
end
|
|
316
|
+
if spawner == nil then
|
|
317
|
+
spawner = nil
|
|
318
|
+
end
|
|
319
|
+
return ____exports.spawnCard(
|
|
320
|
+
nil,
|
|
321
|
+
subType,
|
|
322
|
+
position,
|
|
323
|
+
velocity,
|
|
324
|
+
spawner,
|
|
325
|
+
seedOrRNG
|
|
326
|
+
)
|
|
327
|
+
end
|
|
328
|
+
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.COIN` (20).
|
|
329
|
+
function ____exports.spawnCoin(self, subType, position, velocity, spawner, seedOrRNG)
|
|
330
|
+
if velocity == nil then
|
|
331
|
+
velocity = VectorZero
|
|
332
|
+
end
|
|
333
|
+
if spawner == nil then
|
|
334
|
+
spawner = nil
|
|
335
|
+
end
|
|
336
|
+
if seedOrRNG == nil then
|
|
337
|
+
seedOrRNG = nil
|
|
338
|
+
end
|
|
339
|
+
return spawnPickup(
|
|
340
|
+
nil,
|
|
341
|
+
PickupVariant.COIN,
|
|
342
|
+
subType,
|
|
343
|
+
position,
|
|
344
|
+
velocity,
|
|
345
|
+
spawner,
|
|
346
|
+
seedOrRNG
|
|
347
|
+
)
|
|
348
|
+
end
|
|
349
|
+
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.COIN` (20) and a
|
|
350
|
+
-- specific seed.
|
|
351
|
+
function ____exports.spawnCoinWithSeed(self, subType, position, seedOrRNG, velocity, spawner)
|
|
352
|
+
if velocity == nil then
|
|
353
|
+
velocity = VectorZero
|
|
354
|
+
end
|
|
355
|
+
if spawner == nil then
|
|
356
|
+
spawner = nil
|
|
357
|
+
end
|
|
358
|
+
return ____exports.spawnCoin(
|
|
359
|
+
nil,
|
|
360
|
+
subType,
|
|
361
|
+
position,
|
|
362
|
+
velocity,
|
|
363
|
+
spawner,
|
|
364
|
+
seedOrRNG
|
|
365
|
+
)
|
|
366
|
+
end
|
|
367
|
+
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.HEART` (10).
|
|
368
|
+
function ____exports.spawnHeart(self, subType, position, velocity, spawner, seedOrRNG)
|
|
369
|
+
if velocity == nil then
|
|
370
|
+
velocity = VectorZero
|
|
371
|
+
end
|
|
372
|
+
if spawner == nil then
|
|
373
|
+
spawner = nil
|
|
374
|
+
end
|
|
375
|
+
if seedOrRNG == nil then
|
|
376
|
+
seedOrRNG = nil
|
|
377
|
+
end
|
|
378
|
+
return spawnPickup(
|
|
379
|
+
nil,
|
|
380
|
+
PickupVariant.HEART,
|
|
381
|
+
subType,
|
|
382
|
+
position,
|
|
383
|
+
velocity,
|
|
384
|
+
spawner,
|
|
385
|
+
seedOrRNG
|
|
386
|
+
)
|
|
387
|
+
end
|
|
388
|
+
function ____exports.spawnHeartWithSeed(self, subType, position, seedOrRNG, velocity, spawner)
|
|
389
|
+
if velocity == nil then
|
|
390
|
+
velocity = VectorZero
|
|
391
|
+
end
|
|
392
|
+
if spawner == nil then
|
|
393
|
+
spawner = nil
|
|
394
|
+
end
|
|
395
|
+
return ____exports.spawnHeart(
|
|
396
|
+
nil,
|
|
397
|
+
subType,
|
|
398
|
+
position,
|
|
399
|
+
velocity,
|
|
400
|
+
spawner,
|
|
401
|
+
seedOrRNG
|
|
402
|
+
)
|
|
403
|
+
end
|
|
404
|
+
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.KEY` (30).
|
|
405
|
+
function ____exports.spawnKey(self, subType, position, velocity, spawner, seedOrRNG)
|
|
406
|
+
if velocity == nil then
|
|
407
|
+
velocity = VectorZero
|
|
408
|
+
end
|
|
409
|
+
if spawner == nil then
|
|
410
|
+
spawner = nil
|
|
411
|
+
end
|
|
412
|
+
if seedOrRNG == nil then
|
|
413
|
+
seedOrRNG = nil
|
|
414
|
+
end
|
|
415
|
+
return spawnPickup(
|
|
416
|
+
nil,
|
|
417
|
+
PickupVariant.KEY,
|
|
418
|
+
subType,
|
|
419
|
+
position,
|
|
420
|
+
velocity,
|
|
421
|
+
spawner,
|
|
422
|
+
seedOrRNG
|
|
423
|
+
)
|
|
424
|
+
end
|
|
425
|
+
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.KEY` (30) and a
|
|
426
|
+
-- specific seed.
|
|
427
|
+
function ____exports.spawnKeyWithSeed(self, subType, position, seedOrRNG, velocity, spawner)
|
|
428
|
+
if velocity == nil then
|
|
429
|
+
velocity = VectorZero
|
|
430
|
+
end
|
|
431
|
+
if spawner == nil then
|
|
432
|
+
spawner = nil
|
|
433
|
+
end
|
|
434
|
+
return ____exports.spawnKey(
|
|
435
|
+
nil,
|
|
436
|
+
subType,
|
|
437
|
+
position,
|
|
438
|
+
velocity,
|
|
439
|
+
spawner,
|
|
440
|
+
seedOrRNG
|
|
441
|
+
)
|
|
442
|
+
end
|
|
443
|
+
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.PILL` (70).
|
|
444
|
+
function ____exports.spawnPill(self, pillColor, position, velocity, spawner, seedOrRNG)
|
|
445
|
+
if velocity == nil then
|
|
446
|
+
velocity = VectorZero
|
|
447
|
+
end
|
|
448
|
+
if spawner == nil then
|
|
449
|
+
spawner = nil
|
|
450
|
+
end
|
|
451
|
+
if seedOrRNG == nil then
|
|
452
|
+
seedOrRNG = nil
|
|
453
|
+
end
|
|
454
|
+
return spawnPickup(
|
|
455
|
+
nil,
|
|
456
|
+
PickupVariant.PILL,
|
|
457
|
+
pillColor,
|
|
458
|
+
position,
|
|
459
|
+
velocity,
|
|
460
|
+
spawner,
|
|
461
|
+
seedOrRNG
|
|
462
|
+
)
|
|
463
|
+
end
|
|
464
|
+
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.PILL` (70) and a
|
|
465
|
+
-- specific seed.
|
|
466
|
+
function ____exports.spawnPillWithSeed(self, subType, position, seedOrRNG, velocity, spawner)
|
|
467
|
+
if velocity == nil then
|
|
468
|
+
velocity = VectorZero
|
|
469
|
+
end
|
|
470
|
+
if spawner == nil then
|
|
471
|
+
spawner = nil
|
|
472
|
+
end
|
|
473
|
+
return ____exports.spawnPill(
|
|
474
|
+
nil,
|
|
475
|
+
subType,
|
|
476
|
+
position,
|
|
477
|
+
velocity,
|
|
478
|
+
spawner,
|
|
479
|
+
seedOrRNG
|
|
480
|
+
)
|
|
481
|
+
end
|
|
482
|
+
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.SACK` (69).
|
|
483
|
+
function ____exports.spawnSack(self, subType, position, velocity, spawner, seedOrRNG)
|
|
484
|
+
if velocity == nil then
|
|
485
|
+
velocity = VectorZero
|
|
486
|
+
end
|
|
487
|
+
if spawner == nil then
|
|
488
|
+
spawner = nil
|
|
489
|
+
end
|
|
490
|
+
if seedOrRNG == nil then
|
|
491
|
+
seedOrRNG = nil
|
|
492
|
+
end
|
|
493
|
+
return spawnPickup(
|
|
494
|
+
nil,
|
|
495
|
+
PickupVariant.SACK,
|
|
496
|
+
subType,
|
|
497
|
+
position,
|
|
498
|
+
velocity,
|
|
499
|
+
spawner,
|
|
500
|
+
seedOrRNG
|
|
501
|
+
)
|
|
502
|
+
end
|
|
503
|
+
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.SACK` (69) and a
|
|
504
|
+
-- specific seed.
|
|
505
|
+
function ____exports.spawnSackWithSeed(self, subType, position, seedOrRNG, velocity, spawner)
|
|
506
|
+
if velocity == nil then
|
|
507
|
+
velocity = VectorZero
|
|
508
|
+
end
|
|
509
|
+
if spawner == nil then
|
|
510
|
+
spawner = nil
|
|
511
|
+
end
|
|
512
|
+
return ____exports.spawnSack(
|
|
513
|
+
nil,
|
|
514
|
+
subType,
|
|
515
|
+
position,
|
|
516
|
+
velocity,
|
|
517
|
+
spawner,
|
|
518
|
+
seedOrRNG
|
|
519
|
+
)
|
|
520
|
+
end
|
|
521
|
+
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TRINKET` (350).
|
|
522
|
+
function ____exports.spawnTrinket(self, subType, position, velocity, spawner, seedOrRNG)
|
|
523
|
+
if velocity == nil then
|
|
524
|
+
velocity = VectorZero
|
|
525
|
+
end
|
|
526
|
+
if spawner == nil then
|
|
527
|
+
spawner = nil
|
|
528
|
+
end
|
|
529
|
+
if seedOrRNG == nil then
|
|
530
|
+
seedOrRNG = nil
|
|
531
|
+
end
|
|
532
|
+
return spawnPickup(
|
|
533
|
+
nil,
|
|
534
|
+
PickupVariant.TRINKET,
|
|
535
|
+
subType,
|
|
536
|
+
position,
|
|
537
|
+
velocity,
|
|
538
|
+
spawner,
|
|
539
|
+
seedOrRNG
|
|
540
|
+
)
|
|
541
|
+
end
|
|
542
|
+
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TRINKET` (350) and
|
|
543
|
+
-- a specific seed.
|
|
544
|
+
function ____exports.spawnTrinketWithSeed(self, subType, position, seedOrRNG, velocity, spawner)
|
|
545
|
+
if velocity == nil then
|
|
546
|
+
velocity = VectorZero
|
|
547
|
+
end
|
|
548
|
+
if spawner == nil then
|
|
549
|
+
spawner = nil
|
|
550
|
+
end
|
|
551
|
+
return ____exports.spawnTrinket(
|
|
552
|
+
nil,
|
|
553
|
+
subType,
|
|
554
|
+
position,
|
|
555
|
+
velocity,
|
|
556
|
+
spawner,
|
|
557
|
+
seedOrRNG
|
|
558
|
+
)
|
|
559
|
+
end
|
|
560
|
+
return ____exports
|
|
@@ -15,12 +15,12 @@ local ____charge = require("functions.charge")
|
|
|
15
15
|
local getTotalCharge = ____charge.getTotalCharge
|
|
16
16
|
local ____enums = require("functions.enums")
|
|
17
17
|
local getEnumValues = ____enums.getEnumValues
|
|
18
|
-
local
|
|
19
|
-
local getPlayerBlackHearts =
|
|
20
|
-
local getPlayerHearts =
|
|
21
|
-
local getPlayerSoulHearts =
|
|
22
|
-
local isCharacter =
|
|
23
|
-
local setActiveItem =
|
|
18
|
+
local ____players = require("functions.players")
|
|
19
|
+
local getPlayerBlackHearts = ____players.getPlayerBlackHearts
|
|
20
|
+
local getPlayerHearts = ____players.getPlayerHearts
|
|
21
|
+
local getPlayerSoulHearts = ____players.getPlayerSoulHearts
|
|
22
|
+
local isCharacter = ____players.isCharacter
|
|
23
|
+
local setActiveItem = ____players.setActiveItem
|
|
24
24
|
function ____exports.removeAllPlayerHealth(self, player)
|
|
25
25
|
local goldenHearts = player:GetGoldenHearts()
|
|
26
26
|
local eternalHearts = player:GetEternalHearts()
|
|
@@ -328,4 +328,4 @@ export declare function setBlindfold(player: EntityPlayer, enabled: boolean, mod
|
|
|
328
328
|
* any costumes.
|
|
329
329
|
*/
|
|
330
330
|
export declare function useActiveItemTemp(player: EntityPlayer, collectibleType: CollectibleType): void;
|
|
331
|
-
//# sourceMappingURL=
|
|
331
|
+
//# sourceMappingURL=players.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"players.d.ts","sourceRoot":"","sources":["../../src/functions/players.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,SAAS,EAET,eAAe,EAIf,UAAU,EACV,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAwBjD,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,IAAI,CAON;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,OAAO,CACrB,MAAM,EAAE,YAAY,EACpB,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,GACb,IAAI,CA4CN;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,WAAW,EAAE,WAAW,GACvB,IAAI,CAON;AAED,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,eAAe,GAC/B,OAAO,CAGT;AAED,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAGrE;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,GAAG,kBAAkB,EAAE,UAAU,EAAE,GAAG,OAAO,CAIxE;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CASjE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAK1E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAKzE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,UAAU,GAAG,SAAS,CAMxB;AAED;;;;;GAKG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ACpB,eAAe,EAAE,eAAe,EAChC,UAAU,EAAE,UAAU,EACtB,MAAM,CAAC,EAAE,GAAG,EACZ,WAAW,UAAQ,GAClB,IAAI,CA6DN;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,OAAO,EAChB,aAAa,UAAO,GACnB,IAAI,CAsBN;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,IAAI,CAEN"}
|
|
File without changes
|
|
@@ -13,8 +13,8 @@ local ____PocketItemType = require("enums.PocketItemType")
|
|
|
13
13
|
local PocketItemType = ____PocketItemType.PocketItemType
|
|
14
14
|
local ____enums = require("functions.enums")
|
|
15
15
|
local getEnumValues = ____enums.getEnumValues
|
|
16
|
-
local
|
|
17
|
-
local isCharacter =
|
|
16
|
+
local ____players = require("functions.players")
|
|
17
|
+
local isCharacter = ____players.isCharacter
|
|
18
18
|
--- Use this helper function as a workaround for the `EntityPlayer.GetPocketItem` method not working
|
|
19
19
|
-- correctly.
|
|
20
20
|
--
|
|
@@ -10,14 +10,14 @@ local ____cachedClasses = require("cachedClasses")
|
|
|
10
10
|
local game = ____cachedClasses.game
|
|
11
11
|
local ____constants = require("constants")
|
|
12
12
|
local DISTANCE_OF_GRID_TILE = ____constants.DISTANCE_OF_GRID_TILE
|
|
13
|
-
local
|
|
14
|
-
local getEntities =
|
|
15
|
-
local
|
|
16
|
-
local getEffects =
|
|
17
|
-
local ____player = require("functions.player")
|
|
18
|
-
local getPlayerCloserThan = ____player.getPlayerCloserThan
|
|
13
|
+
local ____entities = require("functions.entities")
|
|
14
|
+
local getEntities = ____entities.getEntities
|
|
15
|
+
local ____entitiesSpecific = require("functions.entitiesSpecific")
|
|
16
|
+
local getEffects = ____entitiesSpecific.getEffects
|
|
19
17
|
local ____playerIndex = require("functions.playerIndex")
|
|
20
18
|
local getPlayers = ____playerIndex.getPlayers
|
|
19
|
+
local ____players = require("functions.players")
|
|
20
|
+
local getPlayerCloserThan = ____players.getPlayerCloserThan
|
|
21
21
|
local MAX_FIND_FREE_POSITION_ATTEMPTS = 100
|
|
22
22
|
function ____exports.anyEntityCloserThan(self, entities, position, distance)
|
|
23
23
|
return __TS__ArraySome(
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helper function to check if all of the pressure plates in the room are pushed.
|
|
3
|
+
*
|
|
4
|
+
* In this context, "pressure plates" refers to the grid entities that you have to press down in
|
|
5
|
+
* order for the room to be cleared. This function ignores other types of pressure plates, such as
|
|
6
|
+
* the ones that you press to get a reward, the ones that you press to start a Greed Mode wave, and
|
|
7
|
+
* so on.
|
|
8
|
+
*/
|
|
9
|
+
export declare function isAllPressurePlatesPushed(): boolean;
|
|
10
|
+
//# sourceMappingURL=pressurePlate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pressurePlate.d.ts","sourceRoot":"","sources":["../../src/functions/pressurePlate.ts"],"names":[],"mappings":"AAOA;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,IAAI,OAAO,CAanD"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__ArrayEvery = ____lualib.__TS__ArrayEvery
|
|
3
|
+
local ____exports = {}
|
|
4
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
5
|
+
local PressurePlateState = ____isaac_2Dtypescript_2Ddefinitions.PressurePlateState
|
|
6
|
+
local PressurePlateVariant = ____isaac_2Dtypescript_2Ddefinitions.PressurePlateVariant
|
|
7
|
+
local ____cachedClasses = require("cachedClasses")
|
|
8
|
+
local game = ____cachedClasses.game
|
|
9
|
+
local ____gridEntitiesSpecific = require("functions.gridEntitiesSpecific")
|
|
10
|
+
local getPressurePlates = ____gridEntitiesSpecific.getPressurePlates
|
|
11
|
+
--- Helper function to check if all of the pressure plates in the room are pushed.
|
|
12
|
+
--
|
|
13
|
+
-- In this context, "pressure plates" refers to the grid entities that you have to press down in
|
|
14
|
+
-- order for the room to be cleared. This function ignores other types of pressure plates, such as
|
|
15
|
+
-- the ones that you press to get a reward, the ones that you press to start a Greed Mode wave, and
|
|
16
|
+
-- so on.
|
|
17
|
+
function ____exports.isAllPressurePlatesPushed(self)
|
|
18
|
+
local room = game:GetRoom()
|
|
19
|
+
local hasPressurePlates = room:HasTriggerPressurePlates()
|
|
20
|
+
if not hasPressurePlates then
|
|
21
|
+
return true
|
|
22
|
+
end
|
|
23
|
+
local pressurePlates = getPressurePlates(nil, PressurePlateVariant.PRESSURE_PLATE)
|
|
24
|
+
return __TS__ArrayEvery(
|
|
25
|
+
pressurePlates,
|
|
26
|
+
function(____, pressurePlate) return pressurePlate.State == PressurePlateState.PRESSURE_PLATE_PRESSED end
|
|
27
|
+
)
|
|
28
|
+
end
|
|
29
|
+
return ____exports
|