factorio-types 0.0.28 → 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 +237 -74
- 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
|
|
@@ -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
|
/**
|
|
@@ -6252,9 +6315,10 @@ interface LuaEquipmentPrototype {
|
|
|
6252
6315
|
* The logistic parameters for this roboport equipment.
|
|
6253
6316
|
* @remarks
|
|
6254
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
|
|
6255
6319
|
*
|
|
6256
6320
|
*/
|
|
6257
|
-
readonly logistic_parameters
|
|
6321
|
+
readonly logistic_parameters?: {
|
|
6258
6322
|
charge_approach_distance: number,
|
|
6259
6323
|
charging_distance: number,
|
|
6260
6324
|
charging_energy: number,
|
|
@@ -6274,10 +6338,10 @@ interface LuaEquipmentPrototype {
|
|
|
6274
6338
|
|
|
6275
6339
|
/**
|
|
6276
6340
|
* @remarks
|
|
6277
|
-
* Applies to subclasses:
|
|
6341
|
+
* Applies to subclasses: MovementBonusEquipment
|
|
6278
6342
|
*
|
|
6279
6343
|
*/
|
|
6280
|
-
readonly movement_bonus
|
|
6344
|
+
readonly movement_bonus?: number
|
|
6281
6345
|
|
|
6282
6346
|
/**
|
|
6283
6347
|
* Name of this prototype.
|
|
@@ -6520,7 +6584,7 @@ interface LuaFluidBox {
|
|
|
6520
6584
|
*/
|
|
6521
6585
|
set_filter(this: void,
|
|
6522
6586
|
index: number,
|
|
6523
|
-
filter
|
|
6587
|
+
filter: FluidBoxFilterSpec | null): void
|
|
6524
6588
|
|
|
6525
6589
|
/**
|
|
6526
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.
|
|
@@ -6538,7 +6602,7 @@ interface LuaFluidBox {
|
|
|
6538
6602
|
readonly valid: boolean
|
|
6539
6603
|
|
|
6540
6604
|
/**
|
|
6541
|
-
* 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.
|
|
6542
6606
|
*
|
|
6543
6607
|
* Is `nil` if the given fluid box does not contain any fluid. Writing `nil` removes all fluid from the fluid box.
|
|
6544
6608
|
* @remarks
|
|
@@ -6643,6 +6707,9 @@ interface LuaFluidEnergySourcePrototype {
|
|
|
6643
6707
|
|
|
6644
6708
|
readonly effectivity: number
|
|
6645
6709
|
|
|
6710
|
+
/**
|
|
6711
|
+
* The emissions of this energy source in `pollution/Joule`. Multiplying it by energy consumption in `Watt` gives `pollution/second`.
|
|
6712
|
+
*/
|
|
6646
6713
|
readonly emissions: number
|
|
6647
6714
|
|
|
6648
6715
|
/**
|
|
@@ -6974,6 +7041,8 @@ interface LuaForce {
|
|
|
6974
7041
|
|
|
6975
7042
|
/**
|
|
6976
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.
|
|
6977
7046
|
*/
|
|
6978
7047
|
get_train_stops(this: void,
|
|
6979
7048
|
table?: {
|
|
@@ -6982,7 +7051,7 @@ interface LuaForce {
|
|
|
6982
7051
|
}): void
|
|
6983
7052
|
|
|
6984
7053
|
/**
|
|
6985
|
-
* @param surface -
|
|
7054
|
+
* @param surface - The surface to search. Not providing a surface will match trains on any surface.
|
|
6986
7055
|
*/
|
|
6987
7056
|
get_trains(this: void,
|
|
6988
7057
|
surface?: SurfaceIdentification): void
|
|
@@ -7674,7 +7743,7 @@ interface LuaGameScript {
|
|
|
7674
7743
|
* @remarks
|
|
7675
7744
|
* This is very expensive to determine.
|
|
7676
7745
|
*
|
|
7677
|
-
* @param surface - If
|
|
7746
|
+
* @param surface - If given, only the entities active on this surface are counted.
|
|
7678
7747
|
*/
|
|
7679
7748
|
get_active_entities_count(this: void,
|
|
7680
7749
|
surface?: SurfaceIdentification): void
|
|
@@ -7836,6 +7905,9 @@ interface LuaGameScript {
|
|
|
7836
7905
|
|
|
7837
7906
|
/**
|
|
7838
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.
|
|
7839
7911
|
*/
|
|
7840
7912
|
get_train_stops(this: void,
|
|
7841
7913
|
table?: {
|
|
@@ -8010,15 +8082,15 @@ interface LuaGameScript {
|
|
|
8010
8082
|
name?: string): void
|
|
8011
8083
|
|
|
8012
8084
|
/**
|
|
8013
|
-
* Set scenario state.
|
|
8085
|
+
* Set scenario state. Any parameters not provided do not change the current state.
|
|
8014
8086
|
*/
|
|
8015
8087
|
set_game_state(this: void,
|
|
8016
8088
|
table: {
|
|
8017
|
-
game_finished
|
|
8018
|
-
player_won
|
|
8019
|
-
next_level
|
|
8020
|
-
can_continue
|
|
8021
|
-
victorious_force
|
|
8089
|
+
game_finished?: boolean,
|
|
8090
|
+
player_won?: boolean,
|
|
8091
|
+
next_level?: string,
|
|
8092
|
+
can_continue?: boolean,
|
|
8093
|
+
victorious_force?: ForceIdentification
|
|
8022
8094
|
}): void
|
|
8023
8095
|
|
|
8024
8096
|
/**
|
|
@@ -8557,20 +8629,14 @@ interface LuaGroup {
|
|
|
8557
8629
|
readonly order: string
|
|
8558
8630
|
|
|
8559
8631
|
/**
|
|
8560
|
-
* The additional order value used in recipe ordering.
|
|
8561
|
-
* @remarks
|
|
8562
|
-
* Can only be used on groups, not on subgroups.
|
|
8563
|
-
*
|
|
8632
|
+
* The additional order value used in recipe ordering. Can only be used on groups, not on subgroups.
|
|
8564
8633
|
*/
|
|
8565
|
-
readonly order_in_recipe
|
|
8634
|
+
readonly order_in_recipe?: string
|
|
8566
8635
|
|
|
8567
8636
|
/**
|
|
8568
|
-
* Subgroups of this group.
|
|
8569
|
-
* @remarks
|
|
8570
|
-
* Can only be used on groups, not on subgroups.
|
|
8571
|
-
*
|
|
8637
|
+
* Subgroups of this group. Can only be used on groups, not on subgroups.
|
|
8572
8638
|
*/
|
|
8573
|
-
readonly subgroups
|
|
8639
|
+
readonly subgroups?: LuaGroup[]
|
|
8574
8640
|
|
|
8575
8641
|
readonly type?: string
|
|
8576
8642
|
|
|
@@ -8716,6 +8782,9 @@ interface LuaGuiElement {
|
|
|
8716
8782
|
|
|
8717
8783
|
/**
|
|
8718
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
|
+
*
|
|
8719
8788
|
* @param index - The index at which to insert the item.
|
|
8720
8789
|
* @param string - The text to insert.
|
|
8721
8790
|
*/
|
|
@@ -8755,6 +8824,9 @@ interface LuaGuiElement {
|
|
|
8755
8824
|
|
|
8756
8825
|
/**
|
|
8757
8826
|
* Removes the items in this dropdown or listbox.
|
|
8827
|
+
* @remarks
|
|
8828
|
+
* Applies to subclasses: drop-down,list-box
|
|
8829
|
+
*
|
|
8758
8830
|
*/
|
|
8759
8831
|
clear_items(this: void): void
|
|
8760
8832
|
|
|
@@ -8794,6 +8866,9 @@ interface LuaGuiElement {
|
|
|
8794
8866
|
|
|
8795
8867
|
/**
|
|
8796
8868
|
* Gets the item at the given index from this dropdown or listbox.
|
|
8869
|
+
* @remarks
|
|
8870
|
+
* Applies to subclasses: drop-down,list-box
|
|
8871
|
+
*
|
|
8797
8872
|
* @param index - The index to get
|
|
8798
8873
|
*/
|
|
8799
8874
|
get_item(this: void,
|
|
@@ -8839,6 +8914,9 @@ interface LuaGuiElement {
|
|
|
8839
8914
|
|
|
8840
8915
|
/**
|
|
8841
8916
|
* Removes the item at the given index from this dropdown or listbox.
|
|
8917
|
+
* @remarks
|
|
8918
|
+
* Applies to subclasses: drop-down,list-box
|
|
8919
|
+
*
|
|
8842
8920
|
* @param index - The index
|
|
8843
8921
|
*/
|
|
8844
8922
|
remove_item(this: void,
|
|
@@ -8946,6 +9024,9 @@ interface LuaGuiElement {
|
|
|
8946
9024
|
|
|
8947
9025
|
/**
|
|
8948
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
|
+
*
|
|
8949
9030
|
* @param index - The index whose text to replace.
|
|
8950
9031
|
* @param string - The text to set at the given index.
|
|
8951
9032
|
*/
|
|
@@ -9066,7 +9147,10 @@ interface LuaGuiElement {
|
|
|
9066
9147
|
clear_and_focus_on_right_click: boolean
|
|
9067
9148
|
|
|
9068
9149
|
/**
|
|
9069
|
-
* The
|
|
9150
|
+
* The sprite to display on this sprite-button when it is clicked.
|
|
9151
|
+
* @remarks
|
|
9152
|
+
* Applies to subclasses: sprite-button
|
|
9153
|
+
*
|
|
9070
9154
|
*/
|
|
9071
9155
|
clicked_sprite: SpritePath
|
|
9072
9156
|
|
|
@@ -9179,11 +9263,17 @@ interface LuaGuiElement {
|
|
|
9179
9263
|
|
|
9180
9264
|
/**
|
|
9181
9265
|
* The entity associated with this entity-preview, camera, minimap, if any.
|
|
9266
|
+
* @remarks
|
|
9267
|
+
* Applies to subclasses: entity-preview,camera,minimap
|
|
9268
|
+
*
|
|
9182
9269
|
*/
|
|
9183
9270
|
entity?: LuaEntity
|
|
9184
9271
|
|
|
9185
9272
|
/**
|
|
9186
9273
|
* The force this minimap is using, if any.
|
|
9274
|
+
* @remarks
|
|
9275
|
+
* Applies to subclasses: minimap
|
|
9276
|
+
*
|
|
9187
9277
|
*/
|
|
9188
9278
|
force?: string
|
|
9189
9279
|
|
|
@@ -9201,7 +9291,7 @@ interface LuaGuiElement {
|
|
|
9201
9291
|
horizontal_scroll_policy: string
|
|
9202
9292
|
|
|
9203
9293
|
/**
|
|
9204
|
-
* The
|
|
9294
|
+
* The sprite to display on this sprite-button when it is hovered.
|
|
9205
9295
|
* @remarks
|
|
9206
9296
|
* Applies to subclasses: sprite-button
|
|
9207
9297
|
*
|
|
@@ -9228,6 +9318,9 @@ interface LuaGuiElement {
|
|
|
9228
9318
|
|
|
9229
9319
|
/**
|
|
9230
9320
|
* The items in this dropdown or listbox.
|
|
9321
|
+
* @remarks
|
|
9322
|
+
* Applies to subclasses: drop-down,list-box
|
|
9323
|
+
*
|
|
9231
9324
|
*/
|
|
9232
9325
|
items: LocalisedString[]
|
|
9233
9326
|
|
|
@@ -9278,6 +9371,9 @@ interface LuaGuiElement {
|
|
|
9278
9371
|
|
|
9279
9372
|
/**
|
|
9280
9373
|
* The mouse button filters for this button or sprite-button.
|
|
9374
|
+
* @remarks
|
|
9375
|
+
* Applies to subclasses: button,sprite-button
|
|
9376
|
+
*
|
|
9281
9377
|
*/
|
|
9282
9378
|
mouse_button_filter: MouseButtonFlags
|
|
9283
9379
|
|
|
@@ -9293,6 +9389,9 @@ interface LuaGuiElement {
|
|
|
9293
9389
|
|
|
9294
9390
|
/**
|
|
9295
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
|
+
*
|
|
9296
9395
|
*/
|
|
9297
9396
|
number: number
|
|
9298
9397
|
|
|
@@ -9321,6 +9420,9 @@ interface LuaGuiElement {
|
|
|
9321
9420
|
|
|
9322
9421
|
/**
|
|
9323
9422
|
* The position this camera or minimap is focused on, if any.
|
|
9423
|
+
* @remarks
|
|
9424
|
+
* Applies to subclasses: camera,minimap
|
|
9425
|
+
*
|
|
9324
9426
|
*/
|
|
9325
9427
|
position: MapPosition
|
|
9326
9428
|
|
|
@@ -9333,7 +9435,10 @@ interface LuaGuiElement {
|
|
|
9333
9435
|
read_only: boolean
|
|
9334
9436
|
|
|
9335
9437
|
/**
|
|
9336
|
-
* 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
|
+
*
|
|
9337
9442
|
*/
|
|
9338
9443
|
resize_to_sprite: boolean
|
|
9339
9444
|
|
|
@@ -9363,6 +9468,9 @@ interface LuaGuiElement {
|
|
|
9363
9468
|
|
|
9364
9469
|
/**
|
|
9365
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
|
+
*
|
|
9366
9474
|
*/
|
|
9367
9475
|
selected_index: number
|
|
9368
9476
|
|
|
@@ -9376,6 +9484,9 @@ interface LuaGuiElement {
|
|
|
9376
9484
|
|
|
9377
9485
|
/**
|
|
9378
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
|
+
*
|
|
9379
9490
|
*/
|
|
9380
9491
|
show_percent_for_small_numbers: boolean
|
|
9381
9492
|
|
|
@@ -9388,14 +9499,17 @@ interface LuaGuiElement {
|
|
|
9388
9499
|
slider_value: number
|
|
9389
9500
|
|
|
9390
9501
|
/**
|
|
9391
|
-
* 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
|
+
*
|
|
9392
9506
|
*/
|
|
9393
9507
|
sprite: SpritePath
|
|
9394
9508
|
|
|
9395
9509
|
/**
|
|
9396
9510
|
* Is this checkbox or radiobutton checked?
|
|
9397
9511
|
* @remarks
|
|
9398
|
-
* Applies to subclasses:
|
|
9512
|
+
* Applies to subclasses: checkbox,radiobutton
|
|
9399
9513
|
*
|
|
9400
9514
|
*/
|
|
9401
9515
|
state: boolean
|
|
@@ -9407,6 +9521,9 @@ interface LuaGuiElement {
|
|
|
9407
9521
|
|
|
9408
9522
|
/**
|
|
9409
9523
|
* The surface index this camera or minimap is using.
|
|
9524
|
+
* @remarks
|
|
9525
|
+
* Applies to subclasses: camera,minimap
|
|
9526
|
+
*
|
|
9410
9527
|
*/
|
|
9411
9528
|
surface_index: number
|
|
9412
9529
|
|
|
@@ -9421,6 +9538,9 @@ interface LuaGuiElement {
|
|
|
9421
9538
|
|
|
9422
9539
|
/**
|
|
9423
9540
|
* The tabs and contents being shown in this tabbed-pane.
|
|
9541
|
+
* @remarks
|
|
9542
|
+
* Applies to subclasses: tabbed-pane
|
|
9543
|
+
*
|
|
9424
9544
|
*/
|
|
9425
9545
|
readonly tabs: TabAndContent[]
|
|
9426
9546
|
|
|
@@ -9488,6 +9608,9 @@ interface LuaGuiElement {
|
|
|
9488
9608
|
|
|
9489
9609
|
/**
|
|
9490
9610
|
* The zoom this camera or minimap is using. This value must be positive.
|
|
9611
|
+
* @remarks
|
|
9612
|
+
* Applies to subclasses: camera,minimap
|
|
9613
|
+
*
|
|
9491
9614
|
*/
|
|
9492
9615
|
zoom: number
|
|
9493
9616
|
|
|
@@ -9551,6 +9674,9 @@ interface LuaHeatEnergySourcePrototype {
|
|
|
9551
9674
|
|
|
9552
9675
|
readonly default_temperature: number
|
|
9553
9676
|
|
|
9677
|
+
/**
|
|
9678
|
+
* The emissions of this energy source in `pollution/Joule`. Multiplying it by energy consumption in `Watt` gives `pollution/second`.
|
|
9679
|
+
*/
|
|
9554
9680
|
readonly emissions: number
|
|
9555
9681
|
|
|
9556
9682
|
readonly heat_buffer_prototype: LuaHeatBufferPrototype
|
|
@@ -9878,7 +10004,7 @@ interface LuaItemPrototype {
|
|
|
9878
10004
|
* @remarks
|
|
9879
10005
|
* Applies to subclasses: AmmoItem
|
|
9880
10006
|
*
|
|
9881
|
-
* @param ammo_source_type - "default"
|
|
10007
|
+
* @param ammo_source_type - One of `"default"`, `"player"`, `"turret"`, or `"vehicle"`. Defaults to `"default"`.
|
|
9882
10008
|
*/
|
|
9883
10009
|
get_ammo_type(this: void,
|
|
9884
10010
|
ammo_source_type?: string): void
|
|
@@ -12173,9 +12299,9 @@ interface LuaPlayer extends LuaControl {
|
|
|
12173
12299
|
|
|
12174
12300
|
/**
|
|
12175
12301
|
* Checks if this player can build the give entity at the given location on the surface the player is on.
|
|
12176
|
-
* @param table.direction - Direction the entity would be placed
|
|
12177
|
-
* @param table.name - Name of the entity to check
|
|
12178
|
-
* @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.
|
|
12179
12305
|
*/
|
|
12180
12306
|
can_place_entity(this: void,
|
|
12181
12307
|
table: {
|
|
@@ -12555,7 +12681,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
12555
12681
|
*/
|
|
12556
12682
|
set_infinity_inventory_filter(this: void,
|
|
12557
12683
|
index: number,
|
|
12558
|
-
filter: InfinityInventoryFilter): void
|
|
12684
|
+
filter: InfinityInventoryFilter | null): void
|
|
12559
12685
|
|
|
12560
12686
|
/**
|
|
12561
12687
|
* Sets the quick bar filter for the given slot.
|
|
@@ -13393,11 +13519,8 @@ interface LuaRecipePrototype {
|
|
|
13393
13519
|
interface LuaRemote {
|
|
13394
13520
|
/**
|
|
13395
13521
|
* Add a remote interface.
|
|
13396
|
-
* @remarks
|
|
13397
|
-
* It is an error if the given interface `name` is already registered.
|
|
13398
|
-
*
|
|
13399
13522
|
* @param functions - List of functions that are members of the new interface.
|
|
13400
|
-
* @param name - Name of the interface.
|
|
13523
|
+
* @param name - Name of the interface. If the name matches any existing interface, an error is thrown.
|
|
13401
13524
|
*/
|
|
13402
13525
|
add_interface(this: void,
|
|
13403
13526
|
name: string,
|
|
@@ -13405,9 +13528,9 @@ interface LuaRemote {
|
|
|
13405
13528
|
|
|
13406
13529
|
/**
|
|
13407
13530
|
* Call a function of an interface.
|
|
13408
|
-
* @param fn - Function name that belongs to `interface`.
|
|
13531
|
+
* @param fn - Function name that belongs to the `interface`.
|
|
13409
13532
|
* @param interface - Interface to look up `function` in.
|
|
13410
|
-
* @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.
|
|
13411
13534
|
*/
|
|
13412
13535
|
call(this: void,
|
|
13413
13536
|
interface: string,
|
|
@@ -13422,7 +13545,7 @@ interface LuaRemote {
|
|
|
13422
13545
|
name: string): void
|
|
13423
13546
|
|
|
13424
13547
|
/**
|
|
13425
|
-
* 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`.
|
|
13426
13549
|
* @example
|
|
13427
13550
|
* Assuming the "human interactor" interface is registered as above
|
|
13428
13551
|
* ```
|
|
@@ -13431,7 +13554,7 @@ interface LuaRemote {
|
|
|
13431
13554
|
* ```
|
|
13432
13555
|
*
|
|
13433
13556
|
*/
|
|
13434
|
-
readonly interfaces: {[key: string]: {[key: string]:
|
|
13557
|
+
readonly interfaces: {[key: string]: {[key: string]: true}}
|
|
13435
13558
|
|
|
13436
13559
|
/**
|
|
13437
13560
|
* This object's name.
|
|
@@ -15280,10 +15403,10 @@ interface LuaSurface {
|
|
|
15280
15403
|
|
|
15281
15404
|
/**
|
|
15282
15405
|
* If there exists an entity at the given location that can be fast-replaced with the given entity parameters.
|
|
15283
|
-
* @param table.direction - Direction the entity would be placed
|
|
15284
|
-
* @param table.force - The force that would place the entity.
|
|
15285
|
-
* @param table.name - Name of the entity to check
|
|
15286
|
-
* @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.
|
|
15287
15410
|
*/
|
|
15288
15411
|
can_fast_replace(this: void,
|
|
15289
15412
|
table: {
|
|
@@ -15295,10 +15418,10 @@ interface LuaSurface {
|
|
|
15295
15418
|
|
|
15296
15419
|
/**
|
|
15297
15420
|
* Check for collisions with terrain or other entities.
|
|
15298
|
-
* @param table.build_check_type - Which type of check should be carried out.
|
|
15299
|
-
* @param table.direction - Direction of the placed entity.
|
|
15300
|
-
* @param table.force - The force that would place the entity.
|
|
15301
|
-
* @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`.
|
|
15302
15425
|
* @param table.inner_name - The prototype name of the entity contained in the ghost. Only used if `name` is `entity-ghost`.
|
|
15303
15426
|
* @param table.name - Name of the entity prototype to check.
|
|
15304
15427
|
* @param table.position - Where the entity would be placed.
|
|
@@ -16007,9 +16130,9 @@ interface LuaSurface {
|
|
|
16007
16130
|
get_starting_area_radius(this: void): void
|
|
16008
16131
|
|
|
16009
16132
|
/**
|
|
16010
|
-
* 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}.
|
|
16011
16134
|
* @remarks
|
|
16012
|
-
*
|
|
16135
|
+
* Non-integer values will result in them being rounded down.
|
|
16013
16136
|
*
|
|
16014
16137
|
*/
|
|
16015
16138
|
get_tile(this: void,
|
|
@@ -16023,6 +16146,8 @@ interface LuaSurface {
|
|
|
16023
16146
|
|
|
16024
16147
|
/**
|
|
16025
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.
|
|
16026
16151
|
*/
|
|
16027
16152
|
get_train_stops(this: void,
|
|
16028
16153
|
table?: {
|
|
@@ -16031,7 +16156,7 @@ interface LuaSurface {
|
|
|
16031
16156
|
}): void
|
|
16032
16157
|
|
|
16033
16158
|
/**
|
|
16034
|
-
* @param force -
|
|
16159
|
+
* @param force - The force to search. Not providing a force will match trains in any force.
|
|
16035
16160
|
*/
|
|
16036
16161
|
get_trains(this: void,
|
|
16037
16162
|
force?: ForceIdentification): void
|
|
@@ -17454,7 +17579,7 @@ interface LuaVirtualSignalPrototype {
|
|
|
17454
17579
|
readonly order: string
|
|
17455
17580
|
|
|
17456
17581
|
/**
|
|
17457
|
-
*
|
|
17582
|
+
* Whether this is a special signal. The `everything`, `anything`, `each`, and `unknown` signals are considered special.
|
|
17458
17583
|
*/
|
|
17459
17584
|
readonly special: boolean
|
|
17460
17585
|
|
|
@@ -17476,6 +17601,9 @@ interface LuaVoidEnergySourcePrototype {
|
|
|
17476
17601
|
*/
|
|
17477
17602
|
help(this: void): void
|
|
17478
17603
|
|
|
17604
|
+
/**
|
|
17605
|
+
* The emissions of this energy source in `pollution/Joule`. Multiplying it by energy consumption in `Watt` gives `pollution/second`.
|
|
17606
|
+
*/
|
|
17479
17607
|
readonly emissions: number
|
|
17480
17608
|
|
|
17481
17609
|
/**
|
|
@@ -17641,7 +17769,7 @@ interface LuaGuiElementAddParams {
|
|
|
17641
17769
|
'name'?: string
|
|
17642
17770
|
|
|
17643
17771
|
/**
|
|
17644
|
-
*
|
|
17772
|
+
* The name of the style prototype to apply to the new element.
|
|
17645
17773
|
*/
|
|
17646
17774
|
'style'?: string
|
|
17647
17775
|
|
|
@@ -18262,6 +18390,18 @@ interface LuaSurfaceCreateEntityParamsArtilleryFlare extends LuaSurfaceCreateEnt
|
|
|
18262
18390
|
|
|
18263
18391
|
}
|
|
18264
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
|
+
|
|
18265
18405
|
/**
|
|
18266
18406
|
* @remarks
|
|
18267
18407
|
* Applies to variant case `assembling-machine`
|
|
@@ -18527,7 +18667,7 @@ interface LuaSurfaceCreateEntityParamsProgrammableSpeaker extends LuaSurfaceCrea
|
|
|
18527
18667
|
*
|
|
18528
18668
|
*/
|
|
18529
18669
|
interface LuaSurfaceCreateEntityParamsProjectile extends LuaSurfaceCreateEntityParams {
|
|
18530
|
-
'max_range'
|
|
18670
|
+
'max_range'?: number
|
|
18531
18671
|
|
|
18532
18672
|
'speed': number
|
|
18533
18673
|
|
|
@@ -18608,6 +18748,29 @@ interface LuaSurfaceCreateEntityParamsSpeechBubble extends LuaSurfaceCreateEntit
|
|
|
18608
18748
|
|
|
18609
18749
|
}
|
|
18610
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
|
+
|
|
18611
18774
|
/**
|
|
18612
18775
|
* @remarks
|
|
18613
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
|