factorio-types 1.2.47 → 1.2.49
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 +39 -8
- package/dist/concepts.d.ts +29 -4
- package/dist/datacollection.d.ts +1 -1
- package/dist/defines.d.ts +1 -1
- package/dist/events.d.ts +6 -6
- package/dist/global.d.ts +1 -1
- package/dist/prototypes.d.ts +16 -13
- package/dist/types.d.ts +9 -3
- package/package.json +4 -4
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 2.0.
|
|
5
|
+
// Factorio version 2.0.66
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -89,7 +89,7 @@ interface LuaAchievementPrototype extends LuaPrototypeBase {
|
|
|
89
89
|
readonly minimum_damage?: float;
|
|
90
90
|
readonly minimum_distance?: double;
|
|
91
91
|
readonly minimum_energy_produced?: double;
|
|
92
|
-
readonly module?:
|
|
92
|
+
readonly module?: LuaItemPrototype[];
|
|
93
93
|
readonly more_than_manually?: boolean;
|
|
94
94
|
readonly not_to_kill?: LuaEntityPrototype;
|
|
95
95
|
/**
|
|
@@ -6587,7 +6587,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6587
6587
|
*/
|
|
6588
6588
|
play_note(this: void, instrument: uint, note: uint, stop_playing_sounds?: boolean): boolean;
|
|
6589
6589
|
/**
|
|
6590
|
-
* Registers the given tree in this
|
|
6590
|
+
* Registers the given tree in this agricultural tower.
|
|
6591
6591
|
*
|
|
6592
6592
|
* If the tree is not within range of the tower it will not be registered.
|
|
6593
6593
|
*
|
|
@@ -6633,15 +6633,15 @@ interface LuaEntity extends LuaControl {
|
|
|
6633
6633
|
request_to_open(this: void, force: ForceID, extra_time?: uint): void;
|
|
6634
6634
|
/**
|
|
6635
6635
|
* Revive a ghost, which turns it from a ghost into a real entity or tile.
|
|
6636
|
-
* @param table.return_item_request_proxy If `true` the function will return item request proxy as the third return value.
|
|
6637
6636
|
* @param table.raise_revive If true, and an entity ghost; {@link script_raised_revive | runtime:script_raised_revive} will be called. Else if true, and a tile ghost; {@link script_raised_set_tiles | runtime:script_raised_set_tiles} will be called.
|
|
6637
|
+
* @param table.overflow Items that would be deleted will be transferred to this inventory. Must be a script inventory or inventory of other entity. Inventory references obtained from proxy container are not allowed.
|
|
6638
6638
|
* @returns [0] - Any items the new real entity collided with or `nil` if the ghost could not be revived.
|
|
6639
6639
|
* @returns [1] - The revived entity if an entity ghost was successfully revived.
|
|
6640
|
-
* @returns [2] - The item request proxy if
|
|
6640
|
+
* @returns [2] - The item request proxy if one was created.
|
|
6641
6641
|
*/
|
|
6642
6642
|
revive(this: void, table: {
|
|
6643
|
-
return_item_request_proxy?: boolean;
|
|
6644
6643
|
raise_revive?: boolean;
|
|
6644
|
+
overflow?: LuaInventory;
|
|
6645
6645
|
}): LuaMultiReturn<[
|
|
6646
6646
|
Record<string, uint> | null,
|
|
6647
6647
|
LuaEntity | null,
|
|
@@ -6742,12 +6742,14 @@ interface LuaEntity extends LuaControl {
|
|
|
6742
6742
|
/**
|
|
6743
6743
|
* Revives a ghost silently, so the revival makes no sound and no smoke is created.
|
|
6744
6744
|
* @param table.raise_revive If true, and an entity ghost; {@link script_raised_revive | runtime:script_raised_revive} will be called. Else if true, and a tile ghost; {@link script_raised_set_tiles | runtime:script_raised_set_tiles} will be called.
|
|
6745
|
+
* @param table.overflow Items that would be deleted will be transferred to this inventory. Must be a script inventory or inventory of other entity. Inventory references obtained from proxy container are not allowed.
|
|
6745
6746
|
* @returns [0] - Any items the new real entity collided with or `nil` if the ghost could not be revived.
|
|
6746
6747
|
* @returns [1] - The revived entity if an entity ghost was successfully revived.
|
|
6747
|
-
* @returns [2] - The item request proxy.
|
|
6748
|
+
* @returns [2] - The item request proxy if one was created.
|
|
6748
6749
|
*/
|
|
6749
6750
|
silent_revive(this: void, table: {
|
|
6750
6751
|
raise_revive?: boolean;
|
|
6752
|
+
overflow?: LuaInventory;
|
|
6751
6753
|
}): LuaMultiReturn<[
|
|
6752
6754
|
ItemWithQualityCounts,
|
|
6753
6755
|
LuaEntity | null,
|
|
@@ -7869,6 +7871,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
7869
7871
|
get_inserter_rotation_speed(this: void, quality?: QualityID): double | null;
|
|
7870
7872
|
/**
|
|
7871
7873
|
* Gets the base size of the given inventory on this entity or `nil` if the given inventory doesn't exist.
|
|
7874
|
+
* @param quality Defaults to `"normal"`.
|
|
7872
7875
|
*/
|
|
7873
7876
|
get_inventory_size(this: void, index: defines.inventory, quality?: QualityID): uint | null;
|
|
7874
7877
|
/**
|
|
@@ -8389,6 +8392,14 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8389
8392
|
readonly held_items_offset?: float;
|
|
8390
8393
|
readonly held_items_spread?: float;
|
|
8391
8394
|
readonly hide_resistances?: boolean;
|
|
8395
|
+
/**
|
|
8396
|
+
* The definition of where and how the alt-mode icons of this entity should be drawn.
|
|
8397
|
+
*/
|
|
8398
|
+
readonly icon_draw_specification: IconDrawSpecification;
|
|
8399
|
+
/**
|
|
8400
|
+
* The icon positioning for inventories of this entity, if defined.
|
|
8401
|
+
*/
|
|
8402
|
+
readonly icons_positioning?: IconSequencePositioning[];
|
|
8392
8403
|
/**
|
|
8393
8404
|
* A vector of the gun prototypes of this car, spider vehicle, artillery wagon, or turret.
|
|
8394
8405
|
*/
|
|
@@ -9826,6 +9837,7 @@ interface LuaForce {
|
|
|
9826
9837
|
copy_from(this: void, force: ForceID): void;
|
|
9827
9838
|
/**
|
|
9828
9839
|
* Creates the given group if it doesn't already exist.
|
|
9840
|
+
* @param type Defaults to `defines.logistic_group_type.with_trash`.
|
|
9829
9841
|
*/
|
|
9830
9842
|
create_logistic_group(this: void, name: string, type?: defines.logistic_group_type): void;
|
|
9831
9843
|
/**
|
|
@@ -9841,6 +9853,7 @@ interface LuaForce {
|
|
|
9841
9853
|
}): LuaSpacePlatform | null;
|
|
9842
9854
|
/**
|
|
9843
9855
|
* Deletes the given logistic group if it exists.
|
|
9856
|
+
* @param type Defaults to `defines.logistic_group_type.with_trash`.
|
|
9844
9857
|
*/
|
|
9845
9858
|
delete_logistic_group(this: void, name: string, type?: defines.logistic_group_type): void;
|
|
9846
9859
|
/**
|
|
@@ -9962,10 +9975,12 @@ interface LuaForce {
|
|
|
9962
9975
|
get_linked_inventory(this: void, prototype: EntityID, link_id: uint): LuaInventory | null;
|
|
9963
9976
|
/**
|
|
9964
9977
|
* Gets the information about the given logistic group.
|
|
9978
|
+
* @param type Defaults to `defines.logistic_group_type.with_trash`.
|
|
9965
9979
|
*/
|
|
9966
9980
|
get_logistic_group(this: void, name: string, type?: defines.logistic_group_type): LogisticGroup | null;
|
|
9967
9981
|
/**
|
|
9968
9982
|
* Gets the names of the current logistic groups.
|
|
9983
|
+
* @param type Defaults to `defines.logistic_group_type.with_trash`.
|
|
9969
9984
|
*/
|
|
9970
9985
|
get_logistic_groups(this: void, type?: defines.logistic_group_type): string[];
|
|
9971
9986
|
get_spawn_position(this: void, surface: SurfaceIdentification): MapPosition;
|
|
@@ -10753,6 +10768,12 @@ interface LuaGameScript {
|
|
|
10753
10768
|
* @param player The player to unmute.
|
|
10754
10769
|
*/
|
|
10755
10770
|
unmute_player(this: void, player: PlayerIdentification): void;
|
|
10771
|
+
/**
|
|
10772
|
+
* Whether players who are not {@link admins | runtime:LuaPlayer::admin} can access all debug settings. Set this to false to disallow access to most debug settings for non-admins.
|
|
10773
|
+
*
|
|
10774
|
+
* The following debug settings are always available to all players: `"show-fps"`, `"show-clock"`, `"show-time-to-next-autosave"`, `"show-detailed-info"`, `"show-time-usage"`, `"show-entity-time-usage"`, `"show-gpu-time-usage"`, `"show-sprite-counts"`, `"show-particle-counts"`, `"show-collector-navmesh-time-usage"`, `"show-lua-object-statistics"`, `"show-heat-buffer-info"`, `"show-multiplayer-waiting-icon"`, `"show-multiplayer-statistics"`, `"show-multiplayer-server-name"`, `"show-debug-info-in-tooltips"`, `"show-resistances-in-tooltips-always"`, `"hide-mod-guis"`, `"show-tile-grid"`, `"show-blueprint-grid"`, `"show-intermediate-volume-of-working-sounds"`, `"show-decorative-names"`, `"allow-increased-zoom"`, `"show-train-no-path-details"`, `"show-entity-tick"`, `"show-update-tick"`
|
|
10775
|
+
*/
|
|
10776
|
+
allow_debug_settings: boolean;
|
|
10756
10777
|
/**
|
|
10757
10778
|
* If the tips are allowed to be activated in this scenario, it is false by default.
|
|
10758
10779
|
*
|
|
@@ -14232,6 +14253,8 @@ interface LuaPlayer extends LuaControl {
|
|
|
14232
14253
|
add_custom_alert(this: void, entity: LuaEntity, icon: SignalID, message: LocalisedString, show_on_map: boolean): void;
|
|
14233
14254
|
/**
|
|
14234
14255
|
* Adds a pin to this player for the given pin specification. Either entity, player, or surface and position must be defined.
|
|
14256
|
+
* @param table.preview_distance Defaults to `16`.
|
|
14257
|
+
* @param table.always_visible Defaults to `true`.
|
|
14235
14258
|
* @param table.entity The entity to pin.
|
|
14236
14259
|
* @param table.player The player to pin.
|
|
14237
14260
|
* @param table.surface The surface to create the pin on.
|
|
@@ -16124,6 +16147,10 @@ interface LuaRecord {
|
|
|
16124
16147
|
* Is this blueprint record a preview? A preview record must be synced by the player before entity and tile data can be read.
|
|
16125
16148
|
*/
|
|
16126
16149
|
readonly is_blueprint_preview: boolean;
|
|
16150
|
+
/**
|
|
16151
|
+
* Checks if this record is in a preview state.
|
|
16152
|
+
*/
|
|
16153
|
+
readonly is_preview: boolean;
|
|
16127
16154
|
/**
|
|
16128
16155
|
* The current count of mappers in the upgrade item.
|
|
16129
16156
|
*/
|
|
@@ -16277,6 +16304,10 @@ interface LuaRenderObject {
|
|
|
16277
16304
|
* Dash length of this line.
|
|
16278
16305
|
*/
|
|
16279
16306
|
dash_length: double;
|
|
16307
|
+
/**
|
|
16308
|
+
* Starting offset to apply to dashes of this line. Cannot be greater than dash_length + gap_length.
|
|
16309
|
+
*/
|
|
16310
|
+
dash_offset: double;
|
|
16280
16311
|
/**
|
|
16281
16312
|
* If this object is being drawn on the ground, under most entities and sprites.
|
|
16282
16313
|
*
|
|
@@ -18989,7 +19020,7 @@ interface BaseLuaSurfaceCreateEntityParams {
|
|
|
18989
19020
|
*/
|
|
18990
19021
|
'burner_fuel_inventory'?: BlueprintInventoryWithFilters;
|
|
18991
19022
|
/**
|
|
18992
|
-
* Cause entity / force. The entity or force that triggered the chain of events that led to this entity being created. Used for beams, projectiles, stickers, etc. so that the damage receiver can know which entity or force to retaliate against.
|
|
19023
|
+
* Cause entity / force. The entity or force that triggered the chain of events that led to this entity being created. Used for beams, projectiles, stickers, etc. so that the damage receiver can know which entity or force to retaliate against. Defaults to the value of `source`.
|
|
18993
19024
|
*/
|
|
18994
19025
|
'cause'?: LuaEntity | ForceID;
|
|
18995
19026
|
/**
|
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 2.0.
|
|
5
|
+
// Factorio version 2.0.66
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -52,8 +52,17 @@ interface AddRecordData {
|
|
|
52
52
|
* When `rail` is given, this can be provided to further narrow down direction from which that rail should be approached.
|
|
53
53
|
*/
|
|
54
54
|
rail_direction?: defines.rail_direction;
|
|
55
|
+
/**
|
|
56
|
+
* Defaults to `false`.
|
|
57
|
+
*/
|
|
55
58
|
temporary?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Defaults to `false`.
|
|
61
|
+
*/
|
|
56
62
|
created_by_interrupt?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Defaults to `true`.
|
|
65
|
+
*/
|
|
57
66
|
allows_unloading?: boolean;
|
|
58
67
|
wait_conditions?: WaitCondition[];
|
|
59
68
|
/**
|
|
@@ -3113,9 +3122,9 @@ interface GuiAnchor {
|
|
|
3113
3122
|
*/
|
|
3114
3123
|
names?: string[];
|
|
3115
3124
|
/**
|
|
3116
|
-
*
|
|
3125
|
+
* Defaults to `"only_real"`.
|
|
3117
3126
|
*/
|
|
3118
|
-
ghost_mode?:
|
|
3127
|
+
ghost_mode?: 'both' | 'only_ghosts' | 'only_real';
|
|
3119
3128
|
}
|
|
3120
3129
|
/**
|
|
3121
3130
|
* Used for specifying where a GUI arrow should point to.
|
|
@@ -3317,6 +3326,21 @@ type HeatSettingMode = 'at-least' | 'at-most' | 'exactly' | 'add' | 'remove';
|
|
|
3317
3326
|
* All base prototype types.
|
|
3318
3327
|
*/
|
|
3319
3328
|
type IDType = 'custom-input' | 'equipment-grid' | 'entity' | 'particle' | 'item' | 'collision-layer' | 'airborne-pollutant' | 'tile' | 'decorative' | 'recipe-category' | 'item-group' | 'item-subgroup' | 'recipe' | 'fluid' | 'ammo-category' | 'fuel-category' | 'resource-category' | 'technology' | 'noise-function' | 'noise-expression' | 'autoplace-control' | 'equipment' | 'damage-type' | 'virtual-signal' | 'achievement' | 'module-category' | 'equipment-category' | 'mod-setting' | 'trivial-smoke' | 'asteroid-chunk' | 'quality' | 'surface-property' | 'procession-layer-inheritance-group' | 'procession' | 'space-location' | 'space-connection' | 'active-trigger' | 'shortcut' | 'burner-usage' | 'surface' | 'mod-data' | 'custom-event';
|
|
3329
|
+
interface IconDrawSpecification {
|
|
3330
|
+
shift: Vector;
|
|
3331
|
+
scale: float;
|
|
3332
|
+
scale_for_many: float;
|
|
3333
|
+
render_layer?: 'entity-info-icon-below' | 'entity-info-icon-above' | 'air-entity-info-icon';
|
|
3334
|
+
}
|
|
3335
|
+
interface IconSequencePositioning {
|
|
3336
|
+
inventory_index: defines.inventory;
|
|
3337
|
+
max_icons_per_row: uint8;
|
|
3338
|
+
max_icon_rows: uint8;
|
|
3339
|
+
shift: Vector;
|
|
3340
|
+
scale: float;
|
|
3341
|
+
separation_multiplier: float;
|
|
3342
|
+
multi_row_initial_height_modifier: float;
|
|
3343
|
+
}
|
|
3320
3344
|
/**
|
|
3321
3345
|
* A single filter used by an infinity-filters instance.
|
|
3322
3346
|
*/
|
|
@@ -3851,7 +3875,7 @@ type ItemPrototypeFlag = /**
|
|
|
3851
3875
|
* Makes construction bots prefer this item when building the entity specified by its `place_result`.
|
|
3852
3876
|
*/
|
|
3853
3877
|
'primary-place-result' | /**
|
|
3854
|
-
* Allows the item to be opened by the player, firing the
|
|
3878
|
+
* Allows the item to be opened by the player, firing the {@link on_mod_item_opened | runtime:on_mod_item_opened} event.
|
|
3855
3879
|
*/
|
|
3856
3880
|
'mod-openable' | /**
|
|
3857
3881
|
* 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.
|
|
@@ -6916,6 +6940,7 @@ interface PlaceAsTileResult {
|
|
|
6916
6940
|
condition_size: uint;
|
|
6917
6941
|
condition: CollisionMask;
|
|
6918
6942
|
invert: boolean;
|
|
6943
|
+
tile_condition: LuaTilePrototype[];
|
|
6919
6944
|
}
|
|
6920
6945
|
interface PlatformSchedule {
|
|
6921
6946
|
/**
|
package/dist/datacollection.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.66
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
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 2.0.
|
|
5
|
+
// Factorio version 2.0.66
|
|
6
6
|
// API version 6
|
|
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 2.0.
|
|
5
|
+
// Factorio version 2.0.66
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -4511,7 +4511,7 @@ interface on_tower_mined_plant {
|
|
|
4511
4511
|
tower: LuaEntity;
|
|
4512
4512
|
}
|
|
4513
4513
|
/**
|
|
4514
|
-
* Called before an agricultural tower
|
|
4514
|
+
* Called before an agricultural tower plants a seed.
|
|
4515
4515
|
*/
|
|
4516
4516
|
interface on_tower_planted_seed {
|
|
4517
4517
|
/**
|
|
@@ -4519,7 +4519,7 @@ interface on_tower_planted_seed {
|
|
|
4519
4519
|
*/
|
|
4520
4520
|
name: defines.events;
|
|
4521
4521
|
/**
|
|
4522
|
-
* The plant
|
|
4522
|
+
* The plant that was planted.
|
|
4523
4523
|
*/
|
|
4524
4524
|
plant: LuaEntity;
|
|
4525
4525
|
/**
|
|
@@ -4531,7 +4531,7 @@ interface on_tower_planted_seed {
|
|
|
4531
4531
|
*/
|
|
4532
4532
|
tick: uint;
|
|
4533
4533
|
/**
|
|
4534
|
-
* The tower that
|
|
4534
|
+
* The tower that did the planting.
|
|
4535
4535
|
*/
|
|
4536
4536
|
tower: LuaEntity;
|
|
4537
4537
|
}
|
|
@@ -4544,7 +4544,7 @@ interface on_tower_pre_mined_plant {
|
|
|
4544
4544
|
*/
|
|
4545
4545
|
name: defines.events;
|
|
4546
4546
|
/**
|
|
4547
|
-
* The plant
|
|
4547
|
+
* The plant that is about to be mined.
|
|
4548
4548
|
*/
|
|
4549
4549
|
plant: LuaEntity;
|
|
4550
4550
|
/**
|
|
@@ -4552,7 +4552,7 @@ interface on_tower_pre_mined_plant {
|
|
|
4552
4552
|
*/
|
|
4553
4553
|
tick: uint;
|
|
4554
4554
|
/**
|
|
4555
|
-
* The tower that
|
|
4555
|
+
* The tower that is about to do the mining.
|
|
4556
4556
|
*/
|
|
4557
4557
|
tower: LuaEntity;
|
|
4558
4558
|
}
|
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 2.0.
|
|
5
|
+
// Factorio version 2.0.66
|
|
6
6
|
// API version 6
|
|
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 2.0.
|
|
5
|
+
// Factorio version 2.0.66
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -1531,10 +1531,6 @@ interface CharacterPrototype extends EntityWithOwnerPrototype {
|
|
|
1531
1531
|
damage_hit_tint: Color;
|
|
1532
1532
|
distance_per_frame: double;
|
|
1533
1533
|
drop_item_distance: uint32;
|
|
1534
|
-
/**
|
|
1535
|
-
* The sound played when the character eats (fish for example).
|
|
1536
|
-
*/
|
|
1537
|
-
eat: Sound;
|
|
1538
1534
|
/**
|
|
1539
1535
|
* Must be >= 0.
|
|
1540
1536
|
*/
|
|
@@ -1569,7 +1565,7 @@ interface CharacterPrototype extends EntityWithOwnerPrototype {
|
|
|
1569
1565
|
/**
|
|
1570
1566
|
* The sound played when the character's health is low.
|
|
1571
1567
|
*/
|
|
1572
|
-
heartbeat
|
|
1568
|
+
heartbeat?: Sound;
|
|
1573
1569
|
/**
|
|
1574
1570
|
* Number of slots in the main inventory. May be 0.
|
|
1575
1571
|
*/
|
|
@@ -2016,6 +2012,8 @@ interface CraftingMachinePrototype extends EntityWithOwnerPrototype {
|
|
|
2016
2012
|
fast_transfer_modules_into_module_slots_only?: boolean;
|
|
2017
2013
|
/**
|
|
2018
2014
|
* The crafting machine's fluid boxes. If an assembling machine has fluid boxes *and* {@link AssemblingMachinePrototype::fluid_boxes_off_when_no_fluid_recipe | prototype:AssemblingMachinePrototype::fluid_boxes_off_when_no_fluid_recipe} is true, the assembling machine can only be rotated when a recipe consuming or producing fluid is set, or if it has one of the other properties listed at the top of this page.
|
|
2015
|
+
*
|
|
2016
|
+
* For assembling machines, any {@link filters | prototype:FluidBox::filter} set on the fluidboxes are ignored.
|
|
2019
2017
|
* @example ```
|
|
2020
2018
|
fluid_boxes =
|
|
2021
2019
|
{
|
|
@@ -3228,7 +3226,7 @@ interface EntityPrototype extends Prototype {
|
|
|
3228
3226
|
*/
|
|
3229
3227
|
icon?: FileName;
|
|
3230
3228
|
/**
|
|
3231
|
-
* Used to specify where and how
|
|
3229
|
+
* Used to specify where and how the alt-mode icons should be drawn.
|
|
3232
3230
|
* @example ```
|
|
3233
3231
|
icon_draw_specification = {shift = {0, 0.5}, scale = 0.75, scale_for_many = 0.5, render_layer = "entity-info-icon"}
|
|
3234
3232
|
```
|
|
@@ -5062,7 +5060,7 @@ interface LabPrototype extends EntityWithOwnerPrototype {
|
|
|
5062
5060
|
science_pack_drain_rate_percent?: uint8;
|
|
5063
5061
|
trash_inventory_size?: ItemStackIndex;
|
|
5064
5062
|
/**
|
|
5065
|
-
* Whether the {@link QualityPrototype::science_pack_drain_multiplier | prototype:QualityPrototype::science_pack_drain_multiplier} of the quality of
|
|
5063
|
+
* Whether the {@link QualityPrototype::science_pack_drain_multiplier | prototype:QualityPrototype::science_pack_drain_multiplier} of the quality of this lab should affect how much science is consumed to research one unit of technology.
|
|
5066
5064
|
*/
|
|
5067
5065
|
uses_quality_drain_modifier?: boolean;
|
|
5068
5066
|
}
|
|
@@ -5416,11 +5414,14 @@ interface LoaderPrototype extends TransportBeltConnectablePrototype {
|
|
|
5416
5414
|
* If filters are per lane. Can only be set to true if filter_count is equal to 2.
|
|
5417
5415
|
*/
|
|
5418
5416
|
per_lane_filters?: boolean;
|
|
5417
|
+
/**
|
|
5418
|
+
* When set, this loader will respect the same automated insertion limits as inserters do, instead of inserting up to the full ingredient stack capacity.
|
|
5419
|
+
*/
|
|
5419
5420
|
respect_insert_limits?: boolean;
|
|
5420
5421
|
structure?: LoaderStructure;
|
|
5421
5422
|
structure_render_layer?: RenderLayer;
|
|
5422
5423
|
/**
|
|
5423
|
-
* When set, loader will ignore items for which there is not enough to create a full belt stack. Relevant only when loader can create belt stacks.
|
|
5424
|
+
* When set, this loader will ignore items for which there is not enough to create a full belt stack. Relevant only when loader can create belt stacks.
|
|
5424
5425
|
*/
|
|
5425
5426
|
wait_for_full_stack?: boolean;
|
|
5426
5427
|
}
|
|
@@ -6575,6 +6576,8 @@ interface QualityPrototype extends Prototype {
|
|
|
6575
6576
|
range_multiplier?: double;
|
|
6576
6577
|
/**
|
|
6577
6578
|
* Must be in range `[0, 1]`.
|
|
6579
|
+
*
|
|
6580
|
+
* Only affects labs with {@link LabPrototype::uses_quality_drain_modifier | prototype:LabPrototype::uses_quality_drain_modifier} set.
|
|
6578
6581
|
*/
|
|
6579
6582
|
science_pack_drain_multiplier?: float;
|
|
6580
6583
|
/**
|
|
@@ -8439,7 +8442,7 @@ interface SpaceLocationPrototype extends Prototype {
|
|
|
8439
8442
|
asteroid_spawn_influence?: double;
|
|
8440
8443
|
auto_save_on_first_trip?: boolean;
|
|
8441
8444
|
/**
|
|
8442
|
-
* Distance from the
|
|
8445
|
+
* Distance from the sun in map coordinates.
|
|
8443
8446
|
*/
|
|
8444
8447
|
distance: double;
|
|
8445
8448
|
/**
|
|
@@ -8479,7 +8482,7 @@ interface SpaceLocationPrototype extends Prototype {
|
|
|
8479
8482
|
*/
|
|
8480
8483
|
magnitude?: double;
|
|
8481
8484
|
/**
|
|
8482
|
-
* Angle in relation to the
|
|
8485
|
+
* Angle in relation to the sun.
|
|
8483
8486
|
*/
|
|
8484
8487
|
orientation: RealOrientation;
|
|
8485
8488
|
/**
|
|
@@ -8504,7 +8507,7 @@ interface SpaceLocationPrototype extends Prototype {
|
|
|
8504
8507
|
*/
|
|
8505
8508
|
starmap_icon?: FileName;
|
|
8506
8509
|
/**
|
|
8507
|
-
* Orientation of the starmap icon, defaults to pointing towards the
|
|
8510
|
+
* Orientation of the starmap icon, defaults to pointing towards the sun.
|
|
8508
8511
|
*/
|
|
8509
8512
|
starmap_icon_orientation?: RealOrientation;
|
|
8510
8513
|
/**
|
|
@@ -9329,7 +9332,7 @@ interface TilePrototype extends Prototype {
|
|
|
9329
9332
|
* If items dropped on this tile are destroyed.
|
|
9330
9333
|
*/
|
|
9331
9334
|
destroys_dropped_items?: boolean;
|
|
9332
|
-
driving_sound?:
|
|
9335
|
+
driving_sound?: InterruptibleSound;
|
|
9333
9336
|
/**
|
|
9334
9337
|
* Triggers when a foundation tile is destroyed by an asteroid.
|
|
9335
9338
|
*/
|
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.66
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -5352,7 +5352,7 @@ interface IconData {
|
|
|
5352
5352
|
tint?: Color;
|
|
5353
5353
|
}
|
|
5354
5354
|
/**
|
|
5355
|
-
* Specification of where and how
|
|
5355
|
+
* Specification of where and how the alt-mode icons of entities should be drawn.
|
|
5356
5356
|
*/
|
|
5357
5357
|
interface IconDrawSpecification {
|
|
5358
5358
|
/**
|
|
@@ -5612,7 +5612,7 @@ type ItemPrototypeFlags = (/**
|
|
|
5612
5612
|
* Item will be preferred by construction bots when building the entity specified by the item's {@link place_result | prototype:ItemPrototype::place_result}.
|
|
5613
5613
|
*/
|
|
5614
5614
|
'primary-place-result' | /**
|
|
5615
|
-
*
|
|
5615
|
+
* Allows the item to be opened by the player, firing the {@link on_mod_item_opened | runtime:on_mod_item_opened} event.
|
|
5616
5616
|
*/
|
|
5617
5617
|
'mod-openable' | /**
|
|
5618
5618
|
* Item is deleted when removed from the cursor by pressing `Q` ("clear cursor"). Used for example by the copy/paste tools.
|
|
@@ -9947,6 +9947,12 @@ interface SpriteSheet extends SpriteParameters {
|
|
|
9947
9947
|
* Same as `dice` above, but this specifies only how many slices there are on the y axis.
|
|
9948
9948
|
*/
|
|
9949
9949
|
dice_y?: SpriteSizeType;
|
|
9950
|
+
/**
|
|
9951
|
+
* Only loaded, and mandatory if `layers` and `filenames` are not defined.
|
|
9952
|
+
*
|
|
9953
|
+
* The path to the sprite file to use.
|
|
9954
|
+
*/
|
|
9955
|
+
filename?: FileName;
|
|
9950
9956
|
filenames?: FileName[];
|
|
9951
9957
|
/**
|
|
9952
9958
|
* If this property is present, all SpriteSheet definitions have to be placed as entries in the array, and they will all be loaded from there. `layers` may not be an empty table. Each definition in the array may also have the `layers` property.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "factorio-types",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.49",
|
|
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",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"@types/node": "20.14.9",
|
|
16
16
|
"ts-node": "10.9.2",
|
|
17
17
|
"typescript": "5.5.2",
|
|
18
|
-
"typescript-to-lua": "1.26.0"
|
|
18
|
+
"typescript-to-lua": "^1.26.0"
|
|
19
19
|
},
|
|
20
20
|
"files": [
|
|
21
21
|
"index.d.ts",
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
"src/**/*.d.ts",
|
|
24
24
|
"dist/**/*.d.ts"
|
|
25
25
|
],
|
|
26
|
-
"factorioVersion": "2.0.
|
|
26
|
+
"factorioVersion": "2.0.66",
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"lua-types": "^2.13.1"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"typescript-to-lua": "1.26.0"
|
|
31
|
+
"typescript-to-lua": "^1.26.0"
|
|
32
32
|
}
|
|
33
33
|
}
|