isaacscript-common 15.3.6 → 15.3.7

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.d.ts CHANGED
@@ -636,6 +636,23 @@ export declare function addRoomDisplayFlag(roomGridIndex: int | undefined, displ
636
636
  */
637
637
  export declare function addSetsToSet<T>(mainSet: Set<T>, ...setsToAdd: Array<Set<T> | ReadonlySet<T>>): void;
638
638
 
639
+ /**
640
+ * Helper function to add a stat to a player based on the `CacheFlag` provided. Call this function
641
+ * from the `EVALUATE_CACHE` callback.
642
+ *
643
+ * Note that for `CacheFlag.FIRE_DELAY`, the "amount" argument will be interpreted as the tear stat
644
+ * to add (and not the amount to mutate `EntityPlayer.MaxFireDelay` by).
645
+ *
646
+ * This function supports the following cache flags:
647
+ * - CacheFlag.DAMAGE (1 << 0)
648
+ * - CacheFlag.FIRE_DELAY (1 << 1)
649
+ * - CacheFlag.SHOT_SPEED (1 << 2)
650
+ * - CacheFlag.RANGE (1 << 3)
651
+ * - CacheFlag.SPEED (1 << 4)
652
+ * - CacheFlag.LUCK (1 << 10)
653
+ */
654
+ export declare function addStat(player: EntityPlayer, cacheFlag: CacheFlag, amount: number): void;
655
+
639
656
  /**
640
657
  * - Converts the specified amount of tears stat into the format of `EntityPlayer.MaxFireDelay` and
641
658
  * adds it to the player.
@@ -3434,6 +3451,9 @@ export declare function emptyArray<T>(array: T[]): void;
3434
3451
  */
3435
3452
  export declare function emptyRoom(): void;
3436
3453
 
3454
+ /** Helper function to remove all grid entities from a room except for doors, and walls. */
3455
+ export declare function emptyRoomGridEntities(): void;
3456
+
3437
3457
  /**
3438
3458
  * A string that represents an entity. This is the entity type, variant, and sub-type, all separated
3439
3459
  * by periods.
@@ -4409,6 +4429,14 @@ export declare function getCurseIDByName(name: string): LevelCurse;
4409
4429
  */
4410
4430
  export declare function getDefaultGlobals(): ReadonlySet<string>;
4411
4431
 
4432
+ /**
4433
+ * Returns the starting stat that Isaac (the default character) starts with. For example, if you
4434
+ * pass this function `CacheFlag.DAMAGE`, it will return 3.5.
4435
+ *
4436
+ * Note that the default fire delay is represented in the tear stat, not the `MaxFireDelay` value.
4437
+ */
4438
+ export declare function getDefaultPlayerStat(cacheFlag: CacheFlag): number | undefined;
4439
+
4412
4440
  export declare function getDevilRoomDoor(): GridEntityDoor | undefined;
4413
4441
 
4414
4442
  /**
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 15.3.6
3
+ isaacscript-common 15.3.7
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -39733,7 +39733,7 @@ local ____lualib = require("lualib_bundle")
39733
39733
  local Set = ____lualib.Set
39734
39734
  local __TS__New = ____lualib.__TS__New
39735
39735
  local ____exports = {}
39736
- local emptyRoomEntities, emptyRoomGridEntities, EMPTY_ROOM_BLACKLIST_ENTITY_SET
39736
+ local emptyRoomEntities, EMPTY_ROOM_BLACKLIST_ENTITY_SET
39737
39737
  local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
39738
39738
  local EntityFlag = ____isaac_2Dtypescript_2Ddefinitions.EntityFlag
39739
39739
  local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
@@ -39769,7 +39769,7 @@ function emptyRoomEntities(self)
39769
39769
  ::__continue4::
39770
39770
  end
39771
39771
  end
39772
- function emptyRoomGridEntities(self)
39772
+ function ____exports.emptyRoomGridEntities(self)
39773
39773
  local removedOneOrMoreGridEntities = false
39774
39774
  for ____, gridEntity in ipairs(getGridEntities(nil)) do
39775
39775
  do
@@ -39801,7 +39801,7 @@ EMPTY_ROOM_BLACKLIST_ENTITY_SET = __TS__New(Set, {
39801
39801
  })
39802
39802
  function ____exports.emptyRoom(self)
39803
39803
  emptyRoomEntities(nil)
39804
- emptyRoomGridEntities(nil)
39804
+ ____exports.emptyRoomGridEntities(nil)
39805
39805
  end
39806
39806
  return ____exports
39807
39807
  end,
@@ -48127,8 +48127,7 @@ function getExportedMethodsFromFeature(self, featureClass)
48127
48127
  exportedMethodNames,
48128
48128
  function(____, name)
48129
48129
  local featureClassRecord = featureClass
48130
- local method = featureClassRecord[name]
48131
- if method == nil then
48130
+ if featureClassRecord[name] == nil then
48132
48131
  error("Failed to find a decorated exported method: " .. name)
48133
48132
  end
48134
48133
  local function wrappedMethod(____, ...)
@@ -50668,6 +50667,14 @@ do
50668
50667
  end
50669
50668
  end
50670
50669
  end
50670
+ do
50671
+ local ____export = require("src.functions.stats")
50672
+ for ____exportKey, ____exportValue in pairs(____export) do
50673
+ if ____exportKey ~= "default" then
50674
+ ____exports[____exportKey] = ____exportValue
50675
+ end
50676
+ end
50677
+ end
50671
50678
  do
50672
50679
  local ____export = require("src.functions.string")
50673
50680
  for ____exportKey, ____exportValue in pairs(____export) do
@@ -51704,6 +51711,14 @@ do
51704
51711
  end
51705
51712
  end
51706
51713
  end
51714
+ do
51715
+ local ____export = require("src.functions.stats")
51716
+ for ____exportKey, ____exportValue in pairs(____export) do
51717
+ if ____exportKey ~= "default" then
51718
+ ____exports[____exportKey] = ____exportValue
51719
+ end
51720
+ end
51721
+ end
51707
51722
  do
51708
51723
  local ____export = require("src.functions.string")
51709
51724
  for ____exportKey, ____exportValue in pairs(____export) do
@@ -37,8 +37,7 @@ function getExportedMethodsFromFeature(self, featureClass)
37
37
  exportedMethodNames,
38
38
  function(____, name)
39
39
  local featureClassRecord = featureClass
40
- local method = featureClassRecord[name]
41
- if method == nil then
40
+ if featureClassRecord[name] == nil then
42
41
  error("Failed to find a decorated exported method: " .. name)
43
42
  end
44
43
  local function wrappedMethod(____, ...)
@@ -5,4 +5,6 @@
5
5
  * effects (1000), doors, and walls.
6
6
  */
7
7
  export declare function emptyRoom(): void;
8
+ /** Helper function to remove all grid entities from a room except for doors, and walls. */
9
+ export declare function emptyRoomGridEntities(): void;
8
10
  //# sourceMappingURL=emptyRoom.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"emptyRoom.d.ts","sourceRoot":"","sources":["../../../src/functions/emptyRoom.ts"],"names":[],"mappings":"AAqBA;;;;;GAKG;AACH,wBAAgB,SAAS,IAAI,IAAI,CAGhC"}
1
+ {"version":3,"file":"emptyRoom.d.ts","sourceRoot":"","sources":["../../../src/functions/emptyRoom.ts"],"names":[],"mappings":"AAqBA;;;;;GAKG;AACH,wBAAgB,SAAS,IAAI,IAAI,CAGhC;AAmCD,2FAA2F;AAC3F,wBAAgB,qBAAqB,IAAI,IAAI,CAyB5C"}
@@ -2,7 +2,7 @@ local ____lualib = require("lualib_bundle")
2
2
  local Set = ____lualib.Set
3
3
  local __TS__New = ____lualib.__TS__New
4
4
  local ____exports = {}
5
- local emptyRoomEntities, emptyRoomGridEntities, EMPTY_ROOM_BLACKLIST_ENTITY_SET
5
+ local emptyRoomEntities, EMPTY_ROOM_BLACKLIST_ENTITY_SET
6
6
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
7
7
  local EntityFlag = ____isaac_2Dtypescript_2Ddefinitions.EntityFlag
8
8
  local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
@@ -38,7 +38,8 @@ function emptyRoomEntities(self)
38
38
  ::__continue4::
39
39
  end
40
40
  end
41
- function emptyRoomGridEntities(self)
41
+ --- Helper function to remove all grid entities from a room except for doors, and walls.
42
+ function ____exports.emptyRoomGridEntities(self)
42
43
  local removedOneOrMoreGridEntities = false
43
44
  for ____, gridEntity in ipairs(getGridEntities(nil)) do
44
45
  do
@@ -74,6 +75,6 @@ EMPTY_ROOM_BLACKLIST_ENTITY_SET = __TS__New(Set, {
74
75
  -- effects (1000), doors, and walls.
75
76
  function ____exports.emptyRoom(self)
76
77
  emptyRoomEntities(nil)
77
- emptyRoomGridEntities(nil)
78
+ ____exports.emptyRoomGridEntities(nil)
78
79
  end
79
80
  return ____exports
@@ -107,6 +107,7 @@ export * from "./functions/sound";
107
107
  export * from "./functions/spawnCollectible";
108
108
  export * from "./functions/sprites";
109
109
  export * from "./functions/stage";
110
+ export * from "./functions/stats";
110
111
  export * from "./functions/string";
111
112
  export * from "./functions/table";
112
113
  export * from "./functions/tears";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,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c,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC"}
@@ -871,6 +871,14 @@ do
871
871
  end
872
872
  end
873
873
  end
874
+ do
875
+ local ____export = require("src.functions.stats")
876
+ for ____exportKey, ____exportValue in pairs(____export) do
877
+ if ____exportKey ~= "default" then
878
+ ____exports[____exportKey] = ____exportValue
879
+ end
880
+ end
881
+ end
874
882
  do
875
883
  local ____export = require("src.functions.string")
876
884
  for ____exportKey, ____exportValue in pairs(____export) do
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "15.3.6",
3
+ "version": "15.3.7",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -399,8 +399,7 @@ function getExportedMethodsFromFeature(featureClass: unknown): FunctionTuple[] {
399
399
 
400
400
  return exportedMethodNames.map((name) => {
401
401
  const featureClassRecord = featureClass as Record<string, AnyFunction>;
402
- const method = featureClassRecord[name];
403
- if (method === undefined) {
402
+ if (featureClassRecord[name] === undefined) {
404
403
  error(`Failed to find a decorated exported method: ${name}`);
405
404
  }
406
405
 
@@ -63,8 +63,8 @@ function emptyRoomEntities() {
63
63
  }
64
64
  }
65
65
 
66
- /** We want to remove all grid entities except for walls and doors. */
67
- function emptyRoomGridEntities() {
66
+ /** Helper function to remove all grid entities from a room except for doors, and walls. */
67
+ export function emptyRoomGridEntities(): void {
68
68
  let removedOneOrMoreGridEntities = false;
69
69
  for (const gridEntity of getGridEntities()) {
70
70
  const gridEntityType = gridEntity.GetType();
package/src/index.ts CHANGED
@@ -107,6 +107,7 @@ export * from "./functions/sound";
107
107
  export * from "./functions/spawnCollectible";
108
108
  export * from "./functions/sprites";
109
109
  export * from "./functions/stage";
110
+ export * from "./functions/stats";
110
111
  export * from "./functions/string";
111
112
  export * from "./functions/table";
112
113
  export * from "./functions/tears";