factorio-types 1.2.56 → 1.2.58
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 +88 -47
- package/dist/concepts.d.ts +497 -31
- package/dist/datacollection.d.ts +1 -1
- package/dist/defines.d.ts +5 -5
- package/dist/events.d.ts +443 -443
- package/dist/global.d.ts +1 -1
- package/dist/prototypes.d.ts +263 -17
- package/dist/types.d.ts +78 -29
- package/package.json +2 -2
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.0.
|
|
5
|
+
// Factorio version 2.0.77
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -1372,6 +1372,10 @@ WallPrototype;
|
|
|
1372
1372
|
interface ApplyStarterPackTipTrigger extends CountBasedTipTrigger {
|
|
1373
1373
|
type: 'apply-starter-pack';
|
|
1374
1374
|
}
|
|
1375
|
+
/**
|
|
1376
|
+
* Refers to tints defined in {@link TilePrototype::particle_tints | prototype:TilePrototype::particle_tints}.
|
|
1377
|
+
*/
|
|
1378
|
+
type ApplyTileTint = 'primary' | 'secondary';
|
|
1375
1379
|
interface AreaTriggerItem extends TriggerItem {
|
|
1376
1380
|
collision_mode?: 'distance-from-collision-box' | 'distance-from-center';
|
|
1377
1381
|
radius: double;
|
|
@@ -2386,7 +2390,7 @@ interface CharacterArmorAnimation {
|
|
|
2386
2390
|
/**
|
|
2387
2391
|
* List of positions in the mining with tool animation when the mining sound and mining particles are created.
|
|
2388
2392
|
*
|
|
2389
|
-
* Overrides {@link CharacterPrototype::mining_with_tool_particles_animation_positions | prototype:CharacterPrototype::mining_with_tool_particles_animation_positions} if defined
|
|
2393
|
+
* Overrides {@link CharacterPrototype::mining_with_tool_particles_animation_positions | prototype:CharacterPrototype::mining_with_tool_particles_animation_positions} if defined.
|
|
2390
2394
|
*/
|
|
2391
2395
|
mining_with_tool_particles_animation_positions?: float[];
|
|
2392
2396
|
running?: RotatedAnimation;
|
|
@@ -3359,7 +3363,7 @@ interface CreateGhostOnEntityDeathModifier extends BoolModifier {
|
|
|
3359
3363
|
use_icon_overlay_constant?: boolean;
|
|
3360
3364
|
}
|
|
3361
3365
|
interface CreateParticleTriggerEffectItemBase extends TriggerEffectItem {
|
|
3362
|
-
apply_tile_tint?:
|
|
3366
|
+
apply_tile_tint?: ApplyTileTint;
|
|
3363
3367
|
frame_speed?: float;
|
|
3364
3368
|
frame_speed_deviation?: float;
|
|
3365
3369
|
initial_height: float;
|
|
@@ -3917,7 +3921,7 @@ interface ElectricEnergySource extends BaseEnergySource {
|
|
|
3917
3921
|
*/
|
|
3918
3922
|
buffer_capacity?: Energy;
|
|
3919
3923
|
/**
|
|
3920
|
-
* How much energy (per second) will be continuously removed from the energy buffer. In-game, this is shown in the tooltip as "Min. [Minimum] Consumption". Applied as a constant consumption-per-tick, even when the entity
|
|
3924
|
+
* How much energy (per second) will be continuously removed from the energy buffer. In-game, this is shown in the tooltip as "Min. [Minimum] Consumption". Applied as a constant consumption-per-tick, even when the entity is not {@link active | runtime:LuaEntity::active}.
|
|
3921
3925
|
* @example ```
|
|
3922
3926
|
drain = "1kW"
|
|
3923
3927
|
```
|
|
@@ -4163,6 +4167,9 @@ interface EnemyExpansionSettings {
|
|
|
4163
4167
|
* A chunk has to have at most this much percent unbuildable tiles for it to be considered a candidate. This is to avoid chunks full of water to be marked as candidates.
|
|
4164
4168
|
*/
|
|
4165
4169
|
max_colliding_tiles_coefficient: double;
|
|
4170
|
+
/**
|
|
4171
|
+
* In ticks.
|
|
4172
|
+
*/
|
|
4166
4173
|
max_expansion_cooldown: uint32;
|
|
4167
4174
|
/**
|
|
4168
4175
|
* Distance in chunks from the furthest base around. This prevents expansions from reaching too far into the player's territory.
|
|
@@ -6802,6 +6809,8 @@ interface NestedTriggerEffectItem extends TriggerEffectItem {
|
|
|
6802
6809
|
*
|
|
6803
6810
|
* All functions accept both named and positional arguments. To differentiate between these function calls, positional arguments start/end with `(`/`)` and named arguments with `{`/`}`, e.g. `clamp(x, -1, 1)` and `clamp{min = -1, max = 1, value = x}` are the same function call. Because of this, positional arguments can't be mixed with named arguments. A function can't have more than 255 parameters.
|
|
6804
6811
|
*
|
|
6812
|
+
* Recursion is not supported.
|
|
6813
|
+
*
|
|
6805
6814
|
* The following operators are available, ordered by precedence:
|
|
6806
6815
|
*
|
|
6807
6816
|
* - `x^y`: Exponentiation (fast, inaccurate), equivalent to the built-in `pow(x, y)` noise function
|
|
@@ -6911,6 +6920,44 @@ interface OrTipTrigger {
|
|
|
6911
6920
|
* The order property is a simple `string`. When the game needs to sort prototypes (of the same type), it looks at their order properties and sorts those alphabetically. A prototype with an order string of `"a"` will be listed before other prototypes with order string `"b"` or `"c"`. The `"-"` or `"[]"` structures that can be found in vanilla order strings do *not* have any special meaning.
|
|
6912
6921
|
*
|
|
6913
6922
|
* The alphabetical sorting uses {@link lexicographical comparison | https://en.wikipedia.org/wiki/Lexicographic_order} to determine if a given prototype is shown before or after another. If the order strings are equal then the game falls back to comparing the prototype names to determine order.
|
|
6923
|
+
*
|
|
6924
|
+
* The order of special characters can be identified by looking at a UTF-8 character list. This is the order some common characters are sorted in:
|
|
6925
|
+
*
|
|
6926
|
+
* - "-"
|
|
6927
|
+
*
|
|
6928
|
+
* - "0"
|
|
6929
|
+
*
|
|
6930
|
+
* - "9"
|
|
6931
|
+
*
|
|
6932
|
+
* - "A"
|
|
6933
|
+
*
|
|
6934
|
+
* - "Z"
|
|
6935
|
+
*
|
|
6936
|
+
* - "["
|
|
6937
|
+
*
|
|
6938
|
+
* - "]"
|
|
6939
|
+
*
|
|
6940
|
+
* - "a"
|
|
6941
|
+
*
|
|
6942
|
+
* - "z"
|
|
6943
|
+
*
|
|
6944
|
+
* The following order strings would be ordered thusly then:
|
|
6945
|
+
*
|
|
6946
|
+
* - "-"
|
|
6947
|
+
*
|
|
6948
|
+
* - "a"
|
|
6949
|
+
*
|
|
6950
|
+
* - "ab"
|
|
6951
|
+
*
|
|
6952
|
+
* - "azaaa" (`b` is sorted before `z`, so "ab" comes before "az", regardless of the letters following it)
|
|
6953
|
+
*
|
|
6954
|
+
* - "b"
|
|
6955
|
+
*
|
|
6956
|
+
* - "b-zzz"
|
|
6957
|
+
*
|
|
6958
|
+
* - "b[aaa]" (`[` is sorted after `-` in UTF-8)
|
|
6959
|
+
*
|
|
6960
|
+
* - "bb" (`b` is sorted after `[` in UTF-8)
|
|
6914
6961
|
* @example ```
|
|
6915
6962
|
{ -- This item will be shown after the below one
|
|
6916
6963
|
type = "item",
|
|
@@ -6922,28 +6969,6 @@ interface OrTipTrigger {
|
|
|
6922
6969
|
name = "item-2",
|
|
6923
6970
|
order = "ab",
|
|
6924
6971
|
}
|
|
6925
|
-
```
|
|
6926
|
-
* @example ```
|
|
6927
|
-
-- The order of special characters can be identified by looking at a UTF-8 character list.
|
|
6928
|
-
-- This is the order some common characters are sorted in:
|
|
6929
|
-
"-"
|
|
6930
|
-
"0"
|
|
6931
|
-
"9"
|
|
6932
|
-
"A"
|
|
6933
|
-
"Z"
|
|
6934
|
-
"["
|
|
6935
|
-
"]"
|
|
6936
|
-
"a"
|
|
6937
|
-
"z"
|
|
6938
|
-
-- The following order strings would be ordered thusly then:
|
|
6939
|
-
"a"
|
|
6940
|
-
"ab"
|
|
6941
|
-
"azaaa" -- "b" is sorted before "z", so "ab" comes before "az", regardless of the letters following it
|
|
6942
|
-
"b"
|
|
6943
|
-
"b-zzz"
|
|
6944
|
-
"b[aaa]" -- "[" is sorted after "-" in UTF-8
|
|
6945
|
-
"bb" -- "b" is sorted after "[" in UTF-8
|
|
6946
|
-
]
|
|
6947
6972
|
```
|
|
6948
6973
|
*/
|
|
6949
6974
|
type Order = string;
|
|
@@ -8112,15 +8137,39 @@ interface RadioButtonStyleSpecification extends StyleWithClickableGraphicalSetSp
|
|
|
8112
8137
|
}
|
|
8113
8138
|
/**
|
|
8114
8139
|
* Sprite to be shown around the entity when it is selected/held in the cursor.
|
|
8140
|
+
* @example ```
|
|
8141
|
+
radius_visualisation_specification =
|
|
8142
|
+
{
|
|
8143
|
+
sprite =
|
|
8144
|
+
{
|
|
8145
|
+
filename = "__base__/graphics/entity/electric-mining-drill/electric-mining-drill-radius-visualization.png",
|
|
8146
|
+
size = 10
|
|
8147
|
+
},
|
|
8148
|
+
distance = 5,
|
|
8149
|
+
offset = {0, -5}
|
|
8150
|
+
}
|
|
8151
|
+
```
|
|
8115
8152
|
*/
|
|
8116
8153
|
interface RadiusVisualisationSpecification {
|
|
8117
8154
|
/**
|
|
8118
8155
|
* Must be greater than or equal to 0.
|
|
8156
|
+
*
|
|
8157
|
+
* This distance is silently overwritten by prototypes with a custom distance: {@link AgriculturalTowerPrototype::radius | prototype:AgriculturalTowerPrototype::radius}, {@link AsteroidCollectorPrototype::collection_radius | prototype:AsteroidCollectorPrototype::collection_radius}, {@link BeaconPrototype::supply_area_distance | prototype:BeaconPrototype::supply_area_distance}, {@link ElectricPolePrototype::supply_area_distance | prototype:ElectricPolePrototype::supply_area_distance}, {@link MiningDrillPrototype::resource_searching_radius | prototype:MiningDrillPrototype::resource_searching_radius}.
|
|
8119
8158
|
*/
|
|
8120
8159
|
distance?: double;
|
|
8121
8160
|
draw_in_cursor?: boolean;
|
|
8122
8161
|
draw_on_selection?: boolean;
|
|
8162
|
+
/**
|
|
8163
|
+
* Offset of the sprite from the position of the entity. The offset is rotated by the entity's current direction.
|
|
8164
|
+
*
|
|
8165
|
+
* This offset is silently overwritten by prototypes with a custom offset: {@link MiningDrillPrototype::resource_searching_offset | prototype:MiningDrillPrototype::resource_searching_offset}.
|
|
8166
|
+
*/
|
|
8123
8167
|
offset?: Vector;
|
|
8168
|
+
/**
|
|
8169
|
+
* The sprite to show.
|
|
8170
|
+
*
|
|
8171
|
+
* This sprite is silently overwritten by prototypes with a custom radius picture: {@link AgriculturalTowerPrototype::radius_visualisation_picture | prototype:AgriculturalTowerPrototype::radius_visualisation_picture}, {@link AsteroidCollectorPrototype::radius_visualisation_picture | prototype:AsteroidCollectorPrototype::radius_visualisation_picture}, {@link BeaconPrototype::radius_visualisation_picture | prototype:BeaconPrototype::radius_visualisation_picture}, {@link ElectricPolePrototype::radius_visualisation_picture | prototype:ElectricPolePrototype::radius_visualisation_picture}, {@link MiningDrillPrototype::radius_visualisation_picture | prototype:MiningDrillPrototype::radius_visualisation_picture}.
|
|
8172
|
+
*/
|
|
8124
8173
|
sprite?: Sprite;
|
|
8125
8174
|
}
|
|
8126
8175
|
interface RailFenceDirectionSet {
|
|
@@ -10036,7 +10085,7 @@ interface SpriteSource {
|
|
|
10036
10085
|
/**
|
|
10037
10086
|
* Mandatory if `size` is not defined.
|
|
10038
10087
|
*
|
|
10039
|
-
* Height of the
|
|
10088
|
+
* Height of the sprite in pixels, from 0-4096.
|
|
10040
10089
|
*/
|
|
10041
10090
|
height?: SpriteSizeType;
|
|
10042
10091
|
/**
|
|
@@ -10064,7 +10113,7 @@ interface SpriteSource {
|
|
|
10064
10113
|
/**
|
|
10065
10114
|
* Mandatory if `size` is not defined.
|
|
10066
10115
|
*
|
|
10067
|
-
* Width of the
|
|
10116
|
+
* Width of the sprite in pixels, from 0-4096.
|
|
10068
10117
|
*/
|
|
10069
10118
|
width?: SpriteSizeType;
|
|
10070
10119
|
/**
|
|
@@ -11793,7 +11842,7 @@ DelayedTriggerDelivery;
|
|
|
11793
11842
|
*/
|
|
11794
11843
|
interface TriggerDeliveryItem {
|
|
11795
11844
|
/**
|
|
11796
|
-
* Provides the source of the TriggerDelivery as
|
|
11845
|
+
* Provides the source of the TriggerDelivery as both the source and target of the effect.
|
|
11797
11846
|
*/
|
|
11798
11847
|
source_effects?: TriggerEffect;
|
|
11799
11848
|
target_effects?: TriggerEffect;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "factorio-types",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.58",
|
|
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.0.
|
|
26
|
+
"factorioVersion": "2.0.77",
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"lua-types": "^2.13.1"
|
|
29
29
|
},
|