factorio-types 0.0.27 → 0.0.29
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 +246 -75
- package/dist/concepts.d.ts +79 -26
- package/dist/defines.d.ts +1 -1
- package/dist/events.d.ts +6 -3
- package/dist/global.d.ts +2 -2
- package/package.json +1 -1
package/dist/classes.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Factorio API reference https://lua-api.factorio.com/latest/index.html
|
|
3
3
|
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version 1.1.
|
|
5
|
+
// Factorio version 1.1.70
|
|
6
6
|
// API version 3
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -634,6 +634,9 @@ interface LuaBurnerPrototype {
|
|
|
634
634
|
|
|
635
635
|
readonly effectivity: number
|
|
636
636
|
|
|
637
|
+
/**
|
|
638
|
+
* The emissions of this energy source in `pollution/Joule`. Multiplying it by energy consumption in `Watt` gives `pollution/second`.
|
|
639
|
+
*/
|
|
637
640
|
readonly emissions: number
|
|
638
641
|
|
|
639
642
|
/**
|
|
@@ -1032,14 +1035,14 @@ interface LuaControl {
|
|
|
1032
1035
|
get_main_inventory(this: void): void
|
|
1033
1036
|
|
|
1034
1037
|
/**
|
|
1035
|
-
* Gets the parameters of a personal logistic request and auto-trash slot.
|
|
1038
|
+
* Gets the parameters of a personal logistic request and auto-trash slot.
|
|
1036
1039
|
* @param slot_index - The slot to get.
|
|
1037
1040
|
*/
|
|
1038
1041
|
get_personal_logistic_slot(this: void,
|
|
1039
1042
|
slot_index: number): void
|
|
1040
1043
|
|
|
1041
1044
|
/**
|
|
1042
|
-
* Gets the parameters of a vehicle logistic request and auto-trash slot.
|
|
1045
|
+
* Gets the parameters of a vehicle logistic request and auto-trash slot. Only used on `spider-vehicle`.
|
|
1043
1046
|
* @param slot_index - The slot to get.
|
|
1044
1047
|
*/
|
|
1045
1048
|
get_vehicle_logistic_slot(this: void,
|
|
@@ -1376,10 +1379,10 @@ interface LuaControl {
|
|
|
1376
1379
|
*
|
|
1377
1380
|
* This is the GUI that will asked to close (by firing the {@link on_gui_closed | on_gui_closed} event) when the `Esc` or `E` keys are pressed. If this attribute is not `nil`, and a new GUI is written to it, the existing one will be asked to close.
|
|
1378
1381
|
* @remarks
|
|
1379
|
-
* Write supports any of the types. Read will return the `entity`, `equipment`, `equipment-grid`, `player`, `element`, `inventory` or `nil`.
|
|
1382
|
+
* Write supports any of the types. Read will return the `entity`, `equipment`, `equipment-grid`, `player`, `element`, `inventory`, `technology`, or `nil`.
|
|
1380
1383
|
*
|
|
1381
1384
|
*/
|
|
1382
|
-
opened?: LuaEntity | LuaItemStack | LuaEquipment | LuaEquipmentGrid | LuaPlayer | LuaGuiElement | LuaInventory | defines.gui_type
|
|
1385
|
+
opened?: LuaEntity | LuaItemStack | LuaEquipment | LuaEquipmentGrid | LuaPlayer | LuaGuiElement | LuaInventory | LuaTechnology | defines.gui_type
|
|
1383
1386
|
|
|
1384
1387
|
readonly opened_gui_type?: defines.gui_type
|
|
1385
1388
|
|
|
@@ -1420,7 +1423,7 @@ interface LuaControl {
|
|
|
1420
1423
|
readonly resource_reach_distance: number
|
|
1421
1424
|
|
|
1422
1425
|
/**
|
|
1423
|
-
* Current riding state of this car or the
|
|
1426
|
+
* Current riding state of this car, or of the car this player is riding in.
|
|
1424
1427
|
*/
|
|
1425
1428
|
riding_state: RidingState
|
|
1426
1429
|
|
|
@@ -1848,6 +1851,9 @@ interface LuaElectricEnergySourcePrototype {
|
|
|
1848
1851
|
|
|
1849
1852
|
readonly drain: number
|
|
1850
1853
|
|
|
1854
|
+
/**
|
|
1855
|
+
* The emissions of this energy source in `pollution/Joule`. Multiplying it by energy consumption in `Watt` gives `pollution/second`.
|
|
1856
|
+
*/
|
|
1851
1857
|
readonly emissions: number
|
|
1852
1858
|
|
|
1853
1859
|
readonly input_flow_limit: number
|
|
@@ -2241,7 +2247,7 @@ interface LuaEntity extends LuaControl {
|
|
|
2241
2247
|
get_inbound_signals(this: void): void
|
|
2242
2248
|
|
|
2243
2249
|
/**
|
|
2244
|
-
* Gets the filter for this infinity container at the given index or `nil` if the filter index doesn't exist or is empty.
|
|
2250
|
+
* Gets the filter for this infinity container at the given index, or `nil` if the filter index doesn't exist or is empty.
|
|
2245
2251
|
* @remarks
|
|
2246
2252
|
* Applies to subclasses: InfinityContainer
|
|
2247
2253
|
*
|
|
@@ -2251,7 +2257,7 @@ interface LuaEntity extends LuaControl {
|
|
|
2251
2257
|
index: number): void
|
|
2252
2258
|
|
|
2253
2259
|
/**
|
|
2254
|
-
* Gets the filter for this infinity pipe or `nil` if the filter is empty.
|
|
2260
|
+
* Gets the filter for this infinity pipe, or `nil` if the filter is empty.
|
|
2255
2261
|
* @remarks
|
|
2256
2262
|
* Applies to subclasses: InfinityPipe
|
|
2257
2263
|
*
|
|
@@ -2335,7 +2341,7 @@ interface LuaEntity extends LuaControl {
|
|
|
2335
2341
|
* Gets the passenger of this car or spidertron if any.
|
|
2336
2342
|
* @remarks
|
|
2337
2343
|
* This differs over {@link LuaEntity::get_driver | LuaEntity::get_driver} in that the passenger can't drive the car.
|
|
2338
|
-
* Applies to subclasses:
|
|
2344
|
+
* Applies to subclasses: Car,SpiderVehicle
|
|
2339
2345
|
*
|
|
2340
2346
|
*/
|
|
2341
2347
|
get_passenger(this: void): void
|
|
@@ -2775,12 +2781,12 @@ interface LuaEntity extends LuaControl {
|
|
|
2775
2781
|
* @remarks
|
|
2776
2782
|
* The entity must allow filters.
|
|
2777
2783
|
*
|
|
2778
|
-
* @param item - Prototype name of the item to filter.
|
|
2784
|
+
* @param item - Prototype name of the item to filter, or `nil` to clear the filter.
|
|
2779
2785
|
* @param slot_index - Index of the slot to set the filter for.
|
|
2780
2786
|
*/
|
|
2781
2787
|
set_filter(this: void,
|
|
2782
2788
|
slot_index: number,
|
|
2783
|
-
item: string): void
|
|
2789
|
+
item: string | null): void
|
|
2784
2790
|
|
|
2785
2791
|
/**
|
|
2786
2792
|
* Sets the heat setting for this heat interface.
|
|
@@ -2797,28 +2803,28 @@ interface LuaEntity extends LuaControl {
|
|
|
2797
2803
|
* @remarks
|
|
2798
2804
|
* Applies to subclasses: InfinityContainer
|
|
2799
2805
|
*
|
|
2800
|
-
* @param filter - The new filter or `nil` to clear the filter.
|
|
2806
|
+
* @param filter - The new filter, or `nil` to clear the filter.
|
|
2801
2807
|
* @param index - The index to set.
|
|
2802
2808
|
*/
|
|
2803
2809
|
set_infinity_container_filter(this: void,
|
|
2804
2810
|
index: number,
|
|
2805
|
-
filter: InfinityInventoryFilter): void
|
|
2811
|
+
filter: InfinityInventoryFilter | null): void
|
|
2806
2812
|
|
|
2807
2813
|
/**
|
|
2808
2814
|
* Sets the filter for this infinity pipe.
|
|
2809
2815
|
* @remarks
|
|
2810
2816
|
* Applies to subclasses: InfinityPipe
|
|
2811
2817
|
*
|
|
2812
|
-
* @param filter - The new filter or `nil` to clear the filter.
|
|
2818
|
+
* @param filter - The new filter, or `nil` to clear the filter.
|
|
2813
2819
|
*/
|
|
2814
2820
|
set_infinity_pipe_filter(this: void,
|
|
2815
|
-
filter: InfinityPipeFilter): void
|
|
2821
|
+
filter: InfinityPipeFilter | null): void
|
|
2816
2822
|
|
|
2817
2823
|
/**
|
|
2818
2824
|
* Sets the passenger of this car or spidertron.
|
|
2819
2825
|
* @remarks
|
|
2820
2826
|
* This differs over {@link LuaEntity::get_driver | LuaEntity::get_driver} in that the passenger can't drive the car.
|
|
2821
|
-
* Applies to subclasses:
|
|
2827
|
+
* Applies to subclasses: Car,SpiderVehicle
|
|
2822
2828
|
*
|
|
2823
2829
|
*/
|
|
2824
2830
|
set_passenger(this: void,
|
|
@@ -2868,7 +2874,7 @@ interface LuaEntity extends LuaControl {
|
|
|
2868
2874
|
start_fading_out(this: void): void
|
|
2869
2875
|
|
|
2870
2876
|
/**
|
|
2871
|
-
*
|
|
2877
|
+
* Sets the {@link speed | LuaEntity::speed} of the given SpiderVehicle to zero. Notably does not clear its {@link autopilot_destination | LuaEntity::autopilot_destination}, which it will continue moving towards if set.
|
|
2872
2878
|
* @remarks
|
|
2873
2879
|
* Applies to subclasses: SpiderVehicle
|
|
2874
2880
|
*
|
|
@@ -3208,6 +3214,9 @@ interface LuaEntity extends LuaControl {
|
|
|
3208
3214
|
|
|
3209
3215
|
/**
|
|
3210
3216
|
* Whether the driver of this car or spidertron is the gunner. If `false`, the passenger is the gunner. `nil` if this is neither a car or a spidertron.
|
|
3217
|
+
* @remarks
|
|
3218
|
+
* Applies to subclasses: Car,SpiderVehicle
|
|
3219
|
+
*
|
|
3211
3220
|
*/
|
|
3212
3221
|
driver_is_gunner?: boolean
|
|
3213
3222
|
|
|
@@ -3851,7 +3860,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3851
3860
|
/**
|
|
3852
3861
|
* Index of the currently selected weapon slot of this character, car, or spidertron. `nil` if this entity doesn't have guns.
|
|
3853
3862
|
* @remarks
|
|
3854
|
-
* Applies to subclasses: Character,Car
|
|
3863
|
+
* Applies to subclasses: Character,Car,SpiderVehicle
|
|
3855
3864
|
*
|
|
3856
3865
|
*/
|
|
3857
3866
|
selected_gun_index?: number
|
|
@@ -3862,7 +3871,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3862
3871
|
readonly selection_box: BoundingBox
|
|
3863
3872
|
|
|
3864
3873
|
/**
|
|
3865
|
-
* The shooting target for this turret, if any.
|
|
3874
|
+
* The shooting target for this turret, if any. Can't be set to `nil` via script.
|
|
3866
3875
|
*/
|
|
3867
3876
|
shooting_target?: LuaEntity
|
|
3868
3877
|
|
|
@@ -4288,6 +4297,14 @@ interface LuaEntityPrototype {
|
|
|
4288
4297
|
*/
|
|
4289
4298
|
readonly always_on?: boolean
|
|
4290
4299
|
|
|
4300
|
+
/**
|
|
4301
|
+
* Name of the ammo category of this land mine.
|
|
4302
|
+
* @remarks
|
|
4303
|
+
* Applies to subclasses: LandMine
|
|
4304
|
+
*
|
|
4305
|
+
*/
|
|
4306
|
+
readonly ammo_category?: string
|
|
4307
|
+
|
|
4291
4308
|
/**
|
|
4292
4309
|
* The animation speed coefficient of this belt connectable prototype.
|
|
4293
4310
|
* @remarks
|
|
@@ -4315,7 +4332,7 @@ interface LuaEntityPrototype {
|
|
|
4315
4332
|
readonly automated_ammo_count?: number
|
|
4316
4333
|
|
|
4317
4334
|
/**
|
|
4318
|
-
* Whether this spider vehicle
|
|
4335
|
+
* Whether this spider vehicle prototype automatically cycles weapons.
|
|
4319
4336
|
* @remarks
|
|
4320
4337
|
* Applies to subclasses: SpiderVehicle
|
|
4321
4338
|
*
|
|
@@ -4980,6 +4997,52 @@ interface LuaEntityPrototype {
|
|
|
4980
4997
|
*/
|
|
4981
4998
|
readonly instruments?: ProgrammableSpeakerInstrument[]
|
|
4982
4999
|
|
|
5000
|
+
/**
|
|
5001
|
+
* Everything in the following list is considered a building.
|
|
5002
|
+
*
|
|
5003
|
+
* - AccumulatorPrototype
|
|
5004
|
+
* - ArtilleryTurretPrototype
|
|
5005
|
+
* - BeaconPrototype
|
|
5006
|
+
* - BoilerPrototype
|
|
5007
|
+
* - BurnerGeneratorPrototype
|
|
5008
|
+
* - CombinatorPrototype → ArithmeticCombinator, DeciderCombinator
|
|
5009
|
+
* - ConstantCombinatorPrototype
|
|
5010
|
+
* - ContainerPrototype → LogisticContainer, InfinityContainer
|
|
5011
|
+
* - CraftingMachinePrototype → AssemblingMachine, RocketSilo, Furnace
|
|
5012
|
+
* - ElectricEnergyInterfacePrototype
|
|
5013
|
+
* - ElectricPolePrototype
|
|
5014
|
+
* - EnemySpawnerPrototype
|
|
5015
|
+
* - GatePrototype
|
|
5016
|
+
* - GeneratorPrototype
|
|
5017
|
+
* - HeatInterfacePrototype
|
|
5018
|
+
* - HeatPipePrototype
|
|
5019
|
+
* - InserterPrototype
|
|
5020
|
+
* - LabPrototype
|
|
5021
|
+
* - LampPrototype
|
|
5022
|
+
* - LinkedContainerPrototype
|
|
5023
|
+
* - MarketPrototype
|
|
5024
|
+
* - MiningDrillPrototype
|
|
5025
|
+
* - OffshorePumpPrototype
|
|
5026
|
+
* - PipePrototype → InfinityPipe
|
|
5027
|
+
* - PipeToGroundPrototype
|
|
5028
|
+
* - PlayerPortPrototype
|
|
5029
|
+
* - PowerSwitchPrototype
|
|
5030
|
+
* - ProgrammableSpeakerPrototype
|
|
5031
|
+
* - PumpPrototype
|
|
5032
|
+
* - RadarPrototype
|
|
5033
|
+
* - RailPrototype → CurvedRail, StraightRail
|
|
5034
|
+
* - RailSignalBasePrototype → RailChainSignal, RailSignal
|
|
5035
|
+
* - ReactorPrototype
|
|
5036
|
+
* - RoboportPrototype
|
|
5037
|
+
* - SimpleEntityPrototype
|
|
5038
|
+
* - SimpleEntityWithOwnerPrototype → SimpleEntityWithForce
|
|
5039
|
+
* - SolarPanelPrototype
|
|
5040
|
+
* - StorageTankPrototype
|
|
5041
|
+
* - TrainStopPrototype
|
|
5042
|
+
* - TransportBeltConnectablePrototype → LinkedBelt, Loader1x1, Loader1x2, Splitter, TransportBelt, UndergroundBelt
|
|
5043
|
+
* - TurretPrototype → AmmoTurret, ElectricTurret, FluidTurret
|
|
5044
|
+
* - WallPrototype
|
|
5045
|
+
*/
|
|
4983
5046
|
readonly is_building: boolean
|
|
4984
5047
|
|
|
4985
5048
|
/**
|
|
@@ -5755,6 +5818,14 @@ interface LuaEntityPrototype {
|
|
|
5755
5818
|
*/
|
|
5756
5819
|
readonly timeout?: number
|
|
5757
5820
|
|
|
5821
|
+
/**
|
|
5822
|
+
* The torso bob speed of this spider vehicle prototype.
|
|
5823
|
+
* @remarks
|
|
5824
|
+
* Applies to subclasses: SpiderVehicle
|
|
5825
|
+
*
|
|
5826
|
+
*/
|
|
5827
|
+
readonly torso_bob_speed?: number
|
|
5828
|
+
|
|
5758
5829
|
/**
|
|
5759
5830
|
* The torso rotation speed of this spider vehicle prototype.
|
|
5760
5831
|
* @remarks
|
|
@@ -6244,9 +6315,10 @@ interface LuaEquipmentPrototype {
|
|
|
6244
6315
|
* The logistic parameters for this roboport equipment.
|
|
6245
6316
|
* @remarks
|
|
6246
6317
|
* Both the `charging_station_shift` and `stationing_offset` vectors are tables with `x` and `y` keys instead of an array.
|
|
6318
|
+
* Applies to subclasses: RoboportEquipment
|
|
6247
6319
|
*
|
|
6248
6320
|
*/
|
|
6249
|
-
readonly logistic_parameters
|
|
6321
|
+
readonly logistic_parameters?: {
|
|
6250
6322
|
charge_approach_distance: number,
|
|
6251
6323
|
charging_distance: number,
|
|
6252
6324
|
charging_energy: number,
|
|
@@ -6266,10 +6338,10 @@ interface LuaEquipmentPrototype {
|
|
|
6266
6338
|
|
|
6267
6339
|
/**
|
|
6268
6340
|
* @remarks
|
|
6269
|
-
* Applies to subclasses:
|
|
6341
|
+
* Applies to subclasses: MovementBonusEquipment
|
|
6270
6342
|
*
|
|
6271
6343
|
*/
|
|
6272
|
-
readonly movement_bonus
|
|
6344
|
+
readonly movement_bonus?: number
|
|
6273
6345
|
|
|
6274
6346
|
/**
|
|
6275
6347
|
* Name of this prototype.
|
|
@@ -6512,7 +6584,7 @@ interface LuaFluidBox {
|
|
|
6512
6584
|
*/
|
|
6513
6585
|
set_filter(this: void,
|
|
6514
6586
|
index: number,
|
|
6515
|
-
filter
|
|
6587
|
+
filter: FluidBoxFilterSpec | null): void
|
|
6516
6588
|
|
|
6517
6589
|
/**
|
|
6518
6590
|
* 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.
|
|
@@ -6530,7 +6602,7 @@ interface LuaFluidBox {
|
|
|
6530
6602
|
readonly valid: boolean
|
|
6531
6603
|
|
|
6532
6604
|
/**
|
|
6533
|
-
* Access, set or clear a fluid box. The index must always be in bounds (see {@link LuaFluidBox::
|
|
6605
|
+
* Access, set or clear a fluid box. The index must always be in bounds (see {@link LuaFluidBox::length_operator | LuaFluidBox::length_operator}). New fluidboxes may not be added or removed using this operator.
|
|
6534
6606
|
*
|
|
6535
6607
|
* Is `nil` if the given fluid box does not contain any fluid. Writing `nil` removes all fluid from the fluid box.
|
|
6536
6608
|
* @remarks
|
|
@@ -6635,6 +6707,9 @@ interface LuaFluidEnergySourcePrototype {
|
|
|
6635
6707
|
|
|
6636
6708
|
readonly effectivity: number
|
|
6637
6709
|
|
|
6710
|
+
/**
|
|
6711
|
+
* The emissions of this energy source in `pollution/Joule`. Multiplying it by energy consumption in `Watt` gives `pollution/second`.
|
|
6712
|
+
*/
|
|
6638
6713
|
readonly emissions: number
|
|
6639
6714
|
|
|
6640
6715
|
/**
|
|
@@ -6966,6 +7041,8 @@ interface LuaForce {
|
|
|
6966
7041
|
|
|
6967
7042
|
/**
|
|
6968
7043
|
* Gets train stops matching the given filters.
|
|
7044
|
+
* @param table.name - The name(s) of the train stops. Not providing names will match any stop.
|
|
7045
|
+
* @param table.surface - The surface to search. Not providing a surface will match stops on any surface.
|
|
6969
7046
|
*/
|
|
6970
7047
|
get_train_stops(this: void,
|
|
6971
7048
|
table?: {
|
|
@@ -6974,7 +7051,7 @@ interface LuaForce {
|
|
|
6974
7051
|
}): void
|
|
6975
7052
|
|
|
6976
7053
|
/**
|
|
6977
|
-
* @param surface -
|
|
7054
|
+
* @param surface - The surface to search. Not providing a surface will match trains on any surface.
|
|
6978
7055
|
*/
|
|
6979
7056
|
get_trains(this: void,
|
|
6980
7057
|
surface?: SurfaceIdentification): void
|
|
@@ -7666,7 +7743,7 @@ interface LuaGameScript {
|
|
|
7666
7743
|
* @remarks
|
|
7667
7744
|
* This is very expensive to determine.
|
|
7668
7745
|
*
|
|
7669
|
-
* @param surface - If
|
|
7746
|
+
* @param surface - If given, only the entities active on this surface are counted.
|
|
7670
7747
|
*/
|
|
7671
7748
|
get_active_entities_count(this: void,
|
|
7672
7749
|
surface?: SurfaceIdentification): void
|
|
@@ -7828,6 +7905,9 @@ interface LuaGameScript {
|
|
|
7828
7905
|
|
|
7829
7906
|
/**
|
|
7830
7907
|
* Gets train stops matching the given filters.
|
|
7908
|
+
* @param table.force - The force to search. Not providing a force will match stops in any force.
|
|
7909
|
+
* @param table.name - The name(s) of the train stops. Not providing names will match any stop.
|
|
7910
|
+
* @param table.surface - The surface to search. Not providing a surface will match stops on any surface.
|
|
7831
7911
|
*/
|
|
7832
7912
|
get_train_stops(this: void,
|
|
7833
7913
|
table?: {
|
|
@@ -8002,15 +8082,15 @@ interface LuaGameScript {
|
|
|
8002
8082
|
name?: string): void
|
|
8003
8083
|
|
|
8004
8084
|
/**
|
|
8005
|
-
* Set scenario state.
|
|
8085
|
+
* Set scenario state. Any parameters not provided do not change the current state.
|
|
8006
8086
|
*/
|
|
8007
8087
|
set_game_state(this: void,
|
|
8008
8088
|
table: {
|
|
8009
|
-
game_finished
|
|
8010
|
-
player_won
|
|
8011
|
-
next_level
|
|
8012
|
-
can_continue
|
|
8013
|
-
victorious_force
|
|
8089
|
+
game_finished?: boolean,
|
|
8090
|
+
player_won?: boolean,
|
|
8091
|
+
next_level?: string,
|
|
8092
|
+
can_continue?: boolean,
|
|
8093
|
+
victorious_force?: ForceIdentification
|
|
8014
8094
|
}): void
|
|
8015
8095
|
|
|
8016
8096
|
/**
|
|
@@ -8549,20 +8629,14 @@ interface LuaGroup {
|
|
|
8549
8629
|
readonly order: string
|
|
8550
8630
|
|
|
8551
8631
|
/**
|
|
8552
|
-
* The additional order value used in recipe ordering.
|
|
8553
|
-
* @remarks
|
|
8554
|
-
* Can only be used on groups, not on subgroups.
|
|
8555
|
-
*
|
|
8632
|
+
* The additional order value used in recipe ordering. Can only be used on groups, not on subgroups.
|
|
8556
8633
|
*/
|
|
8557
|
-
readonly order_in_recipe
|
|
8634
|
+
readonly order_in_recipe?: string
|
|
8558
8635
|
|
|
8559
8636
|
/**
|
|
8560
|
-
* Subgroups of this group.
|
|
8561
|
-
* @remarks
|
|
8562
|
-
* Can only be used on groups, not on subgroups.
|
|
8563
|
-
*
|
|
8637
|
+
* Subgroups of this group. Can only be used on groups, not on subgroups.
|
|
8564
8638
|
*/
|
|
8565
|
-
readonly subgroups
|
|
8639
|
+
readonly subgroups?: LuaGroup[]
|
|
8566
8640
|
|
|
8567
8641
|
readonly type?: string
|
|
8568
8642
|
|
|
@@ -8708,6 +8782,9 @@ interface LuaGuiElement {
|
|
|
8708
8782
|
|
|
8709
8783
|
/**
|
|
8710
8784
|
* Inserts a string at the end or at the given index of this dropdown or listbox.
|
|
8785
|
+
* @remarks
|
|
8786
|
+
* Applies to subclasses: drop-down,list-box
|
|
8787
|
+
*
|
|
8711
8788
|
* @param index - The index at which to insert the item.
|
|
8712
8789
|
* @param string - The text to insert.
|
|
8713
8790
|
*/
|
|
@@ -8747,6 +8824,9 @@ interface LuaGuiElement {
|
|
|
8747
8824
|
|
|
8748
8825
|
/**
|
|
8749
8826
|
* Removes the items in this dropdown or listbox.
|
|
8827
|
+
* @remarks
|
|
8828
|
+
* Applies to subclasses: drop-down,list-box
|
|
8829
|
+
*
|
|
8750
8830
|
*/
|
|
8751
8831
|
clear_items(this: void): void
|
|
8752
8832
|
|
|
@@ -8786,6 +8866,9 @@ interface LuaGuiElement {
|
|
|
8786
8866
|
|
|
8787
8867
|
/**
|
|
8788
8868
|
* Gets the item at the given index from this dropdown or listbox.
|
|
8869
|
+
* @remarks
|
|
8870
|
+
* Applies to subclasses: drop-down,list-box
|
|
8871
|
+
*
|
|
8789
8872
|
* @param index - The index to get
|
|
8790
8873
|
*/
|
|
8791
8874
|
get_item(this: void,
|
|
@@ -8831,6 +8914,9 @@ interface LuaGuiElement {
|
|
|
8831
8914
|
|
|
8832
8915
|
/**
|
|
8833
8916
|
* Removes the item at the given index from this dropdown or listbox.
|
|
8917
|
+
* @remarks
|
|
8918
|
+
* Applies to subclasses: drop-down,list-box
|
|
8919
|
+
*
|
|
8834
8920
|
* @param index - The index
|
|
8835
8921
|
*/
|
|
8836
8922
|
remove_item(this: void,
|
|
@@ -8938,6 +9024,9 @@ interface LuaGuiElement {
|
|
|
8938
9024
|
|
|
8939
9025
|
/**
|
|
8940
9026
|
* Sets the given string at the given index in this dropdown or listbox.
|
|
9027
|
+
* @remarks
|
|
9028
|
+
* Applies to subclasses: drop-down,list-box
|
|
9029
|
+
*
|
|
8941
9030
|
* @param index - The index whose text to replace.
|
|
8942
9031
|
* @param string - The text to set at the given index.
|
|
8943
9032
|
*/
|
|
@@ -9058,7 +9147,10 @@ interface LuaGuiElement {
|
|
|
9058
9147
|
clear_and_focus_on_right_click: boolean
|
|
9059
9148
|
|
|
9060
9149
|
/**
|
|
9061
|
-
* The
|
|
9150
|
+
* The sprite to display on this sprite-button when it is clicked.
|
|
9151
|
+
* @remarks
|
|
9152
|
+
* Applies to subclasses: sprite-button
|
|
9153
|
+
*
|
|
9062
9154
|
*/
|
|
9063
9155
|
clicked_sprite: SpritePath
|
|
9064
9156
|
|
|
@@ -9171,11 +9263,17 @@ interface LuaGuiElement {
|
|
|
9171
9263
|
|
|
9172
9264
|
/**
|
|
9173
9265
|
* The entity associated with this entity-preview, camera, minimap, if any.
|
|
9266
|
+
* @remarks
|
|
9267
|
+
* Applies to subclasses: entity-preview,camera,minimap
|
|
9268
|
+
*
|
|
9174
9269
|
*/
|
|
9175
9270
|
entity?: LuaEntity
|
|
9176
9271
|
|
|
9177
9272
|
/**
|
|
9178
9273
|
* The force this minimap is using, if any.
|
|
9274
|
+
* @remarks
|
|
9275
|
+
* Applies to subclasses: minimap
|
|
9276
|
+
*
|
|
9179
9277
|
*/
|
|
9180
9278
|
force?: string
|
|
9181
9279
|
|
|
@@ -9193,7 +9291,7 @@ interface LuaGuiElement {
|
|
|
9193
9291
|
horizontal_scroll_policy: string
|
|
9194
9292
|
|
|
9195
9293
|
/**
|
|
9196
|
-
* The
|
|
9294
|
+
* The sprite to display on this sprite-button when it is hovered.
|
|
9197
9295
|
* @remarks
|
|
9198
9296
|
* Applies to subclasses: sprite-button
|
|
9199
9297
|
*
|
|
@@ -9220,6 +9318,9 @@ interface LuaGuiElement {
|
|
|
9220
9318
|
|
|
9221
9319
|
/**
|
|
9222
9320
|
* The items in this dropdown or listbox.
|
|
9321
|
+
* @remarks
|
|
9322
|
+
* Applies to subclasses: drop-down,list-box
|
|
9323
|
+
*
|
|
9223
9324
|
*/
|
|
9224
9325
|
items: LocalisedString[]
|
|
9225
9326
|
|
|
@@ -9270,6 +9371,9 @@ interface LuaGuiElement {
|
|
|
9270
9371
|
|
|
9271
9372
|
/**
|
|
9272
9373
|
* The mouse button filters for this button or sprite-button.
|
|
9374
|
+
* @remarks
|
|
9375
|
+
* Applies to subclasses: button,sprite-button
|
|
9376
|
+
*
|
|
9273
9377
|
*/
|
|
9274
9378
|
mouse_button_filter: MouseButtonFlags
|
|
9275
9379
|
|
|
@@ -9285,6 +9389,9 @@ interface LuaGuiElement {
|
|
|
9285
9389
|
|
|
9286
9390
|
/**
|
|
9287
9391
|
* The number to be shown in the bottom right corner of this sprite-button. Set this to `nil` to show nothing.
|
|
9392
|
+
* @remarks
|
|
9393
|
+
* Applies to subclasses: sprite-button
|
|
9394
|
+
*
|
|
9288
9395
|
*/
|
|
9289
9396
|
number: number
|
|
9290
9397
|
|
|
@@ -9313,6 +9420,9 @@ interface LuaGuiElement {
|
|
|
9313
9420
|
|
|
9314
9421
|
/**
|
|
9315
9422
|
* The position this camera or minimap is focused on, if any.
|
|
9423
|
+
* @remarks
|
|
9424
|
+
* Applies to subclasses: camera,minimap
|
|
9425
|
+
*
|
|
9316
9426
|
*/
|
|
9317
9427
|
position: MapPosition
|
|
9318
9428
|
|
|
@@ -9325,7 +9435,10 @@ interface LuaGuiElement {
|
|
|
9325
9435
|
read_only: boolean
|
|
9326
9436
|
|
|
9327
9437
|
/**
|
|
9328
|
-
* Whether the
|
|
9438
|
+
* Whether the sprite widget should resize according to the sprite in it. Defaults to `true`.
|
|
9439
|
+
* @remarks
|
|
9440
|
+
* Applies to subclasses: sprite
|
|
9441
|
+
*
|
|
9329
9442
|
*/
|
|
9330
9443
|
resize_to_sprite: boolean
|
|
9331
9444
|
|
|
@@ -9355,6 +9468,9 @@ interface LuaGuiElement {
|
|
|
9355
9468
|
|
|
9356
9469
|
/**
|
|
9357
9470
|
* The selected index for this dropdown or listbox. Returns `0` if none is selected.
|
|
9471
|
+
* @remarks
|
|
9472
|
+
* Applies to subclasses: drop-down,list-box
|
|
9473
|
+
*
|
|
9358
9474
|
*/
|
|
9359
9475
|
selected_index: number
|
|
9360
9476
|
|
|
@@ -9368,6 +9484,9 @@ interface LuaGuiElement {
|
|
|
9368
9484
|
|
|
9369
9485
|
/**
|
|
9370
9486
|
* Related to the number to be shown in the bottom right corner of this sprite-button. When set to `true`, numbers that are non-zero and smaller than one are shown as a percentage rather than the value. For example, `0.5` will be shown as `50%` instead.
|
|
9487
|
+
* @remarks
|
|
9488
|
+
* Applies to subclasses: sprite-button
|
|
9489
|
+
*
|
|
9371
9490
|
*/
|
|
9372
9491
|
show_percent_for_small_numbers: boolean
|
|
9373
9492
|
|
|
@@ -9380,14 +9499,17 @@ interface LuaGuiElement {
|
|
|
9380
9499
|
slider_value: number
|
|
9381
9500
|
|
|
9382
9501
|
/**
|
|
9383
|
-
* The
|
|
9502
|
+
* The sprite to display on this sprite-button or sprite in the default state.
|
|
9503
|
+
* @remarks
|
|
9504
|
+
* Applies to subclasses: sprite-button,sprite
|
|
9505
|
+
*
|
|
9384
9506
|
*/
|
|
9385
9507
|
sprite: SpritePath
|
|
9386
9508
|
|
|
9387
9509
|
/**
|
|
9388
9510
|
* Is this checkbox or radiobutton checked?
|
|
9389
9511
|
* @remarks
|
|
9390
|
-
* Applies to subclasses:
|
|
9512
|
+
* Applies to subclasses: checkbox,radiobutton
|
|
9391
9513
|
*
|
|
9392
9514
|
*/
|
|
9393
9515
|
state: boolean
|
|
@@ -9399,6 +9521,9 @@ interface LuaGuiElement {
|
|
|
9399
9521
|
|
|
9400
9522
|
/**
|
|
9401
9523
|
* The surface index this camera or minimap is using.
|
|
9524
|
+
* @remarks
|
|
9525
|
+
* Applies to subclasses: camera,minimap
|
|
9526
|
+
*
|
|
9402
9527
|
*/
|
|
9403
9528
|
surface_index: number
|
|
9404
9529
|
|
|
@@ -9413,6 +9538,9 @@ interface LuaGuiElement {
|
|
|
9413
9538
|
|
|
9414
9539
|
/**
|
|
9415
9540
|
* The tabs and contents being shown in this tabbed-pane.
|
|
9541
|
+
* @remarks
|
|
9542
|
+
* Applies to subclasses: tabbed-pane
|
|
9543
|
+
*
|
|
9416
9544
|
*/
|
|
9417
9545
|
readonly tabs: TabAndContent[]
|
|
9418
9546
|
|
|
@@ -9480,6 +9608,9 @@ interface LuaGuiElement {
|
|
|
9480
9608
|
|
|
9481
9609
|
/**
|
|
9482
9610
|
* The zoom this camera or minimap is using. This value must be positive.
|
|
9611
|
+
* @remarks
|
|
9612
|
+
* Applies to subclasses: camera,minimap
|
|
9613
|
+
*
|
|
9483
9614
|
*/
|
|
9484
9615
|
zoom: number
|
|
9485
9616
|
|
|
@@ -9543,6 +9674,9 @@ interface LuaHeatEnergySourcePrototype {
|
|
|
9543
9674
|
|
|
9544
9675
|
readonly default_temperature: number
|
|
9545
9676
|
|
|
9677
|
+
/**
|
|
9678
|
+
* The emissions of this energy source in `pollution/Joule`. Multiplying it by energy consumption in `Watt` gives `pollution/second`.
|
|
9679
|
+
*/
|
|
9546
9680
|
readonly emissions: number
|
|
9547
9681
|
|
|
9548
9682
|
readonly heat_buffer_prototype: LuaHeatBufferPrototype
|
|
@@ -9870,7 +10004,7 @@ interface LuaItemPrototype {
|
|
|
9870
10004
|
* @remarks
|
|
9871
10005
|
* Applies to subclasses: AmmoItem
|
|
9872
10006
|
*
|
|
9873
|
-
* @param ammo_source_type - "default"
|
|
10007
|
+
* @param ammo_source_type - One of `"default"`, `"player"`, `"turret"`, or `"vehicle"`. Defaults to `"default"`.
|
|
9874
10008
|
*/
|
|
9875
10009
|
get_ammo_type(this: void,
|
|
9876
10010
|
ammo_source_type?: string): void
|
|
@@ -12165,9 +12299,9 @@ interface LuaPlayer extends LuaControl {
|
|
|
12165
12299
|
|
|
12166
12300
|
/**
|
|
12167
12301
|
* Checks if this player can build the give entity at the given location on the surface the player is on.
|
|
12168
|
-
* @param table.direction - Direction the entity would be placed
|
|
12169
|
-
* @param table.name - Name of the entity to check
|
|
12170
|
-
* @param table.position - Where the entity would be placed
|
|
12302
|
+
* @param table.direction - Direction the entity would be placed. Defaults to `north`.
|
|
12303
|
+
* @param table.name - Name of the entity to check.
|
|
12304
|
+
* @param table.position - Where the entity would be placed.
|
|
12171
12305
|
*/
|
|
12172
12306
|
can_place_entity(this: void,
|
|
12173
12307
|
table: {
|
|
@@ -12547,7 +12681,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
12547
12681
|
*/
|
|
12548
12682
|
set_infinity_inventory_filter(this: void,
|
|
12549
12683
|
index: number,
|
|
12550
|
-
filter: InfinityInventoryFilter): void
|
|
12684
|
+
filter: InfinityInventoryFilter | null): void
|
|
12551
12685
|
|
|
12552
12686
|
/**
|
|
12553
12687
|
* Sets the quick bar filter for the given slot.
|
|
@@ -13385,11 +13519,8 @@ interface LuaRecipePrototype {
|
|
|
13385
13519
|
interface LuaRemote {
|
|
13386
13520
|
/**
|
|
13387
13521
|
* Add a remote interface.
|
|
13388
|
-
* @remarks
|
|
13389
|
-
* It is an error if the given interface `name` is already registered.
|
|
13390
|
-
*
|
|
13391
13522
|
* @param functions - List of functions that are members of the new interface.
|
|
13392
|
-
* @param name - Name of the interface.
|
|
13523
|
+
* @param name - Name of the interface. If the name matches any existing interface, an error is thrown.
|
|
13393
13524
|
*/
|
|
13394
13525
|
add_interface(this: void,
|
|
13395
13526
|
name: string,
|
|
@@ -13397,9 +13528,9 @@ interface LuaRemote {
|
|
|
13397
13528
|
|
|
13398
13529
|
/**
|
|
13399
13530
|
* Call a function of an interface.
|
|
13400
|
-
* @param fn - Function name that belongs to `interface`.
|
|
13531
|
+
* @param fn - Function name that belongs to the `interface`.
|
|
13401
13532
|
* @param interface - Interface to look up `function` in.
|
|
13402
|
-
* @param ...args - Arguments to pass to the called function.
|
|
13533
|
+
* @param ...args - Arguments to pass to the called function. Note that any arguments passed through the interface are a copy of the original, not a reference. Metatables are not retained, while references to LuaObjects stay intact.
|
|
13403
13534
|
*/
|
|
13404
13535
|
call(this: void,
|
|
13405
13536
|
interface: string,
|
|
@@ -13414,7 +13545,7 @@ interface LuaRemote {
|
|
|
13414
13545
|
name: string): void
|
|
13415
13546
|
|
|
13416
13547
|
/**
|
|
13417
|
-
* List of all registered interfaces. For each interface name, `remote.interfaces[name]` is a dictionary mapping the interface's registered functions to
|
|
13548
|
+
* List of all registered interfaces. For each interface name, `remote.interfaces[name]` is a dictionary mapping the interface's registered functions to `true`.
|
|
13418
13549
|
* @example
|
|
13419
13550
|
* Assuming the "human interactor" interface is registered as above
|
|
13420
13551
|
* ```
|
|
@@ -13423,7 +13554,7 @@ interface LuaRemote {
|
|
|
13423
13554
|
* ```
|
|
13424
13555
|
*
|
|
13425
13556
|
*/
|
|
13426
|
-
readonly interfaces: {[key: string]: {[key: string]:
|
|
13557
|
+
readonly interfaces: {[key: string]: {[key: string]: true}}
|
|
13427
13558
|
|
|
13428
13559
|
/**
|
|
13429
13560
|
* This object's name.
|
|
@@ -15272,10 +15403,10 @@ interface LuaSurface {
|
|
|
15272
15403
|
|
|
15273
15404
|
/**
|
|
15274
15405
|
* If there exists an entity at the given location that can be fast-replaced with the given entity parameters.
|
|
15275
|
-
* @param table.direction - Direction the entity would be placed
|
|
15276
|
-
* @param table.force - The force that would place the entity.
|
|
15277
|
-
* @param table.name - Name of the entity to check
|
|
15278
|
-
* @param table.position - Where the entity would be placed
|
|
15406
|
+
* @param table.direction - Direction the entity would be placed. Defaults to `north`.
|
|
15407
|
+
* @param table.force - The force that would place the entity. Defaults to the `"neutral"` force.
|
|
15408
|
+
* @param table.name - Name of the entity to check.
|
|
15409
|
+
* @param table.position - Where the entity would be placed.
|
|
15279
15410
|
*/
|
|
15280
15411
|
can_fast_replace(this: void,
|
|
15281
15412
|
table: {
|
|
@@ -15287,10 +15418,10 @@ interface LuaSurface {
|
|
|
15287
15418
|
|
|
15288
15419
|
/**
|
|
15289
15420
|
* Check for collisions with terrain or other entities.
|
|
15290
|
-
* @param table.build_check_type - Which type of check should be carried out.
|
|
15291
|
-
* @param table.direction - Direction of the placed entity.
|
|
15292
|
-
* @param table.force - The force that would place the entity.
|
|
15293
|
-
* @param table.forced - If `true`, entities that can be marked for deconstruction are ignored. Only used if `build_check_type` is either `manual_ghost`, `script_ghost` or `blueprint_ghost`.
|
|
15421
|
+
* @param table.build_check_type - Which type of check should be carried out. Defaults to `ghost_revive`.
|
|
15422
|
+
* @param table.direction - Direction of the placed entity. Defaults to `north`.
|
|
15423
|
+
* @param table.force - The force that would place the entity. Defaults to the `"neutral"` force.
|
|
15424
|
+
* @param table.forced - If `true`, entities that can be marked for deconstruction are ignored. Only used if `build_check_type` is either `manual_ghost`, `script_ghost` or `blueprint_ghost`. Defaults to `false`.
|
|
15294
15425
|
* @param table.inner_name - The prototype name of the entity contained in the ghost. Only used if `name` is `entity-ghost`.
|
|
15295
15426
|
* @param table.name - Name of the entity prototype to check.
|
|
15296
15427
|
* @param table.position - Where the entity would be placed.
|
|
@@ -15999,9 +16130,9 @@ interface LuaSurface {
|
|
|
15999
16130
|
get_starting_area_radius(this: void): void
|
|
16000
16131
|
|
|
16001
16132
|
/**
|
|
16002
|
-
* Get the tile at a given position.
|
|
16133
|
+
* Get the tile at a given position. An alternative call signature for this method is passing it a single {@link TilePosition | TilePosition}.
|
|
16003
16134
|
* @remarks
|
|
16004
|
-
*
|
|
16135
|
+
* Non-integer values will result in them being rounded down.
|
|
16005
16136
|
*
|
|
16006
16137
|
*/
|
|
16007
16138
|
get_tile(this: void,
|
|
@@ -16015,6 +16146,8 @@ interface LuaSurface {
|
|
|
16015
16146
|
|
|
16016
16147
|
/**
|
|
16017
16148
|
* Gets train stops matching the given filters.
|
|
16149
|
+
* @param table.force - The force to search. Not providing a force will match stops in any force.
|
|
16150
|
+
* @param table.name - The name(s) of the train stops. Not providing names will match any stop.
|
|
16018
16151
|
*/
|
|
16019
16152
|
get_train_stops(this: void,
|
|
16020
16153
|
table?: {
|
|
@@ -16023,7 +16156,7 @@ interface LuaSurface {
|
|
|
16023
16156
|
}): void
|
|
16024
16157
|
|
|
16025
16158
|
/**
|
|
16026
|
-
* @param force -
|
|
16159
|
+
* @param force - The force to search. Not providing a force will match trains in any force.
|
|
16027
16160
|
*/
|
|
16028
16161
|
get_trains(this: void,
|
|
16029
16162
|
force?: ForceIdentification): void
|
|
@@ -17446,7 +17579,7 @@ interface LuaVirtualSignalPrototype {
|
|
|
17446
17579
|
readonly order: string
|
|
17447
17580
|
|
|
17448
17581
|
/**
|
|
17449
|
-
*
|
|
17582
|
+
* Whether this is a special signal. The `everything`, `anything`, `each`, and `unknown` signals are considered special.
|
|
17450
17583
|
*/
|
|
17451
17584
|
readonly special: boolean
|
|
17452
17585
|
|
|
@@ -17468,6 +17601,9 @@ interface LuaVoidEnergySourcePrototype {
|
|
|
17468
17601
|
*/
|
|
17469
17602
|
help(this: void): void
|
|
17470
17603
|
|
|
17604
|
+
/**
|
|
17605
|
+
* The emissions of this energy source in `pollution/Joule`. Multiplying it by energy consumption in `Watt` gives `pollution/second`.
|
|
17606
|
+
*/
|
|
17471
17607
|
readonly emissions: number
|
|
17472
17608
|
|
|
17473
17609
|
/**
|
|
@@ -17633,7 +17769,7 @@ interface LuaGuiElementAddParams {
|
|
|
17633
17769
|
'name'?: string
|
|
17634
17770
|
|
|
17635
17771
|
/**
|
|
17636
|
-
*
|
|
17772
|
+
* The name of the style prototype to apply to the new element.
|
|
17637
17773
|
*/
|
|
17638
17774
|
'style'?: string
|
|
17639
17775
|
|
|
@@ -18254,6 +18390,18 @@ interface LuaSurfaceCreateEntityParamsArtilleryFlare extends LuaSurfaceCreateEnt
|
|
|
18254
18390
|
|
|
18255
18391
|
}
|
|
18256
18392
|
|
|
18393
|
+
/**
|
|
18394
|
+
* @remarks
|
|
18395
|
+
* Applies to variant case `artillery-projectile`
|
|
18396
|
+
*
|
|
18397
|
+
*/
|
|
18398
|
+
interface LuaSurfaceCreateEntityParamsArtilleryProjectile extends LuaSurfaceCreateEntityParams {
|
|
18399
|
+
'max_range'?: number
|
|
18400
|
+
|
|
18401
|
+
'speed': number
|
|
18402
|
+
|
|
18403
|
+
}
|
|
18404
|
+
|
|
18257
18405
|
/**
|
|
18258
18406
|
* @remarks
|
|
18259
18407
|
* Applies to variant case `assembling-machine`
|
|
@@ -18519,7 +18667,7 @@ interface LuaSurfaceCreateEntityParamsProgrammableSpeaker extends LuaSurfaceCrea
|
|
|
18519
18667
|
*
|
|
18520
18668
|
*/
|
|
18521
18669
|
interface LuaSurfaceCreateEntityParamsProjectile extends LuaSurfaceCreateEntityParams {
|
|
18522
|
-
'max_range'
|
|
18670
|
+
'max_range'?: number
|
|
18523
18671
|
|
|
18524
18672
|
'speed': number
|
|
18525
18673
|
|
|
@@ -18600,6 +18748,29 @@ interface LuaSurfaceCreateEntityParamsSpeechBubble extends LuaSurfaceCreateEntit
|
|
|
18600
18748
|
|
|
18601
18749
|
}
|
|
18602
18750
|
|
|
18751
|
+
/**
|
|
18752
|
+
* @remarks
|
|
18753
|
+
* Applies to variant case `stream`
|
|
18754
|
+
*
|
|
18755
|
+
*/
|
|
18756
|
+
interface LuaSurfaceCreateEntityParamsStream extends LuaSurfaceCreateEntityParams {
|
|
18757
|
+
/**
|
|
18758
|
+
* Source position will be offset by this value when rendering the stream.
|
|
18759
|
+
*/
|
|
18760
|
+
'source_offset'?: Vector
|
|
18761
|
+
|
|
18762
|
+
/**
|
|
18763
|
+
* Absolute source position that can be used instead of source entity (entity has precedence if both entity and position are defined).
|
|
18764
|
+
*/
|
|
18765
|
+
'source_position'?: MapPosition
|
|
18766
|
+
|
|
18767
|
+
/**
|
|
18768
|
+
* Absolute target position that can be used instead of target entity (entity has precedence if both entity and position are defined).
|
|
18769
|
+
*/
|
|
18770
|
+
'target_position'?: MapPosition
|
|
18771
|
+
|
|
18772
|
+
}
|
|
18773
|
+
|
|
18603
18774
|
/**
|
|
18604
18775
|
* @remarks
|
|
18605
18776
|
* Applies to variant case `underground-belt`
|
package/dist/concepts.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Factorio API reference https://lua-api.factorio.com/latest/index.html
|
|
3
3
|
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version 1.1.
|
|
5
|
+
// Factorio version 1.1.70
|
|
6
6
|
// API version 3
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -356,23 +356,12 @@ type BoundingBox = {
|
|
|
356
356
|
right_bottom: MapPosition
|
|
357
357
|
}
|
|
358
358
|
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
/**
|
|
367
|
-
* Only present when `type` is `"equipment-remote"`. It is the equipment prototype name.
|
|
368
|
-
*/
|
|
369
|
-
equipment?: string,
|
|
370
|
-
|
|
371
|
-
/**
|
|
372
|
-
* One of `"throw"`, `"equipment-remote"`, `"use-on-self"`.
|
|
373
|
-
*/
|
|
374
|
-
type: string
|
|
375
|
-
}
|
|
359
|
+
/**
|
|
360
|
+
* @remarks
|
|
361
|
+
* Other attributes may be specified depending on `type`:
|
|
362
|
+
*
|
|
363
|
+
*/
|
|
364
|
+
type CapsuleAction = CapsuleActionArtilleryRemote | CapsuleActionDestroyCliffs | CapsuleActionEquipmentRemote | CapsuleActionThrow | CapsuleActionUseOnSelf
|
|
376
365
|
|
|
377
366
|
/**
|
|
378
367
|
* @remarks
|
|
@@ -503,7 +492,7 @@ interface CliffPlacementSettings {
|
|
|
503
492
|
}
|
|
504
493
|
|
|
505
494
|
/**
|
|
506
|
-
* A set of flags.
|
|
495
|
+
* A set of flags. Active flags are in the dictionary as `true`, while inactive flags aren't present at all.
|
|
507
496
|
*/
|
|
508
497
|
type CollisionMask = {[key: string]: true}
|
|
509
498
|
|
|
@@ -897,7 +886,7 @@ interface EnemyExpansionMapSettings {
|
|
|
897
886
|
type EntityPrototypeFilter = EntityPrototypeFilterBuildBaseEvolutionRequirement | EntityPrototypeFilterCollisionMask | EntityPrototypeFilterCraftingCategory | EntityPrototypeFilterEmissions | EntityPrototypeFilterFlag | EntityPrototypeFilterName | EntityPrototypeFilterSelectionPriority | EntityPrototypeFilterType | DefaultEntityPrototypeFilter
|
|
898
887
|
|
|
899
888
|
/**
|
|
900
|
-
* A set of flags.
|
|
889
|
+
* A set of flags. Active flags are in the dictionary as `true`, while inactive flags aren't present at all.
|
|
901
890
|
*
|
|
902
891
|
* By default, none of these flags are set.
|
|
903
892
|
*/
|
|
@@ -1278,7 +1267,7 @@ interface InventoryFilter {
|
|
|
1278
1267
|
type ItemPrototypeFilter = ItemPrototypeFilterBurntResult | ItemPrototypeFilterDefaultRequestAmount | ItemPrototypeFilterFlag | ItemPrototypeFilterFuelAccelerationMultiplier | ItemPrototypeFilterFuelCategory | ItemPrototypeFilterFuelEmissionsMultiplier | ItemPrototypeFilterFuelTopSpeedMultiplier | ItemPrototypeFilterFuelValue | ItemPrototypeFilterName | ItemPrototypeFilterPlaceAsTile | ItemPrototypeFilterPlaceResult | ItemPrototypeFilterPlacedAsEquipmentResult | ItemPrototypeFilterStackSize | ItemPrototypeFilterSubgroup | ItemPrototypeFilterType | ItemPrototypeFilterWireCount | DefaultItemPrototypeFilter
|
|
1279
1268
|
|
|
1280
1269
|
/**
|
|
1281
|
-
* A set of flags.
|
|
1270
|
+
* A set of flags. Active flags are in the dictionary as `true`, while inactive flags aren't present at all.
|
|
1282
1271
|
*
|
|
1283
1272
|
* By default, none of these flags are set.
|
|
1284
1273
|
*/
|
|
@@ -1865,7 +1854,7 @@ interface ModuleEffects {
|
|
|
1865
1854
|
}
|
|
1866
1855
|
|
|
1867
1856
|
/**
|
|
1868
|
-
* A set of flags.
|
|
1857
|
+
* A set of flags. Active flags are in the dictionary as `true`, while inactive flags aren't present at all.
|
|
1869
1858
|
*
|
|
1870
1859
|
* To write to this, use an array{@link [string | string}] of the mouse buttons that should be possible to use with on button. The flag `"left-and-right"` can also be set, which will set `"left"` and `"right"` to `true`.
|
|
1871
1860
|
*/
|
|
@@ -2153,7 +2142,7 @@ interface PollutionMapSettings {
|
|
|
2153
2142
|
/**
|
|
2154
2143
|
* The amount of pollution eaten by a chunk's tiles as a percentage of 1. Defaults to `1`.
|
|
2155
2144
|
*/
|
|
2156
|
-
|
|
2145
|
+
ageing: number,
|
|
2157
2146
|
|
|
2158
2147
|
/**
|
|
2159
2148
|
* The amount that is diffused to a neighboring chunk (possibly repeated for other directions as well). Defaults to `0.02`.
|
|
@@ -2365,7 +2354,7 @@ interface SelectedPrototypeData {
|
|
|
2365
2354
|
}
|
|
2366
2355
|
|
|
2367
2356
|
/**
|
|
2368
|
-
* A set of flags.
|
|
2357
|
+
* A set of flags on a selection tool that define how entities and tiles are selected. Active flags are in the dictionary as `true`, while inactive flags aren't present at all.
|
|
2369
2358
|
*/
|
|
2370
2359
|
type SelectionModeFlags = {[key: string]: true}
|
|
2371
2360
|
|
|
@@ -2816,12 +2805,12 @@ interface WaitCondition {
|
|
|
2816
2805
|
compare_type: string,
|
|
2817
2806
|
|
|
2818
2807
|
/**
|
|
2819
|
-
* Only present when `type` is `"item_count"`, `"circuit"` or `"fluid_count"
|
|
2808
|
+
* Only present when `type` is `"item_count"`, `"circuit"` or `"fluid_count"`, and a circuit condition is configured.
|
|
2820
2809
|
*/
|
|
2821
2810
|
condition?: CircuitCondition,
|
|
2822
2811
|
|
|
2823
2812
|
/**
|
|
2824
|
-
* Number of ticks to wait or of
|
|
2813
|
+
* Number of ticks to wait when `type` is `"time"`, or number of ticks of inactivity when `type` is `"inactivity"`.
|
|
2825
2814
|
*/
|
|
2826
2815
|
ticks?: number,
|
|
2827
2816
|
|
|
@@ -3003,6 +2992,70 @@ interface DefaultAttackParameters extends BaseAttackParameters {
|
|
|
3003
2992
|
type: 'beam'
|
|
3004
2993
|
}
|
|
3005
2994
|
|
|
2995
|
+
interface BaseCapsuleAction {
|
|
2996
|
+
|
|
2997
|
+
}
|
|
2998
|
+
|
|
2999
|
+
interface CapsuleActionArtilleryRemote extends BaseCapsuleAction {
|
|
3000
|
+
|
|
3001
|
+
/**
|
|
3002
|
+
* One of `"throw"`, `"equipment-remote"`, `"use-on-self"`, `"artillery-remote"`, `"destroy-cliffs"`.
|
|
3003
|
+
*/
|
|
3004
|
+
type: 'artillery-remote',
|
|
3005
|
+
|
|
3006
|
+
/**
|
|
3007
|
+
* Name of the {@link flare prototype | LuaEntityPrototype}.
|
|
3008
|
+
*/
|
|
3009
|
+
flare: string
|
|
3010
|
+
}
|
|
3011
|
+
|
|
3012
|
+
interface CapsuleActionDestroyCliffs extends BaseCapsuleAction {
|
|
3013
|
+
|
|
3014
|
+
/**
|
|
3015
|
+
* One of `"throw"`, `"equipment-remote"`, `"use-on-self"`, `"artillery-remote"`, `"destroy-cliffs"`.
|
|
3016
|
+
*/
|
|
3017
|
+
type: 'destroy-cliffs',
|
|
3018
|
+
attack_parameters: AttackParameters,
|
|
3019
|
+
radius: number,
|
|
3020
|
+
timeout: number
|
|
3021
|
+
}
|
|
3022
|
+
|
|
3023
|
+
interface CapsuleActionEquipmentRemote extends BaseCapsuleAction {
|
|
3024
|
+
|
|
3025
|
+
/**
|
|
3026
|
+
* One of `"throw"`, `"equipment-remote"`, `"use-on-self"`, `"artillery-remote"`, `"destroy-cliffs"`.
|
|
3027
|
+
*/
|
|
3028
|
+
type: 'equipment-remote',
|
|
3029
|
+
|
|
3030
|
+
/**
|
|
3031
|
+
* Name of the {@link LuaEquipmentPrototype | LuaEquipmentPrototype}.
|
|
3032
|
+
*/
|
|
3033
|
+
equipment: string
|
|
3034
|
+
}
|
|
3035
|
+
|
|
3036
|
+
interface CapsuleActionThrow extends BaseCapsuleAction {
|
|
3037
|
+
|
|
3038
|
+
/**
|
|
3039
|
+
* One of `"throw"`, `"equipment-remote"`, `"use-on-self"`, `"artillery-remote"`, `"destroy-cliffs"`.
|
|
3040
|
+
*/
|
|
3041
|
+
type: 'throw',
|
|
3042
|
+
attack_parameters: AttackParameters,
|
|
3043
|
+
|
|
3044
|
+
/**
|
|
3045
|
+
* Whether using the capsule consumes an item from the stack.
|
|
3046
|
+
*/
|
|
3047
|
+
uses_stack: boolean
|
|
3048
|
+
}
|
|
3049
|
+
|
|
3050
|
+
interface CapsuleActionUseOnSelf extends BaseCapsuleAction {
|
|
3051
|
+
|
|
3052
|
+
/**
|
|
3053
|
+
* One of `"throw"`, `"equipment-remote"`, `"use-on-self"`, `"artillery-remote"`, `"destroy-cliffs"`.
|
|
3054
|
+
*/
|
|
3055
|
+
type: 'use-on-self',
|
|
3056
|
+
attack_parameters: AttackParameters
|
|
3057
|
+
}
|
|
3058
|
+
|
|
3006
3059
|
/**
|
|
3007
3060
|
* @remarks
|
|
3008
3061
|
* Applies to `defines.command.attack` variant case
|
package/dist/defines.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Factorio API reference https://lua-api.factorio.com/latest/index.html
|
|
3
3
|
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version 1.1.
|
|
5
|
+
// Factorio version 1.1.70
|
|
6
6
|
// API version 3
|
|
7
7
|
|
|
8
8
|
declare namespace defines {
|
package/dist/events.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Factorio API reference https://lua-api.factorio.com/latest/index.html
|
|
3
3
|
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version 1.1.
|
|
5
|
+
// Factorio version 1.1.70
|
|
6
6
|
// API version 3
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -1254,7 +1254,10 @@ interface on_player_display_scale_changed extends event {
|
|
|
1254
1254
|
player_index: number
|
|
1255
1255
|
}
|
|
1256
1256
|
/**
|
|
1257
|
-
* Called when the player's driving state has changed,
|
|
1257
|
+
* Called when the player's driving state has changed, meaning a player has either entered or left a vehicle.
|
|
1258
|
+
* @remarks
|
|
1259
|
+
* This event is not raised when the player is ejected from a vehicle due to it being destroyed.
|
|
1260
|
+
*
|
|
1258
1261
|
*/
|
|
1259
1262
|
interface on_player_driving_changed_state extends event {
|
|
1260
1263
|
/**
|
|
@@ -1864,7 +1867,7 @@ interface on_pre_player_left_game extends event {
|
|
|
1864
1867
|
reason: defines.disconnect_reason
|
|
1865
1868
|
}
|
|
1866
1869
|
/**
|
|
1867
|
-
* Called when the player
|
|
1870
|
+
* Called when the player completes a mining action, but before the entity is potentially removed from the map. This is called even if the entity does not end up being removed. Can be filtered using {@link LuaPrePlayerMinedEntityEventFilter | LuaPrePlayerMinedEntityEventFilter}.
|
|
1868
1871
|
*/
|
|
1869
1872
|
interface on_pre_player_mined_item extends event {
|
|
1870
1873
|
/**
|
package/dist/global.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Factorio API reference https://lua-api.factorio.com/latest/index.html
|
|
3
3
|
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version 1.1.
|
|
5
|
+
// Factorio version 1.1.70
|
|
6
6
|
// API version 3
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -58,7 +58,7 @@ declare function log(this: void,
|
|
|
58
58
|
* end
|
|
59
59
|
* ```
|
|
60
60
|
*
|
|
61
|
-
* Note that `table_size()` does not work correctly for {@link LuaCustomTable | LuaCustomTable}, their size has to be determined with {@link LuaCustomTable::
|
|
61
|
+
* Note that `table_size()` does not work correctly for {@link LuaCustomTable | LuaCustomTable}, their size has to be determined with {@link LuaCustomTable::length_operator | LuaCustomTable::length_operator} instead.
|
|
62
62
|
*/
|
|
63
63
|
declare function table_size(this: void,
|
|
64
64
|
table: Table): void
|