typed-factorio 0.19.1 → 1.0.0-RC
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/Changelog.md +14 -8
- package/README.md +19 -14
- package/custom-index-template.d.ts +22 -0
- package/generated/classes.d.ts +366 -76
- package/generated/concepts.d.ts +3 -3
- package/generated/events.d.ts +138 -140
- package/generated/index-types.d.ts +49 -0
- package/package.json +2 -5
- package/runtime/index.d.ts +9 -1
- package/runtime/pairs.d.ts +4 -8
- package/strict-index-types.d.ts +3 -0
- package/generated/index.d.ts +0 -9
package/generated/classes.d.ts
CHANGED
@@ -300,7 +300,7 @@ interface LuaBootstrap {
|
|
300
300
|
* @returns The registration number. It is used to identify the entity in the {@link OnEntityDestroyedEvent on_entity_destroyed} event.
|
301
301
|
* @remarks Depending on when a given entity is destroyed, {@link OnEntityDestroyedEvent on_entity_destroyed} will either be fired at the end of the current tick or at the end of the next tick.
|
302
302
|
*/
|
303
|
-
register_on_entity_destroyed(entity: LuaEntity):
|
303
|
+
register_on_entity_destroyed(entity: LuaEntity): RegistrationNumber
|
304
304
|
/**
|
305
305
|
* Generate a new, unique event ID that can be used to raise custom events with {@link LuaBootstrap#raise_event LuaBootstrap::raise_event}.
|
306
306
|
*
|
@@ -392,7 +392,7 @@ interface LuaBootstrap {
|
|
392
392
|
/**
|
393
393
|
* The player doing the chatting.
|
394
394
|
*/
|
395
|
-
readonly player_index:
|
395
|
+
readonly player_index: PlayerIndex
|
396
396
|
/**
|
397
397
|
* The chat message to send.
|
398
398
|
*/
|
@@ -413,7 +413,7 @@ interface LuaBootstrap {
|
|
413
413
|
/**
|
414
414
|
* The player doing the crafting.
|
415
415
|
*/
|
416
|
-
readonly player_index:
|
416
|
+
readonly player_index: PlayerIndex
|
417
417
|
/**
|
418
418
|
* The recipe used to craft this item.
|
419
419
|
*/
|
@@ -430,7 +430,7 @@ interface LuaBootstrap {
|
|
430
430
|
/**
|
431
431
|
* The player transferred from or to.
|
432
432
|
*/
|
433
|
-
readonly player_index:
|
433
|
+
readonly player_index: PlayerIndex
|
434
434
|
/**
|
435
435
|
* The entity transferred from or to.
|
436
436
|
*/
|
@@ -464,7 +464,7 @@ interface LuaBootstrap {
|
|
464
464
|
/**
|
465
465
|
* The player who did the purchasing.
|
466
466
|
*/
|
467
|
-
readonly player_index:
|
467
|
+
readonly player_index: PlayerIndex
|
468
468
|
/**
|
469
469
|
* The market entity.
|
470
470
|
*/
|
@@ -532,7 +532,7 @@ interface LuaBootstrap {
|
|
532
532
|
/**
|
533
533
|
* The surface whose tiles have been changed.
|
534
534
|
*/
|
535
|
-
readonly surface_index:
|
535
|
+
readonly surface_index: SurfaceIndex
|
536
536
|
/**
|
537
537
|
* The tiles that have been changed.
|
538
538
|
*/
|
@@ -1171,7 +1171,7 @@ interface LuaControl {
|
|
1171
1171
|
*
|
1172
1172
|
* {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.is_flashlight_enabled View documentation}
|
1173
1173
|
*/
|
1174
|
-
is_flashlight_enabled():
|
1174
|
+
is_flashlight_enabled(): boolean
|
1175
1175
|
/**
|
1176
1176
|
* Gets the count of the given recipe that can be crafted.
|
1177
1177
|
*
|
@@ -1895,25 +1895,25 @@ interface LuaCustomInputPrototype {
|
|
1895
1895
|
*/
|
1896
1896
|
readonly action: string
|
1897
1897
|
/**
|
1898
|
-
*
|
1898
|
+
* Whether this custom input is enabled. Disabled custom inputs exist but are not used by the game.
|
1899
1899
|
*
|
1900
1900
|
* {@link https://lua-api.factorio.com/latest/LuaCustomInputPrototype.html#LuaCustomInputPrototype.enabled View documentation}
|
1901
1901
|
*/
|
1902
1902
|
readonly enabled: boolean
|
1903
1903
|
/**
|
1904
|
-
*
|
1904
|
+
* Whether this custom input is enabled while using the spectator controller.
|
1905
1905
|
*
|
1906
1906
|
* {@link https://lua-api.factorio.com/latest/LuaCustomInputPrototype.html#LuaCustomInputPrototype.enabled_while_spectating View documentation}
|
1907
1907
|
*/
|
1908
1908
|
readonly enabled_while_spectating: boolean
|
1909
1909
|
/**
|
1910
|
-
*
|
1910
|
+
* Whether this custom input is enabled while using the cutscene controller.
|
1911
1911
|
*
|
1912
1912
|
* {@link https://lua-api.factorio.com/latest/LuaCustomInputPrototype.html#LuaCustomInputPrototype.enabled_while_in_cutscene View documentation}
|
1913
1913
|
*/
|
1914
1914
|
readonly enabled_while_in_cutscene: boolean
|
1915
1915
|
/**
|
1916
|
-
*
|
1916
|
+
* Whether this custom input will include the selected prototype (if any) when triggered.
|
1917
1917
|
*
|
1918
1918
|
* {@link https://lua-api.factorio.com/latest/LuaCustomInputPrototype.html#LuaCustomInputPrototype.include_selected_prototype View documentation}
|
1919
1919
|
*/
|
@@ -1938,7 +1938,7 @@ interface LuaCustomInputPrototype {
|
|
1938
1938
|
help(): string
|
1939
1939
|
}
|
1940
1940
|
|
1941
|
-
type
|
1941
|
+
type CustomTableIndexer<K extends string | number, V>
|
1942
1942
|
/**
|
1943
1943
|
* Access an element of this custom table.
|
1944
1944
|
*
|
@@ -1999,8 +1999,13 @@ interface LuaCustomTableMembers {
|
|
1999
1999
|
* ```
|
2000
2000
|
*/
|
2001
2001
|
type LuaCustomTable<K extends string | number, V> = LuaCustomTableMembers &
|
2002
|
-
|
2003
|
-
LuaPairsIterable<
|
2002
|
+
CustomTableIndexer<K, V> &
|
2003
|
+
LuaPairsIterable<
|
2004
|
+
// this convoluted expression gives a number type if K includes a number, even if it includes a string, and K otherwise.
|
2005
|
+
// it also preserves number branding
|
2006
|
+
[number] extends [K extends number & IndexBrand<infer A> ? number : K] ? (K extends string ? never : K) : K,
|
2007
|
+
V
|
2008
|
+
>
|
2004
2009
|
|
2005
2010
|
/**
|
2006
2011
|
* Prototype of a damage.
|
@@ -2467,13 +2472,13 @@ interface LuaEntity extends LuaControl {
|
|
2467
2472
|
*/
|
2468
2473
|
clear_request_slot(slot: uint): void
|
2469
2474
|
/**
|
2470
|
-
* Returns whether a craft is currently in process. It does not indicate whether progress is currently being made, but whether
|
2475
|
+
* Returns whether a craft is currently in process. It does not indicate whether progress is currently being made, but whether a crafting process has been started in this machine.
|
2471
2476
|
*
|
2472
2477
|
* _Can only be used if this is CraftingMachine_
|
2473
2478
|
*
|
2474
2479
|
* {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.is_crafting View documentation}
|
2475
2480
|
*/
|
2476
|
-
is_crafting():
|
2481
|
+
is_crafting(): boolean
|
2477
2482
|
/**
|
2478
2483
|
* _Can only be used if this is Gate_
|
2479
2484
|
*
|
@@ -3793,7 +3798,7 @@ interface LuaEntity extends LuaControl {
|
|
3793
3798
|
*
|
3794
3799
|
* {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.unit_number View documentation}
|
3795
3800
|
*/
|
3796
|
-
readonly unit_number:
|
3801
|
+
readonly unit_number: UnitNumber | undefined
|
3797
3802
|
/**
|
3798
3803
|
* The {@link LuaEntity#unit_number unit_number} of the entity contained in this ghost. It is the same as the unit number of the {@link https://wiki.factorio.com/Prototype/EntityWithOwner EntityWithOwner} that was destroyed to create this ghost. If it was created by other means, or if the inner entity doesn not support unit numbers, this property is `nil`.
|
3799
3804
|
*
|
@@ -3801,7 +3806,7 @@ interface LuaEntity extends LuaControl {
|
|
3801
3806
|
*
|
3802
3807
|
* {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.ghost_unit_number View documentation}
|
3803
3808
|
*/
|
3804
|
-
readonly ghost_unit_number:
|
3809
|
+
readonly ghost_unit_number: UnitNumber | undefined
|
3805
3810
|
/**
|
3806
3811
|
* The mining progress for this mining drill or `nil` if this isn't a mining drill. Is a number in range [0, mining_target.prototype.mineable_properties.mining_time]
|
3807
3812
|
*
|
@@ -4454,6 +4459,14 @@ interface LuaEntity extends LuaControl {
|
|
4454
4459
|
* @remarks Can also be used on entity ghost if it contains linked-belt<br>May return entity ghost which contains linked belt to which connection is made
|
4455
4460
|
*/
|
4456
4461
|
readonly linked_belt_neighbour: LuaEntity | undefined
|
4462
|
+
/**
|
4463
|
+
* The current radar scan progress, as a number in range [0, 1].
|
4464
|
+
*
|
4465
|
+
* _Can only be used if this is Radar_
|
4466
|
+
*
|
4467
|
+
* {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.radar_scan_progress View documentation}
|
4468
|
+
*/
|
4469
|
+
readonly radar_scan_progress: float
|
4457
4470
|
/**
|
4458
4471
|
* 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.
|
4459
4472
|
*/
|
@@ -5355,7 +5368,7 @@ interface BaseEntity extends LuaControl {
|
|
5355
5368
|
*
|
5356
5369
|
* {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.unit_number View documentation}
|
5357
5370
|
*/
|
5358
|
-
readonly unit_number:
|
5371
|
+
readonly unit_number: UnitNumber | undefined
|
5359
5372
|
/**
|
5360
5373
|
* The mining progress for this mining drill or `nil` if this isn't a mining drill. Is a number in range [0, mining_target.prototype.mineable_properties.mining_time]
|
5361
5374
|
*
|
@@ -5772,7 +5785,7 @@ interface EntityGhostEntity extends BaseEntity {
|
|
5772
5785
|
*
|
5773
5786
|
* {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.ghost_unit_number View documentation}
|
5774
5787
|
*/
|
5775
|
-
readonly ghost_unit_number:
|
5788
|
+
readonly ghost_unit_number: UnitNumber | undefined
|
5776
5789
|
}
|
5777
5790
|
|
5778
5791
|
/**
|
@@ -5831,13 +5844,13 @@ interface MarketEntity extends BaseEntity {
|
|
5831
5844
|
*/
|
5832
5845
|
interface CraftingMachineEntity extends BaseEntity {
|
5833
5846
|
/**
|
5834
|
-
* Returns whether a craft is currently in process. It does not indicate whether progress is currently being made, but whether
|
5847
|
+
* Returns whether a craft is currently in process. It does not indicate whether progress is currently being made, but whether a crafting process has been started in this machine.
|
5835
5848
|
*
|
5836
5849
|
* _Can only be used if this is CraftingMachine_
|
5837
5850
|
*
|
5838
5851
|
* {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.is_crafting View documentation}
|
5839
5852
|
*/
|
5840
|
-
is_crafting():
|
5853
|
+
is_crafting(): boolean
|
5841
5854
|
/**
|
5842
5855
|
* Current recipe being assembled by this machine or `nil` if no recipe is set.
|
5843
5856
|
*
|
@@ -6999,6 +7012,17 @@ interface SmokeWithTriggerEntity extends BaseEntity {
|
|
6999
7012
|
time_to_next_effect: uint
|
7000
7013
|
}
|
7001
7014
|
|
7015
|
+
interface RadarEntity extends BaseEntity {
|
7016
|
+
/**
|
7017
|
+
* The current radar scan progress, as a number in range [0, 1].
|
7018
|
+
*
|
7019
|
+
* _Can only be used if this is Radar_
|
7020
|
+
*
|
7021
|
+
* {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.radar_scan_progress View documentation}
|
7022
|
+
*/
|
7023
|
+
readonly radar_scan_progress: float
|
7024
|
+
}
|
7025
|
+
|
7002
7026
|
/**
|
7003
7027
|
* Prototype of an entity.
|
7004
7028
|
*
|
@@ -7631,6 +7655,12 @@ interface LuaEntityPrototype {
|
|
7631
7655
|
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.void_energy_source_prototype View documentation}
|
7632
7656
|
*/
|
7633
7657
|
readonly void_energy_source_prototype: LuaVoidEnergySourcePrototype | undefined
|
7658
|
+
/**
|
7659
|
+
* The heat buffer prototype this entity uses or `nil`.
|
7660
|
+
*
|
7661
|
+
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.heat_buffer_prototype View documentation}
|
7662
|
+
*/
|
7663
|
+
readonly heat_buffer_prototype: LuaHeatBufferPrototype | undefined
|
7634
7664
|
/**
|
7635
7665
|
* The log2 of grid size of the building
|
7636
7666
|
*
|
@@ -7649,6 +7679,30 @@ interface LuaEntityPrototype {
|
|
7649
7679
|
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.maximum_temperature View documentation}
|
7650
7680
|
*/
|
7651
7681
|
readonly maximum_temperature: double | undefined
|
7682
|
+
/**
|
7683
|
+
* If this generator prototype burns fluid.
|
7684
|
+
*
|
7685
|
+
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.burns_fluid View documentation}
|
7686
|
+
*/
|
7687
|
+
readonly burns_fluid: boolean
|
7688
|
+
/**
|
7689
|
+
* If this generator prototype scales fluid usage.
|
7690
|
+
*
|
7691
|
+
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.scale_fluid_usage View documentation}
|
7692
|
+
*/
|
7693
|
+
readonly scale_fluid_usage: boolean
|
7694
|
+
/**
|
7695
|
+
* If this generator prototype destroys non fuel fluids.
|
7696
|
+
*
|
7697
|
+
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.destroy_non_fuel_fluid View documentation}
|
7698
|
+
*/
|
7699
|
+
readonly destroy_non_fuel_fluid: boolean
|
7700
|
+
/**
|
7701
|
+
* The default maximum power output of this generator prototype or `nil`.
|
7702
|
+
*
|
7703
|
+
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.max_power_output View documentation}
|
7704
|
+
*/
|
7705
|
+
readonly max_power_output: double | undefined
|
7652
7706
|
/**
|
7653
7707
|
* The target temperature of this boiler prototype or `nil`.
|
7654
7708
|
*
|
@@ -8230,6 +8284,31 @@ interface LuaEntityPrototype {
|
|
8230
8284
|
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.allow_run_time_change_of_is_military_target View documentation}
|
8231
8285
|
*/
|
8232
8286
|
readonly allow_run_time_change_of_is_military_target: boolean
|
8287
|
+
/**
|
8288
|
+
* The logistic parameters for this roboport. or `nil`.
|
8289
|
+
*
|
8290
|
+
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.logistic_parameters View documentation}
|
8291
|
+
* @remarks Both the `charging_station_shift` and `stationing_offset` vectors are tables with `x` and `y` keys instead of an array.
|
8292
|
+
*/
|
8293
|
+
readonly logistic_parameters:
|
8294
|
+
| {
|
8295
|
+
readonly spawn_and_station_height: float
|
8296
|
+
readonly spawn_and_station_shadow_height_offset: float
|
8297
|
+
readonly charge_approach_distance: float
|
8298
|
+
readonly logistic_radius: float
|
8299
|
+
readonly construction_radius: float
|
8300
|
+
readonly charging_station_count: uint
|
8301
|
+
readonly charging_distance: float
|
8302
|
+
readonly charging_station_shift: Vector
|
8303
|
+
readonly charging_energy: double
|
8304
|
+
readonly charging_threshold_distance: float
|
8305
|
+
readonly robot_vertical_acceleration: float
|
8306
|
+
readonly stationing_offset: Vector
|
8307
|
+
readonly robot_limit: uint
|
8308
|
+
readonly logistics_connection_distance: float
|
8309
|
+
readonly robots_shrink_when_entering_and_exiting: boolean
|
8310
|
+
}
|
8311
|
+
| undefined
|
8233
8312
|
/**
|
8234
8313
|
* Gets the current movement speed of this character, including effects from exoskeletons, tiles, stickers and shooting.
|
8235
8314
|
*
|
@@ -8965,6 +9044,12 @@ interface BaseEntityPrototype {
|
|
8965
9044
|
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.void_energy_source_prototype View documentation}
|
8966
9045
|
*/
|
8967
9046
|
readonly void_energy_source_prototype: LuaVoidEnergySourcePrototype | undefined
|
9047
|
+
/**
|
9048
|
+
* The heat buffer prototype this entity uses or `nil`.
|
9049
|
+
*
|
9050
|
+
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.heat_buffer_prototype View documentation}
|
9051
|
+
*/
|
9052
|
+
readonly heat_buffer_prototype: LuaHeatBufferPrototype | undefined
|
8968
9053
|
/**
|
8969
9054
|
* The log2 of grid size of the building
|
8970
9055
|
*
|
@@ -8983,6 +9068,30 @@ interface BaseEntityPrototype {
|
|
8983
9068
|
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.maximum_temperature View documentation}
|
8984
9069
|
*/
|
8985
9070
|
readonly maximum_temperature: double | undefined
|
9071
|
+
/**
|
9072
|
+
* If this generator prototype burns fluid.
|
9073
|
+
*
|
9074
|
+
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.burns_fluid View documentation}
|
9075
|
+
*/
|
9076
|
+
readonly burns_fluid: boolean
|
9077
|
+
/**
|
9078
|
+
* If this generator prototype scales fluid usage.
|
9079
|
+
*
|
9080
|
+
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.scale_fluid_usage View documentation}
|
9081
|
+
*/
|
9082
|
+
readonly scale_fluid_usage: boolean
|
9083
|
+
/**
|
9084
|
+
* If this generator prototype destroys non fuel fluids.
|
9085
|
+
*
|
9086
|
+
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.destroy_non_fuel_fluid View documentation}
|
9087
|
+
*/
|
9088
|
+
readonly destroy_non_fuel_fluid: boolean
|
9089
|
+
/**
|
9090
|
+
* The default maximum power output of this generator prototype or `nil`.
|
9091
|
+
*
|
9092
|
+
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.max_power_output View documentation}
|
9093
|
+
*/
|
9094
|
+
readonly max_power_output: double | undefined
|
8986
9095
|
/**
|
8987
9096
|
* The target temperature of this boiler prototype or `nil`.
|
8988
9097
|
*
|
@@ -9486,6 +9595,31 @@ interface BaseEntityPrototype {
|
|
9486
9595
|
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.is_entity_with_owner View documentation}
|
9487
9596
|
*/
|
9488
9597
|
readonly is_entity_with_owner: boolean
|
9598
|
+
/**
|
9599
|
+
* The logistic parameters for this roboport. or `nil`.
|
9600
|
+
*
|
9601
|
+
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.logistic_parameters View documentation}
|
9602
|
+
* @remarks Both the `charging_station_shift` and `stationing_offset` vectors are tables with `x` and `y` keys instead of an array.
|
9603
|
+
*/
|
9604
|
+
readonly logistic_parameters:
|
9605
|
+
| {
|
9606
|
+
readonly spawn_and_station_height: float
|
9607
|
+
readonly spawn_and_station_shadow_height_offset: float
|
9608
|
+
readonly charge_approach_distance: float
|
9609
|
+
readonly logistic_radius: float
|
9610
|
+
readonly construction_radius: float
|
9611
|
+
readonly charging_station_count: uint
|
9612
|
+
readonly charging_distance: float
|
9613
|
+
readonly charging_station_shift: Vector
|
9614
|
+
readonly charging_energy: double
|
9615
|
+
readonly charging_threshold_distance: float
|
9616
|
+
readonly robot_vertical_acceleration: float
|
9617
|
+
readonly stationing_offset: Vector
|
9618
|
+
readonly robot_limit: uint
|
9619
|
+
readonly logistics_connection_distance: float
|
9620
|
+
readonly robots_shrink_when_entering_and_exiting: boolean
|
9621
|
+
}
|
9622
|
+
| undefined
|
9489
9623
|
/**
|
9490
9624
|
* 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.
|
9491
9625
|
*/
|
@@ -11530,7 +11664,7 @@ interface LuaGameScript {
|
|
11530
11664
|
*/
|
11531
11665
|
regenerate_entity(entities: string | readonly string[]): void
|
11532
11666
|
/**
|
11533
|
-
* Take a screenshot and save it to
|
11667
|
+
* Take a screenshot of the game and save it to the `script-output` folder, located in the game's {@link https://wiki.factorio.com/User_data_directory user data directory}. The name of the image file can be specified via the `path` parameter.
|
11534
11668
|
*
|
11535
11669
|
* {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_screenshot View documentation}
|
11536
11670
|
* @remarks If Factorio is running headless, this function will do nothing.
|
@@ -11561,7 +11695,7 @@ interface LuaGameScript {
|
|
11561
11695
|
*/
|
11562
11696
|
readonly zoom?: double
|
11563
11697
|
/**
|
11564
|
-
* The
|
11698
|
+
* The name of the image file. It should include a file extension indicating the desired format. Supports `.png`, `.jpg` /`.jpeg`, `.tga` and `.bmp`. Providing a directory path (ex. `"save/here/screenshot.png"`) will create the necessary folder structure in `script-output`. Defaults to `"screenshot.png"`.
|
11565
11699
|
*/
|
11566
11700
|
readonly path?: string
|
11567
11701
|
/**
|
@@ -11608,7 +11742,7 @@ interface LuaGameScript {
|
|
11608
11742
|
*/
|
11609
11743
|
set_wait_for_screenshots_to_finish(): void
|
11610
11744
|
/**
|
11611
|
-
* Take a screenshot of the technology screen and save it to
|
11745
|
+
* Take a screenshot of the technology screen and save it to the `script-output` folder, located in the game's {@link https://wiki.factorio.com/User_data_directory user data directory}. The name of the image file can be specified via the `path` parameter.
|
11612
11746
|
*
|
11613
11747
|
* {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_technology_screenshot View documentation}
|
11614
11748
|
*/
|
@@ -11618,7 +11752,7 @@ interface LuaGameScript {
|
|
11618
11752
|
*/
|
11619
11753
|
readonly force?: ForceIdentification
|
11620
11754
|
/**
|
11621
|
-
* The
|
11755
|
+
* The name of the image file. It should include a file extension indicating the desired format. Supports `.png`, `.jpg` /`.jpeg`, `.tga` and `.bmp`. Providing a directory path (ex. `"save/here/screenshot.png"`) will create the necessary folder structure in `script-output`. Defaults to `"technology-screenshot.png"`.
|
11622
11756
|
*/
|
11623
11757
|
readonly path?: string
|
11624
11758
|
/**
|
@@ -11653,20 +11787,20 @@ interface LuaGameScript {
|
|
11653
11787
|
*/
|
11654
11788
|
json_to_table(json: string): AnyBasic | undefined
|
11655
11789
|
/**
|
11656
|
-
* Write a
|
11790
|
+
* Write a file to the `script-output` folder, located in the game's {@link https://wiki.factorio.com/User_data_directory user data directory}. The name and file extension of the file can be specified via the `filename` parameter.
|
11657
11791
|
*
|
11658
11792
|
* {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.write_file View documentation}
|
11659
|
-
* @param filename
|
11660
|
-
* @param data
|
11661
|
-
* @param append
|
11662
|
-
* @param for_player If given, the file will only be written for this player_index
|
11793
|
+
* @param filename The name of the file. Providing a directory path (ex. `"save/here/example.txt"`) will create the necessary folder structure in `script-output`.
|
11794
|
+
* @param data The content to write to the file.
|
11795
|
+
* @param append If `true`, `data` will be appended to the end of the file. Defaults to `false`, which will overwrite any pre-existing file with the new `data`.
|
11796
|
+
* @param for_player If given, the file will only be written for this `player_index`. Providing `0` will only write to the server's output if present.
|
11663
11797
|
*/
|
11664
11798
|
write_file(filename: string, data: LocalisedString, append?: boolean, for_player?: uint): void
|
11665
11799
|
/**
|
11666
|
-
* Remove file or directory
|
11800
|
+
* Remove a file or directory in the `script-output` folder, located in the game's {@link https://wiki.factorio.com/User_data_directory user data directory}. Can be used to remove files created by {@link LuaGameScript#write_file LuaGameScript::write_file}.
|
11667
11801
|
*
|
11668
11802
|
* {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.remove_path View documentation}
|
11669
|
-
* @param path
|
11803
|
+
* @param path The path to the file or directory to remove, relative to `script-output`.
|
11670
11804
|
*/
|
11671
11805
|
remove_path(path: string): void
|
11672
11806
|
/**
|
@@ -11954,7 +12088,7 @@ interface LuaGameScript {
|
|
11954
12088
|
* @param player The player index or name.
|
11955
12089
|
* @remarks This is a shortcut for game.players[...]
|
11956
12090
|
*/
|
11957
|
-
get_player(
|
12091
|
+
get_player(index: PlayerIndex | string): LuaPlayer | undefined
|
11958
12092
|
/**
|
11959
12093
|
* Gets the given surface or returns `nil` if no surface is found.
|
11960
12094
|
*
|
@@ -11962,7 +12096,7 @@ interface LuaGameScript {
|
|
11962
12096
|
* @param surface The surface index or name.
|
11963
12097
|
* @remarks This is a shortcut for game.surfaces[...]
|
11964
12098
|
*/
|
11965
|
-
get_surface(
|
12099
|
+
get_surface(index: SurfaceIndex | string): LuaSurface | undefined
|
11966
12100
|
/**
|
11967
12101
|
* Creates a {@link LuaProfiler}, which is used for measuring script performance.
|
11968
12102
|
*
|
@@ -12155,7 +12289,7 @@ interface LuaGameScript {
|
|
12155
12289
|
*
|
12156
12290
|
* {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.players View documentation}
|
12157
12291
|
*/
|
12158
|
-
readonly players: LuaCustomTable<
|
12292
|
+
readonly players: LuaCustomTable<PlayerIndex | string, LuaPlayer>
|
12159
12293
|
/**
|
12160
12294
|
* The currently active set of map settings. Even though this property is marked as read-only, the members of the dictionary that is returned can be modified mid-game.
|
12161
12295
|
*
|
@@ -12422,7 +12556,7 @@ interface LuaGameScript {
|
|
12422
12556
|
*
|
12423
12557
|
* {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.surfaces View documentation}
|
12424
12558
|
*/
|
12425
|
-
readonly surfaces: LuaCustomTable<
|
12559
|
+
readonly surfaces: LuaCustomTable<SurfaceIndex | string, LuaSurface>
|
12426
12560
|
/**
|
12427
12561
|
* The active mods versions. The keys are mod names, the values are the versions.
|
12428
12562
|
*
|
@@ -12966,7 +13100,7 @@ interface CameraGuiSpec extends BaseGuiSpec {
|
|
12966
13100
|
/**
|
12967
13101
|
* The surface that the camera will render. Defaults to the player's current surface.
|
12968
13102
|
*/
|
12969
|
-
readonly surface_index?:
|
13103
|
+
readonly surface_index?: SurfaceIndex
|
12970
13104
|
/**
|
12971
13105
|
* The initial camera zoom. Defaults to `0.75`.
|
12972
13106
|
*/
|
@@ -13136,7 +13270,7 @@ interface MinimapGuiSpec extends BaseGuiSpec {
|
|
13136
13270
|
/**
|
13137
13271
|
* The surface the camera will render. Defaults to the player's current surface.
|
13138
13272
|
*/
|
13139
|
-
readonly surface_index?:
|
13273
|
+
readonly surface_index?: SurfaceIndex
|
13140
13274
|
/**
|
13141
13275
|
* The player index the map should use. Defaults to the current player.
|
13142
13276
|
*/
|
@@ -13218,7 +13352,7 @@ type GuiSpec =
|
|
13218
13352
|
| TabbedPaneGuiSpec
|
13219
13353
|
| LabelGuiSpec
|
13220
13354
|
|
13221
|
-
interface
|
13355
|
+
interface GuiElementIndexer {
|
13222
13356
|
/**
|
13223
13357
|
* The indexing operator. Gets children by name.
|
13224
13358
|
*
|
@@ -13312,7 +13446,7 @@ interface BaseGuiElement {
|
|
13312
13446
|
*
|
13313
13447
|
* {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.index View documentation}
|
13314
13448
|
*/
|
13315
|
-
readonly index:
|
13449
|
+
readonly index: GuiElementIndex
|
13316
13450
|
/**
|
13317
13451
|
* The GUI this element is a child of.
|
13318
13452
|
*
|
@@ -13367,7 +13501,7 @@ interface BaseGuiElement {
|
|
13367
13501
|
*
|
13368
13502
|
* {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.player_index View documentation}
|
13369
13503
|
*/
|
13370
|
-
readonly player_index:
|
13504
|
+
readonly player_index: PlayerIndex
|
13371
13505
|
tooltip: LocalisedString
|
13372
13506
|
/**
|
13373
13507
|
* The type of this GUI element.
|
@@ -13497,7 +13631,7 @@ interface ChooseElemButtonGuiElementMembers extends BaseGuiElement {
|
|
13497
13631
|
locked: boolean
|
13498
13632
|
}
|
13499
13633
|
|
13500
|
-
type ChooseElemButtonGuiElement = ChooseElemButtonGuiElementMembers &
|
13634
|
+
type ChooseElemButtonGuiElement = ChooseElemButtonGuiElementMembers & GuiElementIndexer
|
13501
13635
|
|
13502
13636
|
/**
|
13503
13637
|
* @noSelf
|
@@ -13559,7 +13693,7 @@ interface DropDownGuiElementMembers extends BaseGuiElement {
|
|
13559
13693
|
selected_index: uint
|
13560
13694
|
}
|
13561
13695
|
|
13562
|
-
type DropDownGuiElement = DropDownGuiElementMembers &
|
13696
|
+
type DropDownGuiElement = DropDownGuiElementMembers & GuiElementIndexer
|
13563
13697
|
|
13564
13698
|
interface EmptyWidgetGuiElementMembers extends BaseGuiElement {
|
13565
13699
|
/**
|
@@ -13587,7 +13721,7 @@ interface EmptyWidgetGuiElementMembers extends BaseGuiElement {
|
|
13587
13721
|
drag_target: LuaGuiElement | undefined
|
13588
13722
|
}
|
13589
13723
|
|
13590
|
-
type EmptyWidgetGuiElement = EmptyWidgetGuiElementMembers &
|
13724
|
+
type EmptyWidgetGuiElement = EmptyWidgetGuiElementMembers & GuiElementIndexer
|
13591
13725
|
|
13592
13726
|
interface EntityPreviewGuiElementMembers extends BaseGuiElement {
|
13593
13727
|
/**
|
@@ -13604,7 +13738,7 @@ interface EntityPreviewGuiElementMembers extends BaseGuiElement {
|
|
13604
13738
|
entity: LuaEntity | undefined
|
13605
13739
|
}
|
13606
13740
|
|
13607
|
-
type EntityPreviewGuiElement = EntityPreviewGuiElementMembers &
|
13741
|
+
type EntityPreviewGuiElement = EntityPreviewGuiElementMembers & GuiElementIndexer
|
13608
13742
|
|
13609
13743
|
/**
|
13610
13744
|
* @noSelf
|
@@ -13676,7 +13810,7 @@ interface ListBoxGuiElementMembers extends BaseGuiElement {
|
|
13676
13810
|
selected_index: uint
|
13677
13811
|
}
|
13678
13812
|
|
13679
|
-
type ListBoxGuiElement = ListBoxGuiElementMembers &
|
13813
|
+
type ListBoxGuiElement = ListBoxGuiElementMembers & GuiElementIndexer
|
13680
13814
|
|
13681
13815
|
/**
|
13682
13816
|
* @noSelf
|
@@ -13748,7 +13882,7 @@ interface ScrollPaneGuiElementMembers extends BaseGuiElement {
|
|
13748
13882
|
vertical_scroll_policy: "auto" | "never" | "always" | "auto-and-reserve-space" | "dont-show-but-allow-scrolling"
|
13749
13883
|
}
|
13750
13884
|
|
13751
|
-
type ScrollPaneGuiElement = ScrollPaneGuiElementMembers &
|
13885
|
+
type ScrollPaneGuiElement = ScrollPaneGuiElementMembers & GuiElementIndexer
|
13752
13886
|
|
13753
13887
|
interface SpriteButtonGuiElementMembers extends BaseGuiElement {
|
13754
13888
|
/**
|
@@ -13798,7 +13932,7 @@ interface SpriteButtonGuiElementMembers extends BaseGuiElement {
|
|
13798
13932
|
set mouse_button_filter(value: MouseButtonFlags)
|
13799
13933
|
}
|
13800
13934
|
|
13801
|
-
type SpriteButtonGuiElement = SpriteButtonGuiElementMembers &
|
13935
|
+
type SpriteButtonGuiElement = SpriteButtonGuiElementMembers & GuiElementIndexer
|
13802
13936
|
|
13803
13937
|
/**
|
13804
13938
|
* @noSelf
|
@@ -13846,7 +13980,7 @@ interface TabbedPaneGuiElementMembers extends BaseGuiElement {
|
|
13846
13980
|
readonly tabs: TabAndContent[]
|
13847
13981
|
}
|
13848
13982
|
|
13849
|
-
type TabbedPaneGuiElement = TabbedPaneGuiElementMembers &
|
13983
|
+
type TabbedPaneGuiElement = TabbedPaneGuiElementMembers & GuiElementIndexer
|
13850
13984
|
|
13851
13985
|
/**
|
13852
13986
|
* @noSelf
|
@@ -13960,7 +14094,7 @@ interface TextBoxGuiElementMembers extends BaseGuiElement {
|
|
13960
14094
|
clear_and_focus_on_right_click: boolean
|
13961
14095
|
}
|
13962
14096
|
|
13963
|
-
type TextBoxGuiElement = TextBoxGuiElementMembers &
|
14097
|
+
type TextBoxGuiElement = TextBoxGuiElementMembers & GuiElementIndexer
|
13964
14098
|
|
13965
14099
|
interface ButtonGuiElementMembers extends BaseGuiElement {
|
13966
14100
|
/**
|
@@ -13978,7 +14112,7 @@ interface ButtonGuiElementMembers extends BaseGuiElement {
|
|
13978
14112
|
set mouse_button_filter(value: MouseButtonFlags)
|
13979
14113
|
}
|
13980
14114
|
|
13981
|
-
type ButtonGuiElement = ButtonGuiElementMembers &
|
14115
|
+
type ButtonGuiElement = ButtonGuiElementMembers & GuiElementIndexer
|
13982
14116
|
|
13983
14117
|
interface CameraGuiElementMembers extends BaseGuiElement {
|
13984
14118
|
/**
|
@@ -13999,9 +14133,9 @@ interface CameraGuiElementMembers extends BaseGuiElement {
|
|
13999
14133
|
*
|
14000
14134
|
* {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.surface_index View documentation}
|
14001
14135
|
*/
|
14002
|
-
surface_index:
|
14136
|
+
surface_index: SurfaceIndex
|
14003
14137
|
/**
|
14004
|
-
* The zoom this camera or minimap is using.
|
14138
|
+
* The zoom this camera or minimap is using. This value must be positive.
|
14005
14139
|
*
|
14006
14140
|
* {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.zoom View documentation}
|
14007
14141
|
*/
|
@@ -14014,7 +14148,7 @@ interface CameraGuiElementMembers extends BaseGuiElement {
|
|
14014
14148
|
entity: LuaEntity | undefined
|
14015
14149
|
}
|
14016
14150
|
|
14017
|
-
type CameraGuiElement = CameraGuiElementMembers &
|
14151
|
+
type CameraGuiElement = CameraGuiElementMembers & GuiElementIndexer
|
14018
14152
|
|
14019
14153
|
interface CheckboxGuiElementMembers extends BaseGuiElement {
|
14020
14154
|
/**
|
@@ -14033,7 +14167,7 @@ interface CheckboxGuiElementMembers extends BaseGuiElement {
|
|
14033
14167
|
state: boolean
|
14034
14168
|
}
|
14035
14169
|
|
14036
|
-
type CheckboxGuiElement = CheckboxGuiElementMembers &
|
14170
|
+
type CheckboxGuiElement = CheckboxGuiElementMembers & GuiElementIndexer
|
14037
14171
|
|
14038
14172
|
interface FlowGuiElementMembers extends BaseGuiElement {
|
14039
14173
|
/**
|
@@ -14069,7 +14203,7 @@ interface FlowGuiElementMembers extends BaseGuiElement {
|
|
14069
14203
|
drag_target: LuaGuiElement | undefined
|
14070
14204
|
}
|
14071
14205
|
|
14072
|
-
type FlowGuiElement = FlowGuiElementMembers &
|
14206
|
+
type FlowGuiElement = FlowGuiElementMembers & GuiElementIndexer
|
14073
14207
|
|
14074
14208
|
/**
|
14075
14209
|
* @noSelf
|
@@ -14127,7 +14261,7 @@ interface FrameGuiElementMembers extends BaseGuiElement {
|
|
14127
14261
|
drag_target: LuaGuiElement | undefined
|
14128
14262
|
}
|
14129
14263
|
|
14130
|
-
type FrameGuiElement = FrameGuiElementMembers &
|
14264
|
+
type FrameGuiElement = FrameGuiElementMembers & GuiElementIndexer
|
14131
14265
|
|
14132
14266
|
interface LabelGuiElementMembers extends BaseGuiElement {
|
14133
14267
|
/**
|
@@ -14155,7 +14289,7 @@ interface LabelGuiElementMembers extends BaseGuiElement {
|
|
14155
14289
|
drag_target: LuaGuiElement | undefined
|
14156
14290
|
}
|
14157
14291
|
|
14158
|
-
type LabelGuiElement = LabelGuiElementMembers &
|
14292
|
+
type LabelGuiElement = LabelGuiElementMembers & GuiElementIndexer
|
14159
14293
|
|
14160
14294
|
interface LineGuiElementMembers extends BaseGuiElement {
|
14161
14295
|
/**
|
@@ -14174,7 +14308,7 @@ interface LineGuiElementMembers extends BaseGuiElement {
|
|
14174
14308
|
readonly direction: "horizontal" | "vertical"
|
14175
14309
|
}
|
14176
14310
|
|
14177
|
-
type LineGuiElement = LineGuiElementMembers &
|
14311
|
+
type LineGuiElement = LineGuiElementMembers & GuiElementIndexer
|
14178
14312
|
|
14179
14313
|
interface MinimapGuiElementMembers extends BaseGuiElement {
|
14180
14314
|
/**
|
@@ -14195,9 +14329,9 @@ interface MinimapGuiElementMembers extends BaseGuiElement {
|
|
14195
14329
|
*
|
14196
14330
|
* {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.surface_index View documentation}
|
14197
14331
|
*/
|
14198
|
-
surface_index:
|
14332
|
+
surface_index: SurfaceIndex
|
14199
14333
|
/**
|
14200
|
-
* The zoom this camera or minimap is using.
|
14334
|
+
* The zoom this camera or minimap is using. This value must be positive.
|
14201
14335
|
*
|
14202
14336
|
* {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.zoom View documentation}
|
14203
14337
|
*/
|
@@ -14224,7 +14358,7 @@ interface MinimapGuiElementMembers extends BaseGuiElement {
|
|
14224
14358
|
entity: LuaEntity | undefined
|
14225
14359
|
}
|
14226
14360
|
|
14227
|
-
type MinimapGuiElement = MinimapGuiElementMembers &
|
14361
|
+
type MinimapGuiElement = MinimapGuiElementMembers & GuiElementIndexer
|
14228
14362
|
|
14229
14363
|
interface ProgressBarGuiElementMembers extends BaseGuiElement {
|
14230
14364
|
/**
|
@@ -14243,7 +14377,7 @@ interface ProgressBarGuiElementMembers extends BaseGuiElement {
|
|
14243
14377
|
value: double
|
14244
14378
|
}
|
14245
14379
|
|
14246
|
-
type ProgressBarGuiElement = ProgressBarGuiElementMembers &
|
14380
|
+
type ProgressBarGuiElement = ProgressBarGuiElementMembers & GuiElementIndexer
|
14247
14381
|
|
14248
14382
|
interface RadioButtonGuiElementMembers extends BaseGuiElement {
|
14249
14383
|
/**
|
@@ -14262,7 +14396,7 @@ interface RadioButtonGuiElementMembers extends BaseGuiElement {
|
|
14262
14396
|
state: boolean
|
14263
14397
|
}
|
14264
14398
|
|
14265
|
-
type RadioButtonGuiElement = RadioButtonGuiElementMembers &
|
14399
|
+
type RadioButtonGuiElement = RadioButtonGuiElementMembers & GuiElementIndexer
|
14266
14400
|
|
14267
14401
|
/**
|
14268
14402
|
* @noSelf
|
@@ -14340,7 +14474,7 @@ interface SliderGuiElementMembers extends BaseGuiElement {
|
|
14340
14474
|
slider_value: double
|
14341
14475
|
}
|
14342
14476
|
|
14343
|
-
type SliderGuiElement = SliderGuiElementMembers &
|
14477
|
+
type SliderGuiElement = SliderGuiElementMembers & GuiElementIndexer
|
14344
14478
|
|
14345
14479
|
interface SpriteGuiElementMembers extends BaseGuiElement {
|
14346
14480
|
/**
|
@@ -14363,7 +14497,7 @@ interface SpriteGuiElementMembers extends BaseGuiElement {
|
|
14363
14497
|
resize_to_sprite: boolean
|
14364
14498
|
}
|
14365
14499
|
|
14366
|
-
type SpriteGuiElement = SpriteGuiElementMembers &
|
14500
|
+
type SpriteGuiElement = SpriteGuiElementMembers & GuiElementIndexer
|
14367
14501
|
|
14368
14502
|
interface SwitchGuiElementMembers extends BaseGuiElement {
|
14369
14503
|
/**
|
@@ -14424,7 +14558,7 @@ interface SwitchGuiElementMembers extends BaseGuiElement {
|
|
14424
14558
|
right_label_tooltip: LocalisedString
|
14425
14559
|
}
|
14426
14560
|
|
14427
|
-
type SwitchGuiElement = SwitchGuiElementMembers &
|
14561
|
+
type SwitchGuiElement = SwitchGuiElementMembers & GuiElementIndexer
|
14428
14562
|
|
14429
14563
|
interface TabGuiElementMembers extends BaseGuiElement {
|
14430
14564
|
/**
|
@@ -14443,7 +14577,7 @@ interface TabGuiElementMembers extends BaseGuiElement {
|
|
14443
14577
|
badge_text: LocalisedString
|
14444
14578
|
}
|
14445
14579
|
|
14446
|
-
type TabGuiElement = TabGuiElementMembers &
|
14580
|
+
type TabGuiElement = TabGuiElementMembers & GuiElementIndexer
|
14447
14581
|
|
14448
14582
|
interface TableGuiElementMembers extends BaseGuiElement {
|
14449
14583
|
/**
|
@@ -14511,7 +14645,7 @@ interface TableGuiElementMembers extends BaseGuiElement {
|
|
14511
14645
|
drag_target: LuaGuiElement | undefined
|
14512
14646
|
}
|
14513
14647
|
|
14514
|
-
type TableGuiElement = TableGuiElementMembers &
|
14648
|
+
type TableGuiElement = TableGuiElementMembers & GuiElementIndexer
|
14515
14649
|
|
14516
14650
|
/**
|
14517
14651
|
* @noSelf
|
@@ -14609,7 +14743,7 @@ interface TextFieldGuiElementMembers extends BaseGuiElement {
|
|
14609
14743
|
clear_and_focus_on_right_click: boolean
|
14610
14744
|
}
|
14611
14745
|
|
14612
|
-
type TextFieldGuiElement = TextFieldGuiElementMembers &
|
14746
|
+
type TextFieldGuiElement = TextFieldGuiElementMembers & GuiElementIndexer
|
14613
14747
|
|
14614
14748
|
type GuiElementMembers =
|
14615
14749
|
| ChooseElemButtonGuiElementMembers
|
@@ -14691,7 +14825,36 @@ type GuiElementMembers =
|
|
14691
14825
|
* tabbed_pane.add_tab(tab2, label2)
|
14692
14826
|
* ```
|
14693
14827
|
*/
|
14694
|
-
type LuaGuiElement = GuiElementMembers &
|
14828
|
+
type LuaGuiElement = GuiElementMembers & GuiElementIndexer
|
14829
|
+
|
14830
|
+
/**
|
14831
|
+
* Prototype of a heat buffer.
|
14832
|
+
*
|
14833
|
+
* {@link https://lua-api.factorio.com/latest/LuaHeatBufferPrototype.html View documentation}
|
14834
|
+
* @noSelf
|
14835
|
+
*/
|
14836
|
+
interface LuaHeatBufferPrototype {
|
14837
|
+
readonly max_temperature: double
|
14838
|
+
readonly default_temperature: double
|
14839
|
+
readonly specific_heat: double
|
14840
|
+
readonly max_transfer: double
|
14841
|
+
readonly min_temperature_gradient: double
|
14842
|
+
readonly min_working_temperature: double
|
14843
|
+
readonly minimum_glow_temperature: double
|
14844
|
+
readonly connections: HeatConnection[]
|
14845
|
+
/**
|
14846
|
+
* 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.
|
14847
|
+
*/
|
14848
|
+
readonly valid: boolean
|
14849
|
+
/**
|
14850
|
+
* 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.
|
14851
|
+
*/
|
14852
|
+
readonly object_name: "LuaHeatBufferPrototype"
|
14853
|
+
/**
|
14854
|
+
* All methods and properties that this object supports.
|
14855
|
+
*/
|
14856
|
+
help(): string
|
14857
|
+
}
|
14695
14858
|
|
14696
14859
|
/**
|
14697
14860
|
* Prototype of a heat energy source.
|
@@ -14711,6 +14874,7 @@ interface LuaHeatEnergySourcePrototype {
|
|
14711
14874
|
readonly min_working_temperature: double
|
14712
14875
|
readonly minimum_glow_temperature: double
|
14713
14876
|
readonly connections: HeatConnection[]
|
14877
|
+
readonly heat_buffer_prototype: LuaHeatBufferPrototype
|
14714
14878
|
/**
|
14715
14879
|
* 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.
|
14716
14880
|
*/
|
@@ -15376,6 +15540,14 @@ interface LuaItemPrototype {
|
|
15376
15540
|
* {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_selection_border_color View documentation}
|
15377
15541
|
*/
|
15378
15542
|
readonly alt_selection_border_color: ColorTable
|
15543
|
+
/**
|
15544
|
+
* The color used when doing reverse selection with this selection tool prototype.
|
15545
|
+
*
|
15546
|
+
* _Can only be used if this is SelectionTool_
|
15547
|
+
*
|
15548
|
+
* {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_selection_border_color View documentation}
|
15549
|
+
*/
|
15550
|
+
readonly reverse_selection_border_color: ColorTable
|
15379
15551
|
/**
|
15380
15552
|
* Flags that affect which entities will be selected.
|
15381
15553
|
*
|
@@ -15392,6 +15564,14 @@ interface LuaItemPrototype {
|
|
15392
15564
|
* {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_selection_mode_flags View documentation}
|
15393
15565
|
*/
|
15394
15566
|
readonly alt_selection_mode_flags: SelectionModeFlags
|
15567
|
+
/**
|
15568
|
+
* Flags that affect which entities will be selected during reverse selection.
|
15569
|
+
*
|
15570
|
+
* _Can only be used if this is SelectionTool_
|
15571
|
+
*
|
15572
|
+
* {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_selection_mode_flags View documentation}
|
15573
|
+
*/
|
15574
|
+
readonly reverse_selection_mode_flags: SelectionModeFlags
|
15395
15575
|
/**
|
15396
15576
|
* _Can only be used if this is SelectionTool_
|
15397
15577
|
*
|
@@ -15404,6 +15584,12 @@ interface LuaItemPrototype {
|
|
15404
15584
|
* {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_selection_cursor_box_type View documentation}
|
15405
15585
|
*/
|
15406
15586
|
readonly alt_selection_cursor_box_type: string
|
15587
|
+
/**
|
15588
|
+
* _Can only be used if this is SelectionTool_
|
15589
|
+
*
|
15590
|
+
* {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_selection_cursor_box_type View documentation}
|
15591
|
+
*/
|
15592
|
+
readonly reverse_selection_cursor_box_type: string
|
15407
15593
|
/**
|
15408
15594
|
* If tiles area always included when doing selection with this selection tool prototype.
|
15409
15595
|
*
|
@@ -15428,6 +15614,14 @@ interface LuaItemPrototype {
|
|
15428
15614
|
* {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_entity_filter_mode View documentation}
|
15429
15615
|
*/
|
15430
15616
|
readonly alt_entity_filter_mode: string
|
15617
|
+
/**
|
15618
|
+
* The reverse entity filter mode used by this selection tool.
|
15619
|
+
*
|
15620
|
+
* _Can only be used if this is SelectionTool_
|
15621
|
+
*
|
15622
|
+
* {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_alt_entity_filter_mode View documentation}
|
15623
|
+
*/
|
15624
|
+
readonly reverse_alt_entity_filter_mode: string
|
15431
15625
|
/**
|
15432
15626
|
* The tile filter mode used by this selection tool.
|
15433
15627
|
*
|
@@ -15444,6 +15638,14 @@ interface LuaItemPrototype {
|
|
15444
15638
|
* {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_tile_filter_mode View documentation}
|
15445
15639
|
*/
|
15446
15640
|
readonly alt_tile_filter_mode: string
|
15641
|
+
/**
|
15642
|
+
* The reverse tile filter mode used by this selection tool.
|
15643
|
+
*
|
15644
|
+
* _Can only be used if this is SelectionTool_
|
15645
|
+
*
|
15646
|
+
* {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_tile_filter_mode View documentation}
|
15647
|
+
*/
|
15648
|
+
readonly reverse_tile_filter_mode: string
|
15447
15649
|
/**
|
15448
15650
|
* The entity filters used by this selection tool indexed by entity name.
|
15449
15651
|
*
|
@@ -15460,6 +15662,14 @@ interface LuaItemPrototype {
|
|
15460
15662
|
* {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_entity_filters View documentation}
|
15461
15663
|
*/
|
15462
15664
|
readonly alt_entity_filters: Record<string, LuaEntityPrototype>
|
15665
|
+
/**
|
15666
|
+
* The reverse entity filters used by this selection tool indexed by entity name.
|
15667
|
+
*
|
15668
|
+
* _Can only be used if this is SelectionTool_
|
15669
|
+
*
|
15670
|
+
* {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_entity_filters View documentation}
|
15671
|
+
*/
|
15672
|
+
readonly reverse_entity_filters: Record<string, LuaEntityPrototype>
|
15463
15673
|
/**
|
15464
15674
|
* The entity type filters used by this selection tool indexed by entity type.
|
15465
15675
|
*
|
@@ -15478,6 +15688,15 @@ interface LuaItemPrototype {
|
|
15478
15688
|
* @remarks The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
|
15479
15689
|
*/
|
15480
15690
|
readonly alt_entity_type_filters: Record<string, boolean>
|
15691
|
+
/**
|
15692
|
+
* The reverse entity type filters used by this selection tool indexed by entity type.
|
15693
|
+
*
|
15694
|
+
* _Can only be used if this is SelectionTool_
|
15695
|
+
*
|
15696
|
+
* {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_entity_type_filters View documentation}
|
15697
|
+
* @remarks The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
|
15698
|
+
*/
|
15699
|
+
readonly reverse_entity_type_filters: Record<string, boolean>
|
15481
15700
|
/**
|
15482
15701
|
* The tile filters used by this selection tool indexed by tile name.
|
15483
15702
|
*
|
@@ -15494,6 +15713,14 @@ interface LuaItemPrototype {
|
|
15494
15713
|
* {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_tile_filters View documentation}
|
15495
15714
|
*/
|
15496
15715
|
readonly alt_tile_filters: Record<string, LuaTilePrototype>
|
15716
|
+
/**
|
15717
|
+
* The reverse tile filters used by this selection tool indexed by tile name.
|
15718
|
+
*
|
15719
|
+
* _Can only be used if this is SelectionTool_
|
15720
|
+
*
|
15721
|
+
* {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_tile_filters View documentation}
|
15722
|
+
*/
|
15723
|
+
readonly reverse_tile_filters: Record<string, LuaTilePrototype>
|
15497
15724
|
/**
|
15498
15725
|
* The number of entity filters this deconstruction item has or `nil` if this isn't a deconstruction item prototype.
|
15499
15726
|
*
|
@@ -15939,6 +16166,14 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
|
|
15939
16166
|
* {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_selection_border_color View documentation}
|
15940
16167
|
*/
|
15941
16168
|
readonly alt_selection_border_color: ColorTable
|
16169
|
+
/**
|
16170
|
+
* The color used when doing reverse selection with this selection tool prototype.
|
16171
|
+
*
|
16172
|
+
* _Can only be used if this is SelectionTool_
|
16173
|
+
*
|
16174
|
+
* {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_selection_border_color View documentation}
|
16175
|
+
*/
|
16176
|
+
readonly reverse_selection_border_color: ColorTable
|
15942
16177
|
/**
|
15943
16178
|
* Flags that affect which entities will be selected.
|
15944
16179
|
*
|
@@ -15955,6 +16190,14 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
|
|
15955
16190
|
* {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_selection_mode_flags View documentation}
|
15956
16191
|
*/
|
15957
16192
|
readonly alt_selection_mode_flags: SelectionModeFlags
|
16193
|
+
/**
|
16194
|
+
* Flags that affect which entities will be selected during reverse selection.
|
16195
|
+
*
|
16196
|
+
* _Can only be used if this is SelectionTool_
|
16197
|
+
*
|
16198
|
+
* {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_selection_mode_flags View documentation}
|
16199
|
+
*/
|
16200
|
+
readonly reverse_selection_mode_flags: SelectionModeFlags
|
15958
16201
|
/**
|
15959
16202
|
* _Can only be used if this is SelectionTool_
|
15960
16203
|
*
|
@@ -15967,6 +16210,12 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
|
|
15967
16210
|
* {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_selection_cursor_box_type View documentation}
|
15968
16211
|
*/
|
15969
16212
|
readonly alt_selection_cursor_box_type: string
|
16213
|
+
/**
|
16214
|
+
* _Can only be used if this is SelectionTool_
|
16215
|
+
*
|
16216
|
+
* {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_selection_cursor_box_type View documentation}
|
16217
|
+
*/
|
16218
|
+
readonly reverse_selection_cursor_box_type: string
|
15970
16219
|
/**
|
15971
16220
|
* If tiles area always included when doing selection with this selection tool prototype.
|
15972
16221
|
*
|
@@ -15991,6 +16240,14 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
|
|
15991
16240
|
* {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_entity_filter_mode View documentation}
|
15992
16241
|
*/
|
15993
16242
|
readonly alt_entity_filter_mode: string
|
16243
|
+
/**
|
16244
|
+
* The reverse entity filter mode used by this selection tool.
|
16245
|
+
*
|
16246
|
+
* _Can only be used if this is SelectionTool_
|
16247
|
+
*
|
16248
|
+
* {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_alt_entity_filter_mode View documentation}
|
16249
|
+
*/
|
16250
|
+
readonly reverse_alt_entity_filter_mode: string
|
15994
16251
|
/**
|
15995
16252
|
* The tile filter mode used by this selection tool.
|
15996
16253
|
*
|
@@ -16007,6 +16264,14 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
|
|
16007
16264
|
* {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_tile_filter_mode View documentation}
|
16008
16265
|
*/
|
16009
16266
|
readonly alt_tile_filter_mode: string
|
16267
|
+
/**
|
16268
|
+
* The reverse tile filter mode used by this selection tool.
|
16269
|
+
*
|
16270
|
+
* _Can only be used if this is SelectionTool_
|
16271
|
+
*
|
16272
|
+
* {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_tile_filter_mode View documentation}
|
16273
|
+
*/
|
16274
|
+
readonly reverse_tile_filter_mode: string
|
16010
16275
|
/**
|
16011
16276
|
* The entity filters used by this selection tool indexed by entity name.
|
16012
16277
|
*
|
@@ -16023,6 +16288,14 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
|
|
16023
16288
|
* {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_entity_filters View documentation}
|
16024
16289
|
*/
|
16025
16290
|
readonly alt_entity_filters: Record<string, LuaEntityPrototype>
|
16291
|
+
/**
|
16292
|
+
* The reverse entity filters used by this selection tool indexed by entity name.
|
16293
|
+
*
|
16294
|
+
* _Can only be used if this is SelectionTool_
|
16295
|
+
*
|
16296
|
+
* {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_entity_filters View documentation}
|
16297
|
+
*/
|
16298
|
+
readonly reverse_entity_filters: Record<string, LuaEntityPrototype>
|
16026
16299
|
/**
|
16027
16300
|
* The entity type filters used by this selection tool indexed by entity type.
|
16028
16301
|
*
|
@@ -16041,6 +16314,15 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
|
|
16041
16314
|
* @remarks The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
|
16042
16315
|
*/
|
16043
16316
|
readonly alt_entity_type_filters: Record<string, boolean>
|
16317
|
+
/**
|
16318
|
+
* The reverse entity type filters used by this selection tool indexed by entity type.
|
16319
|
+
*
|
16320
|
+
* _Can only be used if this is SelectionTool_
|
16321
|
+
*
|
16322
|
+
* {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_entity_type_filters View documentation}
|
16323
|
+
* @remarks The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
|
16324
|
+
*/
|
16325
|
+
readonly reverse_entity_type_filters: Record<string, boolean>
|
16044
16326
|
/**
|
16045
16327
|
* The tile filters used by this selection tool indexed by tile name.
|
16046
16328
|
*
|
@@ -16057,6 +16339,14 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
|
|
16057
16339
|
* {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_tile_filters View documentation}
|
16058
16340
|
*/
|
16059
16341
|
readonly alt_tile_filters: Record<string, LuaTilePrototype>
|
16342
|
+
/**
|
16343
|
+
* The reverse tile filters used by this selection tool indexed by tile name.
|
16344
|
+
*
|
16345
|
+
* _Can only be used if this is SelectionTool_
|
16346
|
+
*
|
16347
|
+
* {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_tile_filters View documentation}
|
16348
|
+
*/
|
16349
|
+
readonly reverse_tile_filters: Record<string, LuaTilePrototype>
|
16060
16350
|
}
|
16061
16351
|
|
16062
16352
|
interface DeconstructionItemPrototype extends BaseItemPrototype {
|
@@ -19309,7 +19599,7 @@ interface LuaPlayer extends LuaControl {
|
|
19309
19599
|
*
|
19310
19600
|
* {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.index View documentation}
|
19311
19601
|
*/
|
19312
|
-
readonly index:
|
19602
|
+
readonly index: PlayerIndex
|
19313
19603
|
readonly gui: LuaGui
|
19314
19604
|
/**
|
19315
19605
|
* `true` if the player opened itself. I.e. if they opened the character or god-controller GUI.
|
@@ -22804,7 +23094,7 @@ interface ProgrammableSpeakerSurfaceCreateEntity extends BaseSurfaceCreateEntity
|
|
22804
23094
|
|
22805
23095
|
interface CharacterCorpseSurfaceCreateEntity extends BaseSurfaceCreateEntity {
|
22806
23096
|
readonly inventory_size?: uint
|
22807
|
-
readonly player_index?:
|
23097
|
+
readonly player_index?: PlayerIndex
|
22808
23098
|
}
|
22809
23099
|
|
22810
23100
|
interface HighlightBoxSurfaceCreateEntity extends BaseSurfaceCreateEntity {
|
@@ -23855,7 +24145,7 @@ interface LuaSurface {
|
|
23855
24145
|
*/
|
23856
24146
|
clear(ignore_characters?: boolean): void
|
23857
24147
|
/**
|
23858
|
-
* Generates a path with the specified constraints (as an array of {@link PathfinderWaypoint PathfinderWaypoints}) using the unit pathfinding algorithm. This path can be used to emulate pathing behavior by script for non-unit entities. If you want to command actual units to move, use
|
24148
|
+
* Generates a path with the specified constraints (as an array of {@link PathfinderWaypoint PathfinderWaypoints}) using the unit pathfinding algorithm. This path can be used to emulate pathing behavior by script for non-unit entities, such as vehicles. If you want to command actual units (such as biters or spitters) to move, use {@link LuaEntity#set_command LuaEntity::set_command} instead.
|
23859
24149
|
*
|
23860
24150
|
* The resulting path is ultimately returned asynchronously via {@link OnScriptPathRequestFinishedEvent on_script_path_request_finished}.
|
23861
24151
|
*
|
@@ -24071,7 +24361,7 @@ interface LuaSurface {
|
|
24071
24361
|
*
|
24072
24362
|
* {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.index View documentation}
|
24073
24363
|
*/
|
24074
|
-
readonly index:
|
24364
|
+
readonly index: SurfaceIndex
|
24075
24365
|
/**
|
24076
24366
|
* The generation settings for this surface. These can be modified to after surface generation, but note that this will not retroactively update the surface. To manually adjust it, {@link LuaSurface#regenerate_entity LuaSurface::regenerate_entity}, {@link LuaSurface#regenerate_decorative LuaSurface::regenerate_decorative} and {@link LuaSurface#delete_chunk LuaSurface::delete_chunk} can be used.
|
24077
24367
|
*
|