factorio-types 1.2.63 → 1.2.65
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 +83 -8
- package/dist/concepts.d.ts +122 -22
- package/dist/datacollection.d.ts +1 -1
- package/dist/defines.d.ts +153 -149
- package/dist/events.d.ts +43 -1
- package/dist/global.d.ts +1 -1
- package/dist/prototypes.d.ts +41 -4
- package/dist/types.d.ts +34 -8
- package/package.json +2 -2
- package/src/core.d.ts +3 -3
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.14
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -406,6 +406,10 @@ interface LuaBootstrap {
|
|
|
406
406
|
* Converts LuaEventType into related value of defines.events. Value will be provided also if event was not given a constant inside of defines.events.
|
|
407
407
|
*/
|
|
408
408
|
get_event_id(this: void, event: LuaEventType): defines.events;
|
|
409
|
+
/**
|
|
410
|
+
* Converts LuaEventType into corresponding event name. If event has no name, no value will be given.
|
|
411
|
+
*/
|
|
412
|
+
get_event_name(this: void, event: LuaEventType): string | null;
|
|
409
413
|
/**
|
|
410
414
|
* Gets the mod event order as a string.
|
|
411
415
|
*/
|
|
@@ -2742,6 +2746,24 @@ interface LuaBootstrap {
|
|
|
2742
2746
|
script.on_event(defines.events.on_built_entity,
|
|
2743
2747
|
function(event) game.print("Gotta go fast!") end,
|
|
2744
2748
|
{{filter = "name", name = "fast-inserter"}})
|
|
2749
|
+
```
|
|
2750
|
+
*/
|
|
2751
|
+
on_event(this: void, event: defines.events.on_player_super_forced_selected_area, handler: ((this: void, arg0: runtime.on_player_super_forced_selected_area) => any) | nil, filters?: EventFilter): void;
|
|
2752
|
+
/**
|
|
2753
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2754
|
+
* @param event The event(s) or custom-input to invoke the handler on.
|
|
2755
|
+
* @param handler The handler for this event. Passing `nil` will unregister it.
|
|
2756
|
+
* @param filters The filters for this event. Can only be used when registering for individual events.
|
|
2757
|
+
* @example ```
|
|
2758
|
+
-- Register for the on_tick event to print the current tick to console each tick
|
|
2759
|
+
script.on_event(defines.events.on_tick,
|
|
2760
|
+
function(event) game.print(event.tick) end)
|
|
2761
|
+
```
|
|
2762
|
+
* @example ```
|
|
2763
|
+
-- Register for the on_built_entity event, limiting it to only be received when a `"fast-inserter"` is built
|
|
2764
|
+
script.on_event(defines.events.on_built_entity,
|
|
2765
|
+
function(event) game.print("Gotta go fast!") end,
|
|
2766
|
+
{{filter = "name", name = "fast-inserter"}})
|
|
2745
2767
|
```
|
|
2746
2768
|
*/
|
|
2747
2769
|
on_event(this: void, event: defines.events.on_player_toggled_alt_mode, handler: ((this: void, arg0: runtime.on_player_toggled_alt_mode) => any) | nil, filters?: EventFilter): void;
|
|
@@ -4781,6 +4803,7 @@ interface LuaBurner {
|
|
|
4781
4803
|
*/
|
|
4782
4804
|
interface LuaBurnerPrototype {
|
|
4783
4805
|
readonly auto_refuel: boolean;
|
|
4806
|
+
readonly burner_usage: LuaBurnerUsagePrototype;
|
|
4784
4807
|
readonly burnt_inventory_size: uint32;
|
|
4785
4808
|
readonly effectivity: double;
|
|
4786
4809
|
/**
|
|
@@ -4792,6 +4815,7 @@ interface LuaBurnerPrototype {
|
|
|
4792
4815
|
*/
|
|
4793
4816
|
readonly fuel_categories: Record<string, true>;
|
|
4794
4817
|
readonly fuel_inventory_size: uint32;
|
|
4818
|
+
readonly hide_from_stats: boolean;
|
|
4795
4819
|
readonly initial_fuel?: LuaItemPrototype;
|
|
4796
4820
|
readonly initial_fuel_percent: double;
|
|
4797
4821
|
/**
|
|
@@ -5984,6 +6008,11 @@ interface LuaDamagePrototype extends LuaPrototypeBase {
|
|
|
5984
6008
|
* This class also provides debug session APIs, as the global object `debugadapter` in all stages.
|
|
5985
6009
|
*/
|
|
5986
6010
|
interface LuaDebugAdapter {
|
|
6011
|
+
/**
|
|
6012
|
+
* Pause execution as if a breakpoint was hit.
|
|
6013
|
+
* @param mesg If specified, this value is displayed as if it was thrown as an error.
|
|
6014
|
+
*/
|
|
6015
|
+
breakpoint(this: void, mesg?: Any): void;
|
|
5987
6016
|
/**
|
|
5988
6017
|
* Prepare a default debug view entry for a field, to assist in preparing custom listings.
|
|
5989
6018
|
* @param name The name of the field
|
|
@@ -5991,14 +6020,19 @@ interface LuaDebugAdapter {
|
|
|
5991
6020
|
*/
|
|
5992
6021
|
describe_field(this: void, name: string, value: Any): DebugVariable;
|
|
5993
6022
|
/**
|
|
5994
|
-
*
|
|
6023
|
+
* Print values to the debug console. This function also replaces the Lua builtin `print` during debug sessions.
|
|
6024
|
+
* @param args Values to print
|
|
6025
|
+
*/
|
|
6026
|
+
print(this: void, ...args: Any[]): void;
|
|
6027
|
+
/**
|
|
6028
|
+
* Start recording profiler timings. If there is a previous recording session running, it will be stopped first. This function is also available to the DAP client as the request `startProfile`, with the parameter in `argument`. A DAP event `profileRunning` will be emitted regardless of how it was called.
|
|
5995
6029
|
* @param table.show_hook_events Include events to indicate time spent in hooks
|
|
5996
6030
|
*/
|
|
5997
6031
|
start_profile(this: void, table: {
|
|
5998
6032
|
show_hook_events?: boolean;
|
|
5999
6033
|
}): void;
|
|
6000
6034
|
/**
|
|
6001
|
-
* Stop recording profiler timings and save to script_output.
|
|
6035
|
+
* Stop recording profiler timings and save to script_output. This function is also available to the DAP client as the request `stopProfile`. A DAP event `profileComplete` will be emitted with the path to the saved file, regardless of stop was called.
|
|
6002
6036
|
*/
|
|
6003
6037
|
stop_profile(this: void): void;
|
|
6004
6038
|
/**
|
|
@@ -7751,7 +7785,7 @@ interface LuaEntity extends LuaControl {
|
|
|
7751
7785
|
/**
|
|
7752
7786
|
* The effects being applied to this entity, if any. For beacons, this is the effect the beacon is broadcasting.
|
|
7753
7787
|
*/
|
|
7754
|
-
readonly effects?:
|
|
7788
|
+
readonly effects?: Effect;
|
|
7755
7789
|
/**
|
|
7756
7790
|
* The buffer size for the electric energy source. `nil` if the entity doesn't have an electric energy source.
|
|
7757
7791
|
*
|
|
@@ -8037,6 +8071,10 @@ interface LuaEntity extends LuaControl {
|
|
|
8037
8071
|
* Whether this loader gets items from or puts item into a container.
|
|
8038
8072
|
*/
|
|
8039
8073
|
loader_type: BeltConnectionType;
|
|
8074
|
+
/**
|
|
8075
|
+
* Additional effect applied to this entity with effect receiver. `nil` if this entity has no effect receiver.
|
|
8076
|
+
*/
|
|
8077
|
+
local_effect?: Effect;
|
|
8040
8078
|
readonly localised_description: LocalisedString;
|
|
8041
8079
|
/**
|
|
8042
8080
|
* Localised name of the entity.
|
|
@@ -8800,6 +8838,10 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8800
8838
|
* The allowed module categories for this entity, if any.
|
|
8801
8839
|
*/
|
|
8802
8840
|
readonly allowed_module_categories?: Record<string, true>;
|
|
8841
|
+
/**
|
|
8842
|
+
* When this entity is part of blueprint, will it allow flipping of the blueprint?
|
|
8843
|
+
*/
|
|
8844
|
+
readonly allows_flipping: boolean;
|
|
8803
8845
|
/**
|
|
8804
8846
|
* Whether the lamp is always on (except when out of power or turned off by the circuit network).
|
|
8805
8847
|
*/
|
|
@@ -10735,6 +10777,7 @@ interface LuaFluidEnergySourcePrototype {
|
|
|
10735
10777
|
*/
|
|
10736
10778
|
readonly fluid_box: LuaFluidBoxPrototype;
|
|
10737
10779
|
readonly fluid_usage_per_tick: double;
|
|
10780
|
+
readonly hide_from_stats: boolean;
|
|
10738
10781
|
readonly maximum_temperature: double;
|
|
10739
10782
|
/**
|
|
10740
10783
|
* 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.
|
|
@@ -11042,6 +11085,12 @@ interface LuaForce {
|
|
|
11042
11085
|
* Gets the unlockable script state for the given ID.
|
|
11043
11086
|
*/
|
|
11044
11087
|
get_script_visible(this: void, unlockable: UnlockableID): boolean | null;
|
|
11088
|
+
/**
|
|
11089
|
+
* Gets the built space platforms at the given space location for this force.
|
|
11090
|
+
*
|
|
11091
|
+
* Note, this does not include platforms that have not yet been built.
|
|
11092
|
+
*/
|
|
11093
|
+
get_space_platforms(this: void, location: SpaceLocationID): LuaSpacePlatform[];
|
|
11045
11094
|
get_spawn_position(this: void, surface: SurfaceIdentification): MapPosition;
|
|
11046
11095
|
get_surface_hidden(this: void, surface: SurfaceIdentification): boolean;
|
|
11047
11096
|
/**
|
|
@@ -14265,7 +14314,7 @@ interface LuaItemPrototype extends LuaPrototypeBase {
|
|
|
14265
14314
|
/**
|
|
14266
14315
|
* Effects of this module at the specified quality.
|
|
14267
14316
|
*/
|
|
14268
|
-
get_module_effects(this: void, quality?: QualityID):
|
|
14317
|
+
get_module_effects(this: void, quality?: QualityID): Effect | null;
|
|
14269
14318
|
/**
|
|
14270
14319
|
* The color used when doing normal selection with this selection tool prototype.
|
|
14271
14320
|
*/
|
|
@@ -14418,7 +14467,7 @@ interface LuaItemPrototype extends LuaPrototypeBase {
|
|
|
14418
14467
|
/**
|
|
14419
14468
|
* Effects of this module.
|
|
14420
14469
|
*/
|
|
14421
|
-
readonly module_effects?:
|
|
14470
|
+
readonly module_effects?: Effect;
|
|
14422
14471
|
readonly moved_to_hub_when_building: boolean;
|
|
14423
14472
|
/**
|
|
14424
14473
|
* 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.
|
|
@@ -16253,6 +16302,14 @@ interface LuaPlayer extends LuaControl {
|
|
|
16253
16302
|
* The wire drag target for this player, if any.
|
|
16254
16303
|
*/
|
|
16255
16304
|
readonly drag_target?: DragTarget;
|
|
16305
|
+
/**
|
|
16306
|
+
* The map editor settings if the map editor exists for this player.
|
|
16307
|
+
*
|
|
16308
|
+
* When reading this may return nil if the map editor does not yet exist for this player.
|
|
16309
|
+
*
|
|
16310
|
+
* When writing the full table of settings is always required.
|
|
16311
|
+
*/
|
|
16312
|
+
editor_settings?: MapEditorSetting;
|
|
16256
16313
|
/**
|
|
16257
16314
|
* The source entity used during entity settings copy-paste, if any.
|
|
16258
16315
|
*/
|
|
@@ -16921,6 +16978,20 @@ interface LuaPumpControlBehavior extends LuaGenericOnOffControlBehavior {
|
|
|
16921
16978
|
* Prototype of a quality.
|
|
16922
16979
|
*/
|
|
16923
16980
|
interface LuaQualityPrototype extends LuaPrototypeBase {
|
|
16981
|
+
/**
|
|
16982
|
+
* Computes probabilities of rolling various qualities given a quality effect
|
|
16983
|
+
* @param quality_effect Strength of quality effect. Larger value makes it easier to roll better qualities.
|
|
16984
|
+
* @param force Force to select unlocked qualities. If not provided, all qualities are considered unlocked.
|
|
16985
|
+
* @returns Roll chances per quality. Only positive values are listed. All values should sum to 1.
|
|
16986
|
+
*/
|
|
16987
|
+
get_roll_chances(this: void, quality_effect: EffectValue, force?: ForceID): Record<string, double>;
|
|
16988
|
+
/**
|
|
16989
|
+
* Performs quality roll
|
|
16990
|
+
* @param quality_effect Strength of quality effect. Larger value makes it easier to roll better qualities.
|
|
16991
|
+
* @param quality_seed Random value in [0, 1) used to select result quality.
|
|
16992
|
+
* @param force Force which is doing the quality roll. Used to select unlocked qualities. If not provided, all qualities are considered unlocked.
|
|
16993
|
+
*/
|
|
16994
|
+
roll_quality(this: void, quality_effect: EffectValue, quality_seed: double, force?: ForceID): LuaQualityPrototype;
|
|
16924
16995
|
readonly accumulator_capacity_multiplier: double;
|
|
16925
16996
|
readonly asteroid_collector_collection_radius_bonus: uint32;
|
|
16926
16997
|
readonly beacon_module_slots_bonus: ItemStackIndex;
|
|
@@ -17289,7 +17360,7 @@ interface LuaRecipe {
|
|
|
17289
17360
|
/**
|
|
17290
17361
|
* The productivity bonus for this recipe.
|
|
17291
17362
|
*/
|
|
17292
|
-
productivity_bonus:
|
|
17363
|
+
productivity_bonus: EffectValue;
|
|
17293
17364
|
/**
|
|
17294
17365
|
* The results/products of this recipe.
|
|
17295
17366
|
* @example ```
|
|
@@ -17440,6 +17511,10 @@ interface LuaRecipePrototype extends LuaPrototypeBase {
|
|
|
17440
17511
|
* 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.
|
|
17441
17512
|
*/
|
|
17442
17513
|
readonly object_name: string;
|
|
17514
|
+
/**
|
|
17515
|
+
* Event raised when this recipe is crafted. Only available if {@link RecipePrototype::raise_on_crafted | prototype:RecipePrototype::raise_on_crafted} was set to true.
|
|
17516
|
+
*/
|
|
17517
|
+
readonly on_crafted_event?: LuaEventType;
|
|
17443
17518
|
/**
|
|
17444
17519
|
* Used to determine how many extra items are put into an assembling machine before it's considered "full enough".
|
|
17445
17520
|
*/
|
|
@@ -20592,7 +20667,7 @@ interface LuaSurface {
|
|
|
20592
20667
|
/**
|
|
20593
20668
|
* Surface-wide effects applied to entities with effect receivers. `nil` if this surface is not using surface-wide effect source.
|
|
20594
20669
|
*/
|
|
20595
|
-
global_effect?:
|
|
20670
|
+
global_effect?: Effect;
|
|
20596
20671
|
/**
|
|
20597
20672
|
* Global electric network for this surface.
|
|
20598
20673
|
*/
|
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.14
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -2507,23 +2507,44 @@ interface EditorUtilityConstants {
|
|
|
2507
2507
|
tile_editor_selection_preview_radius: uint8;
|
|
2508
2508
|
decorative_editor_selection_preview_radius: uint8;
|
|
2509
2509
|
}
|
|
2510
|
+
/**
|
|
2511
|
+
* @example ```
|
|
2512
|
+
-- These are the effects of the vanilla Speed Module 3
|
|
2513
|
+
{speed = 0.5, consumption = 0.7, quality = -0.025}
|
|
2514
|
+
```
|
|
2515
|
+
*/
|
|
2516
|
+
interface Effect {
|
|
2517
|
+
consumption?: EffectValue;
|
|
2518
|
+
speed?: EffectValue;
|
|
2519
|
+
productivity?: EffectValue;
|
|
2520
|
+
pollution?: EffectValue;
|
|
2521
|
+
quality?: EffectValue;
|
|
2522
|
+
}
|
|
2510
2523
|
interface EffectReceiver {
|
|
2511
|
-
base_effect:
|
|
2524
|
+
base_effect: Effect;
|
|
2512
2525
|
uses_module_effects: boolean;
|
|
2513
2526
|
uses_beacon_effects: boolean;
|
|
2514
2527
|
/**
|
|
2515
2528
|
* Controls whether {@link LuaSurface::global_effect | runtime:LuaSurface::global_effect} affects this receiver.
|
|
2516
2529
|
*/
|
|
2517
2530
|
uses_surface_effects: boolean;
|
|
2531
|
+
/**
|
|
2532
|
+
* Controls whether {@link LuaEntity::local_effect | runtime:LuaEntity::local_effect} affects this receiver.
|
|
2533
|
+
*/
|
|
2534
|
+
uses_local_effects: boolean;
|
|
2518
2535
|
consumption_limits: EffectValueRange;
|
|
2519
2536
|
speed_limits: EffectValueRange;
|
|
2520
2537
|
productivity_limits: EffectValueRange;
|
|
2521
2538
|
pollution_limits: EffectValueRange;
|
|
2522
2539
|
quality_limits: EffectValueRange;
|
|
2523
2540
|
}
|
|
2541
|
+
/**
|
|
2542
|
+
* Precision is ignored beyond four decimals - `0.56789` results in `0.5678` and means 56.78% etc. Values can range from `-1000.0000` to `1000.0000`.
|
|
2543
|
+
*/
|
|
2544
|
+
type EffectValue = float;
|
|
2524
2545
|
interface EffectValueRange {
|
|
2525
|
-
low:
|
|
2526
|
-
high:
|
|
2546
|
+
low: EffectValue;
|
|
2547
|
+
high: EffectValue;
|
|
2527
2548
|
}
|
|
2528
2549
|
/**
|
|
2529
2550
|
* An item thrown overboard on a space platform.
|
|
@@ -2666,6 +2687,10 @@ interface EnemyExpansionMapSettings {
|
|
|
2666
2687
|
* The maximum time between expansions in ticks. The actual cooldown is adjusted to the current evolution levels. Defaults to `60*3 600=216 000` ticks.
|
|
2667
2688
|
*/
|
|
2668
2689
|
max_expansion_cooldown: uint32;
|
|
2690
|
+
/**
|
|
2691
|
+
* Cooldown in ticks for dispatching units when building bases. Defaults to `60*30=1 800` ticks.
|
|
2692
|
+
*/
|
|
2693
|
+
build_base_unit_dispatch_cooldown: uint32;
|
|
2669
2694
|
}
|
|
2670
2695
|
interface EnemySpawnerAbsorption {
|
|
2671
2696
|
absolute: double;
|
|
@@ -4430,7 +4455,7 @@ type ItemPrototypeFlag = /**
|
|
|
4430
4455
|
'spawnable' | 'spoil-result' | /**
|
|
4431
4456
|
* Controls whether the spoil time ignores the spoil time modifier in the {@link DifficultySettings | runtime:DifficultySettings}.
|
|
4432
4457
|
*/
|
|
4433
|
-
'ignore-spoil-time-modifier' | 'hide-health-bar-in-world' | 'hide-spoilage-bar-in-world';
|
|
4458
|
+
'ignore-spoil-time-modifier' | 'hide-health-bar-in-world' | 'hide-spoilage-bar-in-world' | 'no-item-on-ground-merging';
|
|
4434
4459
|
/**
|
|
4435
4460
|
* A set of flags. Active flags are in the dictionary as `true`, while inactive flags aren't present at all.
|
|
4436
4461
|
*
|
|
@@ -6861,6 +6886,40 @@ interface MapDifficultySettings {
|
|
|
6861
6886
|
*/
|
|
6862
6887
|
spoil_time_modifier: double;
|
|
6863
6888
|
}
|
|
6889
|
+
interface MapEditorSetting {
|
|
6890
|
+
position?: MapPosition;
|
|
6891
|
+
inventory_size: ItemStackIndex;
|
|
6892
|
+
gun_inventory_size: ItemStackIndex;
|
|
6893
|
+
/**
|
|
6894
|
+
* Must be >= 0.34375.
|
|
6895
|
+
*/
|
|
6896
|
+
movement_speed: double;
|
|
6897
|
+
/**
|
|
6898
|
+
* Must be >= 0.34375.
|
|
6899
|
+
*/
|
|
6900
|
+
base_movement_speed: double;
|
|
6901
|
+
item_pickup_distance: double;
|
|
6902
|
+
loot_pickup_distance: double;
|
|
6903
|
+
mining_speed: double;
|
|
6904
|
+
enable_flash_light: boolean;
|
|
6905
|
+
adjust_speed_based_off_zoom: boolean;
|
|
6906
|
+
render_as_day: boolean;
|
|
6907
|
+
instant_blueprint_building: boolean;
|
|
6908
|
+
instant_deconstruction: boolean;
|
|
6909
|
+
instant_upgrading: boolean;
|
|
6910
|
+
instant_rail_planner: boolean;
|
|
6911
|
+
show_status_icons: boolean;
|
|
6912
|
+
show_hidden_entities: boolean;
|
|
6913
|
+
show_entity_tags: boolean;
|
|
6914
|
+
show_entity_health_bars: boolean;
|
|
6915
|
+
show_additional_entity_info_gui: boolean;
|
|
6916
|
+
generate_neighbor_chunks: boolean;
|
|
6917
|
+
fill_built_entity_energy_buffers: boolean;
|
|
6918
|
+
show_character_tab_in_controller_gui: boolean;
|
|
6919
|
+
show_infinity_filters_in_controller_gui: boolean;
|
|
6920
|
+
placed_corpses_never_expire: boolean;
|
|
6921
|
+
ignore_tile_conditions: boolean;
|
|
6922
|
+
}
|
|
6864
6923
|
/**
|
|
6865
6924
|
* The data that can be extracted from a map exchange string, as a plain table.
|
|
6866
6925
|
*/
|
|
@@ -7248,23 +7307,6 @@ interface ModSettingPrototypeFilterType extends BaseModSettingPrototypeFilter {
|
|
|
7248
7307
|
* Used by {@link TechnologyModifier | runtime:TechnologyModifier}.
|
|
7249
7308
|
*/
|
|
7250
7309
|
type ModifierType = 'inserter-stack-size-bonus' | 'bulk-inserter-capacity-bonus' | 'laboratory-speed' | 'character-logistic-trash-slots' | 'maximum-following-robots-count' | 'worker-robot-speed' | 'worker-robot-storage' | 'turret-attack' | 'ammo-damage' | 'give-item' | 'gun-speed' | 'unlock-recipe' | 'character-crafting-speed' | 'character-mining-speed' | 'character-running-speed' | 'character-build-distance' | 'character-item-drop-distance' | 'character-reach-distance' | 'character-resource-reach-distance' | 'character-item-pickup-distance' | 'character-loot-pickup-distance' | 'character-inventory-slots-bonus' | 'deconstruction-time-to-live' | 'max-failed-attempts-per-tick-per-construction-queue' | 'max-successful-attempts-per-tick-per-construction-queue' | 'character-health-bonus' | 'mining-drill-productivity-bonus' | 'train-braking-force-bonus' | 'worker-robot-battery' | 'laboratory-productivity' | 'follower-robot-lifetime' | 'artillery-range' | 'nothing' | 'character-logistic-requests' | 'unlock-space-location' | 'unlock-quality' | 'unlock-space-platforms' | 'unlock-circuit-network' | 'cargo-landing-pad-count' | 'max-cargo-bay-unloading-distance' | 'change-recipe-productivity' | 'cliff-deconstruction-enabled' | 'mining-with-fluid' | 'rail-support-on-deep-oil-ocean' | 'rail-planner-allow-elevated-rails' | 'beacon-distribution' | 'create-ghost-on-entity-death' | 'belt-stack-size-bonus' | 'vehicle-logistics' | 'unlock-logistic-network' | 'unlock-travel-to-space-platforms';
|
|
7251
|
-
/**
|
|
7252
|
-
* The percentual increase of the attribute. A value of `0.6` means a 60% increase.
|
|
7253
|
-
*/
|
|
7254
|
-
type ModuleEffectValue = float;
|
|
7255
|
-
/**
|
|
7256
|
-
* @example ```
|
|
7257
|
-
-- These are the effects of the vanilla Speed Module 3
|
|
7258
|
-
{speed = 0.5, consumption = 0.7, quality = -0.025}
|
|
7259
|
-
```
|
|
7260
|
-
*/
|
|
7261
|
-
interface ModuleEffects {
|
|
7262
|
-
consumption?: ModuleEffectValue;
|
|
7263
|
-
speed?: ModuleEffectValue;
|
|
7264
|
-
productivity?: ModuleEffectValue;
|
|
7265
|
-
pollution?: ModuleEffectValue;
|
|
7266
|
-
quality?: ModuleEffectValue;
|
|
7267
|
-
}
|
|
7268
7310
|
type MouseButtonFlags = ('left' | 'right' | /**
|
|
7269
7311
|
* Sets both `"left"` and `"right"` flags.
|
|
7270
7312
|
*/
|
|
@@ -7326,6 +7368,48 @@ interface OldTileAndPosition {
|
|
|
7326
7368
|
old_tile: LuaTilePrototype;
|
|
7327
7369
|
position: TilePosition;
|
|
7328
7370
|
}
|
|
7371
|
+
interface OnRecipeCraftedData {
|
|
7372
|
+
/**
|
|
7373
|
+
* Identifier of the event.
|
|
7374
|
+
*/
|
|
7375
|
+
name: defines.events;
|
|
7376
|
+
/**
|
|
7377
|
+
* Tick the event was generated.
|
|
7378
|
+
*/
|
|
7379
|
+
tick: MapTick;
|
|
7380
|
+
/**
|
|
7381
|
+
* Entity that crafted recipe.
|
|
7382
|
+
*/
|
|
7383
|
+
entity: LuaEntity;
|
|
7384
|
+
/**
|
|
7385
|
+
* Name of recipe that was crafted.
|
|
7386
|
+
*/
|
|
7387
|
+
recipe: string;
|
|
7388
|
+
/**
|
|
7389
|
+
* Quality of the recipe crafted.
|
|
7390
|
+
*/
|
|
7391
|
+
recipe_quality: string;
|
|
7392
|
+
/**
|
|
7393
|
+
* Quality effect used when giving products. Not provided if value is 0. May be different than value obtained from {@link LuaEntity::effects | runtime:LuaEntity::effects} when quality modules were changed between craft starting and products being given.
|
|
7394
|
+
*/
|
|
7395
|
+
quality_effect?: EffectValue;
|
|
7396
|
+
/**
|
|
7397
|
+
* Random value in range [0, 1) that was used when selecting product quality. Only provided when quality_effect is provided.
|
|
7398
|
+
*/
|
|
7399
|
+
quality_seed?: double;
|
|
7400
|
+
/**
|
|
7401
|
+
* Quality of products given. May be different than recipe quality if quality modules are present. Always provided even if quality_effect is zero because {@link LuaEntity::result_quality | runtime:LuaEntity::result_quality} may have been used. Only used by products without quality control.
|
|
7402
|
+
*/
|
|
7403
|
+
product_quality: string;
|
|
7404
|
+
/**
|
|
7405
|
+
* If crafted as part of bonus products.
|
|
7406
|
+
*/
|
|
7407
|
+
bonus: boolean;
|
|
7408
|
+
/**
|
|
7409
|
+
* Random value in range {@link 0, 1) used as part of shared roll when giving products. Related to [ProductPrototypeBase::shared_probability | prototype:ProductPrototypeBase::shared_probability}.
|
|
7410
|
+
*/
|
|
7411
|
+
shared_roll: double;
|
|
7412
|
+
}
|
|
7329
7413
|
interface OrientedCliffPrototypeSet {
|
|
7330
7414
|
west_to_east: BoundingBox;
|
|
7331
7415
|
north_to_south: BoundingBox;
|
|
@@ -11680,6 +11764,10 @@ interface UndoRedoActionRemovedEntity extends BaseUndoRedoAction {
|
|
|
11680
11764
|
* The type of action that was undone or redone.
|
|
11681
11765
|
*/
|
|
11682
11766
|
'type': 'removed-entity';
|
|
11767
|
+
/**
|
|
11768
|
+
* The equipment for the equipment grid if any.
|
|
11769
|
+
*/
|
|
11770
|
+
'grid'?: UndoRedoEquipment[];
|
|
11683
11771
|
/**
|
|
11684
11772
|
* The items that the entity will request when revived, if there are any. It's a mapping of prototype names to amounts. Not present for entities the game can't restore, like trees or rocks.
|
|
11685
11773
|
*/
|
|
@@ -11814,6 +11902,11 @@ interface UndoRedoActionWireRemoved extends BaseUndoRedoAction {
|
|
|
11814
11902
|
'a': BlueprintWireEnd;
|
|
11815
11903
|
'b': BlueprintWireEnd;
|
|
11816
11904
|
}
|
|
11905
|
+
interface UndoRedoEquipment {
|
|
11906
|
+
id: EquipmentWithQualityID;
|
|
11907
|
+
position: EquipmentPosition;
|
|
11908
|
+
settings: PropertyTree;
|
|
11909
|
+
}
|
|
11817
11910
|
interface UnitAISettings {
|
|
11818
11911
|
/**
|
|
11819
11912
|
* If enabled, units that repeatedly fail to succeed at commands will be destroyed.
|
|
@@ -12145,6 +12238,13 @@ interface UtilityConstants {
|
|
|
12145
12238
|
low_energy_robot_estimate_multiplier: double;
|
|
12146
12239
|
asteroid_spawning_offset: SimpleBoundingBox;
|
|
12147
12240
|
asteroid_fading_range: float;
|
|
12241
|
+
/**
|
|
12242
|
+
* Asteroid damage will be multiplied by this value when space platform speed is zero and will linearly increase until asteroid_spawning_with_random_orientation_max_speed is reached.
|
|
12243
|
+
*/
|
|
12244
|
+
asteroid_min_damage_modifier: float;
|
|
12245
|
+
/**
|
|
12246
|
+
* In km per tick.
|
|
12247
|
+
*/
|
|
12148
12248
|
asteroid_spawning_with_random_orientation_max_speed: double;
|
|
12149
12249
|
asteroid_position_offset_to_speed_coefficient: double;
|
|
12150
12250
|
asteroid_collector_navmesh_refresh_tick_interval: uint32;
|
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.14
|
|
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.14
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace defines {
|
|
@@ -11,20 +11,21 @@ enum alert_type {
|
|
|
11
11
|
custom = 1,
|
|
12
12
|
entity_destroyed = 2,
|
|
13
13
|
entity_under_attack = 3,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
14
|
+
expansion_base_built = 4,
|
|
15
|
+
fluid_mixing = 5,
|
|
16
|
+
no_material_for_construction = 6,
|
|
17
|
+
no_platform_storage = 7,
|
|
18
|
+
no_roboport_storage = 8,
|
|
19
|
+
no_storage = 9,
|
|
20
|
+
not_enough_construction_robots = 10,
|
|
21
|
+
not_enough_repair_packs = 11,
|
|
22
|
+
pipeline_overextended = 12,
|
|
23
|
+
platform_tile_building_blocked = 13,
|
|
24
|
+
train_no_path = 14,
|
|
25
|
+
train_out_of_fuel = 15,
|
|
26
|
+
turret_fire = 16,
|
|
27
|
+
turret_out_of_ammo = 17,
|
|
28
|
+
unclaimed_cargo = 18
|
|
28
29
|
}
|
|
29
30
|
/**
|
|
30
31
|
* AI command exit status, see {@link LuaCommandable::set_command | runtime:LuaCommandable::set_command}
|
|
@@ -866,100 +867,101 @@ enum events {
|
|
|
866
867
|
on_player_selected_area = 125,
|
|
867
868
|
on_player_set_quick_bar_slot = 126,
|
|
868
869
|
on_player_setup_blueprint = 127,
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
870
|
+
on_player_super_forced_selected_area = 128,
|
|
871
|
+
on_player_toggled_alt_mode = 129,
|
|
872
|
+
on_player_toggled_map_editor = 130,
|
|
873
|
+
on_player_trash_inventory_changed = 131,
|
|
874
|
+
on_player_unbanned = 132,
|
|
875
|
+
on_player_unmuted = 133,
|
|
876
|
+
on_player_used_capsule = 134,
|
|
877
|
+
on_player_used_spidertron_remote = 135,
|
|
878
|
+
on_post_entity_died = 136,
|
|
879
|
+
on_post_segmented_unit_died = 137,
|
|
880
|
+
on_pre_build = 138,
|
|
881
|
+
on_pre_chunk_deleted = 139,
|
|
882
|
+
on_pre_entity_settings_pasted = 140,
|
|
883
|
+
on_pre_ghost_deconstructed = 141,
|
|
884
|
+
on_pre_ghost_upgraded = 142,
|
|
885
|
+
on_pre_permission_group_deleted = 143,
|
|
886
|
+
on_pre_permission_string_imported = 144,
|
|
887
|
+
on_pre_player_crafted_item = 145,
|
|
888
|
+
on_pre_player_died = 146,
|
|
889
|
+
on_pre_player_left_game = 147,
|
|
890
|
+
on_pre_player_mined_item = 148,
|
|
891
|
+
on_pre_player_removed = 149,
|
|
892
|
+
on_pre_player_toggled_map_editor = 150,
|
|
893
|
+
on_pre_robot_exploded_cliff = 151,
|
|
894
|
+
on_pre_scenario_finished = 152,
|
|
895
|
+
on_pre_script_inventory_resized = 153,
|
|
896
|
+
on_pre_surface_cleared = 154,
|
|
897
|
+
on_pre_surface_deleted = 155,
|
|
898
|
+
on_redo_applied = 156,
|
|
899
|
+
on_research_cancelled = 157,
|
|
900
|
+
on_research_finished = 158,
|
|
901
|
+
on_research_moved = 159,
|
|
902
|
+
on_research_queued = 160,
|
|
903
|
+
on_research_reversed = 161,
|
|
904
|
+
on_research_started = 162,
|
|
905
|
+
on_resource_depleted = 163,
|
|
906
|
+
on_robot_built_entity = 164,
|
|
907
|
+
on_robot_built_tile = 165,
|
|
908
|
+
on_robot_exploded_cliff = 166,
|
|
909
|
+
on_robot_mined = 167,
|
|
910
|
+
on_robot_mined_entity = 168,
|
|
911
|
+
on_robot_mined_tile = 169,
|
|
912
|
+
on_robot_pre_mined = 170,
|
|
913
|
+
on_rocket_launch_ordered = 171,
|
|
914
|
+
on_rocket_launched = 172,
|
|
915
|
+
on_runtime_mod_setting_changed = 173,
|
|
916
|
+
on_script_inventory_resized = 174,
|
|
917
|
+
on_script_path_request_finished = 175,
|
|
918
|
+
on_script_trigger_effect = 176,
|
|
919
|
+
on_sector_scanned = 177,
|
|
920
|
+
on_segment_entity_created = 178,
|
|
921
|
+
on_segmented_unit_created = 179,
|
|
922
|
+
on_segmented_unit_damaged = 180,
|
|
923
|
+
on_segmented_unit_died = 181,
|
|
924
|
+
on_selected_entity_changed = 182,
|
|
925
|
+
on_singleplayer_init = 183,
|
|
926
|
+
on_space_platform_built_entity = 184,
|
|
927
|
+
on_space_platform_built_tile = 185,
|
|
928
|
+
on_space_platform_changed_state = 186,
|
|
929
|
+
on_space_platform_mined_entity = 187,
|
|
930
|
+
on_space_platform_mined_item = 188,
|
|
931
|
+
on_space_platform_mined_tile = 189,
|
|
932
|
+
on_space_platform_pre_mined = 190,
|
|
933
|
+
on_spider_command_completed = 191,
|
|
934
|
+
on_string_translated = 192,
|
|
935
|
+
on_surface_cleared = 193,
|
|
936
|
+
on_surface_created = 194,
|
|
937
|
+
on_surface_deleted = 195,
|
|
938
|
+
on_surface_imported = 196,
|
|
939
|
+
on_surface_renamed = 197,
|
|
940
|
+
on_technology_effects_reset = 198,
|
|
941
|
+
on_territory_created = 199,
|
|
942
|
+
on_territory_destroyed = 200,
|
|
943
|
+
on_tick = 201,
|
|
944
|
+
on_tower_mined_plant = 202,
|
|
945
|
+
on_tower_planted_seed = 203,
|
|
946
|
+
on_tower_pre_mined_plant = 204,
|
|
947
|
+
on_train_changed_state = 205,
|
|
948
|
+
on_train_created = 206,
|
|
949
|
+
on_train_schedule_changed = 207,
|
|
950
|
+
on_trigger_created_entity = 208,
|
|
951
|
+
on_trigger_fired_artillery = 209,
|
|
952
|
+
on_udp_packet_received = 210,
|
|
953
|
+
on_undo_applied = 211,
|
|
954
|
+
on_unit_added_to_group = 212,
|
|
955
|
+
on_unit_group_created = 213,
|
|
956
|
+
on_unit_group_finished_gathering = 214,
|
|
957
|
+
on_unit_removed_from_group = 215,
|
|
958
|
+
on_worker_robot_expired = 216,
|
|
959
|
+
script_raised_built = 217,
|
|
960
|
+
script_raised_destroy = 218,
|
|
961
|
+
script_raised_destroy_segmented_unit = 219,
|
|
962
|
+
script_raised_revive = 220,
|
|
963
|
+
script_raised_set_tiles = 221,
|
|
964
|
+
script_raised_teleported = 222
|
|
963
965
|
}
|
|
964
966
|
enum flow_precision_index {
|
|
965
967
|
fifty_hours = 5,
|
|
@@ -1276,43 +1278,44 @@ enum input_action {
|
|
|
1276
1278
|
start_research = 255,
|
|
1277
1279
|
start_walking = 256,
|
|
1278
1280
|
stop_drag_build = 257,
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1281
|
+
super_forced_select_area = 258,
|
|
1282
|
+
swap_asteroid_chunk_slots = 259,
|
|
1283
|
+
swap_entity_filter_slots = 260,
|
|
1284
|
+
swap_entity_slots = 261,
|
|
1285
|
+
swap_infinity_container_filter_items = 262,
|
|
1286
|
+
swap_item_filters = 263,
|
|
1287
|
+
swap_logistic_filter_items = 264,
|
|
1288
|
+
swap_mappers = 265,
|
|
1289
|
+
swap_tile_slots = 266,
|
|
1290
|
+
switch_connect_to_logistic_network = 267,
|
|
1291
|
+
switch_constant_combinator_state = 268,
|
|
1292
|
+
switch_inserter_filter_mode_state = 269,
|
|
1293
|
+
switch_loader_filter_mode = 270,
|
|
1294
|
+
switch_mining_drill_filter_mode_state = 271,
|
|
1295
|
+
switch_power_switch_state = 272,
|
|
1296
|
+
take_equipment = 273,
|
|
1297
|
+
toggle_artillery_auto_targeting = 274,
|
|
1298
|
+
toggle_blueprint_snap_to_grid = 275,
|
|
1299
|
+
toggle_deconstruction_item_entity_filter_mode = 276,
|
|
1300
|
+
toggle_deconstruction_item_tile_filter_mode = 277,
|
|
1301
|
+
toggle_driving = 278,
|
|
1302
|
+
toggle_enable_vehicle_logistics_while_moving = 279,
|
|
1303
|
+
toggle_entity_logistic_requests = 280,
|
|
1304
|
+
toggle_equipment_movement_bonus = 281,
|
|
1305
|
+
toggle_map_editor = 282,
|
|
1306
|
+
toggle_personal_logistic_requests = 283,
|
|
1307
|
+
toggle_personal_roboport = 284,
|
|
1308
|
+
toggle_selected_entity = 285,
|
|
1309
|
+
toggle_show_entity_info = 286,
|
|
1310
|
+
toggle_tall_entity_visibility = 287,
|
|
1311
|
+
trash_not_requested_items = 288,
|
|
1312
|
+
undo = 289,
|
|
1313
|
+
upgrade = 290,
|
|
1314
|
+
upgrade_opened_blueprint_by_item = 291,
|
|
1315
|
+
upgrade_opened_blueprint_by_record = 292,
|
|
1316
|
+
use_item = 293,
|
|
1317
|
+
wire_dragging = 294,
|
|
1318
|
+
write_to_console = 295
|
|
1316
1319
|
}
|
|
1317
1320
|
enum input_method {
|
|
1318
1321
|
game_controller = 1,
|
|
@@ -2286,10 +2289,11 @@ enum segmented_unit_created_cause {
|
|
|
2286
2289
|
script_created = 1
|
|
2287
2290
|
}
|
|
2288
2291
|
enum selection_mode {
|
|
2289
|
-
alt_reverse_select =
|
|
2292
|
+
alt_reverse_select = 4,
|
|
2290
2293
|
alt_select = 1,
|
|
2291
|
-
reverse_select =
|
|
2292
|
-
select = 0
|
|
2294
|
+
reverse_select = 3,
|
|
2295
|
+
select = 0,
|
|
2296
|
+
super_forced_select = 2
|
|
2293
2297
|
}
|
|
2294
2298
|
enum shooting {
|
|
2295
2299
|
not_shooting = 0,
|
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.14
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -2246,6 +2246,7 @@ interface on_player_deconstructed_area {
|
|
|
2246
2246
|
* The record that was used to select the area.
|
|
2247
2247
|
*/
|
|
2248
2248
|
record?: LuaRecord;
|
|
2249
|
+
selection_mode: defines.selection_mode;
|
|
2249
2250
|
/**
|
|
2250
2251
|
* The item stack used to select the area.
|
|
2251
2252
|
*/
|
|
@@ -3033,6 +3034,47 @@ interface on_player_setup_blueprint {
|
|
|
3033
3034
|
*/
|
|
3034
3035
|
tick: MapTick;
|
|
3035
3036
|
}
|
|
3037
|
+
/**
|
|
3038
|
+
* Called after a player super-forced-selects an area with a selection-tool item.
|
|
3039
|
+
*/
|
|
3040
|
+
interface on_player_super_forced_selected_area {
|
|
3041
|
+
/**
|
|
3042
|
+
* The area selected.
|
|
3043
|
+
*/
|
|
3044
|
+
area: BoundingBox;
|
|
3045
|
+
/**
|
|
3046
|
+
* The entities selected.
|
|
3047
|
+
*/
|
|
3048
|
+
entities: LuaEntity[];
|
|
3049
|
+
/**
|
|
3050
|
+
* The item used to select the area.
|
|
3051
|
+
*/
|
|
3052
|
+
item: string;
|
|
3053
|
+
/**
|
|
3054
|
+
* Identifier of the event.
|
|
3055
|
+
*/
|
|
3056
|
+
name: defines.events;
|
|
3057
|
+
/**
|
|
3058
|
+
* The player doing the selection.
|
|
3059
|
+
*/
|
|
3060
|
+
player_index: uint32;
|
|
3061
|
+
/**
|
|
3062
|
+
* The item quality used to select the area.
|
|
3063
|
+
*/
|
|
3064
|
+
quality: string;
|
|
3065
|
+
/**
|
|
3066
|
+
* The surface selected.
|
|
3067
|
+
*/
|
|
3068
|
+
surface: LuaSurface;
|
|
3069
|
+
/**
|
|
3070
|
+
* Tick the event was generated.
|
|
3071
|
+
*/
|
|
3072
|
+
tick: MapTick;
|
|
3073
|
+
/**
|
|
3074
|
+
* The tiles selected.
|
|
3075
|
+
*/
|
|
3076
|
+
tiles: LuaTile[];
|
|
3077
|
+
}
|
|
3036
3078
|
/**
|
|
3037
3079
|
* Called when a player toggles alt mode, also known as "show entity info".
|
|
3038
3080
|
*/
|
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.14
|
|
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.14
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -1288,7 +1288,7 @@ interface BoilerPrototype extends EntityWithOwnerPrototype {
|
|
|
1288
1288
|
*/
|
|
1289
1289
|
fluid_box: FluidBox;
|
|
1290
1290
|
/**
|
|
1291
|
-
* In the `"output-to-separate-pipe"` mode, fluid is transferred from the `fluid_box` to the `output_fluid_box` when enough energy is available to {@link heat | prototype:FluidPrototype::heat_capacity} the input fluid to the `target_temperature`. Setting a filter on the `output_fluid_box` means that instead of the heated input fluid getting moved to the output, it is converted to the filtered fluid in a ratio based on the heat capacity of the fluids: `output_fluid_amount = input_fluid_amount * (
|
|
1291
|
+
* In the `"output-to-separate-pipe"` mode, fluid is transferred from the `fluid_box` to the `output_fluid_box` when enough energy is available to {@link heat | prototype:FluidPrototype::heat_capacity} the input fluid to the `target_temperature`. Setting a filter on the `output_fluid_box` means that instead of the heated input fluid getting moved to the output, it is converted to the filtered fluid in a ratio based on the heat capacity of the fluids: `output_fluid_amount = input_fluid_amount * (input_fluid_heat_capacity / output_fluid_heat_capacity)`
|
|
1292
1292
|
*
|
|
1293
1293
|
* In the `"heat-fluid-inside"` mode, fluid in the `fluid_box` is continuously heated from the input temperature up to its {@link FluidPrototype::max_temperature | prototype:FluidPrototype::max_temperature}.
|
|
1294
1294
|
*/
|
|
@@ -1296,7 +1296,7 @@ interface BoilerPrototype extends EntityWithOwnerPrototype {
|
|
|
1296
1296
|
/**
|
|
1297
1297
|
* The output fluid box.
|
|
1298
1298
|
*
|
|
1299
|
-
* If `mode` is `"output-to-separate-pipe"` and this has a {@link filter | prototype:FluidBox::filter}, the heated input fluid is converted to the output fluid that is set in the filter. The conversion ratio is based on the {@link heat capacity | prototype:FluidPrototype::heat_capacity} of the fluids: `output_fluid_amount = input_fluid_amount * (
|
|
1299
|
+
* If `mode` is `"output-to-separate-pipe"` and this has a {@link filter | prototype:FluidBox::filter}, the heated input fluid is converted to the output fluid that is set in the filter. The conversion ratio is based on the {@link heat capacity | prototype:FluidPrototype::heat_capacity} of the fluids: `output_fluid_amount = input_fluid_amount * (input_fluid_heat_capacity / output_fluid_heat_capacity)`
|
|
1300
1300
|
*
|
|
1301
1301
|
* If `mode` is `"heat-fluid-inside"`, this fluidbox is unused.
|
|
1302
1302
|
*/
|
|
@@ -7720,6 +7720,20 @@ interface RecipePrototype extends Prototype {
|
|
|
7720
7720
|
*/
|
|
7721
7721
|
overload_multiplier?: uint32;
|
|
7722
7722
|
preserve_products_in_machine_output?: boolean;
|
|
7723
|
+
/**
|
|
7724
|
+
* If set to true, an event with identifier of {@link LuaRecipePrototype::on_crafted_event | runtime:LuaRecipePrototype::on_crafted_event} will be raised when this recipe is crafted. Currently this is only raised when recipe is crafted by a crafting machine.
|
|
7725
|
+
*
|
|
7726
|
+
* Event raised will be given data as described by {@link OnRecipeCraftedData | runtime:OnRecipeCraftedData}.
|
|
7727
|
+
* @example ```
|
|
7728
|
+
-- in data stage:
|
|
7729
|
+
data.raw.recipe["iron-plate"].raise_on_crafted = true
|
|
7730
|
+
-- in control stage:
|
|
7731
|
+
script.on_event(prototypes.recipe["iron-plate"].on_crafted_event, function(event)
|
|
7732
|
+
game.print("Iron plate was crafted by ".. event.entity.name .. " at " .. event.entity.gps_tag)
|
|
7733
|
+
end)
|
|
7734
|
+
```
|
|
7735
|
+
*/
|
|
7736
|
+
raise_on_crafted?: boolean;
|
|
7723
7737
|
requester_paste_multiplier?: uint32;
|
|
7724
7738
|
/**
|
|
7725
7739
|
* Whether enabling this recipe requires the ingredients be unlocked before the products are marked as unlocked.
|
|
@@ -9264,7 +9278,7 @@ interface SpacePlatformHubPrototype extends EntityWithOwnerPrototype {
|
|
|
9264
9278
|
*/
|
|
9265
9279
|
platform_repair_speed_modifier?: float;
|
|
9266
9280
|
/**
|
|
9267
|
-
*
|
|
9281
|
+
* Mass which this entity adds to total space platform mass when placed.
|
|
9268
9282
|
*/
|
|
9269
9283
|
weight?: Weight;
|
|
9270
9284
|
}
|
|
@@ -10228,6 +10242,9 @@ interface TilePrototype extends Prototype {
|
|
|
10228
10242
|
vehicle_friction_modifier?: double;
|
|
10229
10243
|
walking_sound?: Sound;
|
|
10230
10244
|
walking_speed_modifier?: double;
|
|
10245
|
+
/**
|
|
10246
|
+
* Mass which this tile adds to total space platform mass when placed.
|
|
10247
|
+
*/
|
|
10231
10248
|
weight?: Weight;
|
|
10232
10249
|
}
|
|
10233
10250
|
/**
|
|
@@ -10890,8 +10907,15 @@ interface UtilityConstants extends PrototypeBase {
|
|
|
10890
10907
|
asteroid_collector_static_head_swing_segment_count: uint32;
|
|
10891
10908
|
asteroid_collector_static_head_swing_strength_scale: float;
|
|
10892
10909
|
asteroid_fading_range: float;
|
|
10910
|
+
/**
|
|
10911
|
+
* Asteroid damage will be multiplied by this value when space platform speed is zero and will linearly increase until asteroid_spawning_with_random_orientation_max_speed is reached.
|
|
10912
|
+
*/
|
|
10913
|
+
asteroid_min_damage_modifier: float;
|
|
10893
10914
|
asteroid_position_offset_to_speed_coefficient: double;
|
|
10894
10915
|
asteroid_spawning_offset: SimpleBoundingBox;
|
|
10916
|
+
/**
|
|
10917
|
+
* In km per tick.
|
|
10918
|
+
*/
|
|
10895
10919
|
asteroid_spawning_with_random_orientation_max_speed: double;
|
|
10896
10920
|
/**
|
|
10897
10921
|
* Will be clamped to the range [2, 100].
|
|
@@ -11236,6 +11260,10 @@ interface UtilitySounds extends PrototypeBase {
|
|
|
11236
11260
|
* Sound category `"alert"`.
|
|
11237
11261
|
*/
|
|
11238
11262
|
alert_destroyed: Sound;
|
|
11263
|
+
/**
|
|
11264
|
+
* Sound category `"alert"`.
|
|
11265
|
+
*/
|
|
11266
|
+
alert_expansion_base_built: Sound;
|
|
11239
11267
|
/**
|
|
11240
11268
|
* Sound category `"gui-effect"`.
|
|
11241
11269
|
*/
|
|
@@ -11488,6 +11516,14 @@ interface UtilitySounds extends PrototypeBase {
|
|
|
11488
11516
|
* Sound category `"gui-effect"`.
|
|
11489
11517
|
*/
|
|
11490
11518
|
list_box_click: Sound;
|
|
11519
|
+
/**
|
|
11520
|
+
* Sound category `"gui-effect"`.
|
|
11521
|
+
*/
|
|
11522
|
+
machine_gui_close: Sound;
|
|
11523
|
+
/**
|
|
11524
|
+
* Sound category `"gui-effect"`.
|
|
11525
|
+
*/
|
|
11526
|
+
machine_gui_open: Sound;
|
|
11491
11527
|
/**
|
|
11492
11528
|
* Sound category `"walking"`.
|
|
11493
11529
|
*/
|
|
@@ -11888,6 +11924,7 @@ interface UtilitySprites extends PrototypeBase {
|
|
|
11888
11924
|
equipment_slot: Sprite;
|
|
11889
11925
|
expand: Sprite;
|
|
11890
11926
|
expand_dots: Sprite;
|
|
11927
|
+
expansion_base_built_icon: Sprite;
|
|
11891
11928
|
explosion_chart_visualization: Animation;
|
|
11892
11929
|
export: Sprite;
|
|
11893
11930
|
export_slot: 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.14
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -2226,6 +2226,10 @@ interface BurnerEnergySource extends BaseEnergySource {
|
|
|
2226
2226
|
*/
|
|
2227
2227
|
fuel_categories?: FuelCategoryID[];
|
|
2228
2228
|
fuel_inventory_size: ItemStackIndex;
|
|
2229
|
+
/**
|
|
2230
|
+
* When set, items consumed and produced by this burner will not appear in item production statistics.
|
|
2231
|
+
*/
|
|
2232
|
+
hide_from_stats?: boolean;
|
|
2229
2233
|
initial_fuel?: ItemID;
|
|
2230
2234
|
initial_fuel_percent?: double;
|
|
2231
2235
|
light_flicker?: LightFlickeringDefinition;
|
|
@@ -3626,6 +3630,10 @@ type CursorBoxType = /**
|
|
|
3626
3630
|
* Green by default.
|
|
3627
3631
|
*/
|
|
3628
3632
|
'blueprint-snap-rectangle' | 'spidertron-remote-selected' | 'spidertron-remote-to-be-selected';
|
|
3633
|
+
/**
|
|
3634
|
+
* The name of an {@link CustomEventPrototype | prototype:CustomEventPrototype}.
|
|
3635
|
+
*/
|
|
3636
|
+
type CustomEventID = string;
|
|
3629
3637
|
/**
|
|
3630
3638
|
* Allows to add extra description items to the tooltip.
|
|
3631
3639
|
*/
|
|
@@ -4011,6 +4019,10 @@ interface EffectReceiver {
|
|
|
4011
4019
|
*/
|
|
4012
4020
|
speed_limits?: EffectValueRange;
|
|
4013
4021
|
uses_beacon_effects?: boolean;
|
|
4022
|
+
/**
|
|
4023
|
+
* Controls whether {@link LuaEntity::local_effect | runtime:LuaEntity::local_effect} affects this receiver.
|
|
4024
|
+
*/
|
|
4025
|
+
uses_local_effects?: boolean;
|
|
4014
4026
|
uses_module_effects?: boolean;
|
|
4015
4027
|
/**
|
|
4016
4028
|
* Controls whether {@link LuaSurface::global_effect | runtime:LuaSurface::global_effect} affects this receiver.
|
|
@@ -4076,12 +4088,6 @@ type EffectTypeLimitation = (/**
|
|
|
4076
4088
|
'quality')[];
|
|
4077
4089
|
/**
|
|
4078
4090
|
* Precision is ignored beyond four decimals - `0.56789` results in `0.5678` and means 56.78% etc. Values can range from `-1000.0000` to `1000.0000`.
|
|
4079
|
-
* @example ```
|
|
4080
|
-
{speed = 0.07} -- 7% bonus
|
|
4081
|
-
```
|
|
4082
|
-
* @example ```
|
|
4083
|
-
{quality = 0.025} -- 2.5% bonus
|
|
4084
|
-
```
|
|
4085
4091
|
*/
|
|
4086
4092
|
type EffectValue = float;
|
|
4087
4093
|
interface EffectValueRange {
|
|
@@ -4381,6 +4387,10 @@ interface EnemyEvolutionSettings {
|
|
|
4381
4387
|
time_factor: double;
|
|
4382
4388
|
}
|
|
4383
4389
|
interface EnemyExpansionSettings {
|
|
4390
|
+
/**
|
|
4391
|
+
* Cooldown in ticks for dispatching units when building bases.
|
|
4392
|
+
*/
|
|
4393
|
+
build_base_unit_dispatch_cooldown: uint32;
|
|
4384
4394
|
building_coefficient: double;
|
|
4385
4395
|
enabled: boolean;
|
|
4386
4396
|
enemy_building_influence_radius: uint32;
|
|
@@ -4929,6 +4939,10 @@ interface FluidEnergySource extends BaseEnergySource {
|
|
|
4929
4939
|
* The number of fluid units the energy source uses per tick. If used with `scale_fluid_usage`, this specifies the maximum. If this value is not set, `scale_energy_usage` is `false` and a fluid box filter is set, the game will attempt to calculate this value from the fluid box filter's fluid's `fuel_value` or `heat_capacity` and the entity's `energy_usage`. If `burns_fluid` is `false`, `maximum_temperature` will also be used. If the attempt of the game to calculate this value fails (`scale_energy_usage` is `false` and a fluid box filter is set), then `scale_energy_usage` will be forced to `true`, to prevent the energy source from being an infinite fluid sink. More context {@link on the forums | https://forums.factorio.com/90613}.
|
|
4930
4940
|
*/
|
|
4931
4941
|
fluid_usage_per_tick?: FluidAmount;
|
|
4942
|
+
/**
|
|
4943
|
+
* When set, fluids consumed and produced by this energy source will not appear in fluid production statistics.
|
|
4944
|
+
*/
|
|
4945
|
+
hide_from_stats?: boolean;
|
|
4932
4946
|
light_flicker?: LightFlickeringDefinition;
|
|
4933
4947
|
/**
|
|
4934
4948
|
* `0` means unlimited maximum temperature. If this is non-zero while `scale_fluid_usage` is `false` and `fluid_usage_per_tick` is not specified, the game will use this value to calculate `fluid_usage_per_tick`. To do that, the filter on the `fluid_box` must be set.
|
|
@@ -6065,7 +6079,7 @@ type ItemPrototypeFlags = (/**
|
|
|
6065
6079
|
'spawnable' | 'spoil-result' | /**
|
|
6066
6080
|
* Controls whether the spoil time ignores the spoil time modifier in the {@link DifficultySettings | runtime:DifficultySettings}.
|
|
6067
6081
|
*/
|
|
6068
|
-
'ignore-spoil-time-modifier' | 'hide-health-bar-in-world' | 'hide-spoilage-bar-in-world')[];
|
|
6082
|
+
'ignore-spoil-time-modifier' | 'hide-health-bar-in-world' | 'hide-spoilage-bar-in-world' | 'no-item-on-ground-merging')[];
|
|
6069
6083
|
type ItemStackIndex = uint16;
|
|
6070
6084
|
/**
|
|
6071
6085
|
* The name of an {@link ItemSubGroup | prototype:ItemSubGroup}.
|
|
@@ -6640,6 +6654,10 @@ interface MapGenPresetEnemyEvolutionSettings {
|
|
|
6640
6654
|
time_factor?: double;
|
|
6641
6655
|
}
|
|
6642
6656
|
interface MapGenPresetEnemyExpansionSettings {
|
|
6657
|
+
/**
|
|
6658
|
+
* Cooldown in ticks for dispatching units when building bases.
|
|
6659
|
+
*/
|
|
6660
|
+
build_base_unit_dispatch_cooldown?: uint32;
|
|
6643
6661
|
enabled?: boolean;
|
|
6644
6662
|
/**
|
|
6645
6663
|
* Factor by which the evolution factor influences the size of the settler group
|
|
@@ -9456,6 +9474,10 @@ interface RotatedSpriteFrame {
|
|
|
9456
9474
|
y?: SpriteSizeType;
|
|
9457
9475
|
}
|
|
9458
9476
|
interface ScriptTriggerEffectItem extends TriggerEffectItem {
|
|
9477
|
+
/**
|
|
9478
|
+
* Event to be raised. When set, that event will be raised instead of {@link on_script_trigger_effect | runtime:on_script_trigger_effect}.
|
|
9479
|
+
*/
|
|
9480
|
+
custom_event?: CustomEventID;
|
|
9459
9481
|
/**
|
|
9460
9482
|
* The effect ID that will be provided in {@link on_script_trigger_effect | runtime:on_script_trigger_effect}.
|
|
9461
9483
|
*/
|
|
@@ -11892,6 +11914,10 @@ interface ThrowCapsuleAction {
|
|
|
11892
11914
|
uses_stack?: boolean;
|
|
11893
11915
|
}
|
|
11894
11916
|
interface ThrusterGraphicsSet extends WorkingVisualisations {
|
|
11917
|
+
/**
|
|
11918
|
+
* If true the starting frame will be randomized upon placement.
|
|
11919
|
+
*/
|
|
11920
|
+
animation_random_start_frame?: boolean;
|
|
11895
11921
|
flame?: Sprite;
|
|
11896
11922
|
flame_effect?: EffectTexture;
|
|
11897
11923
|
flame_effect_height?: float;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "factorio-types",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.65",
|
|
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.14",
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"lua-types": "^2.13.1"
|
|
29
29
|
},
|
package/src/core.d.ts
CHANGED
|
@@ -80,6 +80,6 @@ type bool = boolean;
|
|
|
80
80
|
*/
|
|
81
81
|
type DataExtendMethod = (data: prototype.Data, ...otherData: any[]) => void;
|
|
82
82
|
|
|
83
|
-
//
|
|
84
|
-
|
|
85
|
-
type
|
|
83
|
+
// used by UndoRedoEquipment but not declared anywhere
|
|
84
|
+
// Can be removed if/when this is resolved https://forums.factorio.com/viewtopic.php?t=135506
|
|
85
|
+
type PropertyTree = any;
|