isaacscript-common 25.0.3 → 25.2.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/index.rollup.d.ts +23 -0
- package/dist/isaacscript-common.lua +20 -2
- package/dist/src/core/constants.d.ts +8 -1
- package/dist/src/core/constants.d.ts.map +1 -1
- package/dist/src/core/constants.lua +6 -1
- package/dist/src/functions/itemPool.d.ts +13 -1
- package/dist/src/functions/itemPool.d.ts.map +1 -1
- package/dist/src/functions/itemPool.lua +22 -0
- package/package.json +1 -1
- package/src/core/constants.ts +10 -1
- package/src/functions/itemPool.ts +34 -1
package/dist/index.rollup.d.ts
CHANGED
|
@@ -13244,6 +13244,13 @@ export declare function removeCollectibleFromAllPlayers(...collectibleTypes: Col
|
|
|
13244
13244
|
*/
|
|
13245
13245
|
export declare function removeCollectibleFromItemTracker(collectibleType: CollectibleType): void;
|
|
13246
13246
|
|
|
13247
|
+
/**
|
|
13248
|
+
* Helper function to remove one or more collectibles from all item pools.
|
|
13249
|
+
*
|
|
13250
|
+
* This function is variadic, meaning you can pass as many collectible types as you want to remove.
|
|
13251
|
+
*/
|
|
13252
|
+
export declare function removeCollectibleFromPools(...collectibleTypes: CollectibleType[]): void;
|
|
13253
|
+
|
|
13247
13254
|
/**
|
|
13248
13255
|
* Helper function to remove all pickup delay on a collectible. By default, collectibles have a 20
|
|
13249
13256
|
* frame delay before they can be picked up by a player.
|
|
@@ -13352,6 +13359,13 @@ export declare function removeSubstring(string: string, ...substrings: string[])
|
|
|
13352
13359
|
*/
|
|
13353
13360
|
export declare function removeTrinketCostume(player: EntityPlayer, trinketType: TrinketType): void;
|
|
13354
13361
|
|
|
13362
|
+
/**
|
|
13363
|
+
* Helper function to remove one or more trinkets from all item pools.
|
|
13364
|
+
*
|
|
13365
|
+
* This function is variadic, meaning you can pass as many trinket types as you want to remove.
|
|
13366
|
+
*/
|
|
13367
|
+
export declare function removeTrinketFromPools(...trinketTypes: TrinketType[]): void;
|
|
13368
|
+
|
|
13355
13369
|
/**
|
|
13356
13370
|
* Helper function to remove all coins, trinkets, and so on that spawned from breaking an urn.
|
|
13357
13371
|
*
|
|
@@ -13409,6 +13423,15 @@ export declare function rerollEnemy(entity: Entity): Entity | undefined;
|
|
|
13409
13423
|
|
|
13410
13424
|
export declare function resetPickingUpItem(pickingUpItem: PickingUpItem): void;
|
|
13411
13425
|
|
|
13426
|
+
/**
|
|
13427
|
+
* This is equivalent to the bottom-right screen position when the game is in windowed mode in a
|
|
13428
|
+
* 1600x900 resolution.
|
|
13429
|
+
*/
|
|
13430
|
+
export declare const RESOLUTION_1600_900: Vector;
|
|
13431
|
+
|
|
13432
|
+
/** This is equivalent to the bottom-right screen position when the game is in full screen mode. */
|
|
13433
|
+
export declare const RESOLUTION_FULL_SCREEN: Vector;
|
|
13434
|
+
|
|
13412
13435
|
/**
|
|
13413
13436
|
* Helper function to restart the run using the console command of "restart". If the player is
|
|
13414
13437
|
* playing a seeded run, then it will restart the game to the beginning of the seed. Otherwise, it
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 25.0
|
|
3
|
+
isaacscript-common 25.2.0
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -17394,9 +17394,11 @@ ____exports.NEW_RUN_PLAYER_STARTING_POSITION = newReadonlyVector(nil, 320, 380)
|
|
|
17394
17394
|
____exports.MAX_TAINTED_SAMSON_BERSERK_CHARGE = 100000
|
|
17395
17395
|
____exports.NUM_DIMENSIONS = getEnumLength(nil, Dimension) - 1
|
|
17396
17396
|
____exports.NUM_PILLS_IN_POOL = NUM_NORMAL_PILL_COLORS
|
|
17397
|
+
____exports.ONE_BY_ONE_ROOM_GRID_SIZE = 135
|
|
17397
17398
|
____exports.SECOND_IN_MILLISECONDS = 1000
|
|
17398
17399
|
____exports.MINUTE_IN_MILLISECONDS = 60 * ____exports.SECOND_IN_MILLISECONDS
|
|
17399
|
-
____exports.
|
|
17400
|
+
____exports.RESOLUTION_FULL_SCREEN = Vector(480, 270)
|
|
17401
|
+
____exports.RESOLUTION_1600_900 = Vector(533, 300)
|
|
17400
17402
|
____exports.TAINTED_SAMSON_BERSERK_CHARGE_FROM_TAKING_DAMAGE = 10000
|
|
17401
17403
|
____exports.TELEPORTER_ACTIVATION_DISTANCE = ____exports.DISTANCE_OF_GRID_TILE / 2
|
|
17402
17404
|
____exports.UI_HEART_WIDTH = 12
|
|
@@ -51474,6 +51476,8 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescri
|
|
|
51474
51476
|
local ItemPoolType = ____isaac_2Dtypescript_2Ddefinitions.ItemPoolType
|
|
51475
51477
|
local ____cachedEnumValues = require("src.arrays.cachedEnumValues")
|
|
51476
51478
|
local ITEM_POOL_TYPE_VALUES = ____cachedEnumValues.ITEM_POOL_TYPE_VALUES
|
|
51479
|
+
local ____cachedClasses = require("src.core.cachedClasses")
|
|
51480
|
+
local game = ____cachedClasses.game
|
|
51477
51481
|
local ____array = require("src.functions.array")
|
|
51478
51482
|
local arrayRemove = ____array.arrayRemove
|
|
51479
51483
|
local getRandomArrayElement = ____array.getRandomArrayElement
|
|
@@ -51524,6 +51528,20 @@ function ____exports.getRandomItemPool(self)
|
|
|
51524
51528
|
local itemPoolTypes = isGreedMode(nil) and GREED_MODE_ITEM_POOL_TYPES or NORMAL_MODE_ITEM_POOL_TYPES
|
|
51525
51529
|
return getRandomArrayElement(nil, itemPoolTypes)
|
|
51526
51530
|
end
|
|
51531
|
+
function ____exports.removeCollectibleFromPools(self, ...)
|
|
51532
|
+
local collectibleTypes = {...}
|
|
51533
|
+
local itemPool = game:GetItemPool()
|
|
51534
|
+
for ____, collectibleType in ipairs(collectibleTypes) do
|
|
51535
|
+
itemPool:RemoveCollectible(collectibleType)
|
|
51536
|
+
end
|
|
51537
|
+
end
|
|
51538
|
+
function ____exports.removeTrinketFromPools(self, ...)
|
|
51539
|
+
local trinketTypes = {...}
|
|
51540
|
+
local itemPool = game:GetItemPool()
|
|
51541
|
+
for ____, trinketType in ipairs(trinketTypes) do
|
|
51542
|
+
itemPool:RemoveTrinket(trinketType)
|
|
51543
|
+
end
|
|
51544
|
+
end
|
|
51527
51545
|
return ____exports
|
|
51528
51546
|
end,
|
|
51529
51547
|
["src.objects.languageNames"] = function(...)
|
|
@@ -118,9 +118,16 @@ export declare const NUM_DIMENSIONS: number;
|
|
|
118
118
|
* horse pills.)
|
|
119
119
|
*/
|
|
120
120
|
export declare const NUM_PILLS_IN_POOL: number;
|
|
121
|
+
export declare const ONE_BY_ONE_ROOM_GRID_SIZE = 135;
|
|
121
122
|
export declare const SECOND_IN_MILLISECONDS = 1000;
|
|
122
123
|
export declare const MINUTE_IN_MILLISECONDS: number;
|
|
123
|
-
|
|
124
|
+
/** This is equivalent to the bottom-right screen position when the game is in full screen mode. */
|
|
125
|
+
export declare const RESOLUTION_FULL_SCREEN: Vector;
|
|
126
|
+
/**
|
|
127
|
+
* This is equivalent to the bottom-right screen position when the game is in windowed mode in a
|
|
128
|
+
* 1600x900 resolution.
|
|
129
|
+
*/
|
|
130
|
+
export declare const RESOLUTION_1600_900: Vector;
|
|
124
131
|
/** After taking damage, `EntityPlayer.SamsonBerserkCharge` is incremented by this amount. */
|
|
125
132
|
export declare const TAINTED_SAMSON_BERSERK_CHARGE_FROM_TAKING_DAMAGE = 10000;
|
|
126
133
|
/** For `GridEntityType.TELEPORTER` (23). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/core/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EAEb,MAAM,8BAA8B,CAAC;AAWtC;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;;;;EAI7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iCAAiC,SAAS,CAAC;AAExD;;;GAGG;AACH,eA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AAC;AAC3C,eAAO,MAAM,sBAAsB,QAA8B,CAAC;AAElE,mGAAmG;AACnG,eAAO,MAAM,sBAAsB,QAAmB,CAAC;AAEvD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,QAAmB,CAAC;AAEpD,6FAA6F;AAC7F,eAAO,MAAM,gDAAgD,QAAQ,CAAC;AAEtE,4CAA4C;AAC5C,eAAO,MAAM,8BAA8B,QAA4B,CAAC;AAExE;;;GAGG;AACH,eAAO,MAAM,cAAc,KAAK,CAAC;AAEjC;;;;;GAKG;AACH,eAAO,MAAM,SAAS,kBAA0B,CAAC;AAEjD;;;;;GAKG;AACH,eAAO,MAAM,UAAU,kBAA0B,CAAC;AAElD;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,iBAA4B,CAAC;AAEtD;;;;GAIG;AACH,eAAO,MAAM,aAAa,kBAAgC,CAAC"}
|
|
@@ -103,9 +103,14 @@ ____exports.NUM_DIMENSIONS = getEnumLength(nil, Dimension) - 1
|
|
|
103
103
|
--- The pill pool for each run is comprised of one effect for each unique pill color (minus gold and
|
|
104
104
|
-- horse pills.)
|
|
105
105
|
____exports.NUM_PILLS_IN_POOL = NUM_NORMAL_PILL_COLORS
|
|
106
|
+
____exports.ONE_BY_ONE_ROOM_GRID_SIZE = 135
|
|
106
107
|
____exports.SECOND_IN_MILLISECONDS = 1000
|
|
107
108
|
____exports.MINUTE_IN_MILLISECONDS = 60 * ____exports.SECOND_IN_MILLISECONDS
|
|
108
|
-
|
|
109
|
+
--- This is equivalent to the bottom-right screen position when the game is in full screen mode.
|
|
110
|
+
____exports.RESOLUTION_FULL_SCREEN = Vector(480, 270)
|
|
111
|
+
--- This is equivalent to the bottom-right screen position when the game is in windowed mode in a
|
|
112
|
+
-- 1600x900 resolution.
|
|
113
|
+
____exports.RESOLUTION_1600_900 = Vector(533, 300)
|
|
109
114
|
--- After taking damage, `EntityPlayer.SamsonBerserkCharge` is incremented by this amount.
|
|
110
115
|
____exports.TAINTED_SAMSON_BERSERK_CHARGE_FROM_TAKING_DAMAGE = 10000
|
|
111
116
|
--- For `GridEntityType.TELEPORTER` (23).
|
|
@@ -1,8 +1,20 @@
|
|
|
1
|
-
import { ItemPoolType } from "isaac-typescript-definitions";
|
|
1
|
+
import { CollectibleType, ItemPoolType, TrinketType } from "isaac-typescript-definitions";
|
|
2
2
|
/**
|
|
3
3
|
* Helper function to get a random item pool. This is not as simple as getting a random value from
|
|
4
4
|
* the `ItemPoolType` enum, since `ItemPoolType.SHELL_GAME` (7) is not a real item pool and the
|
|
5
5
|
* Greed Mode item pools should be excluded if not playing in Greed Mode.
|
|
6
6
|
*/
|
|
7
7
|
export declare function getRandomItemPool(): ItemPoolType;
|
|
8
|
+
/**
|
|
9
|
+
* Helper function to remove one or more collectibles from all item pools.
|
|
10
|
+
*
|
|
11
|
+
* This function is variadic, meaning you can pass as many collectible types as you want to remove.
|
|
12
|
+
*/
|
|
13
|
+
export declare function removeCollectibleFromPools(...collectibleTypes: CollectibleType[]): void;
|
|
14
|
+
/**
|
|
15
|
+
* Helper function to remove one or more trinkets from all item pools.
|
|
16
|
+
*
|
|
17
|
+
* This function is variadic, meaning you can pass as many trinket types as you want to remove.
|
|
18
|
+
*/
|
|
19
|
+
export declare function removeTrinketFromPools(...trinketTypes: TrinketType[]): void;
|
|
8
20
|
//# sourceMappingURL=itemPool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"itemPool.d.ts","sourceRoot":"","sources":["../../../src/functions/itemPool.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"itemPool.d.ts","sourceRoot":"","sources":["../../../src/functions/itemPool.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,YAAY,EACZ,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAwCtC;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,YAAY,CAKhD;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,GAAG,gBAAgB,EAAE,eAAe,EAAE,GACrC,IAAI,CAMN;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,YAAY,EAAE,WAAW,EAAE,GAAG,IAAI,CAM3E"}
|
|
@@ -7,6 +7,8 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitio
|
|
|
7
7
|
local ItemPoolType = ____isaac_2Dtypescript_2Ddefinitions.ItemPoolType
|
|
8
8
|
local ____cachedEnumValues = require("src.arrays.cachedEnumValues")
|
|
9
9
|
local ITEM_POOL_TYPE_VALUES = ____cachedEnumValues.ITEM_POOL_TYPE_VALUES
|
|
10
|
+
local ____cachedClasses = require("src.core.cachedClasses")
|
|
11
|
+
local game = ____cachedClasses.game
|
|
10
12
|
local ____array = require("src.functions.array")
|
|
11
13
|
local arrayRemove = ____array.arrayRemove
|
|
12
14
|
local getRandomArrayElement = ____array.getRandomArrayElement
|
|
@@ -60,4 +62,24 @@ function ____exports.getRandomItemPool(self)
|
|
|
60
62
|
local itemPoolTypes = isGreedMode(nil) and GREED_MODE_ITEM_POOL_TYPES or NORMAL_MODE_ITEM_POOL_TYPES
|
|
61
63
|
return getRandomArrayElement(nil, itemPoolTypes)
|
|
62
64
|
end
|
|
65
|
+
--- Helper function to remove one or more collectibles from all item pools.
|
|
66
|
+
--
|
|
67
|
+
-- This function is variadic, meaning you can pass as many collectible types as you want to remove.
|
|
68
|
+
function ____exports.removeCollectibleFromPools(self, ...)
|
|
69
|
+
local collectibleTypes = {...}
|
|
70
|
+
local itemPool = game:GetItemPool()
|
|
71
|
+
for ____, collectibleType in ipairs(collectibleTypes) do
|
|
72
|
+
itemPool:RemoveCollectible(collectibleType)
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
--- Helper function to remove one or more trinkets from all item pools.
|
|
76
|
+
--
|
|
77
|
+
-- This function is variadic, meaning you can pass as many trinket types as you want to remove.
|
|
78
|
+
function ____exports.removeTrinketFromPools(self, ...)
|
|
79
|
+
local trinketTypes = {...}
|
|
80
|
+
local itemPool = game:GetItemPool()
|
|
81
|
+
for ____, trinketType in ipairs(trinketTypes) do
|
|
82
|
+
itemPool:RemoveTrinket(trinketType)
|
|
83
|
+
end
|
|
84
|
+
end
|
|
63
85
|
return ____exports
|
package/package.json
CHANGED
package/src/core/constants.ts
CHANGED
|
@@ -174,10 +174,19 @@ export const NUM_DIMENSIONS = getEnumLength(Dimension) - 1; // Account for "Dime
|
|
|
174
174
|
*/
|
|
175
175
|
export const NUM_PILLS_IN_POOL = NUM_NORMAL_PILL_COLORS;
|
|
176
176
|
|
|
177
|
+
export const ONE_BY_ONE_ROOM_GRID_SIZE = 135;
|
|
178
|
+
|
|
177
179
|
export const SECOND_IN_MILLISECONDS = 1000;
|
|
178
180
|
export const MINUTE_IN_MILLISECONDS = 60 * SECOND_IN_MILLISECONDS;
|
|
179
181
|
|
|
180
|
-
|
|
182
|
+
/** This is equivalent to the bottom-right screen position when the game is in full screen mode. */
|
|
183
|
+
export const RESOLUTION_FULL_SCREEN = Vector(480, 270);
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* This is equivalent to the bottom-right screen position when the game is in windowed mode in a
|
|
187
|
+
* 1600x900 resolution.
|
|
188
|
+
*/
|
|
189
|
+
export const RESOLUTION_1600_900 = Vector(533, 300);
|
|
181
190
|
|
|
182
191
|
/** After taking damage, `EntityPlayer.SamsonBerserkCharge` is incremented by this amount. */
|
|
183
192
|
export const TAINTED_SAMSON_BERSERK_CHARGE_FROM_TAKING_DAMAGE = 10000;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
CollectibleType,
|
|
3
|
+
ItemPoolType,
|
|
4
|
+
TrinketType,
|
|
5
|
+
} from "isaac-typescript-definitions";
|
|
2
6
|
import { ITEM_POOL_TYPE_VALUES } from "../arrays/cachedEnumValues";
|
|
7
|
+
import { game } from "../core/cachedClasses";
|
|
3
8
|
import { arrayRemove, getRandomArrayElement } from "./array";
|
|
4
9
|
import { isGreedMode } from "./run";
|
|
5
10
|
|
|
@@ -48,3 +53,31 @@ export function getRandomItemPool(): ItemPoolType {
|
|
|
48
53
|
: NORMAL_MODE_ITEM_POOL_TYPES;
|
|
49
54
|
return getRandomArrayElement(itemPoolTypes);
|
|
50
55
|
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Helper function to remove one or more collectibles from all item pools.
|
|
59
|
+
*
|
|
60
|
+
* This function is variadic, meaning you can pass as many collectible types as you want to remove.
|
|
61
|
+
*/
|
|
62
|
+
export function removeCollectibleFromPools(
|
|
63
|
+
...collectibleTypes: CollectibleType[]
|
|
64
|
+
): void {
|
|
65
|
+
const itemPool = game.GetItemPool();
|
|
66
|
+
|
|
67
|
+
for (const collectibleType of collectibleTypes) {
|
|
68
|
+
itemPool.RemoveCollectible(collectibleType);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Helper function to remove one or more trinkets from all item pools.
|
|
74
|
+
*
|
|
75
|
+
* This function is variadic, meaning you can pass as many trinket types as you want to remove.
|
|
76
|
+
*/
|
|
77
|
+
export function removeTrinketFromPools(...trinketTypes: TrinketType[]): void {
|
|
78
|
+
const itemPool = game.GetItemPool();
|
|
79
|
+
|
|
80
|
+
for (const trinketType of trinketTypes) {
|
|
81
|
+
itemPool.RemoveTrinket(trinketType);
|
|
82
|
+
}
|
|
83
|
+
}
|