isaacscript-common 7.0.0 → 7.2.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.
- package/dist/callbacks/postPlayerChangeHealth.lua +8 -1
- package/dist/callbacks/postPlayerChangeStat.d.ts +3 -0
- package/dist/callbacks/postPlayerChangeStat.d.ts.map +1 -0
- package/dist/callbacks/postPlayerChangeStat.lua +88 -0
- package/dist/callbacks/subscriptions/postPlayerChangeHealth.d.ts +2 -2
- package/dist/callbacks/subscriptions/postPlayerChangeHealth.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postPlayerChangeHealth.lua +9 -2
- package/dist/callbacks/subscriptions/postPlayerChangeStat.d.ts +12 -0
- package/dist/callbacks/subscriptions/postPlayerChangeStat.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postPlayerChangeStat.lua +35 -0
- package/dist/classes/DefaultMap.d.ts +5 -5
- package/dist/classes/DefaultMap.d.ts.map +1 -1
- package/dist/core/constants.d.ts +1 -1
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/core/constants.lua +1 -1
- package/dist/enums/AmbushType.d.ts +1 -0
- package/dist/enums/AmbushType.d.ts.map +1 -1
- package/dist/enums/AmbushType.lua +1 -0
- package/dist/enums/CornerType.d.ts +1 -0
- package/dist/enums/CornerType.d.ts.map +1 -1
- package/dist/enums/CornerType.lua +1 -0
- package/dist/enums/ModCallbackCustom.d.ts +70 -39
- package/dist/enums/ModCallbackCustom.d.ts.map +1 -1
- package/dist/enums/ModCallbackCustom.lua +37 -35
- package/dist/enums/PocketItemType.d.ts +1 -0
- package/dist/enums/PocketItemType.d.ts.map +1 -1
- package/dist/enums/PocketItemType.lua +1 -0
- package/dist/enums/RockAltType.d.ts +1 -0
- package/dist/enums/RockAltType.d.ts.map +1 -1
- package/dist/enums/RockAltType.lua +1 -0
- package/dist/enums/SerializationType.d.ts +1 -0
- package/dist/enums/SerializationType.d.ts.map +1 -1
- package/dist/enums/SerializationType.lua +1 -0
- package/dist/enums/SlotDestructionType.d.ts +1 -0
- package/dist/enums/SlotDestructionType.d.ts.map +1 -1
- package/dist/enums/SlotDestructionType.lua +1 -0
- package/dist/enums/StatType.d.ts +28 -0
- package/dist/enums/StatType.d.ts.map +1 -0
- package/dist/enums/StatType.lua +28 -0
- package/dist/enums/index.d.ts +1 -0
- package/dist/enums/index.d.ts.map +1 -1
- package/dist/enums/index.lua +8 -0
- package/dist/enums/private/CopyableIsaacAPIClassType.d.ts +5 -1
- package/dist/enums/private/CopyableIsaacAPIClassType.d.ts.map +1 -1
- package/dist/enums/private/CopyableIsaacAPIClassType.lua +3 -1
- package/dist/enums/private/SerializationBrand.d.ts +1 -0
- package/dist/enums/private/SerializationBrand.d.ts.map +1 -1
- package/dist/enums/private/SerializationBrand.lua +1 -0
- package/dist/features/customStage/backdrop.d.ts +1 -1
- package/dist/features/customStage/backdrop.d.ts.map +1 -1
- package/dist/features/customStage/backdrop.lua +1 -1
- package/dist/features/customStage/init.lua +2 -2
- package/dist/features/customStage/versusScreen.lua +2 -2
- package/dist/features/saveDataManager/merge.d.ts +1 -0
- package/dist/features/saveDataManager/merge.d.ts.map +1 -1
- package/dist/features/saveDataManager/merge.lua +1 -0
- package/dist/functions/bitSet128.d.ts +25 -0
- package/dist/functions/bitSet128.d.ts.map +1 -0
- package/dist/functions/bitSet128.lua +71 -0
- package/dist/functions/cacheFlag.d.ts +23 -1
- package/dist/functions/cacheFlag.d.ts.map +1 -1
- package/dist/functions/cacheFlag.lua +78 -0
- package/dist/functions/collectibles.d.ts +2 -2
- package/dist/functions/collectibles.lua +2 -2
- package/dist/functions/color.d.ts +1 -1
- package/dist/functions/color.d.ts.map +1 -1
- package/dist/functions/color.lua +2 -2
- package/dist/functions/deepCopy.d.ts +1 -0
- package/dist/functions/deepCopy.d.ts.map +1 -1
- package/dist/functions/deepCopy.lua +1 -0
- package/dist/functions/familiars.d.ts +4 -4
- package/dist/functions/familiars.lua +4 -4
- package/dist/functions/flag.d.ts +1 -1
- package/dist/functions/flag.lua +1 -1
- package/dist/functions/flying.lua +2 -2
- package/dist/functions/index.d.ts +2 -1
- package/dist/functions/index.d.ts.map +1 -1
- package/dist/functions/index.lua +16 -8
- package/dist/functions/input.d.ts +4 -1
- package/dist/functions/input.d.ts.map +1 -1
- package/dist/functions/input.lua +10 -2
- package/dist/functions/jsonRoom.lua +4 -4
- package/dist/functions/kColor.d.ts +1 -1
- package/dist/functions/kColor.d.ts.map +1 -1
- package/dist/functions/kColor.lua +2 -2
- package/dist/functions/log.lua +1 -1
- package/dist/functions/npcs.d.ts +2 -2
- package/dist/functions/npcs.lua +2 -2
- package/dist/functions/playerIndex.d.ts +1 -1
- package/dist/functions/playerIndex.lua +1 -1
- package/dist/functions/playerStats.d.ts +6 -0
- package/dist/functions/playerStats.d.ts.map +1 -0
- package/dist/functions/playerStats.lua +21 -0
- package/dist/functions/players.d.ts +1 -1
- package/dist/functions/players.lua +1 -1
- package/dist/functions/rng.d.ts +1 -1
- package/dist/functions/rng.d.ts.map +1 -1
- package/dist/functions/rng.lua +2 -2
- package/dist/functions/rockAlt.d.ts.map +1 -1
- package/dist/functions/rockAlt.lua +11 -20
- package/dist/functions/roomTransition.d.ts +1 -1
- package/dist/functions/roomTransition.lua +1 -1
- package/dist/functions/rooms.d.ts +1 -1
- package/dist/functions/rooms.d.ts.map +1 -1
- package/dist/functions/rooms.lua +2 -1
- package/dist/functions/sprites.d.ts +3 -3
- package/dist/functions/sprites.lua +3 -3
- package/dist/functions/tears.d.ts +5 -4
- package/dist/functions/tears.d.ts.map +1 -1
- package/dist/functions/tears.lua +5 -4
- package/dist/functions/utils.d.ts +4 -1
- package/dist/functions/utils.d.ts.map +1 -1
- package/dist/functions/utils.lua +4 -1
- package/dist/functions/vector.d.ts +1 -1
- package/dist/functions/vector.d.ts.map +1 -1
- package/dist/functions/vector.lua +2 -2
- package/dist/initCustomCallbacks.d.ts.map +1 -1
- package/dist/initCustomCallbacks.lua +3 -0
- package/dist/interfaces/ChargeBarSprites.d.ts +1 -1
- package/dist/interfaces/Corner.d.ts +5 -0
- package/dist/interfaces/Corner.d.ts.map +1 -1
- package/dist/interfaces/CustomStageLua.d.ts +57 -0
- package/dist/interfaces/CustomStageLua.d.ts.map +1 -1
- package/dist/interfaces/GridEntityCustomData.d.ts +6 -0
- package/dist/interfaces/GridEntityCustomData.d.ts.map +1 -1
- package/dist/interfaces/JSONRoomsFile.d.ts +7 -3
- package/dist/interfaces/JSONRoomsFile.d.ts.map +1 -1
- package/dist/interfaces/PlayerHealth.d.ts +1 -1
- package/dist/interfaces/PlayerHealth.d.ts.map +1 -1
- package/dist/interfaces/PocketItemDescription.d.ts +1 -1
- package/dist/interfaces/PocketItemDescription.d.ts.map +1 -1
- package/dist/interfaces/RoomDescription.d.ts +1 -1
- package/dist/interfaces/RoomDescription.d.ts.map +1 -1
- package/dist/interfaces/SaveData.d.ts +2 -5
- package/dist/interfaces/SaveData.d.ts.map +1 -1
- package/dist/interfaces/StatTypeType.d.ts +21 -0
- package/dist/interfaces/StatTypeType.d.ts.map +1 -0
- package/dist/interfaces/StatTypeType.lua +4 -0
- package/dist/interfaces/TrinketSituation.d.ts +1 -1
- package/dist/interfaces/TrinketSituation.d.ts.map +1 -1
- package/dist/interfaces/index.d.ts +1 -0
- package/dist/interfaces/index.d.ts.map +1 -1
- package/dist/interfaces/private/AddCallbackParameterCustom.d.ts +2 -0
- package/dist/interfaces/private/AddCallbackParameterCustom.d.ts.map +1 -1
- package/dist/maps/keyboardToString.d.ts +4 -0
- package/dist/maps/keyboardToString.d.ts.map +1 -0
- package/dist/maps/keyboardToString.lua +73 -0
- package/dist/objects/callbackRegisterFunctions.d.ts.map +1 -1
- package/dist/objects/callbackRegisterFunctions.lua +3 -0
- package/dist/objects/isaacAPIClassTypeToBrand.d.ts.map +1 -1
- package/dist/objects/isaacAPIClassTypeToBrand.lua +7 -1
- package/dist/objects/isaacAPIClassTypeToFunctions.d.ts.map +1 -1
- package/dist/objects/isaacAPIClassTypeToFunctions.lua +12 -1
- package/dist/types/AnyEntity.d.ts +5 -0
- package/dist/types/AnyEntity.d.ts.map +1 -1
- package/dist/types/AnyGridEntity.d.ts +5 -0
- package/dist/types/AnyGridEntity.d.ts.map +1 -1
- package/dist/types/CollectibleIndex.d.ts +4 -3
- package/dist/types/CollectibleIndex.d.ts.map +1 -1
- package/dist/types/Immutable.d.ts +3 -1
- package/dist/types/Immutable.d.ts.map +1 -1
- package/dist/types/PickupIndex.d.ts +4 -2
- package/dist/types/PickupIndex.d.ts.map +1 -1
- package/dist/types/PlayerIndex.d.ts +3 -2
- package/dist/types/PlayerIndex.d.ts.map +1 -1
- package/dist/types/SerializedIsaacAPIClass.d.ts +6 -0
- package/dist/types/SerializedIsaacAPIClass.d.ts.map +1 -1
- package/dist/types/TSTLClass.d.ts +5 -0
- package/dist/types/TSTLClass.d.ts.map +1 -1
- package/dist/types/TrapdoorDestination.d.ts +3 -0
- package/dist/types/TrapdoorDestination.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/callbacks/postPlayerChangeHealth.ts +7 -1
- package/src/callbacks/postPlayerChangeStat.ts +110 -0
- package/src/callbacks/subscriptions/postPlayerChangeHealth.ts +5 -1
- package/src/callbacks/subscriptions/postPlayerChangeStat.ts +55 -0
- package/src/classes/DefaultMap.ts +7 -7
- package/src/core/constants.ts +1 -1
- package/src/enums/AmbushType.ts +1 -0
- package/src/enums/CornerType.ts +1 -0
- package/src/enums/ModCallbackCustom.ts +36 -4
- package/src/enums/PocketItemType.ts +1 -0
- package/src/enums/RockAltType.ts +1 -0
- package/src/enums/SerializationType.ts +1 -0
- package/src/enums/SlotDestructionType.ts +1 -0
- package/src/enums/StatType.ts +47 -0
- package/src/enums/index.ts +1 -0
- package/src/enums/indexTypeDoc.ts +1 -0
- package/src/enums/private/CopyableIsaacAPIClassType.ts +5 -1
- package/src/enums/private/SerializationBrand.ts +1 -0
- package/src/features/customStage/backdrop.ts +1 -1
- package/src/features/customStage/init.ts +2 -2
- package/src/features/customStage/versusScreen.ts +2 -2
- package/src/features/fastReset.ts +1 -1
- package/src/features/indexTypeDoc.ts +2 -1
- package/src/features/saveDataManager/merge.ts +1 -0
- package/src/functions/bitSet128.ts +96 -0
- package/src/functions/cacheFlag.ts +90 -1
- package/src/functions/collectibles.ts +2 -2
- package/src/functions/color.ts +3 -2
- package/src/functions/deepCopy.ts +1 -0
- package/src/functions/familiars.ts +4 -4
- package/src/functions/flag.ts +1 -1
- package/src/functions/flying.ts +1 -1
- package/src/functions/index.ts +2 -1
- package/src/functions/indexTypeDoc.ts +2 -1
- package/src/functions/input.ts +15 -2
- package/src/functions/jsonRoom.ts +4 -4
- package/src/functions/kColor.ts +2 -2
- package/src/functions/log.ts +1 -1
- package/src/functions/npcs.ts +2 -2
- package/src/functions/playerIndex.ts +1 -1
- package/src/functions/playerStats.ts +25 -0
- package/src/functions/players.ts +1 -1
- package/src/functions/rng.ts +2 -2
- package/src/functions/rockAlt.ts +28 -13
- package/src/functions/roomTransition.ts +1 -1
- package/src/functions/rooms.ts +2 -1
- package/src/functions/sprites.ts +3 -3
- package/src/functions/tears.ts +5 -4
- package/src/functions/utils.ts +5 -1
- package/src/functions/vector.ts +2 -2
- package/src/initCustomCallbacks.ts +2 -0
- package/src/interfaces/ChargeBarSprites.ts +1 -1
- package/src/interfaces/Corner.ts +5 -0
- package/src/interfaces/CustomStageLua.ts +66 -0
- package/src/interfaces/GridEntityCustomData.ts +6 -0
- package/src/interfaces/JSONRoomsFile.ts +7 -3
- package/src/interfaces/PlayerHealth.ts +1 -1
- package/src/interfaces/PocketItemDescription.ts +1 -1
- package/src/interfaces/RoomDescription.ts +1 -1
- package/src/interfaces/SaveData.ts +1 -5
- package/src/interfaces/StatTypeType.ts +21 -0
- package/src/interfaces/TrinketSituation.ts +1 -1
- package/src/interfaces/index.ts +1 -0
- package/src/interfaces/indexTypeDoc.ts +1 -0
- package/src/interfaces/private/AddCallbackParameterCustom.ts +2 -0
- package/src/maps/keyboardToString.ts +77 -0
- package/src/objects/callbackRegisterFunctions.ts +2 -0
- package/src/objects/isaacAPIClassTypeToBrand.ts +1 -0
- package/src/objects/isaacAPIClassTypeToFunctions.ts +12 -0
- package/src/types/AnyEntity.ts +5 -0
- package/src/types/AnyGridEntity.ts +5 -0
- package/src/types/CollectibleIndex.ts +4 -3
- package/src/types/Immutable.ts +3 -1
- package/src/types/PickupIndex.ts +4 -2
- package/src/types/PlayerIndex.ts +3 -2
- package/src/types/SerializedIsaacAPIClass.ts +6 -0
- package/src/types/TSTLClass.ts +5 -0
- package/src/types/TrapdoorDestination.ts +3 -0
- package/dist/functions/collectibleCacheFlag.d.ts +0 -24
- package/dist/functions/collectibleCacheFlag.d.ts.map +0 -1
- package/dist/functions/collectibleCacheFlag.lua +0 -80
- package/src/functions/collectibleCacheFlag.ts +0 -90
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/functions/input.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,UAAU,EAEV,QAAQ,EACT,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/functions/input.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,UAAU,EAEV,QAAQ,EACT,MAAM,8BAA8B,CAAC;AAuCtC,iFAAiF;AACjF,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAOjE;AAED,wBAAgB,cAAc,IAAI,GAAG,CAAC,YAAY,CAAC,CAElD;AAED,wBAAgB,eAAe,IAAI,GAAG,CAAC,YAAY,CAAC,CAEnD;AAED,gGAAgG;AAChG,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAK7E;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,YAAY,EAAE,YAAY,GACzB,OAAO,CAKT;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO,CAI9D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C;AAED,wBAAgB,YAAY,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAEhE;AAED,wBAAgB,6BAA6B,IAAI,OAAO,CAIvD;AAED,wBAAgB,+BAA+B,IAAI,OAAO,CAIzD;AAED,wBAAgB,aAAa,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAEjE;AAED,wBAAgB,8BAA8B,IAAI,OAAO,CAIxD;AAED,wBAAgB,gCAAgC,IAAI,OAAO,CAI1D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,OAAO,GACjB,MAAM,GAAG,SAAS,CAQpB"}
|
package/dist/functions/input.lua
CHANGED
|
@@ -8,6 +8,8 @@ local ButtonAction = ____isaac_2Dtypescript_2Ddefinitions.ButtonAction
|
|
|
8
8
|
local Controller = ____isaac_2Dtypescript_2Ddefinitions.Controller
|
|
9
9
|
local ControllerIndex = ____isaac_2Dtypescript_2Ddefinitions.ControllerIndex
|
|
10
10
|
local Keyboard = ____isaac_2Dtypescript_2Ddefinitions.Keyboard
|
|
11
|
+
local ____keyboardToString = require("maps.keyboardToString")
|
|
12
|
+
local KEYBOARD_TO_STRING = ____keyboardToString.KEYBOARD_TO_STRING
|
|
11
13
|
local ____enums = require("functions.enums")
|
|
12
14
|
local getEnumValues = ____enums.getEnumValues
|
|
13
15
|
local ____set = require("functions.set")
|
|
@@ -109,7 +111,13 @@ function ____exports.isShootActionTriggeredOnAnyInput(self)
|
|
|
109
111
|
function(____, shootAction) return ____exports.isActionTriggeredOnAnyInput(nil, shootAction) end
|
|
110
112
|
)
|
|
111
113
|
end
|
|
112
|
-
function
|
|
113
|
-
|
|
114
|
+
--- Helper function to get the string that would be typed if someone pressed the corresponding key.
|
|
115
|
+
function ____exports.keyboardToString(self, keyboard, uppercase)
|
|
116
|
+
local tuple = KEYBOARD_TO_STRING:get(keyboard)
|
|
117
|
+
if tuple == nil then
|
|
118
|
+
return nil
|
|
119
|
+
end
|
|
120
|
+
local lowercaseCharacter, uppercaseCharacter = table.unpack(tuple)
|
|
121
|
+
return uppercase and uppercaseCharacter or lowercaseCharacter
|
|
114
122
|
end
|
|
115
123
|
return ____exports
|
|
@@ -52,7 +52,7 @@ function ____exports.getJSONRoomDoorSlotFlags(self, jsonRoom)
|
|
|
52
52
|
local roomShapeString = jsonRoom["$"].shape
|
|
53
53
|
local roomShapeNumber = tonumber(roomShapeString)
|
|
54
54
|
if roomShapeNumber == nil then
|
|
55
|
-
error("Failed to parse the \"shape\"
|
|
55
|
+
error("Failed to parse the \"shape\" field of a JSON room: " .. roomShapeString)
|
|
56
56
|
end
|
|
57
57
|
local roomShape = roomShapeNumber
|
|
58
58
|
local doorSlotFlags = DoorSlotFlagZero
|
|
@@ -60,7 +60,7 @@ function ____exports.getJSONRoomDoorSlotFlags(self, jsonRoom)
|
|
|
60
60
|
do
|
|
61
61
|
local existsString = door["$"].exists
|
|
62
62
|
if existsString ~= "True" and existsString ~= "False" then
|
|
63
|
-
error("Failed to parse the \"exists\"
|
|
63
|
+
error("Failed to parse the \"exists\" field of a JSON room door: " .. existsString)
|
|
64
64
|
end
|
|
65
65
|
if existsString == "False" then
|
|
66
66
|
goto __continue4
|
|
@@ -68,12 +68,12 @@ function ____exports.getJSONRoomDoorSlotFlags(self, jsonRoom)
|
|
|
68
68
|
local xString = door["$"].x
|
|
69
69
|
local x = tonumber(xString)
|
|
70
70
|
if x == nil then
|
|
71
|
-
error("Failed to parse the \"x\"
|
|
71
|
+
error("Failed to parse the \"x\" field of a JSON room door: " .. xString)
|
|
72
72
|
end
|
|
73
73
|
local yString = door["$"].y
|
|
74
74
|
local y = tonumber(yString)
|
|
75
75
|
if y == nil then
|
|
76
|
-
error("Failed to parse the \"y\"
|
|
76
|
+
error("Failed to parse the \"y\" field of a JSON room door: " .. yString)
|
|
77
77
|
end
|
|
78
78
|
local doorSlot = getRoomShapeDoorSlot(nil, roomShape, x, y)
|
|
79
79
|
if doorSlot == nil then
|
|
@@ -20,7 +20,7 @@ export declare function deserializeKColor(kColor: SerializedKColor): KColor;
|
|
|
20
20
|
* @param alpha Optional. The alpha value to use. Default is 1.
|
|
21
21
|
*/
|
|
22
22
|
export declare function getRandomKColor(seedOrRNG?: Seed | RNG, alpha?: number): KColor;
|
|
23
|
-
/** Helper function to check if something is an instantiated KColor object. */
|
|
23
|
+
/** Helper function to check if something is an instantiated `KColor` object. */
|
|
24
24
|
export declare function isKColor(object: unknown): object is KColor;
|
|
25
25
|
/**
|
|
26
26
|
* Used to determine is the given table is a serialized `KColor` object created by the save data
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kColor.d.ts","sourceRoot":"","sources":["../../src/functions/kColor.ts"],"names":[],"mappings":";;;;AAOA,oBAAY,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACvD,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;CAC1C,CAAC;AAKF,0DAA0D;AAC1D,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAQjD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAmClE;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,KAAK,SAAI,GACR,MAAM,CAQR;AAED,
|
|
1
|
+
{"version":3,"file":"kColor.d.ts","sourceRoot":"","sources":["../../src/functions/kColor.ts"],"names":[],"mappings":";;;;AAOA,oBAAY,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACvD,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;CAC1C,CAAC;AAKF,0DAA0D;AAC1D,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAQjD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAmClE;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,KAAK,SAAI,GACR,MAAM,CAQR;AAED,gFAAgF;AAChF,wBAAgB,QAAQ,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,MAAM,CAE1D;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,OAAO,GACd,MAAM,IAAI,gBAAgB,CAQ5B;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAEtE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAWhE"}
|
|
@@ -17,12 +17,12 @@ local getNumbersFromTable = ____table.getNumbersFromTable
|
|
|
17
17
|
local tableHasKeys = ____table.tableHasKeys
|
|
18
18
|
local ____types = require("functions.types")
|
|
19
19
|
local isTable = ____types.isTable
|
|
20
|
-
--- Helper function to check if something is an instantiated KColor object.
|
|
20
|
+
--- Helper function to check if something is an instantiated `KColor` object.
|
|
21
21
|
function ____exports.isKColor(self, object)
|
|
22
22
|
return isIsaacAPIClassOfType(nil, object, OBJECT_NAME)
|
|
23
23
|
end
|
|
24
|
-
local KEYS = {"Red", "Green", "Blue", "Alpha"}
|
|
25
24
|
OBJECT_NAME = "KColor"
|
|
25
|
+
local KEYS = {"Red", "Green", "Blue", "Alpha"}
|
|
26
26
|
--- Helper function to copy a `KColor` Isaac API class.
|
|
27
27
|
function ____exports.copyKColor(self, kColor)
|
|
28
28
|
if not ____exports.isKColor(nil, kColor) then
|
package/dist/functions/log.lua
CHANGED
|
@@ -369,7 +369,7 @@ end
|
|
|
369
369
|
--- Helper function to enumerate all of the properties of a "userdata" object (i.e. an object from
|
|
370
370
|
-- the Isaac API).
|
|
371
371
|
function ____exports.logUserdata(userdata)
|
|
372
|
-
if isUserdata(nil, userdata) then
|
|
372
|
+
if not isUserdata(nil, userdata) then
|
|
373
373
|
____exports.log("Userdata: [not userdata]")
|
|
374
374
|
return
|
|
375
375
|
end
|
package/dist/functions/npcs.d.ts
CHANGED
|
@@ -24,8 +24,8 @@ export declare function isAliveExceptionNPC(npc: EntityNPC): boolean;
|
|
|
24
24
|
* that is spawned when the boss does the multi-stomp attack.
|
|
25
25
|
*
|
|
26
26
|
* When this attack occurs, four extra copies of Daddy Long Legs will be spawned with the same
|
|
27
|
-
* entity type, variant, and sub-type. The `Entity.Parent`
|
|
28
|
-
*
|
|
27
|
+
* entity type, variant, and sub-type. The `Entity.Parent` field will be undefined in this case, so
|
|
28
|
+
* the way to tell them apart is to check for a non-undefined `Entity.SpawnerEntity` field.
|
|
29
29
|
*/
|
|
30
30
|
export declare function isDaddyLongLegsChildStompEntity(npc: EntityNPC): boolean;
|
|
31
31
|
/**
|
package/dist/functions/npcs.lua
CHANGED
|
@@ -50,8 +50,8 @@ end
|
|
|
50
50
|
-- that is spawned when the boss does the multi-stomp attack.
|
|
51
51
|
--
|
|
52
52
|
-- When this attack occurs, four extra copies of Daddy Long Legs will be spawned with the same
|
|
53
|
-
-- entity type, variant, and sub-type. The `Entity.Parent`
|
|
54
|
-
--
|
|
53
|
+
-- entity type, variant, and sub-type. The `Entity.Parent` field will be undefined in this case, so
|
|
54
|
+
-- the way to tell them apart is to check for a non-undefined `Entity.SpawnerEntity` field.
|
|
55
55
|
function ____exports.isDaddyLongLegsChildStompEntity(self, npc)
|
|
56
56
|
return npc.Type == EntityType.DADDY_LONG_LEGS and npc.SpawnerEntity ~= nil
|
|
57
57
|
end
|
|
@@ -78,7 +78,7 @@ export declare function getPlayers(performCharacterExclusions?: boolean): Entity
|
|
|
78
78
|
export declare function getSubPlayerParent(subPlayer: EntitySubPlayer): EntityPlayer | undefined;
|
|
79
79
|
/**
|
|
80
80
|
* Helper function to detect if a particular player is a "child" player, meaning that they have a
|
|
81
|
-
* non-undefined `EntityPlayer.Parent`
|
|
81
|
+
* non-undefined `EntityPlayer.Parent` field. (For example, the Strawman Keeper.)
|
|
82
82
|
*/
|
|
83
83
|
export declare function isChildPlayer(player: EntityPlayer): boolean;
|
|
84
84
|
//# sourceMappingURL=playerIndex.d.ts.map
|
|
@@ -125,7 +125,7 @@ function ____exports.getSubPlayerParent(self, subPlayer)
|
|
|
125
125
|
)
|
|
126
126
|
end
|
|
127
127
|
--- Helper function to detect if a particular player is a "child" player, meaning that they have a
|
|
128
|
-
-- non-undefined `EntityPlayer.Parent`
|
|
128
|
+
-- non-undefined `EntityPlayer.Parent` field. (For example, the Strawman Keeper.)
|
|
129
129
|
function ____exports.isChildPlayer(self, player)
|
|
130
130
|
return player.Parent ~= nil
|
|
131
131
|
end
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
+
import { StatType } from "../enums/StatType";
|
|
3
|
+
import { StatTypeType } from "../interfaces/StatTypeType";
|
|
4
|
+
/** Helper function to get the stat for a player corresponding to the `StatType`. */
|
|
5
|
+
export declare function getPlayerStat<T extends StatType>(player: EntityPlayer, statType: T): StatTypeType[T];
|
|
6
|
+
//# sourceMappingURL=playerStats.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"playerStats.d.ts","sourceRoot":"","sources":["../../src/functions/playerStats.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,oFAAoF;AACpF,wBAAgB,aAAa,CAAC,CAAC,SAAS,QAAQ,EAC9C,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,CAAC,GACV,YAAY,CAAC,CAAC,CAAC,CAiBjB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local ____StatType = require("enums.StatType")
|
|
3
|
+
local StatType = ____StatType.StatType
|
|
4
|
+
--- Helper function to get the stat for a player corresponding to the `StatType`.
|
|
5
|
+
function ____exports.getPlayerStat(self, player, statType)
|
|
6
|
+
return ({
|
|
7
|
+
[StatType.DAMAGE] = player.Damage,
|
|
8
|
+
[StatType.FIRE_DELAY] = player.MaxFireDelay,
|
|
9
|
+
[StatType.SHOT_SPEED] = player.ShotSpeed,
|
|
10
|
+
[StatType.TEAR_HEIGHT] = player.TearHeight,
|
|
11
|
+
[StatType.TEAR_RANGE] = player.TearRange,
|
|
12
|
+
[StatType.TEAR_FALLING_ACCELERATION] = player.TearFallingAcceleration,
|
|
13
|
+
[StatType.TEAR_FALLING_SPEED] = player.TearFallingSpeed,
|
|
14
|
+
[StatType.MOVE_SPEED] = player.MoveSpeed,
|
|
15
|
+
[StatType.TEAR_FLAG] = player.TearFlags,
|
|
16
|
+
[StatType.TEAR_COLOR] = player.TearColor,
|
|
17
|
+
[StatType.FLYING] = player.CanFly,
|
|
18
|
+
[StatType.LUCK] = player.Luck
|
|
19
|
+
})[statType]
|
|
20
|
+
end
|
|
21
|
+
return ____exports
|
|
@@ -3,7 +3,7 @@ import { HealthType } from "../enums/HealthType";
|
|
|
3
3
|
export declare function addCollectibleCostume(player: EntityPlayer, collectibleType: CollectibleType): void;
|
|
4
4
|
/**
|
|
5
5
|
* Helper function to add a stat to a player based on the `CacheFlag` provided. Call this function
|
|
6
|
-
* from the
|
|
6
|
+
* from the `EVALUATE_CACHE` callback.
|
|
7
7
|
*
|
|
8
8
|
* Note that for `CacheFlag.FIRE_DELAY`, the "amount" argument will be interpreted as the tear stat
|
|
9
9
|
* to add (and not the amount to mutate `EntityPlayer.MaxFireDelay` by).
|
|
@@ -142,7 +142,7 @@ function ____exports.addCollectibleCostume(self, player, collectibleType)
|
|
|
142
142
|
player:AddCostume(itemConfigItem, false)
|
|
143
143
|
end
|
|
144
144
|
--- Helper function to add a stat to a player based on the `CacheFlag` provided. Call this function
|
|
145
|
-
-- from the
|
|
145
|
+
-- from the `EVALUATE_CACHE` callback.
|
|
146
146
|
--
|
|
147
147
|
-- Note that for `CacheFlag.FIRE_DELAY`, the "amount" argument will be interpreted as the tear stat
|
|
148
148
|
-- to add (and not the amount to mutate `EntityPlayer.MaxFireDelay` by).
|
package/dist/functions/rng.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export declare function deserializeRNG(rng: SerializedRNG): RNG;
|
|
|
17
17
|
* the game.
|
|
18
18
|
*/
|
|
19
19
|
export declare function getRandomSeed(): Seed;
|
|
20
|
-
/** Helper function to check if something is an instantiated RNG object. */
|
|
20
|
+
/** Helper function to check if something is an instantiated `RNG` object. */
|
|
21
21
|
export declare function isRNG(object: unknown): object is RNG;
|
|
22
22
|
/**
|
|
23
23
|
* Used to determine is the given table is a serialized `RNG` object created by the save data
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rng.d.ts","sourceRoot":"","sources":["../../src/functions/rng.ts"],"names":[],"mappings":";;;AAMA,oBAAY,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACpD,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;CACvC,CAAC;AAYF,wDAAwD;AACxD,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,CASrC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,GAAG,CAatD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,IAAI,CAIpC;AAED,
|
|
1
|
+
{"version":3,"file":"rng.d.ts","sourceRoot":"","sources":["../../src/functions/rng.ts"],"names":[],"mappings":";;;AAMA,oBAAY,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACpD,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;CACvC,CAAC;AAYF,wDAAwD;AACxD,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,CASrC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,GAAG,CAatD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,IAAI,CAIpC;AAED,6EAA6E;AAC7E,wBAAgB,KAAK,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,GAAG,CAEpD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,aAAa,CAMxE;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,IAAI,OAAkB,GAAG,GAAG,CAIlD;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAEvD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,GAAG,aAAa,CAYpD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,CAoBjE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAK1D;AAED,4FAA4F;AAC5F,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,CASlD"}
|
package/dist/functions/rng.lua
CHANGED
|
@@ -22,7 +22,7 @@ function ____exports.getRandomSeed(self)
|
|
|
22
22
|
local safeRandomNumber = randomNumber == 0 and 1 or randomNumber
|
|
23
23
|
return safeRandomNumber
|
|
24
24
|
end
|
|
25
|
-
--- Helper function to check if something is an instantiated RNG object.
|
|
25
|
+
--- Helper function to check if something is an instantiated `RNG` object.
|
|
26
26
|
function ____exports.isRNG(self, object)
|
|
27
27
|
return isIsaacAPIClassOfType(nil, object, OBJECT_NAME)
|
|
28
28
|
end
|
|
@@ -45,8 +45,8 @@ function ____exports.setSeed(self, rng, seed)
|
|
|
45
45
|
rng:SetSeed(seed, RECOMMENDED_SHIFT_IDX)
|
|
46
46
|
end
|
|
47
47
|
RECOMMENDED_SHIFT_IDX = 35
|
|
48
|
-
local KEYS = {"seed"}
|
|
49
48
|
OBJECT_NAME = "RNG"
|
|
49
|
+
local KEYS = {"seed"}
|
|
50
50
|
--- Helper function to copy an `RNG` Isaac API class.
|
|
51
51
|
function ____exports.copyRNG(self, rng)
|
|
52
52
|
if not ____exports.isRNG(nil, rng) then
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rockAlt.d.ts","sourceRoot":"","sources":["../../src/functions/rockAlt.ts"],"names":[],"mappings":";;;AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"rockAlt.d.ts","sourceRoot":"","sources":["../../src/functions/rockAlt.ts"],"names":[],"mappings":";;;AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAuCnD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,IAAI,WAAW,CAK5C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,WAAW,EACxB,SAAS,GAAE,IAAI,GAAG,GAAqB,GACtC,OAAO,CA4BT"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
local ____exports = {}
|
|
2
|
-
local spawnRockAltRewardUrn, spawnRockAltRewardMushroom, spawnRockAltRewardSkull, spawnRockAltRewardPolyp, spawnRockAltRewardBucketDownpour, spawnRockAltRewardBucketDross, ROCK_ALT_CHANCES, COIN_VELOCITY_MULTIPLIER, POLYP_PROJECTILE_SPEED, POLYP_NUM_PROJECTILES
|
|
2
|
+
local spawnRockAltRewardUrn, spawnRockAltRewardMushroom, spawnRockAltRewardSkull, spawnRockAltRewardPolyp, spawnRockAltRewardBucketDownpour, spawnRockAltRewardBucketDross, ROCK_ALT_CHANCES, COIN_VELOCITY_MULTIPLIER, FIND_FREE_INITIAL_STEP, FART_RADIUS, POLYP_PROJECTILE_SPEED, POLYP_NUM_PROJECTILES
|
|
3
3
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
4
4
|
local Card = ____isaac_2Dtypescript_2Ddefinitions.Card
|
|
5
5
|
local CoinSubType = ____isaac_2Dtypescript_2Ddefinitions.CoinSubType
|
|
@@ -45,6 +45,7 @@ local ____repeat = ____utils["repeat"]
|
|
|
45
45
|
local ____vector = require("functions.vector")
|
|
46
46
|
local getRandomVector = ____vector.getRandomVector
|
|
47
47
|
function spawnRockAltRewardUrn(self, position, rng)
|
|
48
|
+
local room = game:GetRoom()
|
|
48
49
|
local chance = getRandom(nil, rng)
|
|
49
50
|
local totalChance = 0
|
|
50
51
|
totalChance = totalChance + ROCK_ALT_CHANCES.NOTHING
|
|
@@ -88,14 +89,11 @@ function spawnRockAltRewardUrn(self, position, rng)
|
|
|
88
89
|
end
|
|
89
90
|
local numEnemiesChance = getRandom(nil, rng)
|
|
90
91
|
local numEnemies = numEnemiesChance < 0.5 and 1 or 2
|
|
91
|
-
local length = DISTANCE_OF_GRID_TILE * 3
|
|
92
92
|
____repeat(
|
|
93
93
|
nil,
|
|
94
94
|
numEnemies,
|
|
95
95
|
function()
|
|
96
|
-
local
|
|
97
|
-
local offset = randomVector * length
|
|
98
|
-
local targetPos = position + offset
|
|
96
|
+
local targetPos = room:FindFreePickupSpawnPosition(position, FIND_FREE_INITIAL_STEP)
|
|
99
97
|
EntityNPC.ThrowSpider(
|
|
100
98
|
position,
|
|
101
99
|
nil,
|
|
@@ -156,13 +154,8 @@ function spawnRockAltRewardMushroom(self, position, rng)
|
|
|
156
154
|
end
|
|
157
155
|
return false
|
|
158
156
|
end
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
EffectVariant.FART,
|
|
162
|
-
0,
|
|
163
|
-
position,
|
|
164
|
-
rng
|
|
165
|
-
)
|
|
157
|
+
game:Fart(position)
|
|
158
|
+
game:ButterBeanFart(position, FART_RADIUS, nil)
|
|
166
159
|
return true
|
|
167
160
|
end
|
|
168
161
|
function spawnRockAltRewardSkull(self, position, rng)
|
|
@@ -266,6 +259,7 @@ function spawnRockAltRewardPolyp(self, position, rng)
|
|
|
266
259
|
return true
|
|
267
260
|
end
|
|
268
261
|
function spawnRockAltRewardBucketDownpour(self, position, rng)
|
|
262
|
+
local room = game:GetRoom()
|
|
269
263
|
local chance = getRandom(nil, rng)
|
|
270
264
|
local totalChance = 0
|
|
271
265
|
totalChance = totalChance + ROCK_ALT_CHANCES.NOTHING
|
|
@@ -311,14 +305,11 @@ function spawnRockAltRewardBucketDownpour(self, position, rng)
|
|
|
311
305
|
local entityType = enemiesChance < 0.5 and EntityType.SPIDER or EntityType.SMALL_LEECH
|
|
312
306
|
local numEnemiesChance = getRandom(nil, rng)
|
|
313
307
|
local numEnemies = numEnemiesChance < 0.5 and 1 or 2
|
|
314
|
-
local jumpDistance = DISTANCE_OF_GRID_TILE * 3
|
|
315
308
|
____repeat(
|
|
316
309
|
nil,
|
|
317
310
|
numEnemies,
|
|
318
311
|
function()
|
|
319
|
-
local
|
|
320
|
-
local offset = randomVector * jumpDistance
|
|
321
|
-
local targetPos = position + offset
|
|
312
|
+
local targetPos = room:FindFreePickupSpawnPosition(position, FIND_FREE_INITIAL_STEP)
|
|
322
313
|
local spider = EntityNPC.ThrowSpider(
|
|
323
314
|
position,
|
|
324
315
|
nil,
|
|
@@ -334,6 +325,7 @@ function spawnRockAltRewardBucketDownpour(self, position, rng)
|
|
|
334
325
|
return true
|
|
335
326
|
end
|
|
336
327
|
function spawnRockAltRewardBucketDross(self, position, rng)
|
|
328
|
+
local room = game:GetRoom()
|
|
337
329
|
local chance = getRandom(nil, rng)
|
|
338
330
|
local totalChance = 0
|
|
339
331
|
totalChance = totalChance + ROCK_ALT_CHANCES.NOTHING
|
|
@@ -379,14 +371,11 @@ function spawnRockAltRewardBucketDross(self, position, rng)
|
|
|
379
371
|
local entityType = enemiesChance < 0.5 and EntityType.DRIP or EntityType.SMALL_LEECH
|
|
380
372
|
local numEnemiesChance = getRandom(nil, rng)
|
|
381
373
|
local numEnemies = numEnemiesChance < 0.5 and 1 or 2
|
|
382
|
-
local jumpDistance = DISTANCE_OF_GRID_TILE * 3
|
|
383
374
|
____repeat(
|
|
384
375
|
nil,
|
|
385
376
|
numEnemies,
|
|
386
377
|
function()
|
|
387
|
-
local
|
|
388
|
-
local offset = randomVector * jumpDistance
|
|
389
|
-
local targetPos = position + offset
|
|
378
|
+
local targetPos = room:FindFreePickupSpawnPosition(position, FIND_FREE_INITIAL_STEP)
|
|
390
379
|
local spider = EntityNPC.ThrowSpider(
|
|
391
380
|
position,
|
|
392
381
|
nil,
|
|
@@ -401,6 +390,8 @@ function spawnRockAltRewardBucketDross(self, position, rng)
|
|
|
401
390
|
end
|
|
402
391
|
ROCK_ALT_CHANCES = {NOTHING = 0.68, BASIC_DROP = 0.0967, TRINKET = 0.025, COLLECTIBLE = 0.005}
|
|
403
392
|
COIN_VELOCITY_MULTIPLIER = 2
|
|
393
|
+
FIND_FREE_INITIAL_STEP = 70
|
|
394
|
+
FART_RADIUS = DISTANCE_OF_GRID_TILE * 3
|
|
404
395
|
POLYP_PROJECTILE_SPEED = 10
|
|
405
396
|
POLYP_NUM_PROJECTILES = 6
|
|
406
397
|
--- Helper function to get the alternate rock type (i.e. urn, mushroom, etc.) that the current room
|
|
@@ -12,7 +12,7 @@ export declare function reloadRoom(): void;
|
|
|
12
12
|
* arguments.
|
|
13
13
|
*
|
|
14
14
|
* Use this function instead of invoking the `Game.StartRoomTransition` method directly so that:
|
|
15
|
-
* - you do not forget to set `Level.LeaveDoor`
|
|
15
|
+
* - you do not forget to set the `Level.LeaveDoor` field
|
|
16
16
|
* - to prevent crashing on invalid room grid indexes
|
|
17
17
|
* - to automatically handle Curse of the Maze
|
|
18
18
|
*
|
|
@@ -18,7 +18,7 @@ local getRoomGridIndex = ____roomData.getRoomGridIndex
|
|
|
18
18
|
-- arguments.
|
|
19
19
|
--
|
|
20
20
|
-- Use this function instead of invoking the `Game.StartRoomTransition` method directly so that:
|
|
21
|
-
-- - you do not forget to set `Level.LeaveDoor`
|
|
21
|
+
-- - you do not forget to set the `Level.LeaveDoor` field
|
|
22
22
|
-- - to prevent crashing on invalid room grid indexes
|
|
23
23
|
-- - to automatically handle Curse of the Maze
|
|
24
24
|
--
|
|
@@ -2,7 +2,7 @@ import { BackdropType, BossID, Dimension, ItemPoolType, MinibossID, RoomType } f
|
|
|
2
2
|
/**
|
|
3
3
|
* Helper function for quickly switching to a new room without playing a particular animation. Use
|
|
4
4
|
* this helper function over invoking the `Game.ChangeRoom` method directly to ensure that you do
|
|
5
|
-
* not forget to set the `LeaveDoor`
|
|
5
|
+
* not forget to set the `LeaveDoor` field and to prevent crashing on invalid room grid indexes.
|
|
6
6
|
*/
|
|
7
7
|
export declare function changeRoom(roomGridIndex: int): void;
|
|
8
8
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rooms.d.ts","sourceRoot":"","sources":["../../src/functions/rooms.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EACZ,MAAM,EACN,SAAS,EAKT,YAAY,EACZ,UAAU,EAGV,QAAQ,EAGT,MAAM,8BAA8B,CAAC;AAiCtC;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,aAAa,EAAE,GAAG,GAAG,IAAI,CAenD;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,GAAG,CAGjC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,IAAI,KAAK,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAiBlE;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,GAAG,EAChB,oBAAoB,UAAO,GAC1B,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rooms.lua
CHANGED
|
@@ -133,7 +133,7 @@ function ____exports.getRoomsOutsideGrid(self)
|
|
|
133
133
|
end
|
|
134
134
|
--- Helper function for quickly switching to a new room without playing a particular animation. Use
|
|
135
135
|
-- this helper function over invoking the `Game.ChangeRoom` method directly to ensure that you do
|
|
136
|
-
-- not forget to set the `LeaveDoor`
|
|
136
|
+
-- not forget to set the `LeaveDoor` field and to prevent crashing on invalid room grid indexes.
|
|
137
137
|
function ____exports.changeRoom(self, roomGridIndex)
|
|
138
138
|
local level = game:GetLevel()
|
|
139
139
|
local roomData = getRoomData(nil, roomGridIndex)
|
|
@@ -382,6 +382,7 @@ end
|
|
|
382
382
|
--- Helper function to set the backdrop of the current room.
|
|
383
383
|
function ____exports.setBackdrop(self, backdropType)
|
|
384
384
|
game:ShowHallucination(0, backdropType)
|
|
385
|
+
sfxManager:Stop(SoundEffect.DEATH_CARD)
|
|
385
386
|
end
|
|
386
387
|
--- Helper function to convert an uncleared room to a cleared room in the `POST_NEW_ROOM` callback.
|
|
387
388
|
-- This is useful because if enemies are removed in this callback, a room drop will be awarded and
|
|
@@ -21,9 +21,9 @@ export declare function clearSprite(sprite: Sprite, ...layerIDs: int[]): void;
|
|
|
21
21
|
*
|
|
22
22
|
* Note that this function is bugged with the Stop Watch or the Broken Watch, since using the
|
|
23
23
|
* `Sprite.SetFrame` method will reset the internal accumulator used to slow down the playback speed
|
|
24
|
-
* of the animation. (The `PlaybackSpeed`
|
|
25
|
-
*
|
|
26
|
-
*
|
|
24
|
+
* of the animation. (The `PlaybackSpeed` field of the sprite is not used.) Thus, it is only safe to
|
|
25
|
+
* use this function on animations that are not slowed down by Stop Watch or Broken Watch, such as
|
|
26
|
+
* player animations.
|
|
27
27
|
*/
|
|
28
28
|
export declare function getLastFrameOfAnimation(sprite: Sprite, animation?: string): int;
|
|
29
29
|
/**
|
|
@@ -39,9 +39,9 @@ end
|
|
|
39
39
|
--
|
|
40
40
|
-- Note that this function is bugged with the Stop Watch or the Broken Watch, since using the
|
|
41
41
|
-- `Sprite.SetFrame` method will reset the internal accumulator used to slow down the playback speed
|
|
42
|
-
-- of the animation. (The `PlaybackSpeed`
|
|
43
|
-
--
|
|
44
|
-
--
|
|
42
|
+
-- of the animation. (The `PlaybackSpeed` field of the sprite is not used.) Thus, it is only safe to
|
|
43
|
+
-- use this function on animations that are not slowed down by Stop Watch or Broken Watch, such as
|
|
44
|
+
-- player animations.
|
|
45
45
|
function ____exports.getLastFrameOfAnimation(self, sprite, animation)
|
|
46
46
|
local currentAnimation = sprite:GetAnimation()
|
|
47
47
|
local currentFrame = sprite:GetFrame()
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/// <reference types="isaac-typescript-definitions" />
|
|
2
2
|
/// <reference types="isaac-typescript-definitions" />
|
|
3
3
|
/**
|
|
4
|
-
* - Converts the specified amount of tears stat into
|
|
5
|
-
*
|
|
4
|
+
* - Converts the specified amount of tears stat into the format of `EntityPlayer.MaxFireDelay` and
|
|
5
|
+
* adds it to the player.
|
|
6
|
+
* - This function should only be used inside the `EVALUATE_CACHE` callback.
|
|
6
7
|
* - In this context, the "tears stat" represents what is shown on the in-game stat UI.
|
|
7
8
|
*/
|
|
8
9
|
export declare function addTearsStat(player: EntityPlayer, tearsStat: float): void;
|
|
9
10
|
/**
|
|
10
|
-
* - The `EntityPlayer` object stores a player's tear rate in the `MaxFireDelay`
|
|
11
|
+
* - The `EntityPlayer` object stores a player's tear rate in the `MaxFireDelay` field. This is
|
|
11
12
|
* equivalent to how many tears the player can shoot per frame.
|
|
12
13
|
* - If you already have a "tears" stat and you want to convert it back to MaxFireDelay, then use
|
|
13
14
|
* this function.
|
|
@@ -15,7 +16,7 @@ export declare function addTearsStat(player: EntityPlayer, tearsStat: float): vo
|
|
|
15
16
|
*/
|
|
16
17
|
export declare function getFireDelay(tearsStat: float): float;
|
|
17
18
|
/**
|
|
18
|
-
* - The `EntityPlayer` object stores a player's tear rate in the `MaxFireDelay`
|
|
19
|
+
* - The `EntityPlayer` object stores a player's tear rate in the `MaxFireDelay` field. This is
|
|
19
20
|
* equivalent to how many tears the player can shoot per frame.
|
|
20
21
|
* - If you want to convert this to the "tears" stat that is shown on the in-game stat UI, then use
|
|
21
22
|
* this function.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tears.d.ts","sourceRoot":"","sources":["../../src/functions/tears.ts"],"names":[],"mappings":";;AAAA
|
|
1
|
+
{"version":3,"file":"tears.d.ts","sourceRoot":"","sources":["../../src/functions/tears.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,KAAK,GAAG,IAAI,CAKzE;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,KAAK,GAAG,KAAK,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,KAAK,GAAG,KAAK,CAEpD"}
|
package/dist/functions/tears.lua
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
local ____exports = {}
|
|
2
|
-
--- - The `EntityPlayer` object stores a player's tear rate in the `MaxFireDelay`
|
|
2
|
+
--- - The `EntityPlayer` object stores a player's tear rate in the `MaxFireDelay` field. This is
|
|
3
3
|
-- equivalent to how many tears the player can shoot per frame.
|
|
4
4
|
-- - If you already have a "tears" stat and you want to convert it back to MaxFireDelay, then use
|
|
5
5
|
-- this function.
|
|
@@ -7,15 +7,16 @@ local ____exports = {}
|
|
|
7
7
|
function ____exports.getFireDelay(self, tearsStat)
|
|
8
8
|
return math.max(30 / tearsStat - 1, -0.9999)
|
|
9
9
|
end
|
|
10
|
-
--- - The `EntityPlayer` object stores a player's tear rate in the `MaxFireDelay`
|
|
10
|
+
--- - The `EntityPlayer` object stores a player's tear rate in the `MaxFireDelay` field. This is
|
|
11
11
|
-- equivalent to how many tears the player can shoot per frame.
|
|
12
12
|
-- - If you want to convert this to the "tears" stat that is shown on the in-game stat UI, then use
|
|
13
13
|
-- this function.
|
|
14
14
|
function ____exports.getTearsStat(self, fireDelay)
|
|
15
15
|
return 30 / (fireDelay + 1)
|
|
16
16
|
end
|
|
17
|
-
--- - Converts the specified amount of tears stat into
|
|
18
|
-
--
|
|
17
|
+
--- - Converts the specified amount of tears stat into the format of `EntityPlayer.MaxFireDelay` and
|
|
18
|
+
-- adds it to the player.
|
|
19
|
+
-- - This function should only be used inside the `EVALUATE_CACHE` callback.
|
|
19
20
|
-- - In this context, the "tears stat" represents what is shown on the in-game stat UI.
|
|
20
21
|
function ____exports.addTearsStat(self, player, tearsStat)
|
|
21
22
|
local existingTearsStat = ____exports.getTearsStat(nil, player.MaxFireDelay)
|
|
@@ -85,9 +85,12 @@ export declare function repeat(n: int, func: (i: int) => void): void;
|
|
|
85
85
|
* When you see this function, it simply means that the programmer intends to add in more code to
|
|
86
86
|
* this spot later.
|
|
87
87
|
*
|
|
88
|
+
* This function is variadic, meaning that you can pass as many arguments as you want. (This is
|
|
89
|
+
* useful as a means to prevent lint warnings.)
|
|
90
|
+
*
|
|
88
91
|
* This function does not actually do anything. (It is an "empty" function.)
|
|
89
92
|
*/
|
|
90
|
-
export declare function todo(): void;
|
|
93
|
+
export declare function todo(...args: unknown[]): void;
|
|
91
94
|
/**
|
|
92
95
|
* Helper function to sort a two-dimensional array by the first element.
|
|
93
96
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/functions/utils.ts"],"names":[],"mappings":";;;AAMA;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,GAAG,GAAG,EAAE,CAYnD;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,OAAO,EACZ,oBAAoB,EAAE,MAAM,GAC3B,MAAM,CAQR;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM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CAMnE;AA6BD;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,GAAG,GAAG,EAAE,CAYnD;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAI5C;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAEpE;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAE9C;AAED,iGAAiG;AACjG,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,CAGxE;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,GAAG,IAAI,CAI3D;AAED;;;;;;;;;;;;GAYG;AAEH,wBAAgB,IAAI,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAG;AAEjD;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAYhE"}
|
package/dist/functions/utils.lua
CHANGED
|
@@ -158,8 +158,11 @@ end
|
|
|
158
158
|
-- When you see this function, it simply means that the programmer intends to add in more code to
|
|
159
159
|
-- this spot later.
|
|
160
160
|
--
|
|
161
|
+
-- This function is variadic, meaning that you can pass as many arguments as you want. (This is
|
|
162
|
+
-- useful as a means to prevent lint warnings.)
|
|
163
|
+
--
|
|
161
164
|
-- This function does not actually do anything. (It is an "empty" function.)
|
|
162
|
-
function ____exports.todo(self)
|
|
165
|
+
function ____exports.todo(self, ...)
|
|
163
166
|
end
|
|
164
167
|
--- Helper function to sort a two-dimensional array by the first element.
|
|
165
168
|
--
|
|
@@ -26,7 +26,7 @@ export declare function getRandomVector(seedOrRNG?: Seed | RNG): Vector;
|
|
|
26
26
|
* manager and/or the `deepCopy` function.
|
|
27
27
|
*/
|
|
28
28
|
export declare function isSerializedVector(object: unknown): object is SerializedVector;
|
|
29
|
-
/** Helper function to check if something is an instantiated Vector object. */
|
|
29
|
+
/** Helper function to check if something is an instantiated `Vector` object. */
|
|
30
30
|
export declare function isVector(object: unknown): object is Vector;
|
|
31
31
|
/**
|
|
32
32
|
* Helper function to convert a `Vector` object to a `SerializedVector` object. (This is used by the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vector.d.ts","sourceRoot":"","sources":["../../src/functions/vector.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AASzD,oBAAY,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACvD,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;CAC1C,CAAC;AAKF,0DAA0D;AAC1D,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAQjD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAyBlE;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC7B,SAAS,GAAE,IAAI,GAAG,GAAqB,GACtC,MAAM,CAOR;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,OAAO,GACd,MAAM,IAAI,gBAAgB,CAM5B;AAED,
|
|
1
|
+
{"version":3,"file":"vector.d.ts","sourceRoot":"","sources":["../../src/functions/vector.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AASzD,oBAAY,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACvD,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;CAC1C,CAAC;AAKF,0DAA0D;AAC1D,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAQjD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAyBlE;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC7B,SAAS,GAAE,IAAI,GAAG,GAAqB,GACtC,MAAM,CAOR;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,OAAO,GACd,MAAM,IAAI,gBAAgB,CAM5B;AAED,gFAAgF;AAChF,wBAAgB,QAAQ,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,MAAM,CAE1D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAWhE;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAEtE;AAED,sEAAsE;AACtE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAG3D;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,UAAQ,GAAG,MAAM,CAIpE"}
|
|
@@ -19,12 +19,12 @@ local getNumbersFromTable = ____table.getNumbersFromTable
|
|
|
19
19
|
local tableHasKeys = ____table.tableHasKeys
|
|
20
20
|
local ____types = require("functions.types")
|
|
21
21
|
local isTable = ____types.isTable
|
|
22
|
-
--- Helper function to check if something is an instantiated Vector object.
|
|
22
|
+
--- Helper function to check if something is an instantiated `Vector` object.
|
|
23
23
|
function ____exports.isVector(self, object)
|
|
24
24
|
return isIsaacAPIClassOfType(nil, object, OBJECT_NAME)
|
|
25
25
|
end
|
|
26
|
-
local KEYS = {"X", "Y"}
|
|
27
26
|
OBJECT_NAME = "Vector"
|
|
27
|
+
local KEYS = {"X", "Y"}
|
|
28
28
|
--- Helper function to copy a `Vector` Isaac API class.
|
|
29
29
|
function ____exports.copyVector(self, vector)
|
|
30
30
|
if not ____exports.isVector(nil, vector) then
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initCustomCallbacks.d.ts","sourceRoot":"","sources":["../src/initCustomCallbacks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"initCustomCallbacks.d.ts","sourceRoot":"","sources":["../src/initCustomCallbacks.ts"],"names":[],"mappings":"AAsEA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAuE1D"}
|
|
@@ -77,6 +77,8 @@ local ____postPitUpdate = require("callbacks.postPitUpdate")
|
|
|
77
77
|
local postPitUpdateInit = ____postPitUpdate.postPitUpdateInit
|
|
78
78
|
local ____postPlayerChangeHealth = require("callbacks.postPlayerChangeHealth")
|
|
79
79
|
local postPlayerChangeHealthInit = ____postPlayerChangeHealth.postPlayerChangeHealthInit
|
|
80
|
+
local ____postPlayerChangeStat = require("callbacks.postPlayerChangeStat")
|
|
81
|
+
local postPlayerChangeStatInit = ____postPlayerChangeStat.postPlayerChangeStatInit
|
|
80
82
|
local ____postPlayerChangeType = require("callbacks.postPlayerChangeType")
|
|
81
83
|
local postPlayerChangeTypeInit = ____postPlayerChangeType.postPlayerChangeTypeInit
|
|
82
84
|
local ____postPlayerCollectible = require("callbacks.postPlayerCollectible")
|
|
@@ -177,6 +179,7 @@ function ____exports.initCustomCallbacks(self, mod)
|
|
|
177
179
|
postPitRenderInit(nil, mod)
|
|
178
180
|
postPitUpdateInit(nil, mod)
|
|
179
181
|
postPlayerChangeHealthInit(nil, mod)
|
|
182
|
+
postPlayerChangeStatInit(nil, mod)
|
|
180
183
|
postPlayerChangeTypeInit(nil, mod)
|
|
181
184
|
postPlayerCollectibleCallbacksInit(nil, mod)
|
|
182
185
|
postPlayerFatalDamageInit(nil, mod)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* A collection of the four sprites necessary in order to render a charge bar.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
* This is used in the `newChargeBarSprites` and related helper functions.
|
|
7
7
|
*/
|
|
8
8
|
export interface ChargeBarSprites {
|
|
9
9
|
back: Sprite;
|