isaacscript-common 7.10.0 → 7.13.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.
Files changed (38) hide show
  1. package/dist/features/customPickup.d.ts +24 -0
  2. package/dist/features/customPickup.d.ts.map +1 -0
  3. package/dist/features/customPickup.lua +85 -0
  4. package/dist/features/customStage/backdrop.lua +6 -4
  5. package/dist/features/customStage/customStageGridEntities.d.ts.map +1 -1
  6. package/dist/features/customStage/customStageGridEntities.lua +68 -36
  7. package/dist/features/customStage/shadows.d.ts.map +1 -1
  8. package/dist/features/customStage/shadows.lua +6 -3
  9. package/dist/features/customStage/versusScreen.d.ts.map +1 -1
  10. package/dist/features/customStage/versusScreen.lua +6 -2
  11. package/dist/functions/npcs.lua +3 -3
  12. package/dist/functions/pickups.lua +2 -2
  13. package/dist/functions/string.d.ts +5 -0
  14. package/dist/functions/string.d.ts.map +1 -1
  15. package/dist/functions/string.lua +7 -1
  16. package/dist/index.d.ts +1 -0
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.lua +5 -0
  19. package/dist/initFeatures.d.ts.map +1 -1
  20. package/dist/initFeatures.lua +3 -0
  21. package/dist/interfaces/CustomStageTSConfig.d.ts +47 -0
  22. package/dist/interfaces/CustomStageTSConfig.d.ts.map +1 -1
  23. package/dist/objects/coinSubTypeToValue.d.ts +1 -1
  24. package/dist/objects/coinSubTypeToValue.d.ts.map +1 -1
  25. package/dist/objects/coinSubTypeToValue.lua +1 -1
  26. package/package.json +1 -1
  27. package/src/features/customPickup.ts +135 -0
  28. package/src/features/customStage/backdrop.ts +5 -4
  29. package/src/features/customStage/customStageGridEntities.ts +65 -12
  30. package/src/features/customStage/shadows.ts +5 -3
  31. package/src/features/customStage/versusScreen.ts +11 -2
  32. package/src/functions/npcs.ts +2 -2
  33. package/src/functions/pickups.ts +2 -2
  34. package/src/functions/string.ts +12 -0
  35. package/src/index.ts +1 -0
  36. package/src/initFeatures.ts +2 -0
  37. package/src/interfaces/CustomStageTSConfig.ts +50 -0
  38. package/src/objects/coinSubTypeToValue.ts +1 -1
@@ -0,0 +1,24 @@
1
+ import { PickupVariant } from "isaac-typescript-definitions";
2
+ export declare function customPickupInit(mod: Mod): void;
3
+ /**
4
+ * Helper function to register a custom pickup with the IsaacScript standard library. Use this
5
+ * feature for custom pickups that are intended to be picked up by the player, like keys and bombs.
6
+ *
7
+ * When IsaacScript detects that a player should be collecting the custom pickup, then the pickup
8
+ * will be immediately removed, and an effect showing the pickup's respective `Collect` animation
9
+ * will be spawned. (This emulates how a normal vanilla pickup would work.)
10
+ *
11
+ * Note that when you specify your custom pickup in the "entities2.xml" file, it should have a type
12
+ * of "5" and be associated with an anm2 file that has a "Collect" animation.
13
+ *
14
+ * @param pickupVariantCustom The variant for the corresponding custom pickup.
15
+ * @param subType The sub-type for the corresponding custom pickup.
16
+ * @param collectFunc The function to run when the player collects this pickup.
17
+ * @param collisionFunc Optional. The function to run when a player collides with the pickup.
18
+ * Default is a function that always returns true, meaning that the player will
19
+ * always immediately collect the pickup when they collide with it. Specify
20
+ * this function if your pickup should only be able to be collected under
21
+ * certain conditions.
22
+ */
23
+ export declare function registerCustomPickup(pickupVariantCustom: PickupVariant, subType: int, collectFunc: (player: EntityPlayer) => void, collisionFunc?: (player: EntityPlayer) => boolean): void;
24
+ //# sourceMappingURL=customPickup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customPickup.d.ts","sourceRoot":"","sources":["../../src/features/customPickup.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,aAAa,EACd,MAAM,8BAA8B,CAAC;AA6BtC,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAO/C;AAuDD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,oBAAoB,CAClC,mBAAmB,EAAE,aAAa,EAClC,OAAO,EAAE,GAAG,EACZ,WAAW,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,EAC3C,aAAa,GAAE,CAAC,MAAM,EAAE,YAAY,KAAK,OAAoB,GAC5D,IAAI,CAaN"}
@@ -0,0 +1,85 @@
1
+ local ____lualib = require("lualib_bundle")
2
+ local Map = ____lualib.Map
3
+ local __TS__New = ____lualib.__TS__New
4
+ local ____exports = {}
5
+ local prePickupCollision, postEffectRenderPickupEffect, PICKUP_EFFECT_VARIANT, PICKUP_EFFECT_SUB_TYPE, customPickupFunctionsMap
6
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
7
+ local EffectVariant = ____isaac_2Dtypescript_2Ddefinitions.EffectVariant
8
+ local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
9
+ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
10
+ local ____featuresInitialized = require("featuresInitialized")
11
+ local errorIfFeaturesNotInitialized = ____featuresInitialized.errorIfFeaturesNotInitialized
12
+ local ____entities = require("functions.entities")
13
+ local getEntityID = ____entities.getEntityID
14
+ local getEntityIDFromConstituents = ____entities.getEntityIDFromConstituents
15
+ local ____entitiesSpecific = require("functions.entitiesSpecific")
16
+ local spawnEffect = ____entitiesSpecific.spawnEffect
17
+ function prePickupCollision(self, pickup, collider)
18
+ local entityID = getEntityID(nil, pickup)
19
+ local customPickupFunctions = customPickupFunctionsMap:get(entityID)
20
+ if customPickupFunctions == nil then
21
+ return nil
22
+ end
23
+ local player = collider:ToPlayer()
24
+ if player == nil then
25
+ return nil
26
+ end
27
+ local shouldPickup = customPickupFunctions:collisionFunc(player)
28
+ if not shouldPickup then
29
+ return nil
30
+ end
31
+ pickup:Remove()
32
+ local pickupSprite = pickup:GetSprite()
33
+ local fileName = pickupSprite:GetFilename()
34
+ local effect = spawnEffect(nil, PICKUP_EFFECT_VARIANT, PICKUP_EFFECT_SUB_TYPE, pickup.Position)
35
+ local effectSprite = effect:GetSprite()
36
+ effectSprite:Load(fileName, true)
37
+ effectSprite:Play("Collect", true)
38
+ customPickupFunctions:collectFunc(player)
39
+ return nil
40
+ end
41
+ function postEffectRenderPickupEffect(self, effect)
42
+ if effect.SubType ~= PICKUP_EFFECT_SUB_TYPE then
43
+ return
44
+ end
45
+ local sprite = effect:GetSprite()
46
+ if sprite:IsFinished("Collect") then
47
+ effect:Remove()
48
+ end
49
+ end
50
+ local FEATURE_NAME = "customPickup"
51
+ PICKUP_EFFECT_VARIANT = EffectVariant.LADDER
52
+ PICKUP_EFFECT_SUB_TYPE = 103
53
+ customPickupFunctionsMap = __TS__New(Map)
54
+ function ____exports.customPickupInit(self, mod)
55
+ mod:AddCallback(ModCallback.PRE_PICKUP_COLLISION, prePickupCollision)
56
+ mod:AddCallback(ModCallback.POST_EFFECT_RENDER, postEffectRenderPickupEffect, PICKUP_EFFECT_VARIANT)
57
+ end
58
+ --- Helper function to register a custom pickup with the IsaacScript standard library. Use this
59
+ -- feature for custom pickups that are intended to be picked up by the player, like keys and bombs.
60
+ --
61
+ -- When IsaacScript detects that a player should be collecting the custom pickup, then the pickup
62
+ -- will be immediately removed, and an effect showing the pickup's respective `Collect` animation
63
+ -- will be spawned. (This emulates how a normal vanilla pickup would work.)
64
+ --
65
+ -- Note that when you specify your custom pickup in the "entities2.xml" file, it should have a type
66
+ -- of "5" and be associated with an anm2 file that has a "Collect" animation.
67
+ --
68
+ -- @param pickupVariantCustom The variant for the corresponding custom pickup.
69
+ -- @param subType The sub-type for the corresponding custom pickup.
70
+ -- @param collectFunc The function to run when the player collects this pickup.
71
+ -- @param collisionFunc Optional. The function to run when a player collides with the pickup.
72
+ -- Default is a function that always returns true, meaning that the player will
73
+ -- always immediately collect the pickup when they collide with it. Specify
74
+ -- this function if your pickup should only be able to be collected under
75
+ -- certain conditions.
76
+ function ____exports.registerCustomPickup(self, pickupVariantCustom, subType, collectFunc, collisionFunc)
77
+ if collisionFunc == nil then
78
+ collisionFunc = function() return true end
79
+ end
80
+ errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
81
+ local entityID = getEntityIDFromConstituents(nil, EntityType.PICKUP, pickupVariantCustom, subType)
82
+ local customPickupFunctions = {collectFunc = collectFunc, collisionFunc = collisionFunc}
83
+ customPickupFunctionsMap:set(entityID, customPickupFunctions)
84
+ end
85
+ return ____exports
@@ -2,7 +2,7 @@ local ____lualib = require("lualib_bundle")
2
2
  local Set = ____lualib.Set
3
3
  local __TS__New = ____lualib.__TS__New
4
4
  local ____exports = {}
5
- local getBackdropPNGPath, spawnWallEntity, spawnSecondWallEntity, spawnFloorEntity, getNumFloorLayers, BackdropKind, DEFAULT_BACKDROP, ROOM_SHAPE_WALL_ANM2_LAYERS, ROOM_SHAPE_WALL_EXTRA_ANM2_LAYERS, WALL_OFFSET, L_FLOOR_ANM2_LAYERS, N_FLOOR_ANM2_LAYERS, BACKDROP_EFFECT_VARIANT, BACKDROP_EFFECT_SUBTYPE
5
+ local getBackdropPNGPath, spawnWallEntity, spawnSecondWallEntity, spawnFloorEntity, getNumFloorLayers, BackdropKind, DEFAULT_BACKDROP, ROOM_SHAPE_WALL_ANM2_LAYERS, ROOM_SHAPE_WALL_EXTRA_ANM2_LAYERS, WALL_OFFSET, L_FLOOR_ANM2_LAYERS, N_FLOOR_ANM2_LAYERS, BACKDROP_EFFECT_VARIANT, BACKDROP_EFFECT_SUB_TYPE
6
6
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
7
7
  local EffectVariant = ____isaac_2Dtypescript_2Ddefinitions.EffectVariant
8
8
  local EntityFlag = ____isaac_2Dtypescript_2Ddefinitions.EntityFlag
@@ -22,6 +22,7 @@ local ____roomShape = require("functions.roomShape")
22
22
  local isLRoom = ____roomShape.isLRoom
23
23
  local isNarrowRoom = ____roomShape.isNarrowRoom
24
24
  local ____string = require("functions.string")
25
+ local removeCharactersBefore = ____string.removeCharactersBefore
25
26
  local trimPrefix = ____string.trimPrefix
26
27
  local ____utils = require("functions.utils")
27
28
  local erange = ____utils.erange
@@ -31,7 +32,8 @@ local ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH = ____customStageConstants.ISAACSCRIPT_C
31
32
  function getBackdropPNGPath(self, customStage, backdropKind, rng)
32
33
  local backdrop = customStage.backdropPNGPaths == nil and DEFAULT_BACKDROP or customStage.backdropPNGPaths
33
34
  local pathArray = backdrop[backdropKind]
34
- return getRandomArrayElement(nil, pathArray, rng)
35
+ local randomPath = getRandomArrayElement(nil, pathArray, rng)
36
+ return removeCharactersBefore(nil, randomPath, "gfx/")
35
37
  end
36
38
  function spawnWallEntity(self, customStage, rng, isExtraWall)
37
39
  local room = game:GetRoom()
@@ -40,7 +42,7 @@ function spawnWallEntity(self, customStage, rng, isExtraWall)
40
42
  local wallEffect = spawnEffectWithSeed(
41
43
  nil,
42
44
  BACKDROP_EFFECT_VARIANT,
43
- BACKDROP_EFFECT_SUBTYPE,
45
+ BACKDROP_EFFECT_SUB_TYPE,
44
46
  VectorZero,
45
47
  seed
46
48
  )
@@ -179,7 +181,7 @@ WALL_OFFSET = Vector(-80, -80)
179
181
  L_FLOOR_ANM2_LAYERS = {16, 17}
180
182
  N_FLOOR_ANM2_LAYERS = {18, 19}
181
183
  BACKDROP_EFFECT_VARIANT = EffectVariant.LADDER
182
- BACKDROP_EFFECT_SUBTYPE = 101
184
+ BACKDROP_EFFECT_SUB_TYPE = 101
183
185
  local BACKDROP_ROOM_TYPE_SET = __TS__New(Set, {RoomType.DEFAULT, RoomType.BOSS, RoomType.MINI_BOSS})
184
186
  function ____exports.setCustomStageBackdrop(self, customStage)
185
187
  local room = game:GetRoom()
@@ -1 +1 @@
1
- {"version":3,"file":"customStageGridEntities.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/customStageGridEntities.ts"],"names":[],"mappings":";AAiBA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AASnE,0CAA0C;AAC1C,wBAAgB,2BAA2B,CACzC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAuBN;AAED,oCAAoC;AACpC,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAyBN;AAED,mCAAmC;AACnC,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAsBN;AAED,mCAAmC;AACnC,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAuBN;AAuDD,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAwBN;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAsBN"}
1
+ {"version":3,"file":"customStageGridEntities.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/customStageGridEntities.ts"],"names":[],"mappings":";AAkBA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AASnE,0CAA0C;AAC1C,wBAAgB,2BAA2B,CACzC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAwCN;AAED,oCAAoC;AACpC,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAyDN;AAED,mCAAmC;AACnC,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAwBN;AAED,mCAAmC;AACnC,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAwBN;AAuDD,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAwBN;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAsBN"}
@@ -19,6 +19,8 @@ local getCollectibles = ____pickupsSpecific.getCollectibles
19
19
  local getTrinkets = ____pickupsSpecific.getTrinkets
20
20
  local ____stage = require("functions.stage")
21
21
  local calculateStageType = ____stage.calculateStageType
22
+ local ____string = require("functions.string")
23
+ local removeCharactersBefore = ____string.removeCharactersBefore
22
24
  local ____vector = require("functions.vector")
23
25
  local vectorEquals = ____vector.vectorEquals
24
26
  local ____customGridEntity = require("features.customGridEntity")
@@ -32,9 +34,9 @@ local ____v = require("features.customStage.v")
32
34
  local v = ____v.default
33
35
  function getNewDoorPNGPath(self, customStage, fileName)
34
36
  repeat
35
- local ____switch24 = fileName
36
- local ____cond24 = ____switch24 == "gfx/grid/door_01_normaldoor.anm2"
37
- if ____cond24 then
37
+ local ____switch30 = fileName
38
+ local ____cond30 = ____switch30 == "gfx/grid/door_01_normaldoor.anm2"
39
+ if ____cond30 then
38
40
  do
39
41
  local ____customStage_doorPNGPaths_normal_0 = customStage.doorPNGPaths
40
42
  if ____customStage_doorPNGPaths_normal_0 ~= nil then
@@ -43,8 +45,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
43
45
  return ____customStage_doorPNGPaths_normal_0
44
46
  end
45
47
  end
46
- ____cond24 = ____cond24 or ____switch24 == "gfx/grid/door_02_treasureroomdoor.anm2"
47
- if ____cond24 then
48
+ ____cond30 = ____cond30 or ____switch30 == "gfx/grid/door_02_treasureroomdoor.anm2"
49
+ if ____cond30 then
48
50
  do
49
51
  local ____customStage_doorPNGPaths_treasureRoom_2 = customStage.doorPNGPaths
50
52
  if ____customStage_doorPNGPaths_treasureRoom_2 ~= nil then
@@ -53,8 +55,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
53
55
  return ____customStage_doorPNGPaths_treasureRoom_2
54
56
  end
55
57
  end
56
- ____cond24 = ____cond24 or ____switch24 == "gfx/grid/door_03_ambushroomdoor.anm2"
57
- if ____cond24 then
58
+ ____cond30 = ____cond30 or ____switch30 == "gfx/grid/door_03_ambushroomdoor.anm2"
59
+ if ____cond30 then
58
60
  do
59
61
  local ____customStage_doorPNGPaths_normalChallengeRoom_4 = customStage.doorPNGPaths
60
62
  if ____customStage_doorPNGPaths_normalChallengeRoom_4 ~= nil then
@@ -63,8 +65,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
63
65
  return ____customStage_doorPNGPaths_normalChallengeRoom_4
64
66
  end
65
67
  end
66
- ____cond24 = ____cond24 or ____switch24 == "gfx/grid/door_04_selfsacrificeroomdoor.anm2"
67
- if ____cond24 then
68
+ ____cond30 = ____cond30 or ____switch30 == "gfx/grid/door_04_selfsacrificeroomdoor.anm2"
69
+ if ____cond30 then
68
70
  do
69
71
  local ____customStage_doorPNGPaths_curseRoom_6 = customStage.doorPNGPaths
70
72
  if ____customStage_doorPNGPaths_curseRoom_6 ~= nil then
@@ -73,8 +75,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
73
75
  return ____customStage_doorPNGPaths_curseRoom_6
74
76
  end
75
77
  end
76
- ____cond24 = ____cond24 or ____switch24 == "gfx/grid/door_05_arcaderoomdoor.anm2"
77
- if ____cond24 then
78
+ ____cond30 = ____cond30 or ____switch30 == "gfx/grid/door_05_arcaderoomdoor.anm2"
79
+ if ____cond30 then
78
80
  do
79
81
  local ____customStage_doorPNGPaths_arcade_8 = customStage.doorPNGPaths
80
82
  if ____customStage_doorPNGPaths_arcade_8 ~= nil then
@@ -83,8 +85,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
83
85
  return ____customStage_doorPNGPaths_arcade_8
84
86
  end
85
87
  end
86
- ____cond24 = ____cond24 or ____switch24 == "gfx/grid/door_07_devilroomdoor.anm2"
87
- if ____cond24 then
88
+ ____cond30 = ____cond30 or ____switch30 == "gfx/grid/door_07_devilroomdoor.anm2"
89
+ if ____cond30 then
88
90
  do
89
91
  local ____customStage_doorPNGPaths_devilRoom_10 = customStage.doorPNGPaths
90
92
  if ____customStage_doorPNGPaths_devilRoom_10 ~= nil then
@@ -93,8 +95,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
93
95
  return ____customStage_doorPNGPaths_devilRoom_10
94
96
  end
95
97
  end
96
- ____cond24 = ____cond24 or ____switch24 == "gfx/grid/door_07_holyroomdoor.anm2"
97
- if ____cond24 then
98
+ ____cond30 = ____cond30 or ____switch30 == "gfx/grid/door_07_holyroomdoor.anm2"
99
+ if ____cond30 then
98
100
  do
99
101
  local ____customStage_doorPNGPaths_angelRoom_12 = customStage.doorPNGPaths
100
102
  if ____customStage_doorPNGPaths_angelRoom_12 ~= nil then
@@ -103,8 +105,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
103
105
  return ____customStage_doorPNGPaths_angelRoom_12
104
106
  end
105
107
  end
106
- ____cond24 = ____cond24 or ____switch24 == "gfx/grid/door_08_holeinwall.anm2"
107
- if ____cond24 then
108
+ ____cond30 = ____cond30 or ____switch30 == "gfx/grid/door_08_holeinwall.anm2"
109
+ if ____cond30 then
108
110
  do
109
111
  local ____customStage_doorPNGPaths_secretRoom_14 = customStage.doorPNGPaths
110
112
  if ____customStage_doorPNGPaths_secretRoom_14 ~= nil then
@@ -113,8 +115,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
113
115
  return ____customStage_doorPNGPaths_secretRoom_14
114
116
  end
115
117
  end
116
- ____cond24 = ____cond24 or ____switch24 == "gfx/grid/door_09_bossambushroomdoor.anm2"
117
- if ____cond24 then
118
+ ____cond30 = ____cond30 or ____switch30 == "gfx/grid/door_09_bossambushroomdoor.anm2"
119
+ if ____cond30 then
118
120
  do
119
121
  local ____customStage_doorPNGPaths_bossChallengeRoom_16 = customStage.doorPNGPaths
120
122
  if ____customStage_doorPNGPaths_bossChallengeRoom_16 ~= nil then
@@ -123,8 +125,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
123
125
  return ____customStage_doorPNGPaths_bossChallengeRoom_16
124
126
  end
125
127
  end
126
- ____cond24 = ____cond24 or ____switch24 == "gfx/grid/door_10_bossroomdoor.anm2"
127
- if ____cond24 then
128
+ ____cond30 = ____cond30 or ____switch30 == "gfx/grid/door_10_bossroomdoor.anm2"
129
+ if ____cond30 then
128
130
  do
129
131
  local ____customStage_doorPNGPaths_bossRoom_18 = customStage.doorPNGPaths
130
132
  if ____customStage_doorPNGPaths_bossRoom_18 ~= nil then
@@ -133,8 +135,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
133
135
  return ____customStage_doorPNGPaths_bossRoom_18
134
136
  end
135
137
  end
136
- ____cond24 = ____cond24 or ____switch24 == "gfx/grid/door_15_bossrushdoor.anm2"
137
- if ____cond24 then
138
+ ____cond30 = ____cond30 or ____switch30 == "gfx/grid/door_15_bossrushdoor.anm2"
139
+ if ____cond30 then
138
140
  do
139
141
  local ____customStage_doorPNGPaths_bossRush_20 = customStage.doorPNGPaths
140
142
  if ____customStage_doorPNGPaths_bossRush_20 ~= nil then
@@ -155,7 +157,7 @@ function removeEntitiesSpawnedFromGridEntity(self, entities, gridEntity)
155
157
  end
156
158
  --- For `GridEntityType.DECORATION` (1)
157
159
  function ____exports.setCustomDecorationGraphics(self, customStage, gridEntity)
158
- if customStage.decorationsPNGPath == nil then
160
+ if customStage.decorationsPNGPath == nil and customStage.decorationsANM2Path == nil then
159
161
  return
160
162
  end
161
163
  if isCustomGridEntity(nil, gridEntity) then
@@ -167,14 +169,21 @@ function ____exports.setCustomDecorationGraphics(self, customStage, gridEntity)
167
169
  end
168
170
  local sprite = gridEntity:GetSprite()
169
171
  local fileName = sprite:GetFilename()
170
- if string.lower(fileName) == "gfx/grid/props_01_basement.anm2" then
171
- sprite:ReplaceSpritesheet(0, customStage.decorationsPNGPath)
172
+ if string.lower(fileName) ~= "gfx/grid/props_01_basement.anm2" then
173
+ return
174
+ end
175
+ if customStage.decorationsANM2Path ~= nil then
176
+ local anm2Path = removeCharactersBefore(nil, customStage.decorationsANM2Path, "gfx/")
177
+ sprite:Load(anm2Path, true)
178
+ elseif customStage.decorationsPNGPath ~= nil then
179
+ local pngPath = removeCharactersBefore(nil, customStage.decorationsPNGPath, "gfx/")
180
+ sprite:ReplaceSpritesheet(0, pngPath)
172
181
  sprite:LoadGraphics()
173
182
  end
174
183
  end
175
184
  --- For `GridEntityType.ROCK` (2)
176
185
  function ____exports.setCustomRockGraphics(self, customStage, gridEntity)
177
- if customStage.rocksPNGPath == nil then
186
+ if customStage.rocksPNGPath == nil and customStage.rocksANM2Path == nil then
178
187
  return
179
188
  end
180
189
  if isCustomGridEntity(nil, gridEntity) then
@@ -186,19 +195,41 @@ function ____exports.setCustomRockGraphics(self, customStage, gridEntity)
186
195
  end
187
196
  local sprite = gridEntity:GetSprite()
188
197
  local fileName = sprite:GetFilename()
189
- if fileName == "gfx/grid/grid_rock.anm2" then
190
- sprite:ReplaceSpritesheet(0, customStage.rocksPNGPath)
191
- sprite:LoadGraphics()
192
- elseif fileName == "gfx/grid/grid_pit.anm2" then
193
- sprite:ReplaceSpritesheet(1, customStage.rocksPNGPath)
194
- sprite:LoadGraphics()
195
- end
198
+ repeat
199
+ local ____switch13 = fileName
200
+ local ____cond13 = ____switch13 == "gfx/grid/grid_rock.anm2"
201
+ if ____cond13 then
202
+ do
203
+ if customStage.rocksANM2Path ~= nil then
204
+ local anm2Path = removeCharactersBefore(nil, customStage.rocksANM2Path, "gfx/")
205
+ sprite:Load(anm2Path, true)
206
+ elseif customStage.rocksPNGPath ~= nil then
207
+ local pngPath = removeCharactersBefore(nil, customStage.rocksPNGPath, "gfx/")
208
+ sprite:ReplaceSpritesheet(0, pngPath)
209
+ sprite:LoadGraphics()
210
+ end
211
+ break
212
+ end
213
+ end
214
+ ____cond13 = ____cond13 or ____switch13 == "gfx/grid/grid_pit.anm2"
215
+ if ____cond13 then
216
+ do
217
+ if customStage.rocksPNGPath ~= nil then
218
+ local pngPath = removeCharactersBefore(nil, customStage.rocksPNGPath, "gfx/")
219
+ sprite:ReplaceSpritesheet(1, pngPath)
220
+ sprite:LoadGraphics()
221
+ end
222
+ break
223
+ end
224
+ end
225
+ until true
196
226
  end
197
227
  --- For `GridEntityType.PIT` (7)
198
228
  function ____exports.setCustomPitGraphics(self, customStage, gridEntity)
199
229
  if customStage.pitsPNGPath == nil then
200
230
  return
201
231
  end
232
+ local pngPath = removeCharactersBefore(nil, customStage.pitsPNGPath, "gfx/")
202
233
  if isCustomGridEntity(nil, gridEntity) then
203
234
  return
204
235
  end
@@ -209,7 +240,7 @@ function ____exports.setCustomPitGraphics(self, customStage, gridEntity)
209
240
  local sprite = gridEntity:GetSprite()
210
241
  local fileName = sprite:GetFilename()
211
242
  if fileName == "gfx/grid/grid_pit.anm2" then
212
- sprite:ReplaceSpritesheet(0, customStage.pitsPNGPath)
243
+ sprite:ReplaceSpritesheet(0, pngPath)
213
244
  sprite:LoadGraphics()
214
245
  end
215
246
  end
@@ -229,7 +260,8 @@ function ____exports.setCustomDoorGraphics(self, customStage, gridEntity)
229
260
  local fileName = sprite:GetFilename()
230
261
  local doorPNGPath = getNewDoorPNGPath(nil, customStage, fileName)
231
262
  if doorPNGPath ~= nil then
232
- sprite:ReplaceSpritesheet(0, doorPNGPath)
263
+ local fixedPath = removeCharactersBefore(nil, doorPNGPath, "gfx/")
264
+ sprite:ReplaceSpritesheet(0, fixedPath)
233
265
  sprite:LoadGraphics()
234
266
  end
235
267
  end
@@ -1 +1 @@
1
- {"version":3,"file":"shadows.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/shadows.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAqCnE,wBAAgB,UAAU,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAsCzD"}
1
+ {"version":3,"file":"shadows.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/shadows.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAqCnE,wBAAgB,UAAU,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAuCzD"}
@@ -8,6 +8,8 @@ local ____array = require("functions.array")
8
8
  local getRandomArrayElement = ____array.getRandomArrayElement
9
9
  local ____entitiesSpecific = require("functions.entitiesSpecific")
10
10
  local spawnEffectWithSeed = ____entitiesSpecific.spawnEffectWithSeed
11
+ local ____string = require("functions.string")
12
+ local removeCharactersBefore = ____string.removeCharactersBefore
11
13
  local ____customStageConstants = require("features.customStage.customStageConstants")
12
14
  local ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH = ____customStageConstants.ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH
13
15
  local ____v = require("features.customStage.v")
@@ -19,7 +21,7 @@ local v = ____v.default
19
21
  -- We arbitrarily choose a ladder for this purpose because it will not automatically despawn after
20
22
  -- time passes, like most other effects.
21
23
  local SHADOW_EFFECT_VARIANT = EffectVariant.LADDER
22
- local SHADOW_EFFECT_SUBTYPE = 102
24
+ local SHADOW_EFFECT_SUB_TYPE = 102
23
25
  --- The animation comes from StageAPI.
24
26
  local ROOM_SHAPE_TO_SHADOW_ANIMATION = {
25
27
  [RoomShape.SHAPE_1x1] = "1x1",
@@ -52,7 +54,7 @@ function ____exports.setShadows(self, customStage)
52
54
  local shadowEffect = spawnEffectWithSeed(
53
55
  nil,
54
56
  SHADOW_EFFECT_VARIANT,
55
- SHADOW_EFFECT_SUBTYPE,
57
+ SHADOW_EFFECT_SUB_TYPE,
56
58
  centerPos,
57
59
  seed
58
60
  )
@@ -60,7 +62,8 @@ function ____exports.setShadows(self, customStage)
60
62
  sprite:Load(ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH .. "/stage-shadow.anm2", false)
61
63
  local decorationSeed = room:GetDecorationSeed()
62
64
  local shadow = getRandomArrayElement(nil, shadows, decorationSeed)
63
- sprite:ReplaceSpritesheet(0, shadow.pngPath)
65
+ local pngPath = removeCharactersBefore(nil, shadow.pngPath, "gfx/")
66
+ sprite:ReplaceSpritesheet(0, pngPath)
64
67
  sprite:LoadGraphics()
65
68
  sprite:SetFrame(animation, 0)
66
69
  sprite.Color = shadow.color == nil and FADED_BLACK or Color(shadow.color.r, shadow.color.g, shadow.color.b, shadow.color.a)
@@ -1 +1 @@
1
- {"version":3,"file":"versusScreen.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/versusScreen.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AA+EnE;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAavC;AAED,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CA4ExE;AAmGD,wBAAgB,sBAAsB,IAAI,IAAI,CAkC7C"}
1
+ {"version":3,"file":"versusScreen.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/versusScreen.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AA+EnE;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAavC;AAED,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAoFxE;AAmGD,wBAAgB,sBAAsB,IAAI,IAAI,CAkC7C"}
@@ -19,6 +19,8 @@ local ____bosses = require("functions.bosses")
19
19
  local getBosses = ____bosses.getBosses
20
20
  local ____roomData = require("functions.roomData")
21
21
  local getRoomSubType = ____roomData.getRoomSubType
22
+ local ____string = require("functions.string")
23
+ local removeCharactersBefore = ____string.removeCharactersBefore
22
24
  local ____utils = require("functions.utils")
23
25
  local erange = ____utils.erange
24
26
  local ____bossNamePNGFileNames = require("objects.bossNamePNGFileNames")
@@ -190,8 +192,10 @@ function ____exports.playVersusScreenAnimation(self, customStage)
190
192
  local ____getBossPNGPaths_result_1 = getBossPNGPaths(nil, customStage)
191
193
  local namePNGPath = ____getBossPNGPaths_result_1.namePNGPath
192
194
  local portraitPNGPath = ____getBossPNGPaths_result_1.portraitPNGPath
193
- versusScreenSprite:ReplaceSpritesheet(BOSS_NAME_ANM2_LAYER, namePNGPath)
194
- versusScreenSprite:ReplaceSpritesheet(BOSS_PORTRAIT_ANM2_LAYER, portraitPNGPath)
195
+ local trimmedNamePNGPath = removeCharactersBefore(nil, namePNGPath, "gfx/")
196
+ versusScreenSprite:ReplaceSpritesheet(BOSS_NAME_ANM2_LAYER, trimmedNamePNGPath)
197
+ local trimmedPortraitPNGPath = removeCharactersBefore(nil, portraitPNGPath, "gfx/")
198
+ versusScreenSprite:ReplaceSpritesheet(BOSS_PORTRAIT_ANM2_LAYER, trimmedPortraitPNGPath)
195
199
  end
196
200
  versusScreenSprite:LoadGraphics()
197
201
  local backgroundColor = VERSUS_SCREEN_BACKGROUND_COLORS[DEFAULT_STAGE_ID]
@@ -3,7 +3,7 @@ local Set = ____lualib.Set
3
3
  local __TS__New = ____lualib.__TS__New
4
4
  local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
5
5
  local ____exports = {}
6
- local NON_ALIVE_NPCS_TYPE_VARIANT, NON_ALIVE_NPCS_TYPE_VARIANT_SUBTYPE
6
+ local NON_ALIVE_NPCS_TYPE_VARIANT, NON_ALIVE_NPCS_TYPE_VARIANT_SUB_TYPE
7
7
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
8
8
  local BegottenVariant = ____isaac_2Dtypescript_2Ddefinitions.BegottenVariant
9
9
  local BigHornVariant = ____isaac_2Dtypescript_2Ddefinitions.BigHornVariant
@@ -34,7 +34,7 @@ function ____exports.isAliveExceptionNPC(self, npc)
34
34
  return true
35
35
  end
36
36
  local entityTypeVariantSubType = (((tostring(npc.Type) .. ".") .. tostring(npc.Variant)) .. ".") .. tostring(npc.SubType)
37
- if NON_ALIVE_NPCS_TYPE_VARIANT_SUBTYPE:has(entityTypeVariantSubType) then
37
+ if NON_ALIVE_NPCS_TYPE_VARIANT_SUB_TYPE:has(entityTypeVariantSubType) then
38
38
  return true
39
39
  end
40
40
  if ____exports.isDyingEggyWithNoSpidersLeft(nil, npc) then
@@ -86,7 +86,7 @@ NON_ALIVE_NPCS_TYPE_VARIANT = __TS__New(
86
86
  (tostring(EntityType.DARK_ESAU) .. ".") .. tostring(DarkEsauVariant.PIT)
87
87
  }
88
88
  )
89
- NON_ALIVE_NPCS_TYPE_VARIANT_SUBTYPE = __TS__New(
89
+ NON_ALIVE_NPCS_TYPE_VARIANT_SUB_TYPE = __TS__New(
90
90
  Set,
91
91
  {
92
92
  (((tostring(EntityType.CHARGER) .. ".") .. tostring(ChargerVariant.CHARGER)) .. ".") .. tostring(ChargerSubType.MY_SHADOW),
@@ -2,7 +2,7 @@ local ____lualib = require("lualib_bundle")
2
2
  local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
3
3
  local ____exports = {}
4
4
  local ____coinSubTypeToValue = require("objects.coinSubTypeToValue")
5
- local COIN_SUBTYPE_TO_VALUE = ____coinSubTypeToValue.COIN_SUBTYPE_TO_VALUE
5
+ local COIN_SUB_TYPE_TO_VALUE = ____coinSubTypeToValue.COIN_SUB_TYPE_TO_VALUE
6
6
  local DEFAULT_COIN_VALUE = ____coinSubTypeToValue.DEFAULT_COIN_VALUE
7
7
  local ____chestPickupVariantsSet = require("sets.chestPickupVariantsSet")
8
8
  local CHEST_PICKUP_VARIANTS = ____chestPickupVariantsSet.CHEST_PICKUP_VARIANTS
@@ -17,7 +17,7 @@ local isHeart = ____pickupVariants.isHeart
17
17
  --- Helper function to get the corresponding coin amount from a `CoinSubType`. Returns 1 for modded
18
18
  -- sub-types.
19
19
  function ____exports.getCoinValue(self, coinSubType)
20
- local value = COIN_SUBTYPE_TO_VALUE[coinSubType]
20
+ local value = COIN_SUB_TYPE_TO_VALUE[coinSubType]
21
21
  return value == nil and DEFAULT_COIN_VALUE or value
22
22
  end
23
23
  --- Helper function to get all of the red heart pickup entities in the room.
@@ -1,5 +1,10 @@
1
1
  export declare function capitalizeFirstLetter(string: string): string;
2
2
  export declare function removeAllCharacters(string: string, character: string): string;
3
+ /**
4
+ * Helper function to remove all of the characters in a string before a given substring. Returns the
5
+ * modified string.
6
+ */
7
+ export declare function removeCharactersBefore(string: string, substring: string): string;
3
8
  /**
4
9
  * Helper function to remove one or more substrings from a string, if they exist. Returns the
5
10
  * modified string.
@@ -1 +1 @@
1
- {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../src/functions/string.ts"],"names":[],"mappings":"AAAA,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAM5D;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAE7E;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,EACd,GAAG,UAAU,EAAE,MAAM,EAAE,GACtB,MAAM,CAMR;AAED,gGAAgG;AAChG,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAMjE;AAED,gGAAgG;AAChG,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAOjE"}
1
+ {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../src/functions/string.ts"],"names":[],"mappings":"AAAA,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAM5D;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAE7E;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAChB,MAAM,CAGR;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,EACd,GAAG,UAAU,EAAE,MAAM,EAAE,GACtB,MAAM,CAMR;AAED,gGAAgG;AAChG,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAMjE;AAED,gGAAgG;AAChG,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAOjE"}
@@ -1,7 +1,7 @@
1
1
  local ____lualib = require("lualib_bundle")
2
2
  local __TS__StringReplaceAll = ____lualib.__TS__StringReplaceAll
3
- local __TS__StringStartsWith = ____lualib.__TS__StringStartsWith
4
3
  local __TS__StringSlice = ____lualib.__TS__StringSlice
4
+ local __TS__StringStartsWith = ____lualib.__TS__StringStartsWith
5
5
  local __TS__StringEndsWith = ____lualib.__TS__StringEndsWith
6
6
  local ____exports = {}
7
7
  function ____exports.capitalizeFirstLetter(self, ____string)
@@ -13,6 +13,12 @@ end
13
13
  function ____exports.removeAllCharacters(self, ____string, character)
14
14
  return __TS__StringReplaceAll(____string, character, "")
15
15
  end
16
+ --- Helper function to remove all of the characters in a string before a given substring. Returns the
17
+ -- modified string.
18
+ function ____exports.removeCharactersBefore(self, ____string, substring)
19
+ local index = (string.find(____string, substring, nil, true) or 0) - 1
20
+ return __TS__StringSlice(____string, index)
21
+ end
16
22
  --- Helper function to remove one or more substrings from a string, if they exist. Returns the
17
23
  -- modified string.
18
24
  --
package/dist/index.d.ts CHANGED
@@ -19,6 +19,7 @@ export { registerCharacterStats } from "./features/characterStats";
19
19
  export { getCollectibleItemPoolType } from "./features/collectibleItemPoolType";
20
20
  export { initCustomDoor, spawnCustomDoor } from "./features/customDoor";
21
21
  export { removeCustomGridEntity, spawnCustomGridEntity, } from "./features/customGridEntity";
22
+ export { registerCustomPickup } from "./features/customPickup";
22
23
  export * from "./features/customStage/exports";
23
24
  export * from "./features/customTrapdoor/exports";
24
25
  export * from "./features/debugDisplay/exports";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACn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ClC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oCAAoC,CAAC;AACnD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,mBAAmB,CAAC"}
package/dist/index.lua CHANGED
@@ -156,6 +156,11 @@ do
156
156
  ____exports.removeCustomGridEntity = removeCustomGridEntity
157
157
  ____exports.spawnCustomGridEntity = spawnCustomGridEntity
158
158
  end
159
+ do
160
+ local ____customPickup = require("features.customPickup")
161
+ local registerCustomPickup = ____customPickup.registerCustomPickup
162
+ ____exports.registerCustomPickup = registerCustomPickup
163
+ end
159
164
  do
160
165
  local ____export = require("features.customStage.exports")
161
166
  for ____exportKey, ____exportValue in pairs(____export) do
@@ -1 +1 @@
1
- {"version":3,"file":"initFeatures.d.ts","sourceRoot":"","sources":["../src/initFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AA6BpD,wBAAgB,YAAY,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAGnD"}
1
+ {"version":3,"file":"initFeatures.d.ts","sourceRoot":"","sources":["../src/initFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AA8BpD,wBAAgB,YAAY,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAGnD"}
@@ -8,6 +8,8 @@ local ____collectibleItemPoolType = require("features.collectibleItemPoolType")
8
8
  local collectibleItemPoolTypeInit = ____collectibleItemPoolType.collectibleItemPoolTypeInit
9
9
  local ____customGridEntity = require("features.customGridEntity")
10
10
  local customGridEntityInit = ____customGridEntity.customGridEntityInit
11
+ local ____customPickup = require("features.customPickup")
12
+ local customPickupInit = ____customPickup.customPickupInit
11
13
  local ____init = require("features.customStage.init")
12
14
  local customStageInit = ____init.customStageInit
13
15
  local ____init = require("features.customTrapdoor.init")
@@ -63,6 +65,7 @@ function initFeaturesMajor(self, mod)
63
65
  customGridEntityInit(nil, mod)
64
66
  end
65
67
  function initFeaturesMinor(self, mod)
68
+ customPickupInit(nil, mod)
66
69
  customTrapdoorInit(nil, mod)
67
70
  disableAllSoundInit(nil, mod)
68
71
  disableInputsInit(nil, mod)