factorio-types 0.0.13 → 0.0.17
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 +310 -293
- package/dist/concepts.d.ts +25 -17
- package/dist/defines.d.ts +1 -1
- package/dist/events.d.ts +4 -1
- package/dist/global.d.ts +1 -1
- package/package.json +1 -1
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 1.1.
|
|
5
|
+
// Factorio version 1.1.47
|
|
6
6
|
// API version 1
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -1093,7 +1093,7 @@ type EntityPrototypeFlags = {
|
|
|
1093
1093
|
[key in EntityPrototypeFlagsKey]: true
|
|
1094
1094
|
}
|
|
1095
1095
|
|
|
1096
|
-
type EntityPrototypeFlagsKey = 'breaths-air' | 'building-direction-8-way' | 'fast-replaceable-no-build-while-moving' | 'fast-replaceable-no-cross-type-while-moving' | 'filter-directions' | 'hidden' | 'hide-alt-info' | 'no-automated-item-insertion' | 'no-automated-item-removal' | 'no-copy-paste' | 'no-gap-fill-while-building' | 'not-blueprintable' | 'not-deconstructable' | 'not-flammable' | 'not-on-map' | 'not-repairable' | 'not-rotatable' | 'not-selectable-in-game' | 'not-upgradable' | 'placeable-enemy' | 'placeable-neutral' | 'placeable-off-grid' | 'placeable-player' | 'player-creation'
|
|
1096
|
+
type EntityPrototypeFlagsKey = 'breaths-air' | 'building-direction-8-way' | 'fast-replaceable-no-build-while-moving' | 'fast-replaceable-no-cross-type-while-moving' | 'filter-directions' | 'hidden' | 'hide-alt-info' | 'no-automated-item-insertion' | 'no-automated-item-removal' | 'no-copy-paste' | 'no-gap-fill-while-building' | 'not-blueprintable' | 'not-deconstructable' | 'not-flammable' | 'not-in-kill-statistics' | 'not-on-map' | 'not-repairable' | 'not-rotatable' | 'not-selectable-in-game' | 'not-upgradable' | 'placeable-enemy' | 'placeable-neutral' | 'placeable-off-grid' | 'placeable-player' | 'player-creation'
|
|
1097
1097
|
|
|
1098
1098
|
/**
|
|
1099
1099
|
* @remarks
|
|
@@ -1540,7 +1540,7 @@ type ItemPrototypeFlags = {
|
|
|
1540
1540
|
[key in ItemPrototypeFlagsKey]: true
|
|
1541
1541
|
}
|
|
1542
1542
|
|
|
1543
|
-
type ItemPrototypeFlagsKey = 'always-show' | 'can-extend-inventory' | 'draw-logistic-overlay' | 'hidden' | 'hide-from-bonus-gui' | 'hide-from-fuel-tooltip' | 'mod-openable' | 'not-stackable' | 'only-in-cursor' | 'primary-place-result'
|
|
1543
|
+
type ItemPrototypeFlagsKey = 'always-show' | 'can-extend-inventory' | 'draw-logistic-overlay' | 'hidden' | 'hide-from-bonus-gui' | 'hide-from-fuel-tooltip' | 'mod-openable' | 'not-stackable' | 'only-in-cursor' | 'primary-place-result' | 'spawnable'
|
|
1544
1544
|
|
|
1545
1545
|
/**
|
|
1546
1546
|
* @remarks
|
|
@@ -1601,9 +1601,9 @@ interface ItemStackLocation {
|
|
|
1601
1601
|
* Localised strings are a way to support translation of in-game text. It is an array where the first element is the key and the remaining elements are parameters that will be substituted for placeholders in the template designated by the key.
|
|
1602
1602
|
* The key identifies the string template. For example, `"gui-alert-tooltip.attack"` (for the template `"__1__
|
|
1603
1603
|
* objects are being damaged"`; see the file `data/core/locale/en.cfg`).
|
|
1604
|
-
* The template can contain placeholders such as `__1__` or `__2__`. These will be replaced by the respective parameter in the LocalisedString. The parameters themselves can be other localised strings, which will be processed recursively in the same fashion. Localised strings
|
|
1604
|
+
* The template can contain placeholders such as `__1__` or `__2__`. These will be replaced by the respective parameter in the LocalisedString. The parameters themselves can be other localised strings, which will be processed recursively in the same fashion. Localised strings can not be recursed deeper than 20 levels and can not have more than 20 parameters.
|
|
1605
1605
|
* 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.
|
|
1606
|
-
* 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,
|
|
1606
|
+
* 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.
|
|
1607
1607
|
* @example
|
|
1608
1608
|
* In the English translation, this will print `"No ammo"`; in the Czech translation, it will print `"Bez munice"`:
|
|
1609
1609
|
* ```
|
|
@@ -1651,6 +1651,18 @@ interface LogisticFilter {
|
|
|
1651
1651
|
'name': string
|
|
1652
1652
|
}
|
|
1653
1653
|
|
|
1654
|
+
/**
|
|
1655
|
+
* @param name - The item. `nil` clears the filter.
|
|
1656
|
+
*/
|
|
1657
|
+
interface LogisticParameters {
|
|
1658
|
+
'max'?: number
|
|
1659
|
+
'min'?: number
|
|
1660
|
+
/**
|
|
1661
|
+
* The item. `nil` clears the filter.
|
|
1662
|
+
*/
|
|
1663
|
+
'name'?: string
|
|
1664
|
+
}
|
|
1665
|
+
|
|
1654
1666
|
/**
|
|
1655
1667
|
* @param count_max - Maximum amount of loot to drop.
|
|
1656
1668
|
* @param count_min - Minimum amount of loot to drop.
|
|
@@ -2405,18 +2417,6 @@ interface PathfinderWaypoint {
|
|
|
2405
2417
|
'position': Position
|
|
2406
2418
|
}
|
|
2407
2419
|
|
|
2408
|
-
/**
|
|
2409
|
-
* @param name - The item. `nil` clears the filter.
|
|
2410
|
-
*/
|
|
2411
|
-
interface PersonalLogisticParameters {
|
|
2412
|
-
'max'?: number
|
|
2413
|
-
'min'?: number
|
|
2414
|
-
/**
|
|
2415
|
-
* The item. `nil` clears the filter.
|
|
2416
|
-
*/
|
|
2417
|
-
'name'?: string
|
|
2418
|
-
}
|
|
2419
|
-
|
|
2420
2420
|
/**
|
|
2421
2421
|
* @param result - The tile prototype.
|
|
2422
2422
|
*/
|
|
@@ -2849,6 +2849,9 @@ interface SmokeSource {
|
|
|
2849
2849
|
*/
|
|
2850
2850
|
type SoundPath = string
|
|
2851
2851
|
|
|
2852
|
+
/**
|
|
2853
|
+
* Defines which slider in the game's sound settings affects the volume of this sound. Furthermore, some sound types are mixed differently than others, e.g. zoom level effects are applied.
|
|
2854
|
+
*/
|
|
2852
2855
|
declare enum SoundType {
|
|
2853
2856
|
'alert',
|
|
2854
2857
|
'ambient',
|
|
@@ -3012,6 +3015,7 @@ interface TrainSchedule {
|
|
|
3012
3015
|
|
|
3013
3016
|
/**
|
|
3014
3017
|
* @param rail - Rail to path to. Ignored if `station` is present.
|
|
3018
|
+
* @param rail_direction - When a train is allowed to reach rail target from any direction it will be `nil`. If rail has to be reached from specific direction, this value allows to choose the direction. This value corresponds to [LuaEntity::connected_rail_direction](LuaEntity::connected_rail_direction) of a TrainStop.
|
|
3015
3019
|
* @param station - Name of the station.
|
|
3016
3020
|
* @param temporary - Only present when the station is temporary, the value is then always `true`.
|
|
3017
3021
|
*/
|
|
@@ -3020,6 +3024,10 @@ interface TrainScheduleRecord {
|
|
|
3020
3024
|
* Rail to path to. Ignored if `station` is present.
|
|
3021
3025
|
*/
|
|
3022
3026
|
'rail'?: LuaEntity
|
|
3027
|
+
/**
|
|
3028
|
+
* When a train is allowed to reach rail target from any direction it will be `nil`. If rail has to be reached from specific direction, this value allows to choose the direction. This value corresponds to {@link LuaEntity::connected_rail_direction | LuaEntity::connected_rail_direction} of a TrainStop.
|
|
3029
|
+
*/
|
|
3030
|
+
'rail_direction'?: defines.rail_direction
|
|
3023
3031
|
/**
|
|
3024
3032
|
* Name of the station.
|
|
3025
3033
|
*/
|
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 1.1.
|
|
5
|
+
// Factorio version 1.1.47
|
|
6
6
|
// API version 1
|
|
7
7
|
|
|
8
8
|
declare namespace defines {
|
package/dist/events.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Factorio API reference https://lua-api.factorio.com/latest/index.html
|
|
3
3
|
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version 1.1.
|
|
5
|
+
// Factorio version 1.1.47
|
|
6
6
|
// API version 1
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -541,6 +541,9 @@ interface on_forces_merging extends event {
|
|
|
541
541
|
}
|
|
542
542
|
/**
|
|
543
543
|
* Called when a game is created from a scenario. This is fired for every mod, even when the scenario's save data already includes it. In those cases however, {@link LuaBootstrap::on_init | LuaBootstrap::on_init} is not fired.
|
|
544
|
+
* @remarks
|
|
545
|
+
* This event is not fired when the scenario is loaded via the map editor.
|
|
546
|
+
*
|
|
544
547
|
*/
|
|
545
548
|
interface on_game_created_from_scenario extends event {
|
|
546
549
|
}
|
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 1.1.
|
|
5
|
+
// Factorio version 1.1.47
|
|
6
6
|
// API version 1
|
|
7
7
|
|
|
8
8
|
/**
|