typed-factorio 0.19.1 → 0.20.0-beta.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,7 +11,7 @@ interface CustomInputEvent extends EventData {
11
11
  /**
12
12
  * The player that activated the custom input.
13
13
  */
14
- readonly player_index: uint
14
+ readonly player_index: PlayerIndex
15
15
  /**
16
16
  * The prototype name of the custom input that was activated.
17
17
  */
@@ -43,7 +43,7 @@ interface OnAiCommandCompletedEvent extends EventData {
43
43
  /**
44
44
  * unit_number/group_number of the unit/group which just completed a command.
45
45
  */
46
- readonly unit_number: uint
46
+ readonly unit_number: UnitNumber
47
47
  readonly result: defines.behavior_result
48
48
  /**
49
49
  * Was this command generated by a distraction.
@@ -164,7 +164,7 @@ interface OnBuildBaseArrivedEvent extends EventData {
164
164
  */
165
165
  interface OnBuiltEntityEvent extends EventData {
166
166
  readonly created_entity: LuaEntity
167
- readonly player_index: uint
167
+ readonly player_index: PlayerIndex
168
168
  readonly stack: LuaItemStack
169
169
  /**
170
170
  * The item prototype used to build the entity. Note this won't exist in some situations (built from blueprint, undo, etc).
@@ -191,7 +191,7 @@ interface OnBuiltEntityEvent extends EventData {
191
191
  */
192
192
  interface OnCancelledDeconstructionEvent extends EventData {
193
193
  readonly entity: LuaEntity
194
- readonly player_index?: uint
194
+ readonly player_index?: PlayerIndex
195
195
  /**
196
196
  * Identifier of the event
197
197
  */
@@ -209,7 +209,7 @@ interface OnCancelledDeconstructionEvent extends EventData {
209
209
  */
210
210
  interface OnCancelledUpgradeEvent extends EventData {
211
211
  readonly entity: LuaEntity
212
- readonly player_index?: uint
212
+ readonly player_index?: PlayerIndex
213
213
  /**
214
214
  * Identifier of the event
215
215
  */
@@ -249,7 +249,7 @@ interface OnCharacterCorpseExpiredEvent extends EventData {
249
249
  interface OnChartTagAddedEvent extends EventData {
250
250
  readonly tag: LuaCustomChartTag
251
251
  readonly force: LuaForce
252
- readonly player_index?: uint
252
+ readonly player_index?: PlayerIndex
253
253
  /**
254
254
  * Identifier of the event
255
255
  */
@@ -267,7 +267,7 @@ interface OnChartTagAddedEvent extends EventData {
267
267
  */
268
268
  interface OnChartTagModifiedEvent extends EventData {
269
269
  readonly tag: LuaCustomChartTag
270
- readonly player_index?: uint
270
+ readonly player_index?: PlayerIndex
271
271
  readonly force: LuaForce
272
272
  readonly old_text: string
273
273
  readonly old_icon?: SignalID
@@ -290,7 +290,7 @@ interface OnChartTagModifiedEvent extends EventData {
290
290
  interface OnChartTagRemovedEvent extends EventData {
291
291
  readonly tag: LuaCustomChartTag
292
292
  readonly force: LuaForce
293
- readonly player_index?: uint
293
+ readonly player_index?: PlayerIndex
294
294
  /**
295
295
  * Identifier of the event
296
296
  */
@@ -307,7 +307,7 @@ interface OnChartTagRemovedEvent extends EventData {
307
307
  * {@link https://lua-api.factorio.com/latest/events.html#on_chunk_charted View documentation}
308
308
  */
309
309
  interface OnChunkChartedEvent extends EventData {
310
- readonly surface_index: uint
310
+ readonly surface_index: SurfaceIndex
311
311
  readonly position: ChunkPositionTable
312
312
  /**
313
313
  * Area of the chunk.
@@ -330,7 +330,7 @@ interface OnChunkChartedEvent extends EventData {
330
330
  * {@link https://lua-api.factorio.com/latest/events.html#on_chunk_deleted View documentation}
331
331
  */
332
332
  interface OnChunkDeletedEvent extends EventData {
333
- readonly surface_index: uint
333
+ readonly surface_index: SurfaceIndex
334
334
  /**
335
335
  * The chunks deleted.
336
336
  */
@@ -404,7 +404,7 @@ interface OnConsoleChatEvent extends EventData {
404
404
  /**
405
405
  * The player doing the chatting, if any.
406
406
  */
407
- readonly player_index?: uint
407
+ readonly player_index?: PlayerIndex
408
408
  /**
409
409
  * The chat message that was sent.
410
410
  */
@@ -428,7 +428,7 @@ interface OnConsoleCommandEvent extends EventData {
428
428
  /**
429
429
  * The player if any.
430
430
  */
431
- readonly player_index?: uint
431
+ readonly player_index?: PlayerIndex
432
432
  /**
433
433
  * The command as typed without the preceding forward slash ('/').
434
434
  */
@@ -456,7 +456,7 @@ interface OnCutsceneCancelledEvent extends EventData {
456
456
  /**
457
457
  * The player the cutscene was shown to.
458
458
  */
459
- readonly player_index: uint
459
+ readonly player_index: PlayerIndex
460
460
  /**
461
461
  * Identifier of the event
462
462
  */
@@ -479,7 +479,7 @@ interface OnCutsceneWaypointReachedEvent extends EventData {
479
479
  /**
480
480
  * The player index of the player viewing the cutscene.
481
481
  */
482
- readonly player_index: uint
482
+ readonly player_index: PlayerIndex
483
483
  /**
484
484
  * The index of the waypoint we just completed.
485
485
  */
@@ -571,22 +571,20 @@ interface OnEntityDamagedEvent extends EventData {
571
571
  }
572
572
 
573
573
  /**
574
- * Called after an entity is destroyed that has been registered with {@link LuaBootstrap#register_on_entity_destroyed LuaBootstrap::register_on_entity_destroyed}
575
- *
576
- * at the end of the next tick.
574
+ * Called after an entity is destroyed that has been registered with {@link LuaBootstrap#register_on_entity_destroyed LuaBootstrap::register_on_entity_destroyed}.
577
575
  *
578
576
  * {@link https://lua-api.factorio.com/latest/events.html#on_entity_destroyed View documentation}
579
- * @remarks Depending on when a given entity is destroyed, this event will be fired at the end of the current tick or
577
+ * @remarks Depending on when a given entity is destroyed, this event will be fired at the end of the current tick or at the end of the next tick.
580
578
  */
581
579
  interface OnEntityDestroyedEvent extends EventData {
582
580
  /**
583
581
  * The number returned by {@link LuaBootstrap#register_on_entity_destroyed register_on_entity_destroyed} to uniquely identify this entity during this event.
584
582
  */
585
- readonly registration_number: uint64
583
+ readonly registration_number: RegistrationNumber
586
584
  /**
587
585
  * The {@link LuaEntity#unit_number LuaEntity::unit_number} of the destroyed entity, if it had one.
588
586
  */
589
- readonly unit_number?: uint
587
+ readonly unit_number?: UnitNumber
590
588
  /**
591
589
  * Identifier of the event
592
590
  */
@@ -643,7 +641,7 @@ interface OnEntityLogisticSlotChangedEvent extends EventData {
643
641
  /**
644
642
  * The player who changed the slot, or `nil` if changed by script.
645
643
  */
646
- readonly player_index?: uint
644
+ readonly player_index?: PlayerIndex
647
645
  /**
648
646
  * The entity for whom a logistic slot was changed.
649
647
  */
@@ -671,7 +669,7 @@ interface OnEntityRenamedEvent extends EventData {
671
669
  /**
672
670
  * If by_script is true this will not be included.
673
671
  */
674
- readonly player_index?: uint
672
+ readonly player_index?: PlayerIndex
675
673
  readonly by_script: boolean
676
674
  readonly entity: LuaEntity
677
675
  readonly old_name: string
@@ -691,7 +689,7 @@ interface OnEntityRenamedEvent extends EventData {
691
689
  * {@link https://lua-api.factorio.com/latest/events.html#on_entity_settings_pasted View documentation}
692
690
  */
693
691
  interface OnEntitySettingsPastedEvent extends EventData {
694
- readonly player_index: uint
692
+ readonly player_index: PlayerIndex
695
693
  /**
696
694
  * The source entity settings were copied from.
697
695
  */
@@ -957,7 +955,7 @@ interface OnGuiCheckedStateChangedEvent extends EventData {
957
955
  /**
958
956
  * The player who did the change.
959
957
  */
960
- readonly player_index: uint
958
+ readonly player_index: PlayerIndex
961
959
  /**
962
960
  * Identifier of the event
963
961
  */
@@ -981,7 +979,7 @@ interface OnGuiClickEvent extends EventData {
981
979
  /**
982
980
  * The player who did the clicking.
983
981
  */
984
- readonly player_index: uint
982
+ readonly player_index: PlayerIndex
985
983
  /**
986
984
  * The mouse button used if any.
987
985
  */
@@ -1020,7 +1018,7 @@ interface OnGuiClosedEvent extends EventData {
1020
1018
  /**
1021
1019
  * The player.
1022
1020
  */
1023
- readonly player_index: uint
1021
+ readonly player_index: PlayerIndex
1024
1022
  /**
1025
1023
  * The GUI type that was open.
1026
1024
  */
@@ -1076,7 +1074,7 @@ interface OnGuiConfirmedEvent extends EventData {
1076
1074
  /**
1077
1075
  * The player who did the confirming.
1078
1076
  */
1079
- readonly player_index: uint
1077
+ readonly player_index: PlayerIndex
1080
1078
  /**
1081
1079
  * If alt was pressed.
1082
1080
  */
@@ -1112,7 +1110,7 @@ interface OnGuiElemChangedEvent extends EventData {
1112
1110
  /**
1113
1111
  * The player who did the change.
1114
1112
  */
1115
- readonly player_index: uint
1113
+ readonly player_index: PlayerIndex
1116
1114
  /**
1117
1115
  * Identifier of the event
1118
1116
  */
@@ -1136,7 +1134,7 @@ interface OnGuiLocationChangedEvent extends EventData {
1136
1134
  /**
1137
1135
  * The player who did the change.
1138
1136
  */
1139
- readonly player_index: uint
1137
+ readonly player_index: PlayerIndex
1140
1138
  /**
1141
1139
  * Identifier of the event
1142
1140
  */
@@ -1156,7 +1154,7 @@ interface OnGuiOpenedEvent extends EventData {
1156
1154
  /**
1157
1155
  * The player.
1158
1156
  */
1159
- readonly player_index: uint
1157
+ readonly player_index: PlayerIndex
1160
1158
  /**
1161
1159
  * The GUI type that was opened.
1162
1160
  */
@@ -1204,7 +1202,7 @@ interface OnGuiSelectedTabChangedEvent extends EventData {
1204
1202
  /**
1205
1203
  * The player who did the change.
1206
1204
  */
1207
- readonly player_index: uint
1205
+ readonly player_index: PlayerIndex
1208
1206
  /**
1209
1207
  * Identifier of the event
1210
1208
  */
@@ -1228,7 +1226,7 @@ interface OnGuiSelectionStateChangedEvent extends EventData {
1228
1226
  /**
1229
1227
  * The player who did the change.
1230
1228
  */
1231
- readonly player_index: uint
1229
+ readonly player_index: PlayerIndex
1232
1230
  /**
1233
1231
  * Identifier of the event
1234
1232
  */
@@ -1252,7 +1250,7 @@ interface OnGuiSwitchStateChangedEvent extends EventData {
1252
1250
  /**
1253
1251
  * The player who did the change.
1254
1252
  */
1255
- readonly player_index: uint
1253
+ readonly player_index: PlayerIndex
1256
1254
  /**
1257
1255
  * Identifier of the event
1258
1256
  */
@@ -1276,7 +1274,7 @@ interface OnGuiTextChangedEvent extends EventData {
1276
1274
  /**
1277
1275
  * The player who did the edit.
1278
1276
  */
1279
- readonly player_index: uint
1277
+ readonly player_index: PlayerIndex
1280
1278
  /**
1281
1279
  * The new text in the element.
1282
1280
  */
@@ -1304,7 +1302,7 @@ interface OnGuiValueChangedEvent extends EventData {
1304
1302
  /**
1305
1303
  * The player who did the change.
1306
1304
  */
1307
- readonly player_index: uint
1305
+ readonly player_index: PlayerIndex
1308
1306
  /**
1309
1307
  * Identifier of the event
1310
1308
  */
@@ -1338,7 +1336,7 @@ interface OnLandMineArmedEvent extends EventData {
1338
1336
  * {@link https://lua-api.factorio.com/latest/events.html#on_lua_shortcut View documentation}
1339
1337
  */
1340
1338
  interface OnLuaShortcutEvent extends EventData {
1341
- readonly player_index: uint
1339
+ readonly player_index: PlayerIndex
1342
1340
  /**
1343
1341
  * Shortcut prototype name of the shortcut that was clicked.
1344
1342
  */
@@ -1360,7 +1358,7 @@ interface OnLuaShortcutEvent extends EventData {
1360
1358
  */
1361
1359
  interface OnMarkedForDeconstructionEvent extends EventData {
1362
1360
  readonly entity: LuaEntity
1363
- readonly player_index?: uint
1361
+ readonly player_index?: PlayerIndex
1364
1362
  /**
1365
1363
  * Identifier of the event
1366
1364
  */
@@ -1379,7 +1377,7 @@ interface OnMarkedForDeconstructionEvent extends EventData {
1379
1377
  interface OnMarkedForUpgradeEvent extends EventData {
1380
1378
  readonly entity: LuaEntity
1381
1379
  readonly target: LuaEntityPrototype
1382
- readonly player_index?: uint
1380
+ readonly player_index?: PlayerIndex
1383
1381
  /**
1384
1382
  * The new direction (if any)
1385
1383
  */
@@ -1403,7 +1401,7 @@ interface OnMarketItemPurchasedEvent extends EventData {
1403
1401
  /**
1404
1402
  * The player who did the purchasing.
1405
1403
  */
1406
- readonly player_index: uint
1404
+ readonly player_index: PlayerIndex
1407
1405
  /**
1408
1406
  * The market entity.
1409
1407
  */
@@ -1435,7 +1433,7 @@ interface OnModItemOpenedEvent extends EventData {
1435
1433
  /**
1436
1434
  * The player.
1437
1435
  */
1438
- readonly player_index: uint
1436
+ readonly player_index: PlayerIndex
1439
1437
  /**
1440
1438
  * The item clicked on.
1441
1439
  */
@@ -1459,7 +1457,7 @@ interface OnPermissionGroupAddedEvent extends EventData {
1459
1457
  /**
1460
1458
  * The player that added the group.
1461
1459
  */
1462
- readonly player_index: uint
1460
+ readonly player_index: PlayerIndex
1463
1461
  /**
1464
1462
  * The group added.
1465
1463
  */
@@ -1483,7 +1481,7 @@ interface OnPermissionGroupDeletedEvent extends EventData {
1483
1481
  /**
1484
1482
  * The player doing the deletion.
1485
1483
  */
1486
- readonly player_index: uint
1484
+ readonly player_index: PlayerIndex
1487
1485
  /**
1488
1486
  * The group that was deleted.
1489
1487
  */
@@ -1511,7 +1509,7 @@ interface OnPermissionGroupEditedEvent extends EventData {
1511
1509
  /**
1512
1510
  * The player that did the editing.
1513
1511
  */
1514
- readonly player_index: uint
1512
+ readonly player_index: PlayerIndex
1515
1513
  /**
1516
1514
  * The group being edited.
1517
1515
  */
@@ -1562,7 +1560,7 @@ interface OnPermissionStringImportedEvent extends EventData {
1562
1560
  /**
1563
1561
  * The player that imported the string.
1564
1562
  */
1565
- readonly player_index: uint
1563
+ readonly player_index: PlayerIndex
1566
1564
  /**
1567
1565
  * Identifier of the event
1568
1566
  */
@@ -1580,7 +1578,7 @@ interface OnPermissionStringImportedEvent extends EventData {
1580
1578
  */
1581
1579
  interface OnPickedUpItemEvent extends EventData {
1582
1580
  readonly item_stack: SimpleItemStack
1583
- readonly player_index: uint
1581
+ readonly player_index: PlayerIndex
1584
1582
  /**
1585
1583
  * Identifier of the event
1586
1584
  */
@@ -1600,7 +1598,7 @@ interface OnPlayerAltSelectedAreaEvent extends EventData {
1600
1598
  /**
1601
1599
  * The player doing the selection.
1602
1600
  */
1603
- readonly player_index: uint
1601
+ readonly player_index: PlayerIndex
1604
1602
  /**
1605
1603
  * The surface selected.
1606
1604
  */
@@ -1637,7 +1635,7 @@ interface OnPlayerAltSelectedAreaEvent extends EventData {
1637
1635
  * {@link https://lua-api.factorio.com/latest/events.html#on_player_ammo_inventory_changed View documentation}
1638
1636
  */
1639
1637
  interface OnPlayerAmmoInventoryChangedEvent extends EventData {
1640
- readonly player_index: uint
1638
+ readonly player_index: PlayerIndex
1641
1639
  /**
1642
1640
  * Identifier of the event
1643
1641
  */
@@ -1654,7 +1652,7 @@ interface OnPlayerAmmoInventoryChangedEvent extends EventData {
1654
1652
  * {@link https://lua-api.factorio.com/latest/events.html#on_player_armor_inventory_changed View documentation}
1655
1653
  */
1656
1654
  interface OnPlayerArmorInventoryChangedEvent extends EventData {
1657
- readonly player_index: uint
1655
+ readonly player_index: PlayerIndex
1658
1656
  /**
1659
1657
  * Identifier of the event
1660
1658
  */
@@ -1674,7 +1672,7 @@ interface OnPlayerBannedEvent extends EventData {
1674
1672
  /**
1675
1673
  * The player banned.
1676
1674
  */
1677
- readonly player_index?: uint
1675
+ readonly player_index?: PlayerIndex
1678
1676
  /**
1679
1677
  * The banned player name.
1680
1678
  */
@@ -1682,7 +1680,7 @@ interface OnPlayerBannedEvent extends EventData {
1682
1680
  /**
1683
1681
  * The player that did the banning if any.
1684
1682
  */
1685
- readonly by_player?: uint
1683
+ readonly by_player?: PlayerIndex
1686
1684
  /**
1687
1685
  * The reason given if any.
1688
1686
  */
@@ -1703,11 +1701,11 @@ interface OnPlayerBannedEvent extends EventData {
1703
1701
  * {@link https://lua-api.factorio.com/latest/events.html#on_player_built_tile View documentation}
1704
1702
  */
1705
1703
  interface OnPlayerBuiltTileEvent extends EventData {
1706
- readonly player_index: uint
1704
+ readonly player_index: PlayerIndex
1707
1705
  /**
1708
1706
  * The surface the tile(s) were built on.
1709
1707
  */
1710
- readonly surface_index: uint
1708
+ readonly surface_index: SurfaceIndex
1711
1709
  /**
1712
1710
  * The position data.
1713
1711
  */
@@ -1743,7 +1741,7 @@ interface OnPlayerCancelledCraftingEvent extends EventData {
1743
1741
  /**
1744
1742
  * The player that did the crafting.
1745
1743
  */
1746
- readonly player_index: uint
1744
+ readonly player_index: PlayerIndex
1747
1745
  /**
1748
1746
  * The crafting items returned to the player's inventory.
1749
1747
  */
@@ -1775,7 +1773,7 @@ interface OnPlayerChangedForceEvent extends EventData {
1775
1773
  /**
1776
1774
  * The player who changed forces.
1777
1775
  */
1778
- readonly player_index: uint
1776
+ readonly player_index: PlayerIndex
1779
1777
  /**
1780
1778
  * The old force.
1781
1779
  */
@@ -1799,7 +1797,7 @@ interface OnPlayerChangedPositionEvent extends EventData {
1799
1797
  /**
1800
1798
  * The player.
1801
1799
  */
1802
- readonly player_index: uint
1800
+ readonly player_index: PlayerIndex
1803
1801
  /**
1804
1802
  * Identifier of the event
1805
1803
  */
@@ -1820,11 +1818,11 @@ interface OnPlayerChangedSurfaceEvent extends EventData {
1820
1818
  /**
1821
1819
  * The player who changed surfaces.
1822
1820
  */
1823
- readonly player_index: uint
1821
+ readonly player_index: PlayerIndex
1824
1822
  /**
1825
1823
  * The surface index the player was on.
1826
1824
  */
1827
- readonly surface_index: uint
1825
+ readonly surface_index: SurfaceIndex
1828
1826
  /**
1829
1827
  * Identifier of the event
1830
1828
  */
@@ -1844,7 +1842,7 @@ interface OnPlayerCheatModeDisabledEvent extends EventData {
1844
1842
  /**
1845
1843
  * The player.
1846
1844
  */
1847
- readonly player_index: uint
1845
+ readonly player_index: PlayerIndex
1848
1846
  /**
1849
1847
  * Identifier of the event
1850
1848
  */
@@ -1864,7 +1862,7 @@ interface OnPlayerCheatModeEnabledEvent extends EventData {
1864
1862
  /**
1865
1863
  * The player.
1866
1864
  */
1867
- readonly player_index: uint
1865
+ readonly player_index: PlayerIndex
1868
1866
  /**
1869
1867
  * Identifier of the event
1870
1868
  */
@@ -1884,7 +1882,7 @@ interface OnPlayerClickedGpsTagEvent extends EventData {
1884
1882
  /**
1885
1883
  * Index of the player
1886
1884
  */
1887
- readonly player_index: uint
1885
+ readonly player_index: PlayerIndex
1888
1886
  /**
1889
1887
  * Map position contained in gps tag
1890
1888
  */
@@ -1912,7 +1910,7 @@ interface OnPlayerConfiguredBlueprintEvent extends EventData {
1912
1910
  /**
1913
1911
  * The player.
1914
1912
  */
1915
- readonly player_index: uint
1913
+ readonly player_index: PlayerIndex
1916
1914
  /**
1917
1915
  * Identifier of the event
1918
1916
  */
@@ -1932,7 +1930,7 @@ interface OnPlayerConfiguredSpiderRemoteEvent extends EventData {
1932
1930
  /**
1933
1931
  * The player that configured the remote.
1934
1932
  */
1935
- readonly player_index: uint
1933
+ readonly player_index: PlayerIndex
1936
1934
  /**
1937
1935
  * Spider vehicle to which remote was connected to.
1938
1936
  */
@@ -1960,7 +1958,7 @@ interface OnPlayerCraftedItemEvent extends EventData {
1960
1958
  /**
1961
1959
  * The player doing the crafting.
1962
1960
  */
1963
- readonly player_index: uint
1961
+ readonly player_index: PlayerIndex
1964
1962
  /**
1965
1963
  * The recipe used to craft this item.
1966
1964
  */
@@ -1981,7 +1979,7 @@ interface OnPlayerCraftedItemEvent extends EventData {
1981
1979
  * {@link https://lua-api.factorio.com/latest/events.html#on_player_created View documentation}
1982
1980
  */
1983
1981
  interface OnPlayerCreatedEvent extends EventData {
1984
- readonly player_index: uint
1982
+ readonly player_index: PlayerIndex
1985
1983
  /**
1986
1984
  * Identifier of the event
1987
1985
  */
@@ -1998,7 +1996,7 @@ interface OnPlayerCreatedEvent extends EventData {
1998
1996
  * {@link https://lua-api.factorio.com/latest/events.html#on_player_cursor_stack_changed View documentation}
1999
1997
  */
2000
1998
  interface OnPlayerCursorStackChangedEvent extends EventData {
2001
- readonly player_index: uint
1999
+ readonly player_index: PlayerIndex
2002
2000
  /**
2003
2001
  * Identifier of the event
2004
2002
  */
@@ -2018,7 +2016,7 @@ interface OnPlayerDeconstructedAreaEvent extends EventData {
2018
2016
  /**
2019
2017
  * The player doing the selection.
2020
2018
  */
2021
- readonly player_index: uint
2019
+ readonly player_index: PlayerIndex
2022
2020
  /**
2023
2021
  * The surface selected.
2024
2022
  */
@@ -2054,7 +2052,7 @@ interface OnPlayerDemotedEvent extends EventData {
2054
2052
  /**
2055
2053
  * The player.
2056
2054
  */
2057
- readonly player_index: uint
2055
+ readonly player_index: PlayerIndex
2058
2056
  /**
2059
2057
  * Identifier of the event
2060
2058
  */
@@ -2071,7 +2069,7 @@ interface OnPlayerDemotedEvent extends EventData {
2071
2069
  * {@link https://lua-api.factorio.com/latest/events.html#on_player_died View documentation}
2072
2070
  */
2073
2071
  interface OnPlayerDiedEvent extends EventData {
2074
- readonly player_index: uint
2072
+ readonly player_index: PlayerIndex
2075
2073
  readonly cause?: LuaEntity
2076
2074
  /**
2077
2075
  * Identifier of the event
@@ -2092,7 +2090,7 @@ interface OnPlayerDisplayResolutionChangedEvent extends EventData {
2092
2090
  /**
2093
2091
  * The player
2094
2092
  */
2095
- readonly player_index: uint
2093
+ readonly player_index: PlayerIndex
2096
2094
  /**
2097
2095
  * The old display resolution
2098
2096
  */
@@ -2116,7 +2114,7 @@ interface OnPlayerDisplayScaleChangedEvent extends EventData {
2116
2114
  /**
2117
2115
  * The player
2118
2116
  */
2119
- readonly player_index: uint
2117
+ readonly player_index: PlayerIndex
2120
2118
  /**
2121
2119
  * The old display scale
2122
2120
  */
@@ -2137,7 +2135,7 @@ interface OnPlayerDisplayScaleChangedEvent extends EventData {
2137
2135
  * {@link https://lua-api.factorio.com/latest/events.html#on_player_driving_changed_state View documentation}
2138
2136
  */
2139
2137
  interface OnPlayerDrivingChangedStateEvent extends EventData {
2140
- readonly player_index: uint
2138
+ readonly player_index: PlayerIndex
2141
2139
  /**
2142
2140
  * The vehicle if any.
2143
2141
  */
@@ -2158,7 +2156,7 @@ interface OnPlayerDrivingChangedStateEvent extends EventData {
2158
2156
  * {@link https://lua-api.factorio.com/latest/events.html#on_player_dropped_item View documentation}
2159
2157
  */
2160
2158
  interface OnPlayerDroppedItemEvent extends EventData {
2161
- readonly player_index: uint
2159
+ readonly player_index: PlayerIndex
2162
2160
  /**
2163
2161
  * The item-on-ground entity.
2164
2162
  */
@@ -2182,7 +2180,7 @@ interface OnPlayerFastTransferredEvent extends EventData {
2182
2180
  /**
2183
2181
  * The player transferred from or to.
2184
2182
  */
2185
- readonly player_index: uint
2183
+ readonly player_index: PlayerIndex
2186
2184
  /**
2187
2185
  * The entity transferred from or to.
2188
2186
  */
@@ -2210,7 +2208,7 @@ interface OnPlayerFlushedFluidEvent extends EventData {
2210
2208
  /**
2211
2209
  * Index of the player
2212
2210
  */
2213
- readonly player_index: uint
2211
+ readonly player_index: PlayerIndex
2214
2212
  /**
2215
2213
  * Name of a fluid that was flushed
2216
2214
  */
@@ -2243,7 +2241,7 @@ interface OnPlayerFlushedFluidEvent extends EventData {
2243
2241
  * {@link https://lua-api.factorio.com/latest/events.html#on_player_gun_inventory_changed View documentation}
2244
2242
  */
2245
2243
  interface OnPlayerGunInventoryChangedEvent extends EventData {
2246
- readonly player_index: uint
2244
+ readonly player_index: PlayerIndex
2247
2245
  /**
2248
2246
  * Identifier of the event
2249
2247
  */
@@ -2260,7 +2258,7 @@ interface OnPlayerGunInventoryChangedEvent extends EventData {
2260
2258
  * {@link https://lua-api.factorio.com/latest/events.html#on_player_joined_game View documentation}
2261
2259
  */
2262
2260
  interface OnPlayerJoinedGameEvent extends EventData {
2263
- readonly player_index: uint
2261
+ readonly player_index: PlayerIndex
2264
2262
  /**
2265
2263
  * Identifier of the event
2266
2264
  */
@@ -2280,11 +2278,11 @@ interface OnPlayerKickedEvent extends EventData {
2280
2278
  /**
2281
2279
  * The player kicked.
2282
2280
  */
2283
- readonly player_index: uint
2281
+ readonly player_index: PlayerIndex
2284
2282
  /**
2285
2283
  * The player that did the kicking if any.
2286
2284
  */
2287
- readonly by_player?: uint
2285
+ readonly by_player?: PlayerIndex
2288
2286
  /**
2289
2287
  * The reason given if any.
2290
2288
  */
@@ -2305,7 +2303,7 @@ interface OnPlayerKickedEvent extends EventData {
2305
2303
  * {@link https://lua-api.factorio.com/latest/events.html#on_player_left_game View documentation}
2306
2304
  */
2307
2305
  interface OnPlayerLeftGameEvent extends EventData {
2308
- readonly player_index: uint
2306
+ readonly player_index: PlayerIndex
2309
2307
  readonly reason: defines.disconnect_reason
2310
2308
  /**
2311
2309
  * Identifier of the event
@@ -2323,7 +2321,7 @@ interface OnPlayerLeftGameEvent extends EventData {
2323
2321
  * {@link https://lua-api.factorio.com/latest/events.html#on_player_main_inventory_changed View documentation}
2324
2322
  */
2325
2323
  interface OnPlayerMainInventoryChangedEvent extends EventData {
2326
- readonly player_index: uint
2324
+ readonly player_index: PlayerIndex
2327
2325
  /**
2328
2326
  * Identifier of the event
2329
2327
  */
@@ -2344,7 +2342,7 @@ interface OnPlayerMinedEntityEvent extends EventData {
2344
2342
  /**
2345
2343
  * The index of the player doing the mining.
2346
2344
  */
2347
- readonly player_index: uint
2345
+ readonly player_index: PlayerIndex
2348
2346
  /**
2349
2347
  * The entity that has been mined.
2350
2348
  */
@@ -2373,7 +2371,7 @@ interface OnPlayerMinedItemEvent extends EventData {
2373
2371
  * The item given to the player
2374
2372
  */
2375
2373
  readonly item_stack: SimpleItemStack
2376
- readonly player_index: uint
2374
+ readonly player_index: PlayerIndex
2377
2375
  /**
2378
2376
  * Identifier of the event
2379
2377
  */
@@ -2390,11 +2388,11 @@ interface OnPlayerMinedItemEvent extends EventData {
2390
2388
  * {@link https://lua-api.factorio.com/latest/events.html#on_player_mined_tile View documentation}
2391
2389
  */
2392
2390
  interface OnPlayerMinedTileEvent extends EventData {
2393
- readonly player_index: uint
2391
+ readonly player_index: PlayerIndex
2394
2392
  /**
2395
2393
  * The surface the tile(s) were mined from.
2396
2394
  */
2397
- readonly surface_index: uint
2395
+ readonly surface_index: SurfaceIndex
2398
2396
  /**
2399
2397
  * The position data.
2400
2398
  */
@@ -2418,7 +2416,7 @@ interface OnPlayerMutedEvent extends EventData {
2418
2416
  /**
2419
2417
  * The player.
2420
2418
  */
2421
- readonly player_index: uint
2419
+ readonly player_index: PlayerIndex
2422
2420
  /**
2423
2421
  * Identifier of the event
2424
2422
  */
@@ -2438,7 +2436,7 @@ interface OnPlayerPipetteEvent extends EventData {
2438
2436
  /**
2439
2437
  * The player
2440
2438
  */
2441
- readonly player_index: uint
2439
+ readonly player_index: PlayerIndex
2442
2440
  /**
2443
2441
  * The item put in the cursor
2444
2442
  */
@@ -2463,7 +2461,7 @@ interface OnPlayerPipetteEvent extends EventData {
2463
2461
  * {@link https://lua-api.factorio.com/latest/events.html#on_player_placed_equipment View documentation}
2464
2462
  */
2465
2463
  interface OnPlayerPlacedEquipmentEvent extends EventData {
2466
- readonly player_index: uint
2464
+ readonly player_index: PlayerIndex
2467
2465
  /**
2468
2466
  * The equipment put in the equipment grid.
2469
2467
  */
@@ -2491,7 +2489,7 @@ interface OnPlayerPromotedEvent extends EventData {
2491
2489
  /**
2492
2490
  * The player.
2493
2491
  */
2494
- readonly player_index: uint
2492
+ readonly player_index: PlayerIndex
2495
2493
  /**
2496
2494
  * Identifier of the event
2497
2495
  */
@@ -2511,7 +2509,7 @@ interface OnPlayerRemovedEvent extends EventData {
2511
2509
  /**
2512
2510
  * The player index that was removed
2513
2511
  */
2514
- readonly player_index: uint
2512
+ readonly player_index: PlayerIndex
2515
2513
  /**
2516
2514
  * Identifier of the event
2517
2515
  */
@@ -2528,7 +2526,7 @@ interface OnPlayerRemovedEvent extends EventData {
2528
2526
  * {@link https://lua-api.factorio.com/latest/events.html#on_player_removed_equipment View documentation}
2529
2527
  */
2530
2528
  interface OnPlayerRemovedEquipmentEvent extends EventData {
2531
- readonly player_index: uint
2529
+ readonly player_index: PlayerIndex
2532
2530
  /**
2533
2531
  * The equipment grid removed from.
2534
2532
  */
@@ -2557,7 +2555,7 @@ interface OnPlayerRemovedEquipmentEvent extends EventData {
2557
2555
  * {@link https://lua-api.factorio.com/latest/events.html#on_player_repaired_entity View documentation}
2558
2556
  */
2559
2557
  interface OnPlayerRepairedEntityEvent extends EventData {
2560
- readonly player_index: uint
2558
+ readonly player_index: PlayerIndex
2561
2559
  readonly entity: LuaEntity
2562
2560
  /**
2563
2561
  * Identifier of the event
@@ -2575,7 +2573,7 @@ interface OnPlayerRepairedEntityEvent extends EventData {
2575
2573
  * {@link https://lua-api.factorio.com/latest/events.html#on_player_respawned View documentation}
2576
2574
  */
2577
2575
  interface OnPlayerRespawnedEvent extends EventData {
2578
- readonly player_index: uint
2576
+ readonly player_index: PlayerIndex
2579
2577
  /**
2580
2578
  * The player port used to respawn if one was used.
2581
2579
  */
@@ -2604,7 +2602,7 @@ interface OnPlayerRotatedEntityEvent extends EventData {
2604
2602
  * The previous direction
2605
2603
  */
2606
2604
  readonly previous_direction: defines.direction
2607
- readonly player_index: uint
2605
+ readonly player_index: PlayerIndex
2608
2606
  /**
2609
2607
  * Identifier of the event
2610
2608
  */
@@ -2624,7 +2622,7 @@ interface OnPlayerSelectedAreaEvent extends EventData {
2624
2622
  /**
2625
2623
  * The player doing the selection.
2626
2624
  */
2627
- readonly player_index: uint
2625
+ readonly player_index: PlayerIndex
2628
2626
  /**
2629
2627
  * The surface selected.
2630
2628
  */
@@ -2661,7 +2659,7 @@ interface OnPlayerSelectedAreaEvent extends EventData {
2661
2659
  * {@link https://lua-api.factorio.com/latest/events.html#on_player_set_quick_bar_slot View documentation}
2662
2660
  */
2663
2661
  interface OnPlayerSetQuickBarSlotEvent extends EventData {
2664
- readonly player_index: uint
2662
+ readonly player_index: PlayerIndex
2665
2663
  /**
2666
2664
  * Identifier of the event
2667
2665
  */
@@ -2681,7 +2679,7 @@ interface OnPlayerSetupBlueprintEvent extends EventData {
2681
2679
  /**
2682
2680
  * The player doing the selection.
2683
2681
  */
2684
- readonly player_index: uint
2682
+ readonly player_index: PlayerIndex
2685
2683
  /**
2686
2684
  * The surface selected.
2687
2685
  */
@@ -2718,7 +2716,7 @@ interface OnPlayerSetupBlueprintEvent extends EventData {
2718
2716
  * {@link https://lua-api.factorio.com/latest/events.html#on_player_toggled_alt_mode View documentation}
2719
2717
  */
2720
2718
  interface OnPlayerToggledAltModeEvent extends EventData {
2721
- readonly player_index: uint
2719
+ readonly player_index: PlayerIndex
2722
2720
  /**
2723
2721
  * The new alt mode value. This value is a shortcut for accessing {@link GameViewSettings#show_entity_info GameViewSettings::show_entity_info} on the player.
2724
2722
  */
@@ -2739,7 +2737,7 @@ interface OnPlayerToggledAltModeEvent extends EventData {
2739
2737
  * {@link https://lua-api.factorio.com/latest/events.html#on_player_toggled_map_editor View documentation}
2740
2738
  */
2741
2739
  interface OnPlayerToggledMapEditorEvent extends EventData {
2742
- readonly player_index: uint
2740
+ readonly player_index: PlayerIndex
2743
2741
  /**
2744
2742
  * Identifier of the event
2745
2743
  */
@@ -2756,7 +2754,7 @@ interface OnPlayerToggledMapEditorEvent extends EventData {
2756
2754
  * {@link https://lua-api.factorio.com/latest/events.html#on_player_trash_inventory_changed View documentation}
2757
2755
  */
2758
2756
  interface OnPlayerTrashInventoryChangedEvent extends EventData {
2759
- readonly player_index: uint
2757
+ readonly player_index: PlayerIndex
2760
2758
  /**
2761
2759
  * Identifier of the event
2762
2760
  */
@@ -2776,7 +2774,7 @@ interface OnPlayerUnbannedEvent extends EventData {
2776
2774
  /**
2777
2775
  * The player un-banned.
2778
2776
  */
2779
- readonly player_index?: uint
2777
+ readonly player_index?: PlayerIndex
2780
2778
  /**
2781
2779
  * The player name un-banned.
2782
2780
  */
@@ -2784,7 +2782,7 @@ interface OnPlayerUnbannedEvent extends EventData {
2784
2782
  /**
2785
2783
  * The player that did the un-banning if any.
2786
2784
  */
2787
- readonly by_player?: uint
2785
+ readonly by_player?: PlayerIndex
2788
2786
  /**
2789
2787
  * The reason the player was banned if any.
2790
2788
  */
@@ -2808,7 +2806,7 @@ interface OnPlayerUnmutedEvent extends EventData {
2808
2806
  /**
2809
2807
  * The player.
2810
2808
  */
2811
- readonly player_index: uint
2809
+ readonly player_index: PlayerIndex
2812
2810
  /**
2813
2811
  * Identifier of the event
2814
2812
  */
@@ -2828,7 +2826,7 @@ interface OnPlayerUsedCapsuleEvent extends EventData {
2828
2826
  /**
2829
2827
  * The player.
2830
2828
  */
2831
- readonly player_index: uint
2829
+ readonly player_index: PlayerIndex
2832
2830
  /**
2833
2831
  * The capsule item used.
2834
2832
  */
@@ -2856,7 +2854,7 @@ interface OnPlayerUsedSpiderRemoteEvent extends EventData {
2856
2854
  /**
2857
2855
  * The player that used the remote.
2858
2856
  */
2859
- readonly player_index: uint
2857
+ readonly player_index: PlayerIndex
2860
2858
  /**
2861
2859
  * Spider vehicle which was requested to move.
2862
2860
  */
@@ -2912,11 +2910,11 @@ interface OnPostEntityDiedEvent extends EventData {
2912
2910
  /**
2913
2911
  * The surface the entity was on.
2914
2912
  */
2915
- readonly surface_index: uint
2913
+ readonly surface_index: SurfaceIndex
2916
2914
  /**
2917
2915
  * The unit number the entity had if any.
2918
2916
  */
2919
- readonly unit_number?: uint
2917
+ readonly unit_number?: UnitNumber
2920
2918
  /**
2921
2919
  * Identifier of the event
2922
2920
  */
@@ -2936,7 +2934,7 @@ interface OnPreBuildEvent extends EventData {
2936
2934
  /**
2937
2935
  * The player who did the placing.
2938
2936
  */
2939
- readonly player_index: uint
2937
+ readonly player_index: PlayerIndex
2940
2938
  /**
2941
2939
  * Where the item was placed.
2942
2940
  */
@@ -2977,7 +2975,7 @@ interface OnPreBuildEvent extends EventData {
2977
2975
  * {@link https://lua-api.factorio.com/latest/events.html#on_pre_chunk_deleted View documentation}
2978
2976
  */
2979
2977
  interface OnPreChunkDeletedEvent extends EventData {
2980
- readonly surface_index: uint
2978
+ readonly surface_index: SurfaceIndex
2981
2979
  /**
2982
2980
  * The chunks to be deleted.
2983
2981
  */
@@ -2998,7 +2996,7 @@ interface OnPreChunkDeletedEvent extends EventData {
2998
2996
  * {@link https://lua-api.factorio.com/latest/events.html#on_pre_entity_settings_pasted View documentation}
2999
2997
  */
3000
2998
  interface OnPreEntitySettingsPastedEvent extends EventData {
3001
- readonly player_index: uint
2999
+ readonly player_index: PlayerIndex
3002
3000
  /**
3003
3001
  * The source entity settings will be copied from.
3004
3002
  */
@@ -3026,7 +3024,7 @@ interface OnPreGhostDeconstructedEvent extends EventData {
3026
3024
  /**
3027
3025
  * The player that did the deconstruction if any.
3028
3026
  */
3029
- readonly player_index?: uint
3027
+ readonly player_index?: PlayerIndex
3030
3028
  readonly ghost: LuaEntity
3031
3029
  /**
3032
3030
  * Identifier of the event
@@ -3047,7 +3045,7 @@ interface OnPrePermissionGroupDeletedEvent extends EventData {
3047
3045
  /**
3048
3046
  * The player doing the deletion.
3049
3047
  */
3050
- readonly player_index: uint
3048
+ readonly player_index: PlayerIndex
3051
3049
  /**
3052
3050
  * The group to be deleted.
3053
3051
  */
@@ -3071,7 +3069,7 @@ interface OnPrePermissionStringImportedEvent extends EventData {
3071
3069
  /**
3072
3070
  * The player importing the string.
3073
3071
  */
3074
- readonly player_index: uint
3072
+ readonly player_index: PlayerIndex
3075
3073
  /**
3076
3074
  * Identifier of the event
3077
3075
  */
@@ -3091,7 +3089,7 @@ interface OnPrePlayerCraftedItemEvent extends EventData {
3091
3089
  /**
3092
3090
  * The player doing the crafting.
3093
3091
  */
3094
- readonly player_index: uint
3092
+ readonly player_index: PlayerIndex
3095
3093
  /**
3096
3094
  * The recipe being queued.
3097
3095
  */
@@ -3120,7 +3118,7 @@ interface OnPrePlayerCraftedItemEvent extends EventData {
3120
3118
  * {@link https://lua-api.factorio.com/latest/events.html#on_pre_player_died View documentation}
3121
3119
  */
3122
3120
  interface OnPrePlayerDiedEvent extends EventData {
3123
- readonly player_index: uint
3121
+ readonly player_index: PlayerIndex
3124
3122
  readonly cause?: LuaEntity
3125
3123
  /**
3126
3124
  * Identifier of the event
@@ -3138,7 +3136,7 @@ interface OnPrePlayerDiedEvent extends EventData {
3138
3136
  * {@link https://lua-api.factorio.com/latest/events.html#on_pre_player_left_game View documentation}
3139
3137
  */
3140
3138
  interface OnPrePlayerLeftGameEvent extends EventData {
3141
- readonly player_index: uint
3139
+ readonly player_index: PlayerIndex
3142
3140
  readonly reason: defines.disconnect_reason
3143
3141
  /**
3144
3142
  * Identifier of the event
@@ -3160,7 +3158,7 @@ interface OnPrePlayerMinedItemEvent extends EventData {
3160
3158
  * The entity being mined
3161
3159
  */
3162
3160
  readonly entity: LuaEntity
3163
- readonly player_index: uint
3161
+ readonly player_index: PlayerIndex
3164
3162
  /**
3165
3163
  * Identifier of the event
3166
3164
  */
@@ -3180,7 +3178,7 @@ interface OnPrePlayerRemovedEvent extends EventData {
3180
3178
  /**
3181
3179
  * The player index that will be removed
3182
3180
  */
3183
- readonly player_index: uint
3181
+ readonly player_index: PlayerIndex
3184
3182
  /**
3185
3183
  * Identifier of the event
3186
3184
  */
@@ -3197,7 +3195,7 @@ interface OnPrePlayerRemovedEvent extends EventData {
3197
3195
  * {@link https://lua-api.factorio.com/latest/events.html#on_pre_player_toggled_map_editor View documentation}
3198
3196
  */
3199
3197
  interface OnPrePlayerToggledMapEditorEvent extends EventData {
3200
- readonly player_index: uint
3198
+ readonly player_index: PlayerIndex
3201
3199
  /**
3202
3200
  * Identifier of the event
3203
3201
  */
@@ -3239,7 +3237,7 @@ interface OnPreScriptInventoryResizedEvent extends EventData {
3239
3237
  /**
3240
3238
  * If done by console command; the player who ran the command.
3241
3239
  */
3242
- readonly player_index?: uint
3240
+ readonly player_index?: PlayerIndex
3243
3241
  /**
3244
3242
  * The mod that did the resizing. This will be `"core"` if done by console command or scenario script.
3245
3243
  */
@@ -3269,7 +3267,7 @@ interface OnPreScriptInventoryResizedEvent extends EventData {
3269
3267
  * {@link https://lua-api.factorio.com/latest/events.html#on_pre_surface_cleared View documentation}
3270
3268
  */
3271
3269
  interface OnPreSurfaceClearedEvent extends EventData {
3272
- readonly surface_index: uint
3270
+ readonly surface_index: SurfaceIndex
3273
3271
  /**
3274
3272
  * Identifier of the event
3275
3273
  */
@@ -3286,7 +3284,7 @@ interface OnPreSurfaceClearedEvent extends EventData {
3286
3284
  * {@link https://lua-api.factorio.com/latest/events.html#on_pre_surface_deleted View documentation}
3287
3285
  */
3288
3286
  interface OnPreSurfaceDeletedEvent extends EventData {
3289
- readonly surface_index: uint
3287
+ readonly surface_index: SurfaceIndex
3290
3288
  /**
3291
3289
  * Identifier of the event
3292
3290
  */
@@ -3444,7 +3442,7 @@ interface OnRobotBuiltTileEvent extends EventData {
3444
3442
  /**
3445
3443
  * The surface the tile(s) are build on.
3446
3444
  */
3447
- readonly surface_index: uint
3445
+ readonly surface_index: SurfaceIndex
3448
3446
  /**
3449
3447
  * Identifier of the event
3450
3448
  */
@@ -3546,7 +3544,7 @@ interface OnRobotMinedTileEvent extends EventData {
3546
3544
  /**
3547
3545
  * The surface the tile(s) were mined on.
3548
3546
  */
3549
- readonly surface_index: uint
3547
+ readonly surface_index: SurfaceIndex
3550
3548
  /**
3551
3549
  * Identifier of the event
3552
3550
  */
@@ -3592,7 +3590,7 @@ interface OnRocketLaunchOrderedEvent extends EventData {
3592
3590
  /**
3593
3591
  * The player that is riding the rocket, if any.
3594
3592
  */
3595
- readonly player_index?: uint
3593
+ readonly player_index?: PlayerIndex
3596
3594
  /**
3597
3595
  * Identifier of the event
3598
3596
  */
@@ -3614,7 +3612,7 @@ interface OnRocketLaunchedEvent extends EventData {
3614
3612
  /**
3615
3613
  * The player that is riding the rocket, if any.
3616
3614
  */
3617
- readonly player_index?: uint
3615
+ readonly player_index?: PlayerIndex
3618
3616
  /**
3619
3617
  * Identifier of the event
3620
3618
  */
@@ -3634,7 +3632,7 @@ interface OnRuntimeModSettingChangedEvent extends EventData {
3634
3632
  /**
3635
3633
  * If the `setting_type` is `"global"` and it was changed through the mod settings GUI, this is the index of the player that changed the global setting. If the `setting_type` is `"runtime-per-user"` and it changed a current setting of the player, this is the index of the player whose setting was changed. In all other cases, this is `nil`.
3636
3634
  */
3637
- readonly player_index?: uint
3635
+ readonly player_index?: PlayerIndex
3638
3636
  /**
3639
3637
  * The prototype name of the setting that was changed.
3640
3638
  */
@@ -3662,7 +3660,7 @@ interface OnScriptInventoryResizedEvent extends EventData {
3662
3660
  /**
3663
3661
  * If done by console command; the player who ran the command.
3664
3662
  */
3665
- readonly player_index?: uint
3663
+ readonly player_index?: PlayerIndex
3666
3664
  /**
3667
3665
  * The mod that did the resizing. This will be `"core"` if done by console command or scenario script.
3668
3666
  */
@@ -3731,7 +3729,7 @@ interface OnScriptTriggerEffectEvent extends EventData {
3731
3729
  /**
3732
3730
  * The surface the effect happened on.
3733
3731
  */
3734
- readonly surface_index: uint
3732
+ readonly surface_index: SurfaceIndex
3735
3733
  readonly source_position?: MapPositionTable
3736
3734
  readonly source_entity?: LuaEntity
3737
3735
  readonly target_position?: MapPositionTable
@@ -3783,7 +3781,7 @@ interface OnSelectedEntityChangedEvent extends EventData {
3783
3781
  /**
3784
3782
  * The player whose selected entity changed.
3785
3783
  */
3786
- readonly player_index: uint
3784
+ readonly player_index: PlayerIndex
3787
3785
  /**
3788
3786
  * The last selected entity if it still exists and there was one.
3789
3787
  */
@@ -3827,7 +3825,7 @@ interface OnStringTranslatedEvent extends EventData {
3827
3825
  /**
3828
3826
  * The player whose locale was used for the translation.
3829
3827
  */
3830
- readonly player_index: uint
3828
+ readonly player_index: PlayerIndex
3831
3829
  /**
3832
3830
  * The localised string being translated.
3833
3831
  */
@@ -3856,7 +3854,7 @@ interface OnStringTranslatedEvent extends EventData {
3856
3854
  * {@link https://lua-api.factorio.com/latest/events.html#on_surface_cleared View documentation}
3857
3855
  */
3858
3856
  interface OnSurfaceClearedEvent extends EventData {
3859
- readonly surface_index: uint
3857
+ readonly surface_index: SurfaceIndex
3860
3858
  /**
3861
3859
  * Identifier of the event
3862
3860
  */
@@ -3874,7 +3872,7 @@ interface OnSurfaceClearedEvent extends EventData {
3874
3872
  * @remarks This is not called when the default surface is created as it will always exist.
3875
3873
  */
3876
3874
  interface OnSurfaceCreatedEvent extends EventData {
3877
- readonly surface_index: uint
3875
+ readonly surface_index: SurfaceIndex
3878
3876
  /**
3879
3877
  * Identifier of the event
3880
3878
  */
@@ -3891,7 +3889,7 @@ interface OnSurfaceCreatedEvent extends EventData {
3891
3889
  * {@link https://lua-api.factorio.com/latest/events.html#on_surface_deleted View documentation}
3892
3890
  */
3893
3891
  interface OnSurfaceDeletedEvent extends EventData {
3894
- readonly surface_index: uint
3892
+ readonly surface_index: SurfaceIndex
3895
3893
  /**
3896
3894
  * Identifier of the event
3897
3895
  */
@@ -3908,7 +3906,7 @@ interface OnSurfaceDeletedEvent extends EventData {
3908
3906
  * {@link https://lua-api.factorio.com/latest/events.html#on_surface_imported View documentation}
3909
3907
  */
3910
3908
  interface OnSurfaceImportedEvent extends EventData {
3911
- readonly surface_index: uint
3909
+ readonly surface_index: SurfaceIndex
3912
3910
  /**
3913
3911
  * The original surface name.
3914
3912
  */
@@ -3929,7 +3927,7 @@ interface OnSurfaceImportedEvent extends EventData {
3929
3927
  * {@link https://lua-api.factorio.com/latest/events.html#on_surface_renamed View documentation}
3930
3928
  */
3931
3929
  interface OnSurfaceRenamedEvent extends EventData {
3932
- readonly surface_index: uint
3930
+ readonly surface_index: SurfaceIndex
3933
3931
  readonly old_name: string
3934
3932
  readonly new_name: string
3935
3933
  /**
@@ -4028,7 +4026,7 @@ interface OnTrainScheduleChangedEvent extends EventData {
4028
4026
  /**
4029
4027
  * The player who made the change if any.
4030
4028
  */
4031
- readonly player_index?: uint
4029
+ readonly player_index?: PlayerIndex
4032
4030
  /**
4033
4031
  * Identifier of the event
4034
4032
  */
@@ -4235,7 +4233,7 @@ interface ScriptRaisedSetTilesEvent extends EventData {
4235
4233
  /**
4236
4234
  * The surface whose tiles were changed.
4237
4235
  */
4238
- readonly surface_index: uint
4236
+ readonly surface_index: SurfaceIndex
4239
4237
  /**
4240
4238
  * The tiles that were changed.
4241
4239
  */
@@ -4257,8 +4255,8 @@ type EventId<T extends table, F = unknown> = uint & {
4257
4255
  }
4258
4256
 
4259
4257
  /**
4260
- * An event id generated by {@link LuaBootstrap.generate_event_name LuaBootstrap::generate_event_name} and raiseable via
4261
- * {@link LuaBootstrap.raise_event LuaBootstrap::raise_event}.
4258
+ * An event id generated by {@link LuaBootstrap#generate_event_name LuaBootstrap::generate_event_name} and raiseable via
4259
+ * {@link LuaBootstrap#raise_event LuaBootstrap::raise_event}.
4262
4260
  */
4263
4261
  type CustomEventId<T extends table> = EventId<T> & {
4264
4262
  _customEventIdBrand: any