factorio-types 1.2.69 → 1.2.71
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 +157 -35
- package/dist/concepts.d.ts +72 -22
- package/dist/datacollection.d.ts +1 -1
- package/dist/defines.d.ts +342 -332
- package/dist/events.d.ts +218 -1
- package/dist/global.d.ts +1 -1
- package/dist/prototypes.d.ts +140 -18
- package/dist/types.d.ts +90 -29
- package/package.json +2 -2
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 2.1.
|
|
5
|
+
// Factorio version 2.1.22
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -1839,6 +1839,10 @@ interface on_player_alt_reverse_selected_area {
|
|
|
1839
1839
|
* The area selected.
|
|
1840
1840
|
*/
|
|
1841
1841
|
area: BoundingBox;
|
|
1842
|
+
/**
|
|
1843
|
+
* The player cursor position.
|
|
1844
|
+
*/
|
|
1845
|
+
cursor_position: MapPosition;
|
|
1842
1846
|
/**
|
|
1843
1847
|
* The entities selected.
|
|
1844
1848
|
*/
|
|
@@ -1855,6 +1859,11 @@ interface on_player_alt_reverse_selected_area {
|
|
|
1855
1859
|
* The player doing the selection.
|
|
1856
1860
|
*/
|
|
1857
1861
|
player_index: uint32;
|
|
1862
|
+
/**
|
|
1863
|
+
* The position where the player started the selection.
|
|
1864
|
+
*/
|
|
1865
|
+
position: MapPosition;
|
|
1866
|
+
selection_mode: defines.selection_mode;
|
|
1858
1867
|
/**
|
|
1859
1868
|
* The surface selected.
|
|
1860
1869
|
*/
|
|
@@ -1876,6 +1885,10 @@ interface on_player_alt_selected_area {
|
|
|
1876
1885
|
* The area selected.
|
|
1877
1886
|
*/
|
|
1878
1887
|
area: BoundingBox;
|
|
1888
|
+
/**
|
|
1889
|
+
* The player cursor position.
|
|
1890
|
+
*/
|
|
1891
|
+
cursor_position: MapPosition;
|
|
1879
1892
|
/**
|
|
1880
1893
|
* The entities selected.
|
|
1881
1894
|
*/
|
|
@@ -1892,10 +1905,15 @@ interface on_player_alt_selected_area {
|
|
|
1892
1905
|
* The player doing the selection.
|
|
1893
1906
|
*/
|
|
1894
1907
|
player_index: uint32;
|
|
1908
|
+
/**
|
|
1909
|
+
* The position where the player started the selection.
|
|
1910
|
+
*/
|
|
1911
|
+
position: MapPosition;
|
|
1895
1912
|
/**
|
|
1896
1913
|
* The item quality used to select the area.
|
|
1897
1914
|
*/
|
|
1898
1915
|
quality: string;
|
|
1916
|
+
selection_mode: defines.selection_mode;
|
|
1899
1917
|
/**
|
|
1900
1918
|
* The surface selected.
|
|
1901
1919
|
*/
|
|
@@ -2004,6 +2022,58 @@ interface on_player_built_tile {
|
|
|
2004
2022
|
*/
|
|
2005
2023
|
tiles: OldTileAndPosition[];
|
|
2006
2024
|
}
|
|
2025
|
+
/**
|
|
2026
|
+
* Called after a player cancels their attempt to select an area with a selection-tool item that has {@link SelectionToolPrototype::send_pre_selection_events | prototype:SelectionToolPrototype::send_pre_selection_events} set to `true`.
|
|
2027
|
+
*
|
|
2028
|
+
* Because a player's selection state exists solely on their local client and not in game state, this event and the other area preselection events are provided with "best effort", but are not guaranteed. In some situations, such as after loading an existing save or in a multiplayer game, preselection events may not be received in an order that makes sense for the current game state or may be dropped altogether.
|
|
2029
|
+
*/
|
|
2030
|
+
interface on_player_cancel_selected_area {
|
|
2031
|
+
/**
|
|
2032
|
+
* The area selected.
|
|
2033
|
+
*/
|
|
2034
|
+
area: BoundingBox;
|
|
2035
|
+
/**
|
|
2036
|
+
* The player cursor position.
|
|
2037
|
+
*/
|
|
2038
|
+
cursor_position: MapPosition;
|
|
2039
|
+
/**
|
|
2040
|
+
* The entities selected.
|
|
2041
|
+
*/
|
|
2042
|
+
entities: LuaEntity[];
|
|
2043
|
+
/**
|
|
2044
|
+
* The item used to select the area.
|
|
2045
|
+
*/
|
|
2046
|
+
item: string;
|
|
2047
|
+
/**
|
|
2048
|
+
* Identifier of the event.
|
|
2049
|
+
*/
|
|
2050
|
+
name: defines.events;
|
|
2051
|
+
/**
|
|
2052
|
+
* The player doing the selection.
|
|
2053
|
+
*/
|
|
2054
|
+
player_index: uint32;
|
|
2055
|
+
/**
|
|
2056
|
+
* The position where the player started the selection.
|
|
2057
|
+
*/
|
|
2058
|
+
position: MapPosition;
|
|
2059
|
+
/**
|
|
2060
|
+
* The item quality used to select the area.
|
|
2061
|
+
*/
|
|
2062
|
+
quality: string;
|
|
2063
|
+
selection_mode: defines.selection_mode;
|
|
2064
|
+
/**
|
|
2065
|
+
* The surface selected.
|
|
2066
|
+
*/
|
|
2067
|
+
surface: LuaSurface;
|
|
2068
|
+
/**
|
|
2069
|
+
* Tick the event was generated.
|
|
2070
|
+
*/
|
|
2071
|
+
tick: MapTick;
|
|
2072
|
+
/**
|
|
2073
|
+
* The tiles selected.
|
|
2074
|
+
*/
|
|
2075
|
+
tiles: LuaTile[];
|
|
2076
|
+
}
|
|
2007
2077
|
/**
|
|
2008
2078
|
* Called when a player cancels crafting.
|
|
2009
2079
|
*/
|
|
@@ -2033,6 +2103,58 @@ interface on_player_cancelled_crafting {
|
|
|
2033
2103
|
*/
|
|
2034
2104
|
tick: MapTick;
|
|
2035
2105
|
}
|
|
2106
|
+
/**
|
|
2107
|
+
* Called after a player changes the selection area or selection type with a selection-tool item that has {@link SelectionToolPrototype::send_pre_selection_events | prototype:SelectionToolPrototype::send_pre_selection_events} set to `true`.
|
|
2108
|
+
*
|
|
2109
|
+
* Because a player's selection state exists solely on their local client and not in game state, this event and the other area preselection events are provided with "best effort", but are not guaranteed. In some situations, such as after loading an existing save or in a multiplayer game, preselection events may not be received in an order that makes sense for the current game state or may be dropped altogether.
|
|
2110
|
+
*/
|
|
2111
|
+
interface on_player_change_selected_area {
|
|
2112
|
+
/**
|
|
2113
|
+
* The area selected.
|
|
2114
|
+
*/
|
|
2115
|
+
area: BoundingBox;
|
|
2116
|
+
/**
|
|
2117
|
+
* The player cursor position.
|
|
2118
|
+
*/
|
|
2119
|
+
cursor_position: MapPosition;
|
|
2120
|
+
/**
|
|
2121
|
+
* The entities selected.
|
|
2122
|
+
*/
|
|
2123
|
+
entities: LuaEntity[];
|
|
2124
|
+
/**
|
|
2125
|
+
* The item used to select the area.
|
|
2126
|
+
*/
|
|
2127
|
+
item: string;
|
|
2128
|
+
/**
|
|
2129
|
+
* Identifier of the event.
|
|
2130
|
+
*/
|
|
2131
|
+
name: defines.events;
|
|
2132
|
+
/**
|
|
2133
|
+
* The player doing the selection.
|
|
2134
|
+
*/
|
|
2135
|
+
player_index: uint32;
|
|
2136
|
+
/**
|
|
2137
|
+
* The position where the player started the selection.
|
|
2138
|
+
*/
|
|
2139
|
+
position: MapPosition;
|
|
2140
|
+
/**
|
|
2141
|
+
* The item quality used to select the area.
|
|
2142
|
+
*/
|
|
2143
|
+
quality: string;
|
|
2144
|
+
selection_mode: defines.selection_mode;
|
|
2145
|
+
/**
|
|
2146
|
+
* The surface selected.
|
|
2147
|
+
*/
|
|
2148
|
+
surface: LuaSurface;
|
|
2149
|
+
/**
|
|
2150
|
+
* Tick the event was generated.
|
|
2151
|
+
*/
|
|
2152
|
+
tick: MapTick;
|
|
2153
|
+
/**
|
|
2154
|
+
* The tiles selected.
|
|
2155
|
+
*/
|
|
2156
|
+
tiles: LuaTile[];
|
|
2157
|
+
}
|
|
2036
2158
|
/**
|
|
2037
2159
|
* Called after a player changes forces.
|
|
2038
2160
|
*/
|
|
@@ -2285,6 +2407,10 @@ interface on_player_deconstructed_area {
|
|
|
2285
2407
|
* The area selected.
|
|
2286
2408
|
*/
|
|
2287
2409
|
area: BoundingBox;
|
|
2410
|
+
/**
|
|
2411
|
+
* The player cursor position.
|
|
2412
|
+
*/
|
|
2413
|
+
cursor_position: MapPosition;
|
|
2288
2414
|
/**
|
|
2289
2415
|
* The item used to select the area.
|
|
2290
2416
|
*/
|
|
@@ -2297,6 +2423,10 @@ interface on_player_deconstructed_area {
|
|
|
2297
2423
|
* The player doing the selection.
|
|
2298
2424
|
*/
|
|
2299
2425
|
player_index: uint32;
|
|
2426
|
+
/**
|
|
2427
|
+
* The position where the player started the selection.
|
|
2428
|
+
*/
|
|
2429
|
+
position: MapPosition;
|
|
2300
2430
|
/**
|
|
2301
2431
|
* The item quality used to select the area.
|
|
2302
2432
|
*/
|
|
@@ -2935,6 +3065,10 @@ interface on_player_reverse_selected_area {
|
|
|
2935
3065
|
* The area selected.
|
|
2936
3066
|
*/
|
|
2937
3067
|
area: BoundingBox;
|
|
3068
|
+
/**
|
|
3069
|
+
* The player cursor position.
|
|
3070
|
+
*/
|
|
3071
|
+
cursor_position: MapPosition;
|
|
2938
3072
|
/**
|
|
2939
3073
|
* The entities selected.
|
|
2940
3074
|
*/
|
|
@@ -2951,6 +3085,11 @@ interface on_player_reverse_selected_area {
|
|
|
2951
3085
|
* The player doing the selection.
|
|
2952
3086
|
*/
|
|
2953
3087
|
player_index: uint32;
|
|
3088
|
+
/**
|
|
3089
|
+
* The position where the player started the selection.
|
|
3090
|
+
*/
|
|
3091
|
+
position: MapPosition;
|
|
3092
|
+
selection_mode: defines.selection_mode;
|
|
2954
3093
|
/**
|
|
2955
3094
|
* The surface selected.
|
|
2956
3095
|
*/
|
|
@@ -2997,6 +3136,10 @@ interface on_player_selected_area {
|
|
|
2997
3136
|
* The area selected.
|
|
2998
3137
|
*/
|
|
2999
3138
|
area: BoundingBox;
|
|
3139
|
+
/**
|
|
3140
|
+
* The player cursor position.
|
|
3141
|
+
*/
|
|
3142
|
+
cursor_position: MapPosition;
|
|
3000
3143
|
/**
|
|
3001
3144
|
* The entities selected.
|
|
3002
3145
|
*/
|
|
@@ -3013,10 +3156,15 @@ interface on_player_selected_area {
|
|
|
3013
3156
|
* The player doing the selection.
|
|
3014
3157
|
*/
|
|
3015
3158
|
player_index: uint32;
|
|
3159
|
+
/**
|
|
3160
|
+
* The position where the player started the selection.
|
|
3161
|
+
*/
|
|
3162
|
+
position: MapPosition;
|
|
3016
3163
|
/**
|
|
3017
3164
|
* The item quality used to select the area.
|
|
3018
3165
|
*/
|
|
3019
3166
|
quality: string;
|
|
3167
|
+
selection_mode: defines.selection_mode;
|
|
3020
3168
|
/**
|
|
3021
3169
|
* The surface selected.
|
|
3022
3170
|
*/
|
|
@@ -3056,6 +3204,10 @@ interface on_player_setup_blueprint {
|
|
|
3056
3204
|
* The area selected.
|
|
3057
3205
|
*/
|
|
3058
3206
|
area: BoundingBox;
|
|
3207
|
+
/**
|
|
3208
|
+
* The player cursor position.
|
|
3209
|
+
*/
|
|
3210
|
+
cursor_position: MapPosition;
|
|
3059
3211
|
/**
|
|
3060
3212
|
* The item used to select the area.
|
|
3061
3213
|
*/
|
|
@@ -3072,6 +3224,10 @@ interface on_player_setup_blueprint {
|
|
|
3072
3224
|
* The player doing the selection.
|
|
3073
3225
|
*/
|
|
3074
3226
|
player_index: uint32;
|
|
3227
|
+
/**
|
|
3228
|
+
* The position where the player started the selection.
|
|
3229
|
+
*/
|
|
3230
|
+
position: MapPosition;
|
|
3075
3231
|
/**
|
|
3076
3232
|
* The item quality used to select the area.
|
|
3077
3233
|
*/
|
|
@@ -3093,6 +3249,58 @@ interface on_player_setup_blueprint {
|
|
|
3093
3249
|
*/
|
|
3094
3250
|
tick: MapTick;
|
|
3095
3251
|
}
|
|
3252
|
+
/**
|
|
3253
|
+
* Called after a player starts to select an area with a selection-tool item that has {@link SelectionToolPrototype::send_pre_selection_events | prototype:SelectionToolPrototype::send_pre_selection_events} set to `true`.
|
|
3254
|
+
*
|
|
3255
|
+
* Because a player's selection state exists solely on their local client and not in game state, this event and the other area preselection events are provided with "best effort", but are not guaranteed. In some situations, such as after loading an existing save or in a multiplayer game, preselection events may not be received in an order that makes sense for the current game state or may be dropped altogether.
|
|
3256
|
+
*/
|
|
3257
|
+
interface on_player_start_selected_area {
|
|
3258
|
+
/**
|
|
3259
|
+
* The area selected.
|
|
3260
|
+
*/
|
|
3261
|
+
area: BoundingBox;
|
|
3262
|
+
/**
|
|
3263
|
+
* The player cursor position.
|
|
3264
|
+
*/
|
|
3265
|
+
cursor_position: MapPosition;
|
|
3266
|
+
/**
|
|
3267
|
+
* The entities selected.
|
|
3268
|
+
*/
|
|
3269
|
+
entities: LuaEntity[];
|
|
3270
|
+
/**
|
|
3271
|
+
* The item used to select the area.
|
|
3272
|
+
*/
|
|
3273
|
+
item: string;
|
|
3274
|
+
/**
|
|
3275
|
+
* Identifier of the event.
|
|
3276
|
+
*/
|
|
3277
|
+
name: defines.events;
|
|
3278
|
+
/**
|
|
3279
|
+
* The player doing the selection.
|
|
3280
|
+
*/
|
|
3281
|
+
player_index: uint32;
|
|
3282
|
+
/**
|
|
3283
|
+
* The position where the player started the selection.
|
|
3284
|
+
*/
|
|
3285
|
+
position: MapPosition;
|
|
3286
|
+
/**
|
|
3287
|
+
* The item quality used to select the area.
|
|
3288
|
+
*/
|
|
3289
|
+
quality: string;
|
|
3290
|
+
selection_mode: defines.selection_mode;
|
|
3291
|
+
/**
|
|
3292
|
+
* The surface selected.
|
|
3293
|
+
*/
|
|
3294
|
+
surface: LuaSurface;
|
|
3295
|
+
/**
|
|
3296
|
+
* Tick the event was generated.
|
|
3297
|
+
*/
|
|
3298
|
+
tick: MapTick;
|
|
3299
|
+
/**
|
|
3300
|
+
* The tiles selected.
|
|
3301
|
+
*/
|
|
3302
|
+
tiles: LuaTile[];
|
|
3303
|
+
}
|
|
3096
3304
|
/**
|
|
3097
3305
|
* Called after a player super-forced-selects an area with a selection-tool item.
|
|
3098
3306
|
*/
|
|
@@ -3101,6 +3309,10 @@ interface on_player_super_forced_selected_area {
|
|
|
3101
3309
|
* The area selected.
|
|
3102
3310
|
*/
|
|
3103
3311
|
area: BoundingBox;
|
|
3312
|
+
/**
|
|
3313
|
+
* The player cursor position.
|
|
3314
|
+
*/
|
|
3315
|
+
cursor_position: MapPosition;
|
|
3104
3316
|
/**
|
|
3105
3317
|
* The entities selected.
|
|
3106
3318
|
*/
|
|
@@ -3117,10 +3329,15 @@ interface on_player_super_forced_selected_area {
|
|
|
3117
3329
|
* The player doing the selection.
|
|
3118
3330
|
*/
|
|
3119
3331
|
player_index: uint32;
|
|
3332
|
+
/**
|
|
3333
|
+
* The position where the player started the selection.
|
|
3334
|
+
*/
|
|
3335
|
+
position: MapPosition;
|
|
3120
3336
|
/**
|
|
3121
3337
|
* The item quality used to select the area.
|
|
3122
3338
|
*/
|
|
3123
3339
|
quality: string;
|
|
3340
|
+
selection_mode: defines.selection_mode;
|
|
3124
3341
|
/**
|
|
3125
3342
|
* The surface selected.
|
|
3126
3343
|
*/
|
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 2.1.
|
|
5
|
+
// Factorio version 2.1.22
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
/**
|