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
|
@@ -35,7 +35,14 @@ function postPEffectUpdateReordered(self, player)
|
|
|
35
35
|
playerHealthMap:set(healthType, currentHealthValue)
|
|
36
36
|
if storedHealthValue ~= nil and storedHealthValue ~= currentHealthValue then
|
|
37
37
|
local difference = currentHealthValue - storedHealthValue
|
|
38
|
-
postPlayerChangeHealthFire(
|
|
38
|
+
postPlayerChangeHealthFire(
|
|
39
|
+
nil,
|
|
40
|
+
player,
|
|
41
|
+
healthType,
|
|
42
|
+
difference,
|
|
43
|
+
storedHealthValue,
|
|
44
|
+
currentHealthValue
|
|
45
|
+
)
|
|
39
46
|
end
|
|
40
47
|
end
|
|
41
48
|
end
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postPlayerChangeStat.d.ts","sourceRoot":"","sources":["../../src/callbacks/postPlayerChangeStat.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AA+BrD,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAO/D"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local Map = ____lualib.Map
|
|
3
|
+
local __TS__New = ____lualib.__TS__New
|
|
4
|
+
local ____exports = {}
|
|
5
|
+
local hasSubscriptions, postPEffectUpdateReordered, statEquals, v
|
|
6
|
+
local ____DefaultMap = require("classes.DefaultMap")
|
|
7
|
+
local DefaultMap = ____DefaultMap.DefaultMap
|
|
8
|
+
local ____enums = require("enums.index")
|
|
9
|
+
local StatType = ____enums.StatType
|
|
10
|
+
local ____ModCallbackCustom = require("enums.ModCallbackCustom")
|
|
11
|
+
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
12
|
+
local ____exports = require("features.saveDataManager.exports")
|
|
13
|
+
local saveDataManager = ____exports.saveDataManager
|
|
14
|
+
local ____functions = require("functions.index")
|
|
15
|
+
local colorEquals = ____functions.colorEquals
|
|
16
|
+
local getPlayerStat = ____functions.getPlayerStat
|
|
17
|
+
local isBitSet128 = ____functions.isBitSet128
|
|
18
|
+
local isBoolean = ____functions.isBoolean
|
|
19
|
+
local isColor = ____functions.isColor
|
|
20
|
+
local isNumber = ____functions.isNumber
|
|
21
|
+
local ____enums = require("functions.enums")
|
|
22
|
+
local getEnumValues = ____enums.getEnumValues
|
|
23
|
+
local ____playerIndex = require("functions.playerIndex")
|
|
24
|
+
local getPlayerIndex = ____playerIndex.getPlayerIndex
|
|
25
|
+
local ____postPlayerChangeStat = require("callbacks.subscriptions.postPlayerChangeStat")
|
|
26
|
+
local postPlayerChangeStatFire = ____postPlayerChangeStat.postPlayerChangeStatFire
|
|
27
|
+
local postPlayerChangeStatHasSubscriptions = ____postPlayerChangeStat.postPlayerChangeStatHasSubscriptions
|
|
28
|
+
function hasSubscriptions(self)
|
|
29
|
+
return postPlayerChangeStatHasSubscriptions(nil)
|
|
30
|
+
end
|
|
31
|
+
function postPEffectUpdateReordered(self, player)
|
|
32
|
+
if not hasSubscriptions(nil) then
|
|
33
|
+
return
|
|
34
|
+
end
|
|
35
|
+
local playerIndex = getPlayerIndex(nil, player, true)
|
|
36
|
+
local playerStatMap = v.run.playersStatMap:getAndSetDefault(playerIndex)
|
|
37
|
+
for ____, statType in ipairs(getEnumValues(nil, StatType)) do
|
|
38
|
+
do
|
|
39
|
+
local storedStatValue = playerStatMap:get(statType)
|
|
40
|
+
local currentStatValue = getPlayerStat(nil, player, statType)
|
|
41
|
+
playerStatMap:set(statType, currentStatValue)
|
|
42
|
+
if storedStatValue == nil then
|
|
43
|
+
goto __continue7
|
|
44
|
+
end
|
|
45
|
+
if not statEquals(nil, storedStatValue, currentStatValue) then
|
|
46
|
+
local isNumberStat = isNumber(nil, storedStatValue) and isNumber(nil, currentStatValue)
|
|
47
|
+
local difference = isNumberStat and currentStatValue - storedStatValue or 0
|
|
48
|
+
postPlayerChangeStatFire(
|
|
49
|
+
nil,
|
|
50
|
+
player,
|
|
51
|
+
statType,
|
|
52
|
+
difference,
|
|
53
|
+
storedStatValue,
|
|
54
|
+
currentStatValue
|
|
55
|
+
)
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
::__continue7::
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
function statEquals(self, oldValue, newValue)
|
|
62
|
+
local isNumberStat = isNumber(nil, oldValue) and isNumber(nil, newValue)
|
|
63
|
+
if isNumberStat then
|
|
64
|
+
return oldValue == newValue
|
|
65
|
+
end
|
|
66
|
+
local isBooleanStat = isBoolean(nil, oldValue) and isBoolean(nil, newValue)
|
|
67
|
+
if isBooleanStat then
|
|
68
|
+
return oldValue == newValue
|
|
69
|
+
end
|
|
70
|
+
local isBitSet128Stat = isBitSet128(nil, oldValue) and isBitSet128(nil, newValue)
|
|
71
|
+
if isBitSet128Stat then
|
|
72
|
+
return oldValue == newValue
|
|
73
|
+
end
|
|
74
|
+
local isColorStat = isColor(nil, oldValue) and isColor(nil, newValue)
|
|
75
|
+
if isColorStat then
|
|
76
|
+
return colorEquals(nil, oldValue, newValue)
|
|
77
|
+
end
|
|
78
|
+
error("Failed to determine the type of a stat in the \"POST_PLAYER_CHANGE_STAT\" callback.")
|
|
79
|
+
end
|
|
80
|
+
v = {run = {playersStatMap = __TS__New(
|
|
81
|
+
DefaultMap,
|
|
82
|
+
function() return __TS__New(Map) end
|
|
83
|
+
)}}
|
|
84
|
+
function ____exports.postPlayerChangeStatInit(self, mod)
|
|
85
|
+
saveDataManager(nil, "postPlayerChangeStat", v, hasSubscriptions)
|
|
86
|
+
mod:AddCallbackCustom(ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, postPEffectUpdateReordered)
|
|
87
|
+
end
|
|
88
|
+
return ____exports
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { PlayerType, PlayerVariant } from "isaac-typescript-definitions";
|
|
2
2
|
import { HealthType } from "../../enums/HealthType";
|
|
3
3
|
export declare type PostPlayerChangeHealthRegisterParameters = [
|
|
4
|
-
callback: (player: EntityPlayer, healthType: HealthType, difference: int) => void,
|
|
4
|
+
callback: (player: EntityPlayer, healthType: HealthType, difference: int, oldValue: int, newValue: int) => void,
|
|
5
5
|
playerVariant?: PlayerVariant,
|
|
6
6
|
character?: PlayerType
|
|
7
7
|
];
|
|
8
8
|
export declare function postPlayerChangeHealthHasSubscriptions(): boolean;
|
|
9
9
|
export declare function postPlayerChangeHealthRegister(...args: PostPlayerChangeHealthRegisterParameters): void;
|
|
10
|
-
export declare function postPlayerChangeHealthFire(player: EntityPlayer, healthType: HealthType, difference: int): void;
|
|
10
|
+
export declare function postPlayerChangeHealthFire(player: EntityPlayer, healthType: HealthType, difference: int, oldValue: int, newValue: int): void;
|
|
11
11
|
//# sourceMappingURL=postPlayerChangeHealth.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postPlayerChangeHealth.d.ts","sourceRoot":"","sources":["../../../src/callbacks/subscriptions/postPlayerChangeHealth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,oBAAY,wCAAwC,GAAG;IACrD,QAAQ,EAAE,CACR,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"postPlayerChangeHealth.d.ts","sourceRoot":"","sources":["../../../src/callbacks/subscriptions/postPlayerChangeHealth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,oBAAY,wCAAwC,GAAG;IACrD,QAAQ,EAAE,CACR,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,GAAG,EACf,QAAQ,EAAE,GAAG,EACb,QAAQ,EAAE,GAAG,KACV,IAAI;IACT,aAAa,CAAC,EAAE,aAAa;IAC7B,SAAS,CAAC,EAAE,UAAU;CACvB,CAAC;AAIF,wBAAgB,sCAAsC,IAAI,OAAO,CAEhE;AAED,wBAAgB,8BAA8B,CAC5C,GAAG,IAAI,EAAE,wCAAwC,GAChD,IAAI,CAEN;AAED,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,GAAG,EACf,QAAQ,EAAE,GAAG,EACb,QAAQ,EAAE,GAAG,GACZ,IAAI,CAgBN"}
|
|
@@ -7,7 +7,7 @@ function ____exports.postPlayerChangeHealthRegister(self, ...)
|
|
|
7
7
|
local args = {...}
|
|
8
8
|
subscriptions[#subscriptions + 1] = args
|
|
9
9
|
end
|
|
10
|
-
function ____exports.postPlayerChangeHealthFire(self, player, healthType, difference)
|
|
10
|
+
function ____exports.postPlayerChangeHealthFire(self, player, healthType, difference, oldValue, newValue)
|
|
11
11
|
local character = player:GetPlayerType()
|
|
12
12
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
13
|
local callback = ____value[1]
|
|
@@ -20,7 +20,14 @@ function ____exports.postPlayerChangeHealthFire(self, player, healthType, differ
|
|
|
20
20
|
if callbackCharacter ~= nil and callbackCharacter ~= character then
|
|
21
21
|
goto __continue5
|
|
22
22
|
end
|
|
23
|
-
callback(
|
|
23
|
+
callback(
|
|
24
|
+
nil,
|
|
25
|
+
player,
|
|
26
|
+
healthType,
|
|
27
|
+
difference,
|
|
28
|
+
oldValue,
|
|
29
|
+
newValue
|
|
30
|
+
)
|
|
24
31
|
end
|
|
25
32
|
::__continue5::
|
|
26
33
|
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PlayerType, PlayerVariant, TearFlag } from "isaac-typescript-definitions";
|
|
2
|
+
import { StatType } from "../../enums/StatType";
|
|
3
|
+
import { StatTypeType } from "../../interfaces/StatTypeType";
|
|
4
|
+
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
|
+
playerVariant?: PlayerVariant,
|
|
7
|
+
character?: PlayerType
|
|
8
|
+
];
|
|
9
|
+
export declare function postPlayerChangeStatHasSubscriptions(): boolean;
|
|
10
|
+
export declare function postPlayerChangeStatRegister(...args: PostPlayerChangeStatRegisterParameters): void;
|
|
11
|
+
export declare function postPlayerChangeStatFire<T extends StatType>(player: EntityPlayer, statType: T, difference: int, oldValue: StatTypeType[T], newValue: StatTypeType[T]): void;
|
|
12
|
+
//# sourceMappingURL=postPlayerChangeStat.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local subscriptions = {}
|
|
3
|
+
function ____exports.postPlayerChangeStatHasSubscriptions(self)
|
|
4
|
+
return #subscriptions > 0
|
|
5
|
+
end
|
|
6
|
+
function ____exports.postPlayerChangeStatRegister(self, ...)
|
|
7
|
+
local args = {...}
|
|
8
|
+
subscriptions[#subscriptions + 1] = args
|
|
9
|
+
end
|
|
10
|
+
function ____exports.postPlayerChangeStatFire(self, player, statType, difference, oldValue, newValue)
|
|
11
|
+
local character = player:GetPlayerType()
|
|
12
|
+
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
+
local callback = ____value[1]
|
|
14
|
+
local playerVariant = ____value[2]
|
|
15
|
+
local callbackCharacter = ____value[3]
|
|
16
|
+
do
|
|
17
|
+
if playerVariant ~= nil and playerVariant ~= player.Variant then
|
|
18
|
+
goto __continue5
|
|
19
|
+
end
|
|
20
|
+
if callbackCharacter ~= nil and callbackCharacter ~= character then
|
|
21
|
+
goto __continue5
|
|
22
|
+
end
|
|
23
|
+
callback(
|
|
24
|
+
nil,
|
|
25
|
+
player,
|
|
26
|
+
statType,
|
|
27
|
+
difference,
|
|
28
|
+
oldValue,
|
|
29
|
+
newValue
|
|
30
|
+
)
|
|
31
|
+
end
|
|
32
|
+
::__continue5::
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
return ____exports
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A function that creates the default value for your `DefaultMap`. For example, if it was a
|
|
3
|
-
* `DefaultMap` containing maps, the factory function would be: `() => new Map()`
|
|
4
|
-
*/
|
|
5
|
-
export declare type FactoryFunction<V, Args extends unknown[]> = (...args: Args) => V;
|
|
6
1
|
/**
|
|
7
2
|
* `DefaultMap` is a data structure that makes working with default values easier.
|
|
8
3
|
*
|
|
@@ -107,4 +102,9 @@ export declare class DefaultMap<Key, Value, Args extends unknown[] = []> extends
|
|
|
107
102
|
*/
|
|
108
103
|
getConstructorArg(): Value | FactoryFunction<Value, Args>;
|
|
109
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* A function that creates the default value for your `DefaultMap`. For example, if it was a
|
|
107
|
+
* `DefaultMap` containing maps, the factory function would be: `() => new Map()`
|
|
108
|
+
*/
|
|
109
|
+
export declare type FactoryFunction<V, Args extends unknown[]> = (...args: Args) => V;
|
|
110
110
|
//# sourceMappingURL=DefaultMap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultMap.d.ts","sourceRoot":"","sources":["../../src/classes/DefaultMap.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DefaultMap.d.ts","sourceRoot":"","sources":["../../src/classes/DefaultMap.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+EG;AACH,qBAAa,UAAU,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,SAAS,OAAO,EAAE,GAAG,EAAE,CAAE,SAAQ,GAAG,CAC1E,GAAG,EACH,KAAK,CACN;IACC,OAAO,CAAC,YAAY,CAAoB;IACxC,OAAO,CAAC,mBAAmB,CAA2C;IAEtE;;;OAGG;gBAED,6BAA6B,EAAE,KAAK,GAAG,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,EACnE,gBAAgB,CAAC,EAAE,QAAQ,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAqB3C;;;OAGG;IACH,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK;IAWhD;;;OAGG;IACH,eAAe,CAAC,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK;IAYrC;;;OAGG;IACH,iBAAiB,IAAI,KAAK,GAAG,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC;CAW1D;AAGD;;;GAGG;AACH,oBAAY,eAAe,CAAC,CAAC,EAAE,IAAI,SAAS,OAAO,EAAE,IAAI,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,CAAC,CAAC"}
|
package/dist/core/constants.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export declare const AZAZEL_DEFAULT_BRIMSTONE_DISTANCE = 75.125;
|
|
|
22
22
|
export declare const BLIND_ITEM_PNG_PATH = "gfx/items/collectibles/questionmark.png";
|
|
23
23
|
/** Bombs explode when their frame count is equal to this value. */
|
|
24
24
|
export declare const BOMB_EXPLODE_FRAME = 45;
|
|
25
|
-
/** This is the initial value of the `EntityPickup.Wait`
|
|
25
|
+
/** This is the initial value of the `EntityPickup.Wait` field after a collectible is spawned. */
|
|
26
26
|
export declare const COLLECTIBLE_INITIAL_WAIT = 20;
|
|
27
27
|
export declare const DEFAULT_ITEM_POOL_TYPE = ItemPoolType.TREASURE;
|
|
28
28
|
/** This is also the distance that a player spawns from the door that they enter a room from. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/core/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAGf,YAAY,EAEb,MAAM,8BAA8B,CAAC;AAKtC;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;;;;EAI7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iCAAiC,SAAS,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,4CAA4C,CAAC;AAE7E,mEAAmE;AACnE,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/core/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAGf,YAAY,EAEb,MAAM,8BAA8B,CAAC;AAKtC;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;;;;EAI7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iCAAiC,SAAS,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,4CAA4C,CAAC;AAE7E,mEAAmE;AACnE,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC,iGAAiG;AACjG,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C,eAAO,MAAM,sBAAsB,wBAAwB,CAAC;AAE5D,gGAAgG;AAChG,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAExC,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,KAAK,CAAC;AAEnD;;;GAGG;AACH,eAAO,MAAM,cAAc,iBAAiB,CAAC;AAE7C;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,iBACrB,CAAC;AAExB,2EAA2E;AAC3E,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,6DAA6D;AAC7D,eAAO,MAAM,cAAc,IAAI,CAAC;AAEhC,iFAAiF;AACjF,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAE9C;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAE7C,eAAO,MAAM,wBAAwB,QAA6B,CAAC;AAEnE,yFAAyF;AACzF,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAE9C,qFAAqF;AACrF,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAEzC;;;GAGG;AACH,eAAO,MAAM,cAAc,IAAM,CAAC;AAElC,yCAAyC;AACzC,eAAO,MAAM,uCAAuC,QAAmB,CAAC;AAExE,iCAAiC;AACjC,eAAO,MAAM,sCAAsC,QAAmB,CAAC;AAEvE;;;GAGG;AACH,eAAO,MAAM,gCAAgC,QAAmB,CAAC;AAEjE,+EAA+E;AAC/E,eAAO,MAAM,iCAAiC,SAAS,CAAC;AAExD,eAAO,MAAM,cAAc,QAA+B,CAAC;AAE3D;;;GAGG;AACH,eAAO,MAAM,iBAAiB,QAAyB,CAAC;AAExD,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAC3C,eAAO,MAAM,sBAAsB,QAA8B,CAAC;AAElE,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAE7C,6FAA6F;AAC7F,eAAO,MAAM,gDAAgD,QAAQ,CAAC;AAEtE;;;GAGG;AACH,eAAO,MAAM,cAAc,KAAK,CAAC;AAEjC;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAgB,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAgB,CAAC;AAEzD;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,KAAK,CAAkB,CAAC;AAE5D;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAsB,CAAC"}
|
package/dist/core/constants.lua
CHANGED
|
@@ -23,7 +23,7 @@ ____exports.AZAZEL_DEFAULT_BRIMSTONE_DISTANCE = 75.125
|
|
|
23
23
|
____exports.BLIND_ITEM_PNG_PATH = "gfx/items/collectibles/questionmark.png"
|
|
24
24
|
--- Bombs explode when their frame count is equal to this value.
|
|
25
25
|
____exports.BOMB_EXPLODE_FRAME = 45
|
|
26
|
-
--- This is the initial value of the `EntityPickup.Wait`
|
|
26
|
+
--- This is the initial value of the `EntityPickup.Wait` field after a collectible is spawned.
|
|
27
27
|
____exports.COLLECTIBLE_INITIAL_WAIT = 20
|
|
28
28
|
____exports.DEFAULT_ITEM_POOL_TYPE = ItemPoolType.TREASURE
|
|
29
29
|
--- This is also the distance that a player spawns from the door that they enter a room from.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AmbushType.d.ts","sourceRoot":"","sources":["../../src/enums/AmbushType.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IACpB,cAAc,IAAA;IACd,SAAS,IAAA;CACV"}
|
|
1
|
+
{"version":3,"file":"AmbushType.d.ts","sourceRoot":"","sources":["../../src/enums/AmbushType.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,oBAAY,UAAU;IACpB,cAAc,IAAA;IACd,SAAS,IAAA;CACV"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
local ____exports = {}
|
|
2
|
+
--- This is used by the `POST_AMBUSH_STARTED` and `POST_AMBUSH_FINISHED` custom callbacks.
|
|
2
3
|
____exports.AmbushType = {}
|
|
3
4
|
____exports.AmbushType.CHALLENGE_ROOM = 0
|
|
4
5
|
____exports.AmbushType[____exports.AmbushType.CHALLENGE_ROOM] = "CHALLENGE_ROOM"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CornerType.d.ts","sourceRoot":"","sources":["../../src/enums/CornerType.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IACpB,QAAQ,IAAA;IACR,SAAS,IAAA;IACT,WAAW,IAAA;IACX,YAAY,IAAA;CACb"}
|
|
1
|
+
{"version":3,"file":"CornerType.d.ts","sourceRoot":"","sources":["../../src/enums/CornerType.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,oBAAY,UAAU;IACpB,QAAQ,IAAA;IACR,SAAS,IAAA;IACT,WAAW,IAAA;IACX,YAAY,IAAA;CACb"}
|