typed-factorio 1.0.0-RC → 1.2.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"`.
@@ -2707,6 +2721,8 @@ type SpriteType =
2707
2721
  /**
2708
2722
  * It is specified by {@link string}. It can be either the name of a {@link https://wiki.factorio.com/Prototype/Sprite sprite prototype} defined in the data stage or a path in form "type/name".
2709
2723
  *
2724
+ * The validity of a SpritePath can be verified at runtime using {@link LuaGameScript#is_valid_sprite_path LuaGameScript::is_valid_sprite_path}.
2725
+ *
2710
2726
  * The supported types are:
2711
2727
  * - `"item"` - for example "item/iron-plate" is the icon sprite of iron plate
2712
2728
  * - `"entity"` - for example "entity/small-biter" is the icon sprite of the small biter
@@ -2728,6 +2744,8 @@ type SpritePath = string | `${SpriteType}/${string}`
2728
2744
  /**
2729
2745
  * A sound defined by a {@link string}. It can be either the name of a {@link https://wiki.factorio.com/Prototype/Sound sound prototype} defined in the data stage or a path in the form `"type/name"`. The latter option can be sorted into three categories.
2730
2746
  *
2747
+ * The validity of a SoundPath can be verified at runtime using {@link LuaGameScript#is_valid_sound_path LuaGameScript::is_valid_sound_path}.
2748
+ *
2731
2749
  * The utility and ambient types each contain general use sound prototypes defined by the game itself.
2732
2750
  * - `"utility"` - Uses the {@link https://wiki.factorio.com/Prototype/UtilitySounds UtilitySounds} prototype. Example: `"utility/wire_connect_pole"`
2733
2751
  * - `"ambient"` - Uses {@link https://wiki.factorio.com/Prototype/AmbientSound AmbientSound} prototypes. Example: `"ambient/resource-deficiency"`
@@ -2787,32 +2805,105 @@ interface ModuleEffects {
2787
2805
  * 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
2806
  *
2789
2807
  * {@link https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags View documentation}
2808
+ * @remarks By default, none of these flags are set.
2790
2809
  */
2791
2810
  interface EntityPrototypeFlags {
2811
+ /**
2812
+ * Prevents the entity from being rotated before or after placement.
2813
+ */
2792
2814
  readonly "not-rotatable"?: boolean
2815
+ /**
2816
+ * Determines the default force when placing entities in the map editor and using the "AUTO" option for the force.
2817
+ */
2793
2818
  readonly "placeable-neutral"?: boolean
2819
+ /**
2820
+ * Determines the default force when placing entities in the map editor and using the "AUTO" option for the force.
2821
+ */
2794
2822
  readonly "placeable-player"?: boolean
2823
+ /**
2824
+ * Determines the default force when placing entities in the map editor and using the "AUTO" option for the force.
2825
+ */
2795
2826
  readonly "placeable-enemy"?: boolean
2827
+ /**
2828
+ * 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.
2829
+ */
2796
2830
  readonly "placeable-off-grid"?: boolean
2831
+ /**
2832
+ * 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.
2833
+ */
2797
2834
  readonly "player-creation"?: boolean
2835
+ /**
2836
+ * Uses 45 degree angle increments when selecting direction.
2837
+ */
2798
2838
  readonly "building-direction-8-way"?: boolean
2839
+ /**
2840
+ * Used to automatically detect the proper direction of the entity if possible. Used by the pump, train stop, and train signal by default.
2841
+ */
2799
2842
  readonly "filter-directions"?: boolean
2843
+ /**
2844
+ * Fast replace will not apply when building while moving.
2845
+ */
2800
2846
  readonly "fast-replaceable-no-build-while-moving"?: boolean
2847
+ /**
2848
+ * Used to specify that the entity breathes air, and is thus affected by poison.
2849
+ */
2801
2850
  readonly "breaths-air"?: boolean
2851
+ /**
2852
+ * Used to specify that the entity can not be 'healed' by repair packs.
2853
+ */
2802
2854
  readonly "not-repairable"?: boolean
2855
+ /**
2856
+ * Prevents the entity from being drawn on the map.
2857
+ */
2803
2858
  readonly "not-on-map"?: boolean
2859
+ /**
2860
+ * Prevents the entity from being deconstructed.
2861
+ */
2804
2862
  readonly "not-deconstructable"?: boolean
2863
+ /**
2864
+ * Prevents the entity from being part of a blueprint.
2865
+ */
2805
2866
  readonly "not-blueprintable"?: boolean
2867
+ /**
2868
+ * Hides the entity from the bonus GUI and from the "made in"-property of recipe tooltips.
2869
+ */
2806
2870
  readonly hidden?: boolean
2871
+ /**
2872
+ * Hides the alt-info of this entity when in alt-mode.
2873
+ */
2807
2874
  readonly "hide-alt-info"?: boolean
2875
+ /**
2876
+ * Does not fast replace this entity over other entity types when building while moving.
2877
+ */
2808
2878
  readonly "fast-replaceable-no-cross-type-while-moving"?: boolean
2809
2879
  readonly "no-gap-fill-while-building"?: boolean
2880
+ /**
2881
+ * Does not apply fire stickers to the entity.
2882
+ */
2810
2883
  readonly "not-flammable"?: boolean
2884
+ /**
2885
+ * Prevents inserters and loaders from taking items from this entity.
2886
+ */
2811
2887
  readonly "no-automated-item-removal"?: boolean
2888
+ /**
2889
+ * Prevents inserters and loaders from inserting items into this entity.
2890
+ */
2812
2891
  readonly "no-automated-item-insertion"?: boolean
2892
+ /**
2893
+ * Prevents the entity from being copy-pasted.
2894
+ */
2813
2895
  readonly "no-copy-paste"?: boolean
2896
+ /**
2897
+ * 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.
2898
+ */
2814
2899
  readonly "not-selectable-in-game"?: boolean
2900
+ /**
2901
+ * Prevents the entity from being selected by the upgrade planner.
2902
+ */
2815
2903
  readonly "not-upgradable"?: boolean
2904
+ /**
2905
+ * Prevents the entity from being shown in the kill statistics.
2906
+ */
2816
2907
  readonly "not-in-kill-statistics"?: boolean
2817
2908
  }
2818
2909
 
@@ -2820,18 +2911,52 @@ interface EntityPrototypeFlags {
2820
2911
  * 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
2912
  *
2822
2913
  * {@link https://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFlags View documentation}
2914
+ * @remarks By default, none of these flags are set.
2823
2915
  */
2824
2916
  interface ItemPrototypeFlags {
2917
+ /**
2918
+ * Determines whether the logistics areas of roboports should be drawn when holding this item. Used by the deconstruction planner by default.
2919
+ */
2825
2920
  readonly "draw-logistic-overlay"?: boolean
2921
+ /**
2922
+ * Hides the item in the logistic requests and filters GUIs (among others).
2923
+ */
2826
2924
  readonly hidden?: boolean
2925
+ /**
2926
+ * Always shows the item in the logistic requests and filters GUIs (among others) even when the recipe for that item is locked.
2927
+ */
2827
2928
  readonly "always-show"?: boolean
2929
+ /**
2930
+ * Hides the item from the bonus GUI.
2931
+ */
2828
2932
  readonly "hide-from-bonus-gui"?: boolean
2933
+ /**
2934
+ * Hides the item from the tooltip that's shown when hovering over a burner inventory.
2935
+ */
2829
2936
  readonly "hide-from-fuel-tooltip"?: boolean
2937
+ /**
2938
+ * 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.
2939
+ */
2830
2940
  readonly "not-stackable"?: boolean
2941
+ /**
2942
+ * Makes the item act as an extension to the inventory that it is placed in. Only has an effect for items with inventory.
2943
+ */
2831
2944
  readonly "can-extend-inventory"?: boolean
2945
+ /**
2946
+ * Makes construction bots prefer this item when building the entity specified by its `place_result`.
2947
+ */
2832
2948
  readonly "primary-place-result"?: boolean
2949
+ /**
2950
+ * Allows the item to be opened by the player, firing the `on_mod_item_opened` event. Only has an effect for selection tool items.
2951
+ */
2833
2952
  readonly "mod-openable"?: boolean
2953
+ /**
2954
+ * 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.
2955
+ */
2834
2956
  readonly "only-in-cursor"?: boolean
2957
+ /**
2958
+ * Allows the item to be spawned by a quickbar shortcut or custom input.
2959
+ */
2835
2960
  readonly spawnable?: boolean
2836
2961
  }
2837
2962
 
@@ -3231,7 +3356,7 @@ interface ProgrammableSpeakerInstrument {
3231
3356
  }
3232
3357
 
3233
3358
  /**
3234
- * A {@link string} that specifies where a gui element should be.
3359
+ * A {@link string} that specifies where a GUI element should be.
3235
3360
  *
3236
3361
  * {@link https://lua-api.factorio.com/latest/Concepts.html#Alignment View documentation}
3237
3362
  */
@@ -3599,6 +3724,34 @@ interface VehicleAutomaticTargetingParameters {
3599
3724
  */
3600
3725
  type SoundType = "game-effect" | "gui-effect" | "ambient" | "environment" | "walking" | "alert" | "wind"
3601
3726
 
3727
+ /**
3728
+ * Types `"signal"` and `"item-group"` do not support filters.
3729
+ *
3730
+ * Available filters:
3731
+ * - {@link ItemPrototypeFilter} for type `"item"`
3732
+ * - {@link TilePrototypeFilter} for type `"tile"`
3733
+ * - {@link EntityPrototypeFilter} for type `"entity"`
3734
+ * - {@link FluidPrototypeFilter} for type `"fluid"`
3735
+ * - {@link RecipePrototypeFilter} for type `"recipe"`
3736
+ * - {@link DecorativePrototypeFilter} for type `"decorative"`
3737
+ * - {@link AchievementPrototypeFilter} for type `"achievement"`
3738
+ * - {@link EquipmentPrototypeFilter} for type `"equipment"`
3739
+ * - {@link TechnologyPrototypeFilter} for type `"technology"`
3740
+ *
3741
+ * {@link https://lua-api.factorio.com/latest/Concepts.html#PrototypeFilter View documentation}
3742
+ * @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.
3743
+ */
3744
+ type PrototypeFilter =
3745
+ | ItemPrototypeFilter
3746
+ | TilePrototypeFilter
3747
+ | EntityPrototypeFilter
3748
+ | FluidPrototypeFilter
3749
+ | RecipePrototypeFilter
3750
+ | DecorativePrototypeFilter
3751
+ | AchievementPrototypeFilter
3752
+ | EquipmentPrototypeFilter
3753
+ | TechnologyPrototypeFilter
3754
+
3602
3755
  interface BaseItemPrototypeFilter {
3603
3756
  /**
3604
3757
  * 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 +3843,9 @@ interface NameItemPrototypeFilter extends BaseItemPrototypeFilter {
3690
3843
  interface TypeItemPrototypeFilter extends BaseItemPrototypeFilter {
3691
3844
  readonly filter: "type"
3692
3845
  /**
3693
- * The prototype type
3846
+ * The prototype type, or a list of acceptable types.
3694
3847
  */
3695
- readonly type: string
3848
+ readonly type: string | string[]
3696
3849
  }
3697
3850
 
3698
3851
  interface FlagItemPrototypeFilter extends BaseItemPrototypeFilter {
@@ -3865,9 +4018,9 @@ interface BaseModSettingPrototypeFilter {
3865
4018
  interface TypeModSettingPrototypeFilter extends BaseModSettingPrototypeFilter {
3866
4019
  readonly filter: "type"
3867
4020
  /**
3868
- * The prototype type
4021
+ * The prototype type, or a list of acceptable types.
3869
4022
  */
3870
- readonly type: string
4023
+ readonly type: string | string[]
3871
4024
  }
3872
4025
 
3873
4026
  interface ModModSettingPrototypeFilter extends BaseModSettingPrototypeFilter {
@@ -3881,9 +4034,9 @@ interface ModModSettingPrototypeFilter extends BaseModSettingPrototypeFilter {
3881
4034
  interface SettingTypeModSettingPrototypeFilter extends BaseModSettingPrototypeFilter {
3882
4035
  readonly filter: "setting-type"
3883
4036
  /**
3884
- * The setting scope type (startup, runtime-global, or runtime-per-user)
4037
+ * The setting scope type (`"startup"`, `"runtime-global"`, or `"runtime-per-user"`)
3885
4038
  */
3886
- readonly type: string
4039
+ readonly type: "startup" | "runtime-global" | "runtime-per-user"
3887
4040
  }
3888
4041
 
3889
4042
  /**
@@ -4057,9 +4210,9 @@ interface BaseAchievementPrototypeFilter {
4057
4210
  interface TypeAchievementPrototypeFilter extends BaseAchievementPrototypeFilter {
4058
4211
  readonly filter: "type"
4059
4212
  /**
4060
- * The prototype type
4213
+ * The prototype type, or a list of acceptable types.
4061
4214
  */
4062
- readonly type: string
4215
+ readonly type: string | string[]
4063
4216
  }
4064
4217
 
4065
4218
  interface AllowedWithoutFightAchievementPrototypeFilter extends BaseAchievementPrototypeFilter {
@@ -4208,9 +4361,9 @@ interface BaseEquipmentPrototypeFilter {
4208
4361
  interface TypeEquipmentPrototypeFilter extends BaseEquipmentPrototypeFilter {
4209
4362
  readonly filter: "type"
4210
4363
  /**
4211
- * The prototype type
4364
+ * The prototype type, or a list of acceptable types.
4212
4365
  */
4213
- readonly type: string
4366
+ readonly type: string | string[]
4214
4367
  }
4215
4368
 
4216
4369
  interface ItemToPlaceEquipmentPrototypeFilter extends BaseEquipmentPrototypeFilter {
@@ -4612,9 +4765,9 @@ interface NameEntityPrototypeFilter extends BaseEntityPrototypeFilter {
4612
4765
  interface TypeEntityPrototypeFilter extends BaseEntityPrototypeFilter {
4613
4766
  readonly filter: "type"
4614
4767
  /**
4615
- * The prototype type
4768
+ * The prototype type, or a list of acceptable types.
4616
4769
  */
4617
- readonly type: string
4770
+ readonly type: string | string[]
4618
4771
  }
4619
4772
 
4620
4773
  /**
@@ -7371,61 +7524,6 @@ type RaiseableEvents =
7371
7524
  | typeof defines.events.script_raised_revive
7372
7525
  | typeof defines.events.script_raised_set_tiles
7373
7526
 
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
7527
  interface BlueprintControlBehavior {
7430
7528
  readonly condition?: CircuitCondition
7431
7529
  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,
@@ -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": "1.0.0-RC",
3
+ "version": "1.2.0",
4
4
  "description": "Featureful typescript definitions for the the Factorio modding lua api.",
5
5
  "keywords": [
6
6
  "factorio",