isaacscript-common 6.6.5 → 6.8.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.lua +5 -5
- 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/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 +7 -7
- 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/{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 +14 -6
- package/dist/functions/log.d.ts.map +1 -1
- package/dist/functions/log.lua +201 -163
- 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/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 +1 -1
- package/src/callbacks/postCustomDoorEnter.ts +2 -2
- 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 +1 -1
- 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/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/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 +5 -5
- package/src/features/extraConsoleCommands/listCommands.ts +10 -6
- package/src/features/pause.ts +1 -1
- package/src/features/persistentEntities.ts +1 -1
- 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/{boss.ts → bosses.ts} +29 -21
- package/src/functions/collectibleTag.ts +1 -1
- package/src/functions/collectibles.ts +2 -2
- 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 +227 -181
- 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/transformations.ts +1 -1
- package/src/functions/trinketGive.ts +1 -1
- package/src/functions/trinkets.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
|
@@ -1,133 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
/** Helper function to get all of the battery entities in the room. */
|
|
3
|
-
export declare function getBatteries(matchingSubType?: BatterySubType | -1): EntityPickupBattery[];
|
|
4
|
-
/** Helper function to get all of the card entities in the room. */
|
|
5
|
-
export declare function getCards(matchingSubType?: Card | -1): EntityPickupCard[];
|
|
1
|
+
import { CoinSubType } from "isaac-typescript-definitions";
|
|
6
2
|
/**
|
|
7
3
|
* Helper function to get the corresponding coin amount from a `CoinSubType`. Returns 1 for modded
|
|
8
4
|
* sub-types.
|
|
9
5
|
*/
|
|
10
6
|
export declare function getCoinValue(coinSubType: CoinSubType): int;
|
|
11
|
-
/** Helper function to get all of the coin pickup entities in the room. */
|
|
12
|
-
export declare function getCoins(matchingSubType?: CoinSubType | -1): EntityPickupCoin[];
|
|
13
|
-
/** Helper function to get all of the collectible entities in the room. */
|
|
14
|
-
export declare function getCollectibles(matchingSubType?: CollectibleType | -1): EntityPickupCollectible[];
|
|
15
|
-
/** Helper function to get all of the heart pickup entities in the room. */
|
|
16
|
-
export declare function getHearts(matchingSubType?: HeartSubType | -1): EntityPickupHeart[];
|
|
17
|
-
/** Helper function to get all of the key pickup entities in the room. */
|
|
18
|
-
export declare function getKeys(matchingSubType?: KeySubType | -1): EntityPickupKey[];
|
|
19
|
-
/** Helper function to get all of the pill entities in the room. */
|
|
20
|
-
export declare function getPills(matchingSubType?: PillColor | -1): EntityPickupPill[];
|
|
21
7
|
/** Helper function to get all of the red heart pickup entities in the room. */
|
|
22
8
|
export declare function getRedHearts(): EntityPickupHeart[];
|
|
23
|
-
/** Helper function to get all of the sack (i.e. grab bag) entities in the room. */
|
|
24
|
-
export declare function getSacks(matchingSubType?: SackSubType | -1): EntityPickupSack[];
|
|
25
|
-
/** Helper function to get all of the trinket entities in the room. */
|
|
26
|
-
export declare function getTrinkets(matchingSubType?: TrinketType | -1): EntityPickupTrinket[];
|
|
27
9
|
export declare function isChest(pickup: EntityPickup): boolean;
|
|
28
10
|
export declare function isRedHeart(pickup: EntityPickup): boolean;
|
|
29
11
|
/**
|
|
30
|
-
* Helper function to remove all of the
|
|
12
|
+
* Helper function to remove all of the red heart pickup entities in the room.
|
|
31
13
|
*
|
|
32
|
-
* @param batterySubType Optional. If specified, will only remove cards that match this sub-type.
|
|
33
|
-
* @param cap Optional. If specified, will only remove the given amount of cards.
|
|
34
|
-
* @returns True if one or more cards were removed, false otherwise.
|
|
35
|
-
*/
|
|
36
|
-
export declare function removeAllBatteries(batterySubType?: BatterySubType, cap?: int): EntityPickupBattery[];
|
|
37
|
-
/**
|
|
38
|
-
* Helper function to remove all of the cards in the room.
|
|
39
|
-
*
|
|
40
|
-
* @param card Optional. If specified, will only remove cards that match this sub-type.
|
|
41
|
-
* @param cap Optional. If specified, will only remove the given amount of cards.
|
|
42
|
-
* @returns True if one or more cards were removed, false otherwise.
|
|
43
|
-
*/
|
|
44
|
-
export declare function removeAllCards(card?: Card, cap?: int): EntityPickupCard[];
|
|
45
|
-
/**
|
|
46
|
-
* Helper function to remove all of the coins in the room.
|
|
47
|
-
*
|
|
48
|
-
* @param coinSubType Optional. If specified, will only remove coins that match this sub-type.
|
|
49
|
-
* @param cap Optional. If specified, will only remove the given amount of coins.
|
|
50
|
-
* @returns True if one or more coins were removed, false otherwise.
|
|
51
|
-
*/
|
|
52
|
-
export declare function removeAllCoins(coinSubType?: CoinSubType, cap?: int): EntityPickupCoin[];
|
|
53
|
-
/**
|
|
54
|
-
* Helper function to remove all of the collectibles in the room.
|
|
55
|
-
*
|
|
56
|
-
* @param collectibleType Optional. If specified, will only remove collectibles that match this
|
|
57
|
-
* collectible type.
|
|
58
|
-
* @param cap Optional. If specified, will only remove the given amount of collectibles.
|
|
59
|
-
* @returns True if one or more collectibles were removed, false otherwise.
|
|
60
|
-
*/
|
|
61
|
-
export declare function removeAllCollectibles(collectibleType?: CollectibleType, cap?: int): EntityPickupCollectible[];
|
|
62
|
-
/**
|
|
63
|
-
* Helper function to remove all of the hearts in the room.
|
|
64
|
-
*
|
|
65
|
-
* @param heartSubType Optional. If specified, will only remove hearts that match this sub-type.
|
|
66
14
|
* @param cap Optional. If specified, will only remove the given amount of hearts.
|
|
67
|
-
* @returns
|
|
68
|
-
*/
|
|
69
|
-
export declare function removeAllHearts(heartSubType?: HeartSubType, cap?: int): EntityPickupHeart[];
|
|
70
|
-
/**
|
|
71
|
-
* Helper function to remove all of the keys in the room.
|
|
72
|
-
*
|
|
73
|
-
* @param keySubType Optional. If specified, will only remove keys that match this sub-type.
|
|
74
|
-
* @param cap Optional. If specified, will only remove the given amount of keys.
|
|
75
|
-
* @returns True if one or more keys were removed, false otherwise.
|
|
76
|
-
*/
|
|
77
|
-
export declare function removeAllKeys(keySubType?: KeySubType, cap?: int): EntityPickupKey[];
|
|
78
|
-
/**
|
|
79
|
-
* Helper function to remove all of the pills in the room.
|
|
80
|
-
*
|
|
81
|
-
* @param pillColor Optional. If specified, will only remove pills that match this color.
|
|
82
|
-
* @param cap Optional. If specified, will only remove the given amount of pills.
|
|
83
|
-
* @returns True if one or more pills were removed, false otherwise.
|
|
84
|
-
*/
|
|
85
|
-
export declare function removeAllPills(pillColor?: PillColor, cap?: int): EntityPickupPill[];
|
|
86
|
-
/**
|
|
87
|
-
* Helper function to remove all of the sacks (i.e. grab bags) in the room.
|
|
88
|
-
*
|
|
89
|
-
* @param sackSubType Optional. If specified, will only remove sacks that match this sub-type.
|
|
90
|
-
* @param cap Optional. If specified, will only remove the given amount of trinkets.
|
|
91
|
-
* @returns True if one or more trinkets were removed, false otherwise.
|
|
92
|
-
*/
|
|
93
|
-
export declare function removeAllSacks(sackSubType?: SackSubType, cap?: int): EntityPickupSack[];
|
|
94
|
-
/**
|
|
95
|
-
* Helper function to remove all of the trinkets in the room.
|
|
96
|
-
*
|
|
97
|
-
* @param trinketType Optional. If specified, will only remove trinkets that match this trinket
|
|
98
|
-
* type.
|
|
99
|
-
* @param cap Optional. If specified, will only remove the given amount of trinkets.
|
|
100
|
-
* @returns True if one or more trinkets were removed, false otherwise.
|
|
101
|
-
*/
|
|
102
|
-
export declare function removeAllTrinkets(trinketType?: TrinketType, cap?: int): EntityPickupTrinket[];
|
|
103
|
-
/**
|
|
104
|
-
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.LIL_BATTERY` (90).
|
|
105
|
-
*/
|
|
106
|
-
export declare function spawnBattery(subType: BatterySubType, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupBattery;
|
|
107
|
-
export declare function spawnBatteryWithSeed(subType: BatterySubType, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupBattery;
|
|
108
|
-
/**
|
|
109
|
-
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TAROT_CARD` (300).
|
|
110
|
-
*/
|
|
111
|
-
export declare function spawnCard(subType: Card, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupCard;
|
|
112
|
-
export declare function spawnCardWithSeed(subType: Card, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupCard;
|
|
113
|
-
/** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.COIN` (20). */
|
|
114
|
-
export declare function spawnCoin(subType: CoinSubType, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupCoin;
|
|
115
|
-
export declare function spawnCoinWithSeed(subType: CoinSubType, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupCoin;
|
|
116
|
-
/** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.HEART` (10). */
|
|
117
|
-
export declare function spawnHeart(subType: HeartSubType, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupHeart;
|
|
118
|
-
export declare function spawnHeartWithSeed(subType: HeartSubType, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupHeart;
|
|
119
|
-
/** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.KEY` (30). */
|
|
120
|
-
export declare function spawnKey(subType: KeySubType, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupKey;
|
|
121
|
-
export declare function spawnKeyWithSeed(subType: KeySubType, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupKey;
|
|
122
|
-
/** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.PILL` (70). */
|
|
123
|
-
export declare function spawnPill(pillColor: PillColor, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupPill;
|
|
124
|
-
export declare function spawnPillWithSeed(subType: PillColor, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupPill;
|
|
125
|
-
/** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.SACK` (69). */
|
|
126
|
-
export declare function spawnSack(subType: SackSubType, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupSack;
|
|
127
|
-
export declare function spawnSackWithSeed(subType: SackSubType, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupSack;
|
|
128
|
-
/**
|
|
129
|
-
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TRINKET` (350).
|
|
15
|
+
* @returns The red hearts that were removed.
|
|
130
16
|
*/
|
|
131
|
-
export declare function
|
|
132
|
-
export declare function spawnTrinketWithSeed(subType: TrinketType, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupTrinket;
|
|
17
|
+
export declare function removeAllRedHearts(cap?: int): EntityPickupHeart[];
|
|
133
18
|
//# sourceMappingURL=pickups.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pickups.d.ts","sourceRoot":"","sources":["../../src/functions/pickups.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"pickups.d.ts","sourceRoot":"","sources":["../../src/functions/pickups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAW3D;;;GAGG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,WAAW,GAAG,GAAG,CAK1D;AAED,+EAA+E;AAC/E,wBAAgB,YAAY,IAAI,iBAAiB,EAAE,CAGlD;AAED,wBAAgB,OAAO,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAErD;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAExD;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,iBAAiB,EAAE,CAGjE"}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
2
|
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
3
3
|
local ____exports = {}
|
|
4
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
5
|
-
local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
|
|
6
|
-
local ____constants = require("constants")
|
|
7
|
-
local VectorZero = ____constants.VectorZero
|
|
8
4
|
local ____coinSubTypeToValue = require("objects.coinSubTypeToValue")
|
|
9
5
|
local COIN_SUBTYPE_TO_VALUE = ____coinSubTypeToValue.COIN_SUBTYPE_TO_VALUE
|
|
10
6
|
local DEFAULT_COIN_VALUE = ____coinSubTypeToValue.DEFAULT_COIN_VALUE
|
|
@@ -12,463 +8,38 @@ local ____chestPickupVariantsSet = require("sets.chestPickupVariantsSet")
|
|
|
12
8
|
local CHEST_PICKUP_VARIANTS = ____chestPickupVariantsSet.CHEST_PICKUP_VARIANTS
|
|
13
9
|
local ____redHeartSubTypesSet = require("sets.redHeartSubTypesSet")
|
|
14
10
|
local RED_HEART_SUB_TYPES_SET = ____redHeartSubTypesSet.RED_HEART_SUB_TYPES_SET
|
|
15
|
-
local
|
|
16
|
-
local
|
|
17
|
-
local
|
|
18
|
-
local
|
|
11
|
+
local ____entities = require("functions.entities")
|
|
12
|
+
local removeEntities = ____entities.removeEntities
|
|
13
|
+
local ____pickupsSpecific = require("functions.pickupsSpecific")
|
|
14
|
+
local getHearts = ____pickupsSpecific.getHearts
|
|
19
15
|
local ____pickupVariants = require("functions.pickupVariants")
|
|
20
16
|
local isHeart = ____pickupVariants.isHeart
|
|
21
|
-
--- Helper function to get all of the battery entities in the room.
|
|
22
|
-
function ____exports.getBatteries(self, matchingSubType)
|
|
23
|
-
if matchingSubType == nil then
|
|
24
|
-
matchingSubType = -1
|
|
25
|
-
end
|
|
26
|
-
return getPickups(nil, PickupVariant.LIL_BATTERY, matchingSubType)
|
|
27
|
-
end
|
|
28
|
-
--- Helper function to get all of the card entities in the room.
|
|
29
|
-
function ____exports.getCards(self, matchingSubType)
|
|
30
|
-
if matchingSubType == nil then
|
|
31
|
-
matchingSubType = -1
|
|
32
|
-
end
|
|
33
|
-
return getPickups(nil, PickupVariant.TAROT_CARD, matchingSubType)
|
|
34
|
-
end
|
|
35
17
|
--- Helper function to get the corresponding coin amount from a `CoinSubType`. Returns 1 for modded
|
|
36
18
|
-- sub-types.
|
|
37
19
|
function ____exports.getCoinValue(self, coinSubType)
|
|
38
20
|
local value = COIN_SUBTYPE_TO_VALUE[coinSubType]
|
|
39
21
|
return value == nil and DEFAULT_COIN_VALUE or value
|
|
40
22
|
end
|
|
41
|
-
--- Helper function to get all of the coin pickup entities in the room.
|
|
42
|
-
function ____exports.getCoins(self, matchingSubType)
|
|
43
|
-
if matchingSubType == nil then
|
|
44
|
-
matchingSubType = -1
|
|
45
|
-
end
|
|
46
|
-
return getPickups(nil, PickupVariant.COIN, matchingSubType)
|
|
47
|
-
end
|
|
48
|
-
--- Helper function to get all of the collectible entities in the room.
|
|
49
|
-
function ____exports.getCollectibles(self, matchingSubType)
|
|
50
|
-
if matchingSubType == nil then
|
|
51
|
-
matchingSubType = -1
|
|
52
|
-
end
|
|
53
|
-
return getPickups(nil, PickupVariant.COLLECTIBLE, matchingSubType)
|
|
54
|
-
end
|
|
55
|
-
--- Helper function to get all of the heart pickup entities in the room.
|
|
56
|
-
function ____exports.getHearts(self, matchingSubType)
|
|
57
|
-
if matchingSubType == nil then
|
|
58
|
-
matchingSubType = -1
|
|
59
|
-
end
|
|
60
|
-
return getPickups(nil, PickupVariant.HEART, matchingSubType)
|
|
61
|
-
end
|
|
62
|
-
--- Helper function to get all of the key pickup entities in the room.
|
|
63
|
-
function ____exports.getKeys(self, matchingSubType)
|
|
64
|
-
if matchingSubType == nil then
|
|
65
|
-
matchingSubType = -1
|
|
66
|
-
end
|
|
67
|
-
return getPickups(nil, PickupVariant.KEY, matchingSubType)
|
|
68
|
-
end
|
|
69
|
-
--- Helper function to get all of the pill entities in the room.
|
|
70
|
-
function ____exports.getPills(self, matchingSubType)
|
|
71
|
-
if matchingSubType == nil then
|
|
72
|
-
matchingSubType = -1
|
|
73
|
-
end
|
|
74
|
-
return getPickups(nil, PickupVariant.PILL, matchingSubType)
|
|
75
|
-
end
|
|
76
23
|
--- Helper function to get all of the red heart pickup entities in the room.
|
|
77
24
|
function ____exports.getRedHearts(self)
|
|
78
|
-
local hearts =
|
|
25
|
+
local hearts = getHearts(nil)
|
|
79
26
|
return __TS__ArrayFilter(
|
|
80
27
|
hearts,
|
|
81
28
|
function(____, heart) return RED_HEART_SUB_TYPES_SET:has(heart.SubType) end
|
|
82
29
|
)
|
|
83
30
|
end
|
|
84
|
-
--- Helper function to get all of the sack (i.e. grab bag) entities in the room.
|
|
85
|
-
function ____exports.getSacks(self, matchingSubType)
|
|
86
|
-
if matchingSubType == nil then
|
|
87
|
-
matchingSubType = -1
|
|
88
|
-
end
|
|
89
|
-
return getPickups(nil, PickupVariant.SACK, matchingSubType)
|
|
90
|
-
end
|
|
91
|
-
--- Helper function to get all of the trinket entities in the room.
|
|
92
|
-
function ____exports.getTrinkets(self, matchingSubType)
|
|
93
|
-
if matchingSubType == nil then
|
|
94
|
-
matchingSubType = -1
|
|
95
|
-
end
|
|
96
|
-
return getPickups(nil, PickupVariant.TRINKET, matchingSubType)
|
|
97
|
-
end
|
|
98
31
|
function ____exports.isChest(self, pickup)
|
|
99
32
|
return CHEST_PICKUP_VARIANTS:has(pickup.Variant)
|
|
100
33
|
end
|
|
101
34
|
function ____exports.isRedHeart(self, pickup)
|
|
102
35
|
return isHeart(nil, pickup) and RED_HEART_SUB_TYPES_SET:has(pickup.SubType)
|
|
103
36
|
end
|
|
104
|
-
--- Helper function to remove all of the
|
|
105
|
-
--
|
|
106
|
-
-- @param batterySubType Optional. If specified, will only remove cards that match this sub-type.
|
|
107
|
-
-- @param cap Optional. If specified, will only remove the given amount of cards.
|
|
108
|
-
-- @returns True if one or more cards were removed, false otherwise.
|
|
109
|
-
function ____exports.removeAllBatteries(self, batterySubType, cap)
|
|
110
|
-
return removeAllPickups(nil, PickupVariant.LIL_BATTERY, batterySubType, cap)
|
|
111
|
-
end
|
|
112
|
-
--- Helper function to remove all of the cards in the room.
|
|
113
|
-
--
|
|
114
|
-
-- @param card Optional. If specified, will only remove cards that match this sub-type.
|
|
115
|
-
-- @param cap Optional. If specified, will only remove the given amount of cards.
|
|
116
|
-
-- @returns True if one or more cards were removed, false otherwise.
|
|
117
|
-
function ____exports.removeAllCards(self, card, cap)
|
|
118
|
-
return removeAllPickups(nil, PickupVariant.TAROT_CARD, card, cap)
|
|
119
|
-
end
|
|
120
|
-
--- Helper function to remove all of the coins in the room.
|
|
121
|
-
--
|
|
122
|
-
-- @param coinSubType Optional. If specified, will only remove coins that match this sub-type.
|
|
123
|
-
-- @param cap Optional. If specified, will only remove the given amount of coins.
|
|
124
|
-
-- @returns True if one or more coins were removed, false otherwise.
|
|
125
|
-
function ____exports.removeAllCoins(self, coinSubType, cap)
|
|
126
|
-
return removeAllPickups(nil, PickupVariant.COIN, coinSubType, cap)
|
|
127
|
-
end
|
|
128
|
-
--- Helper function to remove all of the collectibles in the room.
|
|
37
|
+
--- Helper function to remove all of the red heart pickup entities in the room.
|
|
129
38
|
--
|
|
130
|
-
-- @param collectibleType Optional. If specified, will only remove collectibles that match this
|
|
131
|
-
-- collectible type.
|
|
132
|
-
-- @param cap Optional. If specified, will only remove the given amount of collectibles.
|
|
133
|
-
-- @returns True if one or more collectibles were removed, false otherwise.
|
|
134
|
-
function ____exports.removeAllCollectibles(self, collectibleType, cap)
|
|
135
|
-
return removeAllPickups(nil, PickupVariant.COLLECTIBLE, collectibleType, cap)
|
|
136
|
-
end
|
|
137
|
-
--- Helper function to remove all of the hearts in the room.
|
|
138
|
-
--
|
|
139
|
-
-- @param heartSubType Optional. If specified, will only remove hearts that match this sub-type.
|
|
140
39
|
-- @param cap Optional. If specified, will only remove the given amount of hearts.
|
|
141
|
-
-- @returns
|
|
142
|
-
function ____exports.
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
--- Helper function to remove all of the keys in the room.
|
|
146
|
-
--
|
|
147
|
-
-- @param keySubType Optional. If specified, will only remove keys that match this sub-type.
|
|
148
|
-
-- @param cap Optional. If specified, will only remove the given amount of keys.
|
|
149
|
-
-- @returns True if one or more keys were removed, false otherwise.
|
|
150
|
-
function ____exports.removeAllKeys(self, keySubType, cap)
|
|
151
|
-
return removeAllPickups(nil, PickupVariant.KEY, keySubType, cap)
|
|
152
|
-
end
|
|
153
|
-
--- Helper function to remove all of the pills in the room.
|
|
154
|
-
--
|
|
155
|
-
-- @param pillColor Optional. If specified, will only remove pills that match this color.
|
|
156
|
-
-- @param cap Optional. If specified, will only remove the given amount of pills.
|
|
157
|
-
-- @returns True if one or more pills were removed, false otherwise.
|
|
158
|
-
function ____exports.removeAllPills(self, pillColor, cap)
|
|
159
|
-
return removeAllPickups(nil, PickupVariant.PILL, pillColor, cap)
|
|
160
|
-
end
|
|
161
|
-
--- Helper function to remove all of the sacks (i.e. grab bags) in the room.
|
|
162
|
-
--
|
|
163
|
-
-- @param sackSubType Optional. If specified, will only remove sacks that match this sub-type.
|
|
164
|
-
-- @param cap Optional. If specified, will only remove the given amount of trinkets.
|
|
165
|
-
-- @returns True if one or more trinkets were removed, false otherwise.
|
|
166
|
-
function ____exports.removeAllSacks(self, sackSubType, cap)
|
|
167
|
-
return removeAllPickups(nil, PickupVariant.TRINKET, sackSubType, cap)
|
|
168
|
-
end
|
|
169
|
-
--- Helper function to remove all of the trinkets in the room.
|
|
170
|
-
--
|
|
171
|
-
-- @param trinketType Optional. If specified, will only remove trinkets that match this trinket
|
|
172
|
-
-- type.
|
|
173
|
-
-- @param cap Optional. If specified, will only remove the given amount of trinkets.
|
|
174
|
-
-- @returns True if one or more trinkets were removed, false otherwise.
|
|
175
|
-
function ____exports.removeAllTrinkets(self, trinketType, cap)
|
|
176
|
-
return removeAllPickups(nil, PickupVariant.TRINKET, trinketType, cap)
|
|
177
|
-
end
|
|
178
|
-
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.LIL_BATTERY` (90).
|
|
179
|
-
function ____exports.spawnBattery(self, subType, position, velocity, spawner, seedOrRNG)
|
|
180
|
-
if velocity == nil then
|
|
181
|
-
velocity = VectorZero
|
|
182
|
-
end
|
|
183
|
-
if spawner == nil then
|
|
184
|
-
spawner = nil
|
|
185
|
-
end
|
|
186
|
-
if seedOrRNG == nil then
|
|
187
|
-
seedOrRNG = nil
|
|
188
|
-
end
|
|
189
|
-
return spawnPickup(
|
|
190
|
-
nil,
|
|
191
|
-
PickupVariant.LIL_BATTERY,
|
|
192
|
-
subType,
|
|
193
|
-
position,
|
|
194
|
-
velocity,
|
|
195
|
-
spawner,
|
|
196
|
-
seedOrRNG
|
|
197
|
-
)
|
|
198
|
-
end
|
|
199
|
-
function ____exports.spawnBatteryWithSeed(self, subType, position, seedOrRNG, velocity, spawner)
|
|
200
|
-
if velocity == nil then
|
|
201
|
-
velocity = VectorZero
|
|
202
|
-
end
|
|
203
|
-
if spawner == nil then
|
|
204
|
-
spawner = nil
|
|
205
|
-
end
|
|
206
|
-
return ____exports.spawnBattery(
|
|
207
|
-
nil,
|
|
208
|
-
subType,
|
|
209
|
-
position,
|
|
210
|
-
velocity,
|
|
211
|
-
spawner,
|
|
212
|
-
seedOrRNG
|
|
213
|
-
)
|
|
214
|
-
end
|
|
215
|
-
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TAROT_CARD` (300).
|
|
216
|
-
function ____exports.spawnCard(self, subType, position, velocity, spawner, seedOrRNG)
|
|
217
|
-
if velocity == nil then
|
|
218
|
-
velocity = VectorZero
|
|
219
|
-
end
|
|
220
|
-
if spawner == nil then
|
|
221
|
-
spawner = nil
|
|
222
|
-
end
|
|
223
|
-
if seedOrRNG == nil then
|
|
224
|
-
seedOrRNG = nil
|
|
225
|
-
end
|
|
226
|
-
return spawnPickup(
|
|
227
|
-
nil,
|
|
228
|
-
PickupVariant.TAROT_CARD,
|
|
229
|
-
subType,
|
|
230
|
-
position,
|
|
231
|
-
velocity,
|
|
232
|
-
spawner,
|
|
233
|
-
seedOrRNG
|
|
234
|
-
)
|
|
235
|
-
end
|
|
236
|
-
function ____exports.spawnCardWithSeed(self, subType, position, seedOrRNG, velocity, spawner)
|
|
237
|
-
if velocity == nil then
|
|
238
|
-
velocity = VectorZero
|
|
239
|
-
end
|
|
240
|
-
if spawner == nil then
|
|
241
|
-
spawner = nil
|
|
242
|
-
end
|
|
243
|
-
return ____exports.spawnCard(
|
|
244
|
-
nil,
|
|
245
|
-
subType,
|
|
246
|
-
position,
|
|
247
|
-
velocity,
|
|
248
|
-
spawner,
|
|
249
|
-
seedOrRNG
|
|
250
|
-
)
|
|
251
|
-
end
|
|
252
|
-
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.COIN` (20).
|
|
253
|
-
function ____exports.spawnCoin(self, subType, position, velocity, spawner, seedOrRNG)
|
|
254
|
-
if velocity == nil then
|
|
255
|
-
velocity = VectorZero
|
|
256
|
-
end
|
|
257
|
-
if spawner == nil then
|
|
258
|
-
spawner = nil
|
|
259
|
-
end
|
|
260
|
-
if seedOrRNG == nil then
|
|
261
|
-
seedOrRNG = nil
|
|
262
|
-
end
|
|
263
|
-
return spawnPickup(
|
|
264
|
-
nil,
|
|
265
|
-
PickupVariant.COIN,
|
|
266
|
-
subType,
|
|
267
|
-
position,
|
|
268
|
-
velocity,
|
|
269
|
-
spawner,
|
|
270
|
-
seedOrRNG
|
|
271
|
-
)
|
|
272
|
-
end
|
|
273
|
-
function ____exports.spawnCoinWithSeed(self, subType, 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.spawnCoin(
|
|
281
|
-
nil,
|
|
282
|
-
subType,
|
|
283
|
-
position,
|
|
284
|
-
velocity,
|
|
285
|
-
spawner,
|
|
286
|
-
seedOrRNG
|
|
287
|
-
)
|
|
288
|
-
end
|
|
289
|
-
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.HEART` (10).
|
|
290
|
-
function ____exports.spawnHeart(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.HEART,
|
|
303
|
-
subType,
|
|
304
|
-
position,
|
|
305
|
-
velocity,
|
|
306
|
-
spawner,
|
|
307
|
-
seedOrRNG
|
|
308
|
-
)
|
|
309
|
-
end
|
|
310
|
-
function ____exports.spawnHeartWithSeed(self, subType, position, seedOrRNG, velocity, spawner)
|
|
311
|
-
if velocity == nil then
|
|
312
|
-
velocity = VectorZero
|
|
313
|
-
end
|
|
314
|
-
if spawner == nil then
|
|
315
|
-
spawner = nil
|
|
316
|
-
end
|
|
317
|
-
return ____exports.spawnHeart(
|
|
318
|
-
nil,
|
|
319
|
-
subType,
|
|
320
|
-
position,
|
|
321
|
-
velocity,
|
|
322
|
-
spawner,
|
|
323
|
-
seedOrRNG
|
|
324
|
-
)
|
|
325
|
-
end
|
|
326
|
-
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.KEY` (30).
|
|
327
|
-
function ____exports.spawnKey(self, subType, position, velocity, spawner, seedOrRNG)
|
|
328
|
-
if velocity == nil then
|
|
329
|
-
velocity = VectorZero
|
|
330
|
-
end
|
|
331
|
-
if spawner == nil then
|
|
332
|
-
spawner = nil
|
|
333
|
-
end
|
|
334
|
-
if seedOrRNG == nil then
|
|
335
|
-
seedOrRNG = nil
|
|
336
|
-
end
|
|
337
|
-
return spawnPickup(
|
|
338
|
-
nil,
|
|
339
|
-
PickupVariant.KEY,
|
|
340
|
-
subType,
|
|
341
|
-
position,
|
|
342
|
-
velocity,
|
|
343
|
-
spawner,
|
|
344
|
-
seedOrRNG
|
|
345
|
-
)
|
|
346
|
-
end
|
|
347
|
-
function ____exports.spawnKeyWithSeed(self, subType, position, seedOrRNG, velocity, spawner)
|
|
348
|
-
if velocity == nil then
|
|
349
|
-
velocity = VectorZero
|
|
350
|
-
end
|
|
351
|
-
if spawner == nil then
|
|
352
|
-
spawner = nil
|
|
353
|
-
end
|
|
354
|
-
return ____exports.spawnKey(
|
|
355
|
-
nil,
|
|
356
|
-
subType,
|
|
357
|
-
position,
|
|
358
|
-
velocity,
|
|
359
|
-
spawner,
|
|
360
|
-
seedOrRNG
|
|
361
|
-
)
|
|
362
|
-
end
|
|
363
|
-
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.PILL` (70).
|
|
364
|
-
function ____exports.spawnPill(self, pillColor, position, velocity, spawner, seedOrRNG)
|
|
365
|
-
if velocity == nil then
|
|
366
|
-
velocity = VectorZero
|
|
367
|
-
end
|
|
368
|
-
if spawner == nil then
|
|
369
|
-
spawner = nil
|
|
370
|
-
end
|
|
371
|
-
if seedOrRNG == nil then
|
|
372
|
-
seedOrRNG = nil
|
|
373
|
-
end
|
|
374
|
-
return spawnPickup(
|
|
375
|
-
nil,
|
|
376
|
-
PickupVariant.PILL,
|
|
377
|
-
pillColor,
|
|
378
|
-
position,
|
|
379
|
-
velocity,
|
|
380
|
-
spawner,
|
|
381
|
-
seedOrRNG
|
|
382
|
-
)
|
|
383
|
-
end
|
|
384
|
-
function ____exports.spawnPillWithSeed(self, subType, position, seedOrRNG, velocity, spawner)
|
|
385
|
-
if velocity == nil then
|
|
386
|
-
velocity = VectorZero
|
|
387
|
-
end
|
|
388
|
-
if spawner == nil then
|
|
389
|
-
spawner = nil
|
|
390
|
-
end
|
|
391
|
-
return ____exports.spawnPill(
|
|
392
|
-
nil,
|
|
393
|
-
subType,
|
|
394
|
-
position,
|
|
395
|
-
velocity,
|
|
396
|
-
spawner,
|
|
397
|
-
seedOrRNG
|
|
398
|
-
)
|
|
399
|
-
end
|
|
400
|
-
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.SACK` (69).
|
|
401
|
-
function ____exports.spawnSack(self, subType, position, velocity, spawner, seedOrRNG)
|
|
402
|
-
if velocity == nil then
|
|
403
|
-
velocity = VectorZero
|
|
404
|
-
end
|
|
405
|
-
if spawner == nil then
|
|
406
|
-
spawner = nil
|
|
407
|
-
end
|
|
408
|
-
if seedOrRNG == nil then
|
|
409
|
-
seedOrRNG = nil
|
|
410
|
-
end
|
|
411
|
-
return spawnPickup(
|
|
412
|
-
nil,
|
|
413
|
-
PickupVariant.SACK,
|
|
414
|
-
subType,
|
|
415
|
-
position,
|
|
416
|
-
velocity,
|
|
417
|
-
spawner,
|
|
418
|
-
seedOrRNG
|
|
419
|
-
)
|
|
420
|
-
end
|
|
421
|
-
function ____exports.spawnSackWithSeed(self, subType, position, seedOrRNG, velocity, spawner)
|
|
422
|
-
if velocity == nil then
|
|
423
|
-
velocity = VectorZero
|
|
424
|
-
end
|
|
425
|
-
if spawner == nil then
|
|
426
|
-
spawner = nil
|
|
427
|
-
end
|
|
428
|
-
return ____exports.spawnSack(
|
|
429
|
-
nil,
|
|
430
|
-
subType,
|
|
431
|
-
position,
|
|
432
|
-
velocity,
|
|
433
|
-
spawner,
|
|
434
|
-
seedOrRNG
|
|
435
|
-
)
|
|
436
|
-
end
|
|
437
|
-
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TRINKET` (350).
|
|
438
|
-
function ____exports.spawnTrinket(self, subType, position, velocity, spawner, seedOrRNG)
|
|
439
|
-
if velocity == nil then
|
|
440
|
-
velocity = VectorZero
|
|
441
|
-
end
|
|
442
|
-
if spawner == nil then
|
|
443
|
-
spawner = nil
|
|
444
|
-
end
|
|
445
|
-
if seedOrRNG == nil then
|
|
446
|
-
seedOrRNG = nil
|
|
447
|
-
end
|
|
448
|
-
return spawnPickup(
|
|
449
|
-
nil,
|
|
450
|
-
PickupVariant.TRINKET,
|
|
451
|
-
subType,
|
|
452
|
-
position,
|
|
453
|
-
velocity,
|
|
454
|
-
spawner,
|
|
455
|
-
seedOrRNG
|
|
456
|
-
)
|
|
457
|
-
end
|
|
458
|
-
function ____exports.spawnTrinketWithSeed(self, subType, position, seedOrRNG, velocity, spawner)
|
|
459
|
-
if velocity == nil then
|
|
460
|
-
velocity = VectorZero
|
|
461
|
-
end
|
|
462
|
-
if spawner == nil then
|
|
463
|
-
spawner = nil
|
|
464
|
-
end
|
|
465
|
-
return ____exports.spawnTrinket(
|
|
466
|
-
nil,
|
|
467
|
-
subType,
|
|
468
|
-
position,
|
|
469
|
-
velocity,
|
|
470
|
-
spawner,
|
|
471
|
-
seedOrRNG
|
|
472
|
-
)
|
|
40
|
+
-- @returns The red hearts that were removed.
|
|
41
|
+
function ____exports.removeAllRedHearts(self, cap)
|
|
42
|
+
local redHearts = ____exports.getRedHearts(nil)
|
|
43
|
+
return removeEntities(nil, redHearts, cap)
|
|
473
44
|
end
|
|
474
45
|
return ____exports
|