isaacscript-common 30.9.1 → 30.11.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/index.rollup.d.ts +112 -81
- package/dist/isaacscript-common.lua +169 -98
- package/dist/src/arrays/cachedEnumValues.d.ts +2 -2
- package/dist/src/arrays/cachedEnumValues.d.ts.map +1 -1
- package/dist/src/arrays/cachedEnumValues.lua +3 -3
- package/dist/src/classes/callbacks/PostPlayerChangeStat.d.ts +2 -2
- package/dist/src/classes/callbacks/PostPlayerChangeStat.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostPlayerChangeStat.lua +2 -2
- package/dist/src/classes/features/other/EdenStartingStats.d.ts +30 -0
- package/dist/src/classes/features/other/EdenStartingStats.d.ts.map +1 -0
- package/dist/src/classes/features/other/EdenStartingStats.lua +54 -0
- package/dist/src/classes/features/other/extraConsoleCommands/commands.d.ts +2 -0
- package/dist/src/classes/features/other/extraConsoleCommands/commands.d.ts.map +1 -1
- package/dist/src/classes/features/other/extraConsoleCommands/commands.lua +7 -0
- package/dist/src/enums/ISCFeature.d.ts +29 -28
- package/dist/src/enums/ISCFeature.d.ts.map +1 -1
- package/dist/src/enums/ISCFeature.lua +30 -28
- package/dist/src/enums/{StatType.d.ts → PlayerStat.d.ts} +2 -2
- package/dist/src/enums/PlayerStat.d.ts.map +1 -0
- package/dist/src/enums/PlayerStat.lua +30 -0
- package/dist/src/features.d.ts +31 -28
- package/dist/src/features.d.ts.map +1 -1
- package/dist/src/features.lua +3 -0
- package/dist/src/functions/playerStats.d.ts +5 -3
- package/dist/src/functions/playerStats.d.ts.map +1 -1
- package/dist/src/functions/playerStats.lua +23 -18
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.lua +6 -6
- package/dist/src/interfaces/PlayerStats.d.ts +22 -0
- package/dist/src/interfaces/PlayerStats.d.ts.map +1 -0
- package/dist/src/interfaces/PlayerStats.lua +4 -0
- package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts +3 -3
- package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts.map +1 -1
- package/dist/src/shouldFire.d.ts +2 -2
- package/dist/src/shouldFire.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/arrays/cachedEnumValues.ts +3 -2
- package/src/classes/callbacks/PostPlayerChangeStat.ts +4 -4
- package/src/classes/features/other/EdenStartingStats.ts +87 -0
- package/src/classes/features/other/extraConsoleCommands/commands.ts +9 -0
- package/src/enums/ISCFeature.ts +1 -0
- package/src/enums/{StatType.ts → PlayerStat.ts} +1 -1
- package/src/features.ts +3 -0
- package/src/functions/playerStats.ts +25 -21
- package/src/index.ts +2 -2
- package/src/interfaces/PlayerStats.ts +22 -0
- package/src/interfaces/private/AddCallbackParametersCustom.ts +6 -6
- package/src/shouldFire.ts +2 -2
- package/dist/src/enums/StatType.d.ts.map +0 -1
- package/dist/src/enums/StatType.lua +0 -30
- package/dist/src/interfaces/StatTypeType.d.ts +0 -22
- package/dist/src/interfaces/StatTypeType.d.ts.map +0 -1
- package/dist/src/interfaces/StatTypeType.lua +0 -4
- package/src/interfaces/StatTypeType.ts +0 -22
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 30.
|
|
3
|
+
isaacscript-common 30.11.0
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -2845,6 +2845,37 @@ ____exports.HealthType.BROKEN = 7
|
|
|
2845
2845
|
____exports.HealthType[____exports.HealthType.BROKEN] = "BROKEN"
|
|
2846
2846
|
____exports.HealthType.MAX_HEARTS = 8
|
|
2847
2847
|
____exports.HealthType[____exports.HealthType.MAX_HEARTS] = "MAX_HEARTS"
|
|
2848
|
+
return ____exports
|
|
2849
|
+
end,
|
|
2850
|
+
["src.enums.PlayerStat"] = function(...)
|
|
2851
|
+
local ____exports = {}
|
|
2852
|
+
____exports.PlayerStat = {}
|
|
2853
|
+
____exports.PlayerStat.DAMAGE = 0
|
|
2854
|
+
____exports.PlayerStat[____exports.PlayerStat.DAMAGE] = "DAMAGE"
|
|
2855
|
+
____exports.PlayerStat.FIRE_DELAY = 1
|
|
2856
|
+
____exports.PlayerStat[____exports.PlayerStat.FIRE_DELAY] = "FIRE_DELAY"
|
|
2857
|
+
____exports.PlayerStat.SHOT_SPEED = 2
|
|
2858
|
+
____exports.PlayerStat[____exports.PlayerStat.SHOT_SPEED] = "SHOT_SPEED"
|
|
2859
|
+
____exports.PlayerStat.TEAR_HEIGHT = 3
|
|
2860
|
+
____exports.PlayerStat[____exports.PlayerStat.TEAR_HEIGHT] = "TEAR_HEIGHT"
|
|
2861
|
+
____exports.PlayerStat.TEAR_RANGE = 4
|
|
2862
|
+
____exports.PlayerStat[____exports.PlayerStat.TEAR_RANGE] = "TEAR_RANGE"
|
|
2863
|
+
____exports.PlayerStat.TEAR_FALLING_ACCELERATION = 5
|
|
2864
|
+
____exports.PlayerStat[____exports.PlayerStat.TEAR_FALLING_ACCELERATION] = "TEAR_FALLING_ACCELERATION"
|
|
2865
|
+
____exports.PlayerStat.TEAR_FALLING_SPEED = 6
|
|
2866
|
+
____exports.PlayerStat[____exports.PlayerStat.TEAR_FALLING_SPEED] = "TEAR_FALLING_SPEED"
|
|
2867
|
+
____exports.PlayerStat.MOVE_SPEED = 7
|
|
2868
|
+
____exports.PlayerStat[____exports.PlayerStat.MOVE_SPEED] = "MOVE_SPEED"
|
|
2869
|
+
____exports.PlayerStat.TEAR_FLAG = 8
|
|
2870
|
+
____exports.PlayerStat[____exports.PlayerStat.TEAR_FLAG] = "TEAR_FLAG"
|
|
2871
|
+
____exports.PlayerStat.TEAR_COLOR = 9
|
|
2872
|
+
____exports.PlayerStat[____exports.PlayerStat.TEAR_COLOR] = "TEAR_COLOR"
|
|
2873
|
+
____exports.PlayerStat.FLYING = 10
|
|
2874
|
+
____exports.PlayerStat[____exports.PlayerStat.FLYING] = "FLYING"
|
|
2875
|
+
____exports.PlayerStat.LUCK = 11
|
|
2876
|
+
____exports.PlayerStat[____exports.PlayerStat.LUCK] = "LUCK"
|
|
2877
|
+
____exports.PlayerStat.SIZE = 12
|
|
2878
|
+
____exports.PlayerStat[____exports.PlayerStat.SIZE] = "SIZE"
|
|
2848
2879
|
return ____exports
|
|
2849
2880
|
end,
|
|
2850
2881
|
["src.enums.SlotDestructionType"] = function(...)
|
|
@@ -2854,37 +2885,6 @@ ____exports.SlotDestructionType.NORMAL = 0
|
|
|
2854
2885
|
____exports.SlotDestructionType[____exports.SlotDestructionType.NORMAL] = "NORMAL"
|
|
2855
2886
|
____exports.SlotDestructionType.COLLECTIBLE_PAYOUT = 1
|
|
2856
2887
|
____exports.SlotDestructionType[____exports.SlotDestructionType.COLLECTIBLE_PAYOUT] = "COLLECTIBLE_PAYOUT"
|
|
2857
|
-
return ____exports
|
|
2858
|
-
end,
|
|
2859
|
-
["src.enums.StatType"] = function(...)
|
|
2860
|
-
local ____exports = {}
|
|
2861
|
-
____exports.StatType = {}
|
|
2862
|
-
____exports.StatType.DAMAGE = 0
|
|
2863
|
-
____exports.StatType[____exports.StatType.DAMAGE] = "DAMAGE"
|
|
2864
|
-
____exports.StatType.FIRE_DELAY = 1
|
|
2865
|
-
____exports.StatType[____exports.StatType.FIRE_DELAY] = "FIRE_DELAY"
|
|
2866
|
-
____exports.StatType.SHOT_SPEED = 2
|
|
2867
|
-
____exports.StatType[____exports.StatType.SHOT_SPEED] = "SHOT_SPEED"
|
|
2868
|
-
____exports.StatType.TEAR_HEIGHT = 3
|
|
2869
|
-
____exports.StatType[____exports.StatType.TEAR_HEIGHT] = "TEAR_HEIGHT"
|
|
2870
|
-
____exports.StatType.TEAR_RANGE = 4
|
|
2871
|
-
____exports.StatType[____exports.StatType.TEAR_RANGE] = "TEAR_RANGE"
|
|
2872
|
-
____exports.StatType.TEAR_FALLING_ACCELERATION = 5
|
|
2873
|
-
____exports.StatType[____exports.StatType.TEAR_FALLING_ACCELERATION] = "TEAR_FALLING_ACCELERATION"
|
|
2874
|
-
____exports.StatType.TEAR_FALLING_SPEED = 6
|
|
2875
|
-
____exports.StatType[____exports.StatType.TEAR_FALLING_SPEED] = "TEAR_FALLING_SPEED"
|
|
2876
|
-
____exports.StatType.MOVE_SPEED = 7
|
|
2877
|
-
____exports.StatType[____exports.StatType.MOVE_SPEED] = "MOVE_SPEED"
|
|
2878
|
-
____exports.StatType.TEAR_FLAG = 8
|
|
2879
|
-
____exports.StatType[____exports.StatType.TEAR_FLAG] = "TEAR_FLAG"
|
|
2880
|
-
____exports.StatType.TEAR_COLOR = 9
|
|
2881
|
-
____exports.StatType[____exports.StatType.TEAR_COLOR] = "TEAR_COLOR"
|
|
2882
|
-
____exports.StatType.FLYING = 10
|
|
2883
|
-
____exports.StatType[____exports.StatType.FLYING] = "FLYING"
|
|
2884
|
-
____exports.StatType.LUCK = 11
|
|
2885
|
-
____exports.StatType[____exports.StatType.LUCK] = "LUCK"
|
|
2886
|
-
____exports.StatType.SIZE = 12
|
|
2887
|
-
____exports.StatType[____exports.StatType.SIZE] = "SIZE"
|
|
2888
2888
|
return ____exports
|
|
2889
2889
|
end,
|
|
2890
2890
|
["src.types.ReadonlySet"] = function(...)
|
|
@@ -17064,10 +17064,10 @@ function ____exports.validateInterfaceMatchesEnum(self)
|
|
|
17064
17064
|
end
|
|
17065
17065
|
return ____exports
|
|
17066
17066
|
end,
|
|
17067
|
-
["src.interfaces.
|
|
17067
|
+
["src.interfaces.PlayerStats"] = function(...)
|
|
17068
17068
|
local ____exports = {}
|
|
17069
|
-
local
|
|
17070
|
-
local
|
|
17069
|
+
local ____PlayerStat = require("src.enums.PlayerStat")
|
|
17070
|
+
local PlayerStat = ____PlayerStat.PlayerStat
|
|
17071
17071
|
return ____exports
|
|
17072
17072
|
end,
|
|
17073
17073
|
["src.interfaces.private.AddCallbackParametersCustom"] = function(...)
|
|
@@ -17144,61 +17144,63 @@ ____exports.ISCFeature.DISABLE_ALL_SOUND = 25
|
|
|
17144
17144
|
____exports.ISCFeature[____exports.ISCFeature.DISABLE_ALL_SOUND] = "DISABLE_ALL_SOUND"
|
|
17145
17145
|
____exports.ISCFeature.DISABLE_INPUTS = 26
|
|
17146
17146
|
____exports.ISCFeature[____exports.ISCFeature.DISABLE_INPUTS] = "DISABLE_INPUTS"
|
|
17147
|
-
____exports.ISCFeature.
|
|
17147
|
+
____exports.ISCFeature.EDEN_STARTING_STATS = 27
|
|
17148
|
+
____exports.ISCFeature[____exports.ISCFeature.EDEN_STARTING_STATS] = "EDEN_STARTING_STATS"
|
|
17149
|
+
____exports.ISCFeature.FADE_IN_REMOVER = 28
|
|
17148
17150
|
____exports.ISCFeature[____exports.ISCFeature.FADE_IN_REMOVER] = "FADE_IN_REMOVER"
|
|
17149
|
-
____exports.ISCFeature.FAST_RESET =
|
|
17151
|
+
____exports.ISCFeature.FAST_RESET = 29
|
|
17150
17152
|
____exports.ISCFeature[____exports.ISCFeature.FAST_RESET] = "FAST_RESET"
|
|
17151
|
-
____exports.ISCFeature.FLYING_DETECTION =
|
|
17153
|
+
____exports.ISCFeature.FLYING_DETECTION = 30
|
|
17152
17154
|
____exports.ISCFeature[____exports.ISCFeature.FLYING_DETECTION] = "FLYING_DETECTION"
|
|
17153
|
-
____exports.ISCFeature.FORGOTTEN_SWITCH =
|
|
17155
|
+
____exports.ISCFeature.FORGOTTEN_SWITCH = 31
|
|
17154
17156
|
____exports.ISCFeature[____exports.ISCFeature.FORGOTTEN_SWITCH] = "FORGOTTEN_SWITCH"
|
|
17155
|
-
____exports.ISCFeature.EXTRA_CONSOLE_COMMANDS =
|
|
17157
|
+
____exports.ISCFeature.EXTRA_CONSOLE_COMMANDS = 32
|
|
17156
17158
|
____exports.ISCFeature[____exports.ISCFeature.EXTRA_CONSOLE_COMMANDS] = "EXTRA_CONSOLE_COMMANDS"
|
|
17157
|
-
____exports.ISCFeature.ITEM_POOL_DETECTION =
|
|
17159
|
+
____exports.ISCFeature.ITEM_POOL_DETECTION = 33
|
|
17158
17160
|
____exports.ISCFeature[____exports.ISCFeature.ITEM_POOL_DETECTION] = "ITEM_POOL_DETECTION"
|
|
17159
|
-
____exports.ISCFeature.MODDED_ELEMENT_DETECTION =
|
|
17161
|
+
____exports.ISCFeature.MODDED_ELEMENT_DETECTION = 34
|
|
17160
17162
|
____exports.ISCFeature[____exports.ISCFeature.MODDED_ELEMENT_DETECTION] = "MODDED_ELEMENT_DETECTION"
|
|
17161
|
-
____exports.ISCFeature.MODDED_ELEMENT_SETS =
|
|
17163
|
+
____exports.ISCFeature.MODDED_ELEMENT_SETS = 35
|
|
17162
17164
|
____exports.ISCFeature[____exports.ISCFeature.MODDED_ELEMENT_SETS] = "MODDED_ELEMENT_SETS"
|
|
17163
|
-
____exports.ISCFeature.NO_SIREN_STEAL =
|
|
17165
|
+
____exports.ISCFeature.NO_SIREN_STEAL = 36
|
|
17164
17166
|
____exports.ISCFeature[____exports.ISCFeature.NO_SIREN_STEAL] = "NO_SIREN_STEAL"
|
|
17165
|
-
____exports.ISCFeature.PAUSE =
|
|
17167
|
+
____exports.ISCFeature.PAUSE = 37
|
|
17166
17168
|
____exports.ISCFeature[____exports.ISCFeature.PAUSE] = "PAUSE"
|
|
17167
|
-
____exports.ISCFeature.PERSISTENT_ENTITIES =
|
|
17169
|
+
____exports.ISCFeature.PERSISTENT_ENTITIES = 38
|
|
17168
17170
|
____exports.ISCFeature[____exports.ISCFeature.PERSISTENT_ENTITIES] = "PERSISTENT_ENTITIES"
|
|
17169
|
-
____exports.ISCFeature.PICKUP_INDEX_CREATION =
|
|
17171
|
+
____exports.ISCFeature.PICKUP_INDEX_CREATION = 39
|
|
17170
17172
|
____exports.ISCFeature[____exports.ISCFeature.PICKUP_INDEX_CREATION] = "PICKUP_INDEX_CREATION"
|
|
17171
|
-
____exports.ISCFeature.PLAYER_INVENTORY =
|
|
17173
|
+
____exports.ISCFeature.PLAYER_INVENTORY = 40
|
|
17172
17174
|
____exports.ISCFeature[____exports.ISCFeature.PLAYER_INVENTORY] = "PLAYER_INVENTORY"
|
|
17173
|
-
____exports.ISCFeature.PONY_DETECTION =
|
|
17175
|
+
____exports.ISCFeature.PONY_DETECTION = 41
|
|
17174
17176
|
____exports.ISCFeature[____exports.ISCFeature.PONY_DETECTION] = "PONY_DETECTION"
|
|
17175
|
-
____exports.ISCFeature.PRESS_INPUT =
|
|
17177
|
+
____exports.ISCFeature.PRESS_INPUT = 42
|
|
17176
17178
|
____exports.ISCFeature[____exports.ISCFeature.PRESS_INPUT] = "PRESS_INPUT"
|
|
17177
|
-
____exports.ISCFeature.PREVENT_CHILD_ENTITIES =
|
|
17179
|
+
____exports.ISCFeature.PREVENT_CHILD_ENTITIES = 43
|
|
17178
17180
|
____exports.ISCFeature[____exports.ISCFeature.PREVENT_CHILD_ENTITIES] = "PREVENT_CHILD_ENTITIES"
|
|
17179
|
-
____exports.ISCFeature.PREVENT_COLLECTIBLE_ROTATION =
|
|
17181
|
+
____exports.ISCFeature.PREVENT_COLLECTIBLE_ROTATION = 44
|
|
17180
17182
|
____exports.ISCFeature[____exports.ISCFeature.PREVENT_COLLECTIBLE_ROTATION] = "PREVENT_COLLECTIBLE_ROTATION"
|
|
17181
|
-
____exports.ISCFeature.PREVENT_GRID_ENTITY_RESPAWN =
|
|
17183
|
+
____exports.ISCFeature.PREVENT_GRID_ENTITY_RESPAWN = 45
|
|
17182
17184
|
____exports.ISCFeature[____exports.ISCFeature.PREVENT_GRID_ENTITY_RESPAWN] = "PREVENT_GRID_ENTITY_RESPAWN"
|
|
17183
|
-
____exports.ISCFeature.ROOM_CLEAR_FRAME =
|
|
17185
|
+
____exports.ISCFeature.ROOM_CLEAR_FRAME = 46
|
|
17184
17186
|
____exports.ISCFeature[____exports.ISCFeature.ROOM_CLEAR_FRAME] = "ROOM_CLEAR_FRAME"
|
|
17185
|
-
____exports.ISCFeature.ROOM_HISTORY =
|
|
17187
|
+
____exports.ISCFeature.ROOM_HISTORY = 47
|
|
17186
17188
|
____exports.ISCFeature[____exports.ISCFeature.ROOM_HISTORY] = "ROOM_HISTORY"
|
|
17187
|
-
____exports.ISCFeature.RUN_IN_N_FRAMES =
|
|
17189
|
+
____exports.ISCFeature.RUN_IN_N_FRAMES = 48
|
|
17188
17190
|
____exports.ISCFeature[____exports.ISCFeature.RUN_IN_N_FRAMES] = "RUN_IN_N_FRAMES"
|
|
17189
|
-
____exports.ISCFeature.RUN_NEXT_ROOM =
|
|
17191
|
+
____exports.ISCFeature.RUN_NEXT_ROOM = 49
|
|
17190
17192
|
____exports.ISCFeature[____exports.ISCFeature.RUN_NEXT_ROOM] = "RUN_NEXT_ROOM"
|
|
17191
|
-
____exports.ISCFeature.SAVE_DATA_MANAGER =
|
|
17193
|
+
____exports.ISCFeature.SAVE_DATA_MANAGER = 50
|
|
17192
17194
|
____exports.ISCFeature[____exports.ISCFeature.SAVE_DATA_MANAGER] = "SAVE_DATA_MANAGER"
|
|
17193
|
-
____exports.ISCFeature.SPAWN_ALT_ROCK_REWARDS =
|
|
17195
|
+
____exports.ISCFeature.SPAWN_ALT_ROCK_REWARDS = 51
|
|
17194
17196
|
____exports.ISCFeature[____exports.ISCFeature.SPAWN_ALT_ROCK_REWARDS] = "SPAWN_ALT_ROCK_REWARDS"
|
|
17195
|
-
____exports.ISCFeature.SPAWN_COLLECTIBLE =
|
|
17197
|
+
____exports.ISCFeature.SPAWN_COLLECTIBLE = 52
|
|
17196
17198
|
____exports.ISCFeature[____exports.ISCFeature.SPAWN_COLLECTIBLE] = "SPAWN_COLLECTIBLE"
|
|
17197
|
-
____exports.ISCFeature.STAGE_HISTORY =
|
|
17199
|
+
____exports.ISCFeature.STAGE_HISTORY = 53
|
|
17198
17200
|
____exports.ISCFeature[____exports.ISCFeature.STAGE_HISTORY] = "STAGE_HISTORY"
|
|
17199
|
-
____exports.ISCFeature.START_AMBUSH =
|
|
17201
|
+
____exports.ISCFeature.START_AMBUSH = 54
|
|
17200
17202
|
____exports.ISCFeature[____exports.ISCFeature.START_AMBUSH] = "START_AMBUSH"
|
|
17201
|
-
____exports.ISCFeature.TAINTED_LAZARUS_PLAYERS =
|
|
17203
|
+
____exports.ISCFeature.TAINTED_LAZARUS_PLAYERS = 55
|
|
17202
17204
|
____exports.ISCFeature[____exports.ISCFeature.TAINTED_LAZARUS_PLAYERS] = "TAINTED_LAZARUS_PLAYERS"
|
|
17203
17205
|
return ____exports
|
|
17204
17206
|
end,
|
|
@@ -18692,8 +18694,8 @@ local SoundEffect = ____isaac_2Dtypescript_2Ddefinitions.SoundEffect
|
|
|
18692
18694
|
local TrinketSlot = ____isaac_2Dtypescript_2Ddefinitions.TrinketSlot
|
|
18693
18695
|
local ____HealthType = require("src.enums.HealthType")
|
|
18694
18696
|
local HealthType = ____HealthType.HealthType
|
|
18695
|
-
local
|
|
18696
|
-
local
|
|
18697
|
+
local ____PlayerStat = require("src.enums.PlayerStat")
|
|
18698
|
+
local PlayerStat = ____PlayerStat.PlayerStat
|
|
18697
18699
|
local ____SerializationBrand = require("src.enums.private.SerializationBrand")
|
|
18698
18700
|
local SerializationBrand = ____SerializationBrand.SerializationBrand
|
|
18699
18701
|
local ____enums = require("src.functions.enums")
|
|
@@ -18716,7 +18718,7 @@ ____exports.POCKET_ITEM_SLOT_VALUES = getEnumValues(nil, PocketItemSlot)
|
|
|
18716
18718
|
____exports.ROOM_SHAPE_VALUES = getEnumValues(nil, RoomShape)
|
|
18717
18719
|
____exports.SERIALIZATION_BRAND_VALUES = getEnumValues(nil, SerializationBrand)
|
|
18718
18720
|
____exports.SOUND_EFFECT_VALUES = getEnumValues(nil, SoundEffect)
|
|
18719
|
-
____exports.
|
|
18721
|
+
____exports.PLAYER_STAT_VALUES = getEnumValues(nil, PlayerStat)
|
|
18720
18722
|
____exports.TRINKET_SLOT_VALUES = getEnumValues(nil, TrinketSlot)
|
|
18721
18723
|
return ____exports
|
|
18722
18724
|
end,
|
|
@@ -30595,24 +30597,28 @@ return ____exports
|
|
|
30595
30597
|
end,
|
|
30596
30598
|
["src.functions.playerStats"] = function(...)
|
|
30597
30599
|
local ____exports = {}
|
|
30598
|
-
local
|
|
30599
|
-
local
|
|
30600
|
-
function ____exports.
|
|
30601
|
-
return
|
|
30602
|
-
[
|
|
30603
|
-
[
|
|
30604
|
-
[
|
|
30605
|
-
[
|
|
30606
|
-
[
|
|
30607
|
-
[
|
|
30608
|
-
[
|
|
30609
|
-
[
|
|
30610
|
-
[
|
|
30611
|
-
[
|
|
30612
|
-
[
|
|
30613
|
-
[
|
|
30614
|
-
[
|
|
30615
|
-
}
|
|
30600
|
+
local ____PlayerStat = require("src.enums.PlayerStat")
|
|
30601
|
+
local PlayerStat = ____PlayerStat.PlayerStat
|
|
30602
|
+
function ____exports.getPlayerStats(self, player)
|
|
30603
|
+
return {
|
|
30604
|
+
[PlayerStat.DAMAGE] = player.Damage,
|
|
30605
|
+
[PlayerStat.FIRE_DELAY] = player.MaxFireDelay,
|
|
30606
|
+
[PlayerStat.SHOT_SPEED] = player.ShotSpeed,
|
|
30607
|
+
[PlayerStat.TEAR_HEIGHT] = player.TearHeight,
|
|
30608
|
+
[PlayerStat.TEAR_RANGE] = player.TearRange,
|
|
30609
|
+
[PlayerStat.TEAR_FALLING_ACCELERATION] = player.TearFallingAcceleration,
|
|
30610
|
+
[PlayerStat.TEAR_FALLING_SPEED] = player.TearFallingSpeed,
|
|
30611
|
+
[PlayerStat.MOVE_SPEED] = player.MoveSpeed,
|
|
30612
|
+
[PlayerStat.TEAR_FLAG] = player.TearFlags,
|
|
30613
|
+
[PlayerStat.TEAR_COLOR] = player.TearColor,
|
|
30614
|
+
[PlayerStat.FLYING] = player.CanFly,
|
|
30615
|
+
[PlayerStat.LUCK] = player.Luck,
|
|
30616
|
+
[PlayerStat.SIZE] = player.SpriteScale
|
|
30617
|
+
}
|
|
30618
|
+
end
|
|
30619
|
+
function ____exports.getPlayerStat(self, player, playerStat)
|
|
30620
|
+
local playerStats = ____exports.getPlayerStats(nil, player)
|
|
30621
|
+
return playerStats[playerStat]
|
|
30616
30622
|
end
|
|
30617
30623
|
return ____exports
|
|
30618
30624
|
end,
|
|
@@ -30625,7 +30631,7 @@ local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
|
30625
30631
|
local ____exports = {}
|
|
30626
30632
|
local statEquals
|
|
30627
30633
|
local ____cachedEnumValues = require("src.arrays.cachedEnumValues")
|
|
30628
|
-
local
|
|
30634
|
+
local PLAYER_STAT_VALUES = ____cachedEnumValues.PLAYER_STAT_VALUES
|
|
30629
30635
|
local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
|
|
30630
30636
|
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
30631
30637
|
local ____bitSet128 = require("src.functions.bitSet128")
|
|
@@ -30687,7 +30693,7 @@ function PostPlayerChangeStat.prototype.____constructor(self)
|
|
|
30687
30693
|
self.postPEffectReordered = function(____, player)
|
|
30688
30694
|
local playerIndex = getPlayerIndex(nil, player, true)
|
|
30689
30695
|
local playerStatMap = v.run.playersStatMap:getAndSetDefault(playerIndex)
|
|
30690
|
-
for ____, statType in ipairs(
|
|
30696
|
+
for ____, statType in ipairs(PLAYER_STAT_VALUES) do
|
|
30691
30697
|
do
|
|
30692
30698
|
local storedStatValue = playerStatMap:get(statType)
|
|
30693
30699
|
local currentStatValue = getPlayerStat(nil, player, statType)
|
|
@@ -46913,6 +46919,62 @@ function DeployJSONRoom.prototype.deployJSONRoom(self, jsonRoom, seedOrRNG, verb
|
|
|
46913
46919
|
self.preventGridEntityRespawn:preventGridEntityRespawn()
|
|
46914
46920
|
end
|
|
46915
46921
|
__TS__Decorate({Exported}, DeployJSONRoom.prototype, "deployJSONRoom", true)
|
|
46922
|
+
return ____exports
|
|
46923
|
+
end,
|
|
46924
|
+
["src.classes.features.other.EdenStartingStats"] = function(...)
|
|
46925
|
+
local ____lualib = require("lualib_bundle")
|
|
46926
|
+
local Map = ____lualib.Map
|
|
46927
|
+
local __TS__New = ____lualib.__TS__New
|
|
46928
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
46929
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
46930
|
+
local __TS__Decorate = ____lualib.__TS__Decorate
|
|
46931
|
+
local ____exports = {}
|
|
46932
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
46933
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
46934
|
+
local ____decorators = require("src.decorators")
|
|
46935
|
+
local Exported = ____decorators.Exported
|
|
46936
|
+
local ____playerDataStructures = require("src.functions.playerDataStructures")
|
|
46937
|
+
local mapGetPlayer = ____playerDataStructures.mapGetPlayer
|
|
46938
|
+
local mapSetPlayer = ____playerDataStructures.mapSetPlayer
|
|
46939
|
+
local ____playerStats = require("src.functions.playerStats")
|
|
46940
|
+
local getPlayerStats = ____playerStats.getPlayerStats
|
|
46941
|
+
local ____players = require("src.functions.players")
|
|
46942
|
+
local isEden = ____players.isEden
|
|
46943
|
+
local ____Feature = require("src.classes.private.Feature")
|
|
46944
|
+
local Feature = ____Feature.Feature
|
|
46945
|
+
local v = {run = {edenPlayerStats = __TS__New(Map)}}
|
|
46946
|
+
____exports.EdenStartingStats = __TS__Class()
|
|
46947
|
+
local EdenStartingStats = ____exports.EdenStartingStats
|
|
46948
|
+
EdenStartingStats.name = "EdenStartingStats"
|
|
46949
|
+
__TS__ClassExtends(EdenStartingStats, Feature)
|
|
46950
|
+
function EdenStartingStats.prototype.____constructor(self)
|
|
46951
|
+
Feature.prototype.____constructor(self)
|
|
46952
|
+
self.v = v
|
|
46953
|
+
self.postPlayerInit = function(____, player)
|
|
46954
|
+
if not isEden(nil, player) then
|
|
46955
|
+
return
|
|
46956
|
+
end
|
|
46957
|
+
local existingStatMap = mapGetPlayer(nil, v.run.edenPlayerStats, player)
|
|
46958
|
+
if existingStatMap ~= nil then
|
|
46959
|
+
return
|
|
46960
|
+
end
|
|
46961
|
+
local playerStats = getPlayerStats(nil, player)
|
|
46962
|
+
mapSetPlayer(nil, v.run.edenPlayerStats, player, playerStats)
|
|
46963
|
+
end
|
|
46964
|
+
self.callbacksUsed = {{ModCallback.POST_PLAYER_INIT, self.postPlayerInit}}
|
|
46965
|
+
end
|
|
46966
|
+
function EdenStartingStats.prototype.getEdenStartingStat(self, player, playerStat)
|
|
46967
|
+
local playerStats = mapGetPlayer(nil, v.run.edenPlayerStats, player)
|
|
46968
|
+
if playerStats == nil then
|
|
46969
|
+
return nil
|
|
46970
|
+
end
|
|
46971
|
+
return playerStats[playerStat]
|
|
46972
|
+
end
|
|
46973
|
+
function EdenStartingStats.prototype.getEdenStartingStats(self, player)
|
|
46974
|
+
return mapGetPlayer(nil, v.run.edenPlayerStats, player)
|
|
46975
|
+
end
|
|
46976
|
+
__TS__Decorate({Exported}, EdenStartingStats.prototype, "getEdenStartingStat", true)
|
|
46977
|
+
__TS__Decorate({Exported}, EdenStartingStats.prototype, "getEdenStartingStats", true)
|
|
46916
46978
|
return ____exports
|
|
46917
46979
|
end,
|
|
46918
46980
|
["src.functions.deepCopyTests"] = function(...)
|
|
@@ -50119,6 +50181,12 @@ function ____exports.speed(self, params)
|
|
|
50119
50181
|
____exports.flight(nil, value)
|
|
50120
50182
|
printEnabled(nil, v.persistent.speed, "set speed")
|
|
50121
50183
|
end
|
|
50184
|
+
function ____exports.spikes(self)
|
|
50185
|
+
local roomClass = game:GetRoom()
|
|
50186
|
+
local player = Isaac.GetPlayer()
|
|
50187
|
+
local tilePosition = roomClass:FindFreeTilePosition(player.Position, 0)
|
|
50188
|
+
spawnGridEntity(nil, GridEntityType.SPIKES, tilePosition)
|
|
50189
|
+
end
|
|
50122
50190
|
function ____exports.startRoom(self)
|
|
50123
50191
|
____exports.startingRoom(nil)
|
|
50124
50192
|
end
|
|
@@ -51756,6 +51824,8 @@ local ____DisableAllSound = require("src.classes.features.other.DisableAllSound"
|
|
|
51756
51824
|
local DisableAllSound = ____DisableAllSound.DisableAllSound
|
|
51757
51825
|
local ____DisableInputs = require("src.classes.features.other.DisableInputs")
|
|
51758
51826
|
local DisableInputs = ____DisableInputs.DisableInputs
|
|
51827
|
+
local ____EdenStartingStats = require("src.classes.features.other.EdenStartingStats")
|
|
51828
|
+
local EdenStartingStats = ____EdenStartingStats.EdenStartingStats
|
|
51759
51829
|
local ____ExtraConsoleCommands = require("src.classes.features.other.ExtraConsoleCommands")
|
|
51760
51830
|
local ExtraConsoleCommands = ____ExtraConsoleCommands.ExtraConsoleCommands
|
|
51761
51831
|
local ____FadeInRemover = require("src.classes.features.other.FadeInRemover")
|
|
@@ -51911,6 +51981,7 @@ function ____exports.getFeatures(self, mod, callbacks)
|
|
|
51911
51981
|
[ISCFeature.DEPLOY_JSON_ROOM] = __TS__New(DeployJSONRoom, preventGridEntityRespawn, spawnCollectible),
|
|
51912
51982
|
[ISCFeature.DISABLE_ALL_SOUND] = disableAllSound,
|
|
51913
51983
|
[ISCFeature.DISABLE_INPUTS] = disableInputs,
|
|
51984
|
+
[ISCFeature.EDEN_STARTING_STATS] = __TS__New(EdenStartingStats),
|
|
51914
51985
|
[ISCFeature.FADE_IN_REMOVER] = __TS__New(FadeInRemover),
|
|
51915
51986
|
[ISCFeature.FAST_RESET] = __TS__New(FastReset),
|
|
51916
51987
|
[ISCFeature.FLYING_DETECTION] = __TS__New(FlyingDetection, moddedElementSets),
|
|
@@ -53873,7 +53944,7 @@ do
|
|
|
53873
53944
|
end
|
|
53874
53945
|
end
|
|
53875
53946
|
do
|
|
53876
|
-
local ____export = require("src.enums.
|
|
53947
|
+
local ____export = require("src.enums.PlayerStat")
|
|
53877
53948
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
53878
53949
|
if ____exportKey ~= "default" then
|
|
53879
53950
|
____exports[____exportKey] = ____exportValue
|
|
@@ -53881,7 +53952,7 @@ do
|
|
|
53881
53952
|
end
|
|
53882
53953
|
end
|
|
53883
53954
|
do
|
|
53884
|
-
local ____export = require("src.enums.
|
|
53955
|
+
local ____export = require("src.enums.PocketItemType")
|
|
53885
53956
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
53886
53957
|
if ____exportKey ~= "default" then
|
|
53887
53958
|
____exports[____exportKey] = ____exportValue
|
|
@@ -53889,7 +53960,7 @@ do
|
|
|
53889
53960
|
end
|
|
53890
53961
|
end
|
|
53891
53962
|
do
|
|
53892
|
-
local ____export = require("src.enums.
|
|
53963
|
+
local ____export = require("src.enums.RockAltType")
|
|
53893
53964
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
53894
53965
|
if ____exportKey ~= "default" then
|
|
53895
53966
|
____exports[____exportKey] = ____exportValue
|
|
@@ -53897,7 +53968,7 @@ do
|
|
|
53897
53968
|
end
|
|
53898
53969
|
end
|
|
53899
53970
|
do
|
|
53900
|
-
local ____export = require("src.enums.
|
|
53971
|
+
local ____export = require("src.enums.SaveDataKey")
|
|
53901
53972
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
53902
53973
|
if ____exportKey ~= "default" then
|
|
53903
53974
|
____exports[____exportKey] = ____exportValue
|
|
@@ -53905,7 +53976,7 @@ do
|
|
|
53905
53976
|
end
|
|
53906
53977
|
end
|
|
53907
53978
|
do
|
|
53908
|
-
local ____export = require("src.enums.
|
|
53979
|
+
local ____export = require("src.enums.SerializationType")
|
|
53909
53980
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
53910
53981
|
if ____exportKey ~= "default" then
|
|
53911
53982
|
____exports[____exportKey] = ____exportValue
|
|
@@ -53913,7 +53984,7 @@ do
|
|
|
53913
53984
|
end
|
|
53914
53985
|
end
|
|
53915
53986
|
do
|
|
53916
|
-
local ____export = require("src.enums.
|
|
53987
|
+
local ____export = require("src.enums.SlotDestructionType")
|
|
53917
53988
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
53918
53989
|
if ____exportKey ~= "default" then
|
|
53919
53990
|
____exports[____exportKey] = ____exportValue
|
|
@@ -54981,7 +55052,7 @@ do
|
|
|
54981
55052
|
end
|
|
54982
55053
|
end
|
|
54983
55054
|
do
|
|
54984
|
-
local ____export = require("src.enums.
|
|
55055
|
+
local ____export = require("src.enums.PlayerStat")
|
|
54985
55056
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
54986
55057
|
if ____exportKey ~= "default" then
|
|
54987
55058
|
____exports[____exportKey] = ____exportValue
|
|
@@ -54989,7 +55060,7 @@ do
|
|
|
54989
55060
|
end
|
|
54990
55061
|
end
|
|
54991
55062
|
do
|
|
54992
|
-
local ____export = require("src.enums.
|
|
55063
|
+
local ____export = require("src.enums.PocketItemType")
|
|
54993
55064
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
54994
55065
|
if ____exportKey ~= "default" then
|
|
54995
55066
|
____exports[____exportKey] = ____exportValue
|
|
@@ -54997,7 +55068,7 @@ do
|
|
|
54997
55068
|
end
|
|
54998
55069
|
end
|
|
54999
55070
|
do
|
|
55000
|
-
local ____export = require("src.enums.
|
|
55071
|
+
local ____export = require("src.enums.RockAltType")
|
|
55001
55072
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
55002
55073
|
if ____exportKey ~= "default" then
|
|
55003
55074
|
____exports[____exportKey] = ____exportValue
|
|
@@ -55005,7 +55076,7 @@ do
|
|
|
55005
55076
|
end
|
|
55006
55077
|
end
|
|
55007
55078
|
do
|
|
55008
|
-
local ____export = require("src.enums.
|
|
55079
|
+
local ____export = require("src.enums.SaveDataKey")
|
|
55009
55080
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
55010
55081
|
if ____exportKey ~= "default" then
|
|
55011
55082
|
____exports[____exportKey] = ____exportValue
|
|
@@ -55013,7 +55084,7 @@ do
|
|
|
55013
55084
|
end
|
|
55014
55085
|
end
|
|
55015
55086
|
do
|
|
55016
|
-
local ____export = require("src.enums.
|
|
55087
|
+
local ____export = require("src.enums.SerializationType")
|
|
55017
55088
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
55018
55089
|
if ____exportKey ~= "default" then
|
|
55019
55090
|
____exports[____exportKey] = ____exportValue
|
|
@@ -55021,7 +55092,7 @@ do
|
|
|
55021
55092
|
end
|
|
55022
55093
|
end
|
|
55023
55094
|
do
|
|
55024
|
-
local ____export = require("src.enums.
|
|
55095
|
+
local ____export = require("src.enums.SlotDestructionType")
|
|
55025
55096
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
55026
55097
|
if ____exportKey ~= "default" then
|
|
55027
55098
|
____exports[____exportKey] = ____exportValue
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ActiveSlot, CacheFlag, ControllerIndex, DoorSlot, DoorSlotFlag, GridEntityType, GridEntityXMLType, ItemConfigCardType, ItemConfigTag, ItemPoolType, Keyboard, PillColor, PlayerForm, PocketItemSlot, RoomShape, SoundEffect, TrinketSlot } from "isaac-typescript-definitions";
|
|
2
2
|
import { HealthType } from "../enums/HealthType";
|
|
3
|
-
import {
|
|
3
|
+
import { PlayerStat } from "../enums/PlayerStat";
|
|
4
4
|
import { SerializationBrand } from "../enums/private/SerializationBrand";
|
|
5
5
|
export declare const ACTIVE_SLOT_VALUES: readonly ActiveSlot[];
|
|
6
6
|
export declare const CACHE_FLAG_VALUES: readonly CacheFlag[];
|
|
@@ -20,6 +20,6 @@ export declare const POCKET_ITEM_SLOT_VALUES: readonly PocketItemSlot[];
|
|
|
20
20
|
export declare const ROOM_SHAPE_VALUES: readonly RoomShape[];
|
|
21
21
|
export declare const SERIALIZATION_BRAND_VALUES: readonly SerializationBrand[];
|
|
22
22
|
export declare const SOUND_EFFECT_VALUES: readonly SoundEffect[];
|
|
23
|
-
export declare const
|
|
23
|
+
export declare const PLAYER_STAT_VALUES: readonly PlayerStat[];
|
|
24
24
|
export declare const TRINKET_SLOT_VALUES: readonly TrinketSlot[];
|
|
25
25
|
//# sourceMappingURL=cachedEnumValues.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cachedEnumValues.d.ts","sourceRoot":"","sources":["../../../src/arrays/cachedEnumValues.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,UAAU,EACV,SAAS,EACT,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,UAAU,EACV,cAAc,EACd,SAAS,EACT,WAAW,EACX,WAAW,EACZ,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"cachedEnumValues.d.ts","sourceRoot":"","sources":["../../../src/arrays/cachedEnumValues.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,UAAU,EACV,SAAS,EACT,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,UAAU,EACV,cAAc,EACd,SAAS,EACT,WAAW,EACX,WAAW,EACZ,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAGzE,eAAO,MAAM,kBAAkB,EAAE,SAAS,UAAU,EACzB,CAAC;AAE5B,eAAO,MAAM,iBAAiB,EAAE,SAAS,SAAS,EAA6B,CAAC;AAEhF,eAAO,MAAM,uBAAuB,EAAE,SAAS,eAAe,EAC9B,CAAC;AAEjC,eAAO,MAAM,qBAAqB,EAAE,SAAS,YAAY,EAC5B,CAAC;AAE9B,eAAO,MAAM,gBAAgB,EAAE,SAAS,QAAQ,EAA4B,CAAC;AAE7E,eAAO,MAAM,uBAAuB,EAAE,SAAS,cAAc,EAC9B,CAAC;AAEhC,eAAO,MAAM,2BAA2B,EAAE,SAAS,iBAAiB,EAClC,CAAC;AAEnC,eAAO,MAAM,sBAAsB,EAAE,SAAS,aAAa,EAC7B,CAAC;AAE/B,eAAO,MAAM,4BAA4B,EAAE,SAAS,kBAAkB,EACnC,CAAC;AAEpC,eAAO,MAAM,qBAAqB,EAAE,SAAS,YAAY,EAC5B,CAAC;AAE9B,eAAO,MAAM,eAAe,EAAE,SAAS,QAAQ,EAA4B,CAAC;AAE5E,eAAO,MAAM,kBAAkB,EAAE,SAAS,UAAU,EACzB,CAAC;AAE5B,eAAO,MAAM,iBAAiB,EAAE,SAAS,SAAS,EAA6B,CAAC;AAEhF,eAAO,MAAM,kBAAkB,EAAE,SAAS,UAAU,EACzB,CAAC;AAE5B,eAAO,MAAM,uBAAuB,EAAE,SAAS,cAAc,EAC9B,CAAC;AAEhC,eAAO,MAAM,iBAAiB,EAAE,SAAS,SAAS,EAA6B,CAAC;AAEhF,eAAO,MAAM,0BAA0B,EAAE,SAAS,kBAAkB,EACjC,CAAC;AAEpC,eAAO,MAAM,mBAAmB,EAAE,SAAS,WAAW,EAC1B,CAAC;AAE7B,eAAO,MAAM,kBAAkB,EAAE,SAAS,UAAU,EACzB,CAAC;AAE5B,eAAO,MAAM,mBAAmB,EAAE,SAAS,WAAW,EAC1B,CAAC"}
|
|
@@ -19,8 +19,8 @@ local SoundEffect = ____isaac_2Dtypescript_2Ddefinitions.SoundEffect
|
|
|
19
19
|
local TrinketSlot = ____isaac_2Dtypescript_2Ddefinitions.TrinketSlot
|
|
20
20
|
local ____HealthType = require("src.enums.HealthType")
|
|
21
21
|
local HealthType = ____HealthType.HealthType
|
|
22
|
-
local
|
|
23
|
-
local
|
|
22
|
+
local ____PlayerStat = require("src.enums.PlayerStat")
|
|
23
|
+
local PlayerStat = ____PlayerStat.PlayerStat
|
|
24
24
|
local ____SerializationBrand = require("src.enums.private.SerializationBrand")
|
|
25
25
|
local SerializationBrand = ____SerializationBrand.SerializationBrand
|
|
26
26
|
local ____enums = require("src.functions.enums")
|
|
@@ -43,6 +43,6 @@ ____exports.POCKET_ITEM_SLOT_VALUES = getEnumValues(nil, PocketItemSlot)
|
|
|
43
43
|
____exports.ROOM_SHAPE_VALUES = getEnumValues(nil, RoomShape)
|
|
44
44
|
____exports.SERIALIZATION_BRAND_VALUES = getEnumValues(nil, SerializationBrand)
|
|
45
45
|
____exports.SOUND_EFFECT_VALUES = getEnumValues(nil, SoundEffect)
|
|
46
|
-
____exports.
|
|
46
|
+
____exports.PLAYER_STAT_VALUES = getEnumValues(nil, PlayerStat)
|
|
47
47
|
____exports.TRINKET_SLOT_VALUES = getEnumValues(nil, TrinketSlot)
|
|
48
48
|
return ____exports
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModCallbackCustom } from "../../enums/ModCallbackCustom";
|
|
2
|
-
import {
|
|
2
|
+
import { PlayerStat } from "../../enums/PlayerStat";
|
|
3
3
|
import { shouldFirePlayer } from "../../shouldFire";
|
|
4
4
|
import { PlayerIndex } from "../../types/PlayerIndex";
|
|
5
5
|
import { PossibleStatType } from "../../types/PossibleStatType";
|
|
@@ -8,7 +8,7 @@ import { CustomCallback } from "../private/CustomCallback";
|
|
|
8
8
|
export declare class PostPlayerChangeStat extends CustomCallback<ModCallbackCustom.POST_PLAYER_CHANGE_STAT> {
|
|
9
9
|
v: {
|
|
10
10
|
run: {
|
|
11
|
-
playersStatMap: DefaultMap<PlayerIndex, Map<
|
|
11
|
+
playersStatMap: DefaultMap<PlayerIndex, Map<PlayerStat, PossibleStatType>, []>;
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
14
|
constructor();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostPlayerChangeStat.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/PostPlayerChangeStat.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"PostPlayerChangeStat.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/PostPlayerChangeStat.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAOpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAW3D,qBAAa,oBAAqB,SAAQ,cAAc,CAAC,iBAAiB,CAAC,uBAAuB,CAAC;IACjF,CAAC;;;;MAAK;;IAatB,UAAmB,UAAU,0BAAoB;IAGjD,OAAO,CAAC,oBAAoB,CA+B1B;CACH"}
|
|
@@ -6,7 +6,7 @@ local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
|
6
6
|
local ____exports = {}
|
|
7
7
|
local statEquals
|
|
8
8
|
local ____cachedEnumValues = require("src.arrays.cachedEnumValues")
|
|
9
|
-
local
|
|
9
|
+
local PLAYER_STAT_VALUES = ____cachedEnumValues.PLAYER_STAT_VALUES
|
|
10
10
|
local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
|
|
11
11
|
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
12
12
|
local ____bitSet128 = require("src.functions.bitSet128")
|
|
@@ -68,7 +68,7 @@ function PostPlayerChangeStat.prototype.____constructor(self)
|
|
|
68
68
|
self.postPEffectReordered = function(____, player)
|
|
69
69
|
local playerIndex = getPlayerIndex(nil, player, true)
|
|
70
70
|
local playerStatMap = v.run.playersStatMap:getAndSetDefault(playerIndex)
|
|
71
|
-
for ____, statType in ipairs(
|
|
71
|
+
for ____, statType in ipairs(PLAYER_STAT_VALUES) do
|
|
72
72
|
do
|
|
73
73
|
local storedStatValue = playerStatMap:get(statType)
|
|
74
74
|
local currentStatValue = getPlayerStat(nil, player, statType)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
+
import { PlayerStat } from "../../../enums/PlayerStat";
|
|
3
|
+
import { PlayerStats } from "../../../interfaces/PlayerStats";
|
|
4
|
+
import { Feature } from "../../private/Feature";
|
|
5
|
+
export declare class EdenStartingStats extends Feature {
|
|
6
|
+
/**
|
|
7
|
+
* We must use the `POST_PLAYER_INIT` callback since the two random collectibles have not been
|
|
8
|
+
* granted yet.
|
|
9
|
+
*/
|
|
10
|
+
private postPlayerInit;
|
|
11
|
+
/**
|
|
12
|
+
* Helper function to get the value of the randomized starting stat for Eden. (At the beginning of
|
|
13
|
+
* a run, Eden starts with randomized stats.)
|
|
14
|
+
*
|
|
15
|
+
* Returns undefined if passed a player that is not Eden.
|
|
16
|
+
*
|
|
17
|
+
* In order to use this function, you must upgrade your mod with `ISCFeature.EDEN_STARTING_STATS`.
|
|
18
|
+
*/
|
|
19
|
+
getEdenStartingStat<T extends PlayerStat>(player: EntityPlayer, playerStat: T): PlayerStats[T] | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Helper function to get all of the stat values that Eden started with at the beginning of the
|
|
22
|
+
* run.
|
|
23
|
+
*
|
|
24
|
+
* Returns undefined if passed a player that is not Eden.
|
|
25
|
+
*
|
|
26
|
+
* In order to use this function, you must upgrade your mod with `ISCFeature.EDEN_STARTING_STATS`.
|
|
27
|
+
*/
|
|
28
|
+
getEdenStartingStats(player: EntityPlayer): Readonly<PlayerStats> | undefined;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=EdenStartingStats.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EdenStartingStats.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/EdenStartingStats.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAOvD,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAE9D,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAQhD,qBAAa,iBAAkB,SAAQ,OAAO;IAc5C;;;OAGG;IACH,OAAO,CAAC,cAAc,CAYpB;IAEF;;;;;;;OAOG;IAEI,mBAAmB,CAAC,CAAC,SAAS,UAAU,EAC7C,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,CAAC,GACZ,WAAW,CAAC,CAAC,CAAC,GAAG,SAAS;IAS7B;;;;;;;OAOG;IAEI,oBAAoB,CACzB,MAAM,EAAE,YAAY,GACnB,QAAQ,CAAC,WAAW,CAAC,GAAG,SAAS;CAGrC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local Map = ____lualib.Map
|
|
3
|
+
local __TS__New = ____lualib.__TS__New
|
|
4
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
5
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
6
|
+
local __TS__Decorate = ____lualib.__TS__Decorate
|
|
7
|
+
local ____exports = {}
|
|
8
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
9
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
10
|
+
local ____decorators = require("src.decorators")
|
|
11
|
+
local Exported = ____decorators.Exported
|
|
12
|
+
local ____playerDataStructures = require("src.functions.playerDataStructures")
|
|
13
|
+
local mapGetPlayer = ____playerDataStructures.mapGetPlayer
|
|
14
|
+
local mapSetPlayer = ____playerDataStructures.mapSetPlayer
|
|
15
|
+
local ____playerStats = require("src.functions.playerStats")
|
|
16
|
+
local getPlayerStats = ____playerStats.getPlayerStats
|
|
17
|
+
local ____players = require("src.functions.players")
|
|
18
|
+
local isEden = ____players.isEden
|
|
19
|
+
local ____Feature = require("src.classes.private.Feature")
|
|
20
|
+
local Feature = ____Feature.Feature
|
|
21
|
+
local v = {run = {edenPlayerStats = __TS__New(Map)}}
|
|
22
|
+
____exports.EdenStartingStats = __TS__Class()
|
|
23
|
+
local EdenStartingStats = ____exports.EdenStartingStats
|
|
24
|
+
EdenStartingStats.name = "EdenStartingStats"
|
|
25
|
+
__TS__ClassExtends(EdenStartingStats, Feature)
|
|
26
|
+
function EdenStartingStats.prototype.____constructor(self)
|
|
27
|
+
Feature.prototype.____constructor(self)
|
|
28
|
+
self.v = v
|
|
29
|
+
self.postPlayerInit = function(____, player)
|
|
30
|
+
if not isEden(nil, player) then
|
|
31
|
+
return
|
|
32
|
+
end
|
|
33
|
+
local existingStatMap = mapGetPlayer(nil, v.run.edenPlayerStats, player)
|
|
34
|
+
if existingStatMap ~= nil then
|
|
35
|
+
return
|
|
36
|
+
end
|
|
37
|
+
local playerStats = getPlayerStats(nil, player)
|
|
38
|
+
mapSetPlayer(nil, v.run.edenPlayerStats, player, playerStats)
|
|
39
|
+
end
|
|
40
|
+
self.callbacksUsed = {{ModCallback.POST_PLAYER_INIT, self.postPlayerInit}}
|
|
41
|
+
end
|
|
42
|
+
function EdenStartingStats.prototype.getEdenStartingStat(self, player, playerStat)
|
|
43
|
+
local playerStats = mapGetPlayer(nil, v.run.edenPlayerStats, player)
|
|
44
|
+
if playerStats == nil then
|
|
45
|
+
return nil
|
|
46
|
+
end
|
|
47
|
+
return playerStats[playerStat]
|
|
48
|
+
end
|
|
49
|
+
function EdenStartingStats.prototype.getEdenStartingStats(self, player)
|
|
50
|
+
return mapGetPlayer(nil, v.run.edenPlayerStats, player)
|
|
51
|
+
end
|
|
52
|
+
__TS__Decorate({Exported}, EdenStartingStats.prototype, "getEdenStartingStat", true)
|
|
53
|
+
__TS__Decorate({Exported}, EdenStartingStats.prototype, "getEdenStartingStats", true)
|
|
54
|
+
return ____exports
|