factorio-types 0.0.28 → 0.0.30
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 +321 -92
- package/dist/concepts.d.ts +80 -27
- package/dist/defines.d.ts +3 -1
- package/dist/events.d.ts +35 -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.71
|
|
6
6
|
// API version 3
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -253,16 +253,16 @@ interface LuaBootstrap {
|
|
|
253
253
|
* @remarks
|
|
254
254
|
* For more context, refer to the {@link Data Lifecycle | data-lifecycle} page.
|
|
255
255
|
*
|
|
256
|
-
* @param
|
|
256
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
257
257
|
*/
|
|
258
258
|
on_configuration_changed(this: void,
|
|
259
|
-
|
|
259
|
+
handler: (this: void, arg0: ConfigurationChangedData) => any | null): void
|
|
260
260
|
|
|
261
261
|
/**
|
|
262
262
|
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
263
263
|
* @param event - The event(s) or custom-input to invoke the handler on.
|
|
264
|
-
* @param f - The handler for this event. Passing `nil` will unregister it.
|
|
265
264
|
* @param filters - The filters for this event. Can only be used when registering for individual events.
|
|
265
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
266
266
|
* @example
|
|
267
267
|
* Register for the [on_tick](on_tick) event to print the current tick to console each tick.
|
|
268
268
|
* ```
|
|
@@ -281,7 +281,7 @@ interface LuaBootstrap {
|
|
|
281
281
|
*/
|
|
282
282
|
on_event<T extends event>(this: void,
|
|
283
283
|
event: defines.events | defines.events[] | string,
|
|
284
|
-
|
|
284
|
+
handler: (this: void, arg0: EventData) => any | null,
|
|
285
285
|
filters?: EventFilter): void
|
|
286
286
|
|
|
287
287
|
/**
|
|
@@ -289,7 +289,7 @@ interface LuaBootstrap {
|
|
|
289
289
|
* @remarks
|
|
290
290
|
* For more context, refer to the {@link Data Lifecycle | data-lifecycle} page.
|
|
291
291
|
*
|
|
292
|
-
* @param
|
|
292
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
293
293
|
* @example
|
|
294
294
|
* Initialize a `players` table in `global` for later use.
|
|
295
295
|
* ```
|
|
@@ -300,7 +300,7 @@ interface LuaBootstrap {
|
|
|
300
300
|
*
|
|
301
301
|
*/
|
|
302
302
|
on_init(this: void,
|
|
303
|
-
|
|
303
|
+
handler: (this: void) => any | null): void
|
|
304
304
|
|
|
305
305
|
/**
|
|
306
306
|
* Register a function to be run on save load. This is only called for mods that have been part of the save previously, or for players connecting to a running multiplayer session. It gives the mod the opportunity to do some very specific actions, should it need to. Doing anything other than these three will lead to desyncs, which breaks multiplayer and replay functionality. Access to {@link LuaGameScript | LuaGameScript} is not available. The {@link global | global} table can be accessed and is safe to read from, but not write to, as doing so will lead to an error.
|
|
@@ -314,19 +314,19 @@ interface LuaBootstrap {
|
|
|
314
314
|
* @remarks
|
|
315
315
|
* For more context, refer to the {@link Data Lifecycle | data-lifecycle} page.
|
|
316
316
|
*
|
|
317
|
-
* @param
|
|
317
|
+
* @param handler - The handler for this event. Passing `nil` will unregister it.
|
|
318
318
|
*/
|
|
319
319
|
on_load(this: void,
|
|
320
|
-
|
|
320
|
+
handler: (this: void) => any | null): void
|
|
321
321
|
|
|
322
322
|
/**
|
|
323
323
|
* Register a handler to run every nth-tick(s). When the game is on tick 0 it will trigger all registered handlers.
|
|
324
|
-
* @param
|
|
324
|
+
* @param handler - The handler to run. Passing `nil` will unregister it for the provided nth-tick(s).
|
|
325
325
|
* @param tick - The nth-tick(s) to invoke the handler on. Passing `nil` as the only parameter will unregister all nth-tick handlers.
|
|
326
326
|
*/
|
|
327
327
|
on_nth_tick(this: void,
|
|
328
328
|
tick: number | number[] | null,
|
|
329
|
-
|
|
329
|
+
handler: (this: void, arg0: NthTickEventData) => any | null): void
|
|
330
330
|
|
|
331
331
|
/**
|
|
332
332
|
* @param table.entity - The entity that was built.
|
|
@@ -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
|
|
@@ -2032,7 +2038,7 @@ interface LuaEntity extends LuaControl {
|
|
|
2032
2038
|
* @param damage - The amount of damage to be done.
|
|
2033
2039
|
* @param dealer - The entity to consider as the damage dealer. Needs to be on the same surface as the entity being damaged.
|
|
2034
2040
|
* @param force - The force that will be doing the damage.
|
|
2035
|
-
* @param type - The type of damage to be done, defaults to "impact".
|
|
2041
|
+
* @param type - The type of damage to be done, defaults to "impact". Can't be `nil`.
|
|
2036
2042
|
*/
|
|
2037
2043
|
damage(this: void,
|
|
2038
2044
|
damage: 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?: {
|
|
@@ -7885,9 +7957,9 @@ interface LuaGameScript {
|
|
|
7885
7957
|
reason?: LocalisedString): void
|
|
7886
7958
|
|
|
7887
7959
|
/**
|
|
7888
|
-
* Marks two forces to be merged together. All entities in the source force will be reassigned to the target force. The source force will then be destroyed.
|
|
7960
|
+
* Marks two forces to be merged together. All players and entities in the source force will be reassigned to the target force. The source force will then be destroyed. Importantly, this does not merge technologies or bonuses, which are instead retained from the target force.
|
|
7889
7961
|
* @remarks
|
|
7890
|
-
* The three built-in forces
|
|
7962
|
+
* The three built-in forces (player, enemy and neutral) can't be destroyed, meaning they can't be used as the source argument to this function.
|
|
7891
7963
|
* The source force is not removed until the end of the current tick, or if called during the {@link on_forces_merging | on_forces_merging} or {@link on_forces_merged | on_forces_merged} event, the end of the next tick.
|
|
7892
7964
|
*
|
|
7893
7965
|
* @param destination - The force to reassign all entities to.
|
|
@@ -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,9 +8824,17 @@ 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
|
|
|
8833
|
+
/**
|
|
8834
|
+
* Closes the dropdown list if this is a dropdown and it is open.
|
|
8835
|
+
*/
|
|
8836
|
+
close_dropdown(this: void): void
|
|
8837
|
+
|
|
8761
8838
|
/**
|
|
8762
8839
|
* Remove this element, along with its children. Any {@link LuaGuiElement | LuaGuiElement} objects referring to the destroyed elements become invalid after this operation.
|
|
8763
8840
|
* @remarks
|
|
@@ -8794,6 +8871,9 @@ interface LuaGuiElement {
|
|
|
8794
8871
|
|
|
8795
8872
|
/**
|
|
8796
8873
|
* Gets the item at the given index from this dropdown or listbox.
|
|
8874
|
+
* @remarks
|
|
8875
|
+
* Applies to subclasses: drop-down,list-box
|
|
8876
|
+
*
|
|
8797
8877
|
* @param index - The index to get
|
|
8798
8878
|
*/
|
|
8799
8879
|
get_item(this: void,
|
|
@@ -8839,6 +8919,9 @@ interface LuaGuiElement {
|
|
|
8839
8919
|
|
|
8840
8920
|
/**
|
|
8841
8921
|
* Removes the item at the given index from this dropdown or listbox.
|
|
8922
|
+
* @remarks
|
|
8923
|
+
* Applies to subclasses: drop-down,list-box
|
|
8924
|
+
*
|
|
8842
8925
|
* @param index - The index
|
|
8843
8926
|
*/
|
|
8844
8927
|
remove_item(this: void,
|
|
@@ -8946,6 +9029,9 @@ interface LuaGuiElement {
|
|
|
8946
9029
|
|
|
8947
9030
|
/**
|
|
8948
9031
|
* Sets the given string at the given index in this dropdown or listbox.
|
|
9032
|
+
* @remarks
|
|
9033
|
+
* Applies to subclasses: drop-down,list-box
|
|
9034
|
+
*
|
|
8949
9035
|
* @param index - The index whose text to replace.
|
|
8950
9036
|
* @param string - The text to set at the given index.
|
|
8951
9037
|
*/
|
|
@@ -9066,7 +9152,10 @@ interface LuaGuiElement {
|
|
|
9066
9152
|
clear_and_focus_on_right_click: boolean
|
|
9067
9153
|
|
|
9068
9154
|
/**
|
|
9069
|
-
* The
|
|
9155
|
+
* The sprite to display on this sprite-button when it is clicked.
|
|
9156
|
+
* @remarks
|
|
9157
|
+
* Applies to subclasses: sprite-button
|
|
9158
|
+
*
|
|
9070
9159
|
*/
|
|
9071
9160
|
clicked_sprite: SpritePath
|
|
9072
9161
|
|
|
@@ -9179,11 +9268,17 @@ interface LuaGuiElement {
|
|
|
9179
9268
|
|
|
9180
9269
|
/**
|
|
9181
9270
|
* The entity associated with this entity-preview, camera, minimap, if any.
|
|
9271
|
+
* @remarks
|
|
9272
|
+
* Applies to subclasses: entity-preview,camera,minimap
|
|
9273
|
+
*
|
|
9182
9274
|
*/
|
|
9183
9275
|
entity?: LuaEntity
|
|
9184
9276
|
|
|
9185
9277
|
/**
|
|
9186
9278
|
* The force this minimap is using, if any.
|
|
9279
|
+
* @remarks
|
|
9280
|
+
* Applies to subclasses: minimap
|
|
9281
|
+
*
|
|
9187
9282
|
*/
|
|
9188
9283
|
force?: string
|
|
9189
9284
|
|
|
@@ -9201,7 +9296,7 @@ interface LuaGuiElement {
|
|
|
9201
9296
|
horizontal_scroll_policy: string
|
|
9202
9297
|
|
|
9203
9298
|
/**
|
|
9204
|
-
* The
|
|
9299
|
+
* The sprite to display on this sprite-button when it is hovered.
|
|
9205
9300
|
* @remarks
|
|
9206
9301
|
* Applies to subclasses: sprite-button
|
|
9207
9302
|
*
|
|
@@ -9228,6 +9323,9 @@ interface LuaGuiElement {
|
|
|
9228
9323
|
|
|
9229
9324
|
/**
|
|
9230
9325
|
* The items in this dropdown or listbox.
|
|
9326
|
+
* @remarks
|
|
9327
|
+
* Applies to subclasses: drop-down,list-box
|
|
9328
|
+
*
|
|
9231
9329
|
*/
|
|
9232
9330
|
items: LocalisedString[]
|
|
9233
9331
|
|
|
@@ -9278,6 +9376,9 @@ interface LuaGuiElement {
|
|
|
9278
9376
|
|
|
9279
9377
|
/**
|
|
9280
9378
|
* The mouse button filters for this button or sprite-button.
|
|
9379
|
+
* @remarks
|
|
9380
|
+
* Applies to subclasses: button,sprite-button
|
|
9381
|
+
*
|
|
9281
9382
|
*/
|
|
9282
9383
|
mouse_button_filter: MouseButtonFlags
|
|
9283
9384
|
|
|
@@ -9293,6 +9394,9 @@ interface LuaGuiElement {
|
|
|
9293
9394
|
|
|
9294
9395
|
/**
|
|
9295
9396
|
* The number to be shown in the bottom right corner of this sprite-button. Set this to `nil` to show nothing.
|
|
9397
|
+
* @remarks
|
|
9398
|
+
* Applies to subclasses: sprite-button
|
|
9399
|
+
*
|
|
9296
9400
|
*/
|
|
9297
9401
|
number: number
|
|
9298
9402
|
|
|
@@ -9321,6 +9425,9 @@ interface LuaGuiElement {
|
|
|
9321
9425
|
|
|
9322
9426
|
/**
|
|
9323
9427
|
* The position this camera or minimap is focused on, if any.
|
|
9428
|
+
* @remarks
|
|
9429
|
+
* Applies to subclasses: camera,minimap
|
|
9430
|
+
*
|
|
9324
9431
|
*/
|
|
9325
9432
|
position: MapPosition
|
|
9326
9433
|
|
|
@@ -9333,7 +9440,10 @@ interface LuaGuiElement {
|
|
|
9333
9440
|
read_only: boolean
|
|
9334
9441
|
|
|
9335
9442
|
/**
|
|
9336
|
-
* Whether the
|
|
9443
|
+
* Whether the sprite widget should resize according to the sprite in it. Defaults to `true`.
|
|
9444
|
+
* @remarks
|
|
9445
|
+
* Applies to subclasses: sprite
|
|
9446
|
+
*
|
|
9337
9447
|
*/
|
|
9338
9448
|
resize_to_sprite: boolean
|
|
9339
9449
|
|
|
@@ -9363,6 +9473,9 @@ interface LuaGuiElement {
|
|
|
9363
9473
|
|
|
9364
9474
|
/**
|
|
9365
9475
|
* The selected index for this dropdown or listbox. Returns `0` if none is selected.
|
|
9476
|
+
* @remarks
|
|
9477
|
+
* Applies to subclasses: drop-down,list-box
|
|
9478
|
+
*
|
|
9366
9479
|
*/
|
|
9367
9480
|
selected_index: number
|
|
9368
9481
|
|
|
@@ -9376,6 +9489,9 @@ interface LuaGuiElement {
|
|
|
9376
9489
|
|
|
9377
9490
|
/**
|
|
9378
9491
|
* 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.
|
|
9492
|
+
* @remarks
|
|
9493
|
+
* Applies to subclasses: sprite-button
|
|
9494
|
+
*
|
|
9379
9495
|
*/
|
|
9380
9496
|
show_percent_for_small_numbers: boolean
|
|
9381
9497
|
|
|
@@ -9388,14 +9504,17 @@ interface LuaGuiElement {
|
|
|
9388
9504
|
slider_value: number
|
|
9389
9505
|
|
|
9390
9506
|
/**
|
|
9391
|
-
* The
|
|
9507
|
+
* The sprite to display on this sprite-button or sprite in the default state.
|
|
9508
|
+
* @remarks
|
|
9509
|
+
* Applies to subclasses: sprite-button,sprite
|
|
9510
|
+
*
|
|
9392
9511
|
*/
|
|
9393
9512
|
sprite: SpritePath
|
|
9394
9513
|
|
|
9395
9514
|
/**
|
|
9396
9515
|
* Is this checkbox or radiobutton checked?
|
|
9397
9516
|
* @remarks
|
|
9398
|
-
* Applies to subclasses:
|
|
9517
|
+
* Applies to subclasses: checkbox,radiobutton
|
|
9399
9518
|
*
|
|
9400
9519
|
*/
|
|
9401
9520
|
state: boolean
|
|
@@ -9407,6 +9526,9 @@ interface LuaGuiElement {
|
|
|
9407
9526
|
|
|
9408
9527
|
/**
|
|
9409
9528
|
* The surface index this camera or minimap is using.
|
|
9529
|
+
* @remarks
|
|
9530
|
+
* Applies to subclasses: camera,minimap
|
|
9531
|
+
*
|
|
9410
9532
|
*/
|
|
9411
9533
|
surface_index: number
|
|
9412
9534
|
|
|
@@ -9421,6 +9543,9 @@ interface LuaGuiElement {
|
|
|
9421
9543
|
|
|
9422
9544
|
/**
|
|
9423
9545
|
* The tabs and contents being shown in this tabbed-pane.
|
|
9546
|
+
* @remarks
|
|
9547
|
+
* Applies to subclasses: tabbed-pane
|
|
9548
|
+
*
|
|
9424
9549
|
*/
|
|
9425
9550
|
readonly tabs: TabAndContent[]
|
|
9426
9551
|
|
|
@@ -9488,6 +9613,9 @@ interface LuaGuiElement {
|
|
|
9488
9613
|
|
|
9489
9614
|
/**
|
|
9490
9615
|
* The zoom this camera or minimap is using. This value must be positive.
|
|
9616
|
+
* @remarks
|
|
9617
|
+
* Applies to subclasses: camera,minimap
|
|
9618
|
+
*
|
|
9491
9619
|
*/
|
|
9492
9620
|
zoom: number
|
|
9493
9621
|
|
|
@@ -9551,6 +9679,9 @@ interface LuaHeatEnergySourcePrototype {
|
|
|
9551
9679
|
|
|
9552
9680
|
readonly default_temperature: number
|
|
9553
9681
|
|
|
9682
|
+
/**
|
|
9683
|
+
* The emissions of this energy source in `pollution/Joule`. Multiplying it by energy consumption in `Watt` gives `pollution/second`.
|
|
9684
|
+
*/
|
|
9554
9685
|
readonly emissions: number
|
|
9555
9686
|
|
|
9556
9687
|
readonly heat_buffer_prototype: LuaHeatBufferPrototype
|
|
@@ -9878,7 +10009,7 @@ interface LuaItemPrototype {
|
|
|
9878
10009
|
* @remarks
|
|
9879
10010
|
* Applies to subclasses: AmmoItem
|
|
9880
10011
|
*
|
|
9881
|
-
* @param ammo_source_type - "default"
|
|
10012
|
+
* @param ammo_source_type - One of `"default"`, `"player"`, `"turret"`, or `"vehicle"`. Defaults to `"default"`.
|
|
9882
10013
|
*/
|
|
9883
10014
|
get_ammo_type(this: void,
|
|
9884
10015
|
ammo_source_type?: string): void
|
|
@@ -9920,6 +10051,70 @@ interface LuaItemPrototype {
|
|
|
9920
10051
|
*/
|
|
9921
10052
|
readonly alt_entity_type_filters?: {[key: string]: boolean}
|
|
9922
10053
|
|
|
10054
|
+
/**
|
|
10055
|
+
* The alt reverse entity filter mode used by this selection tool.
|
|
10056
|
+
* @remarks
|
|
10057
|
+
* Applies to subclasses: SelectionTool
|
|
10058
|
+
*
|
|
10059
|
+
*/
|
|
10060
|
+
readonly alt_reverse_alt_entity_filter_mode?: string
|
|
10061
|
+
|
|
10062
|
+
/**
|
|
10063
|
+
* The alt reverse entity filters used by this selection tool indexed by entity name.
|
|
10064
|
+
* @remarks
|
|
10065
|
+
* Applies to subclasses: SelectionTool
|
|
10066
|
+
*
|
|
10067
|
+
*/
|
|
10068
|
+
readonly alt_reverse_entity_filters?: {[key: string]: LuaEntityPrototype}
|
|
10069
|
+
|
|
10070
|
+
/**
|
|
10071
|
+
* The alt reverse entity type filters used by this selection tool indexed by entity type.
|
|
10072
|
+
* @remarks
|
|
10073
|
+
* The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
|
|
10074
|
+
* Applies to subclasses: SelectionTool
|
|
10075
|
+
*
|
|
10076
|
+
*/
|
|
10077
|
+
readonly alt_reverse_entity_type_filters?: {[key: string]: boolean}
|
|
10078
|
+
|
|
10079
|
+
/**
|
|
10080
|
+
* The color used when doing alt reverse selection with this selection tool prototype.
|
|
10081
|
+
* @remarks
|
|
10082
|
+
* Applies to subclasses: SelectionTool
|
|
10083
|
+
*
|
|
10084
|
+
*/
|
|
10085
|
+
readonly alt_reverse_selection_border_color?: Color
|
|
10086
|
+
|
|
10087
|
+
/**
|
|
10088
|
+
* @remarks
|
|
10089
|
+
* Applies to subclasses: SelectionTool
|
|
10090
|
+
*
|
|
10091
|
+
*/
|
|
10092
|
+
readonly alt_reverse_selection_cursor_box_type?: string
|
|
10093
|
+
|
|
10094
|
+
/**
|
|
10095
|
+
* Flags that affect which entities will be selected during alt reverse selection.
|
|
10096
|
+
* @remarks
|
|
10097
|
+
* Applies to subclasses: SelectionTool
|
|
10098
|
+
*
|
|
10099
|
+
*/
|
|
10100
|
+
readonly alt_reverse_selection_mode_flags?: SelectionModeFlags
|
|
10101
|
+
|
|
10102
|
+
/**
|
|
10103
|
+
* The alt reverse tile filter mode used by this selection tool.
|
|
10104
|
+
* @remarks
|
|
10105
|
+
* Applies to subclasses: SelectionTool
|
|
10106
|
+
*
|
|
10107
|
+
*/
|
|
10108
|
+
readonly alt_reverse_tile_filter_mode?: string
|
|
10109
|
+
|
|
10110
|
+
/**
|
|
10111
|
+
* The alt reverse tile filters used by this selection tool indexed by tile name.
|
|
10112
|
+
* @remarks
|
|
10113
|
+
* Applies to subclasses: SelectionTool
|
|
10114
|
+
*
|
|
10115
|
+
*/
|
|
10116
|
+
readonly alt_reverse_tile_filters?: {[key: string]: LuaTilePrototype}
|
|
10117
|
+
|
|
9923
10118
|
/**
|
|
9924
10119
|
* The color used when doing alt selection with this selection tool prototype.
|
|
9925
10120
|
* @remarks
|
|
@@ -11385,7 +11580,7 @@ interface LuaLogisticContainerControlBehavior extends LuaControlBehavior {
|
|
|
11385
11580
|
help(this: void): void
|
|
11386
11581
|
|
|
11387
11582
|
/**
|
|
11388
|
-
* The circuit mode of operations for the logistic container.
|
|
11583
|
+
* The circuit mode of operations for the logistic container. Can only be set on containers whose {@link logistic_mode | LuaEntityPrototype::logistic_mode} is set to "requester".
|
|
11389
11584
|
*/
|
|
11390
11585
|
circuit_mode_of_operation: defines.control_behavior.logistic_container.circuit_mode_of_operation
|
|
11391
11586
|
|
|
@@ -12172,10 +12367,10 @@ interface LuaPlayer extends LuaControl {
|
|
|
12172
12367
|
}): void
|
|
12173
12368
|
|
|
12174
12369
|
/**
|
|
12175
|
-
* Checks if this player can build the
|
|
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
|
|
12370
|
+
* Checks if this player can build the given entity at the given location on the surface the player is on.
|
|
12371
|
+
* @param table.direction - Direction the entity would be placed. Defaults to `north`.
|
|
12372
|
+
* @param table.name - Name of the entity to check.
|
|
12373
|
+
* @param table.position - Where the entity would be placed.
|
|
12179
12374
|
*/
|
|
12180
12375
|
can_place_entity(this: void,
|
|
12181
12376
|
table: {
|
|
@@ -12547,15 +12742,12 @@ interface LuaPlayer extends LuaControl {
|
|
|
12547
12742
|
|
|
12548
12743
|
/**
|
|
12549
12744
|
* Sets the filter for this map editor infinity filters at the given index.
|
|
12550
|
-
* @remarks
|
|
12551
|
-
* Applies to subclasses: InfinityContainer
|
|
12552
|
-
*
|
|
12553
12745
|
* @param filter - The new filter or `nil` to clear the filter.
|
|
12554
12746
|
* @param index - The index to set.
|
|
12555
12747
|
*/
|
|
12556
12748
|
set_infinity_inventory_filter(this: void,
|
|
12557
12749
|
index: number,
|
|
12558
|
-
filter: InfinityInventoryFilter): void
|
|
12750
|
+
filter: InfinityInventoryFilter | null): void
|
|
12559
12751
|
|
|
12560
12752
|
/**
|
|
12561
12753
|
* Sets the quick bar filter for the given slot.
|
|
@@ -13393,11 +13585,8 @@ interface LuaRecipePrototype {
|
|
|
13393
13585
|
interface LuaRemote {
|
|
13394
13586
|
/**
|
|
13395
13587
|
* Add a remote interface.
|
|
13396
|
-
* @remarks
|
|
13397
|
-
* It is an error if the given interface `name` is already registered.
|
|
13398
|
-
*
|
|
13399
13588
|
* @param functions - List of functions that are members of the new interface.
|
|
13400
|
-
* @param name - Name of the interface.
|
|
13589
|
+
* @param name - Name of the interface. If the name matches any existing interface, an error is thrown.
|
|
13401
13590
|
*/
|
|
13402
13591
|
add_interface(this: void,
|
|
13403
13592
|
name: string,
|
|
@@ -13405,9 +13594,9 @@ interface LuaRemote {
|
|
|
13405
13594
|
|
|
13406
13595
|
/**
|
|
13407
13596
|
* Call a function of an interface.
|
|
13408
|
-
* @param fn - Function name that belongs to `interface`.
|
|
13597
|
+
* @param fn - Function name that belongs to the `interface`.
|
|
13409
13598
|
* @param interface - Interface to look up `function` in.
|
|
13410
|
-
* @param ...args - Arguments to pass to the called function.
|
|
13599
|
+
* @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
13600
|
*/
|
|
13412
13601
|
call(this: void,
|
|
13413
13602
|
interface: string,
|
|
@@ -13422,7 +13611,7 @@ interface LuaRemote {
|
|
|
13422
13611
|
name: string): void
|
|
13423
13612
|
|
|
13424
13613
|
/**
|
|
13425
|
-
* List of all registered interfaces. For each interface name, `remote.interfaces[name]` is a dictionary mapping the interface's registered functions to
|
|
13614
|
+
* List of all registered interfaces. For each interface name, `remote.interfaces[name]` is a dictionary mapping the interface's registered functions to `true`.
|
|
13426
13615
|
* @example
|
|
13427
13616
|
* Assuming the "human interactor" interface is registered as above
|
|
13428
13617
|
* ```
|
|
@@ -13431,7 +13620,7 @@ interface LuaRemote {
|
|
|
13431
13620
|
* ```
|
|
13432
13621
|
*
|
|
13433
13622
|
*/
|
|
13434
|
-
readonly interfaces: {[key: string]: {[key: string]:
|
|
13623
|
+
readonly interfaces: {[key: string]: {[key: string]: true}}
|
|
13435
13624
|
|
|
13436
13625
|
/**
|
|
13437
13626
|
* This object's name.
|
|
@@ -15280,10 +15469,10 @@ interface LuaSurface {
|
|
|
15280
15469
|
|
|
15281
15470
|
/**
|
|
15282
15471
|
* 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
|
|
15472
|
+
* @param table.direction - Direction the entity would be placed. Defaults to `north`.
|
|
15473
|
+
* @param table.force - The force that would place the entity. Defaults to the `"neutral"` force.
|
|
15474
|
+
* @param table.name - Name of the entity to check.
|
|
15475
|
+
* @param table.position - Where the entity would be placed.
|
|
15287
15476
|
*/
|
|
15288
15477
|
can_fast_replace(this: void,
|
|
15289
15478
|
table: {
|
|
@@ -15295,10 +15484,10 @@ interface LuaSurface {
|
|
|
15295
15484
|
|
|
15296
15485
|
/**
|
|
15297
15486
|
* 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`.
|
|
15487
|
+
* @param table.build_check_type - Which type of check should be carried out. Defaults to `ghost_revive`.
|
|
15488
|
+
* @param table.direction - Direction of the placed entity. Defaults to `north`.
|
|
15489
|
+
* @param table.force - The force that would place the entity. Defaults to the `"neutral"` force.
|
|
15490
|
+
* @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
15491
|
* @param table.inner_name - The prototype name of the entity contained in the ghost. Only used if `name` is `entity-ghost`.
|
|
15303
15492
|
* @param table.name - Name of the entity prototype to check.
|
|
15304
15493
|
* @param table.position - Where the entity would be placed.
|
|
@@ -16007,9 +16196,9 @@ interface LuaSurface {
|
|
|
16007
16196
|
get_starting_area_radius(this: void): void
|
|
16008
16197
|
|
|
16009
16198
|
/**
|
|
16010
|
-
* Get the tile at a given position.
|
|
16199
|
+
* Get the tile at a given position. An alternative call signature for this method is passing it a single {@link TilePosition | TilePosition}.
|
|
16011
16200
|
* @remarks
|
|
16012
|
-
*
|
|
16201
|
+
* Non-integer values will result in them being rounded down.
|
|
16013
16202
|
*
|
|
16014
16203
|
*/
|
|
16015
16204
|
get_tile(this: void,
|
|
@@ -16023,6 +16212,8 @@ interface LuaSurface {
|
|
|
16023
16212
|
|
|
16024
16213
|
/**
|
|
16025
16214
|
* Gets train stops matching the given filters.
|
|
16215
|
+
* @param table.force - The force to search. Not providing a force will match stops in any force.
|
|
16216
|
+
* @param table.name - The name(s) of the train stops. Not providing names will match any stop.
|
|
16026
16217
|
*/
|
|
16027
16218
|
get_train_stops(this: void,
|
|
16028
16219
|
table?: {
|
|
@@ -16031,7 +16222,7 @@ interface LuaSurface {
|
|
|
16031
16222
|
}): void
|
|
16032
16223
|
|
|
16033
16224
|
/**
|
|
16034
|
-
* @param force -
|
|
16225
|
+
* @param force - The force to search. Not providing a force will match trains in any force.
|
|
16035
16226
|
*/
|
|
16036
16227
|
get_trains(this: void,
|
|
16037
16228
|
force?: ForceIdentification): void
|
|
@@ -17454,7 +17645,7 @@ interface LuaVirtualSignalPrototype {
|
|
|
17454
17645
|
readonly order: string
|
|
17455
17646
|
|
|
17456
17647
|
/**
|
|
17457
|
-
*
|
|
17648
|
+
* Whether this is a special signal. The `everything`, `anything`, `each`, and `unknown` signals are considered special.
|
|
17458
17649
|
*/
|
|
17459
17650
|
readonly special: boolean
|
|
17460
17651
|
|
|
@@ -17476,6 +17667,9 @@ interface LuaVoidEnergySourcePrototype {
|
|
|
17476
17667
|
*/
|
|
17477
17668
|
help(this: void): void
|
|
17478
17669
|
|
|
17670
|
+
/**
|
|
17671
|
+
* The emissions of this energy source in `pollution/Joule`. Multiplying it by energy consumption in `Watt` gives `pollution/second`.
|
|
17672
|
+
*/
|
|
17479
17673
|
readonly emissions: number
|
|
17480
17674
|
|
|
17481
17675
|
/**
|
|
@@ -17641,7 +17835,7 @@ interface LuaGuiElementAddParams {
|
|
|
17641
17835
|
'name'?: string
|
|
17642
17836
|
|
|
17643
17837
|
/**
|
|
17644
|
-
*
|
|
17838
|
+
* The name of the style prototype to apply to the new element.
|
|
17645
17839
|
*/
|
|
17646
17840
|
'style'?: string
|
|
17647
17841
|
|
|
@@ -18262,6 +18456,18 @@ interface LuaSurfaceCreateEntityParamsArtilleryFlare extends LuaSurfaceCreateEnt
|
|
|
18262
18456
|
|
|
18263
18457
|
}
|
|
18264
18458
|
|
|
18459
|
+
/**
|
|
18460
|
+
* @remarks
|
|
18461
|
+
* Applies to variant case `artillery-projectile`
|
|
18462
|
+
*
|
|
18463
|
+
*/
|
|
18464
|
+
interface LuaSurfaceCreateEntityParamsArtilleryProjectile extends LuaSurfaceCreateEntityParams {
|
|
18465
|
+
'max_range'?: number
|
|
18466
|
+
|
|
18467
|
+
'speed': number
|
|
18468
|
+
|
|
18469
|
+
}
|
|
18470
|
+
|
|
18265
18471
|
/**
|
|
18266
18472
|
* @remarks
|
|
18267
18473
|
* Applies to variant case `assembling-machine`
|
|
@@ -18527,7 +18733,7 @@ interface LuaSurfaceCreateEntityParamsProgrammableSpeaker extends LuaSurfaceCrea
|
|
|
18527
18733
|
*
|
|
18528
18734
|
*/
|
|
18529
18735
|
interface LuaSurfaceCreateEntityParamsProjectile extends LuaSurfaceCreateEntityParams {
|
|
18530
|
-
'max_range'
|
|
18736
|
+
'max_range'?: number
|
|
18531
18737
|
|
|
18532
18738
|
'speed': number
|
|
18533
18739
|
|
|
@@ -18608,6 +18814,29 @@ interface LuaSurfaceCreateEntityParamsSpeechBubble extends LuaSurfaceCreateEntit
|
|
|
18608
18814
|
|
|
18609
18815
|
}
|
|
18610
18816
|
|
|
18817
|
+
/**
|
|
18818
|
+
* @remarks
|
|
18819
|
+
* Applies to variant case `stream`
|
|
18820
|
+
*
|
|
18821
|
+
*/
|
|
18822
|
+
interface LuaSurfaceCreateEntityParamsStream extends LuaSurfaceCreateEntityParams {
|
|
18823
|
+
/**
|
|
18824
|
+
* Source position will be offset by this value when rendering the stream.
|
|
18825
|
+
*/
|
|
18826
|
+
'source_offset'?: Vector
|
|
18827
|
+
|
|
18828
|
+
/**
|
|
18829
|
+
* Absolute source position that can be used instead of source entity (entity has precedence if both entity and position are defined).
|
|
18830
|
+
*/
|
|
18831
|
+
'source_position'?: MapPosition
|
|
18832
|
+
|
|
18833
|
+
/**
|
|
18834
|
+
* Absolute target position that can be used instead of target entity (entity has precedence if both entity and position are defined).
|
|
18835
|
+
*/
|
|
18836
|
+
'target_position'?: MapPosition
|
|
18837
|
+
|
|
18838
|
+
}
|
|
18839
|
+
|
|
18611
18840
|
/**
|
|
18612
18841
|
* @remarks
|
|
18613
18842
|
* 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.71
|
|
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
|
*/
|
|
@@ -1203,7 +1192,7 @@ interface InfinityInventoryFilter {
|
|
|
1203
1192
|
count?: number,
|
|
1204
1193
|
|
|
1205
1194
|
/**
|
|
1206
|
-
* The index of this filter in the filters list.
|
|
1195
|
+
* The index of this filter in the filters list. Not required when writing a filter.
|
|
1207
1196
|
*/
|
|
1208
1197
|
index: number,
|
|
1209
1198
|
|
|
@@ -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.71
|
|
6
6
|
// API version 3
|
|
7
7
|
|
|
8
8
|
declare namespace defines {
|
|
@@ -557,6 +557,7 @@ declare namespace defines {
|
|
|
557
557
|
on_permission_group_edited,
|
|
558
558
|
on_permission_string_imported,
|
|
559
559
|
on_picked_up_item,
|
|
560
|
+
on_player_alt_reverse_selected_area,
|
|
560
561
|
on_player_alt_selected_area,
|
|
561
562
|
on_player_ammo_inventory_changed,
|
|
562
563
|
on_player_armor_inventory_changed,
|
|
@@ -721,6 +722,7 @@ declare namespace defines {
|
|
|
721
722
|
add_permission_group,
|
|
722
723
|
add_train_station,
|
|
723
724
|
admin_action,
|
|
725
|
+
alt_reverse_select_area,
|
|
724
726
|
alt_select_area,
|
|
725
727
|
alt_select_blueprint_entities,
|
|
726
728
|
alternative_copy,
|
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.71
|
|
6
6
|
// API version 3
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -953,6 +953,35 @@ interface on_picked_up_item extends event {
|
|
|
953
953
|
item_stack: SimpleItemStack
|
|
954
954
|
player_index: number
|
|
955
955
|
}
|
|
956
|
+
/**
|
|
957
|
+
* Called after a player alt-reverse-selects an area with a selection-tool item.
|
|
958
|
+
*/
|
|
959
|
+
interface on_player_alt_reverse_selected_area extends event {
|
|
960
|
+
/**
|
|
961
|
+
* The area selected.
|
|
962
|
+
*/
|
|
963
|
+
area: BoundingBox
|
|
964
|
+
/**
|
|
965
|
+
* The entities selected.
|
|
966
|
+
*/
|
|
967
|
+
entities: LuaEntity[]
|
|
968
|
+
/**
|
|
969
|
+
* The item used to select the area.
|
|
970
|
+
*/
|
|
971
|
+
item: string
|
|
972
|
+
/**
|
|
973
|
+
* The player doing the selection.
|
|
974
|
+
*/
|
|
975
|
+
player_index: number
|
|
976
|
+
/**
|
|
977
|
+
* The surface selected.
|
|
978
|
+
*/
|
|
979
|
+
surface: LuaSurface
|
|
980
|
+
/**
|
|
981
|
+
* The tiles selected.
|
|
982
|
+
*/
|
|
983
|
+
tiles: LuaTile[]
|
|
984
|
+
}
|
|
956
985
|
/**
|
|
957
986
|
* Called after a player alt-selects an area with a selection-tool item.
|
|
958
987
|
*/
|
|
@@ -1254,7 +1283,10 @@ interface on_player_display_scale_changed extends event {
|
|
|
1254
1283
|
player_index: number
|
|
1255
1284
|
}
|
|
1256
1285
|
/**
|
|
1257
|
-
* Called when the player's driving state has changed,
|
|
1286
|
+
* Called when the player's driving state has changed, meaning a player has either entered or left a vehicle.
|
|
1287
|
+
* @remarks
|
|
1288
|
+
* This event is not raised when the player is ejected from a vehicle due to it being destroyed.
|
|
1289
|
+
*
|
|
1258
1290
|
*/
|
|
1259
1291
|
interface on_player_driving_changed_state extends event {
|
|
1260
1292
|
/**
|
|
@@ -1864,7 +1896,7 @@ interface on_pre_player_left_game extends event {
|
|
|
1864
1896
|
reason: defines.disconnect_reason
|
|
1865
1897
|
}
|
|
1866
1898
|
/**
|
|
1867
|
-
* Called when the player
|
|
1899
|
+
* 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
1900
|
*/
|
|
1869
1901
|
interface on_pre_player_mined_item extends event {
|
|
1870
1902
|
/**
|
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.71
|
|
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
|