isaacscript-common 44.0.0 → 45.0.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 +31 -11
- package/dist/isaacscript-common.lua +5383 -5236
- package/dist/src/classes/features/other/{EdenStartingStats.d.ts → EdenStartingStatsHealth.d.ts} +17 -5
- package/dist/src/classes/features/other/EdenStartingStatsHealth.d.ts.map +1 -0
- package/dist/src/classes/features/other/EdenStartingStatsHealth.lua +75 -0
- package/dist/src/classes/features/other/ItemPoolDetection.d.ts.map +1 -1
- package/dist/src/classes/features/other/ItemPoolDetection.lua +2 -1
- package/dist/src/classes/features/other/Pause.lua +2 -2
- package/dist/src/classes/features/other/extraConsoleCommands/commands.lua +4 -3
- package/dist/src/enums/ISCFeature.d.ts +1 -1
- package/dist/src/enums/ISCFeature.d.ts.map +1 -1
- package/dist/src/enums/ISCFeature.lua +2 -2
- package/dist/src/features.d.ts +3 -3
- package/dist/src/features.d.ts.map +1 -1
- package/dist/src/features.lua +3 -3
- package/dist/src/functions/characters.d.ts +9 -2
- package/dist/src/functions/characters.d.ts.map +1 -1
- package/dist/src/functions/characters.lua +13 -4
- package/dist/src/functions/charge.lua +2 -2
- package/dist/src/functions/math.d.ts +1 -0
- package/dist/src/functions/math.d.ts.map +1 -1
- package/dist/src/functions/math.lua +1 -0
- package/dist/src/functions/playerCollectibles.d.ts +127 -0
- package/dist/src/functions/playerCollectibles.d.ts.map +1 -0
- package/dist/src/functions/playerCollectibles.lua +308 -0
- package/dist/src/functions/playerHealth.d.ts +1 -1
- package/dist/src/functions/playerHealth.d.ts.map +1 -1
- package/dist/src/functions/playerHealth.lua +10 -6
- package/dist/src/functions/playerTrinkets.d.ts +69 -0
- package/dist/src/functions/playerTrinkets.d.ts.map +1 -0
- package/dist/src/functions/playerTrinkets.lua +160 -0
- package/dist/src/functions/players.d.ts +5 -166
- package/dist/src/functions/players.d.ts.map +1 -1
- package/dist/src/functions/players.lua +20 -389
- package/dist/src/functions/trinketGive.lua +2 -2
- package/dist/src/functions/trinkets.d.ts +0 -30
- package/dist/src/functions/trinkets.d.ts.map +1 -1
- package/dist/src/functions/trinkets.lua +0 -71
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.lua +16 -0
- package/dist/src/objects/{characterStartingCollectibles.d.ts → characterStartingCollectibleTypes.d.ts} +2 -2
- package/dist/src/objects/characterStartingCollectibleTypes.d.ts.map +1 -0
- package/dist/src/objects/{characterStartingCollectibles.lua → characterStartingCollectibleTypes.lua} +1 -1
- package/dist/src/objects/characterStartingTrinketTypes.d.ts +46 -0
- package/dist/src/objects/characterStartingTrinketTypes.d.ts.map +1 -0
- package/dist/src/objects/characterStartingTrinketTypes.lua +49 -0
- package/package.json +1 -1
- package/src/classes/features/other/{EdenStartingStats.ts → EdenStartingStatsHealth.ts} +38 -5
- package/src/classes/features/other/ItemPoolDetection.ts +2 -4
- package/src/classes/features/other/Pause.ts +1 -1
- package/src/classes/features/other/extraConsoleCommands/commands.ts +3 -3
- package/src/enums/ISCFeature.ts +1 -1
- package/src/features.ts +3 -3
- package/src/functions/characters.ts +20 -4
- package/src/functions/charge.ts +1 -1
- package/src/functions/math.ts +1 -0
- package/src/functions/playerCollectibles.ts +372 -0
- package/src/functions/playerHealth.ts +23 -15
- package/src/functions/playerTrinkets.ts +184 -0
- package/src/functions/players.ts +16 -481
- package/src/functions/trinketGive.ts +1 -1
- package/src/functions/trinkets.ts +1 -84
- package/src/index.ts +2 -0
- package/src/objects/{characterStartingCollectibles.ts → characterStartingCollectibleTypes.ts} +1 -1
- package/src/objects/characterStartingTrinketTypes.ts +129 -0
- package/dist/src/classes/features/other/EdenStartingStats.d.ts.map +0 -1
- package/dist/src/classes/features/other/EdenStartingStats.lua +0 -54
- package/dist/src/objects/characterStartingCollectibles.d.ts.map +0 -1
package/dist/index.rollup.d.ts
CHANGED
|
@@ -4068,15 +4068,26 @@ export declare function easeOutQuint(time: number): number;
|
|
|
4068
4068
|
*/
|
|
4069
4069
|
export declare function easeOutSine(time: number): number;
|
|
4070
4070
|
|
|
4071
|
-
declare class
|
|
4071
|
+
declare class EdenStartingStatsHealth extends Feature {
|
|
4072
4072
|
/**
|
|
4073
4073
|
* We must use the `POST_PLAYER_INIT` callback since the two random collectibles have not been
|
|
4074
4074
|
* granted yet.
|
|
4075
4075
|
*/
|
|
4076
4076
|
private readonly postPlayerInit;
|
|
4077
|
+
private getEdenStats;
|
|
4078
|
+
private getEdenHealth;
|
|
4077
4079
|
/**
|
|
4078
|
-
* Helper function to get the
|
|
4079
|
-
*
|
|
4080
|
+
* Helper function to get the health that Eden started with at the beginning of the run before any
|
|
4081
|
+
* of the random collectibles were added.
|
|
4082
|
+
*
|
|
4083
|
+
* Returns undefined if passed a player that is not Eden.
|
|
4084
|
+
*
|
|
4085
|
+
* In order to use this function, you must upgrade your mod with `ISCFeature.EDEN_STARTING_STATS`.
|
|
4086
|
+
*/
|
|
4087
|
+
getEdenStartingHealth(player: EntityPlayer): Readonly<PlayerHealth> | undefined;
|
|
4088
|
+
/**
|
|
4089
|
+
* Helper function to get the value of the randomized starting stat for Eden that was assigned at
|
|
4090
|
+
* the beginning of the run before any of the random collectibles were added.
|
|
4080
4091
|
*
|
|
4081
4092
|
* Returns undefined if passed a player that is not Eden.
|
|
4082
4093
|
*
|
|
@@ -4085,7 +4096,7 @@ declare class EdenStartingStats extends Feature {
|
|
|
4085
4096
|
getEdenStartingStat<T extends PlayerStat>(player: EntityPlayer, playerStat: T): PlayerStats[T] | undefined;
|
|
4086
4097
|
/**
|
|
4087
4098
|
* Helper function to get all of the stat values that Eden started with at the beginning of the
|
|
4088
|
-
* run.
|
|
4099
|
+
* run before any of the random collectibles were added.
|
|
4089
4100
|
*
|
|
4090
4101
|
* Returns undefined if passed a player that is not Eden.
|
|
4091
4102
|
*
|
|
@@ -4917,7 +4928,15 @@ export declare function getCharacters(): PlayerType[];
|
|
|
4917
4928
|
*
|
|
4918
4929
|
* Note that this will return an empty array for Eden and Tainted Eden.
|
|
4919
4930
|
*/
|
|
4920
|
-
export declare function
|
|
4931
|
+
export declare function getCharacterStartingCollectibleTypes(character: PlayerType): readonly CollectibleType[];
|
|
4932
|
+
|
|
4933
|
+
/**
|
|
4934
|
+
* Helper function to get the trinket that is granted to a particular character at the beginning of
|
|
4935
|
+
* a run. Returns undefined if the character does not start with a trinket.
|
|
4936
|
+
*
|
|
4937
|
+
* Note that this will return undefined for Eden and Tainted Eden.
|
|
4938
|
+
*/
|
|
4939
|
+
export declare function getCharacterStartingTrinketType(character: PlayerType): TrinketType | undefined;
|
|
4921
4940
|
|
|
4922
4941
|
/**
|
|
4923
4942
|
* Helper function to get the amount of charges away from the maximum charge that a particular
|
|
@@ -6232,7 +6251,7 @@ export declare function getPlayerFromPtr(entityPtr: EntityPtr): EntityPlayer | u
|
|
|
6232
6251
|
*
|
|
6233
6252
|
* This is based on the `REVEL.StoreHealth` function in the Revelations mod.
|
|
6234
6253
|
*/
|
|
6235
|
-
export declare function getPlayerHealth(player: EntityPlayer): PlayerHealth
|
|
6254
|
+
export declare function getPlayerHealth(player: EntityPlayer): Readonly<PlayerHealth>;
|
|
6236
6255
|
|
|
6237
6256
|
export declare function getPlayerHealthType(player: EntityPlayer, healthType: HealthType): int;
|
|
6238
6257
|
|
|
@@ -6339,9 +6358,9 @@ export declare function getPlayers(performCharacterExclusions?: boolean): Entity
|
|
|
6339
6358
|
export declare function getPlayersOfType(...characters: PlayerType[]): EntityPlayer[];
|
|
6340
6359
|
|
|
6341
6360
|
/**
|
|
6342
|
-
* Helper function to get all of the players that
|
|
6343
|
-
* returns an array of players because it is possible
|
|
6344
|
-
* same controller index (e.g. Jacob & Esau).
|
|
6361
|
+
* Helper function to get all of the players that are using keyboard (i.e.
|
|
6362
|
+
* `ControllerIndex.KEYBOARD`). This function returns an array of players because it is possible
|
|
6363
|
+
* that there is more than one player with the same controller index (e.g. Jacob & Esau).
|
|
6345
6364
|
*
|
|
6346
6365
|
* Note that this function includes players with a non-undefined parent like e.g. the Strawman
|
|
6347
6366
|
* Keeper.
|
|
@@ -8322,7 +8341,7 @@ export declare enum ISCFeature {
|
|
|
8322
8341
|
DEPLOY_JSON_ROOM = 24,
|
|
8323
8342
|
DISABLE_ALL_SOUND = 25,
|
|
8324
8343
|
DISABLE_INPUTS = 26,
|
|
8325
|
-
|
|
8344
|
+
EDEN_STARTING_STATS_HEALTH = 27,
|
|
8326
8345
|
FADE_IN_REMOVER = 28,
|
|
8327
8346
|
FAST_RESET = 29,
|
|
8328
8347
|
FLYING_DETECTION = 30,
|
|
@@ -8387,7 +8406,7 @@ declare interface ISCFeatureToClass {
|
|
|
8387
8406
|
[ISCFeature.DEPLOY_JSON_ROOM]: DeployJSONRoom;
|
|
8388
8407
|
[ISCFeature.DISABLE_ALL_SOUND]: DisableAllSound;
|
|
8389
8408
|
[ISCFeature.DISABLE_INPUTS]: DisableInputs;
|
|
8390
|
-
[ISCFeature.
|
|
8409
|
+
[ISCFeature.EDEN_STARTING_STATS_HEALTH]: EdenStartingStatsHealth;
|
|
8391
8410
|
[ISCFeature.FADE_IN_REMOVER]: FadeInRemover;
|
|
8392
8411
|
[ISCFeature.FAST_RESET]: FastReset;
|
|
8393
8412
|
[ISCFeature.FLYING_DETECTION]: FlyingDetection;
|
|
@@ -15600,6 +15619,7 @@ export declare function roomUpdateSafe(): void;
|
|
|
15600
15619
|
|
|
15601
15620
|
/**
|
|
15602
15621
|
* If rounding fails, this function returns 0.
|
|
15622
|
+
*
|
|
15603
15623
|
* From: http://lua-users.org/wiki/SimpleRound
|
|
15604
15624
|
*
|
|
15605
15625
|
* @param num The number to round.
|