Skip to content

Commit fe5d2d6

Browse files
committed
Factorio API version 2.0.57
1 parent b9d8f3d commit fe5d2d6

File tree

9 files changed

+867
-326
lines changed

9 files changed

+867
-326
lines changed

dist/classes.d.ts

Lines changed: 272 additions & 14 deletions
Large diffs are not rendered by default.

dist/concepts.d.ts

Lines changed: 82 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Factorio API reference https://lua-api.factorio.com/latest/index.html
33
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
44
// Definition source https://github.com/sguest/factorio-types
5-
// Factorio version 2.0.55
5+
// Factorio version 2.0.57
66
// API version 6
77

88
declare namespace runtime {
@@ -105,6 +105,10 @@ interface AmmoType {
105105
range_modifier?: double;
106106
cooldown_modifier?: double;
107107
consumption_modifier?: float;
108+
/**
109+
* The entity prototype filter names.
110+
*/
111+
target_filter?: string[];
108112
}
109113
/**
110114
* Any basic type (string, number, boolean), table, or LuaObject.
@@ -287,6 +291,12 @@ interface AttackParametersStream extends BaseAttackParameters {
287291
'gun_center_shift': GunShift4Way;
288292
'projectile_creation_parameters'?: CircularProjectileCreationSpecification;
289293
}
294+
interface AttackReactionItem {
295+
range: float;
296+
action?: TriggerItem;
297+
reaction_modifier: float;
298+
damage_type?: LuaDamagePrototype;
299+
}
290300
interface AutoplaceControl {
291301
/**
292302
* 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'. When the {@link LuaAutoplaceControlPrototype | runtime:LuaAutoplaceControlPrototype} is of the category `"terrain"`, then scale is shown in the map generator GUI instead of frequency.
@@ -1220,9 +1230,9 @@ interface DeciderCombinatorCondition {
12201230
*/
12211231
comparator?: ComparatorString;
12221232
/**
1223-
* Either "or" (default) or "and". Tells how this condition is compared with the preceding conditions in the corresponding `conditions` array.
1233+
* Tells how this condition is compared with the preceding conditions in the corresponding `conditions` array. Defaults to `"or"`.
12241234
*/
1225-
compare_type?: int;
1235+
compare_type?: 'and' | 'or';
12261236
}
12271237
interface DeciderCombinatorOutput {
12281238
/**
@@ -1936,6 +1946,10 @@ interface EventData {
19361946
* 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.
19371947
*/
19381948
type EventFilter = (LuaScriptRaisedTeleportedEventFilter | LuaPreRobotMinedEntityEventFilter | LuaScriptRaisedBuiltEventFilter | LuaPlatformMinedEntityEventFilter | LuaRobotBuiltEntityEventFilter | LuaPrePlayerMinedEntityEventFilter | LuaEntityDeconstructionCancelledEventFilter | LuaPreGhostUpgradedEventFilter | LuaPlatformBuiltEntityEventFilter | LuaPrePlatformMinedEntityEventFilter | LuaEntityClonedEventFilter | LuaPlayerRepairedEntityEventFilter | LuaPostEntityDiedEventFilter | LuaPreGhostDeconstructedEventFilter | LuaPlayerMinedEntityEventFilter | LuaSectorScannedEventFilter | LuaRobotMinedEntityEventFilter | LuaEntityMarkedForDeconstructionEventFilter | LuaScriptRaisedReviveEventFilter | LuaPlayerBuiltEntityEventFilter | LuaUpgradeCancelledEventFilter | LuaEntityDamagedEventFilter | LuaEntityDiedEventFilter | LuaEntityMarkedForUpgradeEventFilter | LuaScriptRaisedDestroyEventFilter)[];
1949+
interface ExplosionDefinition {
1950+
name: LuaEntityPrototype;
1951+
offset: Vector;
1952+
}
19391953
type FactoriopediaID = LuaItemPrototype | LuaFluidPrototype | LuaRecipePrototype | LuaEntityPrototype | LuaTilePrototype | LuaSpaceLocationPrototype | /**
19401954
* Does not actually have an entry in Factoriopedia.
19411955
*/
@@ -2328,6 +2342,10 @@ interface GuiAnchor {
23282342
* If provided, only anchors the GUI element when the opened thing matches one of the names. When reading an anchor, `names` is always populated.
23292343
*/
23302344
names?: string[];
2345+
/**
2346+
* One of `'both'`, `'only_ghosts'`, or `'only_real'`
2347+
*/
2348+
ghost_mode?: string;
23312349
}
23322350
/**
23332351
* Used for specifying where a GUI arrow should point to.
@@ -2529,21 +2547,25 @@ interface HeatSetting {
25292547
*/
25302548
interface InfinityInventoryFilter {
25312549
/**
2532-
* Name of the item.
2550+
* Name of the item. When reading a filter, this is a string.
25332551
*/
2534-
name: string;
2552+
name: ItemID;
25352553
/**
2536-
* The count of the filter.
2554+
* Quality of the item. Defaults to `"normal"`. When reading a filter, this is a string.
25372555
*/
2538-
count?: uint;
2556+
quality?: QualityID;
2557+
/**
2558+
* The count of the filter. Defaults to 0.
2559+
*/
2560+
count?: ItemCountType;
25392561
/**
25402562
* Defaults to `"at-least"`.
25412563
*/
25422564
mode?: 'at-least' | 'at-most' | 'exactly';
25432565
/**
25442566
* The index of this filter in the filters list. Not required when writing a filter.
25452567
*/
2546-
index: uint;
2568+
index?: uint;
25472569
}
25482570
/**
25492571
* A single filter used by an infinity-pipe type entity.
@@ -2646,6 +2668,13 @@ interface InventoryPosition {
26462668
*/
26472669
count?: ItemCountType;
26482670
}
2671+
interface InventoryWithCustomStackSizePrototype {
2672+
stack_size_multiplier: double;
2673+
stack_size_min: ItemCountType;
2674+
stack_size_max: ItemCountType;
2675+
stack_size_override: Record<string, ItemCountType>;
2676+
with_bar: boolean;
2677+
}
26492678
type ItemCountType = uint;
26502679
/**
26512680
* An item filter may be specified in two ways, either as a string which is an item prototype name or as a table.
@@ -3207,6 +3236,10 @@ interface LogisticFilter {
32073236
import_from?: SpaceLocationID;
32083237
}
32093238
type LogisticFilterIndex = uint16;
3239+
interface LogisticGroup {
3240+
members: LuaLogisticSection[];
3241+
filters: LogisticFilter[];
3242+
}
32103243
interface LogisticSection {
32113244
index: uint8;
32123245
filters?: BlueprintLogisticFilter[];
@@ -3545,7 +3578,7 @@ interface BaseLuaEntityDiedEventFilter {
35453578
/**
35463579
* The condition to filter on.
35473580
*/
3548-
filter: 'ghost' | 'rail' | 'rail-signal' | 'rolling-stock' | 'robot-with-logistics-interface' | 'vehicle' | 'turret' | 'crafting-machine' | 'wall-connectable' | 'transport-belt-connectable' | 'circuit-network-connectable' | 'type' | 'name' | 'ghost_type' | 'ghost_name';
3581+
filter: 'ghost' | 'rail' | 'rail-signal' | 'rolling-stock' | 'robot-with-logistics-interface' | 'vehicle' | 'turret' | 'crafting-machine' | 'wall-connectable' | 'transport-belt-connectable' | 'circuit-network-connectable' | 'type' | 'name' | 'ghost_type' | 'ghost_name' | 'force';
35493582
/**
35503583
* How to combine this with the previous filter. Defaults to `"or"`. When evaluating the filters, `"and"` has higher precedence than `"or"`.
35513584
*/
@@ -3555,7 +3588,21 @@ interface BaseLuaEntityDiedEventFilter {
35553588
*/
35563589
invert?: boolean;
35573590
}
3558-
type LuaEntityDiedEventFilter = BaseLuaEntityDiedEventFilter | LuaEntityDiedEventFilterGhostName | LuaEntityDiedEventFilterGhostType | LuaEntityDiedEventFilterName | LuaEntityDiedEventFilterType;
3591+
type LuaEntityDiedEventFilter = BaseLuaEntityDiedEventFilter | LuaEntityDiedEventFilterForce | LuaEntityDiedEventFilterGhostName | LuaEntityDiedEventFilterGhostType | LuaEntityDiedEventFilterName | LuaEntityDiedEventFilterType;
3592+
/**
3593+
*
3594+
* Applies to variant case `force`
3595+
*/
3596+
interface LuaEntityDiedEventFilterForce extends BaseLuaEntityDiedEventFilter {
3597+
/**
3598+
* The condition to filter on.
3599+
*/
3600+
'filter': 'force';
3601+
/**
3602+
* The entity force
3603+
*/
3604+
'force': string;
3605+
}
35593606
/**
35603607
*
35613608
* Applies to variant case `ghost_name`
@@ -5738,6 +5785,11 @@ interface PathfinderWaypoint {
57385785
*/
57395786
needs_destroy_to_reach: boolean;
57405787
}
5788+
interface PerceivedPerformance {
5789+
minimum: double;
5790+
maximum: double;
5791+
performance_to_activity_rate: double;
5792+
}
57415793
/**
57425794
* A single pipe connection for a given fluidbox.
57435795
*/
@@ -6743,6 +6795,7 @@ interface ScriptPosition {
67436795
color: Color;
67446796
id: uint;
67456797
}
6798+
type ScriptRenderMode = 'game' | 'chart';
67466799
/**
67476800
* When writing it is possible to give LuaEntity or MapPosition directly. However, reading always returns the full ScriptRenderTargetTable.
67486801
*/
@@ -7175,6 +7228,10 @@ interface SpaceLocationPrototypeFilterType extends BaseSpaceLocationPrototypeFil
71757228
'type': string | string[];
71767229
}
71777230
type SpacePlatformIdentification = LuaSpacePlatform;
7231+
interface SpacePlatformTileDefinition {
7232+
tile: LuaTilePrototype;
7233+
position: TilePosition;
7234+
}
71787235
interface SpawnPointDefinition {
71797236
/**
71807237
* Evolution factor for which this weight applies.
@@ -7534,6 +7591,11 @@ interface TerritorySettings {
75347591
* For example, `"right"` aligned text means the right side of the text is at the target position. Or in other words, the target is on the right of the text.
75357592
*/
75367593
type TextAlign = 'left' | 'right' | 'center';
7594+
interface ThrusterPerformancePoint {
7595+
fluid_volume: double;
7596+
fluid_usage: double;
7597+
effectivity: double;
7598+
}
75377599
interface Tile {
75387600
/**
75397601
* The position of the tile.
@@ -8305,6 +8367,10 @@ interface WaitCondition {
83058367
* Type of a {@link WaitCondition | runtime:WaitCondition}.
83068368
*/
83078369
type WaitConditionType = 'time' | 'full' | 'empty' | 'not_empty' | 'item_count' | 'circuit' | 'inactivity' | 'robots_inactive' | 'fluid_count' | 'passenger_present' | 'passenger_not_present' | 'fuel_item_count_all' | 'fuel_item_count_any' | 'fuel_full' | 'destination_full_or_no_path' | 'request_satisfied' | 'request_not_satisfied' | 'all_requests_satisfied' | 'any_request_not_satisfied' | 'any_request_zero' | 'any_planet_import_zero' | 'specific_destination_full' | 'specific_destination_not_full' | 'at_station' | 'not_at_station' | 'damage_taken';
8370+
/**
8371+
* Weight of an object. The weight is stored as a fixed-size 64 bit integer, with 16 bits reserved for decimal precision, meaning the smallest value step is `1/2^16`.
8372+
*/
8373+
type Weight = double;
83088374
interface WireConnection {
83098375
target: LuaWireConnector;
83108376
/**
@@ -8410,6 +8476,12 @@ type float = number;
84108476
* Since Lua 5.2 only uses doubles, any API that asks for `int` will floor the given double.
84118477
*/
84128478
type int = number;
8479+
/**
8480+
* 16 bit signed integer. Possible values are `-32 768` to `32 767`.
8481+
*
8482+
* Since Lua 5.2 only uses doubles, any API that asks for `int16` will floor the given double.
8483+
*/
8484+
type int16 = number;
84138485
/**
84148486
* 8-bit signed integer. Possible values are `-128` to `127`.
84158487
*

dist/datacollection.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Factorio API reference https://lua-api.factorio.com/latest/index.html
33
// Generated from JSON source https://lua-api.factorio.com/latest/prototype-api.json
44
// Definition source https://github.com/sguest/factorio-types
5-
// Factorio version 2.0.55
5+
// Factorio version 2.0.57
66
// API version 6
77

88
declare namespace prototype {

0 commit comments

Comments
 (0)