factorio-types 1.2.72 → 1.2.74
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 +116 -32
- package/dist/concepts.d.ts +33 -19
- package/dist/datacollection.d.ts +1 -1
- package/dist/defines.d.ts +195 -194
- package/dist/events.d.ts +9 -1
- package/dist/global.d.ts +1 -1
- package/dist/prototypes.d.ts +54 -11
- package/dist/types.d.ts +60 -42
- package/package.json +2 -2
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 2.1.
|
|
5
|
+
// Factorio version 2.1.25
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -385,6 +385,11 @@ interface LuaBoilerControlBehavior extends LuaGenericOnOffControlBehavior {
|
|
|
385
385
|
* Entry point for registering event handlers. It is accessible through the global object named `script`.
|
|
386
386
|
*/
|
|
387
387
|
interface LuaBootstrap {
|
|
388
|
+
/**
|
|
389
|
+
* Finishes the test when the game was started with `--test-scenario` or `--test-save`: the game exits after the current tick, with exit code 0 if the test passed and 1 if it failed. Does nothing otherwise.
|
|
390
|
+
* @param passed Whether the test passed. Defaults to `true`.
|
|
391
|
+
*/
|
|
392
|
+
finish_test(this: void, passed?: boolean): void;
|
|
388
393
|
/**
|
|
389
394
|
* Generate a new, unique event ID that can be used to raise custom events with {@link LuaBootstrap::raise_event | runtime:LuaBootstrap::raise_event}.
|
|
390
395
|
* @returns The newly generated event ID. This will be a new value that does not correspond to any named entry in defines.events.
|
|
@@ -4586,8 +4591,10 @@ interface LuaBootstrap {
|
|
|
4586
4591
|
message: string;
|
|
4587
4592
|
}): void;
|
|
4588
4593
|
/**
|
|
4589
|
-
*
|
|
4590
|
-
*
|
|
4594
|
+
* Manually raise an event. {@link Custom events | prototype:CustomEventPrototype} created in the prototype stage and events generated at runtime with {@link LuaBootstrap::generate_event_name | runtime:LuaBootstrap::generate_event_name} can be raised.
|
|
4595
|
+
*
|
|
4596
|
+
* Additionally, the following built-in events can be raised:
|
|
4597
|
+
* Built-in events that can be raised manually:
|
|
4591
4598
|
*
|
|
4592
4599
|
* - {@link on_console_chat | runtime:on_console_chat}
|
|
4593
4600
|
* - {@link on_player_crafted_item | runtime:on_player_crafted_item}
|
|
@@ -4600,7 +4607,7 @@ interface LuaBootstrap {
|
|
|
4600
4607
|
* - {@link script_raised_teleported | runtime:script_raised_teleported}
|
|
4601
4608
|
* - {@link script_raised_set_tiles | runtime:script_raised_set_tiles}
|
|
4602
4609
|
* @param event ID or name of the event to raise.
|
|
4603
|
-
* @param data Table with extra data that will be passed to the event handler. Any invalid LuaObjects will silently stop the event from being raised.
|
|
4610
|
+
* @param data Table with extra data that will be passed to the event handler. 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. Functions cannot be passed through the interface. Any invalid LuaObjects will silently stop the event from being raised.
|
|
4604
4611
|
* @example ```
|
|
4605
4612
|
-- Raise the on_console_chat event with the desired message 'from' the first player
|
|
4606
4613
|
local data = {player_index = 1, message = "Hello friends!"}
|
|
@@ -4811,6 +4818,10 @@ interface LuaBootstrap {
|
|
|
4811
4818
|
* 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.
|
|
4812
4819
|
*/
|
|
4813
4820
|
readonly object_name: string;
|
|
4821
|
+
/**
|
|
4822
|
+
* The string given with `--test-arg` when the game was started with `--test-scenario` or `--test-save`.
|
|
4823
|
+
*/
|
|
4824
|
+
readonly test_arg?: string;
|
|
4814
4825
|
}
|
|
4815
4826
|
/**
|
|
4816
4827
|
* A reference to the burner energy source owned by a specific {@link LuaEntity | runtime:LuaEntity} or {@link LuaEquipment | runtime:LuaEquipment}.
|
|
@@ -5686,7 +5697,7 @@ interface LuaControl {
|
|
|
5686
5697
|
*
|
|
5687
5698
|
* Write supports any of the types. Read will return the `entity`, `equipment`, `equipment-grid`, `player`, `element`, `inventory`, `item`, `tile`, or `nil`.
|
|
5688
5699
|
*/
|
|
5689
|
-
opened?: LuaEntity | LuaItemStack | LuaEquipment | LuaEquipmentGrid | LuaPlayer | LuaGuiElement | LuaInventory | LuaLogisticNetwork | LuaTile | defines.gui_type;
|
|
5700
|
+
opened?: LuaEntity | LuaItemStack | LuaEquipment | LuaEquipmentGrid | LuaPlayer | LuaGuiElement | LuaInventory | LuaLogisticNetwork | LuaTile | LuaRecord | defines.gui_type;
|
|
5690
5701
|
readonly opened_gui_type?: defines.gui_type;
|
|
5691
5702
|
/**
|
|
5692
5703
|
* Current item-picking state.
|
|
@@ -9313,6 +9324,8 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
9313
9324
|
readonly enter_drop_mode_if_held_stack_spoiled?: boolean;
|
|
9314
9325
|
readonly enter_vehicle_distance?: double;
|
|
9315
9326
|
readonly erase_contents_when_mined?: boolean;
|
|
9327
|
+
readonly exchange_input_lines?: boolean;
|
|
9328
|
+
readonly exchange_output_lines?: boolean;
|
|
9316
9329
|
readonly expires?: boolean;
|
|
9317
9330
|
/**
|
|
9318
9331
|
* Whether this explosion has a beam.
|
|
@@ -12704,6 +12717,12 @@ interface LuaGuiElement {
|
|
|
12704
12717
|
* 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.
|
|
12705
12718
|
*/
|
|
12706
12719
|
readonly object_name: string;
|
|
12720
|
+
/**
|
|
12721
|
+
* The opacity of the sprite shown in this widget, clamped to the range [0, 1].
|
|
12722
|
+
*
|
|
12723
|
+
* Setting this to `0.5` makes the sprite look like a ghost item or an unfulfilled recipe ingredient.
|
|
12724
|
+
*/
|
|
12725
|
+
opacity: float;
|
|
12707
12726
|
/**
|
|
12708
12727
|
* The direct parent of this element. `nil` if this is a top-level element.
|
|
12709
12728
|
*/
|
|
@@ -12846,6 +12865,17 @@ interface LuaGuiElement {
|
|
|
12846
12865
|
* The zoom this camera or minimap is using. This value must be positive.
|
|
12847
12866
|
*/
|
|
12848
12867
|
zoom: double;
|
|
12868
|
+
/**
|
|
12869
|
+
* The zoom limits of this camera. By default the camera can zoom in to 3x, the same as most player controllers.
|
|
12870
|
+
*
|
|
12871
|
+
* Reading this field creates a copy and only contains the limits previously set by a script. To change the zoom limits, set the entire field to the desired {@link ZoomLimits | runtime:ZoomLimits} table.
|
|
12872
|
+
* @example ```
|
|
12873
|
+
-- Lets the camera zoom in to 10x the standard zoom level.
|
|
12874
|
+
camera.zoom_limits = { closest = { zoom = 10 } }
|
|
12875
|
+
camera.zoom = 10
|
|
12876
|
+
```
|
|
12877
|
+
*/
|
|
12878
|
+
zoom_limits: ZoomLimits;
|
|
12849
12879
|
/**
|
|
12850
12880
|
* The indexing operator. Gets children by name.
|
|
12851
12881
|
*/
|
|
@@ -13273,6 +13303,10 @@ interface LuaGuiElementAddParamsSprite extends BaseLuaGuiElementAddParams {
|
|
|
13273
13303
|
* The kind of element to add, which potentially has its own attributes as listed below.
|
|
13274
13304
|
*/
|
|
13275
13305
|
'type': 'sprite';
|
|
13306
|
+
/**
|
|
13307
|
+
* Opacity of the sprite, clamped to the range [0, 1]. Defaults to `1`.
|
|
13308
|
+
*/
|
|
13309
|
+
'opacity'?: float;
|
|
13276
13310
|
/**
|
|
13277
13311
|
* Whether the widget should resize according to the sprite in it. Defaults to `true`.
|
|
13278
13312
|
*/
|
|
@@ -13311,6 +13345,10 @@ interface LuaGuiElementAddParamsSpriteButton extends BaseLuaGuiElementAddParams
|
|
|
13311
13345
|
* The number shown on the button.
|
|
13312
13346
|
*/
|
|
13313
13347
|
'number'?: double;
|
|
13348
|
+
/**
|
|
13349
|
+
* Opacity of the sprite shown on the button, clamped to the range [0, 1]. Defaults to `1`.
|
|
13350
|
+
*/
|
|
13351
|
+
'opacity'?: float;
|
|
13314
13352
|
/**
|
|
13315
13353
|
* The name of the quality shown on the button.
|
|
13316
13354
|
*/
|
|
@@ -14422,6 +14460,10 @@ interface LuaItemPrototype extends LuaPrototypeBase {
|
|
|
14422
14460
|
*/
|
|
14423
14461
|
get_ammo_type(this: void, ammo_source_type?: 'default' | 'player' | 'turret' | 'vehicle'): AmmoType | null;
|
|
14424
14462
|
get_cursor_box_type(this: void, selection_mode: defines.selection_mode): CursorBoxRenderType | null;
|
|
14463
|
+
/**
|
|
14464
|
+
* Whether the list of how many entities are selected should be shown.
|
|
14465
|
+
*/
|
|
14466
|
+
get_draw_selection_counts(this: void, selection_mode: defines.selection_mode): boolean | null;
|
|
14425
14467
|
/**
|
|
14426
14468
|
* The durability of this tool item prototype.
|
|
14427
14469
|
*/
|
|
@@ -15762,7 +15804,7 @@ interface LuaPermissionGroups {
|
|
|
15762
15804
|
readonly valid: boolean;
|
|
15763
15805
|
}
|
|
15764
15806
|
/**
|
|
15765
|
-
* A pin owned by a player.
|
|
15807
|
+
* A map pin owned by a player.
|
|
15766
15808
|
*/
|
|
15767
15809
|
interface LuaPin {
|
|
15768
15810
|
/**
|
|
@@ -15774,28 +15816,28 @@ interface LuaPin {
|
|
|
15774
15816
|
*/
|
|
15775
15817
|
get_pin_center(this: void): MapPosition | null;
|
|
15776
15818
|
/**
|
|
15777
|
-
* The alert positions if this pin
|
|
15819
|
+
* The alert positions, if this pin targets an alert.
|
|
15778
15820
|
*/
|
|
15779
15821
|
alert_positions: MapPosition[];
|
|
15780
15822
|
/**
|
|
15781
|
-
* The type of alert this pin is for
|
|
15823
|
+
* The type of alert this pin is for, if this pin targets an alert.
|
|
15782
15824
|
*/
|
|
15783
15825
|
alert_type?: defines.alert_type;
|
|
15784
15826
|
always_visible: boolean;
|
|
15785
15827
|
/**
|
|
15786
|
-
* The custom chart tag
|
|
15828
|
+
* The custom chart tag, if this pin specifically targets a chart tag.
|
|
15787
15829
|
*
|
|
15788
|
-
* The chart tag must be on the same force as the owning player.
|
|
15830
|
+
* The chart tag must be on the same force as the {@link owning player | runtime:LuaPin::owner}.
|
|
15789
15831
|
*/
|
|
15790
15832
|
chart_tag?: LuaCustomChartTag;
|
|
15791
15833
|
/**
|
|
15792
|
-
* The index of this pin
|
|
15834
|
+
* The index of this pin. The index is unique to this player.
|
|
15793
15835
|
*
|
|
15794
|
-
* Note that this index has no correlation to the position of the pin within {@link LuaPlayer::get_pins | runtime:LuaPlayer::get_pins}
|
|
15836
|
+
* Note that this index has no correlation to the position of the pin within {@link LuaPlayer::get_pins | runtime:LuaPlayer::get_pins}.
|
|
15795
15837
|
*/
|
|
15796
15838
|
readonly index: uint32;
|
|
15797
15839
|
/**
|
|
15798
|
-
* The label for this pin
|
|
15840
|
+
* The label for this pin, if any. This will be an empty string if there is no label set.
|
|
15799
15841
|
*/
|
|
15800
15842
|
label: string;
|
|
15801
15843
|
/**
|
|
@@ -15807,13 +15849,18 @@ interface LuaPin {
|
|
|
15807
15849
|
*/
|
|
15808
15850
|
readonly owner: LuaPlayer;
|
|
15809
15851
|
/**
|
|
15810
|
-
* The player that this pin
|
|
15852
|
+
* The player that this pin targets, if any.
|
|
15811
15853
|
*/
|
|
15812
|
-
player?: LuaPlayer;
|
|
15854
|
+
readonly player?: LuaPlayer;
|
|
15813
15855
|
/**
|
|
15814
|
-
* The
|
|
15856
|
+
* The player that this pin targets, if any.
|
|
15857
|
+
* @customName player
|
|
15858
|
+
*/
|
|
15859
|
+
player_write?: PlayerIdentification;
|
|
15860
|
+
/**
|
|
15861
|
+
* The position if this pin specifically targets a surface and position.
|
|
15815
15862
|
*
|
|
15816
|
-
*
|
|
15863
|
+
* When writing, and this pin was not bound to a specific surface and position, the default surface of nauvis is used.
|
|
15817
15864
|
*/
|
|
15818
15865
|
position?: MapPosition;
|
|
15819
15866
|
/**
|
|
@@ -15821,13 +15868,13 @@ interface LuaPin {
|
|
|
15821
15868
|
*/
|
|
15822
15869
|
preview_distance: uint16;
|
|
15823
15870
|
/**
|
|
15824
|
-
* The surface index if this pin specifically
|
|
15871
|
+
* The surface index if this pin specifically targets a surface and position.
|
|
15825
15872
|
*
|
|
15826
|
-
*
|
|
15873
|
+
* When writing, and this pin was not bound to a specific surface and position, the default position of `{0, 0}` is used.
|
|
15827
15874
|
*/
|
|
15828
15875
|
surface_index?: uint32;
|
|
15829
15876
|
/**
|
|
15830
|
-
* The
|
|
15877
|
+
* The entities that this pin targets, if any.
|
|
15831
15878
|
*/
|
|
15832
15879
|
targets: LuaEntity[];
|
|
15833
15880
|
/**
|
|
@@ -17698,7 +17745,7 @@ interface LuaRecipePrototype extends LuaPrototypeBase {
|
|
|
17698
17745
|
*/
|
|
17699
17746
|
readonly products: Product[];
|
|
17700
17747
|
/**
|
|
17701
|
-
* The multiplier used when this recipe is copied from an assembling machine to a requester chest. For each item in the recipe the
|
|
17748
|
+
* The multiplier used when this recipe is copied from an assembling machine to a requester chest or infinity chest. For each item ingredient in the recipe the `ingredient_amount * requester_paste_multiplier * machine_crafting_speed / energy_required` is set in the chest.
|
|
17702
17749
|
*/
|
|
17703
17750
|
readonly request_paste_multiplier: uint32;
|
|
17704
17751
|
/**
|
|
@@ -17970,6 +18017,7 @@ interface LuaRecord {
|
|
|
17970
18017
|
* The current count of mappers in the upgrade item.
|
|
17971
18018
|
*/
|
|
17972
18019
|
readonly mapper_count: uint32;
|
|
18020
|
+
readonly name: string;
|
|
17973
18021
|
/**
|
|
17974
18022
|
* 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.
|
|
17975
18023
|
*/
|
|
@@ -17982,6 +18030,15 @@ interface LuaRecord {
|
|
|
17982
18030
|
* The preview icons for this record.
|
|
17983
18031
|
*/
|
|
17984
18032
|
preview_icons: BlueprintSignalIcon[];
|
|
18033
|
+
readonly prototype: LuaItemPrototype;
|
|
18034
|
+
/**
|
|
18035
|
+
* Identifier of the record within its shelf.
|
|
18036
|
+
*/
|
|
18037
|
+
readonly record_id: uint32;
|
|
18038
|
+
/**
|
|
18039
|
+
* Identifier of the shelf this record is in. May correspond to a player index or be a special value when in game blueprints.
|
|
18040
|
+
*/
|
|
18041
|
+
readonly shelf_index: uint32;
|
|
17985
18042
|
/**
|
|
17986
18043
|
* The number of tile filters this deconstruction planner has.
|
|
17987
18044
|
*/
|
|
@@ -18102,11 +18159,15 @@ interface LuaRenderObject {
|
|
|
18102
18159
|
*/
|
|
18103
18160
|
animation: string;
|
|
18104
18161
|
/**
|
|
18105
|
-
*
|
|
18162
|
+
* Current frame of this animation. All writes update `animation_offset` to show the desired frame.
|
|
18163
|
+
*/
|
|
18164
|
+
animation_frame: double;
|
|
18165
|
+
/**
|
|
18166
|
+
* Animation offset of this animation, in frames. Relative to game tick 0. This means the current animation frame is `((tick * speed) + animation_offset) % frame_count` with speed defined as {@link LuaRenderObject::animation_speed | runtime:LuaRenderObject::animation_speed} multiplied by {@link AnimationPrototype::animation_speed | prototype:AnimationPrototype::animation_speed}.
|
|
18106
18167
|
*/
|
|
18107
18168
|
animation_offset: double;
|
|
18108
18169
|
/**
|
|
18109
|
-
* Animation speed of this animation
|
|
18170
|
+
* Animation speed of this animation, in frames per tick. It is multiplied by {@link animation speed | prototype:AnimationPrototype::animation_speed} of the selected animation prototype. Changing speed will update `animation_offset`, so that the current `animation_frame` stays the same. Set it to 0 if you want to pause the animation.
|
|
18110
18171
|
*/
|
|
18111
18172
|
animation_speed: double;
|
|
18112
18173
|
/**
|
|
@@ -18248,6 +18309,14 @@ interface LuaRenderObject {
|
|
|
18248
18309
|
* Sprite of the sprite or light.
|
|
18249
18310
|
*/
|
|
18250
18311
|
sprite: SpritePath;
|
|
18312
|
+
/**
|
|
18313
|
+
* Height of this sprite or animation in tiles. If set, the sprite or animation is stretched to this height regardless of its original size. `nil` if `y_scale` is set. Writing requires a number greater than 0 and clears `y_scale`.
|
|
18314
|
+
*/
|
|
18315
|
+
sprite_height?: double;
|
|
18316
|
+
/**
|
|
18317
|
+
* Width of this sprite or animation in tiles. If set, the sprite or animation is stretched to this width regardless of its original size. `nil` if `x_scale` is set. Writing requires a number greater than 0 and clears `x_scale`.
|
|
18318
|
+
*/
|
|
18319
|
+
sprite_width?: double;
|
|
18251
18320
|
/**
|
|
18252
18321
|
* Where this arc starts. Angle in radian.
|
|
18253
18322
|
*/
|
|
@@ -18311,13 +18380,13 @@ interface LuaRenderObject {
|
|
|
18311
18380
|
*/
|
|
18312
18381
|
width: float;
|
|
18313
18382
|
/**
|
|
18314
|
-
* Horizontal scale of this sprite or animation.
|
|
18383
|
+
* Horizontal scale of this sprite or animation. Write operation requires a valid number and clears `sprite_width`.
|
|
18315
18384
|
*/
|
|
18316
|
-
x_scale
|
|
18385
|
+
x_scale?: double;
|
|
18317
18386
|
/**
|
|
18318
|
-
* Vertical scale of this sprite or animation.
|
|
18387
|
+
* Vertical scale of this sprite or animation. Write operation requires a valid number and clears `sprite_height`.
|
|
18319
18388
|
*/
|
|
18320
|
-
y_scale
|
|
18389
|
+
y_scale?: double;
|
|
18321
18390
|
}
|
|
18322
18391
|
/**
|
|
18323
18392
|
* Allows rendering of geometric shapes, text and sprites in the game world through the global object named `rendering`. Each render object is identified by an id that is universally unique for the lifetime of a whole game.
|
|
@@ -18334,11 +18403,14 @@ interface LuaRendering {
|
|
|
18334
18403
|
* Create an animation.
|
|
18335
18404
|
* @param table.animation Name of an {@link AnimationPrototype | prototype:AnimationPrototype}.
|
|
18336
18405
|
* @param table.orientation The orientation of the animation. Default is 0.
|
|
18337
|
-
* @param table.x_scale Horizontal scale of the
|
|
18338
|
-
* @param table.y_scale Vertical scale of the
|
|
18406
|
+
* @param table.x_scale Horizontal scale of the sprite. Default is 1. Mutually exclusive with `sprite_width`.
|
|
18407
|
+
* @param table.y_scale Vertical scale of the sprite. Default is 1. Mutually exclusive with `sprite_height`.
|
|
18408
|
+
* @param table.sprite_width Width of the sprite in tiles. If given, the animation is stretched to this width regardless of its original size. Mutually exclusive with `x_scale`.
|
|
18409
|
+
* @param table.sprite_height Height of the sprite in tiles. If given, the animation is stretched to this height regardless of its original size. Mutually exclusive with `y_scale`.
|
|
18339
18410
|
* @param table.render_layer Render layer of the animation. Defaults to `"arrow"`.
|
|
18340
18411
|
* @param table.animation_speed How many frames the animation goes forward per tick. Default is 1.
|
|
18341
|
-
* @param table.animation_offset Offset of the animation in frames. Default is 0.
|
|
18412
|
+
* @param table.animation_offset Offset of the animation in frames relative to game tick 0. Default is 0.
|
|
18413
|
+
* @param table.animation_frame Frame the animation starts at. Takes precedence over `animation_offset`.
|
|
18342
18414
|
* @param table.orientation_target If given, the animation rotates so that it faces this target. Note that `orientation` is still applied to the animation.
|
|
18343
18415
|
* @param table.use_target_orientation Only used if `orientation_target` is a LuaEntity.
|
|
18344
18416
|
* @param table.oriented_offset Offsets the center of the animation if `orientation_target` is given. This offset will rotate together with the animation.
|
|
@@ -18358,10 +18430,13 @@ interface LuaRendering {
|
|
|
18358
18430
|
orientation?: RealOrientation;
|
|
18359
18431
|
x_scale?: double;
|
|
18360
18432
|
y_scale?: double;
|
|
18433
|
+
sprite_width?: double;
|
|
18434
|
+
sprite_height?: double;
|
|
18361
18435
|
tint?: Color;
|
|
18362
18436
|
render_layer?: RenderLayer;
|
|
18363
18437
|
animation_speed?: double;
|
|
18364
18438
|
animation_offset?: double;
|
|
18439
|
+
animation_frame?: double;
|
|
18365
18440
|
orientation_target?: ScriptRenderTarget;
|
|
18366
18441
|
use_target_orientation?: boolean;
|
|
18367
18442
|
oriented_offset?: Vector;
|
|
@@ -18597,8 +18672,10 @@ interface LuaRendering {
|
|
|
18597
18672
|
/**
|
|
18598
18673
|
* Create a sprite.
|
|
18599
18674
|
* @param table.orientation The orientation of the sprite. Default is 0.
|
|
18600
|
-
* @param table.x_scale Horizontal scale of the sprite. Default is 1.
|
|
18601
|
-
* @param table.y_scale Vertical scale of the sprite. Default is 1.
|
|
18675
|
+
* @param table.x_scale Horizontal scale of the sprite. Default is 1. Mutually exclusive with `sprite_width`.
|
|
18676
|
+
* @param table.y_scale Vertical scale of the sprite. Default is 1. Mutually exclusive with `sprite_height`.
|
|
18677
|
+
* @param table.sprite_width Width of the sprite in tiles. If given, the sprite is stretched to this width regardless of its original size. Mutually exclusive with `x_scale`.
|
|
18678
|
+
* @param table.sprite_height Height of the sprite in tiles. If given, the sprite is stretched to this height regardless of its original size. Mutually exclusive with `y_scale`.
|
|
18602
18679
|
* @param table.render_layer Render layer of the sprite. Defaults to `"arrow"`.
|
|
18603
18680
|
* @param table.orientation_target If given, the sprite rotates so that it faces this target. Note that `orientation` is still applied to the sprite.
|
|
18604
18681
|
* @param table.use_target_orientation Only used if `orientation_target` is a LuaEntity.
|
|
@@ -18627,6 +18704,8 @@ interface LuaRendering {
|
|
|
18627
18704
|
orientation?: RealOrientation;
|
|
18628
18705
|
x_scale?: double;
|
|
18629
18706
|
y_scale?: double;
|
|
18707
|
+
sprite_width?: double;
|
|
18708
|
+
sprite_height?: double;
|
|
18630
18709
|
tint?: Color;
|
|
18631
18710
|
render_layer?: RenderLayer;
|
|
18632
18711
|
orientation_target?: ScriptRenderTarget;
|
|
@@ -19311,6 +19390,7 @@ interface LuaSimulation {
|
|
|
19311
19390
|
camera_player_cursor_direction: defines.direction;
|
|
19312
19391
|
camera_player_cursor_position?: MapPosition;
|
|
19313
19392
|
camera_position?: MapPosition;
|
|
19393
|
+
camera_show_alerts: boolean;
|
|
19314
19394
|
camera_surface_index?: uint32;
|
|
19315
19395
|
camera_zoom: double;
|
|
19316
19396
|
gui_tooltip_interval: double;
|
|
@@ -23062,6 +23142,10 @@ interface LuaTransportLine {
|
|
|
23062
23142
|
* @returns Number of items actually removed.
|
|
23063
23143
|
*/
|
|
23064
23144
|
remove_item(this: void, items: ItemStackIdentification): uint32;
|
|
23145
|
+
/**
|
|
23146
|
+
* The index of this transport line in its owner.
|
|
23147
|
+
*/
|
|
23148
|
+
readonly index: defines.transport_line;
|
|
23065
23149
|
/**
|
|
23066
23150
|
* The transport lines that this transport line is fed by or an empty table if none.
|
|
23067
23151
|
*/
|
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 2.1.
|
|
5
|
+
// Factorio version 2.1.25
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -18,7 +18,7 @@ interface BaseAchievementPrototypeFilter {
|
|
|
18
18
|
/**
|
|
19
19
|
* The condition to filter on.
|
|
20
20
|
*/
|
|
21
|
-
filter: 'allowed-without-fight' | 'type';
|
|
21
|
+
filter: 'hidden' | 'hidden-in-factoriopedia' | 'is-parameter' | 'allowed-without-fight' | 'type';
|
|
22
22
|
/**
|
|
23
23
|
* How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
|
|
24
24
|
*/
|
|
@@ -309,7 +309,7 @@ interface AsteroidChunkPrototypeFilter {
|
|
|
309
309
|
/**
|
|
310
310
|
* The condition to filter on.
|
|
311
311
|
*/
|
|
312
|
-
filter: 'minable';
|
|
312
|
+
filter: 'hidden' | 'hidden-in-factoriopedia' | 'is-parameter' | 'minable';
|
|
313
313
|
/**
|
|
314
314
|
* How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
|
|
315
315
|
*/
|
|
@@ -2437,7 +2437,7 @@ interface BaseDecorativePrototypeFilter {
|
|
|
2437
2437
|
/**
|
|
2438
2438
|
* The condition to filter on.
|
|
2439
2439
|
*/
|
|
2440
|
-
filter: 'decal' | 'autoplace' | 'collision-mask';
|
|
2440
|
+
filter: 'hidden' | 'hidden-in-factoriopedia' | 'is-parameter' | 'decal' | 'autoplace' | 'collision-mask';
|
|
2441
2441
|
/**
|
|
2442
2442
|
* How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
|
|
2443
2443
|
*/
|
|
@@ -2714,11 +2714,11 @@ interface EnemyExpansionMapSettings {
|
|
|
2714
2714
|
*/
|
|
2715
2715
|
settler_group_min_size: uint32;
|
|
2716
2716
|
/**
|
|
2717
|
-
* The maximum size of a biter group that goes to build a new base. This is multiplied by the evolution factor. Defaults to `
|
|
2717
|
+
* The maximum size of a biter group that goes to build a new base. This is multiplied by the evolution factor. Defaults to `10`.
|
|
2718
2718
|
*/
|
|
2719
2719
|
settler_group_max_size: uint32;
|
|
2720
2720
|
/**
|
|
2721
|
-
* The minimum time between expansions in ticks. The actual cooldown is adjusted to the current evolution levels. Defaults to `
|
|
2721
|
+
* The minimum time between expansions in ticks. The actual cooldown is adjusted to the current evolution levels. Defaults to `10*3 600=36 000` ticks.
|
|
2722
2722
|
*/
|
|
2723
2723
|
min_expansion_cooldown: uint32;
|
|
2724
2724
|
/**
|
|
@@ -2788,7 +2788,7 @@ interface BaseEntityPrototypeFilter {
|
|
|
2788
2788
|
/**
|
|
2789
2789
|
* The condition to filter on.
|
|
2790
2790
|
*/
|
|
2791
|
-
filter: 'flying-robot' | 'robot-with-logistics-interface' | 'rail' | 'ghost' | 'explosion' | 'vehicle' | 'crafting-machine' | 'rolling-stock' | 'turret' | 'transport-belt-connectable' | 'wall-connectable' | 'buildable' | 'placable-in-editor' | 'clonable' | 'selectable' | 'hidden' | 'entity-with-health' | 'building' | 'fast-replaceable' | 'uses-direction' | 'minable' | 'circuit-connectable' | 'autoplace' | 'blueprintable' | 'item-to-place' | 'name' | 'type' | 'collision-mask' | 'flag' | 'selection-priority' | 'emissions-per-second' | 'crafting-category';
|
|
2791
|
+
filter: 'flying-robot' | 'robot-with-logistics-interface' | 'rail' | 'ghost' | 'explosion' | 'vehicle' | 'crafting-machine' | 'rolling-stock' | 'turret' | 'transport-belt-connectable' | 'wall-connectable' | 'buildable' | 'placable-in-editor' | 'clonable' | 'selectable' | 'hidden' | 'hidden-in-factoriopedia' | 'is-parameter' | 'entity-with-health' | 'building' | 'fast-replaceable' | 'uses-direction' | 'minable' | 'circuit-connectable' | 'autoplace' | 'blueprintable' | 'item-to-place' | 'name' | 'type' | 'collision-mask' | 'flag' | 'selection-priority' | 'emissions-per-second' | 'crafting-category';
|
|
2792
2792
|
/**
|
|
2793
2793
|
* How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
|
|
2794
2794
|
*/
|
|
@@ -3123,7 +3123,7 @@ interface BaseEquipmentPrototypeFilter {
|
|
|
3123
3123
|
/**
|
|
3124
3124
|
* The condition to filter on.
|
|
3125
3125
|
*/
|
|
3126
|
-
filter: 'item-to-place' | 'type';
|
|
3126
|
+
filter: 'hidden' | 'hidden-in-factoriopedia' | 'is-parameter' | 'item-to-place' | 'type';
|
|
3127
3127
|
/**
|
|
3128
3128
|
* How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
|
|
3129
3129
|
*/
|
|
@@ -3315,7 +3315,7 @@ interface BaseFluidPrototypeFilter {
|
|
|
3315
3315
|
/**
|
|
3316
3316
|
* The condition to filter on.
|
|
3317
3317
|
*/
|
|
3318
|
-
filter: 'hidden' | 'name' | 'subgroup' | 'default-temperature' | 'max-temperature' | 'heat-capacity' | 'fuel-value' | 'emissions-multiplier' | 'gas-temperature';
|
|
3318
|
+
filter: 'hidden' | 'hidden-in-factoriopedia' | 'is-parameter' | 'name' | 'subgroup' | 'default-temperature' | 'max-temperature' | 'heat-capacity' | 'fuel-value' | 'emissions-multiplier' | 'gas-temperature';
|
|
3319
3319
|
/**
|
|
3320
3320
|
* How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
|
|
3321
3321
|
*/
|
|
@@ -4059,6 +4059,8 @@ interface InventoryWithCustomStackSizeSpecification {
|
|
|
4059
4059
|
type ItemCountType = uint32;
|
|
4060
4060
|
/**
|
|
4061
4061
|
* An item filter may be specified in two ways, either as a string which is an item prototype name or as a table.
|
|
4062
|
+
*
|
|
4063
|
+
* If this is specified as a string that is an item prototype name, then quality is set to `"normal"` and the comparator is set to `"="`, so only normal quality items will match the filter.
|
|
4062
4064
|
*/
|
|
4063
4065
|
type ItemFilter = {
|
|
4064
4066
|
/**
|
|
@@ -4066,11 +4068,11 @@ type ItemFilter = {
|
|
|
4066
4068
|
*/
|
|
4067
4069
|
name?: ItemID;
|
|
4068
4070
|
/**
|
|
4069
|
-
* The quality.
|
|
4071
|
+
* The quality. Defaults to empty, so any quality items will match the filter.
|
|
4070
4072
|
*/
|
|
4071
4073
|
quality?: QualityID;
|
|
4072
4074
|
/**
|
|
4073
|
-
* The quality comparison type.
|
|
4075
|
+
* The quality comparison type. Defaults to `"="`.
|
|
4074
4076
|
*/
|
|
4075
4077
|
comparator?: ComparatorString;
|
|
4076
4078
|
} | string;
|
|
@@ -5334,7 +5336,7 @@ interface LuaEntityMarkedForUpgradeEventFilterType extends BaseLuaEntityMarkedFo
|
|
|
5334
5336
|
'type': string;
|
|
5335
5337
|
}
|
|
5336
5338
|
/**
|
|
5337
|
-
*
|
|
5339
|
+
* An event name may be specified in one of four ways.
|
|
5338
5340
|
*/
|
|
5339
5341
|
type LuaEventType = /**
|
|
5340
5342
|
* Custom event prototype.
|
|
@@ -5346,7 +5348,7 @@ LuaCustomInputPrototype | /**
|
|
|
5346
5348
|
* Event identifier.
|
|
5347
5349
|
*/
|
|
5348
5350
|
defines.events | /**
|
|
5349
|
-
* Name of
|
|
5351
|
+
* Name of a built-in event, custom event prototype or custom input prototype.
|
|
5350
5352
|
*/
|
|
5351
5353
|
string;
|
|
5352
5354
|
/**
|
|
@@ -7295,7 +7297,7 @@ interface BaseModSettingPrototypeFilter {
|
|
|
7295
7297
|
/**
|
|
7296
7298
|
* The condition to filter on.
|
|
7297
7299
|
*/
|
|
7298
|
-
filter: 'type' | 'mod' | 'setting-type';
|
|
7300
|
+
filter: 'hidden' | 'hidden-in-factoriopedia' | 'is-parameter' | 'type' | 'mod' | 'setting-type';
|
|
7299
7301
|
/**
|
|
7300
7302
|
* How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
|
|
7301
7303
|
*/
|
|
@@ -8256,7 +8258,7 @@ interface BaseRecipePrototypeFilter {
|
|
|
8256
8258
|
/**
|
|
8257
8259
|
* The condition to filter on.
|
|
8258
8260
|
*/
|
|
8259
|
-
filter: 'enabled' | 'hidden' | 'hidden-from-flow-stats' | 'hidden-from-player-crafting' | 'allow-as-intermediate' | 'allow-intermediates' | 'allow-decomposition' | 'always-show-made-in' | 'has-ingredients' | 'has-products' | 'has-ingredient-item' | 'has-ingredient-fluid' | 'has-product-item' | 'has-product-fluid' | 'subgroup' | 'category' | 'energy' | 'emissions-multiplier' | 'request-paste-multiplier' | 'overload-multiplier';
|
|
8261
|
+
filter: 'enabled' | 'hidden' | 'hidden-from-flow-stats' | 'hidden-from-player-crafting' | 'hidden-in-factoriopedia' | 'is-parameter' | 'allow-as-intermediate' | 'allow-intermediates' | 'allow-decomposition' | 'always-show-made-in' | 'has-ingredients' | 'has-products' | 'has-ingredient-item' | 'has-ingredient-fluid' | 'has-product-item' | 'has-product-fluid' | 'subgroup' | 'category' | 'energy' | 'emissions-multiplier' | 'request-paste-multiplier' | 'overload-multiplier';
|
|
8260
8262
|
/**
|
|
8261
8263
|
* How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
|
|
8262
8264
|
*/
|
|
@@ -8891,9 +8893,21 @@ interface ScheduleRecord {
|
|
|
8891
8893
|
* When a train is allowed to reach rail target from any direction it will be `nil`. If rail has to be reached from specific direction, this value allows to choose the direction. This value corresponds to {@link LuaEntity::connected_rail_direction | runtime:LuaEntity::connected_rail_direction} of a TrainStop.
|
|
8892
8894
|
*/
|
|
8893
8895
|
rail_direction?: defines.rail_direction;
|
|
8896
|
+
/**
|
|
8897
|
+
* When reading this will always be present but may be an empty array.
|
|
8898
|
+
*/
|
|
8894
8899
|
wait_conditions?: WaitCondition[];
|
|
8900
|
+
/**
|
|
8901
|
+
* When reading this will always be present. Defaults to `false` when writing.
|
|
8902
|
+
*/
|
|
8895
8903
|
temporary?: boolean;
|
|
8904
|
+
/**
|
|
8905
|
+
* When reading this will always be present. Defaults to `false` when writing.
|
|
8906
|
+
*/
|
|
8896
8907
|
created_by_interrupt?: boolean;
|
|
8908
|
+
/**
|
|
8909
|
+
* When reading this will always be present. Defaults to `true` when writing.
|
|
8910
|
+
*/
|
|
8897
8911
|
allows_unloading?: boolean;
|
|
8898
8912
|
}
|
|
8899
8913
|
interface ScheduleRecordPosition {
|
|
@@ -9609,7 +9623,7 @@ interface BaseSpaceLocationPrototypeFilter {
|
|
|
9609
9623
|
/**
|
|
9610
9624
|
* The condition to filter on.
|
|
9611
9625
|
*/
|
|
9612
|
-
filter: 'fly-condition' | 'type' | 'solar-power-in-space';
|
|
9626
|
+
filter: 'hidden' | 'hidden-in-factoriopedia' | 'is-parameter' | 'fly-condition' | 'type' | 'solar-power-in-space';
|
|
9613
9627
|
/**
|
|
9614
9628
|
* How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
|
|
9615
9629
|
*/
|
|
@@ -10635,7 +10649,7 @@ interface BaseTechnologyPrototypeFilter {
|
|
|
10635
10649
|
/**
|
|
10636
10650
|
* The condition to filter on.
|
|
10637
10651
|
*/
|
|
10638
|
-
filter: 'enabled' | 'hidden' | 'upgrade' | 'visible-when-disabled' | 'has-effects' | 'has-prerequisites' | 'research-unit-ingredient' | 'unlocks-recipe' | 'level' | 'max-level' | 'time';
|
|
10652
|
+
filter: 'enabled' | 'hidden' | 'hidden-in-factoriopedia' | 'is-parameter' | 'upgrade' | 'visible-when-disabled' | 'has-effects' | 'has-prerequisites' | 'research-unit-ingredient' | 'unlocks-recipe' | 'level' | 'max-level' | 'time';
|
|
10639
10653
|
/**
|
|
10640
10654
|
* How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
|
|
10641
10655
|
*/
|
|
@@ -10801,7 +10815,7 @@ interface BaseTilePrototypeFilter {
|
|
|
10801
10815
|
/**
|
|
10802
10816
|
* The condition to filter on.
|
|
10803
10817
|
*/
|
|
10804
|
-
filter: 'minable' | 'autoplace' | 'blueprintable' | 'item-to-place' | 'collision-mask' | 'walking-speed-modifier' | 'vehicle-friction-modifier' | 'decorative-removal-probability' | 'absorptions-per-second';
|
|
10818
|
+
filter: 'hidden' | 'hidden-in-factoriopedia' | 'is-parameter' | 'minable' | 'autoplace' | 'blueprintable' | 'item-to-place' | 'collision-mask' | 'walking-speed-modifier' | 'vehicle-friction-modifier' | 'decorative-removal-probability' | 'absorptions-per-second';
|
|
10805
10819
|
/**
|
|
10806
10820
|
* How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
|
|
10807
10821
|
*/
|
|
@@ -12509,7 +12523,7 @@ interface VirtualSignalPrototypeFilter {
|
|
|
12509
12523
|
/**
|
|
12510
12524
|
* The condition to filter on.
|
|
12511
12525
|
*/
|
|
12512
|
-
filter: 'special-signal';
|
|
12526
|
+
filter: 'hidden' | 'hidden-in-factoriopedia' | 'is-parameter' | 'special-signal';
|
|
12513
12527
|
/**
|
|
12514
12528
|
* How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
|
|
12515
12529
|
*/
|
package/dist/datacollection.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/prototype-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version 2.1.
|
|
5
|
+
// Factorio version 2.1.25
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|