isaacscript-common 9.14.0 → 9.16.1
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/features/extraConsoleCommands/listCommands.d.ts +2 -0
- package/dist/features/extraConsoleCommands/listCommands.d.ts.map +1 -1
- package/dist/features/extraConsoleCommands/listCommands.lua +76 -19
- package/dist/functions/collectibles.lua +4 -4
- package/dist/functions/levelGrid.d.ts +4 -2
- package/dist/functions/levelGrid.d.ts.map +1 -1
- package/dist/functions/levelGrid.lua +13 -11
- package/dist/functions/minimap.d.ts +22 -4
- package/dist/functions/minimap.d.ts.map +1 -1
- package/dist/functions/minimap.lua +67 -7
- package/dist/functions/string.d.ts +2 -0
- package/dist/functions/string.d.ts.map +1 -1
- package/dist/functions/string.lua +5 -0
- package/dist/functions/trinkets.d.ts.map +1 -1
- package/dist/functions/trinkets.lua +4 -4
- package/dist/index.d.ts +38 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.lua +4 -4
- package/dist/maps/cardNameToTypeMap.d.ts +4 -0
- package/dist/maps/cardNameToTypeMap.d.ts.map +1 -0
- package/dist/maps/{cardMap.lua → cardNameToTypeMap.lua} +2 -2
- package/dist/maps/characterNameToTypeMap.d.ts +4 -0
- package/dist/maps/characterNameToTypeMap.d.ts.map +1 -0
- package/dist/maps/characterNameToTypeMap.lua +92 -0
- package/dist/maps/collectibleDescriptionMap.d.ts +6 -0
- package/dist/maps/collectibleDescriptionMap.d.ts.map +1 -1
- package/dist/maps/collectibleDescriptionMap.lua +4 -0
- package/dist/maps/collectibleNameToTypeMap.d.ts +3 -0
- package/dist/maps/collectibleNameToTypeMap.d.ts.map +1 -0
- package/dist/maps/collectibleNameToTypeMap.lua +21 -0
- package/dist/maps/collectibleTypeToNameMap.d.ts +12 -0
- package/dist/maps/collectibleTypeToNameMap.d.ts.map +1 -0
- package/dist/maps/{collectibleNameMap.lua → collectibleTypeToNameMap.lua} +7 -1
- package/dist/maps/{pillEffectMap.d.ts → pillNameToEffectMap.d.ts} +2 -2
- package/dist/maps/pillNameToEffectMap.d.ts.map +1 -0
- package/dist/maps/{pillEffectMap.lua → pillNameToEffectMap.lua} +1 -1
- package/dist/maps/roomNameToTypeMap.d.ts +4 -0
- package/dist/maps/roomNameToTypeMap.d.ts.map +1 -0
- package/dist/maps/{roomTypeMap.lua → roomNameToTypeMap.lua} +2 -2
- package/dist/maps/trinketDescriptionMap.d.ts +6 -0
- package/dist/maps/trinketDescriptionMap.d.ts.map +1 -1
- package/dist/maps/trinketDescriptionMap.lua +4 -0
- package/dist/maps/trinketNameToTypeMap.d.ts +3 -0
- package/dist/maps/trinketNameToTypeMap.d.ts.map +1 -0
- package/dist/maps/trinketNameToTypeMap.lua +21 -0
- package/dist/maps/trinketTypeToNameMap.d.ts +12 -0
- package/dist/maps/trinketTypeToNameMap.d.ts.map +1 -0
- package/dist/maps/{trinketNameMap.lua → trinketTypeToNameMap.lua} +7 -1
- package/dist/objects/characterDamageMultipliers.lua +1 -1
- package/dist/objects/characterNames.lua +1 -1
- package/dist/objects/playerNamePNGFileNames.lua +1 -1
- package/dist/objects/playerPortraitPNGFileNames.lua +1 -1
- package/dist/sets/charactersWithBlackHeartFromEternalHeartSet.lua +1 -1
- package/dist/sets/charactersWithNoRedHeartsSet.lua +1 -1
- package/package.json +2 -2
- package/src/features/extraConsoleCommands/listCommands.ts +85 -16
- package/src/functions/collectibles.ts +3 -3
- package/src/functions/levelGrid.ts +16 -5
- package/src/functions/minimap.ts +78 -7
- package/src/functions/string.ts +6 -0
- package/src/functions/trinkets.ts +5 -2
- package/src/index.ts +4 -4
- package/src/maps/{cardMap.ts → cardNameToTypeMap.ts} +2 -2
- package/src/maps/characterNameToTypeMap.ts +88 -0
- package/src/maps/collectibleDescriptionMap.ts +6 -2
- package/src/maps/collectibleNameToTypeMap.ts +19 -0
- package/src/maps/collectibleTypeToNameMap.ts +739 -0
- package/src/maps/pillNameToEffectMap.ts +90 -0
- package/src/maps/{roomTypeMap.ts → roomNameToTypeMap.ts} +2 -2
- package/src/maps/trinketDescriptionMap.ts +6 -2
- package/src/maps/trinketNameToTypeMap.ts +17 -0
- package/src/maps/trinketTypeToNameMap.ts +205 -0
- package/src/objects/characterDamageMultipliers.ts +1 -1
- package/src/objects/characterNames.ts +1 -1
- package/src/objects/playerNamePNGFileNames.ts +1 -1
- package/src/objects/playerPortraitPNGFileNames.ts +1 -1
- package/src/sets/charactersWithBlackHeartFromEternalHeartSet.ts +1 -1
- package/src/sets/charactersWithNoRedHeartsSet.ts +1 -1
- package/dist/maps/cardMap.d.ts +0 -4
- package/dist/maps/cardMap.d.ts.map +0 -1
- package/dist/maps/characterMap.d.ts +0 -4
- package/dist/maps/characterMap.d.ts.map +0 -1
- package/dist/maps/characterMap.lua +0 -90
- package/dist/maps/collectibleNameMap.d.ts +0 -4
- package/dist/maps/collectibleNameMap.d.ts.map +0 -1
- package/dist/maps/pillEffectMap.d.ts.map +0 -1
- package/dist/maps/roomTypeMap.d.ts +0 -4
- package/dist/maps/roomTypeMap.d.ts.map +0 -1
- package/dist/maps/trinketNameMap.d.ts +0 -4
- package/dist/maps/trinketNameMap.d.ts.map +0 -1
- package/src/maps/characterMap.ts +0 -87
- package/src/maps/collectibleNameMap.ts +0 -731
- package/src/maps/pillEffectMap.ts +0 -88
- package/src/maps/trinketNameMap.ts +0 -198
|
@@ -354,8 +354,10 @@ export declare function sounds(): void;
|
|
|
354
354
|
* "debug 10".
|
|
355
355
|
*/
|
|
356
356
|
export declare function spam(): void;
|
|
357
|
+
export declare function spawnCollectible(params: string): void;
|
|
357
358
|
/** Spawns a golden version of the specified trinket type. */
|
|
358
359
|
export declare function spawnGoldenTrinket(params: string): void;
|
|
360
|
+
export declare function spawnTrinket(params: string): void;
|
|
359
361
|
/** Toggles maximum movement speed and flight for the player. */
|
|
360
362
|
export declare function speed(): void;
|
|
361
363
|
/** Alias for the "startingRoom" command. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listCommands.d.ts","sourceRoot":"","sources":["../../../src/features/extraConsoleCommands/listCommands.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"listCommands.d.ts","sourceRoot":"","sources":["../../../src/features/extraConsoleCommands/listCommands.ts"],"names":[],"mappings":"AAiIA;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CA2C/C;AAED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,IAAI,CAEhC;AAED,gEAAgE;AAChE,wBAAgB,MAAM,IAAI,IAAI,CAK7B;AAED,sEAAsE;AACtE,wBAAgB,OAAO,IAAI,IAAI,CAkB9B;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEhD;AAED,+CAA+C;AAC/C,wBAAgB,WAAW,IAAI,IAAI,CAElC;AAED,4CAA4C;AAC5C,wBAAgB,KAAK,IAAI,IAAI,CAG5B;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAcjD;AAED,2CAA2C;AAC3C,wBAAgB,EAAE,IAAI,IAAI,CAEzB;AAED;;;GAGG;AACH,wBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAczC;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAc1C;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAE/C;AAED,wCAAwC;AACxC,wBAAgB,IAAI,IAAI,IAAI,CAE3B;AAED,kEAAkE;AAClE,wBAAgB,YAAY,IAAI,IAAI,CAEnC;AAED,iDAAiD;AACjD,wBAAgB,QAAQ,IAAI,IAAI,CAE/B;AAED,4CAA4C;AAC5C,wBAAgB,QAAQ,IAAI,IAAI,CAE/B;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,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AAI,IAAI,CAQ5B;AAED,wCAAwC;AACxC,wBAAgB,KAAK,IAAI,IAAI,CAE5B;AAED,6CAA6C;AAC7C,wBAAgB,QAAQ,IAAI,IAAI,CAE/B;AAED,qDAAqD;AACrD,wBAAgB,YAAY,IAAI,IAAI,CAEnC;AAED,yDAAyD;AACzD,wBAAgB,eAAe,IAAI,IAAI,CAEtC;AAED,8CAA8C;AAC9C,wBAAgB,OAAO,IAAI,IAAI,CAG9B;AAED,sFAAsF;AACtF,wBAAgB,MAAM,IAAI,IAAI,CAQ7B;AAED,wFAAwF;AACxF,wBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEvC;AAED;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CA0BzC"}
|
|
@@ -67,7 +67,7 @@ local runMergeTests = ____mergeTests.runMergeTests
|
|
|
67
67
|
local ____pickupsSpecific = require("functions.pickupsSpecific")
|
|
68
68
|
local spawnCard = ____pickupsSpecific.spawnCard
|
|
69
69
|
local spawnPill = ____pickupsSpecific.spawnPill
|
|
70
|
-
local
|
|
70
|
+
local spawnTrinketFunction = ____pickupsSpecific.spawnTrinket
|
|
71
71
|
local ____pills = require("functions.pills")
|
|
72
72
|
local getPillEffectName = ____pills.getPillEffectName
|
|
73
73
|
local ____playerIndex = require("functions.playerIndex")
|
|
@@ -87,24 +87,32 @@ local ____run = require("functions.run")
|
|
|
87
87
|
local onSetSeed = ____run.onSetSeed
|
|
88
88
|
local restart = ____run.restart
|
|
89
89
|
local setUnseeded = ____run.setUnseeded
|
|
90
|
+
local ____spawnCollectible = require("functions.spawnCollectible")
|
|
91
|
+
local spawnCollectibleFunction = ____spawnCollectible.spawnCollectible
|
|
90
92
|
local ____stage = require("functions.stage")
|
|
91
93
|
local setStage = ____stage.setStage
|
|
92
94
|
local ____trinkets = require("functions.trinkets")
|
|
93
95
|
local getGoldenTrinketType = ____trinkets.getGoldenTrinketType
|
|
94
96
|
local ____types = require("functions.types")
|
|
95
97
|
local asCardType = ____types.asCardType
|
|
98
|
+
local asCollectibleType = ____types.asCollectibleType
|
|
99
|
+
local asTrinketType = ____types.asTrinketType
|
|
96
100
|
local ____utils = require("functions.utils")
|
|
97
101
|
local irange = ____utils.irange
|
|
98
102
|
local printConsole = ____utils.printConsole
|
|
99
103
|
local printEnabled = ____utils.printEnabled
|
|
100
|
-
local
|
|
101
|
-
local
|
|
102
|
-
local
|
|
103
|
-
local
|
|
104
|
-
local
|
|
105
|
-
local
|
|
106
|
-
local
|
|
107
|
-
local
|
|
104
|
+
local ____cardNameToTypeMap = require("maps.cardNameToTypeMap")
|
|
105
|
+
local CARD_NAME_TO_TYPE_MAP = ____cardNameToTypeMap.CARD_NAME_TO_TYPE_MAP
|
|
106
|
+
local ____characterNameToTypeMap = require("maps.characterNameToTypeMap")
|
|
107
|
+
local CHARACTER_NAME_TO_TYPE_MAP = ____characterNameToTypeMap.CHARACTER_NAME_TO_TYPE_MAP
|
|
108
|
+
local ____collectibleNameToTypeMap = require("maps.collectibleNameToTypeMap")
|
|
109
|
+
local COLLECTIBLE_NAME_TO_TYPE_MAP = ____collectibleNameToTypeMap.COLLECTIBLE_NAME_TO_TYPE_MAP
|
|
110
|
+
local ____pillNameToEffectMap = require("maps.pillNameToEffectMap")
|
|
111
|
+
local PILL_NAME_TO_EFFECT_MAP = ____pillNameToEffectMap.PILL_NAME_TO_EFFECT_MAP
|
|
112
|
+
local ____roomNameToTypeMap = require("maps.roomNameToTypeMap")
|
|
113
|
+
local ROOM_NAME_TO_TYPE_MAP = ____roomNameToTypeMap.ROOM_NAME_TO_TYPE_MAP
|
|
114
|
+
local ____trinketNameToTypeMap = require("maps.trinketNameToTypeMap")
|
|
115
|
+
local TRINKET_NAME_TO_TYPE_MAP = ____trinketNameToTypeMap.TRINKET_NAME_TO_TYPE_MAP
|
|
108
116
|
local ____firstLast = require("features.firstLast")
|
|
109
117
|
local getLastCardType = ____firstLast.getLastCardType
|
|
110
118
|
local getLastPillEffect = ____firstLast.getLastPillEffect
|
|
@@ -361,7 +369,7 @@ function ____exports.card(self, params)
|
|
|
361
369
|
local cardType
|
|
362
370
|
local num = tonumber(params)
|
|
363
371
|
if num == nil then
|
|
364
|
-
local match = getMapPartialMatch(nil, params,
|
|
372
|
+
local match = getMapPartialMatch(nil, params, CARD_NAME_TO_TYPE_MAP)
|
|
365
373
|
if match == nil then
|
|
366
374
|
printConsole(nil, "Unknown card: " .. params)
|
|
367
375
|
return
|
|
@@ -430,7 +438,7 @@ function ____exports.character(self, params)
|
|
|
430
438
|
local playerType
|
|
431
439
|
local num = tonumber(params)
|
|
432
440
|
if num == nil then
|
|
433
|
-
local match = getMapPartialMatch(nil, params,
|
|
441
|
+
local match = getMapPartialMatch(nil, params, CHARACTER_NAME_TO_TYPE_MAP)
|
|
434
442
|
if match == nil then
|
|
435
443
|
printConsole(nil, "Unknown character: " .. params)
|
|
436
444
|
return
|
|
@@ -810,7 +818,7 @@ function ____exports.pill(self, params)
|
|
|
810
818
|
local pillEffect
|
|
811
819
|
local num = tonumber(params)
|
|
812
820
|
if num == nil then
|
|
813
|
-
local match = getMapPartialMatch(nil, params,
|
|
821
|
+
local match = getMapPartialMatch(nil, params, PILL_NAME_TO_EFFECT_MAP)
|
|
814
822
|
if match == nil then
|
|
815
823
|
printConsole(nil, "Unknown pill effect: " .. params)
|
|
816
824
|
return
|
|
@@ -1104,21 +1112,70 @@ function ____exports.spam(self)
|
|
|
1104
1112
|
v.run.spamBloodRights = not v.run.spamBloodRights
|
|
1105
1113
|
printEnabled(nil, v.run.spamBloodRights, "spamming Blood Rights")
|
|
1106
1114
|
end
|
|
1115
|
+
function ____exports.spawnCollectible(self, params)
|
|
1116
|
+
if params == "" then
|
|
1117
|
+
printConsole(nil, "You must specify the name or number corresponding to the collectible type.")
|
|
1118
|
+
return
|
|
1119
|
+
end
|
|
1120
|
+
local collectibleTypeNumber = tonumber(params)
|
|
1121
|
+
local collectibleType
|
|
1122
|
+
if collectibleTypeNumber == nil then
|
|
1123
|
+
local match = getMapPartialMatch(nil, params, COLLECTIBLE_NAME_TO_TYPE_MAP)
|
|
1124
|
+
if match == nil then
|
|
1125
|
+
printConsole(nil, "Unknown collectible: " .. params)
|
|
1126
|
+
return
|
|
1127
|
+
end
|
|
1128
|
+
collectibleType = match[2]
|
|
1129
|
+
else
|
|
1130
|
+
collectibleType = asCollectibleType(nil, collectibleTypeNumber)
|
|
1131
|
+
end
|
|
1132
|
+
local roomClass = game:GetRoom()
|
|
1133
|
+
local centerPos = roomClass:GetCenterPos()
|
|
1134
|
+
spawnCollectibleFunction(nil, collectibleType, centerPos)
|
|
1135
|
+
end
|
|
1107
1136
|
--- Spawns a golden version of the specified trinket type.
|
|
1108
1137
|
function ____exports.spawnGoldenTrinket(self, params)
|
|
1109
1138
|
if params == "" then
|
|
1110
|
-
printConsole(nil, "You must specify the number corresponding to the trinket type.")
|
|
1139
|
+
printConsole(nil, "You must specify the name or number corresponding to the trinket type.")
|
|
1111
1140
|
return
|
|
1112
1141
|
end
|
|
1113
|
-
local
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1142
|
+
local trinketTypeNumber = tonumber(params)
|
|
1143
|
+
local trinketType
|
|
1144
|
+
if trinketTypeNumber == nil then
|
|
1145
|
+
local match = getMapPartialMatch(nil, params, TRINKET_NAME_TO_TYPE_MAP)
|
|
1146
|
+
if match == nil then
|
|
1147
|
+
printConsole(nil, "Unknown trinket: " .. params)
|
|
1148
|
+
return
|
|
1149
|
+
end
|
|
1150
|
+
trinketType = match[2]
|
|
1151
|
+
else
|
|
1152
|
+
trinketType = asTrinketType(nil, trinketTypeNumber)
|
|
1117
1153
|
end
|
|
1154
|
+
local roomClass = game:GetRoom()
|
|
1155
|
+
local centerPos = roomClass:GetCenterPos()
|
|
1118
1156
|
local goldenTrinketType = getGoldenTrinketType(nil, trinketType)
|
|
1157
|
+
spawnTrinketFunction(nil, goldenTrinketType, centerPos)
|
|
1158
|
+
end
|
|
1159
|
+
function ____exports.spawnTrinket(self, params)
|
|
1160
|
+
if params == "" then
|
|
1161
|
+
printConsole(nil, "You must specify the name or number corresponding to the trinket type.")
|
|
1162
|
+
return
|
|
1163
|
+
end
|
|
1164
|
+
local trinketTypeNumber = tonumber(params)
|
|
1165
|
+
local trinketType
|
|
1166
|
+
if trinketTypeNumber == nil then
|
|
1167
|
+
local match = getMapPartialMatch(nil, params, TRINKET_NAME_TO_TYPE_MAP)
|
|
1168
|
+
if match == nil then
|
|
1169
|
+
printConsole(nil, "Unknown trinket: " .. params)
|
|
1170
|
+
return
|
|
1171
|
+
end
|
|
1172
|
+
trinketType = match[2]
|
|
1173
|
+
else
|
|
1174
|
+
trinketType = asTrinketType(nil, trinketTypeNumber)
|
|
1175
|
+
end
|
|
1119
1176
|
local roomClass = game:GetRoom()
|
|
1120
1177
|
local centerPos = roomClass:GetCenterPos()
|
|
1121
|
-
|
|
1178
|
+
spawnTrinketFunction(nil, trinketType, centerPos)
|
|
1122
1179
|
end
|
|
1123
1180
|
--- Toggles maximum movement speed and flight for the player.
|
|
1124
1181
|
function ____exports.speed(self)
|
|
@@ -1195,7 +1252,7 @@ function ____exports.warp(self, params)
|
|
|
1195
1252
|
local roomType
|
|
1196
1253
|
local num = tonumber(params)
|
|
1197
1254
|
if num == nil then
|
|
1198
|
-
local match = getMapPartialMatch(nil, params,
|
|
1255
|
+
local match = getMapPartialMatch(nil, params, ROOM_NAME_TO_TYPE_MAP)
|
|
1199
1256
|
if match == nil then
|
|
1200
1257
|
printConsole(nil, "Unknown room type: " .. params)
|
|
1201
1258
|
return
|
|
@@ -20,9 +20,9 @@ local LAST_VANILLA_COLLECTIBLE_TYPE = ____constantsFirstLast.LAST_VANILLA_COLLEC
|
|
|
20
20
|
local ____collectibleDescriptionMap = require("maps.collectibleDescriptionMap")
|
|
21
21
|
local COLLECTIBLE_DESCRIPTION_MAP = ____collectibleDescriptionMap.COLLECTIBLE_DESCRIPTION_MAP
|
|
22
22
|
local DEFAULT_COLLECTIBLE_DESCRIPTION = ____collectibleDescriptionMap.DEFAULT_COLLECTIBLE_DESCRIPTION
|
|
23
|
-
local
|
|
24
|
-
local
|
|
25
|
-
local DEFAULT_COLLECTIBLE_NAME =
|
|
23
|
+
local ____collectibleTypeToNameMap = require("maps.collectibleTypeToNameMap")
|
|
24
|
+
local COLLECTIBLE_TYPE_TO_NAME_MAP = ____collectibleTypeToNameMap.COLLECTIBLE_TYPE_TO_NAME_MAP
|
|
25
|
+
local DEFAULT_COLLECTIBLE_NAME = ____collectibleTypeToNameMap.DEFAULT_COLLECTIBLE_NAME
|
|
26
26
|
local ____singleUseActiveCollectibleTypesSet = require("sets.singleUseActiveCollectibleTypesSet")
|
|
27
27
|
local SINGLE_USE_ACTIVE_COLLECTIBLE_TYPES_SET = ____singleUseActiveCollectibleTypesSet.SINGLE_USE_ACTIVE_COLLECTIBLE_TYPES_SET
|
|
28
28
|
local ____entities = require("functions.entities")
|
|
@@ -285,7 +285,7 @@ end
|
|
|
285
285
|
--
|
|
286
286
|
-- For example, `getCollectibleName(CollectibleType.SAD_ONION)` would return "Sad Onion".
|
|
287
287
|
function ____exports.getCollectibleName(self, collectibleType)
|
|
288
|
-
local collectibleName =
|
|
288
|
+
local collectibleName = COLLECTIBLE_TYPE_TO_NAME_MAP:get(collectibleType)
|
|
289
289
|
if collectibleName ~= nil then
|
|
290
290
|
return collectibleName
|
|
291
291
|
end
|
|
@@ -53,7 +53,8 @@ export declare function getAllRoomGridIndexes(): int[];
|
|
|
53
53
|
export declare function getNewRoomCandidate(seedOrRNG?: Seed | RNG): [adjacentRoomGridIndex: int, doorSlot: DoorSlot, newRoomGridIndex: int] | undefined;
|
|
54
54
|
/**
|
|
55
55
|
* Helper function to iterate through the possible doors for a room and see if any of them would be
|
|
56
|
-
* a valid spot to insert a brand new room on the floor.
|
|
56
|
+
* a valid spot to insert a brand new room on the floor. (Any potential new rooms cannot be
|
|
57
|
+
* connected to any other existing rooms on the floor.)
|
|
57
58
|
*
|
|
58
59
|
* @param roomGridIndex Optional. Default is the current room index.
|
|
59
60
|
* @returns A array of tuples of `DoorSlot` and room grid index.
|
|
@@ -63,7 +64,8 @@ export declare function getNewRoomCandidatesBesideRoom(roomGridIndex?: int): Arr
|
|
|
63
64
|
* Helper function to search through all of the rooms on the floor for a spot to insert a brand new
|
|
64
65
|
* room.
|
|
65
66
|
*
|
|
66
|
-
* @returns A array of tuples
|
|
67
|
+
* @returns A array of tuples containing the adjacent room grid index, the `DoorSlot`, and the new
|
|
68
|
+
* room grid index.
|
|
67
69
|
*/
|
|
68
70
|
export declare function getNewRoomCandidatesForLevel(): Array<[
|
|
69
71
|
adjacentRoomGridIndex: int,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"levelGrid.d.ts","sourceRoot":"","sources":["../../src/functions/levelGrid.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAEL,QAAQ,EAKR,SAAS,EACT,QAAQ,EACT,MAAM,8BAA8B,CAAC;AA8BtC;;;;;GAKG;AACH,wBAAgB,kCAAkC,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,GAAG,EAAE,CAK7E;AAED;;;;;;GAMG;AACH,wBAAgB,qCAAqC,CACnD,aAAa,CAAC,EAAE,GAAG,GAClB,GAAG,EAAE,CAKP;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,0BAA0B,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,GAAG,EAAE,CAerE;AAED,0FAA0F;AAC1F,wBAAgB,qBAAqB,IAAI,GAAG,EAAE,CAG7C;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,GAAE,IAAI,GAAG,GAAqB,GAErC,CAAC,qBAAqB,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,gBAAgB,EAAE,GAAG,CAAC,GACvE,SAAS,CAOZ;AAED
|
|
1
|
+
{"version":3,"file":"levelGrid.d.ts","sour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GAAG,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,CAAC,CAKtE"}
|
|
@@ -47,16 +47,15 @@ local ____roomShape = require("functions.roomShape")
|
|
|
47
47
|
local getGridIndexDelta = ____roomShape.getGridIndexDelta
|
|
48
48
|
local ____types = require("functions.types")
|
|
49
49
|
local asNumber = ____types.asNumber
|
|
50
|
-
--- Helper function to get only the adjacent room grid indexes that
|
|
51
|
-
-- room data).
|
|
50
|
+
--- Helper function to get only the adjacent room grid indexes that exist (i.e. have room data).
|
|
52
51
|
--
|
|
53
52
|
-- This is just a filtering of the results of the `getAdjacentExistingRoomGridIndexes` function. See
|
|
54
53
|
-- that function for more information.
|
|
55
|
-
function ____exports.
|
|
54
|
+
function ____exports.getAdjacentExistingRoomGridIndexes(self, roomGridIndex)
|
|
56
55
|
local adjacentRoomGridIndexes = ____exports.getAdjacentRoomGridIndexes(nil, roomGridIndex)
|
|
57
56
|
return __TS__ArrayFilter(
|
|
58
57
|
adjacentRoomGridIndexes,
|
|
59
|
-
function(____, adjacentRoomGridIndex) return getRoomData(nil, adjacentRoomGridIndex)
|
|
58
|
+
function(____, adjacentRoomGridIndex) return getRoomData(nil, adjacentRoomGridIndex) ~= nil end
|
|
60
59
|
)
|
|
61
60
|
end
|
|
62
61
|
--- Helper function to get all of the room grid indexes that are adjacent to a given room grid index
|
|
@@ -87,7 +86,8 @@ function ____exports.getAdjacentRoomGridIndexes(self, roomGridIndex)
|
|
|
87
86
|
)
|
|
88
87
|
end
|
|
89
88
|
--- Helper function to iterate through the possible doors for a room and see if any of them would be
|
|
90
|
-
-- a valid spot to insert a brand new room on the floor.
|
|
89
|
+
-- a valid spot to insert a brand new room on the floor. (Any potential new rooms cannot be
|
|
90
|
+
-- connected to any other existing rooms on the floor.)
|
|
91
91
|
--
|
|
92
92
|
-- @param roomGridIndex Optional. Default is the current room index.
|
|
93
93
|
-- @returns A array of tuples of `DoorSlot` and room grid index.
|
|
@@ -122,7 +122,8 @@ end
|
|
|
122
122
|
--- Helper function to search through all of the rooms on the floor for a spot to insert a brand new
|
|
123
123
|
-- room.
|
|
124
124
|
--
|
|
125
|
-
-- @returns A array of tuples
|
|
125
|
+
-- @returns A array of tuples containing the adjacent room grid index, the `DoorSlot`, and the new
|
|
126
|
+
-- room grid index.
|
|
126
127
|
function ____exports.getNewRoomCandidatesForLevel(self)
|
|
127
128
|
local rooms = getRoomsInsideGrid(nil)
|
|
128
129
|
local normalRooms = __TS__ArrayFilter(
|
|
@@ -214,8 +215,8 @@ end
|
|
|
214
215
|
--
|
|
215
216
|
-- @param roomGridIndex Optional. Default is the current room index.
|
|
216
217
|
function ____exports.isDeadEnd(self, roomGridIndex)
|
|
217
|
-
local
|
|
218
|
-
return #
|
|
218
|
+
local adjacentExistingRoomGridIndexes = ____exports.getAdjacentExistingRoomGridIndexes(nil, roomGridIndex)
|
|
219
|
+
return #adjacentExistingRoomGridIndexes == 1
|
|
219
220
|
end
|
|
220
221
|
--- Helper function to determine if a given room grid index is inside of the normal 13x13 level grid.
|
|
221
222
|
--
|
|
@@ -239,15 +240,16 @@ local UP = -LEVEL_GRID_ROW_WIDTH
|
|
|
239
240
|
local RIGHT = 1
|
|
240
241
|
local DOWN = LEVEL_GRID_ROW_WIDTH
|
|
241
242
|
ADJACENT_ROOM_GRID_INDEX_DELTAS = {LEFT, UP, RIGHT, DOWN}
|
|
242
|
-
--- Helper function to get only the adjacent room grid indexes that exist (i.e.
|
|
243
|
+
--- Helper function to get only the adjacent room grid indexes that do not exist (i.e. do not have
|
|
244
|
+
-- room data).
|
|
243
245
|
--
|
|
244
246
|
-- This is just a filtering of the results of the `getAdjacentExistingRoomGridIndexes` function. See
|
|
245
247
|
-- that function for more information.
|
|
246
|
-
function ____exports.
|
|
248
|
+
function ____exports.getAdjacentNonExistingRoomGridIndexes(self, roomGridIndex)
|
|
247
249
|
local adjacentRoomGridIndexes = ____exports.getAdjacentRoomGridIndexes(nil, roomGridIndex)
|
|
248
250
|
return __TS__ArrayFilter(
|
|
249
251
|
adjacentRoomGridIndexes,
|
|
250
|
-
function(____, adjacentRoomGridIndex) return getRoomData(nil, adjacentRoomGridIndex)
|
|
252
|
+
function(____, adjacentRoomGridIndex) return getRoomData(nil, adjacentRoomGridIndex) == nil end
|
|
251
253
|
)
|
|
252
254
|
end
|
|
253
255
|
--- Helper function to get the room safe grid index for every room on the entire floor.
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import { DisplayFlag } from "isaac-typescript-definitions";
|
|
2
|
+
/**
|
|
3
|
+
* Helper function to add a `DisplayFlag` to a particular room's minimap display flags (e.g. whether
|
|
4
|
+
* or not it is visible and so on).
|
|
5
|
+
*
|
|
6
|
+
* @param roomGridIndex Set to undefined to use the current room index.
|
|
7
|
+
* @param displayFlag The `DisplayFlag` to set. (See the `DisplayFlag` enum.)
|
|
8
|
+
* @param updateVisibility Optional. Whether to call the `Level.UpdateVisibility` method in order to
|
|
9
|
+
* make the changes immediately visible. Default is true.
|
|
10
|
+
*/
|
|
11
|
+
export declare function addRoomDisplayFlag(roomGridIndex: int | undefined, displayFlag: DisplayFlag, updateVisibility?: boolean): void;
|
|
2
12
|
/**
|
|
3
13
|
* Helper function to set the value of `DisplayFlag` for every room on the floor to 0.
|
|
4
14
|
*
|
|
@@ -33,11 +43,19 @@ export declare function setFloorDisplayFlags(displayFlagsMap: Map<int, BitFlags<
|
|
|
33
43
|
* Helper function to set a particular room's minimap display flags (e.g. whether or not it is
|
|
34
44
|
* visible and so on).
|
|
35
45
|
*
|
|
36
|
-
* You must call the `Level.UpdateVisibility` method after using this function for the changes to
|
|
37
|
-
* take effect.
|
|
38
|
-
*
|
|
39
46
|
* @param roomGridIndex Set to undefined to use the current room index.
|
|
40
47
|
* @param displayFlags The bit flags value to set. (See the `DisplayFlag` enum.)
|
|
48
|
+
* @param updateVisibility Optional. Whether to call the `Level.UpdateVisibility` method in order to
|
|
49
|
+
* make the changes immediately visible. Default is true.
|
|
50
|
+
*/
|
|
51
|
+
export declare function setRoomDisplayFlags(roomGridIndex: int | undefined, displayFlags: BitFlags<DisplayFlag>, updateVisibility?: boolean): void;
|
|
52
|
+
/**
|
|
53
|
+
* Helper function to make a single room visible in a similar way to how the Compass makes a Boss
|
|
54
|
+
* Room visible (e.g. by adding `DisplayFlag.SHOW_ICON`).
|
|
55
|
+
*
|
|
56
|
+
* @param roomGridIndex Set to undefined to use the current room index.
|
|
57
|
+
* @param updateVisibility Optional. Whether to call the `Level.UpdateVisibility` method in order to
|
|
58
|
+
* make the changes immediately visible. Default is true.
|
|
41
59
|
*/
|
|
42
|
-
export declare function
|
|
60
|
+
export declare function setRoomVisible(roomGridIndex: int | undefined, updateVisibility?: boolean): void;
|
|
43
61
|
//# sourceMappingURL=minimap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"minimap.d.ts","sourceRoot":"","sources":["../../src/functions/minimap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAmB,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"minimap.d.ts","sourceRoot":"","sources":["../../src/functions/minimap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAmB,MAAM,8BAA8B,CAAC;AAM5E;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,aAAa,EAAE,GAAG,GAAG,SAAS,EAC9B,WAAW,EAAE,WAAW,EACxB,gBAAgB,UAAO,GACtB,IAAI,CAwBN;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAS7C;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,CAYtE;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,CAAC,EAAE,GAAG,GAClB,QAAQ,CAAC,WAAW,CAAC,CAGvB;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,eAAe,EAAE,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,GAC/C,IAAI,CAiBN;AAED,gDAAgD;AAChD,wBAAgB,oBAAoB,CAClC,eAAe,EAAE,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,GAC/C,IAAI,CAEN;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,EAAE,GAAG,GAAG,SAAS,EAC9B,YAAY,EAAE,QAAQ,CAAC,WAAW,CAAC,EACnC,gBAAgB,UAAO,GACtB,IAAI,CAkBN;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,aAAa,EAAE,GAAG,GAAG,SAAS,EAC9B,gBAAgB,UAAO,GACtB,IAAI,CAEN"}
|
|
@@ -4,24 +4,72 @@ local __TS__New = ____lualib.__TS__New
|
|
|
4
4
|
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
5
5
|
local ____exports = {}
|
|
6
6
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
7
|
+
local DisplayFlag = ____isaac_2Dtypescript_2Ddefinitions.DisplayFlag
|
|
7
8
|
local DisplayFlagZero = ____isaac_2Dtypescript_2Ddefinitions.DisplayFlagZero
|
|
8
9
|
local ____cachedClasses = require("core.cachedClasses")
|
|
9
10
|
local game = ____cachedClasses.game
|
|
11
|
+
local ____flag = require("functions.flag")
|
|
12
|
+
local addFlag = ____flag.addFlag
|
|
10
13
|
local ____roomData = require("functions.roomData")
|
|
11
14
|
local getRoomDescriptor = ____roomData.getRoomDescriptor
|
|
15
|
+
local getRoomGridIndex = ____roomData.getRoomGridIndex
|
|
12
16
|
local ____rooms = require("functions.rooms")
|
|
13
17
|
local getRoomsInsideGrid = ____rooms.getRoomsInsideGrid
|
|
14
18
|
--- Helper function to set a particular room's minimap display flags (e.g. whether or not it is
|
|
15
19
|
-- visible and so on).
|
|
16
20
|
--
|
|
17
|
-
-- You must call the `Level.UpdateVisibility` method after using this function for the changes to
|
|
18
|
-
-- take effect.
|
|
19
|
-
--
|
|
20
21
|
-- @param roomGridIndex Set to undefined to use the current room index.
|
|
21
22
|
-- @param displayFlags The bit flags value to set. (See the `DisplayFlag` enum.)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
-- @param updateVisibility Optional. Whether to call the `Level.UpdateVisibility` method in order to
|
|
24
|
+
-- make the changes immediately visible. Default is true.
|
|
25
|
+
function ____exports.setRoomDisplayFlags(self, roomGridIndex, displayFlags, updateVisibility)
|
|
26
|
+
if updateVisibility == nil then
|
|
27
|
+
updateVisibility = true
|
|
28
|
+
end
|
|
29
|
+
if MinimapAPI == nil then
|
|
30
|
+
local roomDescriptor = getRoomDescriptor(nil, roomGridIndex)
|
|
31
|
+
roomDescriptor.DisplayFlags = displayFlags
|
|
32
|
+
else
|
|
33
|
+
if roomGridIndex == nil then
|
|
34
|
+
roomGridIndex = getRoomGridIndex(nil)
|
|
35
|
+
end
|
|
36
|
+
local roomDescriptor = MinimapAPI:GetRoomByIdx(roomGridIndex)
|
|
37
|
+
if roomDescriptor ~= nil then
|
|
38
|
+
roomDescriptor.DisplayFlags = displayFlags
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
if updateVisibility then
|
|
42
|
+
local level = game:GetLevel()
|
|
43
|
+
level:UpdateVisibility()
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
--- Helper function to add a `DisplayFlag` to a particular room's minimap display flags (e.g. whether
|
|
47
|
+
-- or not it is visible and so on).
|
|
48
|
+
--
|
|
49
|
+
-- @param roomGridIndex Set to undefined to use the current room index.
|
|
50
|
+
-- @param displayFlag The `DisplayFlag` to set. (See the `DisplayFlag` enum.)
|
|
51
|
+
-- @param updateVisibility Optional. Whether to call the `Level.UpdateVisibility` method in order to
|
|
52
|
+
-- make the changes immediately visible. Default is true.
|
|
53
|
+
function ____exports.addRoomDisplayFlag(self, roomGridIndex, displayFlag, updateVisibility)
|
|
54
|
+
if updateVisibility == nil then
|
|
55
|
+
updateVisibility = true
|
|
56
|
+
end
|
|
57
|
+
if MinimapAPI == nil then
|
|
58
|
+
local roomDescriptor = getRoomDescriptor(nil, roomGridIndex)
|
|
59
|
+
roomDescriptor.DisplayFlags = addFlag(nil, roomDescriptor.DisplayFlags, displayFlag)
|
|
60
|
+
else
|
|
61
|
+
if roomGridIndex == nil then
|
|
62
|
+
roomGridIndex = getRoomGridIndex(nil)
|
|
63
|
+
end
|
|
64
|
+
local roomDescriptor = MinimapAPI:GetRoomByIdx(roomGridIndex)
|
|
65
|
+
if roomDescriptor ~= nil then
|
|
66
|
+
roomDescriptor.DisplayFlags = addFlag(nil, roomDescriptor.DisplayFlags, displayFlag)
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
if updateVisibility then
|
|
70
|
+
local level = game:GetLevel()
|
|
71
|
+
level:UpdateVisibility()
|
|
72
|
+
end
|
|
25
73
|
end
|
|
26
74
|
--- Helper function to set the value of `DisplayFlag` for every room on the floor to 0.
|
|
27
75
|
--
|
|
@@ -64,7 +112,7 @@ function ____exports.setDisplayFlags(self, displayFlagsMap)
|
|
|
64
112
|
local roomGridIndex = ____value[1]
|
|
65
113
|
local displayFlags = ____value[2]
|
|
66
114
|
if MinimapAPI == nil then
|
|
67
|
-
____exports.setRoomDisplayFlags(nil, roomGridIndex, displayFlags)
|
|
115
|
+
____exports.setRoomDisplayFlags(nil, roomGridIndex, displayFlags, false)
|
|
68
116
|
else
|
|
69
117
|
local roomDescriptor = MinimapAPI:GetRoomByIdx(roomGridIndex)
|
|
70
118
|
if roomDescriptor ~= nil then
|
|
@@ -78,4 +126,16 @@ end
|
|
|
78
126
|
function ____exports.setFloorDisplayFlags(self, displayFlagsMap)
|
|
79
127
|
____exports.setDisplayFlags(nil, displayFlagsMap)
|
|
80
128
|
end
|
|
129
|
+
--- Helper function to make a single room visible in a similar way to how the Compass makes a Boss
|
|
130
|
+
-- Room visible (e.g. by adding `DisplayFlag.SHOW_ICON`).
|
|
131
|
+
--
|
|
132
|
+
-- @param roomGridIndex Set to undefined to use the current room index.
|
|
133
|
+
-- @param updateVisibility Optional. Whether to call the `Level.UpdateVisibility` method in order to
|
|
134
|
+
-- make the changes immediately visible. Default is true.
|
|
135
|
+
function ____exports.setRoomVisible(self, roomGridIndex, updateVisibility)
|
|
136
|
+
if updateVisibility == nil then
|
|
137
|
+
updateVisibility = true
|
|
138
|
+
end
|
|
139
|
+
____exports.addRoomDisplayFlag(nil, roomGridIndex, DisplayFlag.SHOW_ICON, updateVisibility)
|
|
140
|
+
end
|
|
81
141
|
return ____exports
|
|
@@ -22,6 +22,8 @@ export declare function removeAllCharacters(string: string, character: string):
|
|
|
22
22
|
* modified string.
|
|
23
23
|
*/
|
|
24
24
|
export declare function removeCharactersBefore(string: string, substring: string): string;
|
|
25
|
+
/** Helper function to remove all characters from a string that are not letters or numbers. */
|
|
26
|
+
export declare function removeNonAlphanumericCharacters(str: string): string;
|
|
25
27
|
/**
|
|
26
28
|
* Helper function to remove one or more substrings from a string, if they exist. Returns the
|
|
27
29
|
* 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;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EAAE,GACd,MAAM,GAAG,SAAS,CAYpB;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
|
+
{"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;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EAAE,GACd,MAAM,GAAG,SAAS,CAYpB;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,8FAA8F;AAC9F,wBAAgB,+BAA+B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAGnE;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"}
|
|
@@ -49,6 +49,11 @@ function ____exports.removeCharactersBefore(self, ____string, substring)
|
|
|
49
49
|
local index = (string.find(____string, substring, nil, true) or 0) - 1
|
|
50
50
|
return __TS__StringSlice(____string, index)
|
|
51
51
|
end
|
|
52
|
+
--- Helper function to remove all characters from a string that are not letters or numbers.
|
|
53
|
+
function ____exports.removeNonAlphanumericCharacters(self, str)
|
|
54
|
+
local returnValue, _ = string.gsub(str, "%W", "")
|
|
55
|
+
return returnValue
|
|
56
|
+
end
|
|
52
57
|
--- Helper function to remove one or more substrings from a string, if they exist. Returns the
|
|
53
58
|
-- modified string.
|
|
54
59
|
--
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trinkets.d.ts","sourceRoot":"","sources":["../../src/functions/trinkets.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,WAAW,EACZ,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"trinkets.d.ts","sourceRoot":"","sources":["../../src/functions/trinkets.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAkCtC;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,CAE1E;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,GAAG,GAAG,SAAS,CAkBxE;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,CActE;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,CAOtE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,CAc/D;AAED,kFAAkF;AAClF,wBAAgB,sBAAsB,IAAI,WAAW,EAAE,CAEtD;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAOhE;AAED,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAErE;AAED,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAErE;AAED,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAEtE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,CASjE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,MAAM,GAAG,SAAS,GAC1B,IAAI,CAeN"}
|
|
@@ -13,9 +13,9 @@ local LAST_VANILLA_TRINKET_TYPE = ____constantsFirstLast.LAST_VANILLA_TRINKET_TY
|
|
|
13
13
|
local ____trinketDescriptionMap = require("maps.trinketDescriptionMap")
|
|
14
14
|
local DEFAULT_TRINKET_DESCRIPTION = ____trinketDescriptionMap.DEFAULT_TRINKET_DESCRIPTION
|
|
15
15
|
local TRINKET_DESCRIPTION_MAP = ____trinketDescriptionMap.TRINKET_DESCRIPTION_MAP
|
|
16
|
-
local
|
|
17
|
-
local DEFAULT_TRINKET_NAME =
|
|
18
|
-
local
|
|
16
|
+
local ____trinketTypeToNameMap = require("maps.trinketTypeToNameMap")
|
|
17
|
+
local DEFAULT_TRINKET_NAME = ____trinketTypeToNameMap.DEFAULT_TRINKET_NAME
|
|
18
|
+
local TRINKET_TYPE_TO_NAME_MAP = ____trinketTypeToNameMap.TRINKET_TYPE_TO_NAME_MAP
|
|
19
19
|
local ____entities = require("functions.entities")
|
|
20
20
|
local getEntityID = ____entities.getEntityID
|
|
21
21
|
local ____pickupVariants = require("functions.pickupVariants")
|
|
@@ -104,7 +104,7 @@ end
|
|
|
104
104
|
--
|
|
105
105
|
-- For example, `getTrinketName(TrinketType.SWALLOWED_PENNY)` would return "Swallowed Penny".
|
|
106
106
|
function ____exports.getTrinketName(self, trinketType)
|
|
107
|
-
local trinketName =
|
|
107
|
+
local trinketName = TRINKET_TYPE_TO_NAME_MAP:get(trinketType)
|
|
108
108
|
if trinketName ~= nil then
|
|
109
109
|
return trinketName
|
|
110
110
|
end
|