factorio-types 0.0.44 → 0.0.46
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 +87 -23
- package/dist/concepts.d.ts +213 -2
- package/dist/defines.d.ts +1 -1
- package/dist/events.d.ts +1 -1
- package/dist/global.d.ts +1 -1
- package/dist/prototypes.d.ts +19 -9
- package/dist/types.d.ts +206 -21
- package/package.json +2 -2
package/dist/classes.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.101
|
|
6
6
|
// API version 4
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -2616,11 +2616,11 @@ interface LuaEntity extends LuaControl {
|
|
|
2616
2616
|
* @remarks
|
|
2617
2617
|
* Applies to subclasses: EntityGhost
|
|
2618
2618
|
*
|
|
2619
|
-
* @param flag - The flag to test.
|
|
2619
|
+
* @param flag - The flag to test.
|
|
2620
2620
|
* @returns `true` if the entity has the given flag set.
|
|
2621
2621
|
*/
|
|
2622
2622
|
ghost_has_flag(this: void,
|
|
2623
|
-
flag:
|
|
2623
|
+
flag: EntityPrototypeFlag): boolean
|
|
2624
2624
|
|
|
2625
2625
|
/**
|
|
2626
2626
|
* Has this unit been assigned a command?
|
|
@@ -2635,11 +2635,11 @@ interface LuaEntity extends LuaControl {
|
|
|
2635
2635
|
* @remarks
|
|
2636
2636
|
* `entity.has_flag(f)` is a shortcut for `entity.prototype.has_flag(f)`.
|
|
2637
2637
|
*
|
|
2638
|
-
* @param flag - The flag to test.
|
|
2638
|
+
* @param flag - The flag to test.
|
|
2639
2639
|
* @returns `true` if this entity has the given flag set.
|
|
2640
2640
|
*/
|
|
2641
2641
|
has_flag(this: void,
|
|
2642
|
-
flag:
|
|
2642
|
+
flag: EntityPrototypeFlag): boolean
|
|
2643
2643
|
|
|
2644
2644
|
/**
|
|
2645
2645
|
* All methods and properties that this object supports.
|
|
@@ -3190,12 +3190,32 @@ interface LuaEntity extends LuaControl {
|
|
|
3190
3190
|
readonly beacons_count?: number
|
|
3191
3191
|
|
|
3192
3192
|
/**
|
|
3193
|
-
* The belt connectable neighbours of this belt connectable entity. Only entities that input to or are outputs of this entity. Does not contain the other end of an underground belt, see {@link LuaEntity::neighbours | runtime:LuaEntity::neighbours} for that.
|
|
3193
|
+
* The belt connectable neighbours of this belt connectable entity. Only entities that input to or are outputs of this entity. Does not contain the other end of an underground belt, see {@link LuaEntity::neighbours | runtime:LuaEntity::neighbours} for that.
|
|
3194
3194
|
* @remarks
|
|
3195
3195
|
* Applies to subclasses: TransportBeltConnectable
|
|
3196
3196
|
*
|
|
3197
3197
|
*/
|
|
3198
|
-
readonly belt_neighbours: {
|
|
3198
|
+
readonly belt_neighbours: {
|
|
3199
|
+
|
|
3200
|
+
/**
|
|
3201
|
+
* Array of transport belt connectable entities.
|
|
3202
|
+
*/
|
|
3203
|
+
inputs: LuaEntity[],
|
|
3204
|
+
|
|
3205
|
+
/**
|
|
3206
|
+
* Array of transport belt connectable entities.
|
|
3207
|
+
*/
|
|
3208
|
+
outputs: LuaEntity[]
|
|
3209
|
+
}
|
|
3210
|
+
|
|
3211
|
+
/**
|
|
3212
|
+
* Gives what is the current shape of a transport-belt.
|
|
3213
|
+
* @remarks
|
|
3214
|
+
* Can also be used on entity ghost if it contains transport-belt
|
|
3215
|
+
* Applies to subclasses: TransportBelt
|
|
3216
|
+
*
|
|
3217
|
+
*/
|
|
3218
|
+
readonly belt_shape: 'straight' | 'left' | 'right'
|
|
3199
3219
|
|
|
3200
3220
|
/**
|
|
3201
3221
|
* Whether this underground belt goes into or out of the ground.
|
|
@@ -3616,6 +3636,11 @@ interface LuaEntity extends LuaControl {
|
|
|
3616
3636
|
*/
|
|
3617
3637
|
readonly ghost_unit_number?: number
|
|
3618
3638
|
|
|
3639
|
+
/**
|
|
3640
|
+
* Returns a {@link rich text | https://wiki.factorio.com/Rich_text} string containing this entity's position and surface name as a gps tag. Printing it will ping the location of the entity.
|
|
3641
|
+
*/
|
|
3642
|
+
readonly gps_tag: string
|
|
3643
|
+
|
|
3619
3644
|
/**
|
|
3620
3645
|
* The graphics variation for this entity. `nil` if this entity doesn't use graphics variations.
|
|
3621
3646
|
*/
|
|
@@ -4400,11 +4425,11 @@ interface LuaEntityPrototype {
|
|
|
4400
4425
|
|
|
4401
4426
|
/**
|
|
4402
4427
|
* Test whether this entity prototype has a certain flag set.
|
|
4403
|
-
* @param flag - The flag to test.
|
|
4428
|
+
* @param flag - The flag to test.
|
|
4404
4429
|
* @returns `true` if this prototype has the given flag set.
|
|
4405
4430
|
*/
|
|
4406
4431
|
has_flag(this: void,
|
|
4407
|
-
flag:
|
|
4432
|
+
flag: EntityPrototypeFlag): boolean
|
|
4408
4433
|
|
|
4409
4434
|
/**
|
|
4410
4435
|
* All methods and properties that this object supports.
|
|
@@ -4625,6 +4650,14 @@ interface LuaEntityPrototype {
|
|
|
4625
4650
|
*/
|
|
4626
4651
|
readonly belt_speed?: number
|
|
4627
4652
|
|
|
4653
|
+
/**
|
|
4654
|
+
* The boiler operation mode of this boiler prototype.
|
|
4655
|
+
* @remarks
|
|
4656
|
+
* Applies to subclasses: Boiler
|
|
4657
|
+
*
|
|
4658
|
+
*/
|
|
4659
|
+
readonly boiler_mode?: 'heat-water-inside' | 'output-to-separate-pipe'
|
|
4660
|
+
|
|
4628
4661
|
/**
|
|
4629
4662
|
* The braking force of this vehicle prototype.
|
|
4630
4663
|
* @remarks
|
|
@@ -8390,6 +8423,12 @@ interface LuaGameScript {
|
|
|
8390
8423
|
remove_path(this: void,
|
|
8391
8424
|
path: string): void
|
|
8392
8425
|
|
|
8426
|
+
/**
|
|
8427
|
+
* Direct access to Trains Pathfinder. Allows to search rail paths or querying which stops are accessible
|
|
8428
|
+
*/
|
|
8429
|
+
request_train_path(this: void,
|
|
8430
|
+
request: TrainPathFinderRequest): TrainPathFinderPathResult | TrainPathAnyGoalResult | TrainPathAllGoalsResult
|
|
8431
|
+
|
|
8393
8432
|
/**
|
|
8394
8433
|
* Reset scenario state (game_finished, player_won, etc.).
|
|
8395
8434
|
*/
|
|
@@ -9312,8 +9351,8 @@ interface LuaGuiElement {
|
|
|
9312
9351
|
* @remarks
|
|
9313
9352
|
* Applies to subclasses: textfield,text-box
|
|
9314
9353
|
*
|
|
9315
|
-
* @param
|
|
9316
|
-
* @param
|
|
9354
|
+
* @param end_index - The index of the last character to select
|
|
9355
|
+
* @param start_index - The index of the first character to select
|
|
9317
9356
|
* @example
|
|
9318
9357
|
* Select the characters `amp` from `example`:
|
|
9319
9358
|
* ```
|
|
@@ -9328,8 +9367,8 @@ interface LuaGuiElement {
|
|
|
9328
9367
|
*
|
|
9329
9368
|
*/
|
|
9330
9369
|
select(this: void,
|
|
9331
|
-
|
|
9332
|
-
|
|
9370
|
+
start_index: number,
|
|
9371
|
+
end_index: number): void
|
|
9333
9372
|
|
|
9334
9373
|
/**
|
|
9335
9374
|
* Selects all the text in this textbox.
|
|
@@ -9564,6 +9603,11 @@ interface LuaGuiElement {
|
|
|
9564
9603
|
*/
|
|
9565
9604
|
elem_filters?: ItemPrototypeFilter | TilePrototypeFilter | EntityPrototypeFilter | FluidPrototypeFilter | RecipePrototypeFilter | DecorativePrototypeFilter | AchievementPrototypeFilter | EquipmentPrototypeFilter | TechnologyPrototypeFilter
|
|
9566
9605
|
|
|
9606
|
+
/**
|
|
9607
|
+
* The element tooltip to display when hovering over this element, or `nil`.
|
|
9608
|
+
*/
|
|
9609
|
+
elem_tooltip?: ElemID
|
|
9610
|
+
|
|
9567
9611
|
/**
|
|
9568
9612
|
* The elem type of this choose-elem-button.
|
|
9569
9613
|
* @remarks
|
|
@@ -10376,10 +10420,10 @@ interface LuaItemPrototype {
|
|
|
10376
10420
|
|
|
10377
10421
|
/**
|
|
10378
10422
|
* Does this prototype have a flag enabled?
|
|
10379
|
-
* @param flag - The flag to check.
|
|
10423
|
+
* @param flag - The flag to check.
|
|
10380
10424
|
*/
|
|
10381
10425
|
has_flag(this: void,
|
|
10382
|
-
flag:
|
|
10426
|
+
flag: ItemPrototypeFlag): boolean
|
|
10383
10427
|
|
|
10384
10428
|
/**
|
|
10385
10429
|
* All methods and properties that this object supports.
|
|
@@ -12034,18 +12078,16 @@ interface LuaLogisticNetwork {
|
|
|
12034
12078
|
/**
|
|
12035
12079
|
* Get the amount of items of the given type indexed by the storage member.
|
|
12036
12080
|
* @param item - Item name to check.
|
|
12037
|
-
* @returns A mapping of member types ("storage", "passive-provider", "buffer", "active-provider") to the number available in the members.
|
|
12038
12081
|
*/
|
|
12039
12082
|
get_supply_counts(this: void,
|
|
12040
|
-
item: string):
|
|
12083
|
+
item: string): LogisticsNetworkSupplyCounts
|
|
12041
12084
|
|
|
12042
12085
|
/**
|
|
12043
12086
|
* Gets the logistic points with of the given type indexed by the storage member.
|
|
12044
12087
|
* @param item - Item name to check.
|
|
12045
|
-
* @returns A mapping of member types ("storage", "passive-provider", "buffer", "active-provider") to an array of LuaLogisticPoint.
|
|
12046
12088
|
*/
|
|
12047
12089
|
get_supply_points(this: void,
|
|
12048
|
-
item: string):
|
|
12090
|
+
item: string): LogisticsNetworkSupplyPoints
|
|
12049
12091
|
|
|
12050
12092
|
/**
|
|
12051
12093
|
* All methods and properties that this object supports.
|
|
@@ -16547,8 +16589,8 @@ interface LuaSurface {
|
|
|
16547
16589
|
}): LuaEntity[]
|
|
16548
16590
|
|
|
16549
16591
|
/**
|
|
16550
|
-
* Find an entity of the given
|
|
16551
|
-
* @param entity -
|
|
16592
|
+
* Find an entity of the given name at the given position. This checks both the exact position and the bounding box of the entity.
|
|
16593
|
+
* @param entity - Name of the entity to look for.
|
|
16552
16594
|
* @param position - Coordinates to look at.
|
|
16553
16595
|
* @example
|
|
16554
16596
|
* ```
|
|
@@ -17764,9 +17806,26 @@ interface LuaTrain {
|
|
|
17764
17806
|
readonly killed_players: {[key: number]: number}
|
|
17765
17807
|
|
|
17766
17808
|
/**
|
|
17767
|
-
*
|
|
17809
|
+
* Locomotives of the train.
|
|
17810
|
+
* @example
|
|
17811
|
+
* ```
|
|
17812
|
+
* -- called on a LuaTrain with 3 locomotives, it returns 3 LuaEntities:
|
|
17813
|
+
* train.locomotives -- => {front_movers = {loco1, loco2}, back_movers = {loco3}}
|
|
17814
|
+
* ```
|
|
17815
|
+
*
|
|
17768
17816
|
*/
|
|
17769
|
-
readonly locomotives: {
|
|
17817
|
+
readonly locomotives: {
|
|
17818
|
+
|
|
17819
|
+
/**
|
|
17820
|
+
* Array of locomotives.
|
|
17821
|
+
*/
|
|
17822
|
+
back_movers: LuaEntity[],
|
|
17823
|
+
|
|
17824
|
+
/**
|
|
17825
|
+
* Array of locomotives.
|
|
17826
|
+
*/
|
|
17827
|
+
front_movers: LuaEntity[]
|
|
17828
|
+
}
|
|
17770
17829
|
|
|
17771
17830
|
/**
|
|
17772
17831
|
* When `true`, the train is explicitly controlled by the player or script. When `false`, the train moves autonomously according to its schedule.
|
|
@@ -18423,6 +18482,11 @@ interface LuaGuiElementAddParams {
|
|
|
18423
18482
|
*/
|
|
18424
18483
|
'caption'?: LocalisedString
|
|
18425
18484
|
|
|
18485
|
+
/**
|
|
18486
|
+
* Elem tooltip of the child element. Will be displayed above `tooltip`.
|
|
18487
|
+
*/
|
|
18488
|
+
'elem_tooltip'?: ElemID
|
|
18489
|
+
|
|
18426
18490
|
/**
|
|
18427
18491
|
* Whether the child element is enabled. Defaults to `true`.
|
|
18428
18492
|
*/
|
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.101
|
|
6
6
|
// API version 4
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -772,6 +772,19 @@ interface DragTarget {
|
|
|
772
772
|
target_wire_id?: defines.wire_connection_id
|
|
773
773
|
}
|
|
774
774
|
|
|
775
|
+
interface ElemID {
|
|
776
|
+
|
|
777
|
+
/**
|
|
778
|
+
* Name of a prototype as defined by `type`.
|
|
779
|
+
*/
|
|
780
|
+
name: string,
|
|
781
|
+
|
|
782
|
+
/**
|
|
783
|
+
* One of `"achievement"`, `"decorative"`, `"entity"`, `"equipment"`, `"fluid"`, `"item"`, `"item-group"`, `"recipe"`, `"signal"`, or `"technology"`.
|
|
784
|
+
*/
|
|
785
|
+
type: string
|
|
786
|
+
}
|
|
787
|
+
|
|
775
788
|
/**
|
|
776
789
|
* These values represent a percentual increase in evolution. This means a value of `0.1` would increase evolution by 10%.
|
|
777
790
|
*/
|
|
@@ -895,6 +908,11 @@ interface EnemyExpansionMapSettings {
|
|
|
895
908
|
*/
|
|
896
909
|
type EntityPrototypeFilter = EntityPrototypeFilterBuildBaseEvolutionRequirement | EntityPrototypeFilterCollisionMask | EntityPrototypeFilterCraftingCategory | EntityPrototypeFilterEmissions | EntityPrototypeFilterFlag | EntityPrototypeFilterName | EntityPrototypeFilterSelectionPriority | EntityPrototypeFilterType | DefaultEntityPrototypeFilter
|
|
897
910
|
|
|
911
|
+
/**
|
|
912
|
+
* A {@link string | runtime:string} specifying an entity prototype flag.
|
|
913
|
+
*/
|
|
914
|
+
type EntityPrototypeFlag = /* Prevents the entity from being rotated before or after placement. */ 'not-rotatable' | /* Determines the default force when placing entities in the map editor and using the "AUTO" option for the force. */ 'placeable-neutral' | /* Determines the default force when placing entities in the map editor and using the "AUTO" option for the force. */ 'placeable-player' | /* Determines the default force when placing entities in the map editor and using the "AUTO" option for the force. */ 'placeable-enemy' | /* 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. */ 'placeable-off-grid' | /* 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. */ 'player-creation' | /* Uses 45 degree angle increments when selecting direction. */ 'building-direction-8-way' | /* Used to automatically detect the proper direction of the entity if possible. Used by the pump, train stop, and train signal by default. */ 'filter-directions' | /* Fast replace will not apply when building while moving. */ 'fast-replaceable-no-build-while-moving' | /* Used to specify that the entity breathes air, and is thus affected by poison. */ 'breaths-air' | /* Used to specify that the entity can not be 'healed' by repair packs. */ 'not-repairable' | /* Prevents the entity from being drawn on the map. */ 'not-on-map' | /* Prevents the entity from being deconstructed. */ 'not-deconstructable' | /* Prevents the entity from being part of a blueprint. */ 'not-blueprintable' | /* Hides the entity from the bonus GUI and from the "made in"-property of recipe tooltips. */ 'hidden' | /* Hides the alt-info of this entity when in alt-mode. */ 'hide-alt-info' | /* Does not fast replace this entity over other entity types when building while moving. */ 'fast-replaceable-no-cross-type-while-moving' | 'no-gap-fill-while-building' | /* Does not apply fire stickers to the entity. */ 'not-flammable' | /* Prevents inserters and loaders from taking items from this entity. */ 'no-automated-item-removal' | /* Prevents inserters and loaders from inserting items into this entity. */ 'no-automated-item-insertion' | /* Prevents the entity from being copy-pasted. */ 'no-copy-paste' | /* 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. */ 'not-selectable-in-game' | /* Prevents the entity from being selected by the upgrade planner. */ 'not-upgradable' | /* Prevents the entity from being shown in the kill statistics. */ 'not-in-kill-statistics' | /* Prevents the entity from being shown in the "made in" list in recipe tooltips. */ 'not-in-made-in'
|
|
915
|
+
|
|
898
916
|
/**
|
|
899
917
|
* A set of flags. Active flags are in the dictionary as `true`, while inactive flags aren't present at all.
|
|
900
918
|
*
|
|
@@ -1194,6 +1212,13 @@ type GuiLocation = {
|
|
|
1194
1212
|
y: number
|
|
1195
1213
|
}
|
|
1196
1214
|
|
|
1215
|
+
interface GunShift4Way {
|
|
1216
|
+
east: Vector,
|
|
1217
|
+
north: Vector,
|
|
1218
|
+
south: Vector,
|
|
1219
|
+
west: Vector
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1197
1222
|
interface HeatConnection {
|
|
1198
1223
|
direction: defines.direction,
|
|
1199
1224
|
position: Vector
|
|
@@ -1300,6 +1325,11 @@ interface InventoryFilter {
|
|
|
1300
1325
|
*/
|
|
1301
1326
|
type ItemPrototypeFilter = ItemPrototypeFilterBurntResult | ItemPrototypeFilterDefaultRequestAmount | ItemPrototypeFilterFlag | ItemPrototypeFilterFuelAccelerationMultiplier | ItemPrototypeFilterFuelCategory | ItemPrototypeFilterFuelEmissionsMultiplier | ItemPrototypeFilterFuelTopSpeedMultiplier | ItemPrototypeFilterFuelValue | ItemPrototypeFilterName | ItemPrototypeFilterPlaceAsTile | ItemPrototypeFilterPlaceResult | ItemPrototypeFilterPlacedAsEquipmentResult | ItemPrototypeFilterStackSize | ItemPrototypeFilterSubgroup | ItemPrototypeFilterType | ItemPrototypeFilterWireCount | DefaultItemPrototypeFilter
|
|
1302
1327
|
|
|
1328
|
+
/**
|
|
1329
|
+
* A {@link string | runtime:string} specifying an item prototype flag.
|
|
1330
|
+
*/
|
|
1331
|
+
type ItemPrototypeFlag = /* Determines whether the logistics areas of roboports should be drawn when holding this item. Used by the deconstruction planner by default. */ 'draw-logistic-overlay' | /* Hides the item in the logistic requests and filters GUIs (among others). */ 'hidden' | /* Always shows the item in the logistic requests and filters GUIs (among others) even when the recipe for that item is locked. */ 'always-show' | /* Hides the item from the bonus GUI. */ 'hide-from-bonus-gui' | /* Hides the item from the tooltip that's shown when hovering over a burner inventory. */ 'hide-from-fuel-tooltip' | /* 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. */ 'not-stackable' | /* Makes the item act as an extension to the inventory that it is placed in. Only has an effect for items with inventory. */ 'can-extend-inventory' | /* Makes construction bots prefer this item when building the entity specified by its `place_result`. */ 'primary-place-result' | /* Allows the item to be opened by the player, firing the `on_mod_item_opened` event. Only has an effect for selection tool items. */ 'mod-openable' | /* 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. */ 'only-in-cursor' | /* Allows the item to be spawned by a quickbar shortcut or custom input. */ 'spawnable'
|
|
1332
|
+
|
|
1303
1333
|
/**
|
|
1304
1334
|
* A set of flags. Active flags are in the dictionary as `true`, while inactive flags aren't present at all.
|
|
1305
1335
|
*
|
|
@@ -1429,6 +1459,36 @@ interface LogisticParameters {
|
|
|
1429
1459
|
name?: string
|
|
1430
1460
|
}
|
|
1431
1461
|
|
|
1462
|
+
interface LogisticsNetworkSupplyCounts {
|
|
1463
|
+
|
|
1464
|
+
/**
|
|
1465
|
+
* Number of available items in the active provider members.
|
|
1466
|
+
*/
|
|
1467
|
+
'active-provider': number,
|
|
1468
|
+
|
|
1469
|
+
/**
|
|
1470
|
+
* Number of available items in the buffer members.
|
|
1471
|
+
*/
|
|
1472
|
+
buffer: number,
|
|
1473
|
+
|
|
1474
|
+
/**
|
|
1475
|
+
* Number of available items in the passive provider members.
|
|
1476
|
+
*/
|
|
1477
|
+
'passive-provider': number,
|
|
1478
|
+
|
|
1479
|
+
/**
|
|
1480
|
+
* Number of available items in the storage members.
|
|
1481
|
+
*/
|
|
1482
|
+
storage: number
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
interface LogisticsNetworkSupplyPoints {
|
|
1486
|
+
'active-provider': LuaLogisticPoint[],
|
|
1487
|
+
buffer: LuaLogisticPoint[],
|
|
1488
|
+
'passive-provider': LuaLogisticPoint[],
|
|
1489
|
+
storage: LuaLogisticPoint[]
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1432
1492
|
interface Loot {
|
|
1433
1493
|
|
|
1434
1494
|
/**
|
|
@@ -2418,6 +2478,11 @@ interface RadiusVisualisationSpecification {
|
|
|
2418
2478
|
offset: Vector
|
|
2419
2479
|
}
|
|
2420
2480
|
|
|
2481
|
+
interface RailEnd {
|
|
2482
|
+
direction: defines.rail_direction,
|
|
2483
|
+
rail: LuaEntity
|
|
2484
|
+
}
|
|
2485
|
+
|
|
2421
2486
|
/**
|
|
2422
2487
|
* The smooth orientation. It is a {@link float | runtime:float} in the range `[0, 1)` that covers a full circle, starting at the top and going clockwise. This means a value of `0` indicates "north", a value of `0.5` indicates "south".
|
|
2423
2488
|
*
|
|
@@ -2769,6 +2834,144 @@ type TilePosition = {
|
|
|
2769
2834
|
*/
|
|
2770
2835
|
type TilePrototypeFilter = TilePrototypeFilterCollisionMask | TilePrototypeFilterDecorativeRemovalProbability | TilePrototypeFilterEmissions | TilePrototypeFilterVehicleFrictionModifier | TilePrototypeFilterWalkingSpeedModifier | DefaultTilePrototypeFilter
|
|
2771
2836
|
|
|
2837
|
+
interface TrainPathAllGoalsResult {
|
|
2838
|
+
|
|
2839
|
+
/**
|
|
2840
|
+
* Table of the same length as requested goals: each field will tell if related goal is accessible for the train
|
|
2841
|
+
*/
|
|
2842
|
+
accessible: boolean[],
|
|
2843
|
+
|
|
2844
|
+
/**
|
|
2845
|
+
* Amount of goals that are accessible
|
|
2846
|
+
*/
|
|
2847
|
+
amount_accessible: number,
|
|
2848
|
+
|
|
2849
|
+
/**
|
|
2850
|
+
* Table of the same length as requested goals. Only present if request type was "all-goals-penalties"
|
|
2851
|
+
*/
|
|
2852
|
+
penalties?: number[],
|
|
2853
|
+
|
|
2854
|
+
/**
|
|
2855
|
+
* Amount of steps pathfinder performed. This is a measure of how expensive this search was.
|
|
2856
|
+
*/
|
|
2857
|
+
steps_count: number
|
|
2858
|
+
}
|
|
2859
|
+
|
|
2860
|
+
interface TrainPathAnyGoalResult {
|
|
2861
|
+
|
|
2862
|
+
/**
|
|
2863
|
+
* True if any goal was accessible
|
|
2864
|
+
*/
|
|
2865
|
+
found_path: boolean,
|
|
2866
|
+
|
|
2867
|
+
/**
|
|
2868
|
+
* If any goal was accessible, this gives index of the particular goal that was found
|
|
2869
|
+
*/
|
|
2870
|
+
goal_index?: number,
|
|
2871
|
+
|
|
2872
|
+
/**
|
|
2873
|
+
* Penalty of the path to goal if a goal was accessible
|
|
2874
|
+
*/
|
|
2875
|
+
penalty?: number,
|
|
2876
|
+
|
|
2877
|
+
/**
|
|
2878
|
+
* Amount of steps pathfinder performed. This is a measure of how expensive this search was.
|
|
2879
|
+
*/
|
|
2880
|
+
steps_count: number
|
|
2881
|
+
}
|
|
2882
|
+
|
|
2883
|
+
interface TrainPathFinderPathResult {
|
|
2884
|
+
|
|
2885
|
+
/**
|
|
2886
|
+
* True if found path.
|
|
2887
|
+
*/
|
|
2888
|
+
found_path: boolean,
|
|
2889
|
+
|
|
2890
|
+
/**
|
|
2891
|
+
* If path was found, provides index of the specific goal to which the path goes to
|
|
2892
|
+
*/
|
|
2893
|
+
goal_index?: number,
|
|
2894
|
+
|
|
2895
|
+
/**
|
|
2896
|
+
* If path was found, tells if the path was reached from the from_front or train's front end.
|
|
2897
|
+
*/
|
|
2898
|
+
is_front?: boolean,
|
|
2899
|
+
|
|
2900
|
+
/**
|
|
2901
|
+
* Only returned if return_path was set to true and path was found. Contains all rails in order that are part of the found path
|
|
2902
|
+
*/
|
|
2903
|
+
path?: LuaEntity[],
|
|
2904
|
+
|
|
2905
|
+
/**
|
|
2906
|
+
* Penalty of the path to goal if path was found
|
|
2907
|
+
*/
|
|
2908
|
+
penalty?: number,
|
|
2909
|
+
|
|
2910
|
+
/**
|
|
2911
|
+
* Amount of steps pathfinder performed. This is a measure of how expensive this search was.
|
|
2912
|
+
*/
|
|
2913
|
+
steps_count: number,
|
|
2914
|
+
|
|
2915
|
+
/**
|
|
2916
|
+
* If path was found, provides total length of all rails of the path
|
|
2917
|
+
*/
|
|
2918
|
+
total_length?: number
|
|
2919
|
+
}
|
|
2920
|
+
|
|
2921
|
+
interface TrainPathFinderRequest {
|
|
2922
|
+
|
|
2923
|
+
/**
|
|
2924
|
+
* Only relevant if from_back is given. Defaults to true. Providing false will cause the pathfinder to reject a path that starts on back and ends within the same segment as the path would be too short to provide correct alignment with a goal.
|
|
2925
|
+
*/
|
|
2926
|
+
allow_path_within_segment_back?: boolean,
|
|
2927
|
+
|
|
2928
|
+
/**
|
|
2929
|
+
* Only relevant if from_front is given. Defaults to true. Providing false will cause the pathfinder to reject a path that starts on front and ends within the same segment as the path would be too short to provide correct alignment with a goal.
|
|
2930
|
+
*/
|
|
2931
|
+
allow_path_within_segment_front?: boolean,
|
|
2932
|
+
|
|
2933
|
+
/**
|
|
2934
|
+
* Manually provided starting back of the train.
|
|
2935
|
+
*/
|
|
2936
|
+
from_back?: RailEnd,
|
|
2937
|
+
|
|
2938
|
+
/**
|
|
2939
|
+
* Manually provided starting front of the train.
|
|
2940
|
+
*/
|
|
2941
|
+
from_front?: RailEnd,
|
|
2942
|
+
goals: Array<TrainStopGoal | RailEnd>,
|
|
2943
|
+
|
|
2944
|
+
/**
|
|
2945
|
+
* Defaults to false. If set to true, pathfinder will not return a path that cannot have its beginning immediately reserved causing train to stop inside of intersection.
|
|
2946
|
+
*/
|
|
2947
|
+
in_chain_signal_section?: boolean,
|
|
2948
|
+
|
|
2949
|
+
/**
|
|
2950
|
+
* Only relevant if request type is "path". Returning a full path is expensive due to multiple LuaEntity created. In order for path to be returned, true must be provided here. Defaults to false in which case a path will not be provided.
|
|
2951
|
+
*/
|
|
2952
|
+
return_path?: boolean,
|
|
2953
|
+
|
|
2954
|
+
/**
|
|
2955
|
+
* Only relevant if none of from_front/from_back was provied in which case from_front and from_back are deduced from the train. Selects which train ends should be considered as starts. Possible values: "respect-movement-direction", "any-direction-with-locomotives". Defaults to "any-direction-with-locomotives"
|
|
2956
|
+
*/
|
|
2957
|
+
search_direction?: string,
|
|
2958
|
+
|
|
2959
|
+
/**
|
|
2960
|
+
* Maximum amount of steps pathfinder is allowed to perform
|
|
2961
|
+
*/
|
|
2962
|
+
steps_limit?: number,
|
|
2963
|
+
|
|
2964
|
+
/**
|
|
2965
|
+
* Mandatory if from_front and from_back are not provided, optional otherwise. Selects a context for the pathfinder to decide which train to exclude from penalties and which signals are considered possible to reacquire. If from_front and from_back are not provided, then it is also used to collect front and back ends for the search
|
|
2966
|
+
*/
|
|
2967
|
+
train?: LuaTrain,
|
|
2968
|
+
|
|
2969
|
+
/**
|
|
2970
|
+
* Request type. "path", "any-goal-accessible", "all-goals-accessible" or "all-goals-penalties". Defaults to "path"
|
|
2971
|
+
*/
|
|
2972
|
+
type?: string
|
|
2973
|
+
}
|
|
2974
|
+
|
|
2772
2975
|
interface TrainSchedule {
|
|
2773
2976
|
|
|
2774
2977
|
/**
|
|
@@ -2802,6 +3005,14 @@ interface TrainScheduleRecord {
|
|
|
2802
3005
|
wait_conditions?: WaitCondition[]
|
|
2803
3006
|
}
|
|
2804
3007
|
|
|
3008
|
+
interface TrainStopGoal {
|
|
3009
|
+
|
|
3010
|
+
/**
|
|
3011
|
+
* Train stop target. Must be connected to rail (LuaEntity::connected_rail returns valid LuaEntity)
|
|
3012
|
+
*/
|
|
3013
|
+
train_stop: LuaEntity
|
|
3014
|
+
}
|
|
3015
|
+
|
|
2805
3016
|
interface TriggerDelivery {
|
|
2806
3017
|
source_effects: TriggerEffectItem[],
|
|
2807
3018
|
target_effects: TriggerEffectItem[],
|
|
@@ -3146,7 +3357,7 @@ interface AttackParametersStream extends BaseAttackParameters {
|
|
|
3146
3357
|
fluid_consumption: number,
|
|
3147
3358
|
fluids?: AttackParameterFluid[],
|
|
3148
3359
|
gun_barrel_length: number,
|
|
3149
|
-
gun_center_shift:
|
|
3360
|
+
gun_center_shift: GunShift4Way,
|
|
3150
3361
|
projectile_creation_parameters?: CircularProjectileCreationSpecification[]
|
|
3151
3362
|
}
|
|
3152
3363
|
|
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.101
|
|
6
6
|
// API version 4
|
|
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.101
|
|
6
6
|
// API version 4
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
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.101
|
|
6
6
|
// API version 4
|
|
7
7
|
|
|
8
8
|
/**
|
package/dist/prototypes.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 1.1.
|
|
5
|
+
// Factorio version 1.1.101
|
|
6
6
|
// API version 4
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -446,7 +446,7 @@ When using an array of AmmoTypes, they have the additional {@link AmmoType::sour
|
|
|
446
446
|
}
|
|
447
447
|
|
|
448
448
|
/**
|
|
449
|
-
* A turret that consumes ammo items.
|
|
449
|
+
* A turret that consumes {@link ammo items | prototype:AmmoItemPrototype}.
|
|
450
450
|
*/
|
|
451
451
|
interface AmmoTurretPrototype extends TurretPrototype{
|
|
452
452
|
automated_ammo_count: ItemCountType,
|
|
@@ -2563,7 +2563,7 @@ Max value is 64.
|
|
|
2563
2563
|
}
|
|
2564
2564
|
|
|
2565
2565
|
/**
|
|
2566
|
-
* A turret that
|
|
2566
|
+
* A turret that uses electricity as ammunition.
|
|
2567
2567
|
*/
|
|
2568
2568
|
interface ElectricTurretPrototype extends TurretPrototype{
|
|
2569
2569
|
energy_source: ElectricEnergySource | VoidEnergySource
|
|
@@ -2629,7 +2629,7 @@ interface EnemySpawnerPrototype extends EntityWithOwnerPrototype{
|
|
|
2629
2629
|
spawn_decorations_on_expansion?: boolean,
|
|
2630
2630
|
|
|
2631
2631
|
/**
|
|
2632
|
-
* Ticks for cooldown after unit is spawned
|
|
2632
|
+
* Ticks for cooldown after unit is spawned. The first member of the tuple is min, the second member of the tuple is max.
|
|
2633
2633
|
*/
|
|
2634
2634
|
spawning_cooldown:
|
|
2635
2635
|
[ number,
|
|
@@ -2890,7 +2890,7 @@ The item count specified here can't be larger than the stack size of that item.
|
|
|
2890
2890
|
/**
|
|
2891
2891
|
* Specification of the entity selection area. When empty the entity will have no selection area (and thus is not selectable).
|
|
2892
2892
|
|
|
2893
|
-
The selection box is usually a little bit bigger than the collision box
|
|
2893
|
+
The selection box is usually a little bit bigger than the collision box. For tileable entities (like buildings) it should match the tile size of the building.
|
|
2894
2894
|
*/
|
|
2895
2895
|
selection_box?: BoundingBox,
|
|
2896
2896
|
|
|
@@ -3502,12 +3502,12 @@ interface FluidStreamPrototype extends EntityPrototype{
|
|
|
3502
3502
|
}
|
|
3503
3503
|
|
|
3504
3504
|
/**
|
|
3505
|
-
* A turret that
|
|
3505
|
+
* A turret that uses {@link fluid | prototype:FluidPrototype} as ammunition.
|
|
3506
3506
|
*/
|
|
3507
3507
|
interface FluidTurretPrototype extends TurretPrototype{
|
|
3508
3508
|
|
|
3509
3509
|
/**
|
|
3510
|
-
* Before an turret that was out of
|
|
3510
|
+
* Before an turret that was out of fluid ammunition is able to fire again, the `fluid_buffer_size` must fill to this proportion.
|
|
3511
3511
|
*/
|
|
3512
3512
|
activation_buffer_ratio: number,
|
|
3513
3513
|
|
|
@@ -3528,6 +3528,10 @@ interface FluidTurretPrototype extends TurretPrototype{
|
|
|
3528
3528
|
muzzle_light?: LightDefinition,
|
|
3529
3529
|
not_enough_fuel_indicator_light?: LightDefinition,
|
|
3530
3530
|
not_enough_fuel_indicator_picture?: Sprite4Way,
|
|
3531
|
+
|
|
3532
|
+
/**
|
|
3533
|
+
* The sprite will be drawn on top of fluid turrets that are out of fluid ammunition. If the `out_of_ammo_alert_icon` is not set, {@link UtilitySprites::fluid_icon | prototype:UtilitySprites::fluid_icon} will be used instead.
|
|
3534
|
+
*/
|
|
3531
3535
|
out_of_ammo_alert_icon?: Sprite,
|
|
3532
3536
|
prepared_muzzle_animation_shift?: AnimatedVector,
|
|
3533
3537
|
preparing_muzzle_animation_shift?: AnimatedVector,
|
|
@@ -4195,7 +4199,9 @@ Mandatory if `icons` is not defined, or if `icon_size` is not specified for all
|
|
|
4195
4199
|
open_sound?: Sound,
|
|
4196
4200
|
|
|
4197
4201
|
/**
|
|
4198
|
-
* Used to give the item multiple different icons so that they look less uniform on belts
|
|
4202
|
+
* Used to give the item multiple different icons so that they look less uniform on belts. For inventory icons and similar, `icon/icons` will be used. Maximum number of variations is 16.
|
|
4203
|
+
|
|
4204
|
+
When using sprites of size `64` (same as base game icons), the `scale` should be set to 0.25.
|
|
4199
4205
|
*/
|
|
4200
4206
|
pictures?: SpriteVariations,
|
|
4201
4207
|
place_as_tile?: PlaceAsTile,
|
|
@@ -8577,7 +8583,7 @@ interface TransportBeltConnectablePrototype extends EntityWithOwnerPrototype{
|
|
|
8577
8583
|
ends_with_stopper?: boolean,
|
|
8578
8584
|
|
|
8579
8585
|
/**
|
|
8580
|
-
* Transport belt connectable entities cannot have the "placeable-off-grid"
|
|
8586
|
+
* Transport belt connectable entities cannot have any of the following flags: "placeable-off-grid", "building-direction-8-way".
|
|
8581
8587
|
*/
|
|
8582
8588
|
flags?: EntityPrototypeFlags,
|
|
8583
8589
|
|
|
@@ -9579,6 +9585,10 @@ interface UtilitySprites extends PrototypeBase{
|
|
|
9579
9585
|
export: Sprite,
|
|
9580
9586
|
export_slot: Sprite,
|
|
9581
9587
|
favourite_server_icon: Sprite,
|
|
9588
|
+
|
|
9589
|
+
/**
|
|
9590
|
+
* The sprite will be drawn on top of {@link fluid turrets | prototype:FluidTurretPrototype} that are out of fluid ammunition and don't have {@link FluidTurretPrototype::out_of_ammo_alert_icon | prototype:FluidTurretPrototype::out_of_ammo_alert_icon} set.
|
|
9591
|
+
*/
|
|
9582
9592
|
fluid_icon: Sprite,
|
|
9583
9593
|
fluid_indication_arrow: Sprite,
|
|
9584
9594
|
fluid_indication_arrow_both_ways: Sprite,
|
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 1.1.
|
|
5
|
+
// Factorio version 1.1.101
|
|
6
6
|
// API version 4
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -454,6 +454,67 @@ interface AnimationSheet extends AnimationParameters{
|
|
|
454
454
|
variation_count: number
|
|
455
455
|
}
|
|
456
456
|
|
|
457
|
+
/**
|
|
458
|
+
* @example
|
|
459
|
+
* ```
|
|
460
|
+
* -- array of animations
|
|
461
|
+
* animations =
|
|
462
|
+
* {
|
|
463
|
+
* {
|
|
464
|
+
* filename = "__base__/graphics/entity/explosion-gunshot/explosion-gunshot.png",
|
|
465
|
+
* draw_as_glow = true,
|
|
466
|
+
* priority = "extra-high",
|
|
467
|
+
* width = 34,
|
|
468
|
+
* height = 38,
|
|
469
|
+
* frame_count = 2,
|
|
470
|
+
* animation_speed = 1.5,
|
|
471
|
+
* shift = {0, 0}
|
|
472
|
+
* },
|
|
473
|
+
* {
|
|
474
|
+
* filename = "__base__/graphics/entity/explosion-gunshot/explosion-gunshot.png",
|
|
475
|
+
* draw_as_glow = true,
|
|
476
|
+
* priority = "extra-high",
|
|
477
|
+
* width = 34,
|
|
478
|
+
* height = 38,
|
|
479
|
+
* x = 34 * 2,
|
|
480
|
+
* frame_count = 2,
|
|
481
|
+
* animation_speed = 1.5,
|
|
482
|
+
* shift = {0, 0}
|
|
483
|
+
* },
|
|
484
|
+
* -- [...]
|
|
485
|
+
* }
|
|
486
|
+
* ```
|
|
487
|
+
*
|
|
488
|
+
* @example
|
|
489
|
+
* ```
|
|
490
|
+
* -- animation sheet using "sheet"
|
|
491
|
+
* pictures =
|
|
492
|
+
* {
|
|
493
|
+
* sheet =
|
|
494
|
+
* {
|
|
495
|
+
* filename = "__base__/graphics/entity/character/footprints.png",
|
|
496
|
+
* line_length = 2,
|
|
497
|
+
* frame_count = 2,
|
|
498
|
+
* width = 15,
|
|
499
|
+
* height = 11,
|
|
500
|
+
* shift = util.by_pixel(0.5, 0.5),
|
|
501
|
+
* variation_count = 8,
|
|
502
|
+
* hr_version =
|
|
503
|
+
* {
|
|
504
|
+
* filename = "__base__/graphics/entity/character/hr-footprints.png",
|
|
505
|
+
* line_length = 2,
|
|
506
|
+
* frame_count = 2,
|
|
507
|
+
* width = 30,
|
|
508
|
+
* height = 22,
|
|
509
|
+
* shift = util.by_pixel(0.25, 0.25),
|
|
510
|
+
* scale = 0.5,
|
|
511
|
+
* variation_count = 8
|
|
512
|
+
* }
|
|
513
|
+
* }
|
|
514
|
+
* }
|
|
515
|
+
* ```
|
|
516
|
+
*
|
|
517
|
+
*/
|
|
457
518
|
type AnimationVariations = {
|
|
458
519
|
|
|
459
520
|
/**
|
|
@@ -1456,7 +1517,7 @@ Only loaded if `fuel_categories` is not defined.
|
|
|
1456
1517
|
smoke?: SmokeSource[],
|
|
1457
1518
|
|
|
1458
1519
|
/**
|
|
1459
|
-
* This is mandatory if the energy source can be loaded as multiple energy source types.
|
|
1520
|
+
* This is only loaded, and mandatory if the energy source can be loaded as multiple energy source types.
|
|
1460
1521
|
*/
|
|
1461
1522
|
type?: 'burner'
|
|
1462
1523
|
}
|
|
@@ -1849,7 +1910,7 @@ type CollisionMaskLayer = 'ground-tile' | 'water-tile' | 'resource-layer' | 'doo
|
|
|
1849
1910
|
/**
|
|
1850
1911
|
* Table of red, green, blue, and alpha float values between 0 and 1. Alternatively, values can be from 0-255, they are interpreted as such if at least one value is `> 1`.
|
|
1851
1912
|
*
|
|
1852
|
-
* Color allows the short-hand notation of passing an array of exactly 3 or 4 numbers.
|
|
1913
|
+
* Color allows the short-hand notation of passing an array of exactly 3 or 4 numbers. The array items are r, g, b and optionally a, in that order.
|
|
1853
1914
|
*
|
|
1854
1915
|
* The game usually expects colors to be in pre-multiplied form (color channels are pre-multiplied by alpha).
|
|
1855
1916
|
* @example
|
|
@@ -2483,7 +2544,7 @@ interface ElectricEnergySource extends BaseEnergySource{
|
|
|
2483
2544
|
output_flow_limit?: Energy,
|
|
2484
2545
|
|
|
2485
2546
|
/**
|
|
2486
|
-
* This is mandatory if the energy source can be loaded as multiple energy source types.
|
|
2547
|
+
* This is only loaded, and mandatory if the energy source can be loaded as multiple energy source types.
|
|
2487
2548
|
*/
|
|
2488
2549
|
type?: 'electric',
|
|
2489
2550
|
usage_priority: ElectricUsagePriority
|
|
@@ -2799,13 +2860,19 @@ type EntityID = string
|
|
|
2799
2860
|
|
|
2800
2861
|
/**
|
|
2801
2862
|
* An array containing the following values.
|
|
2863
|
+
*
|
|
2864
|
+
* If an entity is a {@link building | runtime:LuaEntityPrototype::is_building} and has the `"player-creation"` flag set, it is considered for multiple enemy/unit behaviors:
|
|
2865
|
+
*
|
|
2866
|
+
* - Autonomous enemy attacks (usually triggered by pollution) can only attack within chunks that contain at least one entity that is both a building and a player-creation.
|
|
2867
|
+
*
|
|
2868
|
+
* - Enemy expansion considers entities that are both buildings and player-creations as "enemy" entities that may block expansion.
|
|
2802
2869
|
* @example
|
|
2803
2870
|
* ```
|
|
2804
2871
|
* flags = {"placeable-neutral", "player-creation"}
|
|
2805
2872
|
* ```
|
|
2806
2873
|
*
|
|
2807
2874
|
*/
|
|
2808
|
-
type EntityPrototypeFlags = Array</* Can't be rotated before or after placing. */ 'not-rotatable' | /* Determines the default force when placing entities in the map editor and using the *AUTO* option for the force. */ 'placeable-neutral' | /* Determines the default force when placing entities in the map editor and using the *AUTO* option for the force. */ 'placeable-player' | /* Determines the default force when placing entities in the map editor and using the *AUTO* option for the force. */ 'placeable-enemy' | /* Refers to the fact that most entities are placed on an invisible 'grid' within the world, entities with this flag do not have to line up with this grid (like trees and land-mines). */ 'placeable-off-grid' | /* Makes it possible for the biter AI to target the entity as a distraction in distraction mode {@link by_anything | runtime:defines.distraction.by_anything}. Makes it possible to blueprint, deconstruct, and repair the entity (can be turned off again using the specific flags). Enables smoke to be created automatically when building the entity. If the entity does not have {@link EntityPrototype::map_color | prototype:EntityPrototype::map_color} set, this flag makes the entity appear on the map/minimap with the default color specified in the {@link UtilityConstants | prototype:UtilityConstants}.
|
|
2875
|
+
type EntityPrototypeFlags = Array</* Can't be rotated before or after placing. */ 'not-rotatable' | /* Determines the default force when placing entities in the map editor and using the *AUTO* option for the force. */ 'placeable-neutral' | /* Determines the default force when placing entities in the map editor and using the *AUTO* option for the force. */ 'placeable-player' | /* Determines the default force when placing entities in the map editor and using the *AUTO* option for the force. */ 'placeable-enemy' | /* Refers to the fact that most entities are placed on an invisible 'grid' within the world, entities with this flag do not have to line up with this grid (like trees and land-mines). */ 'placeable-off-grid' | /* Makes it possible for the biter AI to target the entity as a distraction in distraction mode {@link by_anything | runtime:defines.distraction.by_anything}. Makes it possible to blueprint, deconstruct, and repair the entity (can be turned off again using the specific flags). Enables smoke to be created automatically when building the entity. If the entity does not have {@link EntityPrototype::map_color | prototype:EntityPrototype::map_color} set, this flag makes the entity appear on the map/minimap with the default color specified in the {@link UtilityConstants | prototype:UtilityConstants}. */ 'player-creation' | /* Uses 45 degree angle increments when selecting direction. */ 'building-direction-8-way' | /* Used to automatically detect the proper direction, if possible. Used by base with the pump, train stop, and train signal. */ 'filter-directions' | /* Fast replace will not apply when building while moving. */ 'fast-replaceable-no-build-while-moving' | /* This is used to specify that the entity breathes air, and so is affected by poison (currently {@link poison capsules | https://wiki.factorio.com/Poison_capsule} are the only source). */ 'breaths-air' | /* Used to specify that the entity can not be 'healed' by repair-packs (or construction robots with repair packs) */ 'not-repairable' | /* The entity does not get drawn on the map. */ 'not-on-map' | /* The entity can not be deconstructed. */ 'not-deconstructable' | /* The entity can not be used in blueprints. */ 'not-blueprintable' | /* Hides the entity from the bonus GUI (button above the map) and from the made in property of recipe tooltips. */ 'hidden' | /* Hides the alt-info of an entity in alt-mode, for example the recipe icon. */ 'hide-alt-info' | /* Do not fast replace over other entity types when building while moving. */ 'fast-replaceable-no-cross-type-while-moving' | 'no-gap-fill-while-building' | /* Do not apply fire stickers to the entity. */ 'not-flammable' | /* Prevents inserters and loaders from taking items from this entity. */ 'no-automated-item-removal' | /* Prevents inserters and loaders from inserting items into this entity. */ 'no-automated-item-insertion' | /* This flag does nothing when set in the data stage because it gets overridden by {@link EntityPrototype::allow_copy_paste | prototype:EntityPrototype::allow_copy_paste}. Thus, it must be set on the entity via that property. */ 'no-copy-paste' | /* 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. This flag does nothing when set in the data stage because it gets overridden by {@link EntityPrototype::selectable_in_game | prototype:EntityPrototype::selectable_in_game}. Thus, it must be set on the entity via that property. */ 'not-selectable-in-game' | /* The entity can't be selected by the {@link upgrade planner | https://wiki.factorio.com/Upgrade_planner}. */ 'not-upgradable' | /* The entity is not shown in the kill statistics. */ 'not-in-kill-statistics' | /* The entity is not shown in the made in property of recipe tooltips. */ 'not-in-made-in'>
|
|
2809
2876
|
|
|
2810
2877
|
/**
|
|
2811
2878
|
* How far (in tiles) entities should be rendered outside the visible area of the screen.
|
|
@@ -3196,7 +3263,7 @@ type FluidID = string
|
|
|
3196
3263
|
interface FluidIngredientPrototype {
|
|
3197
3264
|
|
|
3198
3265
|
/**
|
|
3199
|
-
* Can not be
|
|
3266
|
+
* Can not be `<= 0`.
|
|
3200
3267
|
*/
|
|
3201
3268
|
amount: number,
|
|
3202
3269
|
|
|
@@ -3859,7 +3926,7 @@ type ItemGroupID = string
|
|
|
3859
3926
|
type ItemID = string
|
|
3860
3927
|
|
|
3861
3928
|
/**
|
|
3862
|
-
* An item ingredient definition. It can be specified as a table with named or numbered keys, but not a mix of both.
|
|
3929
|
+
* An item ingredient definition. It can be specified as a table with named or numbered keys, but not a mix of both. If this is specified as a table with numbered keys then the first value is the item name and the second is the amount.
|
|
3863
3930
|
* @example
|
|
3864
3931
|
* ```
|
|
3865
3932
|
* {type="item", name="steel-plate", amount=8}
|
|
@@ -3888,7 +3955,7 @@ If this fluid is used in a recipe, the `catalyst_amount` is calculated automatic
|
|
|
3888
3955
|
]
|
|
3889
3956
|
|
|
3890
3957
|
/**
|
|
3891
|
-
* An item product definition. It can be specified as a table with named or numbered keys, but not a mix of both.
|
|
3958
|
+
* An item product definition. It can be specified as a table with named or numbered keys, but not a mix of both. If this is specified as a table with numbered keys then the first value is the item name and the second is the amount.
|
|
3892
3959
|
*/
|
|
3893
3960
|
type ItemProductPrototype = {
|
|
3894
3961
|
amount?: number,
|
|
@@ -4292,7 +4359,7 @@ interface LoaderStructure {
|
|
|
4292
4359
|
* ```
|
|
4293
4360
|
*
|
|
4294
4361
|
*/
|
|
4295
|
-
type LocalisedString = string | boolean | LocalisedString[]
|
|
4362
|
+
type LocalisedString = string | number | boolean | LocalisedString[]
|
|
4296
4363
|
|
|
4297
4364
|
/**
|
|
4298
4365
|
* The items generated when an {@link EntityWithHealthPrototype | prototype:EntityWithHealthPrototype} is killed.
|
|
@@ -5587,6 +5654,10 @@ type Order = string
|
|
|
5587
5654
|
|
|
5588
5655
|
interface OrientedCliffPrototype {
|
|
5589
5656
|
collision_bounding_box: BoundingBox,
|
|
5657
|
+
|
|
5658
|
+
/**
|
|
5659
|
+
* Unused.
|
|
5660
|
+
*/
|
|
5590
5661
|
fill_volume: number,
|
|
5591
5662
|
pictures: SpriteVariations
|
|
5592
5663
|
}
|
|
@@ -7113,7 +7184,7 @@ type SoundType = 'game-effect' | 'gui-effect' | 'ambient' | 'environment' | 'wal
|
|
|
7113
7184
|
/**
|
|
7114
7185
|
* The definition of a evolution and probability weights for a {@link spawnable unit | prototype:UnitSpawnDefinition} for a {@link EnemySpawnerPrototype | prototype:EnemySpawnerPrototype}.
|
|
7115
7186
|
*
|
|
7116
|
-
* It can be specified as a table with named or numbered keys, but not a mix of both.
|
|
7187
|
+
* It can be specified as a table with named or numbered keys, but not a mix of both. If this is specified as a table with numbered keys then the first value is the evolution factor and the second is the spawn weight.
|
|
7117
7188
|
*/
|
|
7118
7189
|
type SpawnPoint = {
|
|
7119
7190
|
evolution_factor: number,
|
|
@@ -7303,6 +7374,7 @@ interface SpotNoiseArguments {
|
|
|
7303
7374
|
* When there is more than one sprite or {@link Animation | prototype:Animation} frame with the same source file and dimensions/position in the game, they all share the same memory.
|
|
7304
7375
|
* @example
|
|
7305
7376
|
* ```
|
|
7377
|
+
* -- simple sprite
|
|
7306
7378
|
* picture_set_enemy =
|
|
7307
7379
|
* {
|
|
7308
7380
|
* filename = "__base__/graphics/entity/land-mine/land-mine-set-enemy.png",
|
|
@@ -7312,6 +7384,99 @@ interface SpotNoiseArguments {
|
|
|
7312
7384
|
* }
|
|
7313
7385
|
* ```
|
|
7314
7386
|
*
|
|
7387
|
+
* @example
|
|
7388
|
+
* ```
|
|
7389
|
+
* -- sprite with hr version
|
|
7390
|
+
* picture =
|
|
7391
|
+
* {
|
|
7392
|
+
* filename = "__base__/graphics/entity/wooden-chest/wooden-chest.png",
|
|
7393
|
+
* priority = "extra-high",
|
|
7394
|
+
* width = 32,
|
|
7395
|
+
* height = 36,
|
|
7396
|
+
* shift = util.by_pixel(0.5, -2),
|
|
7397
|
+
* hr_version =
|
|
7398
|
+
* {
|
|
7399
|
+
* filename = "__base__/graphics/entity/wooden-chest/hr-wooden-chest.png",
|
|
7400
|
+
* priority = "extra-high",
|
|
7401
|
+
* width = 62,
|
|
7402
|
+
* height = 72,
|
|
7403
|
+
* shift = util.by_pixel(0.5, -2),
|
|
7404
|
+
* scale = 0.5
|
|
7405
|
+
* }
|
|
7406
|
+
* }
|
|
7407
|
+
* ```
|
|
7408
|
+
*
|
|
7409
|
+
* @example
|
|
7410
|
+
* ```
|
|
7411
|
+
* -- sprite with layers
|
|
7412
|
+
* picture =
|
|
7413
|
+
* {
|
|
7414
|
+
* layers =
|
|
7415
|
+
* {
|
|
7416
|
+
* {
|
|
7417
|
+
* filename = "__base__/graphics/entity/wooden-chest/wooden-chest.png",
|
|
7418
|
+
* priority = "extra-high",
|
|
7419
|
+
* width = 32,
|
|
7420
|
+
* height = 36,
|
|
7421
|
+
* shift = util.by_pixel(0.5, -2)
|
|
7422
|
+
* },
|
|
7423
|
+
* {
|
|
7424
|
+
* filename = "__base__/graphics/entity/wooden-chest/wooden-chest-shadow.png",
|
|
7425
|
+
* priority = "extra-high",
|
|
7426
|
+
* width = 52,
|
|
7427
|
+
* height = 20,
|
|
7428
|
+
* shift = util.by_pixel(10, 6.5),
|
|
7429
|
+
* draw_as_shadow = true
|
|
7430
|
+
* }
|
|
7431
|
+
* }
|
|
7432
|
+
* }
|
|
7433
|
+
* ```
|
|
7434
|
+
*
|
|
7435
|
+
* @example
|
|
7436
|
+
* ```
|
|
7437
|
+
* -- sprite with layers and hr version
|
|
7438
|
+
* picture =
|
|
7439
|
+
* {
|
|
7440
|
+
* layers =
|
|
7441
|
+
* {
|
|
7442
|
+
* {
|
|
7443
|
+
* filename = "__base__/graphics/entity/wooden-chest/wooden-chest.png",
|
|
7444
|
+
* priority = "extra-high",
|
|
7445
|
+
* width = 32,
|
|
7446
|
+
* height = 36,
|
|
7447
|
+
* shift = util.by_pixel(0.5, -2),
|
|
7448
|
+
* hr_version =
|
|
7449
|
+
* {
|
|
7450
|
+
* filename = "__base__/graphics/entity/wooden-chest/hr-wooden-chest.png",
|
|
7451
|
+
* priority = "extra-high",
|
|
7452
|
+
* width = 62,
|
|
7453
|
+
* height = 72,
|
|
7454
|
+
* shift = util.by_pixel(0.5, -2),
|
|
7455
|
+
* scale = 0.5
|
|
7456
|
+
* }
|
|
7457
|
+
* },
|
|
7458
|
+
* {
|
|
7459
|
+
* filename = "__base__/graphics/entity/wooden-chest/wooden-chest-shadow.png",
|
|
7460
|
+
* priority = "extra-high",
|
|
7461
|
+
* width = 52,
|
|
7462
|
+
* height = 20,
|
|
7463
|
+
* shift = util.by_pixel(10, 6.5),
|
|
7464
|
+
* draw_as_shadow = true,
|
|
7465
|
+
* hr_version =
|
|
7466
|
+
* {
|
|
7467
|
+
* filename = "__base__/graphics/entity/wooden-chest/hr-wooden-chest-shadow.png",
|
|
7468
|
+
* priority = "extra-high",
|
|
7469
|
+
* width = 104,
|
|
7470
|
+
* height = 40,
|
|
7471
|
+
* shift = util.by_pixel(10, 6.5),
|
|
7472
|
+
* draw_as_shadow = true,
|
|
7473
|
+
* scale = 0.5
|
|
7474
|
+
* }
|
|
7475
|
+
* }
|
|
7476
|
+
* }
|
|
7477
|
+
* }
|
|
7478
|
+
* ```
|
|
7479
|
+
*
|
|
7315
7480
|
*/
|
|
7316
7481
|
interface Sprite extends SpriteParameters{
|
|
7317
7482
|
|
|
@@ -7625,19 +7790,36 @@ type SpriteSizeType = number
|
|
|
7625
7790
|
/**
|
|
7626
7791
|
* @example
|
|
7627
7792
|
* ```
|
|
7793
|
+
* -- array of sprites
|
|
7628
7794
|
* pictures =
|
|
7629
7795
|
* {
|
|
7796
|
+
* { size = 64, filename = "__base__/graphics/icons/coal.png", scale = 0.25, mipmap_count = 4 },
|
|
7797
|
+
* { size = 64, filename = "__base__/graphics/icons/coal-1.png", scale = 0.25, mipmap_count = 4 },
|
|
7798
|
+
* { size = 64, filename = "__base__/graphics/icons/coal-2.png", scale = 0.25, mipmap_count = 4 },
|
|
7799
|
+
* { size = 64, filename = "__base__/graphics/icons/coal-3.png", scale = 0.25, mipmap_count = 4 }
|
|
7800
|
+
* }
|
|
7801
|
+
* ```
|
|
7802
|
+
*
|
|
7803
|
+
* @example
|
|
7804
|
+
* ```
|
|
7805
|
+
* -- sprite sheet using "sheet"
|
|
7806
|
+
* connection_patches_connected =
|
|
7807
|
+
* {
|
|
7808
|
+
* sheet =
|
|
7630
7809
|
* {
|
|
7631
|
-
* filename = "__base__/graphics/entity/
|
|
7632
|
-
* width =
|
|
7633
|
-
* height =
|
|
7634
|
-
*
|
|
7635
|
-
*
|
|
7636
|
-
*
|
|
7637
|
-
*
|
|
7638
|
-
*
|
|
7639
|
-
*
|
|
7640
|
-
*
|
|
7810
|
+
* filename = "__base__/graphics/entity/nuclear-reactor/reactor-connect-patches.png",
|
|
7811
|
+
* width = 32,
|
|
7812
|
+
* height = 32,
|
|
7813
|
+
* variation_count = 12,
|
|
7814
|
+
* hr_version =
|
|
7815
|
+
* {
|
|
7816
|
+
* filename = "__base__/graphics/entity/nuclear-reactor/hr-reactor-connect-patches.png",
|
|
7817
|
+
* width = 64,
|
|
7818
|
+
* height = 64,
|
|
7819
|
+
* variation_count = 12,
|
|
7820
|
+
* scale = 0.5
|
|
7821
|
+
* }
|
|
7822
|
+
* }
|
|
7641
7823
|
* }
|
|
7642
7824
|
* ```
|
|
7643
7825
|
*
|
|
@@ -8687,7 +8869,7 @@ interface UnitGroupSettings {
|
|
|
8687
8869
|
}
|
|
8688
8870
|
|
|
8689
8871
|
/**
|
|
8690
|
-
* It can be specified as a table with named or numbered keys, but not a mix of both.
|
|
8872
|
+
* It can be specified as a table with named or numbered keys, but not a mix of both. If this is specified as a table with numbered keys then the first value is the unit and the second is the spawn points.
|
|
8691
8873
|
*/
|
|
8692
8874
|
type UnitSpawnDefinition = {
|
|
8693
8875
|
|
|
@@ -8774,6 +8956,9 @@ type Vector = {
|
|
|
8774
8956
|
number
|
|
8775
8957
|
]
|
|
8776
8958
|
|
|
8959
|
+
/**
|
|
8960
|
+
* If this is specified as a three-element array then the array items are x, y and z, in that order.
|
|
8961
|
+
*/
|
|
8777
8962
|
type Vector3D = {
|
|
8778
8963
|
x: number,
|
|
8779
8964
|
y: number,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "factorio-types",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.46",
|
|
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",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"index.d.ts",
|
|
25
25
|
"dist/**/*.d.ts"
|
|
26
26
|
],
|
|
27
|
-
"factorioVersion": "1.1.
|
|
27
|
+
"factorioVersion": "1.1.101"
|
|
28
28
|
}
|