isaacscript-common 1.2.259 → 1.2.262
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/characterStats.d.ts +1 -1
- package/dist/functions/cards.d.ts +2 -1
- package/dist/functions/entity.d.ts +7 -7
- package/dist/functions/entity.lua +7 -7
- package/dist/functions/entitySpecific.d.ts +46 -46
- package/dist/functions/entitySpecific.lua +112 -112
- package/dist/functions/log.lua +5 -4
- package/package.json +1 -1
|
@@ -16,4 +16,4 @@
|
|
|
16
16
|
* Note that the format for the `CacheFlag.CACHE_FIREDELAY` value should be in the tears stat
|
|
17
17
|
* format, not the `MaxFireDelay` format.
|
|
18
18
|
*/
|
|
19
|
-
export declare function registerCharacterStats(playerType: PlayerType | int, statMap: Map<CacheFlag, number>): void;
|
|
19
|
+
export declare function registerCharacterStats(playerType: PlayerType | int, statMap: Map<CacheFlag, number> | ReadonlyMap<CacheFlag, number>): void;
|
|
@@ -41,7 +41,8 @@ export declare function getMaxCards(): int;
|
|
|
41
41
|
* This will not return:
|
|
42
42
|
* - any runes
|
|
43
43
|
* - any objects like Dice Shard
|
|
44
|
-
* - any modded cards
|
|
44
|
+
* - any modded cards (since there is not a way to distinguish between modded cards and modded
|
|
45
|
+
* runes/objects)
|
|
45
46
|
*
|
|
46
47
|
* @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
|
|
47
48
|
* `RNG.Next` method will be called. Default is `getRandomSeed()`.
|
|
@@ -39,14 +39,14 @@ export declare function getClosestEntityTo<T extends AnyEntity>(referenceEntity:
|
|
|
39
39
|
* }
|
|
40
40
|
* ```
|
|
41
41
|
*
|
|
42
|
-
* @param
|
|
42
|
+
* @param entityType Optional. If specified, will only return NPCs that match this entity
|
|
43
43
|
* type.
|
|
44
|
-
* @param
|
|
45
|
-
* @param
|
|
44
|
+
* @param variant Optional. If specified, will only return NPCs that match this variant.
|
|
45
|
+
* @param subType Optional. If specified, will only return NPCs that match this sub-type.
|
|
46
46
|
* @param ignoreFriendly Optional. If set to true, it will exclude friendly NPCs from being
|
|
47
47
|
* returned. Default is false. Will only be taken into account if `matchingEntityType` is specified.
|
|
48
48
|
*/
|
|
49
|
-
export declare function getEntities(
|
|
49
|
+
export declare function getEntities(entityType?: EntityType | int, variant?: number, subType?: number, ignoreFriendly?: boolean): Entity[];
|
|
50
50
|
/** Helper function to return a string containing an entity's type, variant, and sub-type. */
|
|
51
51
|
export declare function getEntityID(entity: Entity): string;
|
|
52
52
|
/**
|
|
@@ -62,9 +62,9 @@ export declare function getFilteredNewEntities<T extends AnyEntity>(oldEntities:
|
|
|
62
62
|
*/
|
|
63
63
|
export declare function isEntityMoving(entity: Entity, threshold?: number): boolean;
|
|
64
64
|
/**
|
|
65
|
-
* Helper function to determine if the
|
|
66
|
-
* Baby, Mega Satan, The Beast, and so on. This is useful because certain effects should only
|
|
67
|
-
* to non-story bosses, like Vanishing Twin. Also see the `STORY_BOSSES` constant.
|
|
65
|
+
* Helper function to determine if the specified entity type is an end-game story boss, like Isaac,
|
|
66
|
+
* Blue Baby, Mega Satan, The Beast, and so on. This is useful because certain effects should only
|
|
67
|
+
* apply to non-story bosses, like Vanishing Twin. Also see the `STORY_BOSSES` constant.
|
|
68
68
|
*/
|
|
69
69
|
export declare function isStoryBoss(entityType: EntityType | int): boolean;
|
|
70
70
|
/**
|
|
@@ -66,20 +66,20 @@ function ____exports.getClosestEntityTo(self, referenceEntity, entities)
|
|
|
66
66
|
end
|
|
67
67
|
return closestEntity
|
|
68
68
|
end
|
|
69
|
-
function ____exports.getEntities(self,
|
|
70
|
-
if
|
|
71
|
-
|
|
69
|
+
function ____exports.getEntities(self, entityType, variant, subType, ignoreFriendly)
|
|
70
|
+
if variant == nil then
|
|
71
|
+
variant = -1
|
|
72
72
|
end
|
|
73
|
-
if
|
|
74
|
-
|
|
73
|
+
if subType == nil then
|
|
74
|
+
subType = -1
|
|
75
75
|
end
|
|
76
76
|
if ignoreFriendly == nil then
|
|
77
77
|
ignoreFriendly = false
|
|
78
78
|
end
|
|
79
|
-
if
|
|
79
|
+
if entityType == nil then
|
|
80
80
|
return Isaac.GetRoomEntities()
|
|
81
81
|
end
|
|
82
|
-
return Isaac.FindByType(
|
|
82
|
+
return Isaac.FindByType(entityType, variant, subType, ignoreFriendly)
|
|
83
83
|
end
|
|
84
84
|
function ____exports.getEntityID(self, entity)
|
|
85
85
|
return (((tostring(entity.Type) .. ".") .. tostring(entity.Variant)) .. ".") .. tostring(entity.SubType)
|
|
@@ -11,7 +11,7 @@ import { EntityTypeNonNPC } from "../types/EntityTypeNonNPC";
|
|
|
11
11
|
* }
|
|
12
12
|
* ```
|
|
13
13
|
*/
|
|
14
|
-
export declare function getBombs(
|
|
14
|
+
export declare function getBombs(bombVariant?: BombVariant | int, subType?: number): EntityBomb[];
|
|
15
15
|
/**
|
|
16
16
|
* Helper function to get all of the `EntityType.ENTITY_EFFECT` in the room.
|
|
17
17
|
*
|
|
@@ -23,7 +23,7 @@ export declare function getBombs(matchingVariant?: BombVariant | int, matchingSu
|
|
|
23
23
|
* }
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
|
-
export declare function getEffects(
|
|
26
|
+
export declare function getEffects(effectVariant?: EffectVariant | int, subType?: number): EntityEffect[];
|
|
27
27
|
/**
|
|
28
28
|
* Helper function to get all of the familiars in the room.
|
|
29
29
|
*
|
|
@@ -35,7 +35,7 @@ export declare function getEffects(matchingVariant?: EffectVariant | int, matchi
|
|
|
35
35
|
* }
|
|
36
36
|
* ```
|
|
37
37
|
*/
|
|
38
|
-
export declare function getFamiliars(
|
|
38
|
+
export declare function getFamiliars(familiarVariant?: FamiliarVariant | int, subType?: number): EntityFamiliar[];
|
|
39
39
|
/**
|
|
40
40
|
* Helper function to get all of the `EntityType.ENTITY_KNIFE` in the room.
|
|
41
41
|
*
|
|
@@ -47,7 +47,7 @@ export declare function getFamiliars(matchingVariant?: FamiliarVariant | int, ma
|
|
|
47
47
|
* }
|
|
48
48
|
* ```
|
|
49
49
|
*/
|
|
50
|
-
export declare function getKnives(
|
|
50
|
+
export declare function getKnives(knifeVariant?: KnifeVariant | int, subType?: number): EntityKnife[];
|
|
51
51
|
/**
|
|
52
52
|
* Helper function to get all of the `EntityType.ENTITY_LASER` in the room.
|
|
53
53
|
*
|
|
@@ -59,9 +59,9 @@ export declare function getKnives(matchingVariant?: KnifeVariant | int, matching
|
|
|
59
59
|
* }
|
|
60
60
|
* ```
|
|
61
61
|
*/
|
|
62
|
-
export declare function getLasers(
|
|
62
|
+
export declare function getLasers(laserVariant?: LaserVariant | int, subType?: number): EntityLaser[];
|
|
63
63
|
/** The same thing as the `getEntities` function, but returns only NPCs. */
|
|
64
|
-
export declare function getNPCs(
|
|
64
|
+
export declare function getNPCs(entityType?: EntityType | int, variant?: int, subType?: int, ignoreFriendly?: boolean): EntityNPC[];
|
|
65
65
|
/**
|
|
66
66
|
* Helper function to get all of the pickups in the room.
|
|
67
67
|
*
|
|
@@ -73,7 +73,7 @@ export declare function getNPCs(matchingEntityType?: EntityType | int, matchingV
|
|
|
73
73
|
* }
|
|
74
74
|
* ```
|
|
75
75
|
*/
|
|
76
|
-
export declare function getPickups(
|
|
76
|
+
export declare function getPickups(pickupVariant?: PickupVariant | int, subType?: number): EntityPickup[];
|
|
77
77
|
/**
|
|
78
78
|
* Helper function to get all of the `EntityType.ENTITY_PROJECTILE` in the room.
|
|
79
79
|
*
|
|
@@ -85,7 +85,7 @@ export declare function getPickups(matchingVariant?: PickupVariant | int, matchi
|
|
|
85
85
|
* }
|
|
86
86
|
* ```
|
|
87
87
|
*/
|
|
88
|
-
export declare function getProjectiles(
|
|
88
|
+
export declare function getProjectiles(projectileVariant?: ProjectileVariant | int, subType?: number): EntityProjectile[];
|
|
89
89
|
/**
|
|
90
90
|
* Helper function to get all of the `EntityType.ENTITY_SLOT` in the room.
|
|
91
91
|
*
|
|
@@ -97,7 +97,7 @@ export declare function getProjectiles(matchingVariant?: ProjectileVariant | int
|
|
|
97
97
|
* }
|
|
98
98
|
* ```
|
|
99
99
|
*/
|
|
100
|
-
export declare function getSlots(
|
|
100
|
+
export declare function getSlots(slotVariant?: SlotVariant | int, subType?: number): Entity[];
|
|
101
101
|
/**
|
|
102
102
|
* Helper function to get all of the `EntityType.ENTITY_TEAR` in the room.
|
|
103
103
|
*
|
|
@@ -109,52 +109,52 @@ export declare function getSlots(matchingVariant?: SlotVariant | int, matchingSu
|
|
|
109
109
|
* }
|
|
110
110
|
* ```
|
|
111
111
|
*/
|
|
112
|
-
export declare function getTears(
|
|
112
|
+
export declare function getTears(tearVariant?: TearVariant | int, subType?: number): EntityTear[];
|
|
113
113
|
/**
|
|
114
114
|
* Helper function to remove all of the `EntityType.ENTITY_BOMB` in the room.
|
|
115
115
|
*
|
|
116
|
-
* @param
|
|
116
|
+
* @param bombVariant Optional. If specified, will only remove bombs that match this variant.
|
|
117
117
|
* @param subType Optional. If specified, will only remove bombs that match this sub-type.
|
|
118
118
|
* @param cap Optional. If specified, will only remove the given amount of bombs.
|
|
119
119
|
* @returns True if one or more bombs were removed, false otherwise.
|
|
120
120
|
*/
|
|
121
|
-
export declare function removeAllBombs(
|
|
121
|
+
export declare function removeAllBombs(bombVariant?: BombVariant | int, subType?: int, cap?: int): boolean;
|
|
122
122
|
/**
|
|
123
123
|
* Helper function to remove all of the effects in the room.
|
|
124
124
|
*
|
|
125
|
-
* @param
|
|
125
|
+
* @param effectVariant Optional. If specified, will only remove effects that match this variant.
|
|
126
126
|
* @param subType Optional. If specified, will only remove effects that match this sub-type.
|
|
127
127
|
* @param cap Optional. If specified, will only remove the given amount of effects.
|
|
128
128
|
* @returns True if one or more effects were removed, false otherwise.
|
|
129
129
|
*/
|
|
130
|
-
export declare function removeAllEffects(
|
|
130
|
+
export declare function removeAllEffects(effectVariant?: EffectVariant | int, subType?: int, cap?: int): boolean;
|
|
131
131
|
/**
|
|
132
132
|
* Helper function to remove all of the familiars in the room.
|
|
133
133
|
*
|
|
134
|
-
* @param
|
|
134
|
+
* @param familiarVariant Optional. If specified, will only remove familiars that match this variant.
|
|
135
135
|
* @param subType Optional. If specified, will only remove familiars that match this sub-type.
|
|
136
136
|
* @param cap Optional. If specified, will only remove the given amount of familiars.
|
|
137
137
|
* @returns True if one or more familiars were removed, false otherwise.
|
|
138
138
|
*/
|
|
139
|
-
export declare function removeAllFamiliars(
|
|
139
|
+
export declare function removeAllFamiliars(familiarVariant?: FamiliarVariant | int, subType?: int, cap?: int): boolean;
|
|
140
140
|
/**
|
|
141
141
|
* Helper function to remove all of the `EntityType.ENTITY_KNIFE` in the room.
|
|
142
142
|
*
|
|
143
|
-
* @param
|
|
143
|
+
* @param knifeVariant Optional. If specified, will only remove knives that match this variant.
|
|
144
144
|
* @param subType Optional. If specified, will only remove knives that match this sub-type.
|
|
145
145
|
* @param cap Optional. If specified, will only remove the given amount of knives.
|
|
146
146
|
* @returns True if one or more knives were removed, false otherwise.
|
|
147
147
|
*/
|
|
148
|
-
export declare function removeAllKnives(
|
|
148
|
+
export declare function removeAllKnives(knifeVariant?: KnifeVariant | int, subType?: int, cap?: int): boolean;
|
|
149
149
|
/**
|
|
150
150
|
* Helper function to remove all of the `EntityType.ENTITY_LASER` in the room.
|
|
151
151
|
*
|
|
152
|
-
* @param
|
|
152
|
+
* @param laserVariant Optional. If specified, will only remove lasers that match this variant.
|
|
153
153
|
* @param subType Optional. If specified, will only remove lasers that match this sub-type.
|
|
154
154
|
* @param cap Optional. If specified, will only remove the given amount of lasers.
|
|
155
155
|
* @returns True if one or more lasers were removed, false otherwise.
|
|
156
156
|
*/
|
|
157
|
-
export declare function removeAllLasers(
|
|
157
|
+
export declare function removeAllLasers(laserVariant?: LaserVariant | int, subType?: int, cap?: int): boolean;
|
|
158
158
|
/**
|
|
159
159
|
* Helper function to remove all NPCs in the room.
|
|
160
160
|
*
|
|
@@ -165,76 +165,76 @@ export declare function removeAllNPCs(cap?: int): boolean;
|
|
|
165
165
|
/**
|
|
166
166
|
* Helper function to remove all of the pickups in the room.
|
|
167
167
|
*
|
|
168
|
-
* @param
|
|
168
|
+
* @param pickupVariant Optional. If specified, will only remove pickups that match this variant.
|
|
169
169
|
* @param subType Optional. If specified, will only remove pickups that match this sub-type.
|
|
170
170
|
* @param cap Optional. If specified, will only remove the given amount of pickups.
|
|
171
171
|
* @returns True if one or more pickups were removed, false otherwise.
|
|
172
172
|
*/
|
|
173
|
-
export declare function removeAllPickups(
|
|
173
|
+
export declare function removeAllPickups(pickupVariant?: PickupVariant | int, subType?: int, cap?: int): boolean;
|
|
174
174
|
/**
|
|
175
175
|
* Helper function to remove all of the `EntityType.ENTITY_PROJECTILE` in the room.
|
|
176
176
|
*
|
|
177
|
-
* @param
|
|
177
|
+
* @param projectileVariant Optional. If specified, will only remove projectiles that match this variant.
|
|
178
178
|
* @param subType Optional. If specified, will only remove projectiles that match this sub-type.
|
|
179
179
|
* @param cap Optional. If specified, will only remove the given amount of projectiles.
|
|
180
180
|
* @returns True if one or more projectiles were removed, false otherwise.
|
|
181
181
|
*/
|
|
182
|
-
export declare function removeAllProjectiles(
|
|
182
|
+
export declare function removeAllProjectiles(projectileVariant?: ProjectileVariant | int, subType?: int, cap?: int): boolean;
|
|
183
183
|
/**
|
|
184
184
|
* Helper function to remove all of the `EntityType.ENTITY_SLOT` in the room.
|
|
185
185
|
*
|
|
186
|
-
* @param
|
|
186
|
+
* @param slotVariant Optional. If specified, will only remove slots that match this variant.
|
|
187
187
|
* @param subType Optional. If specified, will only remove slots that match this sub-type.
|
|
188
188
|
* @param cap Optional. If specified, will only remove the given amount of slots.
|
|
189
189
|
* @returns True if one or more slots were removed, false otherwise.
|
|
190
190
|
*/
|
|
191
|
-
export declare function removeAllSlots(
|
|
191
|
+
export declare function removeAllSlots(slotVariant?: SlotVariant | int, subType?: int, cap?: int): boolean;
|
|
192
192
|
/**
|
|
193
193
|
* Helper function to remove all of the `EntityType.ENTITY_TEAR` in the room.
|
|
194
194
|
*
|
|
195
|
-
* @param
|
|
195
|
+
* @param tearVariant Optional. If specified, will only remove tears that match this variant.
|
|
196
196
|
* @param subType Optional. If specified, will only remove tears that match this sub-type.
|
|
197
197
|
* @param cap Optional. If specified, will only remove the given amount of tears.
|
|
198
198
|
* @returns True if one or more tears were removed, false otherwise.
|
|
199
199
|
*/
|
|
200
|
-
export declare function removeAllTears(
|
|
200
|
+
export declare function removeAllTears(tearVariant?: TearVariant | int, subType?: int, cap?: int): boolean;
|
|
201
201
|
/** Helper function to spawn a `EntityType.ENTITY_BOMB` (4). */
|
|
202
|
-
export declare function spawnBomb(
|
|
202
|
+
export declare function spawnBomb(bombVariant: BombVariant | int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityBomb;
|
|
203
203
|
/** Helper function to spawn a `EntityType.ENTITY_BOMB` (4) with a specific seed. */
|
|
204
|
-
export declare function spawnBombWithSeed(
|
|
204
|
+
export declare function spawnBombWithSeed(bombVariant: BombVariant | int, subType: int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityBomb;
|
|
205
205
|
/** Helper function to spawn a `EntityType.ENTITY_EFFECT` (1000). */
|
|
206
|
-
export declare function spawnEffect(
|
|
206
|
+
export declare function spawnEffect(effectVariant: EffectVariant | int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityEffect;
|
|
207
207
|
/** Helper function to spawn a `EntityType.ENTITY_EFFECT` (1000) with a specific seed. */
|
|
208
|
-
export declare function spawnEffectWithSeed(
|
|
208
|
+
export declare function spawnEffectWithSeed(effectVariant: EffectVariant | int, subType: int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityEffect;
|
|
209
209
|
/** Helper function to spawn a `EntityType.ENTITY_FAMILIAR` (3). */
|
|
210
|
-
export declare function spawnFamiliar(
|
|
210
|
+
export declare function spawnFamiliar(familiarVariant: FamiliarVariant | int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityFamiliar;
|
|
211
211
|
/** Helper function to spawn a `EntityType.ENTITY_FAMILIAR` (3) with a specific seed. */
|
|
212
|
-
export declare function spawnFamiliarWithSeed(
|
|
212
|
+
export declare function spawnFamiliarWithSeed(familiarVariant: FamiliarVariant | int, subType: int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityFamiliar;
|
|
213
213
|
/** Helper function to spawn a `EntityType.ENTITY_KNIFE` (8). */
|
|
214
|
-
export declare function spawnKnife(
|
|
214
|
+
export declare function spawnKnife(knifeVariant: KnifeVariant | int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityKnife;
|
|
215
215
|
/** Helper function to spawn a `EntityType.ENTITY_KNIFE` (8) with a specific seed. */
|
|
216
|
-
export declare function spawnKnifeWithSeed(
|
|
216
|
+
export declare function spawnKnifeWithSeed(knifeVariant: KnifeVariant | int, subType: int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityKnife;
|
|
217
217
|
/** Helper function to spawn a `EntityType.ENTITY_LASER` (7). */
|
|
218
|
-
export declare function spawnLaser(
|
|
218
|
+
export declare function spawnLaser(laserVariant: LaserVariant | int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityLaser;
|
|
219
219
|
/** Helper function to spawn a `EntityType.ENTITY_LASER` (7) with a specific seed. */
|
|
220
|
-
export declare function spawnLaserWithSeed(
|
|
220
|
+
export declare function spawnLaserWithSeed(laserVariant: LaserVariant | int, subType: int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityLaser;
|
|
221
221
|
/** Helper function to spawn an NPC. */
|
|
222
222
|
export declare function spawnNPC<T extends number>(entityType: T extends EntityTypeNonNPC ? never : T, variant: int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityNPC;
|
|
223
223
|
/** Helper function to spawn an NPC with a specific seed. */
|
|
224
224
|
export declare function spawnNPCWithSeed(entityType: EntityType | int, variant: int, subType: int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityNPC;
|
|
225
225
|
/** Helper function to spawn a `EntityType.ENTITY_PICKUP` (5). */
|
|
226
|
-
export declare function spawnPickup(
|
|
226
|
+
export declare function spawnPickup(pickupVariant: PickupVariant | int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityPickup;
|
|
227
227
|
/** Helper function to spawn a `EntityType.ENTITY_PICKUP` (5) with a specific seed. */
|
|
228
|
-
export declare function spawnPickupWithSeed(
|
|
228
|
+
export declare function spawnPickupWithSeed(pickupVariant: PickupVariant | int, subType: int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityPickup;
|
|
229
229
|
/** Helper function to spawn a `EntityType.ENTITY_PROJECTILE` (9). */
|
|
230
|
-
export declare function spawnProjectile(
|
|
230
|
+
export declare function spawnProjectile(projectileVariant: ProjectileVariant | int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityProjectile;
|
|
231
231
|
/** Helper function to spawn a `EntityType.ENTITY_PROJECTILE` (9) with a specific seed. */
|
|
232
|
-
export declare function spawnProjectileWithSeed(
|
|
232
|
+
export declare function spawnProjectileWithSeed(projectileVariant: ProjectileVariant | int, subType: int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityProjectile;
|
|
233
233
|
/** Helper function to spawn a `EntityType.ENTITY_SLOT` (6). */
|
|
234
|
-
export declare function spawnSlot(
|
|
234
|
+
export declare function spawnSlot(slotVariant: SlotVariant | int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): Entity;
|
|
235
235
|
/** Helper function to spawn a `EntityType.ENTITY_SLOT` (6) with a specific seed. */
|
|
236
|
-
export declare function spawnSlotWithSeed(
|
|
236
|
+
export declare function spawnSlotWithSeed(slotVariant: int | SlotVariant, subType: int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): Entity;
|
|
237
237
|
/** Helper function to spawn a `EntityType.ENTITY_TEAR` (2). */
|
|
238
|
-
export declare function spawnTear(
|
|
238
|
+
export declare function spawnTear(tearVariant: TearVariant | int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityTear;
|
|
239
239
|
/** Helper function to spawn a `EntityType.EntityType` (2) with a specific seed. */
|
|
240
|
-
export declare function spawnTearWithSeed(
|
|
240
|
+
export declare function spawnTearWithSeed(tearVariant: TearVariant | int, subType: int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityTear;
|
|
@@ -6,14 +6,14 @@ local ____entity = require("functions.entity")
|
|
|
6
6
|
local getEntities = ____entity.getEntities
|
|
7
7
|
local removeEntities = ____entity.removeEntities
|
|
8
8
|
local spawn = ____entity.spawn
|
|
9
|
-
function ____exports.getBombs(self,
|
|
10
|
-
if
|
|
11
|
-
|
|
9
|
+
function ____exports.getBombs(self, bombVariant, subType)
|
|
10
|
+
if bombVariant == nil then
|
|
11
|
+
bombVariant = -1
|
|
12
12
|
end
|
|
13
|
-
if
|
|
14
|
-
|
|
13
|
+
if subType == nil then
|
|
14
|
+
subType = -1
|
|
15
15
|
end
|
|
16
|
-
local entities = getEntities(nil, EntityType.ENTITY_BOMB,
|
|
16
|
+
local entities = getEntities(nil, EntityType.ENTITY_BOMB, bombVariant, subType)
|
|
17
17
|
local bombs = {}
|
|
18
18
|
for ____, entity in ipairs(entities) do
|
|
19
19
|
local bomb = entity:ToBomb()
|
|
@@ -23,14 +23,14 @@ function ____exports.getBombs(self, matchingVariant, matchingSubType)
|
|
|
23
23
|
end
|
|
24
24
|
return bombs
|
|
25
25
|
end
|
|
26
|
-
function ____exports.getEffects(self,
|
|
27
|
-
if
|
|
28
|
-
|
|
26
|
+
function ____exports.getEffects(self, effectVariant, subType)
|
|
27
|
+
if effectVariant == nil then
|
|
28
|
+
effectVariant = -1
|
|
29
29
|
end
|
|
30
|
-
if
|
|
31
|
-
|
|
30
|
+
if subType == nil then
|
|
31
|
+
subType = -1
|
|
32
32
|
end
|
|
33
|
-
local entities = getEntities(nil, EntityType.ENTITY_EFFECT,
|
|
33
|
+
local entities = getEntities(nil, EntityType.ENTITY_EFFECT, effectVariant, subType)
|
|
34
34
|
local effects = {}
|
|
35
35
|
for ____, entity in ipairs(entities) do
|
|
36
36
|
local effect = entity:ToEffect()
|
|
@@ -40,14 +40,14 @@ function ____exports.getEffects(self, matchingVariant, matchingSubType)
|
|
|
40
40
|
end
|
|
41
41
|
return effects
|
|
42
42
|
end
|
|
43
|
-
function ____exports.getFamiliars(self,
|
|
44
|
-
if
|
|
45
|
-
|
|
43
|
+
function ____exports.getFamiliars(self, familiarVariant, subType)
|
|
44
|
+
if familiarVariant == nil then
|
|
45
|
+
familiarVariant = -1
|
|
46
46
|
end
|
|
47
|
-
if
|
|
48
|
-
|
|
47
|
+
if subType == nil then
|
|
48
|
+
subType = -1
|
|
49
49
|
end
|
|
50
|
-
local entities = getEntities(nil, EntityType.ENTITY_FAMILIAR,
|
|
50
|
+
local entities = getEntities(nil, EntityType.ENTITY_FAMILIAR, familiarVariant, subType)
|
|
51
51
|
local familiars = {}
|
|
52
52
|
for ____, entity in ipairs(entities) do
|
|
53
53
|
local familiar = entity:ToFamiliar()
|
|
@@ -57,14 +57,14 @@ function ____exports.getFamiliars(self, matchingVariant, matchingSubType)
|
|
|
57
57
|
end
|
|
58
58
|
return familiars
|
|
59
59
|
end
|
|
60
|
-
function ____exports.getKnives(self,
|
|
61
|
-
if
|
|
62
|
-
|
|
60
|
+
function ____exports.getKnives(self, knifeVariant, subType)
|
|
61
|
+
if knifeVariant == nil then
|
|
62
|
+
knifeVariant = -1
|
|
63
63
|
end
|
|
64
|
-
if
|
|
65
|
-
|
|
64
|
+
if subType == nil then
|
|
65
|
+
subType = -1
|
|
66
66
|
end
|
|
67
|
-
local entities = getEntities(nil, EntityType.ENTITY_KNIFE,
|
|
67
|
+
local entities = getEntities(nil, EntityType.ENTITY_KNIFE, knifeVariant, subType)
|
|
68
68
|
local knives = {}
|
|
69
69
|
for ____, entity in ipairs(entities) do
|
|
70
70
|
local knife = entity:ToKnife()
|
|
@@ -74,14 +74,14 @@ function ____exports.getKnives(self, matchingVariant, matchingSubType)
|
|
|
74
74
|
end
|
|
75
75
|
return knives
|
|
76
76
|
end
|
|
77
|
-
function ____exports.getLasers(self,
|
|
78
|
-
if
|
|
79
|
-
|
|
77
|
+
function ____exports.getLasers(self, laserVariant, subType)
|
|
78
|
+
if laserVariant == nil then
|
|
79
|
+
laserVariant = -1
|
|
80
80
|
end
|
|
81
|
-
if
|
|
82
|
-
|
|
81
|
+
if subType == nil then
|
|
82
|
+
subType = -1
|
|
83
83
|
end
|
|
84
|
-
local entities = getEntities(nil, EntityType.ENTITY_LASER,
|
|
84
|
+
local entities = getEntities(nil, EntityType.ENTITY_LASER, laserVariant, subType)
|
|
85
85
|
local lasers = {}
|
|
86
86
|
for ____, entity in ipairs(entities) do
|
|
87
87
|
local laser = entity:ToLaser()
|
|
@@ -91,15 +91,15 @@ function ____exports.getLasers(self, matchingVariant, matchingSubType)
|
|
|
91
91
|
end
|
|
92
92
|
return lasers
|
|
93
93
|
end
|
|
94
|
-
function ____exports.getNPCs(self,
|
|
94
|
+
function ____exports.getNPCs(self, entityType, variant, subType, ignoreFriendly)
|
|
95
95
|
if ignoreFriendly == nil then
|
|
96
96
|
ignoreFriendly = false
|
|
97
97
|
end
|
|
98
98
|
local entities = getEntities(
|
|
99
99
|
nil,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
entityType,
|
|
101
|
+
variant,
|
|
102
|
+
subType,
|
|
103
103
|
ignoreFriendly
|
|
104
104
|
)
|
|
105
105
|
local npcs = {}
|
|
@@ -111,14 +111,14 @@ function ____exports.getNPCs(self, matchingEntityType, matchingVariant, matching
|
|
|
111
111
|
end
|
|
112
112
|
return npcs
|
|
113
113
|
end
|
|
114
|
-
function ____exports.getPickups(self,
|
|
115
|
-
if
|
|
116
|
-
|
|
114
|
+
function ____exports.getPickups(self, pickupVariant, subType)
|
|
115
|
+
if pickupVariant == nil then
|
|
116
|
+
pickupVariant = -1
|
|
117
117
|
end
|
|
118
|
-
if
|
|
119
|
-
|
|
118
|
+
if subType == nil then
|
|
119
|
+
subType = -1
|
|
120
120
|
end
|
|
121
|
-
local entities = getEntities(nil, EntityType.ENTITY_PICKUP,
|
|
121
|
+
local entities = getEntities(nil, EntityType.ENTITY_PICKUP, pickupVariant, subType)
|
|
122
122
|
local pickups = {}
|
|
123
123
|
for ____, entity in ipairs(entities) do
|
|
124
124
|
local pickup = entity:ToPickup()
|
|
@@ -128,14 +128,14 @@ function ____exports.getPickups(self, matchingVariant, matchingSubType)
|
|
|
128
128
|
end
|
|
129
129
|
return pickups
|
|
130
130
|
end
|
|
131
|
-
function ____exports.getProjectiles(self,
|
|
132
|
-
if
|
|
133
|
-
|
|
131
|
+
function ____exports.getProjectiles(self, projectileVariant, subType)
|
|
132
|
+
if projectileVariant == nil then
|
|
133
|
+
projectileVariant = -1
|
|
134
134
|
end
|
|
135
|
-
if
|
|
136
|
-
|
|
135
|
+
if subType == nil then
|
|
136
|
+
subType = -1
|
|
137
137
|
end
|
|
138
|
-
local entities = getEntities(nil, EntityType.ENTITY_PROJECTILE,
|
|
138
|
+
local entities = getEntities(nil, EntityType.ENTITY_PROJECTILE, projectileVariant, subType)
|
|
139
139
|
local projectiles = {}
|
|
140
140
|
for ____, entity in ipairs(entities) do
|
|
141
141
|
local projectile = entity:ToProjectile()
|
|
@@ -145,24 +145,24 @@ function ____exports.getProjectiles(self, matchingVariant, matchingSubType)
|
|
|
145
145
|
end
|
|
146
146
|
return projectiles
|
|
147
147
|
end
|
|
148
|
-
function ____exports.getSlots(self,
|
|
149
|
-
if
|
|
150
|
-
|
|
148
|
+
function ____exports.getSlots(self, slotVariant, subType)
|
|
149
|
+
if slotVariant == nil then
|
|
150
|
+
slotVariant = -1
|
|
151
151
|
end
|
|
152
|
-
if
|
|
153
|
-
|
|
152
|
+
if subType == nil then
|
|
153
|
+
subType = -1
|
|
154
154
|
end
|
|
155
|
-
local slots = getEntities(nil, EntityType.ENTITY_SLOT,
|
|
155
|
+
local slots = getEntities(nil, EntityType.ENTITY_SLOT, slotVariant, subType)
|
|
156
156
|
return slots
|
|
157
157
|
end
|
|
158
|
-
function ____exports.getTears(self,
|
|
159
|
-
if
|
|
160
|
-
|
|
158
|
+
function ____exports.getTears(self, tearVariant, subType)
|
|
159
|
+
if tearVariant == nil then
|
|
160
|
+
tearVariant = -1
|
|
161
161
|
end
|
|
162
|
-
if
|
|
163
|
-
|
|
162
|
+
if subType == nil then
|
|
163
|
+
subType = -1
|
|
164
164
|
end
|
|
165
|
-
local entities = getEntities(nil, EntityType.ENTITY_TEAR,
|
|
165
|
+
local entities = getEntities(nil, EntityType.ENTITY_TEAR, tearVariant, subType)
|
|
166
166
|
local tears = {}
|
|
167
167
|
for ____, entity in ipairs(entities) do
|
|
168
168
|
local tear = entity:ToTear()
|
|
@@ -172,47 +172,47 @@ function ____exports.getTears(self, matchingVariant, matchingSubType)
|
|
|
172
172
|
end
|
|
173
173
|
return tears
|
|
174
174
|
end
|
|
175
|
-
function ____exports.removeAllBombs(self,
|
|
176
|
-
local bombs = ____exports.getBombs(nil,
|
|
175
|
+
function ____exports.removeAllBombs(self, bombVariant, subType, cap)
|
|
176
|
+
local bombs = ____exports.getBombs(nil, bombVariant, subType)
|
|
177
177
|
return removeEntities(nil, bombs, cap)
|
|
178
178
|
end
|
|
179
|
-
function ____exports.removeAllEffects(self,
|
|
180
|
-
local effects = ____exports.getEffects(nil,
|
|
179
|
+
function ____exports.removeAllEffects(self, effectVariant, subType, cap)
|
|
180
|
+
local effects = ____exports.getEffects(nil, effectVariant, subType)
|
|
181
181
|
return removeEntities(nil, effects, cap)
|
|
182
182
|
end
|
|
183
|
-
function ____exports.removeAllFamiliars(self,
|
|
184
|
-
local familiars = ____exports.getFamiliars(nil,
|
|
183
|
+
function ____exports.removeAllFamiliars(self, familiarVariant, subType, cap)
|
|
184
|
+
local familiars = ____exports.getFamiliars(nil, familiarVariant, subType)
|
|
185
185
|
return removeEntities(nil, familiars, cap)
|
|
186
186
|
end
|
|
187
|
-
function ____exports.removeAllKnives(self,
|
|
188
|
-
local knives = ____exports.getKnives(nil,
|
|
187
|
+
function ____exports.removeAllKnives(self, knifeVariant, subType, cap)
|
|
188
|
+
local knives = ____exports.getKnives(nil, knifeVariant, subType)
|
|
189
189
|
return removeEntities(nil, knives, cap)
|
|
190
190
|
end
|
|
191
|
-
function ____exports.removeAllLasers(self,
|
|
192
|
-
local lasers = ____exports.getLasers(nil,
|
|
191
|
+
function ____exports.removeAllLasers(self, laserVariant, subType, cap)
|
|
192
|
+
local lasers = ____exports.getLasers(nil, laserVariant, subType)
|
|
193
193
|
return removeEntities(nil, lasers, cap)
|
|
194
194
|
end
|
|
195
195
|
function ____exports.removeAllNPCs(self, cap)
|
|
196
196
|
local npcs = ____exports.getNPCs(nil)
|
|
197
197
|
return removeEntities(nil, npcs, cap)
|
|
198
198
|
end
|
|
199
|
-
function ____exports.removeAllPickups(self,
|
|
200
|
-
local pickups = ____exports.getPickups(nil,
|
|
199
|
+
function ____exports.removeAllPickups(self, pickupVariant, subType, cap)
|
|
200
|
+
local pickups = ____exports.getPickups(nil, pickupVariant, subType)
|
|
201
201
|
return removeEntities(nil, pickups, cap)
|
|
202
202
|
end
|
|
203
|
-
function ____exports.removeAllProjectiles(self,
|
|
204
|
-
local projectiles = ____exports.getProjectiles(nil,
|
|
203
|
+
function ____exports.removeAllProjectiles(self, projectileVariant, subType, cap)
|
|
204
|
+
local projectiles = ____exports.getProjectiles(nil, projectileVariant, subType)
|
|
205
205
|
return removeEntities(nil, projectiles, cap)
|
|
206
206
|
end
|
|
207
|
-
function ____exports.removeAllSlots(self,
|
|
208
|
-
local slots = ____exports.getSlots(nil,
|
|
207
|
+
function ____exports.removeAllSlots(self, slotVariant, subType, cap)
|
|
208
|
+
local slots = ____exports.getSlots(nil, slotVariant, subType)
|
|
209
209
|
return removeEntities(nil, slots, cap)
|
|
210
210
|
end
|
|
211
|
-
function ____exports.removeAllTears(self,
|
|
212
|
-
local tears = ____exports.getTears(nil,
|
|
211
|
+
function ____exports.removeAllTears(self, tearVariant, subType, cap)
|
|
212
|
+
local tears = ____exports.getTears(nil, tearVariant, subType)
|
|
213
213
|
return removeEntities(nil, tears, cap)
|
|
214
214
|
end
|
|
215
|
-
function ____exports.spawnBomb(self,
|
|
215
|
+
function ____exports.spawnBomb(self, bombVariant, subType, position, velocity, spawner, seed)
|
|
216
216
|
if velocity == nil then
|
|
217
217
|
velocity = VectorZero
|
|
218
218
|
end
|
|
@@ -225,7 +225,7 @@ function ____exports.spawnBomb(self, variant, subType, position, velocity, spawn
|
|
|
225
225
|
local entity = spawn(
|
|
226
226
|
nil,
|
|
227
227
|
EntityType.ENTITY_BOMB,
|
|
228
|
-
|
|
228
|
+
bombVariant,
|
|
229
229
|
subType,
|
|
230
230
|
position,
|
|
231
231
|
velocity,
|
|
@@ -238,7 +238,7 @@ function ____exports.spawnBomb(self, variant, subType, position, velocity, spawn
|
|
|
238
238
|
end
|
|
239
239
|
return bomb
|
|
240
240
|
end
|
|
241
|
-
function ____exports.spawnBombWithSeed(self,
|
|
241
|
+
function ____exports.spawnBombWithSeed(self, bombVariant, subType, position, seed, velocity, spawner)
|
|
242
242
|
if velocity == nil then
|
|
243
243
|
velocity = VectorZero
|
|
244
244
|
end
|
|
@@ -247,7 +247,7 @@ function ____exports.spawnBombWithSeed(self, variant, subType, position, seed, v
|
|
|
247
247
|
end
|
|
248
248
|
return ____exports.spawnBomb(
|
|
249
249
|
nil,
|
|
250
|
-
|
|
250
|
+
bombVariant,
|
|
251
251
|
subType,
|
|
252
252
|
position,
|
|
253
253
|
velocity,
|
|
@@ -255,7 +255,7 @@ function ____exports.spawnBombWithSeed(self, variant, subType, position, seed, v
|
|
|
255
255
|
seed
|
|
256
256
|
)
|
|
257
257
|
end
|
|
258
|
-
function ____exports.spawnEffect(self,
|
|
258
|
+
function ____exports.spawnEffect(self, effectVariant, subType, position, velocity, spawner, seed)
|
|
259
259
|
if velocity == nil then
|
|
260
260
|
velocity = VectorZero
|
|
261
261
|
end
|
|
@@ -268,7 +268,7 @@ function ____exports.spawnEffect(self, variant, subType, position, velocity, spa
|
|
|
268
268
|
local entity = spawn(
|
|
269
269
|
nil,
|
|
270
270
|
EntityType.ENTITY_EFFECT,
|
|
271
|
-
|
|
271
|
+
effectVariant,
|
|
272
272
|
subType,
|
|
273
273
|
position,
|
|
274
274
|
velocity,
|
|
@@ -281,7 +281,7 @@ function ____exports.spawnEffect(self, variant, subType, position, velocity, spa
|
|
|
281
281
|
end
|
|
282
282
|
return effect
|
|
283
283
|
end
|
|
284
|
-
function ____exports.spawnEffectWithSeed(self,
|
|
284
|
+
function ____exports.spawnEffectWithSeed(self, effectVariant, subType, position, seed, velocity, spawner)
|
|
285
285
|
if velocity == nil then
|
|
286
286
|
velocity = VectorZero
|
|
287
287
|
end
|
|
@@ -290,7 +290,7 @@ function ____exports.spawnEffectWithSeed(self, variant, subType, position, seed,
|
|
|
290
290
|
end
|
|
291
291
|
return ____exports.spawnEffect(
|
|
292
292
|
nil,
|
|
293
|
-
|
|
293
|
+
effectVariant,
|
|
294
294
|
subType,
|
|
295
295
|
position,
|
|
296
296
|
velocity,
|
|
@@ -298,7 +298,7 @@ function ____exports.spawnEffectWithSeed(self, variant, subType, position, seed,
|
|
|
298
298
|
seed
|
|
299
299
|
)
|
|
300
300
|
end
|
|
301
|
-
function ____exports.spawnFamiliar(self,
|
|
301
|
+
function ____exports.spawnFamiliar(self, familiarVariant, subType, position, velocity, spawner, seed)
|
|
302
302
|
if velocity == nil then
|
|
303
303
|
velocity = VectorZero
|
|
304
304
|
end
|
|
@@ -311,7 +311,7 @@ function ____exports.spawnFamiliar(self, variant, subType, position, velocity, s
|
|
|
311
311
|
local entity = spawn(
|
|
312
312
|
nil,
|
|
313
313
|
EntityType.ENTITY_FAMILIAR,
|
|
314
|
-
|
|
314
|
+
familiarVariant,
|
|
315
315
|
subType,
|
|
316
316
|
position,
|
|
317
317
|
velocity,
|
|
@@ -324,7 +324,7 @@ function ____exports.spawnFamiliar(self, variant, subType, position, velocity, s
|
|
|
324
324
|
end
|
|
325
325
|
return familiar
|
|
326
326
|
end
|
|
327
|
-
function ____exports.spawnFamiliarWithSeed(self,
|
|
327
|
+
function ____exports.spawnFamiliarWithSeed(self, familiarVariant, subType, position, seed, velocity, spawner)
|
|
328
328
|
if velocity == nil then
|
|
329
329
|
velocity = VectorZero
|
|
330
330
|
end
|
|
@@ -333,7 +333,7 @@ function ____exports.spawnFamiliarWithSeed(self, variant, subType, position, see
|
|
|
333
333
|
end
|
|
334
334
|
return ____exports.spawnFamiliar(
|
|
335
335
|
nil,
|
|
336
|
-
|
|
336
|
+
familiarVariant,
|
|
337
337
|
subType,
|
|
338
338
|
position,
|
|
339
339
|
velocity,
|
|
@@ -341,7 +341,7 @@ function ____exports.spawnFamiliarWithSeed(self, variant, subType, position, see
|
|
|
341
341
|
seed
|
|
342
342
|
)
|
|
343
343
|
end
|
|
344
|
-
function ____exports.spawnKnife(self,
|
|
344
|
+
function ____exports.spawnKnife(self, knifeVariant, subType, position, velocity, spawner, seed)
|
|
345
345
|
if velocity == nil then
|
|
346
346
|
velocity = VectorZero
|
|
347
347
|
end
|
|
@@ -354,7 +354,7 @@ function ____exports.spawnKnife(self, variant, subType, position, velocity, spaw
|
|
|
354
354
|
local entity = spawn(
|
|
355
355
|
nil,
|
|
356
356
|
EntityType.ENTITY_KNIFE,
|
|
357
|
-
|
|
357
|
+
knifeVariant,
|
|
358
358
|
subType,
|
|
359
359
|
position,
|
|
360
360
|
velocity,
|
|
@@ -367,7 +367,7 @@ function ____exports.spawnKnife(self, variant, subType, position, velocity, spaw
|
|
|
367
367
|
end
|
|
368
368
|
return knife
|
|
369
369
|
end
|
|
370
|
-
function ____exports.spawnKnifeWithSeed(self,
|
|
370
|
+
function ____exports.spawnKnifeWithSeed(self, knifeVariant, subType, position, seed, velocity, spawner)
|
|
371
371
|
if velocity == nil then
|
|
372
372
|
velocity = VectorZero
|
|
373
373
|
end
|
|
@@ -376,7 +376,7 @@ function ____exports.spawnKnifeWithSeed(self, variant, subType, position, seed,
|
|
|
376
376
|
end
|
|
377
377
|
return ____exports.spawnKnife(
|
|
378
378
|
nil,
|
|
379
|
-
|
|
379
|
+
knifeVariant,
|
|
380
380
|
subType,
|
|
381
381
|
position,
|
|
382
382
|
velocity,
|
|
@@ -384,7 +384,7 @@ function ____exports.spawnKnifeWithSeed(self, variant, subType, position, seed,
|
|
|
384
384
|
seed
|
|
385
385
|
)
|
|
386
386
|
end
|
|
387
|
-
function ____exports.spawnLaser(self,
|
|
387
|
+
function ____exports.spawnLaser(self, laserVariant, subType, position, velocity, spawner, seed)
|
|
388
388
|
if velocity == nil then
|
|
389
389
|
velocity = VectorZero
|
|
390
390
|
end
|
|
@@ -397,7 +397,7 @@ function ____exports.spawnLaser(self, variant, subType, position, velocity, spaw
|
|
|
397
397
|
local entity = spawn(
|
|
398
398
|
nil,
|
|
399
399
|
EntityType.ENTITY_LASER,
|
|
400
|
-
|
|
400
|
+
laserVariant,
|
|
401
401
|
subType,
|
|
402
402
|
position,
|
|
403
403
|
velocity,
|
|
@@ -410,7 +410,7 @@ function ____exports.spawnLaser(self, variant, subType, position, velocity, spaw
|
|
|
410
410
|
end
|
|
411
411
|
return laser
|
|
412
412
|
end
|
|
413
|
-
function ____exports.spawnLaserWithSeed(self,
|
|
413
|
+
function ____exports.spawnLaserWithSeed(self, laserVariant, subType, position, seed, velocity, spawner)
|
|
414
414
|
if velocity == nil then
|
|
415
415
|
velocity = VectorZero
|
|
416
416
|
end
|
|
@@ -419,7 +419,7 @@ function ____exports.spawnLaserWithSeed(self, variant, subType, position, seed,
|
|
|
419
419
|
end
|
|
420
420
|
return ____exports.spawnLaser(
|
|
421
421
|
nil,
|
|
422
|
-
|
|
422
|
+
laserVariant,
|
|
423
423
|
subType,
|
|
424
424
|
position,
|
|
425
425
|
velocity,
|
|
@@ -471,7 +471,7 @@ function ____exports.spawnNPCWithSeed(self, entityType, variant, subType, positi
|
|
|
471
471
|
seed
|
|
472
472
|
)
|
|
473
473
|
end
|
|
474
|
-
function ____exports.spawnPickup(self,
|
|
474
|
+
function ____exports.spawnPickup(self, pickupVariant, subType, position, velocity, spawner, seed)
|
|
475
475
|
if velocity == nil then
|
|
476
476
|
velocity = VectorZero
|
|
477
477
|
end
|
|
@@ -484,7 +484,7 @@ function ____exports.spawnPickup(self, variant, subType, position, velocity, spa
|
|
|
484
484
|
local entity = spawn(
|
|
485
485
|
nil,
|
|
486
486
|
EntityType.ENTITY_PICKUP,
|
|
487
|
-
|
|
487
|
+
pickupVariant,
|
|
488
488
|
subType,
|
|
489
489
|
position,
|
|
490
490
|
velocity,
|
|
@@ -497,7 +497,7 @@ function ____exports.spawnPickup(self, variant, subType, position, velocity, spa
|
|
|
497
497
|
end
|
|
498
498
|
return pickup
|
|
499
499
|
end
|
|
500
|
-
function ____exports.spawnPickupWithSeed(self,
|
|
500
|
+
function ____exports.spawnPickupWithSeed(self, pickupVariant, subType, position, seed, velocity, spawner)
|
|
501
501
|
if velocity == nil then
|
|
502
502
|
velocity = VectorZero
|
|
503
503
|
end
|
|
@@ -506,7 +506,7 @@ function ____exports.spawnPickupWithSeed(self, variant, subType, position, seed,
|
|
|
506
506
|
end
|
|
507
507
|
return ____exports.spawnPickup(
|
|
508
508
|
nil,
|
|
509
|
-
|
|
509
|
+
pickupVariant,
|
|
510
510
|
subType,
|
|
511
511
|
position,
|
|
512
512
|
velocity,
|
|
@@ -514,7 +514,7 @@ function ____exports.spawnPickupWithSeed(self, variant, subType, position, seed,
|
|
|
514
514
|
seed
|
|
515
515
|
)
|
|
516
516
|
end
|
|
517
|
-
function ____exports.spawnProjectile(self,
|
|
517
|
+
function ____exports.spawnProjectile(self, projectileVariant, subType, position, velocity, spawner, seed)
|
|
518
518
|
if velocity == nil then
|
|
519
519
|
velocity = VectorZero
|
|
520
520
|
end
|
|
@@ -527,7 +527,7 @@ function ____exports.spawnProjectile(self, variant, subType, position, velocity,
|
|
|
527
527
|
local entity = spawn(
|
|
528
528
|
nil,
|
|
529
529
|
EntityType.ENTITY_PROJECTILE,
|
|
530
|
-
|
|
530
|
+
projectileVariant,
|
|
531
531
|
subType,
|
|
532
532
|
position,
|
|
533
533
|
velocity,
|
|
@@ -540,7 +540,7 @@ function ____exports.spawnProjectile(self, variant, subType, position, velocity,
|
|
|
540
540
|
end
|
|
541
541
|
return projectile
|
|
542
542
|
end
|
|
543
|
-
function ____exports.spawnProjectileWithSeed(self,
|
|
543
|
+
function ____exports.spawnProjectileWithSeed(self, projectileVariant, subType, position, seed, velocity, spawner)
|
|
544
544
|
if velocity == nil then
|
|
545
545
|
velocity = VectorZero
|
|
546
546
|
end
|
|
@@ -549,7 +549,7 @@ function ____exports.spawnProjectileWithSeed(self, variant, subType, position, s
|
|
|
549
549
|
end
|
|
550
550
|
return ____exports.spawnProjectile(
|
|
551
551
|
nil,
|
|
552
|
-
|
|
552
|
+
projectileVariant,
|
|
553
553
|
subType,
|
|
554
554
|
position,
|
|
555
555
|
velocity,
|
|
@@ -557,7 +557,7 @@ function ____exports.spawnProjectileWithSeed(self, variant, subType, position, s
|
|
|
557
557
|
seed
|
|
558
558
|
)
|
|
559
559
|
end
|
|
560
|
-
function ____exports.spawnSlot(self,
|
|
560
|
+
function ____exports.spawnSlot(self, slotVariant, subType, position, velocity, spawner, seed)
|
|
561
561
|
if velocity == nil then
|
|
562
562
|
velocity = VectorZero
|
|
563
563
|
end
|
|
@@ -570,7 +570,7 @@ function ____exports.spawnSlot(self, variant, subType, position, velocity, spawn
|
|
|
570
570
|
return spawn(
|
|
571
571
|
nil,
|
|
572
572
|
EntityType.ENTITY_SLOT,
|
|
573
|
-
|
|
573
|
+
slotVariant,
|
|
574
574
|
subType,
|
|
575
575
|
position,
|
|
576
576
|
velocity,
|
|
@@ -578,7 +578,7 @@ function ____exports.spawnSlot(self, variant, subType, position, velocity, spawn
|
|
|
578
578
|
seed
|
|
579
579
|
)
|
|
580
580
|
end
|
|
581
|
-
function ____exports.spawnSlotWithSeed(self,
|
|
581
|
+
function ____exports.spawnSlotWithSeed(self, slotVariant, subType, position, seed, velocity, spawner)
|
|
582
582
|
if velocity == nil then
|
|
583
583
|
velocity = VectorZero
|
|
584
584
|
end
|
|
@@ -587,7 +587,7 @@ function ____exports.spawnSlotWithSeed(self, variant, subType, position, seed, v
|
|
|
587
587
|
end
|
|
588
588
|
return ____exports.spawnSlot(
|
|
589
589
|
nil,
|
|
590
|
-
|
|
590
|
+
slotVariant,
|
|
591
591
|
subType,
|
|
592
592
|
position,
|
|
593
593
|
velocity,
|
|
@@ -595,7 +595,7 @@ function ____exports.spawnSlotWithSeed(self, variant, subType, position, seed, v
|
|
|
595
595
|
seed
|
|
596
596
|
)
|
|
597
597
|
end
|
|
598
|
-
function ____exports.spawnTear(self,
|
|
598
|
+
function ____exports.spawnTear(self, tearVariant, subType, position, velocity, spawner, seed)
|
|
599
599
|
if velocity == nil then
|
|
600
600
|
velocity = VectorZero
|
|
601
601
|
end
|
|
@@ -608,7 +608,7 @@ function ____exports.spawnTear(self, variant, subType, position, velocity, spawn
|
|
|
608
608
|
local entity = spawn(
|
|
609
609
|
nil,
|
|
610
610
|
EntityType.ENTITY_TEAR,
|
|
611
|
-
|
|
611
|
+
tearVariant,
|
|
612
612
|
subType,
|
|
613
613
|
position,
|
|
614
614
|
velocity,
|
|
@@ -621,7 +621,7 @@ function ____exports.spawnTear(self, variant, subType, position, velocity, spawn
|
|
|
621
621
|
end
|
|
622
622
|
return tear
|
|
623
623
|
end
|
|
624
|
-
function ____exports.spawnTearWithSeed(self,
|
|
624
|
+
function ____exports.spawnTearWithSeed(self, tearVariant, subType, position, seed, velocity, spawner)
|
|
625
625
|
if velocity == nil then
|
|
626
626
|
velocity = VectorZero
|
|
627
627
|
end
|
|
@@ -630,7 +630,7 @@ function ____exports.spawnTearWithSeed(self, variant, subType, position, seed, v
|
|
|
630
630
|
end
|
|
631
631
|
return ____exports.spawnTear(
|
|
632
632
|
nil,
|
|
633
|
-
|
|
633
|
+
tearVariant,
|
|
634
634
|
subType,
|
|
635
635
|
position,
|
|
636
636
|
velocity,
|
package/dist/functions/log.lua
CHANGED
|
@@ -171,11 +171,11 @@ function ____exports.logEntities(includeBackgroundEffects, entityTypeFilter)
|
|
|
171
171
|
end
|
|
172
172
|
local effect = entity:ToEffect()
|
|
173
173
|
if effect ~= nil then
|
|
174
|
-
debugString = debugString .. ("
|
|
174
|
+
debugString = debugString .. (" (effect) (State: " .. tostring(effect.State)) .. ")"
|
|
175
175
|
end
|
|
176
176
|
local familiar = entity:ToFamiliar()
|
|
177
177
|
if familiar ~= nil then
|
|
178
|
-
debugString = debugString .. ("
|
|
178
|
+
debugString = debugString .. (" (familiar) (State: " .. tostring(familiar.State)) .. ")"
|
|
179
179
|
end
|
|
180
180
|
local knife = entity:ToKnife()
|
|
181
181
|
if knife ~= nil then
|
|
@@ -187,11 +187,11 @@ function ____exports.logEntities(includeBackgroundEffects, entityTypeFilter)
|
|
|
187
187
|
end
|
|
188
188
|
local npc = entity:ToNPC()
|
|
189
189
|
if npc ~= nil then
|
|
190
|
-
debugString = debugString .. ((("
|
|
190
|
+
debugString = debugString .. (((" (NPC) (State: " .. tostring(npc.State)) .. ") (CanShutDoors: ") .. tostring(npc.CanShutDoors)) .. ")"
|
|
191
191
|
end
|
|
192
192
|
local pickup = entity:ToPickup()
|
|
193
193
|
if pickup ~= nil then
|
|
194
|
-
debugString = debugString .. ("
|
|
194
|
+
debugString = debugString .. (" (pickup) (State: " .. tostring(pickup.State)) .. ")"
|
|
195
195
|
end
|
|
196
196
|
local player = entity:ToPlayer()
|
|
197
197
|
if player ~= nil then
|
|
@@ -205,6 +205,7 @@ function ____exports.logEntities(includeBackgroundEffects, entityTypeFilter)
|
|
|
205
205
|
if tear ~= nil then
|
|
206
206
|
debugString = debugString .. " (tear)"
|
|
207
207
|
end
|
|
208
|
+
debugString = debugString .. (" (Index: " .. tostring(entity.Index)) .. ")"
|
|
208
209
|
debugString = debugString .. (" (InitSeed: " .. tostring(entity.InitSeed)) .. ")"
|
|
209
210
|
debugString = debugString .. (" (DropSeed: " .. tostring(entity.DropSeed)) .. ")"
|
|
210
211
|
debugString = debugString .. (((" (Position: " .. tostring(entity.Position.X)) .. ", ") .. tostring(entity.Position.Y)) .. ")"
|