isaacscript-common 7.9.0 → 7.9.1

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.
@@ -1,3 +1,3 @@
1
- /// <reference types="isaac-typescript-definitions" />
2
- export declare function postPlayerReorderedCallbacksInit(mod: Mod): void;
1
+ import { ModUpgraded } from "../classes/ModUpgraded";
2
+ export declare function postPlayerReorderedCallbacksInit(mod: ModUpgraded): void;
3
3
  //# sourceMappingURL=postPlayerReorderedCallbacks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"postPlayerReorderedCallbacks.d.ts","sourceRoot":"","sources":["../../src/callbacks/postPlayerReorderedCallbacks.ts"],"names":[],"mappings":";AAiCA,wBAAgB,gCAAgC,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAO/D"}
1
+ {"version":3,"file":"postPlayerReorderedCallbacks.d.ts","sourceRoot":"","sources":["../../src/callbacks/postPlayerReorderedCallbacks.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AA6BrD,wBAAgB,gCAAgC,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAUvE"}
@@ -1,7 +1,9 @@
1
1
  local ____exports = {}
2
- local hasSubscriptions, postPEffectUpdate, postPlayerUpdate, postPlayerRender, postGameStarted, dequeue, v
2
+ local hasSubscriptions, postPEffectUpdate, postPlayerUpdate, postPlayerRender, postGameStartedReordered, dequeue, v
3
3
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
4
4
  local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
5
+ local ____ModCallbackCustom = require("enums.ModCallbackCustom")
6
+ local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
5
7
  local ____exports = require("features.saveDataManager.exports")
6
8
  local saveDataManager = ____exports.saveDataManager
7
9
  local ____array = require("functions.array")
@@ -57,7 +59,7 @@ function postPlayerRender(self, player)
57
59
  ____v_run_postPlayerRenderQueue_2[#____v_run_postPlayerRenderQueue_2 + 1] = playerIndex
58
60
  end
59
61
  end
60
- function postGameStarted(self)
62
+ function postGameStartedReordered(self)
61
63
  if not hasSubscriptions(nil) then
62
64
  return
63
65
  end
@@ -79,8 +81,8 @@ v = {run = {postGameStartedFiredOnThisRun = false, postPEffectUpdateQueue = {},
79
81
  function ____exports.postPlayerReorderedCallbacksInit(self, mod)
80
82
  saveDataManager(nil, "postPlayerReordered", v, hasSubscriptions)
81
83
  mod:AddCallback(ModCallback.POST_PEFFECT_UPDATE, postPEffectUpdate)
82
- mod:AddCallback(ModCallback.POST_GAME_STARTED, postGameStarted)
83
84
  mod:AddCallback(ModCallback.POST_PLAYER_UPDATE, postPlayerUpdate)
84
85
  mod:AddCallback(ModCallback.POST_PLAYER_RENDER, postPlayerRender)
86
+ mod:AddCallbackCustom(ModCallbackCustom.POST_GAME_STARTED_REORDERED, postGameStartedReordered)
85
87
  end
86
88
  return ____exports
@@ -1 +1 @@
1
- {"version":3,"file":"initFeatures.d.ts","sourceRoot":"","sources":["../src/initFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AA4BpD,wBAAgB,YAAY,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAGnD"}
1
+ {"version":3,"file":"initFeatures.d.ts","sourceRoot":"","sources":["../src/initFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AA6BpD,wBAAgB,YAAY,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAGnD"}
@@ -34,6 +34,8 @@ local ____playerInventory = require("features.playerInventory")
34
34
  local playerInventoryInit = ____playerInventory.playerInventoryInit
35
35
  local ____ponyDetection = require("features.ponyDetection")
36
36
  local ponyDetectionInit = ____ponyDetection.ponyDetectionInit
37
+ local ____preventChildEntities = require("features.preventChildEntities")
38
+ local preventChildEntitiesInit = ____preventChildEntities.preventChildEntitiesInit
37
39
  local ____preventCollectibleRotation = require("features.preventCollectibleRotation")
38
40
  local preventCollectibleRotationInit = ____preventCollectibleRotation.preventCollectibleRotationInit
39
41
  local ____registerHotkey = require("features.registerHotkey")
@@ -73,6 +75,7 @@ function initFeaturesMinor(self, mod)
73
75
  pickupIndexInit(nil, mod)
74
76
  playerInventoryInit(nil, mod)
75
77
  ponyDetectionInit(nil, mod)
78
+ preventChildEntitiesInit(nil, mod)
76
79
  preventCollectibleRotationInit(nil, mod)
77
80
  registerHotkeyInit(nil, mod)
78
81
  roomClearFrameInit(nil, mod)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "7.9.0",
3
+ "version": "7.9.1",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -4,6 +4,8 @@
4
4
  // - POST_PLAYER_UPDATE_REORDERED
5
5
 
6
6
  import { ModCallback } from "isaac-typescript-definitions";
7
+ import { ModUpgraded } from "../classes/ModUpgraded";
8
+ import { ModCallbackCustom } from "../enums/ModCallbackCustom";
7
9
  import { saveDataManager } from "../features/saveDataManager/exports";
8
10
  import { emptyArray } from "../functions/array";
9
11
  import { getPlayerFromIndex, getPlayerIndex } from "../functions/playerIndex";
@@ -31,13 +33,16 @@ const v = {
31
33
  },
32
34
  };
33
35
 
34
- export function postPlayerReorderedCallbacksInit(mod: Mod): void {
36
+ export function postPlayerReorderedCallbacksInit(mod: ModUpgraded): void {
35
37
  saveDataManager("postPlayerReordered", v, hasSubscriptions);
36
38
 
37
39
  mod.AddCallback(ModCallback.POST_PEFFECT_UPDATE, postPEffectUpdate); // 4
38
- mod.AddCallback(ModCallback.POST_GAME_STARTED, postGameStarted); // 15
39
40
  mod.AddCallback(ModCallback.POST_PLAYER_UPDATE, postPlayerUpdate); // 31
40
41
  mod.AddCallback(ModCallback.POST_PLAYER_RENDER, postPlayerRender); // 32
42
+ mod.AddCallbackCustom(
43
+ ModCallbackCustom.POST_GAME_STARTED_REORDERED,
44
+ postGameStartedReordered,
45
+ );
41
46
  }
42
47
 
43
48
  function hasSubscriptions() {
@@ -94,7 +99,7 @@ function postPlayerRender(player: EntityPlayer) {
94
99
  }
95
100
 
96
101
  // ModCallback.POST_GAME_STARTED (15)
97
- function postGameStarted() {
102
+ function postGameStartedReordered() {
98
103
  if (!hasSubscriptions()) {
99
104
  return;
100
105
  }
@@ -16,6 +16,7 @@ import { persistentEntitiesInit } from "./features/persistentEntities";
16
16
  import { pickupIndexInit } from "./features/pickupIndex";
17
17
  import { playerInventoryInit } from "./features/playerInventory";
18
18
  import { ponyDetectionInit } from "./features/ponyDetection";
19
+ import { preventChildEntitiesInit } from "./features/preventChildEntities";
19
20
  import { preventCollectibleRotationInit } from "./features/preventCollectibleRotation";
20
21
  import { registerHotkeyInit } from "./features/registerHotkey";
21
22
  import { roomClearFrameInit } from "./features/roomClearFrame";
@@ -53,6 +54,7 @@ function initFeaturesMinor(mod: ModUpgraded) {
53
54
  pickupIndexInit(mod);
54
55
  playerInventoryInit(mod);
55
56
  ponyDetectionInit(mod);
57
+ preventChildEntitiesInit(mod);
56
58
  preventCollectibleRotationInit(mod);
57
59
  registerHotkeyInit(mod);
58
60
  roomClearFrameInit(mod);