factorio-types 0.0.24 → 0.0.27
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/classes.d.ts +1446 -615
- package/dist/concepts.d.ts +1943 -2818
- package/dist/defines.d.ts +30 -2
- package/dist/events.d.ts +25 -4
- package/dist/global.d.ts +33 -3
- package/package.json +2 -2
package/dist/classes.d.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// Factorio API reference https://lua-api.factorio.com/latest/index.html
|
|
3
3
|
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version 1.1.
|
|
6
|
-
// API version
|
|
5
|
+
// Factorio version 1.1.67
|
|
6
|
+
// API version 3
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Collection of settings for overriding default ai behavior.
|
|
@@ -256,7 +256,7 @@ interface LuaBootstrap {
|
|
|
256
256
|
* @param f - The handler for this event. Passing `nil` will unregister it.
|
|
257
257
|
*/
|
|
258
258
|
on_configuration_changed(this: void,
|
|
259
|
-
f: (this: void, arg0: ConfigurationChangedData) => any): void
|
|
259
|
+
f: (this: void, arg0: ConfigurationChangedData) => any | null): void
|
|
260
260
|
|
|
261
261
|
/**
|
|
262
262
|
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
@@ -281,8 +281,8 @@ interface LuaBootstrap {
|
|
|
281
281
|
*/
|
|
282
282
|
on_event<T extends event>(this: void,
|
|
283
283
|
event: defines.events | defines.events[] | string,
|
|
284
|
-
f: (this: void, arg0: T) => any,
|
|
285
|
-
filters?: EventFilter
|
|
284
|
+
f: (this: void, arg0: T) => any | null,
|
|
285
|
+
filters?: EventFilter): void
|
|
286
286
|
|
|
287
287
|
/**
|
|
288
288
|
* Register a function to be run on mod initialization. This is only called when a new save game is created or when a save file is loaded that previously didn't contain the mod. During it, the mod gets the chance to set up initial values that it will use for its lifetime. It has full access to {@link LuaGameScript | LuaGameScript} and the {@link global | global} table and can change anything about them that it deems appropriate. No other events will be raised for the mod until it has finished this step.
|
|
@@ -300,7 +300,7 @@ interface LuaBootstrap {
|
|
|
300
300
|
*
|
|
301
301
|
*/
|
|
302
302
|
on_init(this: void,
|
|
303
|
-
f: (this: void) => any): void
|
|
303
|
+
f: (this: void) => any | null): void
|
|
304
304
|
|
|
305
305
|
/**
|
|
306
306
|
* Register a function to be run on save load. This is only called for mods that have been part of the save previously, or for players connecting to a running multiplayer session. It gives the mod the opportunity to do some very specific actions, should it need to. Doing anything other than these three will lead to desyncs, which breaks multiplayer and replay functionality. Access to {@link LuaGameScript | LuaGameScript} is not available. The {@link global | global} table can be accessed and is safe to read from, but not write to, as doing so will lead to an error.
|
|
@@ -317,7 +317,7 @@ interface LuaBootstrap {
|
|
|
317
317
|
* @param f - The handler for this event. Passing `nil` will unregister it.
|
|
318
318
|
*/
|
|
319
319
|
on_load(this: void,
|
|
320
|
-
f: (this: void) => any): void
|
|
320
|
+
f: (this: void) => any | null): void
|
|
321
321
|
|
|
322
322
|
/**
|
|
323
323
|
* Register a handler to run every nth-tick(s). When the game is on tick 0 it will trigger all registered handlers.
|
|
@@ -325,8 +325,8 @@ interface LuaBootstrap {
|
|
|
325
325
|
* @param tick - The nth-tick(s) to invoke the handler on. Passing `nil` as the only parameter will unregister all nth-tick handlers.
|
|
326
326
|
*/
|
|
327
327
|
on_nth_tick(this: void,
|
|
328
|
-
tick: number | number[],
|
|
329
|
-
f: (this: void, arg0: NthTickEventData) => any): void
|
|
328
|
+
tick: number | number[] | null,
|
|
329
|
+
f: (this: void, arg0: NthTickEventData) => any | null): void
|
|
330
330
|
|
|
331
331
|
/**
|
|
332
332
|
* @param table.entity - The entity that was built.
|
|
@@ -446,6 +446,18 @@ interface LuaBootstrap {
|
|
|
446
446
|
tiles: Tile[]
|
|
447
447
|
}): void
|
|
448
448
|
|
|
449
|
+
/**
|
|
450
|
+
* Register a metatable to have linkage recorded and restored when saving/loading. The metatable itself will not be saved. Instead, only the linkage to a registered metatable is saved, and the metatable registered under that name will be used when loading the table.
|
|
451
|
+
* @remarks
|
|
452
|
+
* `register_metatable()` can not be used in the console, in event listeners or during a `remote.call()`.
|
|
453
|
+
*
|
|
454
|
+
* @param metatable - The metatable to register.
|
|
455
|
+
* @param name - The name of this metatable. Names must be unique per mod.
|
|
456
|
+
*/
|
|
457
|
+
register_metatable(this: void,
|
|
458
|
+
name: string,
|
|
459
|
+
metatable: Table): void
|
|
460
|
+
|
|
449
461
|
/**
|
|
450
462
|
* Registers an entity so that after it's destroyed, {@link on_entity_destroyed | on_entity_destroyed} is called. Once an entity is registered, it stays registered until it is actually destroyed, even through save/load cycles. The registration is global across all mods, meaning once one mod registers an entity, all mods listening to {@link on_entity_destroyed | on_entity_destroyed} will receive the event when it is destroyed. Registering the same entity multiple times will still only fire the destruction event once, and will return the same registration number.
|
|
451
463
|
* @remarks
|
|
@@ -481,7 +493,7 @@ interface LuaBootstrap {
|
|
|
481
493
|
*/
|
|
482
494
|
set_event_filter(this: void,
|
|
483
495
|
event: number,
|
|
484
|
-
filters?: EventFilter
|
|
496
|
+
filters?: EventFilter): void
|
|
485
497
|
|
|
486
498
|
/**
|
|
487
499
|
* A dictionary listing the names of all currently active mods and mapping them to their version.
|
|
@@ -499,7 +511,33 @@ interface LuaBootstrap {
|
|
|
499
511
|
/**
|
|
500
512
|
* Information about the currently running scenario/campaign/tutorial.
|
|
501
513
|
*/
|
|
502
|
-
readonly level: {
|
|
514
|
+
readonly level: {
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* The campaign name if any.
|
|
518
|
+
*/
|
|
519
|
+
campaign_name?: string,
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* Is this level a simulation? (The main menu and 'Tips and tricks' use simulations)
|
|
523
|
+
*/
|
|
524
|
+
is_simulation?: boolean,
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* Is this level a tutorial?
|
|
528
|
+
*/
|
|
529
|
+
is_tutorial?: boolean,
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* The level name.
|
|
533
|
+
*/
|
|
534
|
+
level_name: string,
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* The mod name if any.
|
|
538
|
+
*/
|
|
539
|
+
mod_name?: string
|
|
540
|
+
}
|
|
503
541
|
|
|
504
542
|
/**
|
|
505
543
|
* The name of the mod from the environment this is used in.
|
|
@@ -528,7 +566,7 @@ interface LuaBurner {
|
|
|
528
566
|
readonly burnt_result_inventory: LuaInventory
|
|
529
567
|
|
|
530
568
|
/**
|
|
531
|
-
* The currently burning item
|
|
569
|
+
* The currently burning item.
|
|
532
570
|
* @remarks
|
|
533
571
|
* Writing to this automatically handles correcting {@link LuaBurner::remaining_burning_fuel | LuaBurner::remaining_burning_fuel}.
|
|
534
572
|
*
|
|
@@ -538,7 +576,7 @@ interface LuaBurner {
|
|
|
538
576
|
/**
|
|
539
577
|
* The fuel categories this burner uses.
|
|
540
578
|
* @remarks
|
|
541
|
-
* The value in the dictionary is meaningless and exists just to allow
|
|
579
|
+
* The value in the dictionary is meaningless and exists just to allow for easy lookup.
|
|
542
580
|
*
|
|
543
581
|
*/
|
|
544
582
|
readonly fuel_categories: {[key: string]: boolean}
|
|
@@ -600,7 +638,7 @@ interface LuaBurnerPrototype {
|
|
|
600
638
|
|
|
601
639
|
/**
|
|
602
640
|
* @remarks
|
|
603
|
-
* The value in the dictionary is meaningless and exists just to allow
|
|
641
|
+
* The value in the dictionary is meaningless and exists just to allow for easy lookup.
|
|
604
642
|
*
|
|
605
643
|
*/
|
|
606
644
|
readonly fuel_categories: {[key: string]: boolean}
|
|
@@ -608,9 +646,18 @@ interface LuaBurnerPrototype {
|
|
|
608
646
|
readonly fuel_inventory_size: number
|
|
609
647
|
|
|
610
648
|
/**
|
|
611
|
-
* The light flicker definition for this burner prototype
|
|
649
|
+
* The light flicker definition for this burner prototype.
|
|
612
650
|
*/
|
|
613
|
-
readonly light_flicker
|
|
651
|
+
readonly light_flicker?: {
|
|
652
|
+
border_fix_speed: number,
|
|
653
|
+
color: Color,
|
|
654
|
+
derivation_change_deviation: number,
|
|
655
|
+
derivation_change_frequency: number,
|
|
656
|
+
light_intensity_to_size_coefficient: number,
|
|
657
|
+
maximum_intensity: number,
|
|
658
|
+
minimum_intensity: number,
|
|
659
|
+
minimum_light_size: number
|
|
660
|
+
}
|
|
614
661
|
|
|
615
662
|
/**
|
|
616
663
|
* The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
|
@@ -622,9 +669,9 @@ interface LuaBurnerPrototype {
|
|
|
622
669
|
readonly render_no_power_icon: boolean
|
|
623
670
|
|
|
624
671
|
/**
|
|
625
|
-
* The smoke sources for this burner prototype
|
|
672
|
+
* The smoke sources for this burner prototype.
|
|
626
673
|
*/
|
|
627
|
-
readonly smoke
|
|
674
|
+
readonly smoke?: SmokeSource[]
|
|
628
675
|
|
|
629
676
|
/**
|
|
630
677
|
* Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
|
@@ -695,7 +742,7 @@ interface LuaCircuitNetwork {
|
|
|
695
742
|
readonly connected_circuit_count: number
|
|
696
743
|
|
|
697
744
|
/**
|
|
698
|
-
* The entity this circuit network reference is associated with
|
|
745
|
+
* The entity this circuit network reference is associated with.
|
|
699
746
|
*/
|
|
700
747
|
readonly entity: LuaEntity
|
|
701
748
|
|
|
@@ -710,9 +757,9 @@ interface LuaCircuitNetwork {
|
|
|
710
757
|
readonly object_name: string
|
|
711
758
|
|
|
712
759
|
/**
|
|
713
|
-
* The circuit network signals last tick. `nil` if there
|
|
760
|
+
* The circuit network signals last tick. `nil` if there were no signals last tick.
|
|
714
761
|
*/
|
|
715
|
-
readonly signals
|
|
762
|
+
readonly signals?: Signal[]
|
|
716
763
|
|
|
717
764
|
/**
|
|
718
765
|
* Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
|
@@ -828,10 +875,9 @@ interface LuaConstantCombinatorControlBehavior extends LuaControlBehavior {
|
|
|
828
875
|
readonly object_name: string
|
|
829
876
|
|
|
830
877
|
/**
|
|
831
|
-
* This constant combinator's parameters
|
|
832
|
-
*
|
|
878
|
+
* This constant combinator's parameters. `nil` if the {@link item_slot_count | LuaEntityPrototype::item_slot_count} of the combinator's prototype is `0`.
|
|
879
|
+
*
|
|
833
880
|
* Writing `nil` clears the combinator's parameters.
|
|
834
|
-
*
|
|
835
881
|
*/
|
|
836
882
|
parameters?: ConstantCombinatorParameters[]
|
|
837
883
|
|
|
@@ -1179,7 +1225,7 @@ interface LuaControl {
|
|
|
1179
1225
|
character_maximum_following_robot_count_bonus: number
|
|
1180
1226
|
|
|
1181
1227
|
/**
|
|
1182
|
-
*
|
|
1228
|
+
* The current mining progress between 0 and 1 of this character, or 0 if they aren't mining.
|
|
1183
1229
|
*/
|
|
1184
1230
|
readonly character_mining_progress: number
|
|
1185
1231
|
|
|
@@ -1210,7 +1256,7 @@ interface LuaControl {
|
|
|
1210
1256
|
character_resource_reach_distance_bonus: number
|
|
1211
1257
|
|
|
1212
1258
|
/**
|
|
1213
|
-
*
|
|
1259
|
+
* The current movement speed of this character, including effects from exoskeletons, tiles, stickers and shooting.
|
|
1214
1260
|
*/
|
|
1215
1261
|
readonly character_running_speed: number
|
|
1216
1262
|
|
|
@@ -1230,19 +1276,19 @@ interface LuaControl {
|
|
|
1230
1276
|
character_trash_slot_count_bonus: number
|
|
1231
1277
|
|
|
1232
1278
|
/**
|
|
1233
|
-
* When `true` hand crafting is free and instant
|
|
1279
|
+
* When `true` hand crafting is free and instant.
|
|
1234
1280
|
*/
|
|
1235
1281
|
cheat_mode: boolean
|
|
1236
1282
|
|
|
1237
1283
|
/**
|
|
1238
|
-
*
|
|
1284
|
+
* The current crafting queue items.
|
|
1239
1285
|
*/
|
|
1240
1286
|
readonly crafting_queue: CraftingQueueItem[]
|
|
1241
1287
|
|
|
1242
1288
|
/**
|
|
1243
|
-
* The crafting queue progress [0-1] 0 when no recipe is being crafted.
|
|
1289
|
+
* The crafting queue progress in the range `[0-1]`. `0` when no recipe is being crafted.
|
|
1244
1290
|
*/
|
|
1245
|
-
|
|
1291
|
+
crafting_queue_progress: number
|
|
1246
1292
|
|
|
1247
1293
|
/**
|
|
1248
1294
|
* Size of the crafting queue.
|
|
@@ -1250,17 +1296,17 @@ interface LuaControl {
|
|
|
1250
1296
|
readonly crafting_queue_size: number
|
|
1251
1297
|
|
|
1252
1298
|
/**
|
|
1253
|
-
* The ghost prototype in the player's cursor.
|
|
1299
|
+
* The ghost prototype in the player's cursor. When read, it will be a {@link LuaItemPrototype | LuaItemPrototype}.
|
|
1254
1300
|
* @remarks
|
|
1255
|
-
* When read, it will be a {@link LuaItemPrototype | LuaItemPrototype}.
|
|
1256
1301
|
* Items in the cursor stack will take priority over the cursor ghost.
|
|
1257
1302
|
*
|
|
1258
1303
|
*/
|
|
1259
|
-
cursor_ghost
|
|
1304
|
+
cursor_ghost?: ItemPrototypeIdentification
|
|
1260
1305
|
|
|
1261
1306
|
/**
|
|
1262
|
-
* The player's cursor stack
|
|
1307
|
+
* The player's cursor stack. `nil` if the player controller is a spectator.
|
|
1263
1308
|
* @example
|
|
1309
|
+
* Even though this property is marked as read-only, it returns a [LuaItemStack](LuaItemStack), meaning it can be manipulated like so:
|
|
1264
1310
|
* ```
|
|
1265
1311
|
* player.cursor_stack.clear()
|
|
1266
1312
|
* ```
|
|
@@ -1279,7 +1325,7 @@ interface LuaControl {
|
|
|
1279
1325
|
readonly drop_item_distance: number
|
|
1280
1326
|
|
|
1281
1327
|
/**
|
|
1282
|
-
* The current combat robots following the character
|
|
1328
|
+
* The current combat robots following the character.
|
|
1283
1329
|
* @remarks
|
|
1284
1330
|
* When called on a {@link LuaPlayer | LuaPlayer}, it must be associated with a character(see {@link LuaPlayer::character | LuaPlayer::character}).
|
|
1285
1331
|
*
|
|
@@ -1292,7 +1338,7 @@ interface LuaControl {
|
|
|
1292
1338
|
force: ForceIdentification
|
|
1293
1339
|
|
|
1294
1340
|
/**
|
|
1295
|
-
*
|
|
1341
|
+
* Whether this character entity is in combat.
|
|
1296
1342
|
*/
|
|
1297
1343
|
readonly in_combat: boolean
|
|
1298
1344
|
|
|
@@ -1312,21 +1358,29 @@ interface LuaControl {
|
|
|
1312
1358
|
* When the player isn't mining tiles the player will mine what ever entity is currently selected. See {@link LuaControl::selected | LuaControl::selected} and {@link LuaControl::update_selected_entity | LuaControl::update_selected_entity}.
|
|
1313
1359
|
*
|
|
1314
1360
|
*/
|
|
1315
|
-
mining_state: {
|
|
1361
|
+
mining_state: {
|
|
1362
|
+
|
|
1363
|
+
/**
|
|
1364
|
+
* Whether the player is mining at all
|
|
1365
|
+
*/
|
|
1366
|
+
mining: boolean,
|
|
1367
|
+
|
|
1368
|
+
/**
|
|
1369
|
+
* What tiles the player is mining; only used when the player is mining tiles (holding a tile in the cursor).
|
|
1370
|
+
*/
|
|
1371
|
+
position?: MapPosition
|
|
1372
|
+
}
|
|
1316
1373
|
|
|
1317
1374
|
/**
|
|
1318
|
-
* The GUI the player currently has open
|
|
1375
|
+
* The GUI the player currently has open.
|
|
1319
1376
|
*
|
|
1320
1377
|
* This is the GUI that will asked to close (by firing the {@link on_gui_closed | on_gui_closed} event) when the `Esc` or `E` keys are pressed. If this attribute is not `nil`, and a new GUI is written to it, the existing one will be asked to close.
|
|
1321
1378
|
* @remarks
|
|
1322
|
-
* Write supports any of the types. Read will return the `entity`, `equipment`, `equipment-grid`, `player`, `element` or `nil`.
|
|
1379
|
+
* Write supports any of the types. Read will return the `entity`, `equipment`, `equipment-grid`, `player`, `element`, `inventory` or `nil`.
|
|
1323
1380
|
*
|
|
1324
1381
|
*/
|
|
1325
|
-
opened?: LuaEntity | LuaItemStack | LuaEquipment | LuaEquipmentGrid | LuaPlayer | LuaGuiElement | defines.gui_type
|
|
1382
|
+
opened?: LuaEntity | LuaItemStack | LuaEquipment | LuaEquipmentGrid | LuaPlayer | LuaGuiElement | LuaInventory | defines.gui_type
|
|
1326
1383
|
|
|
1327
|
-
/**
|
|
1328
|
-
* Returns the {@link defines.gui_type | defines.gui_type} or `nil`.
|
|
1329
|
-
*/
|
|
1330
1384
|
readonly opened_gui_type?: defines.gui_type
|
|
1331
1385
|
|
|
1332
1386
|
/**
|
|
@@ -1335,7 +1389,7 @@ interface LuaControl {
|
|
|
1335
1389
|
picking_state: boolean
|
|
1336
1390
|
|
|
1337
1391
|
/**
|
|
1338
|
-
*
|
|
1392
|
+
* The current position of the entity.
|
|
1339
1393
|
*/
|
|
1340
1394
|
readonly position: MapPosition
|
|
1341
1395
|
|
|
@@ -1347,7 +1401,18 @@ interface LuaControl {
|
|
|
1347
1401
|
/**
|
|
1348
1402
|
* Current repair state.
|
|
1349
1403
|
*/
|
|
1350
|
-
repair_state: {
|
|
1404
|
+
repair_state: {
|
|
1405
|
+
|
|
1406
|
+
/**
|
|
1407
|
+
* The position being repaired
|
|
1408
|
+
*/
|
|
1409
|
+
position: MapPosition,
|
|
1410
|
+
|
|
1411
|
+
/**
|
|
1412
|
+
* The current state
|
|
1413
|
+
*/
|
|
1414
|
+
repairing: boolean
|
|
1415
|
+
}
|
|
1351
1416
|
|
|
1352
1417
|
/**
|
|
1353
1418
|
* The resource reach distance of this character or max double when not a character or player connected to a character.
|
|
@@ -1360,14 +1425,25 @@ interface LuaControl {
|
|
|
1360
1425
|
riding_state: RidingState
|
|
1361
1426
|
|
|
1362
1427
|
/**
|
|
1363
|
-
* The currently selected entity
|
|
1428
|
+
* The currently selected entity. Assigning an entity will select it if is selectable, otherwise the selection is cleared.
|
|
1364
1429
|
*/
|
|
1365
|
-
selected
|
|
1430
|
+
selected?: LuaEntity
|
|
1366
1431
|
|
|
1367
1432
|
/**
|
|
1368
1433
|
* Current shooting state.
|
|
1369
1434
|
*/
|
|
1370
|
-
shooting_state: {
|
|
1435
|
+
shooting_state: {
|
|
1436
|
+
|
|
1437
|
+
/**
|
|
1438
|
+
* The position being shot at
|
|
1439
|
+
*/
|
|
1440
|
+
position: MapPosition,
|
|
1441
|
+
|
|
1442
|
+
/**
|
|
1443
|
+
* The current state
|
|
1444
|
+
*/
|
|
1445
|
+
state: defines.shooting
|
|
1446
|
+
}
|
|
1371
1447
|
|
|
1372
1448
|
/**
|
|
1373
1449
|
* The surface this entity is currently on.
|
|
@@ -1375,9 +1451,9 @@ interface LuaControl {
|
|
|
1375
1451
|
readonly surface: LuaSurface
|
|
1376
1452
|
|
|
1377
1453
|
/**
|
|
1378
|
-
* The vehicle the player is currently sitting in
|
|
1454
|
+
* The vehicle the player is currently sitting in.
|
|
1379
1455
|
*/
|
|
1380
|
-
readonly vehicle
|
|
1456
|
+
readonly vehicle?: LuaEntity
|
|
1381
1457
|
|
|
1382
1458
|
/**
|
|
1383
1459
|
* If personal logistic requests are enabled for this vehicle (spidertron).
|
|
@@ -1393,7 +1469,18 @@ interface LuaControl {
|
|
|
1393
1469
|
* ```
|
|
1394
1470
|
*
|
|
1395
1471
|
*/
|
|
1396
|
-
walking_state: {
|
|
1472
|
+
walking_state: {
|
|
1473
|
+
|
|
1474
|
+
/**
|
|
1475
|
+
* Direction where the player is walking
|
|
1476
|
+
*/
|
|
1477
|
+
direction: defines.direction,
|
|
1478
|
+
|
|
1479
|
+
/**
|
|
1480
|
+
* If `false`, the player is currently not walking; otherwise it's going somewhere
|
|
1481
|
+
*/
|
|
1482
|
+
walking: boolean
|
|
1483
|
+
}
|
|
1397
1484
|
|
|
1398
1485
|
}
|
|
1399
1486
|
|
|
@@ -1451,7 +1538,7 @@ interface LuaCustomChartTag {
|
|
|
1451
1538
|
/**
|
|
1452
1539
|
* The player who last edited this tag.
|
|
1453
1540
|
*/
|
|
1454
|
-
last_user
|
|
1541
|
+
last_user?: LuaPlayer
|
|
1455
1542
|
|
|
1456
1543
|
/**
|
|
1457
1544
|
* The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
|
@@ -1497,9 +1584,9 @@ interface LuaCustomInputPrototype {
|
|
|
1497
1584
|
readonly action: string
|
|
1498
1585
|
|
|
1499
1586
|
/**
|
|
1500
|
-
* The default alternative key sequence for this custom input
|
|
1587
|
+
* The default alternative key sequence for this custom input, if any
|
|
1501
1588
|
*/
|
|
1502
|
-
readonly alternative_key_sequence
|
|
1589
|
+
readonly alternative_key_sequence?: string
|
|
1503
1590
|
|
|
1504
1591
|
/**
|
|
1505
1592
|
* The consuming type: `"none"` or `"game-only"`.
|
|
@@ -1527,7 +1614,7 @@ interface LuaCustomInputPrototype {
|
|
|
1527
1614
|
readonly include_selected_prototype: boolean
|
|
1528
1615
|
|
|
1529
1616
|
/**
|
|
1530
|
-
* The item that gets spawned when this custom input is fired
|
|
1617
|
+
* The item that gets spawned when this custom input is fired, if any.
|
|
1531
1618
|
*/
|
|
1532
1619
|
readonly item_to_spawn?: LuaItemPrototype
|
|
1533
1620
|
|
|
@@ -1537,7 +1624,7 @@ interface LuaCustomInputPrototype {
|
|
|
1537
1624
|
readonly key_sequence: string
|
|
1538
1625
|
|
|
1539
1626
|
/**
|
|
1540
|
-
* The linked game control name
|
|
1627
|
+
* The linked game control name, if any.
|
|
1541
1628
|
*/
|
|
1542
1629
|
readonly linked_game_control?: string
|
|
1543
1630
|
|
|
@@ -1706,9 +1793,9 @@ interface LuaDecorativePrototype {
|
|
|
1706
1793
|
help(this: void): void
|
|
1707
1794
|
|
|
1708
1795
|
/**
|
|
1709
|
-
* Autoplace specification for this decorative prototype
|
|
1796
|
+
* Autoplace specification for this decorative prototype, if any.
|
|
1710
1797
|
*/
|
|
1711
|
-
readonly autoplace_specification
|
|
1798
|
+
readonly autoplace_specification?: AutoplaceSpecification
|
|
1712
1799
|
|
|
1713
1800
|
/**
|
|
1714
1801
|
* The bounding box used for collision checking.
|
|
@@ -2040,6 +2127,14 @@ interface LuaEntity extends LuaControl {
|
|
|
2040
2127
|
*/
|
|
2041
2128
|
get_burnt_result_inventory(this: void): void
|
|
2042
2129
|
|
|
2130
|
+
/**
|
|
2131
|
+
* Returns all child signals. Child signals can be either RailSignal or RailChainSignal. Child signals are signals which are checked by this signal to determine a chain state.
|
|
2132
|
+
* @remarks
|
|
2133
|
+
* Applies to subclasses: RailChainSignal
|
|
2134
|
+
*
|
|
2135
|
+
*/
|
|
2136
|
+
get_child_signals(this: void): void
|
|
2137
|
+
|
|
2043
2138
|
/**
|
|
2044
2139
|
* @param circuit_connector - The connector to get circuit network for. Must be specified for entities with more than one circuit network connector.
|
|
2045
2140
|
* @param wire - Wire color of the network connected to this entity.
|
|
@@ -2137,6 +2232,14 @@ interface LuaEntity extends LuaControl {
|
|
|
2137
2232
|
*/
|
|
2138
2233
|
get_heat_setting(this: void): void
|
|
2139
2234
|
|
|
2235
|
+
/**
|
|
2236
|
+
* Returns all signals guarding entrance to a rail block this rail belongs to.
|
|
2237
|
+
* @remarks
|
|
2238
|
+
* Applies to subclasses: Rail
|
|
2239
|
+
*
|
|
2240
|
+
*/
|
|
2241
|
+
get_inbound_signals(this: void): void
|
|
2242
|
+
|
|
2140
2243
|
/**
|
|
2141
2244
|
* Gets the filter for this infinity container at the given index or `nil` if the filter index doesn't exist or is empty.
|
|
2142
2245
|
* @remarks
|
|
@@ -2207,11 +2310,27 @@ interface LuaEntity extends LuaControl {
|
|
|
2207
2310
|
*/
|
|
2208
2311
|
get_or_create_control_behavior(this: void): void
|
|
2209
2312
|
|
|
2313
|
+
/**
|
|
2314
|
+
* Returns all signals guarding exit from a rail block this rail belongs to.
|
|
2315
|
+
* @remarks
|
|
2316
|
+
* Applies to subclasses: Rail
|
|
2317
|
+
*
|
|
2318
|
+
*/
|
|
2319
|
+
get_outbound_signals(this: void): void
|
|
2320
|
+
|
|
2210
2321
|
/**
|
|
2211
2322
|
* Gets the entity's output inventory if it has one.
|
|
2212
2323
|
*/
|
|
2213
2324
|
get_output_inventory(this: void): void
|
|
2214
2325
|
|
|
2326
|
+
/**
|
|
2327
|
+
* Returns all parent signals. Parent signals are always RailChainSignal. Parent signals are those signals that are checking state of this signal to determine their own chain state.
|
|
2328
|
+
* @remarks
|
|
2329
|
+
* Applies to subclasses: RailSignal,RailChainSignal
|
|
2330
|
+
*
|
|
2331
|
+
*/
|
|
2332
|
+
get_parent_signals(this: void): void
|
|
2333
|
+
|
|
2215
2334
|
/**
|
|
2216
2335
|
* Gets the passenger of this car or spidertron if any.
|
|
2217
2336
|
* @remarks
|
|
@@ -2267,6 +2386,17 @@ interface LuaEntity extends LuaControl {
|
|
|
2267
2386
|
*/
|
|
2268
2387
|
get_rail_segment_overlaps(this: void): void
|
|
2269
2388
|
|
|
2389
|
+
/**
|
|
2390
|
+
* Get all rails of a rail segment this rail is in
|
|
2391
|
+
* @remarks
|
|
2392
|
+
* A rail segment is a continuous section of rail with no branches, signals, nor train stops.
|
|
2393
|
+
* Applies to subclasses: Rail
|
|
2394
|
+
*
|
|
2395
|
+
* @param direction - Selects end of this rail that points to a rail segment end from which to start returning rails
|
|
2396
|
+
*/
|
|
2397
|
+
get_rail_segment_rails(this: void,
|
|
2398
|
+
direction: defines.rail_direction): void
|
|
2399
|
+
|
|
2270
2400
|
/**
|
|
2271
2401
|
* Current recipe being assembled by this machine or `nil` if no recipe is set.
|
|
2272
2402
|
* @remarks
|
|
@@ -2294,7 +2424,7 @@ interface LuaEntity extends LuaControl {
|
|
|
2294
2424
|
get_spider_legs(this: void): void
|
|
2295
2425
|
|
|
2296
2426
|
/**
|
|
2297
|
-
* The train currently stopped at this train stop
|
|
2427
|
+
* The train currently stopped at this train stop, if any.
|
|
2298
2428
|
* @remarks
|
|
2299
2429
|
* Applies to subclasses: TrainStop
|
|
2300
2430
|
*
|
|
@@ -2410,6 +2540,24 @@ interface LuaEntity extends LuaControl {
|
|
|
2410
2540
|
*/
|
|
2411
2541
|
is_opening(this: void): void
|
|
2412
2542
|
|
|
2543
|
+
/**
|
|
2544
|
+
* Checks if this rail and other rail both belong to the same rail block.
|
|
2545
|
+
* @remarks
|
|
2546
|
+
* Applies to subclasses: Rail
|
|
2547
|
+
*
|
|
2548
|
+
*/
|
|
2549
|
+
is_rail_in_same_rail_block_as(this: void,
|
|
2550
|
+
other_rail: LuaEntity): void
|
|
2551
|
+
|
|
2552
|
+
/**
|
|
2553
|
+
* Checks if this rail and other rail both belong to the same rail segment.
|
|
2554
|
+
* @remarks
|
|
2555
|
+
* Applies to subclasses: Rail
|
|
2556
|
+
*
|
|
2557
|
+
*/
|
|
2558
|
+
is_rail_in_same_rail_segment_as(this: void,
|
|
2559
|
+
other_rail: LuaEntity): void
|
|
2560
|
+
|
|
2413
2561
|
/**
|
|
2414
2562
|
* Is this entity or tile ghost or item request proxy registered for construction? If false, it means a construction robot has been dispatched to build the entity, or it is not an entity that can be constructed.
|
|
2415
2563
|
*/
|
|
@@ -2719,6 +2867,14 @@ interface LuaEntity extends LuaControl {
|
|
|
2719
2867
|
*/
|
|
2720
2868
|
start_fading_out(this: void): void
|
|
2721
2869
|
|
|
2870
|
+
/**
|
|
2871
|
+
* Stops the given SpiderVehicle.
|
|
2872
|
+
* @remarks
|
|
2873
|
+
* Applies to subclasses: SpiderVehicle
|
|
2874
|
+
*
|
|
2875
|
+
*/
|
|
2876
|
+
stop_spider(this: void): void
|
|
2877
|
+
|
|
2722
2878
|
/**
|
|
2723
2879
|
* Whether this entity supports a backer name.
|
|
2724
2880
|
*/
|
|
@@ -2789,7 +2945,7 @@ interface LuaEntity extends LuaControl {
|
|
|
2789
2945
|
amount: number
|
|
2790
2946
|
|
|
2791
2947
|
/**
|
|
2792
|
-
*
|
|
2948
|
+
* Whether this land mine is armed.
|
|
2793
2949
|
* @remarks
|
|
2794
2950
|
* Applies to subclasses: LandMine
|
|
2795
2951
|
*
|
|
@@ -2797,7 +2953,7 @@ interface LuaEntity extends LuaControl {
|
|
|
2797
2953
|
readonly armed: boolean
|
|
2798
2954
|
|
|
2799
2955
|
/**
|
|
2800
|
-
* The player this character is associated with,
|
|
2956
|
+
* The player this character is associated with, if any. Set to `nil` to clear.
|
|
2801
2957
|
*
|
|
2802
2958
|
* The player will be automatically disassociated when a controller is set on the character. Also, all characters associated to a player will be logged off when the player logs off in multiplayer.
|
|
2803
2959
|
*
|
|
@@ -2818,7 +2974,7 @@ interface LuaEntity extends LuaControl {
|
|
|
2818
2974
|
auto_launch: boolean
|
|
2819
2975
|
|
|
2820
2976
|
/**
|
|
2821
|
-
* Destination
|
|
2977
|
+
* Destination of this spidertron's autopilot, if any.
|
|
2822
2978
|
* @remarks
|
|
2823
2979
|
* Applies to subclasses: SpiderVehicle
|
|
2824
2980
|
*
|
|
@@ -2834,7 +2990,7 @@ interface LuaEntity extends LuaControl {
|
|
|
2834
2990
|
readonly autopilot_destinations: MapPosition[]
|
|
2835
2991
|
|
|
2836
2992
|
/**
|
|
2837
|
-
* The backer name assigned to this entity
|
|
2993
|
+
* The backer name assigned to this entity. Entities that support backer names are labs, locomotives, radars, roboports, and train stops. `nil` if this entity doesn't support backer names.
|
|
2838
2994
|
* @remarks
|
|
2839
2995
|
* While train stops get the name of a backer when placed down, players can rename them if they want to. In this case, `backer_name` returns the player-given name of the entity.
|
|
2840
2996
|
*
|
|
@@ -2858,7 +3014,7 @@ interface LuaEntity extends LuaControl {
|
|
|
2858
3014
|
readonly belt_to_ground_type: string
|
|
2859
3015
|
|
|
2860
3016
|
/**
|
|
2861
|
-
* The bonus mining progress for this mining drill
|
|
3017
|
+
* The bonus mining progress for this mining drill. Read yields a number in range [0, mining_target.prototype.mineable_properties.mining_time]. `nil` if this isn't a mining drill.
|
|
2862
3018
|
*/
|
|
2863
3019
|
bonus_mining_progress?: number
|
|
2864
3020
|
|
|
@@ -2876,7 +3032,7 @@ interface LuaEntity extends LuaControl {
|
|
|
2876
3032
|
readonly bounding_box: BoundingBox
|
|
2877
3033
|
|
|
2878
3034
|
/**
|
|
2879
|
-
* The burner energy source for this entity
|
|
3035
|
+
* The burner energy source for this entity, if any.
|
|
2880
3036
|
*/
|
|
2881
3037
|
readonly burner?: LuaBurner
|
|
2882
3038
|
|
|
@@ -2889,7 +3045,7 @@ interface LuaEntity extends LuaControl {
|
|
|
2889
3045
|
readonly chain_signal_state: defines.chain_signal_state
|
|
2890
3046
|
|
|
2891
3047
|
/**
|
|
2892
|
-
* The reason this character corpse character died
|
|
3048
|
+
* The reason this character corpse character died. `""` if there is no reason.
|
|
2893
3049
|
* @remarks
|
|
2894
3050
|
* Applies to subclasses: CharacterCorpse
|
|
2895
3051
|
*
|
|
@@ -2914,14 +3070,25 @@ interface LuaEntity extends LuaControl {
|
|
|
2914
3070
|
character_corpse_tick_of_death: number
|
|
2915
3071
|
|
|
2916
3072
|
/**
|
|
2917
|
-
* Entities that are directly connected to this entity via the circuit network.
|
|
3073
|
+
* Entities that are directly connected to this entity via the circuit network. `nil` if this entity can't be connected to the circuit network.
|
|
2918
3074
|
*/
|
|
2919
|
-
readonly circuit_connected_entities
|
|
3075
|
+
readonly circuit_connected_entities?: {
|
|
3076
|
+
|
|
3077
|
+
/**
|
|
3078
|
+
* Entities connected via the green wire.
|
|
3079
|
+
*/
|
|
3080
|
+
green: LuaEntity[],
|
|
3081
|
+
|
|
3082
|
+
/**
|
|
3083
|
+
* Entities connected via the red wire.
|
|
3084
|
+
*/
|
|
3085
|
+
red: LuaEntity[]
|
|
3086
|
+
}
|
|
2920
3087
|
|
|
2921
3088
|
/**
|
|
2922
|
-
* The connection definition for entities that are directly connected to this entity via the circuit network.
|
|
3089
|
+
* The connection definition for entities that are directly connected to this entity via the circuit network. `nil` if this entity can't be connected to the circuit network.
|
|
2923
3090
|
*/
|
|
2924
|
-
readonly circuit_connection_definitions
|
|
3091
|
+
readonly circuit_connection_definitions?: CircuitConnectionDefinition[]
|
|
2925
3092
|
|
|
2926
3093
|
/**
|
|
2927
3094
|
* The orientation of this cliff.
|
|
@@ -2929,7 +3096,7 @@ interface LuaEntity extends LuaControl {
|
|
|
2929
3096
|
readonly cliff_orientation: CliffOrientation
|
|
2930
3097
|
|
|
2931
3098
|
/**
|
|
2932
|
-
* The character, rolling stock, train stop, car, spider-vehicle, flying text, corpse or simple-entity-with-owner
|
|
3099
|
+
* The color of this character, rolling stock, train stop, car, spider-vehicle, flying text, corpse or simple-entity-with-owner. `nil` if this entity doesn't use custom colors.
|
|
2933
3100
|
* @remarks
|
|
2934
3101
|
* Car color is overridden by the color of the current driver/passenger, if there is one.
|
|
2935
3102
|
*
|
|
@@ -2937,12 +3104,12 @@ interface LuaEntity extends LuaControl {
|
|
|
2937
3104
|
color?: Color
|
|
2938
3105
|
|
|
2939
3106
|
/**
|
|
2940
|
-
* The owner of this combat robot if any.
|
|
3107
|
+
* The owner of this combat robot, if any.
|
|
2941
3108
|
*/
|
|
2942
|
-
combat_robot_owner
|
|
3109
|
+
combat_robot_owner?: LuaEntity
|
|
2943
3110
|
|
|
2944
3111
|
/**
|
|
2945
|
-
* The command given to this unit
|
|
3112
|
+
* The command given to this unit, if any.
|
|
2946
3113
|
* @remarks
|
|
2947
3114
|
* Applies to subclasses: Unit
|
|
2948
3115
|
*
|
|
@@ -2950,7 +3117,7 @@ interface LuaEntity extends LuaControl {
|
|
|
2950
3117
|
readonly command?: Command
|
|
2951
3118
|
|
|
2952
3119
|
/**
|
|
2953
|
-
* The rail entity this train stop is connected to
|
|
3120
|
+
* The rail entity this train stop is connected to, if any.
|
|
2954
3121
|
* @remarks
|
|
2955
3122
|
* Applies to subclasses: TrainStop
|
|
2956
3123
|
*
|
|
@@ -3032,7 +3199,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3032
3199
|
direction: defines.direction
|
|
3033
3200
|
|
|
3034
3201
|
/**
|
|
3035
|
-
* The distraction command given to this unit
|
|
3202
|
+
* The distraction command given to this unit, if any.
|
|
3036
3203
|
* @remarks
|
|
3037
3204
|
* Applies to subclasses: Unit
|
|
3038
3205
|
*
|
|
@@ -3040,9 +3207,9 @@ interface LuaEntity extends LuaControl {
|
|
|
3040
3207
|
readonly distraction_command?: Command
|
|
3041
3208
|
|
|
3042
3209
|
/**
|
|
3043
|
-
* Whether the driver of this car or spidertron is the gunner
|
|
3210
|
+
* Whether the driver of this car or spidertron is the gunner. If `false`, the passenger is the gunner. `nil` if this is neither a car or a spidertron.
|
|
3044
3211
|
*/
|
|
3045
|
-
driver_is_gunner
|
|
3212
|
+
driver_is_gunner?: boolean
|
|
3046
3213
|
|
|
3047
3214
|
/**
|
|
3048
3215
|
* Position where the entity puts its stuff.
|
|
@@ -3053,23 +3220,20 @@ interface LuaEntity extends LuaControl {
|
|
|
3053
3220
|
drop_position: MapPosition
|
|
3054
3221
|
|
|
3055
3222
|
/**
|
|
3056
|
-
* The entity this entity is putting its items to
|
|
3057
|
-
* @remarks
|
|
3058
|
-
* Meaningful only for entities that put items somewhere, such as mining drills or inserters. Returns `nil` for any other entity.
|
|
3059
|
-
*
|
|
3223
|
+
* The entity this entity is putting its items to. If there are multiple possible entities at the drop-off point, writing to this attribute allows a mod to choose which one to drop off items to. The entity needs to collide with the tile box under the drop-off position. `nil` if there is no entity to put items to, or if this is not an entity that puts items somewhere.
|
|
3060
3224
|
*/
|
|
3061
3225
|
drop_target?: LuaEntity
|
|
3062
3226
|
|
|
3063
3227
|
/**
|
|
3064
|
-
* The current speed of this unit in tiles per tick, taking into account any walking speed modifier given by the tile the unit is standing on.
|
|
3228
|
+
* The current speed of this unit in tiles per tick, taking into account any walking speed modifier given by the tile the unit is standing on. `nil` if this is not a unit.
|
|
3065
3229
|
* @remarks
|
|
3066
3230
|
* Applies to subclasses: Unit
|
|
3067
3231
|
*
|
|
3068
3232
|
*/
|
|
3069
|
-
readonly effective_speed
|
|
3233
|
+
readonly effective_speed?: number
|
|
3070
3234
|
|
|
3071
3235
|
/**
|
|
3072
|
-
* Multiplies the acceleration the vehicle can create for one unit of energy.
|
|
3236
|
+
* Multiplies the acceleration the vehicle can create for one unit of energy. Defaults to `1`.
|
|
3073
3237
|
* @remarks
|
|
3074
3238
|
* Applies to subclasses: Car
|
|
3075
3239
|
*
|
|
@@ -3077,35 +3241,35 @@ interface LuaEntity extends LuaControl {
|
|
|
3077
3241
|
effectivity_modifier: number
|
|
3078
3242
|
|
|
3079
3243
|
/**
|
|
3080
|
-
* The effects being applied to this entity
|
|
3244
|
+
* The effects being applied to this entity, if any. For beacons, this is the effect the beacon is broadcasting.
|
|
3081
3245
|
*/
|
|
3082
3246
|
readonly effects?: ModuleEffects
|
|
3083
3247
|
|
|
3084
3248
|
/**
|
|
3085
|
-
* The buffer size for the electric energy source
|
|
3249
|
+
* The buffer size for the electric energy source. `nil` if the entity doesn't have an electric energy source.
|
|
3086
3250
|
* @remarks
|
|
3087
3251
|
* Write access is limited to the ElectricEnergyInterface type
|
|
3088
3252
|
*
|
|
3089
3253
|
*/
|
|
3090
|
-
electric_buffer_size
|
|
3254
|
+
electric_buffer_size?: number
|
|
3091
3255
|
|
|
3092
3256
|
/**
|
|
3093
|
-
* The electric drain for the electric energy source
|
|
3257
|
+
* The electric drain for the electric energy source. `nil` if the entity doesn't have an electric energy source.
|
|
3094
3258
|
*/
|
|
3095
|
-
readonly electric_drain
|
|
3259
|
+
readonly electric_drain?: number
|
|
3096
3260
|
|
|
3097
3261
|
/**
|
|
3098
|
-
* The emissions for the electric energy source
|
|
3262
|
+
* The emissions for the electric energy source. `nil` if the entity doesn't have an electric energy source.
|
|
3099
3263
|
*/
|
|
3100
|
-
readonly electric_emissions
|
|
3264
|
+
readonly electric_emissions?: number
|
|
3101
3265
|
|
|
3102
3266
|
/**
|
|
3103
|
-
* The input flow limit for the electric energy source
|
|
3267
|
+
* The input flow limit for the electric energy source. `nil` if the entity doesn't have an electric energy source.
|
|
3104
3268
|
*/
|
|
3105
|
-
readonly electric_input_flow_limit
|
|
3269
|
+
readonly electric_input_flow_limit?: number
|
|
3106
3270
|
|
|
3107
3271
|
/**
|
|
3108
|
-
* Returns the id of the electric network that this entity is connected to
|
|
3272
|
+
* Returns the id of the electric network that this entity is connected to, if any.
|
|
3109
3273
|
*/
|
|
3110
3274
|
readonly electric_network_id?: number
|
|
3111
3275
|
|
|
@@ -3118,12 +3282,12 @@ interface LuaEntity extends LuaControl {
|
|
|
3118
3282
|
readonly electric_network_statistics: LuaFlowStatistics
|
|
3119
3283
|
|
|
3120
3284
|
/**
|
|
3121
|
-
* The output flow limit for the electric energy source
|
|
3285
|
+
* The output flow limit for the electric energy source. `nil` if the entity doesn't have an electric energy source.
|
|
3122
3286
|
*/
|
|
3123
|
-
readonly electric_output_flow_limit
|
|
3287
|
+
readonly electric_output_flow_limit?: number
|
|
3124
3288
|
|
|
3125
3289
|
/**
|
|
3126
|
-
*
|
|
3290
|
+
* Whether equipment grid logistics are enabled while this vehicle is moving.
|
|
3127
3291
|
* @remarks
|
|
3128
3292
|
* Applies to subclasses: Vehicle
|
|
3129
3293
|
*
|
|
@@ -3150,10 +3314,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3150
3314
|
readonly energy_generated_last_tick: number
|
|
3151
3315
|
|
|
3152
3316
|
/**
|
|
3153
|
-
* The label
|
|
3154
|
-
* @remarks
|
|
3155
|
-
* only usable on entities that have labels (currently only spider-vehicles).
|
|
3156
|
-
*
|
|
3317
|
+
* The label on this entity, if any. `nil` if this is not a spider-vehicule.
|
|
3157
3318
|
*/
|
|
3158
3319
|
entity_label?: string
|
|
3159
3320
|
|
|
@@ -3168,20 +3329,20 @@ interface LuaEntity extends LuaControl {
|
|
|
3168
3329
|
fluidbox: LuaFluidBox
|
|
3169
3330
|
|
|
3170
3331
|
/**
|
|
3171
|
-
* The follow offset of this spidertron if any
|
|
3332
|
+
* The follow offset of this spidertron, if any entity is being followed. This is randomized each time the follow entity is set.
|
|
3172
3333
|
* @remarks
|
|
3173
3334
|
* Applies to subclasses: SpiderVehicle
|
|
3174
3335
|
*
|
|
3175
3336
|
*/
|
|
3176
|
-
follow_offset
|
|
3337
|
+
follow_offset?: Vector
|
|
3177
3338
|
|
|
3178
3339
|
/**
|
|
3179
|
-
* The follow target of this spidertron if any.
|
|
3340
|
+
* The follow target of this spidertron, if any.
|
|
3180
3341
|
* @remarks
|
|
3181
3342
|
* Applies to subclasses: SpiderVehicle
|
|
3182
3343
|
*
|
|
3183
3344
|
*/
|
|
3184
|
-
follow_target
|
|
3345
|
+
follow_target?: LuaEntity
|
|
3185
3346
|
|
|
3186
3347
|
/**
|
|
3187
3348
|
* Multiplies the car friction rate.
|
|
@@ -3237,25 +3398,25 @@ interface LuaEntity extends LuaControl {
|
|
|
3237
3398
|
readonly ghost_type: string
|
|
3238
3399
|
|
|
3239
3400
|
/**
|
|
3240
|
-
* The {@link unit_number | LuaEntity::unit_number} of the entity contained in this ghost. It is the same as the unit number of the {@link EntityWithOwner | https://wiki.factorio.com/Prototype/EntityWithOwner} that was destroyed to create this ghost. If it was created by other means, or if the inner entity
|
|
3401
|
+
* The {@link unit_number | LuaEntity::unit_number} of the entity contained in this ghost. It is the same as the unit number of the {@link EntityWithOwner | https://wiki.factorio.com/Prototype/EntityWithOwner} that was destroyed to create this ghost. If it was created by other means, or if the inner entity does not support unit numbers, this property is `nil`.
|
|
3241
3402
|
* @remarks
|
|
3242
3403
|
* Applies to subclasses: EntityGhost
|
|
3243
3404
|
*
|
|
3244
3405
|
*/
|
|
3245
|
-
readonly ghost_unit_number
|
|
3406
|
+
readonly ghost_unit_number?: number
|
|
3246
3407
|
|
|
3247
3408
|
/**
|
|
3248
|
-
* The graphics variation for this entity
|
|
3409
|
+
* The graphics variation for this entity. `nil` if this entity doesn't use graphics variations.
|
|
3249
3410
|
*/
|
|
3250
3411
|
graphics_variation?: number
|
|
3251
3412
|
|
|
3252
3413
|
/**
|
|
3253
|
-
*
|
|
3414
|
+
* This entity's equipment grid, if any.
|
|
3254
3415
|
*/
|
|
3255
3416
|
readonly grid?: LuaEquipmentGrid
|
|
3256
3417
|
|
|
3257
3418
|
/**
|
|
3258
|
-
* The current health of the entity,
|
|
3419
|
+
* The current health of the entity, if any. Health is automatically clamped to be between `0` and max health (inclusive). Entities with a health of `0` can not be attacked.
|
|
3259
3420
|
* @remarks
|
|
3260
3421
|
* To get the maximum possible health of this entity, see {@link LuaEntityPrototype::max_health | LuaEntityPrototype::max_health} on its prototype.
|
|
3261
3422
|
*
|
|
@@ -3303,16 +3464,16 @@ interface LuaEntity extends LuaControl {
|
|
|
3303
3464
|
infinity_container_filters: InfinityInventoryFilter[]
|
|
3304
3465
|
|
|
3305
3466
|
/**
|
|
3306
|
-
* Count of initial resource units contained.
|
|
3467
|
+
* Count of initial resource units contained. `nil` if this is not an infinite resource.
|
|
3307
3468
|
* @remarks
|
|
3308
|
-
* If this is not an infinite resource
|
|
3469
|
+
* If this is not an infinite resource, writing will produce an error.
|
|
3309
3470
|
* Applies to subclasses: ResourceEntity
|
|
3310
3471
|
*
|
|
3311
3472
|
*/
|
|
3312
|
-
initial_amount
|
|
3473
|
+
initial_amount?: number
|
|
3313
3474
|
|
|
3314
3475
|
/**
|
|
3315
|
-
* The filter mode for this filter inserter
|
|
3476
|
+
* The filter mode for this filter inserter. Either `"whitelist"` or `"blacklist"`. `nil` if this inserter doesn't use filters.
|
|
3316
3477
|
* @remarks
|
|
3317
3478
|
* Applies to subclasses: Inserter
|
|
3318
3479
|
*
|
|
@@ -3343,7 +3504,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3343
3504
|
readonly is_entity_with_owner: boolean
|
|
3344
3505
|
|
|
3345
3506
|
/**
|
|
3346
|
-
*
|
|
3507
|
+
* Whether this entity is a MilitaryTarget. Can be written to if {@link LuaEntityPrototype::allow_run_time_change_of_is_military_target | LuaEntityPrototype::allow_run_time_change_of_is_military_target} returns `true`.
|
|
3347
3508
|
*/
|
|
3348
3509
|
is_military_target: boolean
|
|
3349
3510
|
|
|
@@ -3361,14 +3522,14 @@ interface LuaEntity extends LuaControl {
|
|
|
3361
3522
|
kills: number
|
|
3362
3523
|
|
|
3363
3524
|
/**
|
|
3364
|
-
* The last player that changed any setting on this entity. This includes building the entity, changing its color, or configuring its circuit network.
|
|
3525
|
+
* The last player that changed any setting on this entity. This includes building the entity, changing its color, or configuring its circuit network. `nil` if the last user is not part of the save anymore.
|
|
3365
3526
|
*
|
|
3366
3527
|
* Reading this property will return a {@link LuaPlayer | LuaPlayer}, while {@link PlayerIdentification | PlayerIdentification} can be used when writing.
|
|
3367
3528
|
* @remarks
|
|
3368
3529
|
* Applies to subclasses: EntityWithOwner
|
|
3369
3530
|
*
|
|
3370
3531
|
*/
|
|
3371
|
-
last_user
|
|
3532
|
+
last_user?: LuaPlayer | PlayerIdentification
|
|
3372
3533
|
|
|
3373
3534
|
/**
|
|
3374
3535
|
* The link ID this linked container is using.
|
|
@@ -3376,14 +3537,14 @@ interface LuaEntity extends LuaControl {
|
|
|
3376
3537
|
link_id: number
|
|
3377
3538
|
|
|
3378
3539
|
/**
|
|
3379
|
-
* Neighbour to which this linked belt is connected to
|
|
3540
|
+
* Neighbour to which this linked belt is connected to, if any.
|
|
3380
3541
|
* @remarks
|
|
3381
3542
|
* Can also be used on entity ghost if it contains linked-belt
|
|
3382
3543
|
* May return entity ghost which contains linked belt to which connection is made
|
|
3383
3544
|
* Applies to subclasses: LinkedBelt
|
|
3384
3545
|
*
|
|
3385
3546
|
*/
|
|
3386
|
-
readonly linked_belt_neighbour
|
|
3547
|
+
readonly linked_belt_neighbour?: LuaEntity
|
|
3387
3548
|
|
|
3388
3549
|
/**
|
|
3389
3550
|
* Type of linked belt: it is either `"input"` or `"output"`. Changing type will also flip direction so the belt is out of the same side
|
|
@@ -3396,12 +3557,12 @@ interface LuaEntity extends LuaControl {
|
|
|
3396
3557
|
linked_belt_type: string
|
|
3397
3558
|
|
|
3398
3559
|
/**
|
|
3399
|
-
* The container entity this loader is pointing at/pulling from depending on the {@link LuaEntity::loader_type | LuaEntity::loader_type}.
|
|
3560
|
+
* The container entity this loader is pointing at/pulling from depending on the {@link LuaEntity::loader_type | LuaEntity::loader_type}, if any.
|
|
3400
3561
|
* @remarks
|
|
3401
3562
|
* Applies to subclasses: Loader
|
|
3402
3563
|
*
|
|
3403
3564
|
*/
|
|
3404
|
-
readonly loader_container
|
|
3565
|
+
readonly loader_container?: LuaEntity
|
|
3405
3566
|
|
|
3406
3567
|
/**
|
|
3407
3568
|
* `"input"` or `"output"`, depending on whether this loader puts to or gets from a container.
|
|
@@ -3437,12 +3598,12 @@ interface LuaEntity extends LuaControl {
|
|
|
3437
3598
|
minable: boolean
|
|
3438
3599
|
|
|
3439
3600
|
/**
|
|
3440
|
-
* The mining progress for this mining drill
|
|
3601
|
+
* The mining progress for this mining drill. Is a number in range [0, mining_target.prototype.mineable_properties.mining_time]. `nil` if this isn't a mining drill.
|
|
3441
3602
|
*/
|
|
3442
3603
|
mining_progress?: number
|
|
3443
3604
|
|
|
3444
3605
|
/**
|
|
3445
|
-
* The mining target
|
|
3606
|
+
* The mining target, if any.
|
|
3446
3607
|
* @remarks
|
|
3447
3608
|
* Applies to subclasses: MiningDrill
|
|
3448
3609
|
*
|
|
@@ -3492,7 +3653,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3492
3653
|
operable: boolean
|
|
3493
3654
|
|
|
3494
3655
|
/**
|
|
3495
|
-
* The smooth orientation of this entity
|
|
3656
|
+
* The smooth orientation of this entity.
|
|
3496
3657
|
*/
|
|
3497
3658
|
orientation: RealOrientation
|
|
3498
3659
|
|
|
@@ -3513,7 +3674,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3513
3674
|
pickup_position: MapPosition
|
|
3514
3675
|
|
|
3515
3676
|
/**
|
|
3516
|
-
* The entity this inserter will attempt to pick up items from
|
|
3677
|
+
* The entity this inserter will attempt to pick up items from. If there are multiple possible entities at the pick-up point, writing to this attribute allows a mod to choose which one to pick up items from. The entity needs to collide with the tile box under the pick-up position. `nil` if there is no entity to pull items from.
|
|
3517
3678
|
* @remarks
|
|
3518
3679
|
* Applies to subclasses: Inserter
|
|
3519
3680
|
*
|
|
@@ -3521,7 +3682,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3521
3682
|
pickup_target?: LuaEntity
|
|
3522
3683
|
|
|
3523
3684
|
/**
|
|
3524
|
-
* The player connected to this character
|
|
3685
|
+
* The player connected to this character, if any.
|
|
3525
3686
|
* @remarks
|
|
3526
3687
|
* Applies to subclasses: Character
|
|
3527
3688
|
*
|
|
@@ -3555,12 +3716,12 @@ interface LuaEntity extends LuaControl {
|
|
|
3555
3716
|
power_usage: number
|
|
3556
3717
|
|
|
3557
3718
|
/**
|
|
3558
|
-
* The previous recipe this furnace was using
|
|
3719
|
+
* The previous recipe this furnace was using, if any.
|
|
3559
3720
|
* @remarks
|
|
3560
3721
|
* Applies to subclasses: Furnace
|
|
3561
3722
|
*
|
|
3562
3723
|
*/
|
|
3563
|
-
readonly previous_recipe
|
|
3724
|
+
readonly previous_recipe?: LuaRecipe
|
|
3564
3725
|
|
|
3565
3726
|
/**
|
|
3566
3727
|
* The productivity bonus of this entity.
|
|
@@ -3584,12 +3745,12 @@ interface LuaEntity extends LuaControl {
|
|
|
3584
3745
|
readonly prototype: LuaEntityPrototype
|
|
3585
3746
|
|
|
3586
3747
|
/**
|
|
3587
|
-
* The target entity for this item-request-proxy
|
|
3748
|
+
* The target entity for this item-request-proxy, if any.
|
|
3588
3749
|
*/
|
|
3589
3750
|
readonly proxy_target?: LuaEntity
|
|
3590
3751
|
|
|
3591
3752
|
/**
|
|
3592
|
-
* The rail target of this pump
|
|
3753
|
+
* The rail target of this pump, if any.
|
|
3593
3754
|
* @remarks
|
|
3594
3755
|
* Applies to subclasses: Pump
|
|
3595
3756
|
*
|
|
@@ -3613,7 +3774,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3613
3774
|
recipe_locked: boolean
|
|
3614
3775
|
|
|
3615
3776
|
/**
|
|
3616
|
-
* The relative orientation of the vehicle turret, artillery turret, artillery wagon
|
|
3777
|
+
* The relative orientation of the vehicle turret, artillery turret, artillery wagon. `nil` if this entity isn't a vehicle with a vehicle turret or artillery turret/wagon.
|
|
3617
3778
|
* @remarks
|
|
3618
3779
|
* Writing does nothing if the vehicle doesn't have a turret.
|
|
3619
3780
|
*
|
|
@@ -3621,7 +3782,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3621
3782
|
relative_turret_orientation?: RealOrientation
|
|
3622
3783
|
|
|
3623
3784
|
/**
|
|
3624
|
-
*
|
|
3785
|
+
* Whether items not included in this infinity container filters should be removed from the container.
|
|
3625
3786
|
* @remarks
|
|
3626
3787
|
* Applies to subclasses: InfinityContainer
|
|
3627
3788
|
*
|
|
@@ -3629,19 +3790,19 @@ interface LuaEntity extends LuaControl {
|
|
|
3629
3790
|
remove_unfiltered_items: boolean
|
|
3630
3791
|
|
|
3631
3792
|
/**
|
|
3632
|
-
* The player that this `simple-entity-with-owner`, `simple-entity-with-force`, `flying-text`, or `highlight-box` is visible to. `nil`
|
|
3793
|
+
* The player that this `simple-entity-with-owner`, `simple-entity-with-force`, `flying-text`, or `highlight-box` is visible to. `nil` when this entity is rendered for all players.
|
|
3633
3794
|
*
|
|
3634
3795
|
* Reading this property will return a {@link LuaPlayer | LuaPlayer}, while {@link PlayerIdentification | PlayerIdentification} can be used when writing.
|
|
3635
3796
|
*/
|
|
3636
|
-
render_player
|
|
3797
|
+
render_player?: LuaPlayer | PlayerIdentification
|
|
3637
3798
|
|
|
3638
3799
|
/**
|
|
3639
|
-
* The forces that this `simple-entity-with-owner`, `simple-entity-with-force`, or `flying-text` is visible to. `nil` or an empty array
|
|
3800
|
+
* The forces that this `simple-entity-with-owner`, `simple-entity-with-force`, or `flying-text` is visible to. `nil` or an empty array when this entity is rendered for all forces.
|
|
3640
3801
|
* @remarks
|
|
3641
3802
|
* Reading will always give an array of {@link LuaForce | LuaForce}
|
|
3642
3803
|
*
|
|
3643
3804
|
*/
|
|
3644
|
-
render_to_forces
|
|
3805
|
+
render_to_forces?: ForceIdentification[]
|
|
3645
3806
|
|
|
3646
3807
|
/**
|
|
3647
3808
|
* Whether this requester chest is set to also request from buffer chests.
|
|
@@ -3664,6 +3825,11 @@ interface LuaEntity extends LuaControl {
|
|
|
3664
3825
|
*/
|
|
3665
3826
|
rocket_parts: number
|
|
3666
3827
|
|
|
3828
|
+
/**
|
|
3829
|
+
* The status of this rocket silo entity.
|
|
3830
|
+
*/
|
|
3831
|
+
readonly rocket_silo_status: defines.rocket_silo_status
|
|
3832
|
+
|
|
3667
3833
|
/**
|
|
3668
3834
|
* When entity is not to be rotatable (inserter, transport belt etc), it can't be rotated by player using the R key.
|
|
3669
3835
|
* @remarks
|
|
@@ -3683,7 +3849,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3683
3849
|
readonly secondary_selection_box?: BoundingBox
|
|
3684
3850
|
|
|
3685
3851
|
/**
|
|
3686
|
-
* Index of the currently selected weapon slot of this character, car, or spidertron
|
|
3852
|
+
* Index of the currently selected weapon slot of this character, car, or spidertron. `nil` if this entity doesn't have guns.
|
|
3687
3853
|
* @remarks
|
|
3688
3854
|
* Applies to subclasses: Character,Car
|
|
3689
3855
|
*
|
|
@@ -3696,7 +3862,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3696
3862
|
readonly selection_box: BoundingBox
|
|
3697
3863
|
|
|
3698
3864
|
/**
|
|
3699
|
-
* The shooting target for this turret
|
|
3865
|
+
* The shooting target for this turret, if any.
|
|
3700
3866
|
*/
|
|
3701
3867
|
shooting_target?: LuaEntity
|
|
3702
3868
|
|
|
@@ -3709,14 +3875,16 @@ interface LuaEntity extends LuaControl {
|
|
|
3709
3875
|
readonly signal_state: defines.signal_state
|
|
3710
3876
|
|
|
3711
3877
|
/**
|
|
3712
|
-
* The spawner associated with this unit entity
|
|
3878
|
+
* The spawner associated with this unit entity, if any.
|
|
3713
3879
|
*/
|
|
3714
3880
|
readonly spawner?: LuaEntity
|
|
3715
3881
|
|
|
3716
3882
|
/**
|
|
3717
|
-
* The current speed
|
|
3883
|
+
* The current speed if this is a car, rolling stock, projectile or spidertron, or the maximum speed if this is a unit. The speed is in tiles per tick. `nil` if this is not a car, rolling stock, unit, projectile or spidertron.
|
|
3884
|
+
*
|
|
3885
|
+
* Only the speed of units, cars, and projectiles are writable.
|
|
3718
3886
|
*/
|
|
3719
|
-
speed
|
|
3887
|
+
speed?: number
|
|
3720
3888
|
|
|
3721
3889
|
/**
|
|
3722
3890
|
* The speed bonus of this entity.
|
|
@@ -3727,7 +3895,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3727
3895
|
readonly speed_bonus: number
|
|
3728
3896
|
|
|
3729
3897
|
/**
|
|
3730
|
-
* The filter for this splitter
|
|
3898
|
+
* The filter for this splitter, if any is set.
|
|
3731
3899
|
* @remarks
|
|
3732
3900
|
* Applies to subclasses: Splitter
|
|
3733
3901
|
*
|
|
@@ -3735,7 +3903,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3735
3903
|
splitter_filter?: LuaItemPrototype
|
|
3736
3904
|
|
|
3737
3905
|
/**
|
|
3738
|
-
* The input priority for this splitter
|
|
3906
|
+
* The input priority for this splitter. Either `"left"`, `"none"`, or `"right"`.
|
|
3739
3907
|
* @remarks
|
|
3740
3908
|
* Applies to subclasses: Splitter
|
|
3741
3909
|
*
|
|
@@ -3743,7 +3911,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3743
3911
|
splitter_input_priority: string
|
|
3744
3912
|
|
|
3745
3913
|
/**
|
|
3746
|
-
* The output priority for this splitter
|
|
3914
|
+
* The output priority for this splitter. Either `"left"`, `"none"`, or `"right"`.
|
|
3747
3915
|
* @remarks
|
|
3748
3916
|
* Applies to subclasses: Splitter
|
|
3749
3917
|
*
|
|
@@ -3758,7 +3926,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3758
3926
|
readonly stack: LuaItemStack
|
|
3759
3927
|
|
|
3760
3928
|
/**
|
|
3761
|
-
* The status of this entity
|
|
3929
|
+
* The status of this entity, if any.
|
|
3762
3930
|
*/
|
|
3763
3931
|
readonly status?: defines.entity_status
|
|
3764
3932
|
|
|
@@ -3768,7 +3936,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3768
3936
|
readonly sticked_to: LuaEntity
|
|
3769
3937
|
|
|
3770
3938
|
/**
|
|
3771
|
-
* The sticker entities attached to this entity
|
|
3939
|
+
* The sticker entities attached to this entity, if any.
|
|
3772
3940
|
*/
|
|
3773
3941
|
readonly stickers?: LuaEntity[]
|
|
3774
3942
|
|
|
@@ -3783,12 +3951,12 @@ interface LuaEntity extends LuaControl {
|
|
|
3783
3951
|
readonly supports_direction: boolean
|
|
3784
3952
|
|
|
3785
3953
|
/**
|
|
3786
|
-
* The tags associated with this entity ghost
|
|
3954
|
+
* The tags associated with this entity ghost. `nil` if this is not an entity ghost.
|
|
3787
3955
|
*/
|
|
3788
3956
|
tags?: Tags
|
|
3789
3957
|
|
|
3790
3958
|
/**
|
|
3791
|
-
* The temperature of this
|
|
3959
|
+
* The temperature of this entity's heat energy source. `nil` if this entity does not use a heat energy source.
|
|
3792
3960
|
*/
|
|
3793
3961
|
temperature?: number
|
|
3794
3962
|
|
|
@@ -3816,6 +3984,16 @@ interface LuaEntity extends LuaControl {
|
|
|
3816
3984
|
*/
|
|
3817
3985
|
tick_of_last_damage: number
|
|
3818
3986
|
|
|
3987
|
+
/**
|
|
3988
|
+
* Specifies the tiling size of the entity, is used to decide, if the center should be in the center of the tile (odd tile size dimension) or on the tile border (even tile size dimension). Uses the current direction of the entity.
|
|
3989
|
+
*/
|
|
3990
|
+
readonly tile_height: number
|
|
3991
|
+
|
|
3992
|
+
/**
|
|
3993
|
+
* Specifies the tiling size of the entity, is used to decide, if the center should be in the center of the tile (odd tile size dimension) or on the tile border (even tile size dimension). Uses the current direction of the entity.
|
|
3994
|
+
*/
|
|
3995
|
+
readonly tile_width: number
|
|
3996
|
+
|
|
3819
3997
|
/**
|
|
3820
3998
|
* The ticks left before a ghost, combat robot, highlight box or smoke with trigger is destroyed.
|
|
3821
3999
|
*
|
|
@@ -3857,12 +4035,12 @@ interface LuaEntity extends LuaControl {
|
|
|
3857
4035
|
torso_orientation: RealOrientation
|
|
3858
4036
|
|
|
3859
4037
|
/**
|
|
3860
|
-
* The train this rolling stock belongs to
|
|
4038
|
+
* The train this rolling stock belongs to, if any. `nil` if this is not a rolling stock.
|
|
3861
4039
|
*/
|
|
3862
|
-
readonly train
|
|
4040
|
+
readonly train?: LuaTrain
|
|
3863
4041
|
|
|
3864
4042
|
/**
|
|
3865
|
-
* Amount of trains related to this particular train stop. Includes train stopped at this train stop (until it finds a path to next target) and trains having this train stop as goal or waypoint.
|
|
4043
|
+
* Amount of trains related to this particular train stop. Includes train stopped at this train stop (until it finds a path to next target) and trains having this train stop as goal or waypoint.
|
|
3866
4044
|
* @remarks
|
|
3867
4045
|
* Train may be included multiple times when braking distance covers this train stop multiple times
|
|
3868
4046
|
* Value may be read even when train stop has no control behavior
|
|
@@ -3880,7 +4058,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3880
4058
|
readonly trains_in_block: number
|
|
3881
4059
|
|
|
3882
4060
|
/**
|
|
3883
|
-
* Amount of trains above which no new trains will be sent to this train stop.
|
|
4061
|
+
* Amount of trains above which no new trains will be sent to this train stop. Writing nil will disable the limit (will set a maximum possible value).
|
|
3884
4062
|
* @remarks
|
|
3885
4063
|
* When a train stop has a control behavior with wire connected and set_trains_limit enabled, this value will be overwritten by it
|
|
3886
4064
|
* Applies to subclasses: TrainStop
|
|
@@ -3924,7 +4102,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3924
4102
|
readonly type: string
|
|
3925
4103
|
|
|
3926
4104
|
/**
|
|
3927
|
-
* The unit group this unit is a member of,
|
|
4105
|
+
* The unit group this unit is a member of, if any.
|
|
3928
4106
|
* @remarks
|
|
3929
4107
|
* Applies to subclasses: Unit
|
|
3930
4108
|
*
|
|
@@ -3932,9 +4110,9 @@ interface LuaEntity extends LuaControl {
|
|
|
3932
4110
|
readonly unit_group?: LuaUnitGroup
|
|
3933
4111
|
|
|
3934
4112
|
/**
|
|
3935
|
-
* A universally unique number identifying this entity for the lifetime of the save. Only entities inheriting from {@link EntityWithOwner | https://wiki.factorio.com/Prototype/EntityWithOwner}, as well as {@link ItemRequestProxy | https://wiki.factorio.com/Prototype/ItemRequestProxy} and {@link EntityGhost | https://wiki.factorio.com/Prototype/EntityGhost}
|
|
4113
|
+
* A universally unique number identifying this entity for the lifetime of the save. Only entities inheriting from {@link EntityWithOwner | https://wiki.factorio.com/Prototype/EntityWithOwner}, as well as {@link ItemRequestProxy | https://wiki.factorio.com/Prototype/ItemRequestProxy} and {@link EntityGhost | https://wiki.factorio.com/Prototype/EntityGhost} are assigned a unit number. `nil` if this entity doesn't have a unit number.
|
|
3936
4114
|
*/
|
|
3937
|
-
readonly unit_number
|
|
4115
|
+
readonly unit_number?: number
|
|
3938
4116
|
|
|
3939
4117
|
/**
|
|
3940
4118
|
* The units associated with this spawner entity.
|
|
@@ -3978,6 +4156,14 @@ interface LuaEntityPrototype {
|
|
|
3978
4156
|
*/
|
|
3979
4157
|
help(this: void): void
|
|
3980
4158
|
|
|
4159
|
+
/**
|
|
4160
|
+
* The active energy usage of this rocket silo or combinator prototype.
|
|
4161
|
+
* @remarks
|
|
4162
|
+
* Applies to subclasses: RocketSilo,Combinator
|
|
4163
|
+
*
|
|
4164
|
+
*/
|
|
4165
|
+
readonly active_energy_usage?: number
|
|
4166
|
+
|
|
3981
4167
|
/**
|
|
3982
4168
|
* Entities this entity can be pasted onto in addition to the normal allowed ones.
|
|
3983
4169
|
*/
|
|
@@ -3989,7 +4175,7 @@ interface LuaEntityPrototype {
|
|
|
3989
4175
|
* Applies to subclasses: OffshorePump
|
|
3990
4176
|
*
|
|
3991
4177
|
*/
|
|
3992
|
-
readonly adjacent_tile_collision_box
|
|
4178
|
+
readonly adjacent_tile_collision_box?: BoundingBox
|
|
3993
4179
|
|
|
3994
4180
|
/**
|
|
3995
4181
|
* Tiles adjacent to the offshore pump must not collide with this collision mask.
|
|
@@ -3997,7 +4183,7 @@ interface LuaEntityPrototype {
|
|
|
3997
4183
|
* Applies to subclasses: OffshorePump
|
|
3998
4184
|
*
|
|
3999
4185
|
*/
|
|
4000
|
-
readonly adjacent_tile_collision_mask
|
|
4186
|
+
readonly adjacent_tile_collision_mask?: CollisionMask
|
|
4001
4187
|
|
|
4002
4188
|
/**
|
|
4003
4189
|
* If this mask is not empty, tiles adjacent to the offshore pump must not collide with this collision mask.
|
|
@@ -4005,15 +4191,21 @@ interface LuaEntityPrototype {
|
|
|
4005
4191
|
* Applies to subclasses: OffshorePump
|
|
4006
4192
|
*
|
|
4007
4193
|
*/
|
|
4008
|
-
readonly adjacent_tile_collision_test
|
|
4194
|
+
readonly adjacent_tile_collision_test?: CollisionMask
|
|
4009
4195
|
|
|
4010
4196
|
/**
|
|
4011
|
-
* Whether this unit prototype is affected by tile walking speed modifiers
|
|
4197
|
+
* Whether this unit prototype is affected by tile walking speed modifiers.
|
|
4198
|
+
* @remarks
|
|
4199
|
+
* Applies to subclasses: Unit
|
|
4200
|
+
*
|
|
4012
4201
|
*/
|
|
4013
4202
|
readonly affected_by_tiles?: boolean
|
|
4014
4203
|
|
|
4015
4204
|
/**
|
|
4016
|
-
* The air resistance of this rolling stock prototype
|
|
4205
|
+
* The air resistance of this rolling stock prototype.
|
|
4206
|
+
* @remarks
|
|
4207
|
+
* Applies to subclasses: RollingStock
|
|
4208
|
+
*
|
|
4017
4209
|
*/
|
|
4018
4210
|
readonly air_resistance?: number
|
|
4019
4211
|
|
|
@@ -4023,24 +4215,36 @@ interface LuaEntityPrototype {
|
|
|
4023
4215
|
readonly alert_icon_shift: Vector
|
|
4024
4216
|
|
|
4025
4217
|
/**
|
|
4026
|
-
*
|
|
4218
|
+
* Whether this turret raises an alert when attacking
|
|
4219
|
+
* @remarks
|
|
4220
|
+
* Applies to subclasses: Turret
|
|
4221
|
+
*
|
|
4027
4222
|
*/
|
|
4028
4223
|
readonly alert_when_attacking?: boolean
|
|
4029
4224
|
|
|
4030
4225
|
/**
|
|
4031
|
-
*
|
|
4226
|
+
* Whether this entity raises an alert when damaged.
|
|
4227
|
+
* @remarks
|
|
4228
|
+
* Applies to subclasses: EntityWithHealth
|
|
4229
|
+
*
|
|
4032
4230
|
*/
|
|
4033
4231
|
readonly alert_when_damaged?: boolean
|
|
4034
4232
|
|
|
4035
4233
|
/**
|
|
4036
|
-
*
|
|
4234
|
+
* Whether this market allows access to all forces or just friendly ones.
|
|
4235
|
+
* @remarks
|
|
4236
|
+
* Applies to subclasses: Market
|
|
4237
|
+
*
|
|
4037
4238
|
*/
|
|
4038
|
-
readonly allow_access_to_all_forces
|
|
4239
|
+
readonly allow_access_to_all_forces?: boolean
|
|
4039
4240
|
|
|
4040
4241
|
/**
|
|
4041
|
-
*
|
|
4242
|
+
* Whether this inserter allows burner leeching.
|
|
4243
|
+
* @remarks
|
|
4244
|
+
* Applies to subclasses: Inserter
|
|
4245
|
+
*
|
|
4042
4246
|
*/
|
|
4043
|
-
readonly allow_burner_leech
|
|
4247
|
+
readonly allow_burner_leech?: boolean
|
|
4044
4248
|
|
|
4045
4249
|
/**
|
|
4046
4250
|
* When false copy-paste is not allowed for this entity.
|
|
@@ -4048,65 +4252,86 @@ interface LuaEntityPrototype {
|
|
|
4048
4252
|
readonly allow_copy_paste: boolean
|
|
4049
4253
|
|
|
4050
4254
|
/**
|
|
4051
|
-
*
|
|
4255
|
+
* Whether this inserter allows custom pickup and drop vectors.
|
|
4256
|
+
* @remarks
|
|
4257
|
+
* Applies to subclasses: Inserter
|
|
4258
|
+
*
|
|
4052
4259
|
*/
|
|
4053
|
-
readonly allow_custom_vectors
|
|
4260
|
+
readonly allow_custom_vectors?: boolean
|
|
4054
4261
|
|
|
4055
4262
|
/**
|
|
4056
|
-
*
|
|
4263
|
+
* Whether this vehicle allows passengers.
|
|
4264
|
+
* @remarks
|
|
4265
|
+
* Applies to subclasses: Vehicle
|
|
4266
|
+
*
|
|
4057
4267
|
*/
|
|
4058
|
-
readonly allow_passengers
|
|
4268
|
+
readonly allow_passengers?: boolean
|
|
4059
4269
|
|
|
4060
4270
|
/**
|
|
4061
4271
|
* True if this entity-with-owner's is_military_target can be changed run-time (on the entity, not on the prototype itself)
|
|
4062
4272
|
* @remarks
|
|
4063
|
-
* Applies to subclasses:
|
|
4273
|
+
* Applies to subclasses: EntityWithOwner
|
|
4064
4274
|
*
|
|
4065
4275
|
*/
|
|
4066
|
-
readonly allow_run_time_change_of_is_military_target
|
|
4276
|
+
readonly allow_run_time_change_of_is_military_target?: boolean
|
|
4067
4277
|
|
|
4068
4278
|
/**
|
|
4069
|
-
* The allowed module effects for this entity
|
|
4279
|
+
* The allowed module effects for this entity, if any.
|
|
4070
4280
|
*/
|
|
4071
4281
|
readonly allowed_effects?: {[key: string]: boolean}
|
|
4072
4282
|
|
|
4073
4283
|
/**
|
|
4074
|
-
* Whether the lamp is always on (except when out of power or turned off by the circuit network)
|
|
4284
|
+
* Whether the lamp is always on (except when out of power or turned off by the circuit network).
|
|
4285
|
+
* @remarks
|
|
4286
|
+
* Applies to subclasses: Lamp
|
|
4287
|
+
*
|
|
4075
4288
|
*/
|
|
4076
4289
|
readonly always_on?: boolean
|
|
4077
4290
|
|
|
4078
4291
|
/**
|
|
4079
|
-
*
|
|
4292
|
+
* The animation speed coefficient of this belt connectable prototype.
|
|
4293
|
+
* @remarks
|
|
4294
|
+
* Applies to subclasses: BeltConnectable
|
|
4295
|
+
*
|
|
4080
4296
|
*/
|
|
4081
|
-
readonly animation_speed_coefficient
|
|
4297
|
+
readonly animation_speed_coefficient?: number
|
|
4082
4298
|
|
|
4083
4299
|
/**
|
|
4084
|
-
* The attack parameters for this entity
|
|
4300
|
+
* The attack parameters for this entity, if any.
|
|
4085
4301
|
*/
|
|
4086
4302
|
readonly attack_parameters?: AttackParameters
|
|
4087
4303
|
|
|
4088
4304
|
/**
|
|
4089
|
-
* The attack result of this entity if
|
|
4305
|
+
* The attack result of this entity, if any.
|
|
4090
4306
|
*/
|
|
4091
|
-
readonly attack_result
|
|
4307
|
+
readonly attack_result?: TriggerItem[]
|
|
4092
4308
|
|
|
4093
4309
|
/**
|
|
4094
|
-
* The amount of ammo that inserters automatically insert into this ammo-turret or artillery-turret
|
|
4310
|
+
* The amount of ammo that inserters automatically insert into this ammo-turret or artillery-turret.
|
|
4311
|
+
* @remarks
|
|
4312
|
+
* Applies to subclasses: ArtilleryTurret,AmmoTurret
|
|
4313
|
+
*
|
|
4095
4314
|
*/
|
|
4096
4315
|
readonly automated_ammo_count?: number
|
|
4097
4316
|
|
|
4098
4317
|
/**
|
|
4099
|
-
*
|
|
4318
|
+
* Whether this spider vehicle prototoype automatically cycles weapons.
|
|
4319
|
+
* @remarks
|
|
4320
|
+
* Applies to subclasses: SpiderVehicle
|
|
4321
|
+
*
|
|
4100
4322
|
*/
|
|
4101
|
-
readonly automatic_weapon_cycling
|
|
4323
|
+
readonly automatic_weapon_cycling?: boolean
|
|
4102
4324
|
|
|
4103
4325
|
/**
|
|
4104
|
-
* Autoplace specification for this entity prototype
|
|
4326
|
+
* Autoplace specification for this entity prototype, if any.
|
|
4105
4327
|
*/
|
|
4106
|
-
readonly autoplace_specification
|
|
4328
|
+
readonly autoplace_specification?: AutoplaceSpecification
|
|
4107
4329
|
|
|
4108
4330
|
/**
|
|
4109
|
-
* The base productivity of this crafting machine, lab, or mining drill
|
|
4331
|
+
* The base productivity of this crafting machine, lab, or mining drill.
|
|
4332
|
+
* @remarks
|
|
4333
|
+
* Applies to subclasses: CraftingMachine,Lab,MiningDrill
|
|
4334
|
+
*
|
|
4110
4335
|
*/
|
|
4111
4336
|
readonly base_productivity?: number
|
|
4112
4337
|
|
|
@@ -4115,22 +4340,28 @@ interface LuaEntityPrototype {
|
|
|
4115
4340
|
* Applies to subclasses: Loader
|
|
4116
4341
|
*
|
|
4117
4342
|
*/
|
|
4118
|
-
readonly belt_distance
|
|
4343
|
+
readonly belt_distance?: number
|
|
4119
4344
|
|
|
4120
4345
|
/**
|
|
4121
4346
|
* @remarks
|
|
4122
4347
|
* Applies to subclasses: Loader
|
|
4123
4348
|
*
|
|
4124
4349
|
*/
|
|
4125
|
-
readonly belt_length
|
|
4350
|
+
readonly belt_length?: number
|
|
4126
4351
|
|
|
4127
4352
|
/**
|
|
4128
|
-
* The speed of this transport belt
|
|
4353
|
+
* The speed of this transport belt.
|
|
4354
|
+
* @remarks
|
|
4355
|
+
* Applies to subclasses: TransportBeltConnectable
|
|
4356
|
+
*
|
|
4129
4357
|
*/
|
|
4130
4358
|
readonly belt_speed?: number
|
|
4131
4359
|
|
|
4132
4360
|
/**
|
|
4133
|
-
* The braking force of this vehicle prototype
|
|
4361
|
+
* The braking force of this vehicle prototype.
|
|
4362
|
+
* @remarks
|
|
4363
|
+
* Applies to subclasses: Vehicle
|
|
4364
|
+
*
|
|
4134
4365
|
*/
|
|
4135
4366
|
readonly braking_force?: number
|
|
4136
4367
|
|
|
@@ -4144,7 +4375,7 @@ interface LuaEntityPrototype {
|
|
|
4144
4375
|
* Applies to subclasses: Character
|
|
4145
4376
|
*
|
|
4146
4377
|
*/
|
|
4147
|
-
readonly build_distance
|
|
4378
|
+
readonly build_distance?: number
|
|
4148
4379
|
|
|
4149
4380
|
/**
|
|
4150
4381
|
* The log2 of grid size of the building
|
|
@@ -4152,19 +4383,30 @@ interface LuaEntityPrototype {
|
|
|
4152
4383
|
readonly building_grid_bit_shift: number
|
|
4153
4384
|
|
|
4154
4385
|
/**
|
|
4155
|
-
* The burner energy source prototype this entity uses
|
|
4386
|
+
* The burner energy source prototype this entity uses, if any.
|
|
4156
4387
|
*/
|
|
4157
4388
|
readonly burner_prototype?: LuaBurnerPrototype
|
|
4158
4389
|
|
|
4159
4390
|
/**
|
|
4160
|
-
*
|
|
4391
|
+
* Whether this generator prototype burns fluid.
|
|
4392
|
+
* @remarks
|
|
4393
|
+
* Applies to subclasses: Generator
|
|
4394
|
+
*
|
|
4161
4395
|
*/
|
|
4162
|
-
readonly burns_fluid
|
|
4396
|
+
readonly burns_fluid?: boolean
|
|
4163
4397
|
|
|
4164
|
-
|
|
4398
|
+
/**
|
|
4399
|
+
* @remarks
|
|
4400
|
+
* Applies to subclasses: Spawner
|
|
4401
|
+
*
|
|
4402
|
+
*/
|
|
4403
|
+
readonly call_for_help_radius?: number
|
|
4165
4404
|
|
|
4166
4405
|
/**
|
|
4167
|
-
* Whether this unit prototype can open gates
|
|
4406
|
+
* Whether this unit prototype can open gates.
|
|
4407
|
+
* @remarks
|
|
4408
|
+
* Applies to subclasses: Unit
|
|
4409
|
+
*
|
|
4168
4410
|
*/
|
|
4169
4411
|
readonly can_open_gates?: boolean
|
|
4170
4412
|
|
|
@@ -4174,27 +4416,36 @@ interface LuaEntityPrototype {
|
|
|
4174
4416
|
* Applies to subclasses: OffshorePump
|
|
4175
4417
|
*
|
|
4176
4418
|
*/
|
|
4177
|
-
readonly center_collision_mask
|
|
4419
|
+
readonly center_collision_mask?: CollisionMask
|
|
4178
4420
|
|
|
4179
4421
|
/**
|
|
4180
|
-
*
|
|
4422
|
+
* The chain shooting cooldown modifier of this spider vehicle prototype.
|
|
4423
|
+
* @remarks
|
|
4424
|
+
* Applies to subclasses: SpiderVehicle
|
|
4425
|
+
*
|
|
4181
4426
|
*/
|
|
4182
|
-
readonly chain_shooting_cooldown_modifier
|
|
4427
|
+
readonly chain_shooting_cooldown_modifier?: number
|
|
4183
4428
|
|
|
4184
4429
|
/**
|
|
4185
4430
|
* @remarks
|
|
4186
4431
|
* Applies to subclasses: Character
|
|
4187
4432
|
*
|
|
4188
4433
|
*/
|
|
4189
|
-
readonly character_corpse
|
|
4434
|
+
readonly character_corpse?: LuaEntityPrototype
|
|
4190
4435
|
|
|
4191
4436
|
/**
|
|
4192
|
-
*
|
|
4437
|
+
* The chunk exploration radius of this spider vehicle prototype.
|
|
4438
|
+
* @remarks
|
|
4439
|
+
* Applies to subclasses: SpiderVehicle
|
|
4440
|
+
*
|
|
4193
4441
|
*/
|
|
4194
|
-
readonly chunk_exploration_radius
|
|
4442
|
+
readonly chunk_exploration_radius?: number
|
|
4195
4443
|
|
|
4196
4444
|
/**
|
|
4197
|
-
* The item prototype name used to destroy this cliff
|
|
4445
|
+
* The item prototype name used to destroy this cliff.
|
|
4446
|
+
* @remarks
|
|
4447
|
+
* Applies to subclasses: Cliff
|
|
4448
|
+
*
|
|
4198
4449
|
*/
|
|
4199
4450
|
readonly cliff_explosive_prototype?: string
|
|
4200
4451
|
|
|
@@ -4226,17 +4477,23 @@ interface LuaEntityPrototype {
|
|
|
4226
4477
|
readonly collision_mask_with_flags: CollisionMaskWithFlags
|
|
4227
4478
|
|
|
4228
4479
|
/**
|
|
4229
|
-
* The color of the prototype,
|
|
4480
|
+
* The color of the prototype, if any.
|
|
4230
4481
|
*/
|
|
4231
4482
|
readonly color?: Color
|
|
4232
4483
|
|
|
4233
4484
|
/**
|
|
4234
|
-
* The construction radius for this roboport prototype
|
|
4485
|
+
* The construction radius for this roboport prototype.
|
|
4486
|
+
* @remarks
|
|
4487
|
+
* Applies to subclasses: Roboport
|
|
4488
|
+
*
|
|
4235
4489
|
*/
|
|
4236
4490
|
readonly construction_radius?: number
|
|
4237
4491
|
|
|
4238
4492
|
/**
|
|
4239
|
-
* The energy consumption of this car prototype
|
|
4493
|
+
* The energy consumption of this car prototype.
|
|
4494
|
+
* @remarks
|
|
4495
|
+
* Applies to subclasses: Car
|
|
4496
|
+
*
|
|
4240
4497
|
*/
|
|
4241
4498
|
readonly consumption?: number
|
|
4242
4499
|
|
|
@@ -4245,28 +4502,38 @@ interface LuaEntityPrototype {
|
|
|
4245
4502
|
* Applies to subclasses: Loader
|
|
4246
4503
|
*
|
|
4247
4504
|
*/
|
|
4248
|
-
readonly container_distance
|
|
4505
|
+
readonly container_distance?: number
|
|
4249
4506
|
|
|
4250
4507
|
/**
|
|
4251
4508
|
* Corpses used when this entity is destroyed. It is a dictionary indexed by the corpse's prototype name.
|
|
4509
|
+
* @remarks
|
|
4510
|
+
* Applies to subclasses: EntityWithHealth
|
|
4511
|
+
*
|
|
4252
4512
|
*/
|
|
4253
|
-
readonly corpses
|
|
4513
|
+
readonly corpses?: {[key: string]: LuaEntityPrototype}
|
|
4254
4514
|
|
|
4255
4515
|
/**
|
|
4256
4516
|
* If this simple-entity is counted as a rock for the deconstruction planner "trees and rocks only" filter.
|
|
4517
|
+
* @remarks
|
|
4518
|
+
* Applies to subclasses: SimpleEntity
|
|
4519
|
+
*
|
|
4257
4520
|
*/
|
|
4258
|
-
readonly count_as_rock_for_filtered_deconstruction
|
|
4521
|
+
readonly count_as_rock_for_filtered_deconstruction?: boolean
|
|
4259
4522
|
|
|
4260
4523
|
/**
|
|
4261
|
-
* The crafting categories this entity supports.
|
|
4524
|
+
* The crafting categories this entity prototype supports.
|
|
4262
4525
|
* @remarks
|
|
4263
|
-
* The value in the dictionary is meaningless and exists just to allow
|
|
4526
|
+
* The value in the dictionary is meaningless and exists just to allow for easy lookup.
|
|
4527
|
+
* Applies to subclasses: CraftingMachine Character
|
|
4264
4528
|
*
|
|
4265
4529
|
*/
|
|
4266
|
-
readonly crafting_categories
|
|
4530
|
+
readonly crafting_categories?: {[key: string]: boolean}
|
|
4267
4531
|
|
|
4268
4532
|
/**
|
|
4269
|
-
* The crafting speed
|
|
4533
|
+
* The crafting speed..
|
|
4534
|
+
* @remarks
|
|
4535
|
+
* Applies to subclasses: CraftingMachine
|
|
4536
|
+
*
|
|
4270
4537
|
*/
|
|
4271
4538
|
readonly crafting_speed?: number
|
|
4272
4539
|
|
|
@@ -4279,29 +4546,50 @@ interface LuaEntityPrototype {
|
|
|
4279
4546
|
readonly create_ghost_on_death: boolean
|
|
4280
4547
|
|
|
4281
4548
|
/**
|
|
4282
|
-
* The trigger run when this entity is created
|
|
4549
|
+
* The trigger to run when this entity is created, if any.
|
|
4283
4550
|
*/
|
|
4284
4551
|
readonly created_effect?: TriggerItem[]
|
|
4285
4552
|
|
|
4286
4553
|
/**
|
|
4287
|
-
* The smoke trigger run when this entity is built
|
|
4554
|
+
* The smoke trigger run when this entity is built, if any.
|
|
4288
4555
|
*/
|
|
4289
|
-
readonly created_smoke?: {
|
|
4556
|
+
readonly created_smoke?: {
|
|
4557
|
+
initial_height: number,
|
|
4558
|
+
max_radius?: number,
|
|
4559
|
+
offset_deviation: BoundingBox,
|
|
4560
|
+
offsets: Vector[],
|
|
4561
|
+
smoke_name: string,
|
|
4562
|
+
speed: Vector,
|
|
4563
|
+
speed_from_center: number,
|
|
4564
|
+
speed_from_center_deviation: number,
|
|
4565
|
+
speed_multiplier: number,
|
|
4566
|
+
speed_multiplier_deviation: number,
|
|
4567
|
+
starting_frame: number,
|
|
4568
|
+
starting_frame_deviation: number,
|
|
4569
|
+
starting_frame_speed: number,
|
|
4570
|
+
starting_frame_speed_deviation: number
|
|
4571
|
+
}
|
|
4290
4572
|
|
|
4291
4573
|
/**
|
|
4292
4574
|
* @remarks
|
|
4293
4575
|
* Applies to subclasses: Character
|
|
4294
4576
|
*
|
|
4295
4577
|
*/
|
|
4296
|
-
readonly damage_hit_tint
|
|
4578
|
+
readonly damage_hit_tint?: Color
|
|
4297
4579
|
|
|
4298
4580
|
/**
|
|
4299
|
-
* Value between 0 and 1 darkness where all lamps of this lamp prototype are off
|
|
4581
|
+
* Value between 0 and 1 darkness where all lamps of this lamp prototype are off.
|
|
4582
|
+
* @remarks
|
|
4583
|
+
* Applies to subclasses: Lamp
|
|
4584
|
+
*
|
|
4300
4585
|
*/
|
|
4301
4586
|
readonly darkness_for_all_lamps_off?: number
|
|
4302
4587
|
|
|
4303
4588
|
/**
|
|
4304
|
-
* Value between 0 and 1 darkness where all lamps of this lamp prototype are on
|
|
4589
|
+
* Value between 0 and 1 darkness where all lamps of this lamp prototype are on.
|
|
4590
|
+
* @remarks
|
|
4591
|
+
* Applies to subclasses: Lamp
|
|
4592
|
+
*
|
|
4305
4593
|
*/
|
|
4306
4594
|
readonly darkness_for_all_lamps_on?: number
|
|
4307
4595
|
|
|
@@ -4311,27 +4599,42 @@ interface LuaEntityPrototype {
|
|
|
4311
4599
|
readonly default_collision_mask_with_flags: CollisionMaskWithFlags
|
|
4312
4600
|
|
|
4313
4601
|
/**
|
|
4314
|
-
*
|
|
4602
|
+
* Whether this generator prototype destroys non-fuel fluids.
|
|
4603
|
+
* @remarks
|
|
4604
|
+
* Applies to subclasses: Generator
|
|
4605
|
+
*
|
|
4315
4606
|
*/
|
|
4316
|
-
readonly destroy_non_fuel_fluid
|
|
4607
|
+
readonly destroy_non_fuel_fluid?: boolean
|
|
4317
4608
|
|
|
4318
4609
|
/**
|
|
4319
|
-
* The distraction cooldown of this unit prototype
|
|
4610
|
+
* The distraction cooldown of this unit prototype.
|
|
4611
|
+
* @remarks
|
|
4612
|
+
* Applies to subclasses: Unit
|
|
4613
|
+
*
|
|
4320
4614
|
*/
|
|
4321
4615
|
readonly distraction_cooldown?: number
|
|
4322
4616
|
|
|
4323
4617
|
/**
|
|
4324
|
-
* The distribution effectivity for this beacon prototype
|
|
4618
|
+
* The distribution effectivity for this beacon prototype.
|
|
4619
|
+
* @remarks
|
|
4620
|
+
* Applies to subclasses: Beacon
|
|
4621
|
+
*
|
|
4325
4622
|
*/
|
|
4326
4623
|
readonly distribution_effectivity?: number
|
|
4327
4624
|
|
|
4328
4625
|
/**
|
|
4329
|
-
* The door opening speed for this rocket silo prototype
|
|
4626
|
+
* The door opening speed for this rocket silo prototype.
|
|
4627
|
+
* @remarks
|
|
4628
|
+
* Applies to subclasses: RocketSilo
|
|
4629
|
+
*
|
|
4330
4630
|
*/
|
|
4331
4631
|
readonly door_opening_speed?: number
|
|
4332
4632
|
|
|
4333
4633
|
/**
|
|
4334
|
-
* Whether this logistics or construction robot renders its cargo when flying
|
|
4634
|
+
* Whether this logistics or construction robot renders its cargo when flying.
|
|
4635
|
+
* @remarks
|
|
4636
|
+
* Applies to subclasses: RobotWithLogisticsInterface
|
|
4637
|
+
*
|
|
4335
4638
|
*/
|
|
4336
4639
|
readonly draw_cargo?: boolean
|
|
4337
4640
|
|
|
@@ -4345,23 +4648,26 @@ interface LuaEntityPrototype {
|
|
|
4345
4648
|
* Applies to subclasses: Character
|
|
4346
4649
|
*
|
|
4347
4650
|
*/
|
|
4348
|
-
readonly drop_item_distance
|
|
4651
|
+
readonly drop_item_distance?: number
|
|
4349
4652
|
|
|
4350
4653
|
/**
|
|
4351
|
-
* The dying time of this corpse prototype.
|
|
4654
|
+
* The dying time of this corpse prototype.
|
|
4352
4655
|
* @remarks
|
|
4353
4656
|
* Applies to subclasses: Corpse
|
|
4354
4657
|
*
|
|
4355
4658
|
*/
|
|
4356
|
-
readonly dying_speed
|
|
4659
|
+
readonly dying_speed?: number
|
|
4357
4660
|
|
|
4358
4661
|
/**
|
|
4359
|
-
* The effectivity of this car prototype, generator prototype
|
|
4662
|
+
* The effectivity of this car prototype, generator prototype.
|
|
4663
|
+
* @remarks
|
|
4664
|
+
* Applies to subclasses: Car,Generator
|
|
4665
|
+
*
|
|
4360
4666
|
*/
|
|
4361
4667
|
readonly effectivity?: number
|
|
4362
4668
|
|
|
4363
4669
|
/**
|
|
4364
|
-
* The electric energy source prototype this entity uses
|
|
4670
|
+
* The electric energy source prototype this entity uses, if any.
|
|
4365
4671
|
*/
|
|
4366
4672
|
readonly electric_energy_source_prototype?: LuaElectricEnergySourcePrototype
|
|
4367
4673
|
|
|
@@ -4376,27 +4682,39 @@ interface LuaEntityPrototype {
|
|
|
4376
4682
|
readonly enemy_map_color: Color
|
|
4377
4683
|
|
|
4378
4684
|
/**
|
|
4379
|
-
* The energy used per hitpoint taken for this vehicle during collisions
|
|
4685
|
+
* The energy used per hitpoint taken for this vehicle during collisions.
|
|
4686
|
+
* @remarks
|
|
4687
|
+
* Applies to subclasses: Vehicle
|
|
4688
|
+
*
|
|
4380
4689
|
*/
|
|
4381
4690
|
readonly energy_per_hit_point?: number
|
|
4382
4691
|
|
|
4383
4692
|
/**
|
|
4384
|
-
* The energy consumed per tile moved for this flying robot
|
|
4693
|
+
* The energy consumed per tile moved for this flying robot.
|
|
4694
|
+
* @remarks
|
|
4695
|
+
* Applies to subclasses: FlyingRobot
|
|
4696
|
+
*
|
|
4385
4697
|
*/
|
|
4386
4698
|
readonly energy_per_move?: number
|
|
4387
4699
|
|
|
4388
4700
|
/**
|
|
4389
|
-
* The energy consumed per tick for this flying robot
|
|
4701
|
+
* The energy consumed per tick for this flying robot.
|
|
4702
|
+
* @remarks
|
|
4703
|
+
* Applies to subclasses: FlyingRobot
|
|
4704
|
+
*
|
|
4390
4705
|
*/
|
|
4391
4706
|
readonly energy_per_tick?: number
|
|
4392
4707
|
|
|
4393
4708
|
/**
|
|
4394
|
-
* The direct energy usage of this entity
|
|
4709
|
+
* The direct energy usage of this entity, if any.
|
|
4395
4710
|
*/
|
|
4396
4711
|
readonly energy_usage?: number
|
|
4397
4712
|
|
|
4398
4713
|
/**
|
|
4399
|
-
* The engine starting speed for this rocket silo rocket prototype
|
|
4714
|
+
* The engine starting speed for this rocket silo rocket prototype.
|
|
4715
|
+
* @remarks
|
|
4716
|
+
* Applies to subclasses: RocketSiloRocket
|
|
4717
|
+
*
|
|
4400
4718
|
*/
|
|
4401
4719
|
readonly engine_starting_speed?: number
|
|
4402
4720
|
|
|
@@ -4405,35 +4723,50 @@ interface LuaEntityPrototype {
|
|
|
4405
4723
|
* Applies to subclasses: Character
|
|
4406
4724
|
*
|
|
4407
4725
|
*/
|
|
4408
|
-
readonly enter_vehicle_distance
|
|
4726
|
+
readonly enter_vehicle_distance?: number
|
|
4409
4727
|
|
|
4410
4728
|
/**
|
|
4411
|
-
*
|
|
4729
|
+
* Whether this explosion has a beam.
|
|
4730
|
+
* @remarks
|
|
4731
|
+
* Applies to subclasses: Explosion
|
|
4732
|
+
*
|
|
4412
4733
|
*/
|
|
4413
4734
|
readonly explosion_beam?: number
|
|
4414
4735
|
|
|
4415
4736
|
/**
|
|
4416
|
-
*
|
|
4737
|
+
* Whether this explosion rotates.
|
|
4738
|
+
* @remarks
|
|
4739
|
+
* Applies to subclasses: Explosion
|
|
4740
|
+
*
|
|
4417
4741
|
*/
|
|
4418
4742
|
readonly explosion_rotate?: number
|
|
4419
4743
|
|
|
4420
4744
|
/**
|
|
4421
|
-
* The group of mutually fast-replaceable entities
|
|
4745
|
+
* The group of mutually fast-replaceable entities, if any.
|
|
4422
4746
|
*/
|
|
4423
|
-
readonly fast_replaceable_group
|
|
4747
|
+
readonly fast_replaceable_group?: string
|
|
4424
4748
|
|
|
4425
4749
|
/**
|
|
4426
|
-
* The filter count of this inserter, loader, or logistic chest
|
|
4750
|
+
* The filter count of this inserter, loader, or logistic chest. For logistic containers, `nil` means no limit.
|
|
4751
|
+
* @remarks
|
|
4752
|
+
* Applies to subclasses: Inserter,Loader,LogisticContainer
|
|
4753
|
+
*
|
|
4427
4754
|
*/
|
|
4428
4755
|
readonly filter_count?: number
|
|
4429
4756
|
|
|
4430
4757
|
/**
|
|
4431
|
-
* The final attack result for
|
|
4758
|
+
* The final attack result for this projectile.
|
|
4759
|
+
* @remarks
|
|
4760
|
+
* Applies to subclasses: Projectile
|
|
4761
|
+
*
|
|
4432
4762
|
*/
|
|
4433
|
-
readonly final_attack_result
|
|
4763
|
+
readonly final_attack_result?: TriggerItem[]
|
|
4434
4764
|
|
|
4435
4765
|
/**
|
|
4436
|
-
* The fixed recipe name for this assembling machine prototype
|
|
4766
|
+
* The fixed recipe name for this assembling machine prototype, if any.
|
|
4767
|
+
* @remarks
|
|
4768
|
+
* Applies to subclasses: AssemblingMachine
|
|
4769
|
+
*
|
|
4437
4770
|
*/
|
|
4438
4771
|
readonly fixed_recipe?: string
|
|
4439
4772
|
|
|
@@ -4443,7 +4776,10 @@ interface LuaEntityPrototype {
|
|
|
4443
4776
|
readonly flags: EntityPrototypeFlags
|
|
4444
4777
|
|
|
4445
4778
|
/**
|
|
4446
|
-
* The fluid this offshore pump produces
|
|
4779
|
+
* The fluid this offshore pump produces.
|
|
4780
|
+
* @remarks
|
|
4781
|
+
* Applies to subclasses: OffshorePump
|
|
4782
|
+
*
|
|
4447
4783
|
*/
|
|
4448
4784
|
readonly fluid?: LuaFluidPrototype
|
|
4449
4785
|
|
|
@@ -4456,12 +4792,15 @@ interface LuaEntityPrototype {
|
|
|
4456
4792
|
readonly fluid_capacity: number
|
|
4457
4793
|
|
|
4458
4794
|
/**
|
|
4459
|
-
* The fluid energy source prototype this entity uses
|
|
4795
|
+
* The fluid energy source prototype this entity uses, if any.
|
|
4460
4796
|
*/
|
|
4461
4797
|
readonly fluid_energy_source_prototype?: LuaFluidEnergySourcePrototype
|
|
4462
4798
|
|
|
4463
4799
|
/**
|
|
4464
|
-
* The fluid usage of this generator prototype
|
|
4800
|
+
* The fluid usage of this generator prototype.
|
|
4801
|
+
* @remarks
|
|
4802
|
+
* Applies to subclasses: Generator
|
|
4803
|
+
*
|
|
4465
4804
|
*/
|
|
4466
4805
|
readonly fluid_usage_per_tick?: number
|
|
4467
4806
|
|
|
@@ -4471,17 +4810,26 @@ interface LuaEntityPrototype {
|
|
|
4471
4810
|
readonly fluidbox_prototypes: LuaFluidBoxPrototype[]
|
|
4472
4811
|
|
|
4473
4812
|
/**
|
|
4474
|
-
* The flying acceleration for this rocket silo rocket prototype
|
|
4813
|
+
* The flying acceleration for this rocket silo rocket prototype.
|
|
4814
|
+
* @remarks
|
|
4815
|
+
* Applies to subclasses: RocketSiloRocket
|
|
4816
|
+
*
|
|
4475
4817
|
*/
|
|
4476
4818
|
readonly flying_acceleration?: number
|
|
4477
4819
|
|
|
4478
4820
|
/**
|
|
4479
|
-
* The flying speed for this rocket silo rocket prototype
|
|
4821
|
+
* The flying speed for this rocket silo rocket prototype.
|
|
4822
|
+
* @remarks
|
|
4823
|
+
* Applies to subclasses: RocketSiloRocket
|
|
4824
|
+
*
|
|
4480
4825
|
*/
|
|
4481
4826
|
readonly flying_speed?: number
|
|
4482
4827
|
|
|
4483
4828
|
/**
|
|
4484
|
-
* The friction of this vehicle prototype
|
|
4829
|
+
* The friction of this vehicle prototype.
|
|
4830
|
+
* @remarks
|
|
4831
|
+
* Applies to subclasses: Vehicle
|
|
4832
|
+
*
|
|
4485
4833
|
*/
|
|
4486
4834
|
readonly friction_force?: number
|
|
4487
4835
|
|
|
@@ -4491,7 +4839,7 @@ interface LuaEntityPrototype {
|
|
|
4491
4839
|
readonly friendly_map_color: Color
|
|
4492
4840
|
|
|
4493
4841
|
/**
|
|
4494
|
-
* The equipment grid prototype for this entity
|
|
4842
|
+
* The equipment grid prototype for this entity, if any.
|
|
4495
4843
|
*/
|
|
4496
4844
|
readonly grid_prototype?: LuaEquipmentGridPrototype
|
|
4497
4845
|
|
|
@@ -4501,82 +4849,134 @@ interface LuaEntityPrototype {
|
|
|
4501
4849
|
readonly group: LuaGroup
|
|
4502
4850
|
|
|
4503
4851
|
/**
|
|
4504
|
-
* A mapping of the gun name to the gun prototype this prototype uses
|
|
4852
|
+
* A mapping of the gun name to the gun prototype this prototype uses. `nil` if this entity prototype doesn't use guns.
|
|
4505
4853
|
*/
|
|
4506
4854
|
readonly guns?: {[key: string]: LuaItemPrototype}
|
|
4507
4855
|
|
|
4508
4856
|
/**
|
|
4509
|
-
* Whether this unit, car, or character prototype has belt immunity
|
|
4857
|
+
* Whether this unit, car, or character prototype has belt immunity.
|
|
4858
|
+
* @remarks
|
|
4859
|
+
* Applies to subclasses: Unit,Car,Character
|
|
4860
|
+
*
|
|
4510
4861
|
*/
|
|
4511
|
-
readonly has_belt_immunity
|
|
4862
|
+
readonly has_belt_immunity?: boolean
|
|
4512
4863
|
|
|
4513
4864
|
/**
|
|
4514
|
-
* Amount this entity can heal per tick.
|
|
4865
|
+
* Amount this entity can heal per tick, if any.
|
|
4515
4866
|
*/
|
|
4516
|
-
readonly healing_per_tick
|
|
4867
|
+
readonly healing_per_tick?: number
|
|
4517
4868
|
|
|
4518
4869
|
/**
|
|
4519
|
-
* The heat buffer prototype this entity uses
|
|
4870
|
+
* The heat buffer prototype this entity uses, if any.
|
|
4520
4871
|
*/
|
|
4521
4872
|
readonly heat_buffer_prototype?: LuaHeatBufferPrototype
|
|
4522
4873
|
|
|
4523
4874
|
/**
|
|
4524
|
-
* The heat energy source prototype this entity uses
|
|
4875
|
+
* The heat energy source prototype this entity uses, if any.
|
|
4525
4876
|
*/
|
|
4526
4877
|
readonly heat_energy_source_prototype?: LuaHeatEnergySourcePrototype
|
|
4527
4878
|
|
|
4528
4879
|
/**
|
|
4529
|
-
*
|
|
4880
|
+
* The height of this spider vehicle prototype.
|
|
4881
|
+
* @remarks
|
|
4882
|
+
* Applies to subclasses: SpiderVehicle
|
|
4883
|
+
*
|
|
4530
4884
|
*/
|
|
4531
|
-
readonly height
|
|
4885
|
+
readonly height?: number
|
|
4886
|
+
|
|
4887
|
+
/**
|
|
4888
|
+
* The idle energy usage of this rocket silo prototype.
|
|
4889
|
+
* @remarks
|
|
4890
|
+
* Applies to subclasses: RocketSilo
|
|
4891
|
+
*
|
|
4892
|
+
*/
|
|
4893
|
+
readonly idle_energy_usage?: number
|
|
4532
4894
|
|
|
4533
4895
|
/**
|
|
4534
|
-
*
|
|
4896
|
+
* A vector of the gun prototypes of this car, spider vehicule, or artillery wagon or turret.
|
|
4897
|
+
* @remarks
|
|
4898
|
+
* Applies to subclasses: Car,SpiderVehicle,ArtilleryTurret,ArtilleryWagon
|
|
4899
|
+
*
|
|
4535
4900
|
*/
|
|
4536
|
-
readonly
|
|
4901
|
+
readonly indexed_guns?: LuaItemPrototype[]
|
|
4537
4902
|
|
|
4538
4903
|
/**
|
|
4539
|
-
*
|
|
4904
|
+
* Every time this infinite resource 'ticks' down, it is reduced by this amount. Meaningless if this isn't an infinite resource.
|
|
4905
|
+
* @remarks
|
|
4906
|
+
* Applies to subclasses: ResourceEntity
|
|
4907
|
+
*
|
|
4540
4908
|
*/
|
|
4541
|
-
readonly
|
|
4909
|
+
readonly infinite_depletion_resource_amount?: number
|
|
4542
4910
|
|
|
4543
4911
|
/**
|
|
4544
|
-
*
|
|
4912
|
+
* Whether this resource is infinite.
|
|
4913
|
+
* @remarks
|
|
4914
|
+
* Applies to subclasses: ResourceEntity
|
|
4915
|
+
*
|
|
4916
|
+
*/
|
|
4917
|
+
readonly infinite_resource?: boolean
|
|
4918
|
+
|
|
4919
|
+
/**
|
|
4920
|
+
* The max number of ingredients this crafting machine prototype supports.
|
|
4921
|
+
* @remarks
|
|
4922
|
+
* Applies to subclasses: CraftingMachine
|
|
4923
|
+
*
|
|
4545
4924
|
*/
|
|
4546
4925
|
readonly ingredient_count?: number
|
|
4547
4926
|
|
|
4548
4927
|
/**
|
|
4549
|
-
* True if this inserter chases items on belts for pickup
|
|
4928
|
+
* True if this inserter chases items on belts for pickup.
|
|
4929
|
+
* @remarks
|
|
4930
|
+
* Applies to subclasses: Inserter
|
|
4931
|
+
*
|
|
4550
4932
|
*/
|
|
4551
4933
|
readonly inserter_chases_belt_items?: boolean
|
|
4552
4934
|
|
|
4553
4935
|
/**
|
|
4554
|
-
* The drop position for this inserter
|
|
4936
|
+
* The drop position for this inserter.
|
|
4937
|
+
* @remarks
|
|
4938
|
+
* Applies to subclasses: Inserter
|
|
4939
|
+
*
|
|
4555
4940
|
*/
|
|
4556
4941
|
readonly inserter_drop_position?: Vector
|
|
4557
4942
|
|
|
4558
4943
|
/**
|
|
4559
|
-
* The extension speed of this inserter
|
|
4944
|
+
* The extension speed of this inserter.
|
|
4945
|
+
* @remarks
|
|
4946
|
+
* Applies to subclasses: Inserter
|
|
4947
|
+
*
|
|
4560
4948
|
*/
|
|
4561
4949
|
readonly inserter_extension_speed?: number
|
|
4562
4950
|
|
|
4563
4951
|
/**
|
|
4564
|
-
* The pickup position for this inserter
|
|
4952
|
+
* The pickup position for this inserter.
|
|
4953
|
+
* @remarks
|
|
4954
|
+
* Applies to subclasses: Inserter
|
|
4955
|
+
*
|
|
4565
4956
|
*/
|
|
4566
4957
|
readonly inserter_pickup_position?: Vector
|
|
4567
4958
|
|
|
4568
4959
|
/**
|
|
4569
|
-
* The rotation speed of this inserter
|
|
4960
|
+
* The rotation speed of this inserter.
|
|
4961
|
+
* @remarks
|
|
4962
|
+
* Applies to subclasses: Inserter
|
|
4963
|
+
*
|
|
4570
4964
|
*/
|
|
4571
4965
|
readonly inserter_rotation_speed?: number
|
|
4572
4966
|
|
|
4573
4967
|
/**
|
|
4574
|
-
*
|
|
4968
|
+
* The built-in stack size bonus of this inserter prototype.
|
|
4969
|
+
* @remarks
|
|
4970
|
+
* Applies to subclasses: Inserter
|
|
4971
|
+
*
|
|
4575
4972
|
*/
|
|
4576
|
-
readonly inserter_stack_size_bonus
|
|
4973
|
+
readonly inserter_stack_size_bonus?: number
|
|
4577
4974
|
|
|
4578
4975
|
/**
|
|
4579
|
-
* The instruments for this programmable speaker
|
|
4976
|
+
* The instruments for this programmable speaker.
|
|
4977
|
+
* @remarks
|
|
4978
|
+
* Applies to subclasses: ProgrammableSpeaker
|
|
4979
|
+
*
|
|
4580
4980
|
*/
|
|
4581
4981
|
readonly instruments?: ProgrammableSpeakerInstrument[]
|
|
4582
4982
|
|
|
@@ -4590,40 +4990,60 @@ interface LuaEntityPrototype {
|
|
|
4590
4990
|
/**
|
|
4591
4991
|
* True if this entity-with-owner is military target
|
|
4592
4992
|
* @remarks
|
|
4593
|
-
* Applies to subclasses:
|
|
4993
|
+
* Applies to subclasses: EntityWithOwner
|
|
4594
4994
|
*
|
|
4595
4995
|
*/
|
|
4596
|
-
readonly is_military_target
|
|
4996
|
+
readonly is_military_target?: boolean
|
|
4597
4997
|
|
|
4598
4998
|
/**
|
|
4599
4999
|
* @remarks
|
|
4600
5000
|
* Applies to subclasses: Character
|
|
4601
5001
|
*
|
|
4602
5002
|
*/
|
|
4603
|
-
readonly item_pickup_distance
|
|
5003
|
+
readonly item_pickup_distance?: number
|
|
4604
5004
|
|
|
4605
5005
|
/**
|
|
4606
|
-
* The item slot count of this constant combinator prototype
|
|
5006
|
+
* The item slot count of this constant combinator prototype.
|
|
5007
|
+
* @remarks
|
|
5008
|
+
* Applies to subclasses: ConstantCombinator
|
|
5009
|
+
*
|
|
4607
5010
|
*/
|
|
4608
5011
|
readonly item_slot_count?: number
|
|
4609
5012
|
|
|
4610
5013
|
/**
|
|
4611
|
-
* Items that
|
|
5014
|
+
* Items that when placed will produce this entity, if any. Construction bots will always choose the first item in this list to build this entity.
|
|
4612
5015
|
*/
|
|
4613
5016
|
readonly items_to_place_this?: SimpleItemStack[]
|
|
4614
5017
|
|
|
4615
5018
|
/**
|
|
4616
|
-
* The item prototype names that are the inputs of this lab prototype
|
|
5019
|
+
* The item prototype names that are the inputs of this lab prototype.
|
|
5020
|
+
* @remarks
|
|
5021
|
+
* Applies to subclasses: Lab
|
|
5022
|
+
*
|
|
4617
5023
|
*/
|
|
4618
5024
|
readonly lab_inputs?: string[]
|
|
4619
5025
|
|
|
4620
5026
|
/**
|
|
4621
|
-
* The
|
|
5027
|
+
* The lamp energy usage of this rocket silo prototype.
|
|
5028
|
+
* @remarks
|
|
5029
|
+
* Applies to subclasses: RocketSilo
|
|
5030
|
+
*
|
|
5031
|
+
*/
|
|
5032
|
+
readonly lamp_energy_usage?: number
|
|
5033
|
+
|
|
5034
|
+
/**
|
|
5035
|
+
* The rocket launch delay for this rocket silo prototype.
|
|
5036
|
+
* @remarks
|
|
5037
|
+
* Applies to subclasses: RocketSilo
|
|
5038
|
+
*
|
|
4622
5039
|
*/
|
|
4623
5040
|
readonly launch_wait_time?: number
|
|
4624
5041
|
|
|
4625
5042
|
/**
|
|
4626
|
-
* The light blinking speed for this rocket silo prototype
|
|
5043
|
+
* The light blinking speed for this rocket silo prototype.
|
|
5044
|
+
* @remarks
|
|
5045
|
+
* Applies to subclasses: RocketSilo
|
|
5046
|
+
*
|
|
4627
5047
|
*/
|
|
4628
5048
|
readonly light_blinking_speed?: number
|
|
4629
5049
|
|
|
@@ -4632,44 +5052,70 @@ interface LuaEntityPrototype {
|
|
|
4632
5052
|
readonly localised_name: LocalisedString
|
|
4633
5053
|
|
|
4634
5054
|
/**
|
|
4635
|
-
* The logistic mode of this logistic container
|
|
5055
|
+
* The logistic mode of this logistic container. One of `"requester"`, `"active-provider"`, `"passive-provider"`, `"buffer"`, `"storage"`, `"none"`.
|
|
5056
|
+
* @remarks
|
|
5057
|
+
* Applies to subclasses: LogisticContainer
|
|
5058
|
+
*
|
|
4636
5059
|
*/
|
|
4637
5060
|
readonly logistic_mode?: string
|
|
4638
5061
|
|
|
4639
5062
|
/**
|
|
4640
|
-
* The logistic parameters for this roboport.
|
|
5063
|
+
* The logistic parameters for this roboport.
|
|
4641
5064
|
* @remarks
|
|
4642
5065
|
* Both the `charging_station_shift` and `stationing_offset` vectors are tables with `x` and `y` keys instead of an array.
|
|
5066
|
+
* Applies to subclasses: Roboport
|
|
4643
5067
|
*
|
|
4644
5068
|
*/
|
|
4645
|
-
readonly logistic_parameters?: {
|
|
5069
|
+
readonly logistic_parameters?: {
|
|
5070
|
+
charge_approach_distance: number,
|
|
5071
|
+
charging_distance: number,
|
|
5072
|
+
charging_energy: number,
|
|
5073
|
+
charging_station_count: number,
|
|
5074
|
+
charging_station_shift: Vector,
|
|
5075
|
+
charging_threshold_distance: number,
|
|
5076
|
+
construction_radius: number,
|
|
5077
|
+
logistic_radius: number,
|
|
5078
|
+
logistics_connection_distance: number,
|
|
5079
|
+
robot_limit: number,
|
|
5080
|
+
robot_vertical_acceleration: number,
|
|
5081
|
+
robots_shrink_when_entering_and_exiting: boolean,
|
|
5082
|
+
spawn_and_station_height: number,
|
|
5083
|
+
spawn_and_station_shadow_height_offset: number,
|
|
5084
|
+
stationing_offset: Vector
|
|
5085
|
+
}
|
|
4646
5086
|
|
|
4647
5087
|
/**
|
|
4648
|
-
* The logistic radius for this roboport prototype
|
|
5088
|
+
* The logistic radius for this roboport prototype.
|
|
5089
|
+
* @remarks
|
|
5090
|
+
* Applies to subclasses: Roboport
|
|
5091
|
+
*
|
|
4649
5092
|
*/
|
|
4650
5093
|
readonly logistic_radius?: number
|
|
4651
5094
|
|
|
4652
5095
|
/**
|
|
4653
|
-
* Loot that will be dropped when this entity is killed
|
|
5096
|
+
* Loot that will be dropped when this entity is killed, if any.
|
|
5097
|
+
* @remarks
|
|
5098
|
+
* Applies to subclasses: EntityWithHealth
|
|
5099
|
+
*
|
|
4654
5100
|
*/
|
|
4655
|
-
readonly loot
|
|
5101
|
+
readonly loot?: Loot[]
|
|
4656
5102
|
|
|
4657
5103
|
/**
|
|
4658
5104
|
* @remarks
|
|
4659
5105
|
* Applies to subclasses: Character
|
|
4660
5106
|
*
|
|
4661
5107
|
*/
|
|
4662
|
-
readonly loot_pickup_distance
|
|
5108
|
+
readonly loot_pickup_distance?: number
|
|
4663
5109
|
|
|
4664
5110
|
/**
|
|
4665
|
-
*
|
|
5111
|
+
* The manual range modifier for this artillery turret or wagon prototype.
|
|
4666
5112
|
*
|
|
4667
5113
|
* subclass(ArtilleryWagon, ArtilleryTurret)
|
|
4668
5114
|
*/
|
|
4669
|
-
readonly manual_range_modifier
|
|
5115
|
+
readonly manual_range_modifier?: number
|
|
4670
5116
|
|
|
4671
5117
|
/**
|
|
4672
|
-
* The map color used when charting this entity if a friendly or enemy color isn't defined
|
|
5118
|
+
* The map color used when charting this entity if a friendly or enemy color isn't defined, if any.
|
|
4673
5119
|
*/
|
|
4674
5120
|
readonly map_color?: Color
|
|
4675
5121
|
|
|
@@ -4679,32 +5125,47 @@ interface LuaEntityPrototype {
|
|
|
4679
5125
|
readonly map_generator_bounding_box: BoundingBox
|
|
4680
5126
|
|
|
4681
5127
|
/**
|
|
4682
|
-
* The maximum circuit wire distance for this entity. 0
|
|
5128
|
+
* The maximum circuit wire distance for this entity. 0 if the entity doesn't support circuit wires.
|
|
4683
5129
|
*/
|
|
4684
5130
|
readonly max_circuit_wire_distance: number
|
|
4685
5131
|
|
|
4686
5132
|
/**
|
|
4687
5133
|
* Count of enemies this spawner can sustain.
|
|
5134
|
+
* @remarks
|
|
5135
|
+
* Applies to subclasses: Spawner
|
|
5136
|
+
*
|
|
4688
5137
|
*/
|
|
4689
|
-
readonly max_count_of_owned_units
|
|
5138
|
+
readonly max_count_of_owned_units?: number
|
|
4690
5139
|
|
|
4691
5140
|
/**
|
|
4692
5141
|
* The maximum darkness at which this unit spawner can spawn entities.
|
|
5142
|
+
* @remarks
|
|
5143
|
+
* Applies to subclasses: Spawner
|
|
5144
|
+
*
|
|
4693
5145
|
*/
|
|
4694
|
-
readonly max_darkness_to_spawn
|
|
5146
|
+
readonly max_darkness_to_spawn?: number
|
|
4695
5147
|
|
|
4696
5148
|
/**
|
|
4697
5149
|
* The radius of the area constantly revealed by this radar, in chunks.
|
|
5150
|
+
* @remarks
|
|
5151
|
+
* Applies to subclasses: Radar
|
|
5152
|
+
*
|
|
4698
5153
|
*/
|
|
4699
|
-
readonly max_distance_of_nearby_sector_revealed
|
|
5154
|
+
readonly max_distance_of_nearby_sector_revealed?: number
|
|
4700
5155
|
|
|
4701
5156
|
/**
|
|
4702
5157
|
* The radius of the area this radar can chart, in chunks.
|
|
5158
|
+
* @remarks
|
|
5159
|
+
* Applies to subclasses: Radar
|
|
5160
|
+
*
|
|
4703
5161
|
*/
|
|
4704
|
-
readonly max_distance_of_sector_revealed
|
|
5162
|
+
readonly max_distance_of_sector_revealed?: number
|
|
4705
5163
|
|
|
4706
5164
|
/**
|
|
4707
|
-
* The max energy for this flying robot
|
|
5165
|
+
* The max energy for this flying robot.
|
|
5166
|
+
* @remarks
|
|
5167
|
+
* Applies to subclasses: FlyingRobot
|
|
5168
|
+
*
|
|
4708
5169
|
*/
|
|
4709
5170
|
readonly max_energy?: number
|
|
4710
5171
|
|
|
@@ -4720,8 +5181,11 @@ interface LuaEntityPrototype {
|
|
|
4720
5181
|
|
|
4721
5182
|
/**
|
|
4722
5183
|
* How many friendly units are required within the spawning_radius of this spawner for it to stop producing more units.
|
|
5184
|
+
* @remarks
|
|
5185
|
+
* Applies to subclasses: Spawner
|
|
5186
|
+
*
|
|
4723
5187
|
*/
|
|
4724
|
-
readonly max_friends_around_to_spawn
|
|
5188
|
+
readonly max_friends_around_to_spawn?: number
|
|
4725
5189
|
|
|
4726
5190
|
/**
|
|
4727
5191
|
* Max health of this entity. Will be `0` if this is not an entity with health.
|
|
@@ -4729,42 +5193,63 @@ interface LuaEntityPrototype {
|
|
|
4729
5193
|
readonly max_health: number
|
|
4730
5194
|
|
|
4731
5195
|
/**
|
|
4732
|
-
* The max payload size of this logistics or construction robot
|
|
5196
|
+
* The max payload size of this logistics or construction robot.
|
|
5197
|
+
* @remarks
|
|
5198
|
+
* Applies to subclasses: RobotWithLogisticsInterface
|
|
5199
|
+
*
|
|
4733
5200
|
*/
|
|
4734
5201
|
readonly max_payload_size?: number
|
|
4735
5202
|
|
|
4736
5203
|
/**
|
|
4737
|
-
* The maximum polyphony for this programmable speaker
|
|
5204
|
+
* The maximum polyphony for this programmable speaker.
|
|
5205
|
+
* @remarks
|
|
5206
|
+
* Applies to subclasses: ProgrammableSpeaker
|
|
5207
|
+
*
|
|
4738
5208
|
*/
|
|
4739
5209
|
readonly max_polyphony?: number
|
|
4740
5210
|
|
|
4741
5211
|
/**
|
|
4742
|
-
* The default maximum power output of this generator prototype
|
|
5212
|
+
* The default maximum power output of this generator prototype.
|
|
5213
|
+
* @remarks
|
|
5214
|
+
* Applies to subclasses: Generator
|
|
5215
|
+
*
|
|
4743
5216
|
*/
|
|
4744
5217
|
readonly max_power_output?: number
|
|
4745
5218
|
|
|
4746
5219
|
/**
|
|
4747
|
-
* The maximum pursue distance of this unit prototype
|
|
5220
|
+
* The maximum pursue distance of this unit prototype.
|
|
5221
|
+
* @remarks
|
|
5222
|
+
* Applies to subclasses: Unit
|
|
5223
|
+
*
|
|
4748
5224
|
*/
|
|
4749
5225
|
readonly max_pursue_distance?: number
|
|
4750
5226
|
|
|
4751
5227
|
/**
|
|
4752
|
-
* The max speed of this projectile
|
|
5228
|
+
* The max speed of this projectile or flying robot prototype.
|
|
5229
|
+
* @remarks
|
|
5230
|
+
* Applies to subclasses: Projectile,FlyingRobot
|
|
5231
|
+
*
|
|
4753
5232
|
*/
|
|
4754
5233
|
readonly max_speed?: number
|
|
4755
5234
|
|
|
4756
5235
|
/**
|
|
4757
|
-
* The maximum energy for this flying robot above which it won't try to recharge when stationing
|
|
5236
|
+
* The maximum energy for this flying robot above which it won't try to recharge when stationing.
|
|
5237
|
+
* @remarks
|
|
5238
|
+
* Applies to subclasses: FlyingRobot
|
|
5239
|
+
*
|
|
4758
5240
|
*/
|
|
4759
5241
|
readonly max_to_charge?: number
|
|
4760
5242
|
|
|
4761
5243
|
/**
|
|
4762
|
-
* The max underground distance for underground belts and underground pipes
|
|
5244
|
+
* The max underground distance for underground belts and underground pipes.
|
|
5245
|
+
* @remarks
|
|
5246
|
+
* Applies to subclasses: UndergroundBelt,PipeToGround
|
|
5247
|
+
*
|
|
4763
5248
|
*/
|
|
4764
5249
|
readonly max_underground_distance?: number
|
|
4765
5250
|
|
|
4766
5251
|
/**
|
|
4767
|
-
* The maximum wire distance for this entity. 0
|
|
5252
|
+
* The maximum wire distance for this entity. 0 if the entity doesn't support wires.
|
|
4768
5253
|
*/
|
|
4769
5254
|
readonly max_wire_distance: number
|
|
4770
5255
|
|
|
@@ -4773,55 +5258,115 @@ interface LuaEntityPrototype {
|
|
|
4773
5258
|
* Applies to subclasses: Character
|
|
4774
5259
|
*
|
|
4775
5260
|
*/
|
|
4776
|
-
readonly maximum_corner_sliding_distance
|
|
5261
|
+
readonly maximum_corner_sliding_distance?: number
|
|
4777
5262
|
|
|
4778
5263
|
/**
|
|
4779
|
-
* The maximum fluid temperature of this generator prototype
|
|
5264
|
+
* The maximum fluid temperature of this generator prototype.
|
|
5265
|
+
* @remarks
|
|
5266
|
+
* Applies to subclasses: Generator
|
|
5267
|
+
*
|
|
4780
5268
|
*/
|
|
4781
5269
|
readonly maximum_temperature?: number
|
|
4782
5270
|
|
|
4783
5271
|
/**
|
|
4784
5272
|
* The minimum darkness at which this unit spawner can spawn entities.
|
|
5273
|
+
* @remarks
|
|
5274
|
+
* Applies to subclasses: Spawner
|
|
5275
|
+
*
|
|
4785
5276
|
*/
|
|
4786
|
-
readonly min_darkness_to_spawn
|
|
5277
|
+
readonly min_darkness_to_spawn?: number
|
|
4787
5278
|
|
|
4788
5279
|
/**
|
|
4789
|
-
* The minimum pursue time of this unit prototype
|
|
5280
|
+
* The minimum pursue time of this unit prototype.
|
|
5281
|
+
* @remarks
|
|
5282
|
+
* Applies to subclasses: Unit
|
|
5283
|
+
*
|
|
4790
5284
|
*/
|
|
4791
5285
|
readonly min_pursue_time?: number
|
|
4792
5286
|
|
|
4793
5287
|
/**
|
|
4794
|
-
* The minimum energy for this flying robot before it tries to recharge
|
|
5288
|
+
* The minimum energy for this flying robot before it tries to recharge.
|
|
5289
|
+
* @remarks
|
|
5290
|
+
* Applies to subclasses: FlyingRobot
|
|
5291
|
+
*
|
|
4795
5292
|
*/
|
|
4796
5293
|
readonly min_to_charge?: number
|
|
4797
5294
|
|
|
4798
5295
|
/**
|
|
4799
5296
|
* Whether this entity is minable and what can be obtained by mining it.
|
|
4800
5297
|
*/
|
|
4801
|
-
readonly mineable_properties: {
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
5298
|
+
readonly mineable_properties: {
|
|
5299
|
+
|
|
5300
|
+
/**
|
|
5301
|
+
* The required fluid amount if any.
|
|
5302
|
+
*/
|
|
5303
|
+
fluid_amount?: number,
|
|
5304
|
+
|
|
5305
|
+
/**
|
|
5306
|
+
* Is this entity mineable at all?
|
|
5307
|
+
*/
|
|
5308
|
+
minable: boolean,
|
|
5309
|
+
|
|
5310
|
+
/**
|
|
5311
|
+
* Prototype name of the particle produced when mining this entity. Will only be present if this entity produces any particle during mining.
|
|
5312
|
+
*/
|
|
5313
|
+
mining_particle?: string,
|
|
5314
|
+
|
|
5315
|
+
/**
|
|
5316
|
+
* Energy required to mine an entity.
|
|
5317
|
+
*/
|
|
5318
|
+
mining_time: number,
|
|
5319
|
+
|
|
5320
|
+
/**
|
|
5321
|
+
* The mining trigger if any.
|
|
5322
|
+
*/
|
|
5323
|
+
mining_trigger?: TriggerItem[],
|
|
5324
|
+
|
|
5325
|
+
/**
|
|
5326
|
+
* Products obtained by mining this entity.
|
|
5327
|
+
*/
|
|
5328
|
+
products?: Product[],
|
|
5329
|
+
|
|
5330
|
+
/**
|
|
5331
|
+
* The prototype name of the required fluid if any.
|
|
5332
|
+
*/
|
|
5333
|
+
required_fluid?: string
|
|
5334
|
+
}
|
|
5335
|
+
|
|
5336
|
+
/**
|
|
5337
|
+
* Minimum amount of this resource.
|
|
5338
|
+
* @remarks
|
|
5339
|
+
* Applies to subclasses: ResourceEntity
|
|
5340
|
+
*
|
|
4805
5341
|
*/
|
|
4806
|
-
readonly minimum_resource_amount
|
|
5342
|
+
readonly minimum_resource_amount?: number
|
|
4807
5343
|
|
|
4808
5344
|
/**
|
|
4809
|
-
* The mining radius of this mining drill prototype
|
|
5345
|
+
* The mining radius of this mining drill prototype.
|
|
5346
|
+
* @remarks
|
|
5347
|
+
* Applies to subclasses: MiningDrill
|
|
5348
|
+
*
|
|
4810
5349
|
*/
|
|
4811
5350
|
readonly mining_drill_radius?: number
|
|
4812
5351
|
|
|
4813
5352
|
/**
|
|
4814
|
-
* The mining speed of this mining drill/character prototype
|
|
5353
|
+
* The mining speed of this mining drill/character prototype.
|
|
5354
|
+
* @remarks
|
|
5355
|
+
* Applies to subclasses: MiningDrill,Character
|
|
5356
|
+
*
|
|
4815
5357
|
*/
|
|
4816
5358
|
readonly mining_speed?: number
|
|
4817
5359
|
|
|
4818
5360
|
/**
|
|
4819
|
-
* The module inventory size
|
|
5361
|
+
* The module inventory size. `nil` if this entity doesn't support modules.
|
|
4820
5362
|
*/
|
|
4821
5363
|
readonly module_inventory_size?: number
|
|
4822
5364
|
|
|
4823
5365
|
/**
|
|
4824
|
-
* Whether this unit prototype can move while shooting
|
|
5366
|
+
* Whether this unit prototype can move while shooting.
|
|
5367
|
+
* @remarks
|
|
5368
|
+
* Applies to subclasses: Unit
|
|
5369
|
+
*
|
|
4825
5370
|
*/
|
|
4826
5371
|
readonly move_while_shooting?: boolean
|
|
4827
5372
|
|
|
@@ -4835,17 +5380,20 @@ interface LuaEntityPrototype {
|
|
|
4835
5380
|
* Applies to subclasses: Reactor
|
|
4836
5381
|
*
|
|
4837
5382
|
*/
|
|
4838
|
-
readonly neighbour_bonus
|
|
5383
|
+
readonly neighbour_bonus?: number
|
|
4839
5384
|
|
|
4840
5385
|
/**
|
|
4841
|
-
* The next upgrade for this entity
|
|
5386
|
+
* The next upgrade for this entity, if any.
|
|
4842
5387
|
*/
|
|
4843
5388
|
readonly next_upgrade?: LuaEntityPrototype
|
|
4844
5389
|
|
|
4845
5390
|
/**
|
|
4846
|
-
* The normal amount for this resource.
|
|
5391
|
+
* The normal amount for this resource.
|
|
5392
|
+
* @remarks
|
|
5393
|
+
* Applies to subclasses: ResourceEntity
|
|
5394
|
+
*
|
|
4847
5395
|
*/
|
|
4848
|
-
readonly normal_resource_amount
|
|
5396
|
+
readonly normal_resource_amount?: number
|
|
4849
5397
|
|
|
4850
5398
|
/**
|
|
4851
5399
|
* The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
|
@@ -4858,9 +5406,12 @@ interface LuaEntityPrototype {
|
|
|
4858
5406
|
readonly order: string
|
|
4859
5407
|
|
|
4860
5408
|
/**
|
|
4861
|
-
* The amount of pollution that has to be absorbed by the unit's spawner before the unit will leave the spawner and attack the source of the pollution.
|
|
5409
|
+
* The amount of pollution that has to be absorbed by the unit's spawner before the unit will leave the spawner and attack the source of the pollution.
|
|
5410
|
+
* @remarks
|
|
5411
|
+
* Applies to subclasses: Unit
|
|
5412
|
+
*
|
|
4862
5413
|
*/
|
|
4863
|
-
readonly pollution_to_join_attack
|
|
5414
|
+
readonly pollution_to_join_attack?: number
|
|
4864
5415
|
|
|
4865
5416
|
/**
|
|
4866
5417
|
* True if this entity prototype should be included during tile collision checks with {@link LuaTilePrototype::check_collision_with_entities | LuaTilePrototype::check_collision_with_entities} enabled.
|
|
@@ -4868,12 +5419,18 @@ interface LuaEntityPrototype {
|
|
|
4868
5419
|
readonly protected_from_tile_building: boolean
|
|
4869
5420
|
|
|
4870
5421
|
/**
|
|
4871
|
-
* The pumping speed of this offshore
|
|
5422
|
+
* The pumping speed of this offshore or normal pump.
|
|
5423
|
+
* @remarks
|
|
5424
|
+
* Applies to subclasses: OffshorePump,Pump
|
|
5425
|
+
*
|
|
4872
5426
|
*/
|
|
4873
5427
|
readonly pumping_speed?: number
|
|
4874
5428
|
|
|
4875
5429
|
/**
|
|
4876
|
-
* The radar range of this unit prototype
|
|
5430
|
+
* The radar range of this unit prototype.
|
|
5431
|
+
* @remarks
|
|
5432
|
+
* Applies to subclasses: Unit
|
|
5433
|
+
*
|
|
4877
5434
|
*/
|
|
4878
5435
|
readonly radar_range?: number
|
|
4879
5436
|
|
|
@@ -4887,21 +5444,21 @@ interface LuaEntityPrototype {
|
|
|
4887
5444
|
* Applies to subclasses: Character
|
|
4888
5445
|
*
|
|
4889
5446
|
*/
|
|
4890
|
-
readonly reach_distance
|
|
5447
|
+
readonly reach_distance?: number
|
|
4891
5448
|
|
|
4892
5449
|
/**
|
|
4893
5450
|
* @remarks
|
|
4894
5451
|
* Applies to subclasses: Character
|
|
4895
5452
|
*
|
|
4896
5453
|
*/
|
|
4897
|
-
readonly reach_resource_distance
|
|
5454
|
+
readonly reach_resource_distance?: number
|
|
4898
5455
|
|
|
4899
5456
|
/**
|
|
4900
5457
|
* @remarks
|
|
4901
5458
|
* Applies to subclasses: TransportBelt
|
|
4902
5459
|
*
|
|
4903
5460
|
*/
|
|
4904
|
-
readonly related_underground_belt
|
|
5461
|
+
readonly related_underground_belt?: LuaEntityPrototype
|
|
4905
5462
|
|
|
4906
5463
|
/**
|
|
4907
5464
|
* The remains left behind when this entity is mined.
|
|
@@ -4911,32 +5468,43 @@ interface LuaEntityPrototype {
|
|
|
4911
5468
|
readonly remove_decoratives: string
|
|
4912
5469
|
|
|
4913
5470
|
/**
|
|
4914
|
-
* Repair-speed modifier for this entity. Actual repair speed will be `tool_repair_speed * entity_repair_speed_modifier`.
|
|
5471
|
+
* Repair-speed modifier for this entity, if any. Actual repair speed will be `tool_repair_speed * entity_repair_speed_modifier`.
|
|
5472
|
+
* @remarks
|
|
5473
|
+
* Applies to subclasses: EntityWithHealth
|
|
5474
|
+
*
|
|
4915
5475
|
*/
|
|
4916
|
-
readonly repair_speed_modifier
|
|
5476
|
+
readonly repair_speed_modifier?: number
|
|
4917
5477
|
|
|
4918
5478
|
/**
|
|
4919
|
-
* The base researching speed of this lab prototype
|
|
5479
|
+
* The base researching speed of this lab prototype.
|
|
5480
|
+
* @remarks
|
|
5481
|
+
* Applies to subclasses: Lab
|
|
5482
|
+
*
|
|
4920
5483
|
*/
|
|
4921
5484
|
readonly researching_speed?: number
|
|
4922
5485
|
|
|
4923
5486
|
/**
|
|
4924
5487
|
* List of resistances towards each damage type. It is a dictionary indexed by damage type names (see `data/base/prototypes/damage-type.lua`).
|
|
5488
|
+
* @remarks
|
|
5489
|
+
* Applies to subclasses: EntityWithHealth
|
|
5490
|
+
*
|
|
4925
5491
|
*/
|
|
4926
|
-
readonly resistances
|
|
5492
|
+
readonly resistances?: {[key: string]: Resistance}
|
|
4927
5493
|
|
|
4928
5494
|
/**
|
|
4929
|
-
* The resource categories this character or mining drill supports
|
|
5495
|
+
* The resource categories this character or mining drill supports.
|
|
4930
5496
|
* @remarks
|
|
4931
|
-
* The value in the dictionary is meaningless and exists just to allow
|
|
5497
|
+
* The value in the dictionary is meaningless and exists just to allow for easy lookup.
|
|
5498
|
+
* Applies to subclasses: MiningDrill,Character
|
|
4932
5499
|
*
|
|
4933
5500
|
*/
|
|
4934
5501
|
readonly resource_categories?: {[key: string]: boolean}
|
|
4935
5502
|
|
|
4936
5503
|
/**
|
|
4937
|
-
* Name of the category of this resource
|
|
5504
|
+
* Name of the category of this resource.
|
|
4938
5505
|
* @remarks
|
|
4939
|
-
* During data stage this property is named "category".
|
|
5506
|
+
* During data stage, this property is named "category".
|
|
5507
|
+
* Applies to subclasses: ResourceEntity
|
|
4940
5508
|
*
|
|
4941
5509
|
*/
|
|
4942
5510
|
readonly resource_category?: string
|
|
@@ -4946,53 +5514,74 @@ interface LuaEntityPrototype {
|
|
|
4946
5514
|
* Applies to subclasses: Character
|
|
4947
5515
|
*
|
|
4948
5516
|
*/
|
|
4949
|
-
readonly respawn_time
|
|
5517
|
+
readonly respawn_time?: number
|
|
4950
5518
|
|
|
4951
5519
|
/**
|
|
4952
5520
|
* The result units and spawn points with weight and evolution factor for a biter spawner entity.
|
|
5521
|
+
* @remarks
|
|
5522
|
+
* Applies to subclasses: Spawner
|
|
5523
|
+
*
|
|
4953
5524
|
*/
|
|
4954
|
-
readonly result_units
|
|
5525
|
+
readonly result_units?: UnitSpawnDefinition[]
|
|
4955
5526
|
|
|
4956
5527
|
/**
|
|
4957
|
-
* The rising speed for this rocket silo rocket prototype
|
|
5528
|
+
* The rising speed for this rocket silo rocket prototype.
|
|
5529
|
+
* @remarks
|
|
5530
|
+
* Applies to subclasses: RocketSiloRocket
|
|
5531
|
+
*
|
|
4958
5532
|
*/
|
|
4959
5533
|
readonly rising_speed?: number
|
|
4960
5534
|
|
|
4961
5535
|
/**
|
|
4962
|
-
* The rocket entity prototype associated with this rocket silo prototype
|
|
5536
|
+
* The rocket entity prototype associated with this rocket silo prototype.
|
|
5537
|
+
* @remarks
|
|
5538
|
+
* Applies to subclasses: RocketSilo
|
|
5539
|
+
*
|
|
4963
5540
|
*/
|
|
4964
5541
|
readonly rocket_entity_prototype?: LuaEntityPrototype
|
|
4965
5542
|
|
|
4966
5543
|
/**
|
|
4967
|
-
* The rocket parts required for this rocket silo prototype
|
|
5544
|
+
* The rocket parts required for this rocket silo prototype.
|
|
5545
|
+
* @remarks
|
|
5546
|
+
* Applies to subclasses: RocketSilo
|
|
5547
|
+
*
|
|
4968
5548
|
*/
|
|
4969
5549
|
readonly rocket_parts_required?: number
|
|
4970
5550
|
|
|
4971
5551
|
/**
|
|
4972
|
-
* The rocket rising delay for this rocket silo prototype
|
|
5552
|
+
* The rocket rising delay for this rocket silo prototype.
|
|
5553
|
+
* @remarks
|
|
5554
|
+
* Applies to subclasses: RocketSilo
|
|
5555
|
+
*
|
|
4973
5556
|
*/
|
|
4974
5557
|
readonly rocket_rising_delay?: number
|
|
4975
5558
|
|
|
4976
5559
|
/**
|
|
4977
|
-
* The rotation speed of this car prototype
|
|
5560
|
+
* The rotation speed of this car prototype.
|
|
5561
|
+
* @remarks
|
|
5562
|
+
* Applies to subclasses: Car
|
|
5563
|
+
*
|
|
4978
5564
|
*/
|
|
4979
5565
|
readonly rotation_speed?: number
|
|
4980
5566
|
|
|
4981
5567
|
/**
|
|
4982
|
-
*
|
|
5568
|
+
* The current movement speed of this character, including effects from exoskeletons, tiles, stickers and shooting.
|
|
4983
5569
|
* @remarks
|
|
4984
5570
|
* Applies to subclasses: Character
|
|
4985
5571
|
*
|
|
4986
5572
|
*/
|
|
4987
|
-
readonly running_speed
|
|
5573
|
+
readonly running_speed?: number
|
|
4988
5574
|
|
|
4989
5575
|
/**
|
|
4990
|
-
*
|
|
5576
|
+
* Whether this generator prototype scales fluid usage.
|
|
5577
|
+
* @remarks
|
|
5578
|
+
* Applies to subclasses: Generator
|
|
5579
|
+
*
|
|
4991
5580
|
*/
|
|
4992
|
-
readonly scale_fluid_usage
|
|
5581
|
+
readonly scale_fluid_usage?: boolean
|
|
4993
5582
|
|
|
4994
5583
|
/**
|
|
4995
|
-
* The secondary bounding box used for collision checking,
|
|
5584
|
+
* The secondary bounding box used for collision checking, if any. This is only used in rails and rail remnants.
|
|
4996
5585
|
*/
|
|
4997
5586
|
readonly secondary_collision_box?: BoundingBox
|
|
4998
5587
|
|
|
@@ -5017,42 +5606,63 @@ interface LuaEntityPrototype {
|
|
|
5017
5606
|
readonly shooting_cursor_size: number
|
|
5018
5607
|
|
|
5019
5608
|
/**
|
|
5020
|
-
* The spawning cooldown for this enemy spawner prototype
|
|
5609
|
+
* The spawning cooldown for this enemy spawner prototype.
|
|
5610
|
+
* @remarks
|
|
5611
|
+
* Applies to subclasses: Spawner
|
|
5612
|
+
*
|
|
5021
5613
|
*/
|
|
5022
|
-
readonly spawn_cooldown?: {
|
|
5614
|
+
readonly spawn_cooldown?: {
|
|
5615
|
+
max: number,
|
|
5616
|
+
min: number
|
|
5617
|
+
}
|
|
5023
5618
|
|
|
5024
5619
|
/**
|
|
5025
5620
|
* How far from the spawner can the units be spawned.
|
|
5621
|
+
* @remarks
|
|
5622
|
+
* Applies to subclasses: Spawner
|
|
5623
|
+
*
|
|
5026
5624
|
*/
|
|
5027
|
-
readonly spawning_radius
|
|
5625
|
+
readonly spawning_radius?: number
|
|
5028
5626
|
|
|
5029
5627
|
/**
|
|
5030
5628
|
* What spaces should be between the spawned units.
|
|
5629
|
+
* @remarks
|
|
5630
|
+
* Applies to subclasses: Spawner
|
|
5631
|
+
*
|
|
5031
5632
|
*/
|
|
5032
|
-
readonly spawning_spacing
|
|
5633
|
+
readonly spawning_spacing?: number
|
|
5033
5634
|
|
|
5034
5635
|
/**
|
|
5035
|
-
* The spawning time modifier of this unit prototype
|
|
5636
|
+
* The spawning time modifier of this unit prototype.
|
|
5637
|
+
* @remarks
|
|
5638
|
+
* Applies to subclasses: Unit
|
|
5639
|
+
*
|
|
5036
5640
|
*/
|
|
5037
5641
|
readonly spawning_time_modifier?: number
|
|
5038
5642
|
|
|
5039
5643
|
/**
|
|
5040
|
-
* The default speed of this flying robot, rolling stock or unit
|
|
5644
|
+
* The default speed of this flying robot, rolling stock or unit. For rolling stocks, this is their `max_speed`.
|
|
5041
5645
|
* @remarks
|
|
5042
|
-
*
|
|
5646
|
+
* Applies to subclasses: FlyingRobot,RollingStock,Unit
|
|
5043
5647
|
*
|
|
5044
5648
|
*/
|
|
5045
|
-
readonly speed
|
|
5649
|
+
readonly speed?: number
|
|
5046
5650
|
|
|
5047
5651
|
/**
|
|
5048
|
-
* The speed multiplier when this flying robot is out of energy
|
|
5652
|
+
* The speed multiplier when this flying robot is out of energy.
|
|
5653
|
+
* @remarks
|
|
5654
|
+
* Applies to subclasses: FlyingRobot
|
|
5655
|
+
*
|
|
5049
5656
|
*/
|
|
5050
5657
|
readonly speed_multiplier_when_out_of_energy?: number
|
|
5051
5658
|
|
|
5052
5659
|
/**
|
|
5053
|
-
*
|
|
5660
|
+
* Whether this inserter is a stack-type.
|
|
5661
|
+
* @remarks
|
|
5662
|
+
* Applies to subclasses: Inserter
|
|
5663
|
+
*
|
|
5054
5664
|
*/
|
|
5055
|
-
readonly stack
|
|
5665
|
+
readonly stack?: boolean
|
|
5056
5666
|
|
|
5057
5667
|
/**
|
|
5058
5668
|
* The bounding box used to attach sticker type entities.
|
|
@@ -5065,50 +5675,72 @@ interface LuaEntityPrototype {
|
|
|
5065
5675
|
readonly subgroup: LuaGroup
|
|
5066
5676
|
|
|
5067
5677
|
/**
|
|
5068
|
-
* The supply area of this electric pole
|
|
5678
|
+
* The supply area of this electric pole or beacon prototype.
|
|
5679
|
+
* @remarks
|
|
5680
|
+
* Applies to subclasses: ElectricPole,Beacon
|
|
5681
|
+
*
|
|
5069
5682
|
*/
|
|
5070
5683
|
readonly supply_area_distance?: number
|
|
5071
5684
|
|
|
5072
5685
|
/**
|
|
5073
|
-
*
|
|
5686
|
+
* Whether this entity prototype could possibly ever be rotated.
|
|
5074
5687
|
*/
|
|
5075
5688
|
readonly supports_direction: boolean
|
|
5076
5689
|
|
|
5077
5690
|
/**
|
|
5078
|
-
* If this car prototype uses tank controls to drive
|
|
5691
|
+
* If this car prototype uses tank controls to drive.
|
|
5692
|
+
* @remarks
|
|
5693
|
+
* Applies to subclasses: Car
|
|
5694
|
+
*
|
|
5079
5695
|
*/
|
|
5080
5696
|
readonly tank_driving?: boolean
|
|
5081
5697
|
|
|
5082
5698
|
/**
|
|
5083
|
-
* The target temperature of this boiler prototype
|
|
5699
|
+
* The target temperature of this boiler prototype.
|
|
5700
|
+
* @remarks
|
|
5701
|
+
* Applies to subclasses: Boiler
|
|
5702
|
+
*
|
|
5084
5703
|
*/
|
|
5085
5704
|
readonly target_temperature?: number
|
|
5086
5705
|
|
|
5087
5706
|
/**
|
|
5088
5707
|
* The terrain friction modifier for this vehicle.
|
|
5708
|
+
* @remarks
|
|
5709
|
+
* Applies to subclasses: Vehicle
|
|
5710
|
+
*
|
|
5089
5711
|
*/
|
|
5090
|
-
readonly terrain_friction_modifier
|
|
5712
|
+
readonly terrain_friction_modifier?: number
|
|
5091
5713
|
|
|
5092
5714
|
/**
|
|
5093
5715
|
* @remarks
|
|
5094
5716
|
* Applies to subclasses: Character
|
|
5095
5717
|
*
|
|
5096
5718
|
*/
|
|
5097
|
-
readonly ticks_to_keep_aiming_direction
|
|
5719
|
+
readonly ticks_to_keep_aiming_direction?: number
|
|
5098
5720
|
|
|
5099
5721
|
/**
|
|
5100
5722
|
* @remarks
|
|
5101
5723
|
* Applies to subclasses: Character
|
|
5102
5724
|
*
|
|
5103
5725
|
*/
|
|
5104
|
-
readonly ticks_to_keep_gun
|
|
5726
|
+
readonly ticks_to_keep_gun?: number
|
|
5105
5727
|
|
|
5106
5728
|
/**
|
|
5107
5729
|
* @remarks
|
|
5108
5730
|
* Applies to subclasses: Character
|
|
5109
5731
|
*
|
|
5110
5732
|
*/
|
|
5111
|
-
readonly ticks_to_stay_in_combat
|
|
5733
|
+
readonly ticks_to_stay_in_combat?: number
|
|
5734
|
+
|
|
5735
|
+
/**
|
|
5736
|
+
* Specifies the tiling size of the entity, is used to decide, if the center should be in the center of the tile (odd tile size dimension) or on the tile border (even tile size dimension)
|
|
5737
|
+
*/
|
|
5738
|
+
readonly tile_height: number
|
|
5739
|
+
|
|
5740
|
+
/**
|
|
5741
|
+
* Specifies the tiling size of the entity, is used to decide, if the center should be in the center of the tile (odd tile size dimension) or on the tile border (even tile size dimension)
|
|
5742
|
+
*/
|
|
5743
|
+
readonly tile_width: number
|
|
5112
5744
|
|
|
5113
5745
|
/**
|
|
5114
5746
|
* The time to live for this prototype or `0` if prototype doesn't have time_to_live or time_before_removed.
|
|
@@ -5117,31 +5749,49 @@ interface LuaEntityPrototype {
|
|
|
5117
5749
|
|
|
5118
5750
|
/**
|
|
5119
5751
|
* The time it takes this land mine to arm.
|
|
5752
|
+
* @remarks
|
|
5753
|
+
* Applies to subclasses: LandMine
|
|
5754
|
+
*
|
|
5120
5755
|
*/
|
|
5121
|
-
readonly timeout
|
|
5756
|
+
readonly timeout?: number
|
|
5122
5757
|
|
|
5123
5758
|
/**
|
|
5124
|
-
*
|
|
5759
|
+
* The torso rotation speed of this spider vehicle prototype.
|
|
5760
|
+
* @remarks
|
|
5761
|
+
* Applies to subclasses: SpiderVehicle
|
|
5762
|
+
*
|
|
5125
5763
|
*/
|
|
5126
|
-
readonly torso_rotation_speed
|
|
5764
|
+
readonly torso_rotation_speed?: number
|
|
5127
5765
|
|
|
5128
5766
|
/**
|
|
5129
|
-
* If it is a tree, return the number of colors it supports.
|
|
5767
|
+
* If it is a tree, return the number of colors it supports.
|
|
5768
|
+
* @remarks
|
|
5769
|
+
* Applies to subclasses: Tree
|
|
5770
|
+
*
|
|
5130
5771
|
*/
|
|
5131
|
-
readonly tree_color_count
|
|
5772
|
+
readonly tree_color_count?: number
|
|
5132
5773
|
|
|
5133
5774
|
/**
|
|
5134
|
-
*
|
|
5775
|
+
* The collision mask entities must collide with to make this landmine blow up.
|
|
5776
|
+
* @remarks
|
|
5777
|
+
* Applies to subclasses: LandMine
|
|
5778
|
+
*
|
|
5135
5779
|
*/
|
|
5136
|
-
readonly trigger_collision_mask
|
|
5780
|
+
readonly trigger_collision_mask?: CollisionMaskWithFlags
|
|
5137
5781
|
|
|
5138
5782
|
/**
|
|
5139
|
-
* The range of this turret
|
|
5783
|
+
* The range of this turret.
|
|
5784
|
+
* @remarks
|
|
5785
|
+
* Applies to subclasses: Turret
|
|
5786
|
+
*
|
|
5140
5787
|
*/
|
|
5141
5788
|
readonly turret_range?: number
|
|
5142
5789
|
|
|
5143
5790
|
/**
|
|
5144
|
-
* The turret rotation speed of this car prototype
|
|
5791
|
+
* The turret rotation speed of this car prototype.
|
|
5792
|
+
* @remarks
|
|
5793
|
+
* Applies to subclasses: Car
|
|
5794
|
+
*
|
|
5145
5795
|
*/
|
|
5146
5796
|
readonly turret_rotation_speed?: number
|
|
5147
5797
|
|
|
@@ -5150,23 +5800,37 @@ interface LuaEntityPrototype {
|
|
|
5150
5800
|
*/
|
|
5151
5801
|
readonly type: string
|
|
5152
5802
|
|
|
5803
|
+
/**
|
|
5804
|
+
* Whether this logistic container prototype uses exact mode
|
|
5805
|
+
* @remarks
|
|
5806
|
+
* Applies to subclasses: LogisticContainer
|
|
5807
|
+
*
|
|
5808
|
+
*/
|
|
5809
|
+
readonly use_exact_mode?: boolean
|
|
5810
|
+
|
|
5153
5811
|
/**
|
|
5154
5812
|
* Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
|
5155
5813
|
*/
|
|
5156
5814
|
readonly valid: boolean
|
|
5157
5815
|
|
|
5158
5816
|
/**
|
|
5159
|
-
* The vision distance of this unit prototype
|
|
5817
|
+
* The vision distance of this unit prototype.
|
|
5818
|
+
* @remarks
|
|
5819
|
+
* Applies to subclasses: Unit
|
|
5820
|
+
*
|
|
5160
5821
|
*/
|
|
5161
5822
|
readonly vision_distance?: number
|
|
5162
5823
|
|
|
5163
5824
|
/**
|
|
5164
|
-
* The void energy source prototype this entity uses
|
|
5825
|
+
* The void energy source prototype this entity uses, if any.
|
|
5165
5826
|
*/
|
|
5166
5827
|
readonly void_energy_source_prototype?: LuaVoidEnergySourcePrototype
|
|
5167
5828
|
|
|
5168
5829
|
/**
|
|
5169
|
-
* The weight of this vehicle prototype
|
|
5830
|
+
* The weight of this vehicle prototype.
|
|
5831
|
+
* @remarks
|
|
5832
|
+
* Applies to subclasses: Vehicle
|
|
5833
|
+
*
|
|
5170
5834
|
*/
|
|
5171
5835
|
readonly weight?: number
|
|
5172
5836
|
|
|
@@ -5184,7 +5848,7 @@ interface LuaEquipment {
|
|
|
5184
5848
|
help(this: void): void
|
|
5185
5849
|
|
|
5186
5850
|
/**
|
|
5187
|
-
* The burner energy source for this equipment
|
|
5851
|
+
* The burner energy source for this equipment, if any.
|
|
5188
5852
|
*/
|
|
5189
5853
|
readonly burner?: LuaBurner
|
|
5190
5854
|
|
|
@@ -5238,7 +5902,10 @@ interface LuaEquipment {
|
|
|
5238
5902
|
/**
|
|
5239
5903
|
* Shape of this equipment.
|
|
5240
5904
|
*/
|
|
5241
|
-
readonly shape: {
|
|
5905
|
+
readonly shape: {
|
|
5906
|
+
height: number,
|
|
5907
|
+
width: number
|
|
5908
|
+
}
|
|
5242
5909
|
|
|
5243
5910
|
/**
|
|
5244
5911
|
* Current shield value of the equipment.
|
|
@@ -5317,6 +5984,20 @@ interface LuaEquipmentGrid {
|
|
|
5317
5984
|
clear(this: void,
|
|
5318
5985
|
by_player?: PlayerIdentification): void
|
|
5319
5986
|
|
|
5987
|
+
/**
|
|
5988
|
+
* Get the number of all or some equipment in this grid.
|
|
5989
|
+
* @param equipment - Prototype name of the equipment to count. If not specified, count all equipment.
|
|
5990
|
+
*/
|
|
5991
|
+
count(this: void,
|
|
5992
|
+
equipment?: string): void
|
|
5993
|
+
|
|
5994
|
+
/**
|
|
5995
|
+
* Find equipment by name.
|
|
5996
|
+
* @param equipment - Prototype name of the equipment to find.
|
|
5997
|
+
*/
|
|
5998
|
+
find(this: void,
|
|
5999
|
+
equipment: string): void
|
|
6000
|
+
|
|
5320
6001
|
/**
|
|
5321
6002
|
* Find equipment in the Equipment Grid based off a position.
|
|
5322
6003
|
* @param position - The position
|
|
@@ -5430,6 +6111,11 @@ interface LuaEquipmentGrid {
|
|
|
5430
6111
|
*/
|
|
5431
6112
|
readonly shield: number
|
|
5432
6113
|
|
|
6114
|
+
/**
|
|
6115
|
+
* Unique identifier of this equipment grid.
|
|
6116
|
+
*/
|
|
6117
|
+
readonly unique_id: number
|
|
6118
|
+
|
|
5433
6119
|
/**
|
|
5434
6120
|
* Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
|
5435
6121
|
*/
|
|
@@ -5501,12 +6187,15 @@ interface LuaEquipmentPrototype {
|
|
|
5501
6187
|
help(this: void): void
|
|
5502
6188
|
|
|
5503
6189
|
/**
|
|
5504
|
-
* The equipment attack parameters
|
|
6190
|
+
* The equipment attack parameters.
|
|
6191
|
+
* @remarks
|
|
6192
|
+
* Applies to subclasses: ActiveDefenseEquipment
|
|
6193
|
+
*
|
|
5505
6194
|
*/
|
|
5506
6195
|
readonly attack_parameters?: AttackParameters
|
|
5507
6196
|
|
|
5508
6197
|
/**
|
|
5509
|
-
*
|
|
6198
|
+
* Whether this active defense equipment is automatic. Returns false if not active defense equipment.
|
|
5510
6199
|
*/
|
|
5511
6200
|
readonly automatic: boolean
|
|
5512
6201
|
|
|
@@ -5516,12 +6205,12 @@ interface LuaEquipmentPrototype {
|
|
|
5516
6205
|
readonly background_color: Color
|
|
5517
6206
|
|
|
5518
6207
|
/**
|
|
5519
|
-
* The burner energy source prototype this equipment uses
|
|
6208
|
+
* The burner energy source prototype this equipment uses, if any.
|
|
5520
6209
|
*/
|
|
5521
6210
|
readonly burner_prototype?: LuaBurnerPrototype
|
|
5522
6211
|
|
|
5523
6212
|
/**
|
|
5524
|
-
* The electric energy source prototype this equipment uses
|
|
6213
|
+
* The electric energy source prototype this equipment uses, if any.
|
|
5525
6214
|
*/
|
|
5526
6215
|
readonly electric_energy_source_prototype?: LuaElectricEnergySourcePrototype
|
|
5527
6216
|
|
|
@@ -5557,7 +6246,23 @@ interface LuaEquipmentPrototype {
|
|
|
5557
6246
|
* Both the `charging_station_shift` and `stationing_offset` vectors are tables with `x` and `y` keys instead of an array.
|
|
5558
6247
|
*
|
|
5559
6248
|
*/
|
|
5560
|
-
readonly logistic_parameters: {
|
|
6249
|
+
readonly logistic_parameters: {
|
|
6250
|
+
charge_approach_distance: number,
|
|
6251
|
+
charging_distance: number,
|
|
6252
|
+
charging_energy: number,
|
|
6253
|
+
charging_station_count: number,
|
|
6254
|
+
charging_station_shift: Vector,
|
|
6255
|
+
charging_threshold_distance: number,
|
|
6256
|
+
construction_radius: number,
|
|
6257
|
+
logistic_radius: number,
|
|
6258
|
+
logistics_connection_distance: number,
|
|
6259
|
+
robot_limit: number,
|
|
6260
|
+
robot_vertical_acceleration: number,
|
|
6261
|
+
robots_shrink_when_entering_and_exiting: boolean,
|
|
6262
|
+
spawn_and_station_height: number,
|
|
6263
|
+
spawn_and_station_shadow_height_offset: number,
|
|
6264
|
+
stationing_offset: Vector
|
|
6265
|
+
}
|
|
5561
6266
|
|
|
5562
6267
|
/**
|
|
5563
6268
|
* @remarks
|
|
@@ -5584,7 +6289,15 @@ interface LuaEquipmentPrototype {
|
|
|
5584
6289
|
/**
|
|
5585
6290
|
* Shape of this equipment prototype.
|
|
5586
6291
|
*/
|
|
5587
|
-
readonly shape: {
|
|
6292
|
+
readonly shape: {
|
|
6293
|
+
height: number,
|
|
6294
|
+
|
|
6295
|
+
/**
|
|
6296
|
+
* Only set when the shape is "manual"
|
|
6297
|
+
*/
|
|
6298
|
+
points?: EquipmentPoint[],
|
|
6299
|
+
width: number
|
|
6300
|
+
}
|
|
5588
6301
|
|
|
5589
6302
|
/**
|
|
5590
6303
|
* The shield value of this equipment. 0 for non-shield equipment.
|
|
@@ -5592,9 +6305,9 @@ interface LuaEquipmentPrototype {
|
|
|
5592
6305
|
readonly shield: number
|
|
5593
6306
|
|
|
5594
6307
|
/**
|
|
5595
|
-
* The result item when taking this equipment out of an equipment grid
|
|
6308
|
+
* The result item when taking this equipment out of an equipment grid, if any.
|
|
5596
6309
|
*/
|
|
5597
|
-
readonly take_result
|
|
6310
|
+
readonly take_result?: LuaItemPrototype
|
|
5598
6311
|
|
|
5599
6312
|
/**
|
|
5600
6313
|
* Type of this equipment prototype.
|
|
@@ -5690,7 +6403,7 @@ interface LuaFlowStatistics {
|
|
|
5690
6403
|
count: number): void
|
|
5691
6404
|
|
|
5692
6405
|
/**
|
|
5693
|
-
* The force these statistics belong to
|
|
6406
|
+
* The force these statistics belong to. `nil` for pollution statistics.
|
|
5694
6407
|
*/
|
|
5695
6408
|
readonly force?: LuaForce
|
|
5696
6409
|
|
|
@@ -5717,9 +6430,7 @@ interface LuaFlowStatistics {
|
|
|
5717
6430
|
}
|
|
5718
6431
|
|
|
5719
6432
|
/**
|
|
5720
|
-
* An array of fluid boxes of an entity. Entities may contain more than one fluid box, and some can change the number of fluid boxes -- for instance, an assembling machine will change its number of fluid boxes depending on its active recipe.
|
|
5721
|
-
*
|
|
5722
|
-
* See {@link Fluid | Fluid}
|
|
6433
|
+
* An array of fluid boxes of an entity. Entities may contain more than one fluid box, and some can change the number of fluid boxes -- for instance, an assembling machine will change its number of fluid boxes depending on its active recipe. See {@link Fluid | Fluid}.
|
|
5723
6434
|
*
|
|
5724
6435
|
* Do note that reading from a {@link LuaFluidBox | LuaFluidBox} creates a new table and writing will copy the given fields from the table into the engine's own fluid box structure. Therefore, the correct way to update a fluidbox of an entity is to read it first, modify the table, then write the modified table back. Directly accessing the returned table's attributes won't have the desired effect.
|
|
5725
6436
|
* @example
|
|
@@ -5819,7 +6530,9 @@ interface LuaFluidBox {
|
|
|
5819
6530
|
readonly valid: boolean
|
|
5820
6531
|
|
|
5821
6532
|
/**
|
|
5822
|
-
* Access, set or clear a fluid box. The index must always be in bounds (see {@link LuaFluidBox::
|
|
6533
|
+
* Access, set or clear a fluid box. The index must always be in bounds (see {@link LuaFluidBox::index | LuaFluidBox::index}). New fluidboxes may not be added or removed using this operator.
|
|
6534
|
+
*
|
|
6535
|
+
* Is `nil` if the given fluid box does not contain any fluid. Writing `nil` removes all fluid from the fluid box.
|
|
5823
6536
|
* @remarks
|
|
5824
6537
|
* This will return a {@link Fluid | Fluid}. The return type is any due to typescript limitations.
|
|
5825
6538
|
*
|
|
@@ -5852,7 +6565,7 @@ interface LuaFluidBoxPrototype {
|
|
|
5852
6565
|
readonly entity: LuaEntityPrototype
|
|
5853
6566
|
|
|
5854
6567
|
/**
|
|
5855
|
-
* The filter
|
|
6568
|
+
* The filter, if any is set.
|
|
5856
6569
|
*/
|
|
5857
6570
|
readonly filter?: LuaFluidPrototype
|
|
5858
6571
|
|
|
@@ -5864,12 +6577,12 @@ interface LuaFluidBoxPrototype {
|
|
|
5864
6577
|
readonly index: number
|
|
5865
6578
|
|
|
5866
6579
|
/**
|
|
5867
|
-
* The maximum temperature
|
|
6580
|
+
* The maximum temperature, if any is set.
|
|
5868
6581
|
*/
|
|
5869
6582
|
readonly maximum_temperature?: number
|
|
5870
6583
|
|
|
5871
6584
|
/**
|
|
5872
|
-
* The minimum temperature
|
|
6585
|
+
* The minimum temperature, if any is set.
|
|
5873
6586
|
*/
|
|
5874
6587
|
readonly minimum_temperature?: number
|
|
5875
6588
|
|
|
@@ -5945,7 +6658,7 @@ interface LuaFluidEnergySourcePrototype {
|
|
|
5945
6658
|
readonly scale_fluid_usage: boolean
|
|
5946
6659
|
|
|
5947
6660
|
/**
|
|
5948
|
-
* The smoke sources for this prototype if any.
|
|
6661
|
+
* The smoke sources for this prototype, if any.
|
|
5949
6662
|
*/
|
|
5950
6663
|
readonly smoke: SmokeSource[]
|
|
5951
6664
|
|
|
@@ -6052,7 +6765,7 @@ interface LuaFontPrototype {
|
|
|
6052
6765
|
readonly border: boolean
|
|
6053
6766
|
|
|
6054
6767
|
/**
|
|
6055
|
-
* The border color
|
|
6768
|
+
* The border color, if any.
|
|
6056
6769
|
*/
|
|
6057
6770
|
readonly border_color?: Color
|
|
6058
6771
|
|
|
@@ -6497,6 +7210,11 @@ interface LuaForce {
|
|
|
6497
7210
|
*/
|
|
6498
7211
|
character_trash_slot_count: number
|
|
6499
7212
|
|
|
7213
|
+
/**
|
|
7214
|
+
* Effective color of this force.
|
|
7215
|
+
*/
|
|
7216
|
+
readonly color: Color
|
|
7217
|
+
|
|
6500
7218
|
/**
|
|
6501
7219
|
* The connected players belonging to this force.
|
|
6502
7220
|
*
|
|
@@ -6508,10 +7226,15 @@ interface LuaForce {
|
|
|
6508
7226
|
readonly connected_players: LuaPlayer[]
|
|
6509
7227
|
|
|
6510
7228
|
/**
|
|
6511
|
-
* The
|
|
7229
|
+
* The currently ongoing technology research, if any.
|
|
6512
7230
|
*/
|
|
6513
7231
|
readonly current_research?: LuaTechnology
|
|
6514
7232
|
|
|
7233
|
+
/**
|
|
7234
|
+
* Custom color for this force. If specified, will take priority over other sources of the force color. Writing nil clears custom color. Will return nil if it was not specified or if was set to {0,0,0,0}
|
|
7235
|
+
*/
|
|
7236
|
+
custom_color?: Color
|
|
7237
|
+
|
|
6515
7238
|
/**
|
|
6516
7239
|
* The time, in ticks, before a deconstruction order is removed.
|
|
6517
7240
|
*/
|
|
@@ -6642,9 +7365,9 @@ interface LuaForce {
|
|
|
6642
7365
|
readonly players: LuaPlayer[]
|
|
6643
7366
|
|
|
6644
7367
|
/**
|
|
6645
|
-
* The previous research if any.
|
|
7368
|
+
* The previous research, if any.
|
|
6646
7369
|
*/
|
|
6647
|
-
previous_research
|
|
7370
|
+
previous_research?: LuaTechnology
|
|
6648
7371
|
|
|
6649
7372
|
/**
|
|
6650
7373
|
* Recipes available to this force, indexed by `name`.
|
|
@@ -7078,9 +7801,6 @@ interface LuaGameScript {
|
|
|
7078
7801
|
|
|
7079
7802
|
/**
|
|
7080
7803
|
* Gets the given player or returns `nil` if no player is found.
|
|
7081
|
-
* @remarks
|
|
7082
|
-
* This is a shortcut for game.players[...]
|
|
7083
|
-
*
|
|
7084
7804
|
* @param player - The player index or name.
|
|
7085
7805
|
*/
|
|
7086
7806
|
get_player(this: void,
|
|
@@ -7642,10 +8362,12 @@ interface LuaGameScript {
|
|
|
7642
8362
|
*
|
|
7643
8363
|
* See {@link LuaGameScript::players | LuaGameScript::players} for accessing all players.
|
|
7644
8364
|
*/
|
|
7645
|
-
readonly player
|
|
8365
|
+
readonly player?: LuaPlayer
|
|
7646
8366
|
|
|
7647
8367
|
/**
|
|
7648
8368
|
* Get a table of all the players that currently exist. This sparse table allows you to find players by indexing it with either their `name` or `index`. Iterating this table with `pairs()` will only iterate the array part of the table. Iterating with `ipairs()` will not work at all.
|
|
8369
|
+
*
|
|
8370
|
+
* If only a single player is required, {@link LuaGameScript::get_player | LuaGameScript::get_player} should be used instead, as it avoids the unnecessary overhead of passing the whole table to Lua.
|
|
7649
8371
|
*/
|
|
7650
8372
|
readonly players: {[key: string]: LuaPlayer}
|
|
7651
8373
|
|
|
@@ -7748,10 +8470,7 @@ interface LuaGenericOnOffControlBehavior extends LuaControlBehavior {
|
|
|
7748
8470
|
help(this: void): void
|
|
7749
8471
|
|
|
7750
8472
|
/**
|
|
7751
|
-
* The circuit condition.
|
|
7752
|
-
* @remarks
|
|
7753
|
-
* `condition` may be `nil` in order to clear the circuit condition.
|
|
7754
|
-
*
|
|
8473
|
+
* The circuit condition. Writing `nil` clears the circuit condition.
|
|
7755
8474
|
* @example
|
|
7756
8475
|
* Tell an entity to be active (e.g. a lamp to be lit) when it receives a circuit signal of more than 4 chain signals.
|
|
7757
8476
|
* ```
|
|
@@ -7774,10 +8493,7 @@ interface LuaGenericOnOffControlBehavior extends LuaControlBehavior {
|
|
|
7774
8493
|
readonly disabled: boolean
|
|
7775
8494
|
|
|
7776
8495
|
/**
|
|
7777
|
-
* The logistic condition.
|
|
7778
|
-
* @remarks
|
|
7779
|
-
* `condition` may be `nil` in order to clear the logistic condition.
|
|
7780
|
-
*
|
|
8496
|
+
* The logistic condition. Writing `nil` clears the logistic condition.
|
|
7781
8497
|
* @example
|
|
7782
8498
|
* Tell an entity to be active (e.g. a lamp to be lit) when the logistics network it's connected to has more than four chain signals.
|
|
7783
8499
|
* ```
|
|
@@ -7811,16 +8527,16 @@ interface LuaGroup {
|
|
|
7811
8527
|
help(this: void): void
|
|
7812
8528
|
|
|
7813
8529
|
/**
|
|
7814
|
-
* The parent group if any
|
|
8530
|
+
* The parent group, if any.
|
|
7815
8531
|
*/
|
|
7816
|
-
readonly group
|
|
8532
|
+
readonly group?: LuaGroup
|
|
7817
8533
|
|
|
7818
8534
|
/**
|
|
7819
8535
|
* Localised name of the group.
|
|
7820
8536
|
*/
|
|
7821
|
-
readonly localised_name
|
|
8537
|
+
readonly localised_name?: LocalisedString
|
|
7822
8538
|
|
|
7823
|
-
readonly name
|
|
8539
|
+
readonly name?: string
|
|
7824
8540
|
|
|
7825
8541
|
/**
|
|
7826
8542
|
* The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
|
@@ -7848,7 +8564,7 @@ interface LuaGroup {
|
|
|
7848
8564
|
*/
|
|
7849
8565
|
readonly subgroups: LuaGroup[]
|
|
7850
8566
|
|
|
7851
|
-
readonly type
|
|
8567
|
+
readonly type?: string
|
|
7852
8568
|
|
|
7853
8569
|
/**
|
|
7854
8570
|
* Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
|
@@ -8295,9 +9011,9 @@ interface LuaGuiElement {
|
|
|
8295
9011
|
allow_none_state: boolean
|
|
8296
9012
|
|
|
8297
9013
|
/**
|
|
8298
|
-
*
|
|
9014
|
+
* The anchor for this relative widget, if any. Setting `nil` clears the anchor.
|
|
8299
9015
|
*/
|
|
8300
|
-
anchor
|
|
9016
|
+
anchor?: GuiAnchor
|
|
8301
9017
|
|
|
8302
9018
|
/**
|
|
8303
9019
|
* Whether this frame auto-centers on window resize when stored in {@link LuaGui::screen | LuaGui::screen}.
|
|
@@ -8363,7 +9079,7 @@ interface LuaGuiElement {
|
|
|
8363
9079
|
readonly direction: string
|
|
8364
9080
|
|
|
8365
9081
|
/**
|
|
8366
|
-
* The `frame` that is being moved when dragging this GUI element,
|
|
9082
|
+
* The `frame` that is being moved when dragging this GUI element, if any. This element needs to be a child of the `drag_target` at some level.
|
|
8367
9083
|
* @remarks
|
|
8368
9084
|
* Only top-level elements in {@link LuaGui::screen | LuaGui::screen} can be `drag_target`s.
|
|
8369
9085
|
* Applies to subclasses: flow,frame,label,table,empty-widget
|
|
@@ -8405,7 +9121,7 @@ interface LuaGuiElement {
|
|
|
8405
9121
|
draw_vertical_lines: boolean
|
|
8406
9122
|
|
|
8407
9123
|
/**
|
|
8408
|
-
* The elem filters of this choose-elem-button,
|
|
9124
|
+
* The elem filters of this choose-elem-button, if any. The compatible type of filter is determined by `elem_type`.
|
|
8409
9125
|
* @remarks
|
|
8410
9126
|
* Writing to this field does not change or clear the currently selected element.
|
|
8411
9127
|
* Applies to subclasses: choose-elem-button
|
|
@@ -8429,7 +9145,7 @@ interface LuaGuiElement {
|
|
|
8429
9145
|
* ```
|
|
8430
9146
|
*
|
|
8431
9147
|
*/
|
|
8432
|
-
elem_filters?: ItemPrototypeFilter | TilePrototypeFilter | EntityPrototypeFilter | FluidPrototypeFilter | RecipePrototypeFilter | DecorativePrototypeFilter | AchievementPrototypeFilter | EquipmentPrototypeFilter | TechnologyPrototypeFilter
|
|
9148
|
+
elem_filters?: ItemPrototypeFilter | TilePrototypeFilter | EntityPrototypeFilter | FluidPrototypeFilter | RecipePrototypeFilter | DecorativePrototypeFilter | AchievementPrototypeFilter | EquipmentPrototypeFilter | TechnologyPrototypeFilter
|
|
8433
9149
|
|
|
8434
9150
|
/**
|
|
8435
9151
|
* The elem type of this choose-elem-button.
|
|
@@ -8440,7 +9156,7 @@ interface LuaGuiElement {
|
|
|
8440
9156
|
readonly elem_type: string
|
|
8441
9157
|
|
|
8442
9158
|
/**
|
|
8443
|
-
* The elem value of this choose-elem-button
|
|
9159
|
+
* The elem value of this choose-elem-button, if any.
|
|
8444
9160
|
* @remarks
|
|
8445
9161
|
* The `"signal"` type operates with {@link SignalID | SignalID}, while all other types use strings.
|
|
8446
9162
|
* Applies to subclasses: choose-elem-button
|
|
@@ -8454,12 +9170,12 @@ interface LuaGuiElement {
|
|
|
8454
9170
|
enabled: boolean
|
|
8455
9171
|
|
|
8456
9172
|
/**
|
|
8457
|
-
* The entity associated with this entity-preview, camera, minimap
|
|
9173
|
+
* The entity associated with this entity-preview, camera, minimap, if any.
|
|
8458
9174
|
*/
|
|
8459
9175
|
entity?: LuaEntity
|
|
8460
9176
|
|
|
8461
9177
|
/**
|
|
8462
|
-
* The force this minimap is using
|
|
9178
|
+
* The force this minimap is using, if any.
|
|
8463
9179
|
*/
|
|
8464
9180
|
force?: string
|
|
8465
9181
|
|
|
@@ -8524,7 +9240,7 @@ interface LuaGuiElement {
|
|
|
8524
9240
|
left_label_tooltip: LocalisedString
|
|
8525
9241
|
|
|
8526
9242
|
/**
|
|
8527
|
-
* The location of this widget when stored in {@link LuaGui::screen | LuaGui::screen}
|
|
9243
|
+
* The location of this widget when stored in {@link LuaGui::screen | LuaGui::screen}. `nil` if not set or not in {@link LuaGui::screen | LuaGui::screen}.
|
|
8528
9244
|
*/
|
|
8529
9245
|
location?: GuiLocation
|
|
8530
9246
|
|
|
@@ -8586,9 +9302,9 @@ interface LuaGuiElement {
|
|
|
8586
9302
|
readonly object_name: string
|
|
8587
9303
|
|
|
8588
9304
|
/**
|
|
8589
|
-
* The direct parent of this element
|
|
9305
|
+
* The direct parent of this element. `nil` if this is a top-level element.
|
|
8590
9306
|
*/
|
|
8591
|
-
readonly parent
|
|
9307
|
+
readonly parent?: LuaGuiElement
|
|
8592
9308
|
|
|
8593
9309
|
/**
|
|
8594
9310
|
* Index into {@link LuaGameScript::players | LuaGameScript::players} specifying the player who owns this element.
|
|
@@ -8643,7 +9359,7 @@ interface LuaGuiElement {
|
|
|
8643
9359
|
selected_index: number
|
|
8644
9360
|
|
|
8645
9361
|
/**
|
|
8646
|
-
* The selected tab index for this tabbed pane
|
|
9362
|
+
* The selected tab index for this tabbed pane, if any.
|
|
8647
9363
|
* @remarks
|
|
8648
9364
|
* Applies to subclasses: tabbed-pane
|
|
8649
9365
|
*
|
|
@@ -8953,7 +9669,7 @@ interface LuaInventory {
|
|
|
8953
9669
|
item?: string): void
|
|
8954
9670
|
|
|
8955
9671
|
/**
|
|
8956
|
-
*
|
|
9672
|
+
* Finds the first LuaItemStack in the inventory that matches the given item name.
|
|
8957
9673
|
* @param item - The item name to find
|
|
8958
9674
|
*/
|
|
8959
9675
|
find_item_stack(this: void,
|
|
@@ -9053,12 +9769,12 @@ interface LuaInventory {
|
|
|
9053
9769
|
* @remarks
|
|
9054
9770
|
* Some inventory slots don't allow some filters (gun ammo can't be filtered for non-ammo).
|
|
9055
9771
|
*
|
|
9056
|
-
* @param filter - The new filter
|
|
9057
|
-
* @param index - The item stack index
|
|
9772
|
+
* @param filter - The new filter. `nil` erases any existing filter.
|
|
9773
|
+
* @param index - The item stack index.
|
|
9058
9774
|
*/
|
|
9059
9775
|
set_filter(this: void,
|
|
9060
9776
|
index: number,
|
|
9061
|
-
filter: string): void
|
|
9777
|
+
filter: string | null): void
|
|
9062
9778
|
|
|
9063
9779
|
/**
|
|
9064
9780
|
* Sorts and merges the items in this inventory.
|
|
@@ -9079,22 +9795,22 @@ interface LuaInventory {
|
|
|
9079
9795
|
supports_filters(this: void): void
|
|
9080
9796
|
|
|
9081
9797
|
/**
|
|
9082
|
-
* The entity that owns this inventory
|
|
9798
|
+
* The entity that owns this inventory, if any.
|
|
9083
9799
|
*/
|
|
9084
9800
|
readonly entity_owner?: LuaEntity
|
|
9085
9801
|
|
|
9086
9802
|
/**
|
|
9087
|
-
* The equipment that owns this inventory
|
|
9803
|
+
* The equipment that owns this inventory, if any.
|
|
9088
9804
|
*/
|
|
9089
9805
|
readonly equipment_owner?: LuaEquipment
|
|
9090
9806
|
|
|
9091
9807
|
/**
|
|
9092
|
-
* The inventory index this inventory uses,
|
|
9808
|
+
* The inventory index this inventory uses, if any.
|
|
9093
9809
|
*/
|
|
9094
9810
|
readonly index?: defines.inventory
|
|
9095
9811
|
|
|
9096
9812
|
/**
|
|
9097
|
-
* The mod that owns this inventory
|
|
9813
|
+
* The mod that owns this inventory, if any.
|
|
9098
9814
|
*/
|
|
9099
9815
|
readonly mod_owner?: string
|
|
9100
9816
|
|
|
@@ -9104,7 +9820,7 @@ interface LuaInventory {
|
|
|
9104
9820
|
readonly object_name: string
|
|
9105
9821
|
|
|
9106
9822
|
/**
|
|
9107
|
-
* The player that owns this inventory
|
|
9823
|
+
* The player that owns this inventory, if any.
|
|
9108
9824
|
*/
|
|
9109
9825
|
readonly player_owner?: LuaPlayer
|
|
9110
9826
|
|
|
@@ -9150,7 +9866,10 @@ interface LuaInventory {
|
|
|
9150
9866
|
*/
|
|
9151
9867
|
interface LuaItemPrototype {
|
|
9152
9868
|
/**
|
|
9153
|
-
*
|
|
9869
|
+
* The type of this ammo prototype.
|
|
9870
|
+
* @remarks
|
|
9871
|
+
* Applies to subclasses: AmmoItem
|
|
9872
|
+
*
|
|
9154
9873
|
* @param ammo_source_type - "default", "player", "turret", or "vehicle"
|
|
9155
9874
|
*/
|
|
9156
9875
|
get_ammo_type(this: void,
|
|
@@ -9174,7 +9893,7 @@ interface LuaItemPrototype {
|
|
|
9174
9893
|
* Applies to subclasses: SelectionTool
|
|
9175
9894
|
*
|
|
9176
9895
|
*/
|
|
9177
|
-
readonly alt_entity_filter_mode
|
|
9896
|
+
readonly alt_entity_filter_mode?: string
|
|
9178
9897
|
|
|
9179
9898
|
/**
|
|
9180
9899
|
* The alt entity filters used by this selection tool indexed by entity name.
|
|
@@ -9182,7 +9901,7 @@ interface LuaItemPrototype {
|
|
|
9182
9901
|
* Applies to subclasses: SelectionTool
|
|
9183
9902
|
*
|
|
9184
9903
|
*/
|
|
9185
|
-
readonly alt_entity_filters
|
|
9904
|
+
readonly alt_entity_filters?: {[key: string]: LuaEntityPrototype}
|
|
9186
9905
|
|
|
9187
9906
|
/**
|
|
9188
9907
|
* The alt entity type filters used by this selection tool indexed by entity type.
|
|
@@ -9191,7 +9910,7 @@ interface LuaItemPrototype {
|
|
|
9191
9910
|
* Applies to subclasses: SelectionTool
|
|
9192
9911
|
*
|
|
9193
9912
|
*/
|
|
9194
|
-
readonly alt_entity_type_filters
|
|
9913
|
+
readonly alt_entity_type_filters?: {[key: string]: boolean}
|
|
9195
9914
|
|
|
9196
9915
|
/**
|
|
9197
9916
|
* The color used when doing alt selection with this selection tool prototype.
|
|
@@ -9199,14 +9918,14 @@ interface LuaItemPrototype {
|
|
|
9199
9918
|
* Applies to subclasses: SelectionTool
|
|
9200
9919
|
*
|
|
9201
9920
|
*/
|
|
9202
|
-
readonly alt_selection_border_color
|
|
9921
|
+
readonly alt_selection_border_color?: Color
|
|
9203
9922
|
|
|
9204
9923
|
/**
|
|
9205
9924
|
* @remarks
|
|
9206
9925
|
* Applies to subclasses: SelectionTool
|
|
9207
9926
|
*
|
|
9208
9927
|
*/
|
|
9209
|
-
readonly alt_selection_cursor_box_type
|
|
9928
|
+
readonly alt_selection_cursor_box_type?: string
|
|
9210
9929
|
|
|
9211
9930
|
/**
|
|
9212
9931
|
* Flags that affect which entities will be selected during alternate selection.
|
|
@@ -9214,7 +9933,7 @@ interface LuaItemPrototype {
|
|
|
9214
9933
|
* Applies to subclasses: SelectionTool
|
|
9215
9934
|
*
|
|
9216
9935
|
*/
|
|
9217
|
-
readonly alt_selection_mode_flags
|
|
9936
|
+
readonly alt_selection_mode_flags?: SelectionModeFlags
|
|
9218
9937
|
|
|
9219
9938
|
/**
|
|
9220
9939
|
* The alt tile filter mode used by this selection tool.
|
|
@@ -9222,7 +9941,7 @@ interface LuaItemPrototype {
|
|
|
9222
9941
|
* Applies to subclasses: SelectionTool
|
|
9223
9942
|
*
|
|
9224
9943
|
*/
|
|
9225
|
-
readonly alt_tile_filter_mode
|
|
9944
|
+
readonly alt_tile_filter_mode?: string
|
|
9226
9945
|
|
|
9227
9946
|
/**
|
|
9228
9947
|
* The alt tile filters used by this selection tool indexed by tile name.
|
|
@@ -9230,7 +9949,7 @@ interface LuaItemPrototype {
|
|
|
9230
9949
|
* Applies to subclasses: SelectionTool
|
|
9231
9950
|
*
|
|
9232
9951
|
*/
|
|
9233
|
-
readonly alt_tile_filters
|
|
9952
|
+
readonly alt_tile_filters?: {[key: string]: LuaTilePrototype}
|
|
9234
9953
|
|
|
9235
9954
|
/**
|
|
9236
9955
|
* If tiles area always included when doing selection with this selection tool prototype.
|
|
@@ -9238,15 +9957,18 @@ interface LuaItemPrototype {
|
|
|
9238
9957
|
* Applies to subclasses: SelectionTool
|
|
9239
9958
|
*
|
|
9240
9959
|
*/
|
|
9241
|
-
readonly always_include_tiles
|
|
9960
|
+
readonly always_include_tiles?: boolean
|
|
9242
9961
|
|
|
9243
9962
|
/**
|
|
9244
|
-
* The gun attack parameters
|
|
9963
|
+
* The gun attack parameters.
|
|
9964
|
+
* @remarks
|
|
9965
|
+
* Applies to subclasses: Gun
|
|
9966
|
+
*
|
|
9245
9967
|
*/
|
|
9246
9968
|
readonly attack_parameters?: AttackParameters
|
|
9247
9969
|
|
|
9248
9970
|
/**
|
|
9249
|
-
* The result of burning this item as fuel
|
|
9971
|
+
* The result of burning this item as fuel, if any.
|
|
9250
9972
|
*/
|
|
9251
9973
|
readonly burnt_result?: LuaItemPrototype
|
|
9252
9974
|
|
|
@@ -9256,7 +9978,10 @@ interface LuaItemPrototype {
|
|
|
9256
9978
|
readonly can_be_mod_opened: boolean
|
|
9257
9979
|
|
|
9258
9980
|
/**
|
|
9259
|
-
* The capsule action for this capsule item prototype
|
|
9981
|
+
* The capsule action for this capsule item prototype.
|
|
9982
|
+
* @remarks
|
|
9983
|
+
* Applies to subclasses: Capsule
|
|
9984
|
+
*
|
|
9260
9985
|
*/
|
|
9261
9986
|
readonly capsule_action?: CapsuleAction
|
|
9262
9987
|
|
|
@@ -9266,10 +9991,10 @@ interface LuaItemPrototype {
|
|
|
9266
9991
|
* Applies to subclasses: ModuleItem
|
|
9267
9992
|
*
|
|
9268
9993
|
*/
|
|
9269
|
-
readonly category
|
|
9994
|
+
readonly category?: string
|
|
9270
9995
|
|
|
9271
9996
|
/**
|
|
9272
|
-
* The curved rail prototype used for this rail planner prototype
|
|
9997
|
+
* The curved rail prototype used for this rail planner prototype.
|
|
9273
9998
|
* @remarks
|
|
9274
9999
|
* Applies to subclasses: RailPlanner
|
|
9275
10000
|
*
|
|
@@ -9277,12 +10002,12 @@ interface LuaItemPrototype {
|
|
|
9277
10002
|
readonly curved_rail?: LuaEntityPrototype
|
|
9278
10003
|
|
|
9279
10004
|
/**
|
|
9280
|
-
* The default label color used for this item with label
|
|
10005
|
+
* The default label color used for this item with label, if any.
|
|
9281
10006
|
* @remarks
|
|
9282
10007
|
* Applies to subclasses: ItemWithLabel
|
|
9283
10008
|
*
|
|
9284
10009
|
*/
|
|
9285
|
-
readonly default_label_color
|
|
10010
|
+
readonly default_label_color?: Color
|
|
9286
10011
|
|
|
9287
10012
|
/**
|
|
9288
10013
|
* The default request value.
|
|
@@ -9295,10 +10020,10 @@ interface LuaItemPrototype {
|
|
|
9295
10020
|
* Applies to subclasses: ItemWithLabel
|
|
9296
10021
|
*
|
|
9297
10022
|
*/
|
|
9298
|
-
readonly draw_label_for_cursor_render
|
|
10023
|
+
readonly draw_label_for_cursor_render?: boolean
|
|
9299
10024
|
|
|
9300
10025
|
/**
|
|
9301
|
-
* The durability of this tool item
|
|
10026
|
+
* The durability of this tool item.
|
|
9302
10027
|
* @remarks
|
|
9303
10028
|
* Applies to subclasses: ToolItem
|
|
9304
10029
|
*
|
|
@@ -9311,7 +10036,7 @@ interface LuaItemPrototype {
|
|
|
9311
10036
|
* Applies to subclasses: ToolItem
|
|
9312
10037
|
*
|
|
9313
10038
|
*/
|
|
9314
|
-
readonly durability_description_key
|
|
10039
|
+
readonly durability_description_key?: string
|
|
9315
10040
|
|
|
9316
10041
|
/**
|
|
9317
10042
|
* The entity filter mode used by this selection tool.
|
|
@@ -9319,10 +10044,10 @@ interface LuaItemPrototype {
|
|
|
9319
10044
|
* Applies to subclasses: SelectionTool
|
|
9320
10045
|
*
|
|
9321
10046
|
*/
|
|
9322
|
-
readonly entity_filter_mode
|
|
10047
|
+
readonly entity_filter_mode?: string
|
|
9323
10048
|
|
|
9324
10049
|
/**
|
|
9325
|
-
* The number of entity filters this deconstruction item has
|
|
10050
|
+
* The number of entity filters this deconstruction item has.
|
|
9326
10051
|
* @remarks
|
|
9327
10052
|
* Applies to subclasses: DeconstructionItem
|
|
9328
10053
|
*
|
|
@@ -9335,7 +10060,7 @@ interface LuaItemPrototype {
|
|
|
9335
10060
|
* Applies to subclasses: SelectionTool
|
|
9336
10061
|
*
|
|
9337
10062
|
*/
|
|
9338
|
-
readonly entity_filters
|
|
10063
|
+
readonly entity_filters?: {[key: string]: LuaEntityPrototype}
|
|
9339
10064
|
|
|
9340
10065
|
/**
|
|
9341
10066
|
* The entity type filters used by this selection tool indexed by entity type.
|
|
@@ -9344,10 +10069,13 @@ interface LuaItemPrototype {
|
|
|
9344
10069
|
* Applies to subclasses: SelectionTool
|
|
9345
10070
|
*
|
|
9346
10071
|
*/
|
|
9347
|
-
readonly entity_type_filters
|
|
10072
|
+
readonly entity_type_filters?: {[key: string]: boolean}
|
|
9348
10073
|
|
|
9349
10074
|
/**
|
|
9350
|
-
* The prototype of this armor equipment grid
|
|
10075
|
+
* The prototype of this armor equipment grid, if any.
|
|
10076
|
+
* @remarks
|
|
10077
|
+
* Applies to subclasses: Armor
|
|
10078
|
+
*
|
|
9351
10079
|
*/
|
|
9352
10080
|
readonly equipment_grid?: LuaEquipmentGridPrototype
|
|
9353
10081
|
|
|
@@ -9357,7 +10085,7 @@ interface LuaItemPrototype {
|
|
|
9357
10085
|
* Applies to subclasses: ItemWithInventory
|
|
9358
10086
|
*
|
|
9359
10087
|
*/
|
|
9360
|
-
readonly extend_inventory_by_default
|
|
10088
|
+
readonly extend_inventory_by_default?: boolean
|
|
9361
10089
|
|
|
9362
10090
|
/**
|
|
9363
10091
|
* The filter mode used by this item with inventory.
|
|
@@ -9365,7 +10093,7 @@ interface LuaItemPrototype {
|
|
|
9365
10093
|
* Applies to subclasses: ItemWithInventory
|
|
9366
10094
|
*
|
|
9367
10095
|
*/
|
|
9368
|
-
readonly filter_mode
|
|
10096
|
+
readonly filter_mode?: string
|
|
9369
10097
|
|
|
9370
10098
|
/**
|
|
9371
10099
|
* The flags for this item prototype.
|
|
@@ -9378,7 +10106,7 @@ interface LuaItemPrototype {
|
|
|
9378
10106
|
readonly fuel_acceleration_multiplier: number
|
|
9379
10107
|
|
|
9380
10108
|
/**
|
|
9381
|
-
* The fuel category
|
|
10109
|
+
* The fuel category of this item prototype, if any.
|
|
9382
10110
|
*/
|
|
9383
10111
|
readonly fuel_category?: string
|
|
9384
10112
|
|
|
@@ -9403,12 +10131,12 @@ interface LuaItemPrototype {
|
|
|
9403
10131
|
readonly group: LuaGroup
|
|
9404
10132
|
|
|
9405
10133
|
/**
|
|
9406
|
-
* If this tool item has infinite durability.
|
|
10134
|
+
* If this tool item has infinite durability.
|
|
9407
10135
|
* @remarks
|
|
9408
10136
|
* Applies to subclasses: ToolItem
|
|
9409
10137
|
*
|
|
9410
10138
|
*/
|
|
9411
|
-
readonly infinite
|
|
10139
|
+
readonly infinite?: boolean
|
|
9412
10140
|
|
|
9413
10141
|
/**
|
|
9414
10142
|
* The insertion priority mode used by this item with inventory.
|
|
@@ -9416,44 +10144,44 @@ interface LuaItemPrototype {
|
|
|
9416
10144
|
* Applies to subclasses: ItemWithInventory
|
|
9417
10145
|
*
|
|
9418
10146
|
*/
|
|
9419
|
-
readonly insertion_priority_mode
|
|
10147
|
+
readonly insertion_priority_mode?: string
|
|
9420
10148
|
|
|
9421
10149
|
/**
|
|
9422
|
-
* The main inventory size for item-with-inventory-prototype.
|
|
10150
|
+
* The main inventory size for item-with-inventory-prototype.
|
|
9423
10151
|
* @remarks
|
|
9424
10152
|
* Applies to subclasses: ItemWithInventoryPrototype
|
|
9425
10153
|
*
|
|
9426
10154
|
*/
|
|
9427
|
-
readonly inventory_size
|
|
10155
|
+
readonly inventory_size?: number
|
|
9428
10156
|
|
|
9429
10157
|
/**
|
|
9430
|
-
* The inventory size bonus for this armor prototype.
|
|
10158
|
+
* The inventory size bonus for this armor prototype.
|
|
9431
10159
|
* @remarks
|
|
9432
10160
|
* Applies to subclasses: ArmorPrototype
|
|
9433
10161
|
*
|
|
9434
10162
|
*/
|
|
9435
|
-
readonly inventory_size_bonus
|
|
10163
|
+
readonly inventory_size_bonus?: number
|
|
9436
10164
|
|
|
9437
10165
|
/**
|
|
9438
10166
|
* @remarks
|
|
9439
10167
|
* Applies to subclasses: ItemWithInventory
|
|
9440
10168
|
*
|
|
9441
10169
|
*/
|
|
9442
|
-
readonly item_filters
|
|
10170
|
+
readonly item_filters?: {[key: string]: LuaItemPrototype}
|
|
9443
10171
|
|
|
9444
10172
|
/**
|
|
9445
10173
|
* @remarks
|
|
9446
10174
|
* Applies to subclasses: ItemWithInventory
|
|
9447
10175
|
*
|
|
9448
10176
|
*/
|
|
9449
|
-
readonly item_group_filters
|
|
10177
|
+
readonly item_group_filters?: {[key: string]: LuaGroup}
|
|
9450
10178
|
|
|
9451
10179
|
/**
|
|
9452
10180
|
* @remarks
|
|
9453
10181
|
* Applies to subclasses: ItemWithInventory
|
|
9454
10182
|
*
|
|
9455
10183
|
*/
|
|
9456
|
-
readonly item_subgroup_filters
|
|
10184
|
+
readonly item_subgroup_filters?: {[key: string]: LuaGroup}
|
|
9457
10185
|
|
|
9458
10186
|
/**
|
|
9459
10187
|
* The limitation message key used when the player attempts to use this modules in some place it's not allowed.
|
|
@@ -9461,7 +10189,7 @@ interface LuaItemPrototype {
|
|
|
9461
10189
|
* Applies to subclasses: ModuleItem
|
|
9462
10190
|
*
|
|
9463
10191
|
*/
|
|
9464
|
-
readonly limitation_message_key
|
|
10192
|
+
readonly limitation_message_key?: string
|
|
9465
10193
|
|
|
9466
10194
|
/**
|
|
9467
10195
|
* An array of recipe names this module is allowed to work with. Empty when all recipes are allowed.
|
|
@@ -9469,7 +10197,7 @@ interface LuaItemPrototype {
|
|
|
9469
10197
|
* Applies to subclasses: ModuleItem
|
|
9470
10198
|
*
|
|
9471
10199
|
*/
|
|
9472
|
-
readonly limitations
|
|
10200
|
+
readonly limitations?: string[]
|
|
9473
10201
|
|
|
9474
10202
|
readonly localised_description: LocalisedString
|
|
9475
10203
|
|
|
@@ -9479,22 +10207,25 @@ interface LuaItemPrototype {
|
|
|
9479
10207
|
* Applies to subclasses: ItemWithInventory
|
|
9480
10208
|
*
|
|
9481
10209
|
*/
|
|
9482
|
-
readonly localised_filter_message
|
|
10210
|
+
readonly localised_filter_message?: LocalisedString
|
|
9483
10211
|
|
|
9484
10212
|
readonly localised_name: LocalisedString
|
|
9485
10213
|
|
|
9486
10214
|
/**
|
|
9487
|
-
* Size of full magazine
|
|
10215
|
+
* Size of full magazine.
|
|
10216
|
+
* @remarks
|
|
10217
|
+
* Applies to subclasses: AmmoItem
|
|
10218
|
+
*
|
|
9488
10219
|
*/
|
|
9489
|
-
readonly magazine_size
|
|
10220
|
+
readonly magazine_size?: number
|
|
9490
10221
|
|
|
9491
10222
|
/**
|
|
9492
|
-
* How many filters an upgrade item has.
|
|
10223
|
+
* How many filters an upgrade item has.
|
|
9493
10224
|
* @remarks
|
|
9494
10225
|
* Applies to subclasses: UpgradeItem
|
|
9495
10226
|
*
|
|
9496
10227
|
*/
|
|
9497
|
-
readonly mapper_count
|
|
10228
|
+
readonly mapper_count?: number
|
|
9498
10229
|
|
|
9499
10230
|
/**
|
|
9500
10231
|
* Effects of this module.
|
|
@@ -9502,7 +10233,7 @@ interface LuaItemPrototype {
|
|
|
9502
10233
|
* Applies to subclasses: ModuleItem
|
|
9503
10234
|
*
|
|
9504
10235
|
*/
|
|
9505
|
-
readonly module_effects
|
|
10236
|
+
readonly module_effects?: ModuleEffects
|
|
9506
10237
|
|
|
9507
10238
|
/**
|
|
9508
10239
|
* Name of this prototype.
|
|
@@ -9520,27 +10251,30 @@ interface LuaItemPrototype {
|
|
|
9520
10251
|
readonly order: string
|
|
9521
10252
|
|
|
9522
10253
|
/**
|
|
9523
|
-
* Prototype of the equipment that will be created by placing this item in an equipment grid
|
|
10254
|
+
* Prototype of the equipment that will be created by placing this item in an equipment grid, if any.
|
|
9524
10255
|
*/
|
|
9525
10256
|
readonly place_as_equipment_result?: LuaEquipmentPrototype
|
|
9526
10257
|
|
|
9527
10258
|
/**
|
|
9528
|
-
* The place-as-tile result if one is defined,
|
|
10259
|
+
* The place-as-tile result if one is defined, if any.
|
|
9529
10260
|
*/
|
|
9530
|
-
readonly place_as_tile_result
|
|
10261
|
+
readonly place_as_tile_result?: PlaceAsTileResult
|
|
9531
10262
|
|
|
9532
10263
|
/**
|
|
9533
|
-
* Prototype of the entity that will be created by placing this item,
|
|
10264
|
+
* Prototype of the entity that will be created by placing this item, if any.
|
|
9534
10265
|
*/
|
|
9535
10266
|
readonly place_result?: LuaEntityPrototype
|
|
9536
10267
|
|
|
9537
10268
|
/**
|
|
9538
|
-
* Amount of extra time (in ticks) it takes to reload the weapon after depleting the magazine
|
|
10269
|
+
* Amount of extra time (in ticks) it takes to reload the weapon after depleting the magazine.
|
|
10270
|
+
* @remarks
|
|
10271
|
+
* Applies to subclasses: AmmoItem
|
|
10272
|
+
*
|
|
9539
10273
|
*/
|
|
9540
10274
|
readonly reload_time?: number
|
|
9541
10275
|
|
|
9542
10276
|
/**
|
|
9543
|
-
* The repair result of this repair tool prototype
|
|
10277
|
+
* The repair result of this repair tool prototype.
|
|
9544
10278
|
* @remarks
|
|
9545
10279
|
* Applies to subclasses: RepairTool
|
|
9546
10280
|
*
|
|
@@ -9548,9 +10282,12 @@ interface LuaItemPrototype {
|
|
|
9548
10282
|
readonly repair_result?: TriggerItem[]
|
|
9549
10283
|
|
|
9550
10284
|
/**
|
|
9551
|
-
* Resistances of this
|
|
10285
|
+
* Resistances of this armor item, if any, indexed by damage type name.
|
|
10286
|
+
* @remarks
|
|
10287
|
+
* Applies to subclasses: Armor
|
|
10288
|
+
*
|
|
9552
10289
|
*/
|
|
9553
|
-
readonly resistances
|
|
10290
|
+
readonly resistances?: {[key: string]: Resistance}
|
|
9554
10291
|
|
|
9555
10292
|
/**
|
|
9556
10293
|
* The reverse entity filter mode used by this selection tool.
|
|
@@ -9558,7 +10295,7 @@ interface LuaItemPrototype {
|
|
|
9558
10295
|
* Applies to subclasses: SelectionTool
|
|
9559
10296
|
*
|
|
9560
10297
|
*/
|
|
9561
|
-
readonly reverse_alt_entity_filter_mode
|
|
10298
|
+
readonly reverse_alt_entity_filter_mode?: string
|
|
9562
10299
|
|
|
9563
10300
|
/**
|
|
9564
10301
|
* The reverse entity filters used by this selection tool indexed by entity name.
|
|
@@ -9566,7 +10303,7 @@ interface LuaItemPrototype {
|
|
|
9566
10303
|
* Applies to subclasses: SelectionTool
|
|
9567
10304
|
*
|
|
9568
10305
|
*/
|
|
9569
|
-
readonly reverse_entity_filters
|
|
10306
|
+
readonly reverse_entity_filters?: {[key: string]: LuaEntityPrototype}
|
|
9570
10307
|
|
|
9571
10308
|
/**
|
|
9572
10309
|
* The reverse entity type filters used by this selection tool indexed by entity type.
|
|
@@ -9575,7 +10312,7 @@ interface LuaItemPrototype {
|
|
|
9575
10312
|
* Applies to subclasses: SelectionTool
|
|
9576
10313
|
*
|
|
9577
10314
|
*/
|
|
9578
|
-
readonly reverse_entity_type_filters
|
|
10315
|
+
readonly reverse_entity_type_filters?: {[key: string]: boolean}
|
|
9579
10316
|
|
|
9580
10317
|
/**
|
|
9581
10318
|
* The color used when doing reverse selection with this selection tool prototype.
|
|
@@ -9583,14 +10320,14 @@ interface LuaItemPrototype {
|
|
|
9583
10320
|
* Applies to subclasses: SelectionTool
|
|
9584
10321
|
*
|
|
9585
10322
|
*/
|
|
9586
|
-
readonly reverse_selection_border_color
|
|
10323
|
+
readonly reverse_selection_border_color?: Color
|
|
9587
10324
|
|
|
9588
10325
|
/**
|
|
9589
10326
|
* @remarks
|
|
9590
10327
|
* Applies to subclasses: SelectionTool
|
|
9591
10328
|
*
|
|
9592
10329
|
*/
|
|
9593
|
-
readonly reverse_selection_cursor_box_type
|
|
10330
|
+
readonly reverse_selection_cursor_box_type?: string
|
|
9594
10331
|
|
|
9595
10332
|
/**
|
|
9596
10333
|
* Flags that affect which entities will be selected during reverse selection.
|
|
@@ -9598,7 +10335,7 @@ interface LuaItemPrototype {
|
|
|
9598
10335
|
* Applies to subclasses: SelectionTool
|
|
9599
10336
|
*
|
|
9600
10337
|
*/
|
|
9601
|
-
readonly reverse_selection_mode_flags
|
|
10338
|
+
readonly reverse_selection_mode_flags?: SelectionModeFlags
|
|
9602
10339
|
|
|
9603
10340
|
/**
|
|
9604
10341
|
* The reverse tile filter mode used by this selection tool.
|
|
@@ -9606,7 +10343,7 @@ interface LuaItemPrototype {
|
|
|
9606
10343
|
* Applies to subclasses: SelectionTool
|
|
9607
10344
|
*
|
|
9608
10345
|
*/
|
|
9609
|
-
readonly reverse_tile_filter_mode
|
|
10346
|
+
readonly reverse_tile_filter_mode?: string
|
|
9610
10347
|
|
|
9611
10348
|
/**
|
|
9612
10349
|
* The reverse tile filters used by this selection tool indexed by tile name.
|
|
@@ -9614,10 +10351,10 @@ interface LuaItemPrototype {
|
|
|
9614
10351
|
* Applies to subclasses: SelectionTool
|
|
9615
10352
|
*
|
|
9616
10353
|
*/
|
|
9617
|
-
readonly reverse_tile_filters
|
|
10354
|
+
readonly reverse_tile_filters?: {[key: string]: LuaTilePrototype}
|
|
9618
10355
|
|
|
9619
10356
|
/**
|
|
9620
|
-
* The results
|
|
10357
|
+
* The results of launching this item in a rocket.
|
|
9621
10358
|
*/
|
|
9622
10359
|
readonly rocket_launch_products: Product[]
|
|
9623
10360
|
|
|
@@ -9627,14 +10364,14 @@ interface LuaItemPrototype {
|
|
|
9627
10364
|
* Applies to subclasses: SelectionTool
|
|
9628
10365
|
*
|
|
9629
10366
|
*/
|
|
9630
|
-
readonly selection_border_color
|
|
10367
|
+
readonly selection_border_color?: Color
|
|
9631
10368
|
|
|
9632
10369
|
/**
|
|
9633
10370
|
* @remarks
|
|
9634
10371
|
* Applies to subclasses: SelectionTool
|
|
9635
10372
|
*
|
|
9636
10373
|
*/
|
|
9637
|
-
readonly selection_cursor_box_type
|
|
10374
|
+
readonly selection_cursor_box_type?: string
|
|
9638
10375
|
|
|
9639
10376
|
/**
|
|
9640
10377
|
* Flags that affect which entities will be selected.
|
|
@@ -9642,12 +10379,15 @@ interface LuaItemPrototype {
|
|
|
9642
10379
|
* Applies to subclasses: SelectionTool
|
|
9643
10380
|
*
|
|
9644
10381
|
*/
|
|
9645
|
-
readonly selection_mode_flags
|
|
10382
|
+
readonly selection_mode_flags?: SelectionModeFlags
|
|
9646
10383
|
|
|
9647
10384
|
/**
|
|
9648
|
-
* The repairing speed if this is a repairing tool
|
|
10385
|
+
* The repairing speed if this is a repairing tool.
|
|
10386
|
+
* @remarks
|
|
10387
|
+
* Applies to subclasses: RepairTool
|
|
10388
|
+
*
|
|
9649
10389
|
*/
|
|
9650
|
-
readonly speed
|
|
10390
|
+
readonly speed?: number
|
|
9651
10391
|
|
|
9652
10392
|
/**
|
|
9653
10393
|
* Maximum stack size of the item specified by this prototype.
|
|
@@ -9660,7 +10400,7 @@ interface LuaItemPrototype {
|
|
|
9660
10400
|
readonly stackable: boolean
|
|
9661
10401
|
|
|
9662
10402
|
/**
|
|
9663
|
-
* The straight rail prototype used for this rail planner prototype
|
|
10403
|
+
* The straight rail prototype used for this rail planner prototype.
|
|
9664
10404
|
* @remarks
|
|
9665
10405
|
* Applies to subclasses: RailPlanner
|
|
9666
10406
|
*
|
|
@@ -9678,7 +10418,7 @@ interface LuaItemPrototype {
|
|
|
9678
10418
|
* Applies to subclasses: ModuleItem
|
|
9679
10419
|
*
|
|
9680
10420
|
*/
|
|
9681
|
-
readonly tier
|
|
10421
|
+
readonly tier?: number
|
|
9682
10422
|
|
|
9683
10423
|
/**
|
|
9684
10424
|
* The tile filter mode used by this selection tool.
|
|
@@ -9686,10 +10426,10 @@ interface LuaItemPrototype {
|
|
|
9686
10426
|
* Applies to subclasses: SelectionTool
|
|
9687
10427
|
*
|
|
9688
10428
|
*/
|
|
9689
|
-
readonly tile_filter_mode
|
|
10429
|
+
readonly tile_filter_mode?: string
|
|
9690
10430
|
|
|
9691
10431
|
/**
|
|
9692
|
-
* The number of tile filters this deconstruction item has
|
|
10432
|
+
* The number of tile filters this deconstruction item has.
|
|
9693
10433
|
* @remarks
|
|
9694
10434
|
* Applies to subclasses: DeconstructionItem
|
|
9695
10435
|
*
|
|
@@ -9702,7 +10442,7 @@ interface LuaItemPrototype {
|
|
|
9702
10442
|
* Applies to subclasses: SelectionTool
|
|
9703
10443
|
*
|
|
9704
10444
|
*/
|
|
9705
|
-
readonly tile_filters
|
|
10445
|
+
readonly tile_filters?: {[key: string]: LuaTilePrototype}
|
|
9706
10446
|
|
|
9707
10447
|
/**
|
|
9708
10448
|
* Type of this prototype. E.g. `"gun"` or `"mining-tool"`.
|
|
@@ -9715,7 +10455,7 @@ interface LuaItemPrototype {
|
|
|
9715
10455
|
readonly valid: boolean
|
|
9716
10456
|
|
|
9717
10457
|
/**
|
|
9718
|
-
* The number of items needed to connect
|
|
10458
|
+
* The number of items needed to connect two entities with this as wire.
|
|
9719
10459
|
*/
|
|
9720
10460
|
readonly wire_count: number
|
|
9721
10461
|
|
|
@@ -10069,11 +10809,11 @@ interface LuaItemStack {
|
|
|
10069
10809
|
* @remarks
|
|
10070
10810
|
* Applies to subclasses: DeconstructionItem
|
|
10071
10811
|
*
|
|
10072
|
-
* @param filter -
|
|
10812
|
+
* @param filter - Writing `nil` removes the filter.
|
|
10073
10813
|
*/
|
|
10074
10814
|
set_entity_filter(this: void,
|
|
10075
10815
|
index: number,
|
|
10076
|
-
filter: string | LuaEntityPrototype | LuaEntity): void
|
|
10816
|
+
filter: string | LuaEntityPrototype | LuaEntity | null): void
|
|
10077
10817
|
|
|
10078
10818
|
/**
|
|
10079
10819
|
* Sets the module filter at the given index for this upgrade item.
|
|
@@ -10130,15 +10870,15 @@ interface LuaItemStack {
|
|
|
10130
10870
|
stack: ItemStackIdentification): void
|
|
10131
10871
|
|
|
10132
10872
|
/**
|
|
10133
|
-
* The active blueprint index for this blueprint book.
|
|
10873
|
+
* The active blueprint index for this blueprint book. `nil` if this blueprint book is empty.
|
|
10134
10874
|
* @remarks
|
|
10135
10875
|
* Applies to subclasses: BlueprintBookItem
|
|
10136
10876
|
*
|
|
10137
10877
|
*/
|
|
10138
|
-
active_index
|
|
10878
|
+
active_index?: number
|
|
10139
10879
|
|
|
10140
10880
|
/**
|
|
10141
|
-
*
|
|
10881
|
+
* Whether the label for this item can be manually changed. When false the label can only be changed through the API.
|
|
10142
10882
|
* @remarks
|
|
10143
10883
|
* Applies to subclasses: ItemWithLabel
|
|
10144
10884
|
*
|
|
@@ -10162,33 +10902,36 @@ interface LuaItemStack {
|
|
|
10162
10902
|
blueprint_absolute_snapping: boolean
|
|
10163
10903
|
|
|
10164
10904
|
/**
|
|
10165
|
-
* Icons of
|
|
10905
|
+
* Icons of this blueprint item, blueprint book, deconstruction item or upgrade planner. An item that doesn't have icons returns `nil` on read and throws error on write.
|
|
10166
10906
|
* @remarks
|
|
10167
10907
|
* Applies to subclasses: BlueprintItem
|
|
10168
10908
|
*
|
|
10169
10909
|
*/
|
|
10170
|
-
blueprint_icons
|
|
10910
|
+
blueprint_icons?: BlueprintSignalIcon[]
|
|
10171
10911
|
|
|
10172
10912
|
/**
|
|
10173
|
-
* The offset from the absolute grid
|
|
10913
|
+
* The offset from the absolute grid. `nil` if absolute snapping is not enabled.
|
|
10174
10914
|
* @remarks
|
|
10175
10915
|
* Applies to subclasses: BlueprintItem
|
|
10176
10916
|
*
|
|
10177
10917
|
*/
|
|
10178
|
-
blueprint_position_relative_to_grid
|
|
10918
|
+
blueprint_position_relative_to_grid?: TilePosition
|
|
10179
10919
|
|
|
10180
10920
|
/**
|
|
10181
|
-
* The snapping grid size in this blueprint item
|
|
10921
|
+
* The snapping grid size in this blueprint item. `nil` if snapping is not enabled.
|
|
10182
10922
|
* @remarks
|
|
10183
10923
|
* Applies to subclasses: BlueprintItem
|
|
10184
10924
|
*
|
|
10185
10925
|
*/
|
|
10186
|
-
blueprint_snap_to_grid
|
|
10926
|
+
blueprint_snap_to_grid?: TilePosition
|
|
10187
10927
|
|
|
10188
10928
|
/**
|
|
10189
|
-
* If this item is a spidertron remote that has a spidertron bound to it, it returns the connected spider-vehicle entity
|
|
10929
|
+
* If this item is a spidertron remote that has a spidertron bound to it, it returns the connected spider-vehicle entity.
|
|
10930
|
+
* @remarks
|
|
10931
|
+
* Applies to subclasses: SpidertronRemote
|
|
10932
|
+
*
|
|
10190
10933
|
*/
|
|
10191
|
-
connected_entity
|
|
10934
|
+
connected_entity?: LuaEntity
|
|
10192
10935
|
|
|
10193
10936
|
/**
|
|
10194
10937
|
* Raw materials required to build this blueprint. Result is a dictionary mapping each item prototype name to the required count.
|
|
@@ -10219,10 +10962,10 @@ interface LuaItemStack {
|
|
|
10219
10962
|
/**
|
|
10220
10963
|
* Durability of the contained item. Automatically capped at the item's maximum durability.
|
|
10221
10964
|
* @remarks
|
|
10222
|
-
*
|
|
10965
|
+
* Applies to subclasses: Tool
|
|
10223
10966
|
*
|
|
10224
10967
|
*/
|
|
10225
|
-
durability
|
|
10968
|
+
durability?: number
|
|
10226
10969
|
|
|
10227
10970
|
/**
|
|
10228
10971
|
* The number of entity filters this deconstruction item supports.
|
|
@@ -10254,7 +10997,7 @@ interface LuaItemStack {
|
|
|
10254
10997
|
extends_inventory: boolean
|
|
10255
10998
|
|
|
10256
10999
|
/**
|
|
10257
|
-
* The equipment grid of this item
|
|
11000
|
+
* The equipment grid of this item, if any.
|
|
10258
11001
|
*/
|
|
10259
11002
|
readonly grid?: LuaEquipmentGrid
|
|
10260
11003
|
|
|
@@ -10334,7 +11077,7 @@ interface LuaItemStack {
|
|
|
10334
11077
|
readonly is_upgrade_item: boolean
|
|
10335
11078
|
|
|
10336
11079
|
/**
|
|
10337
|
-
* The unique identifier for this item
|
|
11080
|
+
* The unique identifier for this item , if any. Note that this ID stays the same no matter where the item is moved to.
|
|
10338
11081
|
*
|
|
10339
11082
|
* Only these types of items have unique IDs:
|
|
10340
11083
|
* - `"armor"`
|
|
@@ -10349,23 +11092,23 @@ interface LuaItemStack {
|
|
|
10349
11092
|
* - `"item-with-inventory"`
|
|
10350
11093
|
* - `"item-with-tags"`
|
|
10351
11094
|
*/
|
|
10352
|
-
readonly item_number
|
|
11095
|
+
readonly item_number?: number
|
|
10353
11096
|
|
|
10354
11097
|
/**
|
|
10355
|
-
* The current label for this item
|
|
11098
|
+
* The current label for this item, if any.
|
|
10356
11099
|
* @remarks
|
|
10357
11100
|
* Applies to subclasses: ItemWithLabel
|
|
10358
11101
|
*
|
|
10359
11102
|
*/
|
|
10360
|
-
label
|
|
11103
|
+
label?: string
|
|
10361
11104
|
|
|
10362
11105
|
/**
|
|
10363
|
-
* The current label color for this item
|
|
11106
|
+
* The current label color for this item, if any.
|
|
10364
11107
|
* @remarks
|
|
10365
11108
|
* Applies to subclasses: ItemWithLabel
|
|
10366
11109
|
*
|
|
10367
11110
|
*/
|
|
10368
|
-
label_color
|
|
11111
|
+
label_color?: Color
|
|
10369
11112
|
|
|
10370
11113
|
/**
|
|
10371
11114
|
* Prototype name of the item held in this stack.
|
|
@@ -10461,7 +11204,7 @@ interface LuaLampControlBehavior extends LuaGenericOnOffControlBehavior {
|
|
|
10461
11204
|
help(this: void): void
|
|
10462
11205
|
|
|
10463
11206
|
/**
|
|
10464
|
-
* The color the lamp is showing
|
|
11207
|
+
* The color the lamp is showing, if any.
|
|
10465
11208
|
*/
|
|
10466
11209
|
readonly color?: Color
|
|
10467
11210
|
|
|
@@ -10558,7 +11301,7 @@ interface LuaLogisticCell {
|
|
|
10558
11301
|
readonly construction_radius: number
|
|
10559
11302
|
|
|
10560
11303
|
/**
|
|
10561
|
-
* The network that owns this cell
|
|
11304
|
+
* The network that owns this cell, if any.
|
|
10562
11305
|
*/
|
|
10563
11306
|
readonly logistic_network?: LuaLogisticNetwork
|
|
10564
11307
|
|
|
@@ -10654,6 +11397,17 @@ interface LuaLogisticContainerControlBehavior extends LuaControlBehavior {
|
|
|
10654
11397
|
* A single logistic network of a given force on a given surface.
|
|
10655
11398
|
*/
|
|
10656
11399
|
interface LuaLogisticNetwork {
|
|
11400
|
+
/**
|
|
11401
|
+
* Can the network satisfy a request for a given item and count.
|
|
11402
|
+
* @param count - Count to check. Defaults to 1.
|
|
11403
|
+
* @param include_buffers - Should buffers be considered? Defaults to false.
|
|
11404
|
+
* @param item - Item name to check.
|
|
11405
|
+
*/
|
|
11406
|
+
can_satisfy_request(this: void,
|
|
11407
|
+
item: string,
|
|
11408
|
+
count?: number,
|
|
11409
|
+
include_buffers?: boolean): void
|
|
11410
|
+
|
|
10657
11411
|
/**
|
|
10658
11412
|
* Find logistic cell closest to a given position.
|
|
10659
11413
|
*/
|
|
@@ -10674,6 +11428,20 @@ interface LuaLogisticNetwork {
|
|
|
10674
11428
|
item?: string,
|
|
10675
11429
|
member?: string): void
|
|
10676
11430
|
|
|
11431
|
+
/**
|
|
11432
|
+
* Get the amount of items of the given type indexed by the storage member.
|
|
11433
|
+
* @param item - Item name to check.
|
|
11434
|
+
*/
|
|
11435
|
+
get_supply_counts(this: void,
|
|
11436
|
+
item: string): void
|
|
11437
|
+
|
|
11438
|
+
/**
|
|
11439
|
+
* Gets the logistic points with of the given type indexed by the storage member.
|
|
11440
|
+
* @param item - Item name to check.
|
|
11441
|
+
*/
|
|
11442
|
+
get_supply_points(this: void,
|
|
11443
|
+
item: string): void
|
|
11444
|
+
|
|
10677
11445
|
/**
|
|
10678
11446
|
* All methods and properties that this object supports.
|
|
10679
11447
|
*/
|
|
@@ -10855,7 +11623,7 @@ interface LuaLogisticPoint {
|
|
|
10855
11623
|
readonly exact: boolean
|
|
10856
11624
|
|
|
10857
11625
|
/**
|
|
10858
|
-
* The logistic filters for this logistic point
|
|
11626
|
+
* The logistic filters for this logistic point, if this uses any.
|
|
10859
11627
|
* @remarks
|
|
10860
11628
|
* The returned array will always have an entry for each filter and will be indexed in sequence when not nil.
|
|
10861
11629
|
*
|
|
@@ -10960,17 +11728,17 @@ interface LuaModSettingPrototype {
|
|
|
10960
11728
|
help(this: void): void
|
|
10961
11729
|
|
|
10962
11730
|
/**
|
|
10963
|
-
*
|
|
11731
|
+
* Whether this string setting allows blank values. `nil` if not a string setting.
|
|
10964
11732
|
*/
|
|
10965
11733
|
readonly allow_blank?: boolean
|
|
10966
11734
|
|
|
10967
11735
|
/**
|
|
10968
|
-
* The allowed values for this setting
|
|
11736
|
+
* The allowed values for this setting. `nil` if this setting doesn't use the a fixed set of values.
|
|
10969
11737
|
*/
|
|
10970
11738
|
readonly allowed_values?: string[] | number[]
|
|
10971
11739
|
|
|
10972
11740
|
/**
|
|
10973
|
-
*
|
|
11741
|
+
* Whether this string setting auto-trims values. `nil` if not a string setting
|
|
10974
11742
|
*/
|
|
10975
11743
|
readonly auto_trim?: boolean
|
|
10976
11744
|
|
|
@@ -10980,7 +11748,7 @@ interface LuaModSettingPrototype {
|
|
|
10980
11748
|
readonly default_value: boolean | number | string
|
|
10981
11749
|
|
|
10982
11750
|
/**
|
|
10983
|
-
*
|
|
11751
|
+
* Whether this setting is hidden from the GUI.
|
|
10984
11752
|
*/
|
|
10985
11753
|
readonly hidden: boolean
|
|
10986
11754
|
|
|
@@ -10989,12 +11757,12 @@ interface LuaModSettingPrototype {
|
|
|
10989
11757
|
readonly localised_name: LocalisedString
|
|
10990
11758
|
|
|
10991
11759
|
/**
|
|
10992
|
-
* The maximum value for this setting
|
|
11760
|
+
* The maximum value for this setting. `nil` if this setting type doesn't support a maximum.
|
|
10993
11761
|
*/
|
|
10994
11762
|
readonly maximum_value?: number
|
|
10995
11763
|
|
|
10996
11764
|
/**
|
|
10997
|
-
* The minimum value for this setting
|
|
11765
|
+
* The minimum value for this setting. `nil` if this setting type doesn't support a minimum.
|
|
10998
11766
|
*/
|
|
10999
11767
|
readonly minimum_value?: number
|
|
11000
11768
|
|
|
@@ -11700,7 +12468,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
11700
12468
|
remove_alert(this: void,
|
|
11701
12469
|
table: {
|
|
11702
12470
|
entity?: LuaEntity,
|
|
11703
|
-
prototype?: LuaEntityPrototype,
|
|
12471
|
+
prototype?: LuaEntityPrototype | string,
|
|
11704
12472
|
position?: MapPosition,
|
|
11705
12473
|
type?: defines.alert_type,
|
|
11706
12474
|
surface?: SurfaceIdentification,
|
|
@@ -11871,10 +12639,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
11871
12639
|
readonly blueprint_to_setup: LuaItemStack
|
|
11872
12640
|
|
|
11873
12641
|
/**
|
|
11874
|
-
* The character attached to this player,
|
|
11875
|
-
* @remarks
|
|
11876
|
-
* Will also return `nil` when the player is disconnected (see {@link LuaPlayer::connected | LuaPlayer::connected}).
|
|
11877
|
-
*
|
|
12642
|
+
* The character attached to this player, if any. Returns `nil` when the player is disconnected (see {@link LuaPlayer::connected | LuaPlayer::connected}).
|
|
11878
12643
|
*/
|
|
11879
12644
|
character?: LuaEntity
|
|
11880
12645
|
|
|
@@ -11896,12 +12661,9 @@ interface LuaPlayer extends LuaControl {
|
|
|
11896
12661
|
readonly controller_type: defines.controllers
|
|
11897
12662
|
|
|
11898
12663
|
/**
|
|
11899
|
-
* When in a cutscene; the character this player would be using once the cutscene is over.
|
|
11900
|
-
* @remarks
|
|
11901
|
-
* Will also return `nil` when the player is disconnected (see {@link LuaPlayer::connected | LuaPlayer::connected}).
|
|
11902
|
-
*
|
|
12664
|
+
* When in a cutscene; the character this player would be using once the cutscene is over, if any. Returns `nil` when the player is disconnected (see {@link LuaPlayer::connected | LuaPlayer::connected}).
|
|
11903
12665
|
*/
|
|
11904
|
-
readonly cutscene_character
|
|
12666
|
+
readonly cutscene_character?: LuaEntity
|
|
11905
12667
|
|
|
11906
12668
|
/**
|
|
11907
12669
|
* The display resolution for this player.
|
|
@@ -11920,11 +12682,9 @@ interface LuaPlayer extends LuaControl {
|
|
|
11920
12682
|
readonly display_scale: number
|
|
11921
12683
|
|
|
11922
12684
|
/**
|
|
11923
|
-
* The source entity used during entity settings copy-paste if any.
|
|
11924
|
-
*
|
|
11925
|
-
* `nil` if there isn't currently a source entity.
|
|
12685
|
+
* The source entity used during entity settings copy-paste, if any.
|
|
11926
12686
|
*/
|
|
11927
|
-
readonly entity_copy_source
|
|
12687
|
+
readonly entity_copy_source?: LuaEntity
|
|
11928
12688
|
|
|
11929
12689
|
/**
|
|
11930
12690
|
* The player's game view settings.
|
|
@@ -11934,9 +12694,9 @@ interface LuaPlayer extends LuaControl {
|
|
|
11934
12694
|
readonly gui: LuaGui
|
|
11935
12695
|
|
|
11936
12696
|
/**
|
|
11937
|
-
* The original location of the item in the cursor, marked with a hand. When writing, the specified inventory slot must be empty and the cursor stack must not be empty.
|
|
12697
|
+
* The original location of the item in the cursor, marked with a hand. `nil` if the cursor stack is empty. When writing, the specified inventory slot must be empty and the cursor stack must not be empty.
|
|
11938
12698
|
*/
|
|
11939
|
-
hand_location
|
|
12699
|
+
hand_location?: ItemStackLocation
|
|
11940
12700
|
|
|
11941
12701
|
/**
|
|
11942
12702
|
* This player's unique index in {@link LuaGameScript::players | LuaGameScript::players}. It is given to them when they are {@link created | on_player_created} and remains assigned to them until they are {@link removed | on_player_removed}.
|
|
@@ -11964,7 +12724,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
11964
12724
|
minimap_enabled: boolean
|
|
11965
12725
|
|
|
11966
12726
|
/**
|
|
11967
|
-
*
|
|
12727
|
+
* The current per-player settings for the this player, indexed by prototype name. Returns the same structure as {@link LuaSettings::get_player_settings | LuaSettings::get_player_settings}.
|
|
11968
12728
|
* @remarks
|
|
11969
12729
|
* This table will become invalid if its associated player does.
|
|
11970
12730
|
*
|
|
@@ -11992,7 +12752,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
11992
12752
|
readonly opened_self: boolean
|
|
11993
12753
|
|
|
11994
12754
|
/**
|
|
11995
|
-
* The permission group this player is part of
|
|
12755
|
+
* The permission group this player is part of, if any.
|
|
11996
12756
|
*/
|
|
11997
12757
|
permission_group?: LuaPermissionGroup
|
|
11998
12758
|
|
|
@@ -12017,7 +12777,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
12017
12777
|
spectator: boolean
|
|
12018
12778
|
|
|
12019
12779
|
/**
|
|
12020
|
-
* The stashed controller type
|
|
12780
|
+
* The stashed controller type, if any.
|
|
12021
12781
|
* @remarks
|
|
12022
12782
|
* This is mainly useful when a player is in the map editor.
|
|
12023
12783
|
*
|
|
@@ -12030,9 +12790,10 @@ interface LuaPlayer extends LuaControl {
|
|
|
12030
12790
|
tag: string
|
|
12031
12791
|
|
|
12032
12792
|
/**
|
|
12033
|
-
* The number of ticks until this player will respawn
|
|
12034
|
-
*
|
|
12793
|
+
* The number of ticks until this player will respawn. `nil` if this player is not waiting to respawn.
|
|
12794
|
+
*
|
|
12035
12795
|
* Set to `nil` to immediately respawn the player.
|
|
12796
|
+
* @remarks
|
|
12036
12797
|
* Set to any positive value to trigger the respawn state for this player.
|
|
12037
12798
|
*
|
|
12038
12799
|
*/
|
|
@@ -12551,9 +13312,9 @@ interface LuaRecipePrototype {
|
|
|
12551
13312
|
readonly localised_name: LocalisedString
|
|
12552
13313
|
|
|
12553
13314
|
/**
|
|
12554
|
-
* The main product of this recipe,
|
|
13315
|
+
* The main product of this recipe, if any.
|
|
12555
13316
|
*/
|
|
12556
|
-
readonly main_product
|
|
13317
|
+
readonly main_product?: Product
|
|
12557
13318
|
|
|
12558
13319
|
/**
|
|
12559
13320
|
* Name of the recipe. This can be different than the name of the result items as there could be more recipes to make the same item.
|
|
@@ -13991,9 +14752,15 @@ interface LuaShortcutPrototype {
|
|
|
13991
14752
|
|
|
13992
14753
|
readonly action: string
|
|
13993
14754
|
|
|
13994
|
-
|
|
14755
|
+
/**
|
|
14756
|
+
* The control input that is associated with this shortcut, if any.
|
|
14757
|
+
*/
|
|
14758
|
+
readonly associated_control_input?: string
|
|
13995
14759
|
|
|
13996
|
-
|
|
14760
|
+
/**
|
|
14761
|
+
* The item to create when this shortcut is used, if any.
|
|
14762
|
+
*/
|
|
14763
|
+
readonly item_to_spawn?: LuaItemPrototype
|
|
13997
14764
|
|
|
13998
14765
|
readonly localised_description: LocalisedString
|
|
13999
14766
|
|
|
@@ -14014,7 +14781,10 @@ interface LuaShortcutPrototype {
|
|
|
14014
14781
|
*/
|
|
14015
14782
|
readonly order: string
|
|
14016
14783
|
|
|
14017
|
-
|
|
14784
|
+
/**
|
|
14785
|
+
* The technology to unlock when this shortcut is used, if any.
|
|
14786
|
+
*/
|
|
14787
|
+
readonly technology_to_unlock?: LuaTechnologyPrototype
|
|
14018
14788
|
|
|
14019
14789
|
readonly toggleable: boolean
|
|
14020
14790
|
|
|
@@ -14229,9 +14999,9 @@ interface LuaStyle {
|
|
|
14229
14999
|
height: number
|
|
14230
15000
|
|
|
14231
15001
|
/**
|
|
14232
|
-
* Horizontal align of the inner content of the widget,
|
|
15002
|
+
* Horizontal align of the inner content of the widget, if any. Possible values are "left", "center" or "right".
|
|
14233
15003
|
*/
|
|
14234
|
-
horizontal_align
|
|
15004
|
+
horizontal_align?: string
|
|
14235
15005
|
|
|
14236
15006
|
/**
|
|
14237
15007
|
* Horizontal space between individual cells.
|
|
@@ -14242,14 +15012,14 @@ interface LuaStyle {
|
|
|
14242
15012
|
horizontal_spacing: number
|
|
14243
15013
|
|
|
14244
15014
|
/**
|
|
14245
|
-
*
|
|
15015
|
+
* Whether the GUI element can be squashed (by maximal width of some parent element) horizontally. `nil` if this element does not support squashing. This is mainly meant to be used for scroll-pane The default value is false.
|
|
14246
15016
|
*/
|
|
14247
|
-
horizontally_squashable
|
|
15017
|
+
horizontally_squashable?: boolean
|
|
14248
15018
|
|
|
14249
15019
|
/**
|
|
14250
|
-
*
|
|
15020
|
+
* Whether the GUI element stretches its size horizontally to other elements. `nil` if this element does not support stretching.
|
|
14251
15021
|
*/
|
|
14252
|
-
horizontally_stretchable
|
|
15022
|
+
horizontally_stretchable?: boolean
|
|
14253
15023
|
|
|
14254
15024
|
/**
|
|
14255
15025
|
* @remarks
|
|
@@ -14426,9 +15196,9 @@ interface LuaStyle {
|
|
|
14426
15196
|
readonly valid: boolean
|
|
14427
15197
|
|
|
14428
15198
|
/**
|
|
14429
|
-
* Vertical align of the inner content of the widget,
|
|
15199
|
+
* Vertical align of the inner content of the widget, if any. Possible values are "top", "center" or "bottom".
|
|
14430
15200
|
*/
|
|
14431
|
-
vertical_align
|
|
15201
|
+
vertical_align?: string
|
|
14432
15202
|
|
|
14433
15203
|
/**
|
|
14434
15204
|
* Vertical space between individual cells.
|
|
@@ -14439,14 +15209,14 @@ interface LuaStyle {
|
|
|
14439
15209
|
vertical_spacing: number
|
|
14440
15210
|
|
|
14441
15211
|
/**
|
|
14442
|
-
*
|
|
15212
|
+
* Whether the GUI element can be squashed (by maximal height of some parent element) vertically. `nil` if this element does not support squashing. This is mainly meant to be used for scroll-pane The default (parent) value for scroll pane is true, false otherwise.
|
|
14443
15213
|
*/
|
|
14444
|
-
vertically_squashable
|
|
15214
|
+
vertically_squashable?: boolean
|
|
14445
15215
|
|
|
14446
15216
|
/**
|
|
14447
|
-
*
|
|
15217
|
+
* Whether the GUI element stretches its size vertically to other elements. `nil` if this element does not support stretching.
|
|
14448
15218
|
*/
|
|
14449
|
-
vertically_stretchable
|
|
15219
|
+
vertically_stretchable?: boolean
|
|
14450
15220
|
|
|
14451
15221
|
/**
|
|
14452
15222
|
* Sets both minimal and maximal width to the given value.
|
|
@@ -14663,7 +15433,7 @@ interface LuaSurface {
|
|
|
14663
15433
|
* Count entities of given type or name in a given area. Works just like {@link LuaSurface::find_entities_filtered | LuaSurface::find_entities_filtered}, except this only returns the count. As it doesn't construct all the wrapper objects, this is more efficient if one is only interested in the number of entities.
|
|
14664
15434
|
*
|
|
14665
15435
|
* If no `area` or `position` are given, the entire surface is searched. If `position` is given, this returns the entities colliding with that position (i.e the given position is within the entity's collision box). If `position` and `radius` are given, this returns entities in the radius of the position. If `area` is specified, this returns entities colliding with that area.
|
|
14666
|
-
* @param table.invert -
|
|
15436
|
+
* @param table.invert - Whether the filters should be inverted.
|
|
14667
15437
|
* @param table.radius - If given with position, will count all entities within the radius of the position.
|
|
14668
15438
|
*/
|
|
14669
15439
|
count_entities_filtered(this: void,
|
|
@@ -14689,8 +15459,11 @@ interface LuaSurface {
|
|
|
14689
15459
|
* Count tiles of a given name in a given area. Works just like {@link LuaSurface::find_tiles_filtered | LuaSurface::find_tiles_filtered}, except this only returns the count. As it doesn't construct all the wrapper objects, this is more efficient if one is only interested in the number of tiles.
|
|
14690
15460
|
*
|
|
14691
15461
|
* If no `area` or `position` and `radius` is given, the entire surface is searched. If `position` and `radius` are given, only tiles within the radius of the position are included.
|
|
15462
|
+
* @param table.has_tile_ghost - Can be further filtered by supplying a `force` filter.
|
|
15463
|
+
* @param table.invert - If the filters should be inverted.
|
|
14692
15464
|
* @param table.position - Ignored if not given with radius.
|
|
14693
15465
|
* @param table.radius - If given with position, will return all entities within the radius of the position.
|
|
15466
|
+
* @param table.to_be_deconstructed - Can be further filtered by supplying a `force` filter.
|
|
14694
15467
|
*/
|
|
14695
15468
|
count_tiles_filtered(this: void,
|
|
14696
15469
|
table: {
|
|
@@ -14698,9 +15471,13 @@ interface LuaSurface {
|
|
|
14698
15471
|
position?: MapPosition,
|
|
14699
15472
|
radius?: number,
|
|
14700
15473
|
name?: string | string[],
|
|
15474
|
+
force?: ForceIdentification | ForceIdentification[],
|
|
14701
15475
|
limit?: number,
|
|
14702
15476
|
has_hidden_tile?: boolean,
|
|
14703
|
-
|
|
15477
|
+
has_tile_ghost?: boolean,
|
|
15478
|
+
to_be_deconstructed?: boolean,
|
|
15479
|
+
collision_mask?: CollisionMaskLayer | CollisionMaskLayer[],
|
|
15480
|
+
invert?: boolean
|
|
14704
15481
|
}): void
|
|
14705
15482
|
|
|
14706
15483
|
/**
|
|
@@ -14829,6 +15606,7 @@ interface LuaSurface {
|
|
|
14829
15606
|
|
|
14830
15607
|
/**
|
|
14831
15608
|
* Removes all decoratives from the given area. If no area and no position are given, then the entire surface is searched.
|
|
15609
|
+
* @param table.exclude_soft - Soft decoratives can be drawn over rails.
|
|
14832
15610
|
* @param table.invert - If the filters should be inverted.
|
|
14833
15611
|
*/
|
|
14834
15612
|
destroy_decoratives(this: void,
|
|
@@ -14836,6 +15614,10 @@ interface LuaSurface {
|
|
|
14836
15614
|
area?: BoundingBox,
|
|
14837
15615
|
position?: TilePosition,
|
|
14838
15616
|
name?: string | string[] | LuaDecorativePrototype | LuaDecorativePrototype[],
|
|
15617
|
+
collision_mask?: CollisionMaskLayer | CollisionMaskLayer[],
|
|
15618
|
+
from_layer?: string,
|
|
15619
|
+
to_layer?: string,
|
|
15620
|
+
exclude_soft?: boolean,
|
|
14839
15621
|
limit?: number,
|
|
14840
15622
|
invert?: boolean
|
|
14841
15623
|
}): void
|
|
@@ -14871,6 +15653,7 @@ interface LuaSurface {
|
|
|
14871
15653
|
* Find decoratives of a given name in a given area.
|
|
14872
15654
|
*
|
|
14873
15655
|
* If no filters are given, returns all decoratives in the search area. If multiple filters are specified, returns only decoratives matching every given filter. If no area and no position are given, the entire surface is searched.
|
|
15656
|
+
* @param table.exclude_soft - Soft decoratives can be drawn over rails.
|
|
14874
15657
|
* @param table.invert - If the filters should be inverted.
|
|
14875
15658
|
* @example
|
|
14876
15659
|
* ```
|
|
@@ -14884,6 +15667,10 @@ interface LuaSurface {
|
|
|
14884
15667
|
area?: BoundingBox,
|
|
14885
15668
|
position?: TilePosition,
|
|
14886
15669
|
name?: string | string[] | LuaDecorativePrototype | LuaDecorativePrototype[],
|
|
15670
|
+
collision_mask?: CollisionMaskLayer | CollisionMaskLayer[],
|
|
15671
|
+
from_layer?: string,
|
|
15672
|
+
to_layer?: string,
|
|
15673
|
+
exclude_soft?: boolean,
|
|
14887
15674
|
limit?: number,
|
|
14888
15675
|
invert?: boolean
|
|
14889
15676
|
}): void
|
|
@@ -15056,8 +15843,11 @@ interface LuaSurface {
|
|
|
15056
15843
|
* If no filters are given, this returns all tiles in the search area.
|
|
15057
15844
|
*
|
|
15058
15845
|
* If no `area` or `position` and `radius` is given, the entire surface is searched. If `position` and `radius` are given, only tiles within the radius of the position are included.
|
|
15846
|
+
* @param table.has_tile_ghost - Can be further filtered by supplying a `force` filter.
|
|
15847
|
+
* @param table.invert - Whether the filters should be inverted.
|
|
15059
15848
|
* @param table.position - Ignored if not given with radius.
|
|
15060
15849
|
* @param table.radius - If given with position, will return all entities within the radius of the position.
|
|
15850
|
+
* @param table.to_be_deconstructed - Can be further filtered by supplying a `force` filter.
|
|
15061
15851
|
*/
|
|
15062
15852
|
find_tiles_filtered(this: void,
|
|
15063
15853
|
table: {
|
|
@@ -15065,9 +15855,13 @@ interface LuaSurface {
|
|
|
15065
15855
|
position?: MapPosition,
|
|
15066
15856
|
radius?: number,
|
|
15067
15857
|
name?: string | string[],
|
|
15858
|
+
force?: ForceIdentification | ForceIdentification[],
|
|
15068
15859
|
limit?: number,
|
|
15069
15860
|
has_hidden_tile?: boolean,
|
|
15070
|
-
|
|
15861
|
+
has_tile_ghost?: boolean,
|
|
15862
|
+
to_be_deconstructed?: boolean,
|
|
15863
|
+
collision_mask?: CollisionMaskLayer | CollisionMaskLayer[],
|
|
15864
|
+
invert?: boolean
|
|
15071
15865
|
}): void
|
|
15072
15866
|
|
|
15073
15867
|
/**
|
|
@@ -15326,7 +16120,7 @@ interface LuaSurface {
|
|
|
15326
16120
|
* @param table.entity_to_ignore - Makes the pathfinder ignore collisions with this entity if it is given.
|
|
15327
16121
|
* @param table.force - The force for which to generate the path, determining which gates can be opened for example.
|
|
15328
16122
|
* @param table.goal - The position to find a path to.
|
|
15329
|
-
* @param table.path_resolution_modifier - Defines how coarse the pathfinder's grid is. Smaller values mean a coarser grid (negative numbers allowed). Defaults to `0`.
|
|
16123
|
+
* @param table.path_resolution_modifier - Defines how coarse the pathfinder's grid is. Smaller values mean a coarser grid (negative numbers allowed). Allowed values are from -8 to 8. Defaults to `0`.
|
|
15330
16124
|
* @param table.pathfind_flags - Flags that affect pathfinder behavior.
|
|
15331
16125
|
* @param table.radius - How close the pathfinder needs to get to its `goal` (in tiles). Defaults to `1`.
|
|
15332
16126
|
* @param table.start - The position from which to start pathfinding.
|
|
@@ -15648,9 +16442,9 @@ interface LuaTechnology {
|
|
|
15648
16442
|
readonly research_unit_count: number
|
|
15649
16443
|
|
|
15650
16444
|
/**
|
|
15651
|
-
* The count formula used for this infinite research
|
|
16445
|
+
* The count formula used for this infinite research. `nil` if this research isn't infinite.
|
|
15652
16446
|
*/
|
|
15653
|
-
readonly research_unit_count_formula
|
|
16447
|
+
readonly research_unit_count_formula?: string
|
|
15654
16448
|
|
|
15655
16449
|
/**
|
|
15656
16450
|
* Amount of energy required to finish a unit of research.
|
|
@@ -15762,9 +16556,9 @@ interface LuaTechnologyPrototype {
|
|
|
15762
16556
|
readonly research_unit_count: number
|
|
15763
16557
|
|
|
15764
16558
|
/**
|
|
15765
|
-
* The count formula used for this infinite research
|
|
16559
|
+
* The count formula used for this infinite research. `nil` if this research isn't infinite.
|
|
15766
16560
|
*/
|
|
15767
|
-
readonly research_unit_count_formula
|
|
16561
|
+
readonly research_unit_count_formula?: string
|
|
15768
16562
|
|
|
15769
16563
|
/**
|
|
15770
16564
|
* Amount of energy required to finish a unit of research.
|
|
@@ -15818,6 +16612,20 @@ interface LuaTile {
|
|
|
15818
16612
|
collides_with(this: void,
|
|
15819
16613
|
layer: CollisionMaskLayer): void
|
|
15820
16614
|
|
|
16615
|
+
/**
|
|
16616
|
+
* Gets all tile ghosts on this tile.
|
|
16617
|
+
* @param force - Get tile ghosts of this force.
|
|
16618
|
+
*/
|
|
16619
|
+
get_tile_ghosts(this: void,
|
|
16620
|
+
force?: ForceIdentification): void
|
|
16621
|
+
|
|
16622
|
+
/**
|
|
16623
|
+
* Does this tile have any tile ghosts on it.
|
|
16624
|
+
* @param force - Check for tile ghosts of this force.
|
|
16625
|
+
*/
|
|
16626
|
+
has_tile_ghost(this: void,
|
|
16627
|
+
force?: ForceIdentification): void
|
|
16628
|
+
|
|
15821
16629
|
/**
|
|
15822
16630
|
* All methods and properties that this object supports.
|
|
15823
16631
|
*/
|
|
@@ -15834,11 +16642,13 @@ interface LuaTile {
|
|
|
15834
16642
|
|
|
15835
16643
|
/**
|
|
15836
16644
|
* Is this tile marked for deconstruction?
|
|
16645
|
+
* @param force - The force who did the deconstruction order.
|
|
15837
16646
|
*/
|
|
15838
|
-
to_be_deconstructed(this: void
|
|
16647
|
+
to_be_deconstructed(this: void,
|
|
16648
|
+
force?: ForceIdentification): void
|
|
15839
16649
|
|
|
15840
16650
|
/**
|
|
15841
|
-
* The name of the {@link LuaTilePrototype | LuaTilePrototype} hidden under this tile
|
|
16651
|
+
* The name of the {@link LuaTilePrototype | LuaTilePrototype} hidden under this tile, if any. During normal gameplay, only {@link non-mineable | LuaTilePrototype::mineable_properties} tiles can become hidden. This can however be circumvented with {@link LuaSurface::set_hidden_tile | LuaSurface::set_hidden_tile}.
|
|
15842
16652
|
*/
|
|
15843
16653
|
readonly hidden_tile?: string
|
|
15844
16654
|
|
|
@@ -15885,9 +16695,9 @@ interface LuaTilePrototype {
|
|
|
15885
16695
|
readonly automatic_neighbors: boolean
|
|
15886
16696
|
|
|
15887
16697
|
/**
|
|
15888
|
-
* Autoplace specification for this prototype
|
|
16698
|
+
* Autoplace specification for this prototype, if any.
|
|
15889
16699
|
*/
|
|
15890
|
-
readonly autoplace_specification
|
|
16700
|
+
readonly autoplace_specification?: AutoplaceSpecification
|
|
15891
16701
|
|
|
15892
16702
|
/**
|
|
15893
16703
|
* False if this tile is not allowed in blueprints regardless of the ability to build it.
|
|
@@ -15929,7 +16739,28 @@ interface LuaTilePrototype {
|
|
|
15929
16739
|
|
|
15930
16740
|
readonly map_color: Color
|
|
15931
16741
|
|
|
15932
|
-
readonly mineable_properties: {
|
|
16742
|
+
readonly mineable_properties: {
|
|
16743
|
+
|
|
16744
|
+
/**
|
|
16745
|
+
* Is this tile mineable at all?
|
|
16746
|
+
*/
|
|
16747
|
+
minable: boolean,
|
|
16748
|
+
|
|
16749
|
+
/**
|
|
16750
|
+
* Prototype name of the particle produced when mining this tile. Will only be present if this tile produces any particle during mining.
|
|
16751
|
+
*/
|
|
16752
|
+
mining_particle?: string,
|
|
16753
|
+
|
|
16754
|
+
/**
|
|
16755
|
+
* Energy required to mine a tile.
|
|
16756
|
+
*/
|
|
16757
|
+
mining_time: number,
|
|
16758
|
+
|
|
16759
|
+
/**
|
|
16760
|
+
* Products obtained by mining this tile.
|
|
16761
|
+
*/
|
|
16762
|
+
products: Product[]
|
|
16763
|
+
}
|
|
15933
16764
|
|
|
15934
16765
|
/**
|
|
15935
16766
|
* Name of this prototype.
|
|
@@ -15942,7 +16773,7 @@ interface LuaTilePrototype {
|
|
|
15942
16773
|
readonly needs_correction: boolean
|
|
15943
16774
|
|
|
15944
16775
|
/**
|
|
15945
|
-
* The next direction of this tile
|
|
16776
|
+
* The next direction of this tile, if any. Used when a tile has multiple directions (such as hazard concrete)
|
|
15946
16777
|
*/
|
|
15947
16778
|
readonly next_direction?: LuaTilePrototype
|
|
15948
16779
|
|
|
@@ -16054,12 +16885,12 @@ interface LuaTrain {
|
|
|
16054
16885
|
stack: ItemStackIdentification): void
|
|
16055
16886
|
|
|
16056
16887
|
/**
|
|
16057
|
-
* The rail at the back end of the train,
|
|
16888
|
+
* The rail at the back end of the train, if any.
|
|
16058
16889
|
*/
|
|
16059
|
-
readonly back_rail
|
|
16890
|
+
readonly back_rail?: LuaEntity
|
|
16060
16891
|
|
|
16061
16892
|
/**
|
|
16062
|
-
* The back stock of this train,
|
|
16893
|
+
* The back stock of this train, if any. The back of the train is at the opposite end of the {@link front | LuaTrain::front_stock}.
|
|
16063
16894
|
*/
|
|
16064
16895
|
readonly back_stock?: LuaEntity
|
|
16065
16896
|
|
|
@@ -16079,12 +16910,12 @@ interface LuaTrain {
|
|
|
16079
16910
|
readonly fluid_wagons: LuaEntity[]
|
|
16080
16911
|
|
|
16081
16912
|
/**
|
|
16082
|
-
* The rail at the front end of the train,
|
|
16913
|
+
* The rail at the front end of the train, if any.
|
|
16083
16914
|
*/
|
|
16084
|
-
readonly front_rail
|
|
16915
|
+
readonly front_rail?: LuaEntity
|
|
16085
16916
|
|
|
16086
16917
|
/**
|
|
16087
|
-
* The front stock of this train,
|
|
16918
|
+
* The front stock of this train, if any. The front of the train is in the direction that a majority of locomotives are pointing in. If it's a tie, the North and West directions take precedence.
|
|
16088
16919
|
*/
|
|
16089
16920
|
readonly front_stock?: LuaEntity
|
|
16090
16921
|
|
|
@@ -16144,17 +16975,17 @@ interface LuaTrain {
|
|
|
16144
16975
|
readonly passengers: LuaPlayer[]
|
|
16145
16976
|
|
|
16146
16977
|
/**
|
|
16147
|
-
* The path this train is using
|
|
16978
|
+
* The path this train is using, if any.
|
|
16148
16979
|
*/
|
|
16149
16980
|
readonly path?: LuaRailPath
|
|
16150
16981
|
|
|
16151
16982
|
/**
|
|
16152
|
-
* The destination rail this train is currently pathing to
|
|
16983
|
+
* The destination rail this train is currently pathing to, if any.
|
|
16153
16984
|
*/
|
|
16154
16985
|
readonly path_end_rail?: LuaEntity
|
|
16155
16986
|
|
|
16156
16987
|
/**
|
|
16157
|
-
* The destination train stop this train is currently pathing to
|
|
16988
|
+
* The destination train stop this train is currently pathing to, if any.
|
|
16158
16989
|
*/
|
|
16159
16990
|
readonly path_end_stop?: LuaEntity
|
|
16160
16991
|
|
|
@@ -16168,7 +16999,7 @@ interface LuaTrain {
|
|
|
16168
16999
|
readonly riding_state: RidingState
|
|
16169
17000
|
|
|
16170
17001
|
/**
|
|
16171
|
-
*
|
|
17002
|
+
* This train's current schedule, if any. Set to `nil` to clear.
|
|
16172
17003
|
* @remarks
|
|
16173
17004
|
* The schedule can't be changed by modifying the returned table. Instead, changes must be made by assigning a new table to this attribute.
|
|
16174
17005
|
*
|
|
@@ -16176,7 +17007,7 @@ interface LuaTrain {
|
|
|
16176
17007
|
schedule?: TrainSchedule
|
|
16177
17008
|
|
|
16178
17009
|
/**
|
|
16179
|
-
* The signal this train is arriving or waiting at
|
|
17010
|
+
* The signal this train is arriving or waiting at, if any.
|
|
16180
17011
|
*/
|
|
16181
17012
|
readonly signal?: LuaEntity
|
|
16182
17013
|
|
|
@@ -16194,7 +17025,7 @@ interface LuaTrain {
|
|
|
16194
17025
|
readonly state: defines.train_state
|
|
16195
17026
|
|
|
16196
17027
|
/**
|
|
16197
|
-
* The train stop this train is stopped at
|
|
17028
|
+
* The train stop this train is stopped at, if any.
|
|
16198
17029
|
*/
|
|
16199
17030
|
readonly station?: LuaEntity
|
|
16200
17031
|
|
|
@@ -16530,12 +17361,12 @@ interface LuaUnitGroup {
|
|
|
16530
17361
|
start_moving(this: void): void
|
|
16531
17362
|
|
|
16532
17363
|
/**
|
|
16533
|
-
* The command given to this group
|
|
17364
|
+
* The command given to this group, if any.
|
|
16534
17365
|
*/
|
|
16535
17366
|
readonly command?: Command
|
|
16536
17367
|
|
|
16537
17368
|
/**
|
|
16538
|
-
* The distraction command given to this group
|
|
17369
|
+
* The distraction command given to this group, if any.
|
|
16539
17370
|
*/
|
|
16540
17371
|
readonly distraction_command?: Command
|
|
16541
17372
|
|
|
@@ -16896,7 +17727,7 @@ interface LuaGuiElementAddParamsChooseElemButton extends LuaGuiElementAddParams
|
|
|
16896
17727
|
/**
|
|
16897
17728
|
* Filters describing what to show in the selection window. The applicable filter depends on the `elem_type`.
|
|
16898
17729
|
*/
|
|
16899
|
-
'elem_filters'?: ItemPrototypeFilter | TilePrototypeFilter | EntityPrototypeFilter | FluidPrototypeFilter | RecipePrototypeFilter | DecorativePrototypeFilter | AchievementPrototypeFilter | EquipmentPrototypeFilter | TechnologyPrototypeFilter
|
|
17730
|
+
'elem_filters'?: ItemPrototypeFilter | TilePrototypeFilter | EntityPrototypeFilter | FluidPrototypeFilter | RecipePrototypeFilter | DecorativePrototypeFilter | AchievementPrototypeFilter | EquipmentPrototypeFilter | TechnologyPrototypeFilter
|
|
16900
17731
|
|
|
16901
17732
|
/**
|
|
16902
17733
|
* The type of the button - one of the following values.
|