factorio-types 1.2.23 → 1.2.25
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 +360 -18
- package/dist/concepts.d.ts +82 -10
- package/dist/datacollection.d.ts +1 -1
- package/dist/defines.d.ts +431 -379
- package/dist/events.d.ts +80 -2
- package/dist/global.d.ts +1 -1
- package/dist/prototypes.d.ts +56 -11
- package/dist/types.d.ts +104 -66
- 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.0.
|
|
5
|
+
// Factorio version 2.0.37
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -16,6 +16,10 @@ end)
|
|
|
16
16
|
```
|
|
17
17
|
*/
|
|
18
18
|
interface CustomInputEvent {
|
|
19
|
+
/**
|
|
20
|
+
* Cursor direction.
|
|
21
|
+
*/
|
|
22
|
+
cursor_direction?: defines.direction;
|
|
19
23
|
/**
|
|
20
24
|
* The mouse cursor display location when the custom input was activated.
|
|
21
25
|
*/
|
|
@@ -224,6 +228,24 @@ interface on_cancelled_upgrade {
|
|
|
224
228
|
*/
|
|
225
229
|
tick: uint;
|
|
226
230
|
}
|
|
231
|
+
/**
|
|
232
|
+
* Called after a cargo pod has delivered its cargo.
|
|
233
|
+
*/
|
|
234
|
+
interface on_cargo_pod_delivered_cargo {
|
|
235
|
+
cargo_pod: LuaEntity;
|
|
236
|
+
/**
|
|
237
|
+
* Identifier of the event
|
|
238
|
+
*/
|
|
239
|
+
name: defines.events;
|
|
240
|
+
/**
|
|
241
|
+
* The spawned container if any. Created when destination type is {@link surface | runtime:defines.cargo_destination.surface}.
|
|
242
|
+
*/
|
|
243
|
+
spawned_container?: LuaEntity;
|
|
244
|
+
/**
|
|
245
|
+
* Tick the event was generated.
|
|
246
|
+
*/
|
|
247
|
+
tick: uint;
|
|
248
|
+
}
|
|
227
249
|
/**
|
|
228
250
|
* Called when a cargo pod departs a surface.
|
|
229
251
|
*/
|
|
@@ -238,7 +260,29 @@ interface on_cargo_pod_finished_ascending {
|
|
|
238
260
|
*/
|
|
239
261
|
name: defines.events;
|
|
240
262
|
/**
|
|
241
|
-
* The player that is riding the
|
|
263
|
+
* The player that is riding the cargo pod, if any.
|
|
264
|
+
*/
|
|
265
|
+
player_index?: uint;
|
|
266
|
+
/**
|
|
267
|
+
* Tick the event was generated.
|
|
268
|
+
*/
|
|
269
|
+
tick: uint;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Called when a cargo pods lands on a surface, either at a station or on the ground.
|
|
273
|
+
*/
|
|
274
|
+
interface on_cargo_pod_finished_descending {
|
|
275
|
+
cargo_pod: LuaEntity;
|
|
276
|
+
/**
|
|
277
|
+
* True for pods spawned on a rocket.
|
|
278
|
+
*/
|
|
279
|
+
launched_by_rocket: boolean;
|
|
280
|
+
/**
|
|
281
|
+
* Identifier of the event
|
|
282
|
+
*/
|
|
283
|
+
name: defines.events;
|
|
284
|
+
/**
|
|
285
|
+
* The player that is riding the cargo pod, if any.
|
|
242
286
|
*/
|
|
243
287
|
player_index?: uint;
|
|
244
288
|
/**
|
|
@@ -1421,6 +1465,19 @@ interface on_mod_item_opened {
|
|
|
1421
1465
|
*/
|
|
1422
1466
|
tick: uint;
|
|
1423
1467
|
}
|
|
1468
|
+
/**
|
|
1469
|
+
* Called when {@link LuaGameScript::is_multiplayer | runtime:LuaGameScript::is_multiplayer} changes to true. May also be raised when it was already true but a game was loaded from a save file and with hosting.
|
|
1470
|
+
*/
|
|
1471
|
+
interface on_multiplayer_init {
|
|
1472
|
+
/**
|
|
1473
|
+
* Identifier of the event
|
|
1474
|
+
*/
|
|
1475
|
+
name: defines.events;
|
|
1476
|
+
/**
|
|
1477
|
+
* Tick the event was generated.
|
|
1478
|
+
*/
|
|
1479
|
+
tick: uint;
|
|
1480
|
+
}
|
|
1424
1481
|
/**
|
|
1425
1482
|
* Called after an object is destroyed which was registered with {@link LuaBootstrap::register_on_object_destroyed | runtime:LuaBootstrap::register_on_object_destroyed} previously.
|
|
1426
1483
|
*
|
|
@@ -2008,6 +2065,10 @@ interface on_player_deconstructed_area {
|
|
|
2008
2065
|
* The item quality used to select the area.
|
|
2009
2066
|
*/
|
|
2010
2067
|
quality: string;
|
|
2068
|
+
/**
|
|
2069
|
+
* The record that was used to select the area.
|
|
2070
|
+
*/
|
|
2071
|
+
record?: LuaRecord;
|
|
2011
2072
|
/**
|
|
2012
2073
|
* The item stack used to select the area.
|
|
2013
2074
|
*/
|
|
@@ -2742,6 +2803,10 @@ interface on_player_setup_blueprint {
|
|
|
2742
2803
|
* The item quality used to select the area.
|
|
2743
2804
|
*/
|
|
2744
2805
|
quality: string;
|
|
2806
|
+
/**
|
|
2807
|
+
* The record that is being reassigned.
|
|
2808
|
+
*/
|
|
2809
|
+
record?: LuaRecord;
|
|
2745
2810
|
/**
|
|
2746
2811
|
* The item stack used to select the area.
|
|
2747
2812
|
*/
|
|
@@ -3840,6 +3905,19 @@ interface on_selected_entity_changed {
|
|
|
3840
3905
|
*/
|
|
3841
3906
|
tick: uint;
|
|
3842
3907
|
}
|
|
3908
|
+
/**
|
|
3909
|
+
* Called when {@link LuaGameScript::is_multiplayer | runtime:LuaGameScript::is_multiplayer} changes to false. May also be raised when it was already false but a game was loaded from a save file without hosting.
|
|
3910
|
+
*/
|
|
3911
|
+
interface on_singleplayer_init {
|
|
3912
|
+
/**
|
|
3913
|
+
* Identifier of the event
|
|
3914
|
+
*/
|
|
3915
|
+
name: defines.events;
|
|
3916
|
+
/**
|
|
3917
|
+
* Tick the event was generated.
|
|
3918
|
+
*/
|
|
3919
|
+
tick: uint;
|
|
3920
|
+
}
|
|
3843
3921
|
/**
|
|
3844
3922
|
* Called when a space platform builds an entity.
|
|
3845
3923
|
*/
|
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.37
|
|
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.37
|
|
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
|
|
|
@@ -813,6 +813,12 @@ interface AssemblingMachinePrototype extends CraftingMachinePrototype {
|
|
|
813
813
|
CircuitConnectorDefinition,
|
|
814
814
|
CircuitConnectorDefinition
|
|
815
815
|
];
|
|
816
|
+
circuit_connector_flipped?: [
|
|
817
|
+
CircuitConnectorDefinition,
|
|
818
|
+
CircuitConnectorDefinition,
|
|
819
|
+
CircuitConnectorDefinition,
|
|
820
|
+
CircuitConnectorDefinition
|
|
821
|
+
];
|
|
816
822
|
/**
|
|
817
823
|
* The maximum circuit wire distance for this entity.
|
|
818
824
|
*/
|
|
@@ -844,7 +850,8 @@ interface AssemblingMachinePrototype extends CraftingMachinePrototype {
|
|
|
844
850
|
*
|
|
845
851
|
* This only counts item ingredients, not fluid ingredients! This means if ingredient count is 2, and the recipe has 2 item ingredients and 1 fluid ingredient, it can still be crafted in the machine.
|
|
846
852
|
*/
|
|
847
|
-
ingredient_count?:
|
|
853
|
+
ingredient_count?: uint16;
|
|
854
|
+
max_item_product_count?: uint16;
|
|
848
855
|
}
|
|
849
856
|
interface AsteroidChunkPrototype extends Prototype {
|
|
850
857
|
dying_trigger_effect?: TriggerEffect;
|
|
@@ -1023,7 +1030,7 @@ interface BeaconPrototype extends EntityWithOwnerPrototype {
|
|
|
1023
1030
|
/**
|
|
1024
1031
|
* The maximum distance that this beacon can supply its neighbors with its module's effects. Max distance is 64.
|
|
1025
1032
|
*/
|
|
1026
|
-
supply_area_distance:
|
|
1033
|
+
supply_area_distance: uint32;
|
|
1027
1034
|
}
|
|
1028
1035
|
/**
|
|
1029
1036
|
* Used as a laser beam.
|
|
@@ -3209,7 +3216,7 @@ interface EntityPrototype extends Prototype {
|
|
|
3209
3216
|
/**
|
|
3210
3217
|
* May also be defined inside `graphics_set` instead of directly in the entity prototype. This is useful for entities that use a `graphics_set` property to define their graphics, because then all graphics can be defined in one place.
|
|
3211
3218
|
*
|
|
3212
|
-
* {@link Currently only renders | https://forums.factorio.com/100703} for {@link EntityWithHealthPrototype | prototype:EntityWithHealthPrototype}.
|
|
3219
|
+
* {@link Currently only renders | https://forums.factorio.com/100703} for {@link EntityWithHealthPrototype | prototype:EntityWithHealthPrototype} and {@link CorpsePrototype | prototype:CorpsePrototype}.
|
|
3213
3220
|
*/
|
|
3214
3221
|
water_reflection?: WaterReflectionDefinition;
|
|
3215
3222
|
/**
|
|
@@ -3322,7 +3329,7 @@ interface EntityWithHealthPrototype extends EntityPrototype {
|
|
|
3322
3329
|
{
|
|
3323
3330
|
{
|
|
3324
3331
|
type = "fire",
|
|
3325
|
-
|
|
3332
|
+
percent = 80
|
|
3326
3333
|
},
|
|
3327
3334
|
{
|
|
3328
3335
|
type = "explosion",
|
|
@@ -3349,6 +3356,10 @@ interface EntityWithOwnerPrototype extends EntityWithHealthPrototype {
|
|
|
3349
3356
|
* The default scale is based on the tile distance of the shorter dimension. Where size 3 results into scale 1. The default minimum is 0.5 and maximum 1.0.
|
|
3350
3357
|
*/
|
|
3351
3358
|
quality_indicator_scale?: double;
|
|
3359
|
+
/**
|
|
3360
|
+
* The shift from the bottom left corner of the selection box.
|
|
3361
|
+
*/
|
|
3362
|
+
quality_indicator_shift?: Vector;
|
|
3352
3363
|
}
|
|
3353
3364
|
/**
|
|
3354
3365
|
* This prototype is used for receiving an achievement when the player equips armor.
|
|
@@ -3940,10 +3951,30 @@ interface FurnacePrototype extends CraftingMachinePrototype {
|
|
|
3940
3951
|
* The locale key is also used with an `_until` suffix for items that cannot be processed until they recipe is unlocked by a technology.
|
|
3941
3952
|
*/
|
|
3942
3953
|
cant_insert_at_source_message_key?: string;
|
|
3954
|
+
circuit_connector?: [
|
|
3955
|
+
CircuitConnectorDefinition,
|
|
3956
|
+
CircuitConnectorDefinition,
|
|
3957
|
+
CircuitConnectorDefinition,
|
|
3958
|
+
CircuitConnectorDefinition
|
|
3959
|
+
];
|
|
3960
|
+
circuit_connector_flipped?: [
|
|
3961
|
+
CircuitConnectorDefinition,
|
|
3962
|
+
CircuitConnectorDefinition,
|
|
3963
|
+
CircuitConnectorDefinition,
|
|
3964
|
+
CircuitConnectorDefinition
|
|
3965
|
+
];
|
|
3966
|
+
/**
|
|
3967
|
+
* The maximum circuit wire distance for this entity.
|
|
3968
|
+
*/
|
|
3969
|
+
circuit_wire_max_distance?: double;
|
|
3943
3970
|
/**
|
|
3944
3971
|
* The locale key of the tooltip to be shown in the input slot instead of the automatically generated list of items that fit there
|
|
3945
3972
|
*/
|
|
3946
3973
|
custom_input_slot_tooltip_key?: string;
|
|
3974
|
+
default_recipe_finished_signal?: SignalIDConnector;
|
|
3975
|
+
default_working_signal?: SignalIDConnector;
|
|
3976
|
+
draw_circuit_wires?: bool;
|
|
3977
|
+
draw_copper_wires?: bool;
|
|
3947
3978
|
/**
|
|
3948
3979
|
* The number of output slots.
|
|
3949
3980
|
*/
|
|
@@ -4171,6 +4202,10 @@ interface GroupAttackAchievementPrototype extends AchievementPrototype {
|
|
|
4171
4202
|
```
|
|
4172
4203
|
*/
|
|
4173
4204
|
amount?: uint32;
|
|
4205
|
+
/**
|
|
4206
|
+
* 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.
|
|
4207
|
+
*/
|
|
4208
|
+
attack_type?: 'autonomous' | 'distraction' | 'scripted';
|
|
4174
4209
|
/**
|
|
4175
4210
|
* The achievement is only triggered if the attacking group of enemies contains at least one of the entities listed here.
|
|
4176
4211
|
*/
|
|
@@ -4594,6 +4629,8 @@ interface ItemPrototype extends Prototype {
|
|
|
4594
4629
|
stack_size: ItemCountType;
|
|
4595
4630
|
/**
|
|
4596
4631
|
* The default weight is calculated automatically from recipes and falls back to {@link UtilityConstants::default_item_weight | prototype:UtilityConstants::default_item_weight}.
|
|
4632
|
+
*
|
|
4633
|
+
* More information on how item weight is determined can be found on its {@link auxiliary page | runtime:item-weight}.
|
|
4597
4634
|
*/
|
|
4598
4635
|
weight?: Weight;
|
|
4599
4636
|
}
|
|
@@ -5121,6 +5158,10 @@ interface Loader1x2Prototype extends LoaderPrototype {
|
|
|
5121
5158
|
* Continuously loads and unloads machines, as an alternative to inserters.
|
|
5122
5159
|
*/
|
|
5123
5160
|
interface LoaderPrototype extends TransportBeltConnectablePrototype {
|
|
5161
|
+
/**
|
|
5162
|
+
* Loader belt stack size can be adjusted at runtime. Requires {@link LoaderPrototype::max_belt_stack_size | prototype:LoaderPrototype::max_belt_stack_size} to be > 1.
|
|
5163
|
+
*/
|
|
5164
|
+
adjustable_belt_stack_size?: boolean;
|
|
5124
5165
|
/**
|
|
5125
5166
|
* Whether this loader can load and unload stationary inventories such as containers and crafting machines.
|
|
5126
5167
|
*/
|
|
@@ -6594,14 +6635,16 @@ interface RecipePrototype extends Prototype {
|
|
|
6594
6635
|
* Duplicate ingredients, e.g. two entries with the same name, are *not* allowed. In-game, the item ingredients are ordered by {@link ItemGroup::order_in_recipe | prototype:ItemGroup::order_in_recipe}.
|
|
6595
6636
|
* @example ```
|
|
6596
6637
|
-- Recipe with items
|
|
6597
|
-
ingredients =
|
|
6638
|
+
ingredients =
|
|
6639
|
+
{
|
|
6598
6640
|
{type = "item", name = "iron-stick", amount = 2},
|
|
6599
6641
|
{type = "item", name = "iron-plate", amount = 3}
|
|
6600
6642
|
}
|
|
6601
6643
|
```
|
|
6602
6644
|
* @example ```
|
|
6603
6645
|
-- Recipe with fluids
|
|
6604
|
-
ingredients =
|
|
6646
|
+
ingredients =
|
|
6647
|
+
{
|
|
6605
6648
|
{type="fluid", name="water", amount=50},
|
|
6606
6649
|
{type="fluid", name="crude-oil", amount=100}
|
|
6607
6650
|
}
|
|
@@ -6635,14 +6678,16 @@ interface RecipePrototype extends Prototype {
|
|
|
6635
6678
|
*
|
|
6636
6679
|
* Can be set to an empty table to create a recipe that produces nothing. Duplicate results, e.g. two entries with the same name, are allowed.
|
|
6637
6680
|
* @example ```
|
|
6638
|
-
results =
|
|
6681
|
+
results =
|
|
6682
|
+
{
|
|
6639
6683
|
{type="fluid", name="heavy-oil", amount=3},
|
|
6640
6684
|
{type="fluid", name="light-oil", amount=3},
|
|
6641
6685
|
{type="fluid", name="petroleum-gas", amount=4}
|
|
6642
6686
|
}
|
|
6643
6687
|
```
|
|
6644
6688
|
* @example ```
|
|
6645
|
-
results =
|
|
6689
|
+
results =
|
|
6690
|
+
{
|
|
6646
6691
|
{type = "item", name = "iron-nuggets", amount = 9},
|
|
6647
6692
|
{type = "item", name = "gold-nuggets", amount = 1}
|
|
6648
6693
|
}
|
|
@@ -7262,7 +7307,6 @@ interface RocketSiloPrototype extends AssemblingMachinePrototype {
|
|
|
7262
7307
|
*/
|
|
7263
7308
|
rocket_rising_delay?: uint8;
|
|
7264
7309
|
rocket_shadow_overlay_sprite?: Sprite;
|
|
7265
|
-
rocket_supply_inventory_size?: ItemStackIndex;
|
|
7266
7310
|
satellite_animation?: Animation;
|
|
7267
7311
|
satellite_shadow_animation?: Animation;
|
|
7268
7312
|
shadow_sprite?: Sprite;
|
|
@@ -9655,6 +9699,7 @@ interface UtilityConstants extends PrototypeBase {
|
|
|
9655
9699
|
gui_remark_color: Color;
|
|
9656
9700
|
gui_search_match_background_color: Color;
|
|
9657
9701
|
gui_search_match_foreground_color: Color;
|
|
9702
|
+
huge_animation_sound_area: float;
|
|
9658
9703
|
icon_shadow_color: Color;
|
|
9659
9704
|
icon_shadow_inset: float;
|
|
9660
9705
|
icon_shadow_radius: float;
|
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.37
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -405,7 +405,8 @@ frame_sequence = { 2, 2, 2, 2, 2, 4, 3, 4, 3 }
|
|
|
405
405
|
* @example ```
|
|
406
406
|
-- Complex example - animation contains different layers with different frame counts:
|
|
407
407
|
local custom_frame_sequence = { 2, 2, 2, 2, 2, 4, 3, 4, 3 }
|
|
408
|
-
layers =
|
|
408
|
+
layers =
|
|
409
|
+
{
|
|
409
410
|
{
|
|
410
411
|
-- Animation with custom frame sequence
|
|
411
412
|
frame_count = 4,
|
|
@@ -1622,6 +1623,10 @@ interface BaseAttackParameters {
|
|
|
1622
1623
|
* Played once at the start of the attack if these are {@link ProjectileAttackParameters | prototype:ProjectileAttackParameters}.
|
|
1623
1624
|
*/
|
|
1624
1625
|
sound?: LayeredSound;
|
|
1626
|
+
/**
|
|
1627
|
+
* Projectile will be creation position and orientation will be collinear with shooter and target (unless offset projectile center is specified). Used for railgun turrets to avoid unexpected friendly fire incidents.
|
|
1628
|
+
*/
|
|
1629
|
+
true_collinear_ejection?: bool;
|
|
1625
1630
|
/**
|
|
1626
1631
|
* If this is <= 0, it is set to 1. Arc from 0 to 1, so for example 0.25 is 90°. Used by the {@link flamethrower turret | https://wiki.factorio.com/Flamethrower_turret} in the base game. Arcs greater than 0.5 but less than 1 will be clamped to 0.5 as targeting in arcs larger than half circle is {@link not implemented | https://forums.factorio.com/94654}.
|
|
1627
1632
|
*/
|
|
@@ -3341,6 +3346,7 @@ interface CreateTrivialSmokeEffectItem extends TriggerEffectItem {
|
|
|
3341
3346
|
max_radius?: float;
|
|
3342
3347
|
offset_deviation?: BoundingBox;
|
|
3343
3348
|
offsets?: Vector[];
|
|
3349
|
+
only_when_visible?: float;
|
|
3344
3350
|
smoke_name: TrivialSmokeID;
|
|
3345
3351
|
speed?: Vector;
|
|
3346
3352
|
speed_from_center?: float;
|
|
@@ -5180,7 +5186,7 @@ interface HorizontalScrollBarStyleSpecification extends ScrollBarStyleSpecificat
|
|
|
5180
5186
|
*
|
|
5181
5187
|
* - When the final icon is displayed with a shadow (e.g. an item on the ground or on a belt when item shadows are turned on), each icon layer will {@link cast a shadow | https://forums.factorio.com/84888} and the shadow is cast on the layer below it.
|
|
5182
5188
|
*
|
|
5183
|
-
* - The final icon will always be resized and centered in GUI so that all its layers fit the target slot, but won't be resized when displayed on machines in alt-mode. For example: recipe first icon layer is size 128, scale 1, the icon group will be displayed at resolution /4 to fit the 32px GUI boxes, but will be displayed 4 times as large on buildings.
|
|
5189
|
+
* - The final icon will always be resized and centered in GUI so that all its layers (except the {@link `floating` | prototype:IconData::floating} ones) fit the target slot, but won't be resized when displayed on machines in alt-mode. For example: recipe first icon layer is size 128, scale 1, the icon group will be displayed at resolution /4 to fit the 32px GUI boxes, but will be displayed 4 times as large on buildings.
|
|
5184
5190
|
*
|
|
5185
5191
|
* - Shift values are based on {@link `expected_icon_size / 2` | prototype:IconData::scale}.
|
|
5186
5192
|
*
|
|
@@ -5196,7 +5202,8 @@ interface HorizontalScrollBarStyleSpecification extends ScrollBarStyleSpecificat
|
|
|
5196
5202
|
```
|
|
5197
5203
|
* @example ```
|
|
5198
5204
|
-- Layered icon, with size defined per layer
|
|
5199
|
-
icons =
|
|
5205
|
+
icons =
|
|
5206
|
+
{
|
|
5200
5207
|
{
|
|
5201
5208
|
icon = "__base__/graphics/icons/fluid/barreling/barrel-empty.png",
|
|
5202
5209
|
icon_size = 32
|
|
@@ -5222,9 +5229,13 @@ icons = {
|
|
|
5222
5229
|
*/
|
|
5223
5230
|
interface IconData {
|
|
5224
5231
|
/**
|
|
5225
|
-
* Outline is drawn using signed distance field generated on load.One icon image, will have only one SDF generated. But if the image is used in multiple icon with different scales, outline width won't match the desired width in all the scales but the largest one.
|
|
5232
|
+
* Outline is drawn using signed distance field generated on load. One icon image, will have only one SDF generated. But if the image is used in multiple icon with different scales, outline width won't match the desired width in all the scales but the largest one.
|
|
5226
5233
|
*/
|
|
5227
5234
|
draw_background?: bool;
|
|
5235
|
+
/**
|
|
5236
|
+
* When `true` the layer is not considered for calculating bounds of the icon, so it can go out of bounds of rectangle into which the icon is drawn in GUI.
|
|
5237
|
+
*/
|
|
5238
|
+
floating?: bool;
|
|
5228
5239
|
/**
|
|
5229
5240
|
* Path to the icon file.
|
|
5230
5241
|
*/
|
|
@@ -5289,7 +5300,8 @@ interface IconSequencePositioning {
|
|
|
5289
5300
|
}
|
|
5290
5301
|
/**
|
|
5291
5302
|
* @example ```
|
|
5292
|
-
data.raw["gui-style"]["default"]["stretchy-sprite"] =
|
|
5303
|
+
data.raw["gui-style"]["default"]["stretchy-sprite"] =
|
|
5304
|
+
{
|
|
5293
5305
|
type = "image_style",
|
|
5294
5306
|
vertically_stretchable = "on",
|
|
5295
5307
|
horizontally_stretchable = "on",
|
|
@@ -5925,10 +5937,6 @@ interface LowPowerTipTrigger extends CountBasedTipTrigger {
|
|
|
5925
5937
|
interface MainSound {
|
|
5926
5938
|
activity_to_speed_modifiers?: ActivityMatchingModifiers;
|
|
5927
5939
|
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
5940
|
/**
|
|
5933
5941
|
* Can't be used when `match_progress_to_activity` is `true`.
|
|
5934
5942
|
*/
|
|
@@ -5940,14 +5948,24 @@ interface MainSound {
|
|
|
5940
5948
|
match_progress_to_activity?: bool;
|
|
5941
5949
|
match_speed_to_activity?: bool;
|
|
5942
5950
|
match_volume_to_activity?: bool;
|
|
5951
|
+
/**
|
|
5952
|
+
* Array of {@link WorkingVisualisation::name | prototype:WorkingVisualisation::name}s, individual names cannot be empty.
|
|
5953
|
+
*
|
|
5954
|
+
* The `sound` is played when at least one of the specified working visualisations is drawn.
|
|
5955
|
+
*/
|
|
5943
5956
|
play_for_working_visualisations?: string[];
|
|
5944
5957
|
/**
|
|
5945
5958
|
* Modifies how often the sound is played.
|
|
5959
|
+
*
|
|
5960
|
+
* Silently clamped to the [0.0, 1.0] range.
|
|
5946
5961
|
* @example ```
|
|
5947
5962
|
probability = 1 / (3 * 60) -- average pause between the sound is 3 seconds
|
|
5948
5963
|
```
|
|
5949
5964
|
*/
|
|
5950
5965
|
probability?: double;
|
|
5966
|
+
/**
|
|
5967
|
+
* Cannot be empty.
|
|
5968
|
+
*/
|
|
5951
5969
|
sound?: Sound;
|
|
5952
5970
|
/**
|
|
5953
5971
|
* Only used if {@link WorkingSound::persistent | prototype:WorkingSound::persistent} is `true`.
|
|
@@ -6292,7 +6310,8 @@ interface MaximumFollowingRobotsCountModifier extends SimpleModifier {
|
|
|
6292
6310
|
minable = { mining_time = 0.55, result = "wood", count = 4, mining_particle = "wooden-particle" }
|
|
6293
6311
|
```
|
|
6294
6312
|
* @example ```
|
|
6295
|
-
minable =
|
|
6313
|
+
minable =
|
|
6314
|
+
{
|
|
6296
6315
|
mining_time = 1,
|
|
6297
6316
|
results =
|
|
6298
6317
|
{
|
|
@@ -7207,10 +7226,6 @@ type PlayFor = /**
|
|
|
7207
7226
|
*/
|
|
7208
7227
|
'everything';
|
|
7209
7228
|
interface PlaySoundTriggerEffectItem extends TriggerEffectItem {
|
|
7210
|
-
/**
|
|
7211
|
-
* Negative values are silently clamped to 0.
|
|
7212
|
-
*/
|
|
7213
|
-
audible_distance_modifier?: float;
|
|
7214
7229
|
/**
|
|
7215
7230
|
* Negative values are silently clamped to 0.
|
|
7216
7231
|
*/
|
|
@@ -7222,10 +7237,6 @@ interface PlaySoundTriggerEffectItem extends TriggerEffectItem {
|
|
|
7222
7237
|
play_on_target_position?: bool;
|
|
7223
7238
|
sound: Sound;
|
|
7224
7239
|
type: 'play-sound';
|
|
7225
|
-
/**
|
|
7226
|
-
* Negative values are silently clamped to 0.
|
|
7227
|
-
*/
|
|
7228
|
-
volume_modifier?: float;
|
|
7229
7240
|
}
|
|
7230
7241
|
interface PlayerColorData {
|
|
7231
7242
|
chat_color: Color;
|
|
@@ -7241,6 +7252,10 @@ interface PlumesSpecification {
|
|
|
7241
7252
|
max_y_offset?: float;
|
|
7242
7253
|
min_probability?: float;
|
|
7243
7254
|
min_y_offset?: float;
|
|
7255
|
+
/**
|
|
7256
|
+
* If given, the plumes will only render if this area is on screen (relative to the thruster)
|
|
7257
|
+
*/
|
|
7258
|
+
render_box?: BoundingBox;
|
|
7244
7259
|
/**
|
|
7245
7260
|
* Array may not be empty and may at most have 255 elements.
|
|
7246
7261
|
*
|
|
@@ -7723,11 +7738,19 @@ interface ProgrammableSpeakerInstrument {
|
|
|
7723
7738
|
notes: ProgrammableSpeakerNote[];
|
|
7724
7739
|
}
|
|
7725
7740
|
interface ProgrammableSpeakerNote {
|
|
7741
|
+
/**
|
|
7742
|
+
* Cannot contain aggregations.
|
|
7743
|
+
*
|
|
7744
|
+
* One of `sound` or `cyclic_sound` must be defined. Both cannot be defined together.
|
|
7745
|
+
*/
|
|
7746
|
+
cyclic_sound?: CyclicSound;
|
|
7726
7747
|
name: string;
|
|
7727
7748
|
/**
|
|
7728
7749
|
* Cannot contain aggregation.
|
|
7750
|
+
*
|
|
7751
|
+
* One of `sound` or `cyclic_sound` must be defined. Both cannot be defined together.
|
|
7729
7752
|
*/
|
|
7730
|
-
sound
|
|
7753
|
+
sound?: Sound;
|
|
7731
7754
|
}
|
|
7732
7755
|
interface ProgressBarStyleSpecification extends BaseStyleSpecification {
|
|
7733
7756
|
bar?: ElementImageSet;
|
|
@@ -7841,40 +7864,45 @@ interface PuddleTileEffectParameters {
|
|
|
7841
7864
|
* @example ```
|
|
7842
7865
|
load_animations =
|
|
7843
7866
|
{
|
|
7844
|
-
west =
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
|
|
7853
|
-
|
|
7867
|
+
west =
|
|
7868
|
+
{
|
|
7869
|
+
[1] =
|
|
7870
|
+
{
|
|
7871
|
+
standup_base =
|
|
7872
|
+
{
|
|
7873
|
+
filename = "__base__/graphics/entity/pump/connector/V-R-135-load-standup-base.png",
|
|
7874
|
+
width = 110,
|
|
7875
|
+
height = 126,
|
|
7876
|
+
scale = 0.5,
|
|
7877
|
+
line_length = 1,
|
|
7878
|
+
frame_count = 20,
|
|
7879
|
+
shift = util.by_pixel(-23.5, -13.5)
|
|
7880
|
+
},
|
|
7881
|
+
standup_shadow =
|
|
7882
|
+
{
|
|
7883
|
+
filename = "__base__/graphics/entity/pump/connector/V-R-1-load-standup-base-shadow.png",
|
|
7884
|
+
width = 157,
|
|
7885
|
+
height = 136,
|
|
7886
|
+
scale = 0.5,
|
|
7887
|
+
line_length = 1,
|
|
7888
|
+
frame_count = 20,
|
|
7889
|
+
shift = util.by_pixel(-8.75, 8.5)
|
|
7890
|
+
},
|
|
7854
7891
|
},
|
|
7855
|
-
|
|
7856
|
-
|
|
7857
|
-
|
|
7858
|
-
|
|
7859
|
-
|
|
7860
|
-
line_length = 1,
|
|
7861
|
-
frame_count = 20,
|
|
7862
|
-
shift = util.by_pixel(-8.75, 8.5)
|
|
7892
|
+
[2] =
|
|
7893
|
+
{
|
|
7894
|
+
standup_base = { ... },
|
|
7895
|
+
standup_shadow = { ... },
|
|
7896
|
+
connector_shadow = { ... },
|
|
7863
7897
|
},
|
|
7898
|
+
[3] = { ... },
|
|
7899
|
+
[4] = { ... },
|
|
7900
|
+
[5] = { ... },
|
|
7901
|
+
[6] = { ... },
|
|
7864
7902
|
},
|
|
7865
|
-
|
|
7866
|
-
|
|
7867
|
-
|
|
7868
|
-
connector_shadow = { ... },
|
|
7869
|
-
},
|
|
7870
|
-
[3] = { ... },
|
|
7871
|
-
[4] = { ... },
|
|
7872
|
-
[5] = { ... },
|
|
7873
|
-
[6] = { ... },
|
|
7874
|
-
},
|
|
7875
|
-
north = { ... },
|
|
7876
|
-
east = { ... },
|
|
7877
|
-
south = { ... },
|
|
7903
|
+
north = { ... },
|
|
7904
|
+
east = { ... },
|
|
7905
|
+
south = { ... },
|
|
7878
7906
|
}
|
|
7879
7907
|
```
|
|
7880
7908
|
*/
|
|
@@ -9076,7 +9104,7 @@ type Sound = {
|
|
|
9076
9104
|
aggregation?: AggregationSpecification;
|
|
9077
9105
|
allow_random_repeat?: bool;
|
|
9078
9106
|
/**
|
|
9079
|
-
* Modifies how far a sound can be heard.
|
|
9107
|
+
* Modifies how far a sound can be heard. Cannot be less than zero.
|
|
9080
9108
|
*/
|
|
9081
9109
|
audible_distance_modifier?: double;
|
|
9082
9110
|
category?: SoundType;
|
|
@@ -9145,9 +9173,13 @@ type Sound = {
|
|
|
9145
9173
|
volume?: float;
|
|
9146
9174
|
} | SoundDefinition[];
|
|
9147
9175
|
interface SoundAccent {
|
|
9148
|
-
audible_distance_modifier?: float;
|
|
9149
9176
|
frame?: uint16;
|
|
9150
|
-
|
|
9177
|
+
/**
|
|
9178
|
+
* Play the `sound` for a working visualisation of a given {@link WorkingVisualisation::name | prototype:WorkingVisualisation::name}.
|
|
9179
|
+
*
|
|
9180
|
+
* The name cannot be empty.
|
|
9181
|
+
*/
|
|
9182
|
+
play_for_working_visualisation?: string;
|
|
9151
9183
|
sound?: Sound;
|
|
9152
9184
|
}
|
|
9153
9185
|
type SoundDefinition = {
|
|
@@ -12532,18 +12564,16 @@ interface WorkerRobotStorageModifier extends SimpleModifier {
|
|
|
12532
12564
|
-- refinery
|
|
12533
12565
|
working_sound =
|
|
12534
12566
|
{
|
|
12535
|
-
sound = {
|
|
12536
|
-
idle_sound = {
|
|
12537
|
-
apparent_volume = 2.5,
|
|
12567
|
+
sound = {filename = "__base__/sound/oil-refinery.ogg"},
|
|
12568
|
+
idle_sound = {filename = "__base__/sound/idle1.ogg", volume = 0.6},
|
|
12538
12569
|
}
|
|
12539
12570
|
```
|
|
12540
12571
|
* @example ```
|
|
12541
12572
|
-- roboport
|
|
12542
12573
|
working_sound =
|
|
12543
12574
|
{
|
|
12544
|
-
sound = {
|
|
12545
|
-
|
|
12546
|
-
audible_distance_modifier = 0.5,
|
|
12575
|
+
sound = {filename = "__base__/sound/roboport-working.ogg", volume = 0.6, audible_distance_modifier = 0.5},
|
|
12576
|
+
max_sounds_per_prototype = 3,
|
|
12547
12577
|
probability = 1 / (5 * 60) -- average pause between the sound is 5 seconds
|
|
12548
12578
|
}
|
|
12549
12579
|
```
|
|
@@ -12553,15 +12583,13 @@ type WorkingSound = {
|
|
|
12553
12583
|
* Might not work with all entities that use working_sound.
|
|
12554
12584
|
*/
|
|
12555
12585
|
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
12586
|
/**
|
|
12562
12587
|
* Might not work with all entities that use working_sound.
|
|
12563
12588
|
*/
|
|
12564
12589
|
deactivate_sound?: Sound;
|
|
12590
|
+
/**
|
|
12591
|
+
* If `true`, `max_sounds_per_prototype` is ignored. 'extra sound' refers to `idle_sound`, `activate_sound` or `deactivate_sound`.
|
|
12592
|
+
*/
|
|
12565
12593
|
extra_sounds_ignore_limit?: bool;
|
|
12566
12594
|
/**
|
|
12567
12595
|
* The sound to be played when the entity is idle. Might not work with all entities that use working_sound.
|
|
@@ -12571,7 +12599,17 @@ type WorkingSound = {
|
|
|
12571
12599
|
* If this property is defined, all properties inherited from MainSound (and not overridden here) are ignored.
|
|
12572
12600
|
*/
|
|
12573
12601
|
main_sounds?: MainSound | MainSound[];
|
|
12574
|
-
|
|
12602
|
+
/**
|
|
12603
|
+
* Sets a maximum limit on how many entities of the same prototype will play their working sound.
|
|
12604
|
+
*
|
|
12605
|
+
* Inactive entities without an `idle_sound` don't count towards this limit.
|
|
12606
|
+
*
|
|
12607
|
+
* Entities with their working sound fading out don't count towards this limit.
|
|
12608
|
+
*/
|
|
12609
|
+
max_sounds_per_prototype?: uint8;
|
|
12610
|
+
/**
|
|
12611
|
+
* 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.
|
|
12612
|
+
*/
|
|
12575
12613
|
persistent?: bool;
|
|
12576
12614
|
sound_accents?: SoundAccent | SoundAccent[];
|
|
12577
12615
|
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.25",
|
|
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.37",
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"lua-types": "^2.13.1"
|
|
29
29
|
},
|