isaacscript-common 7.4.3 → 7.5.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.
Files changed (118) hide show
  1. package/dist/callbacks/postGridEntity.d.ts.map +1 -1
  2. package/dist/callbacks/postGridEntity.lua +53 -6
  3. package/dist/callbacks/postPlayerChangeStat.d.ts.map +1 -1
  4. package/dist/callbacks/postPlayerChangeStat.lua +9 -2
  5. package/dist/callbacks/subscriptions/postGridEntityCustomBroken.d.ts +1 -0
  6. package/dist/callbacks/subscriptions/postGridEntityCustomBroken.d.ts.map +1 -1
  7. package/dist/callbacks/subscriptions/postGridEntityCustomBroken.lua +5 -2
  8. package/dist/callbacks/subscriptions/postGridEntityCustomInit.d.ts +9 -0
  9. package/dist/callbacks/subscriptions/postGridEntityCustomInit.d.ts.map +1 -0
  10. package/dist/callbacks/subscriptions/postGridEntityCustomInit.lua +23 -0
  11. package/dist/callbacks/subscriptions/postGridEntityCustomRemove.d.ts +9 -0
  12. package/dist/callbacks/subscriptions/postGridEntityCustomRemove.d.ts.map +1 -0
  13. package/dist/callbacks/subscriptions/postGridEntityCustomRemove.lua +23 -0
  14. package/dist/callbacks/subscriptions/postGridEntityCustomStateChanged.d.ts +9 -0
  15. package/dist/callbacks/subscriptions/postGridEntityCustomStateChanged.d.ts.map +1 -0
  16. package/dist/callbacks/subscriptions/postGridEntityCustomStateChanged.lua +29 -0
  17. package/dist/callbacks/subscriptions/postPlayerChangeStat.d.ts +3 -2
  18. package/dist/callbacks/subscriptions/postPlayerChangeStat.d.ts.map +1 -1
  19. package/dist/enums/ModCallbackCustom.d.ts +131 -81
  20. package/dist/enums/ModCallbackCustom.d.ts.map +1 -1
  21. package/dist/enums/ModCallbackCustom.lua +67 -61
  22. package/dist/enums/StatType.d.ts +3 -1
  23. package/dist/enums/StatType.d.ts.map +1 -1
  24. package/dist/enums/StatType.lua +2 -0
  25. package/dist/features/customGridEntity.d.ts +30 -13
  26. package/dist/features/customGridEntity.d.ts.map +1 -1
  27. package/dist/features/customGridEntity.lua +67 -48
  28. package/dist/features/customStage/customStageGridEntities.d.ts.map +1 -1
  29. package/dist/features/customStage/customStageGridEntities.lua +37 -31
  30. package/dist/functions/dev.d.ts +20 -0
  31. package/dist/functions/dev.d.ts.map +1 -0
  32. package/dist/functions/dev.lua +34 -0
  33. package/dist/functions/playerStats.d.ts.map +1 -1
  34. package/dist/functions/playerStats.lua +2 -1
  35. package/dist/functions/rooms.d.ts +5 -0
  36. package/dist/functions/rooms.d.ts.map +1 -1
  37. package/dist/functions/rooms.lua +12 -2
  38. package/dist/index.d.ts +204 -96
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.lua +1134 -8
  41. package/dist/interfaces/StatTypeType.d.ts +1 -0
  42. package/dist/interfaces/StatTypeType.d.ts.map +1 -1
  43. package/dist/interfaces/private/AddCallbackParameterCustom.d.ts +6 -0
  44. package/dist/interfaces/private/AddCallbackParameterCustom.d.ts.map +1 -1
  45. package/dist/objects/callbackRegisterFunctions.d.ts.map +1 -1
  46. package/dist/objects/callbackRegisterFunctions.lua +9 -0
  47. package/dist/types/PossibleStatType.d.ts +7 -0
  48. package/dist/types/PossibleStatType.d.ts.map +1 -0
  49. package/dist/{interfaces/index.lua → types/PossibleStatType.lua} +0 -0
  50. package/package.json +1 -1
  51. package/src/callbacks/postGridEntity.ts +75 -10
  52. package/src/callbacks/postPlayerChangeStat.ts +8 -4
  53. package/src/callbacks/subscriptions/postGridEntityCustomBroken.ts +4 -0
  54. package/src/callbacks/subscriptions/postGridEntityCustomInit.ts +38 -0
  55. package/src/callbacks/subscriptions/postGridEntityCustomRemove.ts +35 -0
  56. package/src/callbacks/subscriptions/postGridEntityCustomStateChanged.ts +42 -0
  57. package/src/callbacks/subscriptions/postPlayerChangeStat.ts +4 -7
  58. package/src/enums/ModCallbackCustom.ts +73 -20
  59. package/src/enums/StatType.ts +3 -3
  60. package/src/features/customGridEntity.ts +87 -61
  61. package/src/features/customStage/customStageGridEntities.ts +16 -7
  62. package/src/functions/dev.ts +31 -0
  63. package/src/functions/playerStats.ts +1 -0
  64. package/src/functions/rooms.ts +18 -0
  65. package/src/index.ts +208 -9
  66. package/src/interfaces/StatTypeType.ts +1 -0
  67. package/src/interfaces/private/AddCallbackParameterCustom.ts +6 -0
  68. package/src/objects/callbackRegisterFunctions.ts +9 -0
  69. package/src/types/PossibleStatType.ts +12 -0
  70. package/dist/classes/index.d.ts +0 -3
  71. package/dist/classes/index.d.ts.map +0 -1
  72. package/dist/classes/index.lua +0 -18
  73. package/dist/core/index.d.ts +0 -5
  74. package/dist/core/index.d.ts.map +0 -1
  75. package/dist/core/index.lua +0 -34
  76. package/dist/enums/DecorationVariant.d.ts +0 -10
  77. package/dist/enums/DecorationVariant.d.ts.map +0 -1
  78. package/dist/enums/DecorationVariant.lua +0 -7
  79. package/dist/enums/index.d.ts +0 -11
  80. package/dist/enums/index.d.ts.map +0 -1
  81. package/dist/enums/index.lua +0 -82
  82. package/dist/features/index.d.ts +0 -30
  83. package/dist/features/index.d.ts.map +0 -1
  84. package/dist/features/index.lua +0 -216
  85. package/dist/functions/index.d.ts +0 -100
  86. package/dist/functions/index.d.ts.map +0 -1
  87. package/dist/functions/index.lua +0 -794
  88. package/dist/interfaces/index.d.ts +0 -12
  89. package/dist/interfaces/index.d.ts.map +0 -1
  90. package/dist/maps/index.d.ts +0 -5
  91. package/dist/maps/index.d.ts.map +0 -1
  92. package/dist/maps/index.lua +0 -34
  93. package/dist/objects/index.d.ts +0 -2
  94. package/dist/objects/index.d.ts.map +0 -1
  95. package/dist/objects/index.lua +0 -10
  96. package/dist/types/index.d.ts +0 -11
  97. package/dist/types/index.d.ts.map +0 -1
  98. package/dist/types/index.lua +0 -10
  99. package/src/classes/index.ts +0 -2
  100. package/src/classes/indexTypeDoc.ts +0 -2
  101. package/src/core/index.ts +0 -4
  102. package/src/core/indexTypeDoc.ts +0 -4
  103. package/src/enums/DecorationVariant.ts +0 -10
  104. package/src/enums/index.ts +0 -10
  105. package/src/enums/indexTypeDoc.ts +0 -10
  106. package/src/features/index.ts +0 -59
  107. package/src/features/indexTypeDoc.ts +0 -30
  108. package/src/functions/index.ts +0 -101
  109. package/src/functions/indexTypeDoc.ts +0 -101
  110. package/src/indexTypeDoc.ts +0 -13
  111. package/src/interfaces/index.ts +0 -11
  112. package/src/interfaces/indexTypeDoc.ts +0 -11
  113. package/src/maps/index.ts +0 -4
  114. package/src/maps/indexTypeDoc.ts +0 -4
  115. package/src/objects/index.ts +0 -1
  116. package/src/objects/indexTypeDoc.ts +0 -1
  117. package/src/types/index.ts +0 -10
  118. package/src/types/indexTypeDoc.ts +0 -10
@@ -1 +1 @@
1
- {"version":3,"file":"postGridEntity.d.ts","sourceRoot":"","sources":["../../src/callbacks/postGridEntity.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAyCrD,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAQlE"}
1
+ {"version":3,"file":"postGridEntity.d.ts","sourceRoot":"","sources":["../../src/callbacks/postGridEntity.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AA8DrD,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAQlE"}
@@ -8,6 +8,8 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitio
8
8
  local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
9
9
  local ____ModCallbackCustom = require("enums.ModCallbackCustom")
10
10
  local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
11
+ local ____customGridEntity = require("features.customGridEntity")
12
+ local getCustomGridEntityType = ____customGridEntity.getCustomGridEntityType
11
13
  local ____exports = require("features.saveDataManager.exports")
12
14
  local saveDataManager = ____exports.saveDataManager
13
15
  local ____gridEntities = require("functions.gridEntities")
@@ -16,6 +18,21 @@ local isGridEntityBroken = ____gridEntities.isGridEntityBroken
16
18
  local ____postGridEntityBroken = require("callbacks.subscriptions.postGridEntityBroken")
17
19
  local postGridEntityBrokenFire = ____postGridEntityBroken.postGridEntityBrokenFire
18
20
  local postGridEntityBrokenHasSubscriptions = ____postGridEntityBroken.postGridEntityBrokenHasSubscriptions
21
+ local ____postGridEntityCustomBroken = require("callbacks.subscriptions.postGridEntityCustomBroken")
22
+ local postGridEntityCustomBrokenFire = ____postGridEntityCustomBroken.postGridEntityCustomBrokenFire
23
+ local postGridEntityCustomBrokenHasSubscriptions = ____postGridEntityCustomBroken.postGridEntityCustomBrokenHasSubscriptions
24
+ local ____postGridEntityCustomInit = require("callbacks.subscriptions.postGridEntityCustomInit")
25
+ local postGridEntityCustomInitFire = ____postGridEntityCustomInit.postGridEntityCustomInitFire
26
+ local postGridEntityCustomInitHasSubscriptions = ____postGridEntityCustomInit.postGridEntityCustomInitHasSubscriptions
27
+ local ____postGridEntityCustomRemove = require("callbacks.subscriptions.postGridEntityCustomRemove")
28
+ local postGridEntityCustomRemoveFire = ____postGridEntityCustomRemove.postGridEntityCustomRemoveFire
29
+ local postGridEntityCustomRemoveHasSubscriptions = ____postGridEntityCustomRemove.postGridEntityCustomRemoveHasSubscriptions
30
+ local ____postGridEntityCustomStateChanged = require("callbacks.subscriptions.postGridEntityCustomStateChanged")
31
+ local postGridEntityCustomStateChangedFire = ____postGridEntityCustomStateChanged.postGridEntityCustomStateChangedFire
32
+ local postGridEntityCustomStateChangedHasSubscriptions = ____postGridEntityCustomStateChanged.postGridEntityCustomStateChangedHasSubscriptions
33
+ local ____postGridEntityCustomUpdate = require("callbacks.subscriptions.postGridEntityCustomUpdate")
34
+ local postGridEntityCustomUpdateFire = ____postGridEntityCustomUpdate.postGridEntityCustomUpdateFire
35
+ local postGridEntityCustomUpdateHasSubscriptions = ____postGridEntityCustomUpdate.postGridEntityCustomUpdateHasSubscriptions
19
36
  local ____postGridEntityInit = require("callbacks.subscriptions.postGridEntityInit")
20
37
  local postGridEntityInitFire = ____postGridEntityInit.postGridEntityInitFire
21
38
  local postGridEntityInitHasSubscriptions = ____postGridEntityInit.postGridEntityInitHasSubscriptions
@@ -29,7 +46,7 @@ local ____postGridEntityUpdate = require("callbacks.subscriptions.postGridEntity
29
46
  local postGridEntityUpdateFire = ____postGridEntityUpdate.postGridEntityUpdateFire
30
47
  local postGridEntityUpdateHasSubscriptions = ____postGridEntityUpdate.postGridEntityUpdateHasSubscriptions
31
48
  function hasSubscriptions(self)
32
- return postGridEntityInitHasSubscriptions(nil) or postGridEntityUpdateHasSubscriptions(nil) or postGridEntityRemoveHasSubscriptions(nil) or postGridEntityStateChangedHasSubscriptions(nil) or postGridEntityBrokenHasSubscriptions(nil)
49
+ return postGridEntityInitHasSubscriptions(nil) or postGridEntityCustomInitHasSubscriptions(nil) or postGridEntityUpdateHasSubscriptions(nil) or postGridEntityCustomUpdateHasSubscriptions(nil) or postGridEntityRemoveHasSubscriptions(nil) or postGridEntityCustomRemoveHasSubscriptions(nil) or postGridEntityStateChangedHasSubscriptions(nil) or postGridEntityCustomStateChangedHasSubscriptions(nil) or postGridEntityBrokenHasSubscriptions(nil) or postGridEntityCustomBrokenHasSubscriptions(nil)
33
50
  end
34
51
  function postUpdate(self)
35
52
  if not hasSubscriptions(nil) then
@@ -42,7 +59,12 @@ function postUpdate(self)
42
59
  local gridEntity = ____value[2]
43
60
  checkGridEntityStateChanged(nil, gridIndex, gridEntity)
44
61
  checkNewGridEntity(nil, gridIndex, gridEntity)
45
- postGridEntityUpdateFire(nil, gridEntity)
62
+ local gridEntityTypeCustom = getCustomGridEntityType(nil, gridIndex)
63
+ if gridEntityTypeCustom == nil then
64
+ postGridEntityUpdateFire(nil, gridEntity)
65
+ else
66
+ postGridEntityCustomUpdateFire(nil, gridEntity, gridEntityTypeCustom)
67
+ end
46
68
  end
47
69
  end
48
70
  function checkGridEntitiesRemoved(self, gridEntitiesMap)
@@ -53,7 +75,12 @@ function checkGridEntitiesRemoved(self, gridEntitiesMap)
53
75
  local gridEntity = gridEntitiesMap:get(gridIndex)
54
76
  if gridEntity == nil or gridEntity:GetType() ~= storedGridEntityType then
55
77
  v.room.initializedGridEntities:delete(gridIndex)
56
- postGridEntityRemoveFire(nil, gridIndex, storedGridEntityType, storedGridEntityVariant)
78
+ local gridEntityTypeCustom = getCustomGridEntityType(nil, gridIndex)
79
+ if gridEntityTypeCustom == nil then
80
+ postGridEntityRemoveFire(nil, gridIndex, storedGridEntityType, storedGridEntityVariant)
81
+ else
82
+ postGridEntityCustomRemoveFire(nil, gridIndex, gridEntityTypeCustom)
83
+ end
57
84
  end
58
85
  end
59
86
  end
@@ -66,9 +93,24 @@ function checkGridEntityStateChanged(self, gridIndex, gridEntity)
66
93
  local newState = gridEntity.State
67
94
  if oldState ~= newState then
68
95
  updateTupleInMap(nil, gridEntity)
69
- postGridEntityStateChangedFire(nil, gridEntity, oldState, newState)
96
+ local gridEntityTypeCustom = getCustomGridEntityType(nil, gridEntity)
97
+ if gridEntityTypeCustom == nil then
98
+ postGridEntityStateChangedFire(nil, gridEntity, oldState, newState)
99
+ else
100
+ postGridEntityCustomStateChangedFire(
101
+ nil,
102
+ gridEntity,
103
+ gridEntityTypeCustom,
104
+ oldState,
105
+ newState
106
+ )
107
+ end
70
108
  if isGridEntityBroken(nil, gridEntity) then
71
- postGridEntityBrokenFire(nil, gridEntity)
109
+ if gridEntityTypeCustom == nil then
110
+ postGridEntityBrokenFire(nil, gridEntity)
111
+ else
112
+ postGridEntityCustomBrokenFire(nil, gridEntity, gridEntityTypeCustom)
113
+ end
72
114
  end
73
115
  end
74
116
  end
@@ -77,7 +119,12 @@ function checkNewGridEntity(self, gridIndex, gridEntity)
77
119
  local gridEntityTuple = v.room.initializedGridEntities:get(gridIndex)
78
120
  if gridEntityTuple == nil or gridEntityTuple[1] ~= gridEntityType then
79
121
  updateTupleInMap(nil, gridEntity)
80
- postGridEntityInitFire(nil, gridEntity)
122
+ local gridEntityTypeCustom = getCustomGridEntityType(nil, gridEntity)
123
+ if gridEntityTypeCustom == nil then
124
+ postGridEntityInitFire(nil, gridEntity)
125
+ else
126
+ postGridEntityCustomInitFire(nil, gridEntity, gridEntityTypeCustom)
127
+ end
81
128
  end
82
129
  end
83
130
  function updateTupleInMap(self, gridEntity)
@@ -1 +1 @@
1
- {"version":3,"file":"postPlayerChangeStat.d.ts","sourceRoot":"","sources":["../../src/callbacks/postPlayerChangeStat.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AA2BrD,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAO/D"}
1
+ {"version":3,"file":"postPlayerChangeStat.d.ts","sourceRoot":"","sources":["../../src/callbacks/postPlayerChangeStat.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AA2BrD,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAO/D"}
@@ -5,10 +5,10 @@ local ____exports = {}
5
5
  local hasSubscriptions, postPEffectUpdateReordered, statEquals, v
6
6
  local ____DefaultMap = require("classes.DefaultMap")
7
7
  local DefaultMap = ____DefaultMap.DefaultMap
8
- local ____enums = require("enums.index")
9
- local StatType = ____enums.StatType
10
8
  local ____ModCallbackCustom = require("enums.ModCallbackCustom")
11
9
  local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
10
+ local ____StatType = require("enums.StatType")
11
+ local StatType = ____StatType.StatType
12
12
  local ____exports = require("features.saveDataManager.exports")
13
13
  local saveDataManager = ____exports.saveDataManager
14
14
  local ____bitSet128 = require("functions.bitSet128")
@@ -25,6 +25,9 @@ local getPlayerStat = ____playerStats.getPlayerStat
25
25
  local ____types = require("functions.types")
26
26
  local isBoolean = ____types.isBoolean
27
27
  local isNumber = ____types.isNumber
28
+ local ____vector = require("functions.vector")
29
+ local isVector = ____vector.isVector
30
+ local vectorEquals = ____vector.vectorEquals
28
31
  local ____postPlayerChangeStat = require("callbacks.subscriptions.postPlayerChangeStat")
29
32
  local postPlayerChangeStatFire = ____postPlayerChangeStat.postPlayerChangeStatFire
30
33
  local postPlayerChangeStatHasSubscriptions = ____postPlayerChangeStat.postPlayerChangeStatHasSubscriptions
@@ -78,6 +81,10 @@ function statEquals(self, oldValue, newValue)
78
81
  if isColorStat then
79
82
  return colorEquals(nil, oldValue, newValue)
80
83
  end
84
+ local isVectorStat = isVector(nil, oldValue) and isVector(nil, newValue)
85
+ if isVectorStat then
86
+ return vectorEquals(nil, oldValue, newValue)
87
+ end
81
88
  error("Failed to determine the type of a stat in the \"POST_PLAYER_CHANGE_STAT\" callback.")
82
89
  end
83
90
  v = {run = {playersStatMap = __TS__New(
@@ -3,6 +3,7 @@ export declare type PostGridEntityCustomBrokenRegisterParameters = [
3
3
  callback: (gridEntity: GridEntity, gridEntityTypeCustom: GridEntityType) => void,
4
4
  gridEntityTypeCustom?: GridEntityType
5
5
  ];
6
+ export declare function postGridEntityCustomBrokenHasSubscriptions(): boolean;
6
7
  export declare function postGridEntityCustomBrokenRegister(...args: PostGridEntityCustomBrokenRegisterParameters): void;
7
8
  export declare function postGridEntityCustomBrokenFire(gridEntity: GridEntity, gridEntityTypeCustom: GridEntityType): void;
8
9
  //# sourceMappingURL=postGridEntityCustomBroken.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"postGridEntityCustomBroken.d.ts","sourceRoot":"","sources":["../../../src/callbacks/subscriptions/postGridEntityCustomBroken.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,oBAAY,4CAA4C,GAAG;IACzD,QAAQ,EAAE,CACR,UAAU,EAAE,UAAU,EACtB,oBAAoB,EAAE,cAAc,KACjC,IAAI;IACT,oBAAoB,CAAC,EAAE,cAAc;CACtC,CAAC;AAIF,wBAAgB,kCAAkC,CAChD,GAAG,IAAI,EAAE,4CAA4C,GACpD,IAAI,CAEN;AAED,wBAAgB,8BAA8B,CAC5C,UAAU,EAAE,UAAU,EACtB,oBAAoB,EAAE,cAAc,GACnC,IAAI,CAYN"}
1
+ {"version":3,"file":"postGridEntityCustomBroken.d.ts","sourceRoot":"","sources":["../../../src/callbacks/subscriptions/postGridEntityCustomBroken.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,oBAAY,4CAA4C,GAAG;IACzD,QAAQ,EAAE,CACR,UAAU,EAAE,UAAU,EACtB,oBAAoB,EAAE,cAAc,KACjC,IAAI;IACT,oBAAoB,CAAC,EAAE,cAAc;CACtC,CAAC;AAIF,wBAAgB,0CAA0C,IAAI,OAAO,CAEpE;AAED,wBAAgB,kCAAkC,CAChD,GAAG,IAAI,EAAE,4CAA4C,GACpD,IAAI,CAEN;AAED,wBAAgB,8BAA8B,CAC5C,UAAU,EAAE,UAAU,EACtB,oBAAoB,EAAE,cAAc,GACnC,IAAI,CAYN"}
@@ -1,5 +1,8 @@
1
1
  local ____exports = {}
2
2
  local subscriptions = {}
3
+ function ____exports.postGridEntityCustomBrokenHasSubscriptions(self)
4
+ return #subscriptions > 0
5
+ end
3
6
  function ____exports.postGridEntityCustomBrokenRegister(self, ...)
4
7
  local args = {...}
5
8
  subscriptions[#subscriptions + 1] = args
@@ -10,11 +13,11 @@ function ____exports.postGridEntityCustomBrokenFire(self, gridEntity, gridEntity
10
13
  local callbackGridEntityTypeCustom = ____value[2]
11
14
  do
12
15
  if callbackGridEntityTypeCustom ~= nil and callbackGridEntityTypeCustom ~= gridEntityTypeCustom then
13
- goto __continue4
16
+ goto __continue5
14
17
  end
15
18
  callback(nil, gridEntity, gridEntityTypeCustom)
16
19
  end
17
- ::__continue4::
20
+ ::__continue5::
18
21
  end
19
22
  end
20
23
  return ____exports
@@ -0,0 +1,9 @@
1
+ import { GridEntityType } from "isaac-typescript-definitions";
2
+ export declare type PostGridEntityCustomInitRegisterParameters = [
3
+ callback: (gridEntity: GridEntity, gridEntityTypeCustom: GridEntityType) => void,
4
+ gridEntityTypeCustom?: GridEntityType
5
+ ];
6
+ export declare function postGridEntityCustomInitHasSubscriptions(): boolean;
7
+ export declare function postGridEntityCustomInitRegister(...args: PostGridEntityCustomInitRegisterParameters): void;
8
+ export declare function postGridEntityCustomInitFire(gridEntity: GridEntity, gridEntityTypeCustom: GridEntityType): void;
9
+ //# sourceMappingURL=postGridEntityCustomInit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postGridEntityCustomInit.d.ts","sourceRoot":"","sources":["../../../src/callbacks/subscriptions/postGridEntityCustomInit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,oBAAY,0CAA0C,GAAG;IACvD,QAAQ,EAAE,CACR,UAAU,EAAE,UAAU,EACtB,oBAAoB,EAAE,cAAc,KACjC,IAAI;IACT,oBAAoB,CAAC,EAAE,cAAc;CACtC,CAAC;AAIF,wBAAgB,wCAAwC,IAAI,OAAO,CAElE;AAED,wBAAgB,gCAAgC,CAC9C,GAAG,IAAI,EAAE,0CAA0C,GAClD,IAAI,CAEN;AAED,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,UAAU,EACtB,oBAAoB,EAAE,cAAc,GACnC,IAAI,CAYN"}
@@ -0,0 +1,23 @@
1
+ local ____exports = {}
2
+ local subscriptions = {}
3
+ function ____exports.postGridEntityCustomInitHasSubscriptions(self)
4
+ return #subscriptions > 0
5
+ end
6
+ function ____exports.postGridEntityCustomInitRegister(self, ...)
7
+ local args = {...}
8
+ subscriptions[#subscriptions + 1] = args
9
+ end
10
+ function ____exports.postGridEntityCustomInitFire(self, gridEntity, gridEntityTypeCustom)
11
+ for ____, ____value in ipairs(subscriptions) do
12
+ local callback = ____value[1]
13
+ local callbackGridEntityTypeCustom = ____value[2]
14
+ do
15
+ if callbackGridEntityTypeCustom ~= nil and callbackGridEntityTypeCustom ~= gridEntityTypeCustom then
16
+ goto __continue5
17
+ end
18
+ callback(nil, gridEntity, gridEntityTypeCustom)
19
+ end
20
+ ::__continue5::
21
+ end
22
+ end
23
+ return ____exports
@@ -0,0 +1,9 @@
1
+ import { GridEntityType } from "isaac-typescript-definitions";
2
+ export declare type PostGridEntityCustomRemoveRegisterParameters = [
3
+ callback: (gridIndex: int, gridEntityTypeCustom: GridEntityType) => void,
4
+ gridEntityTypeCustom?: GridEntityType
5
+ ];
6
+ export declare function postGridEntityCustomRemoveHasSubscriptions(): boolean;
7
+ export declare function postGridEntityCustomRemoveRegister(...args: PostGridEntityCustomRemoveRegisterParameters): void;
8
+ export declare function postGridEntityCustomRemoveFire(gridIndex: int, gridEntityTypeCustom: GridEntityType): void;
9
+ //# sourceMappingURL=postGridEntityCustomRemove.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postGridEntityCustomRemove.d.ts","sourceRoot":"","sources":["../../../src/callbacks/subscriptions/postGridEntityCustomRemove.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,oBAAY,4CAA4C,GAAG;IACzD,QAAQ,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,oBAAoB,EAAE,cAAc,KAAK,IAAI;IACxE,oBAAoB,CAAC,EAAE,cAAc;CACtC,CAAC;AAIF,wBAAgB,0CAA0C,IAAI,OAAO,CAEpE;AAED,wBAAgB,kCAAkC,CAChD,GAAG,IAAI,EAAE,4CAA4C,GACpD,IAAI,CAEN;AAED,wBAAgB,8BAA8B,CAC5C,SAAS,EAAE,GAAG,EACd,oBAAoB,EAAE,cAAc,GACnC,IAAI,CAYN"}
@@ -0,0 +1,23 @@
1
+ local ____exports = {}
2
+ local subscriptions = {}
3
+ function ____exports.postGridEntityCustomRemoveHasSubscriptions(self)
4
+ return #subscriptions > 0
5
+ end
6
+ function ____exports.postGridEntityCustomRemoveRegister(self, ...)
7
+ local args = {...}
8
+ subscriptions[#subscriptions + 1] = args
9
+ end
10
+ function ____exports.postGridEntityCustomRemoveFire(self, gridIndex, gridEntityTypeCustom)
11
+ for ____, ____value in ipairs(subscriptions) do
12
+ local callback = ____value[1]
13
+ local callbackGridEntityTypeCustom = ____value[2]
14
+ do
15
+ if callbackGridEntityTypeCustom ~= nil and callbackGridEntityTypeCustom ~= gridEntityTypeCustom then
16
+ goto __continue5
17
+ end
18
+ callback(nil, gridIndex, gridEntityTypeCustom)
19
+ end
20
+ ::__continue5::
21
+ end
22
+ end
23
+ return ____exports
@@ -0,0 +1,9 @@
1
+ import { GridEntityType } from "isaac-typescript-definitions";
2
+ export declare type PostGridEntityCustomStateChangedRegisterParameters = [
3
+ callback: (gridEntity: GridEntity, gridEntityTypeCustom: GridEntityType, oldState: int, newState: int) => void,
4
+ gridEntityTypeCustom?: GridEntityType
5
+ ];
6
+ export declare function postGridEntityCustomStateChangedHasSubscriptions(): boolean;
7
+ export declare function postGridEntityCustomStateChangedRegister(...args: PostGridEntityCustomStateChangedRegisterParameters): void;
8
+ export declare function postGridEntityCustomStateChangedFire(gridEntity: GridEntity, gridEntityTypeCustom: GridEntityType, oldState: int, newState: int): void;
9
+ //# sourceMappingURL=postGridEntityCustomStateChanged.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postGridEntityCustomStateChanged.d.ts","sourceRoot":"","sources":["../../../src/callbacks/subscriptions/postGridEntityCustomStateChanged.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,oBAAY,kDAAkD,GAAG;IAC/D,QAAQ,EAAE,CACR,UAAU,EAAE,UAAU,EACtB,oBAAoB,EAAE,cAAc,EACpC,QAAQ,EAAE,GAAG,EACb,QAAQ,EAAE,GAAG,KACV,IAAI;IACT,oBAAoB,CAAC,EAAE,cAAc;CACtC,CAAC;AAIF,wBAAgB,gDAAgD,IAAI,OAAO,CAE1E;AAED,wBAAgB,wCAAwC,CACtD,GAAG,IAAI,EAAE,kDAAkD,GAC1D,IAAI,CAEN;AAED,wBAAgB,oCAAoC,CAClD,UAAU,EAAE,UAAU,EACtB,oBAAoB,EAAE,cAAc,EACpC,QAAQ,EAAE,GAAG,EACb,QAAQ,EAAE,GAAG,GACZ,IAAI,CAYN"}
@@ -0,0 +1,29 @@
1
+ local ____exports = {}
2
+ local subscriptions = {}
3
+ function ____exports.postGridEntityCustomStateChangedHasSubscriptions(self)
4
+ return #subscriptions > 0
5
+ end
6
+ function ____exports.postGridEntityCustomStateChangedRegister(self, ...)
7
+ local args = {...}
8
+ subscriptions[#subscriptions + 1] = args
9
+ end
10
+ function ____exports.postGridEntityCustomStateChangedFire(self, gridEntity, gridEntityTypeCustom, oldState, newState)
11
+ for ____, ____value in ipairs(subscriptions) do
12
+ local callback = ____value[1]
13
+ local callbackGridEntityTypeCustom = ____value[2]
14
+ do
15
+ if callbackGridEntityTypeCustom ~= nil and callbackGridEntityTypeCustom ~= gridEntityTypeCustom then
16
+ goto __continue5
17
+ end
18
+ callback(
19
+ nil,
20
+ gridEntity,
21
+ gridEntityTypeCustom,
22
+ oldState,
23
+ newState
24
+ )
25
+ end
26
+ ::__continue5::
27
+ end
28
+ end
29
+ return ____exports
@@ -1,8 +1,9 @@
1
- import { PlayerType, PlayerVariant, TearFlag } from "isaac-typescript-definitions";
1
+ import { PlayerType, PlayerVariant } from "isaac-typescript-definitions";
2
2
  import { StatType } from "../../enums/StatType";
3
3
  import { StatTypeType } from "../../interfaces/StatTypeType";
4
+ import { PossibleStatType } from "../../types/PossibleStatType";
4
5
  export declare type PostPlayerChangeStatRegisterParameters = [
5
- callback: (player: EntityPlayer, statType: StatType, difference: int, oldValue: number | boolean | BitFlags<TearFlag> | Color | Vector, newValue: number | boolean | BitFlags<TearFlag> | Color | Vector) => void,
6
+ callback: (player: EntityPlayer, statType: StatType, difference: int, oldValue: PossibleStatType, newValue: PossibleStatType) => void,
6
7
  playerVariant?: PlayerVariant,
7
8
  character?: PlayerType
8
9
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"postPlayerChangeStat.d.ts","sourceRoot":"","sources":["../../../src/callbacks/subscriptions/postPlayerChangeStat.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,aAAa,EACb,QAAQ,EACT,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,oBAAY,sCAAsC,GAAG;IACnD,QAAQ,EAAE,CACR,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,GAAG,EACf,QAAQ,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAC,GAAG,KAAK,GAAG,MAAM,EAChE,QAAQ,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAC,GAAG,KAAK,GAAG,MAAM,KAC7D,IAAI;IACT,aAAa,CAAC,EAAE,aAAa;IAC7B,SAAS,CAAC,EAAE,UAAU;CACvB,CAAC;AAIF,wBAAgB,oCAAoC,IAAI,OAAO,CAE9D;AAED,wBAAgB,4BAA4B,CAC1C,GAAG,IAAI,EAAE,sCAAsC,GAC9C,IAAI,CAEN;AAED,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,QAAQ,EACzD,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,CAAC,EACX,UAAU,EAAE,GAAG,EACf,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,EACzB,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,GACxB,IAAI,CAgBN"}
1
+ {"version":3,"file":"postPlayerChangeStat.d.ts","sourceRoot":"","sources":["../../../src/callbacks/subscriptions/postPlayerChangeStat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,oBAAY,sCAAsC,GAAG;IACnD,QAAQ,EAAE,CACR,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,GAAG,EACf,QAAQ,EAAE,gBAAgB,EAC1B,QAAQ,EAAE,gBAAgB,KACvB,IAAI;IACT,aAAa,CAAC,EAAE,aAAa;IAC7B,SAAS,CAAC,EAAE,UAAU;CACvB,CAAC;AAIF,wBAAgB,oCAAoC,IAAI,OAAO,CAE9D;AAED,wBAAgB,4BAA4B,CAC1C,GAAG,IAAI,EAAE,sCAAsC,GAC9C,IAAI,CAEN;AAED,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,QAAQ,EACzD,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,CAAC,EACX,UAAU,EAAE,GAAG,EACf,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,EACzB,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,GACxB,IAAI,CAgBN"}