isaacscript-common 6.7.0 → 6.9.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/features/extraConsoleCommands/commandsSubroutines.lua +4 -4
- package/dist/functions/log.d.ts +14 -6
- package/dist/functions/log.d.ts.map +1 -1
- package/dist/functions/log.lua +193 -155
- package/dist/functions/pickupsSpecific.d.ts +15 -15
- package/dist/functions/pickupsSpecific.d.ts.map +1 -1
- package/dist/functions/pickupsSpecific.lua +26 -26
- package/dist/functions/run.d.ts +8 -0
- package/dist/functions/run.d.ts.map +1 -1
- package/dist/functions/run.lua +15 -0
- package/package.json +1 -1
- package/src/features/extraConsoleCommands/commandsSubroutines.ts +3 -3
- package/src/functions/log.ts +225 -179
- package/src/functions/pickupsSpecific.ts +29 -29
- package/src/functions/run.ts +14 -0
|
@@ -12,8 +12,8 @@ local directionToVector = ____direction.directionToVector
|
|
|
12
12
|
local ____gridEntities = require("functions.gridEntities")
|
|
13
13
|
local spawnGridEntityWithVariant = ____gridEntities.spawnGridEntityWithVariant
|
|
14
14
|
local ____log = require("functions.log")
|
|
15
|
-
local
|
|
16
|
-
local
|
|
15
|
+
local logAllEntities = ____log.logAllEntities
|
|
16
|
+
local logAllGridEntities = ____log.logAllGridEntities
|
|
17
17
|
local ____playerHealth = require("functions.playerHealth")
|
|
18
18
|
local addPlayerHealthType = ____playerHealth.addPlayerHealthType
|
|
19
19
|
local ____roomData = require("functions.roomData")
|
|
@@ -68,7 +68,7 @@ function ____exports.listEntities(self, params, includeBackgroundEffects)
|
|
|
68
68
|
return
|
|
69
69
|
end
|
|
70
70
|
end
|
|
71
|
-
|
|
71
|
+
logAllEntities(includeBackgroundEffects, entityTypeFilter)
|
|
72
72
|
printConsole(nil, "Logged the entities in the room to the \"log.txt\" file.")
|
|
73
73
|
end
|
|
74
74
|
function ____exports.listGridEntities(self, params, includeWalls)
|
|
@@ -80,7 +80,7 @@ function ____exports.listGridEntities(self, params, includeWalls)
|
|
|
80
80
|
return
|
|
81
81
|
end
|
|
82
82
|
end
|
|
83
|
-
|
|
83
|
+
logAllGridEntities(includeWalls, gridEntityTypeFilter)
|
|
84
84
|
printConsole(nil, "Logged the grid entities in the room to the \"log.txt\" file.")
|
|
85
85
|
end
|
|
86
86
|
function ____exports.movePlayer(self, params, direction)
|
package/dist/functions/log.d.ts
CHANGED
|
@@ -11,13 +11,21 @@ export declare function getDebugPrependString(msg: string, numParentFunctions?:
|
|
|
11
11
|
* function will also prepend the function name and the line number before the string.
|
|
12
12
|
*/
|
|
13
13
|
export declare function log(this: void, msg: string): void;
|
|
14
|
+
/** Helper function for printing out every entity (or filtered entity) in the current room. */
|
|
15
|
+
export declare function logAllEntities(this: void, includeBackgroundEffects: boolean, entityTypeFilter?: EntityType): void;
|
|
16
|
+
/**
|
|
17
|
+
* Helper function for printing out every grid entity (or filtered grid entity) in the current room.
|
|
18
|
+
*/
|
|
19
|
+
export declare function logAllGridEntities(this: void, includeWalls: boolean, gridEntityTypeFilter?: GridEntityType): void;
|
|
14
20
|
export declare function logArray<T>(this: void, array: T[] | readonly T[]): void;
|
|
15
21
|
export declare function logColor(this: void, color: Color): void;
|
|
16
22
|
/** Helper function for printing out every damage flag that is turned on. Useful when debugging. */
|
|
17
23
|
export declare function logDamageFlags(this: void, flags: DamageFlag | BitFlags<DamageFlag>): void;
|
|
18
24
|
export declare function logEffects(this: void, player: EntityPlayer): void;
|
|
19
|
-
/** Helper function for
|
|
20
|
-
export declare function logEntities(this: void,
|
|
25
|
+
/** Helper function for logging an array of specific entities. */
|
|
26
|
+
export declare function logEntities(this: void, entities: Entity[]): void;
|
|
27
|
+
/** Helper function to log information about a specific entity. */
|
|
28
|
+
export declare function logEntity(this: void, entity: Entity): void;
|
|
21
29
|
/** Helper function for printing out every entity flag that is turned on. Useful when debugging. */
|
|
22
30
|
export declare function logEntityFlags(this: void, flags: EntityFlag | BitFlags<EntityFlag>): void;
|
|
23
31
|
export declare function logEntityID(this: void, entity: Entity): void;
|
|
@@ -34,10 +42,10 @@ export declare function logFlags<T extends BitFlag | BitFlag128>(this: void, fla
|
|
|
34
42
|
* Helper function for printing out every game state flag that is turned on. Useful when debugging.
|
|
35
43
|
*/
|
|
36
44
|
export declare function logGameStateFlags(this: void): void;
|
|
37
|
-
/**
|
|
38
|
-
|
|
39
|
-
*/
|
|
40
|
-
export declare function
|
|
45
|
+
/** Helper function for logging an array of specific grid entities. */
|
|
46
|
+
export declare function logGridEntities(this: void, gridEntities: GridEntity[]): void;
|
|
47
|
+
/** Helper function for log information about a specific grid entity. */
|
|
48
|
+
export declare function logGridEntity(this: void, gridEntity: GridEntity): void;
|
|
41
49
|
export declare function logKColor(this: void, kColor: KColor): void;
|
|
42
50
|
/**
|
|
43
51
|
* Helper function for printing out every level state flag that is turned on. Useful when debugging.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/functions/log.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EAEV,UAAU,EACV,UAAU,EAEV,cAAc,EAGd,cAAc,EAGd,QAAQ,EACR,OAAO,EACR,MAAM,8BAA8B,CAAC;AA+BtC;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,MAAM,EAKX,kBAAkB,SAAI,GACrB,MAAM,CAiBR;AAED;;;;;GAKG;AACH,wBAAgB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAGjD;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,SAAS,CAAC,EAAE,GAAG,IAAI,CAGvE;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAIvD;AAED,mGAAmG;AACnG,wBAAgB,cAAc,CAC5B,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,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I,EAAE,IAAI,EACV,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,GACjC,IAAI,CAEN;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI,CAsB/D;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,UAAQ,GAAG,IAAI,CAGzE;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAkC5C"}
|
package/dist/functions/log.lua
CHANGED
|
@@ -8,6 +8,7 @@ local __TS__ArraySort = ____lualib.__TS__ArraySort
|
|
|
8
8
|
local __TS__TypeOf = ____lualib.__TS__TypeOf
|
|
9
9
|
local __TS__ObjectKeys = ____lualib.__TS__ObjectKeys
|
|
10
10
|
local ____exports = {}
|
|
11
|
+
local getEntityLogLine, getGridEntityLogLine
|
|
11
12
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
12
13
|
local DamageFlag = ____isaac_2Dtypescript_2Ddefinitions.DamageFlag
|
|
13
14
|
local EffectVariant = ____isaac_2Dtypescript_2Ddefinitions.EffectVariant
|
|
@@ -37,6 +38,7 @@ local ____flag = require("functions.flag")
|
|
|
37
38
|
local hasFlag = ____flag.hasFlag
|
|
38
39
|
local ____gridEntities = require("functions.gridEntities")
|
|
39
40
|
local getGridEntities = ____gridEntities.getGridEntities
|
|
41
|
+
local getGridEntityID = ____gridEntities.getGridEntityID
|
|
40
42
|
local ____isaacAPIClass = require("functions.isaacAPIClass")
|
|
41
43
|
local getIsaacAPIClassName = ____isaacAPIClass.getIsaacAPIClassName
|
|
42
44
|
local ____playerHealth = require("functions.playerHealth")
|
|
@@ -86,6 +88,70 @@ function ____exports.log(msg)
|
|
|
86
88
|
local debugMsg = ____exports.getDebugPrependString(nil, msg)
|
|
87
89
|
Isaac.DebugString(debugMsg)
|
|
88
90
|
end
|
|
91
|
+
--- Helper function to log information about a specific entity.
|
|
92
|
+
function ____exports.logEntity(entity)
|
|
93
|
+
local msg = getEntityLogLine(nil, entity)
|
|
94
|
+
____exports.log(msg)
|
|
95
|
+
end
|
|
96
|
+
function getEntityLogLine(self, entity, num)
|
|
97
|
+
local msg = num == nil and "" or tostring(num) .. ") "
|
|
98
|
+
msg = msg .. getEntityID(nil, entity)
|
|
99
|
+
local bomb = entity:ToBomb()
|
|
100
|
+
if bomb ~= nil then
|
|
101
|
+
msg = msg .. " (bomb)"
|
|
102
|
+
end
|
|
103
|
+
local effect = entity:ToEffect()
|
|
104
|
+
if effect ~= nil then
|
|
105
|
+
msg = msg .. (" (effect) (State: " .. tostring(effect.State)) .. ")"
|
|
106
|
+
end
|
|
107
|
+
local familiar = entity:ToFamiliar()
|
|
108
|
+
if familiar ~= nil then
|
|
109
|
+
msg = msg .. (" (familiar) (State: " .. tostring(familiar.State)) .. ")"
|
|
110
|
+
end
|
|
111
|
+
local knife = entity:ToKnife()
|
|
112
|
+
if knife ~= nil then
|
|
113
|
+
msg = msg .. " (knife)"
|
|
114
|
+
end
|
|
115
|
+
local laser = entity:ToLaser()
|
|
116
|
+
if laser ~= nil then
|
|
117
|
+
msg = msg .. " (laser)"
|
|
118
|
+
end
|
|
119
|
+
local npc = entity:ToNPC()
|
|
120
|
+
if npc ~= nil then
|
|
121
|
+
msg = msg .. (" (NPC) (State: " .. tostring(npc.State)) .. ")"
|
|
122
|
+
end
|
|
123
|
+
local pickup = entity:ToPickup()
|
|
124
|
+
if pickup ~= nil then
|
|
125
|
+
msg = msg .. (" (pickup) (State: " .. tostring(pickup.State)) .. ")"
|
|
126
|
+
end
|
|
127
|
+
local player = entity:ToPlayer()
|
|
128
|
+
if player ~= nil then
|
|
129
|
+
msg = msg .. " (player)"
|
|
130
|
+
end
|
|
131
|
+
local projectile = entity:ToProjectile()
|
|
132
|
+
if projectile ~= nil then
|
|
133
|
+
msg = msg .. " (projectile)"
|
|
134
|
+
end
|
|
135
|
+
local tear = entity:ToTear()
|
|
136
|
+
if tear ~= nil then
|
|
137
|
+
msg = msg .. " (tear)"
|
|
138
|
+
end
|
|
139
|
+
msg = msg .. "\n"
|
|
140
|
+
msg = msg .. (" - Index: " .. tostring(entity.Index)) .. "\n"
|
|
141
|
+
msg = msg .. (" - InitSeed: " .. tostring(entity.InitSeed)) .. "\n"
|
|
142
|
+
msg = msg .. (" - DropSeed: " .. tostring(entity.DropSeed)) .. "\n"
|
|
143
|
+
msg = msg .. (((" - Position: (" .. tostring(entity.Position.X)) .. ", ") .. tostring(entity.Position.Y)) .. ")\n"
|
|
144
|
+
msg = msg .. (((" - Velocity: (" .. tostring(entity.Velocity.X)) .. ", ") .. tostring(entity.Velocity.Y)) .. ")\n"
|
|
145
|
+
msg = msg .. (((" - HP: " .. tostring(entity.HitPoints)) .. " / ") .. tostring(entity.MaxHitPoints)) .. "\n"
|
|
146
|
+
msg = msg .. (" - Parent: " .. tostring(entity.Parent)) .. "\n"
|
|
147
|
+
msg = msg .. (" - Child: " .. tostring(entity.Child)) .. "\n"
|
|
148
|
+
msg = msg .. (" - SpawnerEntity: " .. tostring(entity.SpawnerEntity)) .. "\n"
|
|
149
|
+
msg = msg .. (((" - SpawnerType / SpawnerVariant: " .. tostring(entity.SpawnerType)) .. ".") .. tostring(entity.SpawnerVariant)) .. "\n"
|
|
150
|
+
if npc ~= nil then
|
|
151
|
+
msg = msg .. (" - CanShutDoors: " .. tostring(npc.CanShutDoors)) .. "\n"
|
|
152
|
+
end
|
|
153
|
+
return msg
|
|
154
|
+
end
|
|
89
155
|
--- Helper function for printing out every flag that is turned on. Useful when debugging.
|
|
90
156
|
function ____exports.logFlags(flags, flagEnum, description)
|
|
91
157
|
if description == nil then
|
|
@@ -108,6 +174,56 @@ function ____exports.logFlags(flags, flagEnum, description)
|
|
|
108
174
|
____exports.log(" n/a (no flags)")
|
|
109
175
|
end
|
|
110
176
|
end
|
|
177
|
+
--- Helper function for log information about a specific grid entity.
|
|
178
|
+
function ____exports.logGridEntity(gridEntity)
|
|
179
|
+
local msg = getGridEntityLogLine(nil, gridEntity)
|
|
180
|
+
____exports.log(msg)
|
|
181
|
+
end
|
|
182
|
+
function getGridEntityLogLine(self, gridEntity, num)
|
|
183
|
+
local gridEntityDesc = gridEntity:GetSaveState()
|
|
184
|
+
local msg = num == nil and "" or tostring(num) .. ") "
|
|
185
|
+
msg = msg .. getGridEntityID(nil, gridEntity)
|
|
186
|
+
local door = gridEntity:ToDoor()
|
|
187
|
+
if door ~= nil then
|
|
188
|
+
msg = msg .. " (door)"
|
|
189
|
+
end
|
|
190
|
+
local pit = gridEntity:ToPit()
|
|
191
|
+
if pit ~= nil then
|
|
192
|
+
msg = msg .. " (pit)"
|
|
193
|
+
end
|
|
194
|
+
local poop = gridEntity:ToPoop()
|
|
195
|
+
if poop ~= nil then
|
|
196
|
+
msg = msg .. " (poop)"
|
|
197
|
+
end
|
|
198
|
+
local pressurePlate = gridEntity:ToPressurePlate()
|
|
199
|
+
if pressurePlate ~= nil then
|
|
200
|
+
msg = msg .. " (pressurePlate)"
|
|
201
|
+
end
|
|
202
|
+
local rock = gridEntity:ToRock()
|
|
203
|
+
if rock ~= nil then
|
|
204
|
+
msg = msg .. " (rock)"
|
|
205
|
+
end
|
|
206
|
+
local spikes = gridEntity:ToSpikes()
|
|
207
|
+
if spikes ~= nil then
|
|
208
|
+
msg = msg .. " (spikes)"
|
|
209
|
+
end
|
|
210
|
+
local tnt = gridEntity:ToTNT()
|
|
211
|
+
if tnt ~= nil then
|
|
212
|
+
msg = msg .. " (TNT)"
|
|
213
|
+
end
|
|
214
|
+
msg = msg .. (" - State: " .. tostring(gridEntity.State)) .. "\n"
|
|
215
|
+
msg = msg .. (" - VarData: " .. tostring(gridEntity.VarData)) .. "\n"
|
|
216
|
+
msg = msg .. (((" - Position: (" .. tostring(gridEntity.Position.X)) .. ", ") .. tostring(gridEntity.Position.Y)) .. ")\n"
|
|
217
|
+
msg = msg .. (" - SpawnSeed: " .. tostring(gridEntityDesc.SpawnSeed)) .. "\n"
|
|
218
|
+
msg = msg .. (" - VariableSeed: " .. tostring(gridEntityDesc.VariableSeed)) .. ")\n"
|
|
219
|
+
if door ~= nil then
|
|
220
|
+
msg = msg .. (" - Slot: " .. tostring(door.Slot)) .. "\n"
|
|
221
|
+
msg = msg .. (" - Direction: " .. tostring(door.Direction)) .. "\n"
|
|
222
|
+
msg = msg .. (" - TargetRoomIndex: " .. tostring(door.TargetRoomIndex)) .. "\n"
|
|
223
|
+
msg = msg .. (" - TargetRoomType: " .. tostring(door.TargetRoomType)) .. "\n"
|
|
224
|
+
end
|
|
225
|
+
return msg
|
|
226
|
+
end
|
|
111
227
|
local IGNORE_EFFECT_VARIANTS = __TS__New(Set, {
|
|
112
228
|
EffectVariant.BLOOD_EXPLOSION,
|
|
113
229
|
EffectVariant.BLOOD_PARTICLE,
|
|
@@ -119,6 +235,71 @@ local IGNORE_EFFECT_VARIANTS = __TS__New(Set, {
|
|
|
119
235
|
EffectVariant.LIGHT,
|
|
120
236
|
EffectVariant.TADPOLE
|
|
121
237
|
})
|
|
238
|
+
--- Helper function for printing out every entity (or filtered entity) in the current room.
|
|
239
|
+
function ____exports.logAllEntities(includeBackgroundEffects, entityTypeFilter)
|
|
240
|
+
local msg = "Entities in the room"
|
|
241
|
+
if entityTypeFilter ~= nil then
|
|
242
|
+
msg = msg .. (" (filtered to entity type " .. tostring(entityTypeFilter)) .. ")"
|
|
243
|
+
elseif not includeBackgroundEffects then
|
|
244
|
+
msg = msg .. " (not including background effects)"
|
|
245
|
+
end
|
|
246
|
+
msg = msg .. ":\n"
|
|
247
|
+
local entities = getEntities(nil)
|
|
248
|
+
local numMatchedEntities = 0
|
|
249
|
+
__TS__ArrayForEach(
|
|
250
|
+
entities,
|
|
251
|
+
function(____, entity, i)
|
|
252
|
+
if entityTypeFilter ~= nil and entity.Type ~= entityTypeFilter then
|
|
253
|
+
return
|
|
254
|
+
end
|
|
255
|
+
local effect = entity:ToEffect()
|
|
256
|
+
if not includeBackgroundEffects and effect ~= nil and IGNORE_EFFECT_VARIANTS:has(effect.Variant) then
|
|
257
|
+
return
|
|
258
|
+
end
|
|
259
|
+
msg = msg .. getEntityLogLine(nil, entity, i + 1)
|
|
260
|
+
numMatchedEntities = numMatchedEntities + 1
|
|
261
|
+
end
|
|
262
|
+
)
|
|
263
|
+
if numMatchedEntities == 0 then
|
|
264
|
+
msg = msg .. "(no entities matched)\n"
|
|
265
|
+
else
|
|
266
|
+
msg = msg .. ((("(" .. tostring(numMatchedEntities)) .. " total ") .. (numMatchedEntities == 1 and "entity" or "entities")) .. ")\n"
|
|
267
|
+
end
|
|
268
|
+
____exports.log(msg)
|
|
269
|
+
end
|
|
270
|
+
--- Helper function for printing out every grid entity (or filtered grid entity) in the current room.
|
|
271
|
+
function ____exports.logAllGridEntities(includeWalls, gridEntityTypeFilter)
|
|
272
|
+
local msg = "Grid entities in the room"
|
|
273
|
+
if gridEntityTypeFilter ~= nil then
|
|
274
|
+
msg = msg .. (" (filtered to grid entity type " .. tostring(gridEntityTypeFilter)) .. ")"
|
|
275
|
+
elseif not includeWalls then
|
|
276
|
+
msg = msg .. " (not including walls)"
|
|
277
|
+
end
|
|
278
|
+
msg = msg .. ":\n"
|
|
279
|
+
local gridEntities = getGridEntities(nil)
|
|
280
|
+
local numMatchedEntities = 0
|
|
281
|
+
__TS__ArrayForEach(
|
|
282
|
+
gridEntities,
|
|
283
|
+
function(____, gridEntity)
|
|
284
|
+
local gridEntityIndex = gridEntity:GetGridIndex()
|
|
285
|
+
local gridEntityType = gridEntity:GetType()
|
|
286
|
+
if gridEntityTypeFilter ~= nil and gridEntityType ~= gridEntityTypeFilter then
|
|
287
|
+
return
|
|
288
|
+
end
|
|
289
|
+
if not includeWalls and gridEntityType == GridEntityType.WALL and gridEntityTypeFilter ~= GridEntityType.WALL then
|
|
290
|
+
return
|
|
291
|
+
end
|
|
292
|
+
msg = msg .. getGridEntityLogLine(nil, gridEntity, gridEntityIndex)
|
|
293
|
+
numMatchedEntities = numMatchedEntities + 1
|
|
294
|
+
end
|
|
295
|
+
)
|
|
296
|
+
if numMatchedEntities == 0 then
|
|
297
|
+
msg = msg .. "(no grid entities matched)\n"
|
|
298
|
+
else
|
|
299
|
+
msg = msg .. ((("(" .. tostring(numMatchedEntities)) .. " total grid ") .. (numMatchedEntities == 1 and "entity" or "entities")) .. ")\n"
|
|
300
|
+
end
|
|
301
|
+
____exports.log(msg)
|
|
302
|
+
end
|
|
122
303
|
function ____exports.logArray(array)
|
|
123
304
|
local arrayString = arrayToString(nil, array)
|
|
124
305
|
____exports.log("Array: " .. arrayString)
|
|
@@ -156,91 +337,11 @@ function ____exports.logEffects(player)
|
|
|
156
337
|
end
|
|
157
338
|
)
|
|
158
339
|
end
|
|
159
|
-
--- Helper function for
|
|
160
|
-
function ____exports.logEntities(
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
msg = msg .. (" (filtered to entity type " .. tostring(entityTypeFilter)) .. ")"
|
|
164
|
-
elseif not includeBackgroundEffects then
|
|
165
|
-
msg = msg .. " (not including background effects)"
|
|
166
|
-
end
|
|
167
|
-
msg = msg .. ":\n"
|
|
168
|
-
local entities = getEntities(nil)
|
|
169
|
-
local numMatchedEntities = 0
|
|
170
|
-
__TS__ArrayForEach(
|
|
171
|
-
entities,
|
|
172
|
-
function(____, entity, i)
|
|
173
|
-
if entityTypeFilter ~= nil and entity.Type ~= entityTypeFilter then
|
|
174
|
-
return
|
|
175
|
-
end
|
|
176
|
-
local effect = entity:ToEffect()
|
|
177
|
-
if not includeBackgroundEffects and effect ~= nil and IGNORE_EFFECT_VARIANTS:has(effect.Variant) then
|
|
178
|
-
return
|
|
179
|
-
end
|
|
180
|
-
local entityID = getEntityID(nil, entity)
|
|
181
|
-
msg = msg .. (tostring(i + 1) .. ") ") .. entityID
|
|
182
|
-
local bomb = entity:ToBomb()
|
|
183
|
-
if bomb ~= nil then
|
|
184
|
-
msg = msg .. " (bomb)"
|
|
185
|
-
end
|
|
186
|
-
if effect ~= nil then
|
|
187
|
-
msg = msg .. (" (effect) (State: " .. tostring(effect.State)) .. ")"
|
|
188
|
-
end
|
|
189
|
-
local familiar = entity:ToFamiliar()
|
|
190
|
-
if familiar ~= nil then
|
|
191
|
-
msg = msg .. (" (familiar) (State: " .. tostring(familiar.State)) .. ")"
|
|
192
|
-
end
|
|
193
|
-
local knife = entity:ToKnife()
|
|
194
|
-
if knife ~= nil then
|
|
195
|
-
msg = msg .. " (knife)"
|
|
196
|
-
end
|
|
197
|
-
local laser = entity:ToLaser()
|
|
198
|
-
if laser ~= nil then
|
|
199
|
-
msg = msg .. " (laser)"
|
|
200
|
-
end
|
|
201
|
-
local npc = entity:ToNPC()
|
|
202
|
-
if npc ~= nil then
|
|
203
|
-
msg = msg .. (" (NPC) (State: " .. tostring(npc.State)) .. ")"
|
|
204
|
-
end
|
|
205
|
-
local pickup = entity:ToPickup()
|
|
206
|
-
if pickup ~= nil then
|
|
207
|
-
msg = msg .. (" (pickup) (State: " .. tostring(pickup.State)) .. ")"
|
|
208
|
-
end
|
|
209
|
-
local player = entity:ToPlayer()
|
|
210
|
-
if player ~= nil then
|
|
211
|
-
msg = msg .. " (player)"
|
|
212
|
-
end
|
|
213
|
-
local projectile = entity:ToProjectile()
|
|
214
|
-
if projectile ~= nil then
|
|
215
|
-
msg = msg .. " (projectile)"
|
|
216
|
-
end
|
|
217
|
-
local tear = entity:ToTear()
|
|
218
|
-
if tear ~= nil then
|
|
219
|
-
msg = msg .. " (tear)"
|
|
220
|
-
end
|
|
221
|
-
msg = msg .. "\n"
|
|
222
|
-
msg = msg .. (" - Index: " .. tostring(entity.Index)) .. "\n"
|
|
223
|
-
msg = msg .. (" - InitSeed: " .. tostring(entity.InitSeed)) .. "\n"
|
|
224
|
-
msg = msg .. (" - DropSeed: " .. tostring(entity.DropSeed)) .. "\n"
|
|
225
|
-
msg = msg .. (((" - Position: (" .. tostring(entity.Position.X)) .. ", ") .. tostring(entity.Position.Y)) .. ")\n"
|
|
226
|
-
msg = msg .. (((" - Velocity: (" .. tostring(entity.Velocity.X)) .. ", ") .. tostring(entity.Velocity.Y)) .. ")\n"
|
|
227
|
-
msg = msg .. (((" - HP: " .. tostring(entity.HitPoints)) .. " / ") .. tostring(entity.MaxHitPoints)) .. "\n"
|
|
228
|
-
msg = msg .. (" - Parent: " .. tostring(entity.Parent)) .. "\n"
|
|
229
|
-
msg = msg .. (" - Child: " .. tostring(entity.Child)) .. "\n"
|
|
230
|
-
msg = msg .. (" - SpawnerEntity: " .. tostring(entity.SpawnerEntity)) .. "\n"
|
|
231
|
-
msg = msg .. (((" - SpawnerType / SpawnerVariant: " .. tostring(entity.SpawnerType)) .. ".") .. tostring(entity.SpawnerVariant)) .. "\n"
|
|
232
|
-
if npc ~= nil then
|
|
233
|
-
msg = msg .. (" - CanShutDoors: " .. tostring(npc.CanShutDoors)) .. "\n"
|
|
234
|
-
end
|
|
235
|
-
numMatchedEntities = numMatchedEntities + 1
|
|
236
|
-
end
|
|
237
|
-
)
|
|
238
|
-
if numMatchedEntities == 0 then
|
|
239
|
-
msg = msg .. "(no entities matched)\n"
|
|
240
|
-
else
|
|
241
|
-
msg = msg .. ((("(" .. tostring(numMatchedEntities)) .. " total ") .. (numMatchedEntities == 1 and "entity" or "entities")) .. ")\n"
|
|
340
|
+
--- Helper function for logging an array of specific entities.
|
|
341
|
+
function ____exports.logEntities(entities)
|
|
342
|
+
for ____, entity in ipairs(entities) do
|
|
343
|
+
____exports.logEntity(entity)
|
|
242
344
|
end
|
|
243
|
-
____exports.log(msg)
|
|
244
345
|
end
|
|
245
346
|
--- Helper function for printing out every entity flag that is turned on. Useful when debugging.
|
|
246
347
|
function ____exports.logEntityFlags(flags)
|
|
@@ -277,78 +378,11 @@ function ____exports.logGameStateFlags()
|
|
|
277
378
|
____exports.log(" n/a (no flags)")
|
|
278
379
|
end
|
|
279
380
|
end
|
|
280
|
-
--- Helper function for
|
|
281
|
-
function ____exports.logGridEntities(
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
msg = msg .. (" (filtered to grid entity type " .. tostring(gridEntityTypeFilter)) .. ")"
|
|
285
|
-
elseif not includeWalls then
|
|
286
|
-
msg = msg .. " (not including walls)"
|
|
381
|
+
--- Helper function for logging an array of specific grid entities.
|
|
382
|
+
function ____exports.logGridEntities(gridEntities)
|
|
383
|
+
for ____, gridEntity in ipairs(gridEntities) do
|
|
384
|
+
____exports.logGridEntity(gridEntity)
|
|
287
385
|
end
|
|
288
|
-
msg = msg .. ":\n"
|
|
289
|
-
local gridEntities = getGridEntities(nil)
|
|
290
|
-
local numMatchedEntities = 0
|
|
291
|
-
__TS__ArrayForEach(
|
|
292
|
-
gridEntities,
|
|
293
|
-
function(____, gridEntity)
|
|
294
|
-
local gridEntityIndex = gridEntity:GetGridIndex()
|
|
295
|
-
local gridEntityType = gridEntity:GetType()
|
|
296
|
-
local gridEntityVariant = gridEntity:GetVariant()
|
|
297
|
-
local gridEntityDesc = gridEntity:GetSaveState()
|
|
298
|
-
if gridEntityTypeFilter ~= nil and gridEntityType ~= gridEntityTypeFilter then
|
|
299
|
-
return
|
|
300
|
-
end
|
|
301
|
-
if not includeWalls and gridEntityType == GridEntityType.WALL and gridEntityTypeFilter ~= GridEntityType.WALL then
|
|
302
|
-
return
|
|
303
|
-
end
|
|
304
|
-
msg = msg .. (((((tostring(gridEntityIndex) .. ") ") .. tostring(gridEntityType)) .. ".") .. tostring(gridEntityVariant)) .. ".") .. tostring(gridEntity.State)
|
|
305
|
-
local door = gridEntity:ToDoor()
|
|
306
|
-
if door ~= nil then
|
|
307
|
-
msg = msg .. " (door)"
|
|
308
|
-
end
|
|
309
|
-
local pit = gridEntity:ToPit()
|
|
310
|
-
if pit ~= nil then
|
|
311
|
-
msg = msg .. " (pit)"
|
|
312
|
-
end
|
|
313
|
-
local poop = gridEntity:ToPoop()
|
|
314
|
-
if poop ~= nil then
|
|
315
|
-
msg = msg .. " (poop)"
|
|
316
|
-
end
|
|
317
|
-
local pressurePlate = gridEntity:ToPressurePlate()
|
|
318
|
-
if pressurePlate ~= nil then
|
|
319
|
-
msg = msg .. " (pressurePlate)"
|
|
320
|
-
end
|
|
321
|
-
local rock = gridEntity:ToRock()
|
|
322
|
-
if rock ~= nil then
|
|
323
|
-
msg = msg .. " (rock)"
|
|
324
|
-
end
|
|
325
|
-
local spikes = gridEntity:ToSpikes()
|
|
326
|
-
if spikes ~= nil then
|
|
327
|
-
msg = msg .. " (spikes)"
|
|
328
|
-
end
|
|
329
|
-
local tnt = gridEntity:ToTNT()
|
|
330
|
-
if tnt ~= nil then
|
|
331
|
-
msg = msg .. " (TNT)"
|
|
332
|
-
end
|
|
333
|
-
msg = msg .. (" - VarData: " .. tostring(gridEntity.VarData)) .. "\n"
|
|
334
|
-
msg = msg .. (((" - Position: (" .. tostring(gridEntity.Position.X)) .. ", ") .. tostring(gridEntity.Position.Y)) .. ")\n"
|
|
335
|
-
msg = msg .. (" - SpawnSeed: " .. tostring(gridEntityDesc.SpawnSeed)) .. "\n"
|
|
336
|
-
msg = msg .. (" - VariableSeed: " .. tostring(gridEntityDesc.VariableSeed)) .. ")\n"
|
|
337
|
-
if door ~= nil then
|
|
338
|
-
msg = msg .. (" - Slot: " .. tostring(door.Slot)) .. "\n"
|
|
339
|
-
msg = msg .. (" - Direction: " .. tostring(door.Direction)) .. "\n"
|
|
340
|
-
msg = msg .. (" - TargetRoomIndex: " .. tostring(door.TargetRoomIndex)) .. "\n"
|
|
341
|
-
msg = msg .. (" - TargetRoomType: " .. tostring(door.TargetRoomType)) .. "\n"
|
|
342
|
-
end
|
|
343
|
-
numMatchedEntities = numMatchedEntities + 1
|
|
344
|
-
end
|
|
345
|
-
)
|
|
346
|
-
if numMatchedEntities == 0 then
|
|
347
|
-
msg = msg .. "(no grid entities matched)\n"
|
|
348
|
-
else
|
|
349
|
-
msg = msg .. ((("(" .. tostring(numMatchedEntities)) .. " total grid ") .. (numMatchedEntities == 1 and "entity" or "entities")) .. ")\n"
|
|
350
|
-
end
|
|
351
|
-
____exports.log(msg)
|
|
352
386
|
end
|
|
353
387
|
function ____exports.logKColor(kColor)
|
|
354
388
|
____exports.log((((((("Color: R" .. tostring(kColor.Red)) .. ", G") .. tostring(kColor.Green)) .. ", B") .. tostring(kColor.Blue)) .. ", A") .. tostring(kColor.Alpha))
|
|
@@ -567,17 +601,21 @@ end
|
|
|
567
601
|
function ____exports.setLogFunctionsGlobal(self)
|
|
568
602
|
local globals = _G
|
|
569
603
|
globals.log = ____exports.log
|
|
604
|
+
globals.logAllEntities = ____exports.logAllEntities
|
|
605
|
+
globals.logAllGridEntities = ____exports.logAllGridEntities
|
|
570
606
|
globals.logArray = ____exports.logArray
|
|
571
607
|
globals.logColor = ____exports.logColor
|
|
572
608
|
globals.logDamageFlags = ____exports.logDamageFlags
|
|
573
609
|
globals.logEffects = ____exports.logEffects
|
|
574
610
|
globals.logEntities = ____exports.logEntities
|
|
611
|
+
globals.logEntity = ____exports.logEntity
|
|
575
612
|
globals.logEntityID = ____exports.logEntityID
|
|
576
613
|
globals.logEntityFlags = ____exports.logEntityFlags
|
|
577
614
|
globals.logError = ____exports.logError
|
|
578
615
|
globals.logFlags = ____exports.logFlags
|
|
579
616
|
globals.logGameStateFlags = ____exports.logGameStateFlags
|
|
580
617
|
globals.logGridEntities = ____exports.logGridEntities
|
|
618
|
+
globals.logGridEntity = ____exports.logGridEntity
|
|
581
619
|
globals.logKColor = ____exports.logKColor
|
|
582
620
|
globals.logLevelStateFlags = ____exports.logLevelStateFlags
|
|
583
621
|
globals.logMap = ____exports.logMap
|
|
@@ -171,59 +171,59 @@ export declare function spawnBattery(batterySubType: BatterySubType, position: V
|
|
|
171
171
|
*/
|
|
172
172
|
export declare function spawnBatteryWithSeed(batterySubType: BatterySubType, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupBattery;
|
|
173
173
|
/** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.BOMB` (40). */
|
|
174
|
-
export declare function spawnBombPickup(bombSubType: BombSubType, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined):
|
|
174
|
+
export declare function spawnBombPickup(bombSubType: BombSubType, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupBomb;
|
|
175
175
|
/**
|
|
176
176
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.BOMB` (40) and a
|
|
177
177
|
* specific seed.
|
|
178
178
|
*/
|
|
179
|
-
export declare function spawnBombPickupWithSeed(bombSubType: BombSubType, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined):
|
|
179
|
+
export declare function spawnBombPickupWithSeed(bombSubType: BombSubType, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupBomb;
|
|
180
180
|
/**
|
|
181
181
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TAROT_CARD` (300).
|
|
182
182
|
*/
|
|
183
|
-
export declare function spawnCard(
|
|
183
|
+
export declare function spawnCard(card: Card, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupCard;
|
|
184
184
|
/**
|
|
185
185
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TAROT_CARD` (300)
|
|
186
186
|
* and a specific seed.
|
|
187
187
|
*/
|
|
188
|
-
export declare function spawnCardWithSeed(
|
|
188
|
+
export declare function spawnCardWithSeed(card: Card, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupCard;
|
|
189
189
|
/** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.COIN` (20). */
|
|
190
|
-
export declare function spawnCoin(
|
|
190
|
+
export declare function spawnCoin(coinSubType: CoinSubType, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupCoin;
|
|
191
191
|
/**
|
|
192
192
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.COIN` (20) and a
|
|
193
193
|
* specific seed.
|
|
194
194
|
*/
|
|
195
|
-
export declare function spawnCoinWithSeed(
|
|
195
|
+
export declare function spawnCoinWithSeed(coinSubType: CoinSubType, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupCoin;
|
|
196
196
|
/** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.HEART` (10). */
|
|
197
|
-
export declare function spawnHeart(
|
|
198
|
-
export declare function spawnHeartWithSeed(
|
|
197
|
+
export declare function spawnHeart(heartSubType: HeartSubType, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupHeart;
|
|
198
|
+
export declare function spawnHeartWithSeed(heartSubType: HeartSubType, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupHeart;
|
|
199
199
|
/** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.KEY` (30). */
|
|
200
|
-
export declare function spawnKey(
|
|
200
|
+
export declare function spawnKey(keySubType: KeySubType, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupKey;
|
|
201
201
|
/**
|
|
202
202
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.KEY` (30) and a
|
|
203
203
|
* specific seed.
|
|
204
204
|
*/
|
|
205
|
-
export declare function spawnKeyWithSeed(
|
|
205
|
+
export declare function spawnKeyWithSeed(keySubType: KeySubType, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupKey;
|
|
206
206
|
/** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.PILL` (70). */
|
|
207
207
|
export declare function spawnPill(pillColor: PillColor, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupPill;
|
|
208
208
|
/**
|
|
209
209
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.PILL` (70) and a
|
|
210
210
|
* specific seed.
|
|
211
211
|
*/
|
|
212
|
-
export declare function spawnPillWithSeed(
|
|
212
|
+
export declare function spawnPillWithSeed(pillColor: PillColor, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupPill;
|
|
213
213
|
/** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.SACK` (69). */
|
|
214
|
-
export declare function spawnSack(
|
|
214
|
+
export declare function spawnSack(sackSubType: SackSubType, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupSack;
|
|
215
215
|
/**
|
|
216
216
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.SACK` (69) and a
|
|
217
217
|
* specific seed.
|
|
218
218
|
*/
|
|
219
|
-
export declare function spawnSackWithSeed(
|
|
219
|
+
export declare function spawnSackWithSeed(sackSubType: SackSubType, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupSack;
|
|
220
220
|
/**
|
|
221
221
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TRINKET` (350).
|
|
222
222
|
*/
|
|
223
|
-
export declare function spawnTrinket(
|
|
223
|
+
export declare function spawnTrinket(trinketType: TrinketType, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupTrinket;
|
|
224
224
|
/**
|
|
225
225
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TRINKET` (350) and
|
|
226
226
|
* a specific seed.
|
|
227
227
|
*/
|
|
228
|
-
export declare function spawnTrinketWithSeed(
|
|
228
|
+
export declare function spawnTrinketWithSeed(trinketType: TrinketType, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupTrinket;
|
|
229
229
|
//# sourceMappingURL=pickupsSpecific.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pickupsSpecific.d.ts","sourceRoot":"","sources":["../../src/functions/pickupsSpecific.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,WAAW,EACX,IAAI,EACJ,WAAW,EACX,eAAe,EACf,YAAY,EACZ,UAAU,EAEV,SAAS,EACT,WAAW,EACX,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAItC;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,cAAc,GAAE,cAAmB,GAClC,mBAAmB,EAAE,CAKvB;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,WAAW,GAAE,WAAgB,GAC5B,gBAAgB,EAAE,CAEpB;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,IAAI,GAAE,IAAS,GAAG,gBAAgB,EAAE,CAE5D;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,WAAW,GAAE,WAAgB,GAAG,gBAAgB,EAAE,CAE1E;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,eAAe,GAAE,eAAoB,GACpC,uBAAuB,EAAE,CAK3B;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CACvB,YAAY,GAAE,YAAiB,GAC9B,iBAAiB,EAAE,CAErB;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,UAAU,GAAE,UAAe,GAAG,eAAe,EAAE,CAEtE;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,SAAS,GAAE,SAAc,GAAG,gBAAgB,EAAE,CAEtE;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,WAAW,GAAE,WAAgB,GAAG,gBAAgB,EAAE,CAE1E;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CACzB,WAAW,GAAE,WAAgB,GAC5B,mBAAmB,EA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