isaacscript-common 1.2.84 → 1.2.87

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.
@@ -45,7 +45,7 @@ function checkPickupsPurchased(self, pickups, players)
45
45
  nil,
46
46
  player,
47
47
  pickupDescription.variant,
48
- pickupDescription.subtype,
48
+ pickupDescription.subType,
49
49
  pickupDescription.price
50
50
  )
51
51
  end
@@ -70,7 +70,7 @@ function storePickupsInMap(self, pickups)
70
70
  function(____, pickup) return pickup.Price ~= 0 end
71
71
  )
72
72
  for ____, pickup in ipairs(pickupsWithPrice) do
73
- v.room.pickupMap:set(pickup.Index, {variant = pickup.Variant, subtype = pickup.SubType, price = pickup.Price})
73
+ v.room.pickupMap:set(pickup.Index, {variant = pickup.Variant, subType = pickup.SubType, price = pickup.Price})
74
74
  end
75
75
  end
76
76
  function storePlayersInMap(self, players)
@@ -4,8 +4,8 @@
4
4
  * beginning of every run.
5
5
  *
6
6
  * @param familiarVariant The familiar variant to blacklist.
7
- * @param familiarSubType The subtype to blacklist. Optional. The default is to blacklist all
8
- * subtypes of the given variant.
7
+ * @param familiarSubType The sub-type to blacklist. Optional. The default is to blacklist all
8
+ * sub-types of the given variant.
9
9
  */
10
10
  export declare function setFamiliarNoSirenSteal(familiarVariant: FamiliarVariant | int, familiarSubType?: int): void;
11
11
  /**
@@ -0,0 +1,3 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ export declare function testInit(mod: Mod): void;
3
+ export declare function test(): void;
@@ -0,0 +1,24 @@
1
+ --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
+ local ____lualib = require("lualib_bundle")
3
+ local Set = ____lualib.Set
4
+ local __TS__New = ____lualib.__TS__New
5
+ local ____exports = {}
6
+ local postPEffectUpdate
7
+ local ____errors = require("errors")
8
+ local getUpgradeErrorMsg = ____errors.getUpgradeErrorMsg
9
+ function postPEffectUpdate(self, _player)
10
+ end
11
+ local FEATURE_NAME = "test"
12
+ local initialized = false
13
+ local v = {run = {playersIsPonyActive = __TS__New(Set)}}
14
+ function ____exports.testInit(self, mod)
15
+ initialized = true
16
+ mod:AddCallback(ModCallbacks.MC_POST_PEFFECT_UPDATE, postPEffectUpdate)
17
+ end
18
+ function ____exports.test(self)
19
+ if not initialized then
20
+ local msg = getUpgradeErrorMsg(nil, FEATURE_NAME)
21
+ error(msg)
22
+ end
23
+ end
24
+ return ____exports
@@ -23,15 +23,11 @@ export declare function getCurrentRoomDescriptorReadOnly(): RoomDescriptorReadOn
23
23
  */
24
24
  export declare function getRoomData(roomGridIndex?: int): RoomConfig | undefined;
25
25
  /**
26
- * Helper function to get the type of a room from the XML/STB data. The room data type will
27
- * correspond to different things depending on what XML/STB file it draws from. For example, in the
28
- * "00.special rooms.stb" file, a room type of 2 corresponds to a shop, a room type of 3 corresponds
29
- * to an I AM ERROR room, and so on.
26
+ * Helper function for getting the type of the room with the given grid index.
30
27
  *
31
- * @param roomGridIndex Optional. Equal to the current room index by default.
32
28
  * @returns The room data type. Returns -1 if the type was not found.
33
29
  */
34
- export declare function getRoomDataType(roomGridIndex?: int): int;
30
+ export declare function getRoomType(roomGridIndex: int): RoomType;
35
31
  /**
36
32
  * Helper function to get the descriptor for a room.
37
33
  *
@@ -97,13 +93,13 @@ export declare function getRoomSafeGridIndex(roomGridIndex?: int): int;
97
93
  */
98
94
  export declare function getRoomStageID(roomGridIndex?: int): StageID;
99
95
  /**
100
- * Helper function to get the subtype for a room from the XML/STB data. The room subtype will
96
+ * Helper function to get the sub-type for a room from the XML/STB data. The room sub-type will
101
97
  * correspond to different things depending on what XML/STB file it draws from. For example, in the
102
- * "00.special rooms.stb" file, an Angel Room with a subtype of 0 will correspond to a normal Angel
103
- * Room and a subtype of 1 will correspond to an Angel Room shop for The Stairway.
98
+ * "00.special rooms.stb" file, an Angel Room with a sub-type of 0 will correspond to a normal Angel
99
+ * Room and a sub-type of 1 will correspond to an Angel Room shop for The Stairway.
104
100
  *
105
101
  * @param roomGridIndex Optional. Equal to the current room index by default.
106
- * @returns The room subtype. Returns -1 if the subtype was not found.
102
+ * @returns The room sub-type. Returns -1 if the sub-type was not found.
107
103
  */
108
104
  export declare function getRoomSubType(roomGridIndex?: int): int;
109
105
  /**
@@ -129,7 +129,7 @@ function ____exports.getCurrentDimension(self)
129
129
  end
130
130
  return error("Failed to get the current dimension using the starting room index of: " .. tostring(startingRoomGridIndex))
131
131
  end
132
- function ____exports.getRoomDataType(self, roomGridIndex)
132
+ function ____exports.getRoomType(self, roomGridIndex)
133
133
  local roomData = ____exports.getRoomData(nil, roomGridIndex)
134
134
  return roomData == nil and -1 or roomData.Type
135
135
  end
package/dist/index.d.ts CHANGED
@@ -4,7 +4,6 @@ export { deployJSONRoom, deployRandomJSONRoom, emptyRoom, } from "./features/dep
4
4
  export { disableAllInputs, disableAllInputsExceptFor, disableMovementInputs, disableShootingInputs, enableAllInputs, enableAllInputsExceptFor, } from "./features/disableInputs";
5
5
  export { forgottenSwitch } from "./features/forgottenSwitch";
6
6
  export { getCollectibleItemPoolType } from "./features/getCollectibleItemPoolType";
7
- export { isPonyActive } from "./features/isPonyActive";
8
7
  export { preventCollectibleRotate } from "./features/preventCollectibleRotate";
9
8
  export { runInNGameFrames, runInNRenderFrames, runNextGameFrame, runNextRenderFrame, } from "./features/runInNFrames";
10
9
  export * from "./features/saveDataManager/exports";
package/dist/index.lua CHANGED
@@ -49,11 +49,6 @@ do
49
49
  local getCollectibleItemPoolType = ____getCollectibleItemPoolType.getCollectibleItemPoolType
50
50
  ____exports.getCollectibleItemPoolType = getCollectibleItemPoolType
51
51
  end
52
- do
53
- local ____isPonyActive = require("features.isPonyActive")
54
- local isPonyActive = ____isPonyActive.isPonyActive
55
- ____exports.isPonyActive = isPonyActive
56
- end
57
52
  do
58
53
  local ____preventCollectibleRotate = require("features.preventCollectibleRotate")
59
54
  local preventCollectibleRotate = ____preventCollectibleRotate.preventCollectibleRotate
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.2.84",
3
+ "version": "1.2.87",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",