isaacscript-common 1.2.45 → 1.2.46

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,9 +1,10 @@
1
1
  --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
2
  local ____lualib = require("lualib_bundle")
3
- local Map = ____lualib.Map
3
+ local Set = ____lualib.Set
4
4
  local __TS__New = ____lualib.__TS__New
5
+ local Map = ____lualib.Map
5
6
  local ____exports = {}
6
- local hasSubscriptions, postPEffectUpdateReordered, v
7
+ local hasSubscriptions, postPEffectUpdateReordered, UNUSED_TRANSFORMATIONS, v
7
8
  local ____exports = require("features.saveDataManager.exports")
8
9
  local saveDataManager = ____exports.saveDataManager
9
10
  local ____array = require("functions.array")
@@ -31,16 +32,23 @@ function postPEffectUpdateReordered(self, player)
31
32
  do
32
33
  local playerForm = 0
33
34
  while playerForm < PlayerForm.NUM_PLAYER_FORMS do
34
- local hasForm = player:HasPlayerForm(playerForm)
35
- local storedForm = transformations[playerForm + 1]
36
- if hasForm ~= storedForm then
37
- transformations[playerForm + 1] = hasForm
38
- postTransformationFire(nil, player, playerForm, hasForm)
35
+ do
36
+ if UNUSED_TRANSFORMATIONS:has(playerForm) then
37
+ goto __continue7
38
+ end
39
+ local hasForm = player:HasPlayerForm(playerForm)
40
+ local storedForm = transformations[playerForm + 1]
41
+ if hasForm ~= storedForm then
42
+ transformations[playerForm + 1] = hasForm
43
+ postTransformationFire(nil, player, playerForm, hasForm)
44
+ end
39
45
  end
46
+ ::__continue7::
40
47
  playerForm = playerForm + 1
41
48
  end
42
49
  end
43
50
  end
51
+ UNUSED_TRANSFORMATIONS = __TS__New(Set, {PlayerForm.PLAYERFORM_FLIGHT})
44
52
  v = {run = {transformations = __TS__New(Map)}}
45
53
  function ____exports.postTransformationCallbackInit(self, mod)
46
54
  saveDataManager(nil, "postTransformation", v, hasSubscriptions)
@@ -21,7 +21,7 @@ export declare function disableAllInputs(key: string): void;
21
21
  * Helper function to enable all inputs besides the ones provided. This is useful because
22
22
  * `EntityPlayer.ControlsEnabled` can be changed by the game under certain conditions.
23
23
  *
24
- * Use the `enableAllInputs` helper function to set things back to normal.
24
+ * Use the [[`enableAllInputs`]] helper function to set things back to normal.
25
25
  *
26
26
  * @param key The name of the mod feature that is requesting the enable/disable. This is needed so
27
27
  * that multiple mod features can work in tandem.
@@ -32,7 +32,7 @@ export declare function enableAllInputsExceptFor(key: string, blacklist: Set<But
32
32
  * Helper function to disable all inputs besides the ones provided. This is useful because
33
33
  * `EntityPlayer.ControlsEnabled` can be changed by the game under certain conditions.
34
34
  *
35
- * Use the `enableAllInputs` helper function to set things back to normal.
35
+ * Use the [[`enableAllInputs`]] helper function to set things back to normal.
36
36
  *
37
37
  * @param key The name of the mod feature that is requesting the enable/disable. This is needed so
38
38
  * that multiple mod features can work in tandem.
@@ -44,7 +44,7 @@ export declare function disableAllInputsExceptFor(key: string, whitelist: Set<Bu
44
44
  * the UI). This is useful because `EntityPlayer.ControlsEnabled` can be changed by the game under
45
45
  * certain conditions.
46
46
  *
47
- * Use the `enableAllInputs` helper function to set things back to normal.
47
+ * Use the [[`enableAllInputs`]] helper function to set things back to normal.
48
48
  *
49
49
  * @param key The name of the mod feature that is requesting the enable/disable. This is needed so
50
50
  * that multiple mod features can work in tandem.
@@ -54,7 +54,7 @@ export declare function disableMovementInputs(key: string): void;
54
54
  * Helper function to disable only the inputs used for shooting tears. This is useful because
55
55
  * `EntityPlayer.ControlsEnabled` can be changed by the game under certain conditions.
56
56
  *
57
- * Use the `enableAllInputs` helper function to set things back to normal.
57
+ * Use the [[`enableAllInputs`]] helper function to set things back to normal.
58
58
  *
59
59
  * @param key The name of the mod feature that is requesting the enable/disable. This is needed so
60
60
  * that multiple mod features can work in tandem.
@@ -9,7 +9,7 @@ local __TS__Iterator = ____lualib.__TS__Iterator
9
9
  local __TS__ArrayPush = ____lualib.__TS__ArrayPush
10
10
  local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
11
11
  local ____exports = {}
12
- local getPlayerIndexRNGCollectibleForCharacter, getAdjustedPlayerName, isTaintedModded, EXCLUDED_CHARACTERS
12
+ local getPlayerIndexCollectibleType, getAdjustedPlayerName, isTaintedModded, EXCLUDED_CHARACTERS
13
13
  local ____constants = require("constants")
14
14
  local CHARACTERS_WITH_BLACK_HEART_FROM_ETERNAL_HEART = ____constants.CHARACTERS_WITH_BLACK_HEART_FROM_ETERNAL_HEART
15
15
  local CHARACTERS_WITH_FREE_DEVIL_DEALS = ____constants.CHARACTERS_WITH_FREE_DEVIL_DEALS
@@ -52,12 +52,12 @@ function ____exports.getCharacters(self)
52
52
  end
53
53
  function ____exports.getPlayerIndex(self, player)
54
54
  local character = player:GetPlayerType()
55
- local rngCollectible = getPlayerIndexRNGCollectibleForCharacter(nil, character)
56
- local collectibleRNG = player:GetCollectibleRNG(rngCollectible)
55
+ local collectibleType = getPlayerIndexCollectibleType(nil, character)
56
+ local collectibleRNG = player:GetCollectibleRNG(collectibleType)
57
57
  local seed = collectibleRNG:GetSeed()
58
58
  return seed
59
59
  end
60
- function getPlayerIndexRNGCollectibleForCharacter(self, character)
60
+ function getPlayerIndexCollectibleType(self, character)
61
61
  repeat
62
62
  local ____switch62 = character
63
63
  local ____cond62 = ____switch62 == PlayerType.PLAYER_THESOUL
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.2.45",
3
+ "version": "1.2.46",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",