factorio-types 1.2.57 → 1.2.59
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 +1850 -448
- package/dist/concepts.d.ts +1992 -201
- package/dist/datacollection.d.ts +4 -1
- package/dist/defines.d.ts +766 -723
- package/dist/events.d.ts +584 -443
- package/dist/global.d.ts +1 -1
- package/dist/prototypes.d.ts +1162 -167
- package/dist/types.d.ts +1555 -249
- package/package.json +2 -2
package/dist/classes.d.ts
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
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 2.
|
|
5
|
+
// Factorio version 2.1.7
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
9
9
|
/**
|
|
10
|
-
* Collection of settings for overriding default
|
|
10
|
+
* Collection of settings for overriding default AI behavior.
|
|
11
11
|
*/
|
|
12
12
|
interface LuaAISettings {
|
|
13
13
|
/**
|
|
@@ -162,10 +162,14 @@ interface LuaActiveTriggerPrototype extends LuaPrototypeBase {
|
|
|
162
162
|
* Control behavior for agricultural tower
|
|
163
163
|
*/
|
|
164
164
|
interface LuaAgriculturalTowerControlBehavior extends LuaGenericOnOffControlBehavior {
|
|
165
|
+
enable_harvesting_condition: boolean;
|
|
166
|
+
enable_planting_condition: boolean;
|
|
167
|
+
harvesting_condition: CircuitConditionDefinition;
|
|
165
168
|
/**
|
|
166
169
|
* 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.
|
|
167
170
|
*/
|
|
168
171
|
readonly object_name: string;
|
|
172
|
+
planting_condition: CircuitConditionDefinition;
|
|
169
173
|
/**
|
|
170
174
|
* `true` if the agricultural tower reads seeds and harvested plants.
|
|
171
175
|
*/
|
|
@@ -270,16 +274,14 @@ interface LuaAssemblingMachineControlBehavior extends LuaGenericOnOffControlBeha
|
|
|
270
274
|
circuit_recipe_finished_signal?: SignalID;
|
|
271
275
|
/**
|
|
272
276
|
* `true` if the assembling machine sets its recipe from the circuit network.
|
|
277
|
+
*
|
|
278
|
+
* See {@link Circuit Recipe Selection | auxiliary:circuit-recipe-selection} for how that recipe is chosen.
|
|
273
279
|
*/
|
|
274
280
|
circuit_set_recipe: boolean;
|
|
275
281
|
/**
|
|
276
282
|
* The signal sent when the assembling machine is working.
|
|
277
283
|
*/
|
|
278
284
|
circuit_working_signal?: SignalID;
|
|
279
|
-
/**
|
|
280
|
-
* `true` if the read contents should include fuel (content of energy source)
|
|
281
|
-
*/
|
|
282
|
-
include_fuel: boolean;
|
|
283
285
|
/**
|
|
284
286
|
* `true` if the read contents should include items in crafting.
|
|
285
287
|
*/
|
|
@@ -288,6 +290,10 @@ interface LuaAssemblingMachineControlBehavior extends LuaGenericOnOffControlBeha
|
|
|
288
290
|
* 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.
|
|
289
291
|
*/
|
|
290
292
|
readonly object_name: string;
|
|
293
|
+
/**
|
|
294
|
+
* `true` if the fuel (content of energy source) should be read.
|
|
295
|
+
*/
|
|
296
|
+
read_fuel: boolean;
|
|
291
297
|
/**
|
|
292
298
|
* 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.
|
|
293
299
|
*/
|
|
@@ -358,6 +364,23 @@ interface LuaAutoplaceControlPrototype extends LuaPrototypeBase {
|
|
|
358
364
|
*/
|
|
359
365
|
readonly valid: boolean;
|
|
360
366
|
}
|
|
367
|
+
/**
|
|
368
|
+
* Control behavior for boiler.
|
|
369
|
+
*/
|
|
370
|
+
interface LuaBoilerControlBehavior extends LuaGenericOnOffControlBehavior {
|
|
371
|
+
/**
|
|
372
|
+
* 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.
|
|
373
|
+
*/
|
|
374
|
+
readonly object_name: string;
|
|
375
|
+
/**
|
|
376
|
+
* `true` if the content of energy source is being read
|
|
377
|
+
*/
|
|
378
|
+
read_fuel: boolean;
|
|
379
|
+
/**
|
|
380
|
+
* 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.
|
|
381
|
+
*/
|
|
382
|
+
readonly valid: boolean;
|
|
383
|
+
}
|
|
361
384
|
/**
|
|
362
385
|
* Entry point for registering event handlers. It is accessible through the global object named `script`.
|
|
363
386
|
*/
|
|
@@ -387,12 +410,16 @@ interface LuaBootstrap {
|
|
|
387
410
|
* Gets the mod event order as a string.
|
|
388
411
|
*/
|
|
389
412
|
get_event_order(this: void): string;
|
|
413
|
+
/**
|
|
414
|
+
* Creates new empty instance of LuaNotificationQueue
|
|
415
|
+
*/
|
|
416
|
+
new_notification_queue(this: void): LuaNotificationQueue;
|
|
390
417
|
/**
|
|
391
418
|
* Register a function to be run when mod configuration changes.
|
|
392
419
|
*
|
|
393
|
-
* This is called when the game version or any mod version changed, when any mod was added or removed, when a startup setting has changed, when any prototypes have been added or removed, or when a migration was applied. It allows the mod to make any changes it deems appropriate to both the data structures in its {@link storage |
|
|
420
|
+
* This is called when the game version or any mod version changed, when any mod was added or removed, when a startup setting has changed, when any prototypes have been added or removed, or when a migration was applied. It allows the mod to make any changes it deems appropriate to both the data structures in its {@link storage | auxiliary:storage} table or to the game state through {@link LuaGameScript | runtime:LuaGameScript}.
|
|
394
421
|
*
|
|
395
|
-
* For more context, refer to the {@link Data Lifecycle |
|
|
422
|
+
* For more context, refer to the {@link Data Lifecycle | auxiliary:data-lifecycle} page.
|
|
396
423
|
* @param handler The handler for this event. Passing `nil` will unregister it.
|
|
397
424
|
*/
|
|
398
425
|
on_configuration_changed(this: void, handler: ((this: void, arg0: ConfigurationChangedData) => any) | nil): void;
|
|
@@ -483,6 +510,24 @@ interface LuaBootstrap {
|
|
|
483
510
|
script.on_event(defines.events.on_built_entity,
|
|
484
511
|
function(event) game.print("Gotta go fast!") end,
|
|
485
512
|
{{filter = "name", name = "fast-inserter"}})
|
|
513
|
+
```
|
|
514
|
+
*/
|
|
515
|
+
on_event(this: void, event: defines.events.on_blueprint_settings_pasted, handler: ((this: void, arg0: runtime.on_blueprint_settings_pasted) => any) | nil, filters?: EventFilter): void;
|
|
516
|
+
/**
|
|
517
|
+
* 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.
|
|
518
|
+
* @param event The event(s) or custom-input to invoke the handler on.
|
|
519
|
+
* @param handler The handler for this event. Passing `nil` will unregister it.
|
|
520
|
+
* @param filters The filters for this event. Can only be used when registering for individual events.
|
|
521
|
+
* @example ```
|
|
522
|
+
-- Register for the on_tick event to print the current tick to console each tick
|
|
523
|
+
script.on_event(defines.events.on_tick,
|
|
524
|
+
function(event) game.print(event.tick) end)
|
|
525
|
+
```
|
|
526
|
+
* @example ```
|
|
527
|
+
-- Register for the on_built_entity event, limiting it to only be received when a `"fast-inserter"` is built
|
|
528
|
+
script.on_event(defines.events.on_built_entity,
|
|
529
|
+
function(event) game.print("Gotta go fast!") end,
|
|
530
|
+
{{filter = "name", name = "fast-inserter"}})
|
|
486
531
|
```
|
|
487
532
|
*/
|
|
488
533
|
on_event(this: void, event: defines.events.on_brush_cloned, handler: ((this: void, arg0: runtime.on_brush_cloned) => any) | nil, filters?: EventFilter): void;
|
|
@@ -1311,6 +1356,24 @@ interface LuaBootstrap {
|
|
|
1311
1356
|
script.on_event(defines.events.on_built_entity,
|
|
1312
1357
|
function(event) game.print("Gotta go fast!") end,
|
|
1313
1358
|
{{filter = "name", name = "fast-inserter"}})
|
|
1359
|
+
```
|
|
1360
|
+
*/
|
|
1361
|
+
on_event(this: void, event: defines.events.on_gui_inventory_action, handler: ((this: void, arg0: runtime.on_gui_inventory_action) => any) | nil, filters?: EventFilter): void;
|
|
1362
|
+
/**
|
|
1363
|
+
* 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.
|
|
1364
|
+
* @param event The event(s) or custom-input to invoke the handler on.
|
|
1365
|
+
* @param handler The handler for this event. Passing `nil` will unregister it.
|
|
1366
|
+
* @param filters The filters for this event. Can only be used when registering for individual events.
|
|
1367
|
+
* @example ```
|
|
1368
|
+
-- Register for the on_tick event to print the current tick to console each tick
|
|
1369
|
+
script.on_event(defines.events.on_tick,
|
|
1370
|
+
function(event) game.print(event.tick) end)
|
|
1371
|
+
```
|
|
1372
|
+
* @example ```
|
|
1373
|
+
-- Register for the on_built_entity event, limiting it to only be received when a `"fast-inserter"` is built
|
|
1374
|
+
script.on_event(defines.events.on_built_entity,
|
|
1375
|
+
function(event) game.print("Gotta go fast!") end,
|
|
1376
|
+
{{filter = "name", name = "fast-inserter"}})
|
|
1314
1377
|
```
|
|
1315
1378
|
*/
|
|
1316
1379
|
on_event(this: void, event: defines.events.on_gui_leave, handler: ((this: void, arg0: runtime.on_gui_leave) => any) | nil, filters?: EventFilter): void;
|
|
@@ -1923,6 +1986,24 @@ interface LuaBootstrap {
|
|
|
1923
1986
|
script.on_event(defines.events.on_built_entity,
|
|
1924
1987
|
function(event) game.print("Gotta go fast!") end,
|
|
1925
1988
|
{{filter = "name", name = "fast-inserter"}})
|
|
1989
|
+
```
|
|
1990
|
+
*/
|
|
1991
|
+
on_event(this: void, event: defines.events.on_player_color_changed, handler: ((this: void, arg0: runtime.on_player_color_changed) => any) | nil, filters?: EventFilter): void;
|
|
1992
|
+
/**
|
|
1993
|
+
* 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.
|
|
1994
|
+
* @param event The event(s) or custom-input to invoke the handler on.
|
|
1995
|
+
* @param handler The handler for this event. Passing `nil` will unregister it.
|
|
1996
|
+
* @param filters The filters for this event. Can only be used when registering for individual events.
|
|
1997
|
+
* @example ```
|
|
1998
|
+
-- Register for the on_tick event to print the current tick to console each tick
|
|
1999
|
+
script.on_event(defines.events.on_tick,
|
|
2000
|
+
function(event) game.print(event.tick) end)
|
|
2001
|
+
```
|
|
2002
|
+
* @example ```
|
|
2003
|
+
-- Register for the on_built_entity event, limiting it to only be received when a `"fast-inserter"` is built
|
|
2004
|
+
script.on_event(defines.events.on_built_entity,
|
|
2005
|
+
function(event) game.print("Gotta go fast!") end,
|
|
2006
|
+
{{filter = "name", name = "fast-inserter"}})
|
|
1926
2007
|
```
|
|
1927
2008
|
*/
|
|
1928
2009
|
on_event(this: void, event: defines.events.on_player_configured_blueprint, handler: ((this: void, arg0: runtime.on_player_configured_blueprint) => any) | nil, filters?: EventFilter): void;
|
|
@@ -2409,6 +2490,24 @@ interface LuaBootstrap {
|
|
|
2409
2490
|
script.on_event(defines.events.on_built_entity,
|
|
2410
2491
|
function(event) game.print("Gotta go fast!") end,
|
|
2411
2492
|
{{filter = "name", name = "fast-inserter"}})
|
|
2493
|
+
```
|
|
2494
|
+
*/
|
|
2495
|
+
on_event(this: void, event: defines.events.on_player_music_changed, handler: ((this: void, arg0: runtime.on_player_music_changed) => any) | nil, filters?: EventFilter): void;
|
|
2496
|
+
/**
|
|
2497
|
+
* 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.
|
|
2498
|
+
* @param event The event(s) or custom-input to invoke the handler on.
|
|
2499
|
+
* @param handler The handler for this event. Passing `nil` will unregister it.
|
|
2500
|
+
* @param filters The filters for this event. Can only be used when registering for individual events.
|
|
2501
|
+
* @example ```
|
|
2502
|
+
-- Register for the on_tick event to print the current tick to console each tick
|
|
2503
|
+
script.on_event(defines.events.on_tick,
|
|
2504
|
+
function(event) game.print(event.tick) end)
|
|
2505
|
+
```
|
|
2506
|
+
* @example ```
|
|
2507
|
+
-- Register for the on_built_entity event, limiting it to only be received when a `"fast-inserter"` is built
|
|
2508
|
+
script.on_event(defines.events.on_built_entity,
|
|
2509
|
+
function(event) game.print("Gotta go fast!") end,
|
|
2510
|
+
{{filter = "name", name = "fast-inserter"}})
|
|
2412
2511
|
```
|
|
2413
2512
|
*/
|
|
2414
2513
|
on_event(this: void, event: defines.events.on_player_muted, handler: ((this: void, arg0: runtime.on_player_muted) => any) | nil, filters?: EventFilter): void;
|
|
@@ -4341,9 +4440,9 @@ interface LuaBootstrap {
|
|
|
4341
4440
|
/**
|
|
4342
4441
|
* Register a function to be run on mod initialization.
|
|
4343
4442
|
*
|
|
4344
|
-
* 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 | runtime:LuaGameScript} and the {@link storage |
|
|
4443
|
+
* 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 | runtime:LuaGameScript} and the {@link storage | auxiliary:storage} 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.
|
|
4345
4444
|
*
|
|
4346
|
-
* For more context, refer to the {@link Data Lifecycle |
|
|
4445
|
+
* For more context, refer to the {@link Data Lifecycle | auxiliary:data-lifecycle} page.
|
|
4347
4446
|
* @param handler The handler for this event. Passing `nil` will unregister it.
|
|
4348
4447
|
* @example ```
|
|
4349
4448
|
-- Initialize a `players` table in `storage` for later use
|
|
@@ -4356,7 +4455,7 @@ interface LuaBootstrap {
|
|
|
4356
4455
|
/**
|
|
4357
4456
|
* 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.
|
|
4358
4457
|
*
|
|
4359
|
-
* It gives the mod the opportunity to rectify potential differences in local state introduced by the save/load cycle. Doing anything other than the following three will lead to desyncs, breaking multiplayer and replay functionality. Access to {@link LuaGameScript | runtime:LuaGameScript} is not available. The {@link storage |
|
|
4458
|
+
* It gives the mod the opportunity to rectify potential differences in local state introduced by the save/load cycle. Doing anything other than the following three will lead to desyncs, breaking multiplayer and replay functionality. Access to {@link LuaGameScript | runtime:LuaGameScript} is not available. The {@link storage | auxiliary:storage} table can be accessed and is safe to read from, but not write to, as doing so will lead to an error.
|
|
4360
4459
|
*
|
|
4361
4460
|
* The only legitimate uses of this event are these:
|
|
4362
4461
|
*
|
|
@@ -4364,11 +4463,11 @@ interface LuaBootstrap {
|
|
|
4364
4463
|
*
|
|
4365
4464
|
* - Re-setup conditional event handlers, meaning subscribing to an event only when some condition is met to save processing time.
|
|
4366
4465
|
*
|
|
4367
|
-
* - Create local references to data stored in the {@link storage |
|
|
4466
|
+
* - Create local references to data stored in the {@link storage | auxiliary:storage} table.
|
|
4368
4467
|
*
|
|
4369
|
-
* For all other purposes, {@link LuaBootstrap::on_init | runtime:LuaBootstrap::on_init}, {@link LuaBootstrap::on_configuration_changed | runtime:LuaBootstrap::on_configuration_changed} or {@link migrations |
|
|
4468
|
+
* For all other purposes, {@link LuaBootstrap::on_init | runtime:LuaBootstrap::on_init}, {@link LuaBootstrap::on_configuration_changed | runtime:LuaBootstrap::on_configuration_changed} or {@link migrations | auxiliary:migrations} should be used instead.
|
|
4370
4469
|
*
|
|
4371
|
-
* For more context, refer to the {@link Data Lifecycle |
|
|
4470
|
+
* For more context, refer to the {@link Data Lifecycle | auxiliary:data-lifecycle} page.
|
|
4372
4471
|
* @param handler The handler for this event. Passing `nil` will unregister it.
|
|
4373
4472
|
*/
|
|
4374
4473
|
on_load(this: void, handler: ((this: void) => any) | nil): void;
|
|
@@ -4377,7 +4476,7 @@ interface LuaBootstrap {
|
|
|
4377
4476
|
* @param tick The nth-tick(s) to invoke the handler on. Passing `nil` as the only parameter will unregister all nth-tick handlers.
|
|
4378
4477
|
* @param handler The handler to run. Passing `nil` will unregister it for the provided nth-tick(s).
|
|
4379
4478
|
*/
|
|
4380
|
-
on_nth_tick(this: void, tick:
|
|
4479
|
+
on_nth_tick(this: void, tick: MapTick | MapTick[] | nil, handler: ((this: void, arg0: NthTickEventData) => any) | nil): void;
|
|
4381
4480
|
/**
|
|
4382
4481
|
* @param table.entity The entity that was built.
|
|
4383
4482
|
*/
|
|
@@ -4500,7 +4599,7 @@ interface LuaBootstrap {
|
|
|
4500
4599
|
*
|
|
4501
4600
|
* `register_metatable()` can not be used in the console, in event listeners or during a `remote.call()`.
|
|
4502
4601
|
*
|
|
4503
|
-
* The metatable first needs to be defined in the mod's root scope, then registered using this method. From then on, it will be properly restored for tables in {@link storage |
|
|
4602
|
+
* The metatable first needs to be defined in the mod's root scope, then registered using this method. From then on, it will be properly restored for tables in {@link storage | auxiliary:storage}.
|
|
4504
4603
|
*
|
|
4505
4604
|
* ```
|
|
4506
4605
|
* local metatable =
|
|
@@ -4530,7 +4629,7 @@ interface LuaBootstrap {
|
|
|
4530
4629
|
* Depending on when a given object is destroyed, {@link on_object_destroyed | runtime:on_object_destroyed} will either be fired at the end of the current tick or at the end of the next tick.
|
|
4531
4630
|
* @param object The object to register.
|
|
4532
4631
|
* @returns [0] - The registration number. It is used to identify the object in the {@link on_object_destroyed | runtime:on_object_destroyed} event.
|
|
4533
|
-
* @returns [1] - The {@link useful identifier | runtime:RegistrationTarget} of the object if it has one. This identifier is specific to the object type, for example for trains it is the value {@link LuaTrain::id | runtime:LuaTrain::id}.
|
|
4632
|
+
* @returns [1] - The {@link useful identifier | runtime:RegistrationTarget} of the object if it has one or `0` if it doesn't. This identifier is specific to the object type, for example for trains it is the value {@link LuaTrain::id | runtime:LuaTrain::id}.
|
|
4534
4633
|
* @returns [2] - Type of the target object.
|
|
4535
4634
|
*/
|
|
4536
4635
|
register_on_object_destroyed(this: void, object: RegistrationTarget): LuaMultiReturn<[
|
|
@@ -4576,6 +4675,7 @@ interface LuaBootstrap {
|
|
|
4576
4675
|
* A dictionary of feature flags mapping to whether they are enabled.
|
|
4577
4676
|
*/
|
|
4578
4677
|
readonly feature_flags: {
|
|
4678
|
+
expansion: boolean;
|
|
4579
4679
|
quality: boolean;
|
|
4580
4680
|
rail_bridges: boolean;
|
|
4581
4681
|
space_travel: boolean;
|
|
@@ -4680,6 +4780,7 @@ interface LuaBurner {
|
|
|
4680
4780
|
* Prototype of a burner energy source.
|
|
4681
4781
|
*/
|
|
4682
4782
|
interface LuaBurnerPrototype {
|
|
4783
|
+
readonly auto_refuel: boolean;
|
|
4683
4784
|
readonly burnt_inventory_size: uint32;
|
|
4684
4785
|
readonly effectivity: double;
|
|
4685
4786
|
/**
|
|
@@ -4740,8 +4841,9 @@ interface LuaBurnerUsagePrototype extends LuaPrototypeBase {
|
|
|
4740
4841
|
interface LuaCargoHatch {
|
|
4741
4842
|
/**
|
|
4742
4843
|
* Creates a cargo pod for output at the owning entity hatch location.
|
|
4844
|
+
* @param cargo_pod_prototype The cargo pod prototype to create. If not provided, the default cargo pod prototype of the hatch is used.
|
|
4743
4845
|
*/
|
|
4744
|
-
create_cargo_pod(this: void): LuaEntity;
|
|
4846
|
+
create_cargo_pod(this: void, cargo_pod_prototype?: EntityID): LuaEntity;
|
|
4745
4847
|
readonly busy: boolean;
|
|
4746
4848
|
readonly is_input_compatible: boolean;
|
|
4747
4849
|
readonly is_output_compatible: boolean;
|
|
@@ -4760,14 +4862,12 @@ interface LuaCargoHatch {
|
|
|
4760
4862
|
* Control behavior for cargo landing pad.
|
|
4761
4863
|
*/
|
|
4762
4864
|
interface LuaCargoLandingPadControlBehavior extends LuaControlBehavior {
|
|
4763
|
-
/**
|
|
4764
|
-
* The circuit mode of operations for the cargo landing pad.
|
|
4765
|
-
*/
|
|
4766
|
-
circuit_exclusive_mode_of_operation: defines.control_behavior.cargo_landing_pad.exclusive_mode;
|
|
4767
4865
|
/**
|
|
4768
4866
|
* 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.
|
|
4769
4867
|
*/
|
|
4770
4868
|
readonly object_name: string;
|
|
4869
|
+
read_contents: boolean;
|
|
4870
|
+
set_requests: boolean;
|
|
4771
4871
|
/**
|
|
4772
4872
|
* 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.
|
|
4773
4873
|
*/
|
|
@@ -5074,7 +5174,7 @@ interface LuaContainerControlBehavior extends LuaControlBehavior {
|
|
|
5074
5174
|
*/
|
|
5075
5175
|
readonly object_name: string;
|
|
5076
5176
|
/**
|
|
5077
|
-
* `true` if this container is sending its content to a circuit network
|
|
5177
|
+
* `true` if this container is sending its content to a circuit network.
|
|
5078
5178
|
*/
|
|
5079
5179
|
read_contents: boolean;
|
|
5080
5180
|
/**
|
|
@@ -5453,7 +5553,15 @@ interface LuaControl {
|
|
|
5453
5553
|
*/
|
|
5454
5554
|
readonly loot_pickup_distance: double;
|
|
5455
5555
|
/**
|
|
5456
|
-
*
|
|
5556
|
+
* For characters and players the number is between 0 and 1.
|
|
5557
|
+
*
|
|
5558
|
+
* For mining drills the number is with the range [0, mining_target.prototype.mineable_properties.mining_time].
|
|
5559
|
+
*
|
|
5560
|
+
* For all other types the number is 0.
|
|
5561
|
+
*/
|
|
5562
|
+
mining_progress: double;
|
|
5563
|
+
/**
|
|
5564
|
+
* Current mining state. Will error if written to with a {@link controller_type | runtime:LuaPlayer::controller_type} other than `character`, `god`, or `editor`.
|
|
5457
5565
|
*
|
|
5458
5566
|
* When the player isn't mining tiles the player will mine whatever entity is currently selected. See {@link LuaControl::selected | runtime:LuaControl::selected} and {@link LuaControl::update_selected_entity | runtime:LuaControl::update_selected_entity}.
|
|
5459
5567
|
*/
|
|
@@ -5638,6 +5746,18 @@ interface LuaControlBehavior {
|
|
|
5638
5746
|
* The entity this control behavior belongs to.
|
|
5639
5747
|
*/
|
|
5640
5748
|
readonly entity: LuaEntity;
|
|
5749
|
+
/**
|
|
5750
|
+
* Which circuit networks (red/green) to read signals from. Defaults to both wire colors.
|
|
5751
|
+
*
|
|
5752
|
+
* `nil` if this control behavior does not allow selecting the input networks.
|
|
5753
|
+
*/
|
|
5754
|
+
input_networks?: CircuitNetworkSelection;
|
|
5755
|
+
/**
|
|
5756
|
+
* Which circuit networks (red/green) to send signals to. Defaults to both wire colors.
|
|
5757
|
+
*
|
|
5758
|
+
* `nil` if this control behavior does not allow selecting the output networks.
|
|
5759
|
+
*/
|
|
5760
|
+
output_networks?: CircuitNetworkSelection;
|
|
5641
5761
|
/**
|
|
5642
5762
|
* The concrete type of this control behavior.
|
|
5643
5763
|
*/
|
|
@@ -5834,6 +5954,58 @@ interface LuaDamagePrototype extends LuaPrototypeBase {
|
|
|
5834
5954
|
*/
|
|
5835
5955
|
readonly valid: boolean;
|
|
5836
5956
|
}
|
|
5957
|
+
/**
|
|
5958
|
+
* Factorio provides a {@link Debug Adapter | https://microsoft.github.io/debug-adapter-protocol/overview} for compatible tools in single-session mode on stdin/stdout when launched with the `--dap` command line argument.
|
|
5959
|
+
*
|
|
5960
|
+
* The Debug Adapter supports a Launch request with the following arguments:
|
|
5961
|
+
*
|
|
5962
|
+
* - `factorioArgs` :: array{@link [string | runtime:string}]? : Command line arguments for the debug session
|
|
5963
|
+
*
|
|
5964
|
+
* - `followSymlinks` :: {@link boolean | runtime:boolean}? : Follow symlinks when emitting locations (stack traces, etc) (default: true)
|
|
5965
|
+
*
|
|
5966
|
+
* - `tags` :: {@link Any | runtime:Any}? : Extra debug session tags, see also {@link tags | runtime:LuaDebugAdapter::tags}
|
|
5967
|
+
*
|
|
5968
|
+
* Metatable methods may be used to customize debug views:
|
|
5969
|
+
*
|
|
5970
|
+
* - `__tostring`(`self`) -> {@link string | runtime:string} : Called when the object appears as a value.
|
|
5971
|
+
*
|
|
5972
|
+
* - `__debugcounts`(`self`) -> `indexedVariables` :: {@link int32 | runtime:int32} , `namedVariables` :: {@link int32 | runtime:int32} : Called when the object appears in a parent object's listing, to estimate the size of this object's listing, and enabled paged listing for large indexed objects.
|
|
5973
|
+
*
|
|
5974
|
+
* - `__debugchildren`(`self`, `filters` :: {@link DebugVariablesFilter | runtime:DebugVariablesFilter}) -> array({@link DebugVariable | runtime:DebugVariable}) : Called when the object itself is opened for a debug listing. If `__debugcounts` was implemented, the client may choose to fetch Indexed and Named children separately, and Indexed children in pages as-needed for display. See also {@link describe_field | runtime:LuaDebugAdapter::describe_field}.
|
|
5975
|
+
*
|
|
5976
|
+
* This class also provides debug session APIs, as the global object `debugadapter` in all stages.
|
|
5977
|
+
*/
|
|
5978
|
+
interface LuaDebugAdapter {
|
|
5979
|
+
/**
|
|
5980
|
+
* Prepare a default debug view entry for a field, to assist in preparing custom listings.
|
|
5981
|
+
* @param name The name of the field
|
|
5982
|
+
* @param value The value of the field
|
|
5983
|
+
*/
|
|
5984
|
+
describe_field(this: void, name: string, value: Any): DebugVariable;
|
|
5985
|
+
/**
|
|
5986
|
+
* Start recording profiler timings. If there is a previous recording session running, it will be stopped first.
|
|
5987
|
+
* @param table.show_hook_events Include events to indicate time spent in hooks
|
|
5988
|
+
*/
|
|
5989
|
+
start_profile(this: void, table: {
|
|
5990
|
+
show_hook_events?: boolean;
|
|
5991
|
+
}): void;
|
|
5992
|
+
/**
|
|
5993
|
+
* Stop recording profiler timings and save to script_output.
|
|
5994
|
+
*/
|
|
5995
|
+
stop_profile(this: void): void;
|
|
5996
|
+
/**
|
|
5997
|
+
* 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.
|
|
5998
|
+
*/
|
|
5999
|
+
readonly object_name: string;
|
|
6000
|
+
/**
|
|
6001
|
+
* The value from the `tags` property of the current session's launch request
|
|
6002
|
+
*/
|
|
6003
|
+
readonly tags: AnyBasic;
|
|
6004
|
+
/**
|
|
6005
|
+
* 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.
|
|
6006
|
+
*/
|
|
6007
|
+
readonly valid: boolean;
|
|
6008
|
+
}
|
|
5837
6009
|
/**
|
|
5838
6010
|
* Control behavior for decider combinators.
|
|
5839
6011
|
*/
|
|
@@ -5932,25 +6104,49 @@ interface LuaDecorativePrototype extends LuaPrototypeBase {
|
|
|
5932
6104
|
*/
|
|
5933
6105
|
interface LuaDisplayPanelControlBehavior extends LuaControlBehavior {
|
|
5934
6106
|
/**
|
|
5935
|
-
*
|
|
5936
|
-
* @param
|
|
5937
|
-
* @
|
|
6107
|
+
* Adds a single message record.
|
|
6108
|
+
* @param message Message record to be added.
|
|
6109
|
+
* @param index Index at which this record should be inserted. Must be within {@link 1, [records_count | runtime:LuaDisplayPanelControlBehavior::records_count} + 1]. When not provided, record will be appended.
|
|
6110
|
+
* @returns If a message record was added.
|
|
5938
6111
|
*/
|
|
5939
|
-
|
|
6112
|
+
add_record(this: void, message: DisplayPanelMessageDefinition, index?: uint32): boolean;
|
|
5940
6113
|
/**
|
|
5941
|
-
*
|
|
5942
|
-
* @param index
|
|
5943
|
-
* @param message The message definition for the specified index. Specify `nil` to remove the message.
|
|
6114
|
+
* Get a single record.
|
|
6115
|
+
* @param index Index of the record to read.
|
|
5944
6116
|
*/
|
|
5945
|
-
|
|
6117
|
+
get_record(this: void, index: uint32): DisplayPanelMessageDefinition;
|
|
5946
6118
|
/**
|
|
5947
|
-
*
|
|
6119
|
+
* Moves record from old position to a new position
|
|
6120
|
+
* @param old_index Index where the record to be moved is currently.
|
|
6121
|
+
* @param new_index Index where the record should be moved to.
|
|
6122
|
+
*/
|
|
6123
|
+
move_record(this: void, old_index: uint32, new_index: uint32): void;
|
|
6124
|
+
/**
|
|
6125
|
+
* Removes message record at specified index.
|
|
6126
|
+
* @param index Index of the message record to be removed. Must be within {@link 1, [records_count | runtime:LuaDisplayPanelControlBehavior::records_count}].
|
|
6127
|
+
*/
|
|
6128
|
+
remove_record(this: void, index: uint32): void;
|
|
6129
|
+
/**
|
|
6130
|
+
* Change content of a specific record.
|
|
6131
|
+
* @param index Index of the record to change
|
|
6132
|
+
*/
|
|
6133
|
+
set_record(this: void, index: uint32, record: DisplayPanelMessageDefinition): void;
|
|
6134
|
+
/**
|
|
6135
|
+
* Provides a maximum amount of records that can be added to this behavior. When at full capacity, attempts to add more records will fail.
|
|
5948
6136
|
*/
|
|
5949
|
-
|
|
6137
|
+
readonly max_records_count: uint32;
|
|
5950
6138
|
/**
|
|
5951
6139
|
* 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.
|
|
5952
6140
|
*/
|
|
5953
6141
|
readonly object_name: string;
|
|
6142
|
+
/**
|
|
6143
|
+
* The full list of configured messages.
|
|
6144
|
+
*/
|
|
6145
|
+
records: DisplayPanelMessageDefinition[];
|
|
6146
|
+
/**
|
|
6147
|
+
* Current amount of records this control behavior has.
|
|
6148
|
+
*/
|
|
6149
|
+
readonly records_count: uint32;
|
|
5954
6150
|
/**
|
|
5955
6151
|
* 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.
|
|
5956
6152
|
*/
|
|
@@ -5980,6 +6176,197 @@ interface LuaElectricEnergySourcePrototype {
|
|
|
5980
6176
|
*/
|
|
5981
6177
|
readonly valid: boolean;
|
|
5982
6178
|
}
|
|
6179
|
+
/**
|
|
6180
|
+
* A LuaElectricNetwork represents a group of {@link LuaElectricSubNetworks | runtime:LuaElectricSubNetwork} that are directly or indirectly connected to each other through implicit connections (closed power switches, surface connections) and during next electric network update will transfer electricity from producers and consumers.
|
|
6181
|
+
*
|
|
6182
|
+
* Electric networks can be merged together when a power switch is closed and can be split into multiple networks when power switch opens. Similarly turning on or off a global network may merge or split electric networks in a way that follows the expected electricity flows - two sub networks that are not directly or indirectly connected will be put into separate electric networks.
|
|
6183
|
+
*
|
|
6184
|
+
* The electric network is what performs electric flow between entities. It does *not* track connected entities as that's the responsibility of the electric sub network.
|
|
6185
|
+
*/
|
|
6186
|
+
interface LuaElectricNetwork {
|
|
6187
|
+
/**
|
|
6188
|
+
* Gets total energy stored inside of accumulators that are part of any electric sub network covered by this electric network.
|
|
6189
|
+
* @param table.name When given, only accumulators of this prototype will be considered.
|
|
6190
|
+
* @param table.quality When given, only accumulators of this quality will be considered.
|
|
6191
|
+
*/
|
|
6192
|
+
get_accumulators_energy(this: void, table: {
|
|
6193
|
+
name?: EntityID;
|
|
6194
|
+
quality?: QualityID;
|
|
6195
|
+
}): EnergyAndCapacityPair;
|
|
6196
|
+
/**
|
|
6197
|
+
* Changes energy stored inside of accumulators that are part of any electric sub network covered by this electric network.
|
|
6198
|
+
* @param table.name When given, only accumulators of this prototype will be considered.
|
|
6199
|
+
* @param table.quality When given, only accumulators of this quality will be considered.
|
|
6200
|
+
* @param table.energy New total energy to be set onto matching accumulators.
|
|
6201
|
+
* @param table.equalize Whether all accumulators should have the same charge ratio, regardless of whether that means discharging some of them. Defaults to `false`.
|
|
6202
|
+
*/
|
|
6203
|
+
set_accumulators_energy(this: void, table: {
|
|
6204
|
+
name?: EntityID;
|
|
6205
|
+
quality?: QualityID;
|
|
6206
|
+
energy: double;
|
|
6207
|
+
equalize?: boolean;
|
|
6208
|
+
}): void;
|
|
6209
|
+
/**
|
|
6210
|
+
* Energy amounts of satisfaction percents related to latest electric network update.
|
|
6211
|
+
*/
|
|
6212
|
+
readonly flow_last_tick: {
|
|
6213
|
+
/**
|
|
6214
|
+
* Total energy of accumulators in the electric network before energy transfer.
|
|
6215
|
+
*/
|
|
6216
|
+
accumulator_energy: double;
|
|
6217
|
+
/**
|
|
6218
|
+
* Total capacity of accumulators in the electric network during electric network update.
|
|
6219
|
+
*/
|
|
6220
|
+
accumulator_capacity: double;
|
|
6221
|
+
/**
|
|
6222
|
+
* Amount of energy offered by energy producers with "primary-output" usage priority.
|
|
6223
|
+
*/
|
|
6224
|
+
primary_output: double;
|
|
6225
|
+
/**
|
|
6226
|
+
* Amount of energy offered by energy producers with "secondary-output" usage priority.
|
|
6227
|
+
*/
|
|
6228
|
+
secondary_output: double;
|
|
6229
|
+
/**
|
|
6230
|
+
* Amount of energy offered by energy sources with "tertiary" usage priority or accumulators.
|
|
6231
|
+
*/
|
|
6232
|
+
tertiary_output: double;
|
|
6233
|
+
/**
|
|
6234
|
+
* Amount of energy offered by energy producers with "solar" usage priority.
|
|
6235
|
+
*/
|
|
6236
|
+
solar_output: double;
|
|
6237
|
+
/**
|
|
6238
|
+
* Amount of energy requested by energy consumers with "primary-input" usage priority.
|
|
6239
|
+
*/
|
|
6240
|
+
primary_demand: double;
|
|
6241
|
+
/**
|
|
6242
|
+
* Amount of energy requested by energy consumers with "secondary-input" usage priority.
|
|
6243
|
+
*/
|
|
6244
|
+
secondary_demand: double;
|
|
6245
|
+
/**
|
|
6246
|
+
* Amount of energy requested by energy consumers with "tertiary" usage priority or accumulators.
|
|
6247
|
+
*/
|
|
6248
|
+
tertiary_demand: double;
|
|
6249
|
+
/**
|
|
6250
|
+
* Total amount of energy moved from producers to consumers.
|
|
6251
|
+
*/
|
|
6252
|
+
total_transfer: double;
|
|
6253
|
+
/**
|
|
6254
|
+
* Sum of available production (`solar_output`, `primary_output`, `secondary_output`) increased by amount of energy actually provided from tertiary sources/accumulators.
|
|
6255
|
+
*/
|
|
6256
|
+
maximum_production: double;
|
|
6257
|
+
/**
|
|
6258
|
+
* Fraction of `maximum_production` that was actually used up.
|
|
6259
|
+
*/
|
|
6260
|
+
production_satisfaction: double;
|
|
6261
|
+
/**
|
|
6262
|
+
* Sum of required consumption (`primary_input`, `secondary_input`) increased by amount of extra energy actually consumed by tertiary sources/accumulators.
|
|
6263
|
+
*/
|
|
6264
|
+
maximum_consumption: double;
|
|
6265
|
+
/**
|
|
6266
|
+
* Fraction of `consumption_satisfaction` that was actually provided.
|
|
6267
|
+
*/
|
|
6268
|
+
consumption_satisfaction: double;
|
|
6269
|
+
lamp_satisfaction: double;
|
|
6270
|
+
/**
|
|
6271
|
+
* Fraction of `primary_output` energy that was taken away during update.
|
|
6272
|
+
*/
|
|
6273
|
+
primary_output_usage: double;
|
|
6274
|
+
/**
|
|
6275
|
+
* Fraction of `secondary_output` energy that was taken away during update.
|
|
6276
|
+
*/
|
|
6277
|
+
secondary_output_usage: double;
|
|
6278
|
+
/**
|
|
6279
|
+
* Fraction of `tertiary_output` energy that was taken away during update.
|
|
6280
|
+
*/
|
|
6281
|
+
tertiary_output_usage: double;
|
|
6282
|
+
/**
|
|
6283
|
+
* Fraction of `solar_output` energy that was taken away during update.
|
|
6284
|
+
*/
|
|
6285
|
+
solar_output_usage: double;
|
|
6286
|
+
/**
|
|
6287
|
+
* Fraction of `primary_demand` energy that was provided during update.
|
|
6288
|
+
*/
|
|
6289
|
+
primary_demand_usage: double;
|
|
6290
|
+
/**
|
|
6291
|
+
* Fraction of `secondary_demand` energy that was provided during update.
|
|
6292
|
+
*/
|
|
6293
|
+
secondary_demand_usage: double;
|
|
6294
|
+
/**
|
|
6295
|
+
* Fraction of `tertiary_demand` energy that was provided during update.
|
|
6296
|
+
*/
|
|
6297
|
+
tertiary_demand_usage: double;
|
|
6298
|
+
};
|
|
6299
|
+
/**
|
|
6300
|
+
* 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.
|
|
6301
|
+
*/
|
|
6302
|
+
readonly object_name: string;
|
|
6303
|
+
/**
|
|
6304
|
+
* Statistics for this electric network.
|
|
6305
|
+
*
|
|
6306
|
+
* If the electric network becomes invalid, the flow statistics obtained from it will also become invalid.
|
|
6307
|
+
*/
|
|
6308
|
+
readonly statistics: LuaFlowStatistics;
|
|
6309
|
+
readonly sub_networks: LuaElectricSubNetwork[];
|
|
6310
|
+
/**
|
|
6311
|
+
* 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.
|
|
6312
|
+
*/
|
|
6313
|
+
readonly valid: boolean;
|
|
6314
|
+
}
|
|
6315
|
+
/**
|
|
6316
|
+
* A LuaElectricSubNetwork represents an electricity supply group.
|
|
6317
|
+
*
|
|
6318
|
+
* When a supply group is related to electric poles, it spans over all poles that are connected with real (non ghost) wires and connects entities with an electric energy source in range of those poles.
|
|
6319
|
+
*
|
|
6320
|
+
* When a supply group is related to a global electric network, it connects entities with an electric energy source on the same surface.
|
|
6321
|
+
*
|
|
6322
|
+
* Implicit connections (when a power switch is closed, or when an electric pole is built on a surface with global network) do not cause supply groups to merge since they are not copper wire connections. Those connections will cause sub networks to have the same parent electric network causing electricity to be allowed to flow freely between multiple sub networks (electricity produced inside of one sub network that is connected through a power switch to a second sub network will be able to flow into a consumer connected to the second sub network).
|
|
6323
|
+
*
|
|
6324
|
+
* The electric sub network keeps track of connected entities. It does *not* perform electricity flow as that's the responsibility of the electric network.
|
|
6325
|
+
*/
|
|
6326
|
+
interface LuaElectricSubNetwork {
|
|
6327
|
+
/**
|
|
6328
|
+
* Gets total energy stored inside of accumulators connected to the electric sub network.
|
|
6329
|
+
* @param table.name When given, only accumulators of this prototype will be considered.
|
|
6330
|
+
* @param table.quality When given, only accumulators of this quality will be considered.
|
|
6331
|
+
*/
|
|
6332
|
+
get_accumulators_energy(this: void, table: {
|
|
6333
|
+
name?: EntityID;
|
|
6334
|
+
quality?: QualityID;
|
|
6335
|
+
}): EnergyAndCapacityPair;
|
|
6336
|
+
/**
|
|
6337
|
+
* Changes energy stored inside of accumulators connected to the electric sub network.
|
|
6338
|
+
* @param table.name When given, only accumulators of this prototype will be considered.
|
|
6339
|
+
* @param table.quality When given, only accumulators of this quality will be considered.
|
|
6340
|
+
* @param table.energy New total energy to be set onto matching accumulators.
|
|
6341
|
+
* @param table.equalize Whether all accumulators should have the same charge ratio, regardless of whether that means discharging some of them. Defaults to `false`.
|
|
6342
|
+
*/
|
|
6343
|
+
set_accumulators_energy(this: void, table: {
|
|
6344
|
+
name?: EntityID;
|
|
6345
|
+
quality?: QualityID;
|
|
6346
|
+
energy: double;
|
|
6347
|
+
equalize?: boolean;
|
|
6348
|
+
}): void;
|
|
6349
|
+
/**
|
|
6350
|
+
* Unique identifier of this electric sub network.
|
|
6351
|
+
*/
|
|
6352
|
+
readonly id: uint32;
|
|
6353
|
+
/**
|
|
6354
|
+
* List of sub networks that are directly connected to this sub network through power switches or because they span over electric poles placed on a surface with global network (all poles on a surface with global network are implicitly connected to global network making their networks neighbour of a global network).
|
|
6355
|
+
*/
|
|
6356
|
+
readonly neighbours: LuaElectricSubNetwork[];
|
|
6357
|
+
/**
|
|
6358
|
+
* 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.
|
|
6359
|
+
*/
|
|
6360
|
+
readonly object_name: string;
|
|
6361
|
+
/**
|
|
6362
|
+
* Parent network to this sub network.
|
|
6363
|
+
*/
|
|
6364
|
+
readonly parent_network: LuaElectricNetwork;
|
|
6365
|
+
/**
|
|
6366
|
+
* 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.
|
|
6367
|
+
*/
|
|
6368
|
+
readonly valid: boolean;
|
|
6369
|
+
}
|
|
5983
6370
|
/**
|
|
5984
6371
|
* The primary interface for interacting with entities through the Lua API. Entities are everything that exists on the map except for tiles (see {@link LuaTile | runtime:LuaTile}).
|
|
5985
6372
|
*
|
|
@@ -5989,8 +6376,31 @@ interface LuaEntity extends LuaControl {
|
|
|
5989
6376
|
/**
|
|
5990
6377
|
* Adds the given position to this spidertron's autopilot's queue of destinations.
|
|
5991
6378
|
* @param position The position the spidertron should move to.
|
|
6379
|
+
* @param attempt_patrol If the autopilot logic should attempt to initiate patrol mode at the given position. Defaults to `false`.
|
|
6380
|
+
*/
|
|
6381
|
+
add_autopilot_destination(this: void, position: MapPosition, attempt_patrol?: boolean): void;
|
|
6382
|
+
/**
|
|
6383
|
+
* Adds the given fluid to the entity's given fluid storage if possible.
|
|
6384
|
+
*
|
|
6385
|
+
* If the current fluid conflicts or the current filter conflicts the fluid may not be added.
|
|
6386
|
+
* @returns The amount of fluid added.
|
|
6387
|
+
*/
|
|
6388
|
+
add_fluid(this: void, index: FluidStorageIndex, fluid: Fluid): FluidAmount;
|
|
6389
|
+
/**
|
|
6390
|
+
* Registers a linked fluidbox connection between this entity and other entity. Because entity may have multiple fluidboxes, each with multiple connections that could be linked, a unique value for this and other linked_connection_id may need to be given.
|
|
6391
|
+
*
|
|
6392
|
+
* It may happen a linked fluidbox connection is not established immediately due to crafting machines being possible to not have certain fluidboxes exposed at a given point in time, but once they appear (due to recipe changes that would use them) they will be linked. Linked connections are persisted as (this_entity, this_linked_connection_id, other_entity, other_linked_connection_id) so if a pipe connection definition's value of linked_connection_id changes existing connections may not restore correct connections.
|
|
6393
|
+
*
|
|
6394
|
+
* Every fluidbox connection that was defined in prototypes as connection_type=="linked" may be linked to at most 1 other fluidbox. When trying to connect already used connection, previous connection will be removed.
|
|
6395
|
+
*
|
|
6396
|
+
* Linked connections cannot go to the same entity even if they would be part of other fluidbox.
|
|
6397
|
+
*/
|
|
6398
|
+
add_fluid_box_linked_connection(this: void, this_linked_connection_id: uint32, other_entity: LuaEntity, other_linked_connection_id: uint32): void;
|
|
6399
|
+
/**
|
|
6400
|
+
* Adds the given fluid to the given storage's fluid segment if possible.
|
|
6401
|
+
* @returns The amount of fluid added.
|
|
5992
6402
|
*/
|
|
5993
|
-
|
|
6403
|
+
add_fluid_segment_fluid(this: void, index: FluidStorageIndex, fluid: Fluid): FluidAmount;
|
|
5994
6404
|
/**
|
|
5995
6405
|
* Offer a thing on the market.
|
|
5996
6406
|
* @example ```
|
|
@@ -6006,7 +6416,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6006
6416
|
/**
|
|
6007
6417
|
* Upgrades this entity in place if it's marked to be upgraded.
|
|
6008
6418
|
* @returns [0] - The first upgraded entity - `nil` if this entity is not marked for upgrade.
|
|
6009
|
-
* @returns [1] -
|
|
6419
|
+
* @returns [1] - When upgrading underground belts, the other underground belt end that was also upgraded - `nil` if this entity is not marked for upgrade.
|
|
6010
6420
|
*/
|
|
6011
6421
|
apply_upgrade(this: void): LuaMultiReturn<[
|
|
6012
6422
|
LuaEntity | null,
|
|
@@ -6044,13 +6454,37 @@ interface LuaEntity extends LuaControl {
|
|
|
6044
6454
|
*/
|
|
6045
6455
|
cancel_upgrade(this: void, force: ForceID, player?: PlayerIdentification): boolean;
|
|
6046
6456
|
/**
|
|
6047
|
-
*
|
|
6457
|
+
* Removes all fluid from the entity's given fluid storage if possible.
|
|
6458
|
+
* @returns The fluid cleared.
|
|
6459
|
+
*/
|
|
6460
|
+
clear_fluid(this: void, index: FluidStorageIndex): Fluid | null;
|
|
6461
|
+
/**
|
|
6462
|
+
* Remove all fluids from this entity and connected fluid segments.
|
|
6048
6463
|
*/
|
|
6049
6464
|
clear_fluid_inside(this: void): void;
|
|
6050
6465
|
/**
|
|
6051
|
-
*
|
|
6466
|
+
* Clears the given fluid storage's fluid segment.
|
|
6467
|
+
* @returns The fluid cleared.
|
|
6468
|
+
*/
|
|
6469
|
+
clear_fluid_segment_fluid(this: void, index: FluidStorageIndex): Fluid | null;
|
|
6470
|
+
/**
|
|
6471
|
+
* Clears all fluids in this entity but will not clear fluids in any fluid segments fluidboxes may be part of.
|
|
6472
|
+
* @returns The fluids removed.
|
|
6473
|
+
*/
|
|
6474
|
+
clear_fluids(this: void): Fluid[];
|
|
6475
|
+
/**
|
|
6476
|
+
* Removes all offers from a market.
|
|
6052
6477
|
*/
|
|
6053
6478
|
clear_market_items(this: void): void;
|
|
6479
|
+
clear_stored_durability(this: void): void;
|
|
6480
|
+
/**
|
|
6481
|
+
* Removes selected runtime tooltip field.
|
|
6482
|
+
*/
|
|
6483
|
+
clear_tooltip_field(this: void, id: uint32): void;
|
|
6484
|
+
/**
|
|
6485
|
+
* Removes all runtime tooltip fields attached to this entity.
|
|
6486
|
+
*/
|
|
6487
|
+
clear_tooltip_fields(this: void): void;
|
|
6054
6488
|
/**
|
|
6055
6489
|
* Clones this entity.
|
|
6056
6490
|
* @param table.position The destination position
|
|
@@ -6081,7 +6515,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6081
6515
|
* @param by_player If provided, the copying is done 'as' this player and {@link on_entity_settings_pasted | runtime:on_entity_settings_pasted} is triggered.
|
|
6082
6516
|
* @returns Any items removed from this entity as a result of copying the settings.
|
|
6083
6517
|
*/
|
|
6084
|
-
copy_settings(this: void, entity: LuaEntity, by_player?: PlayerIdentification):
|
|
6518
|
+
copy_settings(this: void, entity: LuaEntity, by_player?: PlayerIdentification): ItemWithQualityCount[];
|
|
6085
6519
|
/**
|
|
6086
6520
|
* Creates the same smoke that is created when you place a building by hand.
|
|
6087
6521
|
*
|
|
@@ -6092,9 +6526,13 @@ interface LuaEntity extends LuaControl {
|
|
|
6092
6526
|
* Creates a cargo pod if possible.
|
|
6093
6527
|
*
|
|
6094
6528
|
* Cargo pod will be created with {@link invalid | runtime:defines.cargo_destination.invalid} destination type. Setting {@link cargo_pod_destination | runtime:LuaEntity::cargo_pod_destination} will cause it to launch.
|
|
6095
|
-
* @param cargo_hatch The hatch to create the pod at. A random (available) one is picked if not provided.
|
|
6529
|
+
* @param table.cargo_hatch The hatch to create the pod at. A random (available) one is picked if not provided.
|
|
6530
|
+
* @param table.cargo_pod_prototype The cargo pod prototype to create. If not provided, the default cargo pod prototype of the hatch is used.
|
|
6096
6531
|
*/
|
|
6097
|
-
create_cargo_pod(this: void,
|
|
6532
|
+
create_cargo_pod(this: void, table: {
|
|
6533
|
+
cargo_hatch?: LuaCargoHatch;
|
|
6534
|
+
cargo_pod_prototype?: EntityID;
|
|
6535
|
+
}): LuaEntity | null;
|
|
6098
6536
|
/**
|
|
6099
6537
|
* Damages the entity.
|
|
6100
6538
|
* @param damage The amount of damage to be done.
|
|
@@ -6147,6 +6585,29 @@ interface LuaEntity extends LuaControl {
|
|
|
6147
6585
|
* @returns If anything was disconnected
|
|
6148
6586
|
*/
|
|
6149
6587
|
disconnect_rolling_stock(this: void, direction: defines.rail_direction): boolean;
|
|
6588
|
+
/**
|
|
6589
|
+
* Remove fluid from this entity.
|
|
6590
|
+
*
|
|
6591
|
+
* If temperature is given only fluid matching that exact temperature is removed. If minimum and maximum is given fluid within that range is removed.
|
|
6592
|
+
* @param table.name Fluid prototype name.
|
|
6593
|
+
* @param table.amount Amount to remove
|
|
6594
|
+
* @returns Amount of fluid actually removed.
|
|
6595
|
+
*/
|
|
6596
|
+
extract_fluid(this: void, table: {
|
|
6597
|
+
name: string;
|
|
6598
|
+
amount: FluidAmount;
|
|
6599
|
+
minimum_temperature?: double;
|
|
6600
|
+
maximum_temperature?: double;
|
|
6601
|
+
temperature?: double;
|
|
6602
|
+
}): FluidAmount;
|
|
6603
|
+
/**
|
|
6604
|
+
* Flips this entity
|
|
6605
|
+
* @returns Whether the flip was successful.
|
|
6606
|
+
*/
|
|
6607
|
+
flip(this: void, table: {
|
|
6608
|
+
horizontal: boolean;
|
|
6609
|
+
by_player?: PlayerIdentification;
|
|
6610
|
+
}): boolean;
|
|
6150
6611
|
/**
|
|
6151
6612
|
* Take an ascending cargo pod and safely make it skip all animation and immediately switch surface.
|
|
6152
6613
|
*/
|
|
@@ -6244,25 +6705,74 @@ interface LuaEntity extends LuaControl {
|
|
|
6244
6705
|
*/
|
|
6245
6706
|
get_filter(this: void, slot_index: uint32): (ItemFilter | EntityID | AsteroidChunkID) | null;
|
|
6246
6707
|
/**
|
|
6247
|
-
* Gets
|
|
6248
|
-
* @
|
|
6249
|
-
* @returns Fluid in this storage. `nil` if fluid storage is empty.
|
|
6708
|
+
* Gets the fluid in the entity's given fluid storage if one exists.
|
|
6709
|
+
* @returns The fluid in this storage. `nil` if fluid storage is empty.
|
|
6250
6710
|
*/
|
|
6251
|
-
get_fluid(this: void, index:
|
|
6711
|
+
get_fluid(this: void, index: FluidStorageIndex): Fluid | null;
|
|
6712
|
+
/**
|
|
6713
|
+
* Returns other end of a linked fluidbox connection.
|
|
6714
|
+
* @returns [0] - Other entity to which a linked fluidbox connection was made
|
|
6715
|
+
* @returns [1] - linked_connection_id on other entity
|
|
6716
|
+
*/
|
|
6717
|
+
get_fluid_box_linked_connection(this: void, this_linked_connection_id: uint32): LuaMultiReturn<[
|
|
6718
|
+
LuaEntity | null,
|
|
6719
|
+
uint32 | null
|
|
6720
|
+
]>;
|
|
6721
|
+
/**
|
|
6722
|
+
* Returns list of all linked fluidbox connections registered for this entity.
|
|
6723
|
+
*/
|
|
6724
|
+
get_fluid_box_linked_connections(this: void): FluidBoxConnectionRecord[];
|
|
6725
|
+
/**
|
|
6726
|
+
* The entities the given fluidbox is connected to.
|
|
6727
|
+
*/
|
|
6728
|
+
get_fluid_box_neighbours(this: void, index: FluidStorageIndex): FluidBoxNeighbourRecord[] | null;
|
|
6729
|
+
/**
|
|
6730
|
+
* Get the given connections and associated data of the fluidbox.
|
|
6731
|
+
*/
|
|
6732
|
+
get_fluid_box_pipe_connections(this: void, index: FluidStorageIndex): PipeConnection[] | null;
|
|
6733
|
+
/**
|
|
6734
|
+
* The prototype of the entity's given fluid storage if one exists. If this is used on a fluidbox of a crafting machine which due to recipe was created by merging multiple prototypes, a table of prototypes that were merged will be returned instead For storages on entities that have fluid storage but no prototype for those storages (fluid wagons, and fluid turrets) this returns `nil`.
|
|
6735
|
+
*/
|
|
6736
|
+
get_fluid_box_prototype(this: void, index: FluidStorageIndex): (LuaFluidBoxPrototype | LuaFluidBoxPrototype[]) | null;
|
|
6737
|
+
/**
|
|
6738
|
+
* Gets the maximum capacity of the entity's given fluid storage.
|
|
6739
|
+
*/
|
|
6740
|
+
get_fluid_capacity(this: void, index: FluidStorageIndex): FluidAmount;
|
|
6252
6741
|
/**
|
|
6253
6742
|
* Get amounts of all fluids in this entity.
|
|
6254
6743
|
*
|
|
6255
|
-
* If information about fluid temperatures is required, {@link LuaEntity::get_fluid | runtime:LuaEntity::get_fluid}
|
|
6744
|
+
* If information about fluid temperatures is required, {@link LuaEntity::get_fluid | runtime:LuaEntity::get_fluid} should be used instead.
|
|
6256
6745
|
* @returns The amounts, indexed by fluid names.
|
|
6257
6746
|
*/
|
|
6258
6747
|
get_fluid_contents(this: void): Record<string, FluidAmount>;
|
|
6259
6748
|
/**
|
|
6260
6749
|
* Get the amount of all or some fluid in this entity.
|
|
6261
6750
|
*
|
|
6262
|
-
* If information about fluid temperatures is required, {@link LuaEntity::
|
|
6751
|
+
* If information about fluid temperatures is required, {@link LuaEntity::get_fluid | runtime:LuaEntity::get_fluid} should be used instead.
|
|
6263
6752
|
* @param fluid Prototype name of the fluid to count. If not specified, count all fluids.
|
|
6264
6753
|
*/
|
|
6265
|
-
get_fluid_count(this: void, fluid?: string):
|
|
6754
|
+
get_fluid_count(this: void, fluid?: string): FluidAmount;
|
|
6755
|
+
/**
|
|
6756
|
+
* Get a fluidbox filter, such as the filter of a pump.
|
|
6757
|
+
*/
|
|
6758
|
+
get_fluid_filter(this: void, index: FluidStorageIndex): FluidFilter | null;
|
|
6759
|
+
/**
|
|
6760
|
+
* Gets the maximum capacity of the given fluid storage's segment.
|
|
6761
|
+
*/
|
|
6762
|
+
get_fluid_segment_capacity(this: void, index: FluidStorageIndex): FluidAmount;
|
|
6763
|
+
/**
|
|
6764
|
+
* Gets the current extent bounding box of of the given fluid storage's segment.
|
|
6765
|
+
*/
|
|
6766
|
+
get_fluid_segment_extent_bounding_box(this: void, index: FluidStorageIndex): BoundingBox;
|
|
6767
|
+
/**
|
|
6768
|
+
* Gets the filter of the given fluid storage's segment. The filter is based on the filters set on the fluidboxes of the segment, so it can't be set directly on the segment.
|
|
6769
|
+
*/
|
|
6770
|
+
get_fluid_segment_filter(this: void, index: FluidStorageIndex): FluidFilter | null;
|
|
6771
|
+
/**
|
|
6772
|
+
* The fluid within the given storage's fluid segment.
|
|
6773
|
+
*/
|
|
6774
|
+
get_fluid_segment_fluid(this: void, index: FluidStorageIndex): Fluid | null;
|
|
6775
|
+
get_fluid_segment_id(this: void, index: FluidStorageIndex): uint32;
|
|
6266
6776
|
/**
|
|
6267
6777
|
* Checks what is expected fluid to be produced from the offshore pump's source tile. It accounts for visible tile, hidden tile and double hidden tile. It ignores currently set fluid box filter.
|
|
6268
6778
|
* @returns Name of fluid that should be produced by this offshore pump based on existing tiles.
|
|
@@ -6315,10 +6825,11 @@ interface LuaEntity extends LuaControl {
|
|
|
6315
6825
|
/**
|
|
6316
6826
|
* Get an item insert specification onto a belt connectable: for a given map position provides into which line at what position item should be inserted to be closest to the provided position.
|
|
6317
6827
|
* @param position Position where the item is to be inserted.
|
|
6828
|
+
* @param mirrored When inserting at position exactly in between lines, mirroring is used to choose line.
|
|
6318
6829
|
* @returns [0] - Index of the transport line that is closest to the provided map position.
|
|
6319
6830
|
* @returns [1] - Position along the transport line where item should be dropped.
|
|
6320
6831
|
*/
|
|
6321
|
-
get_item_insert_specification(this: void, position: MapPosition): LuaMultiReturn<[
|
|
6832
|
+
get_item_insert_specification(this: void, position: MapPosition, mirrored?: boolean): LuaMultiReturn<[
|
|
6322
6833
|
uint32,
|
|
6323
6834
|
float
|
|
6324
6835
|
]>;
|
|
@@ -6473,6 +6984,19 @@ interface LuaEntity extends LuaControl {
|
|
|
6473
6984
|
* The train currently stopped at this train stop, if any.
|
|
6474
6985
|
*/
|
|
6475
6986
|
get_stopped_train(this: void): LuaTrain | null;
|
|
6987
|
+
/**
|
|
6988
|
+
* @param item Item for which a stored durability is requested.
|
|
6989
|
+
* @returns Durability stored.
|
|
6990
|
+
*/
|
|
6991
|
+
get_stored_durability(this: void, item: ItemID): LabStoredDurability;
|
|
6992
|
+
/**
|
|
6993
|
+
* Gets selected runtime tooltip field.
|
|
6994
|
+
*/
|
|
6995
|
+
get_tooltip_field(this: void, id: uint32): RuntimeTooltipField | null;
|
|
6996
|
+
/**
|
|
6997
|
+
* Gets all runtime tooltip fields attached to this entity.
|
|
6998
|
+
*/
|
|
6999
|
+
get_tooltip_fields(this: void): RuntimeTooltipField[];
|
|
6476
7000
|
/**
|
|
6477
7001
|
* The trains scheduled to stop at this train stop.
|
|
6478
7002
|
*/
|
|
@@ -6516,12 +7040,16 @@ interface LuaEntity extends LuaControl {
|
|
|
6516
7040
|
* @returns `true` if this entity has the given flag set.
|
|
6517
7041
|
*/
|
|
6518
7042
|
has_flag(this: void, flag: EntityPrototypeFlag): boolean;
|
|
7043
|
+
/**
|
|
7044
|
+
* Whether the given fluid storage has a fluid segment.
|
|
7045
|
+
*/
|
|
7046
|
+
has_fluid_segment(this: void, index: FluidStorageIndex): boolean;
|
|
6519
7047
|
/**
|
|
6520
7048
|
* Insert fluid into this entity. Fluidbox is chosen automatically.
|
|
6521
7049
|
* @param fluid Fluid to insert.
|
|
6522
7050
|
* @returns Amount of fluid actually inserted.
|
|
6523
7051
|
*/
|
|
6524
|
-
insert_fluid(this: void, fluid: Fluid):
|
|
7052
|
+
insert_fluid(this: void, fluid: Fluid): FluidAmount;
|
|
6525
7053
|
/**
|
|
6526
7054
|
* The same as {@link LuaInventory::supports_bar | runtime:LuaInventory::supports_bar} but also works for ghosts where the inventory is not available through {@link LuaControl::get_inventory | runtime:LuaControl::get_inventory}.
|
|
6527
7055
|
*/
|
|
@@ -6647,20 +7175,19 @@ interface LuaEntity extends LuaControl {
|
|
|
6647
7175
|
*/
|
|
6648
7176
|
release_from_spawner(this: void): void;
|
|
6649
7177
|
/**
|
|
6650
|
-
*
|
|
6651
|
-
*
|
|
6652
|
-
* If temperature is given only fluid matching that exact temperature is removed. If minimum and maximum is given fluid within that range is removed.
|
|
6653
|
-
* @param table.name Fluid prototype name.
|
|
6654
|
-
* @param table.amount Amount to remove
|
|
6655
|
-
* @returns Amount of fluid actually removed.
|
|
7178
|
+
* Removes the given fluid amount from the entity's given fluid storage if possible.
|
|
7179
|
+
* @returns The fluid removed.
|
|
6656
7180
|
*/
|
|
6657
|
-
remove_fluid(this: void,
|
|
6658
|
-
|
|
6659
|
-
|
|
6660
|
-
|
|
6661
|
-
|
|
6662
|
-
|
|
6663
|
-
|
|
7181
|
+
remove_fluid(this: void, index: FluidStorageIndex, amount: FluidAmount): Fluid | null;
|
|
7182
|
+
/**
|
|
7183
|
+
* Removes linked fluidbox connection record. If connected, other end will be also removed.
|
|
7184
|
+
*/
|
|
7185
|
+
remove_fluid_box_linked_connection(this: void, this_linked_connection_id: uint32): void;
|
|
7186
|
+
/**
|
|
7187
|
+
* Removes the given fluid amount from the given storage's fluid segment if possible.
|
|
7188
|
+
* @returns The fluid removed.
|
|
7189
|
+
*/
|
|
7190
|
+
remove_fluid_segment_fluid(this: void, index: FluidStorageIndex, amount: FluidAmount): Fluid | null;
|
|
6664
7191
|
/**
|
|
6665
7192
|
* Remove an offer from a market.
|
|
6666
7193
|
*
|
|
@@ -6690,7 +7217,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6690
7217
|
raise_revive?: boolean;
|
|
6691
7218
|
overflow?: LuaInventory;
|
|
6692
7219
|
}): LuaMultiReturn<[
|
|
6693
|
-
|
|
7220
|
+
ItemWithQualityCount[] | null,
|
|
6694
7221
|
LuaEntity | null,
|
|
6695
7222
|
LuaEntity | null
|
|
6696
7223
|
]>;
|
|
@@ -6725,14 +7252,24 @@ interface LuaEntity extends LuaControl {
|
|
|
6725
7252
|
*/
|
|
6726
7253
|
set_filter(this: void, index: uint32, filter?: ItemFilter | ItemWithQualityID | EntityID | AsteroidChunkID): void;
|
|
6727
7254
|
/**
|
|
6728
|
-
* Sets
|
|
7255
|
+
* Sets the fluid in the entity's given fluid storage to the provided fluid if possible.
|
|
7256
|
+
*
|
|
7257
|
+
* Fluid filters may block setting the fluid, or less fluid may be set if it's more than the maximum capacity.
|
|
7258
|
+
* @returns How much of the given fluid was actually set.
|
|
7259
|
+
*/
|
|
7260
|
+
set_fluid(this: void, index: FluidStorageIndex, fluid: Fluid): FluidAmount;
|
|
7261
|
+
/**
|
|
7262
|
+
* Set a fluidbox filter, such as the filter of a pump.
|
|
6729
7263
|
*
|
|
6730
|
-
*
|
|
6731
|
-
* @
|
|
6732
|
-
|
|
6733
|
-
|
|
7264
|
+
* Some entities cannot have their fluidbox filter set, notably fluid wagons and crafting machines.
|
|
7265
|
+
* @returns Whether the filter was set.
|
|
7266
|
+
*/
|
|
7267
|
+
set_fluid_filter(this: void, index: FluidStorageIndex, filter?: FluidFilter): boolean;
|
|
7268
|
+
/**
|
|
7269
|
+
* Sets the fluid within the given storage's fluid segment.
|
|
7270
|
+
* @returns The amount of fluid set.
|
|
6734
7271
|
*/
|
|
6735
|
-
|
|
7272
|
+
set_fluid_segment_fluid(this: void, index: FluidStorageIndex, fluid: Fluid): FluidAmount;
|
|
6736
7273
|
/**
|
|
6737
7274
|
* Sets the heat setting for this heat interface.
|
|
6738
7275
|
* @param filter The new setting.
|
|
@@ -6793,7 +7330,17 @@ interface LuaEntity extends LuaControl {
|
|
|
6793
7330
|
* @param quality The quality. If not provided `normal` is used.
|
|
6794
7331
|
* @returns Any items removed from this entity as a result of setting the recipe.
|
|
6795
7332
|
*/
|
|
6796
|
-
set_recipe(this: void, recipe?: RecipeID, quality?: QualityID):
|
|
7333
|
+
set_recipe(this: void, recipe?: RecipeID, quality?: QualityID): ItemWithQualityCount[];
|
|
7334
|
+
/**
|
|
7335
|
+
* @param item Item for which a stored durability is requested.
|
|
7336
|
+
* @param durability Durability to set.
|
|
7337
|
+
*/
|
|
7338
|
+
set_stored_durability(this: void, item: ItemID, durability: LabStoredDurability): void;
|
|
7339
|
+
/**
|
|
7340
|
+
* Adds or changes runtime tooltip field. If `id` is not given a new one will be allocated in a way that makes it unique within this entity. If a value is given that is already used, existing line will be updated.
|
|
7341
|
+
* @returns Identifier of the record that was given or allocated.
|
|
7342
|
+
*/
|
|
7343
|
+
set_tooltip_field(this: void, field: RuntimeTooltipField): uint32;
|
|
6797
7344
|
/**
|
|
6798
7345
|
* Revives a ghost silently, so the revival makes no sound and no smoke is created.
|
|
6799
7346
|
* @param table.raise_revive If true, and an entity ghost; {@link script_raised_revive | runtime:script_raised_revive} will be called. Else if true, and a tile ghost; {@link script_raised_set_tiles | runtime:script_raised_set_tiles} will be called.
|
|
@@ -6806,7 +7353,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6806
7353
|
raise_revive?: boolean;
|
|
6807
7354
|
overflow?: LuaInventory;
|
|
6808
7355
|
}): LuaMultiReturn<[
|
|
6809
|
-
|
|
7356
|
+
ItemWithQualityCount[],
|
|
6810
7357
|
LuaEntity | null,
|
|
6811
7358
|
LuaEntity | null
|
|
6812
7359
|
]>;
|
|
@@ -6846,22 +7393,20 @@ interface LuaEntity extends LuaControl {
|
|
|
6846
7393
|
update_connections(this: void): void;
|
|
6847
7394
|
readonly absorbed_pollution: double;
|
|
6848
7395
|
/**
|
|
6849
|
-
*
|
|
6850
|
-
*
|
|
6851
|
-
* Reading from this returns `false` if the entity is deactivated in at least one of the following ways: {@link by script | runtime:LuaEntity::disabled_by_script}, {@link by circuit network | runtime:LuaEntity::disabled_by_control_behavior}, {@link by recipe | runtime:LuaEntity::disabled_by_recipe}, {@link by freezing | runtime:LuaEntity::frozen}, or by deconstruction.
|
|
7396
|
+
* A deactivated entity will stop all of its operations (car will stop moving, inserters will stop working, fish will stop moving, etc).
|
|
6852
7397
|
*
|
|
6853
|
-
*
|
|
7398
|
+
* Reading from this returns `false` if the entity is deactivated in at least one of the following ways: {@link by script | runtime:LuaEntity::disabled_by_script}, {@link by circuit network | runtime:LuaEntity::disabled_by_control_behavior}, {@link by recipe | runtime:LuaEntity::disabled_by_recipe}, {@link by freezing | runtime:LuaEntity::frozen}, or by being marked for deconstruction.
|
|
6854
7399
|
*
|
|
6855
|
-
*
|
|
7400
|
+
* If this entity is not considered {@link updatable | runtime:LuaEntity::is_updatable} then this always returns `false`.
|
|
6856
7401
|
*/
|
|
6857
|
-
active: boolean;
|
|
7402
|
+
readonly active: boolean;
|
|
6858
7403
|
/**
|
|
6859
|
-
* The
|
|
7404
|
+
* The AI settings of this unit.
|
|
6860
7405
|
*/
|
|
6861
7406
|
readonly ai_settings: LuaAISettings;
|
|
6862
7407
|
alert_parameters: ProgrammableSpeakerAlertParameters;
|
|
6863
7408
|
/**
|
|
6864
|
-
* Whether this
|
|
7409
|
+
* Whether this entity's personal roboports are allowed to dispatch robots.
|
|
6865
7410
|
*/
|
|
6866
7411
|
allow_dispatching_robots: boolean;
|
|
6867
7412
|
/**
|
|
@@ -6909,6 +7454,12 @@ interface LuaEntity extends LuaControl {
|
|
|
6909
7454
|
* The queued destination positions of spidertron's autopilot.
|
|
6910
7455
|
*/
|
|
6911
7456
|
readonly autopilot_destinations: MapPosition[];
|
|
7457
|
+
/**
|
|
7458
|
+
* When there are this many waypoints left the spider vehicle will start patrolling along them.
|
|
7459
|
+
*
|
|
7460
|
+
* Setting this to 0 will disable patrolling.
|
|
7461
|
+
*/
|
|
7462
|
+
autopilot_patrol_size: uint32;
|
|
6912
7463
|
/**
|
|
6913
7464
|
* 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.
|
|
6914
7465
|
*
|
|
@@ -6921,7 +7472,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6921
7472
|
*/
|
|
6922
7473
|
readonly beacons_count?: uint32;
|
|
6923
7474
|
/**
|
|
6924
|
-
* The belt connectable neighbours of this belt connectable entity. Only entities that input to or are outputs of this entity. Does not contain the other end of an underground belt, see {@link LuaEntity::
|
|
7475
|
+
* The belt connectable neighbours of this belt connectable entity. Only entities that input to or are outputs of this entity. Does not contain the other end of an underground belt, see {@link LuaEntity::underground_belt_neighbour | runtime:LuaEntity::underground_belt_neighbour} for that.
|
|
6925
7476
|
*/
|
|
6926
7477
|
readonly belt_neighbours: {
|
|
6927
7478
|
/**
|
|
@@ -6998,6 +7549,15 @@ interface LuaEntity extends LuaControl {
|
|
|
6998
7549
|
* The tick this character corpse died at.
|
|
6999
7550
|
*/
|
|
7000
7551
|
character_corpse_tick_of_death: uint32;
|
|
7552
|
+
/**
|
|
7553
|
+
* Table of cliff neighbours.
|
|
7554
|
+
*/
|
|
7555
|
+
readonly cliff_neighbours: {
|
|
7556
|
+
north?: LuaEntity;
|
|
7557
|
+
east?: LuaEntity;
|
|
7558
|
+
south?: LuaEntity;
|
|
7559
|
+
west?: LuaEntity;
|
|
7560
|
+
};
|
|
7001
7561
|
/**
|
|
7002
7562
|
* The orientation of this cliff.
|
|
7003
7563
|
*/
|
|
@@ -7127,7 +7687,7 @@ interface LuaEntity extends LuaControl {
|
|
|
7127
7687
|
/**
|
|
7128
7688
|
* Text visible on the display panel. Can be written only when it is not set by control behavior.
|
|
7129
7689
|
*/
|
|
7130
|
-
display_panel_text:
|
|
7690
|
+
display_panel_text: string;
|
|
7131
7691
|
/**
|
|
7132
7692
|
* Gives a draw data of the given entity if it supports such data.
|
|
7133
7693
|
*/
|
|
@@ -7174,14 +7734,38 @@ interface LuaEntity extends LuaControl {
|
|
|
7174
7734
|
* The table of emissions of this energy source in `pollution/Joule`, indexed by pollutant type. `nil` if the entity doesn't have an electric energy source. Multiplying values in the returned table by energy consumption in `Watt` gives `pollution/second`.
|
|
7175
7735
|
*/
|
|
7176
7736
|
readonly electric_emissions_per_joule?: Record<string, double>;
|
|
7737
|
+
/**
|
|
7738
|
+
* Mode this ElectricEnergyInterface is in. Mode changes how the interface interacts with electric network: if its an electric producer, consumer and what priority it has.
|
|
7739
|
+
*/
|
|
7740
|
+
electric_interface_mode: defines.electric_interface_mode;
|
|
7741
|
+
/**
|
|
7742
|
+
* Electric network this entity is connected to.
|
|
7743
|
+
*
|
|
7744
|
+
* This can be used with electric poles, in which case the network will be the same as the one obtained from copper wire connector.
|
|
7745
|
+
*
|
|
7746
|
+
* If this entity has an electric energy source, only a primary network will be provided. To also get other networks for entities in range of multiple networks, use {@link LuaEntity::electric_networks | runtime:LuaEntity::electric_networks} instead.
|
|
7747
|
+
*/
|
|
7748
|
+
readonly electric_network?: LuaElectricSubNetwork;
|
|
7177
7749
|
/**
|
|
7178
7750
|
* Returns the id of the electric network that this entity is connected to, if any.
|
|
7179
7751
|
*/
|
|
7180
7752
|
readonly electric_network_id?: uint32;
|
|
7181
7753
|
/**
|
|
7182
7754
|
* The electric network statistics for this electric pole.
|
|
7755
|
+
*
|
|
7756
|
+
* If this electric pole becomes invalid, the flow statistics obtained from it will also become invalid. If this electric pole becomes part of a different electric network, the flow statistics will be for the new electric network this pole is part of.
|
|
7183
7757
|
*/
|
|
7184
7758
|
readonly electric_network_statistics: LuaFlowStatistics;
|
|
7759
|
+
/**
|
|
7760
|
+
* Electric networks this entity with an electric energy source is connected to.
|
|
7761
|
+
*
|
|
7762
|
+
* No array is given if this entity has no electric energy source.
|
|
7763
|
+
*
|
|
7764
|
+
* Empty array will be given if this entity is not in range of any networks.
|
|
7765
|
+
*
|
|
7766
|
+
* Compared to {@link LuaEntity::electric_network | runtime:LuaEntity::electric_network}, this does not work with electric poles since they do not have an electric energy source and as such can only belong to one network at a time.
|
|
7767
|
+
*/
|
|
7768
|
+
readonly electric_networks?: LuaElectricSubNetwork[];
|
|
7185
7769
|
/**
|
|
7186
7770
|
* Whether equipment grid logistics are enabled while this vehicle is moving.
|
|
7187
7771
|
*/
|
|
@@ -7207,11 +7791,11 @@ interface LuaEntity extends LuaControl {
|
|
|
7207
7791
|
*/
|
|
7208
7792
|
readonly filter_slot_count: uint32;
|
|
7209
7793
|
/**
|
|
7210
|
-
*
|
|
7794
|
+
* A list of neighbours connected to fluidboxes of this entity. Neighbours are grouped by index of fluid box of this entity to which they are connected. For more detailed informations please use {@link LuaEntity::get_fluid_box_neighbours | runtime:LuaEntity::get_fluid_box_neighbours}.
|
|
7211
7795
|
*/
|
|
7212
|
-
readonly
|
|
7796
|
+
readonly fluidbox_neighbours: LuaEntity[][];
|
|
7213
7797
|
/**
|
|
7214
|
-
* Returns count of fluid storages. This includes fluid storages provided by fluidboxes but also covers other fluid storages like fluid turret's internal buffer and fluid wagon's fluid
|
|
7798
|
+
* Returns count of fluid storages. This includes fluid storages provided by fluidboxes but also covers other fluid storages like fluid turret's internal buffer and fluid wagon's fluid.
|
|
7215
7799
|
*/
|
|
7216
7800
|
readonly fluids_count: uint32;
|
|
7217
7801
|
/**
|
|
@@ -7316,6 +7900,10 @@ interface LuaEntity extends LuaControl {
|
|
|
7316
7900
|
* If this is not an infinite resource, writing will produce an error.
|
|
7317
7901
|
*/
|
|
7318
7902
|
initial_amount?: uint32;
|
|
7903
|
+
/**
|
|
7904
|
+
* Max amount of energy this ElectricEnergyInterface will take from electric network in one tick.
|
|
7905
|
+
*/
|
|
7906
|
+
input_flow_limit: double;
|
|
7319
7907
|
/**
|
|
7320
7908
|
* The insert plan for this ghost or item request proxy.
|
|
7321
7909
|
*/
|
|
@@ -7371,7 +7959,7 @@ interface LuaEntity extends LuaControl {
|
|
|
7371
7959
|
/**
|
|
7372
7960
|
* Items this ghost will request when revived or items this item request proxy is requesting.
|
|
7373
7961
|
*/
|
|
7374
|
-
readonly item_requests:
|
|
7962
|
+
readonly item_requests: ItemWithQualityCount[];
|
|
7375
7963
|
/**
|
|
7376
7964
|
* The number of units killed by this turret, artillery turret, or artillery wagon.
|
|
7377
7965
|
*/
|
|
@@ -7438,10 +8026,8 @@ interface LuaEntity extends LuaControl {
|
|
|
7438
8026
|
* Not minable entities can still be destroyed.
|
|
7439
8027
|
*
|
|
7440
8028
|
* Tells if entity reports as being minable right now. This takes into account `minable_flag` and entity specific conditions (for example rail under rolling stocks is not minable, vehicle with passenger is not minable).
|
|
7441
|
-
*
|
|
7442
|
-
* Write to this field since 2.0.26 is deprecated and it will result in write to `minable_flag` instead.
|
|
7443
8029
|
*/
|
|
7444
|
-
minable: boolean;
|
|
8030
|
+
readonly minable: boolean;
|
|
7445
8031
|
/**
|
|
7446
8032
|
* Script controlled flag that allows entity to be mined.
|
|
7447
8033
|
*/
|
|
@@ -7454,10 +8040,6 @@ interface LuaEntity extends LuaControl {
|
|
|
7454
8040
|
* The filter mode for this mining drill. `nil` if this mining drill doesn't have filters.
|
|
7455
8041
|
*/
|
|
7456
8042
|
mining_drill_filter_mode?: 'whitelist' | 'blacklist';
|
|
7457
|
-
/**
|
|
7458
|
-
* 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.
|
|
7459
|
-
*/
|
|
7460
|
-
mining_progress?: double;
|
|
7461
8043
|
/**
|
|
7462
8044
|
* The mining target, if any.
|
|
7463
8045
|
*/
|
|
@@ -7481,15 +8063,9 @@ interface LuaEntity extends LuaControl {
|
|
|
7481
8063
|
*/
|
|
7482
8064
|
readonly neighbour_bonus: double;
|
|
7483
8065
|
/**
|
|
7484
|
-
*
|
|
7485
|
-
* Differs depending on the type of entity:
|
|
7486
|
-
*
|
|
7487
|
-
* - When called on a pipe-connectable entity, this is an array of entity arrays of all entities a given fluidbox is connected to.
|
|
7488
|
-
* - When called on an underground transport belt, this is the other end of the underground belt connection, or `nil` if none.
|
|
7489
|
-
* - When called on a wall-connectable entity, reactor or heat pipe, this is a dictionary of all connections indexed by the connection direction "north", "south", "east", and "west".
|
|
7490
|
-
* - When called on a cliff entity, this is a dictionary of all connections indexed by the connection direction "north", "south", "east", and "west".
|
|
8066
|
+
* Connections of a {@link neighbour connectable | runtime:LuaEntityPrototype::neighbour_connectable} entity. Includes connections that aren't currently connected to another entity.
|
|
7491
8067
|
*/
|
|
7492
|
-
readonly
|
|
8068
|
+
readonly neighbour_connectable_connections: NeighbourConnectableConnection[];
|
|
7493
8069
|
/**
|
|
7494
8070
|
* 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.
|
|
7495
8071
|
*/
|
|
@@ -7502,6 +8078,14 @@ interface LuaEntity extends LuaControl {
|
|
|
7502
8078
|
* The smooth orientation of this entity. For turrets this is the orientation of the weapon.
|
|
7503
8079
|
*/
|
|
7504
8080
|
orientation: RealOrientation;
|
|
8081
|
+
/**
|
|
8082
|
+
* Max amount of energy this ElectricEnergyInterface will provide to electric network in one tick.
|
|
8083
|
+
*/
|
|
8084
|
+
output_flow_limit: double;
|
|
8085
|
+
/**
|
|
8086
|
+
* The override logistic mode being used by this infinity container if it is overridden.
|
|
8087
|
+
*/
|
|
8088
|
+
override_logistic_mode?: defines.logistic_mode;
|
|
7505
8089
|
/**
|
|
7506
8090
|
* Plants registered by this agricultural tower. One plant can be registered in multiple agricultural towers.
|
|
7507
8091
|
*/
|
|
@@ -7567,6 +8151,10 @@ interface LuaEntity extends LuaControl {
|
|
|
7567
8151
|
* The number of products this machine finished crafting in its lifetime.
|
|
7568
8152
|
*/
|
|
7569
8153
|
products_finished: uint32;
|
|
8154
|
+
/**
|
|
8155
|
+
* Automated weapons won't target protected entities.
|
|
8156
|
+
*/
|
|
8157
|
+
protected: boolean;
|
|
7570
8158
|
/**
|
|
7571
8159
|
* The entity prototype of this entity.
|
|
7572
8160
|
*/
|
|
@@ -7584,9 +8172,13 @@ interface LuaEntity extends LuaControl {
|
|
|
7584
8172
|
*/
|
|
7585
8173
|
proxy_target_inventory: defines.inventory;
|
|
7586
8174
|
/**
|
|
7587
|
-
* The rail
|
|
8175
|
+
* The rail targets of this pump's input
|
|
8176
|
+
*/
|
|
8177
|
+
readonly pump_input_rail_targets: LuaEntity[];
|
|
8178
|
+
/**
|
|
8179
|
+
* The rail targets of this pump's output
|
|
7588
8180
|
*/
|
|
7589
|
-
readonly
|
|
8181
|
+
readonly pump_output_rail_targets: LuaEntity[];
|
|
7590
8182
|
/**
|
|
7591
8183
|
* The amount of fluid moved by this offshore pump or normal pump in the last tick.
|
|
7592
8184
|
*/
|
|
@@ -7688,6 +8280,34 @@ interface LuaEntity extends LuaControl {
|
|
|
7688
8280
|
* Entities that are not rotatable naturally (like chest or furnace) can't be set to be rotatable.
|
|
7689
8281
|
*/
|
|
7690
8282
|
rotatable: boolean;
|
|
8283
|
+
/**
|
|
8284
|
+
* The saved logistic requests if they exist.
|
|
8285
|
+
*
|
|
8286
|
+
* They exist when the infinity container was switched away from having the option to set logistic requests, for example by changing the {@link logistic mode | runtime:LuaEntity::override_logistic_mode} away from requester or buffer.
|
|
8287
|
+
*/
|
|
8288
|
+
saved_request_filters?: SavedLogisticFilters;
|
|
8289
|
+
/**
|
|
8290
|
+
* The saved request from buffers value if one exists.
|
|
8291
|
+
*
|
|
8292
|
+
* The value exists when the infinity container was switched away from having the request from buffers option, for example by changing the {@link logistic mode | runtime:LuaEntity::override_logistic_mode} away from requester.
|
|
8293
|
+
*/
|
|
8294
|
+
saved_request_from_buffers?: boolean;
|
|
8295
|
+
/**
|
|
8296
|
+
* The saved set requests value if one exists.
|
|
8297
|
+
*
|
|
8298
|
+
* The value exists when the infinity container was switched away from having the set requests option, for example by changing the {@link logistic mode | runtime:LuaEntity::override_logistic_mode} away from requester or buffer.
|
|
8299
|
+
*/
|
|
8300
|
+
saved_set_requests?: boolean;
|
|
8301
|
+
/**
|
|
8302
|
+
* The saved storage filters if they exist.
|
|
8303
|
+
*
|
|
8304
|
+
* They exist when the infinity container was switched away from having the option to set storage filters, for example by changing the {@link logistic mode | runtime:LuaEntity::override_logistic_mode} away from storage.
|
|
8305
|
+
*/
|
|
8306
|
+
saved_storage_filters?: SavedLogisticFilters;
|
|
8307
|
+
/**
|
|
8308
|
+
* Amount of train stop reservations taken by script.
|
|
8309
|
+
*/
|
|
8310
|
+
script_reservations_count: uint32;
|
|
7691
8311
|
/**
|
|
7692
8312
|
* The secondary bounding box of this entity or `nil` if it doesn't have one. This only exists for curved rails, and is automatically determined by the game.
|
|
7693
8313
|
*/
|
|
@@ -7838,6 +8458,10 @@ interface LuaEntity extends LuaControl {
|
|
|
7838
8458
|
* The train this rolling stock belongs to, if any. `nil` if this is not a rolling stock.
|
|
7839
8459
|
*/
|
|
7840
8460
|
readonly train?: LuaTrain;
|
|
8461
|
+
/**
|
|
8462
|
+
* Amount of train stop reservations taken by trains.
|
|
8463
|
+
*/
|
|
8464
|
+
readonly train_reservations_count: uint32;
|
|
7841
8465
|
/**
|
|
7842
8466
|
* Priority of this train stop.
|
|
7843
8467
|
*/
|
|
@@ -7848,6 +8472,8 @@ interface LuaEntity extends LuaControl {
|
|
|
7848
8472
|
* Train may be included multiple times when braking distance covers this train stop multiple times.
|
|
7849
8473
|
*
|
|
7850
8474
|
* Value may be read even when train stop has no control behavior.
|
|
8475
|
+
*
|
|
8476
|
+
* This value is equal to LuaEntity::train_reservations_count + LuaEntity::script_reservations_count.
|
|
7851
8477
|
*/
|
|
7852
8478
|
readonly trains_count: uint32;
|
|
7853
8479
|
/**
|
|
@@ -7892,6 +8518,10 @@ interface LuaEntity extends LuaControl {
|
|
|
7892
8518
|
* The entity prototype type of this entity.
|
|
7893
8519
|
*/
|
|
7894
8520
|
readonly type: string;
|
|
8521
|
+
/**
|
|
8522
|
+
* Neighbour underground belt connected to this underground belt through underground lines.
|
|
8523
|
+
*/
|
|
8524
|
+
readonly underground_belt_neighbour?: LuaEntity;
|
|
7895
8525
|
/**
|
|
7896
8526
|
* A unique number identifying this entity for the lifetime of the save. These are allocated sequentially, and not re-used (until overflow).
|
|
7897
8527
|
*
|
|
@@ -7928,6 +8558,15 @@ interface LuaEntity extends LuaControl {
|
|
|
7928
8558
|
* Read when this spidertron auto-targets enemies
|
|
7929
8559
|
*/
|
|
7930
8560
|
vehicle_automatic_targeting_parameters: VehicleAutomaticTargetingParameters;
|
|
8561
|
+
/**
|
|
8562
|
+
* Table of wall-connectable neighbours.
|
|
8563
|
+
*/
|
|
8564
|
+
readonly wall_neighbours: {
|
|
8565
|
+
north?: LuaEntity;
|
|
8566
|
+
east?: LuaEntity;
|
|
8567
|
+
south?: LuaEntity;
|
|
8568
|
+
west?: LuaEntity;
|
|
8569
|
+
};
|
|
7931
8570
|
}
|
|
7932
8571
|
/**
|
|
7933
8572
|
* Prototype of an entity.
|
|
@@ -7938,6 +8577,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
7938
8577
|
* The crafting speed of this crafting-machine or character.
|
|
7939
8578
|
*/
|
|
7940
8579
|
get_crafting_speed(this: void, quality?: QualityID): double;
|
|
8580
|
+
get_duration(this: void, quality?: QualityID): uint32 | null;
|
|
7941
8581
|
get_energy_distribution_efficiency(this: void, quality?: QualityID): double | null;
|
|
7942
8582
|
/**
|
|
7943
8583
|
* Gets the fluid capacity of this entity or 0 if this entity doesn't support fluids.
|
|
@@ -7961,7 +8601,8 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
7961
8601
|
* Gets the base size of the given inventory on this entity or `nil` if the given inventory doesn't exist.
|
|
7962
8602
|
* @param quality Defaults to `"normal"`.
|
|
7963
8603
|
*/
|
|
7964
|
-
get_inventory_size(this: void, index: defines.inventory, quality?: QualityID):
|
|
8604
|
+
get_inventory_size(this: void, index: defines.inventory, quality?: QualityID): ItemStackIndex | null;
|
|
8605
|
+
get_inventory_size_bonus(this: void, quality?: QualityID): ItemStackIndex | null;
|
|
7965
8606
|
/**
|
|
7966
8607
|
* The maximum circuit wire distance for this entity. 0 if the entity doesn't support circuit wires.
|
|
7967
8608
|
*/
|
|
@@ -7994,6 +8635,10 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
7994
8635
|
* The maximum power output of this burner generator or generator prototype.
|
|
7995
8636
|
*/
|
|
7996
8637
|
get_max_power_output(this: void, quality?: QualityID): double | null;
|
|
8638
|
+
/**
|
|
8639
|
+
* The maximum speed of this rolling stock if defined.
|
|
8640
|
+
*/
|
|
8641
|
+
get_max_speed(this: void, quality?: QualityID): double | null;
|
|
7997
8642
|
/**
|
|
7998
8643
|
* The maximum wire distance for this entity. 0 if the entity doesn't support wires.
|
|
7999
8644
|
*/
|
|
@@ -8024,17 +8669,24 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8024
8669
|
* @returns `true` if this prototype has the given flag set.
|
|
8025
8670
|
*/
|
|
8026
8671
|
has_flag(this: void, flag: EntityPrototypeFlag): boolean;
|
|
8672
|
+
readonly absorptions_per_second: Record<string, EnemySpawnerAbsorption>;
|
|
8027
8673
|
/**
|
|
8028
8674
|
* A table of pollutions amounts that has to be absorbed by the unit's spawner before the unit will leave the spawner and attack the source of the pollution, indexed by the name of each absorbed pollution type.
|
|
8029
8675
|
*/
|
|
8030
8676
|
readonly absorptions_to_join_attack?: Record<string, float>;
|
|
8677
|
+
readonly acceleration?: double;
|
|
8031
8678
|
readonly acceleration_rate: double;
|
|
8032
8679
|
readonly accepted_seeds?: string[];
|
|
8680
|
+
readonly action?: TriggerItem[];
|
|
8681
|
+
readonly action_cooldown?: uint32;
|
|
8682
|
+
readonly action_triggered_automatically?: boolean;
|
|
8033
8683
|
readonly activation_buffer_ratio?: FluidAmount;
|
|
8684
|
+
readonly activation_distance?: double;
|
|
8034
8685
|
/**
|
|
8035
8686
|
* The active energy usage of this rocket silo or combinator prototype.
|
|
8036
8687
|
*/
|
|
8037
8688
|
readonly active_energy_usage?: double;
|
|
8689
|
+
readonly add_fuel_cooldown?: uint32;
|
|
8038
8690
|
/**
|
|
8039
8691
|
* Entities this entity can be pasted onto in addition to the normal allowed ones.
|
|
8040
8692
|
*/
|
|
@@ -8044,10 +8696,13 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8044
8696
|
*/
|
|
8045
8697
|
readonly affected_by_tiles?: boolean;
|
|
8046
8698
|
readonly agricultural_tower_radius?: double;
|
|
8699
|
+
readonly ai_settings?: UnitAISettings;
|
|
8047
8700
|
/**
|
|
8048
8701
|
* The air resistance of this rolling stock prototype.
|
|
8049
8702
|
*/
|
|
8050
8703
|
readonly air_resistance?: double;
|
|
8704
|
+
readonly alarm_trigger?: TriggerEffectItem[];
|
|
8705
|
+
readonly alert_after_time: uint32;
|
|
8051
8706
|
/**
|
|
8052
8707
|
* The alert icon scale of this entity prototype.
|
|
8053
8708
|
*/
|
|
@@ -8068,10 +8723,13 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8068
8723
|
* Whether this market allows access to all forces or just friendly ones.
|
|
8069
8724
|
*/
|
|
8070
8725
|
readonly allow_access_to_all_forces?: boolean;
|
|
8726
|
+
readonly allow_blueprint_connection?: boolean;
|
|
8071
8727
|
/**
|
|
8072
8728
|
* Whether this inserter allows burner leeching.
|
|
8073
8729
|
*/
|
|
8074
8730
|
readonly allow_burner_leech?: boolean;
|
|
8731
|
+
readonly allow_clone_connection?: boolean;
|
|
8732
|
+
readonly allow_container_interaction?: boolean;
|
|
8075
8733
|
/**
|
|
8076
8734
|
* When false copy-paste is not allowed for this entity.
|
|
8077
8735
|
*/
|
|
@@ -8080,14 +8738,20 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8080
8738
|
* Whether this inserter allows custom pickup and drop vectors.
|
|
8081
8739
|
*/
|
|
8082
8740
|
readonly allow_custom_vectors?: boolean;
|
|
8741
|
+
readonly allow_manual_color?: boolean;
|
|
8083
8742
|
/**
|
|
8084
8743
|
* Whether this vehicle allows passengers.
|
|
8085
8744
|
*/
|
|
8086
8745
|
readonly allow_passengers?: boolean;
|
|
8746
|
+
readonly allow_rail_interaction?: boolean;
|
|
8747
|
+
readonly allow_robot_dispatch_in_automatic_mode?: boolean;
|
|
8087
8748
|
/**
|
|
8088
8749
|
* True if this entity-with-owner's is_military_target can be changed run-time (on the entity, not on the prototype itself)
|
|
8089
8750
|
*/
|
|
8090
8751
|
readonly allow_run_time_change_of_is_military_target?: boolean;
|
|
8752
|
+
readonly allow_side_loading?: boolean;
|
|
8753
|
+
readonly allow_turning_when_starting_attack?: boolean;
|
|
8754
|
+
readonly allow_unloading?: boolean;
|
|
8091
8755
|
/**
|
|
8092
8756
|
* The allowed module effects for this entity, if any.
|
|
8093
8757
|
*/
|
|
@@ -8104,6 +8768,10 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8104
8768
|
* Name of the ammo category of this land mine.
|
|
8105
8769
|
*/
|
|
8106
8770
|
readonly ammo_category?: string;
|
|
8771
|
+
/**
|
|
8772
|
+
* The max stack size of ammo in this artillery turret or artillery wagon.
|
|
8773
|
+
*/
|
|
8774
|
+
readonly ammo_stack_limit?: ItemCountType;
|
|
8107
8775
|
/**
|
|
8108
8776
|
* The animation speed coefficient of this belt connectable prototype.
|
|
8109
8777
|
*/
|
|
@@ -8114,10 +8782,12 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8114
8782
|
readonly arm_count_base?: uint32;
|
|
8115
8783
|
readonly arm_count_quality_scaling?: uint32;
|
|
8116
8784
|
readonly arm_energy_usage?: double;
|
|
8117
|
-
readonly arm_inventory_size_quality_increase?:
|
|
8785
|
+
readonly arm_inventory_size_quality_increase?: ItemStackIndex;
|
|
8118
8786
|
readonly arm_slow_energy_usage?: double;
|
|
8119
8787
|
readonly arm_speed_base?: float;
|
|
8120
8788
|
readonly arm_speed_quality_scaling?: float;
|
|
8789
|
+
readonly arms_speed_modifier_per_quality_level?: double;
|
|
8790
|
+
readonly attach_to_target?: boolean;
|
|
8121
8791
|
/**
|
|
8122
8792
|
* The attack parameters for this entity, if any.
|
|
8123
8793
|
*/
|
|
@@ -8127,9 +8797,12 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8127
8797
|
* The attack result of this entity, if any.
|
|
8128
8798
|
*/
|
|
8129
8799
|
readonly attack_result?: TriggerItem[];
|
|
8800
|
+
readonly attack_target_mask: TriggerTargetMask;
|
|
8130
8801
|
readonly attacking_speed?: double;
|
|
8131
8802
|
readonly attractor_hit_effect?: TriggerItem[];
|
|
8803
|
+
readonly auto_connect_up_to_n_wires?: uint8;
|
|
8132
8804
|
readonly auto_setup_collision_box: boolean;
|
|
8805
|
+
readonly auto_sort_inventory?: boolean;
|
|
8133
8806
|
/**
|
|
8134
8807
|
* The amount of ammo that inserters automatically insert into this ammo turret, artillery turret or artillery wagon.
|
|
8135
8808
|
*/
|
|
@@ -8160,10 +8833,6 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8160
8833
|
* The braking force of this vehicle prototype.
|
|
8161
8834
|
*/
|
|
8162
8835
|
readonly braking_force?: double;
|
|
8163
|
-
/**
|
|
8164
|
-
* The evolution requirement to build this entity as a base when expanding enemy bases.
|
|
8165
|
-
*/
|
|
8166
|
-
readonly build_base_evolution_requirement: double;
|
|
8167
8836
|
readonly build_distance?: uint32;
|
|
8168
8837
|
/**
|
|
8169
8838
|
* The log2 of {@link grid size | prototype:EntityPrototype::build_grid_size} of the building.
|
|
@@ -8182,11 +8851,17 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8182
8851
|
*/
|
|
8183
8852
|
readonly burns_fluid?: boolean;
|
|
8184
8853
|
readonly call_for_help_radius?: double;
|
|
8854
|
+
readonly can_launch_without_landing_pads?: boolean;
|
|
8185
8855
|
/**
|
|
8186
8856
|
* Whether this unit prototype can open gates.
|
|
8187
8857
|
*/
|
|
8188
8858
|
readonly can_open_gates?: boolean;
|
|
8859
|
+
readonly can_retarget_while_starting_attack?: boolean;
|
|
8860
|
+
readonly cant_insert_at_source_message_key?: string;
|
|
8861
|
+
readonly capture_speed?: double;
|
|
8189
8862
|
readonly captured_spawner_entity?: LuaEntityPrototype;
|
|
8863
|
+
readonly cargo_pod_entity?: LuaEntityPrototype;
|
|
8864
|
+
readonly cargo_station_parameters?: CargoStationParameters;
|
|
8190
8865
|
/**
|
|
8191
8866
|
* The chain shooting cooldown modifier of this spider vehicle prototype.
|
|
8192
8867
|
*/
|
|
@@ -8196,10 +8871,14 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8196
8871
|
* The chunk exploration radius of this vehicle prototype.
|
|
8197
8872
|
*/
|
|
8198
8873
|
readonly chunk_exploration_radius?: double;
|
|
8874
|
+
readonly clamps_off_trigger?: TriggerEffectItem[];
|
|
8875
|
+
readonly clamps_on_trigger?: TriggerEffectItem[];
|
|
8199
8876
|
/**
|
|
8200
8877
|
* The item prototype name used to destroy this cliff.
|
|
8201
8878
|
*/
|
|
8202
8879
|
readonly cliff_explosive_prototype?: string;
|
|
8880
|
+
readonly cliff_removal_probability?: double;
|
|
8881
|
+
readonly close_door_trigger_effect?: TriggerEffectItem[];
|
|
8203
8882
|
readonly collection_box_offset?: float;
|
|
8204
8883
|
/**
|
|
8205
8884
|
* The bounding box used for collision checking.
|
|
@@ -8209,6 +8888,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8209
8888
|
* The collision masks this entity uses
|
|
8210
8889
|
*/
|
|
8211
8890
|
readonly collision_mask: CollisionMask;
|
|
8891
|
+
readonly collision_mask_allow_on_deep_oil_ocean?: CollisionMask;
|
|
8212
8892
|
/**
|
|
8213
8893
|
* Does this prototype collision mask collide with itself?
|
|
8214
8894
|
*/
|
|
@@ -8226,8 +8906,10 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8226
8906
|
*/
|
|
8227
8907
|
readonly color?: Color;
|
|
8228
8908
|
readonly combat_robot_friction?: double;
|
|
8909
|
+
readonly connectable_box?: BoundingBox;
|
|
8229
8910
|
readonly connection_category: string[];
|
|
8230
8911
|
readonly connection_distance?: double;
|
|
8912
|
+
readonly connects_to_other_radars?: boolean;
|
|
8231
8913
|
/**
|
|
8232
8914
|
* The construction radius for this roboport prototype.
|
|
8233
8915
|
*/
|
|
@@ -8251,6 +8933,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8251
8933
|
* The value in the dictionary is meaningless and exists just to allow for easy lookup.
|
|
8252
8934
|
*/
|
|
8253
8935
|
readonly crafting_categories?: Record<string, true>;
|
|
8936
|
+
readonly crafting_speed_quality_multiplier: LuaTable<QualityID, double>;
|
|
8254
8937
|
/**
|
|
8255
8938
|
* The crane energy usage of this agricultural tower prototype.
|
|
8256
8939
|
*/
|
|
@@ -8282,11 +8965,20 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8282
8965
|
speed_from_center: float;
|
|
8283
8966
|
speed_from_center_deviation: float;
|
|
8284
8967
|
};
|
|
8968
|
+
readonly creation_shift?: Vector;
|
|
8969
|
+
readonly custom_input_slot_tooltip_key?: string;
|
|
8285
8970
|
/**
|
|
8286
8971
|
* When lightning strikes something that is not a lightning attractor, this damage is applied to the target.
|
|
8972
|
+
*
|
|
8973
|
+
* For stickers the damage is applied every {@link LuaEntityPrototype::damage_interval | runtime:LuaEntityPrototype::damage_interval} ticks.
|
|
8287
8974
|
*/
|
|
8288
|
-
readonly damage?:
|
|
8975
|
+
readonly damage?: DamageParameters;
|
|
8289
8976
|
readonly damage_hit_tint?: Color;
|
|
8977
|
+
readonly damage_interval?: uint32;
|
|
8978
|
+
readonly damage_multiplier_decrease_per_tick?: float;
|
|
8979
|
+
readonly damage_multiplier_increase_per_added_fuel?: float;
|
|
8980
|
+
readonly damage_per_hp?: float;
|
|
8981
|
+
readonly damage_per_tick?: DamageParameters;
|
|
8290
8982
|
readonly damaged_trigger_effect?: TriggerEffectItem[];
|
|
8291
8983
|
/**
|
|
8292
8984
|
* Value between 0 and 1 darkness where all lamps of this lamp prototype are off.
|
|
@@ -8296,12 +8988,46 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8296
8988
|
* Value between 0 and 1 darkness where all lamps of this lamp prototype are on.
|
|
8297
8989
|
*/
|
|
8298
8990
|
readonly darkness_for_all_lamps_on?: float;
|
|
8991
|
+
readonly default_available_construction_output_signal?: SignalID;
|
|
8992
|
+
readonly default_available_logistic_output_signal?: SignalID;
|
|
8993
|
+
readonly default_blue_output_signal?: SignalID;
|
|
8994
|
+
readonly default_blue_signal?: SignalID;
|
|
8995
|
+
readonly default_copy_color_from_train_stop?: boolean;
|
|
8996
|
+
readonly default_day_length_output_signal?: SignalID;
|
|
8997
|
+
readonly default_day_tick_output_signal?: SignalID;
|
|
8998
|
+
readonly default_game_tick_output_signal?: SignalID;
|
|
8999
|
+
readonly default_green_output_signal?: SignalID;
|
|
9000
|
+
readonly default_green_signal?: SignalID;
|
|
9001
|
+
readonly default_orange_output_signal?: SignalID;
|
|
9002
|
+
readonly default_output_signal?: SignalID;
|
|
9003
|
+
readonly default_recipe_finished_signal?: SignalID;
|
|
9004
|
+
readonly default_red_output_signal?: SignalID;
|
|
9005
|
+
readonly default_red_signal?: SignalID;
|
|
9006
|
+
readonly default_rgb_signal?: SignalID;
|
|
9007
|
+
readonly default_roboport_count_output_signal?: SignalID;
|
|
9008
|
+
readonly default_stack_control_input_signal?: SignalID;
|
|
9009
|
+
readonly default_status?: defines.entity_status;
|
|
9010
|
+
readonly default_technology_level_signal?: SignalID;
|
|
9011
|
+
readonly default_temperature_signal?: SignalID;
|
|
9012
|
+
readonly default_total_construction_output_signal?: SignalID;
|
|
9013
|
+
readonly default_total_logistic_output_signal?: SignalID;
|
|
9014
|
+
readonly default_universe_channel?: SignalID;
|
|
9015
|
+
readonly default_working_signal?: SignalID;
|
|
9016
|
+
readonly delay_between_initial_flames?: uint32;
|
|
8299
9017
|
readonly deposit_radius?: float;
|
|
8300
9018
|
readonly destroy_action?: TriggerItem[];
|
|
8301
9019
|
/**
|
|
8302
9020
|
* Whether this generator prototype destroys non-fuel fluids.
|
|
8303
9021
|
*/
|
|
8304
9022
|
readonly destroy_non_fuel_fluid?: boolean;
|
|
9023
|
+
readonly destroy_on_empty?: boolean;
|
|
9024
|
+
readonly direction_count?: uint8;
|
|
9025
|
+
readonly direction_only?: boolean;
|
|
9026
|
+
/**
|
|
9027
|
+
* If automatic firing is disabled for this artillery turret or artillery wagon.
|
|
9028
|
+
*/
|
|
9029
|
+
readonly disable_automatic_firing?: boolean;
|
|
9030
|
+
readonly disabled_when_recipe_not_researched?: boolean;
|
|
8305
9031
|
/**
|
|
8306
9032
|
* The distraction cooldown of this unit prototype.
|
|
8307
9033
|
*/
|
|
@@ -8318,6 +9044,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8318
9044
|
* The door opening speed for this rocket silo prototype.
|
|
8319
9045
|
*/
|
|
8320
9046
|
readonly door_opening_speed?: double;
|
|
9047
|
+
readonly doors_trigger?: TriggerEffectItem[];
|
|
8321
9048
|
/**
|
|
8322
9049
|
* Whether this logistics or construction robot renders its cargo when flying.
|
|
8323
9050
|
*/
|
|
@@ -8326,15 +9053,24 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8326
9053
|
* Extra vertical space needed to see the whole entity in GUIs. This is used to calculate the correct zoom and positioning in the entity info gui, for example in the entity tooltip.
|
|
8327
9054
|
*/
|
|
8328
9055
|
readonly drawing_box_vertical_extension: double;
|
|
9056
|
+
readonly drive_over_elevated_tie_trigger?: TriggerEffectItem[];
|
|
9057
|
+
readonly drive_over_tie_trigger?: TriggerEffectItem[];
|
|
9058
|
+
readonly drive_over_tie_trigger_minimal_speed?: double;
|
|
8329
9059
|
readonly drop_item_distance?: uint32;
|
|
9060
|
+
/**
|
|
9061
|
+
* If this mining drill puts full belt stacks onto belts.
|
|
9062
|
+
*/
|
|
9063
|
+
readonly drops_full_belt_stacks?: boolean;
|
|
8330
9064
|
readonly dying_explosion?: ExplosionDefinition[];
|
|
8331
9065
|
/**
|
|
8332
9066
|
* The dying time of this corpse prototype.
|
|
8333
9067
|
*/
|
|
8334
9068
|
readonly dying_speed?: float;
|
|
8335
9069
|
readonly dying_trigger_effect?: TriggerEffectItem[];
|
|
9070
|
+
readonly early_death_ticks?: uint32;
|
|
9071
|
+
readonly effect_duration?: uint16;
|
|
8336
9072
|
/**
|
|
8337
|
-
* Effect receiver prototype of
|
|
9073
|
+
* Effect receiver prototype of crafting machine, lab, mining drill, or agricultural tower.
|
|
8338
9074
|
*/
|
|
8339
9075
|
readonly effect_receiver?: EffectReceiver;
|
|
8340
9076
|
/**
|
|
@@ -8345,10 +9081,14 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8345
9081
|
* The electric energy source prototype this entity uses, if any.
|
|
8346
9082
|
*/
|
|
8347
9083
|
readonly electric_energy_source_prototype?: LuaElectricEnergySourcePrototype;
|
|
9084
|
+
readonly elevated_collision_mask?: CollisionMask;
|
|
9085
|
+
readonly elevated_selection_boxes?: BoundingBox[];
|
|
9086
|
+
readonly elevated_selection_priority?: uint8;
|
|
8348
9087
|
/**
|
|
8349
9088
|
* A table of pollution emissions per second the entity will create, grouped by the name of the pollution type.
|
|
8350
9089
|
*/
|
|
8351
9090
|
readonly emissions_per_second: Record<string, double>;
|
|
9091
|
+
readonly ended_in_water_trigger_effect?: TriggerEffectItem[];
|
|
8352
9092
|
/**
|
|
8353
9093
|
* The enemy map color used when charting this entity.
|
|
8354
9094
|
*/
|
|
@@ -8357,14 +9097,22 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8357
9097
|
* When lightning hits a lightning attractor this amount of energy is transferred to the lightning attractor.
|
|
8358
9098
|
*/
|
|
8359
9099
|
readonly energy?: double;
|
|
9100
|
+
readonly energy_fraction_to_connect?: float;
|
|
9101
|
+
readonly energy_fraction_to_disconnect?: float;
|
|
8360
9102
|
/**
|
|
8361
9103
|
* The energy used per hit point taken for this vehicle during collisions.
|
|
8362
9104
|
*/
|
|
8363
9105
|
readonly energy_per_hit_point?: double;
|
|
9106
|
+
readonly energy_per_item?: double;
|
|
8364
9107
|
/**
|
|
8365
9108
|
* The energy consumed per tile moved for this flying robot.
|
|
8366
9109
|
*/
|
|
8367
9110
|
readonly energy_per_move?: double;
|
|
9111
|
+
readonly energy_per_movement?: double;
|
|
9112
|
+
readonly energy_per_nearby_scan?: double;
|
|
9113
|
+
readonly energy_per_rotation?: double;
|
|
9114
|
+
readonly energy_per_sector?: double;
|
|
9115
|
+
readonly energy_per_shot?: double;
|
|
8368
9116
|
/**
|
|
8369
9117
|
* The energy consumed per tick for this flying robot.
|
|
8370
9118
|
*/
|
|
@@ -8373,6 +9121,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8373
9121
|
* The direct energy usage of this entity, if any.
|
|
8374
9122
|
*/
|
|
8375
9123
|
readonly energy_usage?: double;
|
|
9124
|
+
readonly energy_usage_quality_multiplier: LuaTable<QualityID, double>;
|
|
8376
9125
|
readonly energy_usage_quality_scaling?: float;
|
|
8377
9126
|
/**
|
|
8378
9127
|
* The engine starting speed for this rocket silo rocket prototype.
|
|
@@ -8380,11 +9129,15 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8380
9129
|
readonly engine_starting_speed?: double;
|
|
8381
9130
|
readonly enraged_duration?: MapTick;
|
|
8382
9131
|
readonly enraged_speed: double;
|
|
9132
|
+
readonly enter_drop_mode_if_held_stack_spoiled?: boolean;
|
|
8383
9133
|
readonly enter_vehicle_distance?: double;
|
|
9134
|
+
readonly erase_contents_when_mined?: boolean;
|
|
9135
|
+
readonly expires?: boolean;
|
|
8384
9136
|
/**
|
|
8385
9137
|
* Whether this explosion has a beam.
|
|
8386
9138
|
*/
|
|
8387
9139
|
readonly explosion_beam?: double;
|
|
9140
|
+
readonly explosion_effect?: TriggerItem[];
|
|
8388
9141
|
/**
|
|
8389
9142
|
* Whether this explosion rotates.
|
|
8390
9143
|
*/
|
|
@@ -8398,22 +9151,30 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8398
9151
|
*/
|
|
8399
9152
|
readonly fast_replaceable_group?: string;
|
|
8400
9153
|
/**
|
|
8401
|
-
* The filter count of this inserter, loader, mining drill or logistic chest. For logistic containers, `nil` means no limit.
|
|
9154
|
+
* The filter count of this inserter, loader, mining drill, roboport or logistic chest. For logistic containers, `nil` means no limit.
|
|
8402
9155
|
*/
|
|
8403
9156
|
readonly filter_count?: uint32;
|
|
8404
9157
|
/**
|
|
8405
|
-
* The final attack result for this
|
|
9158
|
+
* The final attack result for this entity if it has one.
|
|
8406
9159
|
*/
|
|
8407
9160
|
readonly final_attack_result?: TriggerItem[];
|
|
9161
|
+
readonly fire_spread_cooldown?: uint8;
|
|
9162
|
+
readonly fire_spread_entity?: LuaEntityPrototype;
|
|
9163
|
+
readonly fire_spread_radius?: float;
|
|
9164
|
+
/**
|
|
9165
|
+
* The fixed recipe quality for this assembling machine prototype, if any.
|
|
9166
|
+
*/
|
|
9167
|
+
readonly fixed_quality?: LuaQualityPrototype;
|
|
8408
9168
|
/**
|
|
8409
|
-
* The fixed recipe
|
|
9169
|
+
* The fixed recipe for this assembling machine prototype, if any.
|
|
8410
9170
|
*/
|
|
8411
|
-
readonly fixed_recipe?:
|
|
9171
|
+
readonly fixed_recipe?: LuaRecipePrototype;
|
|
8412
9172
|
/**
|
|
8413
9173
|
* The flags for this entity prototype.
|
|
8414
9174
|
*/
|
|
8415
9175
|
readonly flags: EntityPrototypeFlags;
|
|
8416
9176
|
readonly flow_scaling?: boolean;
|
|
9177
|
+
readonly fluid_boxes_off_when_no_fluid_recipe?: boolean;
|
|
8417
9178
|
readonly fluid_buffer_input_flow?: FluidAmount;
|
|
8418
9179
|
readonly fluid_buffer_size?: FluidAmount;
|
|
8419
9180
|
/**
|
|
@@ -8427,10 +9188,8 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8427
9188
|
*/
|
|
8428
9189
|
readonly fluid_energy_source_prototype?: LuaFluidEnergySourcePrototype;
|
|
8429
9190
|
readonly fluid_source_offset?: Vector;
|
|
8430
|
-
|
|
8431
|
-
|
|
8432
|
-
*/
|
|
8433
|
-
readonly fluid_usage_per_tick?: double;
|
|
9191
|
+
readonly fluid_wagon_connector_speed?: double;
|
|
9192
|
+
readonly fluid_wagon_tank_valve_max_distance?: double;
|
|
8434
9193
|
/**
|
|
8435
9194
|
* The fluidbox prototypes for this entity.
|
|
8436
9195
|
*/
|
|
@@ -8439,11 +9198,18 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8439
9198
|
* The flying acceleration for this rocket silo rocket prototype.
|
|
8440
9199
|
*/
|
|
8441
9200
|
readonly flying_acceleration?: double;
|
|
9201
|
+
readonly flying_collision_mask?: CollisionMask;
|
|
8442
9202
|
/**
|
|
8443
9203
|
* The flying speed for this rocket silo rocket prototype.
|
|
8444
9204
|
*/
|
|
8445
9205
|
readonly flying_speed?: double;
|
|
9206
|
+
readonly flying_trigger?: TriggerEffectItem[];
|
|
9207
|
+
readonly folded_turret_corpses?: Record<string, LuaEntityPrototype>;
|
|
8446
9208
|
readonly follows_player?: boolean;
|
|
9209
|
+
readonly footprint_particles?: LuaTable<LuaTilePrototype, LuaParticlePrototype[]>;
|
|
9210
|
+
readonly footstep_particle_triggers?: LuaTable<LuaTilePrototype, TriggerEffectItem[]>;
|
|
9211
|
+
readonly force_die_on_attack?: boolean;
|
|
9212
|
+
readonly force_visibility?: ForceCondition;
|
|
8447
9213
|
/**
|
|
8448
9214
|
* The friction of this vehicle prototype.
|
|
8449
9215
|
*/
|
|
@@ -8452,13 +9218,19 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8452
9218
|
* The friendly map color used when charting this entity.
|
|
8453
9219
|
*/
|
|
8454
9220
|
readonly friendly_map_color: Color;
|
|
9221
|
+
readonly grab_less_to_match_belt_stack?: boolean;
|
|
9222
|
+
readonly grid_offset?: Vector;
|
|
8455
9223
|
/**
|
|
8456
9224
|
* The equipment grid prototype for this entity, if any.
|
|
8457
9225
|
*/
|
|
8458
9226
|
readonly grid_prototype?: LuaEquipmentGridPrototype;
|
|
9227
|
+
readonly grid_size?: Vector;
|
|
9228
|
+
readonly grounded_landing_search_radius?: double;
|
|
8459
9229
|
readonly growth_area_radius?: double;
|
|
8460
9230
|
readonly growth_grid_tile_size?: uint32;
|
|
8461
9231
|
readonly growth_ticks?: uint32;
|
|
9232
|
+
readonly gui_mode?: 'all' | 'none' | 'admins';
|
|
9233
|
+
readonly gui_title_key?: string;
|
|
8462
9234
|
/**
|
|
8463
9235
|
* A mapping of the gun name to the gun prototype this prototype uses. `nil` if this entity prototype doesn't use guns.
|
|
8464
9236
|
*/
|
|
@@ -8471,6 +9243,8 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8471
9243
|
* Whether this unit, car, or character prototype has belt immunity.
|
|
8472
9244
|
*/
|
|
8473
9245
|
readonly has_belt_immunity?: boolean;
|
|
9246
|
+
readonly has_direction?: boolean;
|
|
9247
|
+
readonly hatch_definitions?: CargoHatchDefinition[];
|
|
8474
9248
|
readonly head_collection_radius?: float;
|
|
8475
9249
|
/**
|
|
8476
9250
|
* Amount this entity can heal per tick, if any.
|
|
@@ -8488,14 +9262,18 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8488
9262
|
* The energy required to keep this entity from freezing. Zero energy means it doesn't freeze.
|
|
8489
9263
|
*/
|
|
8490
9264
|
readonly heating_energy: double;
|
|
9265
|
+
readonly heating_radius?: float;
|
|
8491
9266
|
/**
|
|
8492
|
-
* The height of this spider vehicle
|
|
9267
|
+
* The height of this spider unit, spider vehicle or projectile.
|
|
8493
9268
|
*/
|
|
8494
9269
|
readonly height?: double;
|
|
9270
|
+
readonly height_from_ground?: float;
|
|
8495
9271
|
readonly held_items_display_count?: uint8;
|
|
8496
9272
|
readonly held_items_offset?: float;
|
|
8497
9273
|
readonly held_items_spread?: float;
|
|
8498
9274
|
readonly hide_resistances?: boolean;
|
|
9275
|
+
readonly hit_at_collision_position?: boolean;
|
|
9276
|
+
readonly hit_collision_mask?: CollisionMask;
|
|
8499
9277
|
/**
|
|
8500
9278
|
* The definition of where and how the alt-mode icons of this entity should be drawn.
|
|
8501
9279
|
*/
|
|
@@ -8504,6 +9282,11 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8504
9282
|
* The icon positioning for inventories of this entity, if defined.
|
|
8505
9283
|
*/
|
|
8506
9284
|
readonly icons_positioning?: IconSequencePositioning[];
|
|
9285
|
+
readonly ignore_target_mask: TriggerTargetMask;
|
|
9286
|
+
readonly immune_to_all_impacts?: boolean;
|
|
9287
|
+
readonly immune_to_cliff_impacts?: boolean;
|
|
9288
|
+
readonly immune_to_rock_impacts?: boolean;
|
|
9289
|
+
readonly immune_to_tree_impacts?: boolean;
|
|
8507
9290
|
/**
|
|
8508
9291
|
* A vector of the gun prototypes of this car, spider vehicle, artillery wagon, or turret.
|
|
8509
9292
|
*/
|
|
@@ -8520,6 +9303,13 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8520
9303
|
* The max number of ingredients this crafting machine prototype supports.
|
|
8521
9304
|
*/
|
|
8522
9305
|
readonly ingredient_count?: uint32;
|
|
9306
|
+
readonly initial_action?: TriggerItem[];
|
|
9307
|
+
readonly initial_flame_count?: uint8;
|
|
9308
|
+
readonly initial_height?: float;
|
|
9309
|
+
readonly initial_lifetime?: uint32;
|
|
9310
|
+
readonly initial_speed?: Vector;
|
|
9311
|
+
readonly initial_vertical_speed?: float;
|
|
9312
|
+
readonly input_connection_bounding_box?: BoundingBox;
|
|
8523
9313
|
/**
|
|
8524
9314
|
* True if this inserter chases items on belts for pickup.
|
|
8525
9315
|
*/
|
|
@@ -8545,10 +9335,10 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8545
9335
|
*/
|
|
8546
9336
|
readonly instruments?: ProgrammableSpeakerInstrument[];
|
|
8547
9337
|
/**
|
|
8548
|
-
* Properties of custom inventory. Only provided if inventory_type is `"with_custom_stack_size"`.
|
|
9338
|
+
* Properties of custom inventory. Only provided if `inventory_type` is `"with_custom_stack_size"`.
|
|
8549
9339
|
*/
|
|
8550
9340
|
readonly inventory_properties?: InventoryWithCustomStackSizeSpecification;
|
|
8551
|
-
readonly inventory_size_quality_increase?:
|
|
9341
|
+
readonly inventory_size_quality_increase?: ItemStackIndex;
|
|
8552
9342
|
/**
|
|
8553
9343
|
* The inventory type this container or linked container uses.
|
|
8554
9344
|
*/
|
|
@@ -8645,10 +9435,16 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8645
9435
|
* The rocket launch delay for this rocket silo prototype.
|
|
8646
9436
|
*/
|
|
8647
9437
|
readonly launch_wait_time?: uint8;
|
|
9438
|
+
readonly leave_attacking_if_shoot_fails?: boolean;
|
|
9439
|
+
readonly life_time?: uint16;
|
|
9440
|
+
readonly lifetime_increase_by?: uint32;
|
|
9441
|
+
readonly lifetime_increase_cooldown?: uint32;
|
|
9442
|
+
readonly lift_weight?: Weight;
|
|
8648
9443
|
/**
|
|
8649
9444
|
* The light blinking speed for this rocket silo prototype.
|
|
8650
9445
|
*/
|
|
8651
9446
|
readonly light_blinking_speed?: double;
|
|
9447
|
+
readonly limit_overlapping_particles?: boolean;
|
|
8652
9448
|
/**
|
|
8653
9449
|
* True if this loader supports a runtime-adjustable belt stack size.
|
|
8654
9450
|
*/
|
|
@@ -8694,7 +9490,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8694
9490
|
/**
|
|
8695
9491
|
* Loot that will be dropped when this entity is killed, if any.
|
|
8696
9492
|
*/
|
|
8697
|
-
readonly loot?:
|
|
9493
|
+
readonly loot?: ItemProduct[];
|
|
8698
9494
|
readonly loot_pickup_distance?: double;
|
|
8699
9495
|
/**
|
|
8700
9496
|
* The manual range modifier for this artillery turret or wagon prototype.
|
|
@@ -8708,6 +9504,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8708
9504
|
* The bounding box used for map generator collision checking.
|
|
8709
9505
|
*/
|
|
8710
9506
|
readonly map_generator_bounding_box: BoundingBox;
|
|
9507
|
+
readonly map_grid?: boolean;
|
|
8711
9508
|
/**
|
|
8712
9509
|
* Count of defensive enemies this spawner can sustain.
|
|
8713
9510
|
*/
|
|
@@ -8745,18 +9542,20 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8745
9542
|
* The maximum polyphony for this programmable speaker.
|
|
8746
9543
|
*/
|
|
8747
9544
|
readonly max_polyphony?: uint32;
|
|
8748
|
-
/**
|
|
8749
|
-
* The default maximum power output of this generator prototype. This property is deprecated in favor of {@link LuaEntityPrototype::get_max_power_output | runtime:LuaEntityPrototype::get_max_power_output} and should not be used.
|
|
8750
|
-
*/
|
|
8751
|
-
readonly max_power_output?: double;
|
|
8752
9545
|
/**
|
|
8753
9546
|
* The maximum pursue distance of this unit prototype.
|
|
8754
9547
|
*/
|
|
8755
9548
|
readonly max_pursue_distance?: double;
|
|
9549
|
+
readonly max_records_count?: uint32;
|
|
9550
|
+
readonly max_richness_for_spawn_shift?: double;
|
|
9551
|
+
readonly max_separation_force?: double;
|
|
9552
|
+
readonly max_snap_to_train_stop_distance?: float;
|
|
8756
9553
|
/**
|
|
8757
9554
|
* The max speed of this projectile or flying robot prototype.
|
|
8758
9555
|
*/
|
|
8759
9556
|
readonly max_speed?: double;
|
|
9557
|
+
readonly max_text_length?: uint32;
|
|
9558
|
+
readonly max_text_width?: uint32;
|
|
8760
9559
|
/**
|
|
8761
9560
|
* The maximum energy for this flying robot above which it won't try to recharge when stationing.
|
|
8762
9561
|
*/
|
|
@@ -8766,10 +9565,14 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8766
9565
|
*/
|
|
8767
9566
|
readonly max_underground_distance?: uint8;
|
|
8768
9567
|
readonly maximum_corner_sliding_distance?: double;
|
|
9568
|
+
readonly maximum_damage_multiplier?: float;
|
|
9569
|
+
readonly maximum_lifetime?: uint32;
|
|
9570
|
+
readonly maximum_spread_count?: uint16;
|
|
8769
9571
|
/**
|
|
8770
9572
|
* The maximum fluid temperature of this generator prototype.
|
|
8771
9573
|
*/
|
|
8772
9574
|
readonly maximum_temperature?: double;
|
|
9575
|
+
readonly meltdown_action?: TriggerItem[];
|
|
8773
9576
|
/**
|
|
8774
9577
|
* The minimum darkness at which this unit spawner can spawn entities.
|
|
8775
9578
|
*/
|
|
@@ -8802,12 +9605,17 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8802
9605
|
readonly mining_speed?: double;
|
|
8803
9606
|
/**
|
|
8804
9607
|
* The module inventory size. `nil` if this entity doesn't support modules.
|
|
9608
|
+
*
|
|
9609
|
+
* Returns the inventory size if this entity is of normal quality. Use {@link LuaEntityPrototype::get_inventory_size | runtime:LuaEntityPrototype::get_inventory_size} for other qualities.
|
|
8805
9610
|
*/
|
|
8806
9611
|
readonly module_inventory_size?: uint32;
|
|
9612
|
+
readonly module_slots_quality_bonus: LuaTable<QualityID, ItemStackIndex>;
|
|
8807
9613
|
/**
|
|
8808
9614
|
* Whether this unit prototype can move while shooting.
|
|
8809
9615
|
*/
|
|
8810
9616
|
readonly move_while_shooting?: boolean;
|
|
9617
|
+
readonly movement_modifier?: double;
|
|
9618
|
+
readonly movement_modifier_when_on_ground?: double;
|
|
8811
9619
|
readonly neighbour_bonus?: double;
|
|
8812
9620
|
readonly neighbour_connectable?: NeighbourConnectable;
|
|
8813
9621
|
/**
|
|
@@ -8818,43 +9626,81 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8818
9626
|
* The normal amount for this resource.
|
|
8819
9627
|
*/
|
|
8820
9628
|
readonly normal_resource_amount?: uint32;
|
|
9629
|
+
readonly not_buildable_if_no_rails?: boolean;
|
|
8821
9630
|
/**
|
|
8822
9631
|
* 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.
|
|
8823
9632
|
*/
|
|
8824
9633
|
readonly object_name: string;
|
|
9634
|
+
readonly on_damage_tick_effect?: TriggerItem[];
|
|
9635
|
+
readonly on_fuel_added_action?: TriggerItem[];
|
|
9636
|
+
readonly open_door_trigger_effect?: TriggerEffectItem[];
|
|
9637
|
+
readonly opened_collision_mask?: CollisionMask;
|
|
9638
|
+
readonly opening_speed?: float;
|
|
9639
|
+
readonly orientations?: OrientedCliffPrototypeSet;
|
|
9640
|
+
readonly output_connection_bounding_box?: BoundingBox;
|
|
8825
9641
|
readonly overkill_fraction?: float;
|
|
9642
|
+
readonly particle?: LuaParticlePrototype;
|
|
9643
|
+
readonly particle_buffer_size?: uint16;
|
|
9644
|
+
readonly particle_count?: uint8;
|
|
9645
|
+
readonly particle_height?: DeviatedValue;
|
|
9646
|
+
readonly particle_horizontal_speed?: DeviatedValue;
|
|
9647
|
+
readonly particle_spawn_interval?: uint16;
|
|
9648
|
+
readonly particle_spawn_timeout?: uint16;
|
|
9649
|
+
readonly particle_time_before_start?: DeviatedValue;
|
|
9650
|
+
readonly particle_time_to_live?: DeviatedValue;
|
|
9651
|
+
readonly particle_vertical_acceleration?: float;
|
|
9652
|
+
readonly particle_vertical_speed?: DeviatedValue;
|
|
8826
9653
|
readonly passive_energy_usage?: double;
|
|
8827
9654
|
readonly patrolling_speed?: double;
|
|
8828
9655
|
readonly patrolling_turn_radius?: double;
|
|
8829
9656
|
readonly per_lane_filters?: boolean;
|
|
8830
9657
|
readonly perceived_performance?: PerceivedPerformance;
|
|
9658
|
+
readonly piercing_damage?: float;
|
|
9659
|
+
readonly place_as_crater?: CraterPlacementDefinition;
|
|
9660
|
+
/**
|
|
9661
|
+
* Repair speed of entities is multiplied by this value when they are on a space platform with this hub prototype.
|
|
9662
|
+
*/
|
|
9663
|
+
readonly platform_repair_speed_modifier?: float;
|
|
9664
|
+
/**
|
|
9665
|
+
* Weight which this entity adds to total space platform weight when placed.
|
|
9666
|
+
*/
|
|
9667
|
+
readonly platform_weight?: Weight;
|
|
9668
|
+
readonly prepare_with_no_ammo?: boolean;
|
|
9669
|
+
readonly preserve_contents_when_created?: boolean;
|
|
8831
9670
|
/**
|
|
8832
9671
|
* The beacon profile: extra multiplier applied to the effects received from beacon by the effect receiver based on amount of beacons that reach that effect receiver
|
|
8833
9672
|
*/
|
|
8834
9673
|
readonly profile?: double[];
|
|
9674
|
+
readonly progress_to_create_smoke?: float;
|
|
8835
9675
|
/**
|
|
8836
9676
|
* True if this entity prototype should be included during tile collision checks with {@link LuaTilePrototype::check_collision_with_entities | runtime:LuaTilePrototype::check_collision_with_entities} enabled.
|
|
8837
9677
|
*/
|
|
8838
9678
|
readonly protected_from_tile_building: boolean;
|
|
8839
|
-
|
|
8840
|
-
|
|
8841
|
-
|
|
8842
|
-
readonly
|
|
9679
|
+
readonly pulse_duration?: uint32;
|
|
9680
|
+
readonly quality_affects_capacity?: boolean;
|
|
9681
|
+
readonly quality_affects_energy_usage?: boolean;
|
|
9682
|
+
readonly quality_affects_inventory_size?: boolean;
|
|
9683
|
+
readonly quality_affects_max_speed?: boolean;
|
|
8843
9684
|
readonly quality_affects_mining_radius?: boolean;
|
|
8844
9685
|
readonly quality_affects_module_slots?: boolean;
|
|
8845
|
-
|
|
8846
|
-
* The radar range of this unit prototype.
|
|
8847
|
-
*/
|
|
9686
|
+
readonly quality_affects_supply_area_distance?: boolean;
|
|
8848
9687
|
readonly radar_range?: uint32;
|
|
8849
9688
|
/**
|
|
8850
9689
|
* The radius of this entity prototype. The radius is defined as half the distance between the top left corner and bottom right corner of the collision box.
|
|
8851
9690
|
*/
|
|
8852
9691
|
readonly radius: double;
|
|
8853
9692
|
readonly radius_visualisation_specification?: RadiusVisualisationSpecification;
|
|
9693
|
+
readonly raise_rocket_trigger?: TriggerEffectItem[];
|
|
8854
9694
|
readonly random_corpse_variation?: boolean;
|
|
9695
|
+
readonly random_growth_offset?: double;
|
|
9696
|
+
readonly randomize_planting_tile?: boolean;
|
|
8855
9697
|
readonly range_from_player?: double;
|
|
8856
9698
|
readonly reach_distance?: uint32;
|
|
8857
9699
|
readonly reach_resource_distance?: double;
|
|
9700
|
+
readonly recharge_minimum?: double;
|
|
9701
|
+
readonly regular_trigger_effect?: TriggerEffectItem[];
|
|
9702
|
+
readonly regular_trigger_effect_frequency?: uint32;
|
|
9703
|
+
readonly related_rail?: LuaEntityPrototype;
|
|
8858
9704
|
readonly related_underground_belt?: LuaEntityPrototype;
|
|
8859
9705
|
/**
|
|
8860
9706
|
* The remains left behind when this entity is mined.
|
|
@@ -8864,10 +9710,21 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8864
9710
|
* Whether this entity should remove decoratives that collide with it when this entity is built.
|
|
8865
9711
|
*/
|
|
8866
9712
|
readonly remove_decoratives: 'automatic' | 'true' | 'false';
|
|
9713
|
+
readonly remove_on_entity_placement?: boolean;
|
|
9714
|
+
readonly remove_on_tile_collision?: boolean;
|
|
9715
|
+
readonly remove_on_tile_placement?: boolean;
|
|
8867
9716
|
/**
|
|
8868
9717
|
* Repair-speed modifier for this entity, if any. Actual repair speed will be `tool_repair_speed * entity_repair_speed_modifier`.
|
|
8869
9718
|
*/
|
|
8870
9719
|
readonly repair_speed_modifier?: float;
|
|
9720
|
+
/**
|
|
9721
|
+
* If this robot with logistic interface requires it be charged to manually mine.
|
|
9722
|
+
*/
|
|
9723
|
+
readonly require_charge_to_mine?: boolean;
|
|
9724
|
+
/**
|
|
9725
|
+
* If this drill requires minable resources before it can be placed.
|
|
9726
|
+
*/
|
|
9727
|
+
readonly require_resources_to_place?: boolean;
|
|
8871
9728
|
/**
|
|
8872
9729
|
* List of resistances towards each damage type. It is a dictionary indexed by damage type names (see `data/base/prototypes/damage-type.lua`).
|
|
8873
9730
|
*/
|
|
@@ -8888,11 +9745,13 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8888
9745
|
* The resource drain rate percent of this mining drill prototype.
|
|
8889
9746
|
*/
|
|
8890
9747
|
readonly resource_drain_rate_percent?: uint8;
|
|
9748
|
+
readonly resource_patch_search_radius?: uint32;
|
|
8891
9749
|
readonly respawn_time?: uint32;
|
|
8892
9750
|
/**
|
|
8893
9751
|
* The result units and spawn points with weight and evolution factor for a biter spawner entity.
|
|
8894
9752
|
*/
|
|
8895
9753
|
readonly result_units?: UnitSpawnDefinition[];
|
|
9754
|
+
readonly reveal_map?: boolean;
|
|
8896
9755
|
/**
|
|
8897
9756
|
* The revenge attack parameters for this entity, if any. These attack parameters are used in addition to {@link LuaEntityPrototype::attack_parameters | runtime:LuaEntityPrototype::attack_parameters} if the entity is attacking a target that has previously dealt damage to the entity.
|
|
8898
9757
|
*/
|
|
@@ -8903,6 +9762,8 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8903
9762
|
* The rising speed for this rocket silo rocket prototype.
|
|
8904
9763
|
*/
|
|
8905
9764
|
readonly rising_speed?: double;
|
|
9765
|
+
readonly rocket_dying_explosion?: LuaEntityPrototype;
|
|
9766
|
+
readonly rocket_engine_starting_speed_modifier_per_quality_level?: double;
|
|
8906
9767
|
/**
|
|
8907
9768
|
* The rocket entity prototype associated with this rocket silo prototype.
|
|
8908
9769
|
*/
|
|
@@ -8911,10 +9772,14 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8911
9772
|
* The rocket parts required for this rocket silo prototype.
|
|
8912
9773
|
*/
|
|
8913
9774
|
readonly rocket_parts_required?: uint32;
|
|
9775
|
+
readonly rocket_parts_storage_cap?: uint32;
|
|
9776
|
+
readonly rocket_quick_relaunch_start_offset?: double;
|
|
8914
9777
|
/**
|
|
8915
9778
|
* The rocket rising delay for this rocket silo prototype.
|
|
8916
9779
|
*/
|
|
8917
9780
|
readonly rocket_rising_delay?: uint8;
|
|
9781
|
+
readonly rocket_rising_speed_modifier_per_quality_level?: double;
|
|
9782
|
+
readonly rotatable?: boolean;
|
|
8918
9783
|
/**
|
|
8919
9784
|
* The rotation snap angle of this car prototype.
|
|
8920
9785
|
*/
|
|
@@ -8927,6 +9792,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8927
9792
|
* The movement speed of this character prototype.
|
|
8928
9793
|
*/
|
|
8929
9794
|
readonly running_speed?: double;
|
|
9795
|
+
readonly scale_energy_usage?: boolean;
|
|
8930
9796
|
/**
|
|
8931
9797
|
* Whether this generator prototype scales fluid usage.
|
|
8932
9798
|
*/
|
|
@@ -8935,6 +9801,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8935
9801
|
* How much science pack durability is required to research one science point.
|
|
8936
9802
|
*/
|
|
8937
9803
|
readonly science_pack_drain_rate_percent: uint8;
|
|
9804
|
+
readonly search_radius?: double;
|
|
8938
9805
|
/**
|
|
8939
9806
|
* The secondary bounding box used for collision checking, if any. This is only used in rails and rail remnants.
|
|
8940
9807
|
*/
|
|
@@ -8952,13 +9819,28 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8952
9819
|
* The selection priority of this entity - a value between `0` and `255`.
|
|
8953
9820
|
*/
|
|
8954
9821
|
readonly selection_priority: uint32;
|
|
9822
|
+
readonly separation_force_factor?: double;
|
|
9823
|
+
readonly separation_range?: double;
|
|
9824
|
+
readonly shadow_slave_entity?: LuaEntityPrototype;
|
|
9825
|
+
readonly shoot_in_prepare_state?: boolean;
|
|
8955
9826
|
/**
|
|
8956
9827
|
* The cursor size used when shooting at this entity.
|
|
8957
9828
|
*/
|
|
8958
9829
|
readonly shooting_cursor_size: float;
|
|
9830
|
+
readonly shot_category?: LuaAmmoCategoryPrototype;
|
|
9831
|
+
readonly shots_per_flare?: uint32;
|
|
9832
|
+
readonly should_ground_target?: boolean;
|
|
9833
|
+
readonly shuffle_resources_to_mine?: boolean;
|
|
9834
|
+
readonly smoke?: LuaTrivialSmokePrototype;
|
|
9835
|
+
readonly smoke_count?: uint16;
|
|
9836
|
+
readonly smoke_sources?: SmokeSource[];
|
|
9837
|
+
readonly snap_to_spots_distance?: float;
|
|
8959
9838
|
readonly solar_panel_performance_at_day: double;
|
|
8960
9839
|
readonly solar_panel_performance_at_night: double;
|
|
8961
9840
|
readonly solar_panel_solar_coefficient_property: LuaSurfacePropertyPrototype;
|
|
9841
|
+
readonly source_offset?: Vector;
|
|
9842
|
+
readonly source_variance?: Vector;
|
|
9843
|
+
readonly spawn_blocked_trigger?: TriggerItem[];
|
|
8962
9844
|
/**
|
|
8963
9845
|
* The spawning cooldown for this enemy spawner prototype.
|
|
8964
9846
|
*/
|
|
@@ -8968,6 +9850,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8968
9850
|
};
|
|
8969
9851
|
readonly spawn_decoration?: TriggerEffectItem[];
|
|
8970
9852
|
readonly spawn_decorations_on_expansion?: boolean;
|
|
9853
|
+
readonly spawn_entity?: LuaEntityPrototype;
|
|
8971
9854
|
/**
|
|
8972
9855
|
* How far from the spawner can the units be spawned.
|
|
8973
9856
|
*/
|
|
@@ -8980,19 +9863,43 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8980
9863
|
* The spawning time modifier of this unit prototype.
|
|
8981
9864
|
*/
|
|
8982
9865
|
readonly spawning_time_modifier?: double;
|
|
9866
|
+
readonly special_neutral_target_damage?: DamageParameters;
|
|
8983
9867
|
/**
|
|
8984
|
-
* The default speed of this flying robot,
|
|
9868
|
+
* The default speed of this flying robot, or unit.
|
|
8985
9869
|
*/
|
|
8986
9870
|
readonly speed?: double;
|
|
9871
|
+
readonly speed_modifier?: Vector;
|
|
8987
9872
|
/**
|
|
8988
9873
|
* The speed multiplier when this flying robot is out of energy.
|
|
8989
9874
|
*/
|
|
8990
9875
|
readonly speed_multiplier_when_out_of_energy?: float;
|
|
9876
|
+
readonly spent_fluid?: SpentFluidSpecification;
|
|
8991
9877
|
readonly spider_engine?: SpiderEngineSpecification;
|
|
9878
|
+
readonly spread_delay?: uint32;
|
|
9879
|
+
readonly spread_delay_deviation?: uint32;
|
|
9880
|
+
readonly start_attacking_only_when_can_shoot?: boolean;
|
|
9881
|
+
readonly steering_settings?: SteeringSettings;
|
|
8992
9882
|
/**
|
|
8993
9883
|
* The bounding box used to attach sticker type entities.
|
|
8994
9884
|
*/
|
|
8995
9885
|
readonly sticker_box: BoundingBox;
|
|
9886
|
+
readonly sticker_movement_modifiers?: {
|
|
9887
|
+
target_movement_modifier_from: float;
|
|
9888
|
+
target_movement_modifier_to: float;
|
|
9889
|
+
target_movement_max_from: float;
|
|
9890
|
+
target_movement_max_to: float;
|
|
9891
|
+
};
|
|
9892
|
+
readonly sticker_vehicle_modifiers?: {
|
|
9893
|
+
vehicle_speed_modifier_from: float;
|
|
9894
|
+
vehicle_speed_modifier_to: float;
|
|
9895
|
+
vehicle_speed_max_from: float;
|
|
9896
|
+
vehicle_speed_max_to: float;
|
|
9897
|
+
vehicle_friction_modifier_from: float;
|
|
9898
|
+
vehicle_friction_modifier_to: float;
|
|
9899
|
+
};
|
|
9900
|
+
readonly stickers_per_square_meter?: float;
|
|
9901
|
+
readonly stream_particle_horizontal_speed?: float;
|
|
9902
|
+
readonly stream_particle_horizontal_speed_deviation?: float;
|
|
8996
9903
|
readonly strike_effect?: TriggerItem[];
|
|
8997
9904
|
readonly support_range?: float;
|
|
8998
9905
|
/**
|
|
@@ -9003,10 +9910,13 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
9003
9910
|
* The surface conditions required to build this entity.
|
|
9004
9911
|
*/
|
|
9005
9912
|
readonly surface_conditions?: SurfaceCondition[];
|
|
9913
|
+
readonly synced_footstep_particle_triggers?: LuaTable<LuaTilePrototype, TriggerEffectItem[]>;
|
|
9006
9914
|
/**
|
|
9007
9915
|
* If this car prototype uses tank controls to drive.
|
|
9008
9916
|
*/
|
|
9009
9917
|
readonly tank_driving?: boolean;
|
|
9918
|
+
readonly target_initial_position_only?: boolean;
|
|
9919
|
+
readonly target_position_deviation?: double;
|
|
9010
9920
|
/**
|
|
9011
9921
|
* The target temperature of this boiler or fusion reactor prototype. If `nil` on a fusion reactor, the target temperature is the default temperature of the output fluid.
|
|
9012
9922
|
*/
|
|
@@ -9021,6 +9931,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
9021
9931
|
readonly ticks_to_keep_aiming_direction?: uint32;
|
|
9022
9932
|
readonly ticks_to_keep_gun?: uint32;
|
|
9023
9933
|
readonly ticks_to_stay_in_combat?: uint32;
|
|
9934
|
+
readonly tie_distance?: double;
|
|
9024
9935
|
readonly tile_buildability_rules?: TileBuildabilityRule[];
|
|
9025
9936
|
/**
|
|
9026
9937
|
* 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)
|
|
@@ -9030,14 +9941,19 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
9030
9941
|
* 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)
|
|
9031
9942
|
*/
|
|
9032
9943
|
readonly tile_width: uint32;
|
|
9944
|
+
readonly time_to_capture?: MapTick;
|
|
9945
|
+
readonly time_to_damage?: uint16;
|
|
9033
9946
|
/**
|
|
9034
9947
|
* The time to live for this prototype or `0` if prototype doesn't have time_to_live or time_before_removed.
|
|
9035
9948
|
*/
|
|
9036
|
-
readonly time_to_live:
|
|
9949
|
+
readonly time_to_live: MapTick;
|
|
9037
9950
|
/**
|
|
9038
9951
|
* The time it takes this land mine to arm.
|
|
9039
9952
|
*/
|
|
9040
9953
|
readonly timeout?: uint32;
|
|
9954
|
+
readonly timeout_to_close?: uint32;
|
|
9955
|
+
readonly tool_attack_distance?: double;
|
|
9956
|
+
readonly tool_attack_result?: TriggerItem[];
|
|
9041
9957
|
/**
|
|
9042
9958
|
* The torso bob speed of this spider vehicle prototype.
|
|
9043
9959
|
*/
|
|
@@ -9046,14 +9962,23 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
9046
9962
|
* The torso rotation speed of this spider vehicle prototype.
|
|
9047
9963
|
*/
|
|
9048
9964
|
readonly torso_rotation_speed?: double;
|
|
9965
|
+
readonly track_coverage_during_drag_building?: boolean;
|
|
9966
|
+
readonly track_particle_triggers: LuaTable<LuaTilePrototype, TriggerEffectItem[]>;
|
|
9967
|
+
readonly transition_collision_mask?: CollisionMask;
|
|
9049
9968
|
/**
|
|
9050
9969
|
* If it is a tree, return the number of colors it supports.
|
|
9051
9970
|
*/
|
|
9052
9971
|
readonly tree_color_count?: uint8;
|
|
9972
|
+
readonly tree_dying_factor?: float;
|
|
9973
|
+
readonly tree_removal_max_distance?: double;
|
|
9974
|
+
readonly tree_removal_probability?: double;
|
|
9053
9975
|
/**
|
|
9054
9976
|
* The collision mask entities must collide with to make this landmine blow up.
|
|
9055
9977
|
*/
|
|
9056
9978
|
readonly trigger_collision_mask?: CollisionMask;
|
|
9979
|
+
readonly trigger_force?: ForceCondition;
|
|
9980
|
+
readonly trigger_interval?: uint32;
|
|
9981
|
+
readonly trigger_radius?: double;
|
|
9057
9982
|
/**
|
|
9058
9983
|
* The trigger target mask for this entity prototype type.
|
|
9059
9984
|
*
|
|
@@ -9062,12 +9987,16 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
9062
9987
|
readonly trigger_target_mask: Record<string, boolean>;
|
|
9063
9988
|
readonly turn_radius?: double;
|
|
9064
9989
|
readonly turn_smoothing?: double;
|
|
9990
|
+
readonly turn_speed?: float;
|
|
9991
|
+
readonly turning_speed_increases_exponentially_with_projectile_speed?: boolean;
|
|
9992
|
+
readonly turret_base_has_direction?: boolean;
|
|
9993
|
+
readonly turret_prepare_range?: double;
|
|
9065
9994
|
/**
|
|
9066
9995
|
* The range of this turret.
|
|
9067
9996
|
*/
|
|
9068
9997
|
readonly turret_range?: uint32;
|
|
9069
9998
|
/**
|
|
9070
|
-
* The turret rotation speed of this
|
|
9999
|
+
* The turret rotation speed of this prototype.
|
|
9071
10000
|
*/
|
|
9072
10001
|
readonly turret_rotation_speed?: float;
|
|
9073
10002
|
readonly two_direction_only?: boolean;
|
|
@@ -9080,15 +10009,24 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
9080
10009
|
* The trigger effects to run every tick when on cooldown while the owning {@link LuaSegmentedUnit | runtime:LuaSegmentedUnit} is enraged.
|
|
9081
10010
|
*/
|
|
9082
10011
|
readonly update_effects_while_enraged?: TriggerEffectWithCooldown[];
|
|
10012
|
+
readonly use_damage_substitute?: boolean;
|
|
10013
|
+
readonly use_easter_egg?: boolean;
|
|
9083
10014
|
/**
|
|
9084
10015
|
* Whether this logistic container prototype uses exact mode
|
|
9085
10016
|
*/
|
|
9086
10017
|
readonly use_exact_mode?: boolean;
|
|
10018
|
+
readonly use_mirroring?: boolean;
|
|
10019
|
+
readonly use_unloading_distance_limit?: boolean;
|
|
10020
|
+
readonly uses_alternative_behavior?: boolean;
|
|
9087
10021
|
/**
|
|
9088
10022
|
* If this drill uses force productivity bonus
|
|
9089
10023
|
*/
|
|
9090
10024
|
readonly uses_force_mining_productivity_bonus?: boolean;
|
|
9091
10025
|
readonly uses_inserter_stack_size_bonus?: boolean;
|
|
10026
|
+
/**
|
|
10027
|
+
* If this lab uses the quality drain modifier when consuming science packs.
|
|
10028
|
+
*/
|
|
10029
|
+
readonly uses_quality_drain_modifier: boolean;
|
|
9092
10030
|
/**
|
|
9093
10031
|
* 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.
|
|
9094
10032
|
*/
|
|
@@ -9114,10 +10052,12 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
9114
10052
|
* The void energy source prototype this entity uses, if any.
|
|
9115
10053
|
*/
|
|
9116
10054
|
readonly void_energy_source_prototype?: LuaVoidEnergySourcePrototype;
|
|
10055
|
+
readonly wait_for_full_hand?: boolean;
|
|
9117
10056
|
/**
|
|
9118
10057
|
* The weight of this vehicle prototype.
|
|
9119
10058
|
*/
|
|
9120
10059
|
readonly weight?: double;
|
|
10060
|
+
readonly width?: float;
|
|
9121
10061
|
}
|
|
9122
10062
|
/**
|
|
9123
10063
|
* An item in a {@link LuaEquipmentGrid | runtime:LuaEquipmentGrid}, for example a fusion reactor placed in one's power armor.
|
|
@@ -9129,6 +10069,10 @@ interface LuaEquipment {
|
|
|
9129
10069
|
* The burner energy source for this equipment, if any.
|
|
9130
10070
|
*/
|
|
9131
10071
|
readonly burner?: LuaBurner;
|
|
10072
|
+
/**
|
|
10073
|
+
* The power buffer size of this ElectricEnergyInterfaceEquipment.
|
|
10074
|
+
*/
|
|
10075
|
+
electric_buffer_size: double;
|
|
9132
10076
|
/**
|
|
9133
10077
|
* Current available energy.
|
|
9134
10078
|
*/
|
|
@@ -9181,6 +10125,14 @@ interface LuaEquipment {
|
|
|
9181
10125
|
* Position of this equipment in the equipment grid.
|
|
9182
10126
|
*/
|
|
9183
10127
|
readonly position: EquipmentPosition;
|
|
10128
|
+
/**
|
|
10129
|
+
* The power production specific to the ElectricEnergyInterfaceEquipment type.
|
|
10130
|
+
*/
|
|
10131
|
+
power_production: double;
|
|
10132
|
+
/**
|
|
10133
|
+
* The power usage specific to the ElectricEnergyInterfaceEquipment type.
|
|
10134
|
+
*/
|
|
10135
|
+
power_usage: double;
|
|
9184
10136
|
readonly prototype: LuaEquipmentPrototype;
|
|
9185
10137
|
/**
|
|
9186
10138
|
* Quality of this equipment.
|
|
@@ -9329,7 +10281,7 @@ interface LuaEquipmentGrid {
|
|
|
9329
10281
|
* @param by_player If provided, the action is done 'as' this player and {@link on_player_removed_equipment | runtime:on_player_removed_equipment} is triggered.
|
|
9330
10282
|
* @returns List of the equipment that has been removed.
|
|
9331
10283
|
*/
|
|
9332
|
-
take_all(this: void, by_player?: PlayerIdentification):
|
|
10284
|
+
take_all(this: void, by_player?: PlayerIdentification): ItemWithQualityCount[];
|
|
9333
10285
|
/**
|
|
9334
10286
|
* The total energy stored in all batteries in the equipment grid.
|
|
9335
10287
|
*/
|
|
@@ -9454,6 +10406,7 @@ interface LuaEquipmentPrototype extends LuaPrototypeBase {
|
|
|
9454
10406
|
* The burner energy source prototype this equipment uses, if any.
|
|
9455
10407
|
*/
|
|
9456
10408
|
readonly burner_prototype?: LuaBurnerPrototype;
|
|
10409
|
+
readonly darkness_to_turn_on?: float;
|
|
9457
10410
|
/**
|
|
9458
10411
|
* The electric energy source prototype this equipment uses, if any.
|
|
9459
10412
|
*/
|
|
@@ -9474,6 +10427,7 @@ interface LuaEquipmentPrototype extends LuaPrototypeBase {
|
|
|
9474
10427
|
* Category names for this equipment. These {@link categories | runtime:LuaEquipmentGridPrototype::equipment_categories} will be used to determine whether this equipment is allowed in a particular equipment grid.
|
|
9475
10428
|
*/
|
|
9476
10429
|
readonly equipment_categories: string[];
|
|
10430
|
+
readonly gui_mode?: 'all' | 'none' | 'admins';
|
|
9477
10431
|
/**
|
|
9478
10432
|
* The logistic parameters for this roboport equipment.
|
|
9479
10433
|
*/
|
|
@@ -9510,9 +10464,9 @@ interface LuaEquipmentPrototype extends LuaPrototypeBase {
|
|
|
9510
10464
|
*/
|
|
9511
10465
|
points?: EquipmentPoint[];
|
|
9512
10466
|
};
|
|
9513
|
-
readonly solar_panel_performance_at_day
|
|
9514
|
-
readonly solar_panel_performance_at_night
|
|
9515
|
-
readonly solar_panel_solar_coefficient_property
|
|
10467
|
+
readonly solar_panel_performance_at_day?: double;
|
|
10468
|
+
readonly solar_panel_performance_at_night?: double;
|
|
10469
|
+
readonly solar_panel_solar_coefficient_property?: LuaSurfacePropertyPrototype;
|
|
9516
10470
|
/**
|
|
9517
10471
|
* The result item when taking this equipment out of an equipment grid, if any.
|
|
9518
10472
|
*/
|
|
@@ -9538,6 +10492,20 @@ interface LuaFlowStatistics {
|
|
|
9538
10492
|
* Reset all the statistics data to 0.
|
|
9539
10493
|
*/
|
|
9540
10494
|
clear(this: void): void;
|
|
10495
|
+
/**
|
|
10496
|
+
* Gets the current-tick input sample for a given prototype.
|
|
10497
|
+
*
|
|
10498
|
+
* These values get merged into the input counts at the end of the tick.
|
|
10499
|
+
* @param id The prototype ID.
|
|
10500
|
+
*/
|
|
10501
|
+
get_current_input_sample(this: void, id: FlowStatisticsID): double;
|
|
10502
|
+
/**
|
|
10503
|
+
* Gets the current-tick output sample for a given prototype.
|
|
10504
|
+
*
|
|
10505
|
+
* These values get merged into the output counts at the end of the tick.
|
|
10506
|
+
* @param id The prototype ID.
|
|
10507
|
+
*/
|
|
10508
|
+
get_current_output_sample(this: void, id: FlowStatisticsID): double;
|
|
9541
10509
|
/**
|
|
9542
10510
|
* Gets the flow count value for the given time frame. If `sample_index` is not provided, then the value returned is the average across the provided precision time period. These are the values shown in the bottom section of the statistics GUIs.
|
|
9543
10511
|
*
|
|
@@ -9578,6 +10546,22 @@ interface LuaFlowStatistics {
|
|
|
9578
10546
|
* @param count The count: positive or negative determines if the value goes in the input or output statistics.
|
|
9579
10547
|
*/
|
|
9580
10548
|
on_flow(this: void, id: FlowStatisticsID, count: float): void;
|
|
10549
|
+
/**
|
|
10550
|
+
* Sets the current-tick input sample for a given prototype.
|
|
10551
|
+
*
|
|
10552
|
+
* These values get merged into the input counts at the end of the tick.
|
|
10553
|
+
* @param id The prototype ID.
|
|
10554
|
+
* @param count The new count.
|
|
10555
|
+
*/
|
|
10556
|
+
set_current_input_sample(this: void, id: FlowStatisticsID, count: double): void;
|
|
10557
|
+
/**
|
|
10558
|
+
* Sets the current-tick output sample for a given prototype.
|
|
10559
|
+
*
|
|
10560
|
+
* These values get merged into the output counts at the end of the tick.
|
|
10561
|
+
* @param id The prototype ID.
|
|
10562
|
+
* @param count The new count.
|
|
10563
|
+
*/
|
|
10564
|
+
set_current_output_sample(this: void, id: FlowStatisticsID, count: double): void;
|
|
9581
10565
|
/**
|
|
9582
10566
|
* Sets the total input count for a given prototype.
|
|
9583
10567
|
* @param id The prototype ID.
|
|
@@ -9596,6 +10580,14 @@ interface LuaFlowStatistics {
|
|
|
9596
10580
|
* @param count The new count. The type depends on the instance of the statistics.
|
|
9597
10581
|
*/
|
|
9598
10582
|
set_storage_count(this: void, id: FlowStatisticsID, count: uint64 | double): void;
|
|
10583
|
+
/**
|
|
10584
|
+
* A mapping of quality name to a list of current tick input samples indexed by prototype name.
|
|
10585
|
+
*/
|
|
10586
|
+
readonly current_input_quality_samples: Record<string, Record<string, double>>;
|
|
10587
|
+
/**
|
|
10588
|
+
* A mapping of quality name to a list of current tick output samples indexed by prototype name.
|
|
10589
|
+
*/
|
|
10590
|
+
readonly current_output_quality_samples: Record<string, Record<string, double>>;
|
|
9599
10591
|
/**
|
|
9600
10592
|
* The force these statistics belong to. `nil` for pollution statistics.
|
|
9601
10593
|
*/
|
|
@@ -9604,6 +10596,10 @@ interface LuaFlowStatistics {
|
|
|
9604
10596
|
* List of input counts indexed by prototype name. Represents the data that is shown on the left side of the GUI for the given statistics.
|
|
9605
10597
|
*/
|
|
9606
10598
|
readonly input_counts: Record<string, uint64 | double>;
|
|
10599
|
+
/**
|
|
10600
|
+
* A mapping of quality name to a list of input counts indexed by prototype name. Represents the data that is shown on the left side of the GUI for the given statistics.
|
|
10601
|
+
*/
|
|
10602
|
+
readonly input_quality_counts: Record<string, Record<string, uint64 | double>>;
|
|
9607
10603
|
/**
|
|
9608
10604
|
* 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.
|
|
9609
10605
|
*/
|
|
@@ -9613,143 +10609,30 @@ interface LuaFlowStatistics {
|
|
|
9613
10609
|
*/
|
|
9614
10610
|
readonly output_counts: Record<string, uint64 | double>;
|
|
9615
10611
|
/**
|
|
9616
|
-
*
|
|
9617
|
-
*/
|
|
9618
|
-
readonly storage_counts: Record<string, uint64 | double>;
|
|
9619
|
-
/**
|
|
9620
|
-
* 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.
|
|
9621
|
-
*/
|
|
9622
|
-
readonly valid: boolean;
|
|
9623
|
-
}
|
|
9624
|
-
/**
|
|
9625
|
-
* 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 | runtime:Fluid}.
|
|
9626
|
-
*
|
|
9627
|
-
* Do note that reading from a {@link LuaFluidBox | runtime: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.
|
|
9628
|
-
* @example ```
|
|
9629
|
-
-- Double the temperature of the fluid in entity's first fluid box.
|
|
9630
|
-
fluid = entity.fluidbox[1]
|
|
9631
|
-
fluid.temperature = fluid.temperature * 2
|
|
9632
|
-
entity.fluidbox[1] = fluid
|
|
9633
|
-
```
|
|
9634
|
-
*/
|
|
9635
|
-
interface LuaFluidBox {
|
|
9636
|
-
/**
|
|
9637
|
-
* Registers a linked connection between this entity and other entity. Because entity may have multiple fluidboxes, each with multiple connections that could be linked, a unique value for this and other linked_connection_id may need to be given.
|
|
9638
|
-
*
|
|
9639
|
-
* It may happen a linked connection is not established immediately due to crafting machines being possible to not have certain fluidboxes exposed at a given point in time, but once they appear (due to recipe changes that would use them) they will be linked. Linked connections are persisted as (this_entity, this_linked_connection_id, other_entity, other_linked_connection_id) so if a pipe connection definition's value of linked_connection_id changes existing connections may not restore correct connections.
|
|
9640
|
-
*
|
|
9641
|
-
* Every fluidbox connection that was defined in prototypes as connection_type=="linked" may be linked to at most 1 other fluidbox. When trying to connect already used connection, previous connection will be removed.
|
|
9642
|
-
*
|
|
9643
|
-
* Linked connections cannot go to the same entity even if they would be part of other fluidbox.
|
|
9644
|
-
*/
|
|
9645
|
-
add_linked_connection(this: void, this_linked_connection_id: uint32, other_entity: LuaEntity, other_linked_connection_id: uint32): void;
|
|
9646
|
-
/**
|
|
9647
|
-
* Flushes all fluid from this fluidbox and its fluid system.
|
|
9648
|
-
* @param fluid If provided, only this fluid is flushed.
|
|
9649
|
-
* @returns The removed fluid.
|
|
9650
|
-
*/
|
|
9651
|
-
flush(this: void, index: uint32, fluid?: FluidID): Record<string, FluidAmount>;
|
|
9652
|
-
/**
|
|
9653
|
-
* The capacity of the given fluidbox segment.
|
|
9654
|
-
*/
|
|
9655
|
-
get_capacity(this: void, index: uint32): double;
|
|
9656
|
-
/**
|
|
9657
|
-
* The fluidboxes to which the fluidbox at the given index is connected.
|
|
9658
|
-
*/
|
|
9659
|
-
get_connections(this: void, index: uint32): LuaFluidBox[];
|
|
9660
|
-
/**
|
|
9661
|
-
* Get a fluid box filter
|
|
9662
|
-
* @param index The index of the filter to get.
|
|
9663
|
-
* @returns The filter at the requested index, or `nil` if there isn't one.
|
|
9664
|
-
*/
|
|
9665
|
-
get_filter(this: void, index: uint32): FluidBoxFilter | null;
|
|
9666
|
-
/**
|
|
9667
|
-
* Gets counts of all fluids in the fluid segment. May return `nil` for fluid wagon, fluid turret's internal buffer, or a fluidbox which does not belong to a fluid segment.
|
|
9668
|
-
*
|
|
9669
|
-
* Note that this method only ever returns one fluid, since fluids can't be mixed anymore.
|
|
9670
|
-
* @returns The counts, indexed by fluid name.
|
|
9671
|
-
*/
|
|
9672
|
-
get_fluid_segment_contents(this: void, index: uint32): Record<string, uint32> | null;
|
|
9673
|
-
/**
|
|
9674
|
-
* Gets the current extent bounding box of the fluid segment this fluid box belongs to. May return `nil` for fluid wagon, fluid turret's internal buffer, or a fluidbox which does not belong to a fluid segment.
|
|
9675
|
-
*/
|
|
9676
|
-
get_fluid_segment_extent_bounding_box(this: void, index: uint32): BoundingBox | null;
|
|
9677
|
-
/**
|
|
9678
|
-
* Gets the unique ID of the fluid segment this fluid box belongs to. May return `nil` for fluid wagon, fluid turret's internal buffer or a fluidbox which does not belong to a fluid segment.
|
|
9679
|
-
*/
|
|
9680
|
-
get_fluid_segment_id(this: void, index: uint32): uint32 | null;
|
|
9681
|
-
/**
|
|
9682
|
-
* Returns other end of a linked connection.
|
|
9683
|
-
* @returns [0] - Other entity to which a linked connection was made
|
|
9684
|
-
* @returns [1] - linked_connection_id on other entity
|
|
9685
|
-
*/
|
|
9686
|
-
get_linked_connection(this: void, this_linked_connection_id: uint32): LuaMultiReturn<[
|
|
9687
|
-
LuaEntity | null,
|
|
9688
|
-
uint32 | null
|
|
9689
|
-
]>;
|
|
9690
|
-
/**
|
|
9691
|
-
* Returns list of all linked connections registered for this entity.
|
|
10612
|
+
* A mapping of quality name to a list of output counts indexed by prototype name. Represents the data that is shown in the middle of the GUI for electric networks and on the right side for all other statistics types.
|
|
9692
10613
|
*/
|
|
9693
|
-
|
|
10614
|
+
readonly output_quality_counts: Record<string, Record<string, uint64 | double>>;
|
|
9694
10615
|
/**
|
|
9695
|
-
*
|
|
9696
|
-
* @returns `nil` if the fluidbox is not locked to any fluid.
|
|
9697
|
-
*/
|
|
9698
|
-
get_locked_fluid(this: void, index: uint32): string | null;
|
|
9699
|
-
/**
|
|
9700
|
-
* Get the fluid box's connections and associated data.
|
|
9701
|
-
*/
|
|
9702
|
-
get_pipe_connections(this: void, index: uint32): PipeConnection[];
|
|
9703
|
-
/**
|
|
9704
|
-
* The prototype of this fluidbox index. If this is used on a fluidbox of a crafting machine which due to recipe was created by merging multiple prototypes, a table of prototypes that were merged will be returned instead
|
|
9705
|
-
*/
|
|
9706
|
-
get_prototype(this: void, index: uint32): LuaFluidBoxPrototype | LuaFluidBoxPrototype[];
|
|
9707
|
-
/**
|
|
9708
|
-
* Removes linked connection record. If connected, other end will be also removed.
|
|
9709
|
-
*/
|
|
9710
|
-
remove_linked_connection(this: void, this_linked_connection_id: uint32): void;
|
|
9711
|
-
/**
|
|
9712
|
-
* Set a fluid box filter.
|
|
9713
|
-
*
|
|
9714
|
-
* Some entities cannot have their fluidbox filter set, notably fluid wagons and crafting machines.
|
|
9715
|
-
* @param index The index of the filter to set.
|
|
9716
|
-
* @param filter The filter to set. Setting `nil` clears the filter.
|
|
9717
|
-
* @returns Whether the filter was set successfully.
|
|
9718
|
-
*/
|
|
9719
|
-
set_filter(this: void, index: uint32, filter: FluidBoxFilterSpec | nil): boolean;
|
|
9720
|
-
/**
|
|
9721
|
-
* 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.
|
|
10616
|
+
* List of storage counts indexed by prototype name. Represents the data that is shown on the right side of the GUI for electric networks. For other statistics types these values are currently unused and hidden.
|
|
9722
10617
|
*/
|
|
9723
|
-
readonly
|
|
10618
|
+
readonly storage_counts: Record<string, uint64 | double>;
|
|
9724
10619
|
/**
|
|
9725
|
-
*
|
|
10620
|
+
* A mapping of quality name to a list of storage counts indexed by prototype name. Represents the data that is shown on the right side of the GUI for electric networks. For other statistics types these values are currently unused and hidden.
|
|
9726
10621
|
*/
|
|
9727
|
-
readonly
|
|
10622
|
+
readonly storage_quality_counts: Record<string, Record<string, uint64 | double>>;
|
|
9728
10623
|
/**
|
|
9729
10624
|
* 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.
|
|
9730
10625
|
*/
|
|
9731
10626
|
readonly valid: boolean;
|
|
9732
|
-
/**
|
|
9733
|
-
* Access, set or clear a fluid box. The index must always be in bounds (see {@link LuaFluidBox::length_operator | runtime:LuaFluidBox::length_operator}). New fluidboxes may not be added or removed using this operator.
|
|
9734
|
-
*
|
|
9735
|
-
* Is `nil` if the given fluid box does not contain any fluid. Writing `nil` removes all fluid from the fluid box.
|
|
9736
|
-
*/
|
|
9737
|
-
get: LuaTableGetMethod<any, Fluid>;
|
|
9738
|
-
/**
|
|
9739
|
-
* Access, set or clear a fluid box. The index must always be in bounds (see {@link LuaFluidBox::length_operator | runtime:LuaFluidBox::length_operator}). New fluidboxes may not be added or removed using this operator.
|
|
9740
|
-
*
|
|
9741
|
-
* Is `nil` if the given fluid box does not contain any fluid. Writing `nil` removes all fluid from the fluid box.
|
|
9742
|
-
*/
|
|
9743
|
-
set: LuaTableSetMethod<any, Fluid>;
|
|
9744
|
-
/**
|
|
9745
|
-
* Number of fluid boxes.
|
|
9746
|
-
*/
|
|
9747
|
-
length: LuaLengthMethod<uint32>;
|
|
9748
10627
|
}
|
|
9749
10628
|
/**
|
|
9750
10629
|
* A prototype of a fluidbox owned by some {@link LuaEntityPrototype | runtime:LuaEntityPrototype}.
|
|
9751
10630
|
*/
|
|
9752
10631
|
interface LuaFluidBoxPrototype {
|
|
10632
|
+
/**
|
|
10633
|
+
* Gets the volume of this fluidbox with the given quality.
|
|
10634
|
+
*/
|
|
10635
|
+
get_volume(this: void, quality?: QualityID): double;
|
|
9753
10636
|
/**
|
|
9754
10637
|
* The entity that this belongs to.
|
|
9755
10638
|
*/
|
|
@@ -9794,7 +10677,6 @@ interface LuaFluidBoxPrototype {
|
|
|
9794
10677
|
* 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.
|
|
9795
10678
|
*/
|
|
9796
10679
|
readonly valid: boolean;
|
|
9797
|
-
readonly volume: double;
|
|
9798
10680
|
}
|
|
9799
10681
|
/**
|
|
9800
10682
|
* Prototype of a fluid energy source.
|
|
@@ -9817,6 +10699,7 @@ interface LuaFluidEnergySourcePrototype {
|
|
|
9817
10699
|
* 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.
|
|
9818
10700
|
*/
|
|
9819
10701
|
readonly object_name: string;
|
|
10702
|
+
readonly output_fluid_box?: LuaFluidBoxPrototype;
|
|
9820
10703
|
readonly render_no_network_icon: boolean;
|
|
9821
10704
|
readonly render_no_power_icon: boolean;
|
|
9822
10705
|
readonly scale_fluid_usage: boolean;
|
|
@@ -9824,6 +10707,7 @@ interface LuaFluidEnergySourcePrototype {
|
|
|
9824
10707
|
* The smoke sources for this prototype, if any.
|
|
9825
10708
|
*/
|
|
9826
10709
|
readonly smoke: SmokeSource[];
|
|
10710
|
+
readonly spent_fluid?: SpentFluidSpecification;
|
|
9827
10711
|
/**
|
|
9828
10712
|
* 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.
|
|
9829
10713
|
*/
|
|
@@ -9867,10 +10751,12 @@ interface LuaFluidPrototype extends LuaPrototypeBase {
|
|
|
9867
10751
|
* 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.
|
|
9868
10752
|
*/
|
|
9869
10753
|
readonly object_name: string;
|
|
10754
|
+
readonly spent_fluid?: SpentFluidSpecification;
|
|
9870
10755
|
/**
|
|
9871
10756
|
* 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.
|
|
9872
10757
|
*/
|
|
9873
10758
|
readonly valid: boolean;
|
|
10759
|
+
readonly visualization_color: Color;
|
|
9874
10760
|
}
|
|
9875
10761
|
/**
|
|
9876
10762
|
* Prototype of a font.
|
|
@@ -9902,6 +10788,10 @@ interface LuaFontPrototype {
|
|
|
9902
10788
|
* `LuaForce` encapsulates data local to each "force" or "faction" of the game. Default forces are player, enemy and neutral. Players and mods can create additional forces (up to 64 total).
|
|
9903
10789
|
*/
|
|
9904
10790
|
interface LuaForce {
|
|
10791
|
+
/**
|
|
10792
|
+
* Adds an alert to every connected player on this force.
|
|
10793
|
+
*/
|
|
10794
|
+
add_alert(this: void, entity: LuaEntity, type: defines.alert_type): void;
|
|
9905
10795
|
/**
|
|
9906
10796
|
* Adds a custom chart tag to the given surface and returns the new tag or `nil` if the given position isn't valid for a chart tag.
|
|
9907
10797
|
*
|
|
@@ -9910,6 +10800,11 @@ interface LuaForce {
|
|
|
9910
10800
|
* @param tag The tag to add.
|
|
9911
10801
|
*/
|
|
9912
10802
|
add_chart_tag(this: void, surface: SurfaceIdentification, tag: ChartTagSpec): LuaCustomChartTag | null;
|
|
10803
|
+
/**
|
|
10804
|
+
* Adds a custom alert to every connected player on this force.
|
|
10805
|
+
* @param entity If the alert is clicked, the map will open at the position of this entity.
|
|
10806
|
+
*/
|
|
10807
|
+
add_custom_alert(this: void, entity: LuaEntity, icon: SignalID, message: LocalisedString, show_on_map: boolean): void;
|
|
9913
10808
|
/**
|
|
9914
10809
|
* Add this technology to the back of the research queue if the queue is enabled. Otherwise, set this technology to be researched now.
|
|
9915
10810
|
* @returns Whether the technology was successfully added.
|
|
@@ -10102,6 +10997,10 @@ interface LuaForce {
|
|
|
10102
10997
|
* @param type Defaults to `defines.logistic_group_type.with_trash`.
|
|
10103
10998
|
*/
|
|
10104
10999
|
get_logistic_groups(this: void, type?: defines.logistic_group_type): string[];
|
|
11000
|
+
/**
|
|
11001
|
+
* Gets the unlockable script state for the given ID.
|
|
11002
|
+
*/
|
|
11003
|
+
get_script_visible(this: void, unlockable: UnlockableID): boolean | null;
|
|
10105
11004
|
get_spawn_position(this: void, surface: SurfaceIdentification): MapPosition;
|
|
10106
11005
|
get_surface_hidden(this: void, surface: SurfaceIdentification): boolean;
|
|
10107
11006
|
/**
|
|
@@ -10148,6 +11047,10 @@ interface LuaForce {
|
|
|
10148
11047
|
* Are the space platforms unlocked? This basically just controls the availability of the space platforms button.
|
|
10149
11048
|
*/
|
|
10150
11049
|
is_space_platforms_unlocked(this: void): boolean;
|
|
11050
|
+
/**
|
|
11051
|
+
* Is the given unlockable ID visible either through computed technologies or script set state.
|
|
11052
|
+
*/
|
|
11053
|
+
is_visible(this: void, unlockable: UnlockableID): boolean;
|
|
10151
11054
|
/**
|
|
10152
11055
|
* Kill all units and flush the pathfinder.
|
|
10153
11056
|
*/
|
|
@@ -10166,6 +11069,11 @@ interface LuaForce {
|
|
|
10166
11069
|
* Locks the space platforms, which disables the space platforms button
|
|
10167
11070
|
*/
|
|
10168
11071
|
lock_space_platforms(this: void): void;
|
|
11072
|
+
/**
|
|
11073
|
+
* Play a music track for every player in this force.
|
|
11074
|
+
* @param music_specification The track to play.
|
|
11075
|
+
*/
|
|
11076
|
+
play_music(this: void, music_specification: PlayMusicSpecification): void;
|
|
10169
11077
|
/**
|
|
10170
11078
|
* Play a sound for every player in this force.
|
|
10171
11079
|
*
|
|
@@ -10184,6 +11092,10 @@ interface LuaForce {
|
|
|
10184
11092
|
* @param surface Which surface to rechart or all if not given.
|
|
10185
11093
|
*/
|
|
10186
11094
|
rechart(this: void, surface?: SurfaceIdentification): void;
|
|
11095
|
+
/**
|
|
11096
|
+
* For every connected player on this force - removes all alerts matching the given filters or if an empty filters table is given all alerts are removed.
|
|
11097
|
+
*/
|
|
11098
|
+
remove_alert(this: void, filter: AlertFilter): void;
|
|
10187
11099
|
/**
|
|
10188
11100
|
* Research all technologies.
|
|
10189
11101
|
* @param include_disabled_prototypes Whether technologies that are explicitly disabled in the prototype should also be researched. Defaults to `false`.
|
|
@@ -10202,7 +11114,7 @@ interface LuaForce {
|
|
|
10202
11114
|
*/
|
|
10203
11115
|
reset_recipes(this: void): void;
|
|
10204
11116
|
/**
|
|
10205
|
-
* Load the original versions of technologies from prototypes. Preserves research state of technologies.
|
|
11117
|
+
* Load the original versions of technologies from prototypes. Preserves research, enabled and visible_when_disabled state of technologies.
|
|
10206
11118
|
*/
|
|
10207
11119
|
reset_technologies(this: void): void;
|
|
10208
11120
|
/**
|
|
@@ -10259,6 +11171,10 @@ interface LuaForce {
|
|
|
10259
11171
|
* @param count The count to set
|
|
10260
11172
|
*/
|
|
10261
11173
|
set_item_launched(this: void, item: ItemID, count: uint32): void;
|
|
11174
|
+
/**
|
|
11175
|
+
* Sets the given unlockable ID state. When set to explicitly hidden or visible the value overrides the state computed through technologies.
|
|
11176
|
+
*/
|
|
11177
|
+
set_script_visible(this: void, unlockable: UnlockableID, value?: boolean): void;
|
|
10262
11178
|
/**
|
|
10263
11179
|
* @param position The new position on the given surface.
|
|
10264
11180
|
* @param surface Surface to set the spawn position for.
|
|
@@ -10310,6 +11226,10 @@ interface LuaForce {
|
|
|
10310
11226
|
* Number of items that can be transferred by bulk inserters. When writing to this value, it must be >= 0 and <= 254.
|
|
10311
11227
|
*/
|
|
10312
11228
|
bulk_inserter_capacity_bonus: uint32;
|
|
11229
|
+
/**
|
|
11230
|
+
* The maximum cargo landing pads that can be built per surface by this force.
|
|
11231
|
+
*/
|
|
11232
|
+
cargo_landing_pad_limit: uint32;
|
|
10313
11233
|
character_build_distance_bonus: uint32;
|
|
10314
11234
|
character_health_bonus: double;
|
|
10315
11235
|
/**
|
|
@@ -10408,6 +11328,10 @@ interface LuaForce {
|
|
|
10408
11328
|
```
|
|
10409
11329
|
*/
|
|
10410
11330
|
manual_mining_speed_modifier: double;
|
|
11331
|
+
/**
|
|
11332
|
+
* Maximum distance between cargo bay from its connected cargo landing pad that allows unloading. Only relevant for cargo bays that have both {@link LuaEntityPrototype::allow_unloading | runtime:LuaEntityPrototype::allow_unloading} and {@link LuaEntityPrototype::use_unloading_distance_limit | runtime:LuaEntityPrototype::use_unloading_distance_limit} set to `true`.
|
|
11333
|
+
*/
|
|
11334
|
+
max_cargo_bay_unloading_distance: double;
|
|
10411
11335
|
max_failed_attempts_per_tick_per_construction_queue: uint32;
|
|
10412
11336
|
max_successful_attempts_per_tick_per_construction_queue: uint32;
|
|
10413
11337
|
/**
|
|
@@ -10484,6 +11408,14 @@ interface LuaForce {
|
|
|
10484
11408
|
*/
|
|
10485
11409
|
readonly technologies: Record<string, LuaTechnology>;
|
|
10486
11410
|
train_braking_force_bonus: double;
|
|
11411
|
+
/**
|
|
11412
|
+
* When true, a "connect to logistic network" button will become enabled for entities that can connect to a logistic network.
|
|
11413
|
+
*/
|
|
11414
|
+
unlock_logistic_network: boolean;
|
|
11415
|
+
/**
|
|
11416
|
+
* Whether traveling to space platforms via rockets is unlocked.
|
|
11417
|
+
*/
|
|
11418
|
+
unlock_travel_to_space_platforms: boolean;
|
|
10487
11419
|
/**
|
|
10488
11420
|
* 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.
|
|
10489
11421
|
*/
|
|
@@ -10537,10 +11469,6 @@ interface LuaFurnaceControlBehavior extends LuaGenericOnOffControlBehavior {
|
|
|
10537
11469
|
* The signal sent when the furnace is working.
|
|
10538
11470
|
*/
|
|
10539
11471
|
circuit_working_signal?: SignalID;
|
|
10540
|
-
/**
|
|
10541
|
-
* `true` if the read contents should include fuel (content of energy source)
|
|
10542
|
-
*/
|
|
10543
|
-
include_fuel: boolean;
|
|
10544
11472
|
/**
|
|
10545
11473
|
* `true` if the read contents should include items in crafting.
|
|
10546
11474
|
*/
|
|
@@ -10549,6 +11477,10 @@ interface LuaFurnaceControlBehavior extends LuaGenericOnOffControlBehavior {
|
|
|
10549
11477
|
* 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.
|
|
10550
11478
|
*/
|
|
10551
11479
|
readonly object_name: string;
|
|
11480
|
+
/**
|
|
11481
|
+
* `true` if the fuel (content of energy source) should be read.
|
|
11482
|
+
*/
|
|
11483
|
+
read_fuel: boolean;
|
|
10552
11484
|
/**
|
|
10553
11485
|
* 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.
|
|
10554
11486
|
*/
|
|
@@ -10563,8 +11495,9 @@ interface LuaGameScript {
|
|
|
10563
11495
|
*
|
|
10564
11496
|
* Only the server will save in multiplayer. In single player a standard auto-save is triggered.
|
|
10565
11497
|
* @param name The autosave name if any. Saves will be named _autosave-*name* when provided.
|
|
11498
|
+
* @param allow_in_replay Whether to save the auto-save even during replay playback. Defaults to `false`
|
|
10566
11499
|
*/
|
|
10567
|
-
auto_save(this: void, name?: string): void;
|
|
11500
|
+
auto_save(this: void, name?: string, allow_in_replay?: boolean): void;
|
|
10568
11501
|
/**
|
|
10569
11502
|
* Bans the given player from this multiplayer game. Does nothing if this is a single player game of if the player running this isn't an admin.
|
|
10570
11503
|
* @param player The player to ban.
|
|
@@ -10595,13 +11528,6 @@ interface LuaGameScript {
|
|
|
10595
11528
|
* @param gui_title The title of the GUI that is shown when this inventory is opened.
|
|
10596
11529
|
*/
|
|
10597
11530
|
create_inventory(this: void, size: uint16, gui_title?: LocalisedString): LuaInventory;
|
|
10598
|
-
/**
|
|
10599
|
-
* Creates a {@link LuaProfiler | runtime:LuaProfiler}, which is used for measuring script performance.
|
|
10600
|
-
*
|
|
10601
|
-
* LuaProfiler cannot be serialized.
|
|
10602
|
-
* @param stopped Create the timer stopped
|
|
10603
|
-
*/
|
|
10604
|
-
create_profiler(this: void, stopped?: boolean): LuaProfiler;
|
|
10605
11531
|
/**
|
|
10606
11532
|
* Creates a deterministic standalone random generator with the given seed or if a seed is not provided the initial map seed is used.
|
|
10607
11533
|
*
|
|
@@ -10617,6 +11543,12 @@ interface LuaGameScript {
|
|
|
10617
11543
|
* @returns The surface that was just created.
|
|
10618
11544
|
*/
|
|
10619
11545
|
create_surface(this: void, name: string, settings?: MapGenSettings): LuaSurface;
|
|
11546
|
+
/**
|
|
11547
|
+
* Deletes the blueprint library of the given player.
|
|
11548
|
+
*
|
|
11549
|
+
* Note: the player must be offline (disconnected).
|
|
11550
|
+
*/
|
|
11551
|
+
delete_blueprint_library(this: void, player: PlayerIdentification): void;
|
|
10620
11552
|
/**
|
|
10621
11553
|
* Deletes the given surface and all entities on it if possible.
|
|
10622
11554
|
* @param surface The surface to be deleted. Currently the primary surface (1, 'nauvis') cannot be deleted.
|
|
@@ -10707,6 +11639,11 @@ interface LuaGameScript {
|
|
|
10707
11639
|
* @param player The player to mute.
|
|
10708
11640
|
*/
|
|
10709
11641
|
mute_player(this: void, player: PlayerIdentification): void;
|
|
11642
|
+
/**
|
|
11643
|
+
* Play a music track for every player in the game.
|
|
11644
|
+
* @param music_specification The track to play.
|
|
11645
|
+
*/
|
|
11646
|
+
play_music(this: void, music_specification: PlayMusicSpecification): void;
|
|
10710
11647
|
/**
|
|
10711
11648
|
* Play a sound for every player in the game.
|
|
10712
11649
|
*
|
|
@@ -10872,6 +11809,7 @@ interface LuaGameScript {
|
|
|
10872
11809
|
* @param table.selected_technology The technology to highlight.
|
|
10873
11810
|
* @param table.skip_disabled If `true`, disabled technologies will be skipped. Their successors will be attached to the disabled technology's parents. Defaults to `false`.
|
|
10874
11811
|
* @param table.quality The `.jpg` render quality as a percentage (from 0% to 100% inclusive), if used. A lower value means a more compressed image. Defaults to `80`.
|
|
11812
|
+
* @param table.allow_in_replay Whether to save the screenshot even during replay playback. Defaults to `false`.
|
|
10875
11813
|
*/
|
|
10876
11814
|
take_technology_screenshot(this: void, table: {
|
|
10877
11815
|
path?: string;
|
|
@@ -10879,6 +11817,7 @@ interface LuaGameScript {
|
|
|
10879
11817
|
selected_technology?: TechnologyID;
|
|
10880
11818
|
skip_disabled?: boolean;
|
|
10881
11819
|
quality?: int32;
|
|
11820
|
+
allow_in_replay?: boolean;
|
|
10882
11821
|
}): void;
|
|
10883
11822
|
/**
|
|
10884
11823
|
* Unbans the given player from this multiplayer game. Does nothing if this is a single player game of if the player running this isn't an admin.
|
|
@@ -10893,7 +11832,7 @@ interface LuaGameScript {
|
|
|
10893
11832
|
/**
|
|
10894
11833
|
* Whether players who are not {@link admins | runtime:LuaPlayer::admin} can access all debug settings. Set this to false to disallow access to most debug settings for non-admins.
|
|
10895
11834
|
*
|
|
10896
|
-
* The following debug settings are always available to all players: `"show-fps"`, `"show-clock"`, `"show-time-to-next-autosave"`, `"show-detailed-info"`, `"show-time-usage"`, `"show-entity-time-usage"`, `"show-gpu-time-usage"`, `"show-sprite-counts"`, `"show-particle-counts"`, `"show-collector-navmesh-time-usage"`, `"show-lua-object-statistics"`, `"show-heat-buffer-info"`, `"show-multiplayer-waiting-icon"`, `"show-multiplayer-statistics"`, `"show-multiplayer-server-name"`, `"show-debug-info-in-tooltips"`, `"show-resistances-in-tooltips-always"`, `"hide-mod-guis"`, `"show-tile-grid"`, `"show-blueprint-grid"`, `"show-intermediate-volume-of-working-sounds"`, `"show-decorative-names"`, `"allow-increased-zoom"`, `"show-train-no-path-details"`, `"show-entity-tick"`, `"show-update-tick"`
|
|
11835
|
+
* The following debug settings are always available to all players: `"show-fps"`, `"show-playtime"`, `"show-clock"`, `"show-time-to-next-autosave"`, `"show-detailed-info"`, `"show-time-usage"`, `"show-entity-time-usage"`, `"show-gpu-time-usage"`, `"show-sprite-counts"`, `"show-particle-counts"`, `"show-collector-navmesh-time-usage"`, `"show-lua-object-statistics"`, `"show-heat-buffer-info"`, `"show-multiplayer-ups"`, `"show-multiplayer-waiting-icon"`, `"show-multiplayer-statistics"`, `"show-multiplayer-server-name"`, `"show-debug-info-in-tooltips"`, `"show-resistances-in-tooltips-always"`, `"hide-mod-guis"`, `"show-tile-grid"`, `"show-blueprint-grid"`, `"show-intermediate-volume-of-working-sounds"`, `"show-decorative-names"`, `"allow-increased-zoom"`, `"show-train-no-path-details"`, `"show-entity-tick"`, `"show-update-tick"`
|
|
10897
11836
|
*/
|
|
10898
11837
|
allow_debug_settings: boolean;
|
|
10899
11838
|
/**
|
|
@@ -11467,6 +12406,7 @@ interface LuaGuiElement {
|
|
|
11467
12406
|
* The remaining types use strings.
|
|
11468
12407
|
*/
|
|
11469
12408
|
elem_value?: string | SignalID | PrototypeWithQuality;
|
|
12409
|
+
empty_slot_info?: EmptySlotInfo;
|
|
11470
12410
|
/**
|
|
11471
12411
|
* Whether this GUI element is enabled. Disabled GUI elements don't trigger events when clicked.
|
|
11472
12412
|
*/
|
|
@@ -11487,6 +12427,12 @@ interface LuaGuiElement {
|
|
|
11487
12427
|
* The GUI this element is a child of.
|
|
11488
12428
|
*/
|
|
11489
12429
|
readonly gui: LuaGui;
|
|
12430
|
+
hand_send_stacks_to_trash: boolean;
|
|
12431
|
+
handle_cursor_split: boolean;
|
|
12432
|
+
handle_cursor_transfer: boolean;
|
|
12433
|
+
handle_open_item: boolean;
|
|
12434
|
+
handle_open_mod_item: boolean;
|
|
12435
|
+
handle_send_stack_to_trash: boolean;
|
|
11490
12436
|
/**
|
|
11491
12437
|
* Policy of the horizontal scroll bar.
|
|
11492
12438
|
*/
|
|
@@ -11507,6 +12453,10 @@ interface LuaGuiElement {
|
|
|
11507
12453
|
* The index of this GUI element (unique amongst the GUI elements of a LuaPlayer).
|
|
11508
12454
|
*/
|
|
11509
12455
|
readonly index: uint32;
|
|
12456
|
+
/**
|
|
12457
|
+
* The inventory target for this custom inventory widget.
|
|
12458
|
+
*/
|
|
12459
|
+
inventory?: LuaInventory;
|
|
11510
12460
|
/**
|
|
11511
12461
|
* Whether this textfield displays as a password field, which renders all characters as `*`.
|
|
11512
12462
|
*/
|
|
@@ -11623,6 +12573,7 @@ interface LuaGuiElement {
|
|
|
11623
12573
|
* The value of this slider element.
|
|
11624
12574
|
*/
|
|
11625
12575
|
slider_value: double;
|
|
12576
|
+
slots_per_row?: uint8;
|
|
11626
12577
|
/**
|
|
11627
12578
|
* The sprite to display on this sprite-button or sprite in the default state.
|
|
11628
12579
|
*/
|
|
@@ -11633,6 +12584,8 @@ interface LuaGuiElement {
|
|
|
11633
12584
|
state: boolean;
|
|
11634
12585
|
/**
|
|
11635
12586
|
* The style of this element. When read, this evaluates to a {@link LuaStyle | runtime:LuaStyle}. For writing, it only accepts a string that specifies the textual identifier (prototype name) of the desired style.
|
|
12587
|
+
*
|
|
12588
|
+
* When writing, this clears all custom values set through {@link LuaStyle | runtime:LuaStyle}.
|
|
11636
12589
|
*/
|
|
11637
12590
|
style: LuaStyle | string;
|
|
11638
12591
|
/**
|
|
@@ -11706,7 +12659,7 @@ interface LuaGuiElement {
|
|
|
11706
12659
|
*/
|
|
11707
12660
|
set: LuaTableSetMethod<any, LuaGuiElement>;
|
|
11708
12661
|
}
|
|
11709
|
-
type LuaGuiElementAddParams = BaseLuaGuiElementAddParams | LuaGuiElementAddParamsButton | LuaGuiElementAddParamsCamera | LuaGuiElementAddParamsCheckbox | LuaGuiElementAddParamsChooseElemButton | LuaGuiElementAddParamsDropDown | LuaGuiElementAddParamsFlow | LuaGuiElementAddParamsFrame | LuaGuiElementAddParamsLine | LuaGuiElementAddParamsListBox | LuaGuiElementAddParamsMinimap | LuaGuiElementAddParamsProgressbar | LuaGuiElementAddParamsRadiobutton | LuaGuiElementAddParamsScrollPane | LuaGuiElementAddParamsSlider | LuaGuiElementAddParamsSprite | LuaGuiElementAddParamsSpriteButton | LuaGuiElementAddParamsSwitch | LuaGuiElementAddParamsTab | LuaGuiElementAddParamsTable | LuaGuiElementAddParamsTextBox | LuaGuiElementAddParamsTextfield;
|
|
12662
|
+
type LuaGuiElementAddParams = BaseLuaGuiElementAddParams | LuaGuiElementAddParamsButton | LuaGuiElementAddParamsCamera | LuaGuiElementAddParamsCheckbox | LuaGuiElementAddParamsChooseElemButton | LuaGuiElementAddParamsDropDown | LuaGuiElementAddParamsFlow | LuaGuiElementAddParamsFrame | LuaGuiElementAddParamsInventory | LuaGuiElementAddParamsLine | LuaGuiElementAddParamsListBox | LuaGuiElementAddParamsMinimap | LuaGuiElementAddParamsProgressbar | LuaGuiElementAddParamsRadiobutton | LuaGuiElementAddParamsScrollPane | LuaGuiElementAddParamsSlider | LuaGuiElementAddParamsSprite | LuaGuiElementAddParamsSpriteButton | LuaGuiElementAddParamsSwitch | LuaGuiElementAddParamsTab | LuaGuiElementAddParamsTable | LuaGuiElementAddParamsTextBox | LuaGuiElementAddParamsTextfield;
|
|
11710
12663
|
interface BaseLuaGuiElementAddParams {
|
|
11711
12664
|
/**
|
|
11712
12665
|
* Where to position the child element when in the `relative` element.
|
|
@@ -11763,7 +12716,7 @@ interface BaseLuaGuiElementAddParams {
|
|
|
11763
12716
|
/**
|
|
11764
12717
|
* The kind of element to add, which potentially has its own attributes as listed below.
|
|
11765
12718
|
*/
|
|
11766
|
-
'type': 'button' | 'camera' | 'checkbox' | 'choose-elem-button' | 'drop-down' | 'flow' | 'frame' | 'line' | 'list-box' | 'minimap' | 'progressbar' | 'radiobutton' | 'scroll-pane' | 'slider' | 'sprite' | 'sprite-button' | 'switch' | 'tab' | 'table' | 'text-box' | 'textfield';
|
|
12719
|
+
'type': 'button' | 'camera' | 'checkbox' | 'choose-elem-button' | 'drop-down' | 'flow' | 'frame' | 'inventory' | 'line' | 'list-box' | 'minimap' | 'progressbar' | 'radiobutton' | 'scroll-pane' | 'slider' | 'sprite' | 'sprite-button' | 'switch' | 'tab' | 'table' | 'text-box' | 'textfield';
|
|
11767
12720
|
/**
|
|
11768
12721
|
* Whether the child element is visible. Defaults to `true`.
|
|
11769
12722
|
*/
|
|
@@ -11959,6 +12912,24 @@ interface LuaGuiElementAddParamsFrame extends BaseLuaGuiElementAddParams {
|
|
|
11959
12912
|
*/
|
|
11960
12913
|
'direction'?: GuiDirection;
|
|
11961
12914
|
}
|
|
12915
|
+
/**
|
|
12916
|
+
*
|
|
12917
|
+
* Applies to variant case `inventory`
|
|
12918
|
+
*/
|
|
12919
|
+
interface LuaGuiElementAddParamsInventory extends BaseLuaGuiElementAddParams {
|
|
12920
|
+
/**
|
|
12921
|
+
* The kind of element to add, which potentially has its own attributes as listed below.
|
|
12922
|
+
*/
|
|
12923
|
+
'type': 'inventory';
|
|
12924
|
+
'empty_slot_info'?: EmptySlotInfo;
|
|
12925
|
+
'hand_send_stacks_to_trash'?: boolean;
|
|
12926
|
+
'handle_cursor_split'?: boolean;
|
|
12927
|
+
'handle_cursor_transfer'?: boolean;
|
|
12928
|
+
'handle_open_item'?: boolean;
|
|
12929
|
+
'handle_open_mod_item'?: boolean;
|
|
12930
|
+
'handle_send_stack_to_trash'?: boolean;
|
|
12931
|
+
'slots_per_row'?: uint8;
|
|
12932
|
+
}
|
|
11962
12933
|
/**
|
|
11963
12934
|
*
|
|
11964
12935
|
* Applies to variant case `line`
|
|
@@ -12287,7 +13258,7 @@ interface LuaGuiElementAddParamsTextfield extends BaseLuaGuiElementAddParams {
|
|
|
12287
13258
|
* Prototype of a heat buffer.
|
|
12288
13259
|
*/
|
|
12289
13260
|
interface LuaHeatBufferPrototype {
|
|
12290
|
-
readonly connections:
|
|
13261
|
+
readonly connections: HeatConnectionDefinition[];
|
|
12291
13262
|
readonly default_temperature: double;
|
|
12292
13263
|
readonly max_temperature: double;
|
|
12293
13264
|
readonly max_transfer: double;
|
|
@@ -12308,7 +13279,7 @@ interface LuaHeatBufferPrototype {
|
|
|
12308
13279
|
* Prototype of a heat energy source.
|
|
12309
13280
|
*/
|
|
12310
13281
|
interface LuaHeatEnergySourcePrototype {
|
|
12311
|
-
readonly connections:
|
|
13282
|
+
readonly connections: HeatConnectionDefinition[];
|
|
12312
13283
|
readonly default_temperature: double;
|
|
12313
13284
|
/**
|
|
12314
13285
|
* The table of emissions of this energy source in `pollution/Joule`, indexed by pollutant type. Multiplying it by energy consumption in `Watt` gives `pollution/second`.
|
|
@@ -12332,6 +13303,24 @@ interface LuaHeatEnergySourcePrototype {
|
|
|
12332
13303
|
*/
|
|
12333
13304
|
readonly valid: boolean;
|
|
12334
13305
|
}
|
|
13306
|
+
/**
|
|
13307
|
+
* Control behavior for heat pipe
|
|
13308
|
+
*/
|
|
13309
|
+
interface LuaHeatPipeControlBehavior extends LuaControlBehavior {
|
|
13310
|
+
/**
|
|
13311
|
+
* 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.
|
|
13312
|
+
*/
|
|
13313
|
+
readonly object_name: string;
|
|
13314
|
+
/**
|
|
13315
|
+
* If this will read temperature of the heat pipe
|
|
13316
|
+
*/
|
|
13317
|
+
read_temperature: boolean;
|
|
13318
|
+
temperature_signal?: SignalID;
|
|
13319
|
+
/**
|
|
13320
|
+
* 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.
|
|
13321
|
+
*/
|
|
13322
|
+
readonly valid: boolean;
|
|
13323
|
+
}
|
|
12335
13324
|
/**
|
|
12336
13325
|
* Provides various helper and utility functions. It is accessible through the global object named `helpers` in all stages (settings, prototype and runtime).
|
|
12337
13326
|
*/
|
|
@@ -12387,6 +13376,20 @@ interface LuaHelpers {
|
|
|
12387
13376
|
```
|
|
12388
13377
|
*/
|
|
12389
13378
|
evaluate_expression(this: void, expression: MathExpression, variables?: Record<string, double>): double;
|
|
13379
|
+
/**
|
|
13380
|
+
* Checks if an ambient sound of a given name is valid.
|
|
13381
|
+
*
|
|
13382
|
+
* Not available in settings and prototype stages.
|
|
13383
|
+
* @param name Name of the ambient sound.
|
|
13384
|
+
*/
|
|
13385
|
+
is_valid_ambient_sound(this: void, name: string): boolean;
|
|
13386
|
+
/**
|
|
13387
|
+
* Checks if the given animation name is valid and contains a loaded animation.
|
|
13388
|
+
*
|
|
13389
|
+
* Not available in settings and prototype stages.
|
|
13390
|
+
* @param name Name of an {@link AnimationPrototype | prototype:AnimationPrototype}.
|
|
13391
|
+
*/
|
|
13392
|
+
is_valid_animation_path(this: void, name: string): boolean;
|
|
12390
13393
|
/**
|
|
12391
13394
|
* Checks if the given SoundPath is valid.
|
|
12392
13395
|
*
|
|
@@ -12465,6 +13468,10 @@ interface LuaHelpers {
|
|
|
12465
13468
|
* 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.
|
|
12466
13469
|
*/
|
|
12467
13470
|
readonly object_name: string;
|
|
13471
|
+
/**
|
|
13472
|
+
* Stage of scripting that is currently running
|
|
13473
|
+
*/
|
|
13474
|
+
readonly stage: 'settings' | 'prototype' | 'runtime';
|
|
12468
13475
|
}
|
|
12469
13476
|
/**
|
|
12470
13477
|
* Control behavior for inserters.
|
|
@@ -12561,7 +13568,7 @@ interface LuaInventory {
|
|
|
12561
13568
|
* Get counts of all items in this inventory.
|
|
12562
13569
|
* @returns List of all items in the inventory.
|
|
12563
13570
|
*/
|
|
12564
|
-
get_contents(this: void):
|
|
13571
|
+
get_contents(this: void): ItemWithQualityCount[];
|
|
12565
13572
|
/**
|
|
12566
13573
|
* Gets the filter for the given item stack index.
|
|
12567
13574
|
* @param index The item stack index
|
|
@@ -12655,6 +13662,20 @@ interface LuaInventory {
|
|
|
12655
13662
|
* If this inventory supports filters.
|
|
12656
13663
|
*/
|
|
12657
13664
|
supports_filters(this: void): boolean;
|
|
13665
|
+
/**
|
|
13666
|
+
* Transfer items from provided LuaInventory into this inventory.
|
|
13667
|
+
*
|
|
13668
|
+
* Note that source inventory must be different than this inventory.
|
|
13669
|
+
* @returns Number of items actually transferred.
|
|
13670
|
+
*/
|
|
13671
|
+
transfer_from_inventory(this: void, source: LuaInventory, filter?: ItemFilter): uint32;
|
|
13672
|
+
/**
|
|
13673
|
+
* Transfer items from provided LuaItemStack into this inventory.
|
|
13674
|
+
*
|
|
13675
|
+
* Note that source stack must not belong to this inventory.
|
|
13676
|
+
* @returns Number of items actually transferred.
|
|
13677
|
+
*/
|
|
13678
|
+
transfer_from_stack(this: void, source: LuaItemStack): uint32;
|
|
12658
13679
|
/**
|
|
12659
13680
|
* The entity that owns this inventory, if any.
|
|
12660
13681
|
*/
|
|
@@ -12767,8 +13788,8 @@ interface LuaItemCommon {
|
|
|
12767
13788
|
* @param table.direction The direction to use when building
|
|
12768
13789
|
* @param table.build_mode If `normal`, blueprint will not be built if any one thing can't be built. If `forced`, anything that can be built is built and obstructing nature entities will be deconstructed. If `superforced`, all obstructions will be deconstructed and the blueprint will be built.
|
|
12769
13790
|
* @param table.skip_fog_of_war If chunks covered by fog-of-war are skipped.
|
|
12770
|
-
* @param table.by_player The player to use if any. If provided {@link defines.events.on_built_entity | runtime:defines.events.on_built_entity} will
|
|
12771
|
-
* @param table.raise_built If true; {@link defines.events.script_raised_built | runtime:defines.events.script_raised_built} will be fired
|
|
13791
|
+
* @param table.by_player The player to use if any. If provided {@link defines.events.on_built_entity | runtime:defines.events.on_built_entity} will be fired for new entities and {@link defines.events.on_blueprint_settings_pasted | runtime:defines.events.on_blueprint_settings_pasted} will be fired for existing entities that are updated.
|
|
13792
|
+
* @param table.raise_built If true; {@link defines.events.script_raised_built | runtime:defines.events.script_raised_built} will be fired for new entities and {@link defines.events.on_blueprint_settings_pasted | runtime:defines.events.on_blueprint_settings_pasted} will be fired for existing entities that are updated. Note: this is ignored if by_player is provided.
|
|
12772
13793
|
* @returns Array of created ghosts
|
|
12773
13794
|
*/
|
|
12774
13795
|
build_blueprint(this: void, table: {
|
|
@@ -12894,6 +13915,10 @@ interface LuaItemCommon {
|
|
|
12894
13915
|
* Gets the tag with the given name or returns `nil` if it doesn't exist.
|
|
12895
13916
|
*/
|
|
12896
13917
|
get_tag(this: void, tag_name: string): AnyBasic | null;
|
|
13918
|
+
/**
|
|
13919
|
+
* Gets the names of all tags on this item.
|
|
13920
|
+
*/
|
|
13921
|
+
get_tag_names(this: void): string[];
|
|
12897
13922
|
/**
|
|
12898
13923
|
* Gets the tile filter at the given index for this deconstruction item.
|
|
12899
13924
|
*/
|
|
@@ -12984,7 +14009,7 @@ interface LuaItemCommon {
|
|
|
12984
14009
|
/**
|
|
12985
14010
|
* List of raw materials required to build this blueprint.
|
|
12986
14011
|
*/
|
|
12987
|
-
readonly cost_to_build:
|
|
14012
|
+
readonly cost_to_build: ItemWithQualityCount[];
|
|
12988
14013
|
/**
|
|
12989
14014
|
* The custom description this item-with-tags. This is shown over the normal item description if this is set to a non-empty value.
|
|
12990
14015
|
*/
|
|
@@ -13018,7 +14043,7 @@ interface LuaItemCommon {
|
|
|
13018
14043
|
*/
|
|
13019
14044
|
entity_enable_logistics_while_moving: boolean;
|
|
13020
14045
|
/**
|
|
13021
|
-
* The number of entity filters this deconstruction item
|
|
14046
|
+
* The number of entity filters this deconstruction item has.
|
|
13022
14047
|
*/
|
|
13023
14048
|
readonly entity_filter_count: uint32;
|
|
13024
14049
|
/**
|
|
@@ -13121,13 +14146,17 @@ interface LuaItemCommon {
|
|
|
13121
14146
|
* The location of this item if it can be found.
|
|
13122
14147
|
*/
|
|
13123
14148
|
readonly owner_location: ItemLocationData;
|
|
14149
|
+
/**
|
|
14150
|
+
* The description for this deconstruction planner or upgrade planner
|
|
14151
|
+
*/
|
|
14152
|
+
planner_description: string;
|
|
13124
14153
|
/**
|
|
13125
14154
|
* 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.
|
|
13126
14155
|
*/
|
|
13127
14156
|
preview_icons?: BlueprintSignalIcon[];
|
|
13128
14157
|
tags: Tags;
|
|
13129
14158
|
/**
|
|
13130
|
-
* The number of tile filters this deconstruction item
|
|
14159
|
+
* The number of tile filters this deconstruction item has.
|
|
13131
14160
|
*/
|
|
13132
14161
|
readonly tile_filter_count: uint32;
|
|
13133
14162
|
/**
|
|
@@ -13175,6 +14204,10 @@ interface LuaItemPrototype extends LuaPrototypeBase {
|
|
|
13175
14204
|
* The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
|
|
13176
14205
|
*/
|
|
13177
14206
|
get_entity_type_filters(this: void, selection_mode: defines.selection_mode): Record<string, true> | null;
|
|
14207
|
+
/**
|
|
14208
|
+
* The main inventory size for item-with-inventory-prototype.
|
|
14209
|
+
*/
|
|
14210
|
+
get_inventory_size(this: void, quality?: QualityID): uint32 | null;
|
|
13178
14211
|
/**
|
|
13179
14212
|
* The inventory size bonus for this armor prototype.
|
|
13180
14213
|
*/
|
|
@@ -13238,7 +14271,10 @@ interface LuaItemPrototype extends LuaPrototypeBase {
|
|
|
13238
14271
|
* The collision box used by character entities when wearing this armor.
|
|
13239
14272
|
*/
|
|
13240
14273
|
readonly collision_box?: BoundingBox;
|
|
14274
|
+
readonly color_hint: ColorHintSpecification;
|
|
14275
|
+
readonly consumption_quality_multiplier?: float;
|
|
13241
14276
|
readonly create_electric_network?: boolean;
|
|
14277
|
+
readonly cuts?: boolean;
|
|
13242
14278
|
readonly default_import_location: LuaSpaceLocationPrototype;
|
|
13243
14279
|
/**
|
|
13244
14280
|
* The default label color used for this item with label, if any.
|
|
@@ -13261,10 +14297,6 @@ interface LuaItemPrototype extends LuaPrototypeBase {
|
|
|
13261
14297
|
* The durability message value used when displaying the durability of this tool.
|
|
13262
14298
|
*/
|
|
13263
14299
|
readonly durability_description_value?: string;
|
|
13264
|
-
/**
|
|
13265
|
-
* The number of entity filters this deconstruction item has.
|
|
13266
|
-
*/
|
|
13267
|
-
readonly entity_filter_slots?: uint32;
|
|
13268
14300
|
/**
|
|
13269
14301
|
* The prototype of this armor's equipment grid, if any.
|
|
13270
14302
|
*/
|
|
@@ -13320,13 +14352,10 @@ interface LuaItemPrototype extends LuaPrototypeBase {
|
|
|
13320
14352
|
readonly infinite?: boolean;
|
|
13321
14353
|
readonly ingredient_to_weight_coefficient: double;
|
|
13322
14354
|
readonly initial_items?: ItemProduct[];
|
|
13323
|
-
/**
|
|
13324
|
-
* The main inventory size for item-with-inventory-prototype.
|
|
13325
|
-
*/
|
|
13326
|
-
readonly inventory_size?: uint32;
|
|
13327
14355
|
readonly item_filters?: LuaItemPrototype[];
|
|
13328
14356
|
readonly item_group_filters?: LuaGroup[];
|
|
13329
14357
|
readonly item_subgroup_filters?: LuaGroup[];
|
|
14358
|
+
readonly lab_ignores_spoil_percent: boolean;
|
|
13330
14359
|
/**
|
|
13331
14360
|
* The localised string used when the player attempts to put items into this item with inventory that aren't allowed.
|
|
13332
14361
|
*/
|
|
@@ -13361,10 +14390,14 @@ interface LuaItemPrototype extends LuaPrototypeBase {
|
|
|
13361
14390
|
* The result entity when planting this item as a seed.
|
|
13362
14391
|
*/
|
|
13363
14392
|
readonly plant_result?: LuaEntityPrototype;
|
|
14393
|
+
readonly pollution_quality_multiplier?: float;
|
|
14394
|
+
readonly productivity_quality_multiplier?: float;
|
|
13364
14395
|
/**
|
|
13365
14396
|
* If this armor provides flight to character entities when worm.
|
|
13366
14397
|
*/
|
|
13367
14398
|
readonly provides_flight?: boolean;
|
|
14399
|
+
readonly quality_affects_inventory_size?: boolean;
|
|
14400
|
+
readonly quality_quality_multiplier?: float;
|
|
13368
14401
|
readonly radius_color?: Color;
|
|
13369
14402
|
/**
|
|
13370
14403
|
* Prototypes of all rails possible to be used by this rail planner prototype.
|
|
@@ -13387,14 +14420,21 @@ interface LuaItemPrototype extends LuaPrototypeBase {
|
|
|
13387
14420
|
* How this item interacts when being sent to orbit.
|
|
13388
14421
|
*/
|
|
13389
14422
|
readonly send_to_orbit_mode: 'not-sendable' | 'manual' | 'automated';
|
|
14423
|
+
readonly shoot_protected?: boolean;
|
|
13390
14424
|
/**
|
|
13391
14425
|
* If this selection tool skips things covered by fog of war.
|
|
13392
14426
|
*/
|
|
13393
14427
|
readonly skip_fog_of_war?: boolean;
|
|
14428
|
+
readonly space_platform_request_priority: boolean;
|
|
13394
14429
|
/**
|
|
13395
14430
|
* The repairing speed if this is a repairing tool.
|
|
13396
14431
|
*/
|
|
13397
14432
|
readonly speed?: float;
|
|
14433
|
+
readonly speed_quality_multiplier?: float;
|
|
14434
|
+
readonly spoil_level: uint8;
|
|
14435
|
+
readonly spoil_quality_change: int8;
|
|
14436
|
+
readonly spoil_quality_max?: LuaQualityPrototype;
|
|
14437
|
+
readonly spoil_quality_min?: LuaQualityPrototype;
|
|
13398
14438
|
/**
|
|
13399
14439
|
* The spoil result of this item, if any
|
|
13400
14440
|
*/
|
|
@@ -13417,18 +14457,18 @@ interface LuaItemPrototype extends LuaPrototypeBase {
|
|
|
13417
14457
|
* Tier of the module inside its category. Used when upgrading modules: Ctrl + click modules into an entity and it will replace lower tier modules with higher tier modules if they have the same category.
|
|
13418
14458
|
*/
|
|
13419
14459
|
readonly tier?: uint32;
|
|
13420
|
-
/**
|
|
13421
|
-
* The number of tile filters this deconstruction item has.
|
|
13422
|
-
*/
|
|
13423
|
-
readonly tile_filter_slots?: uint32;
|
|
13424
14460
|
readonly tiles?: SpacePlatformTileDefinition[];
|
|
13425
14461
|
readonly trigger?: TriggerItem;
|
|
14462
|
+
/**
|
|
14463
|
+
* Whether this item is referenced by any {@link lab input | prototype:LabPrototype::inputs}.
|
|
14464
|
+
*/
|
|
14465
|
+
readonly used_by_labs: boolean;
|
|
13426
14466
|
/**
|
|
13427
14467
|
* 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.
|
|
13428
14468
|
*/
|
|
13429
14469
|
readonly valid: boolean;
|
|
13430
14470
|
/**
|
|
13431
|
-
* Weight of this item. More information on how item weight is determined can be found on its {@link auxiliary page |
|
|
14471
|
+
* Weight of this item. More information on how item weight is determined can be found on its {@link auxiliary page | auxiliary:item-weight}.
|
|
13432
14472
|
*/
|
|
13433
14473
|
readonly weight: Weight;
|
|
13434
14474
|
}
|
|
@@ -13548,21 +14588,44 @@ interface LuaItemStack extends LuaItemCommon {
|
|
|
13548
14588
|
*/
|
|
13549
14589
|
spoil_percent: double;
|
|
13550
14590
|
/**
|
|
13551
|
-
* The tick this item spoils, or `0` if it does not spoil. When writing, setting to anything < the current game tick will spoil the item instantly.
|
|
14591
|
+
* The tick this item spoils, or `0` if it does not spoil. When writing, setting to anything < the current game tick will spoil the item instantly.
|
|
14592
|
+
*/
|
|
14593
|
+
spoil_tick: MapTick;
|
|
14594
|
+
/**
|
|
14595
|
+
* Type of the item prototype.
|
|
14596
|
+
*/
|
|
14597
|
+
readonly type: string;
|
|
14598
|
+
/**
|
|
14599
|
+
* 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.
|
|
14600
|
+
*/
|
|
14601
|
+
readonly valid: boolean;
|
|
14602
|
+
/**
|
|
14603
|
+
* Is this valid for reading? Differs from the usual `valid` in that `valid` will be `true` even if the item stack is blank but the entity that holds it is still valid.
|
|
14604
|
+
*/
|
|
14605
|
+
readonly valid_for_read: boolean;
|
|
14606
|
+
}
|
|
14607
|
+
/**
|
|
14608
|
+
* Control behavior for lab.
|
|
14609
|
+
*/
|
|
14610
|
+
interface LuaLabControlBehavior extends LuaControlBehavior {
|
|
14611
|
+
/**
|
|
14612
|
+
* 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.
|
|
13552
14613
|
*/
|
|
13553
|
-
|
|
14614
|
+
readonly object_name: string;
|
|
14615
|
+
read_contents: boolean;
|
|
13554
14616
|
/**
|
|
13555
|
-
*
|
|
14617
|
+
* `true` if the fuel (content of energy source) should be read.
|
|
13556
14618
|
*/
|
|
13557
|
-
|
|
14619
|
+
read_fuel: boolean;
|
|
14620
|
+
read_research_cost: boolean;
|
|
14621
|
+
read_technology_level: boolean;
|
|
14622
|
+
research_conditions: ResearchCondition[];
|
|
14623
|
+
set_research: boolean;
|
|
14624
|
+
technology_level_signal: SignalID;
|
|
13558
14625
|
/**
|
|
13559
14626
|
* 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.
|
|
13560
14627
|
*/
|
|
13561
14628
|
readonly valid: boolean;
|
|
13562
|
-
/**
|
|
13563
|
-
* Is this valid for reading? Differs from the usual `valid` in that `valid` will be `true` even if the item stack is blank but the entity that holds it is still valid.
|
|
13564
|
-
*/
|
|
13565
|
-
readonly valid_for_read: boolean;
|
|
13566
14629
|
}
|
|
13567
14630
|
/**
|
|
13568
14631
|
* Control behavior for lamps.
|
|
@@ -13590,6 +14653,19 @@ interface LuaLampControlBehavior extends LuaGenericOnOffControlBehavior {
|
|
|
13590
14653
|
*/
|
|
13591
14654
|
readonly valid: boolean;
|
|
13592
14655
|
}
|
|
14656
|
+
/**
|
|
14657
|
+
* Control behavior for land mines.
|
|
14658
|
+
*/
|
|
14659
|
+
interface LuaLandMineControlBehavior extends LuaGenericOnOffControlBehavior {
|
|
14660
|
+
/**
|
|
14661
|
+
* 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.
|
|
14662
|
+
*/
|
|
14663
|
+
readonly object_name: string;
|
|
14664
|
+
/**
|
|
14665
|
+
* 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.
|
|
14666
|
+
*/
|
|
14667
|
+
readonly valid: boolean;
|
|
14668
|
+
}
|
|
13593
14669
|
/**
|
|
13594
14670
|
* A lazily loaded value. For performance reasons, we sometimes return a custom lazily-loaded value type instead of the native Lua value. This custom type lazily constructs the necessary value when {@link LuaLazyLoadedValue::get | runtime:LuaLazyLoadedValue::get} is called, therefore preventing its unnecessary construction in some cases.
|
|
13595
14671
|
*
|
|
@@ -13724,17 +14800,23 @@ interface LuaLogisticContainerControlBehavior extends LuaControlBehavior {
|
|
|
13724
14800
|
*/
|
|
13725
14801
|
circuit_condition: CircuitConditionDefinition;
|
|
13726
14802
|
/**
|
|
13727
|
-
* Whether the circuit condition is in effect
|
|
14803
|
+
* Whether the circuit condition is in effect.
|
|
13728
14804
|
*/
|
|
13729
14805
|
circuit_condition_enabled: boolean;
|
|
13730
|
-
/**
|
|
13731
|
-
* The circuit mode of operations for the logistic container. Can only be set on containers whose {@link logistic_mode | runtime:LuaEntityPrototype::logistic_mode} is set to `"requester"` or `"buffer"`.
|
|
13732
|
-
*/
|
|
13733
|
-
circuit_exclusive_mode_of_operation: defines.control_behavior.logistic_container.exclusive_mode;
|
|
13734
14806
|
/**
|
|
13735
14807
|
* 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.
|
|
13736
14808
|
*/
|
|
13737
14809
|
readonly object_name: string;
|
|
14810
|
+
/**
|
|
14811
|
+
* `true` if this logistic container is sending its content to a circuit network.
|
|
14812
|
+
*/
|
|
14813
|
+
read_contents: boolean;
|
|
14814
|
+
/**
|
|
14815
|
+
* `true` if this logistic container has its requests set by a circuit network.
|
|
14816
|
+
*
|
|
14817
|
+
* Can only be set to `true` on containers whose {@link logistic_mode | runtime:LuaEntityPrototype::logistic_mode} or {@link override_logistic_mode | runtime:LuaEntity::override_logistic_mode} is set to `"requester"` or `"buffer"`.
|
|
14818
|
+
*/
|
|
14819
|
+
set_requests: boolean;
|
|
13738
14820
|
/**
|
|
13739
14821
|
* 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.
|
|
13740
14822
|
*/
|
|
@@ -13762,7 +14844,7 @@ interface LuaLogisticNetwork {
|
|
|
13762
14844
|
* @param member Logistic members to check. If not given, gives item counts for the entire network.
|
|
13763
14845
|
* @returns List of all items in the network.
|
|
13764
14846
|
*/
|
|
13765
|
-
get_contents(this: void, member?: 'storage' | 'providers'):
|
|
14847
|
+
get_contents(this: void, member?: 'storage' | 'providers'): ItemWithQualityCount[];
|
|
13766
14848
|
/**
|
|
13767
14849
|
* Count given or all items in the network or given members.
|
|
13768
14850
|
* @param item Item name to count. If not given, gives counts of all items in the network.
|
|
@@ -13842,7 +14924,7 @@ interface LuaLogisticNetwork {
|
|
|
13842
14924
|
*/
|
|
13843
14925
|
readonly cells: LuaLogisticCell[];
|
|
13844
14926
|
/**
|
|
13845
|
-
* All construction robots in this logistic network.
|
|
14927
|
+
* All currently deployed construction robots in this logistic network.
|
|
13846
14928
|
*/
|
|
13847
14929
|
readonly construction_robots: LuaEntity[];
|
|
13848
14930
|
/**
|
|
@@ -13866,7 +14948,7 @@ interface LuaLogisticNetwork {
|
|
|
13866
14948
|
*/
|
|
13867
14949
|
readonly logistic_members: LuaEntity[];
|
|
13868
14950
|
/**
|
|
13869
|
-
* All logistic robots in this logistic network.
|
|
14951
|
+
* All currently deployed logistic robots in this logistic network.
|
|
13870
14952
|
*/
|
|
13871
14953
|
readonly logistic_robots: LuaEntity[];
|
|
13872
14954
|
/**
|
|
@@ -13902,7 +14984,7 @@ interface LuaLogisticNetwork {
|
|
|
13902
14984
|
*/
|
|
13903
14985
|
readonly robot_limit: uint32;
|
|
13904
14986
|
/**
|
|
13905
|
-
* All robots in this logistic network.
|
|
14987
|
+
* All currently deployed robots in this logistic network.
|
|
13906
14988
|
*/
|
|
13907
14989
|
readonly robots: LuaEntity[];
|
|
13908
14990
|
/**
|
|
@@ -13987,13 +15069,13 @@ interface LuaLogisticPoint {
|
|
|
13987
15069
|
*/
|
|
13988
15070
|
readonly sections_count: uint32;
|
|
13989
15071
|
/**
|
|
13990
|
-
* Items targeted to be dropped off into this logistic point by robots.
|
|
15072
|
+
* Items targeted to be dropped off into this logistic point by robots or cargo pods.
|
|
13991
15073
|
*/
|
|
13992
|
-
readonly targeted_items_deliver:
|
|
15074
|
+
readonly targeted_items_deliver: ItemWithQualityCount[];
|
|
13993
15075
|
/**
|
|
13994
15076
|
* Items targeted to be picked up from this logistic point by robots.
|
|
13995
15077
|
*/
|
|
13996
|
-
readonly targeted_items_pickup:
|
|
15078
|
+
readonly targeted_items_pickup: ItemWithQualityCount[];
|
|
13997
15079
|
/**
|
|
13998
15080
|
* Whether this logistic point is set to trash unrequested items.
|
|
13999
15081
|
*/
|
|
@@ -14258,6 +15340,56 @@ interface LuaNamedNoiseFunction extends LuaPrototypeBase {
|
|
|
14258
15340
|
*/
|
|
14259
15341
|
readonly valid: boolean;
|
|
14260
15342
|
}
|
|
15343
|
+
/**
|
|
15344
|
+
* Object that keeps track of objects invalidation and queues notifications for when object becomes invalid.
|
|
15345
|
+
*
|
|
15346
|
+
* This object is an alternative mechanism to {@link LuaBootstrap::register_on_object_destroyed | runtime:LuaBootstrap::register_on_object_destroyed} where instead of raising lua events, this object only queues notifications and makes them available to use later by calls to {@link LuaNotificationQueue::poll | runtime:LuaNotificationQueue::poll} or {@link LuaNotificationQueue::poll_all | runtime:LuaNotificationQueue::poll_all}.
|
|
15347
|
+
*
|
|
15348
|
+
* New instances of this object can be obtained from {@link LuaBootstrap::new_notification_queue | runtime:LuaBootstrap::new_notification_queue}.
|
|
15349
|
+
*
|
|
15350
|
+
* Each instance of this object is unique, always valid and cannot be copied. This object lives entirely in script state and if its no longer referenced by script, it will be destroyed by garbage collector.
|
|
15351
|
+
*/
|
|
15352
|
+
interface LuaNotificationQueue {
|
|
15353
|
+
/**
|
|
15354
|
+
* Registers an object so that after it's destroyed, a notification is queued.
|
|
15355
|
+
*
|
|
15356
|
+
* If this object is already registered within this notification queue, an existing registration number will be provided without creating new registration.
|
|
15357
|
+
* @param object The object to register.
|
|
15358
|
+
* @returns The registration number.
|
|
15359
|
+
*/
|
|
15360
|
+
add(this: void, object: RegistrationTarget): uint64;
|
|
15361
|
+
/**
|
|
15362
|
+
* Removes all registrations.
|
|
15363
|
+
*/
|
|
15364
|
+
clear(this: void): void;
|
|
15365
|
+
/**
|
|
15366
|
+
* Checks if provided object is already registered and returns existing registration number for it. If object is not registered, it is not registered and nil is returned instead.
|
|
15367
|
+
* @param object The object to check.
|
|
15368
|
+
* @returns The registration number if object is registered.
|
|
15369
|
+
*/
|
|
15370
|
+
find(this: void, object: RegistrationTarget): uint64 | null;
|
|
15371
|
+
/**
|
|
15372
|
+
* Gets at most 1 registration id for which an object was destroyed.
|
|
15373
|
+
*/
|
|
15374
|
+
poll(this: void): uint64 | null;
|
|
15375
|
+
/**
|
|
15376
|
+
* Gets all registration ids for which object were destroyed.
|
|
15377
|
+
*/
|
|
15378
|
+
poll_all(this: void): uint64[];
|
|
15379
|
+
/**
|
|
15380
|
+
* Removes a registration based on registration number.
|
|
15381
|
+
* @param registration_id Registration to be removed.
|
|
15382
|
+
*/
|
|
15383
|
+
remove(this: void, registration_id: uint64): void;
|
|
15384
|
+
/**
|
|
15385
|
+
* 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.
|
|
15386
|
+
*/
|
|
15387
|
+
readonly object_name: string;
|
|
15388
|
+
/**
|
|
15389
|
+
* 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.
|
|
15390
|
+
*/
|
|
15391
|
+
readonly valid: boolean;
|
|
15392
|
+
}
|
|
14261
15393
|
/**
|
|
14262
15394
|
* Prototype of an optimized particle.
|
|
14263
15395
|
*/
|
|
@@ -14538,6 +15670,8 @@ interface LuaPlayer extends LuaControl {
|
|
|
14538
15670
|
/**
|
|
14539
15671
|
* Asks the player if they would like to connect to the given server.
|
|
14540
15672
|
*
|
|
15673
|
+
* If the "auto-accept-connect-to-server" interface setting is enabled, the prompt is skipped.
|
|
15674
|
+
*
|
|
14541
15675
|
* This only does anything when used on a multiplayer peer. Single player and server hosts will ignore the prompt.
|
|
14542
15676
|
* @param table.address The server (address:port) if port is not given the default Factorio port is used.
|
|
14543
15677
|
* @param table.name The name of the server.
|
|
@@ -14580,6 +15714,16 @@ interface LuaPlayer extends LuaControl {
|
|
|
14580
15714
|
time_to_live?: uint32;
|
|
14581
15715
|
speed?: double;
|
|
14582
15716
|
}): void;
|
|
15717
|
+
/**
|
|
15718
|
+
* Performs the cursor split action on the given inventory at the given index as if the player did it.
|
|
15719
|
+
* @returns If the action succeeded.
|
|
15720
|
+
*/
|
|
15721
|
+
cursor_split(this: void, inventory: LuaInventory, index: uint32): boolean;
|
|
15722
|
+
/**
|
|
15723
|
+
* Performs the cursor transfer action on the given inventory at the given index as if the player did it.
|
|
15724
|
+
* @returns If the action succeeded.
|
|
15725
|
+
*/
|
|
15726
|
+
cursor_transfer(this: void, inventory: LuaInventory, index: uint32): boolean;
|
|
14583
15727
|
/**
|
|
14584
15728
|
* Disables alerts for the given alert category.
|
|
14585
15729
|
* @returns Whether the alert type was disabled (false if it was already disabled).
|
|
@@ -14643,13 +15787,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
14643
15787
|
* Get all alerts matching the given filters, or all alerts if no filters are given.
|
|
14644
15788
|
* @returns A mapping of surface index to an array of arrays of {@link alerts | runtime:Alert} indexed by the {@link alert type | runtime:defines.alert_type}.
|
|
14645
15789
|
*/
|
|
14646
|
-
get_alerts(this: void,
|
|
14647
|
-
entity?: LuaEntity;
|
|
14648
|
-
prototype?: LuaEntityPrototype;
|
|
14649
|
-
position?: MapPosition;
|
|
14650
|
-
type?: defines.alert_type;
|
|
14651
|
-
surface?: SurfaceIdentification;
|
|
14652
|
-
}): LuaTable<uint32, Record<defines.alert_type, Alert[]>>;
|
|
15790
|
+
get_alerts(this: void, filter: AlertFilter): LuaTable<uint32, Record<defines.alert_type, Alert[]>>;
|
|
14653
15791
|
/**
|
|
14654
15792
|
* The characters associated with this player.
|
|
14655
15793
|
*
|
|
@@ -14669,9 +15807,8 @@ interface LuaPlayer extends LuaControl {
|
|
|
14669
15807
|
get_infinity_inventory_filter(this: void, index: uint32): InfinityInventoryFilter | null;
|
|
14670
15808
|
/**
|
|
14671
15809
|
* Gets the quick bar filter for the given slot or `nil`.
|
|
14672
|
-
* @param index The slot index. 1 for the first slot of page one, 2 for slot two of page one, 11 for the first slot of page 2, etc.
|
|
14673
15810
|
*/
|
|
14674
|
-
get_quick_bar_slot(this: void,
|
|
15811
|
+
get_quick_bar_slot(this: void, page_index: uint8, slot_index: uint8): QuickBarSlot | null;
|
|
14675
15812
|
/**
|
|
14676
15813
|
* Get all recipes that currently have recipe notifications for this player.
|
|
14677
15814
|
*/
|
|
@@ -14713,17 +15850,16 @@ interface LuaPlayer extends LuaControl {
|
|
|
14713
15850
|
*/
|
|
14714
15851
|
mute_alert(this: void, alert_type: defines.alert_type): boolean;
|
|
14715
15852
|
/**
|
|
14716
|
-
*
|
|
14717
|
-
* @param allow_ghost Defaults to false
|
|
15853
|
+
* Emulates the player using the "smart pipette" that results in the given id and quality.
|
|
15854
|
+
* @param allow_ghost Defaults to `false`.
|
|
14718
15855
|
* @returns Whether the smart pipette found something to put into the cursor.
|
|
14719
15856
|
*/
|
|
14720
15857
|
pipette(this: void, id: PipetteID, quality?: QualityID, allow_ghost?: boolean): boolean;
|
|
14721
15858
|
/**
|
|
14722
|
-
*
|
|
14723
|
-
* @param
|
|
14724
|
-
* @returns Whether the smart pipette found something to place.
|
|
15859
|
+
* Play a music track for this player.
|
|
15860
|
+
* @param music_specification The track to play.
|
|
14725
15861
|
*/
|
|
14726
|
-
|
|
15862
|
+
play_music(this: void, music_specification: PlayMusicSpecification): void;
|
|
14727
15863
|
/**
|
|
14728
15864
|
* Play a sound for this player.
|
|
14729
15865
|
*
|
|
@@ -14753,29 +15889,21 @@ interface LuaPlayer extends LuaControl {
|
|
|
14753
15889
|
/**
|
|
14754
15890
|
* Removes all alerts matching the given filters or if an empty filters table is given all alerts are removed.
|
|
14755
15891
|
*/
|
|
14756
|
-
remove_alert(this: void,
|
|
14757
|
-
entity?: LuaEntity;
|
|
14758
|
-
prototype?: EntityID;
|
|
14759
|
-
position?: MapPosition;
|
|
14760
|
-
type?: defines.alert_type;
|
|
14761
|
-
surface?: SurfaceIdentification;
|
|
14762
|
-
icon?: SignalID;
|
|
14763
|
-
message?: LocalisedString;
|
|
14764
|
-
}): void;
|
|
15892
|
+
remove_alert(this: void, filter: AlertFilter): void;
|
|
14765
15893
|
/**
|
|
14766
|
-
* Requests a translation for the given localised string.
|
|
15894
|
+
* Requests a translation for the given localised string. The {@link on_string_translated | runtime:on_string_translated} event will be fired with the results.
|
|
14767
15895
|
*
|
|
14768
|
-
*
|
|
15896
|
+
* If this player is not connected (see {@link LuaPlayer::connected | runtime:LuaPlayer::connected}) the translation will happen next time they connect.
|
|
14769
15897
|
* @returns The unique ID for the requested translation.
|
|
14770
15898
|
*/
|
|
14771
|
-
request_translation(this: void, localised_string: LocalisedString): uint32
|
|
15899
|
+
request_translation(this: void, localised_string: LocalisedString): uint32;
|
|
14772
15900
|
/**
|
|
14773
|
-
* Requests translation for the given set of localised strings.
|
|
15901
|
+
* Requests translation for the given set of localised strings. A {@link on_string_translated | runtime:on_string_translated} event will be fired for each string with the results.
|
|
14774
15902
|
*
|
|
14775
|
-
*
|
|
15903
|
+
* If this player is not connected (see {@link LuaPlayer::connected | runtime:LuaPlayer::connected}) the translation will happen next time they connect.
|
|
14776
15904
|
* @returns The unique IDs for the requested translations.
|
|
14777
15905
|
*/
|
|
14778
|
-
request_translations(this: void, localised_strings: LocalisedString[]): uint32[]
|
|
15906
|
+
request_translations(this: void, localised_strings: LocalisedString[]): uint32[];
|
|
14779
15907
|
/**
|
|
14780
15908
|
* Sets which quick bar page is being used for the given screen page.
|
|
14781
15909
|
* @param screen_index The screen page. Index 1 is the top row in the gui. Index can go beyond the visible number of bars on the screen to account for the interface config setting change.
|
|
@@ -14827,10 +15955,9 @@ interface LuaPlayer extends LuaControl {
|
|
|
14827
15955
|
set_infinity_inventory_filter(this: void, index: uint32, filter: InfinityInventoryFilter | nil): void;
|
|
14828
15956
|
/**
|
|
14829
15957
|
* Sets the quick bar filter for the given slot. If a {@link LuaItemStack | runtime:LuaItemStack} is provided, the slot will be set to that particular item instance if it has extra data, for example a specific blueprint or spidertron remote. Otherwise, it will be set to all items of that prototype, for example iron plates.
|
|
14830
|
-
* @param index The slot index. 1 for the first slot of page one, 2 for slot two of page one, 11 for the first slot of page 2, etc.
|
|
14831
15958
|
* @param filter The filter or `nil` to clear it.
|
|
14832
15959
|
*/
|
|
14833
|
-
set_quick_bar_slot(this: void,
|
|
15960
|
+
set_quick_bar_slot(this: void, page_index: uint8, slot_index: uint8, filter: LuaItemStack | ItemWithQualityID | QuickBarSlot | nil): void;
|
|
14834
15961
|
/**
|
|
14835
15962
|
* Make a custom Lua shortcut available or unavailable.
|
|
14836
15963
|
* @param prototype_name Prototype name of the custom shortcut.
|
|
@@ -14847,6 +15974,31 @@ interface LuaPlayer extends LuaControl {
|
|
|
14847
15974
|
* @param zoom_limits The new zoom limits. See {@link LuaPlayer::zoom_limits | runtime:LuaPlayer::zoom_limits} for usage information.
|
|
14848
15975
|
*/
|
|
14849
15976
|
set_zoom_limits(this: void, controller_type: defines.controllers, zoom_limits: ZoomLimits): void;
|
|
15977
|
+
/**
|
|
15978
|
+
* Performs the given transfer action between the source and target as if the player did the action.
|
|
15979
|
+
*
|
|
15980
|
+
* This can be paired with {@link defines.events.on_gui_inventory_action | runtime:defines.events.on_gui_inventory_action} to make custom inventory GUIs that act like builtin inventories.
|
|
15981
|
+
*
|
|
15982
|
+
* Reach distance is ignored and can be checked using {@link LuaControl::can_reach_entity | runtime:LuaControl::can_reach_entity} if wanted.
|
|
15983
|
+
* @param table.source_inventory The inventory to transfer from.
|
|
15984
|
+
* @param table.index The inventory slot index.
|
|
15985
|
+
* @param table.transfer_type The type of transfer to perform. Only stack_transfer, stack_split, inventory_transfer, and inventory_split can be used.
|
|
15986
|
+
* @param table.target_equipment_grid If true - when transferring into vehicles - only placeable equipment items will be placed into the equipment grid as equipment and normal items are skipped. Defaults to `false`.
|
|
15987
|
+
* @param table.play_transfer_sound If the standard sound for transferring items should be played on success. Defaults to `true`.
|
|
15988
|
+
* @param table.check_for_invalid_armor_removal If transfer from the player armor inventory is blocked when flying or if it would shrink the inventory to the point items would spill. Defaults to `true`.
|
|
15989
|
+
* @param table.notify_if_invalid_armor_removal If on being blocked by invalid armor removal it sends a notification to the player that the transfer is blocked. Defaults to `true`.
|
|
15990
|
+
* @returns List of all items moved. This will be `nil` if the transfer was blocked.
|
|
15991
|
+
*/
|
|
15992
|
+
stack_transfers(this: void, table: {
|
|
15993
|
+
source_inventory: LuaInventory;
|
|
15994
|
+
index: uint32;
|
|
15995
|
+
target: LuaInventory | LuaEntity | LuaPlayer | LuaItem | LuaItemStack | LuaEquipment;
|
|
15996
|
+
transfer_type: defines.inventory_actions;
|
|
15997
|
+
target_equipment_grid?: boolean;
|
|
15998
|
+
play_transfer_sound?: boolean;
|
|
15999
|
+
check_for_invalid_armor_removal?: boolean;
|
|
16000
|
+
notify_if_invalid_armor_removal?: boolean;
|
|
16001
|
+
}): ItemWithQualityCount[] | null;
|
|
14850
16002
|
/**
|
|
14851
16003
|
* Starts selection with selection tool from the specified position. Does nothing if the player's cursor is not a selection tool.
|
|
14852
16004
|
* @param position The position to start selection from.
|
|
@@ -14923,6 +16075,14 @@ interface LuaPlayer extends LuaControl {
|
|
|
14923
16075
|
*/
|
|
14924
16076
|
readonly connected: boolean;
|
|
14925
16077
|
readonly controller_type: defines.controllers;
|
|
16078
|
+
/**
|
|
16079
|
+
* The name of an ambient sound (music) the player is currently listening to.
|
|
16080
|
+
*
|
|
16081
|
+
* If music is not playing, returns an empty string.
|
|
16082
|
+
*
|
|
16083
|
+
* If the player is disconnected, returns the last played ambient sound.
|
|
16084
|
+
*/
|
|
16085
|
+
readonly current_music: string;
|
|
14926
16086
|
/**
|
|
14927
16087
|
* Returns true if the current item stack in cursor will be destroyed after clearing the cursor. Manually putting it into inventory still preserves the item. If the cursor stack is not one of the supported types (blueprint, blueprint-book, deconstruction-planner, upgrade-planner), write operation will be silently ignored.
|
|
14928
16088
|
*/
|
|
@@ -14931,6 +16091,10 @@ interface LuaPlayer extends LuaControl {
|
|
|
14931
16091
|
* 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 | runtime:LuaPlayer::connected}).
|
|
14932
16092
|
*/
|
|
14933
16093
|
readonly cutscene_character?: LuaEntity;
|
|
16094
|
+
/**
|
|
16095
|
+
* Set to `true` to disallow opening the space map and hide the space map button.
|
|
16096
|
+
*/
|
|
16097
|
+
disable_space_map: boolean;
|
|
14934
16098
|
/**
|
|
14935
16099
|
* The display density scale for this player. The display density scale is the factor of {@link LuaPlayer::display_scale | runtime:LuaPlayer::display_scale} that is determined by the physical DPI of the screen that Factorio is running on. In most cases, the default value is 1. If the player is playing on a high-density display, this value may be 2 or greater.
|
|
14936
16100
|
*
|
|
@@ -14956,7 +16120,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
14956
16120
|
/**
|
|
14957
16121
|
* The source entity used during entity settings copy-paste, if any.
|
|
14958
16122
|
*/
|
|
14959
|
-
|
|
16123
|
+
entity_copy_source?: LuaEntity;
|
|
14960
16124
|
/**
|
|
14961
16125
|
* The player's game view settings.
|
|
14962
16126
|
*/
|
|
@@ -15046,6 +16210,10 @@ interface LuaPlayer extends LuaControl {
|
|
|
15046
16210
|
* The current vehicle of this player's physical controller.
|
|
15047
16211
|
*/
|
|
15048
16212
|
readonly physical_vehicle?: LuaEntity;
|
|
16213
|
+
/**
|
|
16214
|
+
* Amount of slots one row(page) of quickbar has.
|
|
16215
|
+
*/
|
|
16216
|
+
readonly quick_bar_width: uint8;
|
|
15049
16217
|
/**
|
|
15050
16218
|
* If items not included in this map editor infinity inventory filters should be removed.
|
|
15051
16219
|
*/
|
|
@@ -15054,6 +16222,23 @@ interface LuaPlayer extends LuaControl {
|
|
|
15054
16222
|
* The render mode of the player, like map or zoom to world.
|
|
15055
16223
|
*/
|
|
15056
16224
|
readonly render_mode: defines.render_mode;
|
|
16225
|
+
/**
|
|
16226
|
+
* The quality used when this player respawns.
|
|
16227
|
+
*
|
|
16228
|
+
* This can be set at any time however it is best to set it during the {@link defines.events.on_player_died | runtime:defines.events.on_player_died} event.
|
|
16229
|
+
*/
|
|
16230
|
+
readonly respawn_quality?: LuaQualityPrototype;
|
|
16231
|
+
/**
|
|
16232
|
+
* The quality used when this player respawns.
|
|
16233
|
+
*
|
|
16234
|
+
* This can be set at any time however it is best to set it during the {@link defines.events.on_player_died | runtime:defines.events.on_player_died} event.
|
|
16235
|
+
* @customName respawn_quality
|
|
16236
|
+
*/
|
|
16237
|
+
respawn_quality_write?: QualityID;
|
|
16238
|
+
/**
|
|
16239
|
+
* The filters that will be applied when this player respawns. These only have meaning if the player is actively waiting to respawn.
|
|
16240
|
+
*/
|
|
16241
|
+
saved_logistic_filters: SavedLogisticFilters;
|
|
15057
16242
|
/**
|
|
15058
16243
|
* If `true`, circle and name of given player is rendered on the map/chart.
|
|
15059
16244
|
*/
|
|
@@ -15168,10 +16353,14 @@ interface LuaProcessionLayerInheritanceGroupPrototype extends LuaPrototypeBase {
|
|
|
15168
16353
|
* Prototype of a procession.
|
|
15169
16354
|
*/
|
|
15170
16355
|
interface LuaProcessionPrototype extends LuaPrototypeBase {
|
|
16356
|
+
readonly ground_timeline?: ProcessionTimeline;
|
|
15171
16357
|
/**
|
|
15172
16358
|
* 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.
|
|
15173
16359
|
*/
|
|
15174
16360
|
readonly object_name: string;
|
|
16361
|
+
readonly procession_style: uint32[];
|
|
16362
|
+
readonly timeline: ProcessionTimeline;
|
|
16363
|
+
readonly usage: 'departure' | 'arrival' | 'intermezzo';
|
|
15175
16364
|
/**
|
|
15176
16365
|
* 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.
|
|
15177
16366
|
*/
|
|
@@ -15541,11 +16730,9 @@ interface LuaPrototypes {
|
|
|
15541
16730
|
*/
|
|
15542
16731
|
readonly trivial_smoke: Record<string, LuaTrivialSmokePrototype>;
|
|
15543
16732
|
/**
|
|
15544
|
-
* All utility constants.
|
|
15545
|
-
*
|
|
15546
|
-
* See {@link UtilityConstants | prototype:UtilityConstants} for possible values.
|
|
16733
|
+
* All game-defined utility constants. Note that his is implemented as a {@link LuaCustomTable | runtime:LuaCustomTable}.
|
|
15547
16734
|
*/
|
|
15548
|
-
readonly utility_constants:
|
|
16735
|
+
readonly utility_constants: UtilityConstants;
|
|
15549
16736
|
/**
|
|
15550
16737
|
* A dictionary containing every LuaVirtualSignalPrototype indexed by `name`.
|
|
15551
16738
|
*/
|
|
@@ -15594,6 +16781,11 @@ interface LuaQualityPrototype extends LuaPrototypeBase {
|
|
|
15594
16781
|
readonly beacon_module_slots_bonus: ItemStackIndex;
|
|
15595
16782
|
readonly beacon_power_usage_multiplier: float;
|
|
15596
16783
|
readonly beacon_supply_area_distance_bonus: float;
|
|
16784
|
+
readonly cargo_wagon_inventory_size_multiplier: double;
|
|
16785
|
+
/**
|
|
16786
|
+
* Probability of additional quality increase happening after quality was increased to reach this quality in the same crafting/mining operation.
|
|
16787
|
+
*/
|
|
16788
|
+
readonly chain_probability: double;
|
|
15597
16789
|
/**
|
|
15598
16790
|
* The color of the prototype
|
|
15599
16791
|
*/
|
|
@@ -15617,11 +16809,17 @@ interface LuaQualityPrototype extends LuaPrototypeBase {
|
|
|
15617
16809
|
* Level basically specifies the stat-increasing value of this quality level.
|
|
15618
16810
|
*/
|
|
15619
16811
|
readonly level: uint32;
|
|
16812
|
+
readonly locomotive_power_multiplier: double;
|
|
15620
16813
|
readonly logistic_cell_charging_energy_multiplier: double;
|
|
15621
16814
|
readonly logistic_cell_charging_station_count_bonus: uint32;
|
|
15622
16815
|
readonly mining_drill_mining_radius_bonus: float;
|
|
15623
16816
|
readonly mining_drill_module_slots_bonus: ItemStackIndex;
|
|
15624
16817
|
readonly mining_drill_resource_drain_multiplier: float;
|
|
16818
|
+
readonly module_consumption_multiplier: float;
|
|
16819
|
+
readonly module_pollution_multiplier: float;
|
|
16820
|
+
readonly module_productivity_multiplier: float;
|
|
16821
|
+
readonly module_quality_multiplier: float;
|
|
16822
|
+
readonly module_speed_multiplier: float;
|
|
15625
16823
|
/**
|
|
15626
16824
|
* The next higher level of the quality
|
|
15627
16825
|
*/
|
|
@@ -15634,8 +16832,19 @@ interface LuaQualityPrototype extends LuaPrototypeBase {
|
|
|
15634
16832
|
* 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.
|
|
15635
16833
|
*/
|
|
15636
16834
|
readonly object_name: string;
|
|
16835
|
+
readonly previous: LuaQualityPrototype;
|
|
16836
|
+
/**
|
|
16837
|
+
* Probability of additional quality decrease happening after quality was decreased to reach this quality in the same crafting/mining operation.
|
|
16838
|
+
*/
|
|
16839
|
+
readonly previous_chain_probability: double;
|
|
16840
|
+
/**
|
|
16841
|
+
* The probability multiplier of getting the previous level of quality.
|
|
16842
|
+
*/
|
|
16843
|
+
readonly previous_probability: double;
|
|
15637
16844
|
readonly range_multiplier: double;
|
|
16845
|
+
readonly rolling_stock_max_speed_multiplier: double;
|
|
15638
16846
|
readonly science_pack_drain_multiplier: float;
|
|
16847
|
+
readonly spoil_ticks_multiplier: float;
|
|
15639
16848
|
readonly tool_durability_multiplier: double;
|
|
15640
16849
|
/**
|
|
15641
16850
|
* 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.
|
|
@@ -15659,10 +16868,20 @@ interface LuaRCON {
|
|
|
15659
16868
|
* Control behavior for radars
|
|
15660
16869
|
*/
|
|
15661
16870
|
interface LuaRadarControlBehavior extends LuaControlBehavior {
|
|
16871
|
+
/**
|
|
16872
|
+
* Whether this radar is in universe (channel) or surface mode.
|
|
16873
|
+
*/
|
|
16874
|
+
mode: defines.control_behavior.radar.mode;
|
|
15662
16875
|
/**
|
|
15663
16876
|
* 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.
|
|
15664
16877
|
*/
|
|
15665
16878
|
readonly object_name: string;
|
|
16879
|
+
/**
|
|
16880
|
+
* The channel that is used in universe mode. Radars on the same force with the same channel in universe mode are connected to each other with hidden radar wires.
|
|
16881
|
+
*
|
|
16882
|
+
* If the channel is empty or a {@link parameter | runtime:LuaPrototypeBase::parameter}, the radar will be disconnected.
|
|
16883
|
+
*/
|
|
16884
|
+
universe_channel?: SignalID;
|
|
15666
16885
|
/**
|
|
15667
16886
|
* 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.
|
|
15668
16887
|
*/
|
|
@@ -15870,13 +17089,9 @@ interface LuaRecipe {
|
|
|
15870
17089
|
*/
|
|
15871
17090
|
reload(this: void): void;
|
|
15872
17091
|
/**
|
|
15873
|
-
*
|
|
17092
|
+
* Categories of the recipe.
|
|
15874
17093
|
*/
|
|
15875
|
-
readonly
|
|
15876
|
-
/**
|
|
15877
|
-
* Category of the recipe.
|
|
15878
|
-
*/
|
|
15879
|
-
readonly category: string;
|
|
17094
|
+
readonly categories: string[];
|
|
15880
17095
|
/**
|
|
15881
17096
|
* Can the recipe be used?
|
|
15882
17097
|
*/
|
|
@@ -15968,21 +17183,31 @@ interface LuaRecipeCategoryPrototype extends LuaPrototypeBase {
|
|
|
15968
17183
|
* A crafting recipe prototype.
|
|
15969
17184
|
*/
|
|
15970
17185
|
interface LuaRecipePrototype extends LuaPrototypeBase {
|
|
17186
|
+
/**
|
|
17187
|
+
* Ingredient materials required to craft recipe when configured to a specific quality.
|
|
17188
|
+
* @param recipe_quality Defaults to `normal`.
|
|
17189
|
+
*/
|
|
17190
|
+
get_ingredient_quality(this: void, ingredient_index: uint32, recipe_quality?: QualityID): LuaQualityPrototype;
|
|
17191
|
+
/**
|
|
17192
|
+
* Average amount of the product given.
|
|
17193
|
+
*/
|
|
17194
|
+
get_product_amount(this: void, product_index: uint32, productivity?: double): double;
|
|
17195
|
+
/**
|
|
17196
|
+
* Quality of the product given when recipe is configured to a specific quality.
|
|
17197
|
+
* @param recipe_quality Defaults to `normal`.
|
|
17198
|
+
*/
|
|
17199
|
+
get_product_quality(this: void, product_index: uint32, recipe_quality?: QualityID): LuaQualityPrototype;
|
|
15971
17200
|
/**
|
|
15972
17201
|
* Checks if recipe has given category
|
|
15973
17202
|
* @returns `true` if recipe has this category.
|
|
15974
17203
|
*/
|
|
15975
17204
|
has_category(this: void, category: RecipeCategoryID): boolean;
|
|
15976
|
-
/**
|
|
15977
|
-
* Additional categories of the recipe.
|
|
15978
|
-
*/
|
|
15979
|
-
readonly additional_categories: string[];
|
|
15980
17205
|
/**
|
|
15981
17206
|
* If this recipe is enabled for the purpose of intermediate hand-crafting.
|
|
15982
17207
|
*/
|
|
15983
17208
|
readonly allow_as_intermediate: boolean;
|
|
15984
17209
|
/**
|
|
15985
|
-
*
|
|
17210
|
+
* Whether this recipe is allowed to be broken down for the recipe tooltip "Total raw" calculations.
|
|
15986
17211
|
*/
|
|
15987
17212
|
readonly allow_decomposition: boolean;
|
|
15988
17213
|
/**
|
|
@@ -16010,13 +17235,13 @@ interface LuaRecipePrototype extends LuaPrototypeBase {
|
|
|
16010
17235
|
*/
|
|
16011
17236
|
readonly always_show_made_in: boolean;
|
|
16012
17237
|
/**
|
|
16013
|
-
*
|
|
17238
|
+
* True if a player can set quality of the recipe to craft. False when only normal quality recipes can be crafted.
|
|
16014
17239
|
*/
|
|
16015
|
-
readonly
|
|
17240
|
+
readonly can_set_quality: boolean;
|
|
16016
17241
|
/**
|
|
16017
|
-
*
|
|
17242
|
+
* Categories of the recipe.
|
|
16018
17243
|
*/
|
|
16019
|
-
readonly
|
|
17244
|
+
readonly categories: string[];
|
|
16020
17245
|
readonly crafting_machine_tints: Color[];
|
|
16021
17246
|
readonly effect_limitation_messages?: LocalisedString[];
|
|
16022
17247
|
/**
|
|
@@ -16047,7 +17272,7 @@ interface LuaRecipePrototype extends LuaPrototypeBase {
|
|
|
16047
17272
|
readonly hide_from_flow_stats: boolean;
|
|
16048
17273
|
readonly hide_from_player_crafting: boolean;
|
|
16049
17274
|
/**
|
|
16050
|
-
*
|
|
17275
|
+
* Whether this recipe is marked to be hidden from the signal GUI.
|
|
16051
17276
|
*/
|
|
16052
17277
|
readonly hide_from_signal_gui: boolean;
|
|
16053
17278
|
/**
|
|
@@ -16058,7 +17283,6 @@ interface LuaRecipePrototype extends LuaPrototypeBase {
|
|
|
16058
17283
|
```
|
|
16059
17284
|
*/
|
|
16060
17285
|
readonly ingredients: Ingredient[];
|
|
16061
|
-
readonly is_parameter: boolean;
|
|
16062
17286
|
/**
|
|
16063
17287
|
* The main product of this recipe, if any.
|
|
16064
17288
|
*/
|
|
@@ -16088,12 +17312,6 @@ interface LuaRecipePrototype extends LuaPrototypeBase {
|
|
|
16088
17312
|
* The multiplier used when this recipe is copied from an assembling machine to a requester chest. For each item in the recipe the item count * this value is set in the requester chest.
|
|
16089
17313
|
*/
|
|
16090
17314
|
readonly request_paste_multiplier: uint32;
|
|
16091
|
-
readonly reset_freshness_on_craft: boolean;
|
|
16092
|
-
readonly result_is_always_fresh: boolean;
|
|
16093
|
-
/**
|
|
16094
|
-
* If the amount is shown in the recipe tooltip title when the recipe produces more than 1 product.
|
|
16095
|
-
*/
|
|
16096
|
-
readonly show_amount_in_title: boolean;
|
|
16097
17315
|
/**
|
|
16098
17316
|
* The surface conditions required to craft this recipe.
|
|
16099
17317
|
*/
|
|
@@ -16103,7 +17321,7 @@ interface LuaRecipePrototype extends LuaPrototypeBase {
|
|
|
16103
17321
|
*/
|
|
16104
17322
|
readonly trash?: LuaItemPrototype[];
|
|
16105
17323
|
/**
|
|
16106
|
-
*
|
|
17324
|
+
* Whether this recipe unlocks the result item(s) so they're shown in filter-select GUIs.
|
|
16107
17325
|
*/
|
|
16108
17326
|
readonly unlock_results: boolean;
|
|
16109
17327
|
/**
|
|
@@ -16125,8 +17343,8 @@ interface LuaRecord {
|
|
|
16125
17343
|
* @param table.direction The direction to use when building
|
|
16126
17344
|
* @param table.build_mode If `normal`, blueprint will not be built if any one thing can't be built. If `forced`, anything that can be built is built and obstructing nature entities will be deconstructed. If `superforced`, all obstructions will be deconstructed and the blueprint will be built.
|
|
16127
17345
|
* @param table.skip_fog_of_war If chunks covered by fog-of-war are skipped.
|
|
16128
|
-
* @param table.by_player The player to use if any. If provided {@link defines.events.on_built_entity | runtime:defines.events.on_built_entity} will
|
|
16129
|
-
* @param table.raise_built If true; {@link defines.events.script_raised_built | runtime:defines.events.script_raised_built} will be fired
|
|
17346
|
+
* @param table.by_player The player to use if any. If provided {@link defines.events.on_built_entity | runtime:defines.events.on_built_entity} will be fired for new entities and {@link defines.events.on_blueprint_settings_pasted | runtime:defines.events.on_blueprint_settings_pasted} will be fired for existing entities that are updated.
|
|
17347
|
+
* @param table.raise_built If true; {@link defines.events.script_raised_built | runtime:defines.events.script_raised_built} will be fired for new entities and {@link defines.events.on_blueprint_settings_pasted | runtime:defines.events.on_blueprint_settings_pasted} will be fired for existing entities that are updated. Note: this is ignored if by_player is provided.
|
|
16130
17348
|
* @returns Array of created ghosts
|
|
16131
17349
|
*/
|
|
16132
17350
|
build_blueprint(this: void, table: {
|
|
@@ -16333,13 +17551,13 @@ interface LuaRecord {
|
|
|
16333
17551
|
/**
|
|
16334
17552
|
* List of raw materials required to build this blueprint.
|
|
16335
17553
|
*/
|
|
16336
|
-
readonly cost_to_build:
|
|
17554
|
+
readonly cost_to_build: ItemWithQualityCount[];
|
|
16337
17555
|
/**
|
|
16338
17556
|
* The default icons for a blueprint blueprint.
|
|
16339
17557
|
*/
|
|
16340
17558
|
readonly default_icons: BlueprintSignalIcon[];
|
|
16341
17559
|
/**
|
|
16342
|
-
* The number of entity filters this deconstruction planner
|
|
17560
|
+
* The number of entity filters this deconstruction planner has.
|
|
16343
17561
|
*/
|
|
16344
17562
|
readonly entity_filter_count: uint32;
|
|
16345
17563
|
/**
|
|
@@ -16350,14 +17568,14 @@ interface LuaRecord {
|
|
|
16350
17568
|
* The entity filters for this deconstruction planner. The attribute is a sparse array with the keys representing the index of the filter. All prototypes in this array must not have the `"not-deconstructable"` flag set and are either a `cliff` or marked as `minable`.
|
|
16351
17569
|
*/
|
|
16352
17570
|
entity_filters: ItemFilter[];
|
|
16353
|
-
/**
|
|
16354
|
-
* Is this blueprint record a preview? A preview record must be synced by the player before entity and tile data can be read. This property is deprecated in favor of {@link LuaRecord::is_preview | runtime:LuaRecord::is_preview} and should not be used.
|
|
16355
|
-
*/
|
|
16356
|
-
readonly is_blueprint_preview: boolean;
|
|
16357
17571
|
/**
|
|
16358
17572
|
* Checks if this record is in a preview state.
|
|
16359
17573
|
*/
|
|
16360
17574
|
readonly is_preview: boolean;
|
|
17575
|
+
/**
|
|
17576
|
+
* The current label for this record, if any.
|
|
17577
|
+
*/
|
|
17578
|
+
label?: string;
|
|
16361
17579
|
/**
|
|
16362
17580
|
* The current count of mappers in the upgrade item.
|
|
16363
17581
|
*/
|
|
@@ -16366,12 +17584,16 @@ interface LuaRecord {
|
|
|
16366
17584
|
* 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.
|
|
16367
17585
|
*/
|
|
16368
17586
|
readonly object_name: string;
|
|
17587
|
+
/**
|
|
17588
|
+
* The description for this deconstruction planner or upgrade planner.
|
|
17589
|
+
*/
|
|
17590
|
+
planner_description: string;
|
|
16369
17591
|
/**
|
|
16370
17592
|
* The preview icons for this record.
|
|
16371
17593
|
*/
|
|
16372
17594
|
preview_icons: BlueprintSignalIcon[];
|
|
16373
17595
|
/**
|
|
16374
|
-
* The number of tile filters this deconstruction planner
|
|
17596
|
+
* The number of tile filters this deconstruction planner has.
|
|
16375
17597
|
*/
|
|
16376
17598
|
readonly tile_filter_count: uint32;
|
|
16377
17599
|
/**
|
|
@@ -16558,6 +17780,10 @@ interface LuaRenderObject {
|
|
|
16558
17780
|
* Where top left corner of this rectangle is drawn.
|
|
16559
17781
|
*/
|
|
16560
17782
|
left_top: ScriptRenderTarget;
|
|
17783
|
+
/**
|
|
17784
|
+
* Whether this sprite or animation should be rendered as a sprite, light or both at once.
|
|
17785
|
+
*/
|
|
17786
|
+
light_mode: ScriptSpriteLightMode;
|
|
16561
17787
|
/**
|
|
16562
17788
|
* Radius of the outer edge of this arc.
|
|
16563
17789
|
*/
|
|
@@ -16702,7 +17928,7 @@ interface LuaRenderObject {
|
|
|
16702
17928
|
/**
|
|
16703
17929
|
* Allows rendering of geometric shapes, text and sprites in the game world through the global object named `rendering`. Each render object is identified by an id that is universally unique for the lifetime of a whole game.
|
|
16704
17930
|
*
|
|
16705
|
-
* If an entity target of an object is destroyed or changes surface, then the object is also destroyed.
|
|
17931
|
+
* If an entity target of an object (except its `orientation_target`) is destroyed or changes surface, then the object is also destroyed.
|
|
16706
17932
|
*/
|
|
16707
17933
|
interface LuaRendering {
|
|
16708
17934
|
/**
|
|
@@ -16730,6 +17956,7 @@ interface LuaRendering {
|
|
|
16730
17956
|
* @param table.visible If this is rendered to anyone at all. Defaults to true.
|
|
16731
17957
|
* @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
|
|
16732
17958
|
* @param table.render_mode Mode which this object should render in. Defaults to "game".
|
|
17959
|
+
* @param table.light_mode Whether this object should be rendered as a sprite, light or both at once. Defaults to "occluder".
|
|
16733
17960
|
*/
|
|
16734
17961
|
draw_animation(this: void, table: {
|
|
16735
17962
|
animation: string;
|
|
@@ -16752,6 +17979,7 @@ interface LuaRendering {
|
|
|
16752
17979
|
visible?: boolean;
|
|
16753
17980
|
only_in_alt_mode?: boolean;
|
|
16754
17981
|
render_mode?: ScriptRenderMode;
|
|
17982
|
+
light_mode?: ScriptSpriteLightMode;
|
|
16755
17983
|
}): LuaRenderObject;
|
|
16756
17984
|
/**
|
|
16757
17985
|
* Create an arc.
|
|
@@ -16816,7 +18044,7 @@ interface LuaRendering {
|
|
|
16816
18044
|
render_mode?: ScriptRenderMode;
|
|
16817
18045
|
}): LuaRenderObject;
|
|
16818
18046
|
/**
|
|
16819
|
-
* Create a light.
|
|
18047
|
+
* Create a gradient light which is not occluded by any sprites. It is rendered at lower resolution, so it takes less GPU power. The same technique is used for lights drawn by {@link LightDefinition | prototype:LightDefinition}.
|
|
16820
18048
|
*
|
|
16821
18049
|
* The base game uses the utility sprites `light_medium` and `light_small` for lights.
|
|
16822
18050
|
* @param table.orientation The orientation of the light. Default is 0.
|
|
@@ -16975,6 +18203,7 @@ interface LuaRendering {
|
|
|
16975
18203
|
* @param table.visible If this is rendered to anyone at all. Defaults to true.
|
|
16976
18204
|
* @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
|
|
16977
18205
|
* @param table.render_mode Mode which this object should render in. Defaults to "game".
|
|
18206
|
+
* @param table.light_mode Whether this object should be rendered as a sprite, light or both at once. Defaults to "occluder".
|
|
16978
18207
|
* @example ```
|
|
16979
18208
|
-- This will draw an iron plate icon at the character's feet. The sprite will move together with the character.
|
|
16980
18209
|
rendering.draw_sprite{sprite = "item.iron-plate", target = game.player.character, surface = game.player.surface}
|
|
@@ -17003,6 +18232,7 @@ interface LuaRendering {
|
|
|
17003
18232
|
visible?: boolean;
|
|
17004
18233
|
only_in_alt_mode?: boolean;
|
|
17005
18234
|
render_mode?: ScriptRenderMode;
|
|
18235
|
+
light_mode?: ScriptSpriteLightMode;
|
|
17006
18236
|
}): LuaRenderObject;
|
|
17007
18237
|
/**
|
|
17008
18238
|
* Create a text.
|
|
@@ -17685,6 +18915,25 @@ interface LuaSimulation {
|
|
|
17685
18915
|
*/
|
|
17686
18916
|
readonly valid: boolean;
|
|
17687
18917
|
}
|
|
18918
|
+
/**
|
|
18919
|
+
* Control behavior for entities with a single fluid box (i.e. pipe, pipe-to-ground, storage-tank).
|
|
18920
|
+
*/
|
|
18921
|
+
interface LuaSingleFluidBoxControlBehavior extends LuaControlBehavior {
|
|
18922
|
+
circuit_exclusive_mode_of_operation: defines.control_behavior.single_fluid_box.exclusive_mode;
|
|
18923
|
+
/**
|
|
18924
|
+
* 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.
|
|
18925
|
+
*/
|
|
18926
|
+
readonly object_name: string;
|
|
18927
|
+
/**
|
|
18928
|
+
* If this will read the temperature of the fluid.
|
|
18929
|
+
*/
|
|
18930
|
+
read_temperature: boolean;
|
|
18931
|
+
temperature_signal?: SignalID;
|
|
18932
|
+
/**
|
|
18933
|
+
* 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.
|
|
18934
|
+
*/
|
|
18935
|
+
readonly valid: boolean;
|
|
18936
|
+
}
|
|
17688
18937
|
/**
|
|
17689
18938
|
* Prototype of a space connection.
|
|
17690
18939
|
*/
|
|
@@ -17712,21 +18961,31 @@ interface LuaSpaceConnectionPrototype extends LuaPrototypeBase {
|
|
|
17712
18961
|
interface LuaSpaceLocationPrototype extends LuaPrototypeBase {
|
|
17713
18962
|
readonly asteroid_spawn_definitions?: SpaceLocationAsteroidSpawnDefinition[];
|
|
17714
18963
|
readonly asteroid_spawn_influence: double;
|
|
18964
|
+
readonly distance: double;
|
|
18965
|
+
readonly draw_orbit: boolean;
|
|
17715
18966
|
readonly entities_require_heating?: boolean;
|
|
17716
18967
|
/**
|
|
17717
18968
|
* An alternative prototype that will be used to display info about this prototype in Factoriopedia.
|
|
17718
18969
|
*/
|
|
17719
18970
|
readonly factoriopedia_alternative?: LuaSpaceLocationPrototype;
|
|
18971
|
+
readonly fly_condition: boolean;
|
|
18972
|
+
readonly gravity_pull: double;
|
|
18973
|
+
readonly label_orientation: RealOrientation;
|
|
18974
|
+
readonly magnitude: double;
|
|
17720
18975
|
readonly map_gen_settings?: MapGenSettings;
|
|
17721
18976
|
readonly map_seed_offset?: uint32;
|
|
17722
18977
|
/**
|
|
17723
18978
|
* 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.
|
|
17724
18979
|
*/
|
|
17725
18980
|
readonly object_name: string;
|
|
18981
|
+
readonly orientation: RealOrientation;
|
|
18982
|
+
readonly parked_platforms_orientation: RealOrientation;
|
|
18983
|
+
readonly parked_platforms_position: MapPosition;
|
|
17726
18984
|
readonly player_effects?: TriggerItem[];
|
|
17727
18985
|
readonly pollutant_type?: LuaAirbornePollutantPrototype;
|
|
17728
18986
|
readonly position: MapPosition;
|
|
17729
18987
|
readonly solar_power_in_space: double;
|
|
18988
|
+
readonly starmap_icon_orientation: RealOrientation;
|
|
17730
18989
|
/**
|
|
17731
18990
|
* A mapping of the surface property name to the value.
|
|
17732
18991
|
*/
|
|
@@ -17743,9 +19002,10 @@ interface LuaSpaceLocationPrototype extends LuaPrototypeBase {
|
|
|
17743
19002
|
interface LuaSpacePlatform {
|
|
17744
19003
|
/**
|
|
17745
19004
|
* Applies the starter pack for this platform if it hasn't already been applied.
|
|
19005
|
+
* @param silent If the platform creation is announced to players on the force. Defaults to `false`.
|
|
17746
19006
|
* @returns The platform hub.
|
|
17747
19007
|
*/
|
|
17748
|
-
apply_starter_pack(this: void): LuaEntity | null;
|
|
19008
|
+
apply_starter_pack(this: void, silent?: boolean): LuaEntity | null;
|
|
17749
19009
|
/**
|
|
17750
19010
|
* Returns `true` when the space platform isn't waiting on any delivery from the planet.
|
|
17751
19011
|
*/
|
|
@@ -17774,7 +19034,7 @@ interface LuaSpacePlatform {
|
|
|
17774
19034
|
* Schedules this space platform for deletion.
|
|
17775
19035
|
* @param ticks The number of ticks from now when this platform will be deleted.
|
|
17776
19036
|
*/
|
|
17777
|
-
destroy(this: void, ticks?:
|
|
19037
|
+
destroy(this: void, ticks?: MapTick): void;
|
|
17778
19038
|
/**
|
|
17779
19039
|
* Destroys all asteroid chunks from the given area. If no area and no position are given, then the entire surface is searched.
|
|
17780
19040
|
* @param table.invert If the filters should be inverted.
|
|
@@ -17811,6 +19071,9 @@ interface LuaSpacePlatform {
|
|
|
17811
19071
|
limit?: uint32;
|
|
17812
19072
|
invert?: boolean;
|
|
17813
19073
|
}): AsteroidChunk[];
|
|
19074
|
+
/**
|
|
19075
|
+
* This allows full access to the space platform schedule, including modifying the schedule records, the group and the interrupts.
|
|
19076
|
+
*/
|
|
17814
19077
|
get_schedule(this: void): LuaSchedule;
|
|
17815
19078
|
/**
|
|
17816
19079
|
* Repairs the given tile if it's damaged.
|
|
@@ -17871,6 +19134,8 @@ interface LuaSpacePlatform {
|
|
|
17871
19134
|
* This platform's current schedule, if any. Set to `nil` to clear.
|
|
17872
19135
|
*
|
|
17873
19136
|
* The schedule can't be changed by modifying the returned table. Instead, changes must be made by assigning a new table to this attribute.
|
|
19137
|
+
*
|
|
19138
|
+
* This is a simplified schedule that does **not** include groups and interrupts. See {@link LuaSpacePlatform::get_schedule | runtime:LuaSpacePlatform::get_schedule} for full access to the schedule, including interrupts and groups.
|
|
17874
19139
|
*/
|
|
17875
19140
|
schedule?: PlatformSchedule;
|
|
17876
19141
|
/**
|
|
@@ -17884,13 +19149,27 @@ interface LuaSpacePlatform {
|
|
|
17884
19149
|
*
|
|
17885
19150
|
* Write operation requires a valid space connection and it sets the distance to 0.5.
|
|
17886
19151
|
*/
|
|
17887
|
-
space_connection?: LuaSpaceConnectionPrototype;
|
|
19152
|
+
readonly space_connection?: LuaSpaceConnectionPrototype;
|
|
19153
|
+
/**
|
|
19154
|
+
* The space connection this space platform is traveling through or `nil`.
|
|
19155
|
+
*
|
|
19156
|
+
* Write operation requires a valid space connection and it sets the distance to 0.5.
|
|
19157
|
+
* @customName space_connection
|
|
19158
|
+
*/
|
|
19159
|
+
space_connection_write?: SpaceConnectionID;
|
|
17888
19160
|
/**
|
|
17889
19161
|
* The space location this space platform is stopped at or `nil`.
|
|
17890
19162
|
*
|
|
17891
19163
|
* Write operation requires a valid space location and will cancel pending item requests.
|
|
17892
19164
|
*/
|
|
17893
|
-
space_location?: LuaSpaceLocationPrototype;
|
|
19165
|
+
readonly space_location?: LuaSpaceLocationPrototype;
|
|
19166
|
+
/**
|
|
19167
|
+
* The space location this space platform is stopped at or `nil`.
|
|
19168
|
+
*
|
|
19169
|
+
* Write operation requires a valid space location and will cancel pending item requests.
|
|
19170
|
+
* @customName space_location
|
|
19171
|
+
*/
|
|
19172
|
+
space_location_write?: SpaceLocationID;
|
|
17894
19173
|
speed: double;
|
|
17895
19174
|
/**
|
|
17896
19175
|
* The starter pack used to create this space platform.
|
|
@@ -17949,6 +19228,7 @@ interface LuaSpacePlatformHubControlBehavior extends LuaControlBehavior {
|
|
|
17949
19228
|
* Whether the signals are used for circuit conditions in the platform's schedule
|
|
17950
19229
|
*/
|
|
17951
19230
|
send_to_platform: boolean;
|
|
19231
|
+
set_requests: boolean;
|
|
17952
19232
|
/**
|
|
17953
19233
|
* Signal to be transmitted with platform's current speed.
|
|
17954
19234
|
*/
|
|
@@ -17978,27 +19258,20 @@ interface LuaSplitterControlBehavior extends LuaControlBehavior {
|
|
|
17978
19258
|
*/
|
|
17979
19259
|
readonly valid: boolean;
|
|
17980
19260
|
}
|
|
17981
|
-
/**
|
|
17982
|
-
* Control behavior for storage tanks.
|
|
17983
|
-
*/
|
|
17984
|
-
interface LuaStorageTankControlBehavior extends LuaControlBehavior {
|
|
17985
|
-
/**
|
|
17986
|
-
* 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.
|
|
17987
|
-
*/
|
|
17988
|
-
readonly object_name: string;
|
|
17989
|
-
/**
|
|
17990
|
-
* If the storage tank content is sent to circuit network
|
|
17991
|
-
*/
|
|
17992
|
-
read_contents: boolean;
|
|
17993
|
-
/**
|
|
17994
|
-
* 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.
|
|
17995
|
-
*/
|
|
17996
|
-
readonly valid: boolean;
|
|
17997
|
-
}
|
|
17998
19261
|
/**
|
|
17999
19262
|
* Style of a GUI element. All of the attributes listed here may be `nil` if not available for a particular GUI element.
|
|
18000
19263
|
*/
|
|
18001
19264
|
interface LuaStyle {
|
|
19265
|
+
/**
|
|
19266
|
+
* Gets the given sub-style of this style if it exists. See {@link StyleSpecification | prototype:StyleSpecification} types for what sub styles are usable.
|
|
19267
|
+
*
|
|
19268
|
+
* Note: when creating sub-styles they have no set values and have the parent set to the styles top-level default.
|
|
19269
|
+
*
|
|
19270
|
+
* Note: when the parent {@link LuaGuiElement::style | runtime:LuaGuiElement::style} is directly changed (element.style = "new_style") any sub-styles will be invalidated.
|
|
19271
|
+
* @param style_name The style to get.
|
|
19272
|
+
* @param create If true, and the given sub-style is valid - it will be created if it does not exist. Defaults to `false`.
|
|
19273
|
+
*/
|
|
19274
|
+
get_style(this: void, style_name: string, create?: boolean): LuaStyle | null;
|
|
18002
19275
|
badge_font: string;
|
|
18003
19276
|
badge_horizontal_spacing: int32;
|
|
18004
19277
|
/**
|
|
@@ -18008,15 +19281,15 @@ interface LuaStyle {
|
|
|
18008
19281
|
/**
|
|
18009
19282
|
* Space between the table cell contents bottom and border.
|
|
18010
19283
|
*/
|
|
18011
|
-
bottom_cell_padding:
|
|
18012
|
-
bottom_margin:
|
|
18013
|
-
bottom_padding:
|
|
19284
|
+
bottom_cell_padding: int16;
|
|
19285
|
+
bottom_margin: int16;
|
|
19286
|
+
bottom_padding: int16;
|
|
18014
19287
|
/**
|
|
18015
19288
|
* Space between the table cell contents and border. Sets top/right/bottom/left cell paddings to this value.
|
|
18016
19289
|
*/
|
|
18017
|
-
cell_padding:
|
|
19290
|
+
cell_padding: int16;
|
|
18018
19291
|
clicked_font_color: Color;
|
|
18019
|
-
clicked_vertical_offset:
|
|
19292
|
+
clicked_vertical_offset: uint32;
|
|
18020
19293
|
color: Color;
|
|
18021
19294
|
/**
|
|
18022
19295
|
* Array containing the alignment for every column of this table element. Even though this property is marked as read-only, the alignment can be changed by indexing the LuaCustomTable, like so:
|
|
@@ -18081,15 +19354,15 @@ interface LuaStyle {
|
|
|
18081
19354
|
/**
|
|
18082
19355
|
* Space between the table cell contents left and border.
|
|
18083
19356
|
*/
|
|
18084
|
-
left_cell_padding:
|
|
18085
|
-
left_margin:
|
|
18086
|
-
left_padding:
|
|
19357
|
+
left_cell_padding: int16;
|
|
19358
|
+
left_margin: int16;
|
|
19359
|
+
left_padding: int16;
|
|
18087
19360
|
/**
|
|
18088
19361
|
* Sets top/right/bottom/left margins to this value.
|
|
18089
19362
|
*
|
|
18090
19363
|
* An array with two values sets top/bottom margin to the first value and left/right margin to the second value. An array with four values sets top, right, bottom, left margin respectively.
|
|
18091
19364
|
*/
|
|
18092
|
-
margin:
|
|
19365
|
+
margin: int16 | int16[];
|
|
18093
19366
|
/**
|
|
18094
19367
|
* Maximal height ensures, that the widget will never be bigger than than that size. It can't be stretched to be bigger.
|
|
18095
19368
|
*/
|
|
@@ -18109,7 +19382,7 @@ interface LuaStyle {
|
|
|
18109
19382
|
/**
|
|
18110
19383
|
* Name of this style.
|
|
18111
19384
|
*/
|
|
18112
|
-
|
|
19385
|
+
name: string;
|
|
18113
19386
|
/**
|
|
18114
19387
|
* Natural height specifies the height of the element tries to have, but it can still be squashed/stretched to have a smaller or bigger size.
|
|
18115
19388
|
*/
|
|
@@ -18127,7 +19400,7 @@ interface LuaStyle {
|
|
|
18127
19400
|
*
|
|
18128
19401
|
* An array with two values sets top/bottom padding to the first value and left/right padding to the second value. An array with four values sets top, right, bottom, left padding respectively.
|
|
18129
19402
|
*/
|
|
18130
|
-
padding:
|
|
19403
|
+
padding: int16 | int16[];
|
|
18131
19404
|
pie_progress_color: Color;
|
|
18132
19405
|
/**
|
|
18133
19406
|
* How this GUI element handles rich text.
|
|
@@ -18136,9 +19409,9 @@ interface LuaStyle {
|
|
|
18136
19409
|
/**
|
|
18137
19410
|
* Space between the table cell contents right and border.
|
|
18138
19411
|
*/
|
|
18139
|
-
right_cell_padding:
|
|
18140
|
-
right_margin:
|
|
18141
|
-
right_padding:
|
|
19412
|
+
right_cell_padding: int16;
|
|
19413
|
+
right_margin: int16;
|
|
19414
|
+
right_padding: int16;
|
|
18142
19415
|
selected_badge_font_color: Color;
|
|
18143
19416
|
selected_clicked_font_color: Color;
|
|
18144
19417
|
selected_font_color: Color;
|
|
@@ -18153,9 +19426,9 @@ interface LuaStyle {
|
|
|
18153
19426
|
/**
|
|
18154
19427
|
* Space between the table cell contents top and border.
|
|
18155
19428
|
*/
|
|
18156
|
-
top_cell_padding:
|
|
18157
|
-
top_margin:
|
|
18158
|
-
top_padding:
|
|
19429
|
+
top_cell_padding: int16;
|
|
19430
|
+
top_margin: int16;
|
|
19431
|
+
top_padding: int16;
|
|
18159
19432
|
use_header_filler: boolean;
|
|
18160
19433
|
/**
|
|
18161
19434
|
* 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.
|
|
@@ -18816,9 +20089,9 @@ interface LuaSurface {
|
|
|
18816
20089
|
*/
|
|
18817
20090
|
get_property(this: void, property: SurfacePropertyID): double;
|
|
18818
20091
|
/**
|
|
18819
|
-
* Gets a random generated chunk position or
|
|
20092
|
+
* Gets a random generated chunk position or nil if no chunks have been generated on this surface.
|
|
18820
20093
|
*/
|
|
18821
|
-
get_random_chunk(this: void): ChunkPosition;
|
|
20094
|
+
get_random_chunk(this: void): ChunkPosition | null;
|
|
18822
20095
|
/**
|
|
18823
20096
|
* Gets the resource amount of all resources on this surface
|
|
18824
20097
|
*/
|
|
@@ -18873,6 +20146,11 @@ interface LuaSurface {
|
|
|
18873
20146
|
* @param chunk_position The chunk's position.
|
|
18874
20147
|
*/
|
|
18875
20148
|
is_chunk_generated(this: void, chunk_position: ChunkPosition): boolean;
|
|
20149
|
+
/**
|
|
20150
|
+
* Play a music track for every player on this surface.
|
|
20151
|
+
* @param music_specification The track to play.
|
|
20152
|
+
*/
|
|
20153
|
+
play_music(this: void, music_specification: PlayMusicSpecification): void;
|
|
18876
20154
|
/**
|
|
18877
20155
|
* Play a sound for every player on this surface.
|
|
18878
20156
|
*
|
|
@@ -19168,8 +20446,14 @@ interface LuaSurface {
|
|
|
19168
20446
|
* Surface-wide effects applied to entities with effect receivers. `nil` if this surface is not using surface-wide effect source.
|
|
19169
20447
|
*/
|
|
19170
20448
|
global_effect?: ModuleEffects;
|
|
20449
|
+
/**
|
|
20450
|
+
* Global electric network for this surface.
|
|
20451
|
+
*/
|
|
20452
|
+
readonly global_electric_network?: LuaElectricSubNetwork;
|
|
19171
20453
|
/**
|
|
19172
20454
|
* The global electric network statistics for this surface.
|
|
20455
|
+
*
|
|
20456
|
+
* If this global network is disabled or this surface is removed, the flow statistics obtained from it will also become invalid. However if the surface index of a deleted surface is reused, the related flow statistics may become valid again.
|
|
19173
20457
|
*/
|
|
19174
20458
|
readonly global_electric_network_statistics?: LuaFlowStatistics;
|
|
19175
20459
|
/**
|
|
@@ -19216,6 +20500,14 @@ interface LuaSurface {
|
|
|
19216
20500
|
* 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.
|
|
19217
20501
|
*/
|
|
19218
20502
|
readonly object_name: string;
|
|
20503
|
+
/**
|
|
20504
|
+
* If set, this pollution type will be used over any other planet or platform values.
|
|
20505
|
+
*
|
|
20506
|
+
* If set to an empty table, pollution is disabled. If set to `nil`, the override is 'unset'.
|
|
20507
|
+
*
|
|
20508
|
+
* Reading will be `nil` if unset or a table with the current override (`nil` if overridden to disabled).
|
|
20509
|
+
*/
|
|
20510
|
+
override_pollution_type?: Pollutant;
|
|
19219
20511
|
/**
|
|
19220
20512
|
* Is peaceful mode enabled on this surface?
|
|
19221
20513
|
*/
|
|
@@ -19237,6 +20529,8 @@ interface LuaSurface {
|
|
|
19237
20529
|
readonly pollution_statistics: LuaFlowStatistics;
|
|
19238
20530
|
/**
|
|
19239
20531
|
* If clouds are shown on this surface. If false, clouds are never shown. If true the player must also have clouds enabled in graphics settings for them to be shown.
|
|
20532
|
+
*
|
|
20533
|
+
* By default, clouds are shown on all surfaces.
|
|
19240
20534
|
*/
|
|
19241
20535
|
show_clouds: boolean;
|
|
19242
20536
|
/**
|
|
@@ -19264,7 +20558,7 @@ interface LuaSurface {
|
|
|
19264
20558
|
*/
|
|
19265
20559
|
wind_speed: double;
|
|
19266
20560
|
}
|
|
19267
|
-
type LuaSurfaceCreateEntityParams = BaseLuaSurfaceCreateEntityParams | LuaSurfaceCreateEntityParamsAccumulator | LuaSurfaceCreateEntityParamsAgriculturalTower | LuaSurfaceCreateEntityParamsAmmoTurret | LuaSurfaceCreateEntityParamsArithmeticCombinator | LuaSurfaceCreateEntityParamsArtilleryFlare | LuaSurfaceCreateEntityParamsArtilleryProjectile | LuaSurfaceCreateEntityParamsArtilleryTurret | LuaSurfaceCreateEntityParamsArtilleryWagon | LuaSurfaceCreateEntityParamsAssemblingMachine | LuaSurfaceCreateEntityParamsAsteroid | LuaSurfaceCreateEntityParamsAsteroidCollector | LuaSurfaceCreateEntityParamsBeam | LuaSurfaceCreateEntityParamsCar | LuaSurfaceCreateEntityParamsCargoLandingPad | LuaSurfaceCreateEntityParamsCargoWagon | LuaSurfaceCreateEntityParamsCharacterCorpse | LuaSurfaceCreateEntityParamsCliff | LuaSurfaceCreateEntityParamsConstantCombinator | LuaSurfaceCreateEntityParamsContainer | LuaSurfaceCreateEntityParamsDeciderCombinator | LuaSurfaceCreateEntityParamsDeconstructibleTileProxy | LuaSurfaceCreateEntityParamsDisplayPanel | LuaSurfaceCreateEntityParamsElectricEnergyInterface | LuaSurfaceCreateEntityParamsElectricPole | LuaSurfaceCreateEntityParamsElectricTurret | LuaSurfaceCreateEntityParamsEntityGhost | LuaSurfaceCreateEntityParamsFire | LuaSurfaceCreateEntityParamsFluidTurret | LuaSurfaceCreateEntityParamsFluidWagon | LuaSurfaceCreateEntityParamsFurnace | LuaSurfaceCreateEntityParamsHighlightBox | LuaSurfaceCreateEntityParamsInfinityCargoWagon | LuaSurfaceCreateEntityParamsInfinityContainer | LuaSurfaceCreateEntityParamsInfinityPipe | LuaSurfaceCreateEntityParamsInserter | LuaSurfaceCreateEntityParamsItemEntity | LuaSurfaceCreateEntityParamsItemRequestProxy | LuaSurfaceCreateEntityParamsLamp | LuaSurfaceCreateEntityParamsLaneSplitter | LuaSurfaceCreateEntityParamsLinkedBelt | LuaSurfaceCreateEntityParamsLinkedContainer | LuaSurfaceCreateEntityParamsLoader | LuaSurfaceCreateEntityParamsLoader1x1 | LuaSurfaceCreateEntityParamsLocomotive | LuaSurfaceCreateEntityParamsLogisticContainer | LuaSurfaceCreateEntityParamsMiningDrill | LuaSurfaceCreateEntityParamsParticle | LuaSurfaceCreateEntityParamsPlant | LuaSurfaceCreateEntityParamsPowerSwitch | LuaSurfaceCreateEntityParamsProgrammableSpeaker | LuaSurfaceCreateEntityParamsProjectile | LuaSurfaceCreateEntityParamsProxyContainer | LuaSurfaceCreateEntityParamsPump | LuaSurfaceCreateEntityParamsRailChainSignal | LuaSurfaceCreateEntityParamsRailSignal | LuaSurfaceCreateEntityParamsReactor | LuaSurfaceCreateEntityParamsResource | LuaSurfaceCreateEntityParamsRoboport | LuaSurfaceCreateEntityParamsRocketSilo | LuaSurfaceCreateEntityParamsSelectorCombinator | LuaSurfaceCreateEntityParamsSimpleEntityWithForce | LuaSurfaceCreateEntityParamsSimpleEntityWithOwner | LuaSurfaceCreateEntityParamsSpacePlatformHub | LuaSurfaceCreateEntityParamsSpeechBubble | LuaSurfaceCreateEntityParamsSpiderVehicle | LuaSurfaceCreateEntityParamsSplitter | LuaSurfaceCreateEntityParamsStorageTank | LuaSurfaceCreateEntityParamsStream | LuaSurfaceCreateEntityParamsTileGhost | LuaSurfaceCreateEntityParamsTrainStop | LuaSurfaceCreateEntityParamsTransportBelt | LuaSurfaceCreateEntityParamsTurret | LuaSurfaceCreateEntityParamsUndergroundBelt | LuaSurfaceCreateEntityParamsValve | LuaSurfaceCreateEntityParamsWall;
|
|
20561
|
+
type LuaSurfaceCreateEntityParams = BaseLuaSurfaceCreateEntityParams | LuaSurfaceCreateEntityParamsAccumulator | LuaSurfaceCreateEntityParamsAgriculturalTower | LuaSurfaceCreateEntityParamsAmmoTurret | LuaSurfaceCreateEntityParamsArithmeticCombinator | LuaSurfaceCreateEntityParamsArtilleryFlare | LuaSurfaceCreateEntityParamsArtilleryProjectile | LuaSurfaceCreateEntityParamsArtilleryTurret | LuaSurfaceCreateEntityParamsArtilleryWagon | LuaSurfaceCreateEntityParamsAssemblingMachine | LuaSurfaceCreateEntityParamsAsteroid | LuaSurfaceCreateEntityParamsAsteroidCollector | LuaSurfaceCreateEntityParamsBeam | LuaSurfaceCreateEntityParamsBoiler | LuaSurfaceCreateEntityParamsCar | LuaSurfaceCreateEntityParamsCargoLandingPad | LuaSurfaceCreateEntityParamsCargoWagon | LuaSurfaceCreateEntityParamsCharacterCorpse | LuaSurfaceCreateEntityParamsCliff | LuaSurfaceCreateEntityParamsConstantCombinator | LuaSurfaceCreateEntityParamsContainer | LuaSurfaceCreateEntityParamsDeciderCombinator | LuaSurfaceCreateEntityParamsDeconstructibleTileProxy | LuaSurfaceCreateEntityParamsDisplayPanel | LuaSurfaceCreateEntityParamsElectricEnergyInterface | LuaSurfaceCreateEntityParamsElectricPole | LuaSurfaceCreateEntityParamsElectricTurret | LuaSurfaceCreateEntityParamsEntityGhost | LuaSurfaceCreateEntityParamsFire | LuaSurfaceCreateEntityParamsFluidTurret | LuaSurfaceCreateEntityParamsFluidWagon | LuaSurfaceCreateEntityParamsFurnace | LuaSurfaceCreateEntityParamsHeatInterface | LuaSurfaceCreateEntityParamsHeatPipe | LuaSurfaceCreateEntityParamsHighlightBox | LuaSurfaceCreateEntityParamsInfinityCargoWagon | LuaSurfaceCreateEntityParamsInfinityContainer | LuaSurfaceCreateEntityParamsInfinityPipe | LuaSurfaceCreateEntityParamsInserter | LuaSurfaceCreateEntityParamsItemEntity | LuaSurfaceCreateEntityParamsItemRequestProxy | LuaSurfaceCreateEntityParamsLab | LuaSurfaceCreateEntityParamsLamp | LuaSurfaceCreateEntityParamsLandMine | LuaSurfaceCreateEntityParamsLaneSplitter | LuaSurfaceCreateEntityParamsLinkedBelt | LuaSurfaceCreateEntityParamsLinkedContainer | LuaSurfaceCreateEntityParamsLoader | LuaSurfaceCreateEntityParamsLoader1x1 | LuaSurfaceCreateEntityParamsLocomotive | LuaSurfaceCreateEntityParamsLogisticContainer | LuaSurfaceCreateEntityParamsMiningDrill | LuaSurfaceCreateEntityParamsOffshorePump | LuaSurfaceCreateEntityParamsParticle | LuaSurfaceCreateEntityParamsPipe | LuaSurfaceCreateEntityParamsPipeToGround | LuaSurfaceCreateEntityParamsPlant | LuaSurfaceCreateEntityParamsPowerSwitch | LuaSurfaceCreateEntityParamsProgrammableSpeaker | LuaSurfaceCreateEntityParamsProjectile | LuaSurfaceCreateEntityParamsProxyContainer | LuaSurfaceCreateEntityParamsPump | LuaSurfaceCreateEntityParamsRadar | LuaSurfaceCreateEntityParamsRailChainSignal | LuaSurfaceCreateEntityParamsRailSignal | LuaSurfaceCreateEntityParamsReactor | LuaSurfaceCreateEntityParamsResource | LuaSurfaceCreateEntityParamsRoboport | LuaSurfaceCreateEntityParamsRocketSilo | LuaSurfaceCreateEntityParamsSelectorCombinator | LuaSurfaceCreateEntityParamsSimpleEntityWithForce | LuaSurfaceCreateEntityParamsSimpleEntityWithOwner | LuaSurfaceCreateEntityParamsSpacePlatformHub | LuaSurfaceCreateEntityParamsSpeechBubble | LuaSurfaceCreateEntityParamsSpiderVehicle | LuaSurfaceCreateEntityParamsSplitter | LuaSurfaceCreateEntityParamsStorageTank | LuaSurfaceCreateEntityParamsStream | LuaSurfaceCreateEntityParamsTileGhost | LuaSurfaceCreateEntityParamsTrainStop | LuaSurfaceCreateEntityParamsTransportBelt | LuaSurfaceCreateEntityParamsTurret | LuaSurfaceCreateEntityParamsUndergroundBelt | LuaSurfaceCreateEntityParamsValve | LuaSurfaceCreateEntityParamsWall;
|
|
19268
20562
|
interface BaseLuaSurfaceCreateEntityParams {
|
|
19269
20563
|
/**
|
|
19270
20564
|
* Used by entities with a burner energy source.
|
|
@@ -19427,6 +20721,10 @@ interface LuaSurfaceCreateEntityParamsArtilleryTurret extends BaseLuaSurfaceCrea
|
|
|
19427
20721
|
*/
|
|
19428
20722
|
interface LuaSurfaceCreateEntityParamsArtilleryWagon extends BaseLuaSurfaceCreateEntityParams {
|
|
19429
20723
|
'artillery_auto_targeting'?: boolean;
|
|
20724
|
+
/**
|
|
20725
|
+
* True by default. If set to false, rolling stock will not connect to other rolling stocks nearby.
|
|
20726
|
+
*/
|
|
20727
|
+
'auto_connect'?: boolean;
|
|
19430
20728
|
/**
|
|
19431
20729
|
* The color of this rolling stock, if it supports colors.
|
|
19432
20730
|
*/
|
|
@@ -19490,6 +20788,13 @@ interface LuaSurfaceCreateEntityParamsBeam extends BaseLuaSurfaceCreateEntityPar
|
|
|
19490
20788
|
*/
|
|
19491
20789
|
'target_position'?: MapPosition;
|
|
19492
20790
|
}
|
|
20791
|
+
/**
|
|
20792
|
+
*
|
|
20793
|
+
* Applies to variant case `boiler`
|
|
20794
|
+
*/
|
|
20795
|
+
interface LuaSurfaceCreateEntityParamsBoiler extends BaseLuaSurfaceCreateEntityParams {
|
|
20796
|
+
'control_behavior'?: BoilerBlueprintControlBehavior;
|
|
20797
|
+
}
|
|
19493
20798
|
/**
|
|
19494
20799
|
*
|
|
19495
20800
|
* Applies to variant case `car`
|
|
@@ -19518,6 +20823,10 @@ interface LuaSurfaceCreateEntityParamsCargoLandingPad extends BaseLuaSurfaceCrea
|
|
|
19518
20823
|
* Applies to variant case `cargo-wagon`
|
|
19519
20824
|
*/
|
|
19520
20825
|
interface LuaSurfaceCreateEntityParamsCargoWagon extends BaseLuaSurfaceCreateEntityParams {
|
|
20826
|
+
/**
|
|
20827
|
+
* True by default. If set to false, rolling stock will not connect to other rolling stocks nearby.
|
|
20828
|
+
*/
|
|
20829
|
+
'auto_connect'?: boolean;
|
|
19521
20830
|
/**
|
|
19522
20831
|
* The color of this rolling stock, if it supports colors.
|
|
19523
20832
|
*/
|
|
@@ -19566,8 +20875,9 @@ interface LuaSurfaceCreateEntityParamsContainer extends BaseLuaSurfaceCreateEnti
|
|
|
19566
20875
|
/**
|
|
19567
20876
|
* Inventory index where the red limiting bar should be set.
|
|
19568
20877
|
*/
|
|
19569
|
-
'bar'?:
|
|
20878
|
+
'bar'?: ItemStackIndex;
|
|
19570
20879
|
'control_behavior'?: ContainerBlueprintControlBehavior;
|
|
20880
|
+
'filters'?: BlueprintItemFilter[];
|
|
19571
20881
|
}
|
|
19572
20882
|
/**
|
|
19573
20883
|
*
|
|
@@ -19667,6 +20977,10 @@ interface LuaSurfaceCreateEntityParamsFluidTurret extends BaseLuaSurfaceCreateEn
|
|
|
19667
20977
|
* Applies to variant case `fluid-wagon`
|
|
19668
20978
|
*/
|
|
19669
20979
|
interface LuaSurfaceCreateEntityParamsFluidWagon extends BaseLuaSurfaceCreateEntityParams {
|
|
20980
|
+
/**
|
|
20981
|
+
* True by default. If set to false, rolling stock will not connect to other rolling stocks nearby.
|
|
20982
|
+
*/
|
|
20983
|
+
'auto_connect'?: boolean;
|
|
19670
20984
|
/**
|
|
19671
20985
|
* The color of this rolling stock, if it supports colors.
|
|
19672
20986
|
*/
|
|
@@ -19686,6 +21000,21 @@ interface LuaSurfaceCreateEntityParamsFluidWagon extends BaseLuaSurfaceCreateEnt
|
|
|
19686
21000
|
interface LuaSurfaceCreateEntityParamsFurnace extends BaseLuaSurfaceCreateEntityParams {
|
|
19687
21001
|
'control_behavior'?: FurnaceBlueprintControlBehavior;
|
|
19688
21002
|
}
|
|
21003
|
+
/**
|
|
21004
|
+
*
|
|
21005
|
+
* Applies to variant case `heat-interface`
|
|
21006
|
+
*/
|
|
21007
|
+
interface LuaSurfaceCreateEntityParamsHeatInterface extends BaseLuaSurfaceCreateEntityParams {
|
|
21008
|
+
'mode'?: HeatSettingMode;
|
|
21009
|
+
'temperature'?: double;
|
|
21010
|
+
}
|
|
21011
|
+
/**
|
|
21012
|
+
*
|
|
21013
|
+
* Applies to variant case `heat-pipe`
|
|
21014
|
+
*/
|
|
21015
|
+
interface LuaSurfaceCreateEntityParamsHeatPipe extends BaseLuaSurfaceCreateEntityParams {
|
|
21016
|
+
'control_behavior'?: HeatPipeBlueprintControlBehavior;
|
|
21017
|
+
}
|
|
19689
21018
|
/**
|
|
19690
21019
|
*
|
|
19691
21020
|
* Applies to variant case `highlight-box`
|
|
@@ -19717,6 +21046,10 @@ interface LuaSurfaceCreateEntityParamsHighlightBox extends BaseLuaSurfaceCreateE
|
|
|
19717
21046
|
* Applies to variant case `infinity-cargo-wagon`
|
|
19718
21047
|
*/
|
|
19719
21048
|
interface LuaSurfaceCreateEntityParamsInfinityCargoWagon extends BaseLuaSurfaceCreateEntityParams {
|
|
21049
|
+
/**
|
|
21050
|
+
* True by default. If set to false, rolling stock will not connect to other rolling stocks nearby.
|
|
21051
|
+
*/
|
|
21052
|
+
'auto_connect'?: boolean;
|
|
19720
21053
|
/**
|
|
19721
21054
|
* The color of this rolling stock, if it supports colors.
|
|
19722
21055
|
*/
|
|
@@ -19736,10 +21069,16 @@ interface LuaSurfaceCreateEntityParamsInfinityCargoWagon extends BaseLuaSurfaceC
|
|
|
19736
21069
|
* Applies to variant case `infinity-container`
|
|
19737
21070
|
*/
|
|
19738
21071
|
interface LuaSurfaceCreateEntityParamsInfinityContainer extends BaseLuaSurfaceCreateEntityParams {
|
|
19739
|
-
'bar'?:
|
|
21072
|
+
'bar'?: ItemStackIndex;
|
|
19740
21073
|
'control_behavior'?: LogisticContainerBlueprintControlBehavior;
|
|
21074
|
+
'filters'?: BlueprintItemFilter[];
|
|
19741
21075
|
'infinity_settings'?: BlueprintInfinityInventorySettings;
|
|
21076
|
+
'override_logistic_mode'?: LogisticMode;
|
|
19742
21077
|
'request_filters'?: BlueprintLogisticSections;
|
|
21078
|
+
'saved_request_filters'?: LogisticSections;
|
|
21079
|
+
'saved_request_from_buffers'?: boolean;
|
|
21080
|
+
'saved_set_requests'?: boolean;
|
|
21081
|
+
'saved_storage_filters'?: LogisticSections;
|
|
19743
21082
|
}
|
|
19744
21083
|
/**
|
|
19745
21084
|
*
|
|
@@ -19765,7 +21104,7 @@ interface LuaSurfaceCreateEntityParamsInserter extends BaseLuaSurfaceCreateEntit
|
|
|
19765
21104
|
* Used only if {@link InserterPrototype::allow_custom_vectors | prototype:InserterPrototype::allow_custom_vectors} is true.
|
|
19766
21105
|
*/
|
|
19767
21106
|
'pickup_position'?: Vector;
|
|
19768
|
-
'spoil_priority'?:
|
|
21107
|
+
'spoil_priority'?: BlueprintSpoilPriority;
|
|
19769
21108
|
/**
|
|
19770
21109
|
* Defaults to `false`.
|
|
19771
21110
|
*/
|
|
@@ -19787,9 +21126,9 @@ interface LuaSurfaceCreateEntityParamsItemEntity extends BaseLuaSurfaceCreateEnt
|
|
|
19787
21126
|
*/
|
|
19788
21127
|
interface LuaSurfaceCreateEntityParamsItemRequestProxy extends BaseLuaSurfaceCreateEntityParams {
|
|
19789
21128
|
/**
|
|
19790
|
-
*
|
|
21129
|
+
* Specification of items to be delivered to the target entity by the logistic network. While this is called "modules", any item can be specified.
|
|
19791
21130
|
*/
|
|
19792
|
-
'modules'
|
|
21131
|
+
'modules'?: BlueprintInsertPlan[];
|
|
19793
21132
|
/**
|
|
19794
21133
|
* Specification of items to be removed from the target entity by the logistic network.
|
|
19795
21134
|
*/
|
|
@@ -19799,6 +21138,13 @@ interface LuaSurfaceCreateEntityParamsItemRequestProxy extends BaseLuaSurfaceCre
|
|
|
19799
21138
|
*/
|
|
19800
21139
|
'target': LuaEntity;
|
|
19801
21140
|
}
|
|
21141
|
+
/**
|
|
21142
|
+
*
|
|
21143
|
+
* Applies to variant case `lab`
|
|
21144
|
+
*/
|
|
21145
|
+
interface LuaSurfaceCreateEntityParamsLab extends BaseLuaSurfaceCreateEntityParams {
|
|
21146
|
+
'control_behavior'?: LabBlueprintControlBehavior;
|
|
21147
|
+
}
|
|
19802
21148
|
/**
|
|
19803
21149
|
*
|
|
19804
21150
|
* Applies to variant case `lamp`
|
|
@@ -19814,6 +21160,13 @@ interface LuaSurfaceCreateEntityParamsLamp extends BaseLuaSurfaceCreateEntityPar
|
|
|
19814
21160
|
'color'?: Color;
|
|
19815
21161
|
'control_behavior'?: LampBlueprintControlBehavior;
|
|
19816
21162
|
}
|
|
21163
|
+
/**
|
|
21164
|
+
*
|
|
21165
|
+
* Applies to variant case `land-mine`
|
|
21166
|
+
*/
|
|
21167
|
+
interface LuaSurfaceCreateEntityParamsLandMine extends BaseLuaSurfaceCreateEntityParams {
|
|
21168
|
+
'control_behavior'?: LandMineBlueprintControlBehavior;
|
|
21169
|
+
}
|
|
19817
21170
|
/**
|
|
19818
21171
|
*
|
|
19819
21172
|
* Applies to variant case `lane-splitter`
|
|
@@ -19870,6 +21223,10 @@ interface LuaSurfaceCreateEntityParamsLoader1x1 extends BaseLuaSurfaceCreateEnti
|
|
|
19870
21223
|
* Applies to variant case `locomotive`
|
|
19871
21224
|
*/
|
|
19872
21225
|
interface LuaSurfaceCreateEntityParamsLocomotive extends BaseLuaSurfaceCreateEntityParams {
|
|
21226
|
+
/**
|
|
21227
|
+
* True by default. If set to false, rolling stock will not connect to other rolling stocks nearby.
|
|
21228
|
+
*/
|
|
21229
|
+
'auto_connect'?: boolean;
|
|
19873
21230
|
/**
|
|
19874
21231
|
* The color of this rolling stock, if it supports colors.
|
|
19875
21232
|
*/
|
|
@@ -19891,8 +21248,9 @@ interface LuaSurfaceCreateEntityParamsLocomotive extends BaseLuaSurfaceCreateEnt
|
|
|
19891
21248
|
* Applies to variant case `logistic-container`
|
|
19892
21249
|
*/
|
|
19893
21250
|
interface LuaSurfaceCreateEntityParamsLogisticContainer extends BaseLuaSurfaceCreateEntityParams {
|
|
19894
|
-
'bar'?:
|
|
21251
|
+
'bar'?: ItemStackIndex;
|
|
19895
21252
|
'control_behavior'?: LogisticContainerBlueprintControlBehavior;
|
|
21253
|
+
'filters'?: BlueprintItemFilter[];
|
|
19896
21254
|
'request_filters'?: SlotFilter[];
|
|
19897
21255
|
}
|
|
19898
21256
|
/**
|
|
@@ -19903,6 +21261,13 @@ interface LuaSurfaceCreateEntityParamsMiningDrill extends BaseLuaSurfaceCreateEn
|
|
|
19903
21261
|
'control_behavior'?: MiningDrillBlueprintControlBehavior;
|
|
19904
21262
|
'filter'?: BlueprintMiningDrillFilter;
|
|
19905
21263
|
}
|
|
21264
|
+
/**
|
|
21265
|
+
*
|
|
21266
|
+
* Applies to variant case `offshore-pump`
|
|
21267
|
+
*/
|
|
21268
|
+
interface LuaSurfaceCreateEntityParamsOffshorePump extends BaseLuaSurfaceCreateEntityParams {
|
|
21269
|
+
'control_behavior'?: GenericOnOffBlueprintControlBehavior;
|
|
21270
|
+
}
|
|
19906
21271
|
/**
|
|
19907
21272
|
*
|
|
19908
21273
|
* Applies to variant case `particle`
|
|
@@ -19913,6 +21278,20 @@ interface LuaSurfaceCreateEntityParamsParticle extends BaseLuaSurfaceCreateEntit
|
|
|
19913
21278
|
'movement': Vector;
|
|
19914
21279
|
'vertical_speed': float;
|
|
19915
21280
|
}
|
|
21281
|
+
/**
|
|
21282
|
+
*
|
|
21283
|
+
* Applies to variant case `pipe`
|
|
21284
|
+
*/
|
|
21285
|
+
interface LuaSurfaceCreateEntityParamsPipe extends BaseLuaSurfaceCreateEntityParams {
|
|
21286
|
+
'control_behavior'?: SingleFluidBoxBlueprintControlBehavior;
|
|
21287
|
+
}
|
|
21288
|
+
/**
|
|
21289
|
+
*
|
|
21290
|
+
* Applies to variant case `pipe-to-ground`
|
|
21291
|
+
*/
|
|
21292
|
+
interface LuaSurfaceCreateEntityParamsPipeToGround extends BaseLuaSurfaceCreateEntityParams {
|
|
21293
|
+
'control_behavior'?: SingleFluidBoxBlueprintControlBehavior;
|
|
21294
|
+
}
|
|
19916
21295
|
/**
|
|
19917
21296
|
*
|
|
19918
21297
|
* Applies to variant case `plant`
|
|
@@ -19921,14 +21300,14 @@ interface LuaSurfaceCreateEntityParamsPlant extends BaseLuaSurfaceCreateEntityPa
|
|
|
19921
21300
|
/**
|
|
19922
21301
|
* The tick the plant will be fully grown. If not specified, the plants normal growth time is used.
|
|
19923
21302
|
*/
|
|
19924
|
-
'tick_grown'?:
|
|
21303
|
+
'tick_grown'?: MapTick;
|
|
19925
21304
|
}
|
|
19926
21305
|
/**
|
|
19927
21306
|
*
|
|
19928
21307
|
* Applies to variant case `power-switch`
|
|
19929
21308
|
*/
|
|
19930
21309
|
interface LuaSurfaceCreateEntityParamsPowerSwitch extends BaseLuaSurfaceCreateEntityParams {
|
|
19931
|
-
'control_behavior'?:
|
|
21310
|
+
'control_behavior'?: GenericOnOffBlueprintControlBehavior;
|
|
19932
21311
|
'switch_state'?: boolean;
|
|
19933
21312
|
}
|
|
19934
21313
|
/**
|
|
@@ -19971,6 +21350,13 @@ interface LuaSurfaceCreateEntityParamsPump extends BaseLuaSurfaceCreateEntityPar
|
|
|
19971
21350
|
'control_behavior'?: PumpBlueprintControlBehavior;
|
|
19972
21351
|
'fluid_filter'?: string;
|
|
19973
21352
|
}
|
|
21353
|
+
/**
|
|
21354
|
+
*
|
|
21355
|
+
* Applies to variant case `radar`
|
|
21356
|
+
*/
|
|
21357
|
+
interface LuaSurfaceCreateEntityParamsRadar extends BaseLuaSurfaceCreateEntityParams {
|
|
21358
|
+
'control_behavior'?: RadarBlueprintControlBehavior;
|
|
21359
|
+
}
|
|
19974
21360
|
/**
|
|
19975
21361
|
*
|
|
19976
21362
|
* Applies to variant case `rail-chain-signal`
|
|
@@ -20071,6 +21457,7 @@ interface LuaSurfaceCreateEntityParamsSimpleEntityWithOwner extends BaseLuaSurfa
|
|
|
20071
21457
|
interface LuaSurfaceCreateEntityParamsSpacePlatformHub extends BaseLuaSurfaceCreateEntityParams {
|
|
20072
21458
|
'bar'?: ItemStackIndex;
|
|
20073
21459
|
'control_behavior'?: SpacePlatformHubBlueprintControlBehavior;
|
|
21460
|
+
'providing_to_other_platforms'?: boolean;
|
|
20074
21461
|
'request_filters'?: BlueprintLogisticSections;
|
|
20075
21462
|
'request_missing_construction_materials'?: boolean;
|
|
20076
21463
|
}
|
|
@@ -20113,7 +21500,7 @@ interface LuaSurfaceCreateEntityParamsSplitter extends BaseLuaSurfaceCreateEntit
|
|
|
20113
21500
|
* Applies to variant case `storage-tank`
|
|
20114
21501
|
*/
|
|
20115
21502
|
interface LuaSurfaceCreateEntityParamsStorageTank extends BaseLuaSurfaceCreateEntityParams {
|
|
20116
|
-
'control_behavior'?:
|
|
21503
|
+
'control_behavior'?: SingleFluidBoxBlueprintControlBehavior;
|
|
20117
21504
|
}
|
|
20118
21505
|
/**
|
|
20119
21506
|
*
|
|
@@ -20453,7 +21840,7 @@ interface LuaTechnologyPrototype extends LuaPrototypeBase {
|
|
|
20453
21840
|
*
|
|
20454
21841
|
* A territory is owned by the surface for which it was created. It comprises any number of disconnected or connected chunks. A chunk can only be owned by at most one territory. A territory's chunks may or may not be generated.
|
|
20455
21842
|
*
|
|
20456
|
-
* Territories may be patrolled by any number of {@link LuaSegmentedUnit | runtime:LuaSegmentedUnit}s. A territory with no units will not appear on player's maps.
|
|
21843
|
+
* Territories may be patrolled by any number of {@link LuaSegmentedUnit | runtime:LuaSegmentedUnit}s. A territory with default visibility condition but with no units will not appear on player's maps.
|
|
20457
21844
|
*
|
|
20458
21845
|
* Territories may define a patrol path that {@link LuaSegmentedUnit | runtime:LuaSegmentedUnit}s will follow. If no such path is defined, then units will wander randomly throughout the territory chunks. If a territory contains no patrol path and no chunks, then units will behave as if they are assigned to any territory.
|
|
20459
21846
|
*
|
|
@@ -20513,6 +21900,10 @@ interface LuaTerritory {
|
|
|
20513
21900
|
* 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.
|
|
20514
21901
|
*/
|
|
20515
21902
|
readonly valid: boolean;
|
|
21903
|
+
/**
|
|
21904
|
+
* Condition when this territory is visible.
|
|
21905
|
+
*/
|
|
21906
|
+
visibility_condition: TerritoryVisibilityCondition;
|
|
20516
21907
|
}
|
|
20517
21908
|
/**
|
|
20518
21909
|
* A single "square" on the map.
|
|
@@ -20620,7 +22011,7 @@ interface LuaTilePrototype extends LuaPrototypeBase {
|
|
|
20620
22011
|
/**
|
|
20621
22012
|
* The collision mask this tile uses
|
|
20622
22013
|
*/
|
|
20623
|
-
readonly collision_mask:
|
|
22014
|
+
readonly collision_mask: TileCollisionMask;
|
|
20624
22015
|
/**
|
|
20625
22016
|
* The probability that decorative entities will be removed from on top of this tile when this tile is generated.
|
|
20626
22017
|
*/
|
|
@@ -20705,7 +22096,7 @@ interface LuaTrain {
|
|
|
20705
22096
|
* Get a mapping of the train's inventory.
|
|
20706
22097
|
* @returns List of all items in the train.
|
|
20707
22098
|
*/
|
|
20708
|
-
get_contents(this: void):
|
|
22099
|
+
get_contents(this: void): ItemWithQualityCount[];
|
|
20709
22100
|
/**
|
|
20710
22101
|
* Gets a mapping of the train's fluid inventory.
|
|
20711
22102
|
* @returns The counts, indexed by fluid names.
|
|
@@ -20729,6 +22120,9 @@ interface LuaTrain {
|
|
|
20729
22120
|
* Gets all rails under the train.
|
|
20730
22121
|
*/
|
|
20731
22122
|
get_rails(this: void): LuaEntity[];
|
|
22123
|
+
/**
|
|
22124
|
+
* This allows full access to the train schedule, including modifying the schedule records, the train group and the interrupts.
|
|
22125
|
+
*/
|
|
20732
22126
|
get_schedule(this: void): LuaSchedule;
|
|
20733
22127
|
/**
|
|
20734
22128
|
* Go to the station specified by the index in the train's schedule.
|
|
@@ -20871,6 +22265,8 @@ interface LuaTrain {
|
|
|
20871
22265
|
* This train's current schedule, if any. Set to `nil` to clear.
|
|
20872
22266
|
*
|
|
20873
22267
|
* The schedule can't be changed by modifying the returned table. Instead, changes must be made by assigning a new table to this attribute.
|
|
22268
|
+
*
|
|
22269
|
+
* This is a simplified schedule that does **not** include train groups and interrupts. See {@link LuaTrain::get_schedule | runtime:LuaTrain::get_schedule} for full access to the train schedule, including interrupts and train groups.
|
|
20874
22270
|
*/
|
|
20875
22271
|
schedule?: TrainSchedule;
|
|
20876
22272
|
/**
|
|
@@ -21056,7 +22452,7 @@ interface LuaTransportLine {
|
|
|
21056
22452
|
* Get counts of all items on this line, similar to how {@link LuaInventory::get_contents | runtime:LuaInventory::get_contents} does.
|
|
21057
22453
|
* @returns List of all items on this line.
|
|
21058
22454
|
*/
|
|
21059
|
-
get_contents(this: void):
|
|
22455
|
+
get_contents(this: void): ItemWithQualityCount[];
|
|
21060
22456
|
/**
|
|
21061
22457
|
* Get detailed information of items on this line, such as their position.
|
|
21062
22458
|
*/
|
|
@@ -21420,6 +22816,12 @@ interface LuaWireConnector {
|
|
|
21420
22816
|
* All wire connectors this connector is connected to. It includes all wires (ghost wires and real wires).
|
|
21421
22817
|
*/
|
|
21422
22818
|
readonly connections: WireConnection[];
|
|
22819
|
+
/**
|
|
22820
|
+
* The electric sub network this copper wire connector provides.
|
|
22821
|
+
*
|
|
22822
|
+
* No value will be provided if this is not a copper wire connector. May be `nil` in case of a copper wire connector when it belongs to a ghost or its from a power switch when there are no real wires connecting it to other entities.
|
|
22823
|
+
*/
|
|
22824
|
+
readonly electric_network?: LuaElectricSubNetwork;
|
|
21423
22825
|
/**
|
|
21424
22826
|
* If this connector is owned by an entity inside of a ghost. If any of 2 ends of a wire attaches to a ghost connector, then a wire is considered to be a ghost.
|
|
21425
22827
|
*/
|