typed-factorio 1.3.0 → 1.4.0

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
  /**
@@ -388,7 +403,6 @@ interface LuaBootstrap {
388
403
  * **Raised events:**
389
404
  * - {@link OnConsoleChatEvent on_console_chat} _instantly_ Raised with the provided arguments.
390
405
  *
391
- *
392
406
  * {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_console_chat View documentation}
393
407
  */
394
408
  raise_console_chat(params: {
@@ -405,7 +419,6 @@ interface LuaBootstrap {
405
419
  * **Raised events:**
406
420
  * - {@link OnPlayerCraftedItemEvent on_player_crafted_item} _instantly_ Raised with the provided arguments.
407
421
  *
408
- *
409
422
  * {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_player_crafted_item View documentation}
410
423
  */
411
424
  raise_player_crafted_item(params: {
@@ -426,7 +439,6 @@ interface LuaBootstrap {
426
439
  * **Raised events:**
427
440
  * - {@link OnPlayerFastTransferredEvent on_player_fast_transferred} _instantly_ Raised with the provided arguments.
428
441
  *
429
- *
430
442
  * {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_player_fast_transferred View documentation}
431
443
  */
432
444
  raise_player_fast_transferred(params: {
@@ -447,7 +459,6 @@ interface LuaBootstrap {
447
459
  * **Raised events:**
448
460
  * - {@link OnBiterBaseBuiltEvent on_biter_base_built} _instantly_ Raised with the provided arguments.
449
461
  *
450
- *
451
462
  * {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_biter_base_built View documentation}
452
463
  */
453
464
  raise_biter_base_built(params: {
@@ -460,7 +471,6 @@ interface LuaBootstrap {
460
471
  * **Raised events:**
461
472
  * - {@link OnMarketItemPurchasedEvent on_market_item_purchased} _instantly_ Raised with the provided arguments.
462
473
  *
463
- *
464
474
  * {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_market_item_purchased View documentation}
465
475
  */
466
476
  raise_market_item_purchased(params: {
@@ -485,7 +495,6 @@ interface LuaBootstrap {
485
495
  * **Raised events:**
486
496
  * - {@link ScriptRaisedBuiltEvent script_raised_built} _instantly_ Raised with the provided arguments.
487
497
  *
488
- *
489
498
  * {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_script_built View documentation}
490
499
  */
491
500
  raise_script_built(params: {
@@ -498,7 +507,6 @@ interface LuaBootstrap {
498
507
  * **Raised events:**
499
508
  * - {@link ScriptRaisedDestroyEvent script_raised_destroy} _instantly_ Raised with the provided arguments.
500
509
  *
501
- *
502
510
  * {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_script_destroy View documentation}
503
511
  */
504
512
  raise_script_destroy(params: {
@@ -511,7 +519,6 @@ interface LuaBootstrap {
511
519
  * **Raised events:**
512
520
  * - {@link ScriptRaisedReviveEvent script_raised_revive} _instantly_ Raised with the provided arguments.
513
521
  *
514
- *
515
522
  * {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_script_revive View documentation}
516
523
  */
517
524
  raise_script_revive(params: {
@@ -528,7 +535,6 @@ interface LuaBootstrap {
528
535
  * **Raised events:**
529
536
  * - {@link ScriptRaisedSetTilesEvent script_raised_set_tiles} _instantly_ Raised with the provided arguments.
530
537
  *
531
- *
532
538
  * {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_script_set_tiles View documentation}
533
539
  */
534
540
  raise_script_set_tiles(params: {
@@ -633,22 +639,31 @@ interface LuaBurner {
633
639
  /**
634
640
  * The amount of energy left in the currently-burning fuel item.
635
641
  *
642
+ * **Note**
643
+ *
644
+ * Writing to this will silently do nothing if there's no {@link LuaBurner#currently_burning LuaBurner::currently_burning} set.
645
+ *
636
646
  * {@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
647
  */
639
648
  remaining_burning_fuel: double
640
649
  /**
641
650
  * The currently burning item, or `nil` if no item is burning.
642
651
  *
652
+ * **Note**
653
+ *
654
+ * Writing to this automatically handles correcting {@link LuaBurner#remaining_burning_fuel LuaBurner::remaining_burning_fuel}.
655
+ *
643
656
  * {@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
657
  */
646
658
  currently_burning: LuaItemPrototype | undefined
647
659
  /**
648
660
  * The fuel categories this burner uses.
649
661
  *
662
+ * **Note**
663
+ *
664
+ * The value in the dictionary is meaningless and exists just to allow the dictionary type for easy lookup.
665
+ *
650
666
  * {@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
667
  */
653
668
  readonly fuel_categories: Record<string, boolean>
654
669
  /**
@@ -700,10 +715,11 @@ interface LuaBurnerPrototype {
700
715
  readonly color: ColorTable
701
716
  }
702
717
  /**
718
+ * **Note**
703
719
  *
720
+ * The value in the dictionary is meaningless and exists just to allow the dictionary type for easy lookup.
704
721
  *
705
722
  * {@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
723
  */
708
724
  readonly fuel_categories: Record<string, boolean>
709
725
  /**
@@ -854,11 +870,14 @@ interface LuaCommandProcessor {
854
870
  /**
855
871
  * Add a custom console command.
856
872
  *
873
+ * **Note**
874
+ *
875
+ * 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.
876
+ *
857
877
  * {@link https://lua-api.factorio.com/latest/LuaCommandProcessor.html#LuaCommandProcessor.add_command View documentation}
858
878
  * @param name The desired name of the command (case sensitive).
859
879
  * @param help The localised help message. It will be shown to players using the `/help` command.
860
880
  * @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
881
  * @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
882
  *
864
883
  * ```
@@ -887,7 +906,7 @@ interface LuaCommandProcessor {
887
906
  */
888
907
  readonly commands: Record<string, LocalisedString>
889
908
  /**
890
- * Lists the built-in commands of the core game. The {@link https://wiki.factorio.com/Console wiki} has an overview of these.
909
+ * Lists the built-in commands of the core game. The {@linkplain https://wiki.factorio.com/Console wiki} has an overview of these.
891
910
  *
892
911
  * {@link https://lua-api.factorio.com/latest/LuaCommandProcessor.html#LuaCommandProcessor.game_commands View documentation}
893
912
  */
@@ -920,8 +939,11 @@ interface LuaConstantCombinatorControlBehavior extends LuaControlBehavior {
920
939
  /**
921
940
  * 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
941
  *
942
+ * **Note**
943
+ *
944
+ * Writing `nil` clears the combinator's parameters.
945
+ *
923
946
  * {@link https://lua-api.factorio.com/latest/LuaConstantCombinatorControlBehavior.html#LuaConstantCombinatorControlBehavior.parameters View documentation}
924
- * @remarks Writing `nil` clears the combinator's parameters.
925
947
  */
926
948
  parameters: ConstantCombinatorParameters[] | undefined
927
949
  /**
@@ -1047,9 +1069,12 @@ interface LuaControl {
1047
1069
  /**
1048
1070
  * 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
1071
  *
1072
+ * **Note**
1073
+ *
1074
+ * 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.
1075
+ *
1050
1076
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.get_inventory View documentation}
1051
1077
  * @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
1078
  */
1054
1079
  get_inventory(inventory: defines.inventory): LuaInventory | undefined
1055
1080
  /**
@@ -1128,21 +1153,23 @@ interface LuaControl {
1128
1153
  * **Raised events:**
1129
1154
  * - {@link OnPlayerChangedPositionEvent on_player_changed_position}? _instantly_ Raised if the teleported entity is a player character.
1130
1155
  *
1156
+ * **Notes**
1157
+ * - 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.
1158
+ * - 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
1159
  *
1132
1160
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.teleport View documentation}
1133
1161
  * @param position Where to teleport to.
1134
1162
  * @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
1163
  * @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
1164
  */
1138
1165
  teleport(position: MapPosition, surface?: SurfaceIdentification): boolean
1166
+ teleport(x: number, y?: number): boolean
1139
1167
  /**
1140
1168
  * Select an entity, as if by hovering the mouse above it.
1141
1169
  *
1142
1170
  * **Raised events:**
1143
1171
  * - {@link OnSelectedEntityChangedEvent on_selected_entity_changed}? _instantly_ Raised if there is an entity at the given position to select.
1144
1172
  *
1145
- *
1146
1173
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.update_selected_entity View documentation}
1147
1174
  * @param position Position of the entity to select.
1148
1175
  */
@@ -1153,7 +1180,6 @@ interface LuaControl {
1153
1180
  * **Raised events:**
1154
1181
  * - {@link OnSelectedEntityChangedEvent on_selected_entity_changed}? _instantly_ Raised if there is a currently selected entity.
1155
1182
  *
1156
- *
1157
1183
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.clear_selected_entity View documentation}
1158
1184
  */
1159
1185
  clear_selected_entity(): void
@@ -1190,7 +1216,6 @@ interface LuaControl {
1190
1216
  * - {@link OnPrePlayerCraftedItemEvent on_pre_player_crafted_item}? _instantly_ Raised if crafting was able to be started.
1191
1217
  * - {@link OnPlayerMainInventoryChangedEvent on_player_main_inventory_changed}? _current_tick_ Raised if crafting was able to be started.
1192
1218
  *
1193
- *
1194
1219
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.begin_crafting View documentation}
1195
1220
  * @returns The count that was actually started crafting.
1196
1221
  */
@@ -1215,7 +1240,6 @@ interface LuaControl {
1215
1240
  * - {@link OnPlayerCancelledCraftingEvent on_player_cancelled_crafting}? _instantly_ Raised if crafting was able to be cancelled.
1216
1241
  * - {@link OnPlayerMainInventoryChangedEvent on_player_main_inventory_changed}? _current_tick_ Raised if crafting was able to be cancelled.
1217
1242
  *
1218
- *
1219
1243
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.cancel_crafting View documentation}
1220
1244
  */
1221
1245
  cancel_crafting(params: {
@@ -1236,7 +1260,6 @@ interface LuaControl {
1236
1260
  * - {@link OnPlayerMinedEntityEvent on_player_mined_entity}? _instantly_ Raised if mining is successful.
1237
1261
  * - {@link OnPlayerMinedItemEvent on_player_mined_item}? _instantly_ Raised if mining is successful.
1238
1262
  *
1239
- *
1240
1263
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.mine_entity View documentation}
1241
1264
  * @param entity The entity to mine
1242
1265
  * @param force Forces mining the entity even if the items can't fit in the player.
@@ -1250,7 +1273,6 @@ interface LuaControl {
1250
1273
  * - {@link OnPlayerMinedItemEvent on_player_mined_item}? _instantly_ Raised if mining is successful.
1251
1274
  * - {@link OnPlayerMinedTileEvent on_player_mined_tile}? _instantly_ Raised if mining is successful.
1252
1275
  *
1253
- *
1254
1276
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.mine_tile View documentation}
1255
1277
  * @param tile The tile to mine.
1256
1278
  * @returns Whether the mining succeeded.
@@ -1275,12 +1297,14 @@ interface LuaControl {
1275
1297
  * **Raised events:**
1276
1298
  * - {@link OnEntityLogisticSlotChangedEvent on_entity_logistic_slot_changed}? _instantly_ Raised if setting of logistic slot was successful.
1277
1299
  *
1300
+ * **Note**
1301
+ *
1302
+ * This will silently fail if personal logistics are not researched yet.
1278
1303
  *
1279
1304
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.set_personal_logistic_slot View documentation}
1280
1305
  * @param slot_index The slot to set.
1281
1306
  * @param value The logistic request parameters.
1282
1307
  * @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
1308
  */
1285
1309
  set_personal_logistic_slot(slot_index: uint, value: LogisticParameters): boolean
1286
1310
  /**
@@ -1289,7 +1313,6 @@ interface LuaControl {
1289
1313
  * **Raised events:**
1290
1314
  * - {@link OnEntityLogisticSlotChangedEvent on_entity_logistic_slot_changed}? _instantly_ Raised if setting of logistic slot was successful.
1291
1315
  *
1292
- *
1293
1316
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.set_vehicle_logistic_slot View documentation}
1294
1317
  * @param slot_index The slot to set.
1295
1318
  * @param value The logistic request parameters.
@@ -1316,20 +1339,24 @@ interface LuaControl {
1316
1339
  * **Raised events:**
1317
1340
  * - {@link OnEntityLogisticSlotChangedEvent on_entity_logistic_slot_changed}? _instantly_ Raised if clearing of logistic slot was successful.
1318
1341
  *
1342
+ * **Note**
1343
+ *
1344
+ * This will silently fail if personal logistics are not researched yet.
1319
1345
  *
1320
1346
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.clear_personal_logistic_slot View documentation}
1321
1347
  * @param slot_index The slot to clear.
1322
- * @remarks This will silently fail if personal logistics are not researched yet.
1323
1348
  */
1324
1349
  clear_personal_logistic_slot(slot_index: uint): void
1325
1350
  /**
1326
1351
  * **Raised events:**
1327
1352
  * - {@link OnEntityLogisticSlotChangedEvent on_entity_logistic_slot_changed}? _instantly_ Raised if clearing of logistic slot was successful.
1328
1353
  *
1354
+ * **Note**
1355
+ *
1356
+ * This will silently fail if the vehicle does not use logistics.
1329
1357
  *
1330
1358
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.clear_vehicle_logistic_slot View documentation}
1331
1359
  * @param slot_index The slot to clear.
1332
- * @remarks This will silently fail if the vehicle does not use logistics.
1333
1360
  */
1334
1361
  clear_vehicle_logistic_slot(slot_index: uint): void
1335
1362
  /**
@@ -1384,7 +1411,6 @@ interface LuaControl {
1384
1411
  * **Raised events:**
1385
1412
  * - {@link OnSelectedEntityChangedEvent on_selected_entity_changed}? _instantly_ Raised when a selectable entity is written to this attribute.
1386
1413
  *
1387
- *
1388
1414
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.selected View documentation}
1389
1415
  */
1390
1416
  selected: LuaEntity | undefined
@@ -1396,9 +1422,11 @@ interface LuaControl {
1396
1422
  * **Raised events:**
1397
1423
  * - {@link OnGuiOpenedEvent on_gui_opened}? _instantly_ Raised when writing a valid GUI target to this attribute.
1398
1424
  *
1425
+ * **Note**
1426
+ *
1427
+ * Write supports any of the types. Read will return the `entity`, `equipment`, `equipment-grid`, `player`, `element` or `nil`.
1399
1428
  *
1400
1429
  * {@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
1430
  */
1403
1431
  set opened(
1404
1432
  value:
@@ -1453,8 +1481,11 @@ interface LuaControl {
1453
1481
  /**
1454
1482
  * Current mining state.
1455
1483
  *
1484
+ * **Note**
1485
+ *
1486
+ * 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}.
1487
+ *
1456
1488
  * {@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
1489
  */
1459
1490
  get mining_state(): {
1460
1491
  /**
@@ -1546,8 +1577,11 @@ interface LuaControl {
1546
1577
  /**
1547
1578
  * The ghost prototype in the player's cursor.
1548
1579
  *
1580
+ * **Notes**
1581
+ * - When read, it will be a {@link LuaItemPrototype}.
1582
+ * - Items in the cursor stack will take priority over the cursor ghost.
1583
+ *
1549
1584
  * {@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
1585
  */
1552
1586
  get cursor_ghost(): LuaItemPrototype
1553
1587
  set cursor_ghost(value: ItemPrototypeIdentification)
@@ -1557,7 +1591,6 @@ interface LuaControl {
1557
1591
  * **Raised events:**
1558
1592
  * - {@link OnPlayerDrivingChangedStateEvent on_player_driving_changed_state}? _instantly_ Raised if the driving state successfully changed.
1559
1593
  *
1560
- *
1561
1594
  * {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.driving View documentation}
1562
1595
  */
1563
1596
  driving: boolean
@@ -1570,8 +1603,11 @@ interface LuaControl {
1570
1603
  /**
1571
1604
  * The current combat robots following the character
1572
1605
  *
1606
+ * **Note**
1607
+ *
1608
+ * When called on a {@link LuaPlayer}, it must be associated with a character(see {@link LuaPlayer#character LuaPlayer::character}).
1609
+ *
1573
1610
  * {@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
1611
  */
1576
1612
  readonly following_robots: LuaEntity[]
1577
1613
  /**
@@ -1581,101 +1617,117 @@ interface LuaControl {
1581
1617
  */
1582
1618
  cheat_mode: boolean
1583
1619
  /**
1620
+ * **Note**
1584
1621
  *
1622
+ * When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1585
1623
  *
1586
1624
  * {@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
1625
  */
1589
1626
  character_crafting_speed_modifier: double
1590
1627
  /**
1628
+ * **Note**
1591
1629
  *
1630
+ * When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1592
1631
  *
1593
1632
  * {@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
1633
  */
1596
1634
  character_mining_speed_modifier: double
1597
1635
  /**
1636
+ * **Note**
1598
1637
  *
1638
+ * When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1599
1639
  *
1600
1640
  * {@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
1641
  */
1603
1642
  character_additional_mining_categories: string[]
1604
1643
  /**
1605
1644
  * 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
1645
  *
1646
+ * **Note**
1647
+ *
1648
+ * When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1649
+ *
1607
1650
  * {@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
1651
  */
1610
1652
  character_running_speed_modifier: double
1611
1653
  /**
1654
+ * **Note**
1612
1655
  *
1656
+ * When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1613
1657
  *
1614
1658
  * {@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
1659
  */
1617
1660
  character_build_distance_bonus: uint
1618
1661
  /**
1662
+ * **Note**
1619
1663
  *
1664
+ * When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1620
1665
  *
1621
1666
  * {@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
1667
  */
1624
1668
  character_item_drop_distance_bonus: uint
1625
1669
  /**
1670
+ * **Note**
1626
1671
  *
1672
+ * When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1627
1673
  *
1628
1674
  * {@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
1675
  */
1631
1676
  character_reach_distance_bonus: uint
1632
1677
  /**
1678
+ * **Note**
1633
1679
  *
1680
+ * When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1634
1681
  *
1635
1682
  * {@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
1683
  */
1638
1684
  character_resource_reach_distance_bonus: uint
1639
1685
  /**
1686
+ * **Note**
1640
1687
  *
1688
+ * When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1641
1689
  *
1642
1690
  * {@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
1691
  */
1645
1692
  character_item_pickup_distance_bonus: uint
1646
1693
  /**
1694
+ * **Note**
1647
1695
  *
1696
+ * When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1648
1697
  *
1649
1698
  * {@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
1699
  */
1652
1700
  character_loot_pickup_distance_bonus: uint
1653
1701
  /**
1702
+ * **Note**
1654
1703
  *
1704
+ * When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1655
1705
  *
1656
1706
  * {@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
1707
  */
1659
1708
  character_inventory_slots_bonus: uint
1660
1709
  /**
1710
+ * **Note**
1661
1711
  *
1712
+ * When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1662
1713
  *
1663
1714
  * {@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
1715
  */
1666
1716
  character_trash_slot_count_bonus: uint
1667
1717
  /**
1718
+ * **Note**
1668
1719
  *
1720
+ * When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1669
1721
  *
1670
1722
  * {@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
1723
  */
1673
1724
  character_maximum_following_robot_count_bonus: uint
1674
1725
  /**
1726
+ * **Note**
1675
1727
  *
1728
+ * When called on a {@link LuaPlayer}, it must be associated with a character (see {@link LuaPlayer#character LuaPlayer::character}).
1676
1729
  *
1677
1730
  * {@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
1731
  */
1680
1732
  character_health_bonus: float
1681
1733
  /**
@@ -1755,9 +1807,12 @@ interface LuaControl {
1755
1807
  /**
1756
1808
  * 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
1809
  *
1810
+ * **Note**
1811
+ *
1812
+ * An control reference becomes invalid once the control behavior is removed or the entity (see {@link LuaEntity}) it resides in is destroyed.
1813
+ *
1758
1814
  * {@link https://lua-api.factorio.com/latest/LuaControlBehavior.html View documentation}
1759
1815
  * @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
1816
  */
1762
1817
  interface LuaControlBehavior {
1763
1818
  /**
@@ -2065,10 +2120,14 @@ interface LuaDeciderCombinatorControlBehavior extends LuaCombinatorControlBehavi
2065
2120
  /**
2066
2121
  * This decider combinator's parameters.
2067
2122
  *
2123
+ * **Note**
2124
+ *
2125
+ * Writing `nil` clears the combinator's parameters.
2126
+ *
2068
2127
  * {@link https://lua-api.factorio.com/latest/LuaDeciderCombinatorControlBehavior.html#LuaDeciderCombinatorControlBehavior.parameters View documentation}
2069
- * @remarks Writing `nil` clears the combinator's parameters.
2070
2128
  */
2071
- parameters: DeciderCombinatorParameters
2129
+ get parameters(): DeciderCombinatorParametersRead
2130
+ set parameters(value: DeciderCombinatorParameters)
2072
2131
  /**
2073
2132
  * Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
2074
2133
  */
@@ -2229,10 +2288,12 @@ interface LuaEntity extends LuaControl {
2229
2288
  * **Raised events:**
2230
2289
  * - {@link ScriptRaisedDestroyEvent script_raised_destroy}? _instantly_ Raised if the `raise_destroy` flag was set and the entity was successfully destroyed.
2231
2290
  *
2291
+ * **Note**
2292
+ *
2293
+ * Not all entities can be destroyed - things such as rails under trains cannot be destroyed until the train is moved or destroyed.
2232
2294
  *
2233
2295
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.destroy View documentation}
2234
2296
  * @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
2297
  */
2237
2298
  destroy(params?: {
2238
2299
  /**
@@ -2277,7 +2338,6 @@ interface LuaEntity extends LuaControl {
2277
2338
  * - {@link OnEntityDiedEvent on_entity_died}? _instantly_ Raised if the entity was successfully killed. If `force` is not specified, the event will blame the `"neutral"` force.
2278
2339
  * - {@link OnPostEntityDiedEvent on_post_entity_died}? _instantly_ Raised if the entity was successfully killed.
2279
2340
  *
2280
- *
2281
2341
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.die View documentation}
2282
2342
  * @param force The force to attribute the kill to.
2283
2343
  * @param cause The cause to attribute the kill to.
@@ -2292,10 +2352,13 @@ interface LuaEntity extends LuaControl {
2292
2352
  /**
2293
2353
  * Test whether this entity's prototype has a certain flag set.
2294
2354
  *
2355
+ * **Note**
2356
+ *
2357
+ * `entity.has_flag(f)` is a shortcut for `entity.prototype.has_flag(f)`.
2358
+ *
2295
2359
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.has_flag View documentation}
2296
2360
  * @param flag The flag to test. See {@link EntityPrototypeFlags} for a list of flags.
2297
2361
  * @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
2362
  */
2300
2363
  has_flag(flag: keyof EntityPrototypeFlags): boolean
2301
2364
  /**
@@ -2331,10 +2394,13 @@ interface LuaEntity extends LuaControl {
2331
2394
  *
2332
2395
  * _Can only be used if this is Market_
2333
2396
  *
2397
+ * **Note**
2398
+ *
2399
+ * The other offers are moved down to fill the gap created by removing the offer, which decrements the overall size of the offer array.
2400
+ *
2334
2401
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.remove_market_item View documentation}
2335
2402
  * @param offer Index of offer to remove.
2336
2403
  * @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
2404
  */
2339
2405
  remove_market_item(offer: uint): boolean
2340
2406
  /**
@@ -2382,7 +2448,6 @@ interface LuaEntity extends LuaControl {
2382
2448
  * **Raised events:**
2383
2449
  * - {@link OnMarkedForDeconstructionEvent on_marked_for_deconstruction}? _instantly_ Raised if the entity way successfully marked for deconstruction.
2384
2450
  *
2385
- *
2386
2451
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.order_deconstruction View documentation}
2387
2452
  * @param force The force whose robots are supposed to do the deconstruction.
2388
2453
  * @param player The player to set the `last_user` to if any.
@@ -2395,7 +2460,6 @@ interface LuaEntity extends LuaControl {
2395
2460
  * **Raised events:**
2396
2461
  * - {@link OnCancelledDeconstructionEvent on_cancelled_deconstruction}? _instantly_ Raised if the entity's deconstruction was successfully cancelled.
2397
2462
  *
2398
- *
2399
2463
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.cancel_deconstruction View documentation}
2400
2464
  * @param force The force who did the deconstruction order.
2401
2465
  * @param player The player to set the `last_user` to if any.
@@ -2413,7 +2477,6 @@ interface LuaEntity extends LuaControl {
2413
2477
  * **Raised events:**
2414
2478
  * - {@link OnMarkedForUpgradeEvent on_marked_for_upgrade}? _instantly_ Raised if the entity way successfully marked for upgrade.
2415
2479
  *
2416
- *
2417
2480
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.order_upgrade View documentation}
2418
2481
  * @returns Whether the entity was marked for upgrade.
2419
2482
  */
@@ -2438,7 +2501,6 @@ interface LuaEntity extends LuaControl {
2438
2501
  * **Raised events:**
2439
2502
  * - {@link OnCancelledUpgradeEvent on_cancelled_upgrade}? _instantly_ Raised if the entity way previously marked for upgrade.
2440
2503
  *
2441
- *
2442
2504
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.cancel_upgrade View documentation}
2443
2505
  * @param force The force who did the upgrade order.
2444
2506
  * @param player The player to set the last_user to if any.
@@ -2454,28 +2516,37 @@ interface LuaEntity extends LuaControl {
2454
2516
  /**
2455
2517
  * Get a logistic requester slot.
2456
2518
  *
2519
+ * **Note**
2520
+ *
2521
+ * Useable only on entities that have requester slots.
2522
+ *
2457
2523
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_request_slot View documentation}
2458
2524
  * @param slot The slot index.
2459
2525
  * @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
2526
  */
2462
2527
  get_request_slot(slot: uint): SimpleItemStack | undefined
2463
2528
  /**
2464
2529
  * Set a logistic requester slot.
2465
2530
  *
2531
+ * **Note**
2532
+ *
2533
+ * Useable only on entities that have requester slots.
2534
+ *
2466
2535
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_request_slot View documentation}
2467
2536
  * @param request What to request.
2468
2537
  * @param slot The slot index.
2469
2538
  * @returns Whether the slot was set.
2470
- * @remarks Useable only on entities that have requester slots.
2471
2539
  */
2472
2540
  set_request_slot(request: ItemStackIdentification, slot: uint): boolean
2473
2541
  /**
2474
2542
  * Clear a logistic requester slot.
2475
2543
  *
2544
+ * **Note**
2545
+ *
2546
+ * Useable only on entities that have requester slots.
2547
+ *
2476
2548
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.clear_request_slot View documentation}
2477
2549
  * @param slot The slot index.
2478
- * @remarks Useable only on entities that have requester slots.
2479
2550
  */
2480
2551
  clear_request_slot(slot: uint): void
2481
2552
  /**
@@ -2563,7 +2634,6 @@ interface LuaEntity extends LuaControl {
2563
2634
  * - {@link ScriptRaisedReviveEvent script_raised_revive}? _instantly_ Raised if this was an entity ghost and the `raise_revive` flag was set and the entity was successfully revived.
2564
2635
  * - {@link ScriptRaisedSetTilesEvent script_raised_set_tiles}? _instantly_ Raised if this was a tile ghost and the `raise_revive` flag was set and the tile was successfully revived.
2565
2636
  *
2566
- *
2567
2637
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.revive View documentation}
2568
2638
  * @returns Any items the new real entity collided with or `nil` if the ghost could not be revived.
2569
2639
  * @returns The revived entity if an entity ghost was successfully revived.
@@ -2586,7 +2656,6 @@ interface LuaEntity extends LuaControl {
2586
2656
  * - {@link ScriptRaisedReviveEvent script_raised_revive}? _instantly_ Raised if this was an entity ghost and the `raise_revive` flag was set and the entity was successfully revived.
2587
2657
  * - {@link ScriptRaisedSetTilesEvent script_raised_set_tiles}? _instantly_ Raised if this was a tile ghost and the `raise_revive` flag was set and the tile was successfully revived.
2588
2658
  *
2589
- *
2590
2659
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.silent_revive View documentation}
2591
2660
  * @returns Any items the new real entity collided with or `nil` if the ghost could not be revived.
2592
2661
  * @returns The revived entity if an entity ghost was successfully revived.
@@ -2625,11 +2694,14 @@ interface LuaEntity extends LuaControl {
2625
2694
  *
2626
2695
  * _Can only be used if this is Rail_
2627
2696
  *
2697
+ * **Note**
2698
+ *
2699
+ * A rail segment is a continuous section of rail with no branches, signals, nor train stops.
2700
+ *
2628
2701
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_rail_segment_entity View documentation}
2629
2702
  * @param direction The direction of travel relative to this rail.
2630
2703
  * @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
2704
  * @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
2705
  */
2634
2706
  get_rail_segment_entity(direction: defines.rail_direction, in_else_out: boolean): LuaEntity | undefined
2635
2707
  /**
@@ -2637,10 +2709,13 @@ interface LuaEntity extends LuaControl {
2637
2709
  *
2638
2710
  * _Can only be used if this is Rail_
2639
2711
  *
2712
+ * **Note**
2713
+ *
2714
+ * A rail segment is a continuous section of rail with no branches, signals, nor train stops.
2715
+ *
2640
2716
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_rail_segment_end View documentation}
2641
2717
  * @returns The rail entity.
2642
2718
  * @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
2719
  */
2645
2720
  get_rail_segment_end(direction: defines.rail_direction): LuaMultiReturn<[LuaEntity, defines.rail_direction]>
2646
2721
  /**
@@ -2648,8 +2723,11 @@ interface LuaEntity extends LuaControl {
2648
2723
  *
2649
2724
  * _Can only be used if this is Rail_
2650
2725
  *
2726
+ * **Note**
2727
+ *
2728
+ * A rail segment is a continuous section of rail with no branches, signals, nor train stops.
2729
+ *
2651
2730
  * {@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
2731
  */
2654
2732
  get_rail_segment_length(): double
2655
2733
  /**
@@ -2657,26 +2735,35 @@ interface LuaEntity extends LuaControl {
2657
2735
  *
2658
2736
  * _Can only be used if this is Rail_
2659
2737
  *
2738
+ * **Note**
2739
+ *
2740
+ * A rail segment is a continuous section of rail with no branches, signals, nor train stops.
2741
+ *
2660
2742
  * {@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
2743
  */
2663
2744
  get_rail_segment_overlaps(): LuaEntity[]
2664
2745
  /**
2665
2746
  * Get the filter for a slot in an inserter, loader, or logistic storage container.
2666
2747
  *
2748
+ * **Note**
2749
+ *
2750
+ * The entity must allow filters.
2751
+ *
2667
2752
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_filter View documentation}
2668
2753
  * @param slot_index Index of the slot to get the filter for.
2669
2754
  * @returns Prototype name of the item being filtered. `nil` if the given slot has no filter.
2670
- * @remarks The entity must allow filters.
2671
2755
  */
2672
2756
  get_filter(slot_index: uint): string | undefined
2673
2757
  /**
2674
2758
  * Set the filter for a slot in an inserter, loader, or logistic storage container.
2675
2759
  *
2760
+ * **Note**
2761
+ *
2762
+ * The entity must allow filters.
2763
+ *
2676
2764
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_filter View documentation}
2677
2765
  * @param slot_index Index of the slot to set the filter for.
2678
2766
  * @param item Prototype name of the item to filter.
2679
- * @remarks The entity must allow filters.
2680
2767
  */
2681
2768
  set_filter(slot_index: uint, item: string): void
2682
2769
  /**
@@ -2792,9 +2879,12 @@ interface LuaEntity extends LuaControl {
2792
2879
  /**
2793
2880
  * Gets all the `LuaLogisticPoint`s that this entity owns. Optionally returns only the point specified by the index parameter.
2794
2881
  *
2882
+ * **Note**
2883
+ *
2884
+ * 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.
2885
+ *
2795
2886
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_logistic_point View documentation}
2796
2887
  * @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
2888
  */
2799
2889
  get_logistic_point(index?: defines.logistic_member_index): LuaLogisticPoint | LuaLogisticPoint[] | undefined
2800
2890
  /**
@@ -2850,7 +2940,6 @@ interface LuaEntity extends LuaControl {
2850
2940
  * **Raised events:**
2851
2941
  * - {@link OnPlayerRotatedEntityEvent on_player_rotated_entity}? _instantly_ Raised if the `by_player` argument was given and the rotation was successful.
2852
2942
  *
2853
- *
2854
2943
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.rotate View documentation}
2855
2944
  * @returns Whether the rotation was successful.
2856
2945
  * @returns Count of spilled items indexed by their prototype names if `spill_items` was `true`.
@@ -2894,9 +2983,12 @@ interface LuaEntity extends LuaControl {
2894
2983
  *
2895
2984
  * _Can only be used if this is Vehicle_
2896
2985
  *
2986
+ * **Note**
2987
+ *
2988
+ * This differs over {@link LuaEntity#set_passenger LuaEntity::set_passenger} in that the passenger can't drive the vehicle.
2989
+ *
2897
2990
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_driver View documentation}
2898
2991
  * @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
2992
  */
2901
2993
  set_driver(driver: LuaEntity | PlayerIdentification | undefined): void
2902
2994
  /**
@@ -2904,9 +2996,12 @@ interface LuaEntity extends LuaControl {
2904
2996
  *
2905
2997
  * _Can only be used if this is Vehicle_
2906
2998
  *
2999
+ * **Note**
3000
+ *
3001
+ * This differs over {@link LuaEntity#get_driver LuaEntity::get_driver} in that the passenger can't drive the car.
3002
+ *
2907
3003
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_passenger View documentation}
2908
3004
  * @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
3005
  */
2911
3006
  get_passenger(): LuaEntity | LuaPlayer | undefined
2912
3007
  /**
@@ -2917,8 +3012,11 @@ interface LuaEntity extends LuaControl {
2917
3012
  *
2918
3013
  * _Can only be used if this is Vehicle_
2919
3014
  *
3015
+ * **Note**
3016
+ *
3017
+ * This differs over {@link LuaEntity#get_driver LuaEntity::get_driver} in that the passenger can't drive the car.
3018
+ *
2920
3019
  * {@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
3020
  */
2923
3021
  set_passenger(passenger: LuaEntity | PlayerIdentification): void
2924
3022
  /**
@@ -2949,7 +3047,6 @@ interface LuaEntity extends LuaControl {
2949
3047
  * **Raised events:**
2950
3048
  * - {@link OnEntityClonedEvent on_entity_cloned}? _instantly_ Raised if the entity was successfully cloned.
2951
3049
  *
2952
- *
2953
3050
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.clone View documentation}
2954
3051
  * @returns The cloned entity or `nil` if this entity can't be cloned/can't be cloned to the given location.
2955
3052
  */
@@ -2971,25 +3068,34 @@ interface LuaEntity extends LuaControl {
2971
3068
  /**
2972
3069
  * Get the amount of all or some fluid in this entity.
2973
3070
  *
3071
+ * **Note**
3072
+ *
3073
+ * If information about fluid temperatures is required, {@link LuaEntity#fluidbox LuaEntity::fluidbox} should be used instead.
3074
+ *
2974
3075
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_fluid_count View documentation}
2975
3076
  * @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
3077
  */
2978
3078
  get_fluid_count(fluid?: string): double
2979
3079
  /**
2980
3080
  * Get amounts of all fluids in this entity.
2981
3081
  *
3082
+ * **Note**
3083
+ *
3084
+ * If information about fluid temperatures is required, {@link LuaEntity#fluidbox LuaEntity::fluidbox} should be used instead.
3085
+ *
2982
3086
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_fluid_contents View documentation}
2983
3087
  * @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
3088
  */
2986
3089
  get_fluid_contents(): Record<string, double>
2987
3090
  /**
2988
3091
  * Remove fluid from this entity.
2989
3092
  *
3093
+ * **Note**
3094
+ *
3095
+ * If temperature is given only fluid matching that exact temperature is removed. If minimum and maximum is given fluid within that range is removed.
3096
+ *
2990
3097
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.remove_fluid View documentation}
2991
3098
  * @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
3099
  */
2994
3100
  remove_fluid(params: {
2995
3101
  /**
@@ -3080,8 +3186,11 @@ interface LuaEntity extends LuaControl {
3080
3186
  /**
3081
3187
  * Toggle this entity's equipment movement bonus. Does nothing if the entity does not have an equipment grid.
3082
3188
  *
3189
+ * **Note**
3190
+ *
3191
+ * This property can also be read and written on the equipment grid of this entity.
3192
+ *
3083
3193
  * {@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
3194
  */
3086
3195
  toggle_equipment_movement_bonus(): void
3087
3196
  /**
@@ -3134,10 +3243,12 @@ interface LuaEntity extends LuaControl {
3134
3243
  * **Raised events:**
3135
3244
  * - {@link ScriptRaisedDestroyEvent script_raised_destroy}? _instantly_ Raised if the `raise_destroyed` flag was set and the entity was successfully mined.
3136
3245
  *
3246
+ * **Notes**
3247
+ * - 'Standard' operation is to keep calling `LuaEntity.mine` with an inventory until all items are transferred and the items dealt with.
3248
+ * - 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
3249
  *
3138
3250
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.mine View documentation}
3139
3251
  * @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
3252
  */
3142
3253
  mine(params?: {
3143
3254
  /**
@@ -3220,9 +3331,12 @@ interface LuaEntity extends LuaControl {
3220
3331
  *
3221
3332
  * _Can only be used if this is LinkedBelt_
3222
3333
  *
3334
+ * **Note**
3335
+ *
3336
+ * Can also be used on entity ghost if it contains linked-belt
3337
+ *
3223
3338
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.connect_linked_belts View documentation}
3224
3339
  * @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
3340
  */
3227
3341
  connect_linked_belts(neighbour: LuaEntity | undefined): void
3228
3342
  /**
@@ -3230,8 +3344,11 @@ interface LuaEntity extends LuaControl {
3230
3344
  *
3231
3345
  * _Can only be used if this is LinkedBelt_
3232
3346
  *
3347
+ * **Note**
3348
+ *
3349
+ * Can also be used on entity ghost if it contains linked-belt
3350
+ *
3233
3351
  * {@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
3352
  */
3236
3353
  disconnect_linked_belts(): void
3237
3354
  /**
@@ -3294,29 +3411,40 @@ interface LuaEntity extends LuaControl {
3294
3411
  /**
3295
3412
  * Deactivating an entity will stop all its operations (car will stop moving, inserters will stop working, fish will stop moving etc).
3296
3413
  *
3414
+ * **Notes**
3415
+ * - Entities that are not active naturally can't be set to be active (setting it to be active will do nothing)
3416
+ * - Ghosts, simple smoke, and corpses can't be modified at this time.
3417
+ * - It is even possible to set the character to not be active, so he can't move and perform most of the tasks.
3418
+ *
3297
3419
  * {@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
3420
  */
3300
3421
  active: boolean
3301
3422
  /**
3302
3423
  * If set to `false`, this entity can't be damaged and won't be attacked automatically. It can however still be mined.
3303
3424
  *
3425
+ * **Note**
3426
+ *
3427
+ * Entities that are indestructible naturally (they have no health, like smoke, resource etc) can't be set to be destructible.
3428
+ *
3304
3429
  * {@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
3430
  */
3307
3431
  destructible: boolean
3308
3432
  /**
3309
- *
3433
+ * **Notes**
3434
+ * - Not minable entities can still be destroyed.
3435
+ * - Entities that are not minable naturally (like smoke, character, enemy units etc) can't be set to minable.
3310
3436
  *
3311
3437
  * {@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
3438
  */
3314
3439
  minable: boolean
3315
3440
  /**
3316
3441
  * When entity is not to be rotatable (inserter, transport belt etc), it can't be rotated by player using the R key.
3317
3442
  *
3443
+ * **Note**
3444
+ *
3445
+ * Entities that are not rotatable naturally (like chest or furnace) can't be set to be rotatable.
3446
+ *
3318
3447
  * {@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
3448
  */
3321
3449
  rotatable: boolean
3322
3450
  /**
@@ -3328,8 +3456,11 @@ interface LuaEntity extends LuaControl {
3328
3456
  /**
3329
3457
  * 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
3458
  *
3459
+ * **Note**
3460
+ *
3461
+ * To get the maximum possible health of this entity, see {@link LuaEntityPrototype#max_health LuaEntityPrototype::max_health} on its prototype.
3462
+ *
3331
3463
  * {@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
3464
  */
3334
3465
  health: float | undefined
3335
3466
  /**
@@ -3359,8 +3490,11 @@ interface LuaEntity extends LuaControl {
3359
3490
  /**
3360
3491
  * 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
3492
  *
3493
+ * **Note**
3494
+ *
3495
+ * Writing does nothing if the vehicle doesn't have a turret.
3496
+ *
3362
3497
  * {@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
3498
  */
3365
3499
  relative_turret_orientation: RealOrientation | undefined
3366
3500
  /**
@@ -3384,8 +3518,11 @@ interface LuaEntity extends LuaControl {
3384
3518
  *
3385
3519
  * _Can only be used if this is ResourceEntity_
3386
3520
  *
3521
+ * **Note**
3522
+ *
3523
+ * If this is not an infinite resource reading will give `nil` and writing will give an error.
3524
+ *
3387
3525
  * {@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
3526
  */
3390
3527
  initial_amount: uint | undefined
3391
3528
  /**
@@ -3468,8 +3605,11 @@ interface LuaEntity extends LuaControl {
3468
3605
  /**
3469
3606
  * Position where the entity puts its stuff.
3470
3607
  *
3608
+ * **Note**
3609
+ *
3610
+ * 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.
3611
+ *
3471
3612
  * {@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
3613
  */
3474
3614
  get drop_position(): MapPositionTable
3475
3615
  set drop_position(value: MapPosition)
@@ -3478,16 +3618,22 @@ interface LuaEntity extends LuaControl {
3478
3618
  *
3479
3619
  * _Can only be used if this is Inserter_
3480
3620
  *
3621
+ * **Note**
3622
+ *
3623
+ * Inserters must have `allow_custom_vectors` set to true on their prototype to allow changing the pickup position.
3624
+ *
3481
3625
  * {@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
3626
  */
3484
3627
  get pickup_position(): MapPositionTable
3485
3628
  set pickup_position(value: MapPosition)
3486
3629
  /**
3487
3630
  * 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
3631
  *
3632
+ * **Note**
3633
+ *
3634
+ * Meaningful only for entities that put items somewhere, such as mining drills or inserters. Returns `nil` for any other entity.
3635
+ *
3489
3636
  * {@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
3637
  */
3492
3638
  drop_target: LuaEntity | undefined
3493
3639
  /**
@@ -3583,15 +3729,21 @@ interface LuaEntity extends LuaControl {
3583
3729
  /**
3584
3730
  * 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
3731
  *
3732
+ * **Note**
3733
+ *
3734
+ * 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.
3735
+ *
3586
3736
  * {@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
3737
  */
3589
3738
  backer_name: string | undefined
3590
3739
  /**
3591
3740
  * The label of this entity if it has one or `nil`. Changing the value will trigger on_entity_renamed event
3592
3741
  *
3742
+ * **Note**
3743
+ *
3744
+ * only usable on entities that have labels (currently only spider-vehicles).
3745
+ *
3593
3746
  * {@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
3747
  */
3596
3748
  entity_label: string | undefined
3597
3749
  /**
@@ -3606,8 +3758,11 @@ interface LuaEntity extends LuaControl {
3606
3758
  /**
3607
3759
  * 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
3760
  *
3761
+ * **Note**
3762
+ *
3763
+ * Car color is overridden by the color of the current driver/passenger, if there is one.
3764
+ *
3609
3765
  * {@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
3766
  */
3612
3767
  get color(): ColorTable | undefined
3613
3768
  set color(value: Color | undefined)
@@ -3670,8 +3825,11 @@ interface LuaEntity extends LuaControl {
3670
3825
  /**
3671
3826
  * The productivity bonus of this entity.
3672
3827
  *
3828
+ * **Note**
3829
+ *
3830
+ * This includes force based bonuses as well as beacon/module bonuses.
3831
+ *
3673
3832
  * {@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
3833
  */
3676
3834
  readonly productivity_bonus: double
3677
3835
  /**
@@ -3683,8 +3841,11 @@ interface LuaEntity extends LuaControl {
3683
3841
  /**
3684
3842
  * The speed bonus of this entity.
3685
3843
  *
3844
+ * **Note**
3845
+ *
3846
+ * This includes force based bonuses as well as beacon/module bonuses.
3847
+ *
3686
3848
  * {@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
3849
  */
3689
3850
  readonly speed_bonus: double
3690
3851
  /**
@@ -3781,8 +3942,11 @@ interface LuaEntity extends LuaControl {
3781
3942
  /**
3782
3943
  * The buffer size for the electric energy source or nil if the entity doesn't have an electric energy source.
3783
3944
  *
3945
+ * **Note**
3946
+ *
3947
+ * Write access is limited to the ElectricEnergyInterface type
3948
+ *
3784
3949
  * {@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
3950
  */
3787
3951
  electric_buffer_size: double | undefined
3788
3952
  /**
@@ -3810,13 +3974,13 @@ interface LuaEntity extends LuaControl {
3810
3974
  */
3811
3975
  readonly electric_emissions: double | undefined
3812
3976
  /**
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.
3977
+ * 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
3978
  *
3815
3979
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.unit_number View documentation}
3816
3980
  */
3817
3981
  readonly unit_number: UnitNumber | undefined
3818
3982
  /**
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`.
3983
+ * 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
3984
  *
3821
3985
  * _Can only be used if this is EntityGhost_
3822
3986
  *
@@ -4025,8 +4189,11 @@ interface LuaEntity extends LuaControl {
4025
4189
  /**
4026
4190
  * Sets the stack size limit on this inserter. If the stack size is > than the force stack size limit the value is ignored.
4027
4191
  *
4192
+ * **Note**
4193
+ *
4194
+ * Set to 0 to reset.
4195
+ *
4028
4196
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.inserter_stack_size_override View documentation}
4029
- * @remarks Set to 0 to reset.
4030
4197
  */
4031
4198
  inserter_stack_size_override: uint
4032
4199
  /**
@@ -4082,8 +4249,11 @@ interface LuaEntity extends LuaControl {
4082
4249
  *
4083
4250
  * _Can only be used if this is CharacterCorpse_
4084
4251
  *
4252
+ * **Note**
4253
+ *
4254
+ * The index is not guaranteed to be valid so it should always be checked first if a player with that index actually exists.
4255
+ *
4085
4256
  * {@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
4257
  */
4088
4258
  character_corpse_player_index: uint
4089
4259
  /**
@@ -4111,8 +4281,11 @@ interface LuaEntity extends LuaControl {
4111
4281
  *
4112
4282
  * _Can only be used if this is Character_
4113
4283
  *
4284
+ * **Note**
4285
+ *
4286
+ * A character associated with a player is not directly controlled by any player.
4287
+ *
4114
4288
  * {@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
4289
  */
4117
4290
  get associated_player(): LuaPlayer | LuaPlayer | undefined
4118
4291
  set associated_player(value: LuaPlayer | PlayerIdentification | undefined)
@@ -4270,8 +4443,11 @@ interface LuaEntity extends LuaControl {
4270
4443
  /**
4271
4444
  * 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
4445
  *
4446
+ * **Note**
4447
+ *
4448
+ * Reading will always give an array of {@link LuaForce}
4449
+ *
4273
4450
  * {@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
4451
  */
4276
4452
  get render_to_forces(): LuaForce[] | undefined
4277
4453
  set render_to_forces(value: ForceIdentification[] | undefined)
@@ -4330,22 +4506,31 @@ interface LuaEntity extends LuaControl {
4330
4506
  /**
4331
4507
  * Whether this requester chest is set to also request from buffer chests.
4332
4508
  *
4509
+ * **Note**
4510
+ *
4511
+ * Useable only on entities that have requester slots.
4512
+ *
4333
4513
  * {@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
4514
  */
4336
4515
  request_from_buffers: boolean
4337
4516
  /**
4338
4517
  * Whether this corpse will ever fade away.
4339
4518
  *
4519
+ * **Note**
4520
+ *
4521
+ * Useable only on corpses.
4522
+ *
4340
4523
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.corpse_expires View documentation}
4341
- * @remarks Useable only on corpses.
4342
4524
  */
4343
4525
  corpse_expires: boolean
4344
4526
  /**
4345
4527
  * 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
4528
  *
4529
+ * **Note**
4530
+ *
4531
+ * Useable only on corpses.
4532
+ *
4347
4533
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.corpse_immune_to_entity_placement View documentation}
4348
- * @remarks Useable only on corpses.
4349
4534
  */
4350
4535
  corpse_immune_to_entity_placement: boolean
4351
4536
  /**
@@ -4400,8 +4585,11 @@ interface LuaEntity extends LuaControl {
4400
4585
  *
4401
4586
  * _Can only be used if this is TrainStop_
4402
4587
  *
4588
+ * **Notes**
4589
+ * - Train may be included multiple times when braking distance covers this train stop multiple times
4590
+ * - Value may be read even when train stop has no control behavior
4591
+ *
4403
4592
  * {@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
4593
  */
4406
4594
  readonly trains_count: uint | undefined
4407
4595
  /**
@@ -4409,8 +4597,11 @@ interface LuaEntity extends LuaControl {
4409
4597
  *
4410
4598
  * _Can only be used if this is TrainStop_
4411
4599
  *
4600
+ * **Note**
4601
+ *
4602
+ * When a train stop has a control behavior with wire connected and set_trains_limit enabled, this value will be overwritten by it
4603
+ *
4412
4604
  * {@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
4605
  */
4415
4606
  trains_limit: uint
4416
4607
  /**
@@ -4470,8 +4661,11 @@ interface LuaEntity extends LuaControl {
4470
4661
  *
4471
4662
  * _Can only be used if this is LinkedBelt_
4472
4663
  *
4664
+ * **Notes**
4665
+ * - Can only be changed when linked belt is disconnected (has no neighbour set)
4666
+ * - Can also be used on entity ghost if it contains linked-belt
4667
+ *
4473
4668
  * {@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
4669
  */
4476
4670
  linked_belt_type: "input" | "output"
4477
4671
  /**
@@ -4479,8 +4673,11 @@ interface LuaEntity extends LuaControl {
4479
4673
  *
4480
4674
  * _Can only be used if this is LinkedBelt_
4481
4675
  *
4676
+ * **Notes**
4677
+ * - Can also be used on entity ghost if it contains linked-belt
4678
+ * - May return entity ghost which contains linked belt to which connection is made
4679
+ *
4482
4680
  * {@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
4681
  */
4485
4682
  readonly linked_belt_neighbour: LuaEntity | undefined
4486
4683
  /**
@@ -4547,10 +4744,12 @@ interface BaseEntity extends LuaControl {
4547
4744
  * **Raised events:**
4548
4745
  * - {@link ScriptRaisedDestroyEvent script_raised_destroy}? _instantly_ Raised if the `raise_destroy` flag was set and the entity was successfully destroyed.
4549
4746
  *
4747
+ * **Note**
4748
+ *
4749
+ * Not all entities can be destroyed - things such as rails under trains cannot be destroyed until the train is moved or destroyed.
4550
4750
  *
4551
4751
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.destroy View documentation}
4552
4752
  * @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
4753
  */
4555
4754
  destroy(params?: {
4556
4755
  /**
@@ -4571,7 +4770,6 @@ interface BaseEntity extends LuaControl {
4571
4770
  * - {@link OnEntityDiedEvent on_entity_died}? _instantly_ Raised if the entity was successfully killed. If `force` is not specified, the event will blame the `"neutral"` force.
4572
4771
  * - {@link OnPostEntityDiedEvent on_post_entity_died}? _instantly_ Raised if the entity was successfully killed.
4573
4772
  *
4574
- *
4575
4773
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.die View documentation}
4576
4774
  * @param force The force to attribute the kill to.
4577
4775
  * @param cause The cause to attribute the kill to.
@@ -4586,10 +4784,13 @@ interface BaseEntity extends LuaControl {
4586
4784
  /**
4587
4785
  * Test whether this entity's prototype has a certain flag set.
4588
4786
  *
4787
+ * **Note**
4788
+ *
4789
+ * `entity.has_flag(f)` is a shortcut for `entity.prototype.has_flag(f)`.
4790
+ *
4589
4791
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.has_flag View documentation}
4590
4792
  * @param flag The flag to test. See {@link EntityPrototypeFlags} for a list of flags.
4591
4793
  * @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
4794
  */
4594
4795
  has_flag(flag: keyof EntityPrototypeFlags): boolean
4595
4796
  /**
@@ -4621,7 +4822,6 @@ interface BaseEntity extends LuaControl {
4621
4822
  * **Raised events:**
4622
4823
  * - {@link OnMarkedForDeconstructionEvent on_marked_for_deconstruction}? _instantly_ Raised if the entity way successfully marked for deconstruction.
4623
4824
  *
4624
- *
4625
4825
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.order_deconstruction View documentation}
4626
4826
  * @param force The force whose robots are supposed to do the deconstruction.
4627
4827
  * @param player The player to set the `last_user` to if any.
@@ -4634,7 +4834,6 @@ interface BaseEntity extends LuaControl {
4634
4834
  * **Raised events:**
4635
4835
  * - {@link OnCancelledDeconstructionEvent on_cancelled_deconstruction}? _instantly_ Raised if the entity's deconstruction was successfully cancelled.
4636
4836
  *
4637
- *
4638
4837
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.cancel_deconstruction View documentation}
4639
4838
  * @param force The force who did the deconstruction order.
4640
4839
  * @param player The player to set the `last_user` to if any.
@@ -4652,7 +4851,6 @@ interface BaseEntity extends LuaControl {
4652
4851
  * **Raised events:**
4653
4852
  * - {@link OnMarkedForUpgradeEvent on_marked_for_upgrade}? _instantly_ Raised if the entity way successfully marked for upgrade.
4654
4853
  *
4655
- *
4656
4854
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.order_upgrade View documentation}
4657
4855
  * @returns Whether the entity was marked for upgrade.
4658
4856
  */
@@ -4677,7 +4875,6 @@ interface BaseEntity extends LuaControl {
4677
4875
  * **Raised events:**
4678
4876
  * - {@link OnCancelledUpgradeEvent on_cancelled_upgrade}? _instantly_ Raised if the entity way previously marked for upgrade.
4679
4877
  *
4680
- *
4681
4878
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.cancel_upgrade View documentation}
4682
4879
  * @param force The force who did the upgrade order.
4683
4880
  * @param player The player to set the last_user to if any.
@@ -4693,28 +4890,37 @@ interface BaseEntity extends LuaControl {
4693
4890
  /**
4694
4891
  * Get a logistic requester slot.
4695
4892
  *
4893
+ * **Note**
4894
+ *
4895
+ * Useable only on entities that have requester slots.
4896
+ *
4696
4897
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_request_slot View documentation}
4697
4898
  * @param slot The slot index.
4698
4899
  * @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
4900
  */
4701
4901
  get_request_slot(slot: uint): SimpleItemStack | undefined
4702
4902
  /**
4703
4903
  * Set a logistic requester slot.
4704
4904
  *
4905
+ * **Note**
4906
+ *
4907
+ * Useable only on entities that have requester slots.
4908
+ *
4705
4909
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_request_slot View documentation}
4706
4910
  * @param request What to request.
4707
4911
  * @param slot The slot index.
4708
4912
  * @returns Whether the slot was set.
4709
- * @remarks Useable only on entities that have requester slots.
4710
4913
  */
4711
4914
  set_request_slot(request: ItemStackIdentification, slot: uint): boolean
4712
4915
  /**
4713
4916
  * Clear a logistic requester slot.
4714
4917
  *
4918
+ * **Note**
4919
+ *
4920
+ * Useable only on entities that have requester slots.
4921
+ *
4715
4922
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.clear_request_slot View documentation}
4716
4923
  * @param slot The slot index.
4717
- * @remarks Useable only on entities that have requester slots.
4718
4924
  */
4719
4925
  clear_request_slot(slot: uint): void
4720
4926
  /**
@@ -4724,7 +4930,6 @@ interface BaseEntity extends LuaControl {
4724
4930
  * - {@link ScriptRaisedReviveEvent script_raised_revive}? _instantly_ Raised if this was an entity ghost and the `raise_revive` flag was set and the entity was successfully revived.
4725
4931
  * - {@link ScriptRaisedSetTilesEvent script_raised_set_tiles}? _instantly_ Raised if this was a tile ghost and the `raise_revive` flag was set and the tile was successfully revived.
4726
4932
  *
4727
- *
4728
4933
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.revive View documentation}
4729
4934
  * @returns Any items the new real entity collided with or `nil` if the ghost could not be revived.
4730
4935
  * @returns The revived entity if an entity ghost was successfully revived.
@@ -4747,7 +4952,6 @@ interface BaseEntity extends LuaControl {
4747
4952
  * - {@link ScriptRaisedReviveEvent script_raised_revive}? _instantly_ Raised if this was an entity ghost and the `raise_revive` flag was set and the entity was successfully revived.
4748
4953
  * - {@link ScriptRaisedSetTilesEvent script_raised_set_tiles}? _instantly_ Raised if this was a tile ghost and the `raise_revive` flag was set and the tile was successfully revived.
4749
4954
  *
4750
- *
4751
4955
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.silent_revive View documentation}
4752
4956
  * @returns Any items the new real entity collided with or `nil` if the ghost could not be revived.
4753
4957
  * @returns The revived entity if an entity ghost was successfully revived.
@@ -4766,19 +4970,25 @@ interface BaseEntity extends LuaControl {
4766
4970
  /**
4767
4971
  * Get the filter for a slot in an inserter, loader, or logistic storage container.
4768
4972
  *
4973
+ * **Note**
4974
+ *
4975
+ * The entity must allow filters.
4976
+ *
4769
4977
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_filter View documentation}
4770
4978
  * @param slot_index Index of the slot to get the filter for.
4771
4979
  * @returns Prototype name of the item being filtered. `nil` if the given slot has no filter.
4772
- * @remarks The entity must allow filters.
4773
4980
  */
4774
4981
  get_filter(slot_index: uint): string | undefined
4775
4982
  /**
4776
4983
  * Set the filter for a slot in an inserter, loader, or logistic storage container.
4777
4984
  *
4985
+ * **Note**
4986
+ *
4987
+ * The entity must allow filters.
4988
+ *
4778
4989
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_filter View documentation}
4779
4990
  * @param slot_index Index of the slot to set the filter for.
4780
4991
  * @param item Prototype name of the item to filter.
4781
- * @remarks The entity must allow filters.
4782
4992
  */
4783
4993
  set_filter(slot_index: uint, item: string): void
4784
4994
  /**
@@ -4841,9 +5051,12 @@ interface BaseEntity extends LuaControl {
4841
5051
  /**
4842
5052
  * Gets all the `LuaLogisticPoint`s that this entity owns. Optionally returns only the point specified by the index parameter.
4843
5053
  *
5054
+ * **Note**
5055
+ *
5056
+ * 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.
5057
+ *
4844
5058
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_logistic_point View documentation}
4845
5059
  * @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
5060
  */
4848
5061
  get_logistic_point(index?: defines.logistic_member_index): LuaLogisticPoint | LuaLogisticPoint[] | undefined
4849
5062
  /**
@@ -4872,7 +5085,6 @@ interface BaseEntity extends LuaControl {
4872
5085
  * **Raised events:**
4873
5086
  * - {@link OnPlayerRotatedEntityEvent on_player_rotated_entity}? _instantly_ Raised if the `by_player` argument was given and the rotation was successful.
4874
5087
  *
4875
- *
4876
5088
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.rotate View documentation}
4877
5089
  * @returns Whether the rotation was successful.
4878
5090
  * @returns Count of spilled items indexed by their prototype names if `spill_items` was `true`.
@@ -4911,7 +5123,6 @@ interface BaseEntity extends LuaControl {
4911
5123
  * **Raised events:**
4912
5124
  * - {@link OnEntityClonedEvent on_entity_cloned}? _instantly_ Raised if the entity was successfully cloned.
4913
5125
  *
4914
- *
4915
5126
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.clone View documentation}
4916
5127
  * @returns The cloned entity or `nil` if this entity can't be cloned/can't be cloned to the given location.
4917
5128
  */
@@ -4933,25 +5144,34 @@ interface BaseEntity extends LuaControl {
4933
5144
  /**
4934
5145
  * Get the amount of all or some fluid in this entity.
4935
5146
  *
5147
+ * **Note**
5148
+ *
5149
+ * If information about fluid temperatures is required, {@link LuaEntity#fluidbox LuaEntity::fluidbox} should be used instead.
5150
+ *
4936
5151
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_fluid_count View documentation}
4937
5152
  * @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
5153
  */
4940
5154
  get_fluid_count(fluid?: string): double
4941
5155
  /**
4942
5156
  * Get amounts of all fluids in this entity.
4943
5157
  *
5158
+ * **Note**
5159
+ *
5160
+ * If information about fluid temperatures is required, {@link LuaEntity#fluidbox LuaEntity::fluidbox} should be used instead.
5161
+ *
4944
5162
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_fluid_contents View documentation}
4945
5163
  * @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
5164
  */
4948
5165
  get_fluid_contents(): Record<string, double>
4949
5166
  /**
4950
5167
  * Remove fluid from this entity.
4951
5168
  *
5169
+ * **Note**
5170
+ *
5171
+ * If temperature is given only fluid matching that exact temperature is removed. If minimum and maximum is given fluid within that range is removed.
5172
+ *
4952
5173
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.remove_fluid View documentation}
4953
5174
  * @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
5175
  */
4956
5176
  remove_fluid(params: {
4957
5177
  /**
@@ -5002,8 +5222,11 @@ interface BaseEntity extends LuaControl {
5002
5222
  /**
5003
5223
  * Toggle this entity's equipment movement bonus. Does nothing if the entity does not have an equipment grid.
5004
5224
  *
5225
+ * **Note**
5226
+ *
5227
+ * This property can also be read and written on the equipment grid of this entity.
5228
+ *
5005
5229
  * {@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
5230
  */
5008
5231
  toggle_equipment_movement_bonus(): void
5009
5232
  /**
@@ -5045,10 +5268,12 @@ interface BaseEntity extends LuaControl {
5045
5268
  * **Raised events:**
5046
5269
  * - {@link ScriptRaisedDestroyEvent script_raised_destroy}? _instantly_ Raised if the `raise_destroyed` flag was set and the entity was successfully mined.
5047
5270
  *
5271
+ * **Notes**
5272
+ * - 'Standard' operation is to keep calling `LuaEntity.mine` with an inventory until all items are transferred and the items dealt with.
5273
+ * - 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
5274
  *
5049
5275
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.mine View documentation}
5050
5276
  * @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
5277
  */
5053
5278
  mine(params?: {
5054
5279
  /**
@@ -5137,29 +5362,40 @@ interface BaseEntity extends LuaControl {
5137
5362
  /**
5138
5363
  * Deactivating an entity will stop all its operations (car will stop moving, inserters will stop working, fish will stop moving etc).
5139
5364
  *
5365
+ * **Notes**
5366
+ * - Entities that are not active naturally can't be set to be active (setting it to be active will do nothing)
5367
+ * - Ghosts, simple smoke, and corpses can't be modified at this time.
5368
+ * - It is even possible to set the character to not be active, so he can't move and perform most of the tasks.
5369
+ *
5140
5370
  * {@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
5371
  */
5143
5372
  active: boolean
5144
5373
  /**
5145
5374
  * If set to `false`, this entity can't be damaged and won't be attacked automatically. It can however still be mined.
5146
5375
  *
5376
+ * **Note**
5377
+ *
5378
+ * Entities that are indestructible naturally (they have no health, like smoke, resource etc) can't be set to be destructible.
5379
+ *
5147
5380
  * {@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
5381
  */
5150
5382
  destructible: boolean
5151
5383
  /**
5152
- *
5384
+ * **Notes**
5385
+ * - Not minable entities can still be destroyed.
5386
+ * - Entities that are not minable naturally (like smoke, character, enemy units etc) can't be set to minable.
5153
5387
  *
5154
5388
  * {@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
5389
  */
5157
5390
  minable: boolean
5158
5391
  /**
5159
5392
  * When entity is not to be rotatable (inserter, transport belt etc), it can't be rotated by player using the R key.
5160
5393
  *
5394
+ * **Note**
5395
+ *
5396
+ * Entities that are not rotatable naturally (like chest or furnace) can't be set to be rotatable.
5397
+ *
5161
5398
  * {@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
5399
  */
5164
5400
  rotatable: boolean
5165
5401
  /**
@@ -5171,8 +5407,11 @@ interface BaseEntity extends LuaControl {
5171
5407
  /**
5172
5408
  * 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
5409
  *
5410
+ * **Note**
5411
+ *
5412
+ * To get the maximum possible health of this entity, see {@link LuaEntityPrototype#max_health LuaEntityPrototype::max_health} on its prototype.
5413
+ *
5174
5414
  * {@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
5415
  */
5177
5416
  health: float | undefined
5178
5417
  /**
@@ -5202,8 +5441,11 @@ interface BaseEntity extends LuaControl {
5202
5441
  /**
5203
5442
  * 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
5443
  *
5444
+ * **Note**
5445
+ *
5446
+ * Writing does nothing if the vehicle doesn't have a turret.
5447
+ *
5205
5448
  * {@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
5449
  */
5208
5450
  relative_turret_orientation: RealOrientation | undefined
5209
5451
  /**
@@ -5227,16 +5469,22 @@ interface BaseEntity extends LuaControl {
5227
5469
  /**
5228
5470
  * Position where the entity puts its stuff.
5229
5471
  *
5472
+ * **Note**
5473
+ *
5474
+ * 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.
5475
+ *
5230
5476
  * {@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
5477
  */
5233
5478
  get drop_position(): MapPositionTable
5234
5479
  set drop_position(value: MapPosition)
5235
5480
  /**
5236
5481
  * 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
5482
  *
5483
+ * **Note**
5484
+ *
5485
+ * Meaningful only for entities that put items somewhere, such as mining drills or inserters. Returns `nil` for any other entity.
5486
+ *
5238
5487
  * {@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
5488
  */
5241
5489
  drop_target: LuaEntity | undefined
5242
5490
  /**
@@ -5284,15 +5532,21 @@ interface BaseEntity extends LuaControl {
5284
5532
  /**
5285
5533
  * 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
5534
  *
5535
+ * **Note**
5536
+ *
5537
+ * 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.
5538
+ *
5287
5539
  * {@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
5540
  */
5290
5541
  backer_name: string | undefined
5291
5542
  /**
5292
5543
  * The label of this entity if it has one or `nil`. Changing the value will trigger on_entity_renamed event
5293
5544
  *
5545
+ * **Note**
5546
+ *
5547
+ * only usable on entities that have labels (currently only spider-vehicles).
5548
+ *
5294
5549
  * {@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
5550
  */
5297
5551
  entity_label: string | undefined
5298
5552
  /**
@@ -5307,16 +5561,22 @@ interface BaseEntity extends LuaControl {
5307
5561
  /**
5308
5562
  * 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
5563
  *
5564
+ * **Note**
5565
+ *
5566
+ * Car color is overridden by the color of the current driver/passenger, if there is one.
5567
+ *
5310
5568
  * {@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
5569
  */
5313
5570
  get color(): ColorTable | undefined
5314
5571
  set color(value: Color | undefined)
5315
5572
  /**
5316
5573
  * The productivity bonus of this entity.
5317
5574
  *
5575
+ * **Note**
5576
+ *
5577
+ * This includes force based bonuses as well as beacon/module bonuses.
5578
+ *
5318
5579
  * {@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
5580
  */
5321
5581
  readonly productivity_bonus: double
5322
5582
  /**
@@ -5328,8 +5588,11 @@ interface BaseEntity extends LuaControl {
5328
5588
  /**
5329
5589
  * The speed bonus of this entity.
5330
5590
  *
5591
+ * **Note**
5592
+ *
5593
+ * This includes force based bonuses as well as beacon/module bonuses.
5594
+ *
5331
5595
  * {@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
5596
  */
5334
5597
  readonly speed_bonus: double
5335
5598
  /**
@@ -5359,8 +5622,11 @@ interface BaseEntity extends LuaControl {
5359
5622
  /**
5360
5623
  * The buffer size for the electric energy source or nil if the entity doesn't have an electric energy source.
5361
5624
  *
5625
+ * **Note**
5626
+ *
5627
+ * Write access is limited to the ElectricEnergyInterface type
5628
+ *
5362
5629
  * {@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
5630
  */
5365
5631
  electric_buffer_size: double | undefined
5366
5632
  /**
@@ -5388,7 +5654,7 @@ interface BaseEntity extends LuaControl {
5388
5654
  */
5389
5655
  readonly electric_emissions: double | undefined
5390
5656
  /**
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.
5657
+ * 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
5658
  *
5393
5659
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.unit_number View documentation}
5394
5660
  */
@@ -5543,8 +5809,11 @@ interface BaseEntity extends LuaControl {
5543
5809
  /**
5544
5810
  * Sets the stack size limit on this inserter. If the stack size is > than the force stack size limit the value is ignored.
5545
5811
  *
5812
+ * **Note**
5813
+ *
5814
+ * Set to 0 to reset.
5815
+ *
5546
5816
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.inserter_stack_size_override View documentation}
5547
- * @remarks Set to 0 to reset.
5548
5817
  */
5549
5818
  inserter_stack_size_override: uint
5550
5819
  /**
@@ -5589,8 +5858,11 @@ interface BaseEntity extends LuaControl {
5589
5858
  /**
5590
5859
  * 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
5860
  *
5861
+ * **Note**
5862
+ *
5863
+ * Reading will always give an array of {@link LuaForce}
5864
+ *
5592
5865
  * {@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
5866
  */
5595
5867
  get render_to_forces(): LuaForce[] | undefined
5596
5868
  set render_to_forces(value: ForceIdentification[] | undefined)
@@ -5609,22 +5881,31 @@ interface BaseEntity extends LuaControl {
5609
5881
  /**
5610
5882
  * Whether this requester chest is set to also request from buffer chests.
5611
5883
  *
5884
+ * **Note**
5885
+ *
5886
+ * Useable only on entities that have requester slots.
5887
+ *
5612
5888
  * {@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
5889
  */
5615
5890
  request_from_buffers: boolean
5616
5891
  /**
5617
5892
  * Whether this corpse will ever fade away.
5618
5893
  *
5894
+ * **Note**
5895
+ *
5896
+ * Useable only on corpses.
5897
+ *
5619
5898
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.corpse_expires View documentation}
5620
- * @remarks Useable only on corpses.
5621
5899
  */
5622
5900
  corpse_expires: boolean
5623
5901
  /**
5624
5902
  * 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
5903
  *
5904
+ * **Note**
5905
+ *
5906
+ * Useable only on corpses.
5907
+ *
5626
5908
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.corpse_immune_to_entity_placement View documentation}
5627
- * @remarks Useable only on corpses.
5628
5909
  */
5629
5910
  corpse_immune_to_entity_placement: boolean
5630
5911
  /**
@@ -5806,7 +6087,7 @@ interface EntityGhostEntity extends BaseEntity {
5806
6087
  */
5807
6088
  ghost_has_flag(flag: keyof EntityPrototypeFlags): boolean
5808
6089
  /**
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`.
6090
+ * 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
6091
  *
5811
6092
  * _Can only be used if this is EntityGhost_
5812
6093
  *
@@ -5842,10 +6123,13 @@ interface MarketEntity extends BaseEntity {
5842
6123
  *
5843
6124
  * _Can only be used if this is Market_
5844
6125
  *
6126
+ * **Note**
6127
+ *
6128
+ * The other offers are moved down to fill the gap created by removing the offer, which decrements the overall size of the offer array.
6129
+ *
5845
6130
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.remove_market_item View documentation}
5846
6131
  * @param offer Index of offer to remove.
5847
6132
  * @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
6133
  */
5850
6134
  remove_market_item(offer: uint): boolean
5851
6135
  /**
@@ -6051,11 +6335,14 @@ interface RailEntity extends BaseEntity {
6051
6335
  *
6052
6336
  * _Can only be used if this is Rail_
6053
6337
  *
6338
+ * **Note**
6339
+ *
6340
+ * A rail segment is a continuous section of rail with no branches, signals, nor train stops.
6341
+ *
6054
6342
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_rail_segment_entity View documentation}
6055
6343
  * @param direction The direction of travel relative to this rail.
6056
6344
  * @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
6345
  * @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
6346
  */
6060
6347
  get_rail_segment_entity(direction: defines.rail_direction, in_else_out: boolean): LuaEntity | undefined
6061
6348
  /**
@@ -6063,10 +6350,13 @@ interface RailEntity extends BaseEntity {
6063
6350
  *
6064
6351
  * _Can only be used if this is Rail_
6065
6352
  *
6353
+ * **Note**
6354
+ *
6355
+ * A rail segment is a continuous section of rail with no branches, signals, nor train stops.
6356
+ *
6066
6357
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_rail_segment_end View documentation}
6067
6358
  * @returns The rail entity.
6068
6359
  * @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
6360
  */
6071
6361
  get_rail_segment_end(direction: defines.rail_direction): LuaMultiReturn<[LuaEntity, defines.rail_direction]>
6072
6362
  /**
@@ -6074,8 +6364,11 @@ interface RailEntity extends BaseEntity {
6074
6364
  *
6075
6365
  * _Can only be used if this is Rail_
6076
6366
  *
6367
+ * **Note**
6368
+ *
6369
+ * A rail segment is a continuous section of rail with no branches, signals, nor train stops.
6370
+ *
6077
6371
  * {@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
6372
  */
6080
6373
  get_rail_segment_length(): double
6081
6374
  /**
@@ -6083,8 +6376,11 @@ interface RailEntity extends BaseEntity {
6083
6376
  *
6084
6377
  * _Can only be used if this is Rail_
6085
6378
  *
6379
+ * **Note**
6380
+ *
6381
+ * A rail segment is a continuous section of rail with no branches, signals, nor train stops.
6382
+ *
6086
6383
  * {@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
6384
  */
6089
6385
  get_rail_segment_overlaps(): LuaEntity[]
6090
6386
  /**
@@ -6308,9 +6604,12 @@ interface VehicleEntity extends BaseEntity {
6308
6604
  *
6309
6605
  * _Can only be used if this is Vehicle_
6310
6606
  *
6607
+ * **Note**
6608
+ *
6609
+ * This differs over {@link LuaEntity#set_passenger LuaEntity::set_passenger} in that the passenger can't drive the vehicle.
6610
+ *
6311
6611
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_driver View documentation}
6312
6612
  * @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
6613
  */
6315
6614
  set_driver(driver: LuaEntity | PlayerIdentification | undefined): void
6316
6615
  /**
@@ -6318,9 +6617,12 @@ interface VehicleEntity extends BaseEntity {
6318
6617
  *
6319
6618
  * _Can only be used if this is Vehicle_
6320
6619
  *
6620
+ * **Note**
6621
+ *
6622
+ * This differs over {@link LuaEntity#get_driver LuaEntity::get_driver} in that the passenger can't drive the car.
6623
+ *
6321
6624
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_passenger View documentation}
6322
6625
  * @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
6626
  */
6325
6627
  get_passenger(): LuaEntity | LuaPlayer | undefined
6326
6628
  /**
@@ -6331,8 +6633,11 @@ interface VehicleEntity extends BaseEntity {
6331
6633
  *
6332
6634
  * _Can only be used if this is Vehicle_
6333
6635
  *
6636
+ * **Note**
6637
+ *
6638
+ * This differs over {@link LuaEntity#get_driver LuaEntity::get_driver} in that the passenger can't drive the car.
6639
+ *
6334
6640
  * {@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
6641
  */
6337
6642
  set_passenger(passenger: LuaEntity | PlayerIdentification): void
6338
6643
  /**
@@ -6386,8 +6691,11 @@ interface TrainStopEntity extends BaseEntity {
6386
6691
  *
6387
6692
  * _Can only be used if this is TrainStop_
6388
6693
  *
6694
+ * **Notes**
6695
+ * - Train may be included multiple times when braking distance covers this train stop multiple times
6696
+ * - Value may be read even when train stop has no control behavior
6697
+ *
6389
6698
  * {@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
6699
  */
6392
6700
  readonly trains_count: uint | undefined
6393
6701
  /**
@@ -6395,8 +6703,11 @@ interface TrainStopEntity extends BaseEntity {
6395
6703
  *
6396
6704
  * _Can only be used if this is TrainStop_
6397
6705
  *
6706
+ * **Note**
6707
+ *
6708
+ * When a train stop has a control behavior with wire connected and set_trains_limit enabled, this value will be overwritten by it
6709
+ *
6398
6710
  * {@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
6711
  */
6401
6712
  trains_limit: uint
6402
6713
  }
@@ -6467,8 +6778,11 @@ interface ResourceEntity extends BaseEntity {
6467
6778
  *
6468
6779
  * _Can only be used if this is ResourceEntity_
6469
6780
  *
6781
+ * **Note**
6782
+ *
6783
+ * If this is not an infinite resource reading will give `nil` and writing will give an error.
6784
+ *
6470
6785
  * {@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
6786
  */
6473
6787
  initial_amount: uint | undefined
6474
6788
  }
@@ -6556,9 +6870,12 @@ interface LinkedBeltEntity extends BaseEntity {
6556
6870
  *
6557
6871
  * _Can only be used if this is LinkedBelt_
6558
6872
  *
6873
+ * **Note**
6874
+ *
6875
+ * Can also be used on entity ghost if it contains linked-belt
6876
+ *
6559
6877
  * {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.connect_linked_belts View documentation}
6560
6878
  * @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
6879
  */
6563
6880
  connect_linked_belts(neighbour: LuaEntity | undefined): void
6564
6881
  /**
@@ -6566,8 +6883,11 @@ interface LinkedBeltEntity extends BaseEntity {
6566
6883
  *
6567
6884
  * _Can only be used if this is LinkedBelt_
6568
6885
  *
6886
+ * **Note**
6887
+ *
6888
+ * Can also be used on entity ghost if it contains linked-belt
6889
+ *
6569
6890
  * {@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
6891
  */
6572
6892
  disconnect_linked_belts(): void
6573
6893
  /**
@@ -6575,8 +6895,11 @@ interface LinkedBeltEntity extends BaseEntity {
6575
6895
  *
6576
6896
  * _Can only be used if this is LinkedBelt_
6577
6897
  *
6898
+ * **Notes**
6899
+ * - Can only be changed when linked belt is disconnected (has no neighbour set)
6900
+ * - Can also be used on entity ghost if it contains linked-belt
6901
+ *
6578
6902
  * {@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
6903
  */
6581
6904
  linked_belt_type: "input" | "output"
6582
6905
  /**
@@ -6584,8 +6907,11 @@ interface LinkedBeltEntity extends BaseEntity {
6584
6907
  *
6585
6908
  * _Can only be used if this is LinkedBelt_
6586
6909
  *
6910
+ * **Notes**
6911
+ * - Can also be used on entity ghost if it contains linked-belt
6912
+ * - May return entity ghost which contains linked belt to which connection is made
6913
+ *
6587
6914
  * {@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
6915
  */
6590
6916
  readonly linked_belt_neighbour: LuaEntity | undefined
6591
6917
  }
@@ -6694,8 +7020,11 @@ interface InserterEntity extends BaseEntity {
6694
7020
  *
6695
7021
  * _Can only be used if this is Inserter_
6696
7022
  *
7023
+ * **Note**
7024
+ *
7025
+ * Inserters must have `allow_custom_vectors` set to true on their prototype to allow changing the pickup position.
7026
+ *
6697
7027
  * {@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
7028
  */
6700
7029
  get pickup_position(): MapPositionTable
6701
7030
  set pickup_position(value: MapPosition)
@@ -6759,8 +7088,11 @@ interface CharacterEntity extends BaseEntity {
6759
7088
  *
6760
7089
  * _Can only be used if this is Character_
6761
7090
  *
7091
+ * **Note**
7092
+ *
7093
+ * A character associated with a player is not directly controlled by any player.
7094
+ *
6762
7095
  * {@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
7096
  */
6765
7097
  get associated_player(): LuaPlayer | LuaPlayer | undefined
6766
7098
  set associated_player(value: LuaPlayer | PlayerIdentification | undefined)
@@ -6922,8 +7254,11 @@ interface CharacterCorpseEntity extends BaseEntity {
6922
7254
  *
6923
7255
  * _Can only be used if this is CharacterCorpse_
6924
7256
  *
7257
+ * **Note**
7258
+ *
7259
+ * The index is not guaranteed to be valid so it should always be checked first if a player with that index actually exists.
7260
+ *
6925
7261
  * {@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
7262
  */
6928
7263
  character_corpse_player_index: uint
6929
7264
  /**
@@ -7132,8 +7467,11 @@ interface LuaEntityPrototype {
7132
7467
  /**
7133
7468
  * Name of the category of this resource or `nil` when not a resource.
7134
7469
  *
7470
+ * **Note**
7471
+ *
7472
+ * During data stage this property is named "category".
7473
+ *
7135
7474
  * {@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
7475
  */
7138
7476
  readonly resource_category: string | undefined
7139
7477
  /**
@@ -7510,15 +7848,21 @@ interface LuaEntityPrototype {
7510
7848
  /**
7511
7849
  * The crafting categories this entity supports. Only meaningful when this is a crafting-machine or player entity type.
7512
7850
  *
7851
+ * **Note**
7852
+ *
7853
+ * The value in the dictionary is meaningless and exists just to allow the dictionary type for easy lookup.
7854
+ *
7513
7855
  * {@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
7856
  */
7516
7857
  readonly crafting_categories: Record<string, boolean>
7517
7858
  /**
7518
7859
  * The resource categories this character or mining drill supports, or `nil` if not a character or mining dill.
7519
7860
  *
7861
+ * **Note**
7862
+ *
7863
+ * The value in the dictionary is meaningless and exists just to allow the dictionary type for easy lookup.
7864
+ *
7520
7865
  * {@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
7866
  */
7523
7867
  readonly resource_categories: Record<string, boolean> | undefined
7524
7868
  /**
@@ -7620,8 +7964,11 @@ interface LuaEntityPrototype {
7620
7964
  /**
7621
7965
  * The default speed of this flying robot, rolling stock or unit, `nil` if not one of these.
7622
7966
  *
7967
+ * **Note**
7968
+ *
7969
+ * For rolling stocks, this is their `max_speed`.
7970
+ *
7623
7971
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.speed View documentation}
7624
- * @remarks For rolling stocks, this is their `max_speed`.
7625
7972
  */
7626
7973
  readonly speed: double | undefined
7627
7974
  /**
@@ -7765,8 +8112,11 @@ interface LuaEntityPrototype {
7765
8112
  /**
7766
8113
  * The fluid capacity of this entity or 0 if this entity doesn't support fluids.
7767
8114
  *
8115
+ * **Note**
8116
+ *
8117
+ * Crafting machines will report 0 due to their fluid capacity being what ever a given recipe needs.
8118
+ *
7768
8119
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.fluid_capacity View documentation}
7769
- * @remarks Crafting machines will report 0 due to their fluid capacity being what ever a given recipe needs.
7770
8120
  */
7771
8121
  readonly fluid_capacity: double
7772
8122
  /**
@@ -7988,8 +8338,11 @@ interface LuaEntityPrototype {
7988
8338
  /**
7989
8339
  * If this prototype will attempt to create a ghost of itself on death.
7990
8340
  *
8341
+ * **Note**
8342
+ *
8343
+ * If this is false then a ghost will never be made, if it's true a ghost may be made.
8344
+ *
7991
8345
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.create_ghost_on_death View documentation}
7992
- * @remarks If this is false then a ghost will never be made, if it's true a ghost may be made.
7993
8346
  */
7994
8347
  readonly create_ghost_on_death: boolean
7995
8348
  /**
@@ -8334,8 +8687,11 @@ interface LuaEntityPrototype {
8334
8687
  /**
8335
8688
  * The logistic parameters for this roboport. or `nil`.
8336
8689
  *
8690
+ * **Note**
8691
+ *
8692
+ * Both the `charging_station_shift` and `stationing_offset` vectors are tables with `x` and `y` keys instead of an array.
8693
+ *
8337
8694
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.logistic_parameters View documentation}
8338
- * @remarks Both the `charging_station_shift` and `stationing_offset` vectors are tables with `x` and `y` keys instead of an array.
8339
8695
  */
8340
8696
  readonly logistic_parameters:
8341
8697
  | {
@@ -8579,8 +8935,11 @@ interface BaseEntityPrototype {
8579
8935
  /**
8580
8936
  * Name of the category of this resource or `nil` when not a resource.
8581
8937
  *
8938
+ * **Note**
8939
+ *
8940
+ * During data stage this property is named "category".
8941
+ *
8582
8942
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.resource_category View documentation}
8583
- * @remarks During data stage this property is named "category".
8584
8943
  */
8585
8944
  readonly resource_category: string | undefined
8586
8945
  /**
@@ -8957,15 +9316,21 @@ interface BaseEntityPrototype {
8957
9316
  /**
8958
9317
  * The crafting categories this entity supports. Only meaningful when this is a crafting-machine or player entity type.
8959
9318
  *
9319
+ * **Note**
9320
+ *
9321
+ * The value in the dictionary is meaningless and exists just to allow the dictionary type for easy lookup.
9322
+ *
8960
9323
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.crafting_categories View documentation}
8961
- * @remarks The value in the dictionary is meaningless and exists just to allow the dictionary type for easy lookup.
8962
9324
  */
8963
9325
  readonly crafting_categories: Record<string, boolean>
8964
9326
  /**
8965
9327
  * The resource categories this character or mining drill supports, or `nil` if not a character or mining dill.
8966
9328
  *
9329
+ * **Note**
9330
+ *
9331
+ * The value in the dictionary is meaningless and exists just to allow the dictionary type for easy lookup.
9332
+ *
8967
9333
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.resource_categories View documentation}
8968
- * @remarks The value in the dictionary is meaningless and exists just to allow the dictionary type for easy lookup.
8969
9334
  */
8970
9335
  readonly resource_categories: Record<string, boolean> | undefined
8971
9336
  /**
@@ -9067,8 +9432,11 @@ interface BaseEntityPrototype {
9067
9432
  /**
9068
9433
  * The default speed of this flying robot, rolling stock or unit, `nil` if not one of these.
9069
9434
  *
9435
+ * **Note**
9436
+ *
9437
+ * For rolling stocks, this is their `max_speed`.
9438
+ *
9070
9439
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.speed View documentation}
9071
- * @remarks For rolling stocks, this is their `max_speed`.
9072
9440
  */
9073
9441
  readonly speed: double | undefined
9074
9442
  /**
@@ -9212,8 +9580,11 @@ interface BaseEntityPrototype {
9212
9580
  /**
9213
9581
  * The fluid capacity of this entity or 0 if this entity doesn't support fluids.
9214
9582
  *
9583
+ * **Note**
9584
+ *
9585
+ * Crafting machines will report 0 due to their fluid capacity being what ever a given recipe needs.
9586
+ *
9215
9587
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.fluid_capacity View documentation}
9216
- * @remarks Crafting machines will report 0 due to their fluid capacity being what ever a given recipe needs.
9217
9588
  */
9218
9589
  readonly fluid_capacity: double
9219
9590
  /**
@@ -9435,8 +9806,11 @@ interface BaseEntityPrototype {
9435
9806
  /**
9436
9807
  * If this prototype will attempt to create a ghost of itself on death.
9437
9808
  *
9809
+ * **Note**
9810
+ *
9811
+ * If this is false then a ghost will never be made, if it's true a ghost may be made.
9812
+ *
9438
9813
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.create_ghost_on_death View documentation}
9439
- * @remarks If this is false then a ghost will never be made, if it's true a ghost may be made.
9440
9814
  */
9441
9815
  readonly create_ghost_on_death: boolean
9442
9816
  /**
@@ -9703,8 +10077,11 @@ interface BaseEntityPrototype {
9703
10077
  /**
9704
10078
  * The logistic parameters for this roboport. or `nil`.
9705
10079
  *
10080
+ * **Note**
10081
+ *
10082
+ * Both the `charging_station_shift` and `stationing_offset` vectors are tables with `x` and `y` keys instead of an array.
10083
+ *
9706
10084
  * {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.logistic_parameters View documentation}
9707
- * @remarks Both the `charging_station_shift` and `stationing_offset` vectors are tables with `x` and `y` keys instead of an array.
9708
10085
  */
9709
10086
  readonly logistic_parameters:
9710
10087
  | {
@@ -10021,8 +10398,11 @@ interface LuaEquipment {
10021
10398
  /**
10022
10399
  * Current shield value of the equipment.
10023
10400
  *
10401
+ * **Note**
10402
+ *
10403
+ * Can't be set higher than {@link LuaEquipment#max_shield LuaEquipment::max_shield}.
10404
+ *
10024
10405
  * {@link https://lua-api.factorio.com/latest/LuaEquipment.html#LuaEquipment.shield View documentation}
10025
- * @remarks Can't be set higher than {@link LuaEquipment#max_shield LuaEquipment::max_shield}.
10026
10406
  */
10027
10407
  shield: double
10028
10408
  /**
@@ -10416,8 +10796,11 @@ interface LuaEquipmentPrototype {
10416
10796
  /**
10417
10797
  * The logistic parameters for this roboport equipment.
10418
10798
  *
10799
+ * **Note**
10800
+ *
10801
+ * Both the `charging_station_shift` and `stationing_offset` vectors are tables with `x` and `y` keys instead of an array.
10802
+ *
10419
10803
  * {@link https://lua-api.factorio.com/latest/LuaEquipmentPrototype.html#LuaEquipmentPrototype.logistic_parameters View documentation}
10420
- * @remarks Both the `charging_station_shift` and `stationing_offset` vectors are tables with `x` and `y` keys instead of an array.
10421
10804
  */
10422
10805
  readonly logistic_parameters: {
10423
10806
  readonly spawn_and_station_height: float
@@ -10665,18 +11048,24 @@ interface LuaFluidBox extends Array<Fluid | undefined> {
10665
11048
  /**
10666
11049
  * Set a fluid box filter.
10667
11050
  *
11051
+ * **Note**
11052
+ *
11053
+ * Some entities cannot have their fluidbox filter set, notably fluid wagons and crafting machines.
11054
+ *
10668
11055
  * {@link https://lua-api.factorio.com/latest/LuaFluidBox.html#LuaFluidBox.set_filter View documentation}
10669
11056
  * @param index The index of the filter to set.
10670
11057
  * @param filter The filter to set. Setting `nil` clears the filter.
10671
11058
  * @returns Whether the filter was set successfully.
10672
- * @remarks Some entities cannot have their fluidbox filter set, notably fluid wagons and crafting machines.
10673
11059
  */
10674
11060
  set_filter(index: uint, filter?: FluidBoxFilterSpec): boolean
10675
11061
  /**
10676
11062
  * Flow through the fluidbox in the last tick. It is the larger of in-flow and out-flow.
10677
11063
  *
11064
+ * **Note**
11065
+ *
11066
+ * Fluid wagons do not track it and will return 0.
11067
+ *
10678
11068
  * {@link https://lua-api.factorio.com/latest/LuaFluidBox.html#LuaFluidBox.get_flow View documentation}
10679
- * @remarks Fluid wagons do not track it and will return 0.
10680
11069
  */
10681
11070
  get_flow(index: uint): double
10682
11071
  /**
@@ -10992,10 +11381,13 @@ interface LuaForce {
10992
11381
  /**
10993
11382
  * Count entities of given type.
10994
11383
  *
11384
+ * **Note**
11385
+ *
11386
+ * This function has O(1) time complexity as entity counts are kept and maintained in the game engine.
11387
+ *
10995
11388
  * {@link https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.get_entity_count View documentation}
10996
11389
  * @param name Prototype name of the entity.
10997
11390
  * @returns Number of entities of given prototype belonging to this force.
10998
- * @remarks This function has O(1) time complexity as entity counts are kept and maintained in the game engine.
10999
11391
  */
11000
11392
  get_entity_count(name: string): uint
11001
11393
  /**
@@ -11046,7 +11438,6 @@ interface LuaForce {
11046
11438
  * **Raised events:**
11047
11439
  * - {@link OnResearchFinishedEvent on_research_finished} _instantly_
11048
11440
  *
11049
- *
11050
11441
  * {@link https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.research_all_technologies View documentation}
11051
11442
  * @param include_disabled_prototypes Whether technologies that are explicitly disabled in the prototype should also be researched. Defaults to `false`.
11052
11443
  */
@@ -11063,7 +11454,6 @@ interface LuaForce {
11063
11454
  * **Raised events:**
11064
11455
  * - {@link OnForceResetEvent on_force_reset} _instantly_
11065
11456
  *
11066
- *
11067
11457
  * {@link https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.reset View documentation}
11068
11458
  */
11069
11459
  reset(): void
@@ -11073,7 +11463,6 @@ interface LuaForce {
11073
11463
  * **Raised events:**
11074
11464
  * - {@link OnTechnologyEffectsResetEvent on_technology_effects_reset} _instantly_
11075
11465
  *
11076
- *
11077
11466
  * {@link https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.reset_technology_effects View documentation}
11078
11467
  */
11079
11468
  reset_technology_effects(): void
@@ -11176,7 +11565,6 @@ interface LuaForce {
11176
11565
  * **Raised events:**
11177
11566
  * - {@link OnForceCeaseFireChangedEvent on_force_cease_fire_changed} _instantly_
11178
11567
  *
11179
- *
11180
11568
  * {@link https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.set_cease_fire View documentation}
11181
11569
  */
11182
11570
  set_cease_fire(other: ForceIdentification, cease_fire: boolean): void
@@ -11192,7 +11580,6 @@ interface LuaForce {
11192
11580
  * **Raised events:**
11193
11581
  * - {@link OnForceFriendsChangedEvent on_force_friends_changed} _instantly_
11194
11582
  *
11195
- *
11196
11583
  * {@link https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.set_friend View documentation}
11197
11584
  */
11198
11585
  set_friend(other: ForceIdentification, friend: boolean): void
@@ -11262,8 +11649,11 @@ interface LuaForce {
11262
11649
  /**
11263
11650
  * Print text to the chat console of all players on this force.
11264
11651
  *
11652
+ * **Note**
11653
+ *
11654
+ * Messages that are identical to a message sent in the last 60 ticks are not printed again.
11655
+ *
11265
11656
  * {@link https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.print View documentation}
11266
- * @remarks Messages that are identical to a message sent in the last 60 ticks are not printed again.
11267
11657
  */
11268
11658
  print(message: LocalisedString, color?: Color): void
11269
11659
  /**
@@ -11279,11 +11669,13 @@ interface LuaForce {
11279
11669
  * **Raised events:**
11280
11670
  * - {@link OnChartTagAddedEvent on_chart_tag_added}? _instantly_ Raised if the chart tag was successfully added.
11281
11671
  *
11672
+ * **Note**
11673
+ *
11674
+ * The chunk must be charted for a tag to be valid at that location.
11282
11675
  *
11283
11676
  * {@link https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.add_chart_tag View documentation}
11284
11677
  * @param surface Which surface to add the tag to.
11285
11678
  * @param tag The tag to add.
11286
- * @remarks The chunk must be charted for a tag to be valid at that location.
11287
11679
  */
11288
11680
  add_chart_tag(surface: SurfaceIdentification, tag: ChartTagSpec): LuaCustomChartTag | undefined
11289
11681
  /**
@@ -11364,7 +11756,6 @@ interface LuaForce {
11364
11756
  * **Raised events:**
11365
11757
  * - {@link OnResearchStartedEvent on_research_started}? _instantly_ Raised if the technology was successfully added.
11366
11758
  *
11367
- *
11368
11759
  * {@link https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.add_research View documentation}
11369
11760
  * @returns Whether the technology was successfully added.
11370
11761
  */
@@ -11516,8 +11907,11 @@ interface LuaForce {
11516
11907
  /**
11517
11908
  * 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.
11518
11909
  *
11910
+ * **Notes**
11911
+ * - Setting this to `false` does not turn off biters' AI. They will still move around and attack players who come close.
11912
+ * - It is necessary for a force to be AI controllable in order to be able to create unit groups or build bases from scripts.
11913
+ *
11519
11914
  * {@link https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.ai_controllable View documentation}
11520
- * @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.
11521
11915
  */
11522
11916
  ai_controllable: boolean
11523
11917
  /**
@@ -11631,8 +12025,11 @@ interface LuaForce {
11631
12025
  *
11632
12026
  * This is primarily useful when you want to do some action against all online players of this force.
11633
12027
  *
12028
+ * **Note**
12029
+ *
12030
+ * This does *not* index using player index. See {@link LuaPlayer#index LuaPlayer::index} on each player instance for the player index.
12031
+ *
11634
12032
  * {@link https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.connected_players View documentation}
11635
- * @remarks This does *not* index using player index. See {@link LuaPlayer#index LuaPlayer::index} on each player instance for the player index.
11636
12033
  */
11637
12034
  readonly connected_players: LuaPlayer[]
11638
12035
  mining_drill_productivity_bonus: double
@@ -11675,8 +12072,11 @@ interface LuaForce {
11675
12072
  *
11676
12073
  * 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.
11677
12074
  *
12075
+ * **Note**
12076
+ *
12077
+ * 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.
12078
+ *
11678
12079
  * {@link https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.research_queue View documentation}
11679
- * @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.
11680
12080
  */
11681
12081
  get research_queue(): LuaTechnology[] | undefined
11682
12082
  set research_queue(value: TechnologyIdentification[] | undefined)
@@ -11764,8 +12164,11 @@ interface LuaGameScript {
11764
12164
  /**
11765
12165
  * Show an in-game message dialog.
11766
12166
  *
12167
+ * **Note**
12168
+ *
12169
+ * Can only be used when the map contains exactly one player.
12170
+ *
11767
12171
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.show_message_dialog View documentation}
11768
- * @remarks Can only be used when the map contains exactly one player.
11769
12172
  */
11770
12173
  show_message_dialog(params: {
11771
12174
  /**
@@ -11798,44 +12201,63 @@ interface LuaGameScript {
11798
12201
  /**
11799
12202
  * Forces a reload of the scenario script from the original scenario location.
11800
12203
  *
12204
+ * **Note**
12205
+ *
12206
+ * This disables the replay if replay is enabled.
12207
+ *
11801
12208
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.reload_script View documentation}
11802
- * @remarks This disables the replay if replay is enabled.
11803
12209
  */
11804
12210
  reload_script(): void
11805
12211
  /**
11806
12212
  * Forces a reload of all mods.
11807
12213
  *
12214
+ * **Notes**
12215
+ * - This will act like saving and loading from the mod(s) perspective.
12216
+ * - This will do nothing if run in multiplayer.
12217
+ * - This disables the replay if replay is enabled.
12218
+ *
11808
12219
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.reload_mods View documentation}
11809
- * @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.
11810
12220
  */
11811
12221
  reload_mods(): void
11812
12222
  /**
11813
12223
  * 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.
11814
12224
  *
12225
+ * **Note**
12226
+ *
12227
+ * Exists mainly for debugging reasons.
12228
+ *
11815
12229
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.save_atlas View documentation}
11816
- * @remarks Exists mainly for debugging reasons.
11817
12230
  */
11818
12231
  save_atlas(): void
11819
12232
  /**
11820
12233
  * Run internal consistency checks. Allegedly prints any errors it finds.
11821
12234
  *
12235
+ * **Note**
12236
+ *
12237
+ * Exists mainly for debugging reasons.
12238
+ *
11822
12239
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.check_consistency View documentation}
11823
- * @remarks Exists mainly for debugging reasons.
11824
12240
  */
11825
12241
  check_consistency(): void
11826
12242
  /**
11827
12243
  * Regenerate autoplacement of some entities on all surfaces. This can be used to autoplace newly-added entities.
11828
12244
  *
12245
+ * **Note**
12246
+ *
12247
+ * All specified entity prototypes must be autoplacable.
12248
+ *
11829
12249
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.regenerate_entity View documentation}
11830
12250
  * @param entities Prototype names of entity or entities to autoplace.
11831
- * @remarks All specified entity prototypes must be autoplacable.
11832
12251
  */
11833
12252
  regenerate_entity(entities: string | readonly string[]): void
11834
12253
  /**
11835
- * 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.
12254
+ * 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.
12255
+ *
12256
+ * **Note**
12257
+ *
12258
+ * If Factorio is running headless, this function will do nothing.
11836
12259
  *
11837
12260
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_screenshot View documentation}
11838
- * @remarks If Factorio is running headless, this function will do nothing.
11839
12261
  */
11840
12262
  take_screenshot(params: {
11841
12263
  /**
@@ -11910,7 +12332,7 @@ interface LuaGameScript {
11910
12332
  */
11911
12333
  set_wait_for_screenshots_to_finish(): void
11912
12334
  /**
11913
- * 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.
12335
+ * 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.
11914
12336
  *
11915
12337
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_technology_screenshot View documentation}
11916
12338
  */
@@ -11955,7 +12377,7 @@ interface LuaGameScript {
11955
12377
  */
11956
12378
  json_to_table(json: string): AnyBasic | undefined
11957
12379
  /**
11958
- * 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.
12380
+ * 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.
11959
12381
  *
11960
12382
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.write_file View documentation}
11961
12383
  * @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`.
@@ -11965,7 +12387,7 @@ interface LuaGameScript {
11965
12387
  */
11966
12388
  write_file(filename: string, data: LocalisedString, append?: boolean, for_player?: uint): void
11967
12389
  /**
11968
- * 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}.
12390
+ * 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}.
11969
12391
  *
11970
12392
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.remove_path View documentation}
11971
12393
  * @param path The path to the file or directory to remove, relative to `script-output`.
@@ -11978,7 +12400,6 @@ interface LuaGameScript {
11978
12400
  * - {@link OnPrePlayerRemovedEvent on_pre_player_removed} _instantly_
11979
12401
  * - {@link OnPlayerRemovedEvent on_player_removed} _instantly_
11980
12402
  *
11981
- *
11982
12403
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.remove_offline_players View documentation}
11983
12404
  * @param players List of players to remove. If not specified, remove all offline players.
11984
12405
  */
@@ -11995,11 +12416,13 @@ interface LuaGameScript {
11995
12416
  * **Raised events:**
11996
12417
  * - {@link OnForceCreatedEvent on_force_created} _instantly_
11997
12418
  *
12419
+ * **Notes**
12420
+ * - 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.
12421
+ * - Force names must be unique.
11998
12422
  *
11999
12423
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.create_force View documentation}
12000
12424
  * @param force Name of the new force
12001
12425
  * @returns The force that was just created
12002
- * @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.
12003
12426
  */
12004
12427
  create_force(force: string): LuaForce
12005
12428
  /**
@@ -12009,11 +12432,13 @@ interface LuaGameScript {
12009
12432
  * - {@link OnForcesMergingEvent on_forces_merging} _future_tick_
12010
12433
  * - {@link OnForcesMergedEvent on_forces_merged} _future_tick_
12011
12434
  *
12435
+ * **Notes**
12436
+ * - 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.
12437
+ * - 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.
12012
12438
  *
12013
12439
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.merge_forces View documentation}
12014
12440
  * @param source The force to remove.
12015
12441
  * @param destination The force to reassign all entities to.
12016
- * @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.
12017
12442
  */
12018
12443
  merge_forces(source: ForceIdentification, destination: ForceIdentification): void
12019
12444
  /**
@@ -12022,12 +12447,14 @@ interface LuaGameScript {
12022
12447
  * **Raised events:**
12023
12448
  * - {@link OnSurfaceCreatedEvent on_surface_created} _instantly_
12024
12449
  *
12450
+ * **Notes**
12451
+ * - The game currently supports a maximum of 4,294,967,295 surfaces, including the default surface.
12452
+ * - Surface names must be unique.
12025
12453
  *
12026
12454
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.create_surface View documentation}
12027
12455
  * @param name Name of the new surface.
12028
12456
  * @param settings Map generation settings.
12029
12457
  * @returns The surface that was just created.
12030
- * @remarks The game currently supports a maximum of 4,294,967,295 surfaces, including the default surface.<br>Surface names must be unique.
12031
12458
  */
12032
12459
  create_surface(name: string, settings?: MapGenSettings): LuaSurface
12033
12460
  /**
@@ -12040,9 +12467,12 @@ interface LuaGameScript {
12040
12467
  /**
12041
12468
  * Instruct the game to perform an auto-save.
12042
12469
  *
12470
+ * **Note**
12471
+ *
12472
+ * Only the server will save in multiplayer. In single player a standard auto-save is triggered.
12473
+ *
12043
12474
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.auto_save View documentation}
12044
12475
  * @param name The autosave name if any. Saves will be named _autosave-*name* when provided.
12045
- * @remarks Only the server will save in multiplayer. In single player a standard auto-save is triggered.
12046
12476
  */
12047
12477
  auto_save(name?: string): void
12048
12478
  /**
@@ -12052,7 +12482,6 @@ interface LuaGameScript {
12052
12482
  * - {@link OnPreSurfaceDeletedEvent on_pre_surface_deleted} _future_tick_
12053
12483
  * - {@link OnSurfaceDeletedEvent on_surface_deleted} _future_tick_
12054
12484
  *
12055
- *
12056
12485
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.delete_surface View documentation}
12057
12486
  * @param surface The surface to be deleted. Currently the primary surface (1, 'nauvis') cannot be deleted.
12058
12487
  */
@@ -12078,22 +12507,31 @@ interface LuaGameScript {
12078
12507
  /**
12079
12508
  * Print text to the chat console all players.
12080
12509
  *
12510
+ * **Note**
12511
+ *
12512
+ * Messages that are identical to a message sent in the last 60 ticks are not printed again.
12513
+ *
12081
12514
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.print View documentation}
12082
- * @remarks Messages that are identical to a message sent in the last 60 ticks are not printed again.
12083
12515
  */
12084
12516
  print(message: LocalisedString, color?: Color): void
12085
12517
  /**
12086
12518
  * Creates a deterministic standalone random generator with the given seed or if a seed is not provided the initial map seed is used.
12087
12519
  *
12520
+ * **Note**
12521
+ *
12522
+ * *Make sure* you actually want to use this over math.random(...) as this provides entirely different functionality over math.random(...).
12523
+ *
12088
12524
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.create_random_generator View documentation}
12089
- * @remarks *Make sure* you actually want to use this over math.random(...) as this provides entirely different functionality over math.random(...).
12090
12525
  */
12091
12526
  create_random_generator(seed?: uint): LuaRandomGenerator
12092
12527
  /**
12093
12528
  * Goes over all items, entities, tiles, recipes, technologies among other things and logs if the locale is incorrect.
12094
12529
  *
12530
+ * **Note**
12531
+ *
12532
+ * Also prints true/false if called from the console.
12533
+ *
12095
12534
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.check_prototype_translations View documentation}
12096
- * @remarks Also prints true/false if called from the console.
12097
12535
  */
12098
12536
  check_prototype_translations(): void
12099
12537
  /**
@@ -12140,7 +12578,6 @@ interface LuaGameScript {
12140
12578
  * - {@link OnPlayerKickedEvent on_player_kicked} _instantly_
12141
12579
  * - {@link OnConsoleCommandEvent on_console_command} _instantly_
12142
12580
  *
12143
- *
12144
12581
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.kick_player View documentation}
12145
12582
  * @param player The player to kick.
12146
12583
  * @param reason The reason given if any.
@@ -12153,7 +12590,6 @@ interface LuaGameScript {
12153
12590
  * - {@link OnPlayerBannedEvent on_player_banned} _instantly_
12154
12591
  * - {@link OnConsoleCommandEvent on_console_command} _instantly_
12155
12592
  *
12156
- *
12157
12593
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.ban_player View documentation}
12158
12594
  * @param player The player to ban.
12159
12595
  * @param reason The reason given if any.
@@ -12166,7 +12602,6 @@ interface LuaGameScript {
12166
12602
  * - {@link OnPlayerUnbannedEvent on_player_unbanned} _instantly_
12167
12603
  * - {@link OnConsoleCommandEvent on_console_command} _instantly_
12168
12604
  *
12169
- *
12170
12605
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.unban_player View documentation}
12171
12606
  * @param player The player to unban.
12172
12607
  */
@@ -12177,7 +12612,6 @@ interface LuaGameScript {
12177
12612
  * **Raised events:**
12178
12613
  * - {@link OnConsoleCommandEvent on_console_command} _instantly_
12179
12614
  *
12180
- *
12181
12615
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.purge_player View documentation}
12182
12616
  * @param player The player to purge.
12183
12617
  */
@@ -12189,7 +12623,6 @@ interface LuaGameScript {
12189
12623
  * - {@link OnPlayerMutedEvent on_player_muted} _instantly_
12190
12624
  * - {@link OnConsoleCommandEvent on_console_command} _instantly_
12191
12625
  *
12192
- *
12193
12626
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.mute_player View documentation}
12194
12627
  * @param player The player to mute.
12195
12628
  */
@@ -12201,7 +12634,6 @@ interface LuaGameScript {
12201
12634
  * - {@link OnPlayerUnmutedEvent on_player_unmuted} _instantly_
12202
12635
  * - {@link OnConsoleCommandEvent on_console_command} _instantly_
12203
12636
  *
12204
- *
12205
12637
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.unmute_player View documentation}
12206
12638
  * @param player The player to unmute.
12207
12639
  */
@@ -12221,9 +12653,12 @@ interface LuaGameScript {
12221
12653
  /**
12222
12654
  * Gets the number of entities that are active (updated each tick).
12223
12655
  *
12656
+ * **Note**
12657
+ *
12658
+ * This is very expensive to determine.
12659
+ *
12224
12660
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.get_active_entities_count View documentation}
12225
12661
  * @param surface If give, only the entities active on this surface are counted.
12226
- * @remarks This is very expensive to determine.
12227
12662
  */
12228
12663
  get_active_entities_count(surface?: SurfaceIdentification): uint
12229
12664
  /**
@@ -12251,29 +12686,38 @@ interface LuaGameScript {
12251
12686
  /**
12252
12687
  * Gets the given player or returns `nil` if no player is found.
12253
12688
  *
12689
+ * **Note**
12690
+ *
12691
+ * This is a shortcut for game.players[...]
12692
+ *
12254
12693
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.get_player View documentation}
12255
12694
  * @param player The player index or name.
12256
- * @remarks This is a shortcut for game.players[...]
12257
12695
  */
12258
12696
  get_player(index: PlayerIndex | string): LuaPlayer | undefined
12259
12697
  /**
12260
12698
  * Gets the given surface or returns `nil` if no surface is found.
12261
12699
  *
12700
+ * **Note**
12701
+ *
12702
+ * This is a shortcut for game.surfaces[...]
12703
+ *
12262
12704
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.get_surface View documentation}
12263
12705
  * @param surface The surface index or name.
12264
- * @remarks This is a shortcut for game.surfaces[...]
12265
12706
  */
12266
12707
  get_surface(index: SurfaceIndex | string): LuaSurface | undefined
12267
12708
  /**
12268
12709
  * Creates a {@link LuaProfiler}, which is used for measuring script performance.
12269
12710
  *
12711
+ * **Note**
12712
+ *
12713
+ * LuaProfiler cannot be serialized.
12714
+ *
12270
12715
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.create_profiler View documentation}
12271
12716
  * @param stopped Create the timer stopped
12272
- * @remarks LuaProfiler cannot be serialized.
12273
12717
  */
12274
12718
  create_profiler(stopped?: boolean): LuaProfiler
12275
12719
  /**
12276
- * 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}.
12720
+ * 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}.
12277
12721
  *
12278
12722
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.evaluate_expression View documentation}
12279
12723
  * @param expression The expression to evaluate.
@@ -12409,18 +12853,24 @@ interface LuaGameScript {
12409
12853
  /**
12410
12854
  * Creates an inventory that is not owned by any game object. It can be resized later with {@link LuaInventory#resize LuaInventory::resize}.
12411
12855
  *
12856
+ * **Note**
12857
+ *
12858
+ * Make sure to destroy it when you are done with it using {@link LuaInventory#destroy LuaInventory::destroy}.
12859
+ *
12412
12860
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.create_inventory View documentation}
12413
12861
  * @param size The number of slots the inventory initially has.
12414
- * @remarks Make sure to destroy it when you are done with it using {@link LuaInventory#destroy LuaInventory::destroy}.
12415
12862
  */
12416
12863
  create_inventory(size: uint16): LuaInventory
12417
12864
  /**
12418
12865
  * Gets the inventories created through {@link LuaGameScript#create_inventory LuaGameScript::create_inventory}
12419
12866
  *
12867
+ * **Note**
12868
+ *
12869
+ * Inventories created through console commands will be owned by `"core"`.
12870
+ *
12420
12871
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.get_script_inventories View documentation}
12421
12872
  * @param mod The mod who's inventories to get. If not provided all inventories are returned.
12422
12873
  * @returns A mapping of mod name to array of inventories owned by that mod.
12423
- * @remarks Inventories created through console commands will be owned by `"core"`.
12424
12874
  */
12425
12875
  get_script_inventories(mod?: string): Record<string, LuaInventory[]>
12426
12876
  /**
@@ -12446,7 +12896,7 @@ interface LuaGameScript {
12446
12896
  */
12447
12897
  decode_string(string: string): string | undefined
12448
12898
  /**
12449
- * 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.
12899
+ * 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.
12450
12900
  *
12451
12901
  * See {@link LuaGameScript#players LuaGameScript::players} for accessing all players.
12452
12902
  *
@@ -12462,8 +12912,11 @@ interface LuaGameScript {
12462
12912
  /**
12463
12913
  * 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.
12464
12914
  *
12915
+ * **Note**
12916
+ *
12917
+ * This does not contain difficulty settings, use {@link LuaGameScript#difficulty_settings LuaGameScript::difficulty_settings} instead.
12918
+ *
12465
12919
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.map_settings View documentation}
12466
- * @remarks This does not contain difficulty settings, use {@link LuaGameScript#difficulty_settings LuaGameScript::difficulty_settings} instead.
12467
12920
  */
12468
12921
  readonly map_settings: MapSettings
12469
12922
  /**
@@ -12666,8 +13119,11 @@ interface LuaGameScript {
12666
13119
  /**
12667
13120
  * A dictionary containing every MapGenPreset indexed by `name`.
12668
13121
  *
13122
+ * **Note**
13123
+ *
13124
+ * A MapGenPreset is an exact copy of the prototype table provided from the data stage.
13125
+ *
12669
13126
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.map_gen_presets View documentation}
12670
- * @remarks A MapGenPreset is an exact copy of the prototype table provided from the data stage.
12671
13127
  */
12672
13128
  readonly map_gen_presets: LuaCustomTable<string, MapGenPreset>
12673
13129
  /**
@@ -12685,8 +13141,11 @@ interface LuaGameScript {
12685
13141
  /**
12686
13142
  * The number of ticks since this game was 'created'. A game is 'created' either by using "new game" or "new game from scenario".
12687
13143
  *
13144
+ * **Notes**
13145
+ * - 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.
13146
+ * - This value has no relation with {@link LuaGameScript#tick LuaGameScript::tick} and can be completely different values.
13147
+ *
12688
13148
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.ticks_played View documentation}
12689
- * @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.
12690
13149
  */
12691
13150
  readonly ticks_played: uint
12692
13151
  /**
@@ -12716,8 +13175,11 @@ interface LuaGameScript {
12716
13175
  /**
12717
13176
  * Speed to update the map at. 1.0 is normal speed -- 60 UPS.
12718
13177
  *
13178
+ * **Note**
13179
+ *
13180
+ * Minimum value is 0.01.
13181
+ *
12719
13182
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.speed View documentation}
12720
- * @remarks Minimum value is 0.01.
12721
13183
  */
12722
13184
  speed: float
12723
13185
  /**
@@ -12744,8 +13206,11 @@ interface LuaGameScript {
12744
13206
  *
12745
13207
  * This is primarily useful when you want to do some action against all online players.
12746
13208
  *
13209
+ * **Note**
13210
+ *
13211
+ * This does *not* index using player index. See {@link LuaPlayer#index LuaPlayer::index} on each player instance for the player index.
13212
+ *
12747
13213
  * {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.connected_players View documentation}
12748
- * @remarks This does *not* index using player index. See {@link LuaPlayer#index LuaPlayer::index} on each player instance for the player index.
12749
13214
  */
12750
13215
  readonly connected_players: LuaPlayer[]
12751
13216
  readonly permissions: LuaPermissionGroups
@@ -12816,8 +13281,11 @@ interface LuaGenericOnOffControlBehavior extends LuaControlBehavior {
12816
13281
  /**
12817
13282
  * The circuit condition.
12818
13283
  *
13284
+ * **Note**
13285
+ *
13286
+ * `condition` may be `nil` in order to clear the circuit condition.
13287
+ *
12819
13288
  * {@link https://lua-api.factorio.com/latest/LuaGenericOnOffControlBehavior.html#LuaGenericOnOffControlBehavior.circuit_condition View documentation}
12820
- * @remarks `condition` may be `nil` in order to clear the circuit condition.
12821
13289
  * @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.
12822
13290
  *
12823
13291
  * ```
@@ -12826,12 +13294,16 @@ interface LuaGenericOnOffControlBehavior extends LuaControlBehavior {
12826
13294
  * constant=4}}
12827
13295
  * ```
12828
13296
  */
12829
- circuit_condition: CircuitConditionDefinition
13297
+ get circuit_condition(): CircuitConditionDefinitionRead
13298
+ set circuit_condition(value: CircuitConditionDefinition)
12830
13299
  /**
12831
13300
  * The logistic condition.
12832
13301
  *
13302
+ * **Note**
13303
+ *
13304
+ * `condition` may be `nil` in order to clear the logistic condition.
13305
+ *
12833
13306
  * {@link https://lua-api.factorio.com/latest/LuaGenericOnOffControlBehavior.html#LuaGenericOnOffControlBehavior.logistic_condition View documentation}
12834
- * @remarks `condition` may be `nil` in order to clear the logistic condition.
12835
13307
  * @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.
12836
13308
  *
12837
13309
  * ```
@@ -12840,7 +13312,8 @@ interface LuaGenericOnOffControlBehavior extends LuaControlBehavior {
12840
13312
  * constant=4}}
12841
13313
  * ```
12842
13314
  */
12843
- logistic_condition: CircuitConditionDefinition
13315
+ get logistic_condition(): CircuitConditionDefinitionRead
13316
+ set logistic_condition(value: CircuitConditionDefinition)
12844
13317
  /**
12845
13318
  * `true` if this should connect to the logistic network.
12846
13319
  *
@@ -12885,15 +13358,21 @@ interface LuaGroup {
12885
13358
  /**
12886
13359
  * Subgroups of this group.
12887
13360
  *
13361
+ * **Note**
13362
+ *
13363
+ * Can only be used on groups, not on subgroups.
13364
+ *
12888
13365
  * {@link https://lua-api.factorio.com/latest/LuaGroup.html#LuaGroup.subgroups View documentation}
12889
- * @remarks Can only be used on groups, not on subgroups.
12890
13366
  */
12891
13367
  readonly subgroups: LuaGroup[]
12892
13368
  /**
12893
13369
  * The additional order value used in recipe ordering.
12894
13370
  *
13371
+ * **Note**
13372
+ *
13373
+ * Can only be used on groups, not on subgroups.
13374
+ *
12895
13375
  * {@link https://lua-api.factorio.com/latest/LuaGroup.html#LuaGroup.order_in_recipe View documentation}
12896
- * @remarks Can only be used on groups, not on subgroups.
12897
13376
  */
12898
13377
  readonly order_in_recipe: string
12899
13378
  /**
@@ -12919,9 +13398,12 @@ interface LuaGroup {
12919
13398
  /**
12920
13399
  * 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.
12921
13400
  *
13401
+ * **Note**
13402
+ *
13403
+ * Every player can have a different GUI state.
13404
+ *
12922
13405
  * {@link https://lua-api.factorio.com/latest/LuaGui.html View documentation}
12923
13406
  * @noSelf
12924
- * @remarks Every player can have a different GUI state.
12925
13407
  */
12926
13408
  interface LuaGui {
12927
13409
  /**
@@ -13573,8 +14055,11 @@ interface BaseGuiElement {
13573
14055
  /**
13574
14056
  * Remove this element, along with its children. Any {@link LuaGuiElement} objects referring to the destroyed elements become invalid after this operation.
13575
14057
  *
14058
+ * **Note**
14059
+ *
14060
+ * 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.
14061
+ *
13576
14062
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.destroy View documentation}
13577
- * @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.
13578
14063
  * @example
13579
14064
  *
13580
14065
  * ```
@@ -13585,15 +14070,21 @@ interface BaseGuiElement {
13585
14070
  /**
13586
14071
  * The mod that owns this Gui element or `nil` if it's owned by the scenario script.
13587
14072
  *
14073
+ * **Note**
14074
+ *
14075
+ * This has a not-super-expensive, but non-free cost to get.
14076
+ *
13588
14077
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.get_mod View documentation}
13589
- * @remarks This has a not-super-expensive, but non-free cost to get.
13590
14078
  */
13591
14079
  get_mod(): string | undefined
13592
14080
  /**
13593
14081
  * Gets the index that this element has in its parent element.
13594
14082
  *
14083
+ * **Note**
14084
+ *
14085
+ * 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.
14086
+ *
13595
14087
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.get_index_in_parent View documentation}
13596
- * @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.
13597
14088
  */
13598
14089
  get_index_in_parent(): uint
13599
14090
  /**
@@ -13613,8 +14104,11 @@ interface BaseGuiElement {
13613
14104
  /**
13614
14105
  * Moves this GUI element to the "front" so it will draw over other elements.
13615
14106
  *
14107
+ * **Note**
14108
+ *
14109
+ * Only works for elements in {@link LuaGui#screen LuaGui::screen}
14110
+ *
13616
14111
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.bring_to_front View documentation}
13617
- * @remarks Only works for elements in {@link LuaGui#screen LuaGui::screen}
13618
14112
  */
13619
14113
  bring_to_front(): void
13620
14114
  /**
@@ -13649,8 +14143,11 @@ interface BaseGuiElement {
13649
14143
  /**
13650
14144
  * The text displayed on this element. For frames, this is the "heading". For other elements, like buttons or labels, this is the content.
13651
14145
  *
14146
+ * **Note**
14147
+ *
14148
+ * 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.
14149
+ *
13652
14150
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.caption View documentation}
13653
- * @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.
13654
14151
  */
13655
14152
  caption: LocalisedString
13656
14153
  /**
@@ -13756,8 +14253,11 @@ interface ChooseElemButtonGuiElementMembers extends BaseGuiElement {
13756
14253
  *
13757
14254
  * _Can only be used if this is choose-elem-button_
13758
14255
  *
14256
+ * **Note**
14257
+ *
14258
+ * The `"signal"` type operates with {@link SignalID}, while all other types use strings.
14259
+ *
13759
14260
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.elem_value View documentation}
13760
- * @remarks The `"signal"` type operates with {@link SignalID}, while all other types use strings.
13761
14261
  */
13762
14262
  elem_value: (this["elem_type"] extends "signal" ? SignalID : string) | undefined
13763
14263
  /**
@@ -13765,8 +14265,11 @@ interface ChooseElemButtonGuiElementMembers extends BaseGuiElement {
13765
14265
  *
13766
14266
  * _Can only be used if this is choose-elem-button_
13767
14267
  *
14268
+ * **Note**
14269
+ *
14270
+ * Writing to this field does not change or clear the currently selected element.
14271
+ *
13768
14272
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.elem_filters View documentation}
13769
- * @remarks Writing to this field does not change or clear the currently selected element.
13770
14273
  * @example This will configure a choose-elem-button of type `"entity"` to only show items of type `"furnace"`.
13771
14274
  *
13772
14275
  * ```
@@ -13870,8 +14373,11 @@ interface EmptyWidgetGuiElementMembers extends BaseGuiElement {
13870
14373
  *
13871
14374
  * _Can only be used if this is flow, frame, label, table or empty-widget_
13872
14375
  *
14376
+ * **Note**
14377
+ *
14378
+ * Only top-level elements in {@link LuaGui#screen LuaGui::screen} can be `drag_target`s.
14379
+ *
13873
14380
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.drag_target View documentation}
13874
- * @remarks Only top-level elements in {@link LuaGui#screen LuaGui::screen} can be `drag_target`s.
13875
14381
  * @example This creates a frame that contains a dragging handle which can move the frame.
13876
14382
  *
13877
14383
  * ```
@@ -14122,9 +14628,12 @@ interface TabbedPaneGuiElementMembers extends BaseGuiElement {
14122
14628
  *
14123
14629
  * _Can only be used if this is tabbed-pane_
14124
14630
  *
14631
+ * **Notes**
14632
+ * - Removing a tab does not destroy the tab or the tab contents. It just removes them from the view.
14633
+ * - When removing tabs, {@link LuaGuiElement#selected_tab_index LuaGuiElement::selected_tab_index} needs to be manually updated.
14634
+ *
14125
14635
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.remove_tab View documentation}
14126
14636
  * @param tab The tab to remove. If not given, it removes all tabs.
14127
- * @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.
14128
14637
  */
14129
14638
  remove_tab(tab: LuaGuiElement): void
14130
14639
  /**
@@ -14352,8 +14861,11 @@ interface FlowGuiElementMembers extends BaseGuiElement {
14352
14861
  *
14353
14862
  * _Can only be used if this is flow, frame, label, table or empty-widget_
14354
14863
  *
14864
+ * **Note**
14865
+ *
14866
+ * Only top-level elements in {@link LuaGui#screen LuaGui::screen} can be `drag_target`s.
14867
+ *
14355
14868
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.drag_target View documentation}
14356
- * @remarks Only top-level elements in {@link LuaGui#screen LuaGui::screen} can be `drag_target`s.
14357
14869
  * @example This creates a frame that contains a dragging handle which can move the frame.
14358
14870
  *
14359
14871
  * ```
@@ -14410,8 +14922,11 @@ interface FrameGuiElementMembers extends BaseGuiElement {
14410
14922
  *
14411
14923
  * _Can only be used if this is flow, frame, label, table or empty-widget_
14412
14924
  *
14925
+ * **Note**
14926
+ *
14927
+ * Only top-level elements in {@link LuaGui#screen LuaGui::screen} can be `drag_target`s.
14928
+ *
14413
14929
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.drag_target View documentation}
14414
- * @remarks Only top-level elements in {@link LuaGui#screen LuaGui::screen} can be `drag_target`s.
14415
14930
  * @example This creates a frame that contains a dragging handle which can move the frame.
14416
14931
  *
14417
14932
  * ```
@@ -14438,8 +14953,11 @@ interface LabelGuiElementMembers extends BaseGuiElement {
14438
14953
  *
14439
14954
  * _Can only be used if this is flow, frame, label, table or empty-widget_
14440
14955
  *
14956
+ * **Note**
14957
+ *
14958
+ * Only top-level elements in {@link LuaGui#screen LuaGui::screen} can be `drag_target`s.
14959
+ *
14441
14960
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.drag_target View documentation}
14442
- * @remarks Only top-level elements in {@link LuaGui#screen LuaGui::screen} can be `drag_target`s.
14443
14961
  * @example This creates a frame that contains a dragging handle which can move the frame.
14444
14962
  *
14445
14963
  * ```
@@ -14586,8 +15104,11 @@ interface SliderGuiElementMembers extends BaseGuiElement {
14586
15104
  /**
14587
15105
  * Sets this sliders minimum and maximum values.
14588
15106
  *
15107
+ * **Note**
15108
+ *
15109
+ * The minimum can't be >= the maximum.
15110
+ *
14589
15111
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.set_slider_minimum_maximum View documentation}
14590
- * @remarks The minimum can't be >= the maximum.
14591
15112
  */
14592
15113
  set_slider_minimum_maximum(minimum: double, maximum: double): void
14593
15114
  /**
@@ -14611,8 +15132,11 @@ interface SliderGuiElementMembers extends BaseGuiElement {
14611
15132
  /**
14612
15133
  * Sets the minimum distance this slider can move.
14613
15134
  *
15135
+ * **Note**
15136
+ *
15137
+ * The minimum distance can't be > (max - min).
15138
+ *
14614
15139
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.set_slider_value_step View documentation}
14615
- * @remarks The minimum distance can't be > (max - min).
14616
15140
  */
14617
15141
  set_slider_value_step(value: double): void
14618
15142
  /**
@@ -14674,8 +15198,11 @@ interface SwitchGuiElementMembers extends BaseGuiElement {
14674
15198
  *
14675
15199
  * _Can only be used if this is switch_
14676
15200
  *
15201
+ * **Note**
15202
+ *
15203
+ * If {@link LuaGuiElement#allow_none_state LuaGuiElement::allow_none_state} is false this can't be set to `"none"`.
15204
+ *
14677
15205
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.switch_state View documentation}
14678
- * @remarks If {@link LuaGuiElement#allow_none_state LuaGuiElement::allow_none_state} is false this can't be set to `"none"`.
14679
15206
  */
14680
15207
  switch_state: string
14681
15208
  /**
@@ -14683,8 +15210,11 @@ interface SwitchGuiElementMembers extends BaseGuiElement {
14683
15210
  *
14684
15211
  * _Can only be used if this is switch_
14685
15212
  *
15213
+ * **Note**
15214
+ *
15215
+ * This can't be set to false if the current switch_state is 'none'.
15216
+ *
14686
15217
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.allow_none_state View documentation}
14687
- * @remarks This can't be set to false if the current switch_state is 'none'.
14688
15218
  */
14689
15219
  allow_none_state: boolean
14690
15220
  /**
@@ -14794,8 +15324,11 @@ interface TableGuiElementMembers extends BaseGuiElement {
14794
15324
  *
14795
15325
  * _Can only be used if this is flow, frame, label, table or empty-widget_
14796
15326
  *
15327
+ * **Note**
15328
+ *
15329
+ * Only top-level elements in {@link LuaGui#screen LuaGui::screen} can be `drag_target`s.
15330
+ *
14797
15331
  * {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.drag_target View documentation}
14798
- * @remarks Only top-level elements in {@link LuaGui#screen LuaGui::screen} can be `drag_target`s.
14799
15332
  * @example This creates a frame that contains a dragging handle which can move the frame.
14800
15333
  *
14801
15334
  * ```
@@ -15163,23 +15696,32 @@ interface LuaInventory extends ReadonlyArray<LuaItemStack> {
15163
15696
  /**
15164
15697
  * 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.
15165
15698
  *
15699
+ * **Note**
15700
+ *
15701
+ * "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.
15702
+ *
15166
15703
  * {@link https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.supports_bar View documentation}
15167
- * @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.
15168
15704
  */
15169
15705
  supports_bar(): boolean
15170
15706
  /**
15171
15707
  * Get the current bar. This is the index at which the red area starts.
15172
15708
  *
15709
+ * **Note**
15710
+ *
15711
+ * Only useable if this inventory supports having a bar.
15712
+ *
15173
15713
  * {@link https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.get_bar View documentation}
15174
- * @remarks Only useable if this inventory supports having a bar.
15175
15714
  */
15176
15715
  get_bar(): uint
15177
15716
  /**
15178
15717
  * Set the current bar.
15179
15718
  *
15719
+ * **Note**
15720
+ *
15721
+ * Only useable if this inventory supports having a bar.
15722
+ *
15180
15723
  * {@link https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.set_bar View documentation}
15181
15724
  * @param bar The new limit. Omitting this parameter will clear the limit.
15182
- * @remarks Only useable if this inventory supports having a bar.
15183
15725
  */
15184
15726
  set_bar(bar?: uint): void
15185
15727
  /**
@@ -15213,11 +15755,14 @@ interface LuaInventory extends ReadonlyArray<LuaItemStack> {
15213
15755
  /**
15214
15756
  * Sets the filter for the given item stack index.
15215
15757
  *
15758
+ * **Note**
15759
+ *
15760
+ * Some inventory slots don't allow some filters (gun ammo can't be filtered for non-ammo).
15761
+ *
15216
15762
  * {@link https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.set_filter View documentation}
15217
15763
  * @param index The item stack index
15218
15764
  * @param filter The new filter or nil to erase the filter
15219
15765
  * @returns If the filter was allowed to be set.
15220
- * @remarks Some inventory slots don't allow some filters (gun ammo can't be filtered for non-ammo).
15221
15766
  */
15222
15767
  set_filter(index: uint, filter: string | undefined): boolean
15223
15768
  /**
@@ -15248,9 +15793,13 @@ interface LuaInventory extends ReadonlyArray<LuaItemStack> {
15248
15793
  /**
15249
15794
  * Gets the number of the given item that can be inserted into this inventory.
15250
15795
  *
15796
+ * **Notes**
15797
+ * - 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.
15798
+ * - The main use for this is in checking how many of a basic item can fit into a basic inventory.
15799
+ * - This accounts for the 'bar' on the inventory.
15800
+ *
15251
15801
  * {@link https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.get_insertable_count View documentation}
15252
15802
  * @param item The item to check.
15253
- * @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.
15254
15803
  */
15255
15804
  get_insertable_count(item: string): void
15256
15805
  /**
@@ -15266,17 +15815,22 @@ interface LuaInventory extends ReadonlyArray<LuaItemStack> {
15266
15815
  * - {@link OnPreScriptInventoryResizedEvent on_pre_script_inventory_resized} _instantly_
15267
15816
  * - {@link OnScriptInventoryResizedEvent on_script_inventory_resized} _instantly_
15268
15817
  *
15818
+ * **Notes**
15819
+ * - Items in slots beyond the new capacity are deleted.
15820
+ * - Only inventories created by {@link LuaGameScript#create_inventory LuaGameScript::create_inventory} can be resized.
15269
15821
  *
15270
15822
  * {@link https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.resize View documentation}
15271
15823
  * @param size New size of a inventory
15272
- * @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.
15273
15824
  */
15274
15825
  resize(size: uint16): void
15275
15826
  /**
15276
15827
  * Destroys this inventory.
15277
15828
  *
15829
+ * **Note**
15830
+ *
15831
+ * Only inventories created by {@link LuaGameScript#create_inventory LuaGameScript::create_inventory} can be destroyed this way.
15832
+ *
15278
15833
  * {@link https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.destroy View documentation}
15279
- * @remarks Only inventories created by {@link LuaGameScript#create_inventory LuaGameScript::create_inventory} can be destroyed this way.
15280
15834
  */
15281
15835
  destroy(): void
15282
15836
  /**
@@ -15838,8 +16392,11 @@ interface LuaItemPrototype {
15838
16392
  *
15839
16393
  * _Can only be used if this is SelectionTool_
15840
16394
  *
16395
+ * **Note**
16396
+ *
16397
+ * The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
16398
+ *
15841
16399
  * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.entity_type_filters View documentation}
15842
- * @remarks The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
15843
16400
  */
15844
16401
  readonly entity_type_filters: Record<string, boolean>
15845
16402
  /**
@@ -15847,8 +16404,11 @@ interface LuaItemPrototype {
15847
16404
  *
15848
16405
  * _Can only be used if this is SelectionTool_
15849
16406
  *
16407
+ * **Note**
16408
+ *
16409
+ * The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
16410
+ *
15850
16411
  * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_entity_type_filters View documentation}
15851
- * @remarks The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
15852
16412
  */
15853
16413
  readonly alt_entity_type_filters: Record<string, boolean>
15854
16414
  /**
@@ -15856,8 +16416,11 @@ interface LuaItemPrototype {
15856
16416
  *
15857
16417
  * _Can only be used if this is SelectionTool_
15858
16418
  *
16419
+ * **Note**
16420
+ *
16421
+ * The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
16422
+ *
15859
16423
  * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_entity_type_filters View documentation}
15860
- * @remarks The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
15861
16424
  */
15862
16425
  readonly reverse_entity_type_filters: Record<string, boolean>
15863
16426
  /**
@@ -16464,8 +17027,11 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
16464
17027
  *
16465
17028
  * _Can only be used if this is SelectionTool_
16466
17029
  *
17030
+ * **Note**
17031
+ *
17032
+ * The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
17033
+ *
16467
17034
  * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.entity_type_filters View documentation}
16468
- * @remarks The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
16469
17035
  */
16470
17036
  readonly entity_type_filters: Record<string, boolean>
16471
17037
  /**
@@ -16473,8 +17039,11 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
16473
17039
  *
16474
17040
  * _Can only be used if this is SelectionTool_
16475
17041
  *
17042
+ * **Note**
17043
+ *
17044
+ * The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
17045
+ *
16476
17046
  * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.alt_entity_type_filters View documentation}
16477
- * @remarks The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
16478
17047
  */
16479
17048
  readonly alt_entity_type_filters: Record<string, boolean>
16480
17049
  /**
@@ -16482,8 +17051,11 @@ interface SelectionToolItemPrototype extends BaseItemPrototype {
16482
17051
  *
16483
17052
  * _Can only be used if this is SelectionTool_
16484
17053
  *
17054
+ * **Note**
17055
+ *
17056
+ * The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
17057
+ *
16485
17058
  * {@link https://lua-api.factorio.com/latest/LuaItemPrototype.html#LuaItemPrototype.reverse_entity_type_filters View documentation}
16486
- * @remarks The boolean value is meaningless and is used to allow easy lookup if a type exists in the dictionary.
16487
17059
  */
16488
17060
  readonly reverse_entity_type_filters: Record<string, boolean>
16489
17061
  /**
@@ -16572,9 +17144,12 @@ interface UpgradeItemPrototype extends BaseItemPrototype {
16572
17144
  /**
16573
17145
  * A reference to an item and count owned by some external entity.
16574
17146
  *
17147
+ * **Notes**
17148
+ * - 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.
17149
+ * - 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.
17150
+ *
16575
17151
  * {@link https://lua-api.factorio.com/latest/LuaItemStack.html View documentation}
16576
17152
  * @noSelf
16577
- * @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.
16578
17153
  */
16579
17154
  interface LuaItemStack {
16580
17155
  /**
@@ -16712,11 +17287,12 @@ interface LuaItemStack {
16712
17287
  */
16713
17288
  get_inventory(inventory: defines.inventory): LuaInventory | undefined
16714
17289
  /**
17290
+ * **Note**
16715
17291
  *
17292
+ * 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.
16716
17293
  *
16717
17294
  * {@link https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.build_blueprint View documentation}
16718
17295
  * @returns Array of created ghosts
16719
- * @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.
16720
17296
  */
16721
17297
  build_blueprint(params: {
16722
17298
  /**
@@ -17055,8 +17631,11 @@ interface LuaItemStack {
17055
17631
  /**
17056
17632
  * Durability of the contained item. Automatically capped at the item's maximum durability.
17057
17633
  *
17634
+ * **Note**
17635
+ *
17636
+ * When used on a non-tool item, the value of this attribute is `nil`.
17637
+ *
17058
17638
  * {@link https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.durability View documentation}
17059
- * @remarks When used on a non-tool item, the value of this attribute is `nil`.
17060
17639
  */
17061
17640
  durability: double | undefined
17062
17641
  /**
@@ -17430,11 +18009,12 @@ interface BaseItemStack {
17430
18009
  */
17431
18010
  get_inventory(inventory: defines.inventory): LuaInventory | undefined
17432
18011
  /**
18012
+ * **Note**
17433
18013
  *
18014
+ * 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.
17434
18015
  *
17435
18016
  * {@link https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.build_blueprint View documentation}
17436
18017
  * @returns Array of created ghosts
17437
- * @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.
17438
18018
  */
17439
18019
  build_blueprint(params: {
17440
18020
  /**
@@ -17613,8 +18193,11 @@ interface BaseItemStack {
17613
18193
  /**
17614
18194
  * Durability of the contained item. Automatically capped at the item's maximum durability.
17615
18195
  *
18196
+ * **Note**
18197
+ *
18198
+ * When used on a non-tool item, the value of this attribute is `nil`.
18199
+ *
17616
18200
  * {@link https://lua-api.factorio.com/latest/LuaItemStack.html#LuaItemStack.durability View documentation}
17617
- * @remarks When used on a non-tool item, the value of this attribute is `nil`.
17618
18201
  */
17619
18202
  durability: double | undefined
17620
18203
  /**
@@ -18674,8 +19257,11 @@ interface LuaLogisticPoint {
18674
19257
  /**
18675
19258
  * The logistic filters for this logistic point or `nil` if this doesn't use logistic filters.
18676
19259
  *
19260
+ * **Note**
19261
+ *
19262
+ * The returned array will always have an entry for each filter and will be indexed in sequence when not nil.
19263
+ *
18677
19264
  * {@link https://lua-api.factorio.com/latest/LuaLogisticPoint.html#LuaLogisticPoint.filters View documentation}
18678
- * @remarks The returned array will always have an entry for each filter and will be indexed in sequence when not nil.
18679
19265
  */
18680
19266
  readonly filters: LogisticFilter[] | undefined
18681
19267
  /**
@@ -18687,8 +19273,11 @@ interface LuaLogisticPoint {
18687
19273
  /**
18688
19274
  * The force of this logistic point.
18689
19275
  *
19276
+ * **Note**
19277
+ *
19278
+ * This will always be the same as the {@link LuaLogisticPoint#owner LuaLogisticPoint::owner} force.
19279
+ *
18690
19280
  * {@link https://lua-api.factorio.com/latest/LuaLogisticPoint.html#LuaLogisticPoint.force View documentation}
18691
- * @remarks This will always be the same as the {@link LuaLogisticPoint#owner LuaLogisticPoint::owner} force.
18692
19281
  */
18693
19282
  readonly force: LuaForce
18694
19283
  /**
@@ -19060,8 +19649,11 @@ interface LuaPermissionGroup {
19060
19649
  /**
19061
19650
  * The name of this group.
19062
19651
  *
19652
+ * **Note**
19653
+ *
19654
+ * Setting the name to `nil` or an empty string sets the name to the default value.
19655
+ *
19063
19656
  * {@link https://lua-api.factorio.com/latest/LuaPermissionGroup.html#LuaPermissionGroup.name View documentation}
19064
- * @remarks Setting the name to `nil` or an empty string sets the name to the default value.
19065
19657
  */
19066
19658
  name: string
19067
19659
  /**
@@ -19149,8 +19741,11 @@ interface LuaPlayer extends LuaControl {
19149
19741
  /**
19150
19742
  * Print text to the chat console.
19151
19743
  *
19744
+ * **Note**
19745
+ *
19746
+ * Messages that are identical to a message sent in the last 60 ticks are not printed again.
19747
+ *
19152
19748
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.print View documentation}
19153
- * @remarks Messages that are identical to a message sent in the last 60 ticks are not printed again.
19154
19749
  */
19155
19750
  print(message: LocalisedString, color?: Color): void
19156
19751
  /**
@@ -19176,8 +19771,11 @@ interface LuaPlayer extends LuaControl {
19176
19771
  /**
19177
19772
  * Set the controller type of the player.
19178
19773
  *
19774
+ * **Notes**
19775
+ * - Setting a player to {@link defines.controllers.editor} auto promotes the player to admin and enables cheat mode.
19776
+ * - Setting a player to {@link defines.controllers.editor} also requires the calling player be an admin.
19777
+ *
19179
19778
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.set_controller View documentation}
19180
- * @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.
19181
19779
  */
19182
19780
  set_controller(params: {
19183
19781
  /**
@@ -19289,7 +19887,6 @@ interface LuaPlayer extends LuaControl {
19289
19887
  * **Raised events:**
19290
19888
  * - {@link OnPlayerCursorStackChangedEvent on_player_cursor_stack_changed}? _current_tick_ Raised when the cursor was successfully cleared.
19291
19889
  *
19292
- *
19293
19890
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.clear_cursor View documentation}
19294
19891
  * @returns Whether the cursor is now empty.
19295
19892
  */
@@ -19297,10 +19894,13 @@ interface LuaPlayer extends LuaControl {
19297
19894
  /**
19298
19895
  * Creates and attaches a character entity to this player.
19299
19896
  *
19897
+ * **Note**
19898
+ *
19899
+ * The player must not have a character already connected and must be online (see {@link LuaPlayer#connected LuaPlayer::connected}).
19900
+ *
19300
19901
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.create_character View documentation}
19301
19902
  * @param character The character to create else the default is used.
19302
19903
  * @returns Whether the character was created.
19303
- * @remarks The player must not have a character already connected and must be online (see {@link LuaPlayer#connected LuaPlayer::connected}).
19304
19904
  */
19305
19905
  create_character(character?: string): boolean
19306
19906
  /**
@@ -19389,7 +19989,6 @@ interface LuaPlayer extends LuaControl {
19389
19989
  * **Raised events:**
19390
19990
  * - {@link OnPlayerPipetteEvent on_player_pipette}? _instantly_ Raised if the entity was successfully pipetted.
19391
19991
  *
19392
- *
19393
19992
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.pipette_entity View documentation}
19394
19993
  * @returns Whether the smart pipette found something to place.
19395
19994
  */
@@ -19420,7 +20019,6 @@ interface LuaPlayer extends LuaControl {
19420
20019
  * - {@link OnPreBuildEvent on_pre_build}? _instantly_ Raised if the cursor was successfully built.
19421
20020
  * - {@link OnBuiltEntityEvent on_built_entity}? _instantly_ Raised if the cursor was successfully built.
19422
20021
  *
19423
- *
19424
20022
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.can_build_from_cursor View documentation}
19425
20023
  */
19426
20024
  can_build_from_cursor(params: {
@@ -19448,8 +20046,11 @@ interface LuaPlayer extends LuaControl {
19448
20046
  /**
19449
20047
  * Builds what ever is in the cursor on the surface the player is on.
19450
20048
  *
20049
+ * **Notes**
20050
+ * - Anything built will fire normal player-built events.
20051
+ * - The cursor stack will automatically be reduced as if the player built normally.
20052
+ *
19451
20053
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.build_from_cursor View documentation}
19452
- * @remarks Anything built will fire normal player-built events.<br>The cursor stack will automatically be reduced as if the player built normally.
19453
20054
  */
19454
20055
  build_from_cursor(params: {
19455
20056
  /**
@@ -19506,31 +20107,44 @@ interface LuaPlayer extends LuaControl {
19506
20107
  /**
19507
20108
  * The characters associated with this player.
19508
20109
  *
20110
+ * **Notes**
20111
+ * - The array will always be empty when the player is disconnected (see {@link LuaPlayer#connected LuaPlayer::connected}) regardless of there being associated characters.
20112
+ * - Characters associated with this player will be logged off when this player disconnects but are not controlled by any player.
20113
+ *
19509
20114
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.get_associated_characters View documentation}
19510
- * @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.
19511
20115
  */
19512
20116
  get_associated_characters(): LuaEntity[]
19513
20117
  /**
19514
20118
  * Associates a character with this player.
19515
20119
  *
20120
+ * **Notes**
20121
+ * - The character must not be connected to any controller.
20122
+ * - If this player is currently disconnected (see {@link LuaPlayer#connected LuaPlayer::connected}) the character will be immediately "logged off".
20123
+ * - See {@link LuaPlayer#get_associated_characters LuaPlayer::get_associated_characters} for more information.
20124
+ *
19516
20125
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.associate_character View documentation}
19517
20126
  * @param character The character entity.
19518
- * @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.
19519
20127
  */
19520
20128
  associate_character(character: LuaEntity): void
19521
20129
  /**
19522
20130
  * Disassociates a character from this player. This is functionally the same as setting {@link LuaEntity#associated_player LuaEntity::associated_player} to `nil`.
19523
20131
  *
20132
+ * **Note**
20133
+ *
20134
+ * See {@link LuaPlayer#get_associated_characters LuaPlayer::get_associated_characters} for more information.
20135
+ *
19524
20136
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.disassociate_character View documentation}
19525
20137
  * @param character The character entity
19526
- * @remarks See {@link LuaPlayer#get_associated_characters LuaPlayer::get_associated_characters} for more information.
19527
20138
  */
19528
20139
  disassociate_character(character: LuaEntity): void
19529
20140
  /**
19530
20141
  * 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.
19531
20142
  *
20143
+ * **Notes**
20144
+ * - 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.
20145
+ * - Local flying text is not saved, which means it will disappear after a save/load-cycle.
20146
+ *
19532
20147
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.create_local_flying_text View documentation}
19533
- * @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.
19534
20148
  */
19535
20149
  create_local_flying_text(params: {
19536
20150
  /**
@@ -19649,8 +20263,11 @@ interface LuaPlayer extends LuaControl {
19649
20263
  /**
19650
20264
  * Asks the player if they would like to connect to the given server.
19651
20265
  *
20266
+ * **Note**
20267
+ *
20268
+ * This only does anything when used on a multiplayer peer. Single player and server hosts will ignore the prompt.
20269
+ *
19652
20270
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.connect_to_server View documentation}
19653
- * @remarks This only does anything when used on a multiplayer peer. Single player and server hosts will ignore the prompt.
19654
20271
  */
19655
20272
  connect_to_server(params: {
19656
20273
  /**
@@ -19674,7 +20291,6 @@ interface LuaPlayer extends LuaControl {
19674
20291
  * - {@link OnPrePlayerToggledMapEditorEvent on_pre_player_toggled_map_editor}? _instantly_ Raised if the map editor was successfully toggled.
19675
20292
  * - {@link OnPlayerToggledMapEditorEvent on_player_toggled_map_editor}? _instantly_ Raised if the map editor was successfully toggled.
19676
20293
  *
19677
- *
19678
20294
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.toggle_map_editor View documentation}
19679
20295
  */
19680
20296
  toggle_map_editor(): void
@@ -19684,10 +20300,12 @@ interface LuaPlayer extends LuaControl {
19684
20300
  * **Raised events:**
19685
20301
  * - {@link OnStringTranslatedEvent on_string_translated}? _future_tick_ Raised if the request was successfully sent.
19686
20302
  *
20303
+ * **Note**
20304
+ *
20305
+ * Does nothing if this player is not connected. (see {@link LuaPlayer#connected LuaPlayer::connected}).
19687
20306
  *
19688
20307
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.request_translation View documentation}
19689
20308
  * @returns Whether the request was sent or not.
19690
- * @remarks Does nothing if this player is not connected. (see {@link LuaPlayer#connected LuaPlayer::connected}).
19691
20309
  */
19692
20310
  request_translation(localised_string: LocalisedString): boolean
19693
20311
  /**
@@ -19750,15 +20368,21 @@ interface LuaPlayer extends LuaControl {
19750
20368
  /**
19751
20369
  * The character attached to this player, or `nil` if no character.
19752
20370
  *
20371
+ * **Note**
20372
+ *
20373
+ * Will also return `nil` when the player is disconnected (see {@link LuaPlayer#connected LuaPlayer::connected}).
20374
+ *
19753
20375
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.character View documentation}
19754
- * @remarks Will also return `nil` when the player is disconnected (see {@link LuaPlayer#connected LuaPlayer::connected}).
19755
20376
  */
19756
20377
  character: LuaEntity | undefined
19757
20378
  /**
19758
20379
  * When in a cutscene; the character this player would be using once the cutscene is over.
19759
20380
  *
20381
+ * **Note**
20382
+ *
20383
+ * Will also return `nil` when the player is disconnected (see {@link LuaPlayer#connected LuaPlayer::connected}).
20384
+ *
19760
20385
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.cutscene_character View documentation}
19761
- * @remarks Will also return `nil` when the player is disconnected (see {@link LuaPlayer#connected LuaPlayer::connected}).
19762
20386
  */
19763
20387
  readonly cutscene_character: LuaEntity | undefined
19764
20388
  /**
@@ -19778,8 +20402,11 @@ interface LuaPlayer extends LuaControl {
19778
20402
  /**
19779
20403
  * The stashed controller type or `nil` if no controller is stashed.
19780
20404
  *
20405
+ * **Note**
20406
+ *
20407
+ * This is mainly useful when a player is in the map editor.
20408
+ *
19781
20409
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.stashed_controller_type View documentation}
19782
- * @remarks This is mainly useful when a player is in the map editor.
19783
20410
  */
19784
20411
  readonly stashed_controller_type: defines.controllers | undefined
19785
20412
  /**
@@ -19829,8 +20456,11 @@ interface LuaPlayer extends LuaControl {
19829
20456
  /**
19830
20457
  * `true` if the player is an admin.
19831
20458
  *
20459
+ * **Note**
20460
+ *
20461
+ * Trying to change player admin status from the console when you aren't an admin does nothing.
20462
+ *
19832
20463
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.admin View documentation}
19833
- * @remarks Trying to change player admin status from the console when you aren't an admin does nothing.
19834
20464
  */
19835
20465
  admin: boolean
19836
20466
  /**
@@ -19868,29 +20498,41 @@ interface LuaPlayer extends LuaControl {
19868
20498
  /**
19869
20499
  * 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}.
19870
20500
  *
20501
+ * **Note**
20502
+ *
20503
+ * This table will become invalid if its associated player does.
20504
+ *
19871
20505
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.mod_settings View documentation}
19872
- * @remarks This table will become invalid if its associated player does.
19873
20506
  */
19874
20507
  readonly mod_settings: LuaCustomTable<string, ModSetting>
19875
20508
  /**
19876
20509
  * The number of ticks until this player will respawn or `nil` if not waiting to respawn.
19877
20510
  *
20511
+ * **Notes**
20512
+ * - Set to `nil` to immediately respawn the player.
20513
+ * - Set to any positive value to trigger the respawn state for this player.
20514
+ *
19878
20515
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.ticks_to_respawn View documentation}
19879
- * @remarks Set to `nil` to immediately respawn the player.<br>Set to any positive value to trigger the respawn state for this player.
19880
20516
  */
19881
20517
  ticks_to_respawn: uint | undefined
19882
20518
  /**
19883
20519
  * The display resolution for this player.
19884
20520
  *
20521
+ * **Note**
20522
+ *
20523
+ * 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.
20524
+ *
19885
20525
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.display_resolution View documentation}
19886
- * @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.
19887
20526
  */
19888
20527
  readonly display_resolution: DisplayResolution
19889
20528
  /**
19890
20529
  * The display scale for this player.
19891
20530
  *
20531
+ * **Note**
20532
+ *
20533
+ * 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.
20534
+ *
19892
20535
  * {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.display_scale View documentation}
19893
- * @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.
19894
20536
  */
19895
20537
  readonly display_scale: double
19896
20538
  /**
@@ -19970,9 +20612,12 @@ interface LuaPlayer extends LuaControl {
19970
20612
  /**
19971
20613
  * An object used to measure script performance.
19972
20614
  *
20615
+ * **Note**
20616
+ *
20617
+ * 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}.
20618
+ *
19973
20619
  * {@link https://lua-api.factorio.com/latest/LuaProfiler.html View documentation}
19974
20620
  * @noSelf
19975
- * @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}.
19976
20621
  */
19977
20622
  interface LuaProfiler {
19978
20623
  /**
@@ -19996,17 +20641,23 @@ interface LuaProfiler {
19996
20641
  /**
19997
20642
  * Add the duration of another timer to this timer. Useful to reduce start/stop overhead when accumulating time onto many timers at once.
19998
20643
  *
20644
+ * **Note**
20645
+ *
20646
+ * If other is running, the time to now will be added.
20647
+ *
19999
20648
  * {@link https://lua-api.factorio.com/latest/LuaProfiler.html#LuaProfiler.add View documentation}
20000
20649
  * @param other The timer to add to this timer.
20001
- * @remarks If other is running, the time to now will be added.
20002
20650
  */
20003
20651
  add(other: LuaProfiler): void
20004
20652
  /**
20005
20653
  * Divides the current duration by a set value. Useful for calculating the average of many iterations.
20006
20654
  *
20655
+ * **Note**
20656
+ *
20657
+ * Does nothing if this isn't stopped.
20658
+ *
20007
20659
  * {@link https://lua-api.factorio.com/latest/LuaProfiler.html#LuaProfiler.divide View documentation}
20008
20660
  * @param number The number to divide by. Must be > 0.
20009
- * @remarks Does nothing if this isn't stopped.
20010
20661
  */
20011
20662
  divide(number: double): void
20012
20663
  /**
@@ -20031,7 +20682,8 @@ interface LuaProfiler {
20031
20682
  */
20032
20683
  interface LuaProgrammableSpeakerControlBehavior extends LuaControlBehavior {
20033
20684
  circuit_parameters: ProgrammableSpeakerCircuitParameters
20034
- circuit_condition: CircuitConditionDefinition
20685
+ get circuit_condition(): CircuitConditionDefinitionRead
20686
+ set circuit_condition(value: CircuitConditionDefinition)
20035
20687
  /**
20036
20688
  * Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
20037
20689
  */
@@ -20168,7 +20820,8 @@ interface LuaRailSignalControlBehavior extends LuaControlBehavior {
20168
20820
  *
20169
20821
  * {@link https://lua-api.factorio.com/latest/LuaRailSignalControlBehavior.html#LuaRailSignalControlBehavior.circuit_condition View documentation}
20170
20822
  */
20171
- circuit_condition: CircuitConditionDefinition
20823
+ get circuit_condition(): CircuitConditionDefinitionRead
20824
+ set circuit_condition(value: CircuitConditionDefinition)
20172
20825
  /**
20173
20826
  * Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
20174
20827
  */
@@ -20184,7 +20837,7 @@ interface LuaRailSignalControlBehavior extends LuaControlBehavior {
20184
20837
  }
20185
20838
 
20186
20839
  /**
20187
- * 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.
20840
+ * 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.
20188
20841
  *
20189
20842
  * {@link https://lua-api.factorio.com/latest/LuaRandomGenerator.html View documentation}
20190
20843
  * @noSelf
@@ -20199,8 +20852,11 @@ interface LuaRandomGenerator {
20199
20852
  /**
20200
20853
  * Re-seeds the random generator with the given value.
20201
20854
  *
20855
+ * **Note**
20856
+ *
20857
+ * Seeds that are close together will produce similar results. Seeds from 0 to 341 will produce the same results.
20858
+ *
20202
20859
  * {@link https://lua-api.factorio.com/latest/LuaRandomGenerator.html#LuaRandomGenerator.re_seed View documentation}
20203
- * @remarks Seeds that are close together will produce similar results. Seeds from 0 to 341 will produce the same results.
20204
20860
  */
20205
20861
  re_seed(seed: uint): void
20206
20862
  /**
@@ -20574,10 +21230,13 @@ interface LuaRemote {
20574
21230
  /**
20575
21231
  * Add a remote interface.
20576
21232
  *
21233
+ * **Note**
21234
+ *
21235
+ * It is an error if the given interface `name` is already registered.
21236
+ *
20577
21237
  * {@link https://lua-api.factorio.com/latest/LuaRemote.html#LuaRemote.add_interface View documentation}
20578
21238
  * @param name Name of the interface.
20579
21239
  * @param functions List of functions that are members of the new interface.
20580
- * @remarks It is an error if the given interface `name` is already registered.
20581
21240
  */
20582
21241
  add_interface(name: string, functions: Record<string, (...args: any) => void>): void
20583
21242
  /**
@@ -20618,9 +21277,12 @@ interface LuaRemote {
20618
21277
  /**
20619
21278
  * 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.
20620
21279
  *
21280
+ * **Note**
21281
+ *
21282
+ * If an entity target of an object is destroyed or changes surface, then the object is also destroyed.
21283
+ *
20621
21284
  * {@link https://lua-api.factorio.com/latest/LuaRendering.html View documentation}
20622
21285
  * @noSelf
20623
- * @remarks If an entity target of an object is destroyed or changes surface, then the object is also destroyed.
20624
21286
  */
20625
21287
  interface LuaRendering {
20626
21288
  /**
@@ -20692,9 +21354,12 @@ interface LuaRendering {
20692
21354
  /**
20693
21355
  * Create a text.
20694
21356
  *
21357
+ * **Note**
21358
+ *
21359
+ * Not all fonts support scaling.
21360
+ *
20695
21361
  * {@link https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_text View documentation}
20696
21362
  * @returns Id of the render object
20697
- * @remarks Not all fonts support scaling.
20698
21363
  */
20699
21364
  draw_text(params: {
20700
21365
  /**
@@ -21044,9 +21709,12 @@ interface LuaRendering {
21044
21709
  /**
21045
21710
  * Create a light.
21046
21711
  *
21712
+ * **Note**
21713
+ *
21714
+ * The base game uses the utility sprites `light_medium` and `light_small` for lights.
21715
+ *
21047
21716
  * {@link https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.draw_light View documentation}
21048
21717
  * @returns Id of the render object
21049
- * @remarks The base game uses the utility sprites `light_medium` and `light_small` for lights.
21050
21718
  */
21051
21719
  draw_light(params: {
21052
21720
  readonly sprite: SpritePath
@@ -21112,7 +21780,7 @@ interface LuaRendering {
21112
21780
  */
21113
21781
  draw_animation(params: {
21114
21782
  /**
21115
- * Name of an {@link https://wiki.factorio.com/Prototype/Animation animation prototype}.
21783
+ * Name of an {@linkplain https://wiki.factorio.com/Prototype/Animation animation prototype}.
21116
21784
  */
21117
21785
  readonly animation: string
21118
21786
  /**
@@ -21422,9 +22090,12 @@ interface LuaRendering {
21422
22090
  *
21423
22091
  * _Can only be used if this is Text, Circle, Arc, Polygon, Sprite, Light or Animation_
21424
22092
  *
22093
+ * **Note**
22094
+ *
22095
+ * Polygon vertices that are set to an entity will ignore this.
22096
+ *
21425
22097
  * {@link https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_target View documentation}
21426
22098
  * @returns `nil` if the object does not support target.
21427
- * @remarks Polygon vertices that are set to an entity will ignore this.
21428
22099
  */
21429
22100
  get_target(id: uint64): ScriptRenderTarget | undefined
21430
22101
  /**
@@ -21432,8 +22103,11 @@ interface LuaRendering {
21432
22103
  *
21433
22104
  * _Can only be used if this is Text, Circle, Arc, Polygon, Sprite, Light or Animation_
21434
22105
  *
22106
+ * **Note**
22107
+ *
22108
+ * Polygon vertices that are set to an entity will ignore this.
22109
+ *
21435
22110
  * {@link https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_target View documentation}
21436
- * @remarks Polygon vertices that are set to an entity will ignore this.
21437
22111
  */
21438
22112
  set_target(id: uint64, target: MapPosition | LuaEntity, target_offset?: Vector): void
21439
22113
  /**
@@ -21441,9 +22115,12 @@ interface LuaRendering {
21441
22115
  *
21442
22116
  * _Can only be used if this is Text, Polygon, Sprite, Light or Animation_
21443
22117
  *
22118
+ * **Note**
22119
+ *
22120
+ * Polygon vertices that are set to an entity will ignore this.
22121
+ *
21444
22122
  * {@link https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_orientation View documentation}
21445
22123
  * @returns `nil` if the object is not a text, polygon, sprite, light or animation.
21446
- * @remarks Polygon vertices that are set to an entity will ignore this.
21447
22124
  */
21448
22125
  get_orientation(id: uint64): RealOrientation | undefined
21449
22126
  /**
@@ -21451,8 +22128,11 @@ interface LuaRendering {
21451
22128
  *
21452
22129
  * _Can only be used if this is Text, Polygon, Sprite, Light or Animation_
21453
22130
  *
22131
+ * **Note**
22132
+ *
22133
+ * Polygon vertices that are set to an entity will ignore this.
22134
+ *
21454
22135
  * {@link https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_orientation View documentation}
21455
- * @remarks Polygon vertices that are set to an entity will ignore this.
21456
22136
  */
21457
22137
  set_orientation(id: uint64, orientation: RealOrientation): void
21458
22138
  /**
@@ -21801,9 +22481,12 @@ interface LuaRendering {
21801
22481
  *
21802
22482
  * _Can only be used if this is Polygon, Sprite or Animation_
21803
22483
  *
22484
+ * **Note**
22485
+ *
22486
+ * Polygon vertices that are set to an entity will ignore this.
22487
+ *
21804
22488
  * {@link https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_orientation_target View documentation}
21805
22489
  * @returns `nil` if no target or if this object is not a polygon, sprite, or animation.
21806
- * @remarks Polygon vertices that are set to an entity will ignore this.
21807
22490
  */
21808
22491
  get_orientation_target(id: uint64): ScriptRenderTarget | undefined
21809
22492
  /**
@@ -21811,8 +22494,11 @@ interface LuaRendering {
21811
22494
  *
21812
22495
  * _Can only be used if this is Polygon, Sprite or Animation_
21813
22496
  *
22497
+ * **Note**
22498
+ *
22499
+ * Polygon vertices that are set to an entity will ignore this.
22500
+ *
21814
22501
  * {@link https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.set_orientation_target View documentation}
21815
- * @remarks Polygon vertices that are set to an entity will ignore this.
21816
22502
  */
21817
22503
  set_orientation_target(
21818
22504
  id: uint64,
@@ -22028,8 +22714,11 @@ interface LuaSettings {
22028
22714
  /**
22029
22715
  * 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}.
22030
22716
  *
22717
+ * **Note**
22718
+ *
22719
+ * This table will become invalid if its associated player does.
22720
+ *
22031
22721
  * {@link https://lua-api.factorio.com/latest/LuaSettings.html#LuaSettings.get_player_settings View documentation}
22032
- * @remarks This table will become invalid if its associated player does.
22033
22722
  */
22034
22723
  get_player_settings(player: PlayerIdentification): LuaCustomTable<string, ModSetting>
22035
22724
  /**
@@ -23336,8 +24025,11 @@ interface LuaSurface {
23336
24025
  /**
23337
24026
  * Get the pollution for a given position.
23338
24027
  *
24028
+ * **Note**
24029
+ *
24030
+ * Pollution is stored per chunk, so this will return the same value for all positions in one chunk.
24031
+ *
23339
24032
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_pollution View documentation}
23340
- * @remarks Pollution is stored per chunk, so this will return the same value for all positions in one chunk.
23341
24033
  * @example
23342
24034
  *
23343
24035
  * ```
@@ -23580,6 +24272,10 @@ interface LuaSurface {
23580
24272
  /**
23581
24273
  * Find a non-colliding position within a given radius.
23582
24274
  *
24275
+ * **Note**
24276
+ *
24277
+ * 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.
24278
+ *
23583
24279
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_non_colliding_position View documentation}
23584
24280
  * @param name Prototype name of the entity to find a position for. (The bounding box for the collision checking is taken from this prototype.)
23585
24281
  * @param center Center of the search area.
@@ -23587,7 +24283,6 @@ interface LuaSurface {
23587
24283
  * @param precision The step length from the given position as it searches, in tiles. Minimum value is `0.01`.
23588
24284
  * @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.
23589
24285
  * @returns The non-colliding position. May be `nil` if no suitable position was found.
23590
- * @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.
23591
24286
  */
23592
24287
  find_non_colliding_position(
23593
24288
  name: string,
@@ -23633,11 +24328,14 @@ interface LuaSurface {
23633
24328
  /**
23634
24329
  * Find enemy units (entities with type "unit") of a given force within an area.
23635
24330
  *
24331
+ * **Note**
24332
+ *
24333
+ * This is more efficient than {@link LuaSurface#find_entities LuaSurface::find_entities}.
24334
+ *
23636
24335
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_enemy_units View documentation}
23637
24336
  * @param center Center of the search area
23638
24337
  * @param radius Radius of the circular search area
23639
24338
  * @param force Force to find enemies of. If not given, uses the player force.
23640
- * @remarks This is more efficient than {@link LuaSurface#find_entities LuaSurface::find_entities}.
23641
24339
  * @example Find all units who would be interested to attack the player, within 100-tile area.
23642
24340
  *
23643
24341
  * ```
@@ -23648,8 +24346,11 @@ interface LuaSurface {
23648
24346
  /**
23649
24347
  * Find units (entities with type "unit") of a given force and force condition within a given area.
23650
24348
  *
24349
+ * **Note**
24350
+ *
24351
+ * This is more efficient than {@link LuaSurface#find_entities LuaSurface::find_entities}.
24352
+ *
23651
24353
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_units View documentation}
23652
- * @remarks This is more efficient than {@link LuaSurface#find_entities LuaSurface::find_entities}.
23653
24354
  * @example Find friendly units to "player" force
23654
24355
  *
23655
24356
  * ```
@@ -23676,7 +24377,7 @@ interface LuaSurface {
23676
24377
  readonly condition: ForceCondition
23677
24378
  }): LuaEntity[]
23678
24379
  /**
23679
- * Find the enemy military target ({@link https://wiki.factorio.com/Military_units_and_structures military entity}) closest to the given position.
24380
+ * Find the enemy military target ({@linkplain https://wiki.factorio.com/Military_units_and_structures military entity}) closest to the given position.
23680
24381
  *
23681
24382
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.find_nearest_enemy View documentation}
23682
24383
  * @returns The nearest enemy military target or `nil` if no enemy could be found within the given area.
@@ -23744,7 +24445,6 @@ interface LuaSurface {
23744
24445
  * **Raised events:**
23745
24446
  * - {@link ScriptRaisedBuiltEvent script_raised_built}? _instantly_ Raised if the `raise_built` flag was set and the entity was successfully created.
23746
24447
  *
23747
- *
23748
24448
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity View documentation}
23749
24449
  * @returns The created entity or `nil` if the creation failed.
23750
24450
  * @example
@@ -23819,7 +24519,6 @@ interface LuaSurface {
23819
24519
  * **Raised events:**
23820
24520
  * - {@link OnUnitGroupCreatedEvent on_unit_group_created} _instantly_
23821
24521
  *
23822
- *
23823
24522
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_unit_group View documentation}
23824
24523
  */
23825
24524
  create_unit_group(params: {
@@ -23835,18 +24534,24 @@ interface LuaSurface {
23835
24534
  /**
23836
24535
  * Send a group to build a new base.
23837
24536
  *
24537
+ * **Note**
24538
+ *
24539
+ * The specified force must be AI-controlled; i.e. `force.ai_controllable` must be `true`.
24540
+ *
23838
24541
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.build_enemy_base View documentation}
23839
24542
  * @param position Location of the new base.
23840
24543
  * @param unit_count Number of biters to send for the base-building task.
23841
24544
  * @param force Force the new base will belong to. Defaults to enemy.
23842
- * @remarks The specified force must be AI-controlled; i.e. `force.ai_controllable` must be `true`.
23843
24545
  */
23844
24546
  build_enemy_base(position: MapPosition, unit_count: uint, force?: ForceIdentification): void
23845
24547
  /**
23846
24548
  * Get the tile at a given position.
23847
24549
  *
24550
+ * **Note**
24551
+ *
24552
+ * The input position params can also be a single tile position.
24553
+ *
23848
24554
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_tile View documentation}
23849
- * @remarks The input position params can also be a single tile position.
23850
24555
  */
23851
24556
  get_tile(x: int, y: int): LuaTile
23852
24557
  /**
@@ -23857,13 +24562,15 @@ interface LuaSurface {
23857
24562
  * **Raised events:**
23858
24563
  * - {@link ScriptRaisedSetTilesEvent script_raised_set_tiles}? _instantly_ Raised if the `raise_event` flag was set.
23859
24564
  *
24565
+ * **Note**
24566
+ *
24567
+ * 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.
23860
24568
  *
23861
24569
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.set_tiles View documentation}
23862
24570
  * @param correct_tiles If `false`, the correction logic is not applied to the changed tiles. Defaults to `true`.
23863
24571
  * @param remove_colliding_entities `true`, `false`, or `abort_on_collision`. Defaults to `true`.
23864
24572
  * @param remove_colliding_decoratives `true` or `false`. Defaults to `true`.
23865
24573
  * @param raise_event `true` or `false`. Defaults to `false`.
23866
- * @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.
23867
24574
  */
23868
24575
  set_tiles(
23869
24576
  tiles: readonly Tile[],
@@ -23936,7 +24643,6 @@ interface LuaSurface {
23936
24643
  * **Raised events:**
23937
24644
  * - {@link OnMarkedForDeconstructionEvent on_marked_for_deconstruction}? _instantly_ Raised for every entity that has been successfully marked for deconstruction.
23938
24645
  *
23939
- *
23940
24646
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.deconstruct_area View documentation}
23941
24647
  */
23942
24648
  deconstruct_area(params: {
@@ -23967,7 +24673,6 @@ interface LuaSurface {
23967
24673
  * **Raised events:**
23968
24674
  * - {@link OnCancelledDeconstructionEvent on_cancelled_deconstruction}? _instantly_ Raised for every entity whose deconstruction has been successfully cancelled.
23969
24675
  *
23970
- *
23971
24676
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.cancel_deconstruct_area View documentation}
23972
24677
  */
23973
24678
  cancel_deconstruct_area(params: {
@@ -23998,7 +24703,6 @@ interface LuaSurface {
23998
24703
  * **Raised events:**
23999
24704
  * - {@link OnMarkedForUpgradeEvent on_marked_for_upgrade}? _instantly_ Raised for every entity that has been successfully marked for upgrade.
24000
24705
  *
24001
- *
24002
24706
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.upgrade_area View documentation}
24003
24707
  */
24004
24708
  upgrade_area(params: {
@@ -24029,7 +24733,6 @@ interface LuaSurface {
24029
24733
  * **Raised events:**
24030
24734
  * - {@link OnCancelledUpgradeEvent on_cancelled_upgrade}? _instantly_ Raised for every entity whose upgrade has been successfully cancelled.
24031
24735
  *
24032
- *
24033
24736
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.cancel_upgrade_area View documentation}
24034
24737
  */
24035
24738
  cancel_upgrade_area(params: {
@@ -24073,11 +24776,14 @@ interface LuaSurface {
24073
24776
  /**
24074
24777
  * Gets all tiles of the given types that are connected horizontally or vertically to the given tile position including the given tile position.
24075
24778
  *
24779
+ * **Note**
24780
+ *
24781
+ * This won't find tiles in non-generated chunks.
24782
+ *
24076
24783
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.get_connected_tiles View documentation}
24077
24784
  * @param position The tile position to start at.
24078
24785
  * @param tiles The tiles to search for.
24079
24786
  * @returns The resulting set of tiles.
24080
- * @remarks This won't find tiles in non-generated chunks.
24081
24787
  */
24082
24788
  get_connected_tiles(position: TilePosition, tiles: readonly string[]): TilePositionTable[]
24083
24789
  /**
@@ -24085,7 +24791,6 @@ interface LuaSurface {
24085
24791
  * - {@link OnPreChunkDeletedEvent on_pre_chunk_deleted} _future_tick_
24086
24792
  * - {@link OnChunkDeletedEvent on_chunk_deleted} _future_tick_
24087
24793
  *
24088
- *
24089
24794
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.delete_chunk View documentation}
24090
24795
  * @param position The chunk position to delete
24091
24796
  */
@@ -24093,26 +24798,35 @@ interface LuaSurface {
24093
24798
  /**
24094
24799
  * Regenerate autoplacement of some entities on this surface. This can be used to autoplace newly-added entities.
24095
24800
  *
24801
+ * **Note**
24802
+ *
24803
+ * All specified entity prototypes must be autoplacable. If nothing is given all entities are generated on all chunks.
24804
+ *
24096
24805
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.regenerate_entity View documentation}
24097
24806
  * @param entities Prototype names of entity or entities to autoplace. When `nil` all entities with an autoplace are used.
24098
24807
  * @param chunks The chunk positions to regenerate the entities on. If not given all chunks are regenerated. Note chunks with status < entities are ignored.
24099
- * @remarks All specified entity prototypes must be autoplacable. If nothing is given all entities are generated on all chunks.
24100
24808
  */
24101
24809
  regenerate_entity(entities?: string | readonly string[], chunks?: readonly ChunkPosition[]): void
24102
24810
  /**
24103
24811
  * Regenerate autoplacement of some decoratives on this surface. This can be used to autoplace newly-added decoratives.
24104
24812
  *
24813
+ * **Note**
24814
+ *
24815
+ * All specified decorative prototypes must be autoplacable. If nothing is given all decoratives are generated on all chunks.
24816
+ *
24105
24817
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.regenerate_decorative View documentation}
24106
24818
  * @param decoratives Prototype names of decorative or decoratives to autoplace. When `nil` all decoratives with an autoplace are used.
24107
24819
  * @param chunks The chunk positions to regenerate the entities on. If not given all chunks are regenerated. Note chunks with status < entities are ignored.
24108
- * @remarks All specified decorative prototypes must be autoplacable. If nothing is given all decoratives are generated on all chunks.
24109
24820
  */
24110
24821
  regenerate_decorative(decoratives?: string | readonly string[], chunks?: readonly ChunkPosition[]): void
24111
24822
  /**
24112
24823
  * Print text to the chat console of all players on this surface.
24113
24824
  *
24825
+ * **Note**
24826
+ *
24827
+ * Messages that are identical to a message sent in the last 60 ticks are not printed again.
24828
+ *
24114
24829
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.print View documentation}
24115
- * @remarks Messages that are identical to a message sent in the last 60 ticks are not printed again.
24116
24830
  */
24117
24831
  print(message: LocalisedString, color?: Color): void
24118
24832
  /**
@@ -24140,8 +24854,11 @@ interface LuaSurface {
24140
24854
  /**
24141
24855
  * Adds the given decoratives to the surface.
24142
24856
  *
24857
+ * **Note**
24858
+ *
24859
+ * This will merge decoratives of the same type that already exist effectively increasing the "amount" field.
24860
+ *
24143
24861
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_decoratives View documentation}
24144
- * @remarks This will merge decoratives of the same type that already exist effectively increasing the "amount" field.
24145
24862
  */
24146
24863
  create_decoratives(params: {
24147
24864
  /**
@@ -24235,9 +24952,11 @@ interface LuaSurface {
24235
24952
  * - {@link OnEntityClonedEvent on_entity_cloned} _instantly_ Raised for every entity that was cloned.
24236
24953
  * - {@link OnAreaClonedEvent on_area_cloned} _instantly_ Raised after the individual `on_entity_cloned` events.
24237
24954
  *
24955
+ * **Note**
24956
+ *
24957
+ * Entities are cloned in an order such that they can always be created, eg rails before trains.
24238
24958
  *
24239
24959
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_area View documentation}
24240
- * @remarks Entities are cloned in an order such that they can always be created, eg rails before trains.
24241
24960
  */
24242
24961
  clone_area(params: {
24243
24962
  readonly source_area: BoundingBox
@@ -24276,8 +24995,11 @@ interface LuaSurface {
24276
24995
  /**
24277
24996
  * Clones the given area.
24278
24997
  *
24998
+ * **Notes**
24999
+ * - {@link defines.events.on_entity_cloned} is raised for each entity, and then {@link defines.events.on_area_cloned} is raised.
25000
+ * - Entities are cloned in an order such that they can always be created, eg rails before trains.
25001
+ *
24279
25002
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_brush View documentation}
24280
- * @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.
24281
25003
  */
24282
25004
  clone_brush(params: {
24283
25005
  readonly source_offset: TilePosition
@@ -24324,9 +25046,11 @@ interface LuaSurface {
24324
25046
  * **Raised events:**
24325
25047
  * - {@link OnEntityClonedEvent on_entity_cloned} _instantly_ Raised for every entity that was cloned.
24326
25048
  *
25049
+ * **Note**
25050
+ *
25051
+ * Entities are cloned in an order such that they can always be created, eg rails before trains.
24327
25052
  *
24328
25053
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clone_entities View documentation}
24329
- * @remarks Entities are cloned in an order such that they can always be created, eg rails before trains.
24330
25054
  */
24331
25055
  clone_entities(params: {
24332
25056
  readonly entities: readonly LuaEntity[]
@@ -24346,7 +25070,6 @@ interface LuaSurface {
24346
25070
  * - {@link OnPreSurfaceClearedEvent on_pre_surface_cleared} _future_tick_
24347
25071
  * - {@link OnSurfaceClearedEvent on_surface_cleared} _future_tick_
24348
25072
  *
24349
- *
24350
25073
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.clear View documentation}
24351
25074
  * @param ignore_characters Whether characters on this surface that are connected to or associated with players should be ignored (not destroyed).
24352
25075
  */
@@ -24359,7 +25082,6 @@ interface LuaSurface {
24359
25082
  * **Raised events:**
24360
25083
  * - {@link OnScriptPathRequestFinishedEvent on_script_path_request_finished} _future_tick_
24361
25084
  *
24362
- *
24363
25085
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.request_path View documentation}
24364
25086
  * @returns A unique handle to identify this call when {@link OnScriptPathRequestFinishedEvent on_script_path_request_finished} fires.
24365
25087
  */
@@ -24559,8 +25281,11 @@ interface LuaSurface {
24559
25281
  /**
24560
25282
  * The name of this surface. Names are unique among surfaces.
24561
25283
  *
25284
+ * **Note**
25285
+ *
25286
+ * the default surface can't be renamed.
25287
+ *
24562
25288
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.name View documentation}
24563
- * @remarks the default surface can't be renamed.
24564
25289
  */
24565
25290
  name: string
24566
25291
  /**
@@ -24663,8 +25388,11 @@ interface LuaSurface {
24663
25388
  /**
24664
25389
  * The multiplier of solar power on this surface. Cannot be less than 0.
24665
25390
  *
25391
+ * **Note**
25392
+ *
25393
+ * Solar equipment is still limited to its maximum power output.
25394
+ *
24666
25395
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.solar_power_multiplier View documentation}
24667
- * @remarks Solar equipment is still limited to its maximum power output.
24668
25396
  */
24669
25397
  solar_power_multiplier: double
24670
25398
  /**
@@ -24692,8 +25420,11 @@ interface LuaSurface {
24692
25420
  /**
24693
25421
  * If clouds are shown on this surface.
24694
25422
  *
25423
+ * **Note**
25424
+ *
25425
+ * If false, clouds are never shown. If true the player must also have clouds enabled in graphics settings for them to be shown.
25426
+ *
24695
25427
  * {@link https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.show_clouds View documentation}
24696
- * @remarks If false, clouds are never shown. If true the player must also have clouds enabled in graphics settings for them to be shown.
24697
25428
  */
24698
25429
  show_clouds: boolean
24699
25430
  /**
@@ -24793,8 +25524,11 @@ interface LuaTechnology {
24793
25524
  /**
24794
25525
  * The number of research units required for this technology.
24795
25526
  *
25527
+ * **Note**
25528
+ *
25529
+ * This is multiplied by the current research cost multiplier, unless {@link LuaTechnologyPrototype#ignore_tech_cost_multiplier LuaTechnologyPrototype::ignore_tech_cost_multiplier} is `true`.
25530
+ *
24796
25531
  * {@link https://lua-api.factorio.com/latest/LuaTechnology.html#LuaTechnology.research_unit_count View documentation}
24797
- * @remarks This is multiplied by the current research cost multiplier, unless {@link LuaTechnologyPrototype#ignore_tech_cost_multiplier LuaTechnologyPrototype::ignore_tech_cost_multiplier} is `true`.
24798
25532
  */
24799
25533
  readonly research_unit_count: uint
24800
25534
  /**
@@ -24876,8 +25610,11 @@ interface LuaTechnologyPrototype {
24876
25610
  /**
24877
25611
  * If this technology ignores the technology cost multiplier setting.
24878
25612
  *
25613
+ * **Note**
25614
+ *
25615
+ * {@link LuaTechnologyPrototype#research_unit_count LuaTechnologyPrototype::research_unit_count} will already take this setting into account.
25616
+ *
24879
25617
  * {@link https://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.ignore_tech_cost_multiplier View documentation}
24880
- * @remarks {@link LuaTechnologyPrototype#research_unit_count LuaTechnologyPrototype::research_unit_count} will already take this setting into account.
24881
25618
  */
24882
25619
  readonly ignore_tech_cost_multiplier: boolean
24883
25620
  /**
@@ -24907,8 +25644,11 @@ interface LuaTechnologyPrototype {
24907
25644
  /**
24908
25645
  * The number of research units required for this technology.
24909
25646
  *
25647
+ * **Note**
25648
+ *
25649
+ * This is multiplied by the current research cost multiplier, unless {@link LuaTechnologyPrototype#ignore_tech_cost_multiplier LuaTechnologyPrototype::ignore_tech_cost_multiplier} is `true`.
25650
+ *
24910
25651
  * {@link https://lua-api.factorio.com/latest/LuaTechnologyPrototype.html#LuaTechnologyPrototype.research_unit_count View documentation}
24911
- * @remarks This is multiplied by the current research cost multiplier, unless {@link LuaTechnologyPrototype#ignore_tech_cost_multiplier LuaTechnologyPrototype::ignore_tech_cost_multiplier} is `true`.
24912
25652
  */
24913
25653
  readonly research_unit_count: uint
24914
25654
  /**
@@ -24986,7 +25726,6 @@ interface LuaTile {
24986
25726
  * **Raised events:**
24987
25727
  * - {@link OnMarkedForDeconstructionEvent on_marked_for_deconstruction}? _instantly_ Raised if the tile was successfully marked for deconstruction.
24988
25728
  *
24989
- *
24990
25729
  * {@link https://lua-api.factorio.com/latest/LuaTile.html#LuaTile.order_deconstruction View documentation}
24991
25730
  * @param force The force whose robots are supposed to do the deconstruction.
24992
25731
  * @param player The player to set the last_user to if any.
@@ -24999,7 +25738,6 @@ interface LuaTile {
24999
25738
  * **Raised events:**
25000
25739
  * - {@link OnCancelledDeconstructionEvent on_cancelled_deconstruction}? _instantly_ Raised if the tile's deconstruction was successfully cancelled.
25001
25740
  *
25002
- *
25003
25741
  * {@link https://lua-api.factorio.com/latest/LuaTile.html#LuaTile.cancel_deconstruction View documentation}
25004
25742
  * @param force The force who did the deconstruction order.
25005
25743
  * @param player The player to set the last_user to if any.
@@ -25276,8 +26014,11 @@ interface LuaTrain {
25276
26014
  /**
25277
26015
  * Current speed.
25278
26016
  *
26017
+ * **Note**
26018
+ *
26019
+ * Changing the speed of the train is potentially an unsafe operation because train uses the speed for its internal calculations of break distances, etc.
26020
+ *
25279
26021
  * {@link https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.speed View documentation}
25280
- * @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.
25281
26022
  */
25282
26023
  speed: double
25283
26024
  /**
@@ -25325,8 +26066,11 @@ interface LuaTrain {
25325
26066
  /**
25326
26067
  * The trains current schedule or `nil` if empty. Set to `nil` to clear.
25327
26068
  *
26069
+ * **Note**
26070
+ *
26071
+ * The schedule can't be changed by modifying the returned table. Instead, changes must be made by assigning a new table to this attribute.
26072
+ *
25328
26073
  * {@link https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.schedule View documentation}
25329
- * @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.
25330
26074
  */
25331
26075
  schedule: TrainSchedule | undefined
25332
26076
  /**
@@ -25394,8 +26138,11 @@ interface LuaTrain {
25394
26138
  /**
25395
26139
  * The player passengers on the train
25396
26140
  *
26141
+ * **Note**
26142
+ *
26143
+ * This does *not* index using player index. See {@link LuaPlayer#index LuaPlayer::index} on each player instance for the player index.
26144
+ *
25397
26145
  * {@link https://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.passengers View documentation}
25398
- * @remarks This does *not* index using player index. See {@link LuaPlayer#index LuaPlayer::index} on each player instance for the player index.
25399
26146
  */
25400
26147
  readonly passengers: LuaPlayer[]
25401
26148
  /**
@@ -25625,8 +26372,11 @@ interface LuaTransportLine extends ReadonlyArray<LuaItemStack> {
25625
26372
  /**
25626
26373
  * Returns whether the associated internal transport line of this line is the same as the others associated internal transport line.
25627
26374
  *
26375
+ * **Note**
26376
+ *
26377
+ * 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.
26378
+ *
25628
26379
  * {@link https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.line_equals View documentation}
25629
- * @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.
25630
26380
  */
25631
26381
  line_equals(other: LuaTransportLine): boolean
25632
26382
  /**
@@ -25732,8 +26482,11 @@ interface LuaUnitGroup {
25732
26482
  /**
25733
26483
  * Make a unit a member of this group. Has the same effect as giving a `group_command` with this group to the unit.
25734
26484
  *
26485
+ * **Note**
26486
+ *
26487
+ * The member must have the same force as the unit group.
26488
+ *
25735
26489
  * {@link https://lua-api.factorio.com/latest/LuaUnitGroup.html#LuaUnitGroup.add_member View documentation}
25736
- * @remarks The member must have the same force as the unit group.
25737
26490
  */
25738
26491
  add_member(unit: LuaEntity): void
25739
26492
  /**
@@ -25912,7 +26665,8 @@ interface LuaWallControlBehavior extends LuaControlBehavior {
25912
26665
  *
25913
26666
  * {@link https://lua-api.factorio.com/latest/LuaWallControlBehavior.html#LuaWallControlBehavior.circuit_condition View documentation}
25914
26667
  */
25915
- circuit_condition: CircuitConditionDefinition
26668
+ get circuit_condition(): CircuitConditionDefinitionRead
26669
+ set circuit_condition(value: CircuitConditionDefinition)
25916
26670
  open_gate: boolean
25917
26671
  read_sensor: boolean
25918
26672
  output_signal: SignalID