factorio-types 1.2.39 → 1.2.41

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.58
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,26 +8152,42 @@ 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?: InventoryWithCustomStackSizeSpecification;
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:
8062
8171
  *
8063
8172
  * - AccumulatorPrototype
8173
+ * - AgriculturalTowerPrototype
8064
8174
  * - ArtilleryTurretPrototype
8175
+ * - AsteroidCollectorPrototype
8065
8176
  * - BeaconPrototype
8066
8177
  * - BoilerPrototype
8067
8178
  * - BurnerGeneratorPrototype
8068
- * - CombinatorPrototype → ArithmeticCombinator, DeciderCombinator
8179
+ * - CargoBayPrototype
8180
+ * - CargoLandingPadPrototype
8181
+ * - CombinatorPrototype → ArithmeticCombinator, DeciderCombinator, SelectorCombinator
8069
8182
  * - ConstantCombinatorPrototype
8070
- * - ContainerPrototype → LogisticContainer, InfinityContainer
8183
+ * - ContainerPrototype → LogisticContainer, InfinityContainer, TemporaryContainer
8071
8184
  * - CraftingMachinePrototype → AssemblingMachine, RocketSilo, Furnace
8185
+ * - DisplayPanelPrototype
8072
8186
  * - ElectricEnergyInterfacePrototype
8073
8187
  * - ElectricPolePrototype
8074
8188
  * - EnemySpawnerPrototype
8189
+ * - FusionGeneratorPrototype
8190
+ * - FusionReactorPrototype
8075
8191
  * - GatePrototype
8076
8192
  * - GeneratorPrototype
8077
8193
  * - HeatInterfacePrototype
@@ -8079,6 +8195,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
8079
8195
  * - InserterPrototype
8080
8196
  * - LabPrototype
8081
8197
  * - LampPrototype
8198
+ * - LightningAttractorPrototype
8082
8199
  * - LinkedContainerPrototype
8083
8200
  * - MarketPrototype
8084
8201
  * - MiningDrillPrototype
@@ -8087,19 +8204,24 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
8087
8204
  * - PipeToGroundPrototype
8088
8205
  * - PowerSwitchPrototype
8089
8206
  * - ProgrammableSpeakerPrototype
8207
+ * - ProxyContainerPrototype
8090
8208
  * - PumpPrototype
8091
8209
  * - RadarPrototype
8092
- * - RailPrototype → CurvedRail, StraightRail
8210
+ * - RailPrototype → CurvedRailA, ElevatedCurvedRailA, CurvedRailB, ElevatedCurvedRailB, HalfDiagonalRail, ElevatedHalfDiagonalRail, LegacyCurvedRail, LegacyStraightRail, RailRamp, StraightRail, ElevatedStraightRail
8093
8211
  * - RailSignalBasePrototype → RailChainSignal, RailSignal
8212
+ * - RailSupportPrototype
8094
8213
  * - ReactorPrototype
8095
8214
  * - RoboportPrototype
8096
8215
  * - SimpleEntityPrototype
8097
8216
  * - SimpleEntityWithOwnerPrototype → SimpleEntityWithForce
8098
8217
  * - SolarPanelPrototype
8218
+ * - SpacePlatformHubPrototype
8099
8219
  * - StorageTankPrototype
8220
+ * - ThrusterPrototype
8100
8221
  * - TrainStopPrototype
8101
- * - TransportBeltConnectablePrototype → LinkedBelt, Loader1x1, Loader1x2, Splitter, TransportBelt, UndergroundBelt
8222
+ * - TransportBeltConnectablePrototype → LaneSplitter, LinkedBelt, Loader1x1, Loader1x2, Splitter, TransportBelt, UndergroundBelt
8102
8223
  * - TurretPrototype → AmmoTurret, ElectricTurret, FluidTurret
8224
+ * - ValvePrototype
8103
8225
  * - WallPrototype
8104
8226
  */
8105
8227
  readonly is_building: boolean;
@@ -8142,6 +8264,10 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
8142
8264
  * The max belt stack size for this loader.
8143
8265
  */
8144
8266
  readonly loader_max_belt_stack_size?: uint8;
8267
+ /**
8268
+ * True if this loader will not drop items for which total amount is less than a full belt stack.
8269
+ */
8270
+ readonly loader_wait_for_full_stack?: boolean;
8145
8271
  /**
8146
8272
  * The logistic mode of this logistic container.
8147
8273
  */
@@ -8216,6 +8342,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
8216
8342
  * The max payload size of this logistics or construction robot.
8217
8343
  */
8218
8344
  readonly max_payload_size?: uint;
8345
+ readonly max_performance?: ThrusterPerformancePoint;
8219
8346
  /**
8220
8347
  * The maximum polyphony for this programmable speaker.
8221
8348
  */
@@ -8249,6 +8376,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
8249
8376
  * The minimum darkness at which this unit spawner can spawn entities.
8250
8377
  */
8251
8378
  readonly min_darkness_to_spawn?: float;
8379
+ readonly min_performance?: ThrusterPerformancePoint;
8252
8380
  /**
8253
8381
  * The minimum pursue time of this unit prototype.
8254
8382
  */
@@ -8261,6 +8389,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
8261
8389
  * Whether this entity is minable and what can be obtained by mining it.
8262
8390
  */
8263
8391
  readonly mineable_properties: MineableProperties;
8392
+ readonly minimal_arm_swing_segment_retraction?: uint;
8264
8393
  /**
8265
8394
  * Minimum amount of this resource.
8266
8395
  */
@@ -8282,6 +8411,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
8282
8411
  */
8283
8412
  readonly move_while_shooting?: boolean;
8284
8413
  readonly neighbour_bonus?: double;
8414
+ readonly neighbour_connectable?: NeighbourConnectable;
8285
8415
  /**
8286
8416
  * The next upgrade for this entity, if any.
8287
8417
  */
@@ -8294,7 +8424,10 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
8294
8424
  * 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
8425
  */
8296
8426
  readonly object_name: string;
8427
+ readonly overkill_fraction?: float;
8428
+ readonly passive_energy_usage?: double;
8297
8429
  readonly per_lane_filters?: boolean;
8430
+ readonly perceived_performance?: PerceivedPerformance;
8298
8431
  /**
8299
8432
  * 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
8433
  */
@@ -8307,6 +8440,8 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
8307
8440
  * 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
8441
  */
8309
8442
  readonly pumping_speed?: double;
8443
+ readonly quality_affects_mining_radius?: boolean;
8444
+ readonly quality_affects_module_slots?: boolean;
8310
8445
  /**
8311
8446
  * The radar range of this unit prototype.
8312
8447
  */
@@ -8316,6 +8451,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
8316
8451
  */
8317
8452
  readonly radius: double;
8318
8453
  readonly radius_visualisation_specification?: RadiusVisualisationSpecification;
8454
+ readonly random_corpse_variation?: boolean;
8319
8455
  readonly reach_distance?: uint;
8320
8456
  readonly reach_resource_distance?: double;
8321
8457
  readonly related_underground_belt?: LuaEntityPrototype;
@@ -8469,6 +8605,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
8469
8605
  * The terrain friction modifier for this vehicle.
8470
8606
  */
8471
8607
  readonly terrain_friction_modifier?: float;
8608
+ readonly tether_size?: float;
8472
8609
  readonly ticks_to_keep_aiming_direction?: uint;
8473
8610
  readonly ticks_to_keep_gun?: uint;
8474
8611
  readonly ticks_to_stay_in_combat?: uint;
@@ -8518,6 +8655,8 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
8518
8655
  * The turret rotation speed of this car prototype.
8519
8656
  */
8520
8657
  readonly turret_rotation_speed?: float;
8658
+ readonly two_direction_only?: boolean;
8659
+ readonly unpowered_arm_speed_scale?: float;
8521
8660
  /**
8522
8661
  * Whether this logistic container prototype uses exact mode
8523
8662
  */
@@ -9382,6 +9521,10 @@ interface LuaForce {
9382
9521
  * @param force The force to copy from.
9383
9522
  */
9384
9523
  copy_from(this: void, force: ForceID): void;
9524
+ /**
9525
+ * Creates the given group if it doesn't already exist.
9526
+ */
9527
+ create_logistic_group(this: void, name: string, type?: defines.logistic_group_type): void;
9385
9528
  /**
9386
9529
  * Creates a new space platform on this force.
9387
9530
  * @param table.name The platform name. If not provided, a random name will be used.
@@ -9393,6 +9536,10 @@ interface LuaForce {
9393
9536
  planet: SpaceLocationID;
9394
9537
  starter_pack: ItemWithQualityID;
9395
9538
  }): LuaSpacePlatform | null;
9539
+ /**
9540
+ * Deletes the given logistic group if it exists.
9541
+ */
9542
+ delete_logistic_group(this: void, name: string, type?: defines.logistic_group_type): void;
9396
9543
  /**
9397
9544
  * Disable all recipes and technologies. Only recipes and technologies enabled explicitly will be useable from this point.
9398
9545
  */
@@ -9501,6 +9648,14 @@ interface LuaForce {
9501
9648
  * Gets the linked inventory for the given prototype and link ID if it exists or `nil`.
9502
9649
  */
9503
9650
  get_linked_inventory(this: void, prototype: EntityID, link_id: uint): LuaInventory | null;
9651
+ /**
9652
+ * Gets the information about the given logistic group.
9653
+ */
9654
+ get_logistic_group(this: void, name: string, type?: defines.logistic_group_type): LogisticGroup | null;
9655
+ /**
9656
+ * Gets the names of the current logistic groups.
9657
+ */
9658
+ get_logistic_groups(this: void, type?: defines.logistic_group_type): string[];
9504
9659
  get_spawn_position(this: void, surface: SurfaceIdentification): MapPosition;
9505
9660
  get_surface_hidden(this: void, surface: SurfaceIdentification): boolean;
9506
9661
  /**
@@ -11122,6 +11277,10 @@ interface BaseLuaGuiElementAddParams {
11122
11277
  * Location in its parent that the child element should slot into. By default, the child will be appended onto the end.
11123
11278
  */
11124
11279
  'index'?: uint;
11280
+ /**
11281
+ * Whether the child element is locked. Defaults to `false`.
11282
+ */
11283
+ 'locked'?: boolean;
11125
11284
  /**
11126
11285
  * Name of the child element. It must be unique within the parent element.
11127
11286
  */
@@ -11966,7 +12125,7 @@ interface LuaInventory {
11966
12125
  * Set the current bar.
11967
12126
  *
11968
12127
  * Only useable if this inventory supports having a bar.
11969
- * @param bar The new limit. Omitting this parameter will clear the limit.
12128
+ * @param bar The new limit. Omitting this parameter or passing `nil` will clear the limit.
11970
12129
  */
11971
12130
  set_bar(this: void, bar?: uint): void;
11972
12131
  /**
@@ -12004,6 +12163,10 @@ interface LuaInventory {
12004
12163
  * The inventory index this inventory uses, if any.
12005
12164
  */
12006
12165
  readonly index?: defines.inventory;
12166
+ /**
12167
+ * Gives a maximum weight of items that can be inserted into this inventory.
12168
+ */
12169
+ readonly max_weight?: Weight;
12007
12170
  /**
12008
12171
  * The mod that owns this inventory, if any.
12009
12172
  */
@@ -12024,6 +12187,10 @@ interface LuaInventory {
12024
12187
  * 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
12188
  */
12026
12189
  readonly valid: boolean;
12190
+ /**
12191
+ * Gives a total weight of all items currently in this inventory.
12192
+ */
12193
+ readonly weight: Weight;
12027
12194
  /**
12028
12195
  * The indexing operator.
12029
12196
  * @example ```
@@ -12531,6 +12698,7 @@ interface LuaItemPrototype extends LuaPrototypeBase {
12531
12698
  * The collision box used by character entities when wearing this armor.
12532
12699
  */
12533
12700
  readonly collision_box?: BoundingBox;
12701
+ readonly create_electric_network?: boolean;
12534
12702
  readonly default_import_location: LuaSpaceLocationPrototype;
12535
12703
  /**
12536
12704
  * The default label color used for this item with label, if any.
@@ -12611,6 +12779,7 @@ interface LuaItemPrototype extends LuaPrototypeBase {
12611
12779
  */
12612
12780
  readonly infinite?: boolean;
12613
12781
  readonly ingredient_to_weight_coefficient: double;
12782
+ readonly initial_items?: ItemProduct[];
12614
12783
  /**
12615
12784
  * The main inventory size for item-with-inventory-prototype.
12616
12785
  */
@@ -12674,6 +12843,10 @@ interface LuaItemPrototype extends LuaPrototypeBase {
12674
12843
  * The results of launching this item in a rocket.
12675
12844
  */
12676
12845
  readonly rocket_launch_products: Product[];
12846
+ /**
12847
+ * How this item interacts when being sent to orbit.
12848
+ */
12849
+ readonly send_to_orbit_mode: 'not-sendable' | 'manual' | 'automated';
12677
12850
  /**
12678
12851
  * If this selection tool skips things covered by fog of war.
12679
12852
  */
@@ -12699,6 +12872,7 @@ interface LuaItemPrototype extends LuaPrototypeBase {
12699
12872
  * The rail support used by this rail planner.
12700
12873
  */
12701
12874
  readonly support?: LuaEntityPrototype;
12875
+ readonly surface?: LuaSurfacePrototype;
12702
12876
  /**
12703
12877
  * 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
12878
  */
@@ -12707,6 +12881,8 @@ interface LuaItemPrototype extends LuaPrototypeBase {
12707
12881
  * The number of tile filters this deconstruction item has.
12708
12882
  */
12709
12883
  readonly tile_filter_slots?: uint;
12884
+ readonly tiles?: SpacePlatformTileDefinition[];
12885
+ readonly trigger?: TriggerItem;
12710
12886
  /**
12711
12887
  * 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
12888
  */
@@ -12714,7 +12890,7 @@ interface LuaItemPrototype extends LuaPrototypeBase {
12714
12890
  /**
12715
12891
  * Weight of this item. More information on how item weight is determined can be found on its {@link auxiliary page | runtime:item-weight}.
12716
12892
  */
12717
- readonly weight: double;
12893
+ readonly weight: Weight;
12718
12894
  }
12719
12895
  /**
12720
12896
  * A reference to an item and count owned by some external entity.
@@ -13425,6 +13601,28 @@ interface LuaMiningDrillControlBehavior extends LuaGenericOnOffControlBehavior {
13425
13601
  */
13426
13602
  readonly valid: boolean;
13427
13603
  }
13604
+ /**
13605
+ * Arbitrary data provided by mods.
13606
+ */
13607
+ interface LuaModData extends LuaPrototypeBase {
13608
+ /**
13609
+ * Provides partial access to the data.
13610
+ */
13611
+ get(this: void, key: string): AnyBasic | null;
13612
+ /**
13613
+ * Provides full data of this prototype.
13614
+ */
13615
+ readonly data: Record<string, AnyBasic>;
13616
+ readonly data_type: string;
13617
+ /**
13618
+ * 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.
13619
+ */
13620
+ readonly object_name: string;
13621
+ /**
13622
+ * 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.
13623
+ */
13624
+ readonly valid: boolean;
13625
+ }
13428
13626
  /**
13429
13627
  * Prototype of a mod setting.
13430
13628
  */
@@ -13882,6 +14080,10 @@ interface LuaPlayer extends LuaControl {
13882
14080
  * Exit the current cutscene. Errors if not in a cutscene.
13883
14081
  */
13884
14082
  exit_cutscene(this: void): void;
14083
+ /**
14084
+ * Exit remote view if possible. Exiting will fail if the player is in a rocket or in a platform.
14085
+ */
14086
+ exit_remote_view(this: void): void;
13885
14087
  /**
13886
14088
  * Gets which quick bar page is being used for the given screen page or `nil` if not known.
13887
14089
  * @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.
@@ -14682,6 +14884,10 @@ interface LuaPrototypes {
14682
14884
  readonly max_inserter_reach_distance: double;
14683
14885
  readonly max_pipe_to_ground_distance: uint8;
14684
14886
  readonly max_underground_belt_distance: uint8;
14887
+ /**
14888
+ * A dictionary containing every LuaModData indexed by `name`.
14889
+ */
14890
+ readonly mod_data: Record<string, LuaModData>;
14685
14891
  /**
14686
14892
  * A dictionary containing every LuaModSettingPrototype indexed by `name`.
14687
14893
  */
@@ -14756,6 +14962,12 @@ interface LuaPrototypes {
14756
14962
  * A dictionary containing every LuaTrivialSmokePrototype indexed by `name`.
14757
14963
  */
14758
14964
  readonly trivial_smoke: Record<string, LuaTrivialSmokePrototype>;
14965
+ /**
14966
+ * All utility constants.
14967
+ *
14968
+ * See {@link UtilityConstants | prototype:UtilityConstants} for possible values.
14969
+ */
14970
+ readonly utility_constants: Record<string, AnyBasic>;
14759
14971
  /**
14760
14972
  * A dictionary containing every LuaVirtualSignalPrototype indexed by `name`.
14761
14973
  */
@@ -14799,16 +15011,38 @@ interface LuaPumpControlBehavior extends LuaGenericOnOffControlBehavior {
14799
15011
  * Prototype of a quality.
14800
15012
  */
14801
15013
  interface LuaQualityPrototype extends LuaPrototypeBase {
15014
+ readonly accumulator_capacity_multiplier: double;
15015
+ readonly asteroid_collector_collection_radius_bonus: uint;
15016
+ readonly beacon_module_slots_bonus: ItemStackIndex;
14802
15017
  readonly beacon_power_usage_multiplier: float;
15018
+ readonly beacon_supply_area_distance_bonus: float;
14803
15019
  /**
14804
15020
  * The color of the prototype
14805
15021
  */
14806
15022
  readonly color: Color;
15023
+ readonly crafting_machine_energy_usage_multiplier: double;
15024
+ readonly crafting_machine_module_slots_bonus: ItemStackIndex;
15025
+ readonly crafting_machine_speed_multiplier: double;
15026
+ readonly default_multiplier: double;
14807
15027
  readonly draw_sprite_by_default: boolean;
15028
+ readonly electric_pole_supply_area_distance_bonus: float;
15029
+ readonly electric_pole_wire_reach_bonus: float;
15030
+ readonly equipment_grid_height_bonus: int16;
15031
+ readonly equipment_grid_width_bonus: int16;
15032
+ readonly fluid_wagon_capacity_multiplier: double;
15033
+ readonly flying_robot_max_energy_multiplier: double;
15034
+ readonly inserter_speed_multiplier: double;
15035
+ readonly inventory_size_multiplier: double;
15036
+ readonly lab_module_slots_bonus: ItemStackIndex;
15037
+ readonly lab_research_speed_multiplier: double;
14808
15038
  /**
14809
15039
  * Level basically specifies the stat-increasing value of this quality level
14810
15040
  */
14811
15041
  readonly level: uint;
15042
+ readonly logistic_cell_charging_energy_multiplier: double;
15043
+ readonly logistic_cell_charging_station_count_bonus: uint;
15044
+ readonly mining_drill_mining_radius_bonus: float;
15045
+ readonly mining_drill_module_slots_bonus: ItemStackIndex;
14812
15046
  readonly mining_drill_resource_drain_multiplier: float;
14813
15047
  /**
14814
15048
  * The next higher level of the quality
@@ -14822,6 +15056,9 @@ interface LuaQualityPrototype extends LuaPrototypeBase {
14822
15056
  * 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
15057
  */
14824
15058
  readonly object_name: string;
15059
+ readonly range_multiplier: double;
15060
+ readonly science_pack_drain_multiplier: float;
15061
+ readonly tool_durability_multiplier: double;
14825
15062
  /**
14826
15063
  * 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
15064
  */
@@ -15620,7 +15857,7 @@ interface LuaRemote {
15620
15857
  readonly object_name: string;
15621
15858
  }
15622
15859
  /**
15623
- * Reference to a single LuaRendering object.
15860
+ * Reference to a single {@link LuaRendering | runtime:LuaRendering} object.
15624
15861
  */
15625
15862
  interface LuaRenderObject {
15626
15863
  /**
@@ -15663,6 +15900,12 @@ interface LuaRenderObject {
15663
15900
  * Animation speed of this animation. Animation speed in frames per tick.
15664
15901
  */
15665
15902
  animation_speed: double;
15903
+ /**
15904
+ * 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.
15905
+ *
15906
+ * For example, when the interval is 60, the object is visible for 60 ticks and hidden for the next 60.
15907
+ */
15908
+ blink_interval: uint16;
15666
15909
  /**
15667
15910
  * Color or tint of the object.
15668
15911
  */
@@ -15673,6 +15916,8 @@ interface LuaRenderObject {
15673
15916
  dash_length: double;
15674
15917
  /**
15675
15918
  * If this object is being drawn on the ground, under most entities and sprites.
15919
+ *
15920
+ * In {@link render_mode | runtime:LuaRenderObject::render_mode} == "chart", this value is unused.
15676
15921
  */
15677
15922
  draw_on_ground: boolean;
15678
15923
  /**
@@ -15759,6 +16004,12 @@ interface LuaRenderObject {
15759
16004
  * Render layer of this sprite or animation.
15760
16005
  */
15761
16006
  render_layer: RenderLayer;
16007
+ /**
16008
+ * Whether the object is rendered in game world or on the chart (map view).
16009
+ *
16010
+ * When it is changed, the object is pushed to front of its new group.
16011
+ */
16012
+ render_mode: ScriptRenderMode;
15762
16013
  /**
15763
16014
  * Where bottom right corner of this rectangle is drawn.
15764
16015
  */
@@ -15867,10 +16118,12 @@ interface LuaRendering {
15867
16118
  * @param table.oriented_offset Offsets the center of the animation if `orientation_target` is given. This offset will rotate together with the animation.
15868
16119
  * @param table.target Center of the animation.
15869
16120
  * @param table.time_to_live In ticks. Defaults to living forever.
16121
+ * @param table.blink_interval In ticks. Defaults to 0 (no blinking). Game alerts use 30.
15870
16122
  * @param table.forces The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
15871
16123
  * @param table.players The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
15872
16124
  * @param table.visible If this is rendered to anyone at all. Defaults to true.
15873
16125
  * @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
16126
+ * @param table.render_mode Mode which this object should render in. Defaults to "game".
15874
16127
  */
15875
16128
  draw_animation(this: void, table: {
15876
16129
  animation: string;
@@ -15887,10 +16140,12 @@ interface LuaRendering {
15887
16140
  target: ScriptRenderTarget;
15888
16141
  surface: SurfaceIdentification;
15889
16142
  time_to_live?: uint;
16143
+ blink_interval?: uint16;
15890
16144
  forces?: ForceSet;
15891
16145
  players?: PlayerIdentification[];
15892
16146
  visible?: boolean;
15893
16147
  only_in_alt_mode?: boolean;
16148
+ render_mode?: ScriptRenderMode;
15894
16149
  }): LuaRenderObject;
15895
16150
  /**
15896
16151
  * Create an arc.
@@ -15899,11 +16154,13 @@ interface LuaRendering {
15899
16154
  * @param table.start_angle Where the arc starts, in radian.
15900
16155
  * @param table.angle The angle of the arc, in radian.
15901
16156
  * @param table.time_to_live In ticks. Defaults to living forever.
16157
+ * @param table.blink_interval In ticks. Defaults to 0 (no blinking). Game alerts use 30.
15902
16158
  * @param table.forces The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
15903
16159
  * @param table.players The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
15904
16160
  * @param table.visible If this is rendered to anyone at all. Defaults to true.
15905
16161
  * @param table.draw_on_ground If this should be drawn below sprites and entities. Defaults to false.
15906
16162
  * @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
16163
+ * @param table.render_mode Mode which this object should render in. Defaults to "game".
15907
16164
  */
15908
16165
  draw_arc(this: void, table: {
15909
16166
  color: Color;
@@ -15914,11 +16171,13 @@ interface LuaRendering {
15914
16171
  target: ScriptRenderTarget;
15915
16172
  surface: SurfaceIdentification;
15916
16173
  time_to_live?: uint;
16174
+ blink_interval?: uint16;
15917
16175
  forces?: ForceSet;
15918
16176
  players?: PlayerIdentification[];
15919
16177
  visible?: boolean;
15920
16178
  draw_on_ground?: boolean;
15921
16179
  only_in_alt_mode?: boolean;
16180
+ render_mode?: ScriptRenderMode;
15922
16181
  }): LuaRenderObject;
15923
16182
  /**
15924
16183
  * Create a circle.
@@ -15926,11 +16185,13 @@ interface LuaRendering {
15926
16185
  * @param table.width Width of the outline, used only if filled = false. Value is in pixels (32 per tile). Defaults to 1.
15927
16186
  * @param table.filled If the circle should be filled. Defaults to false.
15928
16187
  * @param table.time_to_live In ticks. Defaults to living forever.
16188
+ * @param table.blink_interval In ticks. Defaults to 0 (no blinking). Game alerts use 30.
15929
16189
  * @param table.forces The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
15930
16190
  * @param table.players The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
15931
16191
  * @param table.visible If this is rendered to anyone at all. Defaults to true.
15932
16192
  * @param table.draw_on_ground If this should be drawn below sprites and entities. Defaults to false.
15933
16193
  * @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
16194
+ * @param table.render_mode Mode which this object should render in. Defaults to "game".
15934
16195
  */
15935
16196
  draw_circle(this: void, table: {
15936
16197
  color: Color;
@@ -15940,11 +16201,13 @@ interface LuaRendering {
15940
16201
  target: ScriptRenderTarget;
15941
16202
  surface: SurfaceIdentification;
15942
16203
  time_to_live?: uint;
16204
+ blink_interval?: uint16;
15943
16205
  forces?: ForceSet;
15944
16206
  players?: PlayerIdentification[];
15945
16207
  visible?: boolean;
15946
16208
  draw_on_ground?: boolean;
15947
16209
  only_in_alt_mode?: boolean;
16210
+ render_mode?: ScriptRenderMode;
15948
16211
  }): LuaRenderObject;
15949
16212
  /**
15950
16213
  * Create a light.
@@ -15958,10 +16221,12 @@ interface LuaRendering {
15958
16221
  * @param table.color Defaults to white (no tint).
15959
16222
  * @param table.target Center of the light.
15960
16223
  * @param table.time_to_live In ticks. Defaults to living forever.
16224
+ * @param table.blink_interval In ticks. Defaults to 0 (no blinking). Game alerts use 30.
15961
16225
  * @param table.forces The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
15962
16226
  * @param table.players The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
15963
16227
  * @param table.visible If this is rendered to anyone at all. Defaults to true.
15964
16228
  * @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
16229
+ * @param table.render_mode Mode which this object should render in. Defaults to "game".
15965
16230
  */
15966
16231
  draw_light(this: void, table: {
15967
16232
  sprite: SpritePath;
@@ -15974,10 +16239,12 @@ interface LuaRendering {
15974
16239
  target: ScriptRenderTarget;
15975
16240
  surface: SurfaceIdentification;
15976
16241
  time_to_live?: uint;
16242
+ blink_interval?: uint16;
15977
16243
  forces?: ForceSet;
15978
16244
  players?: PlayerIdentification[];
15979
16245
  visible?: boolean;
15980
16246
  only_in_alt_mode?: boolean;
16247
+ render_mode?: ScriptRenderMode;
15981
16248
  }): LuaRenderObject;
15982
16249
  /**
15983
16250
  * Create a line.
@@ -15986,11 +16253,13 @@ interface LuaRendering {
15986
16253
  * @param table.dash_length Length of the dashes that this line has. Used only if gap_length > 0. Default is 0.
15987
16254
  * @param table.dash_offset Starting offset to apply to dashes. Cannot be greater than dash_length + gap_length. Default is 0.
15988
16255
  * @param table.time_to_live In ticks. Defaults to living forever.
16256
+ * @param table.blink_interval In ticks. Defaults to 0 (no blinking). Game alerts use 30.
15989
16257
  * @param table.forces The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
15990
16258
  * @param table.players The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
15991
16259
  * @param table.visible If this is rendered to anyone at all. Defaults to true.
15992
16260
  * @param table.draw_on_ground If this should be drawn below sprites and entities. Defaults to false.
15993
16261
  * @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
16262
+ * @param table.render_mode Mode which this object should render in. Defaults to "game".
15994
16263
  * @example ```
15995
16264
  -- Draw a white and 2 pixel wide line from {0, 0} to {2, 2}.
15996
16265
  rendering.draw_line{surface = game.player.surface, from = {0, 0}, to = {2, 2}, color = {1, 1, 1}, width = 2}
@@ -16010,11 +16279,13 @@ interface LuaRendering {
16010
16279
  to: ScriptRenderTarget;
16011
16280
  surface: SurfaceIdentification;
16012
16281
  time_to_live?: uint;
16282
+ blink_interval?: uint16;
16013
16283
  forces?: ForceSet;
16014
16284
  players?: PlayerIdentification[];
16015
16285
  visible?: boolean;
16016
16286
  draw_on_ground?: boolean;
16017
16287
  only_in_alt_mode?: boolean;
16288
+ render_mode?: ScriptRenderMode;
16018
16289
  }): LuaRenderObject;
16019
16290
  /**
16020
16291
  * Create a triangle mesh defined by a triangle strip.
@@ -16023,11 +16294,13 @@ interface LuaRendering {
16023
16294
  * @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
16295
  * @param table.use_target_orientation Only used if `orientation_target` is a LuaEntity.
16025
16296
  * @param table.time_to_live In ticks. Defaults to living forever.
16297
+ * @param table.blink_interval In ticks. Defaults to 0 (no blinking). Game alerts use 30.
16026
16298
  * @param table.forces The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
16027
16299
  * @param table.players The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
16028
16300
  * @param table.visible If this is rendered to anyone at all. Defaults to true.
16029
16301
  * @param table.draw_on_ground If this should be drawn below sprites and entities. Defaults to false.
16030
16302
  * @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
16303
+ * @param table.render_mode Mode which this object should render in. Defaults to "game".
16031
16304
  */
16032
16305
  draw_polygon(this: void, table: {
16033
16306
  color: Color;
@@ -16038,22 +16311,26 @@ interface LuaRendering {
16038
16311
  use_target_orientation?: boolean;
16039
16312
  surface: SurfaceIdentification;
16040
16313
  time_to_live?: uint;
16314
+ blink_interval?: uint16;
16041
16315
  forces?: ForceSet;
16042
16316
  players?: PlayerIdentification[];
16043
16317
  visible?: boolean;
16044
16318
  draw_on_ground?: boolean;
16045
16319
  only_in_alt_mode?: boolean;
16320
+ render_mode?: ScriptRenderMode;
16046
16321
  }): LuaRenderObject;
16047
16322
  /**
16048
16323
  * Create a rectangle.
16049
16324
  * @param table.width Width of the outline, used only if filled = false. Value is in pixels (32 per tile). Defaults to 1.
16050
16325
  * @param table.filled If the rectangle should be filled. Defaults to false.
16051
16326
  * @param table.time_to_live In ticks. Defaults to living forever.
16327
+ * @param table.blink_interval In ticks. Defaults to 0 (no blinking). Game alerts use 30.
16052
16328
  * @param table.forces The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
16053
16329
  * @param table.players The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
16054
16330
  * @param table.visible If this is rendered to anyone at all. Defaults to true.
16055
16331
  * @param table.draw_on_ground If this should be drawn below sprites and entities. Defaults to false.
16056
16332
  * @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
16333
+ * @param table.render_mode Mode which this object should render in. Defaults to "game".
16057
16334
  * @example ```
16058
16335
  -- Draw a white and 1 pixel wide square outline with the corners {0, 0} and {2, 2}.
16059
16336
  rendering.draw_rectangle{surface = game.player.surface, left_top = {0, 0}, right_bottom = {2, 2}, color = {1, 1, 1}}
@@ -16067,11 +16344,13 @@ interface LuaRendering {
16067
16344
  right_bottom: ScriptRenderTarget;
16068
16345
  surface: SurfaceIdentification;
16069
16346
  time_to_live?: uint;
16347
+ blink_interval?: uint16;
16070
16348
  forces?: ForceSet;
16071
16349
  players?: PlayerIdentification[];
16072
16350
  visible?: boolean;
16073
16351
  draw_on_ground?: boolean;
16074
16352
  only_in_alt_mode?: boolean;
16353
+ render_mode?: ScriptRenderMode;
16075
16354
  }): LuaRenderObject;
16076
16355
  /**
16077
16356
  * Create a sprite.
@@ -16084,6 +16363,7 @@ interface LuaRendering {
16084
16363
  * @param table.oriented_offset Offsets the center of the sprite if `orientation_target` is given. This offset will rotate together with the sprite.
16085
16364
  * @param table.target Center of the sprite.
16086
16365
  * @param table.time_to_live In ticks. Defaults to living forever.
16366
+ * @param table.blink_interval In ticks. Defaults to 0 (no blinking). Game alerts use 30.
16087
16367
  * @param table.forces The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
16088
16368
  * @param table.players The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
16089
16369
  * @param table.visible If this is rendered to anyone at all. Defaults to true.
@@ -16095,6 +16375,7 @@ interface LuaRendering {
16095
16375
  * @example ```
16096
16376
  -- This will draw an iron plate icon at the character's head. The sprite will move together with the character.
16097
16377
  rendering.draw_sprite{sprite = "item.iron-plate", target = {entity = game.player.character, offset = {0, -2}}, surface = game.player.surface}
16378
+ $field(render_mode, ScriptRenderMode, $optional) Mode which this object should render in. Defaults to "game".
16098
16379
  ```
16099
16380
  */
16100
16381
  draw_sprite(this: void, table: {
@@ -16110,6 +16391,7 @@ interface LuaRendering {
16110
16391
  target: ScriptRenderTarget;
16111
16392
  surface: SurfaceIdentification;
16112
16393
  time_to_live?: uint;
16394
+ blink_interval?: uint16;
16113
16395
  forces?: ForceSet;
16114
16396
  players?: PlayerIdentification[];
16115
16397
  visible?: boolean;
@@ -16122,6 +16404,7 @@ interface LuaRendering {
16122
16404
  * @param table.text The text to display.
16123
16405
  * @param table.font Name of font to use. Defaults to the same font as flying-text.
16124
16406
  * @param table.time_to_live In ticks. Defaults to living forever.
16407
+ * @param table.blink_interval In ticks. Defaults to 0 (no blinking). Game alerts use 30.
16125
16408
  * @param table.forces The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
16126
16409
  * @param table.players The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
16127
16410
  * @param table.visible If this is rendered to anyone at all. Defaults to true.
@@ -16131,6 +16414,7 @@ interface LuaRendering {
16131
16414
  * @param table.vertical_alignment Defaults to "top".
16132
16415
  * @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
16416
  * @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
16417
+ * @param table.render_mode Mode which this object should render in. Defaults to "game".
16134
16418
  * @param table.use_rich_text If rich text rendering is enabled. Defaults to false.
16135
16419
  */
16136
16420
  draw_text(this: void, table: {
@@ -16141,6 +16425,7 @@ interface LuaRendering {
16141
16425
  scale?: double;
16142
16426
  font?: string;
16143
16427
  time_to_live?: uint;
16428
+ blink_interval?: uint16;
16144
16429
  forces?: ForceSet;
16145
16430
  players?: PlayerIdentification[];
16146
16431
  visible?: boolean;
@@ -16150,6 +16435,7 @@ interface LuaRendering {
16150
16435
  vertical_alignment?: VerticalTextAlign;
16151
16436
  scale_with_zoom?: boolean;
16152
16437
  only_in_alt_mode?: boolean;
16438
+ render_mode?: ScriptRenderMode;
16153
16439
  use_rich_text?: boolean;
16154
16440
  }): LuaRenderObject;
16155
16441
  /**
@@ -16725,6 +17011,10 @@ interface LuaSpacePlatform {
16725
17011
  * The force of this space platform.
16726
17012
  */
16727
17013
  readonly force: LuaForce;
17014
+ /**
17015
+ * If this platform is hidden from the remote view surface list.
17016
+ */
17017
+ hidden: boolean;
16728
17018
  /**
16729
17019
  * 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
17020
  *
@@ -16795,7 +17085,7 @@ interface LuaSpacePlatform {
16795
17085
  /**
16796
17086
  * The total weight of the platform.
16797
17087
  */
16798
- readonly weight: uint;
17088
+ readonly weight: Weight;
16799
17089
  }
16800
17090
  /**
16801
17091
  * Control behavior for space platform hubs
@@ -17611,6 +17901,10 @@ interface LuaSurface {
17611
17901
  * @returns The resulting set of tiles.
17612
17902
  */
17613
17903
  get_connected_tiles(this: void, position: TilePosition, tiles: TileID[], include_diagonal?: boolean, area?: BoundingBox): TilePosition[];
17904
+ /**
17905
+ * Gets the cover tile for the given force and tile on this surface if one is set.
17906
+ */
17907
+ get_default_cover_tile(this: void, force: ForceID, tile: TileID): LuaTilePrototype | null;
17614
17908
  /**
17615
17909
  * The double hidden tile name or `nil` if there isn't one for the given position.
17616
17910
  * @param position The tile position.
@@ -17783,6 +18077,10 @@ interface LuaSurface {
17783
18077
  * @param status The chunk's new status.
17784
18078
  */
17785
18079
  set_chunk_generated_status(this: void, position: ChunkPosition, status: defines.chunk_generated_status): void;
18080
+ /**
18081
+ * Sets the cover tile for the given force and tile on this surface.
18082
+ */
18083
+ set_default_cover_tile(this: void, force: ForceID, from_tile: TileID, to_tile: TileID | nil): void;
17786
18084
  /**
17787
18085
  * 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
18086
  *
@@ -18861,7 +19159,7 @@ interface LuaTilePrototype extends LuaPrototypeBase {
18861
19159
  readonly decorative_removal_probability: float;
18862
19160
  readonly default_cover_tile?: LuaTilePrototype;
18863
19161
  readonly default_destroyed_dropped_item_trigger?: TriggerItem[];
18864
- readonly destroys_dropped_items?: boolean;
19162
+ readonly destroys_dropped_items: boolean;
18865
19163
  /**
18866
19164
  * An alternative prototype that will be used to display info about this prototype in Factoriopedia.
18867
19165
  */
@@ -18881,7 +19179,7 @@ interface LuaTilePrototype extends LuaPrototypeBase {
18881
19179
  readonly items_to_place_this?: ItemStackDefinition[];
18882
19180
  readonly layer: uint;
18883
19181
  readonly map_color: Color;
18884
- readonly max_health?: float;
19182
+ readonly max_health: float;
18885
19183
  readonly mineable_properties: {
18886
19184
  /**
18887
19185
  * Is this tile mineable at all?
@@ -18922,7 +19220,7 @@ interface LuaTilePrototype extends LuaPrototypeBase {
18922
19220
  readonly valid: boolean;
18923
19221
  readonly vehicle_friction_modifier: float;
18924
19222
  readonly walking_speed_modifier: float;
18925
- readonly weight?: double;
19223
+ readonly weight: Weight;
18926
19224
  }
18927
19225
  /**
18928
19226
  * A train. Trains are a sequence of connected rolling stocks -- locomotives and wagons.