factorio-types 1.2.56 → 1.2.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/classes.d.ts +88 -47
- package/dist/concepts.d.ts +497 -31
- package/dist/datacollection.d.ts +1 -1
- package/dist/defines.d.ts +5 -5
- package/dist/events.d.ts +443 -443
- package/dist/global.d.ts +1 -1
- package/dist/prototypes.d.ts +263 -17
- package/dist/types.d.ts +78 -29
- package/package.json +2 -2
package/dist/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.77
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -4377,7 +4377,7 @@ interface LuaBootstrap {
|
|
|
4377
4377
|
* @param tick The nth-tick(s) to invoke the handler on. Passing `nil` as the only parameter will unregister all nth-tick handlers.
|
|
4378
4378
|
* @param handler The handler to run. Passing `nil` will unregister it for the provided nth-tick(s).
|
|
4379
4379
|
*/
|
|
4380
|
-
on_nth_tick(this: void, tick:
|
|
4380
|
+
on_nth_tick(this: void, tick: MapTick | MapTick[] | nil, handler: ((this: void, arg0: NthTickEventData) => any) | nil): void;
|
|
4381
4381
|
/**
|
|
4382
4382
|
* @param table.entity The entity that was built.
|
|
4383
4383
|
*/
|
|
@@ -4530,7 +4530,7 @@ interface LuaBootstrap {
|
|
|
4530
4530
|
* Depending on when a given object is destroyed, {@link on_object_destroyed | runtime:on_object_destroyed} will either be fired at the end of the current tick or at the end of the next tick.
|
|
4531
4531
|
* @param object The object to register.
|
|
4532
4532
|
* @returns [0] - The registration number. It is used to identify the object in the {@link on_object_destroyed | runtime:on_object_destroyed} event.
|
|
4533
|
-
* @returns [1] - The {@link useful identifier | runtime:RegistrationTarget} of the object if it has one. This identifier is specific to the object type, for example for trains it is the value {@link LuaTrain::id | runtime:LuaTrain::id}.
|
|
4533
|
+
* @returns [1] - The {@link useful identifier | runtime:RegistrationTarget} of the object if it has one or `0` if it doesn't. This identifier is specific to the object type, for example for trains it is the value {@link LuaTrain::id | runtime:LuaTrain::id}.
|
|
4534
4534
|
* @returns [2] - Type of the target object.
|
|
4535
4535
|
*/
|
|
4536
4536
|
register_on_object_destroyed(this: void, object: RegistrationTarget): LuaMultiReturn<[
|
|
@@ -5362,7 +5362,7 @@ interface LuaControl {
|
|
|
5362
5362
|
/**
|
|
5363
5363
|
* The current crafting queue items.
|
|
5364
5364
|
*/
|
|
5365
|
-
readonly crafting_queue
|
|
5365
|
+
readonly crafting_queue?: CraftingQueueItem[];
|
|
5366
5366
|
/**
|
|
5367
5367
|
* The crafting queue progress in the range `[0-1]`. `0` when no recipe is being crafted.
|
|
5368
5368
|
*/
|
|
@@ -5453,7 +5453,7 @@ interface LuaControl {
|
|
|
5453
5453
|
*/
|
|
5454
5454
|
readonly loot_pickup_distance: double;
|
|
5455
5455
|
/**
|
|
5456
|
-
* Current mining state.
|
|
5456
|
+
* Current mining state. Will error if written to with a {@link controller_type | runtime:LuaPlayer::controller_type} other than `character`, `god`, or `editor`.
|
|
5457
5457
|
*
|
|
5458
5458
|
* When the player isn't mining tiles the player will mine whatever entity is currently selected. See {@link LuaControl::selected | runtime:LuaControl::selected} and {@link LuaControl::update_selected_entity | runtime:LuaControl::update_selected_entity}.
|
|
5459
5459
|
*/
|
|
@@ -6006,7 +6006,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6006
6006
|
/**
|
|
6007
6007
|
* Upgrades this entity in place if it's marked to be upgraded.
|
|
6008
6008
|
* @returns [0] - The first upgraded entity - `nil` if this entity is not marked for upgrade.
|
|
6009
|
-
* @returns [1] -
|
|
6009
|
+
* @returns [1] - When upgrading underground belts, the other underground belt end that was also upgraded - `nil` if this entity is not marked for upgrade.
|
|
6010
6010
|
*/
|
|
6011
6011
|
apply_upgrade(this: void): LuaMultiReturn<[
|
|
6012
6012
|
LuaEntity | null,
|
|
@@ -6081,7 +6081,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6081
6081
|
* @param by_player If provided, the copying is done 'as' this player and {@link on_entity_settings_pasted | runtime:on_entity_settings_pasted} is triggered.
|
|
6082
6082
|
* @returns Any items removed from this entity as a result of copying the settings.
|
|
6083
6083
|
*/
|
|
6084
|
-
copy_settings(this: void, entity: LuaEntity, by_player?: PlayerIdentification):
|
|
6084
|
+
copy_settings(this: void, entity: LuaEntity, by_player?: PlayerIdentification): ItemWithQualityCount[];
|
|
6085
6085
|
/**
|
|
6086
6086
|
* Creates the same smoke that is created when you place a building by hand.
|
|
6087
6087
|
*
|
|
@@ -6690,7 +6690,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6690
6690
|
raise_revive?: boolean;
|
|
6691
6691
|
overflow?: LuaInventory;
|
|
6692
6692
|
}): LuaMultiReturn<[
|
|
6693
|
-
|
|
6693
|
+
ItemWithQualityCount[] | null,
|
|
6694
6694
|
LuaEntity | null,
|
|
6695
6695
|
LuaEntity | null
|
|
6696
6696
|
]>;
|
|
@@ -6793,7 +6793,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6793
6793
|
* @param quality The quality. If not provided `normal` is used.
|
|
6794
6794
|
* @returns Any items removed from this entity as a result of setting the recipe.
|
|
6795
6795
|
*/
|
|
6796
|
-
set_recipe(this: void, recipe?: RecipeID, quality?: QualityID):
|
|
6796
|
+
set_recipe(this: void, recipe?: RecipeID, quality?: QualityID): ItemWithQualityCount[];
|
|
6797
6797
|
/**
|
|
6798
6798
|
* Revives a ghost silently, so the revival makes no sound and no smoke is created.
|
|
6799
6799
|
* @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.
|
|
@@ -6806,7 +6806,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6806
6806
|
raise_revive?: boolean;
|
|
6807
6807
|
overflow?: LuaInventory;
|
|
6808
6808
|
}): LuaMultiReturn<[
|
|
6809
|
-
|
|
6809
|
+
ItemWithQualityCount[],
|
|
6810
6810
|
LuaEntity | null,
|
|
6811
6811
|
LuaEntity | null
|
|
6812
6812
|
]>;
|
|
@@ -6848,7 +6848,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6848
6848
|
/**
|
|
6849
6849
|
* Deactivating an entity will stop all its operations (car will stop moving, inserters will stop working, fish will stop moving etc).
|
|
6850
6850
|
*
|
|
6851
|
-
* Reading from this returns `false` if the entity is deactivated in at least one of the following ways: {@link by script | runtime:LuaEntity::disabled_by_script}, {@link by circuit network | runtime:LuaEntity::disabled_by_control_behavior}, {@link by recipe | runtime:LuaEntity::disabled_by_recipe}, {@link by freezing | runtime:LuaEntity::frozen}, or by deconstruction.
|
|
6851
|
+
* Reading from this returns `false` if the entity is deactivated in at least one of the following ways: {@link by script | runtime:LuaEntity::disabled_by_script}, {@link by circuit network | runtime:LuaEntity::disabled_by_control_behavior}, {@link by recipe | runtime:LuaEntity::disabled_by_recipe}, {@link by freezing | runtime:LuaEntity::frozen}, or by being marked for deconstruction.
|
|
6852
6852
|
*
|
|
6853
6853
|
* Writing to this is deprecated and affects only the {@link disabled_by_script | runtime:LuaEntity::disabled_by_script} state.
|
|
6854
6854
|
*
|
|
@@ -7371,7 +7371,7 @@ interface LuaEntity extends LuaControl {
|
|
|
7371
7371
|
/**
|
|
7372
7372
|
* Items this ghost will request when revived or items this item request proxy is requesting.
|
|
7373
7373
|
*/
|
|
7374
|
-
readonly item_requests:
|
|
7374
|
+
readonly item_requests: ItemWithQualityCount[];
|
|
7375
7375
|
/**
|
|
7376
7376
|
* The number of units killed by this turret, artillery turret, or artillery wagon.
|
|
7377
7377
|
*/
|
|
@@ -8251,6 +8251,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8251
8251
|
* The value in the dictionary is meaningless and exists just to allow for easy lookup.
|
|
8252
8252
|
*/
|
|
8253
8253
|
readonly crafting_categories?: Record<string, true>;
|
|
8254
|
+
readonly crafting_speed_quality_multiplier: LuaTable<QualityID, double>;
|
|
8254
8255
|
/**
|
|
8255
8256
|
* The crane energy usage of this agricultural tower prototype.
|
|
8256
8257
|
*/
|
|
@@ -8327,6 +8328,10 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8327
8328
|
*/
|
|
8328
8329
|
readonly drawing_box_vertical_extension: double;
|
|
8329
8330
|
readonly drop_item_distance?: uint32;
|
|
8331
|
+
/**
|
|
8332
|
+
* If this mining drill puts full belt stacks onto belts.
|
|
8333
|
+
*/
|
|
8334
|
+
readonly drops_full_belt_stacks?: boolean;
|
|
8330
8335
|
readonly dying_explosion?: ExplosionDefinition[];
|
|
8331
8336
|
/**
|
|
8332
8337
|
* The dying time of this corpse prototype.
|
|
@@ -8373,6 +8378,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8373
8378
|
* The direct energy usage of this entity, if any.
|
|
8374
8379
|
*/
|
|
8375
8380
|
readonly energy_usage?: double;
|
|
8381
|
+
readonly energy_usage_quality_multiplier: LuaTable<QualityID, double>;
|
|
8376
8382
|
readonly energy_usage_quality_scaling?: float;
|
|
8377
8383
|
/**
|
|
8378
8384
|
* The engine starting speed for this rocket silo rocket prototype.
|
|
@@ -8802,8 +8808,11 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8802
8808
|
readonly mining_speed?: double;
|
|
8803
8809
|
/**
|
|
8804
8810
|
* The module inventory size. `nil` if this entity doesn't support modules.
|
|
8811
|
+
*
|
|
8812
|
+
* Returns the inventory size if this entity is of normal quality. Use {@link LuaEntityPrototype::get_inventory_size | runtime:LuaEntityPrototype::get_inventory_size} for other qualities.
|
|
8805
8813
|
*/
|
|
8806
8814
|
readonly module_inventory_size?: uint32;
|
|
8815
|
+
readonly module_slots_quality_bonus: LuaTable<QualityID, ItemStackIndex>;
|
|
8807
8816
|
/**
|
|
8808
8817
|
* Whether this unit prototype can move while shooting.
|
|
8809
8818
|
*/
|
|
@@ -8840,8 +8849,12 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8840
8849
|
* The pumping speed of this offshore pump or normal pump. This property is deprecated in favor of {@link LuaEntityPrototype::get_pumping_speed | runtime:LuaEntityPrototype::get_pumping_speed} and should not be used.
|
|
8841
8850
|
*/
|
|
8842
8851
|
readonly pumping_speed?: double;
|
|
8852
|
+
readonly quality_affects_capacity?: boolean;
|
|
8853
|
+
readonly quality_affects_energy_usage?: boolean;
|
|
8854
|
+
readonly quality_affects_inventory_size?: boolean;
|
|
8843
8855
|
readonly quality_affects_mining_radius?: boolean;
|
|
8844
8856
|
readonly quality_affects_module_slots?: boolean;
|
|
8857
|
+
readonly quality_affects_supply_area_distance?: boolean;
|
|
8845
8858
|
/**
|
|
8846
8859
|
* The radar range of this unit prototype.
|
|
8847
8860
|
*/
|
|
@@ -8897,6 +8910,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8897
8910
|
* The revenge attack parameters for this entity, if any. These attack parameters are used in addition to {@link LuaEntityPrototype::attack_parameters | runtime:LuaEntityPrototype::attack_parameters} if the entity is attacking a target that has previously dealt damage to the entity.
|
|
8898
8911
|
*/
|
|
8899
8912
|
readonly revenge_attack_parameters?: AttackParameters;
|
|
8913
|
+
readonly reversing_power_modifier?: double;
|
|
8900
8914
|
readonly rewire_neighbours_when_destroying: boolean;
|
|
8901
8915
|
/**
|
|
8902
8916
|
* The rising speed for this rocket silo rocket prototype.
|
|
@@ -9088,6 +9102,10 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
9088
9102
|
*/
|
|
9089
9103
|
readonly uses_force_mining_productivity_bonus?: boolean;
|
|
9090
9104
|
readonly uses_inserter_stack_size_bonus?: boolean;
|
|
9105
|
+
/**
|
|
9106
|
+
* If this lab uses the quality drain modifier when consuming science packs.
|
|
9107
|
+
*/
|
|
9108
|
+
readonly uses_quality_drain_modifier: boolean;
|
|
9091
9109
|
/**
|
|
9092
9110
|
* Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
|
9093
9111
|
*/
|
|
@@ -9328,7 +9346,7 @@ interface LuaEquipmentGrid {
|
|
|
9328
9346
|
* @param by_player If provided, the action is done 'as' this player and {@link on_player_removed_equipment | runtime:on_player_removed_equipment} is triggered.
|
|
9329
9347
|
* @returns List of the equipment that has been removed.
|
|
9330
9348
|
*/
|
|
9331
|
-
take_all(this: void, by_player?: PlayerIdentification):
|
|
9349
|
+
take_all(this: void, by_player?: PlayerIdentification): ItemWithQualityCount[];
|
|
9332
9350
|
/**
|
|
9333
9351
|
* The total energy stored in all batteries in the equipment grid.
|
|
9334
9352
|
*/
|
|
@@ -9870,6 +9888,7 @@ interface LuaFluidPrototype extends LuaPrototypeBase {
|
|
|
9870
9888
|
* Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
|
9871
9889
|
*/
|
|
9872
9890
|
readonly valid: boolean;
|
|
9891
|
+
readonly visualization_color: Color;
|
|
9873
9892
|
}
|
|
9874
9893
|
/**
|
|
9875
9894
|
* Prototype of a font.
|
|
@@ -10201,7 +10220,7 @@ interface LuaForce {
|
|
|
10201
10220
|
*/
|
|
10202
10221
|
reset_recipes(this: void): void;
|
|
10203
10222
|
/**
|
|
10204
|
-
* Load the original versions of technologies from prototypes. Preserves research state of technologies.
|
|
10223
|
+
* Load the original versions of technologies from prototypes. Preserves research, enabled and visible_when_disabled state of technologies.
|
|
10205
10224
|
*/
|
|
10206
10225
|
reset_technologies(this: void): void;
|
|
10207
10226
|
/**
|
|
@@ -12560,7 +12579,7 @@ interface LuaInventory {
|
|
|
12560
12579
|
* Get counts of all items in this inventory.
|
|
12561
12580
|
* @returns List of all items in the inventory.
|
|
12562
12581
|
*/
|
|
12563
|
-
get_contents(this: void):
|
|
12582
|
+
get_contents(this: void): ItemWithQualityCount[];
|
|
12564
12583
|
/**
|
|
12565
12584
|
* Gets the filter for the given item stack index.
|
|
12566
12585
|
* @param index The item stack index
|
|
@@ -12983,7 +13002,7 @@ interface LuaItemCommon {
|
|
|
12983
13002
|
/**
|
|
12984
13003
|
* List of raw materials required to build this blueprint.
|
|
12985
13004
|
*/
|
|
12986
|
-
readonly cost_to_build:
|
|
13005
|
+
readonly cost_to_build: ItemWithQualityCount[];
|
|
12987
13006
|
/**
|
|
12988
13007
|
* The custom description this item-with-tags. This is shown over the normal item description if this is set to a non-empty value.
|
|
12989
13008
|
*/
|
|
@@ -13761,7 +13780,7 @@ interface LuaLogisticNetwork {
|
|
|
13761
13780
|
* @param member Logistic members to check. If not given, gives item counts for the entire network.
|
|
13762
13781
|
* @returns List of all items in the network.
|
|
13763
13782
|
*/
|
|
13764
|
-
get_contents(this: void, member?: 'storage' | 'providers'):
|
|
13783
|
+
get_contents(this: void, member?: 'storage' | 'providers'): ItemWithQualityCount[];
|
|
13765
13784
|
/**
|
|
13766
13785
|
* Count given or all items in the network or given members.
|
|
13767
13786
|
* @param item Item name to count. If not given, gives counts of all items in the network.
|
|
@@ -13841,7 +13860,7 @@ interface LuaLogisticNetwork {
|
|
|
13841
13860
|
*/
|
|
13842
13861
|
readonly cells: LuaLogisticCell[];
|
|
13843
13862
|
/**
|
|
13844
|
-
* All construction robots in this logistic network.
|
|
13863
|
+
* All currently deployed construction robots in this logistic network.
|
|
13845
13864
|
*/
|
|
13846
13865
|
readonly construction_robots: LuaEntity[];
|
|
13847
13866
|
/**
|
|
@@ -13865,7 +13884,7 @@ interface LuaLogisticNetwork {
|
|
|
13865
13884
|
*/
|
|
13866
13885
|
readonly logistic_members: LuaEntity[];
|
|
13867
13886
|
/**
|
|
13868
|
-
* All logistic robots in this logistic network.
|
|
13887
|
+
* All currently deployed logistic robots in this logistic network.
|
|
13869
13888
|
*/
|
|
13870
13889
|
readonly logistic_robots: LuaEntity[];
|
|
13871
13890
|
/**
|
|
@@ -13901,7 +13920,7 @@ interface LuaLogisticNetwork {
|
|
|
13901
13920
|
*/
|
|
13902
13921
|
readonly robot_limit: uint32;
|
|
13903
13922
|
/**
|
|
13904
|
-
* All robots in this logistic network.
|
|
13923
|
+
* All currently deployed robots in this logistic network.
|
|
13905
13924
|
*/
|
|
13906
13925
|
readonly robots: LuaEntity[];
|
|
13907
13926
|
/**
|
|
@@ -13986,13 +14005,13 @@ interface LuaLogisticPoint {
|
|
|
13986
14005
|
*/
|
|
13987
14006
|
readonly sections_count: uint32;
|
|
13988
14007
|
/**
|
|
13989
|
-
* Items targeted to be dropped off into this logistic point by robots.
|
|
14008
|
+
* Items targeted to be dropped off into this logistic point by robots or cargo pods.
|
|
13990
14009
|
*/
|
|
13991
|
-
readonly targeted_items_deliver:
|
|
14010
|
+
readonly targeted_items_deliver: ItemWithQualityCount[];
|
|
13992
14011
|
/**
|
|
13993
14012
|
* Items targeted to be picked up from this logistic point by robots.
|
|
13994
14013
|
*/
|
|
13995
|
-
readonly targeted_items_pickup:
|
|
14014
|
+
readonly targeted_items_pickup: ItemWithQualityCount[];
|
|
13996
14015
|
/**
|
|
13997
14016
|
* Whether this logistic point is set to trash unrequested items.
|
|
13998
14017
|
*/
|
|
@@ -16332,7 +16351,7 @@ interface LuaRecord {
|
|
|
16332
16351
|
/**
|
|
16333
16352
|
* List of raw materials required to build this blueprint.
|
|
16334
16353
|
*/
|
|
16335
|
-
readonly cost_to_build:
|
|
16354
|
+
readonly cost_to_build: ItemWithQualityCount[];
|
|
16336
16355
|
/**
|
|
16337
16356
|
* The default icons for a blueprint blueprint.
|
|
16338
16357
|
*/
|
|
@@ -16701,7 +16720,7 @@ interface LuaRenderObject {
|
|
|
16701
16720
|
/**
|
|
16702
16721
|
* Allows rendering of geometric shapes, text and sprites in the game world through the global object named `rendering`. Each render object is identified by an id that is universally unique for the lifetime of a whole game.
|
|
16703
16722
|
*
|
|
16704
|
-
* If an entity target of an object is destroyed or changes surface, then the object is also destroyed.
|
|
16723
|
+
* If an entity target of an object (except its `orientation_target`) is destroyed or changes surface, then the object is also destroyed.
|
|
16705
16724
|
*/
|
|
16706
16725
|
interface LuaRendering {
|
|
16707
16726
|
/**
|
|
@@ -17711,21 +17730,31 @@ interface LuaSpaceConnectionPrototype extends LuaPrototypeBase {
|
|
|
17711
17730
|
interface LuaSpaceLocationPrototype extends LuaPrototypeBase {
|
|
17712
17731
|
readonly asteroid_spawn_definitions?: SpaceLocationAsteroidSpawnDefinition[];
|
|
17713
17732
|
readonly asteroid_spawn_influence: double;
|
|
17733
|
+
readonly distance: double;
|
|
17734
|
+
readonly draw_orbit: boolean;
|
|
17714
17735
|
readonly entities_require_heating?: boolean;
|
|
17715
17736
|
/**
|
|
17716
17737
|
* An alternative prototype that will be used to display info about this prototype in Factoriopedia.
|
|
17717
17738
|
*/
|
|
17718
17739
|
readonly factoriopedia_alternative?: LuaSpaceLocationPrototype;
|
|
17740
|
+
readonly fly_condition: boolean;
|
|
17741
|
+
readonly gravity_pull: double;
|
|
17742
|
+
readonly label_orientation: RealOrientation;
|
|
17743
|
+
readonly magnitude: double;
|
|
17719
17744
|
readonly map_gen_settings?: MapGenSettings;
|
|
17720
17745
|
readonly map_seed_offset?: uint32;
|
|
17721
17746
|
/**
|
|
17722
17747
|
* The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
|
17723
17748
|
*/
|
|
17724
17749
|
readonly object_name: string;
|
|
17750
|
+
readonly orientation: RealOrientation;
|
|
17751
|
+
readonly parked_platforms_orientation: RealOrientation;
|
|
17752
|
+
readonly parked_platforms_position: MapPosition;
|
|
17725
17753
|
readonly player_effects?: TriggerItem[];
|
|
17726
17754
|
readonly pollutant_type?: LuaAirbornePollutantPrototype;
|
|
17727
17755
|
readonly position: MapPosition;
|
|
17728
17756
|
readonly solar_power_in_space: double;
|
|
17757
|
+
readonly starmap_icon_orientation: RealOrientation;
|
|
17729
17758
|
/**
|
|
17730
17759
|
* A mapping of the surface property name to the value.
|
|
17731
17760
|
*/
|
|
@@ -17773,7 +17802,7 @@ interface LuaSpacePlatform {
|
|
|
17773
17802
|
* Schedules this space platform for deletion.
|
|
17774
17803
|
* @param ticks The number of ticks from now when this platform will be deleted.
|
|
17775
17804
|
*/
|
|
17776
|
-
destroy(this: void, ticks?:
|
|
17805
|
+
destroy(this: void, ticks?: MapTick): void;
|
|
17777
17806
|
/**
|
|
17778
17807
|
* Destroys all asteroid chunks from the given area. If no area and no position are given, then the entire surface is searched.
|
|
17779
17808
|
* @param table.invert If the filters should be inverted.
|
|
@@ -17810,6 +17839,9 @@ interface LuaSpacePlatform {
|
|
|
17810
17839
|
limit?: uint32;
|
|
17811
17840
|
invert?: boolean;
|
|
17812
17841
|
}): AsteroidChunk[];
|
|
17842
|
+
/**
|
|
17843
|
+
* This allows full access to the space platform schedule, including modifying the schedule records, the group and the interrupts.
|
|
17844
|
+
*/
|
|
17813
17845
|
get_schedule(this: void): LuaSchedule;
|
|
17814
17846
|
/**
|
|
17815
17847
|
* Repairs the given tile if it's damaged.
|
|
@@ -17870,6 +17902,8 @@ interface LuaSpacePlatform {
|
|
|
17870
17902
|
* This platform's current schedule, if any. Set to `nil` to clear.
|
|
17871
17903
|
*
|
|
17872
17904
|
* The schedule can't be changed by modifying the returned table. Instead, changes must be made by assigning a new table to this attribute.
|
|
17905
|
+
*
|
|
17906
|
+
* This is a simiplifed schedule that does **not** include groups and interrupts. See {@link LuaSpacePlatform::get_schedule | runtime:LuaSpacePlatform::get_schedule} for full access to the schedule, including interrupts and groups.
|
|
17873
17907
|
*/
|
|
17874
17908
|
schedule?: PlatformSchedule;
|
|
17875
17909
|
/**
|
|
@@ -18007,15 +18041,15 @@ interface LuaStyle {
|
|
|
18007
18041
|
/**
|
|
18008
18042
|
* Space between the table cell contents bottom and border.
|
|
18009
18043
|
*/
|
|
18010
|
-
bottom_cell_padding:
|
|
18011
|
-
bottom_margin:
|
|
18012
|
-
bottom_padding:
|
|
18044
|
+
bottom_cell_padding: int16;
|
|
18045
|
+
bottom_margin: int16;
|
|
18046
|
+
bottom_padding: int16;
|
|
18013
18047
|
/**
|
|
18014
18048
|
* Space between the table cell contents and border. Sets top/right/bottom/left cell paddings to this value.
|
|
18015
18049
|
*/
|
|
18016
|
-
cell_padding:
|
|
18050
|
+
cell_padding: int16;
|
|
18017
18051
|
clicked_font_color: Color;
|
|
18018
|
-
clicked_vertical_offset:
|
|
18052
|
+
clicked_vertical_offset: uint32;
|
|
18019
18053
|
color: Color;
|
|
18020
18054
|
/**
|
|
18021
18055
|
* Array containing the alignment for every column of this table element. Even though this property is marked as read-only, the alignment can be changed by indexing the LuaCustomTable, like so:
|
|
@@ -18080,15 +18114,15 @@ interface LuaStyle {
|
|
|
18080
18114
|
/**
|
|
18081
18115
|
* Space between the table cell contents left and border.
|
|
18082
18116
|
*/
|
|
18083
|
-
left_cell_padding:
|
|
18084
|
-
left_margin:
|
|
18085
|
-
left_padding:
|
|
18117
|
+
left_cell_padding: int16;
|
|
18118
|
+
left_margin: int16;
|
|
18119
|
+
left_padding: int16;
|
|
18086
18120
|
/**
|
|
18087
18121
|
* Sets top/right/bottom/left margins to this value.
|
|
18088
18122
|
*
|
|
18089
18123
|
* An array with two values sets top/bottom margin to the first value and left/right margin to the second value. An array with four values sets top, right, bottom, left margin respectively.
|
|
18090
18124
|
*/
|
|
18091
|
-
margin:
|
|
18125
|
+
margin: int16 | int16[];
|
|
18092
18126
|
/**
|
|
18093
18127
|
* Maximal height ensures, that the widget will never be bigger than than that size. It can't be stretched to be bigger.
|
|
18094
18128
|
*/
|
|
@@ -18126,7 +18160,7 @@ interface LuaStyle {
|
|
|
18126
18160
|
*
|
|
18127
18161
|
* An array with two values sets top/bottom padding to the first value and left/right padding to the second value. An array with four values sets top, right, bottom, left padding respectively.
|
|
18128
18162
|
*/
|
|
18129
|
-
padding:
|
|
18163
|
+
padding: int16 | int16[];
|
|
18130
18164
|
pie_progress_color: Color;
|
|
18131
18165
|
/**
|
|
18132
18166
|
* How this GUI element handles rich text.
|
|
@@ -18135,9 +18169,9 @@ interface LuaStyle {
|
|
|
18135
18169
|
/**
|
|
18136
18170
|
* Space between the table cell contents right and border.
|
|
18137
18171
|
*/
|
|
18138
|
-
right_cell_padding:
|
|
18139
|
-
right_margin:
|
|
18140
|
-
right_padding:
|
|
18172
|
+
right_cell_padding: int16;
|
|
18173
|
+
right_margin: int16;
|
|
18174
|
+
right_padding: int16;
|
|
18141
18175
|
selected_badge_font_color: Color;
|
|
18142
18176
|
selected_clicked_font_color: Color;
|
|
18143
18177
|
selected_font_color: Color;
|
|
@@ -18152,9 +18186,9 @@ interface LuaStyle {
|
|
|
18152
18186
|
/**
|
|
18153
18187
|
* Space between the table cell contents top and border.
|
|
18154
18188
|
*/
|
|
18155
|
-
top_cell_padding:
|
|
18156
|
-
top_margin:
|
|
18157
|
-
top_padding:
|
|
18189
|
+
top_cell_padding: int16;
|
|
18190
|
+
top_margin: int16;
|
|
18191
|
+
top_padding: int16;
|
|
18158
18192
|
use_header_filler: boolean;
|
|
18159
18193
|
/**
|
|
18160
18194
|
* Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
|
@@ -18184,7 +18218,7 @@ interface LuaStyle {
|
|
|
18184
18218
|
width: int32;
|
|
18185
18219
|
}
|
|
18186
18220
|
/**
|
|
18187
|
-
* A "domain" of the world
|
|
18221
|
+
* A "domain" of the world, such as a planet or space platform. Surfaces are uniquely identified by their name. Every game contains at least the surface "nauvis".
|
|
18188
18222
|
*/
|
|
18189
18223
|
interface LuaSurface {
|
|
18190
18224
|
/**
|
|
@@ -19236,6 +19270,8 @@ interface LuaSurface {
|
|
|
19236
19270
|
readonly pollution_statistics: LuaFlowStatistics;
|
|
19237
19271
|
/**
|
|
19238
19272
|
* If clouds are shown on this surface. If false, clouds are never shown. If true the player must also have clouds enabled in graphics settings for them to be shown.
|
|
19273
|
+
*
|
|
19274
|
+
* By default, clouds are shown on all surfaces.
|
|
19239
19275
|
*/
|
|
19240
19276
|
show_clouds: boolean;
|
|
19241
19277
|
/**
|
|
@@ -19764,7 +19800,7 @@ interface LuaSurfaceCreateEntityParamsInserter extends BaseLuaSurfaceCreateEntit
|
|
|
19764
19800
|
* Used only if {@link InserterPrototype::allow_custom_vectors | prototype:InserterPrototype::allow_custom_vectors} is true.
|
|
19765
19801
|
*/
|
|
19766
19802
|
'pickup_position'?: Vector;
|
|
19767
|
-
'spoil_priority'?:
|
|
19803
|
+
'spoil_priority'?: BlueprintSpoilPriority;
|
|
19768
19804
|
/**
|
|
19769
19805
|
* Defaults to `false`.
|
|
19770
19806
|
*/
|
|
@@ -19920,7 +19956,7 @@ interface LuaSurfaceCreateEntityParamsPlant extends BaseLuaSurfaceCreateEntityPa
|
|
|
19920
19956
|
/**
|
|
19921
19957
|
* The tick the plant will be fully grown. If not specified, the plants normal growth time is used.
|
|
19922
19958
|
*/
|
|
19923
|
-
'tick_grown'?:
|
|
19959
|
+
'tick_grown'?: MapTick;
|
|
19924
19960
|
}
|
|
19925
19961
|
/**
|
|
19926
19962
|
*
|
|
@@ -20704,7 +20740,7 @@ interface LuaTrain {
|
|
|
20704
20740
|
* Get a mapping of the train's inventory.
|
|
20705
20741
|
* @returns List of all items in the train.
|
|
20706
20742
|
*/
|
|
20707
|
-
get_contents(this: void):
|
|
20743
|
+
get_contents(this: void): ItemWithQualityCount[];
|
|
20708
20744
|
/**
|
|
20709
20745
|
* Gets a mapping of the train's fluid inventory.
|
|
20710
20746
|
* @returns The counts, indexed by fluid names.
|
|
@@ -20728,6 +20764,9 @@ interface LuaTrain {
|
|
|
20728
20764
|
* Gets all rails under the train.
|
|
20729
20765
|
*/
|
|
20730
20766
|
get_rails(this: void): LuaEntity[];
|
|
20767
|
+
/**
|
|
20768
|
+
* This allows full access to the train schedule, including modifying the schedule records, the train group and the interrupts.
|
|
20769
|
+
*/
|
|
20731
20770
|
get_schedule(this: void): LuaSchedule;
|
|
20732
20771
|
/**
|
|
20733
20772
|
* Go to the station specified by the index in the train's schedule.
|
|
@@ -20870,6 +20909,8 @@ interface LuaTrain {
|
|
|
20870
20909
|
* This train's current schedule, if any. Set to `nil` to clear.
|
|
20871
20910
|
*
|
|
20872
20911
|
* The schedule can't be changed by modifying the returned table. Instead, changes must be made by assigning a new table to this attribute.
|
|
20912
|
+
*
|
|
20913
|
+
* This is a simiplifed schedule that does **not** include train groups and interrupts. See {@link LuaTrain::get_schedule | runtime:LuaTrain::get_schedule} for full access to the train schedule, including interrupts and train groups.
|
|
20873
20914
|
*/
|
|
20874
20915
|
schedule?: TrainSchedule;
|
|
20875
20916
|
/**
|
|
@@ -21055,7 +21096,7 @@ interface LuaTransportLine {
|
|
|
21055
21096
|
* Get counts of all items on this line, similar to how {@link LuaInventory::get_contents | runtime:LuaInventory::get_contents} does.
|
|
21056
21097
|
* @returns List of all items on this line.
|
|
21057
21098
|
*/
|
|
21058
|
-
get_contents(this: void):
|
|
21099
|
+
get_contents(this: void): ItemWithQualityCount[];
|
|
21059
21100
|
/**
|
|
21060
21101
|
* Get detailed information of items on this line, such as their position.
|
|
21061
21102
|
*/
|