factorio-types 1.2.39 → 1.2.40

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 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.55
5
+ // Factorio version 2.0.57
6
6
  // API version 6
7
7
 
8
8
  declare namespace runtime {
@@ -297,6 +297,7 @@ interface LuaAssemblingMachineControlBehavior extends LuaGenericOnOffControlBeha
297
297
  * Prototype of an asteroid chunk.
298
298
  */
299
299
  interface LuaAsteroidChunkPrototype extends LuaPrototypeBase {
300
+ readonly dying_trigger_effect?: TriggerEffectItem[];
300
301
  /**
301
302
  * An alternative prototype that will be used to display info about this prototype in Factoriopedia.
302
303
  */
@@ -3146,6 +3147,24 @@ interface LuaBootstrap {
3146
3147
  script.on_event(defines.events.on_built_entity,
3147
3148
  function(event) game.print("Gotta go fast!") end,
3148
3149
  {{filter = "name", name = "fast-inserter"}})
3150
+ ```
3151
+ */
3152
+ on_event(this: void, event: defines.events.on_research_queued, handler: ((this: void, arg0: runtime.on_research_queued) => any) | nil, filters?: EventFilter): void;
3153
+ /**
3154
+ * Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
3155
+ * @param event The event(s) or custom-input to invoke the handler on.
3156
+ * @param handler The handler for this event. Passing `nil` will unregister it.
3157
+ * @param filters The filters for this event. Can only be used when registering for individual events.
3158
+ * @example ```
3159
+ -- Register for the on_tick event to print the current tick to console each tick
3160
+ script.on_event(defines.events.on_tick,
3161
+ function(event) game.print(event.tick) end)
3162
+ ```
3163
+ * @example ```
3164
+ -- Register for the on_built_entity event, limiting it to only be received when a `"fast-inserter"` is built
3165
+ script.on_event(defines.events.on_built_entity,
3166
+ function(event) game.print("Gotta go fast!") end,
3167
+ {{filter = "name", name = "fast-inserter"}})
3149
3168
  ```
3150
3169
  */
3151
3170
  on_event(this: void, event: defines.events.on_research_reversed, handler: ((this: void, arg0: runtime.on_research_reversed) => any) | nil, filters?: EventFilter): void;
@@ -5716,6 +5735,12 @@ interface LuaEntity extends LuaControl {
5716
5735
  * Whether the entity can be destroyed
5717
5736
  */
5718
5737
  can_be_destroyed(this: void): boolean;
5738
+ /**
5739
+ * The same as {@link LuaInventory::can_set_filter | runtime:LuaInventory::can_set_filter} but also works for ghosts.
5740
+ * @param index The item stack index
5741
+ * @param filter The item filter
5742
+ */
5743
+ can_set_inventory_filter(this: void, inventory_index: defines.inventory, index: uint, filter: ItemFilter): boolean;
5719
5744
  /**
5720
5745
  * Whether this character can shoot the given entity or position.
5721
5746
  */
@@ -5996,6 +6021,16 @@ interface LuaEntity extends LuaControl {
5996
6021
  * Gets the filter for this infinity pipe, or `nil` if the filter is empty.
5997
6022
  */
5998
6023
  get_infinity_pipe_filter(this: void): InfinityPipeFilter | null;
6024
+ /**
6025
+ * The same as {@link LuaInventory::get_bar | runtime:LuaInventory::get_bar} but also works for ghosts.
6026
+ */
6027
+ get_inventory_bar(this: void, inventory_index: defines.inventory): uint;
6028
+ /**
6029
+ * The same as {@link LuaInventory::get_filter | runtime:LuaInventory::get_filter} but also works for ghosts.
6030
+ * @param index The item stack index
6031
+ * @returns The current filter or `nil` if none.
6032
+ */
6033
+ get_inventory_filter(this: void, inventory_index: defines.inventory, index: uint): ItemFilter | null;
5999
6034
  /**
6000
6035
  * Gets the inventory size override of the selected inventory if size override was set using {@link set_inventory_size_override | runtime:LuaEntity::set_inventory_size_override}.
6001
6036
  */
@@ -6204,6 +6239,14 @@ interface LuaEntity extends LuaControl {
6204
6239
  * @returns Amount of fluid actually inserted.
6205
6240
  */
6206
6241
  insert_fluid(this: void, fluid: Fluid): double;
6242
+ /**
6243
+ * The same as {@link LuaInventory::supports_bar | runtime:LuaInventory::supports_bar} but also works for ghosts.
6244
+ */
6245
+ inventory_supports_bar(this: void, inventory_index: defines.inventory): boolean;
6246
+ /**
6247
+ * The same as {@link LuaInventory::supports_filters | runtime:LuaInventory::supports_filters} but also works for ghosts.
6248
+ */
6249
+ inventory_supports_filters(this: void, inventory_index: defines.inventory): boolean;
6207
6250
  /**
6208
6251
  * @returns `true` if this gate is currently closed.
6209
6252
  */
@@ -6220,6 +6263,10 @@ interface LuaEntity extends LuaControl {
6220
6263
  * Returns whether a craft is currently in process. It does not indicate whether progress is currently being made, but whether a crafting process has been started in this machine.
6221
6264
  */
6222
6265
  is_crafting(this: void): boolean;
6266
+ /**
6267
+ * The same as {@link LuaInventory::is_filtered | runtime:LuaInventory::is_filtered} but also works for ghosts.
6268
+ */
6269
+ is_inventory_filtered(this: void, inventory_index: defines.inventory): boolean;
6223
6270
  /**
6224
6271
  * @returns `true` if this gate is currently opened.
6225
6272
  */
@@ -6378,7 +6425,7 @@ interface LuaEntity extends LuaControl {
6378
6425
  * This differs from {@link LuaEntity::set_passenger | runtime:LuaEntity::set_passenger} in that the passenger can't drive the vehicle.
6379
6426
  * @param driver The new driver. Writing `nil` ejects the current driver, if any.
6380
6427
  */
6381
- set_driver(this: void, driver?: LuaEntity | PlayerIdentification): void;
6428
+ set_driver(this: void, driver: LuaEntity | PlayerIdentification | nil): void;
6382
6429
  /**
6383
6430
  * Set the filter for a slot in an inserter (ItemFilter), loader (ItemFilter), mining drill (EntityID), asteroid collector (AsteroidChunkID) or logistic storage container (ItemWithQualityID). The entity must allow filters.
6384
6431
  * @param index Index of the slot to set the filter for.
@@ -6410,6 +6457,18 @@ interface LuaEntity extends LuaControl {
6410
6457
  * @param filter The new filter, or `nil` to clear the filter.
6411
6458
  */
6412
6459
  set_infinity_pipe_filter(this: void, filter: InfinityPipeFilter | nil): void;
6460
+ /**
6461
+ * The same as {@link LuaInventory::set_bar | runtime:LuaInventory::set_bar} but also works for ghosts.
6462
+ * @param bar The new limit. Omitting this parameter or passing `nil` will clear the limit.
6463
+ */
6464
+ set_inventory_bar(this: void, inventory_index: defines.inventory, bar?: uint): void;
6465
+ /**
6466
+ * The same as {@link LuaInventory::set_filter | runtime:LuaInventory::set_filter} but also works for ghosts.
6467
+ * @param index The item stack index.
6468
+ * @param filter The new filter. `nil` erases any existing filter.
6469
+ * @returns If the filter was allowed to be set.
6470
+ */
6471
+ set_inventory_filter(this: void, inventory_index: defines.inventory, index: uint, filter: ItemFilter | nil): boolean;
6413
6472
  /**
6414
6473
  * Sets inventory size override. When set, supported entity will ignore inventory size from prototype and will instead keep inventory size equal to the override. Setting `nil` will restore default inventory size.
6415
6474
  * @param overflow Items that would be deleted due to change of inventory size 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.
@@ -6421,7 +6480,7 @@ interface LuaEntity extends LuaControl {
6421
6480
  * This differs from {@link LuaEntity::get_driver | runtime:LuaEntity::get_driver} in that the passenger can't drive the car.
6422
6481
  * @param passenger The new passenger. Writing `nil` ejects the current passenger, if any.
6423
6482
  */
6424
- set_passenger(this: void, passenger?: LuaEntity | PlayerIdentification): void;
6483
+ set_passenger(this: void, passenger: LuaEntity | PlayerIdentification | nil): void;
6425
6484
  /**
6426
6485
  * Set the entity ID name at the specified position in the turret's priority list.
6427
6486
  * @param index The index of the entry to set.
@@ -6678,7 +6737,7 @@ interface LuaEntity extends LuaControl {
6678
6737
  */
6679
6738
  consumption_modifier: float;
6680
6739
  /**
6681
- * If this RollingStock has 'copy color from train stop' enabled.
6740
+ * If this rolling stock has 'copy color from train stop' enabled.
6682
6741
  */
6683
6742
  copy_color_from_train_stop: boolean;
6684
6743
  /**
@@ -7120,6 +7179,14 @@ interface LuaEntity extends LuaControl {
7120
7179
  */
7121
7180
  readonly owned_plants: LuaEntity[];
7122
7181
  parameters: ProgrammableSpeakerParameters;
7182
+ /**
7183
+ * For inserters taking items from transport belt connectables, this determines whether the inserter is allowed to take items from the left lane.
7184
+ */
7185
+ pickup_from_left_lane: boolean;
7186
+ /**
7187
+ * For inserters taking items from transport belt connectables, this determines whether the inserter is allowed to take items from the right lane.
7188
+ */
7189
+ pickup_from_right_lane: boolean;
7123
7190
  /**
7124
7191
  * Where the inserter will pick up items from.
7125
7192
  *
@@ -7510,11 +7577,17 @@ interface LuaEntity extends LuaControl {
7510
7577
  */
7511
7578
  interface LuaEntityPrototype extends LuaPrototypeBase {
7512
7579
  /**
7513
- * The crafting speed of this crafting-machine.
7580
+ * The crafting speed of this crafting-machine or character.
7514
7581
  */
7515
7582
  get_crafting_speed(this: void, quality?: QualityID): double;
7516
7583
  /**
7517
- * The fluid usage of this generator prototype.
7584
+ * Gets the fluid capacity of this entity or 0 if this entity doesn't support fluids.
7585
+ *
7586
+ * Crafting machines will report 0 due to their fluid capacity being whatever a given recipe needs.
7587
+ */
7588
+ get_fluid_capacity(this: void, quality?: QualityID): double;
7589
+ /**
7590
+ * The fluid usage of this generator or fusion reactor prototype.
7518
7591
  */
7519
7592
  get_fluid_usage_per_tick(this: void, quality?: QualityID): double | null;
7520
7593
  /**
@@ -7565,6 +7638,10 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
7565
7638
  * The maximum wire distance for this entity. 0 if the entity doesn't support wires.
7566
7639
  */
7567
7640
  get_max_wire_distance(this: void, quality?: QualityID): double;
7641
+ /**
7642
+ * The mining radius of this mining drill prototype.
7643
+ */
7644
+ get_mining_drill_radius(this: void, quality?: QualityID): double | null;
7568
7645
  /**
7569
7646
  * The pumping speed of this offshore or normal pump.
7570
7647
  */
@@ -7669,10 +7746,21 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
7669
7746
  * The animation speed coefficient of this belt connectable prototype.
7670
7747
  */
7671
7748
  readonly animation_speed_coefficient?: double;
7749
+ readonly arm_angular_speed_cap_base?: float;
7750
+ readonly arm_angular_speed_cap_quality_scaling?: float;
7751
+ readonly arm_color_gradient?: Color[];
7752
+ readonly arm_count_base?: uint;
7753
+ readonly arm_count_quality_scaling?: uint;
7754
+ readonly arm_energy_usage?: double;
7755
+ readonly arm_inventory_size_quality_increase?: uint;
7756
+ readonly arm_slow_energy_usage?: double;
7757
+ readonly arm_speed_base?: float;
7758
+ readonly arm_speed_quality_scaling?: float;
7672
7759
  /**
7673
7760
  * The attack parameters for this entity, if any.
7674
7761
  */
7675
7762
  readonly attack_parameters?: AttackParameters;
7763
+ readonly attack_reaction?: AttackReactionItem[];
7676
7764
  /**
7677
7765
  * The attack result of this entity, if any.
7678
7766
  */
@@ -7734,6 +7822,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
7734
7822
  * Whether this unit prototype can open gates.
7735
7823
  */
7736
7824
  readonly can_open_gates?: boolean;
7825
+ readonly captured_spawner_entity?: LuaEntityPrototype;
7737
7826
  /**
7738
7827
  * The chain shooting cooldown modifier of this spider vehicle prototype.
7739
7828
  */
@@ -7747,6 +7836,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
7747
7836
  * The item prototype name used to destroy this cliff.
7748
7837
  */
7749
7838
  readonly cliff_explosive_prototype?: string;
7839
+ readonly collection_box_offset?: float;
7750
7840
  /**
7751
7841
  * The bounding box used for collision checking.
7752
7842
  */
@@ -7827,6 +7917,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
7827
7917
  speed_from_center_deviation: float;
7828
7918
  };
7829
7919
  readonly damage_hit_tint?: Color;
7920
+ readonly damaged_trigger_effect?: TriggerEffectItem[];
7830
7921
  /**
7831
7922
  * Value between 0 and 1 darkness where all lamps of this lamp prototype are off.
7832
7923
  */
@@ -7835,6 +7926,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
7835
7926
  * Value between 0 and 1 darkness where all lamps of this lamp prototype are on.
7836
7927
  */
7837
7928
  readonly darkness_for_all_lamps_on?: float;
7929
+ readonly deposit_radius?: float;
7838
7930
  /**
7839
7931
  * Whether this generator prototype destroys non-fuel fluids.
7840
7932
  */
@@ -7864,10 +7956,12 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
7864
7956
  */
7865
7957
  readonly drawing_box_vertical_extension: double;
7866
7958
  readonly drop_item_distance?: uint;
7959
+ readonly dying_explosion?: ExplosionDefinition[];
7867
7960
  /**
7868
7961
  * The dying time of this corpse prototype.
7869
7962
  */
7870
7963
  readonly dying_speed?: float;
7964
+ readonly dying_trigger_effect?: TriggerEffectItem[];
7871
7965
  /**
7872
7966
  * Effect receiver prototype of this crafting machine, lab, or mining drill.
7873
7967
  */
@@ -7904,6 +7998,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
7904
7998
  * The direct energy usage of this entity, if any.
7905
7999
  */
7906
8000
  readonly energy_usage?: double;
8001
+ readonly energy_usage_quality_scaling?: float;
7907
8002
  /**
7908
8003
  * The engine starting speed for this rocket silo rocket prototype.
7909
8004
  */
@@ -7996,6 +8091,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
7996
8091
  * Whether this unit, car, or character prototype has belt immunity.
7997
8092
  */
7998
8093
  readonly has_belt_immunity?: boolean;
8094
+ readonly head_collection_radius?: float;
7999
8095
  /**
8000
8096
  * Amount this entity can heal per tick, if any.
8001
8097
  */
@@ -8016,6 +8112,10 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
8016
8112
  * The height of this spider vehicle prototype.
8017
8113
  */
8018
8114
  readonly height?: double;
8115
+ readonly held_items_display_count?: uint8;
8116
+ readonly held_items_offset?: float;
8117
+ readonly held_items_spread?: float;
8118
+ readonly hide_resistances?: boolean;
8019
8119
  /**
8020
8120
  * A vector of the gun prototypes of this car, spider vehicle, artillery wagon, or turret.
8021
8121
  */
@@ -8052,10 +8152,19 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
8052
8152
  * The instruments for this programmable speaker.
8053
8153
  */
8054
8154
  readonly instruments?: ProgrammableSpeakerInstrument[];
8155
+ /**
8156
+ * Properties of custom inventory. Only provided if inventory_type is `"with_custom_stack_size"`.
8157
+ */
8158
+ readonly inventory_properties?: InventoryWithCustomStackSizePrototype;
8159
+ readonly inventory_size_quality_increase?: uint;
8055
8160
  /**
8056
8161
  * The inventory type this container or linked container uses.
8057
8162
  */
8058
- readonly inventory_type?: 'normal' | 'with_bar' | 'with_filters_and_bar';
8163
+ readonly inventory_type?: 'normal' | 'with_bar' | 'with_filters' | 'with_filters_and_bar' | 'with_weight_limit' | 'with_custom_stack_size';
8164
+ /**
8165
+ * Weight limit of the inventory if inventory_type is `"with_weight_limit"`.
8166
+ */
8167
+ readonly inventory_weight_limit?: Weight;
8059
8168
  /**
8060
8169
  *
8061
8170
  * These are the objects that are considered buildings:
@@ -8142,6 +8251,10 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
8142
8251
  * The max belt stack size for this loader.
8143
8252
  */
8144
8253
  readonly loader_max_belt_stack_size?: uint8;
8254
+ /**
8255
+ * True if this loader will not drop items for which total amount is less than a full belt stack.
8256
+ */
8257
+ readonly loader_wait_for_full_stack?: boolean;
8145
8258
  /**
8146
8259
  * The logistic mode of this logistic container.
8147
8260
  */
@@ -8216,6 +8329,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
8216
8329
  * The max payload size of this logistics or construction robot.
8217
8330
  */
8218
8331
  readonly max_payload_size?: uint;
8332
+ readonly max_performance?: ThrusterPerformancePoint;
8219
8333
  /**
8220
8334
  * The maximum polyphony for this programmable speaker.
8221
8335
  */
@@ -8249,6 +8363,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
8249
8363
  * The minimum darkness at which this unit spawner can spawn entities.
8250
8364
  */
8251
8365
  readonly min_darkness_to_spawn?: float;
8366
+ readonly min_performance?: ThrusterPerformancePoint;
8252
8367
  /**
8253
8368
  * The minimum pursue time of this unit prototype.
8254
8369
  */
@@ -8261,6 +8376,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
8261
8376
  * Whether this entity is minable and what can be obtained by mining it.
8262
8377
  */
8263
8378
  readonly mineable_properties: MineableProperties;
8379
+ readonly minimal_arm_swing_segment_retraction?: uint;
8264
8380
  /**
8265
8381
  * Minimum amount of this resource.
8266
8382
  */
@@ -8294,7 +8410,10 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
8294
8410
  * 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.
8295
8411
  */
8296
8412
  readonly object_name: string;
8413
+ readonly overkill_fraction?: float;
8414
+ readonly passive_energy_usage?: double;
8297
8415
  readonly per_lane_filters?: boolean;
8416
+ readonly perceived_performance?: PerceivedPerformance;
8298
8417
  /**
8299
8418
  * The beacon profile: extra multiplier applied to the effects received from beacon by the effect receiver based on amount of beacons that reach that effect receiver
8300
8419
  */
@@ -8307,6 +8426,8 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
8307
8426
  * The pumping speed of this offshore 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.
8308
8427
  */
8309
8428
  readonly pumping_speed?: double;
8429
+ readonly quality_affects_mining_radius?: boolean;
8430
+ readonly quality_affects_module_slots?: boolean;
8310
8431
  /**
8311
8432
  * The radar range of this unit prototype.
8312
8433
  */
@@ -8316,6 +8437,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
8316
8437
  */
8317
8438
  readonly radius: double;
8318
8439
  readonly radius_visualisation_specification?: RadiusVisualisationSpecification;
8440
+ readonly random_corpse_variation?: boolean;
8319
8441
  readonly reach_distance?: uint;
8320
8442
  readonly reach_resource_distance?: double;
8321
8443
  readonly related_underground_belt?: LuaEntityPrototype;
@@ -8469,6 +8591,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
8469
8591
  * The terrain friction modifier for this vehicle.
8470
8592
  */
8471
8593
  readonly terrain_friction_modifier?: float;
8594
+ readonly tether_size?: float;
8472
8595
  readonly ticks_to_keep_aiming_direction?: uint;
8473
8596
  readonly ticks_to_keep_gun?: uint;
8474
8597
  readonly ticks_to_stay_in_combat?: uint;
@@ -8518,6 +8641,8 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
8518
8641
  * The turret rotation speed of this car prototype.
8519
8642
  */
8520
8643
  readonly turret_rotation_speed?: float;
8644
+ readonly two_direction_only?: boolean;
8645
+ readonly unpowered_arm_speed_scale?: float;
8521
8646
  /**
8522
8647
  * Whether this logistic container prototype uses exact mode
8523
8648
  */
@@ -9382,6 +9507,10 @@ interface LuaForce {
9382
9507
  * @param force The force to copy from.
9383
9508
  */
9384
9509
  copy_from(this: void, force: ForceID): void;
9510
+ /**
9511
+ * Creates the given group if it doesn't already exist.
9512
+ */
9513
+ create_logistic_group(this: void, name: string, type?: defines.logistic_group_type): void;
9385
9514
  /**
9386
9515
  * Creates a new space platform on this force.
9387
9516
  * @param table.name The platform name. If not provided, a random name will be used.
@@ -9393,6 +9522,10 @@ interface LuaForce {
9393
9522
  planet: SpaceLocationID;
9394
9523
  starter_pack: ItemWithQualityID;
9395
9524
  }): LuaSpacePlatform | null;
9525
+ /**
9526
+ * Deletes the given logistic group if it exists.
9527
+ */
9528
+ delete_logistic_group(this: void, name: string, type?: defines.logistic_group_type): void;
9396
9529
  /**
9397
9530
  * Disable all recipes and technologies. Only recipes and technologies enabled explicitly will be useable from this point.
9398
9531
  */
@@ -9501,6 +9634,14 @@ interface LuaForce {
9501
9634
  * Gets the linked inventory for the given prototype and link ID if it exists or `nil`.
9502
9635
  */
9503
9636
  get_linked_inventory(this: void, prototype: EntityID, link_id: uint): LuaInventory | null;
9637
+ /**
9638
+ * Gets the information about the given logistic group.
9639
+ */
9640
+ get_logistic_group(this: void, name: string, type?: defines.logistic_group_type): LogisticGroup | null;
9641
+ /**
9642
+ * Gets the names of the current logistic groups.
9643
+ */
9644
+ get_logistic_groups(this: void, type?: defines.logistic_group_type): string[];
9504
9645
  get_spawn_position(this: void, surface: SurfaceIdentification): MapPosition;
9505
9646
  get_surface_hidden(this: void, surface: SurfaceIdentification): boolean;
9506
9647
  /**
@@ -11122,6 +11263,10 @@ interface BaseLuaGuiElementAddParams {
11122
11263
  * Location in its parent that the child element should slot into. By default, the child will be appended onto the end.
11123
11264
  */
11124
11265
  'index'?: uint;
11266
+ /**
11267
+ * Whether the child element is locked. Defaults to `false`.
11268
+ */
11269
+ 'locked'?: boolean;
11125
11270
  /**
11126
11271
  * Name of the child element. It must be unique within the parent element.
11127
11272
  */
@@ -11966,7 +12111,7 @@ interface LuaInventory {
11966
12111
  * Set the current bar.
11967
12112
  *
11968
12113
  * Only useable if this inventory supports having a bar.
11969
- * @param bar The new limit. Omitting this parameter will clear the limit.
12114
+ * @param bar The new limit. Omitting this parameter or passing `nil` will clear the limit.
11970
12115
  */
11971
12116
  set_bar(this: void, bar?: uint): void;
11972
12117
  /**
@@ -12004,6 +12149,10 @@ interface LuaInventory {
12004
12149
  * The inventory index this inventory uses, if any.
12005
12150
  */
12006
12151
  readonly index?: defines.inventory;
12152
+ /**
12153
+ * Gives a maximum weight of items that can be inserted into this inventory.
12154
+ */
12155
+ readonly max_weight?: Weight;
12007
12156
  /**
12008
12157
  * The mod that owns this inventory, if any.
12009
12158
  */
@@ -12024,6 +12173,10 @@ interface LuaInventory {
12024
12173
  * 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.
12025
12174
  */
12026
12175
  readonly valid: boolean;
12176
+ /**
12177
+ * Gives a total weight of all items currently in this inventory.
12178
+ */
12179
+ readonly weight: Weight;
12027
12180
  /**
12028
12181
  * The indexing operator.
12029
12182
  * @example ```
@@ -12531,6 +12684,7 @@ interface LuaItemPrototype extends LuaPrototypeBase {
12531
12684
  * The collision box used by character entities when wearing this armor.
12532
12685
  */
12533
12686
  readonly collision_box?: BoundingBox;
12687
+ readonly create_electric_network?: boolean;
12534
12688
  readonly default_import_location: LuaSpaceLocationPrototype;
12535
12689
  /**
12536
12690
  * The default label color used for this item with label, if any.
@@ -12611,6 +12765,7 @@ interface LuaItemPrototype extends LuaPrototypeBase {
12611
12765
  */
12612
12766
  readonly infinite?: boolean;
12613
12767
  readonly ingredient_to_weight_coefficient: double;
12768
+ readonly initial_items?: ItemProduct[];
12614
12769
  /**
12615
12770
  * The main inventory size for item-with-inventory-prototype.
12616
12771
  */
@@ -12674,6 +12829,10 @@ interface LuaItemPrototype extends LuaPrototypeBase {
12674
12829
  * The results of launching this item in a rocket.
12675
12830
  */
12676
12831
  readonly rocket_launch_products: Product[];
12832
+ /**
12833
+ * How this item interacts when being sent to orbit.
12834
+ */
12835
+ readonly send_to_orbit_mode: 'not-sendable' | 'manual' | 'automated';
12677
12836
  /**
12678
12837
  * If this selection tool skips things covered by fog of war.
12679
12838
  */
@@ -12699,6 +12858,7 @@ interface LuaItemPrototype extends LuaPrototypeBase {
12699
12858
  * The rail support used by this rail planner.
12700
12859
  */
12701
12860
  readonly support?: LuaEntityPrototype;
12861
+ readonly surface?: LuaSurfacePrototype;
12702
12862
  /**
12703
12863
  * Tier of the module inside its category. Used when upgrading modules: Ctrl + click modules into an entity and it will replace lower tier modules with higher tier modules if they have the same category.
12704
12864
  */
@@ -12707,6 +12867,8 @@ interface LuaItemPrototype extends LuaPrototypeBase {
12707
12867
  * The number of tile filters this deconstruction item has.
12708
12868
  */
12709
12869
  readonly tile_filter_slots?: uint;
12870
+ readonly tiles?: SpacePlatformTileDefinition[];
12871
+ readonly trigger?: TriggerItem;
12710
12872
  /**
12711
12873
  * 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.
12712
12874
  */
@@ -12714,7 +12876,7 @@ interface LuaItemPrototype extends LuaPrototypeBase {
12714
12876
  /**
12715
12877
  * Weight of this item. More information on how item weight is determined can be found on its {@link auxiliary page | runtime:item-weight}.
12716
12878
  */
12717
- readonly weight: double;
12879
+ readonly weight: Weight;
12718
12880
  }
12719
12881
  /**
12720
12882
  * A reference to an item and count owned by some external entity.
@@ -13882,6 +14044,10 @@ interface LuaPlayer extends LuaControl {
13882
14044
  * Exit the current cutscene. Errors if not in a cutscene.
13883
14045
  */
13884
14046
  exit_cutscene(this: void): void;
14047
+ /**
14048
+ * Exit remote view if possible. Exiting will fail if the player is in a rocket or in a platform.
14049
+ */
14050
+ exit_remote_view(this: void): void;
13885
14051
  /**
13886
14052
  * Gets which quick bar page is being used for the given screen page or `nil` if not known.
13887
14053
  * @param index The screen page. Index 1 is the top row in the gui. Index can go beyond the visible number of bars on the screen to account for the interface config setting change.
@@ -14756,6 +14922,12 @@ interface LuaPrototypes {
14756
14922
  * A dictionary containing every LuaTrivialSmokePrototype indexed by `name`.
14757
14923
  */
14758
14924
  readonly trivial_smoke: Record<string, LuaTrivialSmokePrototype>;
14925
+ /**
14926
+ * All utility constants.
14927
+ *
14928
+ * See {@link UtilityConstants | prototype:UtilityConstants} for possible values.
14929
+ */
14930
+ readonly utility_constants: Record<string, AnyBasic>;
14759
14931
  /**
14760
14932
  * A dictionary containing every LuaVirtualSignalPrototype indexed by `name`.
14761
14933
  */
@@ -14799,16 +14971,38 @@ interface LuaPumpControlBehavior extends LuaGenericOnOffControlBehavior {
14799
14971
  * Prototype of a quality.
14800
14972
  */
14801
14973
  interface LuaQualityPrototype extends LuaPrototypeBase {
14974
+ readonly accumulator_capacity_multiplier: double;
14975
+ readonly asteroid_collector_collection_radius_bonus: uint;
14976
+ readonly beacon_module_slots_bonus: ItemStackIndex;
14802
14977
  readonly beacon_power_usage_multiplier: float;
14978
+ readonly beacon_supply_area_distance_bonus: float;
14803
14979
  /**
14804
14980
  * The color of the prototype
14805
14981
  */
14806
14982
  readonly color: Color;
14983
+ readonly crafting_machine_energy_usage_multiplier: double;
14984
+ readonly crafting_machine_module_slots_bonus: ItemStackIndex;
14985
+ readonly crafting_machine_speed_multiplier: double;
14986
+ readonly default_multiplier: double;
14807
14987
  readonly draw_sprite_by_default: boolean;
14988
+ readonly electric_pole_supply_area_distance_bonus: float;
14989
+ readonly electric_pole_wire_reach_bonus: float;
14990
+ readonly equipment_grid_height_bonus: int16;
14991
+ readonly equipment_grid_width_bonus: int16;
14992
+ readonly fluid_wagon_capacity_multiplier: double;
14993
+ readonly flying_robot_max_energy_multiplier: double;
14994
+ readonly inserter_speed_multiplier: double;
14995
+ readonly inventory_size_multiplier: double;
14996
+ readonly lab_module_slots_bonus: ItemStackIndex;
14997
+ readonly lab_research_speed_multiplier: double;
14808
14998
  /**
14809
14999
  * Level basically specifies the stat-increasing value of this quality level
14810
15000
  */
14811
15001
  readonly level: uint;
15002
+ readonly logistic_cell_charging_energy_multiplier: double;
15003
+ readonly logistic_cell_charging_station_count_bonus: uint;
15004
+ readonly mining_drill_mining_radius_bonus: float;
15005
+ readonly mining_drill_module_slots_bonus: ItemStackIndex;
14812
15006
  readonly mining_drill_resource_drain_multiplier: float;
14813
15007
  /**
14814
15008
  * The next higher level of the quality
@@ -14822,6 +15016,9 @@ interface LuaQualityPrototype extends LuaPrototypeBase {
14822
15016
  * 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.
14823
15017
  */
14824
15018
  readonly object_name: string;
15019
+ readonly range_multiplier: double;
15020
+ readonly science_pack_drain_multiplier: float;
15021
+ readonly tool_durability_multiplier: double;
14825
15022
  /**
14826
15023
  * 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.
14827
15024
  */
@@ -15620,7 +15817,7 @@ interface LuaRemote {
15620
15817
  readonly object_name: string;
15621
15818
  }
15622
15819
  /**
15623
- * Reference to a single LuaRendering object.
15820
+ * Reference to a single {@link LuaRendering | runtime:LuaRendering} object.
15624
15821
  */
15625
15822
  interface LuaRenderObject {
15626
15823
  /**
@@ -15663,6 +15860,12 @@ interface LuaRenderObject {
15663
15860
  * Animation speed of this animation. Animation speed in frames per tick.
15664
15861
  */
15665
15862
  animation_speed: double;
15863
+ /**
15864
+ * Blink interval of this object based on the internal "update tick". When zero, blinking is disabled. For other values, the object will be visible the given number of ticks and then invisible for the same duration. Objects with the same blink interval will blink synchronously. Blink interval of game alerts is 30.
15865
+ *
15866
+ * For example, when the interval is 60, the object is visible for 60 ticks and hidden for the next 60.
15867
+ */
15868
+ blink_interval: uint16;
15666
15869
  /**
15667
15870
  * Color or tint of the object.
15668
15871
  */
@@ -15673,6 +15876,8 @@ interface LuaRenderObject {
15673
15876
  dash_length: double;
15674
15877
  /**
15675
15878
  * If this object is being drawn on the ground, under most entities and sprites.
15879
+ *
15880
+ * In {@link render_mode | runtime:LuaRenderObject::render_mode} == "chart", this value is unused.
15676
15881
  */
15677
15882
  draw_on_ground: boolean;
15678
15883
  /**
@@ -15759,6 +15964,12 @@ interface LuaRenderObject {
15759
15964
  * Render layer of this sprite or animation.
15760
15965
  */
15761
15966
  render_layer: RenderLayer;
15967
+ /**
15968
+ * Whether the object is rendered in game world or on the chart (map view).
15969
+ *
15970
+ * When it is changed, the object is pushed to front of its new group.
15971
+ */
15972
+ render_mode: ScriptRenderMode;
15762
15973
  /**
15763
15974
  * Where bottom right corner of this rectangle is drawn.
15764
15975
  */
@@ -15867,10 +16078,12 @@ interface LuaRendering {
15867
16078
  * @param table.oriented_offset Offsets the center of the animation if `orientation_target` is given. This offset will rotate together with the animation.
15868
16079
  * @param table.target Center of the animation.
15869
16080
  * @param table.time_to_live In ticks. Defaults to living forever.
16081
+ * @param table.blink_interval In ticks. Defaults to 0 (no blinking). Game alerts use 30.
15870
16082
  * @param table.forces The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
15871
16083
  * @param table.players The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
15872
16084
  * @param table.visible If this is rendered to anyone at all. Defaults to true.
15873
16085
  * @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
16086
+ * @param table.render_mode Mode which this object should render in. Defaults to "game".
15874
16087
  */
15875
16088
  draw_animation(this: void, table: {
15876
16089
  animation: string;
@@ -15887,10 +16100,12 @@ interface LuaRendering {
15887
16100
  target: ScriptRenderTarget;
15888
16101
  surface: SurfaceIdentification;
15889
16102
  time_to_live?: uint;
16103
+ blink_interval?: uint16;
15890
16104
  forces?: ForceSet;
15891
16105
  players?: PlayerIdentification[];
15892
16106
  visible?: boolean;
15893
16107
  only_in_alt_mode?: boolean;
16108
+ render_mode?: ScriptRenderMode;
15894
16109
  }): LuaRenderObject;
15895
16110
  /**
15896
16111
  * Create an arc.
@@ -15899,11 +16114,13 @@ interface LuaRendering {
15899
16114
  * @param table.start_angle Where the arc starts, in radian.
15900
16115
  * @param table.angle The angle of the arc, in radian.
15901
16116
  * @param table.time_to_live In ticks. Defaults to living forever.
16117
+ * @param table.blink_interval In ticks. Defaults to 0 (no blinking). Game alerts use 30.
15902
16118
  * @param table.forces The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
15903
16119
  * @param table.players The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
15904
16120
  * @param table.visible If this is rendered to anyone at all. Defaults to true.
15905
16121
  * @param table.draw_on_ground If this should be drawn below sprites and entities. Defaults to false.
15906
16122
  * @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
16123
+ * @param table.render_mode Mode which this object should render in. Defaults to "game".
15907
16124
  */
15908
16125
  draw_arc(this: void, table: {
15909
16126
  color: Color;
@@ -15914,11 +16131,13 @@ interface LuaRendering {
15914
16131
  target: ScriptRenderTarget;
15915
16132
  surface: SurfaceIdentification;
15916
16133
  time_to_live?: uint;
16134
+ blink_interval?: uint16;
15917
16135
  forces?: ForceSet;
15918
16136
  players?: PlayerIdentification[];
15919
16137
  visible?: boolean;
15920
16138
  draw_on_ground?: boolean;
15921
16139
  only_in_alt_mode?: boolean;
16140
+ render_mode?: ScriptRenderMode;
15922
16141
  }): LuaRenderObject;
15923
16142
  /**
15924
16143
  * Create a circle.
@@ -15926,11 +16145,13 @@ interface LuaRendering {
15926
16145
  * @param table.width Width of the outline, used only if filled = false. Value is in pixels (32 per tile). Defaults to 1.
15927
16146
  * @param table.filled If the circle should be filled. Defaults to false.
15928
16147
  * @param table.time_to_live In ticks. Defaults to living forever.
16148
+ * @param table.blink_interval In ticks. Defaults to 0 (no blinking). Game alerts use 30.
15929
16149
  * @param table.forces The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
15930
16150
  * @param table.players The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
15931
16151
  * @param table.visible If this is rendered to anyone at all. Defaults to true.
15932
16152
  * @param table.draw_on_ground If this should be drawn below sprites and entities. Defaults to false.
15933
16153
  * @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
16154
+ * @param table.render_mode Mode which this object should render in. Defaults to "game".
15934
16155
  */
15935
16156
  draw_circle(this: void, table: {
15936
16157
  color: Color;
@@ -15940,11 +16161,13 @@ interface LuaRendering {
15940
16161
  target: ScriptRenderTarget;
15941
16162
  surface: SurfaceIdentification;
15942
16163
  time_to_live?: uint;
16164
+ blink_interval?: uint16;
15943
16165
  forces?: ForceSet;
15944
16166
  players?: PlayerIdentification[];
15945
16167
  visible?: boolean;
15946
16168
  draw_on_ground?: boolean;
15947
16169
  only_in_alt_mode?: boolean;
16170
+ render_mode?: ScriptRenderMode;
15948
16171
  }): LuaRenderObject;
15949
16172
  /**
15950
16173
  * Create a light.
@@ -15958,10 +16181,12 @@ interface LuaRendering {
15958
16181
  * @param table.color Defaults to white (no tint).
15959
16182
  * @param table.target Center of the light.
15960
16183
  * @param table.time_to_live In ticks. Defaults to living forever.
16184
+ * @param table.blink_interval In ticks. Defaults to 0 (no blinking). Game alerts use 30.
15961
16185
  * @param table.forces The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
15962
16186
  * @param table.players The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
15963
16187
  * @param table.visible If this is rendered to anyone at all. Defaults to true.
15964
16188
  * @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
16189
+ * @param table.render_mode Mode which this object should render in. Defaults to "game".
15965
16190
  */
15966
16191
  draw_light(this: void, table: {
15967
16192
  sprite: SpritePath;
@@ -15974,10 +16199,12 @@ interface LuaRendering {
15974
16199
  target: ScriptRenderTarget;
15975
16200
  surface: SurfaceIdentification;
15976
16201
  time_to_live?: uint;
16202
+ blink_interval?: uint16;
15977
16203
  forces?: ForceSet;
15978
16204
  players?: PlayerIdentification[];
15979
16205
  visible?: boolean;
15980
16206
  only_in_alt_mode?: boolean;
16207
+ render_mode?: ScriptRenderMode;
15981
16208
  }): LuaRenderObject;
15982
16209
  /**
15983
16210
  * Create a line.
@@ -15986,11 +16213,13 @@ interface LuaRendering {
15986
16213
  * @param table.dash_length Length of the dashes that this line has. Used only if gap_length > 0. Default is 0.
15987
16214
  * @param table.dash_offset Starting offset to apply to dashes. Cannot be greater than dash_length + gap_length. Default is 0.
15988
16215
  * @param table.time_to_live In ticks. Defaults to living forever.
16216
+ * @param table.blink_interval In ticks. Defaults to 0 (no blinking). Game alerts use 30.
15989
16217
  * @param table.forces The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
15990
16218
  * @param table.players The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
15991
16219
  * @param table.visible If this is rendered to anyone at all. Defaults to true.
15992
16220
  * @param table.draw_on_ground If this should be drawn below sprites and entities. Defaults to false.
15993
16221
  * @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
16222
+ * @param table.render_mode Mode which this object should render in. Defaults to "game".
15994
16223
  * @example ```
15995
16224
  -- Draw a white and 2 pixel wide line from {0, 0} to {2, 2}.
15996
16225
  rendering.draw_line{surface = game.player.surface, from = {0, 0}, to = {2, 2}, color = {1, 1, 1}, width = 2}
@@ -16010,11 +16239,13 @@ interface LuaRendering {
16010
16239
  to: ScriptRenderTarget;
16011
16240
  surface: SurfaceIdentification;
16012
16241
  time_to_live?: uint;
16242
+ blink_interval?: uint16;
16013
16243
  forces?: ForceSet;
16014
16244
  players?: PlayerIdentification[];
16015
16245
  visible?: boolean;
16016
16246
  draw_on_ground?: boolean;
16017
16247
  only_in_alt_mode?: boolean;
16248
+ render_mode?: ScriptRenderMode;
16018
16249
  }): LuaRenderObject;
16019
16250
  /**
16020
16251
  * Create a triangle mesh defined by a triangle strip.
@@ -16023,11 +16254,13 @@ interface LuaRendering {
16023
16254
  * @param table.orientation_target If given, the vertices (that are not set to an entity) rotate so that it faces this target. Note that `orientation` is still applied.
16024
16255
  * @param table.use_target_orientation Only used if `orientation_target` is a LuaEntity.
16025
16256
  * @param table.time_to_live In ticks. Defaults to living forever.
16257
+ * @param table.blink_interval In ticks. Defaults to 0 (no blinking). Game alerts use 30.
16026
16258
  * @param table.forces The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
16027
16259
  * @param table.players The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
16028
16260
  * @param table.visible If this is rendered to anyone at all. Defaults to true.
16029
16261
  * @param table.draw_on_ground If this should be drawn below sprites and entities. Defaults to false.
16030
16262
  * @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
16263
+ * @param table.render_mode Mode which this object should render in. Defaults to "game".
16031
16264
  */
16032
16265
  draw_polygon(this: void, table: {
16033
16266
  color: Color;
@@ -16038,22 +16271,26 @@ interface LuaRendering {
16038
16271
  use_target_orientation?: boolean;
16039
16272
  surface: SurfaceIdentification;
16040
16273
  time_to_live?: uint;
16274
+ blink_interval?: uint16;
16041
16275
  forces?: ForceSet;
16042
16276
  players?: PlayerIdentification[];
16043
16277
  visible?: boolean;
16044
16278
  draw_on_ground?: boolean;
16045
16279
  only_in_alt_mode?: boolean;
16280
+ render_mode?: ScriptRenderMode;
16046
16281
  }): LuaRenderObject;
16047
16282
  /**
16048
16283
  * Create a rectangle.
16049
16284
  * @param table.width Width of the outline, used only if filled = false. Value is in pixels (32 per tile). Defaults to 1.
16050
16285
  * @param table.filled If the rectangle should be filled. Defaults to false.
16051
16286
  * @param table.time_to_live In ticks. Defaults to living forever.
16287
+ * @param table.blink_interval In ticks. Defaults to 0 (no blinking). Game alerts use 30.
16052
16288
  * @param table.forces The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
16053
16289
  * @param table.players The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
16054
16290
  * @param table.visible If this is rendered to anyone at all. Defaults to true.
16055
16291
  * @param table.draw_on_ground If this should be drawn below sprites and entities. Defaults to false.
16056
16292
  * @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
16293
+ * @param table.render_mode Mode which this object should render in. Defaults to "game".
16057
16294
  * @example ```
16058
16295
  -- Draw a white and 1 pixel wide square outline with the corners {0, 0} and {2, 2}.
16059
16296
  rendering.draw_rectangle{surface = game.player.surface, left_top = {0, 0}, right_bottom = {2, 2}, color = {1, 1, 1}}
@@ -16067,11 +16304,13 @@ interface LuaRendering {
16067
16304
  right_bottom: ScriptRenderTarget;
16068
16305
  surface: SurfaceIdentification;
16069
16306
  time_to_live?: uint;
16307
+ blink_interval?: uint16;
16070
16308
  forces?: ForceSet;
16071
16309
  players?: PlayerIdentification[];
16072
16310
  visible?: boolean;
16073
16311
  draw_on_ground?: boolean;
16074
16312
  only_in_alt_mode?: boolean;
16313
+ render_mode?: ScriptRenderMode;
16075
16314
  }): LuaRenderObject;
16076
16315
  /**
16077
16316
  * Create a sprite.
@@ -16084,6 +16323,7 @@ interface LuaRendering {
16084
16323
  * @param table.oriented_offset Offsets the center of the sprite if `orientation_target` is given. This offset will rotate together with the sprite.
16085
16324
  * @param table.target Center of the sprite.
16086
16325
  * @param table.time_to_live In ticks. Defaults to living forever.
16326
+ * @param table.blink_interval In ticks. Defaults to 0 (no blinking). Game alerts use 30.
16087
16327
  * @param table.forces The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
16088
16328
  * @param table.players The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
16089
16329
  * @param table.visible If this is rendered to anyone at all. Defaults to true.
@@ -16095,6 +16335,7 @@ interface LuaRendering {
16095
16335
  * @example ```
16096
16336
  -- This will draw an iron plate icon at the character's head. The sprite will move together with the character.
16097
16337
  rendering.draw_sprite{sprite = "item.iron-plate", target = {entity = game.player.character, offset = {0, -2}}, surface = game.player.surface}
16338
+ $field(render_mode, ScriptRenderMode, $optional) Mode which this object should render in. Defaults to "game".
16098
16339
  ```
16099
16340
  */
16100
16341
  draw_sprite(this: void, table: {
@@ -16110,6 +16351,7 @@ interface LuaRendering {
16110
16351
  target: ScriptRenderTarget;
16111
16352
  surface: SurfaceIdentification;
16112
16353
  time_to_live?: uint;
16354
+ blink_interval?: uint16;
16113
16355
  forces?: ForceSet;
16114
16356
  players?: PlayerIdentification[];
16115
16357
  visible?: boolean;
@@ -16122,6 +16364,7 @@ interface LuaRendering {
16122
16364
  * @param table.text The text to display.
16123
16365
  * @param table.font Name of font to use. Defaults to the same font as flying-text.
16124
16366
  * @param table.time_to_live In ticks. Defaults to living forever.
16367
+ * @param table.blink_interval In ticks. Defaults to 0 (no blinking). Game alerts use 30.
16125
16368
  * @param table.forces The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
16126
16369
  * @param table.players The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
16127
16370
  * @param table.visible If this is rendered to anyone at all. Defaults to true.
@@ -16131,6 +16374,7 @@ interface LuaRendering {
16131
16374
  * @param table.vertical_alignment Defaults to "top".
16132
16375
  * @param table.scale_with_zoom Defaults to false. If true, the text scales with player zoom, resulting in it always being the same size on screen, and the size compared to the game world changes.
16133
16376
  * @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
16377
+ * @param table.render_mode Mode which this object should render in. Defaults to "game".
16134
16378
  * @param table.use_rich_text If rich text rendering is enabled. Defaults to false.
16135
16379
  */
16136
16380
  draw_text(this: void, table: {
@@ -16141,6 +16385,7 @@ interface LuaRendering {
16141
16385
  scale?: double;
16142
16386
  font?: string;
16143
16387
  time_to_live?: uint;
16388
+ blink_interval?: uint16;
16144
16389
  forces?: ForceSet;
16145
16390
  players?: PlayerIdentification[];
16146
16391
  visible?: boolean;
@@ -16150,6 +16395,7 @@ interface LuaRendering {
16150
16395
  vertical_alignment?: VerticalTextAlign;
16151
16396
  scale_with_zoom?: boolean;
16152
16397
  only_in_alt_mode?: boolean;
16398
+ render_mode?: ScriptRenderMode;
16153
16399
  use_rich_text?: boolean;
16154
16400
  }): LuaRenderObject;
16155
16401
  /**
@@ -16725,6 +16971,10 @@ interface LuaSpacePlatform {
16725
16971
  * The force of this space platform.
16726
16972
  */
16727
16973
  readonly force: LuaForce;
16974
+ /**
16975
+ * If this platform is hidden from the remote view surface list.
16976
+ */
16977
+ hidden: boolean;
16728
16978
  /**
16729
16979
  * The hub on this platform. `nil` if the platform has not had the starter pack applied or hub was destroyed but the platform not yet deleted.
16730
16980
  *
@@ -16795,7 +17045,7 @@ interface LuaSpacePlatform {
16795
17045
  /**
16796
17046
  * The total weight of the platform.
16797
17047
  */
16798
- readonly weight: uint;
17048
+ readonly weight: Weight;
16799
17049
  }
16800
17050
  /**
16801
17051
  * Control behavior for space platform hubs
@@ -17611,6 +17861,10 @@ interface LuaSurface {
17611
17861
  * @returns The resulting set of tiles.
17612
17862
  */
17613
17863
  get_connected_tiles(this: void, position: TilePosition, tiles: TileID[], include_diagonal?: boolean, area?: BoundingBox): TilePosition[];
17864
+ /**
17865
+ * Gets the cover tile for the given force and tile on this surface if one is set.
17866
+ */
17867
+ get_default_cover_tile(this: void, force: ForceID, tile: TileID): LuaTilePrototype | null;
17614
17868
  /**
17615
17869
  * The double hidden tile name or `nil` if there isn't one for the given position.
17616
17870
  * @param position The tile position.
@@ -17783,6 +18037,10 @@ interface LuaSurface {
17783
18037
  * @param status The chunk's new status.
17784
18038
  */
17785
18039
  set_chunk_generated_status(this: void, position: ChunkPosition, status: defines.chunk_generated_status): void;
18040
+ /**
18041
+ * Sets the cover tile for the given force and tile on this surface.
18042
+ */
18043
+ set_default_cover_tile(this: void, force: ForceID, from_tile: TileID, to_tile: TileID | nil): void;
17786
18044
  /**
17787
18045
  * Set double hidden tile for the specified position. During normal gameplay, only {@link non-mineable | runtime:LuaTilePrototype::mineable_properties} tiles can become double hidden.
17788
18046
  *
@@ -18861,7 +19119,7 @@ interface LuaTilePrototype extends LuaPrototypeBase {
18861
19119
  readonly decorative_removal_probability: float;
18862
19120
  readonly default_cover_tile?: LuaTilePrototype;
18863
19121
  readonly default_destroyed_dropped_item_trigger?: TriggerItem[];
18864
- readonly destroys_dropped_items?: boolean;
19122
+ readonly destroys_dropped_items: boolean;
18865
19123
  /**
18866
19124
  * An alternative prototype that will be used to display info about this prototype in Factoriopedia.
18867
19125
  */
@@ -18881,7 +19139,7 @@ interface LuaTilePrototype extends LuaPrototypeBase {
18881
19139
  readonly items_to_place_this?: ItemStackDefinition[];
18882
19140
  readonly layer: uint;
18883
19141
  readonly map_color: Color;
18884
- readonly max_health?: float;
19142
+ readonly max_health: float;
18885
19143
  readonly mineable_properties: {
18886
19144
  /**
18887
19145
  * Is this tile mineable at all?
@@ -18922,7 +19180,7 @@ interface LuaTilePrototype extends LuaPrototypeBase {
18922
19180
  readonly valid: boolean;
18923
19181
  readonly vehicle_friction_modifier: float;
18924
19182
  readonly walking_speed_modifier: float;
18925
- readonly weight?: double;
19183
+ readonly weight: Weight;
18926
19184
  }
18927
19185
  /**
18928
19186
  * A train. Trains are a sequence of connected rolling stocks -- locomotives and wagons.