isaacscript-common 1.2.193 → 1.2.196
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 +3 -3
- package/dist/callbacks/postEsauJr.lua +2 -2
- package/dist/callbacks/postPlayerChangeHealth.lua +2 -2
- package/dist/callbacks/postPlayerFatalDamage.lua +2 -2
- package/dist/callbacks/postPlayerReordered.lua +3 -3
- package/dist/callbacks/preBerserkDeath.lua +2 -1
- package/dist/constants.d.ts +2 -38
- package/dist/constants.lua +3 -103
- package/dist/features/extraConsoleCommands/commands.lua +5 -3
- package/dist/features/playerInventory.lua +3 -3
- package/dist/functions/character.d.ts +46 -0
- package/dist/functions/character.lua +64 -0
- package/dist/functions/charge.lua +2 -2
- package/dist/functions/collectibles.lua +7 -6
- package/dist/functions/entity.lua +3 -3
- package/dist/functions/familiars.lua +3 -3
- package/dist/functions/flying.lua +1 -1
- package/dist/functions/pickups.d.ts +5 -0
- package/dist/functions/pickups.lua +33 -2
- package/dist/functions/player.d.ts +23 -127
- package/dist/functions/player.lua +86 -247
- package/dist/functions/playerDataStructures.lua +2 -2
- package/dist/functions/playerHealth.lua +7 -7
- package/dist/functions/playerIndex.d.ts +67 -0
- package/dist/functions/playerIndex.lua +125 -0
- package/dist/functions/pocketItems.d.ts +5 -0
- package/dist/functions/pocketItems.lua +5 -0
- package/dist/functions/positionVelocity.lua +2 -1
- package/dist/functions/revive.lua +6 -4
- package/dist/functions/utils.d.ts +2 -1
- package/dist/functions/utils.lua +5 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.lua +17 -1
- package/dist/objects/colors.d.ts +17 -0
- package/dist/objects/colors.lua +13 -0
- package/dist/sets/charactersThatStartWithAnActiveItemSet.d.ts +2 -0
- package/dist/sets/charactersThatStartWithAnActiveItemSet.lua +18 -0
- package/dist/sets/charactersWithBlackHeartFromEternalHeartSet.d.ts +2 -0
- package/dist/sets/charactersWithBlackHeartFromEternalHeartSet.lua +6 -0
- package/dist/sets/charactersWithFreeDevilDealsSet.d.ts +2 -0
- package/dist/sets/charactersWithFreeDevilDealsSet.lua +6 -0
- package/dist/sets/charactersWithNoRedHeartsSet.d.ts +6 -0
- package/dist/sets/charactersWithNoRedHeartsSet.lua +15 -0
- package/dist/sets/charactersWithNoSoulHeartsSet.d.ts +6 -0
- package/dist/sets/charactersWithNoSoulHeartsSet.lua +12 -0
- package/dist/sets/chestPickupVariantsSet.d.ts +2 -0
- package/dist/sets/chestPickupVariantsSet.lua +19 -0
- package/dist/sets/familiarsThatShootPlayerTearsSet.d.ts +2 -0
- package/dist/sets/familiarsThatShootPlayerTearsSet.lua +15 -0
- package/dist/sets/lostStyleCharactersSet.d.ts +6 -0
- package/dist/sets/lostStyleCharactersSet.lua +12 -0
- package/dist/sets/redHeartSubTypesSet.d.ts +2 -0
- package/dist/sets/redHeartSubTypesSet.lua +6 -0
- package/dist/sets/singleUseActiveCollectibleTypesSet.d.ts +2 -0
- package/dist/sets/singleUseActiveCollectibleTypesSet.lua +15 -0
- package/dist/sets/storyBossesSet.d.ts +2 -0
- package/dist/sets/storyBossesSet.lua +20 -0
- package/package.json +2 -2
|
@@ -15,9 +15,9 @@ local ____familiars = require("functions.familiars")
|
|
|
15
15
|
local removeAllFamiliars = ____familiars.removeAllFamiliars
|
|
16
16
|
local ____log = require("functions.log")
|
|
17
17
|
local log = ____log.log
|
|
18
|
-
local
|
|
19
|
-
local getPlayerFromIndex =
|
|
20
|
-
local getPlayerIndex =
|
|
18
|
+
local ____playerIndex = require("functions.playerIndex")
|
|
19
|
+
local getPlayerFromIndex = ____playerIndex.getPlayerFromIndex
|
|
20
|
+
local getPlayerIndex = ____playerIndex.getPlayerIndex
|
|
21
21
|
local ____postCustomRevive = require("callbacks.subscriptions.postCustomRevive")
|
|
22
22
|
local postCustomReviveFire = ____postCustomRevive.postCustomReviveFire
|
|
23
23
|
local postCustomReviveHasSubscriptions = ____postCustomRevive.postCustomReviveHasSubscriptions
|
|
@@ -6,8 +6,8 @@ local ____cachedClasses = require("cachedClasses")
|
|
|
6
6
|
local game = ____cachedClasses.game
|
|
7
7
|
local ____exports = require("features.saveDataManager.exports")
|
|
8
8
|
local saveDataManager = ____exports.saveDataManager
|
|
9
|
-
local
|
|
10
|
-
local getPlayers =
|
|
9
|
+
local ____playerIndex = require("functions.playerIndex")
|
|
10
|
+
local getPlayers = ____playerIndex.getPlayers
|
|
11
11
|
local ____postEsauJr = require("callbacks.subscriptions.postEsauJr")
|
|
12
12
|
local postEsauJrFire = ____postEsauJr.postEsauJrFire
|
|
13
13
|
local postEsauJrHasSubscriptions = ____postEsauJr.postEsauJrHasSubscriptions
|
|
@@ -11,10 +11,10 @@ local ____ModCallbacksCustom = require("enums.ModCallbacksCustom")
|
|
|
11
11
|
local ModCallbacksCustom = ____ModCallbacksCustom.ModCallbacksCustom
|
|
12
12
|
local ____exports = require("features.saveDataManager.exports")
|
|
13
13
|
local saveDataManager = ____exports.saveDataManager
|
|
14
|
-
local ____player = require("functions.player")
|
|
15
|
-
local getPlayerIndex = ____player.getPlayerIndex
|
|
16
14
|
local ____playerHealth = require("functions.playerHealth")
|
|
17
15
|
local getPlayerHealthType = ____playerHealth.getPlayerHealthType
|
|
16
|
+
local ____playerIndex = require("functions.playerIndex")
|
|
17
|
+
local getPlayerIndex = ____playerIndex.getPlayerIndex
|
|
18
18
|
local ____utils = require("functions.utils")
|
|
19
19
|
local getEnumValues = ____utils.getEnumValues
|
|
20
20
|
local ____postPlayerChangeHealth = require("callbacks.subscriptions.postPlayerChangeHealth")
|
|
@@ -7,11 +7,11 @@ local ____cachedClasses = require("cachedClasses")
|
|
|
7
7
|
local game = ____cachedClasses.game
|
|
8
8
|
local ____exports = require("features.saveDataManager.exports")
|
|
9
9
|
local saveDataManager = ____exports.saveDataManager
|
|
10
|
-
local ____player = require("functions.player")
|
|
11
|
-
local isChildPlayer = ____player.isChildPlayer
|
|
12
10
|
local ____playerDataStructures = require("functions.playerDataStructures")
|
|
13
11
|
local mapGetPlayer = ____playerDataStructures.mapGetPlayer
|
|
14
12
|
local mapSetPlayer = ____playerDataStructures.mapSetPlayer
|
|
13
|
+
local ____playerIndex = require("functions.playerIndex")
|
|
14
|
+
local isChildPlayer = ____playerIndex.isChildPlayer
|
|
15
15
|
local ____revive = require("functions.revive")
|
|
16
16
|
local isDamageToPlayerFatal = ____revive.isDamageToPlayerFatal
|
|
17
17
|
local willPlayerRevive = ____revive.willPlayerRevive
|
|
@@ -6,9 +6,9 @@ local ____exports = require("features.saveDataManager.exports")
|
|
|
6
6
|
local saveDataManager = ____exports.saveDataManager
|
|
7
7
|
local ____array = require("functions.array")
|
|
8
8
|
local emptyArray = ____array.emptyArray
|
|
9
|
-
local
|
|
10
|
-
local getPlayerFromIndex =
|
|
11
|
-
local getPlayerIndex =
|
|
9
|
+
local ____playerIndex = require("functions.playerIndex")
|
|
10
|
+
local getPlayerFromIndex = ____playerIndex.getPlayerFromIndex
|
|
11
|
+
local getPlayerIndex = ____playerIndex.getPlayerIndex
|
|
12
12
|
local ____postPEffectUpdateReordered = require("callbacks.subscriptions.postPEffectUpdateReordered")
|
|
13
13
|
local postPEffectUpdateReorderedFire = ____postPEffectUpdateReordered.postPEffectUpdateReorderedFire
|
|
14
14
|
local postPEffectUpdateReorderedHasSubscriptions = ____postPEffectUpdateReordered.postPEffectUpdateReorderedHasSubscriptions
|
|
@@ -5,7 +5,8 @@ local ____ModCallbacksCustom = require("enums.ModCallbacksCustom")
|
|
|
5
5
|
local ModCallbacksCustom = ____ModCallbacksCustom.ModCallbacksCustom
|
|
6
6
|
local ____player = require("functions.player")
|
|
7
7
|
local getPlayerNumHitsRemaining = ____player.getPlayerNumHitsRemaining
|
|
8
|
-
local
|
|
8
|
+
local ____playerIndex = require("functions.playerIndex")
|
|
9
|
+
local isChildPlayer = ____playerIndex.isChildPlayer
|
|
9
10
|
local ____revive = require("functions.revive")
|
|
10
11
|
local willPlayerRevive = ____revive.willPlayerRevive
|
|
11
12
|
local ____preBerserkDeath = require("callbacks.subscriptions.preBerserkDeath")
|
package/dist/constants.d.ts
CHANGED
|
@@ -11,34 +11,6 @@ export declare const AZAZEL_DEFAULT_BRIMSTONE_DISTANCE = 75.125;
|
|
|
11
11
|
export declare const BLIND_ITEM_PNG_PATH = "gfx/items/collectibles/questionmark.png";
|
|
12
12
|
/** Bombs explode when their frame count is equal to this value. */
|
|
13
13
|
export declare const BOMB_EXPLODE_FRAME = 45;
|
|
14
|
-
export declare const CHARACTERS_WITH_AN_ACTIVE_ITEM: ReadonlySet<PlayerType>;
|
|
15
|
-
export declare const CHARACTERS_WITH_BLACK_HEART_FROM_ETERNAL_HEART: ReadonlySet<PlayerType>;
|
|
16
|
-
export declare const CHARACTERS_WITH_FREE_DEVIL_DEALS: ReadonlySet<PlayerType>;
|
|
17
|
-
/**
|
|
18
|
-
* The set of characters where red heart containers will be turned into soul hearts (e.g. Blue
|
|
19
|
-
* Baby). This includes The Lost and Tainted Lost. This does not include Keeper or Tainted Keeper.
|
|
20
|
-
*/
|
|
21
|
-
export declare const CHARACTERS_WITH_NO_RED_HEARTS: ReadonlySet<PlayerType>;
|
|
22
|
-
/**
|
|
23
|
-
* The set of characters where soul hearts will be automatically stripped away (e.g. Bethany). This
|
|
24
|
-
* includes The Lost and Tainted Lost.
|
|
25
|
-
*/
|
|
26
|
-
export declare const CHARACTERS_WITH_NO_SOUL_HEARTS: ReadonlySet<PlayerType>;
|
|
27
|
-
export declare const CHEST_PICKUP_VARIANTS: ReadonlySet<PickupVariant>;
|
|
28
|
-
/**
|
|
29
|
-
* A collection of common colors that can be reused. Note that if you want to further modify these
|
|
30
|
-
* colors, you should copy them first with the `copyColor` function.
|
|
31
|
-
*/
|
|
32
|
-
export declare const COLORS: {
|
|
33
|
-
Black: Color;
|
|
34
|
-
Red: Color;
|
|
35
|
-
Green: Color;
|
|
36
|
-
Blue: Color;
|
|
37
|
-
Yellow: Color;
|
|
38
|
-
Pink: Color;
|
|
39
|
-
Cyan: Color;
|
|
40
|
-
White: Color;
|
|
41
|
-
};
|
|
42
14
|
export declare const DEFAULT_ITEM_POOL_TYPE = ItemPoolType.POOL_TREASURE;
|
|
43
15
|
/** This is also the distance that a player spawns from the door that they enter a room from. */
|
|
44
16
|
export declare const DISTANCE_OF_GRID_TILE = 40;
|
|
@@ -54,7 +26,6 @@ export declare const EGGY_STATE_FRAME_OF_FINAL_SPIDER = 45;
|
|
|
54
26
|
* information, see the documentation for the `clearSprite` helper function.
|
|
55
27
|
*/
|
|
56
28
|
export declare const EMPTY_PNG_PATH = "gfx/none.png";
|
|
57
|
-
export declare const FAMILIARS_THAT_SHOOT_PLAYER_TEARS: ReadonlySet<FamiliarVariant>;
|
|
58
29
|
/** As of Repentance, the final stage is floor 13 (which is the Home floor). */
|
|
59
30
|
export declare const FINAL_STAGE: number;
|
|
60
31
|
/**
|
|
@@ -66,11 +37,6 @@ export declare const FIRST_GLITCHED_COLLECTIBLE_TYPE: number;
|
|
|
66
37
|
export declare const GAME_FRAMES_PER_SECOND = 30;
|
|
67
38
|
export declare const GRID_INDEX_CENTER_OF_1X1_ROOM = 67;
|
|
68
39
|
export declare const ISAAC_FRAMES_PER_SECOND = 60;
|
|
69
|
-
/**
|
|
70
|
-
* This is the set of characters that look like The Lost and play the "LostDeath" animation when
|
|
71
|
-
* they die.
|
|
72
|
-
*/
|
|
73
|
-
export declare const LOST_STYLE_PLAYER_TYPES: ReadonlySet<PlayerType>;
|
|
74
40
|
/** In a 2x2 room, there can be 8 doors. */
|
|
75
41
|
export declare const MAX_NUM_DOORS = 8;
|
|
76
42
|
/**
|
|
@@ -103,8 +69,8 @@ export declare const MAX_ROOM_INDEX = 168;
|
|
|
103
69
|
* effect.
|
|
104
70
|
*/
|
|
105
71
|
export declare const MAX_SPEED_STAT = 2;
|
|
106
|
-
export declare const MAX_VANILLA_CHARACTER
|
|
107
|
-
export declare const MAX_VANILLA_COLLECTIBLE_TYPE
|
|
72
|
+
export declare const MAX_VANILLA_CHARACTER: number;
|
|
73
|
+
export declare const MAX_VANILLA_COLLECTIBLE_TYPE: number;
|
|
108
74
|
export declare const NUM_DIMENSIONS = 3;
|
|
109
75
|
export declare const SECOND_IN_MILLISECONDS = 1000;
|
|
110
76
|
export declare const MINUTE_IN_MILLISECONDS: number;
|
|
@@ -123,8 +89,6 @@ export declare const PILL_COLOR_MASK = 2047;
|
|
|
123
89
|
* 1 << 11
|
|
124
90
|
*/
|
|
125
91
|
export declare const PILL_GIANT_FLAG = 2048;
|
|
126
|
-
export declare const SINGLE_USE_ACTIVE_COLLECTIBLE_TYPES: ReadonlySet<CollectibleType>;
|
|
127
|
-
export declare const STORY_BOSSES: ReadonlySet<EntityType>;
|
|
128
92
|
/**
|
|
129
93
|
* Add this to a `TrinketType` to get the corresponding golden trinket type.
|
|
130
94
|
*
|
package/dist/constants.lua
CHANGED
|
@@ -1,93 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
local Set = ____lualib.Set
|
|
3
|
-
local __TS__New = ____lualib.__TS__New
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
4
2
|
local ____exports = {}
|
|
5
3
|
____exports.AZAZEL_DEFAULT_BRIMSTONE_DISTANCE = 75.125
|
|
6
4
|
____exports.BLIND_ITEM_PNG_PATH = "gfx/items/collectibles/questionmark.png"
|
|
7
5
|
____exports.BOMB_EXPLODE_FRAME = 45
|
|
8
|
-
____exports.CHARACTERS_WITH_AN_ACTIVE_ITEM = __TS__New(Set, {
|
|
9
|
-
PlayerType.PLAYER_ISAAC,
|
|
10
|
-
PlayerType.PLAYER_MAGDALENE,
|
|
11
|
-
PlayerType.PLAYER_JUDAS,
|
|
12
|
-
PlayerType.PLAYER_BLUEBABY,
|
|
13
|
-
PlayerType.PLAYER_EVE,
|
|
14
|
-
PlayerType.PLAYER_EDEN,
|
|
15
|
-
PlayerType.PLAYER_THELOST,
|
|
16
|
-
PlayerType.PLAYER_LILITH,
|
|
17
|
-
PlayerType.PLAYER_KEEPER,
|
|
18
|
-
PlayerType.PLAYER_APOLLYON,
|
|
19
|
-
PlayerType.PLAYER_EDEN_B
|
|
20
|
-
})
|
|
21
|
-
____exports.CHARACTERS_WITH_BLACK_HEART_FROM_ETERNAL_HEART = __TS__New(Set, {PlayerType.PLAYER_BLACKJUDAS, PlayerType.PLAYER_JUDAS_B})
|
|
22
|
-
____exports.CHARACTERS_WITH_FREE_DEVIL_DEALS = __TS__New(Set, {PlayerType.PLAYER_THELOST, PlayerType.PLAYER_THELOST_B, PlayerType.PLAYER_JACOB2_B})
|
|
23
|
-
____exports.CHARACTERS_WITH_NO_RED_HEARTS = __TS__New(Set, {
|
|
24
|
-
PlayerType.PLAYER_BLUEBABY,
|
|
25
|
-
PlayerType.PLAYER_THELOST,
|
|
26
|
-
PlayerType.PLAYER_BLACKJUDAS,
|
|
27
|
-
PlayerType.PLAYER_JUDAS_B,
|
|
28
|
-
PlayerType.PLAYER_BLUEBABY_B,
|
|
29
|
-
PlayerType.PLAYER_THELOST_B,
|
|
30
|
-
PlayerType.PLAYER_THEFORGOTTEN_B,
|
|
31
|
-
PlayerType.PLAYER_BETHANY_B
|
|
32
|
-
})
|
|
33
|
-
____exports.CHARACTERS_WITH_NO_SOUL_HEARTS = __TS__New(Set, {
|
|
34
|
-
PlayerType.PLAYER_THELOST,
|
|
35
|
-
PlayerType.PLAYER_KEEPER,
|
|
36
|
-
PlayerType.PLAYER_BETHANY,
|
|
37
|
-
PlayerType.PLAYER_THELOST_B,
|
|
38
|
-
PlayerType.PLAYER_KEEPER_B
|
|
39
|
-
})
|
|
40
|
-
____exports.CHEST_PICKUP_VARIANTS = __TS__New(Set, {
|
|
41
|
-
50,
|
|
42
|
-
51,
|
|
43
|
-
52,
|
|
44
|
-
53,
|
|
45
|
-
54,
|
|
46
|
-
55,
|
|
47
|
-
56,
|
|
48
|
-
57,
|
|
49
|
-
58,
|
|
50
|
-
60,
|
|
51
|
-
360,
|
|
52
|
-
390
|
|
53
|
-
})
|
|
54
|
-
____exports.COLORS = {
|
|
55
|
-
Black = Color(1, 1, 1),
|
|
56
|
-
Red = Color(1, 0, 0),
|
|
57
|
-
Green = Color(0, 1, 0),
|
|
58
|
-
Blue = Color(0, 0, 1),
|
|
59
|
-
Yellow = Color(1, 1, 0),
|
|
60
|
-
Pink = Color(1, 0, 1),
|
|
61
|
-
Cyan = Color(0, 1, 1),
|
|
62
|
-
White = Color(1, 1, 1)
|
|
63
|
-
}
|
|
64
6
|
____exports.DEFAULT_ITEM_POOL_TYPE = ItemPoolType.POOL_TREASURE
|
|
65
7
|
____exports.DISTANCE_OF_GRID_TILE = 40
|
|
66
8
|
____exports.DOOR_HITBOX_DISTANCE = 11
|
|
67
9
|
____exports.EGGY_STATE_FRAME_OF_FINAL_SPIDER = 45
|
|
68
10
|
____exports.EMPTY_PNG_PATH = "gfx/none.png"
|
|
69
|
-
____exports.FAMILIARS_THAT_SHOOT_PLAYER_TEARS = __TS__New(Set, {
|
|
70
|
-
FamiliarVariant.SCISSORS,
|
|
71
|
-
FamiliarVariant.INCUBUS,
|
|
72
|
-
FamiliarVariant.FATES_REWARD,
|
|
73
|
-
FamiliarVariant.SPRINKLER,
|
|
74
|
-
FamiliarVariant.LOST_SOUL,
|
|
75
|
-
FamiliarVariant.TWISTED_BABY,
|
|
76
|
-
FamiliarVariant.BLOOD_BABY,
|
|
77
|
-
FamiliarVariant.DECAP_ATTACK
|
|
78
|
-
})
|
|
79
11
|
____exports.FINAL_STAGE = LevelStage.NUM_STAGES - 1
|
|
80
12
|
____exports.FIRST_GLITCHED_COLLECTIBLE_TYPE = (1 << 32) - 1
|
|
81
13
|
____exports.GAME_FRAMES_PER_SECOND = 30
|
|
82
14
|
____exports.GRID_INDEX_CENTER_OF_1X1_ROOM = 67
|
|
83
15
|
____exports.ISAAC_FRAMES_PER_SECOND = 60
|
|
84
|
-
____exports.LOST_STYLE_PLAYER_TYPES = __TS__New(Set, {
|
|
85
|
-
PlayerType.PLAYER_THELOST,
|
|
86
|
-
PlayerType.PLAYER_THESOUL,
|
|
87
|
-
PlayerType.PLAYER_THELOST_B,
|
|
88
|
-
PlayerType.PLAYER_JACOB2_B,
|
|
89
|
-
PlayerType.PLAYER_THESOUL_B
|
|
90
|
-
})
|
|
91
16
|
____exports.MAX_NUM_DOORS = 8
|
|
92
17
|
____exports.MAX_NUM_FAMILIARS = 64
|
|
93
18
|
____exports.MAX_NUM_INPUTS = 4
|
|
@@ -97,39 +22,14 @@ ____exports.MAX_PLAYER_SPEED_IN_UNITS = 9.8
|
|
|
97
22
|
____exports.MAX_PLAYER_TRINKET_SLOTS = 2
|
|
98
23
|
____exports.MAX_ROOM_INDEX = 168
|
|
99
24
|
____exports.MAX_SPEED_STAT = 2
|
|
100
|
-
____exports.MAX_VANILLA_CHARACTER = PlayerType.
|
|
101
|
-
____exports.MAX_VANILLA_COLLECTIBLE_TYPE = CollectibleType.
|
|
25
|
+
____exports.MAX_VANILLA_CHARACTER = PlayerType.NUM_PLAYER_TYPES - 1
|
|
26
|
+
____exports.MAX_VANILLA_COLLECTIBLE_TYPE = CollectibleType.NUM_COLLECTIBLES - 1
|
|
102
27
|
____exports.NUM_DIMENSIONS = 3
|
|
103
28
|
____exports.SECOND_IN_MILLISECONDS = 1000
|
|
104
29
|
____exports.MINUTE_IN_MILLISECONDS = 60 * ____exports.SECOND_IN_MILLISECONDS
|
|
105
30
|
____exports.ONE_BY_ONE_ROOM_GRID_SIZE = 135
|
|
106
31
|
____exports.PILL_COLOR_MASK = 2047
|
|
107
32
|
____exports.PILL_GIANT_FLAG = 2048
|
|
108
|
-
____exports.SINGLE_USE_ACTIVE_COLLECTIBLE_TYPES = __TS__New(Set, {
|
|
109
|
-
CollectibleType.COLLECTIBLE_FORGET_ME_NOW,
|
|
110
|
-
CollectibleType.COLLECTIBLE_EDENS_SOUL,
|
|
111
|
-
CollectibleType.COLLECTIBLE_ALABASTER_BOX,
|
|
112
|
-
CollectibleType.COLLECTIBLE_PLAN_C,
|
|
113
|
-
CollectibleType.COLLECTIBLE_MAMA_MEGA,
|
|
114
|
-
CollectibleType.COLLECTIBLE_SACRIFICIAL_ALTAR,
|
|
115
|
-
CollectibleType.COLLECTIBLE_DEATH_CERTIFICATE,
|
|
116
|
-
CollectibleType.COLLECTIBLE_R_KEY
|
|
117
|
-
})
|
|
118
|
-
____exports.STORY_BOSSES = __TS__New(Set, {
|
|
119
|
-
EntityType.ENTITY_MOM,
|
|
120
|
-
EntityType.ENTITY_MOMS_HEART,
|
|
121
|
-
EntityType.ENTITY_SATAN,
|
|
122
|
-
EntityType.ENTITY_ISAAC,
|
|
123
|
-
EntityType.ENTITY_THE_LAMB,
|
|
124
|
-
EntityType.ENTITY_MEGA_SATAN,
|
|
125
|
-
EntityType.ENTITY_MEGA_SATAN_2,
|
|
126
|
-
EntityType.ENTITY_ULTRA_GREED,
|
|
127
|
-
EntityType.ENTITY_HUSH,
|
|
128
|
-
EntityType.ENTITY_DELIRIUM,
|
|
129
|
-
EntityType.ENTITY_MOTHER,
|
|
130
|
-
EntityType.ENTITY_DOGMA,
|
|
131
|
-
EntityType.ENTITY_BEAST
|
|
132
|
-
})
|
|
133
33
|
____exports.TRINKET_GOLDEN_FLAG = 32768
|
|
134
34
|
____exports.TRINKET_ID_MASK = 32767
|
|
135
35
|
____exports.UI_HEART_WIDTH = 12
|
|
@@ -14,6 +14,8 @@ local ____HealthType = require("enums.HealthType")
|
|
|
14
14
|
local HealthType = ____HealthType.HealthType
|
|
15
15
|
local ____cards = require("functions.cards")
|
|
16
16
|
local getCardName = ____cards.getCardName
|
|
17
|
+
local ____character = require("functions.character")
|
|
18
|
+
local getCharacterName = ____character.getCharacterName
|
|
17
19
|
local ____gridEntity = require("functions.gridEntity")
|
|
18
20
|
local spawnGridEntityWithVariant = ____gridEntity.spawnGridEntityWithVariant
|
|
19
21
|
local ____log = require("functions.log")
|
|
@@ -30,11 +32,11 @@ local getNPCs = ____npc.getNPCs
|
|
|
30
32
|
local ____pills = require("functions.pills")
|
|
31
33
|
local getPillEffectName = ____pills.getPillEffectName
|
|
32
34
|
local ____player = require("functions.player")
|
|
33
|
-
local getCharacterName = ____player.getCharacterName
|
|
34
|
-
local getPlayers = ____player.getPlayers
|
|
35
35
|
local useActiveItemTemp = ____player.useActiveItemTemp
|
|
36
36
|
local ____playerHealth = require("functions.playerHealth")
|
|
37
37
|
local addPlayerHealthType = ____playerHealth.addPlayerHealthType
|
|
38
|
+
local ____playerIndex = require("functions.playerIndex")
|
|
39
|
+
local getPlayers = ____playerIndex.getPlayers
|
|
38
40
|
local ____roomData = require("functions.roomData")
|
|
39
41
|
local getRoomData = ____roomData.getRoomData
|
|
40
42
|
local ____rooms = require("functions.rooms")
|
|
@@ -887,7 +889,7 @@ end
|
|
|
887
889
|
function ____exports.speed(self)
|
|
888
890
|
local player = Isaac.GetPlayer()
|
|
889
891
|
v.run.maxSpeed = not v.run.maxSpeed
|
|
890
|
-
if v.run.maxSpeed and not player
|
|
892
|
+
if v.run.maxSpeed and not player.CanFly then
|
|
891
893
|
local numEternalHearts = player:GetEternalHearts()
|
|
892
894
|
if numEternalHearts == 0 then
|
|
893
895
|
player:AddCollectible(CollectibleType.COLLECTIBLE_FATE)
|
|
@@ -19,9 +19,9 @@ local ____collectibles = require("functions.collectibles")
|
|
|
19
19
|
local isActiveCollectible = ____collectibles.isActiveCollectible
|
|
20
20
|
local ____collectibleSet = require("functions.collectibleSet")
|
|
21
21
|
local getCollectibleSet = ____collectibleSet.getCollectibleSet
|
|
22
|
-
local
|
|
23
|
-
local getAllPlayers =
|
|
24
|
-
local getPlayerIndex =
|
|
22
|
+
local ____playerIndex = require("functions.playerIndex")
|
|
23
|
+
local getAllPlayers = ____playerIndex.getAllPlayers
|
|
24
|
+
local getPlayerIndex = ____playerIndex.getPlayerIndex
|
|
25
25
|
local ____utils = require("functions.utils")
|
|
26
26
|
local ____repeat = ____utils["repeat"]
|
|
27
27
|
local ____exports = require("features.saveDataManager.exports")
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
+
/**
|
|
3
|
+
* Helper function to determine if the given character can have red heart containers. Returns true
|
|
4
|
+
* for characters like Isaac, Magdalene, or Cain. Returns true for Keeper and Tainted Keeper, even
|
|
5
|
+
* though coin containers are not technically the same as red heart containers. Returns false for
|
|
6
|
+
* characters like Blue Baby. Returns false for The Lost and Tainted Lost.
|
|
7
|
+
*/
|
|
8
|
+
export declare function characterCanHaveRedHearts(character: PlayerType | int): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Helper function to determine if the given character can have soul hearts. Returns true for
|
|
11
|
+
* characters like Isaac, Magdalene, or Cain. Returns false for characters like Bethany. Returns
|
|
12
|
+
* false for The Lost and Tainted Lost.
|
|
13
|
+
*/
|
|
14
|
+
export declare function characterCanHaveSoulHearts(character: PlayerType | int): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Helper function for determining whether the given character can take free Devil Deals. (e.g. The
|
|
17
|
+
* Lost, Tainted Lost, etc.)
|
|
18
|
+
*/
|
|
19
|
+
export declare function characterCanTakeFreeDevilDeals(character: PlayerType | int): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Normally, characters get a red heart container upon reaching a new floor with an eternal heart,
|
|
22
|
+
* but some characters grant a black heart instead. Returns true for Dark Judas and Tainted Judas.
|
|
23
|
+
* Otherwise, returns false.
|
|
24
|
+
*/
|
|
25
|
+
export declare function characterGetsBlackHeartFromEternalHeart(character: PlayerType | int): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Helper function to determine if the specified character starts with an active item.
|
|
28
|
+
*
|
|
29
|
+
* For the purposes of this function, the save file is considered to be fully unlocked (e.g. Isaac
|
|
30
|
+
* is considered to starts with the D6, but this is not the case on a brand new save file).
|
|
31
|
+
*/
|
|
32
|
+
export declare function characterStartsWithActiveItem(character: PlayerType | int): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Most characters have a 56 frame death animation (i.e. the "Death" animation).
|
|
35
|
+
* The Lost and Tainted Lost have a 38 frame death animation (i.e. the "LostDeath" animation).
|
|
36
|
+
* Tainted Forgotten have a 20 frame death animation (i.e. the "ForgottenDeath" animation).
|
|
37
|
+
*/
|
|
38
|
+
export declare function getCharacterDeathAnimationName(character: PlayerType | int): string;
|
|
39
|
+
/**
|
|
40
|
+
* Returns the maximum heart containers that the provided character can have. Normally, this is 12,
|
|
41
|
+
* but with Keeper it is 3, and with Tainted Keeper it is 2. This does not account for Birthright or
|
|
42
|
+
* Mother's Kiss; use the `getPlayerMaxHeartContainers` helper function for that.
|
|
43
|
+
*/
|
|
44
|
+
export declare function getCharacterMaxHeartContainers(character: PlayerType | int): int;
|
|
45
|
+
/** Helper function to get the name of a character. Returns "unknown" for modded characters. */
|
|
46
|
+
export declare function getCharacterName(character: PlayerType | int): string;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
|
+
local ____exports = {}
|
|
3
|
+
local ____characterNames = require("objects.characterNames")
|
|
4
|
+
local CHARACTER_NAMES = ____characterNames.CHARACTER_NAMES
|
|
5
|
+
local DEFAULT_CHARACTER_NAME = ____characterNames.DEFAULT_CHARACTER_NAME
|
|
6
|
+
local ____charactersThatStartWithAnActiveItemSet = require("sets.charactersThatStartWithAnActiveItemSet")
|
|
7
|
+
local CHARACTERS_THAT_START_WITH_AN_ACTIVE_ITEM_SET = ____charactersThatStartWithAnActiveItemSet.CHARACTERS_THAT_START_WITH_AN_ACTIVE_ITEM_SET
|
|
8
|
+
local ____charactersWithBlackHeartFromEternalHeartSet = require("sets.charactersWithBlackHeartFromEternalHeartSet")
|
|
9
|
+
local CHARACTERS_WITH_BLACK_HEART_FROM_ETERNAL_HEART_SET = ____charactersWithBlackHeartFromEternalHeartSet.CHARACTERS_WITH_BLACK_HEART_FROM_ETERNAL_HEART_SET
|
|
10
|
+
local ____charactersWithFreeDevilDealsSet = require("sets.charactersWithFreeDevilDealsSet")
|
|
11
|
+
local CHARACTERS_WITH_FREE_DEVIL_DEALS_SET = ____charactersWithFreeDevilDealsSet.CHARACTERS_WITH_FREE_DEVIL_DEALS_SET
|
|
12
|
+
local ____charactersWithNoRedHeartsSet = require("sets.charactersWithNoRedHeartsSet")
|
|
13
|
+
local CHARACTERS_WITH_NO_RED_HEARTS_SET = ____charactersWithNoRedHeartsSet.CHARACTERS_WITH_NO_RED_HEARTS_SET
|
|
14
|
+
local ____charactersWithNoSoulHeartsSet = require("sets.charactersWithNoSoulHeartsSet")
|
|
15
|
+
local CHARACTERS_WITH_NO_SOUL_HEARTS_SET = ____charactersWithNoSoulHeartsSet.CHARACTERS_WITH_NO_SOUL_HEARTS_SET
|
|
16
|
+
local ____lostStyleCharactersSet = require("sets.lostStyleCharactersSet")
|
|
17
|
+
local LOST_STYLE_CHARACTERS_SET = ____lostStyleCharactersSet.LOST_STYLE_CHARACTERS_SET
|
|
18
|
+
function ____exports.characterCanHaveRedHearts(self, character)
|
|
19
|
+
return not CHARACTERS_WITH_NO_RED_HEARTS_SET:has(character)
|
|
20
|
+
end
|
|
21
|
+
function ____exports.characterCanHaveSoulHearts(self, character)
|
|
22
|
+
return not CHARACTERS_WITH_NO_SOUL_HEARTS_SET:has(character)
|
|
23
|
+
end
|
|
24
|
+
function ____exports.characterCanTakeFreeDevilDeals(self, character)
|
|
25
|
+
return CHARACTERS_WITH_FREE_DEVIL_DEALS_SET:has(character)
|
|
26
|
+
end
|
|
27
|
+
function ____exports.characterGetsBlackHeartFromEternalHeart(self, character)
|
|
28
|
+
return CHARACTERS_WITH_BLACK_HEART_FROM_ETERNAL_HEART_SET:has(character)
|
|
29
|
+
end
|
|
30
|
+
function ____exports.characterStartsWithActiveItem(self, character)
|
|
31
|
+
return CHARACTERS_THAT_START_WITH_AN_ACTIVE_ITEM_SET:has(character)
|
|
32
|
+
end
|
|
33
|
+
function ____exports.getCharacterDeathAnimationName(self, character)
|
|
34
|
+
if LOST_STYLE_CHARACTERS_SET:has(character) then
|
|
35
|
+
return "LostDeath"
|
|
36
|
+
end
|
|
37
|
+
if character == PlayerType.PLAYER_THEFORGOTTEN_B then
|
|
38
|
+
return "ForgottenDeath"
|
|
39
|
+
end
|
|
40
|
+
return "Death"
|
|
41
|
+
end
|
|
42
|
+
function ____exports.getCharacterMaxHeartContainers(self, character)
|
|
43
|
+
if character == PlayerType.PLAYER_KEEPER then
|
|
44
|
+
return 3
|
|
45
|
+
end
|
|
46
|
+
if character == PlayerType.PLAYER_THEFORGOTTEN then
|
|
47
|
+
return 6
|
|
48
|
+
end
|
|
49
|
+
if character == PlayerType.PLAYER_THESOUL then
|
|
50
|
+
return 6
|
|
51
|
+
end
|
|
52
|
+
if character == PlayerType.PLAYER_KEEPER_B then
|
|
53
|
+
return 2
|
|
54
|
+
end
|
|
55
|
+
return 12
|
|
56
|
+
end
|
|
57
|
+
function ____exports.getCharacterName(self, character)
|
|
58
|
+
if character >= PlayerType.NUM_PLAYER_TYPES then
|
|
59
|
+
return "unknown"
|
|
60
|
+
end
|
|
61
|
+
local characterName = CHARACTER_NAMES[character]
|
|
62
|
+
return characterName == nil and DEFAULT_CHARACTER_NAME or characterName
|
|
63
|
+
end
|
|
64
|
+
return ____exports
|
|
@@ -6,8 +6,8 @@ local game = ____cachedClasses.game
|
|
|
6
6
|
local sfxManager = ____cachedClasses.sfxManager
|
|
7
7
|
local ____collectibles = require("functions.collectibles")
|
|
8
8
|
local getCollectibleMaxCharges = ____collectibles.getCollectibleMaxCharges
|
|
9
|
-
local
|
|
10
|
-
local getPlayers =
|
|
9
|
+
local ____playerIndex = require("functions.playerIndex")
|
|
10
|
+
local getPlayers = ____playerIndex.getPlayers
|
|
11
11
|
function ____exports.addRoomClearChargeToSlot(self, player, activeSlot, ignoreBigRoomDoubleCharge)
|
|
12
12
|
if ignoreBigRoomDoubleCharge == nil then
|
|
13
13
|
ignoreBigRoomDoubleCharge = false
|
|
@@ -6,13 +6,14 @@ local game = ____cachedClasses.game
|
|
|
6
6
|
local itemConfig = ____cachedClasses.itemConfig
|
|
7
7
|
local ____constants = require("constants")
|
|
8
8
|
local BLIND_ITEM_PNG_PATH = ____constants.BLIND_ITEM_PNG_PATH
|
|
9
|
-
local SINGLE_USE_ACTIVE_COLLECTIBLE_TYPES = ____constants.SINGLE_USE_ACTIVE_COLLECTIBLE_TYPES
|
|
10
9
|
local ____collectibleDescriptionMap = require("maps.collectibleDescriptionMap")
|
|
11
10
|
local COLLECTIBLE_DESCRIPTION_MAP = ____collectibleDescriptionMap.COLLECTIBLE_DESCRIPTION_MAP
|
|
12
11
|
local DEFAULT_COLLECTIBLE_DESCRIPTION = ____collectibleDescriptionMap.DEFAULT_COLLECTIBLE_DESCRIPTION
|
|
13
12
|
local ____collectibleNameMap = require("maps.collectibleNameMap")
|
|
14
13
|
local COLLECTIBLE_NAME_MAP = ____collectibleNameMap.COLLECTIBLE_NAME_MAP
|
|
15
14
|
local DEFAULT_COLLECTIBLE_NAME = ____collectibleNameMap.DEFAULT_COLLECTIBLE_NAME
|
|
15
|
+
local ____singleUseActiveCollectibleTypesSet = require("sets.singleUseActiveCollectibleTypesSet")
|
|
16
|
+
local SINGLE_USE_ACTIVE_COLLECTIBLE_TYPES_SET = ____singleUseActiveCollectibleTypesSet.SINGLE_USE_ACTIVE_COLLECTIBLE_TYPES_SET
|
|
16
17
|
local ____flag = require("functions.flag")
|
|
17
18
|
local hasFlag = ____flag.hasFlag
|
|
18
19
|
local ____pickups = require("functions.pickups")
|
|
@@ -71,15 +72,15 @@ function ____exports.getCollectibleDevilHeartPrice(self, collectibleType, player
|
|
|
71
72
|
return 0
|
|
72
73
|
end
|
|
73
74
|
if maxHearts == 0 then
|
|
74
|
-
return
|
|
75
|
+
return -3
|
|
75
76
|
end
|
|
76
|
-
local defaultPickupPrice =
|
|
77
|
+
local defaultPickupPrice = -1
|
|
77
78
|
local itemConfigItem = itemConfig:GetCollectible(collectibleType)
|
|
78
79
|
if itemConfigItem == nil then
|
|
79
80
|
return defaultPickupPrice
|
|
80
81
|
end
|
|
81
|
-
local twoHeartPrice = maxHearts == 2 and
|
|
82
|
-
return itemConfigItem.DevilPrice == 2 and twoHeartPrice or
|
|
82
|
+
local twoHeartPrice = maxHearts == 2 and -4 or -2
|
|
83
|
+
return itemConfigItem.DevilPrice == 2 and twoHeartPrice or -1
|
|
83
84
|
end
|
|
84
85
|
function ____exports.getCollectibleGfxFilename(self, collectibleType)
|
|
85
86
|
local itemConfigItem = itemConfig:GetCollectible(collectibleType)
|
|
@@ -174,7 +175,7 @@ function ____exports.isQuestCollectible(self, collectibleType)
|
|
|
174
175
|
return ____exports.collectibleHasTag(nil, collectibleType, 32768)
|
|
175
176
|
end
|
|
176
177
|
function ____exports.isSingleUseCollectible(self, collectibleType)
|
|
177
|
-
return
|
|
178
|
+
return SINGLE_USE_ACTIVE_COLLECTIBLE_TYPES_SET:has(collectibleType)
|
|
178
179
|
end
|
|
179
180
|
function ____exports.removeAllCollectibles(self, collectibleType, cap)
|
|
180
181
|
return removeAllPickups(nil, 100, collectibleType, cap)
|
|
@@ -6,8 +6,8 @@ local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
|
6
6
|
local ____exports = {}
|
|
7
7
|
local ____cachedClasses = require("cachedClasses")
|
|
8
8
|
local game = ____cachedClasses.game
|
|
9
|
-
local
|
|
10
|
-
local
|
|
9
|
+
local ____storyBossesSet = require("sets.storyBossesSet")
|
|
10
|
+
local STORY_BOSSES_SET = ____storyBossesSet.STORY_BOSSES_SET
|
|
11
11
|
local ____random = require("functions.random")
|
|
12
12
|
local getRandom = ____random.getRandom
|
|
13
13
|
local nextSeed = ____random.nextSeed
|
|
@@ -106,7 +106,7 @@ function ____exports.isEntityMoving(self, entity, threshold)
|
|
|
106
106
|
return entity.Velocity:Length() >= threshold
|
|
107
107
|
end
|
|
108
108
|
function ____exports.isStoryBoss(self, entity)
|
|
109
|
-
return
|
|
109
|
+
return STORY_BOSSES_SET:has(entity.Type)
|
|
110
110
|
end
|
|
111
111
|
function ____exports.removeAllMatchingEntities(self, entityType, entityVariant, entitySubType, cap)
|
|
112
112
|
if entityVariant == nil then
|
|
@@ -4,8 +4,8 @@ local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
|
4
4
|
local ____exports = {}
|
|
5
5
|
local ____cachedClasses = require("cachedClasses")
|
|
6
6
|
local game = ____cachedClasses.game
|
|
7
|
-
local
|
|
8
|
-
local
|
|
7
|
+
local ____familiarsThatShootPlayerTearsSet = require("sets.familiarsThatShootPlayerTearsSet")
|
|
8
|
+
local FAMILIARS_THAT_SHOOT_PLAYER_TEARS_SET = ____familiarsThatShootPlayerTearsSet.FAMILIARS_THAT_SHOOT_PLAYER_TEARS_SET
|
|
9
9
|
local ____array = require("functions.array")
|
|
10
10
|
local copyArray = ____array.copyArray
|
|
11
11
|
local ____entity = require("functions.entity")
|
|
@@ -86,7 +86,7 @@ function ____exports.checkFamiliarFromCollectibles(self, player, collectibleType
|
|
|
86
86
|
)
|
|
87
87
|
end
|
|
88
88
|
function ____exports.isFamiliarThatShootsPlayerTears(self, familiar)
|
|
89
|
-
return
|
|
89
|
+
return FAMILIARS_THAT_SHOOT_PLAYER_TEARS_SET:has(familiar.Type)
|
|
90
90
|
end
|
|
91
91
|
function ____exports.removeAllFamiliars(self, variant, subType, cap)
|
|
92
92
|
local familiars = ____exports.getFamiliars(nil, variant, subType)
|
|
@@ -17,7 +17,7 @@ local FLYING_CHARACTERS = __TS__New(Set, {
|
|
|
17
17
|
PlayerType.PLAYER_THESOUL_B
|
|
18
18
|
})
|
|
19
19
|
local FLYING_TRINKETS = __TS__New(Set, {TrinketType.TRINKET_BAT_WING, TrinketType.TRINKET_AZAZELS_STUMP})
|
|
20
|
-
local FLYING_NULL_ITEMS = {
|
|
20
|
+
local FLYING_NULL_ITEMS = {66, 101, 112}
|
|
21
21
|
function ____exports.getFlyingCollectibles(self, pruneConditionalItems)
|
|
22
22
|
local collectiblesWithFlyingCacheFlag = getCollectiblesForCacheFlag(nil, CacheFlag.CACHE_FLYING)
|
|
23
23
|
local collectiblesWithAllCacheFlag = getCollectiblesForCacheFlag(nil, CacheFlag.CACHE_ALL)
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
+
export declare function getCoins(matchingSubType?: number): EntityPickup[];
|
|
3
|
+
export declare function getHearts(matchingSubType?: number): EntityPickup[];
|
|
4
|
+
export declare function getKeys(matchingSubType?: number): EntityPickup[];
|
|
2
5
|
/**
|
|
3
6
|
* Helper function to get all of the pickups in the room.
|
|
4
7
|
*
|
|
@@ -11,7 +14,9 @@
|
|
|
11
14
|
* ```
|
|
12
15
|
*/
|
|
13
16
|
export declare function getPickups(matchingVariant?: PickupVariant | int, matchingSubType?: number): EntityPickup[];
|
|
17
|
+
export declare function getRedHearts(): EntityPickup[];
|
|
14
18
|
export declare function isChest(pickup: EntityPickup): boolean;
|
|
19
|
+
export declare function isRedHeart(pickup: EntityPickup): boolean;
|
|
15
20
|
/**
|
|
16
21
|
* Helper function to remove all of the pickups in the room.
|
|
17
22
|
*
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
2
|
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
3
|
+
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
3
4
|
local ____exports = {}
|
|
4
|
-
local
|
|
5
|
-
local CHEST_PICKUP_VARIANTS =
|
|
5
|
+
local ____chestPickupVariantsSet = require("sets.chestPickupVariantsSet")
|
|
6
|
+
local CHEST_PICKUP_VARIANTS = ____chestPickupVariantsSet.CHEST_PICKUP_VARIANTS
|
|
7
|
+
local ____redHeartSubTypesSet = require("sets.redHeartSubTypesSet")
|
|
8
|
+
local RED_HEART_SUB_TYPES_SET = ____redHeartSubTypesSet.RED_HEART_SUB_TYPES_SET
|
|
6
9
|
local ____entity = require("functions.entity")
|
|
7
10
|
local getEntities = ____entity.getEntities
|
|
8
11
|
local removeEntities = ____entity.removeEntities
|
|
@@ -23,9 +26,37 @@ function ____exports.getPickups(self, matchingVariant, matchingSubType)
|
|
|
23
26
|
end
|
|
24
27
|
return pickups
|
|
25
28
|
end
|
|
29
|
+
function ____exports.getCoins(self, matchingSubType)
|
|
30
|
+
if matchingSubType == nil then
|
|
31
|
+
matchingSubType = -1
|
|
32
|
+
end
|
|
33
|
+
return ____exports.getPickups(nil, 20, matchingSubType)
|
|
34
|
+
end
|
|
35
|
+
function ____exports.getHearts(self, matchingSubType)
|
|
36
|
+
if matchingSubType == nil then
|
|
37
|
+
matchingSubType = -1
|
|
38
|
+
end
|
|
39
|
+
return ____exports.getPickups(nil, 10, matchingSubType)
|
|
40
|
+
end
|
|
41
|
+
function ____exports.getKeys(self, matchingSubType)
|
|
42
|
+
if matchingSubType == nil then
|
|
43
|
+
matchingSubType = -1
|
|
44
|
+
end
|
|
45
|
+
return ____exports.getPickups(nil, 30, matchingSubType)
|
|
46
|
+
end
|
|
47
|
+
function ____exports.getRedHearts(self)
|
|
48
|
+
local hearts = ____exports.getHearts(nil)
|
|
49
|
+
return __TS__ArrayFilter(
|
|
50
|
+
hearts,
|
|
51
|
+
function(____, heart) return RED_HEART_SUB_TYPES_SET:has(heart.SubType) end
|
|
52
|
+
)
|
|
53
|
+
end
|
|
26
54
|
function ____exports.isChest(self, pickup)
|
|
27
55
|
return CHEST_PICKUP_VARIANTS:has(pickup.Variant)
|
|
28
56
|
end
|
|
57
|
+
function ____exports.isRedHeart(self, pickup)
|
|
58
|
+
return pickup.Variant == 10 and RED_HEART_SUB_TYPES_SET:has(pickup.SubType)
|
|
59
|
+
end
|
|
29
60
|
function ____exports.removeAllPickups(self, variant, subType, cap)
|
|
30
61
|
local pickups = ____exports.getPickups(nil, variant, subType)
|
|
31
62
|
return removeEntities(nil, pickups, cap)
|