typed-factorio 0.20.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,7 +11,7 @@
11
11
  *
12
12
  * As a special case, when the key is just the empty string, all the parameters will be concatenated (after processing, if any are localised strings). If there is only one parameter, it will be used as is.
13
13
  *
14
- * Furthermore, when an API function expects a localised string, it will also accept a regular string (i.e. not a table) which will not be translated, as well as a number or boolean, which will be converted to their textual representation.
14
+ * Furthermore, when an API function expects a localised string, it will also accept a regular string (i.e. not a table) which will not be translated, as well as a number, boolean or `nil`, which will be converted to their textual representation.
15
15
  *
16
16
  * {@link https://lua-api.factorio.com/latest/Concepts.html#LocalisedString View documentation}
17
17
  * @example In the English translation, this will print `"No ammo"`; in the Czech translation, it will print `"Bez munice"`:
@@ -280,7 +280,7 @@ type BoundingBoxArray = readonly [left_top: MapPosition, right_bottom: MapPositi
280
280
  * @example Explicit definition:
281
281
  *
282
282
  * ```
283
- * {left_top = {-2, -3}, right_bottom = {5, 8}}
283
+ * {left_top = {x = -2, y = -3}, right_bottom = {x = 5, y = 8}}
284
284
  * ```
285
285
  * @example Shorthand:
286
286
  *
@@ -1611,20 +1611,6 @@ type MapGenSize =
1611
1611
  | "very-big"
1612
1612
  | "very-good"
1613
1613
 
1614
- interface AutoplaceSetting {
1615
- readonly frequency: MapGenSize
1616
- readonly size: MapGenSize
1617
- readonly richness: MapGenSize
1618
- }
1619
-
1620
- interface AutoplaceSettings {
1621
- /**
1622
- * Whether missing autoplace names for this type should be default enabled.
1623
- */
1624
- readonly treat_missing_as_default: boolean
1625
- readonly settings: Record<string, AutoplaceSetting>
1626
- }
1627
-
1628
1614
  interface AutoplaceControl {
1629
1615
  /**
1630
1616
  * For things that are placed as spots such as ores and enemy bases, frequency is generally proportional to number of spots placed per unit area. For continuous features such as forests, frequency is how compressed the probability function is over distance, i.e. the inverse of 'scale' (similar to terrain_segmentation). When the {@link LuaAutoplaceControlPrototype} is of the category `"terrain"`, then scale is shown in the map generator GUI instead of frequency.
@@ -1640,6 +1626,14 @@ interface AutoplaceControl {
1640
1626
  readonly richness: MapGenSize
1641
1627
  }
1642
1628
 
1629
+ interface AutoplaceSettings {
1630
+ /**
1631
+ * Whether missing autoplace names for this type should be default enabled.
1632
+ */
1633
+ readonly treat_missing_as_default: boolean
1634
+ readonly settings: Record<string, AutoplaceControl>
1635
+ }
1636
+
1643
1637
  interface CliffPlacementSettings {
1644
1638
  /**
1645
1639
  * Name of the cliff prototype.
@@ -1758,6 +1752,26 @@ interface MapGenSettingsRead extends MapGenSettings {
1758
1752
  readonly starting_points: MapPositionTable[]
1759
1753
  }
1760
1754
 
1755
+ interface AdvancedMapGenSettings {
1756
+ readonly pollution: PollutionMapSettings
1757
+ readonly enemy_evolution: EnemyEvolutionMapSettings
1758
+ readonly enemy_expansion: EnemyExpansionMapSettings
1759
+ readonly difficulty_settings: DifficultySettings
1760
+ }
1761
+
1762
+ interface MapGenPreset {
1763
+ /**
1764
+ * The string used to alphabetically sort the presets. It is a simple string that has no additional semantic meaning.
1765
+ */
1766
+ readonly order: string
1767
+ /**
1768
+ * Whether this is the preset that is selected by default.
1769
+ */
1770
+ readonly default?: boolean
1771
+ readonly basic_settings?: MapGenSettingsRead
1772
+ readonly advanced_settings?: AdvancedMapGenSettings
1773
+ }
1774
+
1761
1775
  interface SignalID {
1762
1776
  /**
1763
1777
  * `"item"`, `"fluid"`, or `"virtual"`.
@@ -2787,32 +2801,105 @@ interface ModuleEffects {
2787
2801
  * This is a set of flags given as a dictionary[{@link string} &rarr; {@link boolean}]. When a flag is set, it is present in the dictionary with the value `true`. Unset flags aren't present in the dictionary at all. So, the boolean value is meaningless and exists just for easy table lookup if a flag is set.
2788
2802
  *
2789
2803
  * {@link https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags View documentation}
2804
+ * @remarks By default, none of these flags are set.
2790
2805
  */
2791
2806
  interface EntityPrototypeFlags {
2807
+ /**
2808
+ * Prevents the entity from being rotated before or after placement.
2809
+ */
2792
2810
  readonly "not-rotatable"?: boolean
2811
+ /**
2812
+ * Determines the default force when placing entities in the map editor and using the "AUTO" option for the force.
2813
+ */
2793
2814
  readonly "placeable-neutral"?: boolean
2815
+ /**
2816
+ * Determines the default force when placing entities in the map editor and using the "AUTO" option for the force.
2817
+ */
2794
2818
  readonly "placeable-player"?: boolean
2819
+ /**
2820
+ * Determines the default force when placing entities in the map editor and using the "AUTO" option for the force.
2821
+ */
2795
2822
  readonly "placeable-enemy"?: boolean
2823
+ /**
2824
+ * Determines whether the entity needs to be aligned with the invisible grid within the world. Most entities are confined in this way, with a few exceptions such as trees and land mines.
2825
+ */
2796
2826
  readonly "placeable-off-grid"?: boolean
2827
+ /**
2828
+ * Makes it possible to blueprint, deconstruct, and repair the entity (which can be turned off again using the specific flags). Makes it possible for the biter AI to target the entity as a distraction. Enables dust to automatically be created when building the entity. If the entity does not have a `map_color` set, this flag makes the entity appear on the map with the default color specified by the UtilityConstants.
2829
+ */
2797
2830
  readonly "player-creation"?: boolean
2831
+ /**
2832
+ * Uses 45 degree angle increments when selecting direction.
2833
+ */
2798
2834
  readonly "building-direction-8-way"?: boolean
2835
+ /**
2836
+ * Used to automatically detect the proper direction of the entity if possible. Used by the pump, train stop, and train signal by default.
2837
+ */
2799
2838
  readonly "filter-directions"?: boolean
2839
+ /**
2840
+ * Fast replace will not apply when building while moving.
2841
+ */
2800
2842
  readonly "fast-replaceable-no-build-while-moving"?: boolean
2843
+ /**
2844
+ * Used to specify that the entity breathes air, and is thus affected by poison.
2845
+ */
2801
2846
  readonly "breaths-air"?: boolean
2847
+ /**
2848
+ * Used to specify that the entity can not be 'healed' by repair packs.
2849
+ */
2802
2850
  readonly "not-repairable"?: boolean
2851
+ /**
2852
+ * Prevents the entity from being drawn on the map.
2853
+ */
2803
2854
  readonly "not-on-map"?: boolean
2855
+ /**
2856
+ * Prevents the entity from being deconstructed.
2857
+ */
2804
2858
  readonly "not-deconstructable"?: boolean
2859
+ /**
2860
+ * Prevents the entity from being part of a blueprint.
2861
+ */
2805
2862
  readonly "not-blueprintable"?: boolean
2863
+ /**
2864
+ * Hides the entity from the bonus GUI and from the "made in"-property of recipe tooltips.
2865
+ */
2806
2866
  readonly hidden?: boolean
2867
+ /**
2868
+ * Hides the alt-info of this entity when in alt-mode.
2869
+ */
2807
2870
  readonly "hide-alt-info"?: boolean
2871
+ /**
2872
+ * Does not fast replace this entity over other entity types when building while moving.
2873
+ */
2808
2874
  readonly "fast-replaceable-no-cross-type-while-moving"?: boolean
2809
2875
  readonly "no-gap-fill-while-building"?: boolean
2876
+ /**
2877
+ * Does not apply fire stickers to the entity.
2878
+ */
2810
2879
  readonly "not-flammable"?: boolean
2880
+ /**
2881
+ * Prevents inserters and loaders from taking items from this entity.
2882
+ */
2811
2883
  readonly "no-automated-item-removal"?: boolean
2884
+ /**
2885
+ * Prevents inserters and loaders from inserting items into this entity.
2886
+ */
2812
2887
  readonly "no-automated-item-insertion"?: boolean
2888
+ /**
2889
+ * Prevents the entity from being copy-pasted.
2890
+ */
2813
2891
  readonly "no-copy-paste"?: boolean
2892
+ /**
2893
+ * Disallows selection of the entity even when a selection box is specified for other reasons. For example, selection boxes are used to determine the size of outlines to be shown when highlighting entities inside electric pole ranges.
2894
+ */
2814
2895
  readonly "not-selectable-in-game"?: boolean
2896
+ /**
2897
+ * Prevents the entity from being selected by the upgrade planner.
2898
+ */
2815
2899
  readonly "not-upgradable"?: boolean
2900
+ /**
2901
+ * Prevents the entity from being shown in the kill statistics.
2902
+ */
2816
2903
  readonly "not-in-kill-statistics"?: boolean
2817
2904
  }
2818
2905
 
@@ -2820,18 +2907,52 @@ interface EntityPrototypeFlags {
2820
2907
  * This is a set of flags given as dictionary[{@link string} &rarr; {@link boolean}]. When a flag is set, it is present in the dictionary with the value `true`. Unset flags aren't present in the dictionary at all. So, the boolean value is meaningless and exists just for easy table lookup if a flag is set.
2821
2908
  *
2822
2909
  * {@link https://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFlags View documentation}
2910
+ * @remarks By default, none of these flags are set.
2823
2911
  */
2824
2912
  interface ItemPrototypeFlags {
2913
+ /**
2914
+ * Determines whether the logistics areas of roboports should be drawn when holding this item. Used by the deconstruction planner by default.
2915
+ */
2825
2916
  readonly "draw-logistic-overlay"?: boolean
2917
+ /**
2918
+ * Hides the item in the logistic requests and filters GUIs (among others).
2919
+ */
2826
2920
  readonly hidden?: boolean
2921
+ /**
2922
+ * Always shows the item in the logistic requests and filters GUIs (among others) even when the recipe for that item is locked.
2923
+ */
2827
2924
  readonly "always-show"?: boolean
2925
+ /**
2926
+ * Hides the item from the bonus GUI.
2927
+ */
2828
2928
  readonly "hide-from-bonus-gui"?: boolean
2929
+ /**
2930
+ * Hides the item from the tooltip that's shown when hovering over a burner inventory.
2931
+ */
2829
2932
  readonly "hide-from-fuel-tooltip"?: boolean
2933
+ /**
2934
+ * Prevents the item from being stacked. It also prevents the item from stacking in assembling machine input slots, which can otherwise exceed the item stack size if required by the recipe. Additionally, the item does not show an item count when in the cursor.
2935
+ */
2830
2936
  readonly "not-stackable"?: boolean
2937
+ /**
2938
+ * Makes the item act as an extension to the inventory that it is placed in. Only has an effect for items with inventory.
2939
+ */
2831
2940
  readonly "can-extend-inventory"?: boolean
2941
+ /**
2942
+ * Makes construction bots prefer this item when building the entity specified by its `place_result`.
2943
+ */
2832
2944
  readonly "primary-place-result"?: boolean
2945
+ /**
2946
+ * Allows the item to be opened by the player, firing the `on_mod_item_opened` event. Only has an effect for selection tool items.
2947
+ */
2833
2948
  readonly "mod-openable"?: boolean
2949
+ /**
2950
+ * Makes it so the item is deleted when clearing the cursor, instead of being put into the player's inventory. The copy-paste tools use this by default, for example.
2951
+ */
2834
2952
  readonly "only-in-cursor"?: boolean
2953
+ /**
2954
+ * Allows the item to be spawned by a quickbar shortcut or custom input.
2955
+ */
2835
2956
  readonly spawnable?: boolean
2836
2957
  }
2837
2958
 
@@ -3231,7 +3352,7 @@ interface ProgrammableSpeakerInstrument {
3231
3352
  }
3232
3353
 
3233
3354
  /**
3234
- * A {@link string} that specifies where a gui element should be.
3355
+ * A {@link string} that specifies where a GUI element should be.
3235
3356
  *
3236
3357
  * {@link https://lua-api.factorio.com/latest/Concepts.html#Alignment View documentation}
3237
3358
  */
@@ -3599,6 +3720,34 @@ interface VehicleAutomaticTargetingParameters {
3599
3720
  */
3600
3721
  type SoundType = "game-effect" | "gui-effect" | "ambient" | "environment" | "walking" | "alert" | "wind"
3601
3722
 
3723
+ /**
3724
+ * Types `"signal"` and `"item-group"` do not support filters.
3725
+ *
3726
+ * Available filters:
3727
+ * - {@link ItemPrototypeFilter} for type `"item"`
3728
+ * - {@link TilePrototypeFilter} for type `"tile"`
3729
+ * - {@link EntityPrototypeFilter} for type `"entity"`
3730
+ * - {@link FluidPrototypeFilter} for type `"fluid"`
3731
+ * - {@link RecipePrototypeFilter} for type `"recipe"`
3732
+ * - {@link DecorativePrototypeFilter} for type `"decorative"`
3733
+ * - {@link AchievementPrototypeFilter} for type `"achievement"`
3734
+ * - {@link EquipmentPrototypeFilter} for type `"equipment"`
3735
+ * - {@link TechnologyPrototypeFilter} for type `"technology"`
3736
+ *
3737
+ * {@link https://lua-api.factorio.com/latest/Concepts.html#PrototypeFilter View documentation}
3738
+ * @remarks Filters are always used as an array of filters of a specific type. Every filter can only be used with its corresponding event, and different types of event filters can not be mixed.
3739
+ */
3740
+ type PrototypeFilter =
3741
+ | ItemPrototypeFilter
3742
+ | TilePrototypeFilter
3743
+ | EntityPrototypeFilter
3744
+ | FluidPrototypeFilter
3745
+ | RecipePrototypeFilter
3746
+ | DecorativePrototypeFilter
3747
+ | AchievementPrototypeFilter
3748
+ | EquipmentPrototypeFilter
3749
+ | TechnologyPrototypeFilter
3750
+
3602
3751
  interface BaseItemPrototypeFilter {
3603
3752
  /**
3604
3753
  * The condition to filter on. One of `"tool"`, `"mergeable"`, `"item-with-inventory"`, `"selection-tool"`, `"item-with-label"`, `"has-rocket-launch-products"`, `"fuel"`, `"place-result"`, `"burnt-result"`, `"place-as-tile"`, `"placed-as-equipment-result"`, `"name"`, `"type"`, `"flag"`, `"subgroup"`, `"fuel-category"`, `"stack-size"`, `"default-request-amount"`, `"wire-count"`, `"fuel-value"`, `"fuel-acceleration-multiplier"`, `"fuel-top-speed-multiplier"`, `"fuel-emissions-multiplier"`.
@@ -3690,9 +3839,9 @@ interface NameItemPrototypeFilter extends BaseItemPrototypeFilter {
3690
3839
  interface TypeItemPrototypeFilter extends BaseItemPrototypeFilter {
3691
3840
  readonly filter: "type"
3692
3841
  /**
3693
- * The prototype type
3842
+ * The prototype type, or a list of acceptable types.
3694
3843
  */
3695
- readonly type: string
3844
+ readonly type: string | string[]
3696
3845
  }
3697
3846
 
3698
3847
  interface FlagItemPrototypeFilter extends BaseItemPrototypeFilter {
@@ -3865,9 +4014,9 @@ interface BaseModSettingPrototypeFilter {
3865
4014
  interface TypeModSettingPrototypeFilter extends BaseModSettingPrototypeFilter {
3866
4015
  readonly filter: "type"
3867
4016
  /**
3868
- * The prototype type
4017
+ * The prototype type, or a list of acceptable types.
3869
4018
  */
3870
- readonly type: string
4019
+ readonly type: string | string[]
3871
4020
  }
3872
4021
 
3873
4022
  interface ModModSettingPrototypeFilter extends BaseModSettingPrototypeFilter {
@@ -3881,9 +4030,9 @@ interface ModModSettingPrototypeFilter extends BaseModSettingPrototypeFilter {
3881
4030
  interface SettingTypeModSettingPrototypeFilter extends BaseModSettingPrototypeFilter {
3882
4031
  readonly filter: "setting-type"
3883
4032
  /**
3884
- * The setting scope type (startup, runtime-global, or runtime-per-user)
4033
+ * The setting scope type (`"startup"`, `"runtime-global"`, or `"runtime-per-user"`)
3885
4034
  */
3886
- readonly type: string
4035
+ readonly type: "startup" | "runtime-global" | "runtime-per-user"
3887
4036
  }
3888
4037
 
3889
4038
  /**
@@ -4057,9 +4206,9 @@ interface BaseAchievementPrototypeFilter {
4057
4206
  interface TypeAchievementPrototypeFilter extends BaseAchievementPrototypeFilter {
4058
4207
  readonly filter: "type"
4059
4208
  /**
4060
- * The prototype type
4209
+ * The prototype type, or a list of acceptable types.
4061
4210
  */
4062
- readonly type: string
4211
+ readonly type: string | string[]
4063
4212
  }
4064
4213
 
4065
4214
  interface AllowedWithoutFightAchievementPrototypeFilter extends BaseAchievementPrototypeFilter {
@@ -4208,9 +4357,9 @@ interface BaseEquipmentPrototypeFilter {
4208
4357
  interface TypeEquipmentPrototypeFilter extends BaseEquipmentPrototypeFilter {
4209
4358
  readonly filter: "type"
4210
4359
  /**
4211
- * The prototype type
4360
+ * The prototype type, or a list of acceptable types.
4212
4361
  */
4213
- readonly type: string
4362
+ readonly type: string | string[]
4214
4363
  }
4215
4364
 
4216
4365
  interface ItemToPlaceEquipmentPrototypeFilter extends BaseEquipmentPrototypeFilter {
@@ -4612,9 +4761,9 @@ interface NameEntityPrototypeFilter extends BaseEntityPrototypeFilter {
4612
4761
  interface TypeEntityPrototypeFilter extends BaseEntityPrototypeFilter {
4613
4762
  readonly filter: "type"
4614
4763
  /**
4615
- * The prototype type
4764
+ * The prototype type, or a list of acceptable types.
4616
4765
  */
4617
- readonly type: string
4766
+ readonly type: string | string[]
4618
4767
  }
4619
4768
 
4620
4769
  /**
@@ -7371,61 +7520,6 @@ type RaiseableEvents =
7371
7520
  | typeof defines.events.script_raised_revive
7372
7521
  | typeof defines.events.script_raised_set_tiles
7373
7522
 
7374
- /**
7375
- * A map gen preset. Used in {@link https://wiki.factorio.com/Prototype/MapGenPresets Prototype/MapGenPresets}.
7376
- *
7377
- * {@link https://wiki.factorio.com/Types/MapGenPreset View Documentation}
7378
- */
7379
- interface MapGenPreset {
7380
- /** Specifies the ordering the map generator gui. */
7381
- order: string
7382
- /** Whether this is the default preset. If set to boolean, this preset may not have any other properties besides this and order. */
7383
- default?: boolean
7384
- /**
7385
- * This is a table with the below key/value pairs. All key/value pairs are optional. If not set they will just use the
7386
- * default values.
7387
- */
7388
- basic_settings: Partial<MapGenSettings>
7389
- /**
7390
- * This is a table with the below key/value pairs. All key/value pairs are optional, if not set they will just use the
7391
- * existing values.
7392
- */
7393
- readonly advanced_settings: {
7394
- readonly pollution?: {
7395
- enabled?: boolean
7396
- /** Must be <= 0.25. */
7397
- diffusion_ratio?: double
7398
- /** Also known as dissipation rate. Must be >= 0.5. */
7399
- ageing?: double
7400
- enemy_attack_pollution_consumption_modifier?: double
7401
- min_pollution_to_damage_trees?: double
7402
- pollution_restored_per_tree_damage?: double
7403
- }
7404
- readonly enemy_evolution?: {
7405
- enabled?: boolean
7406
- time_factor?: double
7407
- destroy_factor?: double
7408
- pollution_factor?: double
7409
- }
7410
- readonly enemy_expansion?: {
7411
- enabled?: boolean
7412
- max_expansion_distance?: double
7413
- settler_group_min_size?: double
7414
- settler_group_max_size?: double
7415
- /** In ticks. */
7416
- min_expansion_cooldown?: double
7417
- /** In ticks. */
7418
- max_expansion_cooldown?: double
7419
- }
7420
- readonly difficulty_settings?: {
7421
- recipe_difficulty?: defines.difficulty_settings.recipe_difficulty
7422
- technology_difficulty?: defines.difficulty_settings.technology_difficulty
7423
- technology_price_multiplier?: double
7424
- research_queue_setting?: "after-victory" | "always" | "never"
7425
- }
7426
- }
7427
- }
7428
-
7429
7523
  interface BlueprintControlBehavior {
7430
7524
  readonly condition?: CircuitCondition
7431
7525
  readonly circuit_condition?: CircuitCondition
@@ -756,6 +756,10 @@ declare namespace defines {
756
756
  * Event type: {@link OnResearchReversedEvent}
757
757
  */
758
758
  const on_research_reversed: EventId<OnResearchReversedEvent>
759
+ /**
760
+ * Event type: {@link OnResearchCancelledEvent}
761
+ */
762
+ const on_research_cancelled: EventId<OnResearchCancelledEvent>
759
763
  /**
760
764
  * Event type: {@link OnPlayerRotatedEntityEvent}
761
765
  */
@@ -1386,6 +1390,10 @@ declare namespace defines {
1386
1390
  * Event type: {@link OnEquipmentRemovedEvent}
1387
1391
  */
1388
1392
  const on_equipment_removed: EventId<OnEquipmentRemovedEvent>
1393
+ /**
1394
+ * Event type: {@link OnPlayerReverseSelectedAreaEvent}
1395
+ */
1396
+ const on_player_reverse_selected_area: EventId<OnPlayerReverseSelectedAreaEvent>
1389
1397
  }
1390
1398
  /**
1391
1399
  * See the {@link https://lua-api.factorio.com/latest/events.html events page} for more info on what events contain and when they get raised.
@@ -1555,6 +1563,7 @@ declare namespace defines {
1555
1563
  remove_train_station,
1556
1564
  reset_assembling_machine,
1557
1565
  reset_item,
1566
+ reverse_select_area,
1558
1567
  rotate_entity,
1559
1568
  select_area,
1560
1569
  select_blueprint_entities,
@@ -21,7 +21,7 @@ interface CustomInputEvent extends EventData {
21
21
  */
22
22
  readonly cursor_position: MapPositionTable
23
23
  /**
24
- * Information about the prototype that is selected when the custom input is used. `nil` if none is selected.
24
+ * Information about the prototype that is selected when the custom input is used. Needs to be enabled on the custom input's prototype. `nil` if none is selected.
25
25
  */
26
26
  readonly selected_prototype?: SelectedPrototypeData
27
27
  /**
@@ -2588,6 +2588,46 @@ interface OnPlayerRespawnedEvent extends EventData {
2588
2588
  readonly tick: uint
2589
2589
  }
2590
2590
 
2591
+ /**
2592
+ * Called after a player reverse-selects an area with a selection-tool item.
2593
+ *
2594
+ * {@link https://lua-api.factorio.com/latest/events.html#on_player_reverse_selected_area View documentation}
2595
+ */
2596
+ interface OnPlayerReverseSelectedAreaEvent extends EventData {
2597
+ /**
2598
+ * The player doing the selection.
2599
+ */
2600
+ readonly player_index: PlayerIndex
2601
+ /**
2602
+ * The surface selected.
2603
+ */
2604
+ readonly surface: LuaSurface
2605
+ /**
2606
+ * The area selected.
2607
+ */
2608
+ readonly area: BoundingBoxRead
2609
+ /**
2610
+ * The item used to select the area.
2611
+ */
2612
+ readonly item: string
2613
+ /**
2614
+ * The entities selected.
2615
+ */
2616
+ readonly entities: LuaEntity[]
2617
+ /**
2618
+ * The tiles selected.
2619
+ */
2620
+ readonly tiles: LuaTile[]
2621
+ /**
2622
+ * Identifier of the event
2623
+ */
2624
+ readonly name: typeof defines.events.on_player_reverse_selected_area
2625
+ /**
2626
+ * Tick the event was generated.
2627
+ */
2628
+ readonly tick: uint
2629
+ }
2630
+
2591
2631
  /**
2592
2632
  * Called when the player rotates an entity. This event is only fired when the entity actually changes its orientation -- pressing the rotate key on an entity that can't be rotated won't fire this event.
2593
2633
  *
@@ -3295,6 +3335,30 @@ interface OnPreSurfaceDeletedEvent extends EventData {
3295
3335
  readonly tick: uint
3296
3336
  }
3297
3337
 
3338
+ /**
3339
+ * Called when research is cancelled.
3340
+ *
3341
+ * {@link https://lua-api.factorio.com/latest/events.html#on_research_cancelled View documentation}
3342
+ */
3343
+ interface OnResearchCancelledEvent extends EventData {
3344
+ /**
3345
+ * A mapping of technology name to how many times it was cancelled.
3346
+ */
3347
+ readonly research: Record<string, uint>
3348
+ /**
3349
+ * The force whose research was cancelled.
3350
+ */
3351
+ readonly force: LuaForce
3352
+ /**
3353
+ * Identifier of the event
3354
+ */
3355
+ readonly name: typeof defines.events.on_research_cancelled
3356
+ /**
3357
+ * Tick the event was generated.
3358
+ */
3359
+ readonly tick: uint
3360
+ }
3361
+
3298
3362
  /**
3299
3363
  * Called when a research finishes.
3300
3364
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typed-factorio",
3
- "version": "0.20.0",
3
+ "version": "1.1.0",
4
4
  "description": "Featureful typescript definitions for the the Factorio modding lua api.",
5
5
  "keywords": [
6
6
  "factorio",