typed-factorio 1.2.0 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -152,8 +152,11 @@ interface LuaArithmeticCombinatorControlBehavior extends LuaCombinatorControlBeh
152
152
  /**
153
153
  * This arithmetic combinator's parameters.
154
154
  *
155
+ * **Note**
156
+ *
157
+ * Writing `nil` clears the combinator's parameters.
158
+ *
155
159
  * {@link https://lua-api.factorio.com/latest/LuaArithmeticCombinatorControlBehavior.html#LuaArithmeticCombinatorControlBehavior.parameters View documentation}
156
- * @remarks Writing `nil` clears the combinator's parameters.
157
160
  */
158
161
  parameters: ArithmeticCombinatorParameters
159
162
  /**
@@ -222,11 +225,14 @@ interface LuaAutoplaceControlPrototype {
222
225
  */
223
226
  interface LuaBootstrap {
224
227
  /**
225
- * Register a function to be run on mod initialization. This is only called when a new save game is created or when a save file is loaded that previously didn't contain the mod. During it, the mod gets the chance to set up initial values that it will use for its lifetime. It has full access to {@link LuaGameScript} and the {@link https://lua-api.factorio.com/latest/Global.html global} table and can change anything about them that it deems appropriate. No other events will be raised for the mod until it has finished this step.
228
+ * Register a function to be run on mod initialization. This is only called when a new save game is created or when a save file is loaded that previously didn't contain the mod. During it, the mod gets the chance to set up initial values that it will use for its lifetime. It has full access to {@link LuaGameScript} and the {@linkplain https://lua-api.factorio.com/latest/Global.html global} table and can change anything about them that it deems appropriate. No other events will be raised for the mod until it has finished this step.
229
+ *
230
+ * **Note**
231
+ *
232
+ * For more context, refer to the {@linkplain https://lua-api.factorio.com/latest/Data-Lifecycle.html Data Lifecycle} page.
226
233
  *
227
234
  * {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.on_init View documentation}
228
235
  * @param f The handler for this event. Passing `nil` will unregister it.
229
- * @remarks For more context, refer to the {@link https://lua-api.factorio.com/latest/Data-Lifecycle.html Data Lifecycle} page.
230
236
  * @example Initialize a `players` table in `global` for later use.
231
237
  *
232
238
  * ```
@@ -237,26 +243,32 @@ interface LuaBootstrap {
237
243
  */
238
244
  on_init(f: (() => void) | undefined): void
239
245
  /**
240
- * Register a function to be run on save load. This is only called for mods that have been part of the save previously, or for players connecting to a running multiplayer session. It gives the mod the opportunity to do some very specific actions, should it need to. Doing anything other than these three will lead to desyncs, which breaks multiplayer and replay functionality. Access to {@link LuaGameScript} is not available. The {@link https://lua-api.factorio.com/latest/Global.html global} table can be accessed and is safe to read from, but not write to, as doing so will lead to an error.
246
+ * Register a function to be run on save load. This is only called for mods that have been part of the save previously, or for players connecting to a running multiplayer session. It gives the mod the opportunity to do some very specific actions, should it need to. Doing anything other than these three will lead to desyncs, which breaks multiplayer and replay functionality. Access to {@link LuaGameScript} is not available. The {@linkplain https://lua-api.factorio.com/latest/Global.html global} table can be accessed and is safe to read from, but not write to, as doing so will lead to an error.
241
247
  *
242
248
  * The only legitimate uses of this event are the following:
243
- * - Re-setup {@link https://www.lua.org/pil/13.html metatables} as they are not persisted through the save/load cycle.
249
+ * - Re-setup {@linkplain https://www.lua.org/pil/13.html metatables} as they are not persisted through the save/load cycle.
244
250
  * - Re-setup conditional event handlers, meaning subscribing to an event only when some condition is met to save processing time.
245
- * - Create local references to data stored in the {@link https://lua-api.factorio.com/latest/Global.html global} table.
251
+ * - Create local references to data stored in the {@linkplain https://lua-api.factorio.com/latest/Global.html global} table.
252
+ *
253
+ * For all other purposes, {@link LuaBootstrap#on_init LuaBootstrap::on_init}, {@link LuaBootstrap#on_configuration_changed LuaBootstrap::on_configuration_changed} or {@linkplain https://lua-api.factorio.com/latest/Migrations.html migrations} should be used instead.
246
254
  *
247
- * For all other purposes, {@link LuaBootstrap#on_init LuaBootstrap::on_init}, {@link LuaBootstrap#on_configuration_changed LuaBootstrap::on_configuration_changed} or {@link https://lua-api.factorio.com/latest/Migrations.html migrations} should be used instead.
255
+ * **Note**
256
+ *
257
+ * For more context, refer to the {@linkplain https://lua-api.factorio.com/latest/Data-Lifecycle.html Data Lifecycle} page.
248
258
  *
249
259
  * {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.on_load View documentation}
250
260
  * @param f The handler for this event. Passing `nil` will unregister it.
251
- * @remarks For more context, refer to the {@link https://lua-api.factorio.com/latest/Data-Lifecycle.html Data Lifecycle} page.
252
261
  */
253
262
  on_load(f: (() => void) | undefined): void
254
263
  /**
255
- * Register a function to be run when mod configuration changes. This is called when the major game version or any mod version changed, when any mod was added or removed, when a startup setting has changed, or when any prototypes have been added or removed. It allows the mod to make any changes it deems appropriate to both the data structures in its {@link https://lua-api.factorio.com/latest/Global.html global} table or to the game state through {@link LuaGameScript}.
264
+ * Register a function to be run when mod configuration changes. This is called when the major game version or any mod version changed, when any mod was added or removed, when a startup setting has changed, or when any prototypes have been added or removed. It allows the mod to make any changes it deems appropriate to both the data structures in its {@linkplain https://lua-api.factorio.com/latest/Global.html global} table or to the game state through {@link LuaGameScript}.
265
+ *
266
+ * **Note**
267
+ *
268
+ * For more context, refer to the {@linkplain https://lua-api.factorio.com/latest/Data-Lifecycle.html Data Lifecycle} page.
256
269
  *
257
270
  * {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.on_configuration_changed View documentation}
258
271
  * @param f The handler for this event. Passing `nil` will unregister it.
259
- * @remarks For more context, refer to the {@link https://lua-api.factorio.com/latest/Data-Lifecycle.html Data Lifecycle} page.
260
272
  */
261
273
  on_configuration_changed(f: ((param1: ConfigurationChangedData) => void) | undefined): void
262
274
  /**
@@ -298,10 +310,13 @@ interface LuaBootstrap {
298
310
  /**
299
311
  * Registers an entity so that after it's destroyed, {@link OnEntityDestroyedEvent on_entity_destroyed} is called. Once an entity is registered, it stays registered until it is actually destroyed, even through save/load cycles. The registration is global across all mods, meaning once one mod registers an entity, all mods listening to {@link OnEntityDestroyedEvent on_entity_destroyed} will receive the event when it is destroyed. Registering the same entity multiple times will still only fire the destruction event once, and will return the same registration number.
300
312
  *
313
+ * **Note**
314
+ *
315
+ * Depending on when a given entity is destroyed, {@link OnEntityDestroyedEvent on_entity_destroyed} will either be fired at the end of the current tick or at the end of the next tick.
316
+ *
301
317
  * {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.register_on_entity_destroyed View documentation}
302
318
  * @param entity The entity to register.
303
319
  * @returns The registration number. It is used to identify the entity in the {@link OnEntityDestroyedEvent on_entity_destroyed} event.
304
- * @remarks Depending on when a given entity is destroyed, {@link OnEntityDestroyedEvent on_entity_destroyed} will either be fired at the end of the current tick or at the end of the next tick.
305
320
  */
306
321
  register_on_entity_destroyed(entity: LuaEntity): RegistrationNumber
307
322
  /**
@@ -633,22 +648,31 @@ interface LuaBurner {
633
648
  /**
634
649
  * The amount of energy left in the currently-burning fuel item.
635
650
  *
651
+ * **Note**
652
+ *
653
+ * Writing to this will silently do nothing if there's no {@link LuaBurner#currently_burning LuaBurner::currently_burning} set.
654
+ *
636
655
  * {@link https://lua-api.factorio.com/latest/LuaBurner.html#LuaBurner.remaining_burning_fuel View documentation}
637
- * @remarks Writing to this will silently do nothing if there's no {@link LuaBurner#currently_burning LuaBurner::currently_burning} set.
638
656
  */
639
657
  remaining_burning_fuel: double
640
658
  /**
641
659
  * The currently burning item, or `nil` if no item is burning.
642
660
  *
661
+ * **Note**
662
+ *
663
+ * Writing to this automatically handles correcting {@link LuaBurner#remaining_burning_fuel LuaBurner::remaining_burning_fuel}.
664
+ *
643
665
  * {@link https://lua-api.factorio.com/latest/LuaBurner.html#LuaBurner.currently_burning View documentation}
644
- * @remarks Writing to this automatically handles correcting {@link LuaBurner#remaining_burning_fuel LuaBurner::remaining_burning_fuel}.
645
666
  */
646
667
  currently_burning: LuaItemPrototype | undefined
647
668
  /**
648
669
  * The fuel categories this burner uses.
649
670
  *
671
+ * **Note**
672
+ *
673
+ * The value in the dictionary is meaningless and exists just to allow the dictionary type for easy lookup.
674
+ *
650
675
  * {@link https://lua-api.factorio.com/latest/LuaBurner.html#LuaBurner.fuel_categories View documentation}
651
- * @remarks The value in the dictionary is meaningless and exists just to allow the dictionary type for easy lookup.
652
676
  */
653
677
  readonly fuel_categories: Record<string, boolean>
654
678
  /**
@@ -700,10 +724,11 @@ interface LuaBurnerPrototype {
700
724
  readonly color: ColorTable
701
725
  }
702
726
  /**
727
+ * **Note**
703
728
  *
729
+ * The value in the dictionary is meaningless and exists just to allow the dictionary type for easy lookup.
704
730
  *
705
731
  * {@link https://lua-api.factorio.com/latest/LuaBurnerPrototype.html#LuaBurnerPrototype.fuel_categories View documentation}
706
- * @remarks The value in the dictionary is meaningless and exists just to allow the dictionary type for easy lookup.
707
732
  */
708
733
  readonly fuel_categories: Record<string, boolean>
709
734
  /**
@@ -854,11 +879,14 @@ interface LuaCommandProcessor {
854
879
  /**
855
880
  * Add a custom console command.
856
881
  *
882
+ * **Note**
883
+ *
884
+ * Trying to add a command with the `name` of a game command or the name of a custom command that is already in use will result in an error.
885
+ *
857
886
  * {@link https://lua-api.factorio.com/latest/LuaCommandProcessor.html#LuaCommandProcessor.add_command View documentation}
858
887
  * @param name The desired name of the command (case sensitive).
859
888
  * @param help The localised help message. It will be shown to players using the `/help` command.
860
889
  * @param _function The function that will be called when this command is invoked.
861
- * @remarks Trying to add a command with the `name` of a game command or the name of a custom command that is already in use will result in an error.
862
890
  * @example This will register a custom event called `print_tick` that prints the current tick to either the player issuing the command or to everyone on the server, depending on the command parameter. It shows the usage of the table that gets passed to any function handling a custom command. This specific example makes use of the `tick` and the optional `player_index` and `parameter` fields. The user is supposed to either call it without any parameter (`"/print_tick"`) or with the `"me"` parameter (`"/print_tick me"`).
863
891
  *
864
892
  * ```
@@ -887,7 +915,7 @@ interface LuaCommandProcessor {
887
915
  */
888
916
  readonly commands: Record<string, LocalisedString>
889
917
  /**
890
- * Lists the built-in commands of the core game. The {@link https://wiki.factorio.com/Console wiki} has an overview of these.
918
+ * Lists the built-in commands of the core game. The {@linkplain https://wiki.factorio.com/Console wiki} has an overview of these.
891
919
  *
892
920
  * {@link https://lua-api.factorio.com/latest/LuaCommandProcessor.html#LuaCommandProcessor.game_commands View documentation}
893
921
  */
@@ -920,8 +948,11 @@ interface LuaConstantCombinatorControlBehavior extends LuaControlBehavior {
920
948
  /**
921
949
  * This constant combinator's parameters, or `nil` if the {@link LuaEntityPrototype#item_slot_count item_slot_count} of the combinator's prototype is `0`.
922
950
  *
951
+ * **Note**
952
+ *
953
+ * Writing `nil` clears the combinator's parameters.
954
+ *
923
955
  * {@link https://lua-api.factorio.com/latest/LuaConstantCombinatorControlBehavior.html#LuaConstantCombinatorControlBehavior.parameters View documentation}
924
- * @remarks Writing `nil` clears the combinator's parameters.
925
956
  */
926
957
  parameters: ConstantCombinatorParameters[] | undefined
927
958
  /**
@@ -1047,9 +1078,12 @@ interface LuaControl {
1047
1078
  /**
1048
1079
  * Get an inventory belonging to this entity. This can be either the "main" inventory or some auxiliary one, like the module slots or logistic trash slots.
1049
1080
  *
1081
+ * **Note**
1082
+ *
1083
+ * A given {@link defines.inventory} is only meaningful for the corresponding LuaObject type. EG: get_inventory(defines.inventory.character_main) is only meaningful if 'this' is a player character. You may get a value back but if the type of 'this' isn't the type referred to by the {@link defines.inventory} it's almost guaranteed to not be the inventory asked for.
1084
+ *
1050
1085
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.get_inventory View documentation}
1051
1086
  * @returns The inventory or `nil` if none with the given index was found.
1052
- * @remarks A given {@link defines.inventory} is only meaningful for the corresponding LuaObject type. EG: get_inventory(defines.inventory.character_main) is only meaningful if 'this' is a player character. You may get a value back but if the type of 'this' isn't the type referred to by the {@link defines.inventory} it's almost guaranteed to not be the inventory asked for.
1053
1087
  */
1054
1088
  get_inventory(inventory: defines.inventory): LuaInventory | undefined
1055
1089
  /**
@@ -1128,14 +1162,17 @@ interface LuaControl {
1128
1162
  * **Raised events:**
1129
1163
  * - {@link OnPlayerChangedPositionEvent on_player_changed_position}? _instantly_ Raised if the teleported entity is a player character.
1130
1164
  *
1165
+ * **Notes**
1166
+ * - Some entities may not be teleported. For instance, transport belts won't allow teleportation and this method will always return `false` when used on any such entity.
1167
+ * - You can also pass 1 or 2 numbers as the parameters and they will be used as relative teleport coordinates `'teleport(0, 1)'` to move the entity 1 tile positive y. `'teleport(4)'` to move the entity 4 tiles to the positive x.
1131
1168
  *
1132
1169
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.teleport View documentation}
1133
1170
  * @param position Where to teleport to.
1134
1171
  * @param surface Surface to teleport to. If not given, will teleport to the entity's current surface. Only players, cars, and spidertrons can be teleported cross-surface.
1135
1172
  * @returns `true` if the entity was successfully teleported.
1136
- * @remarks Some entities may not be teleported. For instance, transport belts won't allow teleportation and this method will always return `false` when used on any such entity.<br>You can also pass 1 or 2 numbers as the parameters and they will be used as relative teleport coordinates `'teleport(0, 1)'` to move the entity 1 tile positive y. `'teleport(4)'` to move the entity 4 tiles to the positive x.
1137
1173
  */
1138
1174
  teleport(position: MapPosition, surface?: SurfaceIdentification): boolean
1175
+ teleport(x: number, y?: number): boolean
1139
1176
  /**
1140
1177
  * Select an entity, as if by hovering the mouse above it.
1141
1178
  *
@@ -1275,12 +1312,14 @@ interface LuaControl {
1275
1312
  * **Raised events:**
1276
1313
  * - {@link OnEntityLogisticSlotChangedEvent on_entity_logistic_slot_changed}? _instantly_ Raised if setting of logistic slot was successful.
1277
1314
  *
1315
+ * **Note**
1316
+ *
1317
+ * This will silently fail if personal logistics are not researched yet.
1278
1318
  *
1279
1319
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.set_personal_logistic_slot View documentation}
1280
1320
  * @param slot_index The slot to set.
1281
1321
  * @param value The logistic request parameters.
1282
1322
  * @returns Whether the slot was set successfully. `false` if personal logistics are not researched yet.
1283
- * @remarks This will silently fail if personal logistics are not researched yet.
1284
1323
  */
1285
1324
  set_personal_logistic_slot(slot_index: uint, value: LogisticParameters): boolean
1286
1325
  /**
@@ -1316,20 +1355,24 @@ interface LuaControl {
1316
1355
  * **Raised events:**
1317
1356
  * - {@link OnEntityLogisticSlotChangedEvent on_entity_logistic_slot_changed}? _instantly_ Raised if clearing of logistic slot was successful.
1318
1357
  *
1358
+ * **Note**
1359
+ *
1360
+ * This will silently fail if personal logistics are not researched yet.
1319
1361
  *
1320
1362
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.clear_personal_logistic_slot View documentation}
1321
1363
  * @param slot_index The slot to clear.
1322
- * @remarks This will silently fail if personal logistics are not researched yet.
1323
1364
  */
1324
1365
  clear_personal_logistic_slot(slot_index: uint): void
1325
1366
  /**
1326
1367
  * **Raised events:**
1327
1368
  * - {@link OnEntityLogisticSlotChangedEvent on_entity_logistic_slot_changed}? _instantly_ Raised if clearing of logistic slot was successful.
1328
1369
  *
1370
+ * **Note**
1371
+ *
1372
+ * This will silently fail if the vehicle does not use logistics.
1329
1373
  *
1330
1374
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.clear_vehicle_logistic_slot View documentation}
1331
1375
  * @param slot_index The slot to clear.
1332
- * @remarks This will silently fail if the vehicle does not use logistics.
1333
1376
  */
1334
1377
  clear_vehicle_logistic_slot(slot_index: uint): void
1335
1378
  /**
@@ -1396,9 +1439,11 @@ interface LuaControl {
1396
1439
  * **Raised events:**
1397
1440
  * - {@link OnGuiOpenedEvent on_gui_opened}? _instantly_ Raised when writing a valid GUI target to this attribute.
1398
1441
  *
1442
+ * **Note**
1443
+ *
1444
+ * Write supports any of the types. Read will return the `entity`, `equipment`, `equipment-grid`, `player`, `element` or `nil`.
1399
1445
  *
1400
1446
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.opened View documentation}
1401
- * @remarks Write supports any of the types. Read will return the `entity`, `equipment`, `equipment-grid`, `player`, `element` or `nil`.
1402
1447
  */
1403
1448
  set opened(
1404
1449
  value:
@@ -1423,7 +1468,7 @@ interface LuaControl {
1423
1468
  *
1424
1469
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.crafting_queue_progress View documentation}
1425
1470
  */
1426
- readonly crafting_queue_progress: double
1471
+ crafting_queue_progress: double
1427
1472
  /**
1428
1473
  * Current walking state.
1429
1474
  *
@@ -1453,8 +1498,11 @@ interface LuaControl {
1453
1498
  /**
1454
1499
  * Current mining state.
1455
1500
  *
1501
+ * **Note**
1502
+ *
1503
+ * When the player isn't mining tiles the player will mine what ever entity is currently selected. See {@link LuaControl#selected LuaControl::selected} and {@link LuaControl#update_selected_entity LuaControl::update_selected_entity}.
1504
+ *
1456
1505
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.mining_state View documentation}
1457
- * @remarks When the player isn't mining tiles the player will mine what ever entity is currently selected. See {@link LuaControl#selected LuaControl::selected} and {@link LuaControl#update_selected_entity LuaControl::update_selected_entity}.
1458
1506
  */
1459
1507
  get mining_state(): {
1460
1508
  /**
@@ -1546,8 +1594,11 @@ interface LuaControl {
1546
1594
  /**
1547
1595
  * The ghost prototype in the player's cursor.
1548
1596
  *
1597
+ * **Notes**
1598
+ * - When read, it will be a {@link LuaItemPrototype}.
1599
+ * - Items in the cursor stack will take priority over the cursor ghost.
1600
+ *
1549
1601
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.cursor_ghost View documentation}
1550
- * @remarks When read, it will be a {@link LuaItemPrototype}.<br>Items in the cursor stack will take priority over the cursor ghost.
1551
1602
  */
1552
1603
  get cursor_ghost(): LuaItemPrototype
1553
1604
  set cursor_ghost(value: ItemPrototypeIdentification)
@@ -1570,8 +1621,11 @@ interface LuaControl {
1570
1621
  /**
1571
1622
  * The current combat robots following the character
1572
1623
  *
1624
+ * **Note**
1625
+ *
1626
+ * When called on a {@link LuaPlayer}, it must be associated with a character(see {@link LuaPlayer#character LuaPlayer::character}).
1627
+ *
1573
1628
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.following_robots View documentation}
1574
- * @remarks When called on a {@link LuaPlayer}, it must be associated with a character(see {@link LuaPlayer#character LuaPlayer::character}).
1575
1629
  */
1576
1630
  readonly following_robots: LuaEntity[]
1577
1631
  /**
@@ -1581,101 +1635,117 @@ interface LuaControl {
1581
1635
  */
1582
1636
  cheat_mode: boolean
1583
1637
  /**
1638
+ * **Note**
1584
1639
  *
1640
+ * When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1585
1641
  *
1586
1642
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.character_crafting_speed_modifier View documentation}
1587
- * @remarks When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1588
1643
  */
1589
1644
  character_crafting_speed_modifier: double
1590
1645
  /**
1646
+ * **Note**
1591
1647
  *
1648
+ * When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1592
1649
  *
1593
1650
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.character_mining_speed_modifier View documentation}
1594
- * @remarks When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1595
1651
  */
1596
1652
  character_mining_speed_modifier: double
1597
1653
  /**
1654
+ * **Note**
1598
1655
  *
1656
+ * When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1599
1657
  *
1600
1658
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.character_additional_mining_categories View documentation}
1601
- * @remarks When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1602
1659
  */
1603
1660
  character_additional_mining_categories: string[]
1604
1661
  /**
1605
1662
  * Modifies the running speed of this character by the given value as a percentage. Setting the running modifier to `0.5` makes the character run 50% faster. The minimum value of `-1` reduces the movement speed by 100%, resulting in a speed of `0`.
1606
1663
  *
1664
+ * **Note**
1665
+ *
1666
+ * When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1667
+ *
1607
1668
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.character_running_speed_modifier View documentation}
1608
- * @remarks When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1609
1669
  */
1610
1670
  character_running_speed_modifier: double
1611
1671
  /**
1672
+ * **Note**
1612
1673
  *
1674
+ * When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1613
1675
  *
1614
1676
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.character_build_distance_bonus View documentation}
1615
- * @remarks When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1616
1677
  */
1617
1678
  character_build_distance_bonus: uint
1618
1679
  /**
1680
+ * **Note**
1619
1681
  *
1682
+ * When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1620
1683
  *
1621
1684
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.character_item_drop_distance_bonus View documentation}
1622
- * @remarks When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1623
1685
  */
1624
1686
  character_item_drop_distance_bonus: uint
1625
1687
  /**
1688
+ * **Note**
1626
1689
  *
1690
+ * When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1627
1691
  *
1628
1692
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.character_reach_distance_bonus View documentation}
1629
- * @remarks When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1630
1693
  */
1631
1694
  character_reach_distance_bonus: uint
1632
1695
  /**
1696
+ * **Note**
1633
1697
  *
1698
+ * When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1634
1699
  *
1635
1700
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.character_resource_reach_distance_bonus View documentation}
1636
- * @remarks When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1637
1701
  */
1638
1702
  character_resource_reach_distance_bonus: uint
1639
1703
  /**
1704
+ * **Note**
1640
1705
  *
1706
+ * When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1641
1707
  *
1642
1708
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.character_item_pickup_distance_bonus View documentation}
1643
- * @remarks When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1644
1709
  */
1645
1710
  character_item_pickup_distance_bonus: uint
1646
1711
  /**
1712
+ * **Note**
1647
1713
  *
1714
+ * When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1648
1715
  *
1649
1716
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.character_loot_pickup_distance_bonus View documentation}
1650
- * @remarks When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1651
1717
  */
1652
1718
  character_loot_pickup_distance_bonus: uint
1653
1719
  /**
1720
+ * **Note**
1654
1721
  *
1722
+ * When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1655
1723
  *
1656
1724
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.character_inventory_slots_bonus View documentation}
1657
- * @remarks When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1658
1725
  */
1659
1726
  character_inventory_slots_bonus: uint
1660
1727
  /**
1728
+ * **Note**
1661
1729
  *
1730
+ * When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1662
1731
  *
1663
1732
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.character_trash_slot_count_bonus View documentation}
1664
- * @remarks When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1665
1733
  */
1666
1734
  character_trash_slot_count_bonus: uint
1667
1735
  /**
1736
+ * **Note**
1668
1737
  *
1738
+ * When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1669
1739
  *
1670
1740
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.character_maximum_following_robot_count_bonus View documentation}
1671
- * @remarks When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1672
1741
  */
1673
1742
  character_maximum_following_robot_count_bonus: uint
1674
1743
  /**
1744
+ * **Note**
1675
1745
  *
1746
+ * When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1676
1747
  *
1677
1748
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.character_health_bonus View documentation}
1678
- * @remarks When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1679
1749
  */
1680
1750
  character_health_bonus: float
1681
1751
  /**
@@ -1755,9 +1825,12 @@ interface LuaControl {
1755
1825
  /**
1756
1826
  * The control behavior for an entity. Inserters have logistic network and circuit network behavior logic, lamps have circuit logic and so on. This is an abstract base class that concrete control behaviors inherit.
1757
1827
  *
1828
+ * **Note**
1829
+ *
1830
+ * An control reference becomes invalid once the control behavior is removed or the entity (see {@link LuaEntity}) it resides in is destroyed.
1831
+ *
1758
1832
  * {@link https://lua-api.factorio.com/latest/LuaControlBehavior.html View documentation}
1759
1833
  * @noSelf
1760
- * @remarks An control reference becomes invalid once the control behavior is removed or the entity (see {@link LuaEntity}) it resides in is destroyed.
1761
1834
  */
1762
1835
  interface LuaControlBehavior {
1763
1836
  /**
@@ -2065,8 +2138,11 @@ interface LuaDeciderCombinatorControlBehavior extends LuaCombinatorControlBehavi
2065
2138
  /**
2066
2139
  * This decider combinator's parameters.
2067
2140
  *
2141
+ * **Note**
2142
+ *
2143
+ * Writing `nil` clears the combinator's parameters.
2144
+ *
2068
2145
  * {@link https://lua-api.factorio.com/latest/LuaDeciderCombinatorControlBehavior.html#LuaDeciderCombinatorControlBehavior.parameters View documentation}
2069
- * @remarks Writing `nil` clears the combinator's parameters.
2070
2146
  */
2071
2147
  parameters: DeciderCombinatorParameters
2072
2148
  /**
@@ -2229,10 +2305,12 @@ interface LuaEntity extends LuaControl {
2229
2305
  * **Raised events:**
2230
2306
  * - {@link ScriptRaisedDestroyEvent script_raised_destroy}? _instantly_ Raised if the `raise_destroy` flag was set and the entity was successfully destroyed.
2231
2307
  *
2308
+ * **Note**
2309
+ *
2310
+ * Not all entities can be destroyed - things such as rails under trains cannot be destroyed until the train is moved or destroyed.
2232
2311
  *
2233
2312
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.destroy View documentation}
2234
2313
  * @returns Returns `false` if the entity was valid and destruction failed, `true` in all other cases.
2235
- * @remarks Not all entities can be destroyed - things such as rails under trains cannot be destroyed until the train is moved or destroyed.
2236
2314
  */
2237
2315
  destroy(params?: {
2238
2316
  /**
@@ -2292,10 +2370,13 @@ interface LuaEntity extends LuaControl {
2292
2370
  /**
2293
2371
  * Test whether this entity's prototype has a certain flag set.
2294
2372
  *
2373
+ * **Note**
2374
+ *
2375
+ * `entity.has_flag(f)` is a shortcut for `entity.prototype.has_flag(f)`.
2376
+ *
2295
2377
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.has_flag View documentation}
2296
2378
  * @param flag The flag to test. See {@link EntityPrototypeFlags} for a list of flags.
2297
2379
  * @returns `true` if this entity has the given flag set.
2298
- * @remarks `entity.has_flag(f)` is a shortcut for `entity.prototype.has_flag(f)`.
2299
2380
  */
2300
2381
  has_flag(flag: keyof EntityPrototypeFlags): boolean
2301
2382
  /**
@@ -2331,10 +2412,13 @@ interface LuaEntity extends LuaControl {
2331
2412
  *
2332
2413
  * _Can only be used if this is Market_
2333
2414
  *
2415
+ * **Note**
2416
+ *
2417
+ * The other offers are moved down to fill the gap created by removing the offer, which decrements the overall size of the offer array.
2418
+ *
2334
2419
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.remove_market_item View documentation}
2335
2420
  * @param offer Index of offer to remove.
2336
2421
  * @returns `true` if the offer was successfully removed; `false` when the given index was not valid.
2337
- * @remarks The other offers are moved down to fill the gap created by removing the offer, which decrements the overall size of the offer array.
2338
2422
  */
2339
2423
  remove_market_item(offer: uint): boolean
2340
2424
  /**
@@ -2454,28 +2538,37 @@ interface LuaEntity extends LuaControl {
2454
2538
  /**
2455
2539
  * Get a logistic requester slot.
2456
2540
  *
2541
+ * **Note**
2542
+ *
2543
+ * Useable only on entities that have requester slots.
2544
+ *
2457
2545
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_request_slot View documentation}
2458
2546
  * @param slot The slot index.
2459
2547
  * @returns Contents of the specified slot; `nil` if the given slot contains no request.
2460
- * @remarks Useable only on entities that have requester slots.
2461
2548
  */
2462
2549
  get_request_slot(slot: uint): SimpleItemStack | undefined
2463
2550
  /**
2464
2551
  * Set a logistic requester slot.
2465
2552
  *
2553
+ * **Note**
2554
+ *
2555
+ * Useable only on entities that have requester slots.
2556
+ *
2466
2557
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_request_slot View documentation}
2467
2558
  * @param request What to request.
2468
2559
  * @param slot The slot index.
2469
2560
  * @returns Whether the slot was set.
2470
- * @remarks Useable only on entities that have requester slots.
2471
2561
  */
2472
2562
  set_request_slot(request: ItemStackIdentification, slot: uint): boolean
2473
2563
  /**
2474
2564
  * Clear a logistic requester slot.
2475
2565
  *
2566
+ * **Note**
2567
+ *
2568
+ * Useable only on entities that have requester slots.
2569
+ *
2476
2570
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.clear_request_slot View documentation}
2477
2571
  * @param slot The slot index.
2478
- * @remarks Useable only on entities that have requester slots.
2479
2572
  */
2480
2573
  clear_request_slot(slot: uint): void
2481
2574
  /**
@@ -2625,11 +2718,14 @@ interface LuaEntity extends LuaControl {
2625
2718
  *
2626
2719
  * _Can only be used if this is Rail_
2627
2720
  *
2721
+ * **Note**
2722
+ *
2723
+ * A rail segment is a continuous section of rail with no branches, signals, nor train stops.
2724
+ *
2628
2725
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_rail_segment_entity View documentation}
2629
2726
  * @param direction The direction of travel relative to this rail.
2630
2727
  * @param in_else_out If true, gets the entity at the entrance of the rail segment, otherwise gets the entity at the exit of the rail segment.
2631
2728
  * @returns `nil` if the rail segment doesn't start/end with a signal nor a train stop.
2632
- * @remarks A rail segment is a continuous section of rail with no branches, signals, nor train stops.
2633
2729
  */
2634
2730
  get_rail_segment_entity(direction: defines.rail_direction, in_else_out: boolean): LuaEntity | undefined
2635
2731
  /**
@@ -2637,10 +2733,13 @@ interface LuaEntity extends LuaControl {
2637
2733
  *
2638
2734
  * _Can only be used if this is Rail_
2639
2735
  *
2736
+ * **Note**
2737
+ *
2738
+ * A rail segment is a continuous section of rail with no branches, signals, nor train stops.
2739
+ *
2640
2740
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_rail_segment_end View documentation}
2641
2741
  * @returns The rail entity.
2642
2742
  * @returns A rail direction pointing out of the rail segment from the end rail.
2643
- * @remarks A rail segment is a continuous section of rail with no branches, signals, nor train stops.
2644
2743
  */
2645
2744
  get_rail_segment_end(direction: defines.rail_direction): LuaMultiReturn<[LuaEntity, defines.rail_direction]>
2646
2745
  /**
@@ -2648,8 +2747,11 @@ interface LuaEntity extends LuaControl {
2648
2747
  *
2649
2748
  * _Can only be used if this is Rail_
2650
2749
  *
2750
+ * **Note**
2751
+ *
2752
+ * A rail segment is a continuous section of rail with no branches, signals, nor train stops.
2753
+ *
2651
2754
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_rail_segment_length View documentation}
2652
- * @remarks A rail segment is a continuous section of rail with no branches, signals, nor train stops.
2653
2755
  */
2654
2756
  get_rail_segment_length(): double
2655
2757
  /**
@@ -2657,26 +2759,35 @@ interface LuaEntity extends LuaControl {
2657
2759
  *
2658
2760
  * _Can only be used if this is Rail_
2659
2761
  *
2762
+ * **Note**
2763
+ *
2764
+ * A rail segment is a continuous section of rail with no branches, signals, nor train stops.
2765
+ *
2660
2766
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_rail_segment_overlaps View documentation}
2661
- * @remarks A rail segment is a continuous section of rail with no branches, signals, nor train stops.
2662
2767
  */
2663
2768
  get_rail_segment_overlaps(): LuaEntity[]
2664
2769
  /**
2665
2770
  * Get the filter for a slot in an inserter, loader, or logistic storage container.
2666
2771
  *
2772
+ * **Note**
2773
+ *
2774
+ * The entity must allow filters.
2775
+ *
2667
2776
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_filter View documentation}
2668
2777
  * @param slot_index Index of the slot to get the filter for.
2669
2778
  * @returns Prototype name of the item being filtered. `nil` if the given slot has no filter.
2670
- * @remarks The entity must allow filters.
2671
2779
  */
2672
2780
  get_filter(slot_index: uint): string | undefined
2673
2781
  /**
2674
2782
  * Set the filter for a slot in an inserter, loader, or logistic storage container.
2675
2783
  *
2784
+ * **Note**
2785
+ *
2786
+ * The entity must allow filters.
2787
+ *
2676
2788
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_filter View documentation}
2677
2789
  * @param slot_index Index of the slot to set the filter for.
2678
2790
  * @param item Prototype name of the item to filter.
2679
- * @remarks The entity must allow filters.
2680
2791
  */
2681
2792
  set_filter(slot_index: uint, item: string): void
2682
2793
  /**
@@ -2792,9 +2903,12 @@ interface LuaEntity extends LuaControl {
2792
2903
  /**
2793
2904
  * Gets all the `LuaLogisticPoint`s that this entity owns. Optionally returns only the point specified by the index parameter.
2794
2905
  *
2906
+ * **Note**
2907
+ *
2908
+ * When `index` is not given, this will be a single `LuaLogisticPoint` for most entities. For some (such as the player character), it can be zero or more.
2909
+ *
2795
2910
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_logistic_point View documentation}
2796
2911
  * @param index If provided, only returns the `LuaLogisticPoint` specified by this index.
2797
- * @remarks When `index` is not given, this will be a single `LuaLogisticPoint` for most entities. For some (such as the player character), it can be zero or more.
2798
2912
  */
2799
2913
  get_logistic_point(index?: defines.logistic_member_index): LuaLogisticPoint | LuaLogisticPoint[] | undefined
2800
2914
  /**
@@ -2894,9 +3008,12 @@ interface LuaEntity extends LuaControl {
2894
3008
  *
2895
3009
  * _Can only be used if this is Vehicle_
2896
3010
  *
3011
+ * **Note**
3012
+ *
3013
+ * This differs over {@link LuaEntity#set_passenger LuaEntity::set_passenger} in that the passenger can't drive the vehicle.
3014
+ *
2897
3015
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_driver View documentation}
2898
3016
  * @param driver The new driver or `nil` to eject the current driver if any.
2899
- * @remarks This differs over {@link LuaEntity#set_passenger LuaEntity::set_passenger} in that the passenger can't drive the vehicle.
2900
3017
  */
2901
3018
  set_driver(driver: LuaEntity | PlayerIdentification | undefined): void
2902
3019
  /**
@@ -2904,9 +3021,12 @@ interface LuaEntity extends LuaControl {
2904
3021
  *
2905
3022
  * _Can only be used if this is Vehicle_
2906
3023
  *
3024
+ * **Note**
3025
+ *
3026
+ * This differs over {@link LuaEntity#get_driver LuaEntity::get_driver} in that the passenger can't drive the car.
3027
+ *
2907
3028
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_passenger View documentation}
2908
3029
  * @returns `nil` if the vehicle contains no passenger. To check if there's a driver see {@link LuaEntity#get_driver LuaEntity::get_driver}.
2909
- * @remarks This differs over {@link LuaEntity#get_driver LuaEntity::get_driver} in that the passenger can't drive the car.
2910
3030
  */
2911
3031
  get_passenger(): LuaEntity | LuaPlayer | undefined
2912
3032
  /**
@@ -2917,8 +3037,11 @@ interface LuaEntity extends LuaControl {
2917
3037
  *
2918
3038
  * _Can only be used if this is Vehicle_
2919
3039
  *
3040
+ * **Note**
3041
+ *
3042
+ * This differs over {@link LuaEntity#get_driver LuaEntity::get_driver} in that the passenger can't drive the car.
3043
+ *
2920
3044
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_passenger View documentation}
2921
- * @remarks This differs over {@link LuaEntity#get_driver LuaEntity::get_driver} in that the passenger can't drive the car.
2922
3045
  */
2923
3046
  set_passenger(passenger: LuaEntity | PlayerIdentification): void
2924
3047
  /**
@@ -2971,25 +3094,34 @@ interface LuaEntity extends LuaControl {
2971
3094
  /**
2972
3095
  * Get the amount of all or some fluid in this entity.
2973
3096
  *
3097
+ * **Note**
3098
+ *
3099
+ * If information about fluid temperatures is required, {@link LuaEntity#fluidbox LuaEntity::fluidbox} should be used instead.
3100
+ *
2974
3101
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_fluid_count View documentation}
2975
3102
  * @param fluid Prototype name of the fluid to count. If not specified, count all fluids.
2976
- * @remarks If information about fluid temperatures is required, {@link LuaEntity#fluidbox LuaEntity::fluidbox} should be used instead.
2977
3103
  */
2978
3104
  get_fluid_count(fluid?: string): double
2979
3105
  /**
2980
3106
  * Get amounts of all fluids in this entity.
2981
3107
  *
3108
+ * **Note**
3109
+ *
3110
+ * If information about fluid temperatures is required, {@link LuaEntity#fluidbox LuaEntity::fluidbox} should be used instead.
3111
+ *
2982
3112
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_fluid_contents View documentation}
2983
3113
  * @returns The amounts, indexed by fluid names.
2984
- * @remarks If information about fluid temperatures is required, {@link LuaEntity#fluidbox LuaEntity::fluidbox} should be used instead.
2985
3114
  */
2986
3115
  get_fluid_contents(): Record<string, double>
2987
3116
  /**
2988
3117
  * Remove fluid from this entity.
2989
3118
  *
3119
+ * **Note**
3120
+ *
3121
+ * If temperature is given only fluid matching that exact temperature is removed. If minimum and maximum is given fluid within that range is removed.
3122
+ *
2990
3123
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.remove_fluid View documentation}
2991
3124
  * @returns Amount of fluid actually removed.
2992
- * @remarks If temperature is given only fluid matching that exact temperature is removed. If minimum and maximum is given fluid within that range is removed.
2993
3125
  */
2994
3126
  remove_fluid(params: {
2995
3127
  /**
@@ -3080,8 +3212,11 @@ interface LuaEntity extends LuaControl {
3080
3212
  /**
3081
3213
  * Toggle this entity's equipment movement bonus. Does nothing if the entity does not have an equipment grid.
3082
3214
  *
3215
+ * **Note**
3216
+ *
3217
+ * This property can also be read and written on the equipment grid of this entity.
3218
+ *
3083
3219
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.toggle_equipment_movement_bonus View documentation}
3084
- * @remarks This property can also be read and written on the equipment grid of this entity.
3085
3220
  */
3086
3221
  toggle_equipment_movement_bonus(): void
3087
3222
  /**
@@ -3134,10 +3269,12 @@ interface LuaEntity extends LuaControl {
3134
3269
  * **Raised events:**
3135
3270
  * - {@link ScriptRaisedDestroyEvent script_raised_destroy}? _instantly_ Raised if the `raise_destroyed` flag was set and the entity was successfully mined.
3136
3271
  *
3272
+ * **Notes**
3273
+ * - 'Standard' operation is to keep calling `LuaEntity.mine` with an inventory until all items are transferred and the items dealt with.
3274
+ * - The result of mining the entity (the item(s) it produces when mined) will be dropped on the ground if they don't fit into the provided inventory.
3137
3275
  *
3138
3276
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.mine View documentation}
3139
3277
  * @returns Whether mining succeeded.
3140
- * @remarks 'Standard' operation is to keep calling `LuaEntity.mine` with an inventory until all items are transferred and the items dealt with.<br>The result of mining the entity (the item(s) it produces when mined) will be dropped on the ground if they don't fit into the provided inventory.
3141
3278
  */
3142
3279
  mine(params?: {
3143
3280
  /**
@@ -3220,9 +3357,12 @@ interface LuaEntity extends LuaControl {
3220
3357
  *
3221
3358
  * _Can only be used if this is LinkedBelt_
3222
3359
  *
3360
+ * **Note**
3361
+ *
3362
+ * Can also be used on entity ghost if it contains linked-belt
3363
+ *
3223
3364
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.connect_linked_belts View documentation}
3224
3365
  * @param neighbour Another linked belt or entity ghost containing linked belt to connect or nil to disconnect
3225
- * @remarks Can also be used on entity ghost if it contains linked-belt
3226
3366
  */
3227
3367
  connect_linked_belts(neighbour: LuaEntity | undefined): void
3228
3368
  /**
@@ -3230,8 +3370,11 @@ interface LuaEntity extends LuaControl {
3230
3370
  *
3231
3371
  * _Can only be used if this is LinkedBelt_
3232
3372
  *
3373
+ * **Note**
3374
+ *
3375
+ * Can also be used on entity ghost if it contains linked-belt
3376
+ *
3233
3377
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.disconnect_linked_belts View documentation}
3234
- * @remarks Can also be used on entity ghost if it contains linked-belt
3235
3378
  */
3236
3379
  disconnect_linked_belts(): void
3237
3380
  /**
@@ -3294,29 +3437,40 @@ interface LuaEntity extends LuaControl {
3294
3437
  /**
3295
3438
  * Deactivating an entity will stop all its operations (car will stop moving, inserters will stop working, fish will stop moving etc).
3296
3439
  *
3440
+ * **Notes**
3441
+ * - Entities that are not active naturally can't be set to be active (setting it to be active will do nothing)
3442
+ * - Ghosts, simple smoke, and corpses can't be modified at this time.
3443
+ * - It is even possible to set the character to not be active, so he can't move and perform most of the tasks.
3444
+ *
3297
3445
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.active View documentation}
3298
- * @remarks Entities that are not active naturally can't be set to be active (setting it to be active will do nothing)<br>Ghosts, simple smoke, and corpses can't be modified at this time.<br>It is even possible to set the character to not be active, so he can't move and perform most of the tasks.
3299
3446
  */
3300
3447
  active: boolean
3301
3448
  /**
3302
3449
  * If set to `false`, this entity can't be damaged and won't be attacked automatically. It can however still be mined.
3303
3450
  *
3451
+ * **Note**
3452
+ *
3453
+ * Entities that are indestructible naturally (they have no health, like smoke, resource etc) can't be set to be destructible.
3454
+ *
3304
3455
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.destructible View documentation}
3305
- * @remarks Entities that are indestructible naturally (they have no health, like smoke, resource etc) can't be set to be destructible.
3306
3456
  */
3307
3457
  destructible: boolean
3308
3458
  /**
3309
- *
3459
+ * **Notes**
3460
+ * - Not minable entities can still be destroyed.
3461
+ * - Entities that are not minable naturally (like smoke, character, enemy units etc) can't be set to minable.
3310
3462
  *
3311
3463
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.minable View documentation}
3312
- * @remarks Not minable entities can still be destroyed.<br>Entities that are not minable naturally (like smoke, character, enemy units etc) can't be set to minable.
3313
3464
  */
3314
3465
  minable: boolean
3315
3466
  /**
3316
3467
  * When entity is not to be rotatable (inserter, transport belt etc), it can't be rotated by player using the R key.
3317
3468
  *
3469
+ * **Note**
3470
+ *
3471
+ * Entities that are not rotatable naturally (like chest or furnace) can't be set to be rotatable.
3472
+ *
3318
3473
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.rotatable View documentation}
3319
- * @remarks Entities that are not rotatable naturally (like chest or furnace) can't be set to be rotatable.
3320
3474
  */
3321
3475
  rotatable: boolean
3322
3476
  /**
@@ -3328,8 +3482,11 @@ interface LuaEntity extends LuaControl {
3328
3482
  /**
3329
3483
  * The current health of the entity, or `nil` if it doesn't have health. Health is automatically clamped to be between `0` and max health (inclusive). Entities with a health of `0` can not be attacked.
3330
3484
  *
3485
+ * **Note**
3486
+ *
3487
+ * To get the maximum possible health of this entity, see {@link LuaEntityPrototype#max_health LuaEntityPrototype::max_health} on its prototype.
3488
+ *
3331
3489
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.health View documentation}
3332
- * @remarks To get the maximum possible health of this entity, see {@link LuaEntityPrototype#max_health LuaEntityPrototype::max_health} on its prototype.
3333
3490
  */
3334
3491
  health: float | undefined
3335
3492
  /**
@@ -3359,8 +3516,11 @@ interface LuaEntity extends LuaControl {
3359
3516
  /**
3360
3517
  * The relative orientation of the vehicle turret, artillery turret, artillery wagon or `nil` if this entity isn't a vehicle with a vehicle turret or artillery turret/wagon.
3361
3518
  *
3519
+ * **Note**
3520
+ *
3521
+ * Writing does nothing if the vehicle doesn't have a turret.
3522
+ *
3362
3523
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.relative_turret_orientation View documentation}
3363
- * @remarks Writing does nothing if the vehicle doesn't have a turret.
3364
3524
  */
3365
3525
  relative_turret_orientation: RealOrientation | undefined
3366
3526
  /**
@@ -3384,8 +3544,11 @@ interface LuaEntity extends LuaControl {
3384
3544
  *
3385
3545
  * _Can only be used if this is ResourceEntity_
3386
3546
  *
3547
+ * **Note**
3548
+ *
3549
+ * If this is not an infinite resource reading will give `nil` and writing will give an error.
3550
+ *
3387
3551
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.initial_amount View documentation}
3388
- * @remarks If this is not an infinite resource reading will give `nil` and writing will give an error.
3389
3552
  */
3390
3553
  initial_amount: uint | undefined
3391
3554
  /**
@@ -3468,8 +3631,11 @@ interface LuaEntity extends LuaControl {
3468
3631
  /**
3469
3632
  * Position where the entity puts its stuff.
3470
3633
  *
3634
+ * **Note**
3635
+ *
3636
+ * Meaningful only for entities that put stuff somewhere, such as mining drills or inserters. Mining drills can't have their drop position changed; inserters must have `allow_custom_vectors` set to true on their prototype to allow changing the drop position.
3637
+ *
3471
3638
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.drop_position View documentation}
3472
- * @remarks Meaningful only for entities that put stuff somewhere, such as mining drills or inserters. Mining drills can't have their drop position changed; inserters must have `allow_custom_vectors` set to true on their prototype to allow changing the drop position.
3473
3639
  */
3474
3640
  get drop_position(): MapPositionTable
3475
3641
  set drop_position(value: MapPosition)
@@ -3478,16 +3644,22 @@ interface LuaEntity extends LuaControl {
3478
3644
  *
3479
3645
  * _Can only be used if this is Inserter_
3480
3646
  *
3647
+ * **Note**
3648
+ *
3649
+ * Inserters must have `allow_custom_vectors` set to true on their prototype to allow changing the pickup position.
3650
+ *
3481
3651
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.pickup_position View documentation}
3482
- * @remarks Inserters must have `allow_custom_vectors` set to true on their prototype to allow changing the pickup position.
3483
3652
  */
3484
3653
  get pickup_position(): MapPositionTable
3485
3654
  set pickup_position(value: MapPosition)
3486
3655
  /**
3487
3656
  * The entity this entity is putting its items to, or `nil` if there is no such entity. If there are multiple possible entities at the drop-off point, writing to this attribute allows a mod to choose which one to drop off items to. The entity needs to collide with the tile box under the drop-off position.
3488
3657
  *
3658
+ * **Note**
3659
+ *
3660
+ * Meaningful only for entities that put items somewhere, such as mining drills or inserters. Returns `nil` for any other entity.
3661
+ *
3489
3662
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.drop_target View documentation}
3490
- * @remarks Meaningful only for entities that put items somewhere, such as mining drills or inserters. Returns `nil` for any other entity.
3491
3663
  */
3492
3664
  drop_target: LuaEntity | undefined
3493
3665
  /**
@@ -3583,15 +3755,21 @@ interface LuaEntity extends LuaControl {
3583
3755
  /**
3584
3756
  * The backer name assigned to this entity, or `nil` if this entity doesn't support backer names. Entities that support backer names are labs, locomotives, radars, roboports, and train stops.
3585
3757
  *
3758
+ * **Note**
3759
+ *
3760
+ * While train stops get the name of a backer when placed down, players can rename them if they want to. In this case, `backer_name` returns the player-given name of the entity.
3761
+ *
3586
3762
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.backer_name View documentation}
3587
- * @remarks While train stops get the name of a backer when placed down, players can rename them if they want to. In this case, `backer_name` returns the player-given name of the entity.
3588
3763
  */
3589
3764
  backer_name: string | undefined
3590
3765
  /**
3591
3766
  * The label of this entity if it has one or `nil`. Changing the value will trigger on_entity_renamed event
3592
3767
  *
3768
+ * **Note**
3769
+ *
3770
+ * only usable on entities that have labels (currently only spider-vehicles).
3771
+ *
3593
3772
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.entity_label View documentation}
3594
- * @remarks only usable on entities that have labels (currently only spider-vehicles).
3595
3773
  */
3596
3774
  entity_label: string | undefined
3597
3775
  /**
@@ -3606,8 +3784,11 @@ interface LuaEntity extends LuaControl {
3606
3784
  /**
3607
3785
  * The character, rolling stock, train stop, car, spider-vehicle, flying text, corpse or simple-entity-with-owner color. Returns `nil` if this entity doesn't use custom colors.
3608
3786
  *
3787
+ * **Note**
3788
+ *
3789
+ * Car color is overridden by the color of the current driver/passenger, if there is one.
3790
+ *
3609
3791
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.color View documentation}
3610
- * @remarks Car color is overridden by the color of the current driver/passenger, if there is one.
3611
3792
  */
3612
3793
  get color(): ColorTable | undefined
3613
3794
  set color(value: Color | undefined)
@@ -3670,8 +3851,11 @@ interface LuaEntity extends LuaControl {
3670
3851
  /**
3671
3852
  * The productivity bonus of this entity.
3672
3853
  *
3854
+ * **Note**
3855
+ *
3856
+ * This includes force based bonuses as well as beacon/module bonuses.
3857
+ *
3673
3858
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.productivity_bonus View documentation}
3674
- * @remarks This includes force based bonuses as well as beacon/module bonuses.
3675
3859
  */
3676
3860
  readonly productivity_bonus: double
3677
3861
  /**
@@ -3683,8 +3867,11 @@ interface LuaEntity extends LuaControl {
3683
3867
  /**
3684
3868
  * The speed bonus of this entity.
3685
3869
  *
3870
+ * **Note**
3871
+ *
3872
+ * This includes force based bonuses as well as beacon/module bonuses.
3873
+ *
3686
3874
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.speed_bonus View documentation}
3687
- * @remarks This includes force based bonuses as well as beacon/module bonuses.
3688
3875
  */
3689
3876
  readonly speed_bonus: double
3690
3877
  /**
@@ -3781,8 +3968,11 @@ interface LuaEntity extends LuaControl {
3781
3968
  /**
3782
3969
  * The buffer size for the electric energy source or nil if the entity doesn't have an electric energy source.
3783
3970
  *
3971
+ * **Note**
3972
+ *
3973
+ * Write access is limited to the ElectricEnergyInterface type
3974
+ *
3784
3975
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.electric_buffer_size View documentation}
3785
- * @remarks Write access is limited to the ElectricEnergyInterface type
3786
3976
  */
3787
3977
  electric_buffer_size: double | undefined
3788
3978
  /**
@@ -3810,13 +4000,13 @@ interface LuaEntity extends LuaControl {
3810
4000
  */
3811
4001
  readonly electric_emissions: double | undefined
3812
4002
  /**
3813
- * A universally unique number identifying this entity for the lifetime of the save. Only entities inheriting from {@link https://wiki.factorio.com/Prototype/EntityWithOwner EntityWithOwner}, as well as {@link https://wiki.factorio.com/Prototype/ItemRequestProxy ItemRequestProxy} and {@link https://wiki.factorio.com/Prototype/EntityGhost EntityGhost} entities, are assigned a unit number. This property is `nil` for entities without unit number.
4003
+ * A universally unique number identifying this entity for the lifetime of the save. Only entities inheriting from {@linkplain https://wiki.factorio.com/Prototype/EntityWithOwner EntityWithOwner}, as well as {@linkplain https://wiki.factorio.com/Prototype/ItemRequestProxy ItemRequestProxy} and {@linkplain https://wiki.factorio.com/Prototype/EntityGhost EntityGhost} entities, are assigned a unit number. This property is `nil` for entities without unit number.
3814
4004
  *
3815
4005
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.unit_number View documentation}
3816
4006
  */
3817
4007
  readonly unit_number: UnitNumber | undefined
3818
4008
  /**
3819
- * The {@link LuaEntity#unit_number unit_number} of the entity contained in this ghost. It is the same as the unit number of the {@link https://wiki.factorio.com/Prototype/EntityWithOwner EntityWithOwner} that was destroyed to create this ghost. If it was created by other means, or if the inner entity doesn not support unit numbers, this property is `nil`.
4009
+ * The {@link LuaEntity#unit_number unit_number} of the entity contained in this ghost. It is the same as the unit number of the {@linkplain https://wiki.factorio.com/Prototype/EntityWithOwner EntityWithOwner} that was destroyed to create this ghost. If it was created by other means, or if the inner entity doesn not support unit numbers, this property is `nil`.
3820
4010
  *
3821
4011
  * _Can only be used if this is EntityGhost_
3822
4012
  *
@@ -4025,8 +4215,11 @@ interface LuaEntity extends LuaControl {
4025
4215
  /**
4026
4216
  * Sets the stack size limit on this inserter. If the stack size is > than the force stack size limit the value is ignored.
4027
4217
  *
4218
+ * **Note**
4219
+ *
4220
+ * Set to 0 to reset.
4221
+ *
4028
4222
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.inserter_stack_size_override View documentation}
4029
- * @remarks Set to 0 to reset.
4030
4223
  */
4031
4224
  inserter_stack_size_override: uint
4032
4225
  /**
@@ -4082,8 +4275,11 @@ interface LuaEntity extends LuaControl {
4082
4275
  *
4083
4276
  * _Can only be used if this is CharacterCorpse_
4084
4277
  *
4278
+ * **Note**
4279
+ *
4280
+ * The index is not guaranteed to be valid so it should always be checked first if a player with that index actually exists.
4281
+ *
4085
4282
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.character_corpse_player_index View documentation}
4086
- * @remarks The index is not guaranteed to be valid so it should always be checked first if a player with that index actually exists.
4087
4283
  */
4088
4284
  character_corpse_player_index: uint
4089
4285
  /**
@@ -4111,8 +4307,11 @@ interface LuaEntity extends LuaControl {
4111
4307
  *
4112
4308
  * _Can only be used if this is Character_
4113
4309
  *
4310
+ * **Note**
4311
+ *
4312
+ * A character associated with a player is not directly controlled by any player.
4313
+ *
4114
4314
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.associated_player View documentation}
4115
- * @remarks A character associated with a player is not directly controlled by any player.
4116
4315
  */
4117
4316
  get associated_player(): LuaPlayer | LuaPlayer | undefined
4118
4317
  set associated_player(value: LuaPlayer | PlayerIdentification | undefined)
@@ -4270,8 +4469,11 @@ interface LuaEntity extends LuaControl {
4270
4469
  /**
4271
4470
  * The forces that this `simple-entity-with-owner`, `simple-entity-with-force`, or `flying-text` is visible to. `nil` or an empty array means it is rendered for every force.
4272
4471
  *
4472
+ * **Note**
4473
+ *
4474
+ * Reading will always give an array of {@link LuaForce}
4475
+ *
4273
4476
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.render_to_forces View documentation}
4274
- * @remarks Reading will always give an array of {@link LuaForce}
4275
4477
  */
4276
4478
  get render_to_forces(): LuaForce[] | undefined
4277
4479
  set render_to_forces(value: ForceIdentification[] | undefined)
@@ -4330,22 +4532,31 @@ interface LuaEntity extends LuaControl {
4330
4532
  /**
4331
4533
  * Whether this requester chest is set to also request from buffer chests.
4332
4534
  *
4535
+ * **Note**
4536
+ *
4537
+ * Useable only on entities that have requester slots.
4538
+ *
4333
4539
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.request_from_buffers View documentation}
4334
- * @remarks Useable only on entities that have requester slots.
4335
4540
  */
4336
4541
  request_from_buffers: boolean
4337
4542
  /**
4338
4543
  * Whether this corpse will ever fade away.
4339
4544
  *
4545
+ * **Note**
4546
+ *
4547
+ * Useable only on corpses.
4548
+ *
4340
4549
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.corpse_expires View documentation}
4341
- * @remarks Useable only on corpses.
4342
4550
  */
4343
4551
  corpse_expires: boolean
4344
4552
  /**
4345
4553
  * If true, corpse won't be destroyed when entities are placed over it. If false, whether corpse will be removed or not depends on value of CorpsePrototype::remove_on_entity_placement.
4346
4554
  *
4555
+ * **Note**
4556
+ *
4557
+ * Useable only on corpses.
4558
+ *
4347
4559
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.corpse_immune_to_entity_placement View documentation}
4348
- * @remarks Useable only on corpses.
4349
4560
  */
4350
4561
  corpse_immune_to_entity_placement: boolean
4351
4562
  /**
@@ -4400,8 +4611,11 @@ interface LuaEntity extends LuaControl {
4400
4611
  *
4401
4612
  * _Can only be used if this is TrainStop_
4402
4613
  *
4614
+ * **Notes**
4615
+ * - Train may be included multiple times when braking distance covers this train stop multiple times
4616
+ * - Value may be read even when train stop has no control behavior
4617
+ *
4403
4618
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.trains_count View documentation}
4404
- * @remarks Train may be included multiple times when braking distance covers this train stop multiple times<br>Value may be read even when train stop has no control behavior
4405
4619
  */
4406
4620
  readonly trains_count: uint | undefined
4407
4621
  /**
@@ -4409,8 +4623,11 @@ interface LuaEntity extends LuaControl {
4409
4623
  *
4410
4624
  * _Can only be used if this is TrainStop_
4411
4625
  *
4626
+ * **Note**
4627
+ *
4628
+ * When a train stop has a control behavior with wire connected and set_trains_limit enabled, this value will be overwritten by it
4629
+ *
4412
4630
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.trains_limit View documentation}
4413
- * @remarks When a train stop has a control behavior with wire connected and set_trains_limit enabled, this value will be overwritten by it
4414
4631
  */
4415
4632
  trains_limit: uint
4416
4633
  /**
@@ -4470,8 +4687,11 @@ interface LuaEntity extends LuaControl {
4470
4687
  *
4471
4688
  * _Can only be used if this is LinkedBelt_
4472
4689
  *
4690
+ * **Notes**
4691
+ * - Can only be changed when linked belt is disconnected (has no neighbour set)
4692
+ * - Can also be used on entity ghost if it contains linked-belt
4693
+ *
4473
4694
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.linked_belt_type View documentation}
4474
- * @remarks Can only be changed when linked belt is disconnected (has no neighbour set)<br>Can also be used on entity ghost if it contains linked-belt
4475
4695
  */
4476
4696
  linked_belt_type: "input" | "output"
4477
4697
  /**
@@ -4479,8 +4699,11 @@ interface LuaEntity extends LuaControl {
4479
4699
  *
4480
4700
  * _Can only be used if this is LinkedBelt_
4481
4701
  *
4702
+ * **Notes**
4703
+ * - Can also be used on entity ghost if it contains linked-belt
4704
+ * - May return entity ghost which contains linked belt to which connection is made
4705
+ *
4482
4706
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.linked_belt_neighbour View documentation}
4483
- * @remarks Can also be used on entity ghost if it contains linked-belt<br>May return entity ghost which contains linked belt to which connection is made
4484
4707
  */
4485
4708
  readonly linked_belt_neighbour: LuaEntity | undefined
4486
4709
  /**
@@ -4547,10 +4770,12 @@ interface BaseEntity extends LuaControl {
4547
4770
  * **Raised events:**
4548
4771
  * - {@link ScriptRaisedDestroyEvent script_raised_destroy}? _instantly_ Raised if the `raise_destroy` flag was set and the entity was successfully destroyed.
4549
4772
  *
4773
+ * **Note**
4774
+ *
4775
+ * Not all entities can be destroyed - things such as rails under trains cannot be destroyed until the train is moved or destroyed.
4550
4776
  *
4551
4777
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.destroy View documentation}
4552
4778
  * @returns Returns `false` if the entity was valid and destruction failed, `true` in all other cases.
4553
- * @remarks Not all entities can be destroyed - things such as rails under trains cannot be destroyed until the train is moved or destroyed.
4554
4779
  */
4555
4780
  destroy(params?: {
4556
4781
  /**
@@ -4586,10 +4811,13 @@ interface BaseEntity extends LuaControl {
4586
4811
  /**
4587
4812
  * Test whether this entity's prototype has a certain flag set.
4588
4813
  *
4814
+ * **Note**
4815
+ *
4816
+ * `entity.has_flag(f)` is a shortcut for `entity.prototype.has_flag(f)`.
4817
+ *
4589
4818
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.has_flag View documentation}
4590
4819
  * @param flag The flag to test. See {@link EntityPrototypeFlags} for a list of flags.
4591
4820
  * @returns `true` if this entity has the given flag set.
4592
- * @remarks `entity.has_flag(f)` is a shortcut for `entity.prototype.has_flag(f)`.
4593
4821
  */
4594
4822
  has_flag(flag: keyof EntityPrototypeFlags): boolean
4595
4823
  /**
@@ -4693,28 +4921,37 @@ interface BaseEntity extends LuaControl {
4693
4921
  /**
4694
4922
  * Get a logistic requester slot.
4695
4923
  *
4924
+ * **Note**
4925
+ *
4926
+ * Useable only on entities that have requester slots.
4927
+ *
4696
4928
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_request_slot View documentation}
4697
4929
  * @param slot The slot index.
4698
4930
  * @returns Contents of the specified slot; `nil` if the given slot contains no request.
4699
- * @remarks Useable only on entities that have requester slots.
4700
4931
  */
4701
4932
  get_request_slot(slot: uint): SimpleItemStack | undefined
4702
4933
  /**
4703
4934
  * Set a logistic requester slot.
4704
4935
  *
4936
+ * **Note**
4937
+ *
4938
+ * Useable only on entities that have requester slots.
4939
+ *
4705
4940
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_request_slot View documentation}
4706
4941
  * @param request What to request.
4707
4942
  * @param slot The slot index.
4708
4943
  * @returns Whether the slot was set.
4709
- * @remarks Useable only on entities that have requester slots.
4710
4944
  */
4711
4945
  set_request_slot(request: ItemStackIdentification, slot: uint): boolean
4712
4946
  /**
4713
4947
  * Clear a logistic requester slot.
4714
4948
  *
4949
+ * **Note**
4950
+ *
4951
+ * Useable only on entities that have requester slots.
4952
+ *
4715
4953
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.clear_request_slot View documentation}
4716
4954
  * @param slot The slot index.
4717
- * @remarks Useable only on entities that have requester slots.
4718
4955
  */
4719
4956
  clear_request_slot(slot: uint): void
4720
4957
  /**
@@ -4766,19 +5003,25 @@ interface BaseEntity extends LuaControl {
4766
5003
  /**
4767
5004
  * Get the filter for a slot in an inserter, loader, or logistic storage container.
4768
5005
  *
5006
+ * **Note**
5007
+ *
5008
+ * The entity must allow filters.
5009
+ *
4769
5010
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_filter View documentation}
4770
5011
  * @param slot_index Index of the slot to get the filter for.
4771
5012
  * @returns Prototype name of the item being filtered. `nil` if the given slot has no filter.
4772
- * @remarks The entity must allow filters.
4773
5013
  */
4774
5014
  get_filter(slot_index: uint): string | undefined
4775
5015
  /**
4776
5016
  * Set the filter for a slot in an inserter, loader, or logistic storage container.
4777
5017
  *
5018
+ * **Note**
5019
+ *
5020
+ * The entity must allow filters.
5021
+ *
4778
5022
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_filter View documentation}
4779
5023
  * @param slot_index Index of the slot to set the filter for.
4780
5024
  * @param item Prototype name of the item to filter.
4781
- * @remarks The entity must allow filters.
4782
5025
  */
4783
5026
  set_filter(slot_index: uint, item: string): void
4784
5027
  /**
@@ -4841,9 +5084,12 @@ interface BaseEntity extends LuaControl {
4841
5084
  /**
4842
5085
  * Gets all the `LuaLogisticPoint`s that this entity owns. Optionally returns only the point specified by the index parameter.
4843
5086
  *
5087
+ * **Note**
5088
+ *
5089
+ * When `index` is not given, this will be a single `LuaLogisticPoint` for most entities. For some (such as the player character), it can be zero or more.
5090
+ *
4844
5091
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_logistic_point View documentation}
4845
5092
  * @param index If provided, only returns the `LuaLogisticPoint` specified by this index.
4846
- * @remarks When `index` is not given, this will be a single `LuaLogisticPoint` for most entities. For some (such as the player character), it can be zero or more.
4847
5093
  */
4848
5094
  get_logistic_point(index?: defines.logistic_member_index): LuaLogisticPoint | LuaLogisticPoint[] | undefined
4849
5095
  /**
@@ -4933,25 +5179,34 @@ interface BaseEntity extends LuaControl {
4933
5179
  /**
4934
5180
  * Get the amount of all or some fluid in this entity.
4935
5181
  *
5182
+ * **Note**
5183
+ *
5184
+ * If information about fluid temperatures is required, {@link LuaEntity#fluidbox LuaEntity::fluidbox} should be used instead.
5185
+ *
4936
5186
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_fluid_count View documentation}
4937
5187
  * @param fluid Prototype name of the fluid to count. If not specified, count all fluids.
4938
- * @remarks If information about fluid temperatures is required, {@link LuaEntity#fluidbox LuaEntity::fluidbox} should be used instead.
4939
5188
  */
4940
5189
  get_fluid_count(fluid?: string): double
4941
5190
  /**
4942
5191
  * Get amounts of all fluids in this entity.
4943
5192
  *
5193
+ * **Note**
5194
+ *
5195
+ * If information about fluid temperatures is required, {@link LuaEntity#fluidbox LuaEntity::fluidbox} should be used instead.
5196
+ *
4944
5197
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_fluid_contents View documentation}
4945
5198
  * @returns The amounts, indexed by fluid names.
4946
- * @remarks If information about fluid temperatures is required, {@link LuaEntity#fluidbox LuaEntity::fluidbox} should be used instead.
4947
5199
  */
4948
5200
  get_fluid_contents(): Record<string, double>
4949
5201
  /**
4950
5202
  * Remove fluid from this entity.
4951
5203
  *
5204
+ * **Note**
5205
+ *
5206
+ * If temperature is given only fluid matching that exact temperature is removed. If minimum and maximum is given fluid within that range is removed.
5207
+ *
4952
5208
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.remove_fluid View documentation}
4953
5209
  * @returns Amount of fluid actually removed.
4954
- * @remarks If temperature is given only fluid matching that exact temperature is removed. If minimum and maximum is given fluid within that range is removed.
4955
5210
  */
4956
5211
  remove_fluid(params: {
4957
5212
  /**
@@ -5002,8 +5257,11 @@ interface BaseEntity extends LuaControl {
5002
5257
  /**
5003
5258
  * Toggle this entity's equipment movement bonus. Does nothing if the entity does not have an equipment grid.
5004
5259
  *
5260
+ * **Note**
5261
+ *
5262
+ * This property can also be read and written on the equipment grid of this entity.
5263
+ *
5005
5264
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.toggle_equipment_movement_bonus View documentation}
5006
- * @remarks This property can also be read and written on the equipment grid of this entity.
5007
5265
  */
5008
5266
  toggle_equipment_movement_bonus(): void
5009
5267
  /**
@@ -5045,10 +5303,12 @@ interface BaseEntity extends LuaControl {
5045
5303
  * **Raised events:**
5046
5304
  * - {@link ScriptRaisedDestroyEvent script_raised_destroy}? _instantly_ Raised if the `raise_destroyed` flag was set and the entity was successfully mined.
5047
5305
  *
5306
+ * **Notes**
5307
+ * - 'Standard' operation is to keep calling `LuaEntity.mine` with an inventory until all items are transferred and the items dealt with.
5308
+ * - The result of mining the entity (the item(s) it produces when mined) will be dropped on the ground if they don't fit into the provided inventory.
5048
5309
  *
5049
5310
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.mine View documentation}
5050
5311
  * @returns Whether mining succeeded.
5051
- * @remarks 'Standard' operation is to keep calling `LuaEntity.mine` with an inventory until all items are transferred and the items dealt with.<br>The result of mining the entity (the item(s) it produces when mined) will be dropped on the ground if they don't fit into the provided inventory.
5052
5312
  */
5053
5313
  mine(params?: {
5054
5314
  /**
@@ -5137,29 +5397,40 @@ interface BaseEntity extends LuaControl {
5137
5397
  /**
5138
5398
  * Deactivating an entity will stop all its operations (car will stop moving, inserters will stop working, fish will stop moving etc).
5139
5399
  *
5400
+ * **Notes**
5401
+ * - Entities that are not active naturally can't be set to be active (setting it to be active will do nothing)
5402
+ * - Ghosts, simple smoke, and corpses can't be modified at this time.
5403
+ * - It is even possible to set the character to not be active, so he can't move and perform most of the tasks.
5404
+ *
5140
5405
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.active View documentation}
5141
- * @remarks Entities that are not active naturally can't be set to be active (setting it to be active will do nothing)<br>Ghosts, simple smoke, and corpses can't be modified at this time.<br>It is even possible to set the character to not be active, so he can't move and perform most of the tasks.
5142
5406
  */
5143
5407
  active: boolean
5144
5408
  /**
5145
5409
  * If set to `false`, this entity can't be damaged and won't be attacked automatically. It can however still be mined.
5146
5410
  *
5411
+ * **Note**
5412
+ *
5413
+ * Entities that are indestructible naturally (they have no health, like smoke, resource etc) can't be set to be destructible.
5414
+ *
5147
5415
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.destructible View documentation}
5148
- * @remarks Entities that are indestructible naturally (they have no health, like smoke, resource etc) can't be set to be destructible.
5149
5416
  */
5150
5417
  destructible: boolean
5151
5418
  /**
5152
- *
5419
+ * **Notes**
5420
+ * - Not minable entities can still be destroyed.
5421
+ * - Entities that are not minable naturally (like smoke, character, enemy units etc) can't be set to minable.
5153
5422
  *
5154
5423
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.minable View documentation}
5155
- * @remarks Not minable entities can still be destroyed.<br>Entities that are not minable naturally (like smoke, character, enemy units etc) can't be set to minable.
5156
5424
  */
5157
5425
  minable: boolean
5158
5426
  /**
5159
5427
  * When entity is not to be rotatable (inserter, transport belt etc), it can't be rotated by player using the R key.
5160
5428
  *
5429
+ * **Note**
5430
+ *
5431
+ * Entities that are not rotatable naturally (like chest or furnace) can't be set to be rotatable.
5432
+ *
5161
5433
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.rotatable View documentation}
5162
- * @remarks Entities that are not rotatable naturally (like chest or furnace) can't be set to be rotatable.
5163
5434
  */
5164
5435
  rotatable: boolean
5165
5436
  /**
@@ -5171,8 +5442,11 @@ interface BaseEntity extends LuaControl {
5171
5442
  /**
5172
5443
  * The current health of the entity, or `nil` if it doesn't have health. Health is automatically clamped to be between `0` and max health (inclusive). Entities with a health of `0` can not be attacked.
5173
5444
  *
5445
+ * **Note**
5446
+ *
5447
+ * To get the maximum possible health of this entity, see {@link LuaEntityPrototype#max_health LuaEntityPrototype::max_health} on its prototype.
5448
+ *
5174
5449
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.health View documentation}
5175
- * @remarks To get the maximum possible health of this entity, see {@link LuaEntityPrototype#max_health LuaEntityPrototype::max_health} on its prototype.
5176
5450
  */
5177
5451
  health: float | undefined
5178
5452
  /**
@@ -5202,8 +5476,11 @@ interface BaseEntity extends LuaControl {
5202
5476
  /**
5203
5477
  * The relative orientation of the vehicle turret, artillery turret, artillery wagon or `nil` if this entity isn't a vehicle with a vehicle turret or artillery turret/wagon.
5204
5478
  *
5479
+ * **Note**
5480
+ *
5481
+ * Writing does nothing if the vehicle doesn't have a turret.
5482
+ *
5205
5483
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.relative_turret_orientation View documentation}
5206
- * @remarks Writing does nothing if the vehicle doesn't have a turret.
5207
5484
  */
5208
5485
  relative_turret_orientation: RealOrientation | undefined
5209
5486
  /**
@@ -5227,16 +5504,22 @@ interface BaseEntity extends LuaControl {
5227
5504
  /**
5228
5505
  * Position where the entity puts its stuff.
5229
5506
  *
5507
+ * **Note**
5508
+ *
5509
+ * Meaningful only for entities that put stuff somewhere, such as mining drills or inserters. Mining drills can't have their drop position changed; inserters must have `allow_custom_vectors` set to true on their prototype to allow changing the drop position.
5510
+ *
5230
5511
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.drop_position View documentation}
5231
- * @remarks Meaningful only for entities that put stuff somewhere, such as mining drills or inserters. Mining drills can't have their drop position changed; inserters must have `allow_custom_vectors` set to true on their prototype to allow changing the drop position.
5232
5512
  */
5233
5513
  get drop_position(): MapPositionTable
5234
5514
  set drop_position(value: MapPosition)
5235
5515
  /**
5236
5516
  * The entity this entity is putting its items to, or `nil` if there is no such entity. If there are multiple possible entities at the drop-off point, writing to this attribute allows a mod to choose which one to drop off items to. The entity needs to collide with the tile box under the drop-off position.
5237
5517
  *
5518
+ * **Note**
5519
+ *
5520
+ * Meaningful only for entities that put items somewhere, such as mining drills or inserters. Returns `nil` for any other entity.
5521
+ *
5238
5522
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.drop_target View documentation}
5239
- * @remarks Meaningful only for entities that put items somewhere, such as mining drills or inserters. Returns `nil` for any other entity.
5240
5523
  */
5241
5524
  drop_target: LuaEntity | undefined
5242
5525
  /**
@@ -5284,15 +5567,21 @@ interface BaseEntity extends LuaControl {
5284
5567
  /**
5285
5568
  * The backer name assigned to this entity, or `nil` if this entity doesn't support backer names. Entities that support backer names are labs, locomotives, radars, roboports, and train stops.
5286
5569
  *
5570
+ * **Note**
5571
+ *
5572
+ * While train stops get the name of a backer when placed down, players can rename them if they want to. In this case, `backer_name` returns the player-given name of the entity.
5573
+ *
5287
5574
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.backer_name View documentation}
5288
- * @remarks While train stops get the name of a backer when placed down, players can rename them if they want to. In this case, `backer_name` returns the player-given name of the entity.
5289
5575
  */
5290
5576
  backer_name: string | undefined
5291
5577
  /**
5292
5578
  * The label of this entity if it has one or `nil`. Changing the value will trigger on_entity_renamed event
5293
5579
  *
5580
+ * **Note**
5581
+ *
5582
+ * only usable on entities that have labels (currently only spider-vehicles).
5583
+ *
5294
5584
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.entity_label View documentation}
5295
- * @remarks only usable on entities that have labels (currently only spider-vehicles).
5296
5585
  */
5297
5586
  entity_label: string | undefined
5298
5587
  /**
@@ -5307,16 +5596,22 @@ interface BaseEntity extends LuaControl {
5307
5596
  /**
5308
5597
  * The character, rolling stock, train stop, car, spider-vehicle, flying text, corpse or simple-entity-with-owner color. Returns `nil` if this entity doesn't use custom colors.
5309
5598
  *
5599
+ * **Note**
5600
+ *
5601
+ * Car color is overridden by the color of the current driver/passenger, if there is one.
5602
+ *
5310
5603
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.color View documentation}
5311
- * @remarks Car color is overridden by the color of the current driver/passenger, if there is one.
5312
5604
  */
5313
5605
  get color(): ColorTable | undefined
5314
5606
  set color(value: Color | undefined)
5315
5607
  /**
5316
5608
  * The productivity bonus of this entity.
5317
5609
  *
5610
+ * **Note**
5611
+ *
5612
+ * This includes force based bonuses as well as beacon/module bonuses.
5613
+ *
5318
5614
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.productivity_bonus View documentation}
5319
- * @remarks This includes force based bonuses as well as beacon/module bonuses.
5320
5615
  */
5321
5616
  readonly productivity_bonus: double
5322
5617
  /**
@@ -5328,8 +5623,11 @@ interface BaseEntity extends LuaControl {
5328
5623
  /**
5329
5624
  * The speed bonus of this entity.
5330
5625
  *
5626
+ * **Note**
5627
+ *
5628
+ * This includes force based bonuses as well as beacon/module bonuses.
5629
+ *
5331
5630
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.speed_bonus View documentation}
5332
- * @remarks This includes force based bonuses as well as beacon/module bonuses.
5333
5631
  */
5334
5632
  readonly speed_bonus: double
5335
5633
  /**
@@ -5359,8 +5657,11 @@ interface BaseEntity extends LuaControl {
5359
5657
  /**
5360
5658
  * The buffer size for the electric energy source or nil if the entity doesn't have an electric energy source.
5361
5659
  *
5660
+ * **Note**
5661
+ *
5662
+ * Write access is limited to the ElectricEnergyInterface type
5663
+ *
5362
5664
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.electric_buffer_size View documentation}
5363
- * @remarks Write access is limited to the ElectricEnergyInterface type
5364
5665
  */
5365
5666
  electric_buffer_size: double | undefined
5366
5667
  /**
@@ -5388,7 +5689,7 @@ interface BaseEntity extends LuaControl {
5388
5689
  */
5389
5690
  readonly electric_emissions: double | undefined
5390
5691
  /**
5391
- * A universally unique number identifying this entity for the lifetime of the save. Only entities inheriting from {@link https://wiki.factorio.com/Prototype/EntityWithOwner EntityWithOwner}, as well as {@link https://wiki.factorio.com/Prototype/ItemRequestProxy ItemRequestProxy} and {@link https://wiki.factorio.com/Prototype/EntityGhost EntityGhost} entities, are assigned a unit number. This property is `nil` for entities without unit number.
5692
+ * A universally unique number identifying this entity for the lifetime of the save. Only entities inheriting from {@linkplain https://wiki.factorio.com/Prototype/EntityWithOwner EntityWithOwner}, as well as {@linkplain https://wiki.factorio.com/Prototype/ItemRequestProxy ItemRequestProxy} and {@linkplain https://wiki.factorio.com/Prototype/EntityGhost EntityGhost} entities, are assigned a unit number. This property is `nil` for entities without unit number.
5392
5693
  *
5393
5694
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.unit_number View documentation}
5394
5695
  */
@@ -5543,8 +5844,11 @@ interface BaseEntity extends LuaControl {
5543
5844
  /**
5544
5845
  * Sets the stack size limit on this inserter. If the stack size is > than the force stack size limit the value is ignored.
5545
5846
  *
5847
+ * **Note**
5848
+ *
5849
+ * Set to 0 to reset.
5850
+ *
5546
5851
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.inserter_stack_size_override View documentation}
5547
- * @remarks Set to 0 to reset.
5548
5852
  */
5549
5853
  inserter_stack_size_override: uint
5550
5854
  /**
@@ -5589,8 +5893,11 @@ interface BaseEntity extends LuaControl {
5589
5893
  /**
5590
5894
  * The forces that this `simple-entity-with-owner`, `simple-entity-with-force`, or `flying-text` is visible to. `nil` or an empty array means it is rendered for every force.
5591
5895
  *
5896
+ * **Note**
5897
+ *
5898
+ * Reading will always give an array of {@link LuaForce}
5899
+ *
5592
5900
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.render_to_forces View documentation}
5593
- * @remarks Reading will always give an array of {@link LuaForce}
5594
5901
  */
5595
5902
  get render_to_forces(): LuaForce[] | undefined
5596
5903
  set render_to_forces(value: ForceIdentification[] | undefined)
@@ -5609,22 +5916,31 @@ interface BaseEntity extends LuaControl {
5609
5916
  /**
5610
5917
  * Whether this requester chest is set to also request from buffer chests.
5611
5918
  *
5919
+ * **Note**
5920
+ *
5921
+ * Useable only on entities that have requester slots.
5922
+ *
5612
5923
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.request_from_buffers View documentation}
5613
- * @remarks Useable only on entities that have requester slots.
5614
5924
  */
5615
5925
  request_from_buffers: boolean
5616
5926
  /**
5617
5927
  * Whether this corpse will ever fade away.
5618
5928
  *
5929
+ * **Note**
5930
+ *
5931
+ * Useable only on corpses.
5932
+ *
5619
5933
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.corpse_expires View documentation}
5620
- * @remarks Useable only on corpses.
5621
5934
  */
5622
5935
  corpse_expires: boolean
5623
5936
  /**
5624
5937
  * If true, corpse won't be destroyed when entities are placed over it. If false, whether corpse will be removed or not depends on value of CorpsePrototype::remove_on_entity_placement.
5625
5938
  *
5939
+ * **Note**
5940
+ *
5941
+ * Useable only on corpses.
5942
+ *
5626
5943
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.corpse_immune_to_entity_placement View documentation}
5627
- * @remarks Useable only on corpses.
5628
5944
  */
5629
5945
  corpse_immune_to_entity_placement: boolean
5630
5946
  /**
@@ -5806,7 +6122,7 @@ interface EntityGhostEntity extends BaseEntity {
5806
6122
  */
5807
6123
  ghost_has_flag(flag: keyof EntityPrototypeFlags): boolean
5808
6124
  /**
5809
- * The {@link LuaEntity#unit_number unit_number} of the entity contained in this ghost. It is the same as the unit number of the {@link https://wiki.factorio.com/Prototype/EntityWithOwner EntityWithOwner} that was destroyed to create this ghost. If it was created by other means, or if the inner entity doesn not support unit numbers, this property is `nil`.
6125
+ * The {@link LuaEntity#unit_number unit_number} of the entity contained in this ghost. It is the same as the unit number of the {@linkplain https://wiki.factorio.com/Prototype/EntityWithOwner EntityWithOwner} that was destroyed to create this ghost. If it was created by other means, or if the inner entity doesn not support unit numbers, this property is `nil`.
5810
6126
  *
5811
6127
  * _Can only be used if this is EntityGhost_
5812
6128
  *
@@ -5842,10 +6158,13 @@ interface MarketEntity extends BaseEntity {
5842
6158
  *
5843
6159
  * _Can only be used if this is Market_
5844
6160
  *
6161
+ * **Note**
6162
+ *
6163
+ * The other offers are moved down to fill the gap created by removing the offer, which decrements the overall size of the offer array.
6164
+ *
5845
6165
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.remove_market_item View documentation}
5846
6166
  * @param offer Index of offer to remove.
5847
6167
  * @returns `true` if the offer was successfully removed; `false` when the given index was not valid.
5848
- * @remarks The other offers are moved down to fill the gap created by removing the offer, which decrements the overall size of the offer array.
5849
6168
  */
5850
6169
  remove_market_item(offer: uint): boolean
5851
6170
  /**
@@ -6051,11 +6370,14 @@ interface RailEntity extends BaseEntity {
6051
6370
  *
6052
6371
  * _Can only be used if this is Rail_
6053
6372
  *
6373
+ * **Note**
6374
+ *
6375
+ * A rail segment is a continuous section of rail with no branches, signals, nor train stops.
6376
+ *
6054
6377
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_rail_segment_entity View documentation}
6055
6378
  * @param direction The direction of travel relative to this rail.
6056
6379
  * @param in_else_out If true, gets the entity at the entrance of the rail segment, otherwise gets the entity at the exit of the rail segment.
6057
6380
  * @returns `nil` if the rail segment doesn't start/end with a signal nor a train stop.
6058
- * @remarks A rail segment is a continuous section of rail with no branches, signals, nor train stops.
6059
6381
  */
6060
6382
  get_rail_segment_entity(direction: defines.rail_direction, in_else_out: boolean): LuaEntity | undefined
6061
6383
  /**
@@ -6063,10 +6385,13 @@ interface RailEntity extends BaseEntity {
6063
6385
  *
6064
6386
  * _Can only be used if this is Rail_
6065
6387
  *
6388
+ * **Note**
6389
+ *
6390
+ * A rail segment is a continuous section of rail with no branches, signals, nor train stops.
6391
+ *
6066
6392
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_rail_segment_end View documentation}
6067
6393
  * @returns The rail entity.
6068
6394
  * @returns A rail direction pointing out of the rail segment from the end rail.
6069
- * @remarks A rail segment is a continuous section of rail with no branches, signals, nor train stops.
6070
6395
  */
6071
6396
  get_rail_segment_end(direction: defines.rail_direction): LuaMultiReturn<[LuaEntity, defines.rail_direction]>
6072
6397
  /**
@@ -6074,8 +6399,11 @@ interface RailEntity extends BaseEntity {
6074
6399
  *
6075
6400
  * _Can only be used if this is Rail_
6076
6401
  *
6402
+ * **Note**
6403
+ *
6404
+ * A rail segment is a continuous section of rail with no branches, signals, nor train stops.
6405
+ *
6077
6406
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_rail_segment_length View documentation}
6078
- * @remarks A rail segment is a continuous section of rail with no branches, signals, nor train stops.
6079
6407
  */
6080
6408
  get_rail_segment_length(): double
6081
6409
  /**
@@ -6083,8 +6411,11 @@ interface RailEntity extends BaseEntity {
6083
6411
  *
6084
6412
  * _Can only be used if this is Rail_
6085
6413
  *
6414
+ * **Note**
6415
+ *
6416
+ * A rail segment is a continuous section of rail with no branches, signals, nor train stops.
6417
+ *
6086
6418
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_rail_segment_overlaps View documentation}
6087
- * @remarks A rail segment is a continuous section of rail with no branches, signals, nor train stops.
6088
6419
  */
6089
6420
  get_rail_segment_overlaps(): LuaEntity[]
6090
6421
  /**
@@ -6308,9 +6639,12 @@ interface VehicleEntity extends BaseEntity {
6308
6639
  *
6309
6640
  * _Can only be used if this is Vehicle_
6310
6641
  *
6642
+ * **Note**
6643
+ *
6644
+ * This differs over {@link LuaEntity#set_passenger LuaEntity::set_passenger} in that the passenger can't drive the vehicle.
6645
+ *
6311
6646
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_driver View documentation}
6312
6647
  * @param driver The new driver or `nil` to eject the current driver if any.
6313
- * @remarks This differs over {@link LuaEntity#set_passenger LuaEntity::set_passenger} in that the passenger can't drive the vehicle.
6314
6648
  */
6315
6649
  set_driver(driver: LuaEntity | PlayerIdentification | undefined): void
6316
6650
  /**
@@ -6318,9 +6652,12 @@ interface VehicleEntity extends BaseEntity {
6318
6652
  *
6319
6653
  * _Can only be used if this is Vehicle_
6320
6654
  *
6655
+ * **Note**
6656
+ *
6657
+ * This differs over {@link LuaEntity#get_driver LuaEntity::get_driver} in that the passenger can't drive the car.
6658
+ *
6321
6659
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_passenger View documentation}
6322
6660
  * @returns `nil` if the vehicle contains no passenger. To check if there's a driver see {@link LuaEntity#get_driver LuaEntity::get_driver}.
6323
- * @remarks This differs over {@link LuaEntity#get_driver LuaEntity::get_driver} in that the passenger can't drive the car.
6324
6661
  */
6325
6662
  get_passenger(): LuaEntity | LuaPlayer | undefined
6326
6663
  /**
@@ -6331,8 +6668,11 @@ interface VehicleEntity extends BaseEntity {
6331
6668
  *
6332
6669
  * _Can only be used if this is Vehicle_
6333
6670
  *
6671
+ * **Note**
6672
+ *
6673
+ * This differs over {@link LuaEntity#get_driver LuaEntity::get_driver} in that the passenger can't drive the car.
6674
+ *
6334
6675
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_passenger View documentation}
6335
- * @remarks This differs over {@link LuaEntity#get_driver LuaEntity::get_driver} in that the passenger can't drive the car.
6336
6676
  */
6337
6677
  set_passenger(passenger: LuaEntity | PlayerIdentification): void
6338
6678
  /**
@@ -6386,8 +6726,11 @@ interface TrainStopEntity extends BaseEntity {
6386
6726
  *
6387
6727
  * _Can only be used if this is TrainStop_
6388
6728
  *
6729
+ * **Notes**
6730
+ * - Train may be included multiple times when braking distance covers this train stop multiple times
6731
+ * - Value may be read even when train stop has no control behavior
6732
+ *
6389
6733
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.trains_count View documentation}
6390
- * @remarks Train may be included multiple times when braking distance covers this train stop multiple times<br>Value may be read even when train stop has no control behavior
6391
6734
  */
6392
6735
  readonly trains_count: uint | undefined
6393
6736
  /**
@@ -6395,8 +6738,11 @@ interface TrainStopEntity extends BaseEntity {
6395
6738
  *
6396
6739
  * _Can only be used if this is TrainStop_
6397
6740
  *
6741
+ * **Note**
6742
+ *
6743
+ * When a train stop has a control behavior with wire connected and set_trains_limit enabled, this value will be overwritten by it
6744
+ *
6398
6745
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.trains_limit View documentation}
6399
- * @remarks When a train stop has a control behavior with wire connected and set_trains_limit enabled, this value will be overwritten by it
6400
6746
  */
6401
6747
  trains_limit: uint
6402
6748
  }
@@ -6467,8 +6813,11 @@ interface ResourceEntity extends BaseEntity {
6467
6813
  *
6468
6814
  * _Can only be used if this is ResourceEntity_
6469
6815
  *
6816
+ * **Note**
6817
+ *
6818
+ * If this is not an infinite resource reading will give `nil` and writing will give an error.
6819
+ *
6470
6820
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.initial_amount View documentation}
6471
- * @remarks If this is not an infinite resource reading will give `nil` and writing will give an error.
6472
6821
  */
6473
6822
  initial_amount: uint | undefined
6474
6823
  }
@@ -6556,9 +6905,12 @@ interface LinkedBeltEntity extends BaseEntity {
6556
6905
  *
6557
6906
  * _Can only be used if this is LinkedBelt_
6558
6907
  *
6908
+ * **Note**
6909
+ *
6910
+ * Can also be used on entity ghost if it contains linked-belt
6911
+ *
6559
6912
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.connect_linked_belts View documentation}
6560
6913
  * @param neighbour Another linked belt or entity ghost containing linked belt to connect or nil to disconnect
6561
- * @remarks Can also be used on entity ghost if it contains linked-belt
6562
6914
  */
6563
6915
  connect_linked_belts(neighbour: LuaEntity | undefined): void
6564
6916
  /**
@@ -6566,8 +6918,11 @@ interface LinkedBeltEntity extends BaseEntity {
6566
6918
  *
6567
6919
  * _Can only be used if this is LinkedBelt_
6568
6920
  *
6921
+ * **Note**
6922
+ *
6923
+ * Can also be used on entity ghost if it contains linked-belt
6924
+ *
6569
6925
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.disconnect_linked_belts View documentation}
6570
- * @remarks Can also be used on entity ghost if it contains linked-belt
6571
6926
  */
6572
6927
  disconnect_linked_belts(): void
6573
6928
  /**
@@ -6575,8 +6930,11 @@ interface LinkedBeltEntity extends BaseEntity {
6575
6930
  *
6576
6931
  * _Can only be used if this is LinkedBelt_
6577
6932
  *
6933
+ * **Notes**
6934
+ * - Can only be changed when linked belt is disconnected (has no neighbour set)
6935
+ * - Can also be used on entity ghost if it contains linked-belt
6936
+ *
6578
6937
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.linked_belt_type View documentation}
6579
- * @remarks Can only be changed when linked belt is disconnected (has no neighbour set)<br>Can also be used on entity ghost if it contains linked-belt
6580
6938
  */
6581
6939
  linked_belt_type: "input" | "output"
6582
6940
  /**
@@ -6584,8 +6942,11 @@ interface LinkedBeltEntity extends BaseEntity {
6584
6942
  *
6585
6943
  * _Can only be used if this is LinkedBelt_
6586
6944
  *
6945
+ * **Notes**
6946
+ * - Can also be used on entity ghost if it contains linked-belt
6947
+ * - May return entity ghost which contains linked belt to which connection is made
6948
+ *
6587
6949
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.linked_belt_neighbour View documentation}
6588
- * @remarks Can also be used on entity ghost if it contains linked-belt<br>May return entity ghost which contains linked belt to which connection is made
6589
6950
  */
6590
6951
  readonly linked_belt_neighbour: LuaEntity | undefined
6591
6952
  }
@@ -6694,8 +7055,11 @@ interface InserterEntity extends BaseEntity {
6694
7055
  *
6695
7056
  * _Can only be used if this is Inserter_
6696
7057
  *
7058
+ * **Note**
7059
+ *
7060
+ * Inserters must have `allow_custom_vectors` set to true on their prototype to allow changing the pickup position.
7061
+ *
6697
7062
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.pickup_position View documentation}
6698
- * @remarks Inserters must have `allow_custom_vectors` set to true on their prototype to allow changing the pickup position.
6699
7063
  */
6700
7064
  get pickup_position(): MapPositionTable
6701
7065
  set pickup_position(value: MapPosition)
@@ -6759,8 +7123,11 @@ interface CharacterEntity extends BaseEntity {
6759
7123
  *
6760
7124
  * _Can only be used if this is Character_
6761
7125
  *
7126
+ * **Note**
7127
+ *
7128
+ * A character associated with a player is not directly controlled by any player.
7129
+ *
6762
7130
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.associated_player View documentation}
6763
- * @remarks A character associated with a player is not directly controlled by any player.
6764
7131
  */
6765
7132
  get associated_player(): LuaPlayer | LuaPlayer | undefined
6766
7133
  set associated_player(value: LuaPlayer | PlayerIdentification | undefined)
@@ -6922,8 +7289,11 @@ interface CharacterCorpseEntity extends BaseEntity {
6922
7289
  *
6923
7290
  * _Can only be used if this is CharacterCorpse_
6924
7291
  *
7292
+ * **Note**
7293
+ *
7294
+ * The index is not guaranteed to be valid so it should always be checked first if a player with that index actually exists.
7295
+ *
6925
7296
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.character_corpse_player_index View documentation}
6926
- * @remarks The index is not guaranteed to be valid so it should always be checked first if a player with that index actually exists.
6927
7297
  */
6928
7298
  character_corpse_player_index: uint
6929
7299
  /**
@@ -7132,8 +7502,11 @@ interface LuaEntityPrototype {
7132
7502
  /**
7133
7503
  * Name of the category of this resource or `nil` when not a resource.
7134
7504
  *
7505
+ * **Note**
7506
+ *
7507
+ * During data stage this property is named "category".
7508
+ *
7135
7509
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.resource_category View documentation}
7136
- * @remarks During data stage this property is named "category".
7137
7510
  */
7138
7511
  readonly resource_category: string | undefined
7139
7512
  /**
@@ -7510,15 +7883,21 @@ interface LuaEntityPrototype {
7510
7883
  /**
7511
7884
  * The crafting categories this entity supports. Only meaningful when this is a crafting-machine or player entity type.
7512
7885
  *
7886
+ * **Note**
7887
+ *
7888
+ * The value in the dictionary is meaningless and exists just to allow the dictionary type for easy lookup.
7889
+ *
7513
7890
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.crafting_categories View documentation}
7514
- * @remarks The value in the dictionary is meaningless and exists just to allow the dictionary type for easy lookup.
7515
7891
  */
7516
7892
  readonly crafting_categories: Record<string, boolean>
7517
7893
  /**
7518
7894
  * The resource categories this character or mining drill supports, or `nil` if not a character or mining dill.
7519
7895
  *
7896
+ * **Note**
7897
+ *
7898
+ * The value in the dictionary is meaningless and exists just to allow the dictionary type for easy lookup.
7899
+ *
7520
7900
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.resource_categories View documentation}
7521
- * @remarks The value in the dictionary is meaningless and exists just to allow the dictionary type for easy lookup.
7522
7901
  */
7523
7902
  readonly resource_categories: Record<string, boolean> | undefined
7524
7903
  /**
@@ -7611,11 +7990,20 @@ interface LuaEntityPrototype {
7611
7990
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.guns View documentation}
7612
7991
  */
7613
7992
  readonly guns: Record<string, LuaItemPrototype> | undefined
7993
+ /**
7994
+ * A vector of the gun prototypes this prototype uses, or `nil`.
7995
+ *
7996
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.indexed_guns View documentation}
7997
+ */
7998
+ readonly indexed_guns: LuaItemPrototype[] | undefined
7614
7999
  /**
7615
8000
  * The default speed of this flying robot, rolling stock or unit, `nil` if not one of these.
7616
8001
  *
8002
+ * **Note**
8003
+ *
8004
+ * For rolling stocks, this is their `max_speed`.
8005
+ *
7617
8006
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.speed View documentation}
7618
- * @remarks For rolling stocks, this is their `max_speed`.
7619
8007
  */
7620
8008
  readonly speed: double | undefined
7621
8009
  /**
@@ -7759,8 +8147,11 @@ interface LuaEntityPrototype {
7759
8147
  /**
7760
8148
  * The fluid capacity of this entity or 0 if this entity doesn't support fluids.
7761
8149
  *
8150
+ * **Note**
8151
+ *
8152
+ * Crafting machines will report 0 due to their fluid capacity being what ever a given recipe needs.
8153
+ *
7762
8154
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.fluid_capacity View documentation}
7763
- * @remarks Crafting machines will report 0 due to their fluid capacity being what ever a given recipe needs.
7764
8155
  */
7765
8156
  readonly fluid_capacity: double
7766
8157
  /**
@@ -7982,8 +8373,11 @@ interface LuaEntityPrototype {
7982
8373
  /**
7983
8374
  * If this prototype will attempt to create a ghost of itself on death.
7984
8375
  *
8376
+ * **Note**
8377
+ *
8378
+ * If this is false then a ghost will never be made, if it's true a ghost may be made.
8379
+ *
7985
8380
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.create_ghost_on_death View documentation}
7986
- * @remarks If this is false then a ghost will never be made, if it's true a ghost may be made.
7987
8381
  */
7988
8382
  readonly create_ghost_on_death: boolean
7989
8383
  /**
@@ -8328,8 +8722,11 @@ interface LuaEntityPrototype {
8328
8722
  /**
8329
8723
  * The logistic parameters for this roboport. or `nil`.
8330
8724
  *
8725
+ * **Note**
8726
+ *
8727
+ * Both the `charging_station_shift` and `stationing_offset` vectors are tables with `x` and `y` keys instead of an array.
8728
+ *
8331
8729
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.logistic_parameters View documentation}
8332
- * @remarks Both the `charging_station_shift` and `stationing_offset` vectors are tables with `x` and `y` keys instead of an array.
8333
8730
  */
8334
8731
  readonly logistic_parameters:
8335
8732
  | {
@@ -8573,8 +8970,11 @@ interface BaseEntityPrototype {
8573
8970
  /**
8574
8971
  * Name of the category of this resource or `nil` when not a resource.
8575
8972
  *
8973
+ * **Note**
8974
+ *
8975
+ * During data stage this property is named "category".
8976
+ *
8576
8977
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.resource_category View documentation}
8577
- * @remarks During data stage this property is named "category".
8578
8978
  */
8579
8979
  readonly resource_category: string | undefined
8580
8980
  /**
@@ -8951,15 +9351,21 @@ interface BaseEntityPrototype {
8951
9351
  /**
8952
9352
  * The crafting categories this entity supports. Only meaningful when this is a crafting-machine or player entity type.
8953
9353
  *
9354
+ * **Note**
9355
+ *
9356
+ * The value in the dictionary is meaningless and exists just to allow the dictionary type for easy lookup.
9357
+ *
8954
9358
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.crafting_categories View documentation}
8955
- * @remarks The value in the dictionary is meaningless and exists just to allow the dictionary type for easy lookup.
8956
9359
  */
8957
9360
  readonly crafting_categories: Record<string, boolean>
8958
9361
  /**
8959
9362
  * The resource categories this character or mining drill supports, or `nil` if not a character or mining dill.
8960
9363
  *
9364
+ * **Note**
9365
+ *
9366
+ * The value in the dictionary is meaningless and exists just to allow the dictionary type for easy lookup.
9367
+ *
8961
9368
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.resource_categories View documentation}
8962
- * @remarks The value in the dictionary is meaningless and exists just to allow the dictionary type for easy lookup.
8963
9369
  */
8964
9370
  readonly resource_categories: Record<string, boolean> | undefined
8965
9371
  /**
@@ -9052,11 +9458,20 @@ interface BaseEntityPrototype {
9052
9458
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.guns View documentation}
9053
9459
  */
9054
9460
  readonly guns: Record<string, LuaItemPrototype> | undefined
9461
+ /**
9462
+ * A vector of the gun prototypes this prototype uses, or `nil`.
9463
+ *
9464
+ * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.indexed_guns View documentation}
9465
+ */
9466
+ readonly indexed_guns: LuaItemPrototype[] | undefined
9055
9467
  /**
9056
9468
  * The default speed of this flying robot, rolling stock or unit, `nil` if not one of these.
9057
9469
  *
9470
+ * **Note**
9471
+ *
9472
+ * For rolling stocks, this is their `max_speed`.
9473
+ *
9058
9474
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.speed View documentation}
9059
- * @remarks For rolling stocks, this is their `max_speed`.
9060
9475
  */
9061
9476
  readonly speed: double | undefined
9062
9477
  /**
@@ -9200,8 +9615,11 @@ interface BaseEntityPrototype {
9200
9615
  /**
9201
9616
  * The fluid capacity of this entity or 0 if this entity doesn't support fluids.
9202
9617
  *
9618
+ * **Note**
9619
+ *
9620
+ * Crafting machines will report 0 due to their fluid capacity being what ever a given recipe needs.
9621
+ *
9203
9622
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.fluid_capacity View documentation}
9204
- * @remarks Crafting machines will report 0 due to their fluid capacity being what ever a given recipe needs.
9205
9623
  */
9206
9624
  readonly fluid_capacity: double
9207
9625
  /**
@@ -9423,8 +9841,11 @@ interface BaseEntityPrototype {
9423
9841
  /**
9424
9842
  * If this prototype will attempt to create a ghost of itself on death.
9425
9843
  *
9844
+ * **Note**
9845
+ *
9846
+ * If this is false then a ghost will never be made, if it's true a ghost may be made.
9847
+ *
9426
9848
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.create_ghost_on_death View documentation}
9427
- * @remarks If this is false then a ghost will never be made, if it's true a ghost may be made.
9428
9849
  */
9429
9850
  readonly create_ghost_on_death: boolean
9430
9851
  /**
@@ -9691,8 +10112,11 @@ interface BaseEntityPrototype {
9691
10112
  /**
9692
10113
  * The logistic parameters for this roboport. or `nil`.
9693
10114
  *
10115
+ * **Note**
10116
+ *
10117
+ * Both the `charging_station_shift` and `stationing_offset` vectors are tables with `x` and `y` keys instead of an array.
10118
+ *
9694
10119
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.logistic_parameters View documentation}
9695
- * @remarks Both the `charging_station_shift` and `stationing_offset` vectors are tables with `x` and `y` keys instead of an array.
9696
10120
  */
9697
10121
  readonly logistic_parameters:
9698
10122
  | {
@@ -10009,8 +10433,11 @@ interface LuaEquipment {
10009
10433
  /**
10010
10434
  * Current shield value of the equipment.
10011
10435
  *
10436
+ * **Note**
10437
+ *
10438
+ * Can't be set higher than {@link LuaEquipment#max_shield LuaEquipment::max_shield}.
10439
+ *
10012
10440
  * {@link https://lua-api.factorio.com/latest/LuaEquipment.html#LuaEquipment.shield View documentation}
10013
- * @remarks Can't be set higher than {@link LuaEquipment#max_shield LuaEquipment::max_shield}.
10014
10441
  */
10015
10442
  shield: double
10016
10443
  /**
@@ -10404,8 +10831,11 @@ interface LuaEquipmentPrototype {
10404
10831
  /**
10405
10832
  * The logistic parameters for this roboport equipment.
10406
10833
  *
10834
+ * **Note**
10835
+ *
10836
+ * Both the `charging_station_shift` and `stationing_offset` vectors are tables with `x` and `y` keys instead of an array.
10837
+ *
10407
10838
  * {@link https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.logistic_parameters View documentation}
10408
- * @remarks Both the `charging_station_shift` and `stationing_offset` vectors are tables with `x` and `y` keys instead of an array.
10409
10839
  */
10410
10840
  readonly logistic_parameters: {
10411
10841
  readonly spawn_and_station_height: float
@@ -10653,18 +11083,24 @@ interface LuaFluidBox extends Array<Fluid | undefined> {
10653
11083
  /**
10654
11084
  * Set a fluid box filter.
10655
11085
  *
11086
+ * **Note**
11087
+ *
11088
+ * Some entities cannot have their fluidbox filter set, notably fluid wagons and crafting machines.
11089
+ *
10656
11090
  * {@link https://lua-api.factorio.com/latest/LuaFluidBox.html#LuaFluidBox.set_filter View documentation}
10657
11091
  * @param index The index of the filter to set.
10658
11092
  * @param filter The filter to set. Setting `nil` clears the filter.
10659
11093
  * @returns Whether the filter was set successfully.
10660
- * @remarks Some entities cannot have their fluidbox filter set, notably fluid wagons and crafting machines.
10661
11094
  */
10662
11095
  set_filter(index: uint, filter?: FluidBoxFilterSpec): boolean
10663
11096
  /**
10664
11097
  * Flow through the fluidbox in the last tick. It is the larger of in-flow and out-flow.
10665
11098
  *
11099
+ * **Note**
11100
+ *
11101
+ * Fluid wagons do not track it and will return 0.
11102
+ *
10666
11103
  * {@link https://lua-api.factorio.com/latest/LuaFluidBox.html#LuaFluidBox.get_flow View documentation}
10667
- * @remarks Fluid wagons do not track it and will return 0.
10668
11104
  */
10669
11105
  get_flow(index: uint): double
10670
11106
  /**
@@ -10980,10 +11416,13 @@ interface LuaForce {
10980
11416
  /**
10981
11417
  * Count entities of given type.
10982
11418
  *
11419
+ * **Note**
11420
+ *
11421
+ * This function has O(1) time complexity as entity counts are kept and maintained in the game engine.
11422
+ *
10983
11423
  * {@link https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.get_entity_count View documentation}
10984
11424
  * @param name Prototype name of the entity.
10985
11425
  * @returns Number of entities of given prototype belonging to this force.
10986
- * @remarks This function has O(1) time complexity as entity counts are kept and maintained in the game engine.
10987
11426
  */
10988
11427
  get_entity_count(name: string): uint
10989
11428
  /**
@@ -11250,8 +11689,11 @@ interface LuaForce {
11250
11689
  /**
11251
11690
  * Print text to the chat console of all players on this force.
11252
11691
  *
11692
+ * **Note**
11693
+ *
11694
+ * Messages that are identical to a message sent in the last 60 ticks are not printed again.
11695
+ *
11253
11696
  * {@link https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.print View documentation}
11254
- * @remarks Messages that are identical to a message sent in the last 60 ticks are not printed again.
11255
11697
  */
11256
11698
  print(message: LocalisedString, color?: Color): void
11257
11699
  /**
@@ -11267,11 +11709,13 @@ interface LuaForce {
11267
11709
  * **Raised events:**
11268
11710
  * - {@link OnChartTagAddedEvent on_chart_tag_added}? _instantly_ Raised if the chart tag was successfully added.
11269
11711
  *
11712
+ * **Note**
11713
+ *
11714
+ * The chunk must be charted for a tag to be valid at that location.
11270
11715
  *
11271
11716
  * {@link https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.add_chart_tag View documentation}
11272
11717
  * @param surface Which surface to add the tag to.
11273
11718
  * @param tag The tag to add.
11274
- * @remarks The chunk must be charted for a tag to be valid at that location.
11275
11719
  */
11276
11720
  add_chart_tag(surface: SurfaceIdentification, tag: ChartTagSpec): LuaCustomChartTag | undefined
11277
11721
  /**
@@ -11504,8 +11948,11 @@ interface LuaForce {
11504
11948
  /**
11505
11949
  * Enables some higher-level AI behaviour for this force. When set to `true`, biters belonging to this force will automatically expand into new territories, build new spawners, and form unit groups. By default, this value is `true` for the enemy force and `false` for all others.
11506
11950
  *
11951
+ * **Notes**
11952
+ * - Setting this to `false` does not turn off biters' AI. They will still move around and attack players who come close.
11953
+ * - It is necessary for a force to be AI controllable in order to be able to create unit groups or build bases from scripts.
11954
+ *
11507
11955
  * {@link https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.ai_controllable View documentation}
11508
- * @remarks Setting this to `false` does not turn off biters' AI. They will still move around and attack players who come close.<br>It is necessary for a force to be AI controllable in order to be able to create unit groups or build bases from scripts.
11509
11956
  */
11510
11957
  ai_controllable: boolean
11511
11958
  /**
@@ -11619,8 +12066,11 @@ interface LuaForce {
11619
12066
  *
11620
12067
  * This is primarily useful when you want to do some action against all online players of this force.
11621
12068
  *
12069
+ * **Note**
12070
+ *
12071
+ * This does *not* index using player index. See {@link LuaPlayer#index LuaPlayer::index} on each player instance for the player index.
12072
+ *
11622
12073
  * {@link https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.connected_players View documentation}
11623
- * @remarks This does *not* index using player index. See {@link LuaPlayer#index LuaPlayer::index} on each player instance for the player index.
11624
12074
  */
11625
12075
  readonly connected_players: LuaPlayer[]
11626
12076
  mining_drill_productivity_bonus: double
@@ -11663,8 +12113,11 @@ interface LuaForce {
11663
12113
  *
11664
12114
  * To write to this, the entire table must be written. Providing an empty table or `nil` will empty the research queue and cancel the current research. Writing to this when the research queue is disabled will simply set the last research in the table as the current research.
11665
12115
  *
12116
+ * **Note**
12117
+ *
12118
+ * This only allows mods to queue research that this force is able to research in the first place. As an example, an already researched technology or one whose prerequisites are not fulfilled will not be queued, but dropped silently instead.
12119
+ *
11666
12120
  * {@link https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.research_queue View documentation}
11667
- * @remarks This only allows mods to queue research that this force is able to research in the first place. As an example, an already researched technology or one whose prerequisites are not fulfilled will not be queued, but dropped silently instead.
11668
12121
  */
11669
12122
  get research_queue(): LuaTechnology[] | undefined
11670
12123
  set research_queue(value: TechnologyIdentification[] | undefined)
@@ -11752,8 +12205,11 @@ interface LuaGameScript {
11752
12205
  /**
11753
12206
  * Show an in-game message dialog.
11754
12207
  *
12208
+ * **Note**
12209
+ *
12210
+ * Can only be used when the map contains exactly one player.
12211
+ *
11755
12212
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.show_message_dialog View documentation}
11756
- * @remarks Can only be used when the map contains exactly one player.
11757
12213
  */
11758
12214
  show_message_dialog(params: {
11759
12215
  /**
@@ -11786,44 +12242,63 @@ interface LuaGameScript {
11786
12242
  /**
11787
12243
  * Forces a reload of the scenario script from the original scenario location.
11788
12244
  *
12245
+ * **Note**
12246
+ *
12247
+ * This disables the replay if replay is enabled.
12248
+ *
11789
12249
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.reload_script View documentation}
11790
- * @remarks This disables the replay if replay is enabled.
11791
12250
  */
11792
12251
  reload_script(): void
11793
12252
  /**
11794
12253
  * Forces a reload of all mods.
11795
12254
  *
12255
+ * **Notes**
12256
+ * - This will act like saving and loading from the mod(s) perspective.
12257
+ * - This will do nothing if run in multiplayer.
12258
+ * - This disables the replay if replay is enabled.
12259
+ *
11796
12260
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.reload_mods View documentation}
11797
- * @remarks This will act like saving and loading from the mod(s) perspective.<br>This will do nothing if run in multiplayer.<br>This disables the replay if replay is enabled.
11798
12261
  */
11799
12262
  reload_mods(): void
11800
12263
  /**
11801
12264
  * Saves the current configuration of Atlas to a file. This will result in huge file containing all of the game graphics moved to as small space as possible.
11802
12265
  *
12266
+ * **Note**
12267
+ *
12268
+ * Exists mainly for debugging reasons.
12269
+ *
11803
12270
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.save_atlas View documentation}
11804
- * @remarks Exists mainly for debugging reasons.
11805
12271
  */
11806
12272
  save_atlas(): void
11807
12273
  /**
11808
12274
  * Run internal consistency checks. Allegedly prints any errors it finds.
11809
12275
  *
12276
+ * **Note**
12277
+ *
12278
+ * Exists mainly for debugging reasons.
12279
+ *
11810
12280
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.check_consistency View documentation}
11811
- * @remarks Exists mainly for debugging reasons.
11812
12281
  */
11813
12282
  check_consistency(): void
11814
12283
  /**
11815
12284
  * Regenerate autoplacement of some entities on all surfaces. This can be used to autoplace newly-added entities.
11816
12285
  *
12286
+ * **Note**
12287
+ *
12288
+ * All specified entity prototypes must be autoplacable.
12289
+ *
11817
12290
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.regenerate_entity View documentation}
11818
12291
  * @param entities Prototype names of entity or entities to autoplace.
11819
- * @remarks All specified entity prototypes must be autoplacable.
11820
12292
  */
11821
12293
  regenerate_entity(entities: string | readonly string[]): void
11822
12294
  /**
11823
- * Take a screenshot of the game and save it to the `script-output` folder, located in the game's {@link https://wiki.factorio.com/User_data_directory user data directory}. The name of the image file can be specified via the `path` parameter.
12295
+ * Take a screenshot of the game and save it to the `script-output` folder, located in the game's {@linkplain https://wiki.factorio.com/User_data_directory user data directory}. The name of the image file can be specified via the `path` parameter.
12296
+ *
12297
+ * **Note**
12298
+ *
12299
+ * If Factorio is running headless, this function will do nothing.
11824
12300
  *
11825
12301
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_screenshot View documentation}
11826
- * @remarks If Factorio is running headless, this function will do nothing.
11827
12302
  */
11828
12303
  take_screenshot(params: {
11829
12304
  /**
@@ -11898,7 +12373,7 @@ interface LuaGameScript {
11898
12373
  */
11899
12374
  set_wait_for_screenshots_to_finish(): void
11900
12375
  /**
11901
- * Take a screenshot of the technology screen and save it to the `script-output` folder, located in the game's {@link https://wiki.factorio.com/User_data_directory user data directory}. The name of the image file can be specified via the `path` parameter.
12376
+ * Take a screenshot of the technology screen and save it to the `script-output` folder, located in the game's {@linkplain https://wiki.factorio.com/User_data_directory user data directory}. The name of the image file can be specified via the `path` parameter.
11902
12377
  *
11903
12378
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_technology_screenshot View documentation}
11904
12379
  */
@@ -11943,7 +12418,7 @@ interface LuaGameScript {
11943
12418
  */
11944
12419
  json_to_table(json: string): AnyBasic | undefined
11945
12420
  /**
11946
- * Write a file to the `script-output` folder, located in the game's {@link https://wiki.factorio.com/User_data_directory user data directory}. The name and file extension of the file can be specified via the `filename` parameter.
12421
+ * Write a file to the `script-output` folder, located in the game's {@linkplain https://wiki.factorio.com/User_data_directory user data directory}. The name and file extension of the file can be specified via the `filename` parameter.
11947
12422
  *
11948
12423
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.write_file View documentation}
11949
12424
  * @param filename The name of the file. Providing a directory path (ex. `"save/here/example.txt"`) will create the necessary folder structure in `script-output`.
@@ -11953,7 +12428,7 @@ interface LuaGameScript {
11953
12428
  */
11954
12429
  write_file(filename: string, data: LocalisedString, append?: boolean, for_player?: uint): void
11955
12430
  /**
11956
- * Remove a file or directory in the `script-output` folder, located in the game's {@link https://wiki.factorio.com/User_data_directory user data directory}. Can be used to remove files created by {@link LuaGameScript#write_file LuaGameScript::write_file}.
12431
+ * Remove a file or directory in the `script-output` folder, located in the game's {@linkplain https://wiki.factorio.com/User_data_directory user data directory}. Can be used to remove files created by {@link LuaGameScript#write_file LuaGameScript::write_file}.
11957
12432
  *
11958
12433
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.remove_path View documentation}
11959
12434
  * @param path The path to the file or directory to remove, relative to `script-output`.
@@ -11983,11 +12458,13 @@ interface LuaGameScript {
11983
12458
  * **Raised events:**
11984
12459
  * - {@link OnForceCreatedEvent on_force_created} _instantly_
11985
12460
  *
12461
+ * **Notes**
12462
+ * - The game currently supports a maximum of 64 forces, including the three built-in forces. This means that a maximum of 61 new forces may be created.
12463
+ * - Force names must be unique.
11986
12464
  *
11987
12465
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.create_force View documentation}
11988
12466
  * @param force Name of the new force
11989
12467
  * @returns The force that was just created
11990
- * @remarks The game currently supports a maximum of 64 forces, including the three built-in forces. This means that a maximum of 61 new forces may be created.<br>Force names must be unique.
11991
12468
  */
11992
12469
  create_force(force: string): LuaForce
11993
12470
  /**
@@ -11997,11 +12474,13 @@ interface LuaGameScript {
11997
12474
  * - {@link OnForcesMergingEvent on_forces_merging} _future_tick_
11998
12475
  * - {@link OnForcesMergedEvent on_forces_merged} _future_tick_
11999
12476
  *
12477
+ * **Notes**
12478
+ * - The three built-in forces -- player, enemy and neutral -- can't be destroyed. I.e. they can't be used as the source argument to this function.
12479
+ * - The source force is not removed until the end of the current tick, or if called during the {@link OnForcesMergingEvent on_forces_merging} or {@link OnForcesMergedEvent on_forces_merged} event, the end of the next tick.
12000
12480
  *
12001
12481
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.merge_forces View documentation}
12002
12482
  * @param source The force to remove.
12003
12483
  * @param destination The force to reassign all entities to.
12004
- * @remarks The three built-in forces -- player, enemy and neutral -- can't be destroyed. I.e. they can't be used as the source argument to this function.<br>The source force is not removed until the end of the current tick, or if called during the {@link OnForcesMergingEvent on_forces_merging} or {@link OnForcesMergedEvent on_forces_merged} event, the end of the next tick.
12005
12484
  */
12006
12485
  merge_forces(source: ForceIdentification, destination: ForceIdentification): void
12007
12486
  /**
@@ -12010,12 +12489,14 @@ interface LuaGameScript {
12010
12489
  * **Raised events:**
12011
12490
  * - {@link OnSurfaceCreatedEvent on_surface_created} _instantly_
12012
12491
  *
12492
+ * **Notes**
12493
+ * - The game currently supports a maximum of 4,294,967,295 surfaces, including the default surface.
12494
+ * - Surface names must be unique.
12013
12495
  *
12014
12496
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.create_surface View documentation}
12015
12497
  * @param name Name of the new surface.
12016
12498
  * @param settings Map generation settings.
12017
12499
  * @returns The surface that was just created.
12018
- * @remarks The game currently supports a maximum of 4,294,967,295 surfaces, including the default surface.<br>Surface names must be unique.
12019
12500
  */
12020
12501
  create_surface(name: string, settings?: MapGenSettings): LuaSurface
12021
12502
  /**
@@ -12028,9 +12509,12 @@ interface LuaGameScript {
12028
12509
  /**
12029
12510
  * Instruct the game to perform an auto-save.
12030
12511
  *
12512
+ * **Note**
12513
+ *
12514
+ * Only the server will save in multiplayer. In single player a standard auto-save is triggered.
12515
+ *
12031
12516
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.auto_save View documentation}
12032
12517
  * @param name The autosave name if any. Saves will be named _autosave-*name* when provided.
12033
- * @remarks Only the server will save in multiplayer. In single player a standard auto-save is triggered.
12034
12518
  */
12035
12519
  auto_save(name?: string): void
12036
12520
  /**
@@ -12066,22 +12550,31 @@ interface LuaGameScript {
12066
12550
  /**
12067
12551
  * Print text to the chat console all players.
12068
12552
  *
12553
+ * **Note**
12554
+ *
12555
+ * Messages that are identical to a message sent in the last 60 ticks are not printed again.
12556
+ *
12069
12557
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.print View documentation}
12070
- * @remarks Messages that are identical to a message sent in the last 60 ticks are not printed again.
12071
12558
  */
12072
12559
  print(message: LocalisedString, color?: Color): void
12073
12560
  /**
12074
12561
  * Creates a deterministic standalone random generator with the given seed or if a seed is not provided the initial map seed is used.
12075
12562
  *
12563
+ * **Note**
12564
+ *
12565
+ * *Make sure* you actually want to use this over math.random(...) as this provides entirely different functionality over math.random(...).
12566
+ *
12076
12567
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.create_random_generator View documentation}
12077
- * @remarks *Make sure* you actually want to use this over math.random(...) as this provides entirely different functionality over math.random(...).
12078
12568
  */
12079
12569
  create_random_generator(seed?: uint): LuaRandomGenerator
12080
12570
  /**
12081
12571
  * Goes over all items, entities, tiles, recipes, technologies among other things and logs if the locale is incorrect.
12082
12572
  *
12573
+ * **Note**
12574
+ *
12575
+ * Also prints true/false if called from the console.
12576
+ *
12083
12577
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.check_prototype_translations View documentation}
12084
- * @remarks Also prints true/false if called from the console.
12085
12578
  */
12086
12579
  check_prototype_translations(): void
12087
12580
  /**
@@ -12209,9 +12702,12 @@ interface LuaGameScript {
12209
12702
  /**
12210
12703
  * Gets the number of entities that are active (updated each tick).
12211
12704
  *
12705
+ * **Note**
12706
+ *
12707
+ * This is very expensive to determine.
12708
+ *
12212
12709
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.get_active_entities_count View documentation}
12213
12710
  * @param surface If give, only the entities active on this surface are counted.
12214
- * @remarks This is very expensive to determine.
12215
12711
  */
12216
12712
  get_active_entities_count(surface?: SurfaceIdentification): uint
12217
12713
  /**
@@ -12239,29 +12735,38 @@ interface LuaGameScript {
12239
12735
  /**
12240
12736
  * Gets the given player or returns `nil` if no player is found.
12241
12737
  *
12738
+ * **Note**
12739
+ *
12740
+ * This is a shortcut for game.players[...]
12741
+ *
12242
12742
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.get_player View documentation}
12243
12743
  * @param player The player index or name.
12244
- * @remarks This is a shortcut for game.players[...]
12245
12744
  */
12246
12745
  get_player(index: PlayerIndex | string): LuaPlayer | undefined
12247
12746
  /**
12248
12747
  * Gets the given surface or returns `nil` if no surface is found.
12249
12748
  *
12749
+ * **Note**
12750
+ *
12751
+ * This is a shortcut for game.surfaces[...]
12752
+ *
12250
12753
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.get_surface View documentation}
12251
12754
  * @param surface The surface index or name.
12252
- * @remarks This is a shortcut for game.surfaces[...]
12253
12755
  */
12254
12756
  get_surface(index: SurfaceIndex | string): LuaSurface | undefined
12255
12757
  /**
12256
12758
  * Creates a {@link LuaProfiler}, which is used for measuring script performance.
12257
12759
  *
12760
+ * **Note**
12761
+ *
12762
+ * LuaProfiler cannot be serialized.
12763
+ *
12258
12764
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.create_profiler View documentation}
12259
12765
  * @param stopped Create the timer stopped
12260
- * @remarks LuaProfiler cannot be serialized.
12261
12766
  */
12262
12767
  create_profiler(stopped?: boolean): LuaProfiler
12263
12768
  /**
12264
- * Evaluate an expression, substituting variables as provided. For details on the formula, see the relevant page on the {@link https://wiki.factorio.com/Prototype/Technology#unit Factorio wiki}.
12769
+ * Evaluate an expression, substituting variables as provided. For details on the formula, see the relevant page on the {@linkplain https://wiki.factorio.com/Prototype/Technology#unit Factorio wiki}.
12265
12770
  *
12266
12771
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.evaluate_expression View documentation}
12267
12772
  * @param expression The expression to evaluate.
@@ -12397,18 +12902,24 @@ interface LuaGameScript {
12397
12902
  /**
12398
12903
  * Creates an inventory that is not owned by any game object. It can be resized later with {@link LuaInventory#resize LuaInventory::resize}.
12399
12904
  *
12905
+ * **Note**
12906
+ *
12907
+ * Make sure to destroy it when you are done with it using {@link LuaInventory#destroy LuaInventory::destroy}.
12908
+ *
12400
12909
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.create_inventory View documentation}
12401
12910
  * @param size The number of slots the inventory initially has.
12402
- * @remarks Make sure to destroy it when you are done with it using {@link LuaInventory#destroy LuaInventory::destroy}.
12403
12911
  */
12404
12912
  create_inventory(size: uint16): LuaInventory
12405
12913
  /**
12406
12914
  * Gets the inventories created through {@link LuaGameScript#create_inventory LuaGameScript::create_inventory}
12407
12915
  *
12916
+ * **Note**
12917
+ *
12918
+ * Inventories created through console commands will be owned by `"core"`.
12919
+ *
12408
12920
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.get_script_inventories View documentation}
12409
12921
  * @param mod The mod who's inventories to get. If not provided all inventories are returned.
12410
12922
  * @returns A mapping of mod name to array of inventories owned by that mod.
12411
- * @remarks Inventories created through console commands will be owned by `"core"`.
12412
12923
  */
12413
12924
  get_script_inventories(mod?: string): Record<string, LuaInventory[]>
12414
12925
  /**
@@ -12434,7 +12945,7 @@ interface LuaGameScript {
12434
12945
  */
12435
12946
  decode_string(string: string): string | undefined
12436
12947
  /**
12437
- * This property is only populated inside {@link LuaCommandProcessor custom command} handlers and when writing {@link https://wiki.factorio.com/Console#Scripting_and_cheat_commands Lua console commands}. Returns the player that is typing the command, `nil` in all other instances.
12948
+ * This property is only populated inside {@link LuaCommandProcessor custom command} handlers and when writing {@linkplain https://wiki.factorio.com/Console#Scripting_and_cheat_commands Lua console commands}. Returns the player that is typing the command, `nil` in all other instances.
12438
12949
  *
12439
12950
  * See {@link LuaGameScript#players LuaGameScript::players} for accessing all players.
12440
12951
  *
@@ -12450,8 +12961,11 @@ interface LuaGameScript {
12450
12961
  /**
12451
12962
  * The currently active set of map settings. Even though this property is marked as read-only, the members of the dictionary that is returned can be modified mid-game.
12452
12963
  *
12964
+ * **Note**
12965
+ *
12966
+ * This does not contain difficulty settings, use {@link LuaGameScript#difficulty_settings LuaGameScript::difficulty_settings} instead.
12967
+ *
12453
12968
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.map_settings View documentation}
12454
- * @remarks This does not contain difficulty settings, use {@link LuaGameScript#difficulty_settings LuaGameScript::difficulty_settings} instead.
12455
12969
  */
12456
12970
  readonly map_settings: MapSettings
12457
12971
  /**
@@ -12654,8 +13168,11 @@ interface LuaGameScript {
12654
13168
  /**
12655
13169
  * A dictionary containing every MapGenPreset indexed by `name`.
12656
13170
  *
13171
+ * **Note**
13172
+ *
13173
+ * A MapGenPreset is an exact copy of the prototype table provided from the data stage.
13174
+ *
12657
13175
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.map_gen_presets View documentation}
12658
- * @remarks A MapGenPreset is an exact copy of the prototype table provided from the data stage.
12659
13176
  */
12660
13177
  readonly map_gen_presets: LuaCustomTable<string, MapGenPreset>
12661
13178
  /**
@@ -12673,8 +13190,11 @@ interface LuaGameScript {
12673
13190
  /**
12674
13191
  * The number of ticks since this game was 'created'. A game is 'created' either by using "new game" or "new game from scenario".
12675
13192
  *
13193
+ * **Notes**
13194
+ * - This differs over {@link LuaGameScript#tick LuaGameScript::tick} in that making a game from a scenario always starts with ticks_played value at 0 even if the scenario has its own level data where the {@link LuaGameScript#tick LuaGameScript::tick} is > 0.
13195
+ * - This value has no relation with {@link LuaGameScript#tick LuaGameScript::tick} and can be completely different values.
13196
+ *
12676
13197
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.ticks_played View documentation}
12677
- * @remarks This differs over {@link LuaGameScript#tick LuaGameScript::tick} in that making a game from a scenario always starts with ticks_played value at 0 even if the scenario has its own level data where the {@link LuaGameScript#tick LuaGameScript::tick} is > 0.<br>This value has no relation with {@link LuaGameScript#tick LuaGameScript::tick} and can be completely different values.
12678
13198
  */
12679
13199
  readonly ticks_played: uint
12680
13200
  /**
@@ -12704,8 +13224,11 @@ interface LuaGameScript {
12704
13224
  /**
12705
13225
  * Speed to update the map at. 1.0 is normal speed -- 60 UPS.
12706
13226
  *
13227
+ * **Note**
13228
+ *
13229
+ * Minimum value is 0.01.
13230
+ *
12707
13231
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.speed View documentation}
12708
- * @remarks Minimum value is 0.01.
12709
13232
  */
12710
13233
  speed: float
12711
13234
  /**
@@ -12732,8 +13255,11 @@ interface LuaGameScript {
12732
13255
  *
12733
13256
  * This is primarily useful when you want to do some action against all online players.
12734
13257
  *
13258
+ * **Note**
13259
+ *
13260
+ * This does *not* index using player index. See {@link LuaPlayer#index LuaPlayer::index} on each player instance for the player index.
13261
+ *
12735
13262
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.connected_players View documentation}
12736
- * @remarks This does *not* index using player index. See {@link LuaPlayer#index LuaPlayer::index} on each player instance for the player index.
12737
13263
  */
12738
13264
  readonly connected_players: LuaPlayer[]
12739
13265
  readonly permissions: LuaPermissionGroups
@@ -12804,8 +13330,11 @@ interface LuaGenericOnOffControlBehavior extends LuaControlBehavior {
12804
13330
  /**
12805
13331
  * The circuit condition.
12806
13332
  *
13333
+ * **Note**
13334
+ *
13335
+ * `condition` may be `nil` in order to clear the circuit condition.
13336
+ *
12807
13337
  * {@link https://lua-api.factorio.com/latest/LuaGenericOnOffControlBehavior.html#LuaGenericOnOffControlBehavior.circuit_condition View documentation}
12808
- * @remarks `condition` may be `nil` in order to clear the circuit condition.
12809
13338
  * @example Tell an entity to be active (e.g. a lamp to be lit) when it receives a circuit signal of more than 4 chain signals.
12810
13339
  *
12811
13340
  * ```
@@ -12818,8 +13347,11 @@ interface LuaGenericOnOffControlBehavior extends LuaControlBehavior {
12818
13347
  /**
12819
13348
  * The logistic condition.
12820
13349
  *
13350
+ * **Note**
13351
+ *
13352
+ * `condition` may be `nil` in order to clear the logistic condition.
13353
+ *
12821
13354
  * {@link https://lua-api.factorio.com/latest/LuaGenericOnOffControlBehavior.html#LuaGenericOnOffControlBehavior.logistic_condition View documentation}
12822
- * @remarks `condition` may be `nil` in order to clear the logistic condition.
12823
13355
  * @example Tell an entity to be active (e.g. a lamp to be lit) when the logistics network it's connected to has more than four chain signals.
12824
13356
  *
12825
13357
  * ```
@@ -12873,15 +13405,21 @@ interface LuaGroup {
12873
13405
  /**
12874
13406
  * Subgroups of this group.
12875
13407
  *
13408
+ * **Note**
13409
+ *
13410
+ * Can only be used on groups, not on subgroups.
13411
+ *
12876
13412
  * {@link https://lua-api.factorio.com/latest/LuaGroup.html#LuaGroup.subgroups View documentation}
12877
- * @remarks Can only be used on groups, not on subgroups.
12878
13413
  */
12879
13414
  readonly subgroups: LuaGroup[]
12880
13415
  /**
12881
13416
  * The additional order value used in recipe ordering.
12882
13417
  *
13418
+ * **Note**
13419
+ *
13420
+ * Can only be used on groups, not on subgroups.
13421
+ *
12883
13422
  * {@link https://lua-api.factorio.com/latest/LuaGroup.html#LuaGroup.order_in_recipe View documentation}
12884
- * @remarks Can only be used on groups, not on subgroups.
12885
13423
  */
12886
13424
  readonly order_in_recipe: string
12887
13425
  /**
@@ -12907,9 +13445,12 @@ interface LuaGroup {
12907
13445
  /**
12908
13446
  * The root of the GUI. This type houses the root elements, `top`, `left`, `center`, `goal`, and `screen`, to which other elements can be added to be displayed on screen.
12909
13447
  *
13448
+ * **Note**
13449
+ *
13450
+ * Every player can have a different GUI state.
13451
+ *
12910
13452
  * {@link https://lua-api.factorio.com/latest/LuaGui.html View documentation}
12911
13453
  * @noSelf
12912
- * @remarks Every player can have a different GUI state.
12913
13454
  */
12914
13455
  interface LuaGui {
12915
13456
  /**
@@ -13561,8 +14102,11 @@ interface BaseGuiElement {
13561
14102
  /**
13562
14103
  * Remove this element, along with its children. Any {@link LuaGuiElement} objects referring to the destroyed elements become invalid after this operation.
13563
14104
  *
14105
+ * **Note**
14106
+ *
14107
+ * The top-level GUI elements - {@link LuaGui#top LuaGui::top}, {@link LuaGui#left LuaGui::left}, {@link LuaGui#center LuaGui::center} and {@link LuaGui#screen LuaGui::screen} - can't be destroyed.
14108
+ *
13564
14109
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.destroy View documentation}
13565
- * @remarks The top-level GUI elements - {@link LuaGui#top LuaGui::top}, {@link LuaGui#left LuaGui::left}, {@link LuaGui#center LuaGui::center} and {@link LuaGui#screen LuaGui::screen} - can't be destroyed.
13566
14110
  * @example
13567
14111
  *
13568
14112
  * ```
@@ -13573,15 +14117,21 @@ interface BaseGuiElement {
13573
14117
  /**
13574
14118
  * The mod that owns this Gui element or `nil` if it's owned by the scenario script.
13575
14119
  *
14120
+ * **Note**
14121
+ *
14122
+ * This has a not-super-expensive, but non-free cost to get.
14123
+ *
13576
14124
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.get_mod View documentation}
13577
- * @remarks This has a not-super-expensive, but non-free cost to get.
13578
14125
  */
13579
14126
  get_mod(): string | undefined
13580
14127
  /**
13581
14128
  * Gets the index that this element has in its parent element.
13582
14129
  *
14130
+ * **Note**
14131
+ *
14132
+ * This iterates through the children of the parent of this element, meaning this has a non-free cost to get, but is faster than doing the equivalent in Lua.
14133
+ *
13583
14134
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.get_index_in_parent View documentation}
13584
- * @remarks This iterates through the children of the parent of this element, meaning this has a non-free cost to get, but is faster than doing the equivalent in Lua.
13585
14135
  */
13586
14136
  get_index_in_parent(): uint
13587
14137
  /**
@@ -13601,8 +14151,11 @@ interface BaseGuiElement {
13601
14151
  /**
13602
14152
  * Moves this GUI element to the "front" so it will draw over other elements.
13603
14153
  *
14154
+ * **Note**
14155
+ *
14156
+ * Only works for elements in {@link LuaGui#screen LuaGui::screen}
14157
+ *
13604
14158
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.bring_to_front View documentation}
13605
- * @remarks Only works for elements in {@link LuaGui#screen LuaGui::screen}
13606
14159
  */
13607
14160
  bring_to_front(): void
13608
14161
  /**
@@ -13637,8 +14190,11 @@ interface BaseGuiElement {
13637
14190
  /**
13638
14191
  * The text displayed on this element. For frames, this is the "heading". For other elements, like buttons or labels, this is the content.
13639
14192
  *
14193
+ * **Note**
14194
+ *
14195
+ * Whilst this attribute may be used on all elements without producing an error, it doesn't make sense for tables and flows as they won't display it.
14196
+ *
13640
14197
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.caption View documentation}
13641
- * @remarks Whilst this attribute may be used on all elements without producing an error, it doesn't make sense for tables and flows as they won't display it.
13642
14198
  */
13643
14199
  caption: LocalisedString
13644
14200
  /**
@@ -13744,8 +14300,11 @@ interface ChooseElemButtonGuiElementMembers extends BaseGuiElement {
13744
14300
  *
13745
14301
  * _Can only be used if this is choose-elem-button_
13746
14302
  *
14303
+ * **Note**
14304
+ *
14305
+ * The `"signal"` type operates with {@link SignalID}, while all other types use strings.
14306
+ *
13747
14307
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.elem_value View documentation}
13748
- * @remarks The `"signal"` type operates with {@link SignalID}, while all other types use strings.
13749
14308
  */
13750
14309
  elem_value: (this["elem_type"] extends "signal" ? SignalID : string) | undefined
13751
14310
  /**
@@ -13753,8 +14312,11 @@ interface ChooseElemButtonGuiElementMembers extends BaseGuiElement {
13753
14312
  *
13754
14313
  * _Can only be used if this is choose-elem-button_
13755
14314
  *
14315
+ * **Note**
14316
+ *
14317
+ * Writing to this field does not change or clear the currently selected element.
14318
+ *
13756
14319
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.elem_filters View documentation}
13757
- * @remarks Writing to this field does not change or clear the currently selected element.
13758
14320
  * @example This will configure a choose-elem-button of type `"entity"` to only show items of type `"furnace"`.
13759
14321
  *
13760
14322
  * ```
@@ -13858,8 +14420,11 @@ interface EmptyWidgetGuiElementMembers extends BaseGuiElement {
13858
14420
  *
13859
14421
  * _Can only be used if this is flow, frame, label, table or empty-widget_
13860
14422
  *
14423
+ * **Note**
14424
+ *
14425
+ * Only top-level elements in {@link LuaGui#screen LuaGui::screen} can be `drag_target`s.
14426
+ *
13861
14427
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.drag_target View documentation}
13862
- * @remarks Only top-level elements in {@link LuaGui#screen LuaGui::screen} can be `drag_target`s.
13863
14428
  * @example This creates a frame that contains a dragging handle which can move the frame.
13864
14429
  *
13865
14430
  * ```
@@ -14110,9 +14675,12 @@ interface TabbedPaneGuiElementMembers extends BaseGuiElement {
14110
14675
  *
14111
14676
  * _Can only be used if this is tabbed-pane_
14112
14677
  *
14678
+ * **Notes**
14679
+ * - Removing a tab does not destroy the tab or the tab contents. It just removes them from the view.
14680
+ * - When removing tabs, {@link LuaGuiElement#selected_tab_index LuaGuiElement::selected_tab_index} needs to be manually updated.
14681
+ *
14113
14682
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.remove_tab View documentation}
14114
14683
  * @param tab The tab to remove. If not given, it removes all tabs.
14115
- * @remarks Removing a tab does not destroy the tab or the tab contents. It just removes them from the view.<br>When removing tabs, {@link LuaGuiElement#selected_tab_index LuaGuiElement::selected_tab_index} needs to be manually updated.
14116
14684
  */
14117
14685
  remove_tab(tab: LuaGuiElement): void
14118
14686
  /**
@@ -14340,8 +14908,11 @@ interface FlowGuiElementMembers extends BaseGuiElement {
14340
14908
  *
14341
14909
  * _Can only be used if this is flow, frame, label, table or empty-widget_
14342
14910
  *
14911
+ * **Note**
14912
+ *
14913
+ * Only top-level elements in {@link LuaGui#screen LuaGui::screen} can be `drag_target`s.
14914
+ *
14343
14915
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.drag_target View documentation}
14344
- * @remarks Only top-level elements in {@link LuaGui#screen LuaGui::screen} can be `drag_target`s.
14345
14916
  * @example This creates a frame that contains a dragging handle which can move the frame.
14346
14917
  *
14347
14918
  * ```
@@ -14398,8 +14969,11 @@ interface FrameGuiElementMembers extends BaseGuiElement {
14398
14969
  *
14399
14970
  * _Can only be used if this is flow, frame, label, table or empty-widget_
14400
14971
  *
14972
+ * **Note**
14973
+ *
14974
+ * Only top-level elements in {@link LuaGui#screen LuaGui::screen} can be `drag_target`s.
14975
+ *
14401
14976
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.drag_target View documentation}
14402
- * @remarks Only top-level elements in {@link LuaGui#screen LuaGui::screen} can be `drag_target`s.
14403
14977
  * @example This creates a frame that contains a dragging handle which can move the frame.
14404
14978
  *
14405
14979
  * ```
@@ -14426,8 +15000,11 @@ interface LabelGuiElementMembers extends BaseGuiElement {
14426
15000
  *
14427
15001
  * _Can only be used if this is flow, frame, label, table or empty-widget_
14428
15002
  *
15003
+ * **Note**
15004
+ *
15005
+ * Only top-level elements in {@link LuaGui#screen LuaGui::screen} can be `drag_target`s.
15006
+ *
14429
15007
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.drag_target View documentation}
14430
- * @remarks Only top-level elements in {@link LuaGui#screen LuaGui::screen} can be `drag_target`s.
14431
15008
  * @example This creates a frame that contains a dragging handle which can move the frame.
14432
15009
  *
14433
15010
  * ```
@@ -14574,8 +15151,11 @@ interface SliderGuiElementMembers extends BaseGuiElement {
14574
15151
  /**
14575
15152
  * Sets this sliders minimum and maximum values.
14576
15153
  *
15154
+ * **Note**
15155
+ *
15156
+ * The minimum can't be >= the maximum.
15157
+ *
14577
15158
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.set_slider_minimum_maximum View documentation}
14578
- * @remarks The minimum can't be >= the maximum.
14579
15159
  */
14580
15160
  set_slider_minimum_maximum(minimum: double, maximum: double): void
14581
15161
  /**
@@ -14599,8 +15179,11 @@ interface SliderGuiElementMembers extends BaseGuiElement {
14599
15179
  /**
14600
15180
  * Sets the minimum distance this slider can move.
14601
15181
  *
15182
+ * **Note**
15183
+ *
15184
+ * The minimum distance can't be > (max - min).
15185
+ *
14602
15186
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.set_slider_value_step View documentation}
14603
- * @remarks The minimum distance can't be > (max - min).
14604
15187
  */
14605
15188
  set_slider_value_step(value: double): void
14606
15189
  /**
@@ -14662,8 +15245,11 @@ interface SwitchGuiElementMembers extends BaseGuiElement {
14662
15245
  *
14663
15246
  * _Can only be used if this is switch_
14664
15247
  *
15248
+ * **Note**
15249
+ *
15250
+ * If {@link LuaGuiElement#allow_none_state LuaGuiElement::allow_none_state} is false this can't be set to `"none"`.
15251
+ *
14665
15252
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.switch_state View documentation}
14666
- * @remarks If {@link LuaGuiElement#allow_none_state LuaGuiElement::allow_none_state} is false this can't be set to `"none"`.
14667
15253
  */
14668
15254
  switch_state: string
14669
15255
  /**
@@ -14671,8 +15257,11 @@ interface SwitchGuiElementMembers extends BaseGuiElement {
14671
15257
  *
14672
15258
  * _Can only be used if this is switch_
14673
15259
  *
15260
+ * **Note**
15261
+ *
15262
+ * This can't be set to false if the current switch_state is 'none'.
15263
+ *
14674
15264
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.allow_none_state View documentation}
14675
- * @remarks This can't be set to false if the current switch_state is 'none'.
14676
15265
  */
14677
15266
  allow_none_state: boolean
14678
15267
  /**
@@ -14782,8 +15371,11 @@ interface TableGuiElementMembers extends BaseGuiElement {
14782
15371
  *
14783
15372
  * _Can only be used if this is flow, frame, label, table or empty-widget_
14784
15373
  *
15374
+ * **Note**
15375
+ *
15376
+ * Only top-level elements in {@link LuaGui#screen LuaGui::screen} can be `drag_target`s.
15377
+ *
14785
15378
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.drag_target View documentation}
14786
- * @remarks Only top-level elements in {@link LuaGui#screen LuaGui::screen} can be `drag_target`s.
14787
15379
  * @example This creates a frame that contains a dragging handle which can move the frame.
14788
15380
  *
14789
15381
  * ```
@@ -15151,23 +15743,32 @@ interface LuaInventory extends ReadonlyArray<LuaItemStack> {
15151
15743
  /**
15152
15744
  * Does this inventory support a bar? Bar is the draggable red thing, found for example on chests, that limits the portion of the inventory that may be manipulated by machines.
15153
15745
  *
15746
+ * **Note**
15747
+ *
15748
+ * "Supporting a bar" doesn't mean that the bar is set to some nontrivial value. Supporting a bar means the inventory supports having this limit at all. The character's inventory is an example of an inventory without a bar; the wooden chest's inventory is an example of one with a bar.
15749
+ *
15154
15750
  * {@link https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.supports_bar View documentation}
15155
- * @remarks "Supporting a bar" doesn't mean that the bar is set to some nontrivial value. Supporting a bar means the inventory supports having this limit at all. The character's inventory is an example of an inventory without a bar; the wooden chest's inventory is an example of one with a bar.
15156
15751
  */
15157
15752
  supports_bar(): boolean
15158
15753
  /**
15159
15754
  * Get the current bar. This is the index at which the red area starts.
15160
15755
  *
15756
+ * **Note**
15757
+ *
15758
+ * Only useable if this inventory supports having a bar.
15759
+ *
15161
15760
  * {@link https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.get_bar View documentation}
15162
- * @remarks Only useable if this inventory supports having a bar.
15163
15761
  */
15164
15762
  get_bar(): uint
15165
15763
  /**
15166
15764
  * Set the current bar.
15167
15765
  *
15766
+ * **Note**
15767
+ *
15768
+ * Only useable if this inventory supports having a bar.
15769
+ *
15168
15770
  * {@link https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.set_bar View documentation}
15169
15771
  * @param bar The new limit. Omitting this parameter will clear the limit.
15170
- * @remarks Only useable if this inventory supports having a bar.
15171
15772
  */
15172
15773
  set_bar(bar?: uint): void
15173
15774
  /**
@@ -15201,11 +15802,14 @@ interface LuaInventory extends ReadonlyArray<LuaItemStack> {
15201
15802
  /**
15202
15803
  * Sets the filter for the given item stack index.
15203
15804
  *
15805
+ * **Note**
15806
+ *
15807
+ * Some inventory slots don't allow some filters (gun ammo can't be filtered for non-ammo).
15808
+ *
15204
15809
  * {@link https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.set_filter View documentation}
15205
15810
  * @param index The item stack index
15206
15811
  * @param filter The new filter or nil to erase the filter
15207
15812
  * @returns If the filter was allowed to be set.
15208
- * @remarks Some inventory slots don't allow some filters (gun ammo can't be filtered for non-ammo).
15209
15813
  */
15210
15814
  set_filter(index: uint, filter: string | undefined): boolean
15211
15815
  /**
@@ -15236,9 +15840,13 @@ interface LuaInventory extends ReadonlyArray<LuaItemStack> {
15236
15840
  /**
15237
15841
  * Gets the number of the given item that can be inserted into this inventory.
15238
15842
  *
15843
+ * **Notes**
15844
+ * - This is a "best guess" number; things like assembling machine filtered slots, module slots, items with durability, and items with mixed health will cause the result to be inaccurate.
15845
+ * - The main use for this is in checking how many of a basic item can fit into a basic inventory.
15846
+ * - This accounts for the 'bar' on the inventory.
15847
+ *
15239
15848
  * {@link https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.get_insertable_count View documentation}
15240
15849
  * @param item The item to check.
15241
- * @remarks This is a "best guess" number; things like assembling machine filtered slots, module slots, items with durability, and items with mixed health will cause the result to be inaccurate.<br>The main use for this is in checking how many of a basic item can fit into a basic inventory.<br>This accounts for the 'bar' on the inventory.
15242
15850
  */
15243
15851
  get_insertable_count(item: string): void
15244
15852
  /**
@@ -15254,17 +15862,22 @@ interface LuaInventory extends ReadonlyArray<LuaItemStack> {
15254
15862
  * - {@link OnPreScriptInventoryResizedEvent on_pre_script_inventory_resized} _instantly_
15255
15863
  * - {@link OnScriptInventoryResizedEvent on_script_inventory_resized} _instantly_
15256
15864
  *
15865
+ * **Notes**
15866
+ * - Items in slots beyond the new capacity are deleted.
15867
+ * - Only inventories created by {@link LuaGameScript#create_inventory LuaGameScript::create_inventory} can be resized.
15257
15868
  *
15258
15869
  * {@link https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.resize View documentation}
15259
15870
  * @param size New size of a inventory
15260
- * @remarks Items in slots beyond the new capacity are deleted.<br>Only inventories created by {@link LuaGameScript#create_inventory LuaGameScript::create_inventory} can be resized.
15261
15871
  */
15262
15872
  resize(size: uint16): void
15263
15873
  /**
15264
15874
  * Destroys this inventory.
15265
15875
  *
15876
+ * **Note**
15877
+ *
15878
+ * Only inventories created by {@link LuaGameScript#create_inventory LuaGameScript::create_inventory} can be destroyed this way.
15879
+ *
15266
15880
  * {@link https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.destroy View documentation}
15267
- * @remarks Only inventories created by {@link LuaGameScript#create_inventory LuaGameScript::create_inventory} can be destroyed this way.
15268
15881
  */
15269
15882
  destroy(): void
15270
15883
  /**
@@ -15826,8 +16439,11 @@ interface LuaItemPrototype {
15826
16439
  *
15827
16440
  * _Can only be used if this is SelectionTool_
15828
16441
  *
16442
+ * **Note**
16443
+ *
16444
+ * The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
16445
+ *
15829
16446
  * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.entity_type_filters View documentation}
15830
- * @remarks The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
15831
16447
  */
15832
16448
  readonly entity_type_filters: Record<string, boolean>
15833
16449
  /**
@@ -15835,8 +16451,11 @@ interface LuaItemPrototype {
15835
16451
  *
15836
16452
  * _Can only be used if this is SelectionTool_
15837
16453
  *
16454
+ * **Note**
16455
+ *
16456
+ * The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
16457
+ *
15838
16458
  * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_entity_type_filters View documentation}
15839
- * @remarks The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
15840
16459
  */
15841
16460
  readonly alt_entity_type_filters: Record<string, boolean>
15842
16461
  /**
@@ -15844,8 +16463,11 @@ interface LuaItemPrototype {
15844
16463
  *
15845
16464
  * _Can only be used if this is SelectionTool_
15846
16465
  *
16466
+ * **Note**
16467
+ *
16468
+ * The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
16469
+ *
15847
16470
  * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_entity_type_filters View documentation}
15848
- * @remarks The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
15849
16471
  */
15850
16472
  readonly reverse_entity_type_filters: Record<string, boolean>
15851
16473
  /**
@@ -16452,8 +17074,11 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
16452
17074
  *
16453
17075
  * _Can only be used if this is SelectionTool_
16454
17076
  *
17077
+ * **Note**
17078
+ *
17079
+ * The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
17080
+ *
16455
17081
  * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.entity_type_filters View documentation}
16456
- * @remarks The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
16457
17082
  */
16458
17083
  readonly entity_type_filters: Record<string, boolean>
16459
17084
  /**
@@ -16461,8 +17086,11 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
16461
17086
  *
16462
17087
  * _Can only be used if this is SelectionTool_
16463
17088
  *
17089
+ * **Note**
17090
+ *
17091
+ * The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
17092
+ *
16464
17093
  * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_entity_type_filters View documentation}
16465
- * @remarks The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
16466
17094
  */
16467
17095
  readonly alt_entity_type_filters: Record<string, boolean>
16468
17096
  /**
@@ -16470,8 +17098,11 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
16470
17098
  *
16471
17099
  * _Can only be used if this is SelectionTool_
16472
17100
  *
17101
+ * **Note**
17102
+ *
17103
+ * The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
17104
+ *
16473
17105
  * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_entity_type_filters View documentation}
16474
- * @remarks The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
16475
17106
  */
16476
17107
  readonly reverse_entity_type_filters: Record<string, boolean>
16477
17108
  /**
@@ -16560,9 +17191,12 @@ interface UpgradeItemPrototype extends BaseItemPrototype {
16560
17191
  /**
16561
17192
  * A reference to an item and count owned by some external entity.
16562
17193
  *
17194
+ * **Notes**
17195
+ * - In most instances this is a simple reference as in: it points at a specific slot in an inventory and not the item in the slot.
17196
+ * - In the instance this references an item on a {@link LuaTransportLine} the reference is only guaranteed to stay valid (and refer to the same item) as long as nothing changes the transport line.
17197
+ *
16563
17198
  * {@link https://lua-api.factorio.com/latest/LuaItemStack.html View documentation}
16564
17199
  * @noSelf
16565
- * @remarks In most instances this is a simple reference as in: it points at a specific slot in an inventory and not the item in the slot.<br>In the instance this references an item on a {@link LuaTransportLine} the reference is only guaranteed to stay valid (and refer to the same item) as long as nothing changes the transport line.
16566
17200
  */
16567
17201
  interface LuaItemStack {
16568
17202
  /**
@@ -16700,11 +17334,12 @@ interface LuaItemStack {
16700
17334
  */
16701
17335
  get_inventory(inventory: defines.inventory): LuaInventory | undefined
16702
17336
  /**
17337
+ * **Note**
16703
17338
  *
17339
+ * Built entities can be come invalid between the building of the blueprint and the function returning if by_player or raise_built is used and one of those events invalidates the entity.
16704
17340
  *
16705
17341
  * {@link https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.build_blueprint View documentation}
16706
17342
  * @returns Array of created ghosts
16707
- * @remarks Built entities can be come invalid between the building of the blueprint and the function returning if by_player or raise_built is used and one of those events invalidates the entity.
16708
17343
  */
16709
17344
  build_blueprint(params: {
16710
17345
  /**
@@ -17043,8 +17678,11 @@ interface LuaItemStack {
17043
17678
  /**
17044
17679
  * Durability of the contained item. Automatically capped at the item's maximum durability.
17045
17680
  *
17681
+ * **Note**
17682
+ *
17683
+ * When used on a non-tool item, the value of this attribute is `nil`.
17684
+ *
17046
17685
  * {@link https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.durability View documentation}
17047
- * @remarks When used on a non-tool item, the value of this attribute is `nil`.
17048
17686
  */
17049
17687
  durability: double | undefined
17050
17688
  /**
@@ -17418,11 +18056,12 @@ interface BaseItemStack {
17418
18056
  */
17419
18057
  get_inventory(inventory: defines.inventory): LuaInventory | undefined
17420
18058
  /**
18059
+ * **Note**
17421
18060
  *
18061
+ * Built entities can be come invalid between the building of the blueprint and the function returning if by_player or raise_built is used and one of those events invalidates the entity.
17422
18062
  *
17423
18063
  * {@link https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.build_blueprint View documentation}
17424
18064
  * @returns Array of created ghosts
17425
- * @remarks Built entities can be come invalid between the building of the blueprint and the function returning if by_player or raise_built is used and one of those events invalidates the entity.
17426
18065
  */
17427
18066
  build_blueprint(params: {
17428
18067
  /**
@@ -17601,8 +18240,11 @@ interface BaseItemStack {
17601
18240
  /**
17602
18241
  * Durability of the contained item. Automatically capped at the item's maximum durability.
17603
18242
  *
18243
+ * **Note**
18244
+ *
18245
+ * When used on a non-tool item, the value of this attribute is `nil`.
18246
+ *
17604
18247
  * {@link https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.durability View documentation}
17605
- * @remarks When used on a non-tool item, the value of this attribute is `nil`.
17606
18248
  */
17607
18249
  durability: double | undefined
17608
18250
  /**
@@ -18662,8 +19304,11 @@ interface LuaLogisticPoint {
18662
19304
  /**
18663
19305
  * The logistic filters for this logistic point or `nil` if this doesn't use logistic filters.
18664
19306
  *
19307
+ * **Note**
19308
+ *
19309
+ * The returned array will always have an entry for each filter and will be indexed in sequence when not nil.
19310
+ *
18665
19311
  * {@link https://lua-api.factorio.com/latest/LuaLogisticPoint.html#LuaLogisticPoint.filters View documentation}
18666
- * @remarks The returned array will always have an entry for each filter and will be indexed in sequence when not nil.
18667
19312
  */
18668
19313
  readonly filters: LogisticFilter[] | undefined
18669
19314
  /**
@@ -18675,8 +19320,11 @@ interface LuaLogisticPoint {
18675
19320
  /**
18676
19321
  * The force of this logistic point.
18677
19322
  *
19323
+ * **Note**
19324
+ *
19325
+ * This will always be the same as the {@link LuaLogisticPoint#owner LuaLogisticPoint::owner} force.
19326
+ *
18678
19327
  * {@link https://lua-api.factorio.com/latest/LuaLogisticPoint.html#LuaLogisticPoint.force View documentation}
18679
- * @remarks This will always be the same as the {@link LuaLogisticPoint#owner LuaLogisticPoint::owner} force.
18680
19328
  */
18681
19329
  readonly force: LuaForce
18682
19330
  /**
@@ -19048,8 +19696,11 @@ interface LuaPermissionGroup {
19048
19696
  /**
19049
19697
  * The name of this group.
19050
19698
  *
19699
+ * **Note**
19700
+ *
19701
+ * Setting the name to `nil` or an empty string sets the name to the default value.
19702
+ *
19051
19703
  * {@link https://lua-api.factorio.com/latest/LuaPermissionGroup.html#LuaPermissionGroup.name View documentation}
19052
- * @remarks Setting the name to `nil` or an empty string sets the name to the default value.
19053
19704
  */
19054
19705
  name: string
19055
19706
  /**
@@ -19137,8 +19788,11 @@ interface LuaPlayer extends LuaControl {
19137
19788
  /**
19138
19789
  * Print text to the chat console.
19139
19790
  *
19791
+ * **Note**
19792
+ *
19793
+ * Messages that are identical to a message sent in the last 60 ticks are not printed again.
19794
+ *
19140
19795
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.print View documentation}
19141
- * @remarks Messages that are identical to a message sent in the last 60 ticks are not printed again.
19142
19796
  */
19143
19797
  print(message: LocalisedString, color?: Color): void
19144
19798
  /**
@@ -19164,8 +19818,11 @@ interface LuaPlayer extends LuaControl {
19164
19818
  /**
19165
19819
  * Set the controller type of the player.
19166
19820
  *
19821
+ * **Notes**
19822
+ * - Setting a player to {@link defines.controllers.editor} auto promotes the player to admin and enables cheat mode.
19823
+ * - Setting a player to {@link defines.controllers.editor} also requires the calling player be an admin.
19824
+ *
19167
19825
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.set_controller View documentation}
19168
- * @remarks Setting a player to {@link defines.controllers.editor} auto promotes the player to admin and enables cheat mode.<br>Setting a player to {@link defines.controllers.editor} also requires the calling player be an admin.
19169
19826
  */
19170
19827
  set_controller(params: {
19171
19828
  /**
@@ -19285,10 +19942,13 @@ interface LuaPlayer extends LuaControl {
19285
19942
  /**
19286
19943
  * Creates and attaches a character entity to this player.
19287
19944
  *
19945
+ * **Note**
19946
+ *
19947
+ * The player must not have a character already connected and must be online (see {@link LuaPlayer#connected LuaPlayer::connected}).
19948
+ *
19288
19949
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.create_character View documentation}
19289
19950
  * @param character The character to create else the default is used.
19290
19951
  * @returns Whether the character was created.
19291
- * @remarks The player must not have a character already connected and must be online (see {@link LuaPlayer#connected LuaPlayer::connected}).
19292
19952
  */
19293
19953
  create_character(character?: string): boolean
19294
19954
  /**
@@ -19436,8 +20096,11 @@ interface LuaPlayer extends LuaControl {
19436
20096
  /**
19437
20097
  * Builds what ever is in the cursor on the surface the player is on.
19438
20098
  *
20099
+ * **Notes**
20100
+ * - Anything built will fire normal player-built events.
20101
+ * - The cursor stack will automatically be reduced as if the player built normally.
20102
+ *
19439
20103
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.build_from_cursor View documentation}
19440
- * @remarks Anything built will fire normal player-built events.<br>The cursor stack will automatically be reduced as if the player built normally.
19441
20104
  */
19442
20105
  build_from_cursor(params: {
19443
20106
  /**
@@ -19494,31 +20157,44 @@ interface LuaPlayer extends LuaControl {
19494
20157
  /**
19495
20158
  * The characters associated with this player.
19496
20159
  *
20160
+ * **Notes**
20161
+ * - The array will always be empty when the player is disconnected (see {@link LuaPlayer#connected LuaPlayer::connected}) regardless of there being associated characters.
20162
+ * - Characters associated with this player will be logged off when this player disconnects but are not controlled by any player.
20163
+ *
19497
20164
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.get_associated_characters View documentation}
19498
- * @remarks The array will always be empty when the player is disconnected (see {@link LuaPlayer#connected LuaPlayer::connected}) regardless of there being associated characters.<br>Characters associated with this player will be logged off when this player disconnects but are not controlled by any player.
19499
20165
  */
19500
20166
  get_associated_characters(): LuaEntity[]
19501
20167
  /**
19502
20168
  * Associates a character with this player.
19503
20169
  *
20170
+ * **Notes**
20171
+ * - The character must not be connected to any controller.
20172
+ * - If this player is currently disconnected (see {@link LuaPlayer#connected LuaPlayer::connected}) the character will be immediately "logged off".
20173
+ * - See {@link LuaPlayer#get_associated_characters LuaPlayer::get_associated_characters} for more information.
20174
+ *
19504
20175
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.associate_character View documentation}
19505
20176
  * @param character The character entity.
19506
- * @remarks The character must not be connected to any controller.<br>If this player is currently disconnected (see {@link LuaPlayer#connected LuaPlayer::connected}) the character will be immediately "logged off".<br>See {@link LuaPlayer#get_associated_characters LuaPlayer::get_associated_characters} for more information.
19507
20177
  */
19508
20178
  associate_character(character: LuaEntity): void
19509
20179
  /**
19510
20180
  * Disassociates a character from this player. This is functionally the same as setting {@link LuaEntity#associated_player LuaEntity::associated_player} to `nil`.
19511
20181
  *
20182
+ * **Note**
20183
+ *
20184
+ * See {@link LuaPlayer#get_associated_characters LuaPlayer::get_associated_characters} for more information.
20185
+ *
19512
20186
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.disassociate_character View documentation}
19513
20187
  * @param character The character entity
19514
- * @remarks See {@link LuaPlayer#get_associated_characters LuaPlayer::get_associated_characters} for more information.
19515
20188
  */
19516
20189
  disassociate_character(character: LuaEntity): void
19517
20190
  /**
19518
20191
  * Spawn flying text that is only visible to this player. Either `position` or `create_at_cursor` are required. When `create_at_cursor` is `true`, all parameters other than `text` are ignored.
19519
20192
  *
20193
+ * **Notes**
20194
+ * - If no custom `speed` is set and the text is longer than 25 characters, its `time_to_live` and `speed` are dynamically adjusted to give players more time to read it.
20195
+ * - Local flying text is not saved, which means it will disappear after a save/load-cycle.
20196
+ *
19520
20197
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.create_local_flying_text View documentation}
19521
- * @remarks If no custom `speed` is set and the text is longer than 25 characters, its `time_to_live` and `speed` are dynamically adjusted to give players more time to read it.<br>Local flying text is not saved, which means it will disappear after a save/load-cycle.
19522
20198
  */
19523
20199
  create_local_flying_text(params: {
19524
20200
  /**
@@ -19637,8 +20313,11 @@ interface LuaPlayer extends LuaControl {
19637
20313
  /**
19638
20314
  * Asks the player if they would like to connect to the given server.
19639
20315
  *
20316
+ * **Note**
20317
+ *
20318
+ * This only does anything when used on a multiplayer peer. Single player and server hosts will ignore the prompt.
20319
+ *
19640
20320
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.connect_to_server View documentation}
19641
- * @remarks This only does anything when used on a multiplayer peer. Single player and server hosts will ignore the prompt.
19642
20321
  */
19643
20322
  connect_to_server(params: {
19644
20323
  /**
@@ -19672,10 +20351,12 @@ interface LuaPlayer extends LuaControl {
19672
20351
  * **Raised events:**
19673
20352
  * - {@link OnStringTranslatedEvent on_string_translated}? _future_tick_ Raised if the request was successfully sent.
19674
20353
  *
20354
+ * **Note**
20355
+ *
20356
+ * Does nothing if this player is not connected. (see {@link LuaPlayer#connected LuaPlayer::connected}).
19675
20357
  *
19676
20358
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.request_translation View documentation}
19677
20359
  * @returns Whether the request was sent or not.
19678
- * @remarks Does nothing if this player is not connected. (see {@link LuaPlayer#connected LuaPlayer::connected}).
19679
20360
  */
19680
20361
  request_translation(localised_string: LocalisedString): boolean
19681
20362
  /**
@@ -19738,15 +20419,21 @@ interface LuaPlayer extends LuaControl {
19738
20419
  /**
19739
20420
  * The character attached to this player, or `nil` if no character.
19740
20421
  *
20422
+ * **Note**
20423
+ *
20424
+ * Will also return `nil` when the player is disconnected (see {@link LuaPlayer#connected LuaPlayer::connected}).
20425
+ *
19741
20426
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character View documentation}
19742
- * @remarks Will also return `nil` when the player is disconnected (see {@link LuaPlayer#connected LuaPlayer::connected}).
19743
20427
  */
19744
20428
  character: LuaEntity | undefined
19745
20429
  /**
19746
20430
  * When in a cutscene; the character this player would be using once the cutscene is over.
19747
20431
  *
20432
+ * **Note**
20433
+ *
20434
+ * Will also return `nil` when the player is disconnected (see {@link LuaPlayer#connected LuaPlayer::connected}).
20435
+ *
19748
20436
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.cutscene_character View documentation}
19749
- * @remarks Will also return `nil` when the player is disconnected (see {@link LuaPlayer#connected LuaPlayer::connected}).
19750
20437
  */
19751
20438
  readonly cutscene_character: LuaEntity | undefined
19752
20439
  /**
@@ -19766,8 +20453,11 @@ interface LuaPlayer extends LuaControl {
19766
20453
  /**
19767
20454
  * The stashed controller type or `nil` if no controller is stashed.
19768
20455
  *
20456
+ * **Note**
20457
+ *
20458
+ * This is mainly useful when a player is in the map editor.
20459
+ *
19769
20460
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.stashed_controller_type View documentation}
19770
- * @remarks This is mainly useful when a player is in the map editor.
19771
20461
  */
19772
20462
  readonly stashed_controller_type: defines.controllers | undefined
19773
20463
  /**
@@ -19817,8 +20507,11 @@ interface LuaPlayer extends LuaControl {
19817
20507
  /**
19818
20508
  * `true` if the player is an admin.
19819
20509
  *
20510
+ * **Note**
20511
+ *
20512
+ * Trying to change player admin status from the console when you aren't an admin does nothing.
20513
+ *
19820
20514
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.admin View documentation}
19821
- * @remarks Trying to change player admin status from the console when you aren't an admin does nothing.
19822
20515
  */
19823
20516
  admin: boolean
19824
20517
  /**
@@ -19856,29 +20549,41 @@ interface LuaPlayer extends LuaControl {
19856
20549
  /**
19857
20550
  * Gets the current per-player settings for the this player, indexed by prototype name. Returns the same structure as {@link LuaSettings#get_player_settings LuaSettings::get_player_settings}.
19858
20551
  *
20552
+ * **Note**
20553
+ *
20554
+ * This table will become invalid if its associated player does.
20555
+ *
19859
20556
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.mod_settings View documentation}
19860
- * @remarks This table will become invalid if its associated player does.
19861
20557
  */
19862
20558
  readonly mod_settings: LuaCustomTable<string, ModSetting>
19863
20559
  /**
19864
20560
  * The number of ticks until this player will respawn or `nil` if not waiting to respawn.
19865
20561
  *
20562
+ * **Notes**
20563
+ * - Set to `nil` to immediately respawn the player.
20564
+ * - Set to any positive value to trigger the respawn state for this player.
20565
+ *
19866
20566
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.ticks_to_respawn View documentation}
19867
- * @remarks Set to `nil` to immediately respawn the player.<br>Set to any positive value to trigger the respawn state for this player.
19868
20567
  */
19869
20568
  ticks_to_respawn: uint | undefined
19870
20569
  /**
19871
20570
  * The display resolution for this player.
19872
20571
  *
20572
+ * **Note**
20573
+ *
20574
+ * During {@link OnPlayerCreatedEvent on_player_created}, this attribute will always return a resolution of `{width=1920, height=1080}`. To get the actual resolution, listen to the {@link OnPlayerDisplayResolutionChangedEvent on_player_display_resolution_changed} event raised shortly afterwards.
20575
+ *
19873
20576
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.display_resolution View documentation}
19874
- * @remarks During {@link OnPlayerCreatedEvent on_player_created}, this attribute will always return a resolution of `{width=1920, height=1080}`. To get the actual resolution, listen to the {@link OnPlayerDisplayResolutionChangedEvent on_player_display_resolution_changed} event raised shortly afterwards.
19875
20577
  */
19876
20578
  readonly display_resolution: DisplayResolution
19877
20579
  /**
19878
20580
  * The display scale for this player.
19879
20581
  *
20582
+ * **Note**
20583
+ *
20584
+ * During {@link OnPlayerCreatedEvent on_player_created}, this attribute will always return a scale of `1`. To get the actual scale, listen to the {@link OnPlayerDisplayScaleChangedEvent on_player_display_scale_changed} event raised shortly afterwards.
20585
+ *
19880
20586
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.display_scale View documentation}
19881
- * @remarks During {@link OnPlayerCreatedEvent on_player_created}, this attribute will always return a scale of `1`. To get the actual scale, listen to the {@link OnPlayerDisplayScaleChangedEvent on_player_display_scale_changed} event raised shortly afterwards.
19882
20587
  */
19883
20588
  readonly display_scale: double
19884
20589
  /**
@@ -19958,9 +20663,12 @@ interface LuaPlayer extends LuaControl {
19958
20663
  /**
19959
20664
  * An object used to measure script performance.
19960
20665
  *
20666
+ * **Note**
20667
+ *
20668
+ * Since performance is non-deterministic, these objects don't allow reading the raw time values from Lua. They can be used anywhere a {@link LocalisedString} is used, except for {@link LuaGuiElement#add LuaGuiElement::add}'s LocalisedString arguments, {@link LuaSurface#create_entity LuaSurface::create_entity}'s `text` argument, and {@link LuaEntity#add_market_item LuaEntity::add_market_item}.
20669
+ *
19961
20670
  * {@link https://lua-api.factorio.com/latest/LuaProfiler.html View documentation}
19962
20671
  * @noSelf
19963
- * @remarks Since performance is non-deterministic, these objects don't allow reading the raw time values from Lua. They can be used anywhere a {@link LocalisedString} is used, except for {@link LuaGuiElement#add LuaGuiElement::add}'s LocalisedString arguments, {@link LuaSurface#create_entity LuaSurface::create_entity}'s `text` argument, and {@link LuaEntity#add_market_item LuaEntity::add_market_item}.
19964
20672
  */
19965
20673
  interface LuaProfiler {
19966
20674
  /**
@@ -19984,17 +20692,23 @@ interface LuaProfiler {
19984
20692
  /**
19985
20693
  * Add the duration of another timer to this timer. Useful to reduce start/stop overhead when accumulating time onto many timers at once.
19986
20694
  *
20695
+ * **Note**
20696
+ *
20697
+ * If other is running, the time to now will be added.
20698
+ *
19987
20699
  * {@link https://lua-api.factorio.com/latest/LuaProfiler.html#LuaProfiler.add View documentation}
19988
20700
  * @param other The timer to add to this timer.
19989
- * @remarks If other is running, the time to now will be added.
19990
20701
  */
19991
20702
  add(other: LuaProfiler): void
19992
20703
  /**
19993
20704
  * Divides the current duration by a set value. Useful for calculating the average of many iterations.
19994
20705
  *
20706
+ * **Note**
20707
+ *
20708
+ * Does nothing if this isn't stopped.
20709
+ *
19995
20710
  * {@link https://lua-api.factorio.com/latest/LuaProfiler.html#LuaProfiler.divide View documentation}
19996
20711
  * @param number The number to divide by. Must be > 0.
19997
- * @remarks Does nothing if this isn't stopped.
19998
20712
  */
19999
20713
  divide(number: double): void
20000
20714
  /**
@@ -20172,7 +20886,7 @@ interface LuaRailSignalControlBehavior extends LuaControlBehavior {
20172
20886
  }
20173
20887
 
20174
20888
  /**
20175
- * A deterministic random generator independent from the core games random generator that can be seeded and re-seeded at will. This random generator can be saved and loaded and will maintain its state. Note this is entirely different from calling {@link https://lua-api.factorio.com/latest/Libraries.html#math.random math.random}() and you should be sure you actually want to use this over calling `math.random()`. If you aren't sure if you need to use this over calling `math.random()` then you probably don't need to use this.
20889
+ * A deterministic random generator independent from the core games random generator that can be seeded and re-seeded at will. This random generator can be saved and loaded and will maintain its state. Note this is entirely different from calling {@linkplain https://lua-api.factorio.com/latest/Libraries.html#math.random math.random}() and you should be sure you actually want to use this over calling `math.random()`. If you aren't sure if you need to use this over calling `math.random()` then you probably don't need to use this.
20176
20890
  *
20177
20891
  * {@link https://lua-api.factorio.com/latest/LuaRandomGenerator.html View documentation}
20178
20892
  * @noSelf
@@ -20187,8 +20901,11 @@ interface LuaRandomGenerator {
20187
20901
  /**
20188
20902
  * Re-seeds the random generator with the given value.
20189
20903
  *
20904
+ * **Note**
20905
+ *
20906
+ * Seeds that are close together will produce similar results. Seeds from 0 to 341 will produce the same results.
20907
+ *
20190
20908
  * {@link https://lua-api.factorio.com/latest/LuaRandomGenerator.html#LuaRandomGenerator.re_seed View documentation}
20191
- * @remarks Seeds that are close together will produce similar results. Seeds from 0 to 341 will produce the same results.
20192
20909
  */
20193
20910
  re_seed(seed: uint): void
20194
20911
  /**
@@ -20562,10 +21279,13 @@ interface LuaRemote {
20562
21279
  /**
20563
21280
  * Add a remote interface.
20564
21281
  *
21282
+ * **Note**
21283
+ *
21284
+ * It is an error if the given interface `name` is already registered.
21285
+ *
20565
21286
  * {@link https://lua-api.factorio.com/latest/LuaRemote.html#LuaRemote.add_interface View documentation}
20566
21287
  * @param name Name of the interface.
20567
21288
  * @param functions List of functions that are members of the new interface.
20568
- * @remarks It is an error if the given interface `name` is already registered.
20569
21289
  */
20570
21290
  add_interface(name: string, functions: Record<string, (...args: any) => void>): void
20571
21291
  /**
@@ -20606,9 +21326,12 @@ interface LuaRemote {
20606
21326
  /**
20607
21327
  * Allows rendering of geometric shapes, text and sprites in the game world. Each render object is identified by an id that is universally unique for the lifetime of a whole game.
20608
21328
  *
21329
+ * **Note**
21330
+ *
21331
+ * If an entity target of an object is destroyed or changes surface, then the object is also destroyed.
21332
+ *
20609
21333
  * {@link https://lua-api.factorio.com/latest/LuaRendering.html View documentation}
20610
21334
  * @noSelf
20611
- * @remarks If an entity target of an object is destroyed or changes surface, then the object is also destroyed.
20612
21335
  */
20613
21336
  interface LuaRendering {
20614
21337
  /**
@@ -20680,9 +21403,12 @@ interface LuaRendering {
20680
21403
  /**
20681
21404
  * Create a text.
20682
21405
  *
21406
+ * **Note**
21407
+ *
21408
+ * Not all fonts support scaling.
21409
+ *
20683
21410
  * {@link https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_text View documentation}
20684
21411
  * @returns Id of the render object
20685
- * @remarks Not all fonts support scaling.
20686
21412
  */
20687
21413
  draw_text(params: {
20688
21414
  /**
@@ -21032,9 +21758,12 @@ interface LuaRendering {
21032
21758
  /**
21033
21759
  * Create a light.
21034
21760
  *
21761
+ * **Note**
21762
+ *
21763
+ * The base game uses the utility sprites `light_medium` and `light_small` for lights.
21764
+ *
21035
21765
  * {@link https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_light View documentation}
21036
21766
  * @returns Id of the render object
21037
- * @remarks The base game uses the utility sprites `light_medium` and `light_small` for lights.
21038
21767
  */
21039
21768
  draw_light(params: {
21040
21769
  readonly sprite: SpritePath
@@ -21100,7 +21829,7 @@ interface LuaRendering {
21100
21829
  */
21101
21830
  draw_animation(params: {
21102
21831
  /**
21103
- * Name of an {@link https://wiki.factorio.com/Prototype/Animation animation prototype}.
21832
+ * Name of an {@linkplain https://wiki.factorio.com/Prototype/Animation animation prototype}.
21104
21833
  */
21105
21834
  readonly animation: string
21106
21835
  /**
@@ -21410,9 +22139,12 @@ interface LuaRendering {
21410
22139
  *
21411
22140
  * _Can only be used if this is Text, Circle, Arc, Polygon, Sprite, Light or Animation_
21412
22141
  *
22142
+ * **Note**
22143
+ *
22144
+ * Polygon vertices that are set to an entity will ignore this.
22145
+ *
21413
22146
  * {@link https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_target View documentation}
21414
22147
  * @returns `nil` if the object does not support target.
21415
- * @remarks Polygon vertices that are set to an entity will ignore this.
21416
22148
  */
21417
22149
  get_target(id: uint64): ScriptRenderTarget | undefined
21418
22150
  /**
@@ -21420,8 +22152,11 @@ interface LuaRendering {
21420
22152
  *
21421
22153
  * _Can only be used if this is Text, Circle, Arc, Polygon, Sprite, Light or Animation_
21422
22154
  *
22155
+ * **Note**
22156
+ *
22157
+ * Polygon vertices that are set to an entity will ignore this.
22158
+ *
21423
22159
  * {@link https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_target View documentation}
21424
- * @remarks Polygon vertices that are set to an entity will ignore this.
21425
22160
  */
21426
22161
  set_target(id: uint64, target: MapPosition | LuaEntity, target_offset?: Vector): void
21427
22162
  /**
@@ -21429,9 +22164,12 @@ interface LuaRendering {
21429
22164
  *
21430
22165
  * _Can only be used if this is Text, Polygon, Sprite, Light or Animation_
21431
22166
  *
22167
+ * **Note**
22168
+ *
22169
+ * Polygon vertices that are set to an entity will ignore this.
22170
+ *
21432
22171
  * {@link https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_orientation View documentation}
21433
22172
  * @returns `nil` if the object is not a text, polygon, sprite, light or animation.
21434
- * @remarks Polygon vertices that are set to an entity will ignore this.
21435
22173
  */
21436
22174
  get_orientation(id: uint64): RealOrientation | undefined
21437
22175
  /**
@@ -21439,8 +22177,11 @@ interface LuaRendering {
21439
22177
  *
21440
22178
  * _Can only be used if this is Text, Polygon, Sprite, Light or Animation_
21441
22179
  *
22180
+ * **Note**
22181
+ *
22182
+ * Polygon vertices that are set to an entity will ignore this.
22183
+ *
21442
22184
  * {@link https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_orientation View documentation}
21443
- * @remarks Polygon vertices that are set to an entity will ignore this.
21444
22185
  */
21445
22186
  set_orientation(id: uint64, orientation: RealOrientation): void
21446
22187
  /**
@@ -21789,9 +22530,12 @@ interface LuaRendering {
21789
22530
  *
21790
22531
  * _Can only be used if this is Polygon, Sprite or Animation_
21791
22532
  *
22533
+ * **Note**
22534
+ *
22535
+ * Polygon vertices that are set to an entity will ignore this.
22536
+ *
21792
22537
  * {@link https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_orientation_target View documentation}
21793
22538
  * @returns `nil` if no target or if this object is not a polygon, sprite, or animation.
21794
- * @remarks Polygon vertices that are set to an entity will ignore this.
21795
22539
  */
21796
22540
  get_orientation_target(id: uint64): ScriptRenderTarget | undefined
21797
22541
  /**
@@ -21799,8 +22543,11 @@ interface LuaRendering {
21799
22543
  *
21800
22544
  * _Can only be used if this is Polygon, Sprite or Animation_
21801
22545
  *
22546
+ * **Note**
22547
+ *
22548
+ * Polygon vertices that are set to an entity will ignore this.
22549
+ *
21802
22550
  * {@link https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_orientation_target View documentation}
21803
- * @remarks Polygon vertices that are set to an entity will ignore this.
21804
22551
  */
21805
22552
  set_orientation_target(
21806
22553
  id: uint64,
@@ -22016,8 +22763,11 @@ interface LuaSettings {
22016
22763
  /**
22017
22764
  * Gets the current per-player settings for the given player, indexed by prototype name. Returns the same structure as {@link LuaPlayer#mod_settings LuaPlayer::mod_settings}.
22018
22765
  *
22766
+ * **Note**
22767
+ *
22768
+ * This table will become invalid if its associated player does.
22769
+ *
22019
22770
  * {@link https://lua-api.factorio.com/latest/LuaSettings.html#LuaSettings.get_player_settings View documentation}
22020
- * @remarks This table will become invalid if its associated player does.
22021
22771
  */
22022
22772
  get_player_settings(player: PlayerIdentification): LuaCustomTable<string, ModSetting>
22023
22773
  /**
@@ -23324,8 +24074,11 @@ interface LuaSurface {
23324
24074
  /**
23325
24075
  * Get the pollution for a given position.
23326
24076
  *
24077
+ * **Note**
24078
+ *
24079
+ * Pollution is stored per chunk, so this will return the same value for all positions in one chunk.
24080
+ *
23327
24081
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_pollution View documentation}
23328
- * @remarks Pollution is stored per chunk, so this will return the same value for all positions in one chunk.
23329
24082
  * @example
23330
24083
  *
23331
24084
  * ```
@@ -23483,9 +24236,22 @@ interface LuaSurface {
23483
24236
  */
23484
24237
  readonly radius?: double
23485
24238
  readonly name?: string | readonly string[]
24239
+ readonly force?: ForceIdentification | readonly ForceIdentification[]
23486
24240
  readonly limit?: uint
23487
24241
  readonly has_hidden_tile?: boolean
24242
+ /**
24243
+ * Can be further filtered by supplying a `force` filter.
24244
+ */
24245
+ readonly has_tile_ghost?: boolean
24246
+ /**
24247
+ * Can be further filtered by supplying a `force` filter.
24248
+ */
24249
+ readonly to_be_deconstructed?: boolean
23488
24250
  readonly collision_mask?: CollisionMaskLayer | readonly CollisionMaskLayer[]
24251
+ /**
24252
+ * Whether the filters should be inverted.
24253
+ */
24254
+ readonly invert?: boolean
23489
24255
  }): LuaTile[]
23490
24256
  /**
23491
24257
  * Count entities of given type or name in a given area. Works just like {@link LuaSurface#find_entities_filtered LuaSurface::find_entities_filtered}, except this only returns the count. As it doesn't construct all the wrapper objects, this is more efficient if one is only interested in the number of entities.
@@ -23513,7 +24279,7 @@ interface LuaSurface {
23513
24279
  readonly limit?: uint
23514
24280
  readonly is_military_target?: boolean
23515
24281
  /**
23516
- * If the filters should be inverted.
24282
+ * Whether the filters should be inverted.
23517
24283
  */
23518
24284
  readonly invert?: boolean
23519
24285
  }): uint
@@ -23535,13 +24301,30 @@ interface LuaSurface {
23535
24301
  */
23536
24302
  readonly radius?: double
23537
24303
  readonly name?: string | readonly string[]
24304
+ readonly force?: ForceIdentification | readonly ForceIdentification[]
23538
24305
  readonly limit?: uint
23539
24306
  readonly has_hidden_tile?: boolean
24307
+ /**
24308
+ * Can be further filtered by supplying a `force` filter.
24309
+ */
24310
+ readonly has_tile_ghost?: boolean
24311
+ /**
24312
+ * Can be further filtered by supplying a `force` filter.
24313
+ */
24314
+ readonly to_be_deconstructed?: boolean
23540
24315
  readonly collision_mask?: CollisionMaskLayer | readonly CollisionMaskLayer[]
24316
+ /**
24317
+ * If the filters should be inverted.
24318
+ */
24319
+ readonly invert?: boolean
23541
24320
  }): uint
23542
24321
  /**
23543
24322
  * Find a non-colliding position within a given radius.
23544
24323
  *
24324
+ * **Note**
24325
+ *
24326
+ * Special care needs to be taken when using a radius of `0`. The game will not stop searching until it finds a suitable position, so it is important to make sure such a position exists. One particular case where it would not be able to find a solution is running it before any chunks have been generated.
24327
+ *
23545
24328
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_non_colliding_position View documentation}
23546
24329
  * @param name Prototype name of the entity to find a position for. (The bounding box for the collision checking is taken from this prototype.)
23547
24330
  * @param center Center of the search area.
@@ -23549,7 +24332,6 @@ interface LuaSurface {
23549
24332
  * @param precision The step length from the given position as it searches, in tiles. Minimum value is `0.01`.
23550
24333
  * @param force_to_tile_center Will only check tile centers. This can be useful when your intent is to place a building at the resulting position, as they must generally be placed at tile centers. Default false.
23551
24334
  * @returns The non-colliding position. May be `nil` if no suitable position was found.
23552
- * @remarks Special care needs to be taken when using a radius of `0`. The game will not stop searching until it finds a suitable position, so it is important to make sure such a position exists. One particular case where it would not be able to find a solution is running it before any chunks have been generated.
23553
24335
  */
23554
24336
  find_non_colliding_position(
23555
24337
  name: string,
@@ -23595,11 +24377,14 @@ interface LuaSurface {
23595
24377
  /**
23596
24378
  * Find enemy units (entities with type "unit") of a given force within an area.
23597
24379
  *
24380
+ * **Note**
24381
+ *
24382
+ * This is more efficient than {@link LuaSurface#find_entities LuaSurface::find_entities}.
24383
+ *
23598
24384
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_enemy_units View documentation}
23599
24385
  * @param center Center of the search area
23600
24386
  * @param radius Radius of the circular search area
23601
24387
  * @param force Force to find enemies of. If not given, uses the player force.
23602
- * @remarks This is more efficient than {@link LuaSurface#find_entities LuaSurface::find_entities}.
23603
24388
  * @example Find all units who would be interested to attack the player, within 100-tile area.
23604
24389
  *
23605
24390
  * ```
@@ -23610,8 +24395,11 @@ interface LuaSurface {
23610
24395
  /**
23611
24396
  * Find units (entities with type "unit") of a given force and force condition within a given area.
23612
24397
  *
24398
+ * **Note**
24399
+ *
24400
+ * This is more efficient than {@link LuaSurface#find_entities LuaSurface::find_entities}.
24401
+ *
23613
24402
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_units View documentation}
23614
- * @remarks This is more efficient than {@link LuaSurface#find_entities LuaSurface::find_entities}.
23615
24403
  * @example Find friendly units to "player" force
23616
24404
  *
23617
24405
  * ```
@@ -23638,7 +24426,7 @@ interface LuaSurface {
23638
24426
  readonly condition: ForceCondition
23639
24427
  }): LuaEntity[]
23640
24428
  /**
23641
- * Find the enemy military target ({@link https://wiki.factorio.com/Military_units_and_structures military entity}) closest to the given position.
24429
+ * Find the enemy military target ({@linkplain https://wiki.factorio.com/Military_units_and_structures military entity}) closest to the given position.
23642
24430
  *
23643
24431
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_nearest_enemy View documentation}
23644
24432
  * @returns The nearest enemy military target or `nil` if no enemy could be found within the given area.
@@ -23797,18 +24585,24 @@ interface LuaSurface {
23797
24585
  /**
23798
24586
  * Send a group to build a new base.
23799
24587
  *
24588
+ * **Note**
24589
+ *
24590
+ * The specified force must be AI-controlled; i.e. `force.ai_controllable` must be `true`.
24591
+ *
23800
24592
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.build_enemy_base View documentation}
23801
24593
  * @param position Location of the new base.
23802
24594
  * @param unit_count Number of biters to send for the base-building task.
23803
24595
  * @param force Force the new base will belong to. Defaults to enemy.
23804
- * @remarks The specified force must be AI-controlled; i.e. `force.ai_controllable` must be `true`.
23805
24596
  */
23806
24597
  build_enemy_base(position: MapPosition, unit_count: uint, force?: ForceIdentification): void
23807
24598
  /**
23808
24599
  * Get the tile at a given position.
23809
24600
  *
24601
+ * **Note**
24602
+ *
24603
+ * The input position params can also be a single tile position.
24604
+ *
23810
24605
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_tile View documentation}
23811
- * @remarks The input position params can also be a single tile position.
23812
24606
  */
23813
24607
  get_tile(x: int, y: int): LuaTile
23814
24608
  /**
@@ -23819,13 +24613,15 @@ interface LuaSurface {
23819
24613
  * **Raised events:**
23820
24614
  * - {@link ScriptRaisedSetTilesEvent script_raised_set_tiles}? _instantly_ Raised if the `raise_event` flag was set.
23821
24615
  *
24616
+ * **Note**
24617
+ *
24618
+ * It is recommended to call this method once for all the tiles you want to change rather than calling it individually for every tile. As the tile correction is used after every step, calling it one by one could cause the tile correction logic to redo some of the changes. Also, many small API calls are generally more performance intensive than one big one.
23822
24619
  *
23823
24620
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.set_tiles View documentation}
23824
24621
  * @param correct_tiles If `false`, the correction logic is not applied to the changed tiles. Defaults to `true`.
23825
24622
  * @param remove_colliding_entities `true`, `false`, or `abort_on_collision`. Defaults to `true`.
23826
24623
  * @param remove_colliding_decoratives `true` or `false`. Defaults to `true`.
23827
24624
  * @param raise_event `true` or `false`. Defaults to `false`.
23828
- * @remarks It is recommended to call this method once for all the tiles you want to change rather than calling it individually for every tile. As the tile correction is used after every step, calling it one by one could cause the tile correction logic to redo some of the changes. Also, many small API calls are generally more performance intensive than one big one.
23829
24625
  */
23830
24626
  set_tiles(
23831
24627
  tiles: readonly Tile[],
@@ -24035,11 +24831,14 @@ interface LuaSurface {
24035
24831
  /**
24036
24832
  * Gets all tiles of the given types that are connected horizontally or vertically to the given tile position including the given tile position.
24037
24833
  *
24834
+ * **Note**
24835
+ *
24836
+ * This won't find tiles in non-generated chunks.
24837
+ *
24038
24838
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_connected_tiles View documentation}
24039
24839
  * @param position The tile position to start at.
24040
24840
  * @param tiles The tiles to search for.
24041
24841
  * @returns The resulting set of tiles.
24042
- * @remarks This won't find tiles in non-generated chunks.
24043
24842
  */
24044
24843
  get_connected_tiles(position: TilePosition, tiles: readonly string[]): TilePositionTable[]
24045
24844
  /**
@@ -24055,26 +24854,35 @@ interface LuaSurface {
24055
24854
  /**
24056
24855
  * Regenerate autoplacement of some entities on this surface. This can be used to autoplace newly-added entities.
24057
24856
  *
24857
+ * **Note**
24858
+ *
24859
+ * All specified entity prototypes must be autoplacable. If nothing is given all entities are generated on all chunks.
24860
+ *
24058
24861
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.regenerate_entity View documentation}
24059
24862
  * @param entities Prototype names of entity or entities to autoplace. When `nil` all entities with an autoplace are used.
24060
24863
  * @param chunks The chunk positions to regenerate the entities on. If not given all chunks are regenerated. Note chunks with status < entities are ignored.
24061
- * @remarks All specified entity prototypes must be autoplacable. If nothing is given all entities are generated on all chunks.
24062
24864
  */
24063
24865
  regenerate_entity(entities?: string | readonly string[], chunks?: readonly ChunkPosition[]): void
24064
24866
  /**
24065
24867
  * Regenerate autoplacement of some decoratives on this surface. This can be used to autoplace newly-added decoratives.
24066
24868
  *
24869
+ * **Note**
24870
+ *
24871
+ * All specified decorative prototypes must be autoplacable. If nothing is given all decoratives are generated on all chunks.
24872
+ *
24067
24873
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.regenerate_decorative View documentation}
24068
24874
  * @param decoratives Prototype names of decorative or decoratives to autoplace. When `nil` all decoratives with an autoplace are used.
24069
24875
  * @param chunks The chunk positions to regenerate the entities on. If not given all chunks are regenerated. Note chunks with status < entities are ignored.
24070
- * @remarks All specified decorative prototypes must be autoplacable. If nothing is given all decoratives are generated on all chunks.
24071
24876
  */
24072
24877
  regenerate_decorative(decoratives?: string | readonly string[], chunks?: readonly ChunkPosition[]): void
24073
24878
  /**
24074
24879
  * Print text to the chat console of all players on this surface.
24075
24880
  *
24881
+ * **Note**
24882
+ *
24883
+ * Messages that are identical to a message sent in the last 60 ticks are not printed again.
24884
+ *
24076
24885
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.print View documentation}
24077
- * @remarks Messages that are identical to a message sent in the last 60 ticks are not printed again.
24078
24886
  */
24079
24887
  print(message: LocalisedString, color?: Color): void
24080
24888
  /**
@@ -24086,6 +24894,13 @@ interface LuaSurface {
24086
24894
  readonly area?: BoundingBox
24087
24895
  readonly position?: TilePosition
24088
24896
  readonly name?: string | readonly string[] | LuaDecorativePrototype | readonly LuaDecorativePrototype[]
24897
+ readonly collision_mask?: CollisionMaskLayer | readonly CollisionMaskLayer[]
24898
+ readonly from_layer?: string
24899
+ readonly to_layer?: string
24900
+ /**
24901
+ * Soft decoratives can be drawn over rails.
24902
+ */
24903
+ readonly exclude_soft?: boolean
24089
24904
  readonly limit?: uint
24090
24905
  /**
24091
24906
  * If the filters should be inverted.
@@ -24095,8 +24910,11 @@ interface LuaSurface {
24095
24910
  /**
24096
24911
  * Adds the given decoratives to the surface.
24097
24912
  *
24913
+ * **Note**
24914
+ *
24915
+ * This will merge decoratives of the same type that already exist effectively increasing the "amount" field.
24916
+ *
24098
24917
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_decoratives View documentation}
24099
- * @remarks This will merge decoratives of the same type that already exist effectively increasing the "amount" field.
24100
24918
  */
24101
24919
  create_decoratives(params: {
24102
24920
  /**
@@ -24122,6 +24940,13 @@ interface LuaSurface {
24122
24940
  readonly area?: BoundingBox
24123
24941
  readonly position?: TilePosition
24124
24942
  readonly name?: string | readonly string[] | LuaDecorativePrototype | readonly LuaDecorativePrototype[]
24943
+ readonly collision_mask?: CollisionMaskLayer | readonly CollisionMaskLayer[]
24944
+ readonly from_layer?: string
24945
+ readonly to_layer?: string
24946
+ /**
24947
+ * Soft decoratives can be drawn over rails.
24948
+ */
24949
+ readonly exclude_soft?: boolean
24125
24950
  readonly limit?: uint
24126
24951
  /**
24127
24952
  * If the filters should be inverted.
@@ -24183,9 +25008,11 @@ interface LuaSurface {
24183
25008
  * - {@link OnEntityClonedEvent on_entity_cloned} _instantly_ Raised for every entity that was cloned.
24184
25009
  * - {@link OnAreaClonedEvent on_area_cloned} _instantly_ Raised after the individual `on_entity_cloned` events.
24185
25010
  *
25011
+ * **Note**
25012
+ *
25013
+ * Entities are cloned in an order such that they can always be created, eg rails before trains.
24186
25014
  *
24187
25015
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_area View documentation}
24188
- * @remarks Entities are cloned in an order such that they can always be created, eg rails before trains.
24189
25016
  */
24190
25017
  clone_area(params: {
24191
25018
  readonly source_area: BoundingBox
@@ -24224,8 +25051,11 @@ interface LuaSurface {
24224
25051
  /**
24225
25052
  * Clones the given area.
24226
25053
  *
25054
+ * **Notes**
25055
+ * - {@link defines.events.on_entity_cloned} is raised for each entity, and then {@link defines.events.on_area_cloned} is raised.
25056
+ * - Entities are cloned in an order such that they can always be created, eg rails before trains.
25057
+ *
24227
25058
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_brush View documentation}
24228
- * @remarks {@link defines.events.on_entity_cloned} is raised for each entity, and then {@link defines.events.on_area_cloned} is raised.<br>Entities are cloned in an order such that they can always be created, eg rails before trains.
24229
25059
  */
24230
25060
  clone_brush(params: {
24231
25061
  readonly source_offset: TilePosition
@@ -24272,9 +25102,11 @@ interface LuaSurface {
24272
25102
  * **Raised events:**
24273
25103
  * - {@link OnEntityClonedEvent on_entity_cloned} _instantly_ Raised for every entity that was cloned.
24274
25104
  *
25105
+ * **Note**
25106
+ *
25107
+ * Entities are cloned in an order such that they can always be created, eg rails before trains.
24275
25108
  *
24276
25109
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_entities View documentation}
24277
- * @remarks Entities are cloned in an order such that they can always be created, eg rails before trains.
24278
25110
  */
24279
25111
  clone_entities(params: {
24280
25112
  readonly entities: readonly LuaEntity[]
@@ -24507,8 +25339,11 @@ interface LuaSurface {
24507
25339
  /**
24508
25340
  * The name of this surface. Names are unique among surfaces.
24509
25341
  *
25342
+ * **Note**
25343
+ *
25344
+ * the default surface can't be renamed.
25345
+ *
24510
25346
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.name View documentation}
24511
- * @remarks the default surface can't be renamed.
24512
25347
  */
24513
25348
  name: string
24514
25349
  /**
@@ -24611,8 +25446,11 @@ interface LuaSurface {
24611
25446
  /**
24612
25447
  * The multiplier of solar power on this surface. Cannot be less than 0.
24613
25448
  *
25449
+ * **Note**
25450
+ *
25451
+ * Solar equipment is still limited to its maximum power output.
25452
+ *
24614
25453
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.solar_power_multiplier View documentation}
24615
- * @remarks Solar equipment is still limited to its maximum power output.
24616
25454
  */
24617
25455
  solar_power_multiplier: double
24618
25456
  /**
@@ -24640,8 +25478,11 @@ interface LuaSurface {
24640
25478
  /**
24641
25479
  * If clouds are shown on this surface.
24642
25480
  *
25481
+ * **Note**
25482
+ *
25483
+ * If false, clouds are never shown. If true the player must also have clouds enabled in graphics settings for them to be shown.
25484
+ *
24643
25485
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.show_clouds View documentation}
24644
- * @remarks If false, clouds are never shown. If true the player must also have clouds enabled in graphics settings for them to be shown.
24645
25486
  */
24646
25487
  show_clouds: boolean
24647
25488
  /**
@@ -24741,8 +25582,11 @@ interface LuaTechnology {
24741
25582
  /**
24742
25583
  * The number of research units required for this technology.
24743
25584
  *
25585
+ * **Note**
25586
+ *
25587
+ * This is multiplied by the current research cost multiplier, unless {@link LuaTechnologyPrototype#ignore_tech_cost_multiplier LuaTechnologyPrototype::ignore_tech_cost_multiplier} is `true`.
25588
+ *
24744
25589
  * {@link https://lua-api.factorio.com/latest/LuaTechnology.html#LuaTechnology.research_unit_count View documentation}
24745
- * @remarks This is multiplied by the current research cost multiplier, unless {@link LuaTechnologyPrototype#ignore_tech_cost_multiplier LuaTechnologyPrototype::ignore_tech_cost_multiplier} is `true`.
24746
25590
  */
24747
25591
  readonly research_unit_count: uint
24748
25592
  /**
@@ -24824,8 +25668,11 @@ interface LuaTechnologyPrototype {
24824
25668
  /**
24825
25669
  * If this technology ignores the technology cost multiplier setting.
24826
25670
  *
25671
+ * **Note**
25672
+ *
25673
+ * {@link LuaTechnologyPrototype#research_unit_count LuaTechnologyPrototype::research_unit_count} will already take this setting into account.
25674
+ *
24827
25675
  * {@link https://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.ignore_tech_cost_multiplier View documentation}
24828
- * @remarks {@link LuaTechnologyPrototype#research_unit_count LuaTechnologyPrototype::research_unit_count} will already take this setting into account.
24829
25676
  */
24830
25677
  readonly ignore_tech_cost_multiplier: boolean
24831
25678
  /**
@@ -24855,8 +25702,11 @@ interface LuaTechnologyPrototype {
24855
25702
  /**
24856
25703
  * The number of research units required for this technology.
24857
25704
  *
25705
+ * **Note**
25706
+ *
25707
+ * This is multiplied by the current research cost multiplier, unless {@link LuaTechnologyPrototype#ignore_tech_cost_multiplier LuaTechnologyPrototype::ignore_tech_cost_multiplier} is `true`.
25708
+ *
24858
25709
  * {@link https://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.research_unit_count View documentation}
24859
- * @remarks This is multiplied by the current research cost multiplier, unless {@link LuaTechnologyPrototype#ignore_tech_cost_multiplier LuaTechnologyPrototype::ignore_tech_cost_multiplier} is `true`.
24860
25710
  */
24861
25711
  readonly research_unit_count: uint
24862
25712
  /**
@@ -24925,8 +25775,9 @@ interface LuaTile {
24925
25775
  * Is this tile marked for deconstruction?
24926
25776
  *
24927
25777
  * {@link https://lua-api.factorio.com/latest/LuaTile.html#LuaTile.to_be_deconstructed View documentation}
25778
+ * @param force The force who did the deconstruction order.
24928
25779
  */
24929
- to_be_deconstructed(): boolean
25780
+ to_be_deconstructed(force?: ForceIdentification): boolean
24930
25781
  /**
24931
25782
  * Orders deconstruction of this tile by the given force.
24932
25783
  *
@@ -24952,6 +25803,20 @@ interface LuaTile {
24952
25803
  * @param player The player to set the last_user to if any.
24953
25804
  */
24954
25805
  cancel_deconstruction(force: ForceIdentification, player?: PlayerIdentification): void
25806
+ /**
25807
+ * Does this tile have any tile ghosts on it.
25808
+ *
25809
+ * {@link https://lua-api.factorio.com/latest/LuaTile.html#LuaTile.has_tile_ghost View documentation}
25810
+ * @param force Check for tile ghosts of this force.
25811
+ */
25812
+ has_tile_ghost(force?: ForceIdentification): boolean
25813
+ /**
25814
+ * Gets all tile ghosts on this tile.
25815
+ *
25816
+ * {@link https://lua-api.factorio.com/latest/LuaTile.html#LuaTile.get_tile_ghosts View documentation}
25817
+ * @param force Get tile ghosts of this force.
25818
+ */
25819
+ get_tile_ghosts(force?: ForceIdentification): LuaTile[]
24955
25820
  /**
24956
25821
  * Prototype name of this tile. E.g. `"sand-3"` or `"grass-2"`.
24957
25822
  *
@@ -25209,8 +26074,11 @@ interface LuaTrain {
25209
26074
  /**
25210
26075
  * Current speed.
25211
26076
  *
26077
+ * **Note**
26078
+ *
26079
+ * Changing the speed of the train is potentially an unsafe operation because train uses the speed for its internal calculations of break distances, etc.
26080
+ *
25212
26081
  * {@link https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.speed View documentation}
25213
- * @remarks Changing the speed of the train is potentially an unsafe operation because train uses the speed for its internal calculations of break distances, etc.
25214
26082
  */
25215
26083
  speed: double
25216
26084
  /**
@@ -25258,8 +26126,11 @@ interface LuaTrain {
25258
26126
  /**
25259
26127
  * The trains current schedule or `nil` if empty. Set to `nil` to clear.
25260
26128
  *
26129
+ * **Note**
26130
+ *
26131
+ * The schedule can't be changed by modifying the returned table. Instead, changes must be made by assigning a new table to this attribute.
26132
+ *
25261
26133
  * {@link https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.schedule View documentation}
25262
- * @remarks The schedule can't be changed by modifying the returned table. Instead, changes must be made by assigning a new table to this attribute.
25263
26134
  */
25264
26135
  schedule: TrainSchedule | undefined
25265
26136
  /**
@@ -25327,8 +26198,11 @@ interface LuaTrain {
25327
26198
  /**
25328
26199
  * The player passengers on the train
25329
26200
  *
26201
+ * **Note**
26202
+ *
26203
+ * This does *not* index using player index. See {@link LuaPlayer#index LuaPlayer::index} on each player instance for the player index.
26204
+ *
25330
26205
  * {@link https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.passengers View documentation}
25331
- * @remarks This does *not* index using player index. See {@link LuaPlayer#index LuaPlayer::index} on each player instance for the player index.
25332
26206
  */
25333
26207
  readonly passengers: LuaPlayer[]
25334
26208
  /**
@@ -25558,8 +26432,11 @@ interface LuaTransportLine extends ReadonlyArray<LuaItemStack> {
25558
26432
  /**
25559
26433
  * Returns whether the associated internal transport line of this line is the same as the others associated internal transport line.
25560
26434
  *
26435
+ * **Note**
26436
+ *
26437
+ * This can return true even when the {@link LuaTransportLine#owner LuaTransportLine::owner}s are different (so `this == other` is false), because the internal transport lines can span multiple tiles.
26438
+ *
25561
26439
  * {@link https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.line_equals View documentation}
25562
- * @remarks This can return true even when the {@link LuaTransportLine#owner LuaTransportLine::owner}s are different (so `this == other` is false), because the internal transport lines can span multiple tiles.
25563
26440
  */
25564
26441
  line_equals(other: LuaTransportLine): boolean
25565
26442
  /**
@@ -25665,8 +26542,11 @@ interface LuaUnitGroup {
25665
26542
  /**
25666
26543
  * Make a unit a member of this group. Has the same effect as giving a `group_command` with this group to the unit.
25667
26544
  *
26545
+ * **Note**
26546
+ *
26547
+ * The member must have the same force as the unit group.
26548
+ *
25668
26549
  * {@link https://lua-api.factorio.com/latest/LuaUnitGroup.html#LuaUnitGroup.add_member View documentation}
25669
- * @remarks The member must have the same force as the unit group.
25670
26550
  */
25671
26551
  add_member(unit: LuaEntity): void
25672
26552
  /**