typed-factorio 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- package/Changelog.md +16 -0
- package/README.md +25 -28
- package/generated/classes.d.ts +1134 -380
- package/generated/concepts.d.ts +194 -129
- package/generated/defines.d.ts +2 -2
- package/generated/events.d.ts +65 -17
- package/package.json +1 -1
package/generated/concepts.d.ts
CHANGED
@@ -226,10 +226,11 @@ interface OldTileAndPosition {
|
|
226
226
|
type Tags = Record<string, AnyBasic | undefined>
|
227
227
|
|
228
228
|
/**
|
229
|
+
* **Note**
|
229
230
|
*
|
231
|
+
* The vectors for all 5 position attributes are a table with `x` and `y` keys instead of an array.
|
230
232
|
*
|
231
233
|
* {@link https://lua-api.factorio.com/latest/Concepts.html#SmokeSource View documentation}
|
232
|
-
* @remarks The vectors for all 5 position attributes are a table with `x` and `y` keys instead of an array.
|
233
234
|
*/
|
234
235
|
interface SmokeSource {
|
235
236
|
readonly name: string
|
@@ -472,10 +473,11 @@ interface DecorativeResult {
|
|
472
473
|
}
|
473
474
|
|
474
475
|
/**
|
476
|
+
* **Note**
|
475
477
|
*
|
478
|
+
* Either `icon`, `text`, or both must be provided.
|
476
479
|
*
|
477
480
|
* {@link https://lua-api.factorio.com/latest/Concepts.html#ChartTagSpec View documentation}
|
478
|
-
* @remarks Either `icon`, `text`, or both must be provided.
|
479
481
|
*/
|
480
482
|
interface ChartTagSpec {
|
481
483
|
readonly position: MapPosition
|
@@ -655,7 +657,7 @@ interface EnemyEvolutionMapSettings {
|
|
655
657
|
}
|
656
658
|
|
657
659
|
/**
|
658
|
-
* Candidate chunks are given scores to determine which one of them should be expanded into. This score takes into account various settings noted below. The iteration is over a square region centered around the chunk for which the calculation is done, and includes the central chunk as well. Distances are calculated as {@
|
660
|
+
* Candidate chunks are given scores to determine which one of them should be expanded into. This score takes into account various settings noted below. The iteration is over a square region centered around the chunk for which the calculation is done, and includes the central chunk as well. Distances are calculated as {@linkplain https://en.wikipedia.org/wiki/Taxicab_geometry Manhattan distance}.
|
659
661
|
*
|
660
662
|
* The pseudocode algorithm to determine a chunk's score is as follows:
|
661
663
|
*
|
@@ -1507,7 +1509,7 @@ interface AutoplaceSpecification {
|
|
1507
1509
|
}
|
1508
1510
|
|
1509
1511
|
/**
|
1510
|
-
* A fragment of a functional program used to generate coherent noise, probably for purposes related to terrain generation. These can only be meaningfully written/modified during the data load phase. More detailed information is found on the {@
|
1512
|
+
* A fragment of a functional program used to generate coherent noise, probably for purposes related to terrain generation. These can only be meaningfully written/modified during the data load phase. More detailed information is found on the {@linkplain https://wiki.factorio.com/Types/NoiseExpression wiki}.
|
1511
1513
|
*
|
1512
1514
|
* {@link https://lua-api.factorio.com/latest/Concepts.html#NoiseExpression View documentation}
|
1513
1515
|
*/
|
@@ -1593,8 +1595,11 @@ interface Resistance {
|
|
1593
1595
|
* - `"high"`, `"big"`, `"good"` - equivalent to `sqrt(2)`
|
1594
1596
|
* - `"very-high"`, `"very-big"`, `"very-good"` - equivalent to `2`
|
1595
1597
|
*
|
1598
|
+
* **Note**
|
1599
|
+
*
|
1600
|
+
* The map generation algorithm officially supports the range of values the in-game map generation screen shows (specifically `0` and values from `1/6` to `6`). Values outside this range are not guaranteed to work as expected.
|
1601
|
+
*
|
1596
1602
|
* {@link https://lua-api.factorio.com/latest/Concepts.html#MapGenSize View documentation}
|
1597
|
-
* @remarks The map generation algorithm officially supports the range of values the in-game map generation screen shows (specifically `0` and values from `1/6` to `6`). Values outside this range are not guaranteed to work as expected.
|
1598
1603
|
*/
|
1599
1604
|
type MapGenSize =
|
1600
1605
|
| number
|
@@ -1630,6 +1635,21 @@ interface AutoplaceControl {
|
|
1630
1635
|
readonly richness: MapGenSize
|
1631
1636
|
}
|
1632
1637
|
|
1638
|
+
interface AutoplaceControlRead extends AutoplaceControl {
|
1639
|
+
/**
|
1640
|
+
* 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.
|
1641
|
+
*/
|
1642
|
+
readonly frequency: number
|
1643
|
+
/**
|
1644
|
+
* For things that are placed as spots, size is proportional to the area of each spot. For continuous features, size affects how much of the map is covered with the thing, and is called 'coverage' in the GUI.
|
1645
|
+
*/
|
1646
|
+
readonly size: number
|
1647
|
+
/**
|
1648
|
+
* Has different effects for different things, but generally affects the 'health' or density of a thing that is placed without affecting where it is placed. For trees, richness affects tree health. For ores, richness multiplies the amount of ore at any given tile in a patch. Metadata about autoplace controls (such as whether or not 'richness' does anything for them) can be found in the {@link LuaAutoplaceControlPrototype} by looking up `game.autoplace_control_prototypes[(control prototype name)]`, e.g. `game.autoplace_control_prototypes["enemy-base"].richness` is false, because enemy base autoplacement doesn't use richness.
|
1649
|
+
*/
|
1650
|
+
readonly richness: number
|
1651
|
+
}
|
1652
|
+
|
1633
1653
|
interface AutoplaceSettings {
|
1634
1654
|
/**
|
1635
1655
|
* Whether missing autoplace names for this type should be default enabled.
|
@@ -1638,6 +1658,10 @@ interface AutoplaceSettings {
|
|
1638
1658
|
readonly settings: Record<string, AutoplaceControl>
|
1639
1659
|
}
|
1640
1660
|
|
1661
|
+
interface AutoplaceSettingsRead extends AutoplaceSettings {
|
1662
|
+
readonly settings: Record<string, AutoplaceControlRead>
|
1663
|
+
}
|
1664
|
+
|
1641
1665
|
interface CliffPlacementSettings {
|
1642
1666
|
/**
|
1643
1667
|
* Name of the cliff prototype.
|
@@ -1657,6 +1681,13 @@ interface CliffPlacementSettings {
|
|
1657
1681
|
readonly richness: MapGenSize
|
1658
1682
|
}
|
1659
1683
|
|
1684
|
+
interface CliffPlacementSettingsRead extends CliffPlacementSettings {
|
1685
|
+
/**
|
1686
|
+
* Corresponds to 'continuity' in the GUI. This value is not used directly, but is used by the 'cliffiness' noise expression, which in combination with elevation and the two cliff elevation properties drives cliff placement (cliffs are placed when elevation crosses the elevation contours defined by `cliff_elevation_0` and `cliff_elevation_interval` when 'cliffiness' is greater than `0.5`). The default 'cliffiness' expression interprets this value such that larger values result in longer unbroken walls of cliffs, and smaller values (between `0` and `1`) result in larger gaps in cliff walls.
|
1687
|
+
*/
|
1688
|
+
readonly richness: number
|
1689
|
+
}
|
1690
|
+
|
1660
1691
|
/**
|
1661
1692
|
* The 'map type' dropdown in the map generation GUI is actually a selector for elevation generator. The base game sets `property_expression_names.elevation` to `"0_16-elevation"` to reproduce terrain from 0.16 or to `"0_17-island"` for the island preset. If generators are available for other properties, the 'map type' dropdown in the GUI will be renamed to 'elevation' and shown along with selectors for the other selectable properties.
|
1662
1693
|
*
|
@@ -1750,6 +1781,30 @@ interface MapGenSettings {
|
|
1750
1781
|
}
|
1751
1782
|
|
1752
1783
|
interface MapGenSettingsRead extends MapGenSettings {
|
1784
|
+
/**
|
1785
|
+
* The inverse of 'water scale' in the map generator GUI. Lower `terrain_segmentation` increases the scale of elevation features (lakes, continents, etc). This behavior can be overridden with alternate elevation generators (see `property_expression_names`, below).
|
1786
|
+
*/
|
1787
|
+
readonly terrain_segmentation: number
|
1788
|
+
/**
|
1789
|
+
* The equivalent to 'water coverage' in the map generator GUI. Specifically, when this value is non-zero, `water_level = 10 * log2` (the value of this field), and the elevation generator subtracts water level from elevation before adding starting lakes. If water is set to 'none', elevation is clamped to a small positive value before adding starting lakes. This behavior can be overridden with alternate elevation generators (see `property_expression_names`, below).
|
1790
|
+
*/
|
1791
|
+
readonly water: number
|
1792
|
+
/**
|
1793
|
+
* Indexed by autoplace control prototype name.
|
1794
|
+
*/
|
1795
|
+
readonly autoplace_controls: Record<string, AutoplaceControlRead>
|
1796
|
+
/**
|
1797
|
+
* Each setting in this dictionary maps the string type to the settings for that type. Valid types are `"entity"`, `"tile"` and `"decorative"`.
|
1798
|
+
*/
|
1799
|
+
readonly autoplace_settings: Record<string, AutoplaceSettingsRead>
|
1800
|
+
/**
|
1801
|
+
* Map generation settings for entities of the type "cliff".
|
1802
|
+
*/
|
1803
|
+
readonly cliff_settings: CliffPlacementSettingsRead
|
1804
|
+
/**
|
1805
|
+
* Size of the starting area.
|
1806
|
+
*/
|
1807
|
+
readonly starting_area: number
|
1753
1808
|
/**
|
1754
1809
|
* Positions of the starting areas.
|
1755
1810
|
*/
|
@@ -1980,48 +2035,34 @@ interface ConstantCombinatorParameters {
|
|
1980
2035
|
}
|
1981
2036
|
|
1982
2037
|
/**
|
2038
|
+
* - `"="`: "equal to"
|
2039
|
+
*
|
2040
|
+
* - `">"`: "greater than"
|
2041
|
+
*
|
2042
|
+
* - `"<"`: "lesser than"
|
2043
|
+
*
|
2044
|
+
* - `"≥"`: "greater than or equal to"
|
2045
|
+
*
|
2046
|
+
* - `">="`: "greater than or equal to"
|
2047
|
+
*
|
2048
|
+
* - `"≤"`: "lesser than or equal to"
|
2049
|
+
*
|
2050
|
+
* - `"<="`: "lesser than or equal to"
|
1983
2051
|
*
|
2052
|
+
* - `"≠"`: "not equal to"
|
2053
|
+
*
|
2054
|
+
* - `"!="`: "not equal to"
|
2055
|
+
*
|
2056
|
+
* **Note**
|
2057
|
+
*
|
2058
|
+
* While the API accepts both versions for `"less/greater than or equal to"` and `"not equal"`, it'll always return `"≥"`, `"≤"` or `"≠"` respectively when reading them back.
|
1984
2059
|
*
|
1985
2060
|
* {@link https://lua-api.factorio.com/latest/Concepts.html#ComparatorString View documentation}
|
1986
|
-
* @remarks While the API accepts both versions for `"less/greater than or equal to"` and `"not equal"`, it'll always return `"≥"`, `"≤"` or `"≠"` respectively when reading them back.
|
1987
2061
|
*/
|
1988
|
-
type ComparatorString
|
1989
|
-
|
1990
|
-
|
1991
|
-
|
1992
|
-
| "="
|
1993
|
-
/**
|
1994
|
-
* "greater than"
|
1995
|
-
*/
|
1996
|
-
| ">"
|
1997
|
-
/**
|
1998
|
-
* "lesser than"
|
1999
|
-
*/
|
2000
|
-
| "<"
|
2001
|
-
/**
|
2002
|
-
* "greater than or equal to"
|
2003
|
-
*/
|
2004
|
-
| "\u2265"
|
2005
|
-
/**
|
2006
|
-
* "greater than or equal to"
|
2007
|
-
*/
|
2008
|
-
| ">="
|
2009
|
-
/**
|
2010
|
-
* "lesser than or equal to"
|
2011
|
-
*/
|
2012
|
-
| "\u2264"
|
2013
|
-
/**
|
2014
|
-
* "lesser than or equal to"
|
2015
|
-
*/
|
2016
|
-
| "<="
|
2017
|
-
/**
|
2018
|
-
* "not equal to"
|
2019
|
-
*/
|
2020
|
-
| "\u2260"
|
2021
|
-
/**
|
2022
|
-
* "not equal to"
|
2023
|
-
*/
|
2024
|
-
| "!="
|
2062
|
+
type ComparatorString = "=" | ">" | "<" | "≥" | ">=" | "≤" | "<=" | "≠" | "!="
|
2063
|
+
|
2064
|
+
/** @see ComparatorString */
|
2065
|
+
type ComparatorStringRead = "=" | ">" | "<" | "≥" | "≤" | "≠"
|
2025
2066
|
|
2026
2067
|
interface DeciderCombinatorParameters {
|
2027
2068
|
/**
|
@@ -2050,6 +2091,13 @@ interface DeciderCombinatorParameters {
|
|
2050
2091
|
readonly copy_count_from_input?: boolean
|
2051
2092
|
}
|
2052
2093
|
|
2094
|
+
interface DeciderCombinatorParametersRead extends DeciderCombinatorParameters {
|
2095
|
+
/**
|
2096
|
+
* Specifies how the inputs should be compared. If not specified, defaults to `"<"`.
|
2097
|
+
*/
|
2098
|
+
readonly comparator?: ComparatorStringRead
|
2099
|
+
}
|
2100
|
+
|
2053
2101
|
interface InserterCircuitConditions {
|
2054
2102
|
readonly circuit?: CircuitCondition
|
2055
2103
|
readonly logistics?: CircuitCondition
|
@@ -2074,6 +2122,13 @@ interface CircuitCondition {
|
|
2074
2122
|
readonly constant?: int
|
2075
2123
|
}
|
2076
2124
|
|
2125
|
+
interface CircuitConditionRead extends CircuitCondition {
|
2126
|
+
/**
|
2127
|
+
* Specifies how the inputs should be compared. If not specified, defaults to `"<"`.
|
2128
|
+
*/
|
2129
|
+
readonly comparator?: ComparatorStringRead
|
2130
|
+
}
|
2131
|
+
|
2077
2132
|
interface CircuitConditionDefinition {
|
2078
2133
|
readonly condition: CircuitCondition
|
2079
2134
|
/**
|
@@ -2082,6 +2137,10 @@ interface CircuitConditionDefinition {
|
|
2082
2137
|
readonly fulfilled?: boolean
|
2083
2138
|
}
|
2084
2139
|
|
2140
|
+
interface CircuitConditionDefinitionRead extends CircuitConditionDefinition {
|
2141
|
+
readonly condition: CircuitConditionRead
|
2142
|
+
}
|
2143
|
+
|
2085
2144
|
interface CircuitConnectionDefinition {
|
2086
2145
|
/**
|
2087
2146
|
* Wire color, either {@link defines.wire_type.red} or {@link defines.wire_type.green}.
|
@@ -2562,6 +2621,13 @@ interface WaitCondition {
|
|
2562
2621
|
readonly condition?: CircuitCondition
|
2563
2622
|
}
|
2564
2623
|
|
2624
|
+
interface WaitConditionRead extends WaitCondition {
|
2625
|
+
/**
|
2626
|
+
* Only present when `type` is `"item_count"`, `"circuit"` or `"fluid_count"`.
|
2627
|
+
*/
|
2628
|
+
readonly condition?: CircuitConditionRead
|
2629
|
+
}
|
2630
|
+
|
2565
2631
|
interface TrainScheduleRecord {
|
2566
2632
|
/**
|
2567
2633
|
* Name of the station.
|
@@ -2723,7 +2789,7 @@ type SpriteType =
|
|
2723
2789
|
| "utility"
|
2724
2790
|
|
2725
2791
|
/**
|
2726
|
-
* It is specified by {@link string}. It can be either the name of a {@
|
2792
|
+
* It is specified by {@link string}. It can be either the name of a {@linkplain https://wiki.factorio.com/Prototype/Sprite sprite prototype} defined in the data stage or a path in form "type/name".
|
2727
2793
|
*
|
2728
2794
|
* The validity of a SpritePath can be verified at runtime using {@link LuaGameScript#is_valid_sprite_path LuaGameScript::is_valid_sprite_path}.
|
2729
2795
|
*
|
@@ -2743,40 +2809,48 @@ type SpriteType =
|
|
2743
2809
|
*
|
2744
2810
|
* {@link https://lua-api.factorio.com/latest/Concepts.html#SpritePath View documentation}
|
2745
2811
|
*/
|
2746
|
-
type SpritePath =
|
2812
|
+
type SpritePath =
|
2813
|
+
| (string & {
|
2814
|
+
_?: never
|
2815
|
+
})
|
2816
|
+
| `${SpriteType}/${string}`
|
2747
2817
|
|
2748
2818
|
/**
|
2749
|
-
* A sound defined by a {@link string}. It can be either the name of a {@
|
2819
|
+
* A sound defined by a {@link string}. It can be either the name of a {@linkplain 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.
|
2750
2820
|
*
|
2751
2821
|
* The validity of a SoundPath can be verified at runtime using {@link LuaGameScript#is_valid_sound_path LuaGameScript::is_valid_sound_path}.
|
2752
2822
|
*
|
2753
2823
|
* The utility and ambient types each contain general use sound prototypes defined by the game itself.
|
2754
|
-
* - `"utility"` - Uses the {@
|
2755
|
-
* - `"ambient"` - Uses {@
|
2824
|
+
* - `"utility"` - Uses the {@linkplain https://wiki.factorio.com/Prototype/UtilitySounds UtilitySounds} prototype. Example: `"utility/wire_connect_pole"`
|
2825
|
+
* - `"ambient"` - Uses {@linkplain https://wiki.factorio.com/Prototype/AmbientSound AmbientSound} prototypes. Example: `"ambient/resource-deficiency"`
|
2756
2826
|
*
|
2757
2827
|
* The following types can be combined with any tile name as long as its prototype defines the
|
2758
2828
|
*
|
2759
2829
|
* corresponding sound.
|
2760
|
-
* - `"tile-walking"` - Uses {@
|
2761
|
-
* - `"tile-mined"` - Uses {@
|
2762
|
-
* - `"tile-build-small"` - Uses {@
|
2763
|
-
* - `"tile-build-medium"` - Uses {@
|
2764
|
-
* - `"tile-build-large"` - Uses {@
|
2830
|
+
* - `"tile-walking"` - Uses {@linkplain https://wiki.factorio.com/Prototype/Tile#walking_sound Tile::walking_sound}. Example: `"tile-walking/concrete"`
|
2831
|
+
* - `"tile-mined"` - Uses {@linkplain https://wiki.factorio.com/Prototype/Tile#mined_sound Tile::mined_sound}
|
2832
|
+
* - `"tile-build-small"` - Uses {@linkplain https://wiki.factorio.com/Prototype/Tile#build_sound Tile::build_sound}. Example: `"tile-build-small/concrete"`
|
2833
|
+
* - `"tile-build-medium"` - Uses {@linkplain https://wiki.factorio.com/Prototype/Tile#build_sound Tile::build_sound}
|
2834
|
+
* - `"tile-build-large"` - Uses {@linkplain https://wiki.factorio.com/Prototype/Tile#build_sound Tile::build_sound}
|
2765
2835
|
*
|
2766
2836
|
* The following types can be combined with any entity name as long as its prototype defines the
|
2767
2837
|
*
|
2768
2838
|
* corresponding sound.
|
2769
|
-
* - `"entity-build"` - Uses {@
|
2770
|
-
* - `"entity-mined"` - Uses {@
|
2771
|
-
* - `"entity-mining"` - Uses {@
|
2772
|
-
* - `"entity-vehicle_impact"` - Uses {@
|
2773
|
-
* - `"entity-rotated"` - Uses {@
|
2774
|
-
* - `"entity-open"` - Uses {@
|
2775
|
-
* - `"entity-close"` - Uses {@
|
2839
|
+
* - `"entity-build"` - Uses {@linkplain https://wiki.factorio.com/Prototype/Entity#build_sound Entity::build_sound}. Example: `"entity-build/wooden-chest"`
|
2840
|
+
* - `"entity-mined"` - Uses {@linkplain https://wiki.factorio.com/Prototype/Entity#mined_sound Entity::mined_sound}
|
2841
|
+
* - `"entity-mining"` - Uses {@linkplain https://wiki.factorio.com/Prototype/Entity#mining_sound Entity::mining_sound}
|
2842
|
+
* - `"entity-vehicle_impact"` - Uses {@linkplain https://wiki.factorio.com/Prototype/Entity#vehicle_impact_sound Entity::vehicle_impact_sound}
|
2843
|
+
* - `"entity-rotated"` - Uses {@linkplain https://wiki.factorio.com/Prototype/Entity#rotated_sound Entity::rotated_sound}
|
2844
|
+
* - `"entity-open"` - Uses {@linkplain https://wiki.factorio.com/Prototype/Entity#open_sound Entity::open_sound}
|
2845
|
+
* - `"entity-close"` - Uses {@linkplain https://wiki.factorio.com/Prototype/Entity#close_sound Entity::close_sound}
|
2776
2846
|
*
|
2777
2847
|
* {@link https://lua-api.factorio.com/latest/Concepts.html#SoundPath View documentation}
|
2778
2848
|
*/
|
2779
|
-
type SoundPath =
|
2849
|
+
type SoundPath =
|
2850
|
+
| (string & {
|
2851
|
+
_?: never
|
2852
|
+
})
|
2853
|
+
| `${SoundType}/${string}`
|
2780
2854
|
|
2781
2855
|
interface ModuleEffectValue {
|
2782
2856
|
/**
|
@@ -2808,8 +2882,11 @@ interface ModuleEffects {
|
|
2808
2882
|
/**
|
2809
2883
|
* This is a set of flags given as a dictionary[{@link string} → {@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.
|
2810
2884
|
*
|
2885
|
+
* **Note**
|
2886
|
+
*
|
2887
|
+
* By default, none of these flags are set.
|
2888
|
+
*
|
2811
2889
|
* {@link https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags View documentation}
|
2812
|
-
* @remarks By default, none of these flags are set.
|
2813
2890
|
*/
|
2814
2891
|
interface EntityPrototypeFlags {
|
2815
2892
|
/**
|
@@ -2914,8 +2991,11 @@ interface EntityPrototypeFlags {
|
|
2914
2991
|
/**
|
2915
2992
|
* This is a set of flags given as dictionary[{@link string} → {@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.
|
2916
2993
|
*
|
2994
|
+
* **Note**
|
2995
|
+
*
|
2996
|
+
* By default, none of these flags are set.
|
2997
|
+
*
|
2917
2998
|
* {@link https://lua-api.factorio.com/latest/Concepts.html#ItemPrototypeFlags View documentation}
|
2918
|
-
* @remarks By default, none of these flags are set.
|
2919
2999
|
*/
|
2920
3000
|
interface ItemPrototypeFlags {
|
2921
3001
|
/**
|
@@ -3000,7 +3080,7 @@ type CollisionMaskLayer =
|
|
3000
3080
|
| "rail-layer"
|
3001
3081
|
| "transport-belt-layer"
|
3002
3082
|
| "not-setup"
|
3003
|
-
| `layer-${
|
3083
|
+
| `layer-${bigint}`
|
3004
3084
|
|
3005
3085
|
/**
|
3006
3086
|
* This is a set of masks given as a dictionary[{@link CollisionMaskLayer} → {@link boolean}]. Only set masks are present in the dictionary and they have the value `true`. Unset flags aren't present at all.
|
@@ -3309,10 +3389,11 @@ interface LogisticFilter {
|
|
3309
3389
|
}
|
3310
3390
|
|
3311
3391
|
/**
|
3392
|
+
* **Note**
|
3312
3393
|
*
|
3394
|
+
* Runtime settings can be changed through console commands and by the mod that owns the settings by writing a new table to the ModSetting.
|
3313
3395
|
*
|
3314
3396
|
* {@link https://lua-api.factorio.com/latest/Concepts.html#ModSetting View documentation}
|
3315
|
-
* @remarks Runtime settings can be changed through console commands and by the mod that owns the settings by writing a new table to the ModSetting.
|
3316
3397
|
*/
|
3317
3398
|
interface ModSetting {
|
3318
3399
|
/**
|
@@ -3362,32 +3443,29 @@ interface ProgrammableSpeakerInstrument {
|
|
3362
3443
|
/**
|
3363
3444
|
* A {@link string} that specifies where a GUI element should be.
|
3364
3445
|
*
|
3446
|
+
* - `"left"`: The same as `"middle-left"`
|
3447
|
+
*
|
3448
|
+
* - `"center"`: The same as `"middle-center"`
|
3449
|
+
*
|
3450
|
+
* - `"right"`: The same as `"middle-right"`
|
3451
|
+
*
|
3365
3452
|
* {@link https://lua-api.factorio.com/latest/Concepts.html#Alignment View documentation}
|
3366
3453
|
*/
|
3367
3454
|
type Alignment =
|
3368
3455
|
| "top-left"
|
3369
3456
|
| "middle-left"
|
3370
|
-
/**
|
3371
|
-
* The same as `"middle-left"`
|
3372
|
-
*/
|
3373
3457
|
| "left"
|
3374
3458
|
| "bottom-left"
|
3375
3459
|
| "top-center"
|
3376
3460
|
| "middle-center"
|
3377
|
-
/**
|
3378
|
-
* The same as `"middle-center"`
|
3379
|
-
*/
|
3380
3461
|
| "center"
|
3381
3462
|
| "bottom-center"
|
3382
3463
|
| "top-right"
|
3383
|
-
/**
|
3384
|
-
* The same as `"middle-right"`
|
3385
|
-
*/
|
3386
3464
|
| "right"
|
3387
3465
|
| "bottom-right"
|
3388
3466
|
|
3389
3467
|
/**
|
3390
|
-
* Information about the event that has been raised. The table can also contain other fields depending on the type of event. See {@
|
3468
|
+
* Information about the event that has been raised. The table can also contain other fields depending on the type of event. See {@linkplain https://lua-api.factorio.com/latest/events.html the list of Factorio events} for more information on these.
|
3391
3469
|
*
|
3392
3470
|
* {@link https://lua-api.factorio.com/latest/Concepts.html#EventData View documentation}
|
3393
3471
|
*/
|
@@ -3530,69 +3608,53 @@ type MouseButtonFlagsArray = readonly (MouseButtonFlag | "left-and-right")[]
|
|
3530
3608
|
*/
|
3531
3609
|
type MouseButtonFlags = MouseButtonFlagsTable | MouseButtonFlagsArray
|
3532
3610
|
|
3533
|
-
type CursorBoxRenderType
|
3534
3611
|
/**
|
3535
|
-
* Yellow box.
|
3536
|
-
|
3612
|
+
* - `"entity"`: Yellow box.
|
3613
|
+
*
|
3614
|
+
* - `"not-allowed"`: Red box.
|
3615
|
+
*
|
3616
|
+
* - `"electricity"`: Light blue box.
|
3617
|
+
*
|
3618
|
+
* - `"pair"`: Light blue box.
|
3619
|
+
*
|
3620
|
+
* - `"copy"`: Green box.
|
3621
|
+
*
|
3622
|
+
* - `"train-visualization"`: White box.
|
3623
|
+
*
|
3624
|
+
* - `"logistics"`: Light blue box.
|
3625
|
+
*
|
3626
|
+
* - `"blueprint-snap-rectangle"`: Green box.
|
3627
|
+
*
|
3628
|
+
* {@link https://lua-api.factorio.com/latest/Concepts.html#CursorBoxRenderType View documentation}
|
3629
|
+
*/
|
3630
|
+
type CursorBoxRenderType =
|
3537
3631
|
| "entity"
|
3538
|
-
/**
|
3539
|
-
* Red box.
|
3540
|
-
*/
|
3541
3632
|
| "not-allowed"
|
3542
|
-
/**
|
3543
|
-
* Light blue box.
|
3544
|
-
*/
|
3545
3633
|
| "electricity"
|
3546
|
-
/**
|
3547
|
-
* Light blue box.
|
3548
|
-
*/
|
3549
3634
|
| "pair"
|
3550
|
-
/**
|
3551
|
-
* Green box.
|
3552
|
-
*/
|
3553
3635
|
| "copy"
|
3554
|
-
/**
|
3555
|
-
* White box.
|
3556
|
-
*/
|
3557
3636
|
| "train-visualization"
|
3558
|
-
/**
|
3559
|
-
* Light blue box.
|
3560
|
-
*/
|
3561
3637
|
| "logistics"
|
3562
|
-
/**
|
3563
|
-
* Green box.
|
3564
|
-
*/
|
3565
3638
|
| "blueprint-snap-rectangle"
|
3566
3639
|
|
3567
|
-
type ForceCondition
|
3568
3640
|
/**
|
3569
|
-
* All forces pass.
|
3570
|
-
|
3571
|
-
|
3572
|
-
|
3573
|
-
|
3574
|
-
|
3575
|
-
|
3576
|
-
|
3577
|
-
|
3578
|
-
|
3579
|
-
|
3580
|
-
|
3581
|
-
|
3582
|
-
|
3583
|
-
|
3584
|
-
|
3585
|
-
|
3586
|
-
*/
|
3587
|
-
| "not-friend"
|
3588
|
-
/**
|
3589
|
-
* The same force pass.
|
3590
|
-
*/
|
3591
|
-
| "same"
|
3592
|
-
/**
|
3593
|
-
* The non-same forces pass.
|
3594
|
-
*/
|
3595
|
-
| "not-same"
|
3641
|
+
* - `"all"`: All forces pass.
|
3642
|
+
*
|
3643
|
+
* - `"enemy"`: Forces which will attack pass.
|
3644
|
+
*
|
3645
|
+
* - `"ally"`: Forces which won't attack pass.
|
3646
|
+
*
|
3647
|
+
* - `"friend"`: Forces which are friends pass.
|
3648
|
+
*
|
3649
|
+
* - `"not-friend"`: Forces which are not friends pass.
|
3650
|
+
*
|
3651
|
+
* - `"same"`: The same force pass.
|
3652
|
+
*
|
3653
|
+
* - `"not-same"`: The non-same forces pass.
|
3654
|
+
*
|
3655
|
+
* {@link https://lua-api.factorio.com/latest/Concepts.html#ForceCondition View documentation}
|
3656
|
+
*/
|
3657
|
+
type ForceCondition = "all" | "enemy" | "ally" | "friend" | "not-friend" | "same" | "not-same"
|
3596
3658
|
|
3597
3659
|
/**
|
3598
3660
|
* A value between 0 and 255 inclusive represented by one of the following named {@link string} or string version of the value (for example `"27"` and `"decals"` are both valid). Higher values are rendered on top of lower values.
|
@@ -3645,7 +3707,7 @@ type ForceCondition
|
|
3645
3707
|
*/
|
3646
3708
|
type RenderLayer =
|
3647
3709
|
| number
|
3648
|
-
| `${
|
3710
|
+
| `${bigint}`
|
3649
3711
|
| "water-tile"
|
3650
3712
|
| "ground-tile"
|
3651
3713
|
| "tile-transition"
|
@@ -3742,8 +3804,11 @@ type SoundType = "game-effect" | "gui-effect" | "ambient" | "environment" | "wal
|
|
3742
3804
|
* - {@link EquipmentPrototypeFilter} for type `"equipment"`
|
3743
3805
|
* - {@link TechnologyPrototypeFilter} for type `"technology"`
|
3744
3806
|
*
|
3807
|
+
* **Note**
|
3808
|
+
*
|
3809
|
+
* 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.
|
3810
|
+
*
|
3745
3811
|
* {@link https://lua-api.factorio.com/latest/Concepts.html#PrototypeFilter View documentation}
|
3746
|
-
* @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.
|
3747
3812
|
*/
|
3748
3813
|
type PrototypeFilter =
|
3749
3814
|
| ItemPrototypeFilter
|
package/generated/defines.d.ts
CHANGED
@@ -643,7 +643,7 @@ declare namespace defines {
|
|
643
643
|
cant_divide_segments,
|
644
644
|
}
|
645
645
|
/**
|
646
|
-
* See the {@
|
646
|
+
* See the {@linkplain https://lua-api.factorio.com/latest/events.html events page} for more info on what events contain and when they get raised.
|
647
647
|
*
|
648
648
|
* {@link https://lua-api.factorio.com/latest/defines.html#defines.events View documentation}
|
649
649
|
*/
|
@@ -1396,7 +1396,7 @@ declare namespace defines {
|
|
1396
1396
|
const on_player_reverse_selected_area: EventId<OnPlayerReverseSelectedAreaEvent>
|
1397
1397
|
}
|
1398
1398
|
/**
|
1399
|
-
* See the {@
|
1399
|
+
* See the {@linkplain https://lua-api.factorio.com/latest/events.html events page} for more info on what events contain and when they get raised.
|
1400
1400
|
*
|
1401
1401
|
* {@link https://lua-api.factorio.com/latest/defines.html#defines.events View documentation}
|
1402
1402
|
*/
|