isaacscript-common 1.0.608-dev.3 → 1.2.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,4 +1,6 @@
1
1
  --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
+ local ____lualib = require("lualib_bundle")
3
+ local Set = ____lualib.Set
2
4
  local ____exports = {}
3
5
  local isActionPressed, isActionTriggered, getActionValue, getReturnValue, v
4
6
  local ____constants = require("constants")
@@ -1,5 +1,6 @@
1
1
  --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
2
  local ____lualib = require("lualib_bundle")
3
+ local Map = ____lualib.Map
3
4
  local __TS__ObjectKeys = ____lualib.__TS__ObjectKeys
4
5
  local ____exports = {}
5
6
  local ____errors = require("errors")
@@ -1,4 +1,6 @@
1
1
  --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
+ local ____lualib = require("lualib_bundle")
3
+ local Map = ____lualib.Map
2
4
  local ____exports = {}
3
5
  local postPlayerInit, preGameExit, postNewLevel, postNewRoomEarly, restoreDefaultsAll, restoreDefaults, clearAndCopyAllElements, mod, loadedDataOnThisRun
4
6
  local ____errors = require("errors")
@@ -1,6 +1,8 @@
1
1
  --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
2
  local ____lualib = require("lualib_bundle")
3
+ local Map = ____lualib.Map
3
4
  local __TS__InstanceOf = ____lualib.__TS__InstanceOf
5
+ local Set = ____lualib.Set
4
6
  local ____exports = {}
5
7
  local mergeArray, mergeTSTLObject, mergeTable, mergeVector
6
8
  local ____constantsInternal = require("constantsInternal")
@@ -1,4 +1,6 @@
1
1
  --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
+ local ____lualib = require("lualib_bundle")
3
+ local Map = ____lualib.Map
2
4
  local ____exports = {}
3
5
  local getAllSaveDataToWriteToDisk
4
6
  local ____deepCopy = require("functions.deepCopy")
@@ -1,5 +1,7 @@
1
1
  --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
2
  local ____lualib = require("lualib_bundle")
3
+ local Map = ____lualib.Map
4
+ local Set = ____lualib.Set
3
5
  local __TS__ArrayPush = ____lualib.__TS__ArrayPush
4
6
  local ____exports = {}
5
7
  local ____cardDescriptionMap = require("maps.cardDescriptionMap")
@@ -1,4 +1,6 @@
1
1
  --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
+ local ____lualib = require("lualib_bundle")
3
+ local Map = ____lualib.Map
2
4
  local ____exports = {}
3
5
  local ____challengeNameMap = require("maps.challengeNameMap")
4
6
  local CHALLENGE_NAME_MAP = ____challengeNameMap.CHALLENGE_NAME_MAP
@@ -1,4 +1,7 @@
1
1
  --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
+ local ____lualib = require("lualib_bundle")
3
+ local Set = ____lualib.Set
4
+ local Map = ____lualib.Map
2
5
  local ____exports = {}
3
6
  local COLLECTIBLE_SPRITE_LAYER, COLLECTIBLE_SHADOW_LAYER
4
7
  local ____constants = require("constants")
@@ -2,8 +2,8 @@
2
2
  local ____lualib = require("lualib_bundle")
3
3
  local Set = ____lualib.Set
4
4
  local __TS__New = ____lualib.__TS__New
5
- local __TS__InstanceOf = ____lualib.__TS__InstanceOf
6
5
  local Map = ____lualib.Map
6
+ local __TS__InstanceOf = ____lualib.__TS__InstanceOf
7
7
  local __TS__Iterator = ____lualib.__TS__Iterator
8
8
  local ____exports = {}
9
9
  local isTSTLClass, copyClass, getNewClassFromMetatable, deepCopyValue, copyVector, checkMetatable, validateValue, TSTL_CLASS_KEYS
@@ -1,8 +1,8 @@
1
1
  --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
2
  local ____lualib = require("lualib_bundle")
3
+ local Set = ____lualib.Set
3
4
  local __TS__ArraySome = ____lualib.__TS__ArraySome
4
5
  local __TS__ArrayPush = ____lualib.__TS__ArrayPush
5
- local Set = ____lualib.Set
6
6
  local __TS__New = ____lualib.__TS__New
7
7
  local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
8
8
  local Map = ____lualib.Map
@@ -1,4 +1,6 @@
1
1
  --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
+ local ____lualib = require("lualib_bundle")
3
+ local Set = ____lualib.Set
2
4
  local ____exports = {}
3
5
  local ____constants = require("constants")
4
6
  local FAMILIARS_THAT_SHOOT_PLAYER_TEARS = ____constants.FAMILIARS_THAT_SHOOT_PLAYER_TEARS
@@ -1,5 +1,6 @@
1
1
  --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
2
  local ____lualib = require("lualib_bundle")
3
+ local Map = ____lualib.Map
3
4
  local Set = ____lualib.Set
4
5
  local __TS__New = ____lualib.__TS__New
5
6
  local __TS__ArrayPush = ____lualib.__TS__ArrayPush
@@ -1,5 +1,6 @@
1
1
  --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
2
  local ____lualib = require("lualib_bundle")
3
+ local Set = ____lualib.Set
3
4
  local __TS__StringReplace = ____lualib.__TS__StringReplace
4
5
  local __TS__ObjectEntries = ____lualib.__TS__ObjectEntries
5
6
  local __TS__Iterator = ____lualib.__TS__Iterator
@@ -1,6 +1,8 @@
1
1
  --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
2
  local ____lualib = require("lualib_bundle")
3
+ local Map = ____lualib.Map
3
4
  local __TS__Iterator = ____lualib.__TS__Iterator
5
+ local Set = ____lualib.Set
4
6
  local ____exports = {}
5
7
  local ____array = require("functions.array")
6
8
  local arrayToString = ____array.arrayToString
@@ -1,4 +1,6 @@
1
1
  --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
+ local ____lualib = require("lualib_bundle")
3
+ local Map = ____lualib.Map
2
4
  local ____exports = {}
3
5
  local ____pillEffectNameMap = require("maps.pillEffectNameMap")
4
6
  local PILL_EFFECT_NAME_MAP = ____pillEffectNameMap.PILL_EFFECT_NAME_MAP
@@ -244,3 +244,8 @@ export declare function setActiveItem(player: EntityPlayer, collectibleType: Col
244
244
  * @param modifyCostume Optional. Whether to add or remove the blindfold costume. True by default.
245
245
  */
246
246
  export declare function setBlindfold(player: EntityPlayer, enabled: boolean, modifyCostume?: boolean): void;
247
+ /**
248
+ * Helper function to use an active item without showing an animation, keeping the item, or adding
249
+ * any costumes.
250
+ */
251
+ export declare function useActiveItemTemp(player: EntityPlayer, collectibleType: CollectibleType): void;
@@ -535,4 +535,13 @@ function ____exports.setBlindfold(self, player, enabled, modifyCostume)
535
535
  end
536
536
  end
537
537
  end
538
+ function ____exports.useActiveItemTemp(self, player, collectibleType)
539
+ player:UseActiveItem(
540
+ collectibleType,
541
+ false,
542
+ false,
543
+ true,
544
+ false
545
+ )
546
+ end
538
547
  return ____exports
@@ -6,6 +6,7 @@ local __TS__ArrayPush = ____lualib.__TS__ArrayPush
6
6
  local Set = ____lualib.Set
7
7
  local __TS__New = ____lualib.__TS__New
8
8
  local __TS__ArrayEvery = ____lualib.__TS__ArrayEvery
9
+ local Map = ____lualib.Map
9
10
  local ____exports = {}
10
11
  local ____constants = require("constants")
11
12
  local GENESIS_ROOM_SUBTYPE = ____constants.GENESIS_ROOM_SUBTYPE
@@ -1,4 +1,7 @@
1
1
  --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
+ local ____lualib = require("lualib_bundle")
3
+ local Map = ____lualib.Map
4
+ local Set = ____lualib.Set
2
5
  local ____exports = {}
3
6
  local ____transformationMaps = require("maps.transformationMaps")
4
7
  local ITEM_TO_TRANSFORMATION_MAP = ____transformationMaps.ITEM_TO_TRANSFORMATION_MAP
@@ -2,6 +2,8 @@
2
2
  local ____exports = {}
3
3
  local ____constants = require("constants")
4
4
  local GOLDEN_TRINKET_SHIFT = ____constants.GOLDEN_TRINKET_SHIFT
5
+ local ____player = require("functions.player")
6
+ local useActiveItemTemp = ____player.useActiveItemTemp
5
7
  function ____exports.temporarilyRemoveTrinket(self, player, trinketType)
6
8
  if not player:HasTrinket(trinketType) then
7
9
  return nil
@@ -54,7 +56,7 @@ function ____exports.giveTrinketsBack(self, player, trinketSituation)
54
56
  local i = 0
55
57
  while i < trinketSituation.numSmeltedTrinkets do
56
58
  player:AddTrinket(trinketSituation.trinketTypeRemoved, false)
57
- player:UseActiveItem(CollectibleType.COLLECTIBLE_SMELTER, UseFlag.USE_NOANIM)
59
+ useActiveItemTemp(nil, player, CollectibleType.COLLECTIBLE_SMELTER)
58
60
  i = i + 1
59
61
  end
60
62
  end
@@ -1,4 +1,6 @@
1
1
  --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
+ local ____lualib = require("lualib_bundle")
3
+ local Map = ____lualib.Map
2
4
  local ____exports = {}
3
5
  local ____constants = require("constants")
4
6
  local GOLDEN_TRINKET_SHIFT = ____constants.GOLDEN_TRINKET_SHIFT
@@ -8,6 +10,8 @@ local ____trinketNameMap = require("maps.trinketNameMap")
8
10
  local TRINKET_NAME_MAP = ____trinketNameMap.TRINKET_NAME_MAP
9
11
  local ____entity = require("functions.entity")
10
12
  local getPickups = ____entity.getPickups
13
+ local ____player = require("functions.player")
14
+ local useActiveItemTemp = ____player.useActiveItemTemp
11
15
  local ____trinketGive = require("functions.trinketGive")
12
16
  local giveTrinketsBack = ____trinketGive.giveTrinketsBack
13
17
  local temporarilyRemoveTrinkets = ____trinketGive.temporarilyRemoveTrinkets
@@ -88,13 +92,7 @@ function ____exports.smeltTrinket(self, player, trinketType, numTrinkets)
88
92
  local i = 0
89
93
  while i < numTrinkets do
90
94
  player:AddTrinket(trinketType)
91
- player:UseActiveItem(
92
- CollectibleType.COLLECTIBLE_SMELTER,
93
- false,
94
- false,
95
- true,
96
- false
97
- )
95
+ useActiveItemTemp(nil, player, CollectibleType.COLLECTIBLE_SMELTER)
98
96
  i = i + 1
99
97
  end
100
98
  end
@@ -1,9 +1,9 @@
1
1
  --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
2
  local ____lualib = require("lualib_bundle")
3
+ local Set = ____lualib.Set
3
4
  local __TS__Iterator = ____lualib.__TS__Iterator
4
5
  local Map = ____lualib.Map
5
6
  local __TS__New = ____lualib.__TS__New
6
- local Set = ____lualib.Set
7
7
  local __TS__ArrayPush = ____lualib.__TS__ArrayPush
8
8
  local __TS__ArraySort = ____lualib.__TS__ArraySort
9
9
  local __TS__StringReplace = ____lualib.__TS__StringReplace
@@ -86,6 +86,8 @@ local sirenHelpersInit = ____sirenHelpers.sirenHelpersInit
86
86
  local ____initialized = require("initialized")
87
87
  local areFeaturesInitialized = ____initialized.areFeaturesInitialized
88
88
  local setFeaturesInitialized = ____initialized.setFeaturesInitialized
89
+ local ____patchErrorFunctions = require("patchErrorFunctions")
90
+ local patchErrorFunction = ____patchErrorFunctions.patchErrorFunction
89
91
  local ____ModUpgraded = require("types.ModUpgraded")
90
92
  local ModUpgraded = ____ModUpgraded.ModUpgraded
91
93
  function initCustomCallbacks(self, mod)
@@ -134,6 +136,7 @@ function ____exports.upgradeMod(self, modVanilla, verbose)
134
136
  if verbose == nil then
135
137
  verbose = false
136
138
  end
139
+ patchErrorFunction(nil)
137
140
  local mod = __TS__New(ModUpgraded, modVanilla, verbose)
138
141
  if not areFeaturesInitialized(nil) then
139
142
  setFeaturesInitialized(nil)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.0.608-dev.3",
3
+ "version": "1.2.1",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",
@@ -25,8 +25,8 @@
25
25
  "dist/**/*.d.ts"
26
26
  ],
27
27
  "devDependencies": {
28
- "@zamiell/typescript-to-lua": "^1.3.6",
29
- "isaac-typescript-definitions": "^1.0.333",
28
+ "@zamiell/typescript-to-lua": "^1.4.0",
29
+ "isaac-typescript-definitions": "^1.0.334",
30
30
  "isaacscript-lint": "^1.0.79",
31
31
  "isaacscript-tsconfig": "^1.1.8",
32
32
  "typedoc": "^0.22.11",