isaacscript-common 2.0.18 → 2.0.21
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/features/extraConsoleCommands/init.lua +6 -0
- package/dist/functions/entityTypes.d.ts +1 -3
- package/dist/functions/entityTypes.lua +0 -3
- package/dist/functions/npc.lua +1 -3
- package/dist/functions/pickups.d.ts +26 -28
- package/dist/functions/pickups.lua +2 -2
- package/dist/initCustomCallbacks.lua +3 -0
- package/package.json +3 -3
|
@@ -191,6 +191,7 @@ commandFunctionsMap:set("pickupsdisplay", commandsDisplay.pickupsDisplay)
|
|
|
191
191
|
commandFunctionsMap:set("pill", commands.pill)
|
|
192
192
|
commandFunctionsMap:set("pills", commands.pills)
|
|
193
193
|
commandFunctionsMap:set("pitdisplay", commandsDisplay.pitDisplay)
|
|
194
|
+
commandFunctionsMap:set("pitsdisplay", commandsDisplay.pitsDisplay)
|
|
194
195
|
commandFunctionsMap:set("planetarium", commands.planetarium)
|
|
195
196
|
commandFunctionsMap:set("playerdisplay", commandsDisplay.playerDisplay)
|
|
196
197
|
commandFunctionsMap:set("playersdisplay", commandsDisplay.playersDisplay)
|
|
@@ -198,14 +199,17 @@ commandFunctionsMap:set("playsound", commands.playSound)
|
|
|
198
199
|
commandFunctionsMap:set("pocket", commands.pocket)
|
|
199
200
|
commandFunctionsMap:set("poopdisplay", commandsDisplay.poopDisplay)
|
|
200
201
|
commandFunctionsMap:set("poopmana", commands.poopMana)
|
|
202
|
+
commandFunctionsMap:set("poopsdisplay", commandsDisplay.poopsDisplay)
|
|
201
203
|
commandFunctionsMap:set("position", commands.positionCommand)
|
|
202
204
|
commandFunctionsMap:set("pressureplatedisplay", commandsDisplay.pressurePlateDisplay)
|
|
205
|
+
commandFunctionsMap:set("pressureplatesdisplay", commandsDisplay.pressurePlatesDisplay)
|
|
203
206
|
commandFunctionsMap:set("projectiledisplay", commandsDisplay.projectileDisplay)
|
|
204
207
|
commandFunctionsMap:set("projectilesdisplay", commandsDisplay.projectilesDisplay)
|
|
205
208
|
commandFunctionsMap:set("redhearts", commands.redHearts)
|
|
206
209
|
commandFunctionsMap:set("rh", commands.rh)
|
|
207
210
|
commandFunctionsMap:set("right", commands.right)
|
|
208
211
|
commandFunctionsMap:set("rockdisplay", commandsDisplay.rockDisplay)
|
|
212
|
+
commandFunctionsMap:set("rocksdisplay", commandsDisplay.rocksDisplay)
|
|
209
213
|
commandFunctionsMap:set("room", commands.roomCommand)
|
|
210
214
|
commandFunctionsMap:set("rottenhearts", commands.rottenHearts)
|
|
211
215
|
commandFunctionsMap:set("s", commands.s)
|
|
@@ -227,6 +231,7 @@ commandFunctionsMap:set("sounds", commands.sounds)
|
|
|
227
231
|
commandFunctionsMap:set("spam", commands.spam)
|
|
228
232
|
commandFunctionsMap:set("spawngoldentrinket", commands.spawnGoldenTrinket)
|
|
229
233
|
commandFunctionsMap:set("speed", commands.speed)
|
|
234
|
+
commandFunctionsMap:set("spikedisplay", commandsDisplay.spikeDisplay)
|
|
230
235
|
commandFunctionsMap:set("spikesdisplay", commandsDisplay.spikesDisplay)
|
|
231
236
|
commandFunctionsMap:set("supersecret", commands.superSecret)
|
|
232
237
|
commandFunctionsMap:set("startingroom", commands.startingRoom)
|
|
@@ -234,6 +239,7 @@ commandFunctionsMap:set("teardisplay", commandsDisplay.tearDisplay)
|
|
|
234
239
|
commandFunctionsMap:set("tears", commands.tears)
|
|
235
240
|
commandFunctionsMap:set("tearsdisplay", commandsDisplay.tearsDisplay)
|
|
236
241
|
commandFunctionsMap:set("tntdisplay", commandsDisplay.tntDisplay)
|
|
242
|
+
commandFunctionsMap:set("tntsdisplay", commandsDisplay.tntsDisplay)
|
|
237
243
|
commandFunctionsMap:set("trapdoor", commands.trapdoorCommand)
|
|
238
244
|
commandFunctionsMap:set("treasure", commands.treasure)
|
|
239
245
|
commandFunctionsMap:set("ultrasecret", commands.ultraSecret)
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
-
/** For EntityType.
|
|
2
|
+
/** For EntityType.SLOT (6) */
|
|
3
3
|
export declare function isSlot(entity: Entity): entity is EntitySlot;
|
|
4
|
-
/** For EntityType.RAGLING (246) */
|
|
5
|
-
export declare function isRagling(npc: EntityNPC): npc is EntityNPCRagling;
|
package/dist/functions/npc.lua
CHANGED
|
@@ -27,8 +27,6 @@ local getFilteredNewEntities = ____entity.getFilteredNewEntities
|
|
|
27
27
|
local ____entitySpecific = require("functions.entitySpecific")
|
|
28
28
|
local getNPCs = ____entitySpecific.getNPCs
|
|
29
29
|
local getProjectiles = ____entitySpecific.getProjectiles
|
|
30
|
-
local ____entityTypes = require("functions.entityTypes")
|
|
31
|
-
local isRagling = ____entityTypes.isRagling
|
|
32
30
|
function ____exports.isAliveExceptionNPC(self, npc)
|
|
33
31
|
local entityTypeVariant = (tostring(npc.Type) .. ".") .. tostring(npc.Variant)
|
|
34
32
|
if NON_ALIVE_NPCS_TYPE_VARIANT:has(entityTypeVariant) then
|
|
@@ -50,7 +48,7 @@ function ____exports.isDyingEggyWithNoSpidersLeft(self, npc)
|
|
|
50
48
|
return npc.State == NpcState.SUICIDE and npc.StateFrame >= EGGY_STATE_FRAME_OF_FINAL_SPIDER
|
|
51
49
|
end
|
|
52
50
|
function ____exports.isRaglingDeathPatch(self, npc)
|
|
53
|
-
return
|
|
51
|
+
return npc.Type == EntityType.RAGLING and npc.Variant == RaglingVariant.RAG_MANS_RAGLING and npc.State == NpcState.SPECIAL
|
|
54
52
|
end
|
|
55
53
|
NON_ALIVE_NPCS_TYPE_VARIANT = __TS__New(
|
|
56
54
|
Set,
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { BatterySubType, Card, CoinSubType, CollectibleType, HeartSubType, KeySubType, PillColor, SackSubType, TrinketType } from "isaac-typescript-definitions";
|
|
2
2
|
/** Helper function to get all of the battery entities in the room. */
|
|
3
|
-
export declare function getBatteries(matchingSubType?: number):
|
|
3
|
+
export declare function getBatteries(matchingSubType?: number): EntityPickupBattery[];
|
|
4
4
|
/** Helper function to get all of the card entities in the room. */
|
|
5
|
-
export declare function getCards(matchingSubType?: number):
|
|
5
|
+
export declare function getCards(matchingSubType?: number): EntityPickupCard[];
|
|
6
6
|
/**
|
|
7
7
|
* Helper function to get the corresponding coin amount from a `CoinSubType`. Returns 1 for modded
|
|
8
8
|
* sub-types.
|
|
9
9
|
*/
|
|
10
10
|
export declare function getCoinValue(coinSubType: CoinSubType): int;
|
|
11
11
|
/** Helper function to get all of the coin pickup entities in the room. */
|
|
12
|
-
export declare function getCoins(matchingSubType?: number):
|
|
12
|
+
export declare function getCoins(matchingSubType?: number): EntityPickupCoin[];
|
|
13
13
|
/** Helper function to get all of the collectible entities in the room. */
|
|
14
|
-
export declare function getCollectibles(matchingSubType?: number):
|
|
14
|
+
export declare function getCollectibles(matchingSubType?: number): EntityPickupCollectible[];
|
|
15
15
|
/** Helper function to get all of the heart pickup entities in the room. */
|
|
16
|
-
export declare function getHearts(matchingSubType?: number):
|
|
16
|
+
export declare function getHearts(matchingSubType?: number): EntityPickupHeart[];
|
|
17
17
|
/** Helper function to get all of the key pickup entities in the room. */
|
|
18
|
-
export declare function getKeys(matchingSubType?: number):
|
|
18
|
+
export declare function getKeys(matchingSubType?: number): EntityPickupKey[];
|
|
19
19
|
/** Helper function to get all of the pill entities in the room. */
|
|
20
|
-
export declare function getPills(matchingSubType?: number):
|
|
20
|
+
export declare function getPills(matchingSubType?: number): EntityPickupPill[];
|
|
21
21
|
/** Helper function to get all of the red heart pickup entities in the room. */
|
|
22
22
|
export declare function getRedHearts(): EntityPickup[];
|
|
23
23
|
/** Helper function to get all of the sack (i.e. grab bag) entities in the room. */
|
|
24
|
-
export declare function getSacks(matchingSubType?: number):
|
|
24
|
+
export declare function getSacks(matchingSubType?: number): EntityPickupSack[];
|
|
25
25
|
/** Helper function to get all of the trinket entities in the room. */
|
|
26
|
-
export declare function getTrinkets(matchingSubType?: number):
|
|
26
|
+
export declare function getTrinkets(matchingSubType?: number): EntityPickupTrinket[];
|
|
27
27
|
export declare function isChest(pickup: EntityPickup): boolean;
|
|
28
28
|
export declare function isRedHeart(pickup: EntityPickup): boolean;
|
|
29
29
|
/**
|
|
@@ -103,32 +103,30 @@ export declare function removeAllTrinkets(trinketType?: TrinketType, cap?: int):
|
|
|
103
103
|
/**
|
|
104
104
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.LIL_BATTERY` (90).
|
|
105
105
|
*/
|
|
106
|
-
export declare function spawnBattery(subType: BatterySubType, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined):
|
|
107
|
-
export declare function spawnBatteryWithSeed(subType: BatterySubType, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined):
|
|
106
|
+
export declare function spawnBattery(subType: BatterySubType, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityPickupBattery;
|
|
107
|
+
export declare function spawnBatteryWithSeed(subType: BatterySubType, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityPickupBattery;
|
|
108
108
|
/**
|
|
109
109
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TAROT_CARD` (300).
|
|
110
110
|
*/
|
|
111
|
-
export declare function spawnCard(subType: Card, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined):
|
|
112
|
-
export declare function spawnCardWithSeed(subType: Card, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined):
|
|
111
|
+
export declare function spawnCard(subType: Card, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityPickupCard;
|
|
112
|
+
export declare function spawnCardWithSeed(subType: Card, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityPickupCard;
|
|
113
113
|
/** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.COIN` (20). */
|
|
114
|
-
export declare function spawnCoin(subType: CoinSubType, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined):
|
|
115
|
-
export declare function spawnCoinWithSeed(subType: CoinSubType, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined):
|
|
114
|
+
export declare function spawnCoin(subType: CoinSubType, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityPickupCoin;
|
|
115
|
+
export declare function spawnCoinWithSeed(subType: CoinSubType, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityPickupCoin;
|
|
116
116
|
/** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.HEART` (10). */
|
|
117
|
-
export declare function spawnHeart(subType: HeartSubType, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined):
|
|
118
|
-
export declare function spawnHeartWithSeed(subType: HeartSubType, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined):
|
|
117
|
+
export declare function spawnHeart(subType: HeartSubType, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityPickupHeart;
|
|
118
|
+
export declare function spawnHeartWithSeed(subType: HeartSubType, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityPickupHeart;
|
|
119
119
|
/** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.KEY` (30). */
|
|
120
|
-
export declare function spawnKey(subType: KeySubType, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined):
|
|
121
|
-
export declare function spawnKeyWithSeed(subType: KeySubType, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined):
|
|
120
|
+
export declare function spawnKey(subType: KeySubType, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityPickupKey;
|
|
121
|
+
export declare function spawnKeyWithSeed(subType: KeySubType, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityPickupKey;
|
|
122
122
|
/** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.PILL` (70). */
|
|
123
|
-
export declare function spawnPill(pillColor: PillColor, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined):
|
|
124
|
-
export declare function spawnPillWithSeed(subType: PillColor, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined):
|
|
125
|
-
/**
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
export declare function spawnSack(subType: SackSubType, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityPickup;
|
|
129
|
-
export declare function spawnSackWithSeed(subType: SackSubType, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityPickup;
|
|
123
|
+
export declare function spawnPill(pillColor: PillColor, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityPickupPill;
|
|
124
|
+
export declare function spawnPillWithSeed(subType: PillColor, position: Vector, seed: Seed, velocity?: Readonly<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?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityPickupSack;
|
|
127
|
+
export declare function spawnSackWithSeed(subType: SackSubType, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityPickupSack;
|
|
130
128
|
/**
|
|
131
129
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TRINKET` (350).
|
|
132
130
|
*/
|
|
133
|
-
export declare function spawnTrinket(subType: TrinketType, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined):
|
|
134
|
-
export declare function spawnTrinketWithSeed(subType: TrinketType, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined):
|
|
131
|
+
export declare function spawnTrinket(subType: TrinketType, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityPickupTrinket;
|
|
132
|
+
export declare function spawnTrinketWithSeed(subType: TrinketType, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityPickupTrinket;
|
|
@@ -75,7 +75,7 @@ function ____exports.getSacks(self, matchingSubType)
|
|
|
75
75
|
if matchingSubType == nil then
|
|
76
76
|
matchingSubType = -1
|
|
77
77
|
end
|
|
78
|
-
return getPickups(nil, PickupVariant.
|
|
78
|
+
return getPickups(nil, PickupVariant.SACK, matchingSubType)
|
|
79
79
|
end
|
|
80
80
|
function ____exports.getTrinkets(self, matchingSubType)
|
|
81
81
|
if matchingSubType == nil then
|
|
@@ -344,7 +344,7 @@ function ____exports.spawnSack(self, subType, position, velocity, spawner, seed)
|
|
|
344
344
|
end
|
|
345
345
|
return spawnPickup(
|
|
346
346
|
nil,
|
|
347
|
-
PickupVariant.
|
|
347
|
+
PickupVariant.SACK,
|
|
348
348
|
subType,
|
|
349
349
|
position,
|
|
350
350
|
velocity,
|
|
@@ -35,6 +35,8 @@ local ____postGridEntity = require("callbacks.postGridEntity")
|
|
|
35
35
|
local postGridEntityCallbacksInit = ____postGridEntity.postGridEntityCallbacksInit
|
|
36
36
|
local ____postGridEntityCollision = require("callbacks.postGridEntityCollision")
|
|
37
37
|
local postGridEntityCollisionInit = ____postGridEntityCollision.postGridEntityCollisionInit
|
|
38
|
+
local ____postGridEntityRender = require("callbacks.postGridEntityRender")
|
|
39
|
+
local postGridEntityRenderInit = ____postGridEntityRender.postGridEntityRenderInit
|
|
38
40
|
local ____postHolyMantleRemoved = require("callbacks.postHolyMantleRemoved")
|
|
39
41
|
local postHolyMantleRemovedCallbackInit = ____postHolyMantleRemoved.postHolyMantleRemovedCallbackInit
|
|
40
42
|
local ____postItemDischarged = require("callbacks.postItemDischarged")
|
|
@@ -132,6 +134,7 @@ function ____exports.initCustomCallbacks(self, mod)
|
|
|
132
134
|
postGreedModeWaveCallbackInit(nil, mod)
|
|
133
135
|
postGridEntityCallbacksInit(nil, mod)
|
|
134
136
|
postGridEntityCollisionInit(nil, mod)
|
|
137
|
+
postGridEntityRenderInit(nil, mod)
|
|
135
138
|
postHolyMantleRemovedCallbackInit(nil, mod)
|
|
136
139
|
postItemDischargeCallbackInit(nil, mod)
|
|
137
140
|
postLaserInitLateCallbackInit(nil, mod)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isaacscript-common",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.21",
|
|
4
4
|
"description": "Helper functions for IsaacScript mods",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"isaac",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"dist/**/*.d.ts"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"isaac-typescript-definitions": "^2.0.
|
|
28
|
+
"isaac-typescript-definitions": "^2.0.38"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"isaacscript-lint": "^1.0.
|
|
31
|
+
"isaacscript-lint": "^1.0.157",
|
|
32
32
|
"isaacscript-spell": "^1.0.3",
|
|
33
33
|
"isaacscript-tsconfig": "^1.1.16",
|
|
34
34
|
"npm-check-updates": "^13.0.1",
|