factorio-types 1.2.22 → 1.2.24
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 +13 -7
- package/dist/concepts.d.ts +2 -1
- package/dist/datacollection.d.ts +1 -1
- package/dist/defines.d.ts +4 -1
- package/dist/events.d.ts +1 -1
- package/dist/global.d.ts +1 -1
- package/dist/prototypes.d.ts +7 -2
- package/dist/types.d.ts +32 -28
- 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.0.
|
|
5
|
+
// Factorio version 2.0.33
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -7336,6 +7336,10 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
7336
7336
|
* The maximum wire distance for this entity. 0 if the entity doesn't support wires.
|
|
7337
7337
|
*/
|
|
7338
7338
|
get_max_wire_distance(this: void, quality?: QualityID): double;
|
|
7339
|
+
/**
|
|
7340
|
+
* The pumping speed of this offshore or normal pump.
|
|
7341
|
+
*/
|
|
7342
|
+
get_pumping_speed(this: void, quality?: QualityID): double;
|
|
7339
7343
|
/**
|
|
7340
7344
|
* The base researching speed of this lab prototype.
|
|
7341
7345
|
*/
|
|
@@ -8041,7 +8045,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8041
8045
|
*/
|
|
8042
8046
|
readonly protected_from_tile_building: boolean;
|
|
8043
8047
|
/**
|
|
8044
|
-
* The pumping speed of this offshore or normal pump.
|
|
8048
|
+
* The pumping speed of this offshore or normal pump. This property is deprecated in favor of {@link LuaEntityPrototype::get_pumping_speed | runtime:LuaEntityPrototype::get_pumping_speed} and should not be used.
|
|
8045
8049
|
*/
|
|
8046
8050
|
readonly pumping_speed?: double;
|
|
8047
8051
|
/**
|
|
@@ -10078,7 +10082,7 @@ interface LuaGameScript {
|
|
|
10078
10082
|
/**
|
|
10079
10083
|
* Current map tick.
|
|
10080
10084
|
*/
|
|
10081
|
-
readonly tick:
|
|
10085
|
+
readonly tick: MapTick;
|
|
10082
10086
|
/**
|
|
10083
10087
|
* If the tick has been paused. This means that entity update has been paused.
|
|
10084
10088
|
*/
|
|
@@ -10088,7 +10092,7 @@ interface LuaGameScript {
|
|
|
10088
10092
|
*
|
|
10089
10093
|
* This differs from {@link LuaGameScript::tick | runtime:LuaGameScript::tick} in that creating a game from a scenario always starts with this value at `0`, even if the scenario has its own level data where the `tick` has progressed past `0`.
|
|
10090
10094
|
*/
|
|
10091
|
-
readonly ticks_played:
|
|
10095
|
+
readonly ticks_played: MapTick;
|
|
10092
10096
|
/**
|
|
10093
10097
|
* The number of ticks to be run while the tick is paused.
|
|
10094
10098
|
*
|
|
@@ -10343,7 +10347,7 @@ interface LuaGuiElement {
|
|
|
10343
10347
|
/**
|
|
10344
10348
|
* Removes the given tab and its associated content from this tabbed pane.
|
|
10345
10349
|
*
|
|
10346
|
-
* Removing a tab does not destroy the tab or the tab contents. It just removes them from the view.
|
|
10350
|
+
* Removing a tab does not destroy the tab or the tab contents. It just removes them from the view.
|
|
10347
10351
|
* @param tab The tab to remove or `nil` to remove all tabs.
|
|
10348
10352
|
*/
|
|
10349
10353
|
remove_tab(this: void, tab?: LuaGuiElement): void;
|
|
@@ -12470,7 +12474,7 @@ interface LuaItemStack extends LuaItemCommon {
|
|
|
12470
12474
|
/**
|
|
12471
12475
|
* The tick this item spoils, or `0` if it does not spoil. When writing, setting to anything < the current game tick will spoil the item instantly.
|
|
12472
12476
|
*/
|
|
12473
|
-
spoil_tick:
|
|
12477
|
+
spoil_tick: MapTick;
|
|
12474
12478
|
/**
|
|
12475
12479
|
* Type of the item prototype.
|
|
12476
12480
|
*/
|
|
@@ -13436,6 +13440,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
13436
13440
|
* Local flying text is not saved, which means it will disappear after a save/load-cycle.
|
|
13437
13441
|
* @param table.text The flying text to show.
|
|
13438
13442
|
* @param table.position The location on the map at which to show the flying text.
|
|
13443
|
+
* @param table.surface The surface which this text will be shown on. Defaults to player surface.
|
|
13439
13444
|
* @param table.create_at_cursor If `true`, the flying text is created at the player's cursor. Defaults to `false`.
|
|
13440
13445
|
* @param table.color The color of the flying text. Defaults to white text.
|
|
13441
13446
|
* @param table.time_to_live The amount of ticks that the flying text will be shown for. Defaults to `80`.
|
|
@@ -13444,6 +13449,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
13444
13449
|
create_local_flying_text(this: void, table: {
|
|
13445
13450
|
text: LocalisedString;
|
|
13446
13451
|
position?: MapPosition;
|
|
13452
|
+
surface?: SurfaceIdentification;
|
|
13447
13453
|
create_at_cursor?: boolean;
|
|
13448
13454
|
color?: Color;
|
|
13449
13455
|
time_to_live?: uint;
|
|
@@ -13902,7 +13908,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
13902
13908
|
*/
|
|
13903
13909
|
remove_unfiltered_items: boolean;
|
|
13904
13910
|
/**
|
|
13905
|
-
* The render mode of the player, like map or zoom to world.
|
|
13911
|
+
* The render mode of the player, like map or zoom to world.
|
|
13906
13912
|
*/
|
|
13907
13913
|
readonly render_mode: defines.render_mode;
|
|
13908
13914
|
/**
|
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.0.
|
|
5
|
+
// Factorio version 2.0.33
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -5587,6 +5587,7 @@ interface PipeConnectionDefinition {
|
|
|
5587
5587
|
max_underground_distance?: uint;
|
|
5588
5588
|
flow_direction: 'input-output' | 'input' | 'output';
|
|
5589
5589
|
direction: defines.direction;
|
|
5590
|
+
connection_category: string[];
|
|
5590
5591
|
/**
|
|
5591
5592
|
* Only supplied if `connection_type` is `"linked"`.
|
|
5592
5593
|
*/
|
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.0.
|
|
5
|
+
// Factorio version 2.0.33
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
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 2.0.
|
|
5
|
+
// Factorio version 2.0.33
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace defines {
|
|
@@ -1185,6 +1185,9 @@ enum input_method {
|
|
|
1185
1185
|
enum inventory {
|
|
1186
1186
|
artillery_turret_ammo = 43,
|
|
1187
1187
|
artillery_wagon_ammo = 44,
|
|
1188
|
+
/**
|
|
1189
|
+
* Used when items are ejected or items held by inserters cannot be inserted due to changing the recipe with the circuit network.
|
|
1190
|
+
*/
|
|
1188
1191
|
assembling_machine_dump = 25,
|
|
1189
1192
|
assembling_machine_input = 22,
|
|
1190
1193
|
assembling_machine_modules = 24,
|
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.0.
|
|
5
|
+
// Factorio version 2.0.33
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
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.0.
|
|
5
|
+
// Factorio version 2.0.33
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
/**
|
package/dist/prototypes.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.0.
|
|
5
|
+
// Factorio version 2.0.33
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -57,7 +57,7 @@ declare namespace prototype {
|
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
idle_sound = {filename = "__base__/sound/accumulator-idle.ogg", volume = 0.35},
|
|
60
|
-
|
|
60
|
+
max_sounds_per_prototype = 3,
|
|
61
61
|
audible_distance_modifier = 0.5
|
|
62
62
|
},
|
|
63
63
|
|
|
@@ -3765,6 +3765,7 @@ interface FluidStreamPrototype extends EntityPrototype {
|
|
|
3765
3765
|
special_neutral_target_damage?: DamageParameters;
|
|
3766
3766
|
spine_animation?: Animation;
|
|
3767
3767
|
stream_light?: LightDefinition;
|
|
3768
|
+
target_initial_position_only?: bool;
|
|
3768
3769
|
target_position_deviation?: double;
|
|
3769
3770
|
width?: float;
|
|
3770
3771
|
}
|
|
@@ -4170,6 +4171,10 @@ interface GroupAttackAchievementPrototype extends AchievementPrototype {
|
|
|
4170
4171
|
```
|
|
4171
4172
|
*/
|
|
4172
4173
|
amount?: uint32;
|
|
4174
|
+
/**
|
|
4175
|
+
* The type of attack that triggers this achievement. "autonomous" attacks are triggered in response to pollution or a territory disturbance. "distraction" attacks are in response to taking damage or seeing a nearby enemy. "scripted" attacks are triggered from mods.
|
|
4176
|
+
*/
|
|
4177
|
+
attack_type?: 'autonomous' | 'distraction' | 'scripted';
|
|
4173
4178
|
/**
|
|
4174
4179
|
* The achievement is only triggered if the attacking group of enemies contains at least one of the entities listed here.
|
|
4175
4180
|
*/
|
package/dist/types.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.0.
|
|
5
|
+
// Factorio version 2.0.33
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -3341,6 +3341,7 @@ interface CreateTrivialSmokeEffectItem extends TriggerEffectItem {
|
|
|
3341
3341
|
max_radius?: float;
|
|
3342
3342
|
offset_deviation?: BoundingBox;
|
|
3343
3343
|
offsets?: Vector[];
|
|
3344
|
+
only_when_visible?: float;
|
|
3344
3345
|
smoke_name: TrivialSmokeID;
|
|
3345
3346
|
speed?: Vector;
|
|
3346
3347
|
speed_from_center?: float;
|
|
@@ -5925,10 +5926,6 @@ interface LowPowerTipTrigger extends CountBasedTipTrigger {
|
|
|
5925
5926
|
interface MainSound {
|
|
5926
5927
|
activity_to_speed_modifiers?: ActivityMatchingModifiers;
|
|
5927
5928
|
activity_to_volume_modifiers?: ActivityMatchingModifiers;
|
|
5928
|
-
/**
|
|
5929
|
-
* Modifies how far a sound can be heard. Can only be 1 or lower, has to be a positive number.
|
|
5930
|
-
*/
|
|
5931
|
-
audible_distance_modifier?: double;
|
|
5932
5929
|
/**
|
|
5933
5930
|
* Can't be used when `match_progress_to_activity` is `true`.
|
|
5934
5931
|
*/
|
|
@@ -5940,6 +5937,11 @@ interface MainSound {
|
|
|
5940
5937
|
match_progress_to_activity?: bool;
|
|
5941
5938
|
match_speed_to_activity?: bool;
|
|
5942
5939
|
match_volume_to_activity?: bool;
|
|
5940
|
+
/**
|
|
5941
|
+
* Array of {@link WorkingVisualisation::name | prototype:WorkingVisualisation::name}s, individual names cannot be empty.
|
|
5942
|
+
*
|
|
5943
|
+
* The `sound` is played when at least one of the specified working visualisations is drawn.
|
|
5944
|
+
*/
|
|
5943
5945
|
play_for_working_visualisations?: string[];
|
|
5944
5946
|
/**
|
|
5945
5947
|
* Modifies how often the sound is played.
|
|
@@ -7207,10 +7209,6 @@ type PlayFor = /**
|
|
|
7207
7209
|
*/
|
|
7208
7210
|
'everything';
|
|
7209
7211
|
interface PlaySoundTriggerEffectItem extends TriggerEffectItem {
|
|
7210
|
-
/**
|
|
7211
|
-
* Negative values are silently clamped to 0.
|
|
7212
|
-
*/
|
|
7213
|
-
audible_distance_modifier?: float;
|
|
7214
7212
|
/**
|
|
7215
7213
|
* Negative values are silently clamped to 0.
|
|
7216
7214
|
*/
|
|
@@ -7222,10 +7220,6 @@ interface PlaySoundTriggerEffectItem extends TriggerEffectItem {
|
|
|
7222
7220
|
play_on_target_position?: bool;
|
|
7223
7221
|
sound: Sound;
|
|
7224
7222
|
type: 'play-sound';
|
|
7225
|
-
/**
|
|
7226
|
-
* Negative values are silently clamped to 0.
|
|
7227
|
-
*/
|
|
7228
|
-
volume_modifier?: float;
|
|
7229
7223
|
}
|
|
7230
7224
|
interface PlayerColorData {
|
|
7231
7225
|
chat_color: Color;
|
|
@@ -9076,7 +9070,7 @@ type Sound = {
|
|
|
9076
9070
|
aggregation?: AggregationSpecification;
|
|
9077
9071
|
allow_random_repeat?: bool;
|
|
9078
9072
|
/**
|
|
9079
|
-
* Modifies how far a sound can be heard.
|
|
9073
|
+
* Modifies how far a sound can be heard. Cannot be less than zero.
|
|
9080
9074
|
*/
|
|
9081
9075
|
audible_distance_modifier?: double;
|
|
9082
9076
|
category?: SoundType;
|
|
@@ -9145,9 +9139,13 @@ type Sound = {
|
|
|
9145
9139
|
volume?: float;
|
|
9146
9140
|
} | SoundDefinition[];
|
|
9147
9141
|
interface SoundAccent {
|
|
9148
|
-
audible_distance_modifier?: float;
|
|
9149
9142
|
frame?: uint16;
|
|
9150
|
-
|
|
9143
|
+
/**
|
|
9144
|
+
* Play the `sound` for a working visualisation of a given {@link WorkingVisualisation::name | prototype:WorkingVisualisation::name}.
|
|
9145
|
+
*
|
|
9146
|
+
* The name cannot be empty.
|
|
9147
|
+
*/
|
|
9148
|
+
play_for_working_visualisation?: string;
|
|
9151
9149
|
sound?: Sound;
|
|
9152
9150
|
}
|
|
9153
9151
|
type SoundDefinition = {
|
|
@@ -12532,18 +12530,16 @@ interface WorkerRobotStorageModifier extends SimpleModifier {
|
|
|
12532
12530
|
-- refinery
|
|
12533
12531
|
working_sound =
|
|
12534
12532
|
{
|
|
12535
|
-
sound = {
|
|
12536
|
-
idle_sound = {
|
|
12537
|
-
apparent_volume = 2.5,
|
|
12533
|
+
sound = {filename = "__base__/sound/oil-refinery.ogg"},
|
|
12534
|
+
idle_sound = {filename = "__base__/sound/idle1.ogg", volume = 0.6},
|
|
12538
12535
|
}
|
|
12539
12536
|
```
|
|
12540
12537
|
* @example ```
|
|
12541
12538
|
-- roboport
|
|
12542
12539
|
working_sound =
|
|
12543
12540
|
{
|
|
12544
|
-
sound = {
|
|
12545
|
-
|
|
12546
|
-
audible_distance_modifier = 0.5,
|
|
12541
|
+
sound = {filename = "__base__/sound/roboport-working.ogg", volume = 0.6, audible_distance_modifier = 0.5},
|
|
12542
|
+
max_sounds_per_prototype = 3,
|
|
12547
12543
|
probability = 1 / (5 * 60) -- average pause between the sound is 5 seconds
|
|
12548
12544
|
}
|
|
12549
12545
|
```
|
|
@@ -12553,15 +12549,13 @@ type WorkingSound = {
|
|
|
12553
12549
|
* Might not work with all entities that use working_sound.
|
|
12554
12550
|
*/
|
|
12555
12551
|
activate_sound?: Sound;
|
|
12556
|
-
apparent_volume?: float;
|
|
12557
|
-
/**
|
|
12558
|
-
* Modifies how far a sound can be heard. Can only be 1 or lower, has to be a positive number.
|
|
12559
|
-
*/
|
|
12560
|
-
audible_distance_modifier?: double;
|
|
12561
12552
|
/**
|
|
12562
12553
|
* Might not work with all entities that use working_sound.
|
|
12563
12554
|
*/
|
|
12564
12555
|
deactivate_sound?: Sound;
|
|
12556
|
+
/**
|
|
12557
|
+
* If `true`, `max_sounds_per_prototype` is ignored. 'extra sound' refers to `idle_sound`, `activate_sound` or `deactivate_sound`.
|
|
12558
|
+
*/
|
|
12565
12559
|
extra_sounds_ignore_limit?: bool;
|
|
12566
12560
|
/**
|
|
12567
12561
|
* The sound to be played when the entity is idle. Might not work with all entities that use working_sound.
|
|
@@ -12571,7 +12565,17 @@ type WorkingSound = {
|
|
|
12571
12565
|
* If this property is defined, all properties inherited from MainSound (and not overridden here) are ignored.
|
|
12572
12566
|
*/
|
|
12573
12567
|
main_sounds?: MainSound | MainSound[];
|
|
12574
|
-
|
|
12568
|
+
/**
|
|
12569
|
+
* Sets a maximum limit on how many entities of the same prototype will play their working sound.
|
|
12570
|
+
*
|
|
12571
|
+
* Inactive entities without an `idle_sound` don't count towards this limit.
|
|
12572
|
+
*
|
|
12573
|
+
* Entities with their working sound fading out don't count towards this limit.
|
|
12574
|
+
*/
|
|
12575
|
+
max_sounds_per_prototype?: uint8;
|
|
12576
|
+
/**
|
|
12577
|
+
* When `true`, working sounds for all entities of the same prototype are combined into one and some (most) properties of this are ignored or unused.
|
|
12578
|
+
*/
|
|
12575
12579
|
persistent?: bool;
|
|
12576
12580
|
sound_accents?: SoundAccent | SoundAccent[];
|
|
12577
12581
|
use_doppler_shift?: bool;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "factorio-types",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.24",
|
|
4
4
|
"description": "Typescript declarations for the Factorio mod API",
|
|
5
5
|
"main": "index.d.ts",
|
|
6
6
|
"repository": "https://github.com/sguest/factorio-types.git",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"src/**/*.d.ts",
|
|
24
24
|
"dist/**/*.d.ts"
|
|
25
25
|
],
|
|
26
|
-
"factorioVersion": "2.0.
|
|
26
|
+
"factorioVersion": "2.0.33",
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"lua-types": "^2.13.1"
|
|
29
29
|
},
|