factorio-types 1.2.68 → 1.2.70
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 +93 -56
- package/dist/concepts.d.ts +64 -13
- package/dist/datacollection.d.ts +1 -1
- package/dist/defines.d.ts +1 -1
- package/dist/events.d.ts +1 -1
- package/dist/global.d.ts +1 -1
- package/dist/prototypes.d.ts +82 -19
- package/dist/types.d.ts +16 -6
- 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.21
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -4770,12 +4770,16 @@ interface LuaBurner {
|
|
|
4770
4770
|
* The currently burning item. Writing `nil` will void the currently burning item without producing a {@link LuaBurner::burnt_result | runtime:LuaBurner::burnt_result}.
|
|
4771
4771
|
*
|
|
4772
4772
|
* Writing to this automatically handles correcting {@link LuaBurner::remaining_burning_fuel | runtime:LuaBurner::remaining_burning_fuel}.
|
|
4773
|
+
*
|
|
4774
|
+
* When writing, any item with a {@link fuel value | runtime:LuaItemPrototype::fuel_value} is considered valid fuel; the fuel category does not have to match.
|
|
4773
4775
|
*/
|
|
4774
4776
|
readonly currently_burning?: ItemIDAndQualityIDPair;
|
|
4775
4777
|
/**
|
|
4776
4778
|
* The currently burning item. Writing `nil` will void the currently burning item without producing a {@link LuaBurner::burnt_result | runtime:LuaBurner::burnt_result}.
|
|
4777
4779
|
*
|
|
4778
4780
|
* Writing to this automatically handles correcting {@link LuaBurner::remaining_burning_fuel | runtime:LuaBurner::remaining_burning_fuel}.
|
|
4781
|
+
*
|
|
4782
|
+
* When writing, any item with a {@link fuel value | runtime:LuaItemPrototype::fuel_value} is considered valid fuel; the fuel category does not have to match.
|
|
4779
4783
|
* @customName currently_burning
|
|
4780
4784
|
*/
|
|
4781
4785
|
currently_burning_write?: ItemWithQualityID;
|
|
@@ -4904,11 +4908,13 @@ interface LuaCargoHatch {
|
|
|
4904
4908
|
* Control behavior for cargo landing pad.
|
|
4905
4909
|
*/
|
|
4906
4910
|
interface LuaCargoLandingPadControlBehavior extends LuaControlBehavior {
|
|
4911
|
+
empty_slots_signal?: SignalID;
|
|
4907
4912
|
/**
|
|
4908
4913
|
* 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.
|
|
4909
4914
|
*/
|
|
4910
4915
|
readonly object_name: string;
|
|
4911
4916
|
read_contents: boolean;
|
|
4917
|
+
read_empty_slots: boolean;
|
|
4912
4918
|
set_requests: boolean;
|
|
4913
4919
|
/**
|
|
4914
4920
|
* Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
|
@@ -5211,6 +5217,7 @@ interface LuaConstantCombinatorControlBehavior extends LuaControlBehavior {
|
|
|
5211
5217
|
* Control behavior for container entities.
|
|
5212
5218
|
*/
|
|
5213
5219
|
interface LuaContainerControlBehavior extends LuaControlBehavior {
|
|
5220
|
+
empty_slots_signal?: SignalID;
|
|
5214
5221
|
/**
|
|
5215
5222
|
* 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.
|
|
5216
5223
|
*/
|
|
@@ -5219,6 +5226,7 @@ interface LuaContainerControlBehavior extends LuaControlBehavior {
|
|
|
5219
5226
|
* `true` if this container is sending its content to a circuit network.
|
|
5220
5227
|
*/
|
|
5221
5228
|
read_contents: boolean;
|
|
5229
|
+
read_empty_slots: boolean;
|
|
5222
5230
|
/**
|
|
5223
5231
|
* Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
|
5224
5232
|
*/
|
|
@@ -7060,6 +7068,15 @@ interface LuaEntity extends LuaControl {
|
|
|
7060
7068
|
* @returns Current values of all signals.
|
|
7061
7069
|
*/
|
|
7062
7070
|
get_signals(this: void, wire_connector_id: defines.wire_connector_id, extra_wire_connector_id?: defines.wire_connector_id): Signal[] | null;
|
|
7071
|
+
/**
|
|
7072
|
+
* Checks if signals on a circuit connector changed recently.
|
|
7073
|
+
*
|
|
7074
|
+
* Returns `true` if signals changed since last tick. If a tick of last check is provided, returns `true` if signals changed since the specified tick. May also return `true` spuriously in other situations when values seen on this connector may be different, caused by addition of wires, removal of wires, circuit network merges, circuit network splits, input network selection changes, etc.
|
|
7075
|
+
*
|
|
7076
|
+
* `nil` if entity has no circuit connector with provided identifier.
|
|
7077
|
+
* @param tick_of_last_check Value of {@link LuaGameScript::tick | runtime:LuaGameScript::tick} of the previous check.
|
|
7078
|
+
*/
|
|
7079
|
+
get_signals_changed(this: void, wire_connector_id: defines.wire_connector_id, tick_of_last_check?: MapTick): boolean | null;
|
|
7063
7080
|
/**
|
|
7064
7081
|
* Gets legs of given SpiderVehicle.
|
|
7065
7082
|
*/
|
|
@@ -7951,7 +7968,9 @@ interface LuaEntity extends LuaControl {
|
|
|
7951
7968
|
*/
|
|
7952
7969
|
health?: float;
|
|
7953
7970
|
/**
|
|
7954
|
-
* The entities connected to this
|
|
7971
|
+
* The entities connected to this entity's heat energy source or this entity's heat buffer.
|
|
7972
|
+
*
|
|
7973
|
+
* The following entity types have a heat buffer: heat pipe, reactor and heat interface.
|
|
7955
7974
|
*/
|
|
7956
7975
|
readonly heat_neighbours: LuaEntity[];
|
|
7957
7976
|
/**
|
|
@@ -8511,7 +8530,9 @@ interface LuaEntity extends LuaControl {
|
|
|
8511
8530
|
*/
|
|
8512
8531
|
tags?: Tags;
|
|
8513
8532
|
/**
|
|
8514
|
-
* The temperature of this entity's heat energy source. `nil` if this entity does not use a heat energy source.
|
|
8533
|
+
* The temperature of this entity's heat energy source or this entity's heat buffer. `nil` if this entity does not use a heat energy source or does not have a heat buffer.
|
|
8534
|
+
*
|
|
8535
|
+
* The following entity types have a heat buffer: heat pipe, reactor and heat interface.
|
|
8515
8536
|
*/
|
|
8516
8537
|
temperature?: double;
|
|
8517
8538
|
/**
|
|
@@ -8676,7 +8697,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8676
8697
|
/**
|
|
8677
8698
|
* The crafting speed of this crafting-machine or character.
|
|
8678
8699
|
*/
|
|
8679
|
-
get_crafting_speed(this: void, quality?: QualityID): double;
|
|
8700
|
+
get_crafting_speed(this: void, quality?: QualityID): double | null;
|
|
8680
8701
|
get_duration(this: void, quality?: QualityID): uint32 | null;
|
|
8681
8702
|
get_energy_distribution_efficiency(this: void, quality?: QualityID): double | null;
|
|
8682
8703
|
/**
|
|
@@ -8750,7 +8771,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8750
8771
|
/**
|
|
8751
8772
|
* The pumping speed of this offshore pump or normal pump.
|
|
8752
8773
|
*/
|
|
8753
|
-
get_pumping_speed(this: void, quality?: QualityID): double;
|
|
8774
|
+
get_pumping_speed(this: void, quality?: QualityID): double | null;
|
|
8754
8775
|
/**
|
|
8755
8776
|
* The base researching speed of this lab prototype.
|
|
8756
8777
|
*/
|
|
@@ -8758,24 +8779,24 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8758
8779
|
/**
|
|
8759
8780
|
* The supply area of this electric pole or beacon prototype.
|
|
8760
8781
|
*/
|
|
8761
|
-
get_supply_area_distance(this: void, quality?: QualityID): double;
|
|
8782
|
+
get_supply_area_distance(this: void, quality?: QualityID): double | null;
|
|
8762
8783
|
/**
|
|
8763
8784
|
* The maximum flow rate through this valve.
|
|
8764
8785
|
*/
|
|
8765
|
-
get_valve_flow_rate(this: void, quality?: QualityID): double;
|
|
8786
|
+
get_valve_flow_rate(this: void, quality?: QualityID): double | null;
|
|
8766
8787
|
/**
|
|
8767
8788
|
* Test whether this entity prototype has a certain flag set.
|
|
8768
8789
|
* @param flag The flag to test.
|
|
8769
8790
|
* @returns `true` if this prototype has the given flag set.
|
|
8770
8791
|
*/
|
|
8771
8792
|
has_flag(this: void, flag: EntityPrototypeFlag): boolean;
|
|
8772
|
-
readonly absorptions_per_second
|
|
8793
|
+
readonly absorptions_per_second?: Record<string, EnemySpawnerAbsorption>;
|
|
8773
8794
|
/**
|
|
8774
8795
|
* A table of pollutions amounts that has to be absorbed by the unit's spawner before the unit will leave the spawner and attack the source of the pollution, indexed by the name of each absorbed pollution type.
|
|
8775
8796
|
*/
|
|
8776
8797
|
readonly absorptions_to_join_attack?: Record<string, float>;
|
|
8777
8798
|
readonly acceleration?: double;
|
|
8778
|
-
readonly acceleration_rate
|
|
8799
|
+
readonly acceleration_rate?: double;
|
|
8779
8800
|
readonly accepted_seeds?: string[];
|
|
8780
8801
|
readonly action?: TriggerItem[];
|
|
8781
8802
|
readonly action_cooldown?: uint32;
|
|
@@ -8802,7 +8823,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8802
8823
|
*/
|
|
8803
8824
|
readonly air_resistance?: double;
|
|
8804
8825
|
readonly alarm_trigger?: TriggerEffectItem[];
|
|
8805
|
-
readonly alert_after_time
|
|
8826
|
+
readonly alert_after_time?: uint32;
|
|
8806
8827
|
/**
|
|
8807
8828
|
* The alert icon scale of this entity prototype.
|
|
8808
8829
|
*/
|
|
@@ -8901,11 +8922,11 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8901
8922
|
* The attack result of this entity, if any.
|
|
8902
8923
|
*/
|
|
8903
8924
|
readonly attack_result?: TriggerItem[];
|
|
8904
|
-
readonly attack_target_mask
|
|
8925
|
+
readonly attack_target_mask?: TriggerTargetMask;
|
|
8905
8926
|
readonly attacking_speed?: double;
|
|
8906
8927
|
readonly attractor_hit_effect?: TriggerItem[];
|
|
8907
8928
|
readonly auto_connect_up_to_n_wires?: uint8;
|
|
8908
|
-
readonly auto_setup_collision_box
|
|
8929
|
+
readonly auto_setup_collision_box?: boolean;
|
|
8909
8930
|
readonly auto_sort_inventory?: boolean;
|
|
8910
8931
|
/**
|
|
8911
8932
|
* The amount of ammo that inserters automatically insert into this ammo turret, artillery turret or artillery wagon.
|
|
@@ -8939,9 +8960,9 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8939
8960
|
readonly braking_force?: double;
|
|
8940
8961
|
readonly build_distance?: uint32;
|
|
8941
8962
|
/**
|
|
8942
|
-
* The
|
|
8963
|
+
* The {@link grid size | prototype:EntityPrototype::build_grid_size} of the building.
|
|
8943
8964
|
*/
|
|
8944
|
-
readonly
|
|
8965
|
+
readonly build_grid_size: uint32;
|
|
8945
8966
|
/**
|
|
8946
8967
|
* Whether this inserter is a bulk-type.
|
|
8947
8968
|
*/
|
|
@@ -9011,7 +9032,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
9011
9032
|
readonly color?: Color;
|
|
9012
9033
|
readonly combat_robot_friction?: double;
|
|
9013
9034
|
readonly connectable_box?: BoundingBox;
|
|
9014
|
-
readonly connection_category
|
|
9035
|
+
readonly connection_category?: string[];
|
|
9015
9036
|
readonly connection_distance?: double;
|
|
9016
9037
|
readonly connects_to_other_radars?: boolean;
|
|
9017
9038
|
/**
|
|
@@ -9037,7 +9058,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
9037
9058
|
* The value in the dictionary is meaningless and exists just to allow for easy lookup.
|
|
9038
9059
|
*/
|
|
9039
9060
|
readonly crafting_categories?: Record<string, true>;
|
|
9040
|
-
readonly crafting_speed_quality_multiplier
|
|
9061
|
+
readonly crafting_speed_quality_multiplier?: LuaTable<QualityID, double>;
|
|
9041
9062
|
/**
|
|
9042
9063
|
* The crane energy usage of this agricultural tower prototype.
|
|
9043
9064
|
*/
|
|
@@ -9099,9 +9120,11 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
9099
9120
|
readonly default_copy_color_from_train_stop?: boolean;
|
|
9100
9121
|
readonly default_day_length_output_signal?: SignalID;
|
|
9101
9122
|
readonly default_day_tick_output_signal?: SignalID;
|
|
9123
|
+
readonly default_empty_slots_signal?: SignalID;
|
|
9102
9124
|
readonly default_game_tick_output_signal?: SignalID;
|
|
9103
9125
|
readonly default_green_output_signal?: SignalID;
|
|
9104
9126
|
readonly default_green_signal?: SignalID;
|
|
9127
|
+
readonly default_launched_signal?: SignalID;
|
|
9105
9128
|
readonly default_orange_output_signal?: SignalID;
|
|
9106
9129
|
readonly default_output_signal?: SignalID;
|
|
9107
9130
|
readonly default_recipe_finished_signal?: SignalID;
|
|
@@ -9225,14 +9248,14 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
9225
9248
|
* The direct energy usage of this entity, if any.
|
|
9226
9249
|
*/
|
|
9227
9250
|
readonly energy_usage?: double;
|
|
9228
|
-
readonly energy_usage_quality_multiplier
|
|
9251
|
+
readonly energy_usage_quality_multiplier?: LuaTable<QualityID, double>;
|
|
9229
9252
|
readonly energy_usage_quality_scaling?: float;
|
|
9230
9253
|
/**
|
|
9231
9254
|
* The engine starting speed for this rocket silo rocket prototype.
|
|
9232
9255
|
*/
|
|
9233
9256
|
readonly engine_starting_speed?: double;
|
|
9234
9257
|
readonly enraged_duration?: MapTick;
|
|
9235
|
-
readonly enraged_speed
|
|
9258
|
+
readonly enraged_speed?: double;
|
|
9236
9259
|
readonly enter_drop_mode_if_held_stack_spoiled?: boolean;
|
|
9237
9260
|
readonly enter_vehicle_distance?: double;
|
|
9238
9261
|
readonly erase_contents_when_mined?: boolean;
|
|
@@ -9386,7 +9409,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
9386
9409
|
* The icon positioning for inventories of this entity, if defined.
|
|
9387
9410
|
*/
|
|
9388
9411
|
readonly icons_positioning?: IconSequencePositioning[];
|
|
9389
|
-
readonly ignore_target_mask
|
|
9412
|
+
readonly ignore_target_mask?: TriggerTargetMask;
|
|
9390
9413
|
readonly immune_to_all_impacts?: boolean;
|
|
9391
9414
|
readonly immune_to_cliff_impacts?: boolean;
|
|
9392
9415
|
readonly immune_to_rock_impacts?: boolean;
|
|
@@ -9713,7 +9736,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
9713
9736
|
* Returns the inventory size if this entity is of normal quality. Use {@link LuaEntityPrototype::get_inventory_size | runtime:LuaEntityPrototype::get_inventory_size} for other qualities.
|
|
9714
9737
|
*/
|
|
9715
9738
|
readonly module_inventory_size?: uint32;
|
|
9716
|
-
readonly module_slots_quality_bonus
|
|
9739
|
+
readonly module_slots_quality_bonus?: LuaTable<QualityID, ItemStackIndex>;
|
|
9717
9740
|
/**
|
|
9718
9741
|
* Whether this unit prototype can move while shooting.
|
|
9719
9742
|
*/
|
|
@@ -9861,7 +9884,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
9861
9884
|
*/
|
|
9862
9885
|
readonly revenge_attack_parameters?: AttackParameters;
|
|
9863
9886
|
readonly reversing_power_modifier?: double;
|
|
9864
|
-
readonly rewire_neighbours_when_destroying
|
|
9887
|
+
readonly rewire_neighbours_when_destroying?: boolean;
|
|
9865
9888
|
/**
|
|
9866
9889
|
* The rising speed for this rocket silo rocket prototype.
|
|
9867
9890
|
*/
|
|
@@ -9904,7 +9927,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
9904
9927
|
/**
|
|
9905
9928
|
* How much science pack durability is required to research one science point.
|
|
9906
9929
|
*/
|
|
9907
|
-
readonly science_pack_drain_rate_percent
|
|
9930
|
+
readonly science_pack_drain_rate_percent?: uint8;
|
|
9908
9931
|
readonly search_radius?: double;
|
|
9909
9932
|
/**
|
|
9910
9933
|
* The secondary bounding box used for collision checking, if any. This is only used in rails and rail remnants.
|
|
@@ -9940,9 +9963,9 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
9940
9963
|
readonly smoke_count?: uint16;
|
|
9941
9964
|
readonly smoke_sources?: SmokeSource[];
|
|
9942
9965
|
readonly snap_to_spots_distance?: float;
|
|
9943
|
-
readonly solar_panel_performance_at_day
|
|
9944
|
-
readonly solar_panel_performance_at_night
|
|
9945
|
-
readonly solar_panel_solar_coefficient_property
|
|
9966
|
+
readonly solar_panel_performance_at_day?: double;
|
|
9967
|
+
readonly solar_panel_performance_at_night?: double;
|
|
9968
|
+
readonly solar_panel_solar_coefficient_property?: LuaSurfacePropertyPrototype;
|
|
9946
9969
|
readonly source_offset?: Vector;
|
|
9947
9970
|
readonly source_variance?: Vector;
|
|
9948
9971
|
readonly spawn_blocked_trigger?: TriggerItem[];
|
|
@@ -10068,7 +10091,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
10068
10091
|
*/
|
|
10069
10092
|
readonly torso_rotation_speed?: double;
|
|
10070
10093
|
readonly track_coverage_during_drag_building?: boolean;
|
|
10071
|
-
readonly track_particle_triggers
|
|
10094
|
+
readonly track_particle_triggers?: LuaTable<LuaTilePrototype, TriggerEffectItem[]>;
|
|
10072
10095
|
readonly transition_collision_mask?: CollisionMask;
|
|
10073
10096
|
/**
|
|
10074
10097
|
* If it is a tree, return the number of colors it supports.
|
|
@@ -10086,10 +10109,8 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
10086
10109
|
readonly trigger_radius?: double;
|
|
10087
10110
|
/**
|
|
10088
10111
|
* The trigger target mask for this entity prototype type.
|
|
10089
|
-
*
|
|
10090
|
-
* The values in the dictionary are meaningless and exists just to allow the dictionary type for easy lookup.
|
|
10091
10112
|
*/
|
|
10092
|
-
readonly trigger_target_mask: Record<string,
|
|
10113
|
+
readonly trigger_target_mask: Record<string, true>;
|
|
10093
10114
|
readonly turn_radius?: double;
|
|
10094
10115
|
readonly turn_smoothing?: double;
|
|
10095
10116
|
readonly turn_speed?: float;
|
|
@@ -10131,7 +10152,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
10131
10152
|
/**
|
|
10132
10153
|
* If this lab uses the quality drain modifier when consuming science packs.
|
|
10133
10154
|
*/
|
|
10134
|
-
readonly uses_quality_drain_modifier
|
|
10155
|
+
readonly uses_quality_drain_modifier?: boolean;
|
|
10135
10156
|
/**
|
|
10136
10157
|
* Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
|
10137
10158
|
*/
|
|
@@ -10572,6 +10593,7 @@ interface LuaEquipmentPrototype extends LuaPrototypeBase {
|
|
|
10572
10593
|
readonly solar_panel_performance_at_day?: double;
|
|
10573
10594
|
readonly solar_panel_performance_at_night?: double;
|
|
10574
10595
|
readonly solar_panel_solar_coefficient_property?: LuaSurfacePropertyPrototype;
|
|
10596
|
+
readonly sunglasses?: boolean;
|
|
10575
10597
|
/**
|
|
10576
10598
|
* The result item when taking this equipment out of an equipment grid, if any.
|
|
10577
10599
|
*/
|
|
@@ -10912,7 +10934,7 @@ interface LuaForce {
|
|
|
10912
10934
|
*/
|
|
10913
10935
|
add_custom_alert(this: void, entity: LuaEntity, icon: SignalID, message: LocalisedString, show_on_map: boolean): void;
|
|
10914
10936
|
/**
|
|
10915
|
-
* Add this technology to the back of the research queue
|
|
10937
|
+
* Add this technology to the back of the research queue.
|
|
10916
10938
|
* @returns Whether the technology was successfully added.
|
|
10917
10939
|
*/
|
|
10918
10940
|
add_research(this: void, technology: TechnologyID): boolean;
|
|
@@ -11498,7 +11520,7 @@ interface LuaForce {
|
|
|
11498
11520
|
/**
|
|
11499
11521
|
* The research queue of this force. The first technology in the array is the currently active one. Reading this attribute gives an array of {@link LuaTechnology | runtime:LuaTechnology}.
|
|
11500
11522
|
*
|
|
11501
|
-
* To write to this, the entire table must be written. Providing an empty table or `nil` will empty the research queue and cancel the current research.
|
|
11523
|
+
* To write to this, the entire table must be written. Providing an empty table or `nil` will empty the research queue and cancel the current research.
|
|
11502
11524
|
*
|
|
11503
11525
|
* This only allows mods to queue research that this force is able to research in the first place. As an example, an already researched technology or one whose prerequisites are not fulfilled will not be queued, but dropped silently instead.
|
|
11504
11526
|
*/
|
|
@@ -12029,6 +12051,10 @@ interface LuaGameScript {
|
|
|
12029
12051
|
* See {@link LuaGameScript::players | runtime:LuaGameScript::players} for accessing all players.
|
|
12030
12052
|
*/
|
|
12031
12053
|
readonly player?: LuaPlayer;
|
|
12054
|
+
/**
|
|
12055
|
+
* True by default. Can be used to prevent the game engine from printing messages for player deaths and respawns.
|
|
12056
|
+
*/
|
|
12057
|
+
player_death_notifications_enabled: boolean;
|
|
12032
12058
|
/**
|
|
12033
12059
|
* Get a table of all the players that currently exist. This sparse table allows you to find players by indexing it with either their `name` or `index`. Iterating this table with `pairs()` will provide the `index`es as the keys. Iterating with `ipairs()` will not work at all.
|
|
12034
12060
|
*
|
|
@@ -12039,6 +12065,10 @@ interface LuaGameScript {
|
|
|
12039
12065
|
* Simulation-related functions, or `nil` if the current game is not a simulation.
|
|
12040
12066
|
*/
|
|
12041
12067
|
readonly simulation: LuaSimulation;
|
|
12068
|
+
/**
|
|
12069
|
+
* True by default. Can be used to prevent the game engine from printing messages for space platform deaths.
|
|
12070
|
+
*/
|
|
12071
|
+
space_platform_death_notifications_enabled: boolean;
|
|
12042
12072
|
/**
|
|
12043
12073
|
* Speed to update the map at. 1.0 is normal speed -- 60 UPS. Minimum value is 0.01.
|
|
12044
12074
|
*/
|
|
@@ -12261,7 +12291,7 @@ interface LuaGuiElement {
|
|
|
12261
12291
|
*/
|
|
12262
12292
|
get_item(this: void, index: uint32): LocalisedString;
|
|
12263
12293
|
/**
|
|
12264
|
-
* The mod that owns this
|
|
12294
|
+
* The mod that owns this GUI element or `nil` if it's owned by the scenario script.
|
|
12265
12295
|
*
|
|
12266
12296
|
* This has a not-super-expensive, but non-free cost to get.
|
|
12267
12297
|
*/
|
|
@@ -14029,8 +14059,9 @@ interface LuaItemCommon {
|
|
|
14029
14059
|
/**
|
|
14030
14060
|
* Set new entities to be a part of this blueprint.
|
|
14031
14061
|
* @param entities The new blueprint entities.
|
|
14062
|
+
* @param fix_positions If false, positions will be left unchanged unless invalid for the current snapping.
|
|
14032
14063
|
*/
|
|
14033
|
-
set_blueprint_entities(this: void, entities: BlueprintEntity[]): void;
|
|
14064
|
+
set_blueprint_entities(this: void, entities: BlueprintEntity[], fix_positions?: boolean): void;
|
|
14034
14065
|
/**
|
|
14035
14066
|
* Sets the given tag on the given blueprint entity index in this blueprint item.
|
|
14036
14067
|
* @param index The entity index.
|
|
@@ -14451,9 +14482,9 @@ interface LuaItemPrototype extends LuaPrototypeBase {
|
|
|
14451
14482
|
*/
|
|
14452
14483
|
readonly fuel_acceleration_multiplier_quality_bonus: double;
|
|
14453
14484
|
/**
|
|
14454
|
-
*
|
|
14485
|
+
* Fuel categories. Only provided when not empty.
|
|
14455
14486
|
*/
|
|
14456
|
-
readonly
|
|
14487
|
+
readonly fuel_categories?: string[];
|
|
14457
14488
|
/**
|
|
14458
14489
|
* The emissions multiplier if this is used as fuel.
|
|
14459
14490
|
*/
|
|
@@ -14957,6 +14988,7 @@ interface LuaLogisticContainerControlBehavior extends LuaControlBehavior {
|
|
|
14957
14988
|
* Whether the circuit condition is in effect.
|
|
14958
14989
|
*/
|
|
14959
14990
|
circuit_condition_enabled: boolean;
|
|
14991
|
+
empty_slots_signal?: SignalID;
|
|
14960
14992
|
/**
|
|
14961
14993
|
* 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.
|
|
14962
14994
|
*/
|
|
@@ -14965,6 +14997,7 @@ interface LuaLogisticContainerControlBehavior extends LuaControlBehavior {
|
|
|
14965
14997
|
* `true` if this logistic container is sending its content to a circuit network.
|
|
14966
14998
|
*/
|
|
14967
14999
|
read_contents: boolean;
|
|
15000
|
+
read_empty_slots: boolean;
|
|
14968
15001
|
/**
|
|
14969
15002
|
* `true` if this logistic container has its requests set by a circuit network.
|
|
14970
15003
|
*
|
|
@@ -15670,7 +15703,7 @@ interface LuaPin {
|
|
|
15670
15703
|
alert_type?: defines.alert_type;
|
|
15671
15704
|
always_visible: boolean;
|
|
15672
15705
|
/**
|
|
15673
|
-
* The custom chart tag - if this pin
|
|
15706
|
+
* The custom chart tag - if this pin specifically binds to a chart tag.
|
|
15674
15707
|
*
|
|
15675
15708
|
* The chart tag must be on the same force as the owning player.
|
|
15676
15709
|
*/
|
|
@@ -15678,7 +15711,7 @@ interface LuaPin {
|
|
|
15678
15711
|
/**
|
|
15679
15712
|
* The index of this pin (unique to this player).
|
|
15680
15713
|
*
|
|
15681
|
-
* Note that this index has no
|
|
15714
|
+
* Note that this index has no correlation to the position of the pin within {@link LuaPlayer::get_pins | runtime:LuaPlayer::get_pins}
|
|
15682
15715
|
*/
|
|
15683
15716
|
readonly index: uint32;
|
|
15684
15717
|
/**
|
|
@@ -15728,8 +15761,6 @@ interface LuaPin {
|
|
|
15728
15761
|
interface LuaPlanet {
|
|
15729
15762
|
/**
|
|
15730
15763
|
* Associates the given surface with this planet. Surface must not already be associated with a planet and the planet must not already have an associated surface.
|
|
15731
|
-
*
|
|
15732
|
-
* Planet must not be using {@link entities_require_heating | runtime:LuaSpaceLocationPrototype::entities_require_heating}.
|
|
15733
15764
|
* @param surface The surface to be associated.
|
|
15734
15765
|
*/
|
|
15735
15766
|
associate_surface(this: void, surface: SurfaceIdentification): void;
|
|
@@ -16495,10 +16526,6 @@ interface LuaPlayer extends LuaControl {
|
|
|
16495
16526
|
* If `true`, circle and name of given player is rendered on the map/chart.
|
|
16496
16527
|
*/
|
|
16497
16528
|
show_on_map: boolean;
|
|
16498
|
-
/**
|
|
16499
|
-
* If `true`, zoom-to-world noise effect will be disabled and environmental sounds will be based on zoom-to-world view instead of position of player's character.
|
|
16500
|
-
*/
|
|
16501
|
-
spectator: boolean;
|
|
16502
16529
|
/**
|
|
16503
16530
|
* All SpiderVehicles currently selected by the player, if they are holding a spidertron remote.
|
|
16504
16531
|
*/
|
|
@@ -16999,6 +17026,7 @@ interface LuaPrototypes {
|
|
|
16999
17026
|
* Control behavior for proxy container.
|
|
17000
17027
|
*/
|
|
17001
17028
|
interface LuaProxyContainerControlBehavior extends LuaControlBehavior {
|
|
17029
|
+
empty_slots_signal?: SignalID;
|
|
17002
17030
|
/**
|
|
17003
17031
|
* 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.
|
|
17004
17032
|
*/
|
|
@@ -17007,6 +17035,7 @@ interface LuaProxyContainerControlBehavior extends LuaControlBehavior {
|
|
|
17007
17035
|
* `true` if this proxy container is sending inventory contents to a circuit network
|
|
17008
17036
|
*/
|
|
17009
17037
|
read_contents: boolean;
|
|
17038
|
+
read_empty_slots: boolean;
|
|
17010
17039
|
/**
|
|
17011
17040
|
* Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
|
17012
17041
|
*/
|
|
@@ -17761,8 +17790,9 @@ interface LuaRecord {
|
|
|
17761
17790
|
/**
|
|
17762
17791
|
* Set new entities to be a part of this blueprint.
|
|
17763
17792
|
* @param entities The new blueprint entities.
|
|
17793
|
+
* @param fix_positions If false, positions will be left unchanged unless invalid for the current snapping.
|
|
17764
17794
|
*/
|
|
17765
|
-
set_blueprint_entities(this: void, entities: BlueprintEntity[]): void;
|
|
17795
|
+
set_blueprint_entities(this: void, entities: BlueprintEntity[], fix_positions?: boolean): void;
|
|
17766
17796
|
/**
|
|
17767
17797
|
* Sets the given tag on the given blueprint entity index in this blueprint.
|
|
17768
17798
|
* @param index The entity index.
|
|
@@ -18235,7 +18265,7 @@ interface LuaRendering {
|
|
|
18235
18265
|
* @param table.players The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
|
|
18236
18266
|
* @param table.visible If this is rendered to anyone at all. Defaults to true.
|
|
18237
18267
|
* @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
|
|
18238
|
-
* @param table.tall Defaults to false.
|
|
18268
|
+
* @param table.tall If this will be translucent when "Hide tall entities" mode is active. Defaults to false.
|
|
18239
18269
|
* @param table.render_mode Mode which this object should render in. Defaults to "game".
|
|
18240
18270
|
* @param table.light_mode Whether this object should be rendered as a sprite, light or both at once. Defaults to "occluder".
|
|
18241
18271
|
*/
|
|
@@ -18276,7 +18306,7 @@ interface LuaRendering {
|
|
|
18276
18306
|
* @param table.visible If this is rendered to anyone at all. Defaults to true.
|
|
18277
18307
|
* @param table.draw_on_ground If this should be drawn below sprites and entities. Defaults to false.
|
|
18278
18308
|
* @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
|
|
18279
|
-
* @param table.tall Defaults to false.
|
|
18309
|
+
* @param table.tall If this will be translucent when "Hide tall entities" mode is active. Defaults to false.
|
|
18280
18310
|
* @param table.render_mode Mode which this object should render in. Defaults to "game".
|
|
18281
18311
|
*/
|
|
18282
18312
|
draw_arc(this: void, table: {
|
|
@@ -18309,7 +18339,7 @@ interface LuaRendering {
|
|
|
18309
18339
|
* @param table.visible If this is rendered to anyone at all. Defaults to true.
|
|
18310
18340
|
* @param table.draw_on_ground If this should be drawn below sprites and entities. Defaults to false.
|
|
18311
18341
|
* @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
|
|
18312
|
-
* @param table.tall Defaults to false.
|
|
18342
|
+
* @param table.tall If this will be translucent when "Hide tall entities" mode is active. Defaults to false.
|
|
18313
18343
|
* @param table.render_mode Mode which this object should render in. Defaults to "game".
|
|
18314
18344
|
*/
|
|
18315
18345
|
draw_circle(this: void, table: {
|
|
@@ -18346,7 +18376,7 @@ interface LuaRendering {
|
|
|
18346
18376
|
* @param table.players The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
|
|
18347
18377
|
* @param table.visible If this is rendered to anyone at all. Defaults to true.
|
|
18348
18378
|
* @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
|
|
18349
|
-
* @param table.tall Defaults to false.
|
|
18379
|
+
* @param table.tall If this will be translucent when "Hide tall entities" mode is active. Defaults to false.
|
|
18350
18380
|
* @param table.render_mode Mode which this object should render in. Defaults to "game".
|
|
18351
18381
|
*/
|
|
18352
18382
|
draw_light(this: void, table: {
|
|
@@ -18381,7 +18411,7 @@ interface LuaRendering {
|
|
|
18381
18411
|
* @param table.visible If this is rendered to anyone at all. Defaults to true.
|
|
18382
18412
|
* @param table.draw_on_ground If this should be drawn below sprites and entities. Defaults to false.
|
|
18383
18413
|
* @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
|
|
18384
|
-
* @param table.tall Defaults to false.
|
|
18414
|
+
* @param table.tall If this will be translucent when "Hide tall entities" mode is active. Defaults to false.
|
|
18385
18415
|
* @param table.render_mode Mode which this object should render in. Defaults to "game".
|
|
18386
18416
|
* @example ```
|
|
18387
18417
|
-- Draw a white and 2 pixel wide line from {0, 0} to {2, 2}.
|
|
@@ -18424,7 +18454,7 @@ interface LuaRendering {
|
|
|
18424
18454
|
* @param table.visible If this is rendered to anyone at all. Defaults to true.
|
|
18425
18455
|
* @param table.draw_on_ground If this should be drawn below sprites and entities. Defaults to false.
|
|
18426
18456
|
* @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
|
|
18427
|
-
* @param table.tall Defaults to false.
|
|
18457
|
+
* @param table.tall If this will be translucent when "Hide tall entities" mode is active. Defaults to false.
|
|
18428
18458
|
* @param table.render_mode Mode which this object should render in. Defaults to "game".
|
|
18429
18459
|
*/
|
|
18430
18460
|
draw_polygon(this: void, table: {
|
|
@@ -18456,7 +18486,7 @@ interface LuaRendering {
|
|
|
18456
18486
|
* @param table.visible If this is rendered to anyone at all. Defaults to true.
|
|
18457
18487
|
* @param table.draw_on_ground If this should be drawn below sprites and entities. Defaults to false.
|
|
18458
18488
|
* @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
|
|
18459
|
-
* @param table.tall Defaults to false.
|
|
18489
|
+
* @param table.tall If this will be translucent when "Hide tall entities" mode is active. Defaults to false.
|
|
18460
18490
|
* @param table.render_mode Mode which this object should render in. Defaults to "game".
|
|
18461
18491
|
* @example ```
|
|
18462
18492
|
-- Draw a white and 1 pixel wide square outline with the corners {0, 0} and {2, 2}.
|
|
@@ -18496,7 +18526,7 @@ interface LuaRendering {
|
|
|
18496
18526
|
* @param table.players The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
|
|
18497
18527
|
* @param table.visible If this is rendered to anyone at all. Defaults to true.
|
|
18498
18528
|
* @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
|
|
18499
|
-
* @param table.tall Defaults to false.
|
|
18529
|
+
* @param table.tall If this will be translucent when "Hide tall entities" mode is active. Defaults to false.
|
|
18500
18530
|
* @param table.render_mode Mode which this object should render in. Defaults to "game".
|
|
18501
18531
|
* @param table.light_mode Whether this object should be rendered as a sprite, light or both at once. Defaults to "occluder".
|
|
18502
18532
|
* @example ```
|
|
@@ -18547,7 +18577,7 @@ interface LuaRendering {
|
|
|
18547
18577
|
* @param table.vertical_alignment Defaults to "top".
|
|
18548
18578
|
* @param table.scale_with_zoom Defaults to false. If true, the text scales with player zoom, resulting in it always being the same size on screen, and the size compared to the game world changes.
|
|
18549
18579
|
* @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
|
|
18550
|
-
* @param table.tall Defaults to false.
|
|
18580
|
+
* @param table.tall If this will be translucent when "Hide tall entities" mode is active. Defaults to false.
|
|
18551
18581
|
* @param table.render_mode Mode which this object should render in. Defaults to "game".
|
|
18552
18582
|
* @param table.use_rich_text If rich text rendering is enabled. Defaults to false.
|
|
18553
18583
|
*/
|
|
@@ -18634,10 +18664,12 @@ interface LuaRoboportControlBehavior extends LuaControlBehavior {
|
|
|
18634
18664
|
* Control behavior for rocket silos.
|
|
18635
18665
|
*/
|
|
18636
18666
|
interface LuaRocketSiloControlBehavior extends LuaControlBehavior {
|
|
18667
|
+
launched_signal?: SignalID;
|
|
18637
18668
|
/**
|
|
18638
18669
|
* 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.
|
|
18639
18670
|
*/
|
|
18640
18671
|
readonly object_name: string;
|
|
18672
|
+
read_launched: boolean;
|
|
18641
18673
|
/**
|
|
18642
18674
|
* The items read mode for the rocket silo.
|
|
18643
18675
|
*/
|
|
@@ -19381,6 +19413,8 @@ interface LuaSpaceConnectionPrototype extends LuaPrototypeBase {
|
|
|
19381
19413
|
* 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.
|
|
19382
19414
|
*/
|
|
19383
19415
|
readonly object_name: string;
|
|
19416
|
+
readonly origin: MapPosition;
|
|
19417
|
+
readonly shape: 'arc' | 'line';
|
|
19384
19418
|
readonly to: LuaSpaceLocationPrototype;
|
|
19385
19419
|
/**
|
|
19386
19420
|
* Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
|
@@ -19411,6 +19445,7 @@ interface LuaSpaceLocationPrototype extends LuaPrototypeBase {
|
|
|
19411
19445
|
*/
|
|
19412
19446
|
readonly object_name: string;
|
|
19413
19447
|
readonly orientation: RealOrientation;
|
|
19448
|
+
readonly origin: MapPosition;
|
|
19414
19449
|
readonly parked_platforms_orientation: RealOrientation;
|
|
19415
19450
|
readonly parked_platforms_position: MapPosition;
|
|
19416
19451
|
readonly player_effects?: TriggerItem[];
|
|
@@ -19638,6 +19673,7 @@ interface LuaSpacePlatformHubControlBehavior extends LuaControlBehavior {
|
|
|
19638
19673
|
* Signal to be transmitted with platform's damage taken value.
|
|
19639
19674
|
*/
|
|
19640
19675
|
damage_taken_signal?: SignalID;
|
|
19676
|
+
empty_slots_signal?: SignalID;
|
|
19641
19677
|
/**
|
|
19642
19678
|
* 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.
|
|
19643
19679
|
*/
|
|
@@ -19650,6 +19686,7 @@ interface LuaSpacePlatformHubControlBehavior extends LuaControlBehavior {
|
|
|
19650
19686
|
* Whether damage taken by the space platform is sent to circuit network.
|
|
19651
19687
|
*/
|
|
19652
19688
|
read_damage_taken: boolean;
|
|
19689
|
+
read_empty_slots: boolean;
|
|
19653
19690
|
/**
|
|
19654
19691
|
* Whether current connection "from" end is sent to circuit network.
|
|
19655
19692
|
*/
|
|
@@ -19763,7 +19800,7 @@ interface LuaStyle {
|
|
|
19763
19800
|
font: string;
|
|
19764
19801
|
font_color: Color;
|
|
19765
19802
|
/**
|
|
19766
|
-
*
|
|
19803
|
+
* GUI of the {@link LuaGuiElement | runtime:LuaGuiElement} of this style.
|
|
19767
19804
|
*/
|
|
19768
19805
|
readonly gui: LuaGui;
|
|
19769
19806
|
/**
|
|
@@ -22902,7 +22939,7 @@ interface LuaTransportLine {
|
|
|
22902
22939
|
get_item_count(this: void, item?: ItemFilter): uint32;
|
|
22903
22940
|
/**
|
|
22904
22941
|
* Gives position of the selected item on this transport line.
|
|
22905
|
-
* @param index Index of the item. Allowed values are from 1 up to #
|
|
22942
|
+
* @param index Index of the item. Allowed values are from 1 up to {@link # (length) | runtime:LuaTransportLine::length_operator}.
|
|
22906
22943
|
* @returns [0] - Linear position of the item along the transport line
|
|
22907
22944
|
* @returns [1] - Map position of the item
|
|
22908
22945
|
*/
|
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.21
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -1543,6 +1543,11 @@ interface CargoLandingPadBlueprintControlBehavior {
|
|
|
1543
1543
|
* Defaults to `true`.
|
|
1544
1544
|
*/
|
|
1545
1545
|
read_contents?: boolean;
|
|
1546
|
+
/**
|
|
1547
|
+
* Defaults to `false`.
|
|
1548
|
+
*/
|
|
1549
|
+
read_empty_slots?: boolean;
|
|
1550
|
+
empty_slots_signal?: SignalID;
|
|
1546
1551
|
/**
|
|
1547
1552
|
* Defaults to `false`.
|
|
1548
1553
|
*/
|
|
@@ -2145,6 +2150,11 @@ interface ContainerBlueprintControlBehavior {
|
|
|
2145
2150
|
* Defaults to `true`.
|
|
2146
2151
|
*/
|
|
2147
2152
|
read_contents?: boolean;
|
|
2153
|
+
/**
|
|
2154
|
+
* Defaults to `false`.
|
|
2155
|
+
*/
|
|
2156
|
+
read_empty_slots?: boolean;
|
|
2157
|
+
empty_slots_signal?: SignalID;
|
|
2148
2158
|
}
|
|
2149
2159
|
interface CraftingQueueItem {
|
|
2150
2160
|
/**
|
|
@@ -2591,7 +2601,7 @@ interface ElemID {
|
|
|
2591
2601
|
/**
|
|
2592
2602
|
* A {@link string | runtime:string} specifying a type for {@link choose elem buttons | runtime:LuaGuiElement::elem_type}. It's also used by {@link ElemID | runtime:ElemID} for {@link LuaGuiElement::elem_tooltip | runtime:LuaGuiElement::elem_tooltip}.
|
|
2593
2603
|
*/
|
|
2594
|
-
type ElemType = 'achievement' | 'decorative' | 'entity' | 'equipment' | 'fluid' | 'item' | 'item-group' | 'recipe' | 'signal' | 'technology' | 'tile' | 'asteroid-chunk' | 'space-location' | 'item-with-quality' | 'entity-with-quality' | 'recipe-with-quality' | 'equipment-with-quality';
|
|
2604
|
+
type ElemType = 'achievement' | 'decorative' | 'entity' | 'equipment' | 'fluid' | 'item' | 'item-group' | 'recipe' | 'signal' | 'technology' | 'tile' | 'asteroid-chunk' | 'space-location' | 'item-with-quality' | 'entity-with-quality' | 'recipe-with-quality' | 'equipment-with-quality' | 'ammo-category' | 'airborne-pollutant' | 'quality' | 'shortcut' | 'space-connection' | 'surface' | 'virtual-signal';
|
|
2595
2605
|
interface EmptySlotInfo {
|
|
2596
2606
|
/**
|
|
2597
2607
|
* The icon to use.
|
|
@@ -4728,6 +4738,11 @@ interface LogisticContainerBlueprintControlBehavior {
|
|
|
4728
4738
|
* Defaults to `true`.
|
|
4729
4739
|
*/
|
|
4730
4740
|
read_contents?: boolean;
|
|
4741
|
+
/**
|
|
4742
|
+
* Defaults to `false`.
|
|
4743
|
+
*/
|
|
4744
|
+
read_empty_slots?: boolean;
|
|
4745
|
+
empty_slots_signal?: SignalID;
|
|
4731
4746
|
/**
|
|
4732
4747
|
* Defaults to `false`.
|
|
4733
4748
|
*/
|
|
@@ -7100,7 +7115,7 @@ interface MapLocation {
|
|
|
7100
7115
|
direction: defines.direction;
|
|
7101
7116
|
}
|
|
7102
7117
|
/**
|
|
7103
|
-
* Coordinates on a surface, for example of an entity. MapPositions may be specified either as a dictionary with `x`, `y` as keys, or simply as an array with two elements.
|
|
7118
|
+
* Coordinates on a surface, for example of an entity. MapPositions may be specified either as a dictionary with `x`, `y` as keys, or simply as an array with two elements. When reading this is always a dictionary.
|
|
7104
7119
|
*
|
|
7105
7120
|
* The coordinates are saved as a fixed-size 32 bit integer, with 8 bits reserved for decimal precision, meaning the smallest value step is `1/2^8 = 0.00390625` tiles.
|
|
7106
7121
|
* @example ```
|
|
@@ -7909,9 +7924,11 @@ interface ProcessionTimeline {
|
|
|
7909
7924
|
```
|
|
7910
7925
|
* @example ```
|
|
7911
7926
|
-- Products of the "advanced-oil-processing" recipe
|
|
7912
|
-
{
|
|
7913
|
-
{type="fluid", name="
|
|
7914
|
-
{type="fluid", name="
|
|
7927
|
+
{
|
|
7928
|
+
{type = "fluid", name = "heavy-oil", amount = 25},
|
|
7929
|
+
{type = "fluid", name = "light-oil", amount = 45},
|
|
7930
|
+
{type = "fluid", name = "petroleum-gas", amount = 55}
|
|
7931
|
+
}
|
|
7915
7932
|
```
|
|
7916
7933
|
* @example ```
|
|
7917
7934
|
-- What a custom recipe would look like that had a probability of 0.5 to return a
|
|
@@ -8033,6 +8050,11 @@ interface ProxyContainerBlueprintControlBehavior {
|
|
|
8033
8050
|
* Defaults to `true`.
|
|
8034
8051
|
*/
|
|
8035
8052
|
read_contents?: boolean;
|
|
8053
|
+
/**
|
|
8054
|
+
* Defaults to `false`.
|
|
8055
|
+
*/
|
|
8056
|
+
read_empty_slots?: boolean;
|
|
8057
|
+
empty_slots_signal?: SignalID;
|
|
8036
8058
|
}
|
|
8037
8059
|
interface PumpBlueprintControlBehavior {
|
|
8038
8060
|
input_networks?: CircuitNetworkSelection;
|
|
@@ -8182,7 +8204,7 @@ interface ReactorBlueprintControlBehavior {
|
|
|
8182
8204
|
* Defaults to `false`.
|
|
8183
8205
|
*/
|
|
8184
8206
|
read_temperature?: boolean;
|
|
8185
|
-
temperature_signal
|
|
8207
|
+
temperature_signal?: SignalID;
|
|
8186
8208
|
}
|
|
8187
8209
|
/**
|
|
8188
8210
|
* The smooth orientation. It is a `float` in the range `[0, 1)` that covers a full circle, starting at the top and going clockwise.
|
|
@@ -8764,7 +8786,10 @@ interface ResearchTriggerCraftItem extends BaseResearchTrigger {
|
|
|
8764
8786
|
*/
|
|
8765
8787
|
interface ResearchTriggerMineEntity extends BaseResearchTrigger {
|
|
8766
8788
|
'type': 'mine-entity';
|
|
8767
|
-
|
|
8789
|
+
/**
|
|
8790
|
+
* The trigger is considered fulfilled if at least one of these entities is mined.
|
|
8791
|
+
*/
|
|
8792
|
+
'entities': string[];
|
|
8768
8793
|
}
|
|
8769
8794
|
/**
|
|
8770
8795
|
*
|
|
@@ -8812,6 +8837,11 @@ interface RocketSiloBlueprintControlBehavior {
|
|
|
8812
8837
|
* Defaults to `logistic_inventory`.
|
|
8813
8838
|
*/
|
|
8814
8839
|
read_items_mode?: defines.control_behavior.rocket_silo.read_mode;
|
|
8840
|
+
/**
|
|
8841
|
+
* Defaults to `false`.
|
|
8842
|
+
*/
|
|
8843
|
+
read_launched?: boolean;
|
|
8844
|
+
launched_signal?: SignalID;
|
|
8815
8845
|
}
|
|
8816
8846
|
interface RollingStockDrawData {
|
|
8817
8847
|
position: MapPosition;
|
|
@@ -9215,14 +9245,14 @@ type SelectionModeFlags = Record</**
|
|
|
9215
9245
|
* Selects entities that are `tile-ghost`s.
|
|
9216
9246
|
*/
|
|
9217
9247
|
'tile-ghost', true>;
|
|
9218
|
-
type SelectorCombinatorParameterOperation = 'select' | 'count' | 'random' | 'quality-transfer' | 'rocket-capacity' | 'stack-size' | 'quality-filter' | 'time';
|
|
9248
|
+
type SelectorCombinatorParameterOperation = 'select' | 'count' | 'random' | 'quality-transfer' | 'rocket-capacity' | 'stack-size' | 'quality-filter' | 'time' | 'quality-select';
|
|
9219
9249
|
interface BaseSelectorCombinatorParameters {
|
|
9220
9250
|
/**
|
|
9221
9251
|
* Defaults to `"select"`.
|
|
9222
9252
|
*/
|
|
9223
9253
|
operation?: SelectorCombinatorParameterOperation;
|
|
9224
9254
|
}
|
|
9225
|
-
type SelectorCombinatorParameters = BaseSelectorCombinatorParameters | SelectorCombinatorParametersCount | SelectorCombinatorParametersQualityFilter | SelectorCombinatorParametersQualityTransfer | SelectorCombinatorParametersRandom | SelectorCombinatorParametersSelect | SelectorCombinatorParametersTime;
|
|
9255
|
+
type SelectorCombinatorParameters = BaseSelectorCombinatorParameters | SelectorCombinatorParametersCount | SelectorCombinatorParametersQualityFilter | SelectorCombinatorParametersQualitySelect | SelectorCombinatorParametersQualityTransfer | SelectorCombinatorParametersRandom | SelectorCombinatorParametersSelect | SelectorCombinatorParametersTime;
|
|
9226
9256
|
/**
|
|
9227
9257
|
*
|
|
9228
9258
|
* Applies to variant case `count`
|
|
@@ -9251,6 +9281,20 @@ interface SelectorCombinatorParametersQualityFilter extends BaseSelectorCombinat
|
|
|
9251
9281
|
*/
|
|
9252
9282
|
'quality_filter'?: QualityCondition;
|
|
9253
9283
|
}
|
|
9284
|
+
/**
|
|
9285
|
+
*
|
|
9286
|
+
* Applies to variant case `quality-select`
|
|
9287
|
+
*/
|
|
9288
|
+
interface SelectorCombinatorParametersQualitySelect extends BaseSelectorCombinatorParameters {
|
|
9289
|
+
/**
|
|
9290
|
+
* Defaults to `"select"`.
|
|
9291
|
+
*/
|
|
9292
|
+
'operation'?: 'quality-select';
|
|
9293
|
+
/**
|
|
9294
|
+
* Defaults to `true`.
|
|
9295
|
+
*/
|
|
9296
|
+
'select_highest_quality'?: boolean;
|
|
9297
|
+
}
|
|
9254
9298
|
/**
|
|
9255
9299
|
*
|
|
9256
9300
|
* Applies to variant case `quality-transfer`
|
|
@@ -9291,6 +9335,10 @@ interface SelectorCombinatorParametersSelect extends BaseSelectorCombinatorParam
|
|
|
9291
9335
|
* Defaults to `"select"`.
|
|
9292
9336
|
*/
|
|
9293
9337
|
'operation'?: 'select';
|
|
9338
|
+
/**
|
|
9339
|
+
* Defaults to `"="`.
|
|
9340
|
+
*/
|
|
9341
|
+
'index_comparator'?: ComparatorString;
|
|
9294
9342
|
/**
|
|
9295
9343
|
* The signal index to use if not using a specific `index_signal`. Defaults to `0`.
|
|
9296
9344
|
*/
|
|
@@ -9604,6 +9652,11 @@ interface SpacePlatformHubBlueprintControlBehavior {
|
|
|
9604
9652
|
* Defaults to `true`.
|
|
9605
9653
|
*/
|
|
9606
9654
|
read_contents?: boolean;
|
|
9655
|
+
/**
|
|
9656
|
+
* Defaults to `false`.
|
|
9657
|
+
*/
|
|
9658
|
+
read_empty_slots?: boolean;
|
|
9659
|
+
empty_slots_signal?: SignalID;
|
|
9607
9660
|
/**
|
|
9608
9661
|
* Defaults to `false`.
|
|
9609
9662
|
*/
|
|
@@ -9826,6 +9879,7 @@ string;
|
|
|
9826
9879
|
* The effect that is applied when a technology is researched.
|
|
9827
9880
|
*/
|
|
9828
9881
|
interface BaseTechnologyModifier {
|
|
9882
|
+
hidden: boolean;
|
|
9829
9883
|
/**
|
|
9830
9884
|
* Modifier type. Specifies which of the other fields will be available.
|
|
9831
9885
|
*/
|
|
@@ -12101,8 +12155,6 @@ interface UtilityConstants {
|
|
|
12101
12155
|
logistic_gui_selected_network_highlight_tint: Color;
|
|
12102
12156
|
chart_search_highlight: Color;
|
|
12103
12157
|
selected_chart_search_highlight: Color;
|
|
12104
|
-
zoom_to_world_can_use_nightvision: boolean;
|
|
12105
|
-
zoom_to_world_effect_strength: float;
|
|
12106
12158
|
max_logistic_filter_count: LogisticFilterIndex;
|
|
12107
12159
|
/**
|
|
12108
12160
|
* Will be clamped to the range [1, 100].
|
|
@@ -12168,7 +12220,6 @@ interface UtilityConstants {
|
|
|
12168
12220
|
*/
|
|
12169
12221
|
merge_bonus_gui_production_bonuses?: boolean;
|
|
12170
12222
|
daytime_color_lookup: DaytimeColorLookupTable;
|
|
12171
|
-
zoom_to_world_daytime_color_lookup: DaytimeColorLookupTable;
|
|
12172
12223
|
frozen_color_lookup: ColorLookupTable;
|
|
12173
12224
|
default_platform_surface_render_parameters: SurfaceRenderParameters;
|
|
12174
12225
|
drop_item_radius: double;
|
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.21
|
|
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.1.
|
|
5
|
+
// Factorio version 2.1.21
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace defines {
|
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.21
|
|
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.1.
|
|
5
|
+
// Factorio version 2.1.21
|
|
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.1.
|
|
5
|
+
// Factorio version 2.1.21
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -83,6 +83,8 @@ interface AccumulatorPrototype extends EntityWithOwnerPrototype {
|
|
|
83
83
|
draw_copper_wires?: boolean;
|
|
84
84
|
/**
|
|
85
85
|
* The capacity of the energy source buffer specifies the capacity of the accumulator.
|
|
86
|
+
*
|
|
87
|
+
* Any {@link usage_priority | prototype:ElectricEnergySource::usage_priority} set here will be ignored, accumulators always have the "managed-accumulator" usage priority.
|
|
86
88
|
*/
|
|
87
89
|
energy_source: ElectricEnergySource;
|
|
88
90
|
}
|
|
@@ -953,6 +955,11 @@ interface AssemblingMachinePrototype extends CraftingMachinePrototype {
|
|
|
953
955
|
* The preset recipe of this machine. This machine does not show a recipe selection if this is set. The base game uses this for the {@link rocket silo | https://wiki.factorio.com/Rocket_silo}.
|
|
954
956
|
*/
|
|
955
957
|
fixed_recipe?: RecipeID;
|
|
958
|
+
/**
|
|
959
|
+
* Whether the {@link fluid boxes | prototype:CraftingMachinePrototype::fluid_boxes} are disabled when this assembling machine has no recipe set.
|
|
960
|
+
*
|
|
961
|
+
* If a recipe is set, this property does not affect fluidbox behavior. Instead, whether fluidboxes are enabled depends on whether the recipe needs them, e.g. if a recipe without fluid ingredients is set, the input fluidboxes will be disabled.
|
|
962
|
+
*/
|
|
956
963
|
fluid_boxes_off_when_no_fluid_recipe?: boolean;
|
|
957
964
|
/**
|
|
958
965
|
* The locale key of the title of the recipe selection GUI that is shown when the player opens the assembling machine. May not be longer than 200 characters.
|
|
@@ -1303,7 +1310,7 @@ interface BoilerPrototype extends EntityWithOwnerPrototype {
|
|
|
1303
1310
|
output_fluid_box: FluidBox;
|
|
1304
1311
|
pictures?: BoilerPictureSet;
|
|
1305
1312
|
/**
|
|
1306
|
-
* Only loaded, and mandatory if `mode` is `"output-to-separate-pipe"`.
|
|
1313
|
+
* Only loaded, and mandatory if `mode` is `"output-to-separate-pipe"`. The boiler heats the input fluid to exactly this temperature and moves the fluid to the output fluid box.
|
|
1307
1314
|
*/
|
|
1308
1315
|
target_temperature?: float;
|
|
1309
1316
|
}
|
|
@@ -1519,6 +1526,7 @@ interface CargoLandingPadPrototype extends EntityWithOwnerPrototype {
|
|
|
1519
1526
|
* The maximum circuit wire distance for this entity.
|
|
1520
1527
|
*/
|
|
1521
1528
|
circuit_wire_max_distance?: double;
|
|
1529
|
+
default_empty_slots_signal?: SignalIDConnector;
|
|
1522
1530
|
draw_circuit_wires?: boolean;
|
|
1523
1531
|
draw_copper_wires?: boolean;
|
|
1524
1532
|
graphics_set?: CargoBayConnectableGraphicsSet;
|
|
@@ -1980,6 +1988,7 @@ interface ContainerPrototype extends EntityWithOwnerPrototype {
|
|
|
1980
1988
|
* The maximum circuit wire distance for this container.
|
|
1981
1989
|
*/
|
|
1982
1990
|
circuit_wire_max_distance?: double;
|
|
1991
|
+
default_empty_slots_signal?: SignalIDConnector;
|
|
1983
1992
|
default_status?: EntityStatus;
|
|
1984
1993
|
/**
|
|
1985
1994
|
* Amount of directions this container should have. Allowed values are 1, 2 and 4.
|
|
@@ -2125,6 +2134,10 @@ interface CraftingMachinePrototype extends EntityWithOwnerPrototype {
|
|
|
2125
2134
|
* Sets the {@link module categories | prototype:ModuleCategory} that are allowed to be inserted into this machine.
|
|
2126
2135
|
*/
|
|
2127
2136
|
allowed_module_categories?: ModuleCategoryID[];
|
|
2137
|
+
/**
|
|
2138
|
+
* If true the starting frame will be randomized upon placement.
|
|
2139
|
+
*/
|
|
2140
|
+
animation_random_start_frame?: boolean;
|
|
2128
2141
|
/**
|
|
2129
2142
|
* A list of {@link recipe categories | prototype:RecipeCategory} this crafting machine can use.
|
|
2130
2143
|
* @example ```
|
|
@@ -4076,7 +4089,7 @@ interface FluidPrototype extends Prototype {
|
|
|
4076
4089
|
*/
|
|
4077
4090
|
default_temperature: float;
|
|
4078
4091
|
/**
|
|
4079
|
-
* Whether the fluid should glow in pipe and storage tank windows.
|
|
4092
|
+
* Whether the fluid should glow in pipe and storage tank windows. The glow is only drawn when the {@link expansion_shaders | prototype:FeatureFlags::expansion_shaders} feature flag is enabled.
|
|
4080
4093
|
*/
|
|
4081
4094
|
draw_as_glow?: boolean;
|
|
4082
4095
|
/**
|
|
@@ -4253,10 +4266,18 @@ interface FluidTurretPrototype extends TurretPrototype {
|
|
|
4253
4266
|
interface FluidWagonPrototype extends RollingStockPrototype {
|
|
4254
4267
|
/**
|
|
4255
4268
|
* Horizontal (xy) offset of the central valve from the wagon position when it is oriented east/west.
|
|
4269
|
+
*
|
|
4270
|
+
* For all directions, the elliptical interpolation for the offset is performed based on both `base_valve_xy_offset_when_horizontal` and `base_valve_xy_offset_when_vertical` and the tangential and normal are calculated separately.
|
|
4271
|
+
*
|
|
4272
|
+
* The tangential component of the offset is interpolated from values `base_valve_xy_offset_when_horizontal.x` and `base_valve_xy_offset_when_vertical.y`. The normal component of the offset is interpolated from values `base_valve_xy_offset_when_vertical.x` and `base_valve_xy_offset_when_horizontal.y`.
|
|
4273
|
+
*
|
|
4274
|
+
* Interpolating the components with one value non-zero and the other zero would produce undesirable behaviour and is therefore not allowed.
|
|
4256
4275
|
*/
|
|
4257
4276
|
base_valve_xy_offset_when_horizontal?: Vector;
|
|
4258
4277
|
/**
|
|
4259
4278
|
* Horizontal (xy) offset of the central valve from the wagon position when it is oriented north/south.
|
|
4279
|
+
*
|
|
4280
|
+
* See `base_valve_xy_offset_when_horizontal` for how this value is used in the offset calculation.
|
|
4260
4281
|
*/
|
|
4261
4282
|
base_valve_xy_offset_when_vertical?: Vector;
|
|
4262
4283
|
/**
|
|
@@ -4283,10 +4304,18 @@ interface FluidWagonPrototype extends RollingStockPrototype {
|
|
|
4283
4304
|
tank_spacing?: float;
|
|
4284
4305
|
/**
|
|
4285
4306
|
* Projected offset between valves when the wagon is oriented east/west.
|
|
4307
|
+
*
|
|
4308
|
+
* For all directions, the elliptical interpolation for the offset is performed based on both `valve_to_valve_offset_when_horizontal` and `valve_to_valve_offset_when_vertical` and the tangential and normal are calculated separately.
|
|
4309
|
+
*
|
|
4310
|
+
* The tangential component of the offset is interpolated from values `valve_to_valve_offset_when_horizontal.x` and `valve_to_valve_offset_when_vertical.y`. The normal component of the offset is interpolated from values `valve_to_valve_offset_when_vertical.x` and `valve_to_valve_offset_when_horizontal.y`.
|
|
4311
|
+
*
|
|
4312
|
+
* Interpolating the components with one value non-zero and the other zero would produce undesirable behaviour and is therefore not allowed.
|
|
4286
4313
|
*/
|
|
4287
4314
|
valve_to_valve_offset_when_horizontal?: Vector;
|
|
4288
4315
|
/**
|
|
4289
4316
|
* Projected offset between valves when the wagon is oriented north/south.
|
|
4317
|
+
*
|
|
4318
|
+
* See `valve_to_valve_offset_when_horizontal` for how this value is used in the offset calculation.
|
|
4290
4319
|
*/
|
|
4291
4320
|
valve_to_valve_offset_when_vertical?: Vector;
|
|
4292
4321
|
}
|
|
@@ -5081,9 +5110,9 @@ interface ItemPrototype extends Prototype {
|
|
|
5081
5110
|
*/
|
|
5082
5111
|
fuel_acceleration_multiplier_quality_bonus?: double;
|
|
5083
5112
|
/**
|
|
5084
|
-
*
|
|
5113
|
+
* Mandatory with at least one fuel category when a nonzero fuel_value is defined.
|
|
5085
5114
|
*/
|
|
5086
|
-
|
|
5115
|
+
fuel_categories?: FuelCategoryID[];
|
|
5087
5116
|
fuel_emissions_multiplier?: double;
|
|
5088
5117
|
/**
|
|
5089
5118
|
* Colors the glow of the burner energy source when this fuel is burned. Can also be used to color the glow of reactors burning the fuel, see {@link ReactorPrototype::use_fuel_glow_color | prototype:ReactorPrototype::use_fuel_glow_color}.
|
|
@@ -5596,6 +5625,8 @@ interface LampPrototype extends EntityWithOwnerPrototype {
|
|
|
5596
5625
|
draw_copper_wires?: boolean;
|
|
5597
5626
|
/**
|
|
5598
5627
|
* The emissions set on the energy source are ignored so lamps cannot produce pollution.
|
|
5628
|
+
*
|
|
5629
|
+
* If this is an electric energy source, any {@link usage_priority | prototype:ElectricEnergySource::usage_priority} set here will be ignored, lamps always have the "lamp" usage priority.
|
|
5599
5630
|
*/
|
|
5600
5631
|
energy_source: ElectricEnergySource | VoidEnergySource;
|
|
5601
5632
|
/**
|
|
@@ -5773,6 +5804,7 @@ interface LinkedContainerPrototype extends EntityWithOwnerPrototype {
|
|
|
5773
5804
|
* The maximum circuit wire distance for this linked container.
|
|
5774
5805
|
*/
|
|
5775
5806
|
circuit_wire_max_distance?: double;
|
|
5807
|
+
default_empty_slots_signal?: SignalIDConnector;
|
|
5776
5808
|
draw_circuit_wires?: boolean;
|
|
5777
5809
|
draw_copper_wires?: boolean;
|
|
5778
5810
|
/**
|
|
@@ -6411,11 +6443,15 @@ interface NightVisionEquipmentPrototype extends EquipmentPrototype {
|
|
|
6411
6443
|
activate_sound?: Sound;
|
|
6412
6444
|
color_lookup: DaytimeColorLookupTable;
|
|
6413
6445
|
/**
|
|
6414
|
-
* Must be >= 0 and <= 1.
|
|
6446
|
+
* Must be >= 0 and <= 1. By default, this equipment turns on when `surface_darkness >= darkness_to_turn_on`.
|
|
6415
6447
|
*/
|
|
6416
6448
|
darkness_to_turn_on?: float;
|
|
6417
6449
|
deactivate_sound?: Sound;
|
|
6418
6450
|
energy_input: Energy;
|
|
6451
|
+
/**
|
|
6452
|
+
* If `true`, this equipment turns on when `surface_darkness <= darkness_to_turn_on`.
|
|
6453
|
+
*/
|
|
6454
|
+
sunglasses?: boolean;
|
|
6419
6455
|
}
|
|
6420
6456
|
/**
|
|
6421
6457
|
* An {@link offshore pump | https://wiki.factorio.com/Offshore_pump}.
|
|
@@ -6924,18 +6960,26 @@ interface PrototypeBase {
|
|
|
6924
6960
|
* A container that must be set to point at other entity and inventory index so it can forward all inventory interactions to the other entity.
|
|
6925
6961
|
*/
|
|
6926
6962
|
interface ProxyContainerPrototype extends EntityWithOwnerPrototype {
|
|
6927
|
-
|
|
6963
|
+
/**
|
|
6964
|
+
* If given, there must be exactly `direction_count` elements in the table.
|
|
6965
|
+
*/
|
|
6966
|
+
circuit_connector?: CircuitConnectorDefinition[];
|
|
6928
6967
|
/**
|
|
6929
6968
|
* The maximum circuit wire distance for this entity.
|
|
6930
6969
|
*/
|
|
6931
6970
|
circuit_wire_max_distance?: double;
|
|
6971
|
+
default_empty_slots_signal?: SignalIDConnector;
|
|
6972
|
+
/**
|
|
6973
|
+
* Amount of directions this container should have. Allowed values are 1, 2 and 4.
|
|
6974
|
+
*/
|
|
6975
|
+
direction_count?: uint8;
|
|
6932
6976
|
draw_circuit_wires?: boolean;
|
|
6933
6977
|
draw_copper_wires?: boolean;
|
|
6934
6978
|
/**
|
|
6935
6979
|
* If the content of the inventory should be rendered in alt mode.
|
|
6936
6980
|
*/
|
|
6937
6981
|
draw_inventory_content?: boolean;
|
|
6938
|
-
picture?:
|
|
6982
|
+
picture?: Sprite4Way;
|
|
6939
6983
|
}
|
|
6940
6984
|
/**
|
|
6941
6985
|
* The pump is used to transfer fluids between tanks, fluid wagons and pipes.
|
|
@@ -7633,9 +7677,9 @@ interface RecipePrototype extends Prototype {
|
|
|
7633
7677
|
*/
|
|
7634
7678
|
always_show_made_in?: boolean;
|
|
7635
7679
|
/**
|
|
7636
|
-
* Whether the recipe should be included in the recycling recipes automatically generated by the
|
|
7680
|
+
* Whether the recipe should be included in the recycling recipes automatically generated by the recycler mod.
|
|
7637
7681
|
*
|
|
7638
|
-
* This property is not read by the game engine itself, but the
|
|
7682
|
+
* This property is not read by the game engine itself, but the recycler mod's recycling.lua file. This means it is discarded by the game engine after loading finishes.
|
|
7639
7683
|
*/
|
|
7640
7684
|
auto_recycle?: boolean;
|
|
7641
7685
|
/**
|
|
@@ -7765,6 +7809,12 @@ interface RecipePrototype extends Prototype {
|
|
|
7765
7809
|
```
|
|
7766
7810
|
*/
|
|
7767
7811
|
raise_on_crafted?: boolean;
|
|
7812
|
+
/**
|
|
7813
|
+
* If set, this recipe's recycling recipe is generated by the recycler mod based on the ingredients of the given recipe, instead of this recipe's own ingredients.
|
|
7814
|
+
*
|
|
7815
|
+
* This property is not read by the game engine itself, but the recycler mod's recycling.lua file. This means it is discarded by the game engine after loading finishes.
|
|
7816
|
+
*/
|
|
7817
|
+
recycle_to_ingredients_of?: RecipeID;
|
|
7768
7818
|
requester_paste_multiplier?: uint32;
|
|
7769
7819
|
/**
|
|
7770
7820
|
* Whether enabling this recipe requires the ingredients be unlocked before the products are marked as unlocked.
|
|
@@ -7798,6 +7848,8 @@ interface RecipePrototype extends Prototype {
|
|
|
7798
7848
|
results?: ProductPrototype[];
|
|
7799
7849
|
/**
|
|
7800
7850
|
* When set to `true`, item ingredients will be sorted based on {@link ItemGroup::order_in_recipe | prototype:ItemGroup::order_in_recipe}.
|
|
7851
|
+
*
|
|
7852
|
+
* Otherwise, the item ingredients appear in the order that they are defined in the prototype.
|
|
7801
7853
|
*/
|
|
7802
7854
|
sort_item_ingredients?: boolean;
|
|
7803
7855
|
surface_conditions?: SurfaceCondition[];
|
|
@@ -8341,6 +8393,7 @@ interface RocketSiloPrototype extends AssemblingMachinePrototype {
|
|
|
8341
8393
|
* Applied when switching into the {@link arms_advance | runtime:defines.rocket_silo_status.arms_advance} state.
|
|
8342
8394
|
*/
|
|
8343
8395
|
clamps_on_trigger?: TriggerEffect;
|
|
8396
|
+
default_launched_signal?: SignalIDConnector;
|
|
8344
8397
|
door_back_frozen?: Sprite;
|
|
8345
8398
|
door_back_open_offset: Vector;
|
|
8346
8399
|
door_back_sprite?: Sprite;
|
|
@@ -9186,6 +9239,8 @@ interface SpaceConnectionPrototype extends Prototype {
|
|
|
9186
9239
|
* Cannot be 0.
|
|
9187
9240
|
*/
|
|
9188
9241
|
length?: uint32;
|
|
9242
|
+
origin?: MapPosition;
|
|
9243
|
+
shape?: 'arc' | 'line';
|
|
9189
9244
|
to: SpaceLocationID;
|
|
9190
9245
|
}
|
|
9191
9246
|
/**
|
|
@@ -9199,11 +9254,11 @@ interface SpaceLocationPrototype extends Prototype {
|
|
|
9199
9254
|
asteroid_spawn_influence?: double;
|
|
9200
9255
|
auto_save_on_first_trip?: boolean;
|
|
9201
9256
|
/**
|
|
9202
|
-
* Distance from the
|
|
9257
|
+
* Distance from the origin in map coordinates.
|
|
9203
9258
|
*/
|
|
9204
9259
|
distance: double;
|
|
9205
9260
|
/**
|
|
9206
|
-
* If `false`, the orbital ring around the
|
|
9261
|
+
* If `false`, the orbital ring around the origin will not be drawn for this location.
|
|
9207
9262
|
*/
|
|
9208
9263
|
draw_orbit?: boolean;
|
|
9209
9264
|
/**
|
|
@@ -9243,9 +9298,13 @@ interface SpaceLocationPrototype extends Prototype {
|
|
|
9243
9298
|
*/
|
|
9244
9299
|
magnitude?: double;
|
|
9245
9300
|
/**
|
|
9246
|
-
* Angle in relation to the
|
|
9301
|
+
* Angle in relation to the origin.
|
|
9247
9302
|
*/
|
|
9248
9303
|
orientation: RealOrientation;
|
|
9304
|
+
/**
|
|
9305
|
+
* The location that this space location orbits in the space map.
|
|
9306
|
+
*/
|
|
9307
|
+
origin?: MapPosition;
|
|
9249
9308
|
/**
|
|
9250
9309
|
* The orientation where parked space platforms will be drawn.
|
|
9251
9310
|
*/
|
|
@@ -9272,7 +9331,7 @@ interface SpaceLocationPrototype extends Prototype {
|
|
|
9272
9331
|
*/
|
|
9273
9332
|
starmap_icon?: FileName;
|
|
9274
9333
|
/**
|
|
9275
|
-
* Orientation of the starmap icon, defaults to pointing towards the
|
|
9334
|
+
* Orientation of the starmap icon, defaults to pointing towards the origin.
|
|
9276
9335
|
*/
|
|
9277
9336
|
starmap_icon_orientation?: RealOrientation;
|
|
9278
9337
|
/**
|
|
@@ -9298,6 +9357,7 @@ interface SpacePlatformHubPrototype extends EntityWithOwnerPrototype {
|
|
|
9298
9357
|
*/
|
|
9299
9358
|
circuit_wire_max_distance?: double;
|
|
9300
9359
|
default_damage_taken_signal?: SignalIDConnector;
|
|
9360
|
+
default_empty_slots_signal?: SignalIDConnector;
|
|
9301
9361
|
default_speed_signal?: SignalIDConnector;
|
|
9302
9362
|
draw_circuit_wires?: boolean;
|
|
9303
9363
|
draw_copper_wires?: boolean;
|
|
@@ -10023,6 +10083,8 @@ interface TechnologyPrototype extends Prototype {
|
|
|
10023
10083
|
max_level?: uint32 | 'infinite';
|
|
10024
10084
|
/**
|
|
10025
10085
|
* If this name ends with `-<number>`, that number is ignored for localization purposes. E.g. if the name is `technology-3`, the game looks for the `technology-name.technology` localization. The technology tree will also show the number on the technology icon.
|
|
10086
|
+
*
|
|
10087
|
+
* The number is considered the level of the technology. There can't be technologies with noncontiguous levels, e.g. `technology-1` and `technology-3` without `technology-2` will cause a startup error.
|
|
10026
10088
|
*/
|
|
10027
10089
|
name: string;
|
|
10028
10090
|
/**
|
|
@@ -10322,7 +10384,9 @@ interface TipsAndTricksItem extends PrototypeBase {
|
|
|
10322
10384
|
player_input_method_filter?: PlayerInputMethodFilter;
|
|
10323
10385
|
simulation?: SimulationDefinition;
|
|
10324
10386
|
/**
|
|
10325
|
-
* Condition for never showing the tip notification to the player.
|
|
10387
|
+
* Condition for never showing the tip notification to the player. If the condition is fulfilled, the tip is considered completed and shown in the tips list.
|
|
10388
|
+
*
|
|
10389
|
+
* If the tip notification is already shown, then fulfilling the skip trigger removes the tip notification icon again.
|
|
10326
10390
|
*/
|
|
10327
10391
|
skip_trigger?: TipTrigger;
|
|
10328
10392
|
starting_status?: TipStatus;
|
|
@@ -10331,7 +10395,7 @@ interface TipsAndTricksItem extends PrototypeBase {
|
|
|
10331
10395
|
*/
|
|
10332
10396
|
tag?: string;
|
|
10333
10397
|
/**
|
|
10334
|
-
* Condition for when the tip notification should be shown to the player.
|
|
10398
|
+
* Condition for when the tip notification should be shown to the player. If the condition is fulfilled, the status of the tip is set to "suggested" or "dependencies-not-met".
|
|
10335
10399
|
*/
|
|
10336
10400
|
trigger?: TipTrigger;
|
|
10337
10401
|
/**
|
|
@@ -11271,9 +11335,6 @@ interface UtilityConstants extends PrototypeBase {
|
|
|
11271
11335
|
water_collision_mask: TileCollisionMaskConnector;
|
|
11272
11336
|
weapons_in_simulation_volume_modifier: float;
|
|
11273
11337
|
zero_count_value_tint: Color;
|
|
11274
|
-
zoom_to_world_can_use_nightvision: boolean;
|
|
11275
|
-
zoom_to_world_daytime_color_lookup: DaytimeColorLookupTable;
|
|
11276
|
-
zoom_to_world_effect_strength: float;
|
|
11277
11338
|
}
|
|
11278
11339
|
/**
|
|
11279
11340
|
* Sounds used by the game that are not specific to certain prototypes.
|
|
@@ -12151,6 +12212,8 @@ interface UtilitySprites extends PrototypeBase {
|
|
|
12151
12212
|
side_menu_factoriopedia_icon: Sprite;
|
|
12152
12213
|
side_menu_logistic_networks_icon: Sprite;
|
|
12153
12214
|
side_menu_map_icon: Sprite;
|
|
12215
|
+
side_menu_master_mute_muted_icon: Sprite;
|
|
12216
|
+
side_menu_master_mute_unmuted_icon: Sprite;
|
|
12154
12217
|
side_menu_menu_icon: Sprite;
|
|
12155
12218
|
side_menu_players_icon: Sprite;
|
|
12156
12219
|
side_menu_production_icon: Sprite;
|
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.1.
|
|
5
|
+
// Factorio version 2.1.21
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -3782,7 +3782,7 @@ color_lookup = {{1, "identity"}}
|
|
|
3782
3782
|
color_lookup = {{0.5, "__core__/graphics/color_luts/nightvision.png"}}
|
|
3783
3783
|
```
|
|
3784
3784
|
* @example ```
|
|
3785
|
-
|
|
3785
|
+
daytime_color_lookup =
|
|
3786
3786
|
{
|
|
3787
3787
|
{0.25, "identity"},
|
|
3788
3788
|
{0.45, "__core__/graphics/color_luts/night.png"},
|
|
@@ -7205,7 +7205,7 @@ end
|
|
|
7205
7205
|
```
|
|
7206
7206
|
* @example ```
|
|
7207
7207
|
-- uses a features only available past a certain base mod version
|
|
7208
|
-
if helpers.
|
|
7208
|
+
if helpers.compare_versions(mods["base"], "2.0.56") >= 0 then
|
|
7209
7209
|
use_new_features()
|
|
7210
7210
|
end
|
|
7211
7211
|
```
|
|
@@ -7963,7 +7963,7 @@ interface PlatformBackdrop {
|
|
|
7963
7963
|
*/
|
|
7964
7964
|
hero_clouds_are_emissive?: boolean;
|
|
7965
7965
|
/**
|
|
7966
|
-
* Color of light.
|
|
7966
|
+
* Color of light.
|
|
7967
7967
|
*/
|
|
7968
7968
|
light_color?: Color;
|
|
7969
7969
|
light_direction?: Vector3D;
|
|
@@ -8014,7 +8014,7 @@ interface PlatformBackdrop {
|
|
|
8014
8014
|
*/
|
|
8015
8015
|
rotation_seconds?: float;
|
|
8016
8016
|
/**
|
|
8017
|
-
* Color of specular light.
|
|
8017
|
+
* Color of specular light.
|
|
8018
8018
|
*/
|
|
8019
8019
|
specular_color?: Color;
|
|
8020
8020
|
specular_intensity?: float;
|
|
@@ -9787,6 +9787,16 @@ interface Settings {
|
|
|
9787
9787
|
*/
|
|
9788
9788
|
startup: Record<string, ModSetting>;
|
|
9789
9789
|
}
|
|
9790
|
+
/**
|
|
9791
|
+
* @example ```
|
|
9792
|
+
-- What a recipe's results would look like for a probability of 0.3 to return iron and 0.7 to return copper
|
|
9793
|
+
-- but always exactly 1 item, never no item or both items
|
|
9794
|
+
{
|
|
9795
|
+
{type = "item", name = "iron-plate", amount = 1, shared_probability = {min = 0, max = 0.3}},
|
|
9796
|
+
{type = "item", name = "copper-plate", amount = 1, shared_probability = {min = 0.3, max = 1}},
|
|
9797
|
+
}
|
|
9798
|
+
```
|
|
9799
|
+
*/
|
|
9790
9800
|
interface SharedProbabilityDefinition {
|
|
9791
9801
|
/**
|
|
9792
9802
|
* Upper end of the range of shared roll values that will allow product to be given. Must be >= `min` and <= `1`.
|
|
@@ -12992,7 +13002,7 @@ interface TreeGrowth {
|
|
|
12992
13002
|
trunk_warp: Sprite;
|
|
12993
13003
|
}
|
|
12994
13004
|
/**
|
|
12995
|
-
* Tree has number of "dying" stages, which is deduced from frame count of `shadow` if shadow is defined, otherwise from frame count of `trunk`. Frame count of `leaves` has to be one less than deduced number stages, as last stage is always assumed to be leafless.
|
|
13005
|
+
* Tree has number of "dying" stages, which is deduced from frame count of `shadow` if shadow is defined, otherwise from frame count of `trunk`. Frame count of `leaves` has to be one less than the deduced number of stages, as last the stage is always assumed to be leafless.
|
|
12996
13006
|
*/
|
|
12997
13007
|
interface TreeVariation {
|
|
12998
13008
|
branch_generation: CreateParticleTriggerEffectItem;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "factorio-types",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.70",
|
|
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.1.
|
|
26
|
+
"factorioVersion": "2.1.21",
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"lua-types": "^2.13.1"
|
|
29
29
|
},
|