factorio-types 0.0.25 → 0.0.28
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 +1405 -611
- package/dist/concepts.d.ts +1937 -2817
- 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.69
|
|
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,17 +1276,17 @@ 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
|
|
|
@@ -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 prototype 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,87 +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
|
-
* A vector of the gun prototypes this
|
|
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
4901
|
readonly indexed_guns?: LuaItemPrototype[]
|
|
4537
4902
|
|
|
4538
4903
|
/**
|
|
4539
|
-
* Every time this infinite resource 'ticks' down it is reduced by this amount.
|
|
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 infinite_depletion_resource_amount
|
|
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
|
+
*
|
|
4545
4916
|
*/
|
|
4546
|
-
readonly infinite_resource
|
|
4917
|
+
readonly infinite_resource?: boolean
|
|
4547
4918
|
|
|
4548
4919
|
/**
|
|
4549
|
-
* The max number of ingredients this crafting
|
|
4920
|
+
* The max number of ingredients this crafting machine prototype supports.
|
|
4921
|
+
* @remarks
|
|
4922
|
+
* Applies to subclasses: CraftingMachine
|
|
4923
|
+
*
|
|
4550
4924
|
*/
|
|
4551
4925
|
readonly ingredient_count?: number
|
|
4552
4926
|
|
|
4553
4927
|
/**
|
|
4554
|
-
* 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
|
+
*
|
|
4555
4932
|
*/
|
|
4556
4933
|
readonly inserter_chases_belt_items?: boolean
|
|
4557
4934
|
|
|
4558
4935
|
/**
|
|
4559
|
-
* The drop position for this inserter
|
|
4936
|
+
* The drop position for this inserter.
|
|
4937
|
+
* @remarks
|
|
4938
|
+
* Applies to subclasses: Inserter
|
|
4939
|
+
*
|
|
4560
4940
|
*/
|
|
4561
4941
|
readonly inserter_drop_position?: Vector
|
|
4562
4942
|
|
|
4563
4943
|
/**
|
|
4564
|
-
* The extension speed of this inserter
|
|
4944
|
+
* The extension speed of this inserter.
|
|
4945
|
+
* @remarks
|
|
4946
|
+
* Applies to subclasses: Inserter
|
|
4947
|
+
*
|
|
4565
4948
|
*/
|
|
4566
4949
|
readonly inserter_extension_speed?: number
|
|
4567
4950
|
|
|
4568
4951
|
/**
|
|
4569
|
-
* The pickup position for this inserter
|
|
4952
|
+
* The pickup position for this inserter.
|
|
4953
|
+
* @remarks
|
|
4954
|
+
* Applies to subclasses: Inserter
|
|
4955
|
+
*
|
|
4570
4956
|
*/
|
|
4571
4957
|
readonly inserter_pickup_position?: Vector
|
|
4572
4958
|
|
|
4573
4959
|
/**
|
|
4574
|
-
* The rotation speed of this inserter
|
|
4960
|
+
* The rotation speed of this inserter.
|
|
4961
|
+
* @remarks
|
|
4962
|
+
* Applies to subclasses: Inserter
|
|
4963
|
+
*
|
|
4575
4964
|
*/
|
|
4576
4965
|
readonly inserter_rotation_speed?: number
|
|
4577
4966
|
|
|
4578
4967
|
/**
|
|
4579
|
-
*
|
|
4968
|
+
* The built-in stack size bonus of this inserter prototype.
|
|
4969
|
+
* @remarks
|
|
4970
|
+
* Applies to subclasses: Inserter
|
|
4971
|
+
*
|
|
4580
4972
|
*/
|
|
4581
|
-
readonly inserter_stack_size_bonus
|
|
4973
|
+
readonly inserter_stack_size_bonus?: number
|
|
4582
4974
|
|
|
4583
4975
|
/**
|
|
4584
|
-
* The instruments for this programmable speaker
|
|
4976
|
+
* The instruments for this programmable speaker.
|
|
4977
|
+
* @remarks
|
|
4978
|
+
* Applies to subclasses: ProgrammableSpeaker
|
|
4979
|
+
*
|
|
4585
4980
|
*/
|
|
4586
4981
|
readonly instruments?: ProgrammableSpeakerInstrument[]
|
|
4587
4982
|
|
|
@@ -4595,40 +4990,60 @@ interface LuaEntityPrototype {
|
|
|
4595
4990
|
/**
|
|
4596
4991
|
* True if this entity-with-owner is military target
|
|
4597
4992
|
* @remarks
|
|
4598
|
-
* Applies to subclasses:
|
|
4993
|
+
* Applies to subclasses: EntityWithOwner
|
|
4599
4994
|
*
|
|
4600
4995
|
*/
|
|
4601
|
-
readonly is_military_target
|
|
4996
|
+
readonly is_military_target?: boolean
|
|
4602
4997
|
|
|
4603
4998
|
/**
|
|
4604
4999
|
* @remarks
|
|
4605
5000
|
* Applies to subclasses: Character
|
|
4606
5001
|
*
|
|
4607
5002
|
*/
|
|
4608
|
-
readonly item_pickup_distance
|
|
5003
|
+
readonly item_pickup_distance?: number
|
|
4609
5004
|
|
|
4610
5005
|
/**
|
|
4611
|
-
* 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
|
+
*
|
|
4612
5010
|
*/
|
|
4613
5011
|
readonly item_slot_count?: number
|
|
4614
5012
|
|
|
4615
5013
|
/**
|
|
4616
|
-
* 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.
|
|
4617
5015
|
*/
|
|
4618
5016
|
readonly items_to_place_this?: SimpleItemStack[]
|
|
4619
5017
|
|
|
4620
5018
|
/**
|
|
4621
|
-
* 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
|
+
*
|
|
4622
5023
|
*/
|
|
4623
5024
|
readonly lab_inputs?: string[]
|
|
4624
5025
|
|
|
4625
5026
|
/**
|
|
4626
|
-
* 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
|
+
*
|
|
4627
5039
|
*/
|
|
4628
5040
|
readonly launch_wait_time?: number
|
|
4629
5041
|
|
|
4630
5042
|
/**
|
|
4631
|
-
* 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
|
+
*
|
|
4632
5047
|
*/
|
|
4633
5048
|
readonly light_blinking_speed?: number
|
|
4634
5049
|
|
|
@@ -4637,44 +5052,70 @@ interface LuaEntityPrototype {
|
|
|
4637
5052
|
readonly localised_name: LocalisedString
|
|
4638
5053
|
|
|
4639
5054
|
/**
|
|
4640
|
-
* 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
|
+
*
|
|
4641
5059
|
*/
|
|
4642
5060
|
readonly logistic_mode?: string
|
|
4643
5061
|
|
|
4644
5062
|
/**
|
|
4645
|
-
* The logistic parameters for this roboport.
|
|
5063
|
+
* The logistic parameters for this roboport.
|
|
4646
5064
|
* @remarks
|
|
4647
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
|
|
4648
5067
|
*
|
|
4649
5068
|
*/
|
|
4650
|
-
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
|
+
}
|
|
4651
5086
|
|
|
4652
5087
|
/**
|
|
4653
|
-
* The logistic radius for this roboport prototype
|
|
5088
|
+
* The logistic radius for this roboport prototype.
|
|
5089
|
+
* @remarks
|
|
5090
|
+
* Applies to subclasses: Roboport
|
|
5091
|
+
*
|
|
4654
5092
|
*/
|
|
4655
5093
|
readonly logistic_radius?: number
|
|
4656
5094
|
|
|
4657
5095
|
/**
|
|
4658
|
-
* 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
|
+
*
|
|
4659
5100
|
*/
|
|
4660
|
-
readonly loot
|
|
5101
|
+
readonly loot?: Loot[]
|
|
4661
5102
|
|
|
4662
5103
|
/**
|
|
4663
5104
|
* @remarks
|
|
4664
5105
|
* Applies to subclasses: Character
|
|
4665
5106
|
*
|
|
4666
5107
|
*/
|
|
4667
|
-
readonly loot_pickup_distance
|
|
5108
|
+
readonly loot_pickup_distance?: number
|
|
4668
5109
|
|
|
4669
5110
|
/**
|
|
4670
|
-
*
|
|
5111
|
+
* The manual range modifier for this artillery turret or wagon prototype.
|
|
4671
5112
|
*
|
|
4672
5113
|
* subclass(ArtilleryWagon, ArtilleryTurret)
|
|
4673
5114
|
*/
|
|
4674
|
-
readonly manual_range_modifier
|
|
5115
|
+
readonly manual_range_modifier?: number
|
|
4675
5116
|
|
|
4676
5117
|
/**
|
|
4677
|
-
* 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.
|
|
4678
5119
|
*/
|
|
4679
5120
|
readonly map_color?: Color
|
|
4680
5121
|
|
|
@@ -4684,32 +5125,47 @@ interface LuaEntityPrototype {
|
|
|
4684
5125
|
readonly map_generator_bounding_box: BoundingBox
|
|
4685
5126
|
|
|
4686
5127
|
/**
|
|
4687
|
-
* 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.
|
|
4688
5129
|
*/
|
|
4689
5130
|
readonly max_circuit_wire_distance: number
|
|
4690
5131
|
|
|
4691
5132
|
/**
|
|
4692
5133
|
* Count of enemies this spawner can sustain.
|
|
5134
|
+
* @remarks
|
|
5135
|
+
* Applies to subclasses: Spawner
|
|
5136
|
+
*
|
|
4693
5137
|
*/
|
|
4694
|
-
readonly max_count_of_owned_units
|
|
5138
|
+
readonly max_count_of_owned_units?: number
|
|
4695
5139
|
|
|
4696
5140
|
/**
|
|
4697
5141
|
* The maximum darkness at which this unit spawner can spawn entities.
|
|
5142
|
+
* @remarks
|
|
5143
|
+
* Applies to subclasses: Spawner
|
|
5144
|
+
*
|
|
4698
5145
|
*/
|
|
4699
|
-
readonly max_darkness_to_spawn
|
|
5146
|
+
readonly max_darkness_to_spawn?: number
|
|
4700
5147
|
|
|
4701
5148
|
/**
|
|
4702
5149
|
* The radius of the area constantly revealed by this radar, in chunks.
|
|
5150
|
+
* @remarks
|
|
5151
|
+
* Applies to subclasses: Radar
|
|
5152
|
+
*
|
|
4703
5153
|
*/
|
|
4704
|
-
readonly max_distance_of_nearby_sector_revealed
|
|
5154
|
+
readonly max_distance_of_nearby_sector_revealed?: number
|
|
4705
5155
|
|
|
4706
5156
|
/**
|
|
4707
5157
|
* The radius of the area this radar can chart, in chunks.
|
|
5158
|
+
* @remarks
|
|
5159
|
+
* Applies to subclasses: Radar
|
|
5160
|
+
*
|
|
4708
5161
|
*/
|
|
4709
|
-
readonly max_distance_of_sector_revealed
|
|
5162
|
+
readonly max_distance_of_sector_revealed?: number
|
|
4710
5163
|
|
|
4711
5164
|
/**
|
|
4712
|
-
* The max energy for this flying robot
|
|
5165
|
+
* The max energy for this flying robot.
|
|
5166
|
+
* @remarks
|
|
5167
|
+
* Applies to subclasses: FlyingRobot
|
|
5168
|
+
*
|
|
4713
5169
|
*/
|
|
4714
5170
|
readonly max_energy?: number
|
|
4715
5171
|
|
|
@@ -4725,8 +5181,11 @@ interface LuaEntityPrototype {
|
|
|
4725
5181
|
|
|
4726
5182
|
/**
|
|
4727
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
|
+
*
|
|
4728
5187
|
*/
|
|
4729
|
-
readonly max_friends_around_to_spawn
|
|
5188
|
+
readonly max_friends_around_to_spawn?: number
|
|
4730
5189
|
|
|
4731
5190
|
/**
|
|
4732
5191
|
* Max health of this entity. Will be `0` if this is not an entity with health.
|
|
@@ -4734,42 +5193,63 @@ interface LuaEntityPrototype {
|
|
|
4734
5193
|
readonly max_health: number
|
|
4735
5194
|
|
|
4736
5195
|
/**
|
|
4737
|
-
* 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
|
+
*
|
|
4738
5200
|
*/
|
|
4739
5201
|
readonly max_payload_size?: number
|
|
4740
5202
|
|
|
4741
5203
|
/**
|
|
4742
|
-
* The maximum polyphony for this programmable speaker
|
|
5204
|
+
* The maximum polyphony for this programmable speaker.
|
|
5205
|
+
* @remarks
|
|
5206
|
+
* Applies to subclasses: ProgrammableSpeaker
|
|
5207
|
+
*
|
|
4743
5208
|
*/
|
|
4744
5209
|
readonly max_polyphony?: number
|
|
4745
5210
|
|
|
4746
5211
|
/**
|
|
4747
|
-
* 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
|
+
*
|
|
4748
5216
|
*/
|
|
4749
5217
|
readonly max_power_output?: number
|
|
4750
5218
|
|
|
4751
5219
|
/**
|
|
4752
|
-
* 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
|
+
*
|
|
4753
5224
|
*/
|
|
4754
5225
|
readonly max_pursue_distance?: number
|
|
4755
5226
|
|
|
4756
5227
|
/**
|
|
4757
|
-
* 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
|
+
*
|
|
4758
5232
|
*/
|
|
4759
5233
|
readonly max_speed?: number
|
|
4760
5234
|
|
|
4761
5235
|
/**
|
|
4762
|
-
* 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
|
+
*
|
|
4763
5240
|
*/
|
|
4764
5241
|
readonly max_to_charge?: number
|
|
4765
5242
|
|
|
4766
5243
|
/**
|
|
4767
|
-
* 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
|
+
*
|
|
4768
5248
|
*/
|
|
4769
5249
|
readonly max_underground_distance?: number
|
|
4770
5250
|
|
|
4771
5251
|
/**
|
|
4772
|
-
* The maximum wire distance for this entity. 0
|
|
5252
|
+
* The maximum wire distance for this entity. 0 if the entity doesn't support wires.
|
|
4773
5253
|
*/
|
|
4774
5254
|
readonly max_wire_distance: number
|
|
4775
5255
|
|
|
@@ -4778,55 +5258,115 @@ interface LuaEntityPrototype {
|
|
|
4778
5258
|
* Applies to subclasses: Character
|
|
4779
5259
|
*
|
|
4780
5260
|
*/
|
|
4781
|
-
readonly maximum_corner_sliding_distance
|
|
5261
|
+
readonly maximum_corner_sliding_distance?: number
|
|
4782
5262
|
|
|
4783
5263
|
/**
|
|
4784
|
-
* 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
|
+
*
|
|
4785
5268
|
*/
|
|
4786
5269
|
readonly maximum_temperature?: number
|
|
4787
5270
|
|
|
4788
5271
|
/**
|
|
4789
5272
|
* The minimum darkness at which this unit spawner can spawn entities.
|
|
5273
|
+
* @remarks
|
|
5274
|
+
* Applies to subclasses: Spawner
|
|
5275
|
+
*
|
|
4790
5276
|
*/
|
|
4791
|
-
readonly min_darkness_to_spawn
|
|
5277
|
+
readonly min_darkness_to_spawn?: number
|
|
4792
5278
|
|
|
4793
5279
|
/**
|
|
4794
|
-
* 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
|
+
*
|
|
4795
5284
|
*/
|
|
4796
5285
|
readonly min_pursue_time?: number
|
|
4797
5286
|
|
|
4798
5287
|
/**
|
|
4799
|
-
* 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
|
+
*
|
|
4800
5292
|
*/
|
|
4801
5293
|
readonly min_to_charge?: number
|
|
4802
5294
|
|
|
4803
5295
|
/**
|
|
4804
5296
|
* Whether this entity is minable and what can be obtained by mining it.
|
|
4805
5297
|
*/
|
|
4806
|
-
readonly mineable_properties: {
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
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
|
+
*
|
|
4810
5341
|
*/
|
|
4811
|
-
readonly minimum_resource_amount
|
|
5342
|
+
readonly minimum_resource_amount?: number
|
|
4812
5343
|
|
|
4813
5344
|
/**
|
|
4814
|
-
* 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
|
+
*
|
|
4815
5349
|
*/
|
|
4816
5350
|
readonly mining_drill_radius?: number
|
|
4817
5351
|
|
|
4818
5352
|
/**
|
|
4819
|
-
* 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
|
+
*
|
|
4820
5357
|
*/
|
|
4821
5358
|
readonly mining_speed?: number
|
|
4822
5359
|
|
|
4823
5360
|
/**
|
|
4824
|
-
* The module inventory size
|
|
5361
|
+
* The module inventory size. `nil` if this entity doesn't support modules.
|
|
4825
5362
|
*/
|
|
4826
5363
|
readonly module_inventory_size?: number
|
|
4827
5364
|
|
|
4828
5365
|
/**
|
|
4829
|
-
* 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
|
+
*
|
|
4830
5370
|
*/
|
|
4831
5371
|
readonly move_while_shooting?: boolean
|
|
4832
5372
|
|
|
@@ -4840,17 +5380,20 @@ interface LuaEntityPrototype {
|
|
|
4840
5380
|
* Applies to subclasses: Reactor
|
|
4841
5381
|
*
|
|
4842
5382
|
*/
|
|
4843
|
-
readonly neighbour_bonus
|
|
5383
|
+
readonly neighbour_bonus?: number
|
|
4844
5384
|
|
|
4845
5385
|
/**
|
|
4846
|
-
* The next upgrade for this entity
|
|
5386
|
+
* The next upgrade for this entity, if any.
|
|
4847
5387
|
*/
|
|
4848
5388
|
readonly next_upgrade?: LuaEntityPrototype
|
|
4849
5389
|
|
|
4850
5390
|
/**
|
|
4851
|
-
* The normal amount for this resource.
|
|
5391
|
+
* The normal amount for this resource.
|
|
5392
|
+
* @remarks
|
|
5393
|
+
* Applies to subclasses: ResourceEntity
|
|
5394
|
+
*
|
|
4852
5395
|
*/
|
|
4853
|
-
readonly normal_resource_amount
|
|
5396
|
+
readonly normal_resource_amount?: number
|
|
4854
5397
|
|
|
4855
5398
|
/**
|
|
4856
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.
|
|
@@ -4863,9 +5406,12 @@ interface LuaEntityPrototype {
|
|
|
4863
5406
|
readonly order: string
|
|
4864
5407
|
|
|
4865
5408
|
/**
|
|
4866
|
-
* 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
|
+
*
|
|
4867
5413
|
*/
|
|
4868
|
-
readonly pollution_to_join_attack
|
|
5414
|
+
readonly pollution_to_join_attack?: number
|
|
4869
5415
|
|
|
4870
5416
|
/**
|
|
4871
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.
|
|
@@ -4873,12 +5419,18 @@ interface LuaEntityPrototype {
|
|
|
4873
5419
|
readonly protected_from_tile_building: boolean
|
|
4874
5420
|
|
|
4875
5421
|
/**
|
|
4876
|
-
* 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
|
+
*
|
|
4877
5426
|
*/
|
|
4878
5427
|
readonly pumping_speed?: number
|
|
4879
5428
|
|
|
4880
5429
|
/**
|
|
4881
|
-
* The radar range of this unit prototype
|
|
5430
|
+
* The radar range of this unit prototype.
|
|
5431
|
+
* @remarks
|
|
5432
|
+
* Applies to subclasses: Unit
|
|
5433
|
+
*
|
|
4882
5434
|
*/
|
|
4883
5435
|
readonly radar_range?: number
|
|
4884
5436
|
|
|
@@ -4892,21 +5444,21 @@ interface LuaEntityPrototype {
|
|
|
4892
5444
|
* Applies to subclasses: Character
|
|
4893
5445
|
*
|
|
4894
5446
|
*/
|
|
4895
|
-
readonly reach_distance
|
|
5447
|
+
readonly reach_distance?: number
|
|
4896
5448
|
|
|
4897
5449
|
/**
|
|
4898
5450
|
* @remarks
|
|
4899
5451
|
* Applies to subclasses: Character
|
|
4900
5452
|
*
|
|
4901
5453
|
*/
|
|
4902
|
-
readonly reach_resource_distance
|
|
5454
|
+
readonly reach_resource_distance?: number
|
|
4903
5455
|
|
|
4904
5456
|
/**
|
|
4905
5457
|
* @remarks
|
|
4906
5458
|
* Applies to subclasses: TransportBelt
|
|
4907
5459
|
*
|
|
4908
5460
|
*/
|
|
4909
|
-
readonly related_underground_belt
|
|
5461
|
+
readonly related_underground_belt?: LuaEntityPrototype
|
|
4910
5462
|
|
|
4911
5463
|
/**
|
|
4912
5464
|
* The remains left behind when this entity is mined.
|
|
@@ -4916,32 +5468,43 @@ interface LuaEntityPrototype {
|
|
|
4916
5468
|
readonly remove_decoratives: string
|
|
4917
5469
|
|
|
4918
5470
|
/**
|
|
4919
|
-
* 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
|
+
*
|
|
4920
5475
|
*/
|
|
4921
|
-
readonly repair_speed_modifier
|
|
5476
|
+
readonly repair_speed_modifier?: number
|
|
4922
5477
|
|
|
4923
5478
|
/**
|
|
4924
|
-
* 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
|
+
*
|
|
4925
5483
|
*/
|
|
4926
5484
|
readonly researching_speed?: number
|
|
4927
5485
|
|
|
4928
5486
|
/**
|
|
4929
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
|
+
*
|
|
4930
5491
|
*/
|
|
4931
|
-
readonly resistances
|
|
5492
|
+
readonly resistances?: {[key: string]: Resistance}
|
|
4932
5493
|
|
|
4933
5494
|
/**
|
|
4934
|
-
* The resource categories this character or mining drill supports
|
|
5495
|
+
* The resource categories this character or mining drill supports.
|
|
4935
5496
|
* @remarks
|
|
4936
|
-
* 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
|
|
4937
5499
|
*
|
|
4938
5500
|
*/
|
|
4939
5501
|
readonly resource_categories?: {[key: string]: boolean}
|
|
4940
5502
|
|
|
4941
5503
|
/**
|
|
4942
|
-
* Name of the category of this resource
|
|
5504
|
+
* Name of the category of this resource.
|
|
4943
5505
|
* @remarks
|
|
4944
|
-
* During data stage this property is named "category".
|
|
5506
|
+
* During data stage, this property is named "category".
|
|
5507
|
+
* Applies to subclasses: ResourceEntity
|
|
4945
5508
|
*
|
|
4946
5509
|
*/
|
|
4947
5510
|
readonly resource_category?: string
|
|
@@ -4951,53 +5514,74 @@ interface LuaEntityPrototype {
|
|
|
4951
5514
|
* Applies to subclasses: Character
|
|
4952
5515
|
*
|
|
4953
5516
|
*/
|
|
4954
|
-
readonly respawn_time
|
|
5517
|
+
readonly respawn_time?: number
|
|
4955
5518
|
|
|
4956
5519
|
/**
|
|
4957
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
|
+
*
|
|
4958
5524
|
*/
|
|
4959
|
-
readonly result_units
|
|
5525
|
+
readonly result_units?: UnitSpawnDefinition[]
|
|
4960
5526
|
|
|
4961
5527
|
/**
|
|
4962
|
-
* 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
|
+
*
|
|
4963
5532
|
*/
|
|
4964
5533
|
readonly rising_speed?: number
|
|
4965
5534
|
|
|
4966
5535
|
/**
|
|
4967
|
-
* 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
|
+
*
|
|
4968
5540
|
*/
|
|
4969
5541
|
readonly rocket_entity_prototype?: LuaEntityPrototype
|
|
4970
5542
|
|
|
4971
5543
|
/**
|
|
4972
|
-
* 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
|
+
*
|
|
4973
5548
|
*/
|
|
4974
5549
|
readonly rocket_parts_required?: number
|
|
4975
5550
|
|
|
4976
5551
|
/**
|
|
4977
|
-
* 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
|
+
*
|
|
4978
5556
|
*/
|
|
4979
5557
|
readonly rocket_rising_delay?: number
|
|
4980
5558
|
|
|
4981
5559
|
/**
|
|
4982
|
-
* The rotation speed of this car prototype
|
|
5560
|
+
* The rotation speed of this car prototype.
|
|
5561
|
+
* @remarks
|
|
5562
|
+
* Applies to subclasses: Car
|
|
5563
|
+
*
|
|
4983
5564
|
*/
|
|
4984
5565
|
readonly rotation_speed?: number
|
|
4985
5566
|
|
|
4986
5567
|
/**
|
|
4987
|
-
*
|
|
5568
|
+
* The current movement speed of this character, including effects from exoskeletons, tiles, stickers and shooting.
|
|
4988
5569
|
* @remarks
|
|
4989
5570
|
* Applies to subclasses: Character
|
|
4990
5571
|
*
|
|
4991
5572
|
*/
|
|
4992
|
-
readonly running_speed
|
|
5573
|
+
readonly running_speed?: number
|
|
4993
5574
|
|
|
4994
5575
|
/**
|
|
4995
|
-
*
|
|
5576
|
+
* Whether this generator prototype scales fluid usage.
|
|
5577
|
+
* @remarks
|
|
5578
|
+
* Applies to subclasses: Generator
|
|
5579
|
+
*
|
|
4996
5580
|
*/
|
|
4997
|
-
readonly scale_fluid_usage
|
|
5581
|
+
readonly scale_fluid_usage?: boolean
|
|
4998
5582
|
|
|
4999
5583
|
/**
|
|
5000
|
-
* 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.
|
|
5001
5585
|
*/
|
|
5002
5586
|
readonly secondary_collision_box?: BoundingBox
|
|
5003
5587
|
|
|
@@ -5022,42 +5606,63 @@ interface LuaEntityPrototype {
|
|
|
5022
5606
|
readonly shooting_cursor_size: number
|
|
5023
5607
|
|
|
5024
5608
|
/**
|
|
5025
|
-
* 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
|
+
*
|
|
5026
5613
|
*/
|
|
5027
|
-
readonly spawn_cooldown?: {
|
|
5614
|
+
readonly spawn_cooldown?: {
|
|
5615
|
+
max: number,
|
|
5616
|
+
min: number
|
|
5617
|
+
}
|
|
5028
5618
|
|
|
5029
5619
|
/**
|
|
5030
5620
|
* How far from the spawner can the units be spawned.
|
|
5621
|
+
* @remarks
|
|
5622
|
+
* Applies to subclasses: Spawner
|
|
5623
|
+
*
|
|
5031
5624
|
*/
|
|
5032
|
-
readonly spawning_radius
|
|
5625
|
+
readonly spawning_radius?: number
|
|
5033
5626
|
|
|
5034
5627
|
/**
|
|
5035
5628
|
* What spaces should be between the spawned units.
|
|
5629
|
+
* @remarks
|
|
5630
|
+
* Applies to subclasses: Spawner
|
|
5631
|
+
*
|
|
5036
5632
|
*/
|
|
5037
|
-
readonly spawning_spacing
|
|
5633
|
+
readonly spawning_spacing?: number
|
|
5038
5634
|
|
|
5039
5635
|
/**
|
|
5040
|
-
* 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
|
+
*
|
|
5041
5640
|
*/
|
|
5042
5641
|
readonly spawning_time_modifier?: number
|
|
5043
5642
|
|
|
5044
5643
|
/**
|
|
5045
|
-
* 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`.
|
|
5046
5645
|
* @remarks
|
|
5047
|
-
*
|
|
5646
|
+
* Applies to subclasses: FlyingRobot,RollingStock,Unit
|
|
5048
5647
|
*
|
|
5049
5648
|
*/
|
|
5050
|
-
readonly speed
|
|
5649
|
+
readonly speed?: number
|
|
5051
5650
|
|
|
5052
5651
|
/**
|
|
5053
|
-
* 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
|
+
*
|
|
5054
5656
|
*/
|
|
5055
5657
|
readonly speed_multiplier_when_out_of_energy?: number
|
|
5056
5658
|
|
|
5057
5659
|
/**
|
|
5058
|
-
*
|
|
5660
|
+
* Whether this inserter is a stack-type.
|
|
5661
|
+
* @remarks
|
|
5662
|
+
* Applies to subclasses: Inserter
|
|
5663
|
+
*
|
|
5059
5664
|
*/
|
|
5060
|
-
readonly stack
|
|
5665
|
+
readonly stack?: boolean
|
|
5061
5666
|
|
|
5062
5667
|
/**
|
|
5063
5668
|
* The bounding box used to attach sticker type entities.
|
|
@@ -5070,50 +5675,72 @@ interface LuaEntityPrototype {
|
|
|
5070
5675
|
readonly subgroup: LuaGroup
|
|
5071
5676
|
|
|
5072
5677
|
/**
|
|
5073
|
-
* 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
|
+
*
|
|
5074
5682
|
*/
|
|
5075
5683
|
readonly supply_area_distance?: number
|
|
5076
5684
|
|
|
5077
5685
|
/**
|
|
5078
|
-
*
|
|
5686
|
+
* Whether this entity prototype could possibly ever be rotated.
|
|
5079
5687
|
*/
|
|
5080
5688
|
readonly supports_direction: boolean
|
|
5081
5689
|
|
|
5082
5690
|
/**
|
|
5083
|
-
* 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
|
+
*
|
|
5084
5695
|
*/
|
|
5085
5696
|
readonly tank_driving?: boolean
|
|
5086
5697
|
|
|
5087
5698
|
/**
|
|
5088
|
-
* The target temperature of this boiler prototype
|
|
5699
|
+
* The target temperature of this boiler prototype.
|
|
5700
|
+
* @remarks
|
|
5701
|
+
* Applies to subclasses: Boiler
|
|
5702
|
+
*
|
|
5089
5703
|
*/
|
|
5090
5704
|
readonly target_temperature?: number
|
|
5091
5705
|
|
|
5092
5706
|
/**
|
|
5093
5707
|
* The terrain friction modifier for this vehicle.
|
|
5708
|
+
* @remarks
|
|
5709
|
+
* Applies to subclasses: Vehicle
|
|
5710
|
+
*
|
|
5094
5711
|
*/
|
|
5095
|
-
readonly terrain_friction_modifier
|
|
5712
|
+
readonly terrain_friction_modifier?: number
|
|
5096
5713
|
|
|
5097
5714
|
/**
|
|
5098
5715
|
* @remarks
|
|
5099
5716
|
* Applies to subclasses: Character
|
|
5100
5717
|
*
|
|
5101
5718
|
*/
|
|
5102
|
-
readonly ticks_to_keep_aiming_direction
|
|
5719
|
+
readonly ticks_to_keep_aiming_direction?: number
|
|
5103
5720
|
|
|
5104
5721
|
/**
|
|
5105
5722
|
* @remarks
|
|
5106
5723
|
* Applies to subclasses: Character
|
|
5107
5724
|
*
|
|
5108
5725
|
*/
|
|
5109
|
-
readonly ticks_to_keep_gun
|
|
5726
|
+
readonly ticks_to_keep_gun?: number
|
|
5110
5727
|
|
|
5111
5728
|
/**
|
|
5112
5729
|
* @remarks
|
|
5113
5730
|
* Applies to subclasses: Character
|
|
5114
5731
|
*
|
|
5115
5732
|
*/
|
|
5116
|
-
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
|
|
5117
5744
|
|
|
5118
5745
|
/**
|
|
5119
5746
|
* The time to live for this prototype or `0` if prototype doesn't have time_to_live or time_before_removed.
|
|
@@ -5122,31 +5749,57 @@ interface LuaEntityPrototype {
|
|
|
5122
5749
|
|
|
5123
5750
|
/**
|
|
5124
5751
|
* The time it takes this land mine to arm.
|
|
5752
|
+
* @remarks
|
|
5753
|
+
* Applies to subclasses: LandMine
|
|
5754
|
+
*
|
|
5755
|
+
*/
|
|
5756
|
+
readonly timeout?: number
|
|
5757
|
+
|
|
5758
|
+
/**
|
|
5759
|
+
* The torso bob speed of this spider vehicle prototype.
|
|
5760
|
+
* @remarks
|
|
5761
|
+
* Applies to subclasses: SpiderVehicle
|
|
5762
|
+
*
|
|
5125
5763
|
*/
|
|
5126
|
-
readonly
|
|
5764
|
+
readonly torso_bob_speed?: number
|
|
5127
5765
|
|
|
5128
5766
|
/**
|
|
5129
|
-
*
|
|
5767
|
+
* The torso rotation speed of this spider vehicle prototype.
|
|
5768
|
+
* @remarks
|
|
5769
|
+
* Applies to subclasses: SpiderVehicle
|
|
5770
|
+
*
|
|
5130
5771
|
*/
|
|
5131
|
-
readonly torso_rotation_speed
|
|
5772
|
+
readonly torso_rotation_speed?: number
|
|
5132
5773
|
|
|
5133
5774
|
/**
|
|
5134
|
-
* If it is a tree, return the number of colors it supports.
|
|
5775
|
+
* If it is a tree, return the number of colors it supports.
|
|
5776
|
+
* @remarks
|
|
5777
|
+
* Applies to subclasses: Tree
|
|
5778
|
+
*
|
|
5135
5779
|
*/
|
|
5136
|
-
readonly tree_color_count
|
|
5780
|
+
readonly tree_color_count?: number
|
|
5137
5781
|
|
|
5138
5782
|
/**
|
|
5139
|
-
*
|
|
5783
|
+
* The collision mask entities must collide with to make this landmine blow up.
|
|
5784
|
+
* @remarks
|
|
5785
|
+
* Applies to subclasses: LandMine
|
|
5786
|
+
*
|
|
5140
5787
|
*/
|
|
5141
|
-
readonly trigger_collision_mask
|
|
5788
|
+
readonly trigger_collision_mask?: CollisionMaskWithFlags
|
|
5142
5789
|
|
|
5143
5790
|
/**
|
|
5144
|
-
* The range of this turret
|
|
5791
|
+
* The range of this turret.
|
|
5792
|
+
* @remarks
|
|
5793
|
+
* Applies to subclasses: Turret
|
|
5794
|
+
*
|
|
5145
5795
|
*/
|
|
5146
5796
|
readonly turret_range?: number
|
|
5147
5797
|
|
|
5148
5798
|
/**
|
|
5149
|
-
* The turret rotation speed of this car prototype
|
|
5799
|
+
* The turret rotation speed of this car prototype.
|
|
5800
|
+
* @remarks
|
|
5801
|
+
* Applies to subclasses: Car
|
|
5802
|
+
*
|
|
5150
5803
|
*/
|
|
5151
5804
|
readonly turret_rotation_speed?: number
|
|
5152
5805
|
|
|
@@ -5155,23 +5808,37 @@ interface LuaEntityPrototype {
|
|
|
5155
5808
|
*/
|
|
5156
5809
|
readonly type: string
|
|
5157
5810
|
|
|
5811
|
+
/**
|
|
5812
|
+
* Whether this logistic container prototype uses exact mode
|
|
5813
|
+
* @remarks
|
|
5814
|
+
* Applies to subclasses: LogisticContainer
|
|
5815
|
+
*
|
|
5816
|
+
*/
|
|
5817
|
+
readonly use_exact_mode?: boolean
|
|
5818
|
+
|
|
5158
5819
|
/**
|
|
5159
5820
|
* 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.
|
|
5160
5821
|
*/
|
|
5161
5822
|
readonly valid: boolean
|
|
5162
5823
|
|
|
5163
5824
|
/**
|
|
5164
|
-
* The vision distance of this unit prototype
|
|
5825
|
+
* The vision distance of this unit prototype.
|
|
5826
|
+
* @remarks
|
|
5827
|
+
* Applies to subclasses: Unit
|
|
5828
|
+
*
|
|
5165
5829
|
*/
|
|
5166
5830
|
readonly vision_distance?: number
|
|
5167
5831
|
|
|
5168
5832
|
/**
|
|
5169
|
-
* The void energy source prototype this entity uses
|
|
5833
|
+
* The void energy source prototype this entity uses, if any.
|
|
5170
5834
|
*/
|
|
5171
5835
|
readonly void_energy_source_prototype?: LuaVoidEnergySourcePrototype
|
|
5172
5836
|
|
|
5173
5837
|
/**
|
|
5174
|
-
* The weight of this vehicle prototype
|
|
5838
|
+
* The weight of this vehicle prototype.
|
|
5839
|
+
* @remarks
|
|
5840
|
+
* Applies to subclasses: Vehicle
|
|
5841
|
+
*
|
|
5175
5842
|
*/
|
|
5176
5843
|
readonly weight?: number
|
|
5177
5844
|
|
|
@@ -5189,7 +5856,7 @@ interface LuaEquipment {
|
|
|
5189
5856
|
help(this: void): void
|
|
5190
5857
|
|
|
5191
5858
|
/**
|
|
5192
|
-
* The burner energy source for this equipment
|
|
5859
|
+
* The burner energy source for this equipment, if any.
|
|
5193
5860
|
*/
|
|
5194
5861
|
readonly burner?: LuaBurner
|
|
5195
5862
|
|
|
@@ -5243,7 +5910,10 @@ interface LuaEquipment {
|
|
|
5243
5910
|
/**
|
|
5244
5911
|
* Shape of this equipment.
|
|
5245
5912
|
*/
|
|
5246
|
-
readonly shape: {
|
|
5913
|
+
readonly shape: {
|
|
5914
|
+
height: number,
|
|
5915
|
+
width: number
|
|
5916
|
+
}
|
|
5247
5917
|
|
|
5248
5918
|
/**
|
|
5249
5919
|
* Current shield value of the equipment.
|
|
@@ -5322,6 +5992,20 @@ interface LuaEquipmentGrid {
|
|
|
5322
5992
|
clear(this: void,
|
|
5323
5993
|
by_player?: PlayerIdentification): void
|
|
5324
5994
|
|
|
5995
|
+
/**
|
|
5996
|
+
* Get the number of all or some equipment in this grid.
|
|
5997
|
+
* @param equipment - Prototype name of the equipment to count. If not specified, count all equipment.
|
|
5998
|
+
*/
|
|
5999
|
+
count(this: void,
|
|
6000
|
+
equipment?: string): void
|
|
6001
|
+
|
|
6002
|
+
/**
|
|
6003
|
+
* Find equipment by name.
|
|
6004
|
+
* @param equipment - Prototype name of the equipment to find.
|
|
6005
|
+
*/
|
|
6006
|
+
find(this: void,
|
|
6007
|
+
equipment: string): void
|
|
6008
|
+
|
|
5325
6009
|
/**
|
|
5326
6010
|
* Find equipment in the Equipment Grid based off a position.
|
|
5327
6011
|
* @param position - The position
|
|
@@ -5435,6 +6119,11 @@ interface LuaEquipmentGrid {
|
|
|
5435
6119
|
*/
|
|
5436
6120
|
readonly shield: number
|
|
5437
6121
|
|
|
6122
|
+
/**
|
|
6123
|
+
* Unique identifier of this equipment grid.
|
|
6124
|
+
*/
|
|
6125
|
+
readonly unique_id: number
|
|
6126
|
+
|
|
5438
6127
|
/**
|
|
5439
6128
|
* 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.
|
|
5440
6129
|
*/
|
|
@@ -5506,12 +6195,15 @@ interface LuaEquipmentPrototype {
|
|
|
5506
6195
|
help(this: void): void
|
|
5507
6196
|
|
|
5508
6197
|
/**
|
|
5509
|
-
* The equipment attack parameters
|
|
6198
|
+
* The equipment attack parameters.
|
|
6199
|
+
* @remarks
|
|
6200
|
+
* Applies to subclasses: ActiveDefenseEquipment
|
|
6201
|
+
*
|
|
5510
6202
|
*/
|
|
5511
6203
|
readonly attack_parameters?: AttackParameters
|
|
5512
6204
|
|
|
5513
6205
|
/**
|
|
5514
|
-
*
|
|
6206
|
+
* Whether this active defense equipment is automatic. Returns false if not active defense equipment.
|
|
5515
6207
|
*/
|
|
5516
6208
|
readonly automatic: boolean
|
|
5517
6209
|
|
|
@@ -5521,12 +6213,12 @@ interface LuaEquipmentPrototype {
|
|
|
5521
6213
|
readonly background_color: Color
|
|
5522
6214
|
|
|
5523
6215
|
/**
|
|
5524
|
-
* The burner energy source prototype this equipment uses
|
|
6216
|
+
* The burner energy source prototype this equipment uses, if any.
|
|
5525
6217
|
*/
|
|
5526
6218
|
readonly burner_prototype?: LuaBurnerPrototype
|
|
5527
6219
|
|
|
5528
6220
|
/**
|
|
5529
|
-
* The electric energy source prototype this equipment uses
|
|
6221
|
+
* The electric energy source prototype this equipment uses, if any.
|
|
5530
6222
|
*/
|
|
5531
6223
|
readonly electric_energy_source_prototype?: LuaElectricEnergySourcePrototype
|
|
5532
6224
|
|
|
@@ -5562,7 +6254,23 @@ interface LuaEquipmentPrototype {
|
|
|
5562
6254
|
* Both the `charging_station_shift` and `stationing_offset` vectors are tables with `x` and `y` keys instead of an array.
|
|
5563
6255
|
*
|
|
5564
6256
|
*/
|
|
5565
|
-
readonly logistic_parameters: {
|
|
6257
|
+
readonly logistic_parameters: {
|
|
6258
|
+
charge_approach_distance: number,
|
|
6259
|
+
charging_distance: number,
|
|
6260
|
+
charging_energy: number,
|
|
6261
|
+
charging_station_count: number,
|
|
6262
|
+
charging_station_shift: Vector,
|
|
6263
|
+
charging_threshold_distance: number,
|
|
6264
|
+
construction_radius: number,
|
|
6265
|
+
logistic_radius: number,
|
|
6266
|
+
logistics_connection_distance: number,
|
|
6267
|
+
robot_limit: number,
|
|
6268
|
+
robot_vertical_acceleration: number,
|
|
6269
|
+
robots_shrink_when_entering_and_exiting: boolean,
|
|
6270
|
+
spawn_and_station_height: number,
|
|
6271
|
+
spawn_and_station_shadow_height_offset: number,
|
|
6272
|
+
stationing_offset: Vector
|
|
6273
|
+
}
|
|
5566
6274
|
|
|
5567
6275
|
/**
|
|
5568
6276
|
* @remarks
|
|
@@ -5589,7 +6297,15 @@ interface LuaEquipmentPrototype {
|
|
|
5589
6297
|
/**
|
|
5590
6298
|
* Shape of this equipment prototype.
|
|
5591
6299
|
*/
|
|
5592
|
-
readonly shape: {
|
|
6300
|
+
readonly shape: {
|
|
6301
|
+
height: number,
|
|
6302
|
+
|
|
6303
|
+
/**
|
|
6304
|
+
* Only set when the shape is "manual"
|
|
6305
|
+
*/
|
|
6306
|
+
points?: EquipmentPoint[],
|
|
6307
|
+
width: number
|
|
6308
|
+
}
|
|
5593
6309
|
|
|
5594
6310
|
/**
|
|
5595
6311
|
* The shield value of this equipment. 0 for non-shield equipment.
|
|
@@ -5597,9 +6313,9 @@ interface LuaEquipmentPrototype {
|
|
|
5597
6313
|
readonly shield: number
|
|
5598
6314
|
|
|
5599
6315
|
/**
|
|
5600
|
-
* The result item when taking this equipment out of an equipment grid
|
|
6316
|
+
* The result item when taking this equipment out of an equipment grid, if any.
|
|
5601
6317
|
*/
|
|
5602
|
-
readonly take_result
|
|
6318
|
+
readonly take_result?: LuaItemPrototype
|
|
5603
6319
|
|
|
5604
6320
|
/**
|
|
5605
6321
|
* Type of this equipment prototype.
|
|
@@ -5695,7 +6411,7 @@ interface LuaFlowStatistics {
|
|
|
5695
6411
|
count: number): void
|
|
5696
6412
|
|
|
5697
6413
|
/**
|
|
5698
|
-
* The force these statistics belong to
|
|
6414
|
+
* The force these statistics belong to. `nil` for pollution statistics.
|
|
5699
6415
|
*/
|
|
5700
6416
|
readonly force?: LuaForce
|
|
5701
6417
|
|
|
@@ -5722,9 +6438,7 @@ interface LuaFlowStatistics {
|
|
|
5722
6438
|
}
|
|
5723
6439
|
|
|
5724
6440
|
/**
|
|
5725
|
-
* 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.
|
|
5726
|
-
*
|
|
5727
|
-
* See {@link Fluid | Fluid}
|
|
6441
|
+
* 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}.
|
|
5728
6442
|
*
|
|
5729
6443
|
* 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.
|
|
5730
6444
|
* @example
|
|
@@ -5824,7 +6538,9 @@ interface LuaFluidBox {
|
|
|
5824
6538
|
readonly valid: boolean
|
|
5825
6539
|
|
|
5826
6540
|
/**
|
|
5827
|
-
* Access, set or clear a fluid box. The index must always be in bounds (see {@link LuaFluidBox::
|
|
6541
|
+
* 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.
|
|
6542
|
+
*
|
|
6543
|
+
* Is `nil` if the given fluid box does not contain any fluid. Writing `nil` removes all fluid from the fluid box.
|
|
5828
6544
|
* @remarks
|
|
5829
6545
|
* This will return a {@link Fluid | Fluid}. The return type is any due to typescript limitations.
|
|
5830
6546
|
*
|
|
@@ -5857,7 +6573,7 @@ interface LuaFluidBoxPrototype {
|
|
|
5857
6573
|
readonly entity: LuaEntityPrototype
|
|
5858
6574
|
|
|
5859
6575
|
/**
|
|
5860
|
-
* The filter
|
|
6576
|
+
* The filter, if any is set.
|
|
5861
6577
|
*/
|
|
5862
6578
|
readonly filter?: LuaFluidPrototype
|
|
5863
6579
|
|
|
@@ -5869,12 +6585,12 @@ interface LuaFluidBoxPrototype {
|
|
|
5869
6585
|
readonly index: number
|
|
5870
6586
|
|
|
5871
6587
|
/**
|
|
5872
|
-
* The maximum temperature
|
|
6588
|
+
* The maximum temperature, if any is set.
|
|
5873
6589
|
*/
|
|
5874
6590
|
readonly maximum_temperature?: number
|
|
5875
6591
|
|
|
5876
6592
|
/**
|
|
5877
|
-
* The minimum temperature
|
|
6593
|
+
* The minimum temperature, if any is set.
|
|
5878
6594
|
*/
|
|
5879
6595
|
readonly minimum_temperature?: number
|
|
5880
6596
|
|
|
@@ -5950,7 +6666,7 @@ interface LuaFluidEnergySourcePrototype {
|
|
|
5950
6666
|
readonly scale_fluid_usage: boolean
|
|
5951
6667
|
|
|
5952
6668
|
/**
|
|
5953
|
-
* The smoke sources for this prototype if any.
|
|
6669
|
+
* The smoke sources for this prototype, if any.
|
|
5954
6670
|
*/
|
|
5955
6671
|
readonly smoke: SmokeSource[]
|
|
5956
6672
|
|
|
@@ -6057,7 +6773,7 @@ interface LuaFontPrototype {
|
|
|
6057
6773
|
readonly border: boolean
|
|
6058
6774
|
|
|
6059
6775
|
/**
|
|
6060
|
-
* The border color
|
|
6776
|
+
* The border color, if any.
|
|
6061
6777
|
*/
|
|
6062
6778
|
readonly border_color?: Color
|
|
6063
6779
|
|
|
@@ -6502,6 +7218,11 @@ interface LuaForce {
|
|
|
6502
7218
|
*/
|
|
6503
7219
|
character_trash_slot_count: number
|
|
6504
7220
|
|
|
7221
|
+
/**
|
|
7222
|
+
* Effective color of this force.
|
|
7223
|
+
*/
|
|
7224
|
+
readonly color: Color
|
|
7225
|
+
|
|
6505
7226
|
/**
|
|
6506
7227
|
* The connected players belonging to this force.
|
|
6507
7228
|
*
|
|
@@ -6513,10 +7234,15 @@ interface LuaForce {
|
|
|
6513
7234
|
readonly connected_players: LuaPlayer[]
|
|
6514
7235
|
|
|
6515
7236
|
/**
|
|
6516
|
-
* The
|
|
7237
|
+
* The currently ongoing technology research, if any.
|
|
6517
7238
|
*/
|
|
6518
7239
|
readonly current_research?: LuaTechnology
|
|
6519
7240
|
|
|
7241
|
+
/**
|
|
7242
|
+
* 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}
|
|
7243
|
+
*/
|
|
7244
|
+
custom_color?: Color
|
|
7245
|
+
|
|
6520
7246
|
/**
|
|
6521
7247
|
* The time, in ticks, before a deconstruction order is removed.
|
|
6522
7248
|
*/
|
|
@@ -6647,9 +7373,9 @@ interface LuaForce {
|
|
|
6647
7373
|
readonly players: LuaPlayer[]
|
|
6648
7374
|
|
|
6649
7375
|
/**
|
|
6650
|
-
* The previous research if any.
|
|
7376
|
+
* The previous research, if any.
|
|
6651
7377
|
*/
|
|
6652
|
-
previous_research
|
|
7378
|
+
previous_research?: LuaTechnology
|
|
6653
7379
|
|
|
6654
7380
|
/**
|
|
6655
7381
|
* Recipes available to this force, indexed by `name`.
|
|
@@ -7083,9 +7809,6 @@ interface LuaGameScript {
|
|
|
7083
7809
|
|
|
7084
7810
|
/**
|
|
7085
7811
|
* Gets the given player or returns `nil` if no player is found.
|
|
7086
|
-
* @remarks
|
|
7087
|
-
* This is a shortcut for game.players[...]
|
|
7088
|
-
*
|
|
7089
7812
|
* @param player - The player index or name.
|
|
7090
7813
|
*/
|
|
7091
7814
|
get_player(this: void,
|
|
@@ -7647,10 +8370,12 @@ interface LuaGameScript {
|
|
|
7647
8370
|
*
|
|
7648
8371
|
* See {@link LuaGameScript::players | LuaGameScript::players} for accessing all players.
|
|
7649
8372
|
*/
|
|
7650
|
-
readonly player
|
|
8373
|
+
readonly player?: LuaPlayer
|
|
7651
8374
|
|
|
7652
8375
|
/**
|
|
7653
8376
|
* 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.
|
|
8377
|
+
*
|
|
8378
|
+
* 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.
|
|
7654
8379
|
*/
|
|
7655
8380
|
readonly players: {[key: string]: LuaPlayer}
|
|
7656
8381
|
|
|
@@ -7753,10 +8478,7 @@ interface LuaGenericOnOffControlBehavior extends LuaControlBehavior {
|
|
|
7753
8478
|
help(this: void): void
|
|
7754
8479
|
|
|
7755
8480
|
/**
|
|
7756
|
-
* The circuit condition.
|
|
7757
|
-
* @remarks
|
|
7758
|
-
* `condition` may be `nil` in order to clear the circuit condition.
|
|
7759
|
-
*
|
|
8481
|
+
* The circuit condition. Writing `nil` clears the circuit condition.
|
|
7760
8482
|
* @example
|
|
7761
8483
|
* 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.
|
|
7762
8484
|
* ```
|
|
@@ -7779,10 +8501,7 @@ interface LuaGenericOnOffControlBehavior extends LuaControlBehavior {
|
|
|
7779
8501
|
readonly disabled: boolean
|
|
7780
8502
|
|
|
7781
8503
|
/**
|
|
7782
|
-
* The logistic condition.
|
|
7783
|
-
* @remarks
|
|
7784
|
-
* `condition` may be `nil` in order to clear the logistic condition.
|
|
7785
|
-
*
|
|
8504
|
+
* The logistic condition. Writing `nil` clears the logistic condition.
|
|
7786
8505
|
* @example
|
|
7787
8506
|
* 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.
|
|
7788
8507
|
* ```
|
|
@@ -7816,16 +8535,16 @@ interface LuaGroup {
|
|
|
7816
8535
|
help(this: void): void
|
|
7817
8536
|
|
|
7818
8537
|
/**
|
|
7819
|
-
* The parent group if any
|
|
8538
|
+
* The parent group, if any.
|
|
7820
8539
|
*/
|
|
7821
|
-
readonly group
|
|
8540
|
+
readonly group?: LuaGroup
|
|
7822
8541
|
|
|
7823
8542
|
/**
|
|
7824
8543
|
* Localised name of the group.
|
|
7825
8544
|
*/
|
|
7826
|
-
readonly localised_name
|
|
8545
|
+
readonly localised_name?: LocalisedString
|
|
7827
8546
|
|
|
7828
|
-
readonly name
|
|
8547
|
+
readonly name?: string
|
|
7829
8548
|
|
|
7830
8549
|
/**
|
|
7831
8550
|
* 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.
|
|
@@ -7853,7 +8572,7 @@ interface LuaGroup {
|
|
|
7853
8572
|
*/
|
|
7854
8573
|
readonly subgroups: LuaGroup[]
|
|
7855
8574
|
|
|
7856
|
-
readonly type
|
|
8575
|
+
readonly type?: string
|
|
7857
8576
|
|
|
7858
8577
|
/**
|
|
7859
8578
|
* 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.
|
|
@@ -8300,9 +9019,9 @@ interface LuaGuiElement {
|
|
|
8300
9019
|
allow_none_state: boolean
|
|
8301
9020
|
|
|
8302
9021
|
/**
|
|
8303
|
-
*
|
|
9022
|
+
* The anchor for this relative widget, if any. Setting `nil` clears the anchor.
|
|
8304
9023
|
*/
|
|
8305
|
-
anchor
|
|
9024
|
+
anchor?: GuiAnchor
|
|
8306
9025
|
|
|
8307
9026
|
/**
|
|
8308
9027
|
* Whether this frame auto-centers on window resize when stored in {@link LuaGui::screen | LuaGui::screen}.
|
|
@@ -8368,7 +9087,7 @@ interface LuaGuiElement {
|
|
|
8368
9087
|
readonly direction: string
|
|
8369
9088
|
|
|
8370
9089
|
/**
|
|
8371
|
-
* The `frame` that is being moved when dragging this GUI element,
|
|
9090
|
+
* 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.
|
|
8372
9091
|
* @remarks
|
|
8373
9092
|
* Only top-level elements in {@link LuaGui::screen | LuaGui::screen} can be `drag_target`s.
|
|
8374
9093
|
* Applies to subclasses: flow,frame,label,table,empty-widget
|
|
@@ -8410,7 +9129,7 @@ interface LuaGuiElement {
|
|
|
8410
9129
|
draw_vertical_lines: boolean
|
|
8411
9130
|
|
|
8412
9131
|
/**
|
|
8413
|
-
* The elem filters of this choose-elem-button,
|
|
9132
|
+
* The elem filters of this choose-elem-button, if any. The compatible type of filter is determined by `elem_type`.
|
|
8414
9133
|
* @remarks
|
|
8415
9134
|
* Writing to this field does not change or clear the currently selected element.
|
|
8416
9135
|
* Applies to subclasses: choose-elem-button
|
|
@@ -8434,7 +9153,7 @@ interface LuaGuiElement {
|
|
|
8434
9153
|
* ```
|
|
8435
9154
|
*
|
|
8436
9155
|
*/
|
|
8437
|
-
elem_filters?: ItemPrototypeFilter | TilePrototypeFilter | EntityPrototypeFilter | FluidPrototypeFilter | RecipePrototypeFilter | DecorativePrototypeFilter | AchievementPrototypeFilter | EquipmentPrototypeFilter | TechnologyPrototypeFilter
|
|
9156
|
+
elem_filters?: ItemPrototypeFilter | TilePrototypeFilter | EntityPrototypeFilter | FluidPrototypeFilter | RecipePrototypeFilter | DecorativePrototypeFilter | AchievementPrototypeFilter | EquipmentPrototypeFilter | TechnologyPrototypeFilter
|
|
8438
9157
|
|
|
8439
9158
|
/**
|
|
8440
9159
|
* The elem type of this choose-elem-button.
|
|
@@ -8445,7 +9164,7 @@ interface LuaGuiElement {
|
|
|
8445
9164
|
readonly elem_type: string
|
|
8446
9165
|
|
|
8447
9166
|
/**
|
|
8448
|
-
* The elem value of this choose-elem-button
|
|
9167
|
+
* The elem value of this choose-elem-button, if any.
|
|
8449
9168
|
* @remarks
|
|
8450
9169
|
* The `"signal"` type operates with {@link SignalID | SignalID}, while all other types use strings.
|
|
8451
9170
|
* Applies to subclasses: choose-elem-button
|
|
@@ -8459,12 +9178,12 @@ interface LuaGuiElement {
|
|
|
8459
9178
|
enabled: boolean
|
|
8460
9179
|
|
|
8461
9180
|
/**
|
|
8462
|
-
* The entity associated with this entity-preview, camera, minimap
|
|
9181
|
+
* The entity associated with this entity-preview, camera, minimap, if any.
|
|
8463
9182
|
*/
|
|
8464
9183
|
entity?: LuaEntity
|
|
8465
9184
|
|
|
8466
9185
|
/**
|
|
8467
|
-
* The force this minimap is using
|
|
9186
|
+
* The force this minimap is using, if any.
|
|
8468
9187
|
*/
|
|
8469
9188
|
force?: string
|
|
8470
9189
|
|
|
@@ -8529,7 +9248,7 @@ interface LuaGuiElement {
|
|
|
8529
9248
|
left_label_tooltip: LocalisedString
|
|
8530
9249
|
|
|
8531
9250
|
/**
|
|
8532
|
-
* The location of this widget when stored in {@link LuaGui::screen | LuaGui::screen}
|
|
9251
|
+
* 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}.
|
|
8533
9252
|
*/
|
|
8534
9253
|
location?: GuiLocation
|
|
8535
9254
|
|
|
@@ -8591,9 +9310,9 @@ interface LuaGuiElement {
|
|
|
8591
9310
|
readonly object_name: string
|
|
8592
9311
|
|
|
8593
9312
|
/**
|
|
8594
|
-
* The direct parent of this element
|
|
9313
|
+
* The direct parent of this element. `nil` if this is a top-level element.
|
|
8595
9314
|
*/
|
|
8596
|
-
readonly parent
|
|
9315
|
+
readonly parent?: LuaGuiElement
|
|
8597
9316
|
|
|
8598
9317
|
/**
|
|
8599
9318
|
* Index into {@link LuaGameScript::players | LuaGameScript::players} specifying the player who owns this element.
|
|
@@ -8648,7 +9367,7 @@ interface LuaGuiElement {
|
|
|
8648
9367
|
selected_index: number
|
|
8649
9368
|
|
|
8650
9369
|
/**
|
|
8651
|
-
* The selected tab index for this tabbed pane
|
|
9370
|
+
* The selected tab index for this tabbed pane, if any.
|
|
8652
9371
|
* @remarks
|
|
8653
9372
|
* Applies to subclasses: tabbed-pane
|
|
8654
9373
|
*
|
|
@@ -8958,7 +9677,7 @@ interface LuaInventory {
|
|
|
8958
9677
|
item?: string): void
|
|
8959
9678
|
|
|
8960
9679
|
/**
|
|
8961
|
-
*
|
|
9680
|
+
* Finds the first LuaItemStack in the inventory that matches the given item name.
|
|
8962
9681
|
* @param item - The item name to find
|
|
8963
9682
|
*/
|
|
8964
9683
|
find_item_stack(this: void,
|
|
@@ -9058,12 +9777,12 @@ interface LuaInventory {
|
|
|
9058
9777
|
* @remarks
|
|
9059
9778
|
* Some inventory slots don't allow some filters (gun ammo can't be filtered for non-ammo).
|
|
9060
9779
|
*
|
|
9061
|
-
* @param filter - The new filter
|
|
9062
|
-
* @param index - The item stack index
|
|
9780
|
+
* @param filter - The new filter. `nil` erases any existing filter.
|
|
9781
|
+
* @param index - The item stack index.
|
|
9063
9782
|
*/
|
|
9064
9783
|
set_filter(this: void,
|
|
9065
9784
|
index: number,
|
|
9066
|
-
filter: string): void
|
|
9785
|
+
filter: string | null): void
|
|
9067
9786
|
|
|
9068
9787
|
/**
|
|
9069
9788
|
* Sorts and merges the items in this inventory.
|
|
@@ -9084,22 +9803,22 @@ interface LuaInventory {
|
|
|
9084
9803
|
supports_filters(this: void): void
|
|
9085
9804
|
|
|
9086
9805
|
/**
|
|
9087
|
-
* The entity that owns this inventory
|
|
9806
|
+
* The entity that owns this inventory, if any.
|
|
9088
9807
|
*/
|
|
9089
9808
|
readonly entity_owner?: LuaEntity
|
|
9090
9809
|
|
|
9091
9810
|
/**
|
|
9092
|
-
* The equipment that owns this inventory
|
|
9811
|
+
* The equipment that owns this inventory, if any.
|
|
9093
9812
|
*/
|
|
9094
9813
|
readonly equipment_owner?: LuaEquipment
|
|
9095
9814
|
|
|
9096
9815
|
/**
|
|
9097
|
-
* The inventory index this inventory uses,
|
|
9816
|
+
* The inventory index this inventory uses, if any.
|
|
9098
9817
|
*/
|
|
9099
9818
|
readonly index?: defines.inventory
|
|
9100
9819
|
|
|
9101
9820
|
/**
|
|
9102
|
-
* The mod that owns this inventory
|
|
9821
|
+
* The mod that owns this inventory, if any.
|
|
9103
9822
|
*/
|
|
9104
9823
|
readonly mod_owner?: string
|
|
9105
9824
|
|
|
@@ -9109,7 +9828,7 @@ interface LuaInventory {
|
|
|
9109
9828
|
readonly object_name: string
|
|
9110
9829
|
|
|
9111
9830
|
/**
|
|
9112
|
-
* The player that owns this inventory
|
|
9831
|
+
* The player that owns this inventory, if any.
|
|
9113
9832
|
*/
|
|
9114
9833
|
readonly player_owner?: LuaPlayer
|
|
9115
9834
|
|
|
@@ -9155,7 +9874,10 @@ interface LuaInventory {
|
|
|
9155
9874
|
*/
|
|
9156
9875
|
interface LuaItemPrototype {
|
|
9157
9876
|
/**
|
|
9158
|
-
*
|
|
9877
|
+
* The type of this ammo prototype.
|
|
9878
|
+
* @remarks
|
|
9879
|
+
* Applies to subclasses: AmmoItem
|
|
9880
|
+
*
|
|
9159
9881
|
* @param ammo_source_type - "default", "player", "turret", or "vehicle"
|
|
9160
9882
|
*/
|
|
9161
9883
|
get_ammo_type(this: void,
|
|
@@ -9179,7 +9901,7 @@ interface LuaItemPrototype {
|
|
|
9179
9901
|
* Applies to subclasses: SelectionTool
|
|
9180
9902
|
*
|
|
9181
9903
|
*/
|
|
9182
|
-
readonly alt_entity_filter_mode
|
|
9904
|
+
readonly alt_entity_filter_mode?: string
|
|
9183
9905
|
|
|
9184
9906
|
/**
|
|
9185
9907
|
* The alt entity filters used by this selection tool indexed by entity name.
|
|
@@ -9187,7 +9909,7 @@ interface LuaItemPrototype {
|
|
|
9187
9909
|
* Applies to subclasses: SelectionTool
|
|
9188
9910
|
*
|
|
9189
9911
|
*/
|
|
9190
|
-
readonly alt_entity_filters
|
|
9912
|
+
readonly alt_entity_filters?: {[key: string]: LuaEntityPrototype}
|
|
9191
9913
|
|
|
9192
9914
|
/**
|
|
9193
9915
|
* The alt entity type filters used by this selection tool indexed by entity type.
|
|
@@ -9196,7 +9918,7 @@ interface LuaItemPrototype {
|
|
|
9196
9918
|
* Applies to subclasses: SelectionTool
|
|
9197
9919
|
*
|
|
9198
9920
|
*/
|
|
9199
|
-
readonly alt_entity_type_filters
|
|
9921
|
+
readonly alt_entity_type_filters?: {[key: string]: boolean}
|
|
9200
9922
|
|
|
9201
9923
|
/**
|
|
9202
9924
|
* The color used when doing alt selection with this selection tool prototype.
|
|
@@ -9204,14 +9926,14 @@ interface LuaItemPrototype {
|
|
|
9204
9926
|
* Applies to subclasses: SelectionTool
|
|
9205
9927
|
*
|
|
9206
9928
|
*/
|
|
9207
|
-
readonly alt_selection_border_color
|
|
9929
|
+
readonly alt_selection_border_color?: Color
|
|
9208
9930
|
|
|
9209
9931
|
/**
|
|
9210
9932
|
* @remarks
|
|
9211
9933
|
* Applies to subclasses: SelectionTool
|
|
9212
9934
|
*
|
|
9213
9935
|
*/
|
|
9214
|
-
readonly alt_selection_cursor_box_type
|
|
9936
|
+
readonly alt_selection_cursor_box_type?: string
|
|
9215
9937
|
|
|
9216
9938
|
/**
|
|
9217
9939
|
* Flags that affect which entities will be selected during alternate selection.
|
|
@@ -9219,7 +9941,7 @@ interface LuaItemPrototype {
|
|
|
9219
9941
|
* Applies to subclasses: SelectionTool
|
|
9220
9942
|
*
|
|
9221
9943
|
*/
|
|
9222
|
-
readonly alt_selection_mode_flags
|
|
9944
|
+
readonly alt_selection_mode_flags?: SelectionModeFlags
|
|
9223
9945
|
|
|
9224
9946
|
/**
|
|
9225
9947
|
* The alt tile filter mode used by this selection tool.
|
|
@@ -9227,7 +9949,7 @@ interface LuaItemPrototype {
|
|
|
9227
9949
|
* Applies to subclasses: SelectionTool
|
|
9228
9950
|
*
|
|
9229
9951
|
*/
|
|
9230
|
-
readonly alt_tile_filter_mode
|
|
9952
|
+
readonly alt_tile_filter_mode?: string
|
|
9231
9953
|
|
|
9232
9954
|
/**
|
|
9233
9955
|
* The alt tile filters used by this selection tool indexed by tile name.
|
|
@@ -9235,7 +9957,7 @@ interface LuaItemPrototype {
|
|
|
9235
9957
|
* Applies to subclasses: SelectionTool
|
|
9236
9958
|
*
|
|
9237
9959
|
*/
|
|
9238
|
-
readonly alt_tile_filters
|
|
9960
|
+
readonly alt_tile_filters?: {[key: string]: LuaTilePrototype}
|
|
9239
9961
|
|
|
9240
9962
|
/**
|
|
9241
9963
|
* If tiles area always included when doing selection with this selection tool prototype.
|
|
@@ -9243,15 +9965,18 @@ interface LuaItemPrototype {
|
|
|
9243
9965
|
* Applies to subclasses: SelectionTool
|
|
9244
9966
|
*
|
|
9245
9967
|
*/
|
|
9246
|
-
readonly always_include_tiles
|
|
9968
|
+
readonly always_include_tiles?: boolean
|
|
9247
9969
|
|
|
9248
9970
|
/**
|
|
9249
|
-
* The gun attack parameters
|
|
9971
|
+
* The gun attack parameters.
|
|
9972
|
+
* @remarks
|
|
9973
|
+
* Applies to subclasses: Gun
|
|
9974
|
+
*
|
|
9250
9975
|
*/
|
|
9251
9976
|
readonly attack_parameters?: AttackParameters
|
|
9252
9977
|
|
|
9253
9978
|
/**
|
|
9254
|
-
* The result of burning this item as fuel
|
|
9979
|
+
* The result of burning this item as fuel, if any.
|
|
9255
9980
|
*/
|
|
9256
9981
|
readonly burnt_result?: LuaItemPrototype
|
|
9257
9982
|
|
|
@@ -9261,7 +9986,10 @@ interface LuaItemPrototype {
|
|
|
9261
9986
|
readonly can_be_mod_opened: boolean
|
|
9262
9987
|
|
|
9263
9988
|
/**
|
|
9264
|
-
* The capsule action for this capsule item prototype
|
|
9989
|
+
* The capsule action for this capsule item prototype.
|
|
9990
|
+
* @remarks
|
|
9991
|
+
* Applies to subclasses: Capsule
|
|
9992
|
+
*
|
|
9265
9993
|
*/
|
|
9266
9994
|
readonly capsule_action?: CapsuleAction
|
|
9267
9995
|
|
|
@@ -9271,10 +9999,10 @@ interface LuaItemPrototype {
|
|
|
9271
9999
|
* Applies to subclasses: ModuleItem
|
|
9272
10000
|
*
|
|
9273
10001
|
*/
|
|
9274
|
-
readonly category
|
|
10002
|
+
readonly category?: string
|
|
9275
10003
|
|
|
9276
10004
|
/**
|
|
9277
|
-
* The curved rail prototype used for this rail planner prototype
|
|
10005
|
+
* The curved rail prototype used for this rail planner prototype.
|
|
9278
10006
|
* @remarks
|
|
9279
10007
|
* Applies to subclasses: RailPlanner
|
|
9280
10008
|
*
|
|
@@ -9282,12 +10010,12 @@ interface LuaItemPrototype {
|
|
|
9282
10010
|
readonly curved_rail?: LuaEntityPrototype
|
|
9283
10011
|
|
|
9284
10012
|
/**
|
|
9285
|
-
* The default label color used for this item with label
|
|
10013
|
+
* The default label color used for this item with label, if any.
|
|
9286
10014
|
* @remarks
|
|
9287
10015
|
* Applies to subclasses: ItemWithLabel
|
|
9288
10016
|
*
|
|
9289
10017
|
*/
|
|
9290
|
-
readonly default_label_color
|
|
10018
|
+
readonly default_label_color?: Color
|
|
9291
10019
|
|
|
9292
10020
|
/**
|
|
9293
10021
|
* The default request value.
|
|
@@ -9300,10 +10028,10 @@ interface LuaItemPrototype {
|
|
|
9300
10028
|
* Applies to subclasses: ItemWithLabel
|
|
9301
10029
|
*
|
|
9302
10030
|
*/
|
|
9303
|
-
readonly draw_label_for_cursor_render
|
|
10031
|
+
readonly draw_label_for_cursor_render?: boolean
|
|
9304
10032
|
|
|
9305
10033
|
/**
|
|
9306
|
-
* The durability of this tool item
|
|
10034
|
+
* The durability of this tool item.
|
|
9307
10035
|
* @remarks
|
|
9308
10036
|
* Applies to subclasses: ToolItem
|
|
9309
10037
|
*
|
|
@@ -9316,7 +10044,7 @@ interface LuaItemPrototype {
|
|
|
9316
10044
|
* Applies to subclasses: ToolItem
|
|
9317
10045
|
*
|
|
9318
10046
|
*/
|
|
9319
|
-
readonly durability_description_key
|
|
10047
|
+
readonly durability_description_key?: string
|
|
9320
10048
|
|
|
9321
10049
|
/**
|
|
9322
10050
|
* The entity filter mode used by this selection tool.
|
|
@@ -9324,10 +10052,10 @@ interface LuaItemPrototype {
|
|
|
9324
10052
|
* Applies to subclasses: SelectionTool
|
|
9325
10053
|
*
|
|
9326
10054
|
*/
|
|
9327
|
-
readonly entity_filter_mode
|
|
10055
|
+
readonly entity_filter_mode?: string
|
|
9328
10056
|
|
|
9329
10057
|
/**
|
|
9330
|
-
* The number of entity filters this deconstruction item has
|
|
10058
|
+
* The number of entity filters this deconstruction item has.
|
|
9331
10059
|
* @remarks
|
|
9332
10060
|
* Applies to subclasses: DeconstructionItem
|
|
9333
10061
|
*
|
|
@@ -9340,7 +10068,7 @@ interface LuaItemPrototype {
|
|
|
9340
10068
|
* Applies to subclasses: SelectionTool
|
|
9341
10069
|
*
|
|
9342
10070
|
*/
|
|
9343
|
-
readonly entity_filters
|
|
10071
|
+
readonly entity_filters?: {[key: string]: LuaEntityPrototype}
|
|
9344
10072
|
|
|
9345
10073
|
/**
|
|
9346
10074
|
* The entity type filters used by this selection tool indexed by entity type.
|
|
@@ -9349,10 +10077,13 @@ interface LuaItemPrototype {
|
|
|
9349
10077
|
* Applies to subclasses: SelectionTool
|
|
9350
10078
|
*
|
|
9351
10079
|
*/
|
|
9352
|
-
readonly entity_type_filters
|
|
10080
|
+
readonly entity_type_filters?: {[key: string]: boolean}
|
|
9353
10081
|
|
|
9354
10082
|
/**
|
|
9355
|
-
* The prototype of this armor equipment grid
|
|
10083
|
+
* The prototype of this armor equipment grid, if any.
|
|
10084
|
+
* @remarks
|
|
10085
|
+
* Applies to subclasses: Armor
|
|
10086
|
+
*
|
|
9356
10087
|
*/
|
|
9357
10088
|
readonly equipment_grid?: LuaEquipmentGridPrototype
|
|
9358
10089
|
|
|
@@ -9362,7 +10093,7 @@ interface LuaItemPrototype {
|
|
|
9362
10093
|
* Applies to subclasses: ItemWithInventory
|
|
9363
10094
|
*
|
|
9364
10095
|
*/
|
|
9365
|
-
readonly extend_inventory_by_default
|
|
10096
|
+
readonly extend_inventory_by_default?: boolean
|
|
9366
10097
|
|
|
9367
10098
|
/**
|
|
9368
10099
|
* The filter mode used by this item with inventory.
|
|
@@ -9370,7 +10101,7 @@ interface LuaItemPrototype {
|
|
|
9370
10101
|
* Applies to subclasses: ItemWithInventory
|
|
9371
10102
|
*
|
|
9372
10103
|
*/
|
|
9373
|
-
readonly filter_mode
|
|
10104
|
+
readonly filter_mode?: string
|
|
9374
10105
|
|
|
9375
10106
|
/**
|
|
9376
10107
|
* The flags for this item prototype.
|
|
@@ -9383,7 +10114,7 @@ interface LuaItemPrototype {
|
|
|
9383
10114
|
readonly fuel_acceleration_multiplier: number
|
|
9384
10115
|
|
|
9385
10116
|
/**
|
|
9386
|
-
* The fuel category
|
|
10117
|
+
* The fuel category of this item prototype, if any.
|
|
9387
10118
|
*/
|
|
9388
10119
|
readonly fuel_category?: string
|
|
9389
10120
|
|
|
@@ -9408,12 +10139,12 @@ interface LuaItemPrototype {
|
|
|
9408
10139
|
readonly group: LuaGroup
|
|
9409
10140
|
|
|
9410
10141
|
/**
|
|
9411
|
-
* If this tool item has infinite durability.
|
|
10142
|
+
* If this tool item has infinite durability.
|
|
9412
10143
|
* @remarks
|
|
9413
10144
|
* Applies to subclasses: ToolItem
|
|
9414
10145
|
*
|
|
9415
10146
|
*/
|
|
9416
|
-
readonly infinite
|
|
10147
|
+
readonly infinite?: boolean
|
|
9417
10148
|
|
|
9418
10149
|
/**
|
|
9419
10150
|
* The insertion priority mode used by this item with inventory.
|
|
@@ -9421,44 +10152,44 @@ interface LuaItemPrototype {
|
|
|
9421
10152
|
* Applies to subclasses: ItemWithInventory
|
|
9422
10153
|
*
|
|
9423
10154
|
*/
|
|
9424
|
-
readonly insertion_priority_mode
|
|
10155
|
+
readonly insertion_priority_mode?: string
|
|
9425
10156
|
|
|
9426
10157
|
/**
|
|
9427
|
-
* The main inventory size for item-with-inventory-prototype.
|
|
10158
|
+
* The main inventory size for item-with-inventory-prototype.
|
|
9428
10159
|
* @remarks
|
|
9429
10160
|
* Applies to subclasses: ItemWithInventoryPrototype
|
|
9430
10161
|
*
|
|
9431
10162
|
*/
|
|
9432
|
-
readonly inventory_size
|
|
10163
|
+
readonly inventory_size?: number
|
|
9433
10164
|
|
|
9434
10165
|
/**
|
|
9435
|
-
* The inventory size bonus for this armor prototype.
|
|
10166
|
+
* The inventory size bonus for this armor prototype.
|
|
9436
10167
|
* @remarks
|
|
9437
10168
|
* Applies to subclasses: ArmorPrototype
|
|
9438
10169
|
*
|
|
9439
10170
|
*/
|
|
9440
|
-
readonly inventory_size_bonus
|
|
10171
|
+
readonly inventory_size_bonus?: number
|
|
9441
10172
|
|
|
9442
10173
|
/**
|
|
9443
10174
|
* @remarks
|
|
9444
10175
|
* Applies to subclasses: ItemWithInventory
|
|
9445
10176
|
*
|
|
9446
10177
|
*/
|
|
9447
|
-
readonly item_filters
|
|
10178
|
+
readonly item_filters?: {[key: string]: LuaItemPrototype}
|
|
9448
10179
|
|
|
9449
10180
|
/**
|
|
9450
10181
|
* @remarks
|
|
9451
10182
|
* Applies to subclasses: ItemWithInventory
|
|
9452
10183
|
*
|
|
9453
10184
|
*/
|
|
9454
|
-
readonly item_group_filters
|
|
10185
|
+
readonly item_group_filters?: {[key: string]: LuaGroup}
|
|
9455
10186
|
|
|
9456
10187
|
/**
|
|
9457
10188
|
* @remarks
|
|
9458
10189
|
* Applies to subclasses: ItemWithInventory
|
|
9459
10190
|
*
|
|
9460
10191
|
*/
|
|
9461
|
-
readonly item_subgroup_filters
|
|
10192
|
+
readonly item_subgroup_filters?: {[key: string]: LuaGroup}
|
|
9462
10193
|
|
|
9463
10194
|
/**
|
|
9464
10195
|
* The limitation message key used when the player attempts to use this modules in some place it's not allowed.
|
|
@@ -9466,7 +10197,7 @@ interface LuaItemPrototype {
|
|
|
9466
10197
|
* Applies to subclasses: ModuleItem
|
|
9467
10198
|
*
|
|
9468
10199
|
*/
|
|
9469
|
-
readonly limitation_message_key
|
|
10200
|
+
readonly limitation_message_key?: string
|
|
9470
10201
|
|
|
9471
10202
|
/**
|
|
9472
10203
|
* An array of recipe names this module is allowed to work with. Empty when all recipes are allowed.
|
|
@@ -9474,7 +10205,7 @@ interface LuaItemPrototype {
|
|
|
9474
10205
|
* Applies to subclasses: ModuleItem
|
|
9475
10206
|
*
|
|
9476
10207
|
*/
|
|
9477
|
-
readonly limitations
|
|
10208
|
+
readonly limitations?: string[]
|
|
9478
10209
|
|
|
9479
10210
|
readonly localised_description: LocalisedString
|
|
9480
10211
|
|
|
@@ -9484,22 +10215,25 @@ interface LuaItemPrototype {
|
|
|
9484
10215
|
* Applies to subclasses: ItemWithInventory
|
|
9485
10216
|
*
|
|
9486
10217
|
*/
|
|
9487
|
-
readonly localised_filter_message
|
|
10218
|
+
readonly localised_filter_message?: LocalisedString
|
|
9488
10219
|
|
|
9489
10220
|
readonly localised_name: LocalisedString
|
|
9490
10221
|
|
|
9491
10222
|
/**
|
|
9492
|
-
* Size of full magazine
|
|
10223
|
+
* Size of full magazine.
|
|
10224
|
+
* @remarks
|
|
10225
|
+
* Applies to subclasses: AmmoItem
|
|
10226
|
+
*
|
|
9493
10227
|
*/
|
|
9494
|
-
readonly magazine_size
|
|
10228
|
+
readonly magazine_size?: number
|
|
9495
10229
|
|
|
9496
10230
|
/**
|
|
9497
|
-
* How many filters an upgrade item has.
|
|
10231
|
+
* How many filters an upgrade item has.
|
|
9498
10232
|
* @remarks
|
|
9499
10233
|
* Applies to subclasses: UpgradeItem
|
|
9500
10234
|
*
|
|
9501
10235
|
*/
|
|
9502
|
-
readonly mapper_count
|
|
10236
|
+
readonly mapper_count?: number
|
|
9503
10237
|
|
|
9504
10238
|
/**
|
|
9505
10239
|
* Effects of this module.
|
|
@@ -9507,7 +10241,7 @@ interface LuaItemPrototype {
|
|
|
9507
10241
|
* Applies to subclasses: ModuleItem
|
|
9508
10242
|
*
|
|
9509
10243
|
*/
|
|
9510
|
-
readonly module_effects
|
|
10244
|
+
readonly module_effects?: ModuleEffects
|
|
9511
10245
|
|
|
9512
10246
|
/**
|
|
9513
10247
|
* Name of this prototype.
|
|
@@ -9525,27 +10259,30 @@ interface LuaItemPrototype {
|
|
|
9525
10259
|
readonly order: string
|
|
9526
10260
|
|
|
9527
10261
|
/**
|
|
9528
|
-
* Prototype of the equipment that will be created by placing this item in an equipment grid
|
|
10262
|
+
* Prototype of the equipment that will be created by placing this item in an equipment grid, if any.
|
|
9529
10263
|
*/
|
|
9530
10264
|
readonly place_as_equipment_result?: LuaEquipmentPrototype
|
|
9531
10265
|
|
|
9532
10266
|
/**
|
|
9533
|
-
* The place-as-tile result if one is defined,
|
|
10267
|
+
* The place-as-tile result if one is defined, if any.
|
|
9534
10268
|
*/
|
|
9535
|
-
readonly place_as_tile_result
|
|
10269
|
+
readonly place_as_tile_result?: PlaceAsTileResult
|
|
9536
10270
|
|
|
9537
10271
|
/**
|
|
9538
|
-
* Prototype of the entity that will be created by placing this item,
|
|
10272
|
+
* Prototype of the entity that will be created by placing this item, if any.
|
|
9539
10273
|
*/
|
|
9540
10274
|
readonly place_result?: LuaEntityPrototype
|
|
9541
10275
|
|
|
9542
10276
|
/**
|
|
9543
|
-
* Amount of extra time (in ticks) it takes to reload the weapon after depleting the magazine
|
|
10277
|
+
* Amount of extra time (in ticks) it takes to reload the weapon after depleting the magazine.
|
|
10278
|
+
* @remarks
|
|
10279
|
+
* Applies to subclasses: AmmoItem
|
|
10280
|
+
*
|
|
9544
10281
|
*/
|
|
9545
10282
|
readonly reload_time?: number
|
|
9546
10283
|
|
|
9547
10284
|
/**
|
|
9548
|
-
* The repair result of this repair tool prototype
|
|
10285
|
+
* The repair result of this repair tool prototype.
|
|
9549
10286
|
* @remarks
|
|
9550
10287
|
* Applies to subclasses: RepairTool
|
|
9551
10288
|
*
|
|
@@ -9553,9 +10290,12 @@ interface LuaItemPrototype {
|
|
|
9553
10290
|
readonly repair_result?: TriggerItem[]
|
|
9554
10291
|
|
|
9555
10292
|
/**
|
|
9556
|
-
* Resistances of this
|
|
10293
|
+
* Resistances of this armor item, if any, indexed by damage type name.
|
|
10294
|
+
* @remarks
|
|
10295
|
+
* Applies to subclasses: Armor
|
|
10296
|
+
*
|
|
9557
10297
|
*/
|
|
9558
|
-
readonly resistances
|
|
10298
|
+
readonly resistances?: {[key: string]: Resistance}
|
|
9559
10299
|
|
|
9560
10300
|
/**
|
|
9561
10301
|
* The reverse entity filter mode used by this selection tool.
|
|
@@ -9563,7 +10303,7 @@ interface LuaItemPrototype {
|
|
|
9563
10303
|
* Applies to subclasses: SelectionTool
|
|
9564
10304
|
*
|
|
9565
10305
|
*/
|
|
9566
|
-
readonly reverse_alt_entity_filter_mode
|
|
10306
|
+
readonly reverse_alt_entity_filter_mode?: string
|
|
9567
10307
|
|
|
9568
10308
|
/**
|
|
9569
10309
|
* The reverse entity filters used by this selection tool indexed by entity name.
|
|
@@ -9571,7 +10311,7 @@ interface LuaItemPrototype {
|
|
|
9571
10311
|
* Applies to subclasses: SelectionTool
|
|
9572
10312
|
*
|
|
9573
10313
|
*/
|
|
9574
|
-
readonly reverse_entity_filters
|
|
10314
|
+
readonly reverse_entity_filters?: {[key: string]: LuaEntityPrototype}
|
|
9575
10315
|
|
|
9576
10316
|
/**
|
|
9577
10317
|
* The reverse entity type filters used by this selection tool indexed by entity type.
|
|
@@ -9580,7 +10320,7 @@ interface LuaItemPrototype {
|
|
|
9580
10320
|
* Applies to subclasses: SelectionTool
|
|
9581
10321
|
*
|
|
9582
10322
|
*/
|
|
9583
|
-
readonly reverse_entity_type_filters
|
|
10323
|
+
readonly reverse_entity_type_filters?: {[key: string]: boolean}
|
|
9584
10324
|
|
|
9585
10325
|
/**
|
|
9586
10326
|
* The color used when doing reverse selection with this selection tool prototype.
|
|
@@ -9588,14 +10328,14 @@ interface LuaItemPrototype {
|
|
|
9588
10328
|
* Applies to subclasses: SelectionTool
|
|
9589
10329
|
*
|
|
9590
10330
|
*/
|
|
9591
|
-
readonly reverse_selection_border_color
|
|
10331
|
+
readonly reverse_selection_border_color?: Color
|
|
9592
10332
|
|
|
9593
10333
|
/**
|
|
9594
10334
|
* @remarks
|
|
9595
10335
|
* Applies to subclasses: SelectionTool
|
|
9596
10336
|
*
|
|
9597
10337
|
*/
|
|
9598
|
-
readonly reverse_selection_cursor_box_type
|
|
10338
|
+
readonly reverse_selection_cursor_box_type?: string
|
|
9599
10339
|
|
|
9600
10340
|
/**
|
|
9601
10341
|
* Flags that affect which entities will be selected during reverse selection.
|
|
@@ -9603,7 +10343,7 @@ interface LuaItemPrototype {
|
|
|
9603
10343
|
* Applies to subclasses: SelectionTool
|
|
9604
10344
|
*
|
|
9605
10345
|
*/
|
|
9606
|
-
readonly reverse_selection_mode_flags
|
|
10346
|
+
readonly reverse_selection_mode_flags?: SelectionModeFlags
|
|
9607
10347
|
|
|
9608
10348
|
/**
|
|
9609
10349
|
* The reverse tile filter mode used by this selection tool.
|
|
@@ -9611,7 +10351,7 @@ interface LuaItemPrototype {
|
|
|
9611
10351
|
* Applies to subclasses: SelectionTool
|
|
9612
10352
|
*
|
|
9613
10353
|
*/
|
|
9614
|
-
readonly reverse_tile_filter_mode
|
|
10354
|
+
readonly reverse_tile_filter_mode?: string
|
|
9615
10355
|
|
|
9616
10356
|
/**
|
|
9617
10357
|
* The reverse tile filters used by this selection tool indexed by tile name.
|
|
@@ -9619,10 +10359,10 @@ interface LuaItemPrototype {
|
|
|
9619
10359
|
* Applies to subclasses: SelectionTool
|
|
9620
10360
|
*
|
|
9621
10361
|
*/
|
|
9622
|
-
readonly reverse_tile_filters
|
|
10362
|
+
readonly reverse_tile_filters?: {[key: string]: LuaTilePrototype}
|
|
9623
10363
|
|
|
9624
10364
|
/**
|
|
9625
|
-
* The results
|
|
10365
|
+
* The results of launching this item in a rocket.
|
|
9626
10366
|
*/
|
|
9627
10367
|
readonly rocket_launch_products: Product[]
|
|
9628
10368
|
|
|
@@ -9632,14 +10372,14 @@ interface LuaItemPrototype {
|
|
|
9632
10372
|
* Applies to subclasses: SelectionTool
|
|
9633
10373
|
*
|
|
9634
10374
|
*/
|
|
9635
|
-
readonly selection_border_color
|
|
10375
|
+
readonly selection_border_color?: Color
|
|
9636
10376
|
|
|
9637
10377
|
/**
|
|
9638
10378
|
* @remarks
|
|
9639
10379
|
* Applies to subclasses: SelectionTool
|
|
9640
10380
|
*
|
|
9641
10381
|
*/
|
|
9642
|
-
readonly selection_cursor_box_type
|
|
10382
|
+
readonly selection_cursor_box_type?: string
|
|
9643
10383
|
|
|
9644
10384
|
/**
|
|
9645
10385
|
* Flags that affect which entities will be selected.
|
|
@@ -9647,12 +10387,15 @@ interface LuaItemPrototype {
|
|
|
9647
10387
|
* Applies to subclasses: SelectionTool
|
|
9648
10388
|
*
|
|
9649
10389
|
*/
|
|
9650
|
-
readonly selection_mode_flags
|
|
10390
|
+
readonly selection_mode_flags?: SelectionModeFlags
|
|
9651
10391
|
|
|
9652
10392
|
/**
|
|
9653
|
-
* The repairing speed if this is a repairing tool
|
|
10393
|
+
* The repairing speed if this is a repairing tool.
|
|
10394
|
+
* @remarks
|
|
10395
|
+
* Applies to subclasses: RepairTool
|
|
10396
|
+
*
|
|
9654
10397
|
*/
|
|
9655
|
-
readonly speed
|
|
10398
|
+
readonly speed?: number
|
|
9656
10399
|
|
|
9657
10400
|
/**
|
|
9658
10401
|
* Maximum stack size of the item specified by this prototype.
|
|
@@ -9665,7 +10408,7 @@ interface LuaItemPrototype {
|
|
|
9665
10408
|
readonly stackable: boolean
|
|
9666
10409
|
|
|
9667
10410
|
/**
|
|
9668
|
-
* The straight rail prototype used for this rail planner prototype
|
|
10411
|
+
* The straight rail prototype used for this rail planner prototype.
|
|
9669
10412
|
* @remarks
|
|
9670
10413
|
* Applies to subclasses: RailPlanner
|
|
9671
10414
|
*
|
|
@@ -9683,7 +10426,7 @@ interface LuaItemPrototype {
|
|
|
9683
10426
|
* Applies to subclasses: ModuleItem
|
|
9684
10427
|
*
|
|
9685
10428
|
*/
|
|
9686
|
-
readonly tier
|
|
10429
|
+
readonly tier?: number
|
|
9687
10430
|
|
|
9688
10431
|
/**
|
|
9689
10432
|
* The tile filter mode used by this selection tool.
|
|
@@ -9691,10 +10434,10 @@ interface LuaItemPrototype {
|
|
|
9691
10434
|
* Applies to subclasses: SelectionTool
|
|
9692
10435
|
*
|
|
9693
10436
|
*/
|
|
9694
|
-
readonly tile_filter_mode
|
|
10437
|
+
readonly tile_filter_mode?: string
|
|
9695
10438
|
|
|
9696
10439
|
/**
|
|
9697
|
-
* The number of tile filters this deconstruction item has
|
|
10440
|
+
* The number of tile filters this deconstruction item has.
|
|
9698
10441
|
* @remarks
|
|
9699
10442
|
* Applies to subclasses: DeconstructionItem
|
|
9700
10443
|
*
|
|
@@ -9707,7 +10450,7 @@ interface LuaItemPrototype {
|
|
|
9707
10450
|
* Applies to subclasses: SelectionTool
|
|
9708
10451
|
*
|
|
9709
10452
|
*/
|
|
9710
|
-
readonly tile_filters
|
|
10453
|
+
readonly tile_filters?: {[key: string]: LuaTilePrototype}
|
|
9711
10454
|
|
|
9712
10455
|
/**
|
|
9713
10456
|
* Type of this prototype. E.g. `"gun"` or `"mining-tool"`.
|
|
@@ -9720,7 +10463,7 @@ interface LuaItemPrototype {
|
|
|
9720
10463
|
readonly valid: boolean
|
|
9721
10464
|
|
|
9722
10465
|
/**
|
|
9723
|
-
* The number of items needed to connect
|
|
10466
|
+
* The number of items needed to connect two entities with this as wire.
|
|
9724
10467
|
*/
|
|
9725
10468
|
readonly wire_count: number
|
|
9726
10469
|
|
|
@@ -10074,11 +10817,11 @@ interface LuaItemStack {
|
|
|
10074
10817
|
* @remarks
|
|
10075
10818
|
* Applies to subclasses: DeconstructionItem
|
|
10076
10819
|
*
|
|
10077
|
-
* @param filter -
|
|
10820
|
+
* @param filter - Writing `nil` removes the filter.
|
|
10078
10821
|
*/
|
|
10079
10822
|
set_entity_filter(this: void,
|
|
10080
10823
|
index: number,
|
|
10081
|
-
filter: string | LuaEntityPrototype | LuaEntity): void
|
|
10824
|
+
filter: string | LuaEntityPrototype | LuaEntity | null): void
|
|
10082
10825
|
|
|
10083
10826
|
/**
|
|
10084
10827
|
* Sets the module filter at the given index for this upgrade item.
|
|
@@ -10135,15 +10878,15 @@ interface LuaItemStack {
|
|
|
10135
10878
|
stack: ItemStackIdentification): void
|
|
10136
10879
|
|
|
10137
10880
|
/**
|
|
10138
|
-
* The active blueprint index for this blueprint book.
|
|
10881
|
+
* The active blueprint index for this blueprint book. `nil` if this blueprint book is empty.
|
|
10139
10882
|
* @remarks
|
|
10140
10883
|
* Applies to subclasses: BlueprintBookItem
|
|
10141
10884
|
*
|
|
10142
10885
|
*/
|
|
10143
|
-
active_index
|
|
10886
|
+
active_index?: number
|
|
10144
10887
|
|
|
10145
10888
|
/**
|
|
10146
|
-
*
|
|
10889
|
+
* Whether the label for this item can be manually changed. When false the label can only be changed through the API.
|
|
10147
10890
|
* @remarks
|
|
10148
10891
|
* Applies to subclasses: ItemWithLabel
|
|
10149
10892
|
*
|
|
@@ -10167,33 +10910,36 @@ interface LuaItemStack {
|
|
|
10167
10910
|
blueprint_absolute_snapping: boolean
|
|
10168
10911
|
|
|
10169
10912
|
/**
|
|
10170
|
-
* Icons of
|
|
10913
|
+
* 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.
|
|
10171
10914
|
* @remarks
|
|
10172
10915
|
* Applies to subclasses: BlueprintItem
|
|
10173
10916
|
*
|
|
10174
10917
|
*/
|
|
10175
|
-
blueprint_icons
|
|
10918
|
+
blueprint_icons?: BlueprintSignalIcon[]
|
|
10176
10919
|
|
|
10177
10920
|
/**
|
|
10178
|
-
* The offset from the absolute grid
|
|
10921
|
+
* The offset from the absolute grid. `nil` if absolute snapping is not enabled.
|
|
10179
10922
|
* @remarks
|
|
10180
10923
|
* Applies to subclasses: BlueprintItem
|
|
10181
10924
|
*
|
|
10182
10925
|
*/
|
|
10183
|
-
blueprint_position_relative_to_grid
|
|
10926
|
+
blueprint_position_relative_to_grid?: TilePosition
|
|
10184
10927
|
|
|
10185
10928
|
/**
|
|
10186
|
-
* The snapping grid size in this blueprint item
|
|
10929
|
+
* The snapping grid size in this blueprint item. `nil` if snapping is not enabled.
|
|
10187
10930
|
* @remarks
|
|
10188
10931
|
* Applies to subclasses: BlueprintItem
|
|
10189
10932
|
*
|
|
10190
10933
|
*/
|
|
10191
|
-
blueprint_snap_to_grid
|
|
10934
|
+
blueprint_snap_to_grid?: TilePosition
|
|
10192
10935
|
|
|
10193
10936
|
/**
|
|
10194
|
-
* If this item is a spidertron remote that has a spidertron bound to it, it returns the connected spider-vehicle entity
|
|
10937
|
+
* If this item is a spidertron remote that has a spidertron bound to it, it returns the connected spider-vehicle entity.
|
|
10938
|
+
* @remarks
|
|
10939
|
+
* Applies to subclasses: SpidertronRemote
|
|
10940
|
+
*
|
|
10195
10941
|
*/
|
|
10196
|
-
connected_entity
|
|
10942
|
+
connected_entity?: LuaEntity
|
|
10197
10943
|
|
|
10198
10944
|
/**
|
|
10199
10945
|
* Raw materials required to build this blueprint. Result is a dictionary mapping each item prototype name to the required count.
|
|
@@ -10224,10 +10970,10 @@ interface LuaItemStack {
|
|
|
10224
10970
|
/**
|
|
10225
10971
|
* Durability of the contained item. Automatically capped at the item's maximum durability.
|
|
10226
10972
|
* @remarks
|
|
10227
|
-
*
|
|
10973
|
+
* Applies to subclasses: Tool
|
|
10228
10974
|
*
|
|
10229
10975
|
*/
|
|
10230
|
-
durability
|
|
10976
|
+
durability?: number
|
|
10231
10977
|
|
|
10232
10978
|
/**
|
|
10233
10979
|
* The number of entity filters this deconstruction item supports.
|
|
@@ -10259,7 +11005,7 @@ interface LuaItemStack {
|
|
|
10259
11005
|
extends_inventory: boolean
|
|
10260
11006
|
|
|
10261
11007
|
/**
|
|
10262
|
-
* The equipment grid of this item
|
|
11008
|
+
* The equipment grid of this item, if any.
|
|
10263
11009
|
*/
|
|
10264
11010
|
readonly grid?: LuaEquipmentGrid
|
|
10265
11011
|
|
|
@@ -10339,7 +11085,7 @@ interface LuaItemStack {
|
|
|
10339
11085
|
readonly is_upgrade_item: boolean
|
|
10340
11086
|
|
|
10341
11087
|
/**
|
|
10342
|
-
* The unique identifier for this item
|
|
11088
|
+
* The unique identifier for this item , if any. Note that this ID stays the same no matter where the item is moved to.
|
|
10343
11089
|
*
|
|
10344
11090
|
* Only these types of items have unique IDs:
|
|
10345
11091
|
* - `"armor"`
|
|
@@ -10354,23 +11100,23 @@ interface LuaItemStack {
|
|
|
10354
11100
|
* - `"item-with-inventory"`
|
|
10355
11101
|
* - `"item-with-tags"`
|
|
10356
11102
|
*/
|
|
10357
|
-
readonly item_number
|
|
11103
|
+
readonly item_number?: number
|
|
10358
11104
|
|
|
10359
11105
|
/**
|
|
10360
|
-
* The current label for this item
|
|
11106
|
+
* The current label for this item, if any.
|
|
10361
11107
|
* @remarks
|
|
10362
11108
|
* Applies to subclasses: ItemWithLabel
|
|
10363
11109
|
*
|
|
10364
11110
|
*/
|
|
10365
|
-
label
|
|
11111
|
+
label?: string
|
|
10366
11112
|
|
|
10367
11113
|
/**
|
|
10368
|
-
* The current label color for this item
|
|
11114
|
+
* The current label color for this item, if any.
|
|
10369
11115
|
* @remarks
|
|
10370
11116
|
* Applies to subclasses: ItemWithLabel
|
|
10371
11117
|
*
|
|
10372
11118
|
*/
|
|
10373
|
-
label_color
|
|
11119
|
+
label_color?: Color
|
|
10374
11120
|
|
|
10375
11121
|
/**
|
|
10376
11122
|
* Prototype name of the item held in this stack.
|
|
@@ -10466,7 +11212,7 @@ interface LuaLampControlBehavior extends LuaGenericOnOffControlBehavior {
|
|
|
10466
11212
|
help(this: void): void
|
|
10467
11213
|
|
|
10468
11214
|
/**
|
|
10469
|
-
* The color the lamp is showing
|
|
11215
|
+
* The color the lamp is showing, if any.
|
|
10470
11216
|
*/
|
|
10471
11217
|
readonly color?: Color
|
|
10472
11218
|
|
|
@@ -10563,7 +11309,7 @@ interface LuaLogisticCell {
|
|
|
10563
11309
|
readonly construction_radius: number
|
|
10564
11310
|
|
|
10565
11311
|
/**
|
|
10566
|
-
* The network that owns this cell
|
|
11312
|
+
* The network that owns this cell, if any.
|
|
10567
11313
|
*/
|
|
10568
11314
|
readonly logistic_network?: LuaLogisticNetwork
|
|
10569
11315
|
|
|
@@ -10659,6 +11405,17 @@ interface LuaLogisticContainerControlBehavior extends LuaControlBehavior {
|
|
|
10659
11405
|
* A single logistic network of a given force on a given surface.
|
|
10660
11406
|
*/
|
|
10661
11407
|
interface LuaLogisticNetwork {
|
|
11408
|
+
/**
|
|
11409
|
+
* Can the network satisfy a request for a given item and count.
|
|
11410
|
+
* @param count - Count to check. Defaults to 1.
|
|
11411
|
+
* @param include_buffers - Should buffers be considered? Defaults to false.
|
|
11412
|
+
* @param item - Item name to check.
|
|
11413
|
+
*/
|
|
11414
|
+
can_satisfy_request(this: void,
|
|
11415
|
+
item: string,
|
|
11416
|
+
count?: number,
|
|
11417
|
+
include_buffers?: boolean): void
|
|
11418
|
+
|
|
10662
11419
|
/**
|
|
10663
11420
|
* Find logistic cell closest to a given position.
|
|
10664
11421
|
*/
|
|
@@ -10679,6 +11436,20 @@ interface LuaLogisticNetwork {
|
|
|
10679
11436
|
item?: string,
|
|
10680
11437
|
member?: string): void
|
|
10681
11438
|
|
|
11439
|
+
/**
|
|
11440
|
+
* Get the amount of items of the given type indexed by the storage member.
|
|
11441
|
+
* @param item - Item name to check.
|
|
11442
|
+
*/
|
|
11443
|
+
get_supply_counts(this: void,
|
|
11444
|
+
item: string): void
|
|
11445
|
+
|
|
11446
|
+
/**
|
|
11447
|
+
* Gets the logistic points with of the given type indexed by the storage member.
|
|
11448
|
+
* @param item - Item name to check.
|
|
11449
|
+
*/
|
|
11450
|
+
get_supply_points(this: void,
|
|
11451
|
+
item: string): void
|
|
11452
|
+
|
|
10682
11453
|
/**
|
|
10683
11454
|
* All methods and properties that this object supports.
|
|
10684
11455
|
*/
|
|
@@ -10860,7 +11631,7 @@ interface LuaLogisticPoint {
|
|
|
10860
11631
|
readonly exact: boolean
|
|
10861
11632
|
|
|
10862
11633
|
/**
|
|
10863
|
-
* The logistic filters for this logistic point
|
|
11634
|
+
* The logistic filters for this logistic point, if this uses any.
|
|
10864
11635
|
* @remarks
|
|
10865
11636
|
* The returned array will always have an entry for each filter and will be indexed in sequence when not nil.
|
|
10866
11637
|
*
|
|
@@ -10965,17 +11736,17 @@ interface LuaModSettingPrototype {
|
|
|
10965
11736
|
help(this: void): void
|
|
10966
11737
|
|
|
10967
11738
|
/**
|
|
10968
|
-
*
|
|
11739
|
+
* Whether this string setting allows blank values. `nil` if not a string setting.
|
|
10969
11740
|
*/
|
|
10970
11741
|
readonly allow_blank?: boolean
|
|
10971
11742
|
|
|
10972
11743
|
/**
|
|
10973
|
-
* The allowed values for this setting
|
|
11744
|
+
* The allowed values for this setting. `nil` if this setting doesn't use the a fixed set of values.
|
|
10974
11745
|
*/
|
|
10975
11746
|
readonly allowed_values?: string[] | number[]
|
|
10976
11747
|
|
|
10977
11748
|
/**
|
|
10978
|
-
*
|
|
11749
|
+
* Whether this string setting auto-trims values. `nil` if not a string setting
|
|
10979
11750
|
*/
|
|
10980
11751
|
readonly auto_trim?: boolean
|
|
10981
11752
|
|
|
@@ -10985,7 +11756,7 @@ interface LuaModSettingPrototype {
|
|
|
10985
11756
|
readonly default_value: boolean | number | string
|
|
10986
11757
|
|
|
10987
11758
|
/**
|
|
10988
|
-
*
|
|
11759
|
+
* Whether this setting is hidden from the GUI.
|
|
10989
11760
|
*/
|
|
10990
11761
|
readonly hidden: boolean
|
|
10991
11762
|
|
|
@@ -10994,12 +11765,12 @@ interface LuaModSettingPrototype {
|
|
|
10994
11765
|
readonly localised_name: LocalisedString
|
|
10995
11766
|
|
|
10996
11767
|
/**
|
|
10997
|
-
* The maximum value for this setting
|
|
11768
|
+
* The maximum value for this setting. `nil` if this setting type doesn't support a maximum.
|
|
10998
11769
|
*/
|
|
10999
11770
|
readonly maximum_value?: number
|
|
11000
11771
|
|
|
11001
11772
|
/**
|
|
11002
|
-
* The minimum value for this setting
|
|
11773
|
+
* The minimum value for this setting. `nil` if this setting type doesn't support a minimum.
|
|
11003
11774
|
*/
|
|
11004
11775
|
readonly minimum_value?: number
|
|
11005
11776
|
|
|
@@ -11705,7 +12476,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
11705
12476
|
remove_alert(this: void,
|
|
11706
12477
|
table: {
|
|
11707
12478
|
entity?: LuaEntity,
|
|
11708
|
-
prototype?: LuaEntityPrototype,
|
|
12479
|
+
prototype?: LuaEntityPrototype | string,
|
|
11709
12480
|
position?: MapPosition,
|
|
11710
12481
|
type?: defines.alert_type,
|
|
11711
12482
|
surface?: SurfaceIdentification,
|
|
@@ -11876,10 +12647,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
11876
12647
|
readonly blueprint_to_setup: LuaItemStack
|
|
11877
12648
|
|
|
11878
12649
|
/**
|
|
11879
|
-
* The character attached to this player,
|
|
11880
|
-
* @remarks
|
|
11881
|
-
* Will also return `nil` when the player is disconnected (see {@link LuaPlayer::connected | LuaPlayer::connected}).
|
|
11882
|
-
*
|
|
12650
|
+
* The character attached to this player, if any. Returns `nil` when the player is disconnected (see {@link LuaPlayer::connected | LuaPlayer::connected}).
|
|
11883
12651
|
*/
|
|
11884
12652
|
character?: LuaEntity
|
|
11885
12653
|
|
|
@@ -11901,12 +12669,9 @@ interface LuaPlayer extends LuaControl {
|
|
|
11901
12669
|
readonly controller_type: defines.controllers
|
|
11902
12670
|
|
|
11903
12671
|
/**
|
|
11904
|
-
* When in a cutscene; the character this player would be using once the cutscene is over.
|
|
11905
|
-
* @remarks
|
|
11906
|
-
* Will also return `nil` when the player is disconnected (see {@link LuaPlayer::connected | LuaPlayer::connected}).
|
|
11907
|
-
*
|
|
12672
|
+
* 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}).
|
|
11908
12673
|
*/
|
|
11909
|
-
readonly cutscene_character
|
|
12674
|
+
readonly cutscene_character?: LuaEntity
|
|
11910
12675
|
|
|
11911
12676
|
/**
|
|
11912
12677
|
* The display resolution for this player.
|
|
@@ -11925,11 +12690,9 @@ interface LuaPlayer extends LuaControl {
|
|
|
11925
12690
|
readonly display_scale: number
|
|
11926
12691
|
|
|
11927
12692
|
/**
|
|
11928
|
-
* The source entity used during entity settings copy-paste if any.
|
|
11929
|
-
*
|
|
11930
|
-
* `nil` if there isn't currently a source entity.
|
|
12693
|
+
* The source entity used during entity settings copy-paste, if any.
|
|
11931
12694
|
*/
|
|
11932
|
-
readonly entity_copy_source
|
|
12695
|
+
readonly entity_copy_source?: LuaEntity
|
|
11933
12696
|
|
|
11934
12697
|
/**
|
|
11935
12698
|
* The player's game view settings.
|
|
@@ -11939,9 +12702,9 @@ interface LuaPlayer extends LuaControl {
|
|
|
11939
12702
|
readonly gui: LuaGui
|
|
11940
12703
|
|
|
11941
12704
|
/**
|
|
11942
|
-
* 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.
|
|
12705
|
+
* 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.
|
|
11943
12706
|
*/
|
|
11944
|
-
hand_location
|
|
12707
|
+
hand_location?: ItemStackLocation
|
|
11945
12708
|
|
|
11946
12709
|
/**
|
|
11947
12710
|
* 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}.
|
|
@@ -11969,7 +12732,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
11969
12732
|
minimap_enabled: boolean
|
|
11970
12733
|
|
|
11971
12734
|
/**
|
|
11972
|
-
*
|
|
12735
|
+
* 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}.
|
|
11973
12736
|
* @remarks
|
|
11974
12737
|
* This table will become invalid if its associated player does.
|
|
11975
12738
|
*
|
|
@@ -11997,7 +12760,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
11997
12760
|
readonly opened_self: boolean
|
|
11998
12761
|
|
|
11999
12762
|
/**
|
|
12000
|
-
* The permission group this player is part of
|
|
12763
|
+
* The permission group this player is part of, if any.
|
|
12001
12764
|
*/
|
|
12002
12765
|
permission_group?: LuaPermissionGroup
|
|
12003
12766
|
|
|
@@ -12022,7 +12785,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
12022
12785
|
spectator: boolean
|
|
12023
12786
|
|
|
12024
12787
|
/**
|
|
12025
|
-
* The stashed controller type
|
|
12788
|
+
* The stashed controller type, if any.
|
|
12026
12789
|
* @remarks
|
|
12027
12790
|
* This is mainly useful when a player is in the map editor.
|
|
12028
12791
|
*
|
|
@@ -12035,9 +12798,10 @@ interface LuaPlayer extends LuaControl {
|
|
|
12035
12798
|
tag: string
|
|
12036
12799
|
|
|
12037
12800
|
/**
|
|
12038
|
-
* The number of ticks until this player will respawn
|
|
12039
|
-
*
|
|
12801
|
+
* The number of ticks until this player will respawn. `nil` if this player is not waiting to respawn.
|
|
12802
|
+
*
|
|
12040
12803
|
* Set to `nil` to immediately respawn the player.
|
|
12804
|
+
* @remarks
|
|
12041
12805
|
* Set to any positive value to trigger the respawn state for this player.
|
|
12042
12806
|
*
|
|
12043
12807
|
*/
|
|
@@ -12556,9 +13320,9 @@ interface LuaRecipePrototype {
|
|
|
12556
13320
|
readonly localised_name: LocalisedString
|
|
12557
13321
|
|
|
12558
13322
|
/**
|
|
12559
|
-
* The main product of this recipe,
|
|
13323
|
+
* The main product of this recipe, if any.
|
|
12560
13324
|
*/
|
|
12561
|
-
readonly main_product
|
|
13325
|
+
readonly main_product?: Product
|
|
12562
13326
|
|
|
12563
13327
|
/**
|
|
12564
13328
|
* 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.
|
|
@@ -13996,9 +14760,15 @@ interface LuaShortcutPrototype {
|
|
|
13996
14760
|
|
|
13997
14761
|
readonly action: string
|
|
13998
14762
|
|
|
13999
|
-
|
|
14763
|
+
/**
|
|
14764
|
+
* The control input that is associated with this shortcut, if any.
|
|
14765
|
+
*/
|
|
14766
|
+
readonly associated_control_input?: string
|
|
14000
14767
|
|
|
14001
|
-
|
|
14768
|
+
/**
|
|
14769
|
+
* The item to create when this shortcut is used, if any.
|
|
14770
|
+
*/
|
|
14771
|
+
readonly item_to_spawn?: LuaItemPrototype
|
|
14002
14772
|
|
|
14003
14773
|
readonly localised_description: LocalisedString
|
|
14004
14774
|
|
|
@@ -14019,7 +14789,10 @@ interface LuaShortcutPrototype {
|
|
|
14019
14789
|
*/
|
|
14020
14790
|
readonly order: string
|
|
14021
14791
|
|
|
14022
|
-
|
|
14792
|
+
/**
|
|
14793
|
+
* The technology to unlock when this shortcut is used, if any.
|
|
14794
|
+
*/
|
|
14795
|
+
readonly technology_to_unlock?: LuaTechnologyPrototype
|
|
14023
14796
|
|
|
14024
14797
|
readonly toggleable: boolean
|
|
14025
14798
|
|
|
@@ -14234,9 +15007,9 @@ interface LuaStyle {
|
|
|
14234
15007
|
height: number
|
|
14235
15008
|
|
|
14236
15009
|
/**
|
|
14237
|
-
* Horizontal align of the inner content of the widget,
|
|
15010
|
+
* Horizontal align of the inner content of the widget, if any. Possible values are "left", "center" or "right".
|
|
14238
15011
|
*/
|
|
14239
|
-
horizontal_align
|
|
15012
|
+
horizontal_align?: string
|
|
14240
15013
|
|
|
14241
15014
|
/**
|
|
14242
15015
|
* Horizontal space between individual cells.
|
|
@@ -14247,14 +15020,14 @@ interface LuaStyle {
|
|
|
14247
15020
|
horizontal_spacing: number
|
|
14248
15021
|
|
|
14249
15022
|
/**
|
|
14250
|
-
*
|
|
15023
|
+
* 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.
|
|
14251
15024
|
*/
|
|
14252
|
-
horizontally_squashable
|
|
15025
|
+
horizontally_squashable?: boolean
|
|
14253
15026
|
|
|
14254
15027
|
/**
|
|
14255
|
-
*
|
|
15028
|
+
* Whether the GUI element stretches its size horizontally to other elements. `nil` if this element does not support stretching.
|
|
14256
15029
|
*/
|
|
14257
|
-
horizontally_stretchable
|
|
15030
|
+
horizontally_stretchable?: boolean
|
|
14258
15031
|
|
|
14259
15032
|
/**
|
|
14260
15033
|
* @remarks
|
|
@@ -14431,9 +15204,9 @@ interface LuaStyle {
|
|
|
14431
15204
|
readonly valid: boolean
|
|
14432
15205
|
|
|
14433
15206
|
/**
|
|
14434
|
-
* Vertical align of the inner content of the widget,
|
|
15207
|
+
* Vertical align of the inner content of the widget, if any. Possible values are "top", "center" or "bottom".
|
|
14435
15208
|
*/
|
|
14436
|
-
vertical_align
|
|
15209
|
+
vertical_align?: string
|
|
14437
15210
|
|
|
14438
15211
|
/**
|
|
14439
15212
|
* Vertical space between individual cells.
|
|
@@ -14444,14 +15217,14 @@ interface LuaStyle {
|
|
|
14444
15217
|
vertical_spacing: number
|
|
14445
15218
|
|
|
14446
15219
|
/**
|
|
14447
|
-
*
|
|
15220
|
+
* 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.
|
|
14448
15221
|
*/
|
|
14449
|
-
vertically_squashable
|
|
15222
|
+
vertically_squashable?: boolean
|
|
14450
15223
|
|
|
14451
15224
|
/**
|
|
14452
|
-
*
|
|
15225
|
+
* Whether the GUI element stretches its size vertically to other elements. `nil` if this element does not support stretching.
|
|
14453
15226
|
*/
|
|
14454
|
-
vertically_stretchable
|
|
15227
|
+
vertically_stretchable?: boolean
|
|
14455
15228
|
|
|
14456
15229
|
/**
|
|
14457
15230
|
* Sets both minimal and maximal width to the given value.
|
|
@@ -15355,7 +16128,7 @@ interface LuaSurface {
|
|
|
15355
16128
|
* @param table.entity_to_ignore - Makes the pathfinder ignore collisions with this entity if it is given.
|
|
15356
16129
|
* @param table.force - The force for which to generate the path, determining which gates can be opened for example.
|
|
15357
16130
|
* @param table.goal - The position to find a path to.
|
|
15358
|
-
* @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`.
|
|
16131
|
+
* @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`.
|
|
15359
16132
|
* @param table.pathfind_flags - Flags that affect pathfinder behavior.
|
|
15360
16133
|
* @param table.radius - How close the pathfinder needs to get to its `goal` (in tiles). Defaults to `1`.
|
|
15361
16134
|
* @param table.start - The position from which to start pathfinding.
|
|
@@ -15677,9 +16450,9 @@ interface LuaTechnology {
|
|
|
15677
16450
|
readonly research_unit_count: number
|
|
15678
16451
|
|
|
15679
16452
|
/**
|
|
15680
|
-
* The count formula used for this infinite research
|
|
16453
|
+
* The count formula used for this infinite research. `nil` if this research isn't infinite.
|
|
15681
16454
|
*/
|
|
15682
|
-
readonly research_unit_count_formula
|
|
16455
|
+
readonly research_unit_count_formula?: string
|
|
15683
16456
|
|
|
15684
16457
|
/**
|
|
15685
16458
|
* Amount of energy required to finish a unit of research.
|
|
@@ -15791,9 +16564,9 @@ interface LuaTechnologyPrototype {
|
|
|
15791
16564
|
readonly research_unit_count: number
|
|
15792
16565
|
|
|
15793
16566
|
/**
|
|
15794
|
-
* The count formula used for this infinite research
|
|
16567
|
+
* The count formula used for this infinite research. `nil` if this research isn't infinite.
|
|
15795
16568
|
*/
|
|
15796
|
-
readonly research_unit_count_formula
|
|
16569
|
+
readonly research_unit_count_formula?: string
|
|
15797
16570
|
|
|
15798
16571
|
/**
|
|
15799
16572
|
* Amount of energy required to finish a unit of research.
|
|
@@ -15883,7 +16656,7 @@ interface LuaTile {
|
|
|
15883
16656
|
force?: ForceIdentification): void
|
|
15884
16657
|
|
|
15885
16658
|
/**
|
|
15886
|
-
* The name of the {@link LuaTilePrototype | LuaTilePrototype} hidden under this tile
|
|
16659
|
+
* 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}.
|
|
15887
16660
|
*/
|
|
15888
16661
|
readonly hidden_tile?: string
|
|
15889
16662
|
|
|
@@ -15930,9 +16703,9 @@ interface LuaTilePrototype {
|
|
|
15930
16703
|
readonly automatic_neighbors: boolean
|
|
15931
16704
|
|
|
15932
16705
|
/**
|
|
15933
|
-
* Autoplace specification for this prototype
|
|
16706
|
+
* Autoplace specification for this prototype, if any.
|
|
15934
16707
|
*/
|
|
15935
|
-
readonly autoplace_specification
|
|
16708
|
+
readonly autoplace_specification?: AutoplaceSpecification
|
|
15936
16709
|
|
|
15937
16710
|
/**
|
|
15938
16711
|
* False if this tile is not allowed in blueprints regardless of the ability to build it.
|
|
@@ -15974,7 +16747,28 @@ interface LuaTilePrototype {
|
|
|
15974
16747
|
|
|
15975
16748
|
readonly map_color: Color
|
|
15976
16749
|
|
|
15977
|
-
readonly mineable_properties: {
|
|
16750
|
+
readonly mineable_properties: {
|
|
16751
|
+
|
|
16752
|
+
/**
|
|
16753
|
+
* Is this tile mineable at all?
|
|
16754
|
+
*/
|
|
16755
|
+
minable: boolean,
|
|
16756
|
+
|
|
16757
|
+
/**
|
|
16758
|
+
* Prototype name of the particle produced when mining this tile. Will only be present if this tile produces any particle during mining.
|
|
16759
|
+
*/
|
|
16760
|
+
mining_particle?: string,
|
|
16761
|
+
|
|
16762
|
+
/**
|
|
16763
|
+
* Energy required to mine a tile.
|
|
16764
|
+
*/
|
|
16765
|
+
mining_time: number,
|
|
16766
|
+
|
|
16767
|
+
/**
|
|
16768
|
+
* Products obtained by mining this tile.
|
|
16769
|
+
*/
|
|
16770
|
+
products: Product[]
|
|
16771
|
+
}
|
|
15978
16772
|
|
|
15979
16773
|
/**
|
|
15980
16774
|
* Name of this prototype.
|
|
@@ -15987,7 +16781,7 @@ interface LuaTilePrototype {
|
|
|
15987
16781
|
readonly needs_correction: boolean
|
|
15988
16782
|
|
|
15989
16783
|
/**
|
|
15990
|
-
* The next direction of this tile
|
|
16784
|
+
* The next direction of this tile, if any. Used when a tile has multiple directions (such as hazard concrete)
|
|
15991
16785
|
*/
|
|
15992
16786
|
readonly next_direction?: LuaTilePrototype
|
|
15993
16787
|
|
|
@@ -16099,12 +16893,12 @@ interface LuaTrain {
|
|
|
16099
16893
|
stack: ItemStackIdentification): void
|
|
16100
16894
|
|
|
16101
16895
|
/**
|
|
16102
|
-
* The rail at the back end of the train,
|
|
16896
|
+
* The rail at the back end of the train, if any.
|
|
16103
16897
|
*/
|
|
16104
|
-
readonly back_rail
|
|
16898
|
+
readonly back_rail?: LuaEntity
|
|
16105
16899
|
|
|
16106
16900
|
/**
|
|
16107
|
-
* The back stock of this train,
|
|
16901
|
+
* 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}.
|
|
16108
16902
|
*/
|
|
16109
16903
|
readonly back_stock?: LuaEntity
|
|
16110
16904
|
|
|
@@ -16124,12 +16918,12 @@ interface LuaTrain {
|
|
|
16124
16918
|
readonly fluid_wagons: LuaEntity[]
|
|
16125
16919
|
|
|
16126
16920
|
/**
|
|
16127
|
-
* The rail at the front end of the train,
|
|
16921
|
+
* The rail at the front end of the train, if any.
|
|
16128
16922
|
*/
|
|
16129
|
-
readonly front_rail
|
|
16923
|
+
readonly front_rail?: LuaEntity
|
|
16130
16924
|
|
|
16131
16925
|
/**
|
|
16132
|
-
* The front stock of this train,
|
|
16926
|
+
* 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.
|
|
16133
16927
|
*/
|
|
16134
16928
|
readonly front_stock?: LuaEntity
|
|
16135
16929
|
|
|
@@ -16189,17 +16983,17 @@ interface LuaTrain {
|
|
|
16189
16983
|
readonly passengers: LuaPlayer[]
|
|
16190
16984
|
|
|
16191
16985
|
/**
|
|
16192
|
-
* The path this train is using
|
|
16986
|
+
* The path this train is using, if any.
|
|
16193
16987
|
*/
|
|
16194
16988
|
readonly path?: LuaRailPath
|
|
16195
16989
|
|
|
16196
16990
|
/**
|
|
16197
|
-
* The destination rail this train is currently pathing to
|
|
16991
|
+
* The destination rail this train is currently pathing to, if any.
|
|
16198
16992
|
*/
|
|
16199
16993
|
readonly path_end_rail?: LuaEntity
|
|
16200
16994
|
|
|
16201
16995
|
/**
|
|
16202
|
-
* The destination train stop this train is currently pathing to
|
|
16996
|
+
* The destination train stop this train is currently pathing to, if any.
|
|
16203
16997
|
*/
|
|
16204
16998
|
readonly path_end_stop?: LuaEntity
|
|
16205
16999
|
|
|
@@ -16213,7 +17007,7 @@ interface LuaTrain {
|
|
|
16213
17007
|
readonly riding_state: RidingState
|
|
16214
17008
|
|
|
16215
17009
|
/**
|
|
16216
|
-
*
|
|
17010
|
+
* This train's current schedule, if any. Set to `nil` to clear.
|
|
16217
17011
|
* @remarks
|
|
16218
17012
|
* The schedule can't be changed by modifying the returned table. Instead, changes must be made by assigning a new table to this attribute.
|
|
16219
17013
|
*
|
|
@@ -16221,7 +17015,7 @@ interface LuaTrain {
|
|
|
16221
17015
|
schedule?: TrainSchedule
|
|
16222
17016
|
|
|
16223
17017
|
/**
|
|
16224
|
-
* The signal this train is arriving or waiting at
|
|
17018
|
+
* The signal this train is arriving or waiting at, if any.
|
|
16225
17019
|
*/
|
|
16226
17020
|
readonly signal?: LuaEntity
|
|
16227
17021
|
|
|
@@ -16239,7 +17033,7 @@ interface LuaTrain {
|
|
|
16239
17033
|
readonly state: defines.train_state
|
|
16240
17034
|
|
|
16241
17035
|
/**
|
|
16242
|
-
* The train stop this train is stopped at
|
|
17036
|
+
* The train stop this train is stopped at, if any.
|
|
16243
17037
|
*/
|
|
16244
17038
|
readonly station?: LuaEntity
|
|
16245
17039
|
|
|
@@ -16575,12 +17369,12 @@ interface LuaUnitGroup {
|
|
|
16575
17369
|
start_moving(this: void): void
|
|
16576
17370
|
|
|
16577
17371
|
/**
|
|
16578
|
-
* The command given to this group
|
|
17372
|
+
* The command given to this group, if any.
|
|
16579
17373
|
*/
|
|
16580
17374
|
readonly command?: Command
|
|
16581
17375
|
|
|
16582
17376
|
/**
|
|
16583
|
-
* The distraction command given to this group
|
|
17377
|
+
* The distraction command given to this group, if any.
|
|
16584
17378
|
*/
|
|
16585
17379
|
readonly distraction_command?: Command
|
|
16586
17380
|
|
|
@@ -16941,7 +17735,7 @@ interface LuaGuiElementAddParamsChooseElemButton extends LuaGuiElementAddParams
|
|
|
16941
17735
|
/**
|
|
16942
17736
|
* Filters describing what to show in the selection window. The applicable filter depends on the `elem_type`.
|
|
16943
17737
|
*/
|
|
16944
|
-
'elem_filters'?: ItemPrototypeFilter | TilePrototypeFilter | EntityPrototypeFilter | FluidPrototypeFilter | RecipePrototypeFilter | DecorativePrototypeFilter | AchievementPrototypeFilter | EquipmentPrototypeFilter | TechnologyPrototypeFilter
|
|
17738
|
+
'elem_filters'?: ItemPrototypeFilter | TilePrototypeFilter | EntityPrototypeFilter | FluidPrototypeFilter | RecipePrototypeFilter | DecorativePrototypeFilter | AchievementPrototypeFilter | EquipmentPrototypeFilter | TechnologyPrototypeFilter
|
|
16945
17739
|
|
|
16946
17740
|
/**
|
|
16947
17741
|
* The type of the button - one of the following values.
|