factorio-types 1.2.3 → 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -60
- package/dist/classes.d.ts +4879 -3481
- package/dist/concepts.d.ts +2267 -645
- package/dist/datacollection.d.ts +223 -31
- package/dist/defines.d.ts +1500 -603
- package/dist/events.d.ts +511 -107
- package/dist/global.d.ts +10 -2
- package/dist/prototypes.d.ts +3294 -1987
- package/dist/types.d.ts +6283 -3018
- package/index.d.ts +0 -1
- package/package.json +3 -3
- package/src/lualib/noise.d.ts +0 -194
package/dist/events.d.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// Factorio API reference https://lua-api.factorio.com/latest/index.html
|
|
3
3
|
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version
|
|
6
|
-
// API version
|
|
5
|
+
// Factorio version 2.0.11
|
|
6
|
+
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
9
9
|
/**
|
|
@@ -45,6 +45,24 @@ interface CustomInputEvent {
|
|
|
45
45
|
*/
|
|
46
46
|
tick: uint;
|
|
47
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* Called when an achievement is gained.
|
|
50
|
+
*/
|
|
51
|
+
interface on_achievement_gained {
|
|
52
|
+
achievement: LuaAchievementPrototype;
|
|
53
|
+
/**
|
|
54
|
+
* Identifier of the event
|
|
55
|
+
*/
|
|
56
|
+
name: defines.events;
|
|
57
|
+
/**
|
|
58
|
+
* The player who gained the achievement.
|
|
59
|
+
*/
|
|
60
|
+
player_index: uint;
|
|
61
|
+
/**
|
|
62
|
+
* Tick the event was generated.
|
|
63
|
+
*/
|
|
64
|
+
tick: uint;
|
|
65
|
+
}
|
|
48
66
|
/**
|
|
49
67
|
* Called when a unit/group completes a command.
|
|
50
68
|
*/
|
|
@@ -140,7 +158,7 @@ interface on_build_base_arrived {
|
|
|
140
158
|
/**
|
|
141
159
|
* The unit group the command was assigned to.
|
|
142
160
|
*/
|
|
143
|
-
group?:
|
|
161
|
+
group?: LuaCommandable;
|
|
144
162
|
/**
|
|
145
163
|
* Identifier of the event
|
|
146
164
|
*/
|
|
@@ -158,17 +176,13 @@ interface on_build_base_arrived {
|
|
|
158
176
|
* Called when player builds something.
|
|
159
177
|
*/
|
|
160
178
|
interface on_built_entity {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
* The item prototype used to build the entity. Note this won't exist in some situations (built from blueprint, undo, etc).
|
|
164
|
-
*/
|
|
165
|
-
item?: LuaItemPrototype;
|
|
179
|
+
consumed_items: LuaInventory;
|
|
180
|
+
entity: LuaEntity;
|
|
166
181
|
/**
|
|
167
182
|
* Identifier of the event
|
|
168
183
|
*/
|
|
169
184
|
name: defines.events;
|
|
170
185
|
player_index: uint;
|
|
171
|
-
stack: LuaItemStack;
|
|
172
186
|
/**
|
|
173
187
|
* The tags associated with this entity if any.
|
|
174
188
|
*/
|
|
@@ -197,13 +211,13 @@ interface on_cancelled_deconstruction {
|
|
|
197
211
|
* Called when the upgrade of an entity is canceled.
|
|
198
212
|
*/
|
|
199
213
|
interface on_cancelled_upgrade {
|
|
200
|
-
direction?: defines.direction;
|
|
201
214
|
entity: LuaEntity;
|
|
202
215
|
/**
|
|
203
216
|
* Identifier of the event
|
|
204
217
|
*/
|
|
205
218
|
name: defines.events;
|
|
206
219
|
player_index?: uint;
|
|
220
|
+
quality: LuaQualityPrototype;
|
|
207
221
|
target: LuaEntityPrototype;
|
|
208
222
|
/**
|
|
209
223
|
* Tick the event was generated.
|
|
@@ -213,7 +227,7 @@ interface on_cancelled_upgrade {
|
|
|
213
227
|
/**
|
|
214
228
|
* Called when a character corpse expires due to timeout or all of the items being removed from it.
|
|
215
229
|
*
|
|
216
|
-
*
|
|
230
|
+
* this is not called if the corpse is mined. See {@link defines.events.on_pre_player_mined_item | runtime:defines.events.on_pre_player_mined_item} to detect that.
|
|
217
231
|
*/
|
|
218
232
|
interface on_character_corpse_expired {
|
|
219
233
|
/**
|
|
@@ -254,8 +268,10 @@ interface on_chart_tag_modified {
|
|
|
254
268
|
* Identifier of the event
|
|
255
269
|
*/
|
|
256
270
|
name: defines.events;
|
|
257
|
-
old_icon
|
|
258
|
-
|
|
271
|
+
old_icon: SignalID;
|
|
272
|
+
old_player_index?: uint;
|
|
273
|
+
old_position: MapPosition;
|
|
274
|
+
old_surface: LuaSurface;
|
|
259
275
|
old_text: string;
|
|
260
276
|
player_index?: uint;
|
|
261
277
|
tag: LuaCustomChartTag;
|
|
@@ -464,8 +480,6 @@ interface on_cutscene_started {
|
|
|
464
480
|
* Called when a cutscene is playing, each time it reaches a waypoint in that cutscene.
|
|
465
481
|
*
|
|
466
482
|
* This refers to an index in the table previously passed to set_controller which started the cutscene.
|
|
467
|
-
*
|
|
468
|
-
* Due to implementation omission, `waypoint_index` is 0-based.
|
|
469
483
|
*/
|
|
470
484
|
interface on_cutscene_waypoint_reached {
|
|
471
485
|
/**
|
|
@@ -485,23 +499,6 @@ interface on_cutscene_waypoint_reached {
|
|
|
485
499
|
*/
|
|
486
500
|
waypoint_index: uint;
|
|
487
501
|
}
|
|
488
|
-
/**
|
|
489
|
-
* Called when the map difficulty settings are changed.
|
|
490
|
-
*
|
|
491
|
-
* It's not guaranteed that both settings are changed - just that at least one has been changed.
|
|
492
|
-
*/
|
|
493
|
-
interface on_difficulty_settings_changed {
|
|
494
|
-
/**
|
|
495
|
-
* Identifier of the event
|
|
496
|
-
*/
|
|
497
|
-
name: defines.events;
|
|
498
|
-
old_recipe_difficulty: uint;
|
|
499
|
-
old_technology_difficulty: uint;
|
|
500
|
-
/**
|
|
501
|
-
* Tick the event was generated.
|
|
502
|
-
*/
|
|
503
|
-
tick: uint;
|
|
504
|
-
}
|
|
505
502
|
/**
|
|
506
503
|
* Called when an entity is cloned. The filter applies to the source entity.
|
|
507
504
|
*/
|
|
@@ -541,7 +538,7 @@ interface on_entity_color_changed {
|
|
|
541
538
|
*/
|
|
542
539
|
interface on_entity_damaged {
|
|
543
540
|
/**
|
|
544
|
-
* The entity that
|
|
541
|
+
* The entity that originally triggered the events that led to this damage, if available (e.g. the character, turret, etc. that pulled the trigger).
|
|
545
542
|
*/
|
|
546
543
|
cause?: LuaEntity;
|
|
547
544
|
damage_type: LuaDamagePrototype;
|
|
@@ -567,32 +564,13 @@ interface on_entity_damaged {
|
|
|
567
564
|
*/
|
|
568
565
|
original_damage_amount: float;
|
|
569
566
|
/**
|
|
570
|
-
*
|
|
571
|
-
*/
|
|
572
|
-
tick: uint;
|
|
573
|
-
}
|
|
574
|
-
/**
|
|
575
|
-
* Called after an entity is destroyed that has been registered with {@link LuaBootstrap::register_on_entity_destroyed | runtime:LuaBootstrap::register_on_entity_destroyed}.
|
|
576
|
-
*
|
|
577
|
-
* 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.
|
|
578
|
-
*/
|
|
579
|
-
interface on_entity_destroyed {
|
|
580
|
-
/**
|
|
581
|
-
* Identifier of the event
|
|
567
|
+
* The entity that is directly dealing the damage, if available (e.g. the projectile, flame, sticker, grenade, laser beam, etc.).
|
|
582
568
|
*/
|
|
583
|
-
|
|
584
|
-
/**
|
|
585
|
-
* The number returned by {@link register_on_entity_destroyed | runtime:LuaBootstrap::register_on_entity_destroyed} to uniquely identify this entity during this event.
|
|
586
|
-
*/
|
|
587
|
-
registration_number: uint64;
|
|
569
|
+
source?: LuaEntity;
|
|
588
570
|
/**
|
|
589
571
|
* Tick the event was generated.
|
|
590
572
|
*/
|
|
591
573
|
tick: uint;
|
|
592
|
-
/**
|
|
593
|
-
* The {@link LuaEntity::unit_number | runtime:LuaEntity::unit_number} of the destroyed entity, if it had one.
|
|
594
|
-
*/
|
|
595
|
-
unit_number?: uint;
|
|
596
574
|
}
|
|
597
575
|
/**
|
|
598
576
|
* Called when an entity dies.
|
|
@@ -628,9 +606,7 @@ interface on_entity_died {
|
|
|
628
606
|
tick: uint;
|
|
629
607
|
}
|
|
630
608
|
/**
|
|
631
|
-
* Called when one of an entity's
|
|
632
|
-
*
|
|
633
|
-
* "Personal logistic slot" refers to a character or vehicle's personal request / auto-trash slots, not the request slots on logistic chests.
|
|
609
|
+
* Called when one of an entity's logistic slots changes.
|
|
634
610
|
*/
|
|
635
611
|
interface on_entity_logistic_slot_changed {
|
|
636
612
|
/**
|
|
@@ -645,6 +621,10 @@ interface on_entity_logistic_slot_changed {
|
|
|
645
621
|
* The player who changed the slot, or `nil` if changed by script.
|
|
646
622
|
*/
|
|
647
623
|
player_index?: uint;
|
|
624
|
+
/**
|
|
625
|
+
* The section changed.
|
|
626
|
+
*/
|
|
627
|
+
section: LuaLogisticSection;
|
|
648
628
|
/**
|
|
649
629
|
* The slot index that was changed.
|
|
650
630
|
*/
|
|
@@ -752,6 +732,10 @@ interface on_equipment_removed {
|
|
|
752
732
|
* Identifier of the event
|
|
753
733
|
*/
|
|
754
734
|
name: defines.events;
|
|
735
|
+
/**
|
|
736
|
+
* The equipment quality.
|
|
737
|
+
*/
|
|
738
|
+
quality: string;
|
|
755
739
|
/**
|
|
756
740
|
* Tick the event was generated.
|
|
757
741
|
*/
|
|
@@ -1078,6 +1062,8 @@ interface on_gui_elem_changed {
|
|
|
1078
1062
|
}
|
|
1079
1063
|
/**
|
|
1080
1064
|
* Called when {@link LuaGuiElement | runtime:LuaGuiElement} is hovered by the mouse.
|
|
1065
|
+
*
|
|
1066
|
+
* Only fired for events whose {@link LuaGuiElement::raise_hover_events | runtime:LuaGuiElement::raise_hover_events} is `true`.
|
|
1081
1067
|
*/
|
|
1082
1068
|
interface on_gui_hover {
|
|
1083
1069
|
/**
|
|
@@ -1099,6 +1085,8 @@ interface on_gui_hover {
|
|
|
1099
1085
|
}
|
|
1100
1086
|
/**
|
|
1101
1087
|
* Called when the player's cursor leaves a {@link LuaGuiElement | runtime:LuaGuiElement} that was previously hovered.
|
|
1088
|
+
*
|
|
1089
|
+
* Only fired for events whose {@link LuaGuiElement::raise_hover_events | runtime:LuaGuiElement::raise_hover_events} is `true`.
|
|
1102
1090
|
*/
|
|
1103
1091
|
interface on_gui_leave {
|
|
1104
1092
|
/**
|
|
@@ -1344,16 +1332,13 @@ interface on_marked_for_deconstruction {
|
|
|
1344
1332
|
* Called when an entity is marked for upgrade with the Upgrade planner or via script.
|
|
1345
1333
|
*/
|
|
1346
1334
|
interface on_marked_for_upgrade {
|
|
1347
|
-
/**
|
|
1348
|
-
* The new direction (if any)
|
|
1349
|
-
*/
|
|
1350
|
-
direction?: defines.direction;
|
|
1351
1335
|
entity: LuaEntity;
|
|
1352
1336
|
/**
|
|
1353
1337
|
* Identifier of the event
|
|
1354
1338
|
*/
|
|
1355
1339
|
name: defines.events;
|
|
1356
1340
|
player_index?: uint;
|
|
1341
|
+
quality: LuaQualityPrototype;
|
|
1357
1342
|
target: LuaEntityPrototype;
|
|
1358
1343
|
/**
|
|
1359
1344
|
* Tick the event was generated.
|
|
@@ -1405,10 +1390,41 @@ interface on_mod_item_opened {
|
|
|
1405
1390
|
* The player.
|
|
1406
1391
|
*/
|
|
1407
1392
|
player_index: uint;
|
|
1393
|
+
/**
|
|
1394
|
+
* The item quality clicked on.
|
|
1395
|
+
*/
|
|
1396
|
+
quality: LuaQualityPrototype;
|
|
1397
|
+
/**
|
|
1398
|
+
* Tick the event was generated.
|
|
1399
|
+
*/
|
|
1400
|
+
tick: uint;
|
|
1401
|
+
}
|
|
1402
|
+
/**
|
|
1403
|
+
* Called after an object is destroyed that has been registered with {@link LuaBootstrap::register_on_object_destroyed | runtime:LuaBootstrap::register_on_object_destroyed}.
|
|
1404
|
+
*
|
|
1405
|
+
* Depending on when a given object is destroyed, this event will be fired at the end of the current tick or at the end of the next tick.
|
|
1406
|
+
*/
|
|
1407
|
+
interface on_object_destroyed {
|
|
1408
|
+
/**
|
|
1409
|
+
* Identifier of the event
|
|
1410
|
+
*/
|
|
1411
|
+
name: defines.events;
|
|
1412
|
+
/**
|
|
1413
|
+
* The number returned by {@link register_on_object_destroyed | runtime:LuaBootstrap::register_on_object_destroyed} to uniquely identify this object during this event.
|
|
1414
|
+
*/
|
|
1415
|
+
registration_number: uint64;
|
|
1408
1416
|
/**
|
|
1409
1417
|
* Tick the event was generated.
|
|
1410
1418
|
*/
|
|
1411
1419
|
tick: uint;
|
|
1420
|
+
/**
|
|
1421
|
+
* Type of the object that was destroyed. Same as third value returned by {@link LuaBootstrap::register_on_object_destroyed | runtime:LuaBootstrap::register_on_object_destroyed}
|
|
1422
|
+
*/
|
|
1423
|
+
type: defines.target_type;
|
|
1424
|
+
/**
|
|
1425
|
+
* Useful identifier of the object. Same as second value returned by {@link LuaBootstrap::register_on_object_destroyed | runtime:LuaBootstrap::register_on_object_destroyed}
|
|
1426
|
+
*/
|
|
1427
|
+
useful_id: uint64;
|
|
1412
1428
|
}
|
|
1413
1429
|
/**
|
|
1414
1430
|
* Called directly after a permission group is added.
|
|
@@ -1423,9 +1439,9 @@ interface on_permission_group_added {
|
|
|
1423
1439
|
*/
|
|
1424
1440
|
name: defines.events;
|
|
1425
1441
|
/**
|
|
1426
|
-
* The player that added the group.
|
|
1442
|
+
* The player that added the group or `nil` if by a mod.
|
|
1427
1443
|
*/
|
|
1428
|
-
player_index
|
|
1444
|
+
player_index?: uint;
|
|
1429
1445
|
/**
|
|
1430
1446
|
* Tick the event was generated.
|
|
1431
1447
|
*/
|
|
@@ -1448,9 +1464,9 @@ interface on_permission_group_deleted {
|
|
|
1448
1464
|
*/
|
|
1449
1465
|
name: defines.events;
|
|
1450
1466
|
/**
|
|
1451
|
-
* The player doing the deletion.
|
|
1467
|
+
* The player doing the deletion or `nil` if by a mod.
|
|
1452
1468
|
*/
|
|
1453
|
-
player_index
|
|
1469
|
+
player_index?: uint;
|
|
1454
1470
|
/**
|
|
1455
1471
|
* Tick the event was generated.
|
|
1456
1472
|
*/
|
|
@@ -1485,9 +1501,9 @@ interface on_permission_group_edited {
|
|
|
1485
1501
|
*/
|
|
1486
1502
|
other_player_index: uint;
|
|
1487
1503
|
/**
|
|
1488
|
-
* The player that did the editing.
|
|
1504
|
+
* The player that did the editing or `nil` if by a mod.
|
|
1489
1505
|
*/
|
|
1490
|
-
player_index
|
|
1506
|
+
player_index?: uint;
|
|
1491
1507
|
/**
|
|
1492
1508
|
* Tick the event was generated.
|
|
1493
1509
|
*/
|
|
@@ -1590,6 +1606,10 @@ interface on_player_alt_selected_area {
|
|
|
1590
1606
|
* The player doing the selection.
|
|
1591
1607
|
*/
|
|
1592
1608
|
player_index: uint;
|
|
1609
|
+
/**
|
|
1610
|
+
* The item quality used to select the area.
|
|
1611
|
+
*/
|
|
1612
|
+
quality: string;
|
|
1593
1613
|
/**
|
|
1594
1614
|
* The surface selected.
|
|
1595
1615
|
*/
|
|
@@ -1664,6 +1684,10 @@ interface on_player_banned {
|
|
|
1664
1684
|
* Called after a player builds tiles.
|
|
1665
1685
|
*/
|
|
1666
1686
|
interface on_player_built_tile {
|
|
1687
|
+
/**
|
|
1688
|
+
* The inventory containing the items used to build the tiles.
|
|
1689
|
+
*/
|
|
1690
|
+
inventory?: LuaInventory;
|
|
1667
1691
|
/**
|
|
1668
1692
|
* The item type used to build the tiles
|
|
1669
1693
|
*/
|
|
@@ -1674,9 +1698,9 @@ interface on_player_built_tile {
|
|
|
1674
1698
|
name: defines.events;
|
|
1675
1699
|
player_index: uint;
|
|
1676
1700
|
/**
|
|
1677
|
-
* The
|
|
1701
|
+
* The quality of the item used to build the tiles
|
|
1678
1702
|
*/
|
|
1679
|
-
|
|
1703
|
+
quality?: LuaQualityPrototype;
|
|
1680
1704
|
/**
|
|
1681
1705
|
* The surface the tile(s) were built on.
|
|
1682
1706
|
*/
|
|
@@ -1763,8 +1787,6 @@ interface on_player_changed_position {
|
|
|
1763
1787
|
}
|
|
1764
1788
|
/**
|
|
1765
1789
|
* Called after a player changes surfaces.
|
|
1766
|
-
*
|
|
1767
|
-
* In the instance a player is moved off a surface due to it being deleted this is not called.
|
|
1768
1790
|
*/
|
|
1769
1791
|
interface on_player_changed_surface {
|
|
1770
1792
|
/**
|
|
@@ -1776,9 +1798,9 @@ interface on_player_changed_surface {
|
|
|
1776
1798
|
*/
|
|
1777
1799
|
player_index: uint;
|
|
1778
1800
|
/**
|
|
1779
|
-
* The surface index the player was on.
|
|
1801
|
+
* The surface index the player was on - may be `nil` if the surface no longer exists.
|
|
1780
1802
|
*/
|
|
1781
|
-
surface_index
|
|
1803
|
+
surface_index?: uint;
|
|
1782
1804
|
/**
|
|
1783
1805
|
* Tick the event was generated.
|
|
1784
1806
|
*/
|
|
@@ -1861,25 +1883,25 @@ interface on_player_configured_blueprint {
|
|
|
1861
1883
|
tick: uint;
|
|
1862
1884
|
}
|
|
1863
1885
|
/**
|
|
1864
|
-
* Called
|
|
1886
|
+
* Called after a player changes controller types.
|
|
1865
1887
|
*/
|
|
1866
|
-
interface
|
|
1888
|
+
interface on_player_controller_changed {
|
|
1867
1889
|
/**
|
|
1868
1890
|
* Identifier of the event
|
|
1869
1891
|
*/
|
|
1870
1892
|
name: defines.events;
|
|
1871
1893
|
/**
|
|
1872
|
-
* The
|
|
1894
|
+
* The old controller type.
|
|
1895
|
+
*/
|
|
1896
|
+
old_type: defines.controllers;
|
|
1897
|
+
/**
|
|
1898
|
+
* The player who changed controllers.
|
|
1873
1899
|
*/
|
|
1874
1900
|
player_index: uint;
|
|
1875
1901
|
/**
|
|
1876
1902
|
* Tick the event was generated.
|
|
1877
1903
|
*/
|
|
1878
1904
|
tick: uint;
|
|
1879
|
-
/**
|
|
1880
|
-
* Spider vehicle to which remote was connected to.
|
|
1881
|
-
*/
|
|
1882
|
-
vehicle: LuaEntity;
|
|
1883
1905
|
}
|
|
1884
1906
|
/**
|
|
1885
1907
|
* Called when the player finishes crafting an item. This event fires just before the results are inserted into the player's inventory, not when the crafting is queued (see {@link on_pre_player_crafted_item | runtime:on_pre_player_crafted_item}).
|
|
@@ -1960,6 +1982,14 @@ interface on_player_deconstructed_area {
|
|
|
1960
1982
|
* The player doing the selection.
|
|
1961
1983
|
*/
|
|
1962
1984
|
player_index: uint;
|
|
1985
|
+
/**
|
|
1986
|
+
* The item quality used to select the area.
|
|
1987
|
+
*/
|
|
1988
|
+
quality: string;
|
|
1989
|
+
/**
|
|
1990
|
+
* The item stack used to select the area.
|
|
1991
|
+
*/
|
|
1992
|
+
stack?: LuaItemStack;
|
|
1963
1993
|
/**
|
|
1964
1994
|
* The surface selected.
|
|
1965
1995
|
*/
|
|
@@ -2001,6 +2031,27 @@ interface on_player_died {
|
|
|
2001
2031
|
*/
|
|
2002
2032
|
tick: uint;
|
|
2003
2033
|
}
|
|
2034
|
+
/**
|
|
2035
|
+
* Called when the display density scale changes for a given player. The display density scale is the scale value automatically applied based on the player's display DPI. This is only relevant on platforms that support high-density displays.
|
|
2036
|
+
*/
|
|
2037
|
+
interface on_player_display_density_scale_changed {
|
|
2038
|
+
/**
|
|
2039
|
+
* Identifier of the event
|
|
2040
|
+
*/
|
|
2041
|
+
name: defines.events;
|
|
2042
|
+
/**
|
|
2043
|
+
* The old display scale
|
|
2044
|
+
*/
|
|
2045
|
+
old_scale: double;
|
|
2046
|
+
/**
|
|
2047
|
+
* The player
|
|
2048
|
+
*/
|
|
2049
|
+
player_index: uint;
|
|
2050
|
+
/**
|
|
2051
|
+
* Tick the event was generated.
|
|
2052
|
+
*/
|
|
2053
|
+
tick: uint;
|
|
2054
|
+
}
|
|
2004
2055
|
/**
|
|
2005
2056
|
* Called when the display resolution changes for a given player.
|
|
2006
2057
|
*/
|
|
@@ -2110,6 +2161,28 @@ interface on_player_fast_transferred {
|
|
|
2110
2161
|
*/
|
|
2111
2162
|
tick: uint;
|
|
2112
2163
|
}
|
|
2164
|
+
/**
|
|
2165
|
+
* Called when the player flips an entity. This event is only fired when the entity actually changes its orientation or mirroring -- pressing the flip keys on an entity that can't be flipped won't fire this event.
|
|
2166
|
+
*/
|
|
2167
|
+
interface on_player_flipped_entity {
|
|
2168
|
+
/**
|
|
2169
|
+
* The flipped entity.
|
|
2170
|
+
*/
|
|
2171
|
+
entity: LuaEntity;
|
|
2172
|
+
/**
|
|
2173
|
+
* The enacted flip. true = Horizontal, false = Vertical
|
|
2174
|
+
*/
|
|
2175
|
+
horizontal: boolean;
|
|
2176
|
+
/**
|
|
2177
|
+
* Identifier of the event
|
|
2178
|
+
*/
|
|
2179
|
+
name: defines.events;
|
|
2180
|
+
player_index: uint;
|
|
2181
|
+
/**
|
|
2182
|
+
* Tick the event was generated.
|
|
2183
|
+
*/
|
|
2184
|
+
tick: uint;
|
|
2185
|
+
}
|
|
2113
2186
|
/**
|
|
2114
2187
|
* Called after player flushed fluid
|
|
2115
2188
|
*/
|
|
@@ -2228,6 +2301,27 @@ interface on_player_left_game {
|
|
|
2228
2301
|
*/
|
|
2229
2302
|
tick: uint;
|
|
2230
2303
|
}
|
|
2304
|
+
/**
|
|
2305
|
+
* Called when a player's active locale changes. See {@link LuaPlayer::locale | runtime:LuaPlayer::locale}.
|
|
2306
|
+
*/
|
|
2307
|
+
interface on_player_locale_changed {
|
|
2308
|
+
/**
|
|
2309
|
+
* Identifier of the event
|
|
2310
|
+
*/
|
|
2311
|
+
name: defines.events;
|
|
2312
|
+
/**
|
|
2313
|
+
* The previously active locale.
|
|
2314
|
+
*/
|
|
2315
|
+
old_locale: string;
|
|
2316
|
+
/**
|
|
2317
|
+
* The player whose locale was changed.
|
|
2318
|
+
*/
|
|
2319
|
+
player_index: uint;
|
|
2320
|
+
/**
|
|
2321
|
+
* Tick the event was generated.
|
|
2322
|
+
*/
|
|
2323
|
+
tick: uint;
|
|
2324
|
+
}
|
|
2231
2325
|
/**
|
|
2232
2326
|
* Called after a players main inventory changed in some way.
|
|
2233
2327
|
*/
|
|
@@ -2344,6 +2438,10 @@ interface on_player_pipette {
|
|
|
2344
2438
|
* The player
|
|
2345
2439
|
*/
|
|
2346
2440
|
player_index: uint;
|
|
2441
|
+
/**
|
|
2442
|
+
* The item quality put in the cursor
|
|
2443
|
+
*/
|
|
2444
|
+
quality: LuaQualityPrototype;
|
|
2347
2445
|
/**
|
|
2348
2446
|
* Tick the event was generated.
|
|
2349
2447
|
*/
|
|
@@ -2430,6 +2528,10 @@ interface on_player_removed_equipment {
|
|
|
2430
2528
|
*/
|
|
2431
2529
|
name: defines.events;
|
|
2432
2530
|
player_index: uint;
|
|
2531
|
+
/**
|
|
2532
|
+
* The equipment quality.
|
|
2533
|
+
*/
|
|
2534
|
+
quality: string;
|
|
2433
2535
|
/**
|
|
2434
2536
|
* Tick the event was generated.
|
|
2435
2537
|
*/
|
|
@@ -2507,6 +2609,8 @@ interface on_player_reverse_selected_area {
|
|
|
2507
2609
|
}
|
|
2508
2610
|
/**
|
|
2509
2611
|
* Called when the player rotates an entity. This event is only fired when the entity actually changes its orientation -- pressing the rotate key on an entity that can't be rotated won't fire this event.
|
|
2612
|
+
*
|
|
2613
|
+
* Entities being flipped will not fire this event, even if the flip involves rotating. See {@link on_player_flipped_entity | runtime:on_player_flipped_entity}.
|
|
2510
2614
|
*/
|
|
2511
2615
|
interface on_player_rotated_entity {
|
|
2512
2616
|
/**
|
|
@@ -2551,6 +2655,10 @@ interface on_player_selected_area {
|
|
|
2551
2655
|
* The player doing the selection.
|
|
2552
2656
|
*/
|
|
2553
2657
|
player_index: uint;
|
|
2658
|
+
/**
|
|
2659
|
+
* The item quality used to select the area.
|
|
2660
|
+
*/
|
|
2661
|
+
quality: string;
|
|
2554
2662
|
/**
|
|
2555
2663
|
* The surface selected.
|
|
2556
2664
|
*/
|
|
@@ -2606,6 +2714,14 @@ interface on_player_setup_blueprint {
|
|
|
2606
2714
|
* The player doing the selection.
|
|
2607
2715
|
*/
|
|
2608
2716
|
player_index: uint;
|
|
2717
|
+
/**
|
|
2718
|
+
* The item quality used to select the area.
|
|
2719
|
+
*/
|
|
2720
|
+
quality: string;
|
|
2721
|
+
/**
|
|
2722
|
+
* The item stack used to select the area.
|
|
2723
|
+
*/
|
|
2724
|
+
stack?: LuaItemStack;
|
|
2609
2725
|
/**
|
|
2610
2726
|
* The surface selected.
|
|
2611
2727
|
*/
|
|
@@ -2727,15 +2843,19 @@ interface on_player_used_capsule {
|
|
|
2727
2843
|
* The position the capsule was used.
|
|
2728
2844
|
*/
|
|
2729
2845
|
position: MapPosition;
|
|
2846
|
+
/**
|
|
2847
|
+
* The quality of the capsule item used.
|
|
2848
|
+
*/
|
|
2849
|
+
quality: LuaQualityPrototype;
|
|
2730
2850
|
/**
|
|
2731
2851
|
* Tick the event was generated.
|
|
2732
2852
|
*/
|
|
2733
2853
|
tick: uint;
|
|
2734
2854
|
}
|
|
2735
2855
|
/**
|
|
2736
|
-
* Called when a player uses spidertron remote to send
|
|
2856
|
+
* Called when a player uses spidertron remote to send all selected units to a given position
|
|
2737
2857
|
*/
|
|
2738
|
-
interface
|
|
2858
|
+
interface on_player_used_spidertron_remote {
|
|
2739
2859
|
/**
|
|
2740
2860
|
* Identifier of the event
|
|
2741
2861
|
*/
|
|
@@ -2748,18 +2868,10 @@ interface on_player_used_spider_remote {
|
|
|
2748
2868
|
* Goal position to which spidertron was sent to.
|
|
2749
2869
|
*/
|
|
2750
2870
|
position: MapPosition;
|
|
2751
|
-
/**
|
|
2752
|
-
* If the use was successful. It may fail when spidertron has different driver or when player is on different surface.
|
|
2753
|
-
*/
|
|
2754
|
-
success: boolean;
|
|
2755
2871
|
/**
|
|
2756
2872
|
* Tick the event was generated.
|
|
2757
2873
|
*/
|
|
2758
2874
|
tick: uint;
|
|
2759
|
-
/**
|
|
2760
|
-
* Spider vehicle which was requested to move.
|
|
2761
|
-
*/
|
|
2762
|
-
vehicle: LuaEntity;
|
|
2763
2875
|
}
|
|
2764
2876
|
/**
|
|
2765
2877
|
* Called after an entity dies.
|
|
@@ -2793,6 +2905,10 @@ interface on_post_entity_died {
|
|
|
2793
2905
|
* The entity prototype of the entity that died.
|
|
2794
2906
|
*/
|
|
2795
2907
|
prototype: LuaEntityPrototype;
|
|
2908
|
+
/**
|
|
2909
|
+
* The quality of the entity that died.
|
|
2910
|
+
*/
|
|
2911
|
+
quality: LuaQualityPrototype;
|
|
2796
2912
|
/**
|
|
2797
2913
|
* The surface the entity was on.
|
|
2798
2914
|
*/
|
|
@@ -2810,6 +2926,10 @@ interface on_post_entity_died {
|
|
|
2810
2926
|
* Called when players uses an item to build something. Called before {@link on_built_entity | runtime:on_built_entity}.
|
|
2811
2927
|
*/
|
|
2812
2928
|
interface on_pre_build {
|
|
2929
|
+
/**
|
|
2930
|
+
* Build mode the item was placed with.
|
|
2931
|
+
*/
|
|
2932
|
+
build_mode: defines.build_mode;
|
|
2813
2933
|
/**
|
|
2814
2934
|
* Whether the item was placed while moving.
|
|
2815
2935
|
*/
|
|
@@ -2826,6 +2946,10 @@ interface on_pre_build {
|
|
|
2826
2946
|
* Whether the blueprint was flipped vertically. `nil` if not built by a blueprint.
|
|
2827
2947
|
*/
|
|
2828
2948
|
flip_vertical: boolean;
|
|
2949
|
+
/**
|
|
2950
|
+
* If the item is mirrored (only crafting machines support this)
|
|
2951
|
+
*/
|
|
2952
|
+
mirror: boolean;
|
|
2829
2953
|
/**
|
|
2830
2954
|
* Identifier of the event
|
|
2831
2955
|
*/
|
|
@@ -2838,10 +2962,6 @@ interface on_pre_build {
|
|
|
2838
2962
|
* Where the item was placed.
|
|
2839
2963
|
*/
|
|
2840
2964
|
position: MapPosition;
|
|
2841
|
-
/**
|
|
2842
|
-
* Item was placed using shift building.
|
|
2843
|
-
*/
|
|
2844
|
-
shift_build: boolean;
|
|
2845
2965
|
/**
|
|
2846
2966
|
* Tick the event was generated.
|
|
2847
2967
|
*/
|
|
@@ -2920,6 +3040,7 @@ interface on_pre_ghost_upgraded {
|
|
|
2920
3040
|
* The player that did the upgrade if any.
|
|
2921
3041
|
*/
|
|
2922
3042
|
player_index?: uint;
|
|
3043
|
+
quality: LuaQualityPrototype;
|
|
2923
3044
|
target: LuaEntityPrototype;
|
|
2924
3045
|
/**
|
|
2925
3046
|
* Tick the event was generated.
|
|
@@ -2939,9 +3060,9 @@ interface on_pre_permission_group_deleted {
|
|
|
2939
3060
|
*/
|
|
2940
3061
|
name: defines.events;
|
|
2941
3062
|
/**
|
|
2942
|
-
* The player doing the deletion.
|
|
3063
|
+
* The player doing the deletion or `nil` if by a mod.
|
|
2943
3064
|
*/
|
|
2944
|
-
player_index
|
|
3065
|
+
player_index?: uint;
|
|
2945
3066
|
/**
|
|
2946
3067
|
* Tick the event was generated.
|
|
2947
3068
|
*/
|
|
@@ -3085,12 +3206,29 @@ interface on_pre_robot_exploded_cliff {
|
|
|
3085
3206
|
* Identifier of the event
|
|
3086
3207
|
*/
|
|
3087
3208
|
name: defines.events;
|
|
3209
|
+
/**
|
|
3210
|
+
* The quality of the cliff explosive used.
|
|
3211
|
+
*/
|
|
3212
|
+
quality: LuaQualityPrototype;
|
|
3088
3213
|
robot: LuaEntity;
|
|
3089
3214
|
/**
|
|
3090
3215
|
* Tick the event was generated.
|
|
3091
3216
|
*/
|
|
3092
3217
|
tick: uint;
|
|
3093
3218
|
}
|
|
3219
|
+
/**
|
|
3220
|
+
* Called just before the scenario finishes.
|
|
3221
|
+
*/
|
|
3222
|
+
interface on_pre_scenario_finished {
|
|
3223
|
+
/**
|
|
3224
|
+
* Identifier of the event
|
|
3225
|
+
*/
|
|
3226
|
+
name: defines.events;
|
|
3227
|
+
/**
|
|
3228
|
+
* Tick the event was generated.
|
|
3229
|
+
*/
|
|
3230
|
+
tick: uint;
|
|
3231
|
+
}
|
|
3094
3232
|
/**
|
|
3095
3233
|
* Called just before a script inventory is resized.
|
|
3096
3234
|
*/
|
|
@@ -3149,6 +3287,27 @@ interface on_pre_surface_deleted {
|
|
|
3149
3287
|
*/
|
|
3150
3288
|
tick: uint;
|
|
3151
3289
|
}
|
|
3290
|
+
/**
|
|
3291
|
+
* Called when the player triggers "redo".
|
|
3292
|
+
*/
|
|
3293
|
+
interface on_redo_applied {
|
|
3294
|
+
/**
|
|
3295
|
+
* The context of the redo action.
|
|
3296
|
+
*/
|
|
3297
|
+
actions: UndoRedoAction[];
|
|
3298
|
+
/**
|
|
3299
|
+
* Identifier of the event
|
|
3300
|
+
*/
|
|
3301
|
+
name: defines.events;
|
|
3302
|
+
/**
|
|
3303
|
+
* The player who triggered the redo action.
|
|
3304
|
+
*/
|
|
3305
|
+
player_index: uint;
|
|
3306
|
+
/**
|
|
3307
|
+
* Tick the event was generated.
|
|
3308
|
+
*/
|
|
3309
|
+
tick: uint;
|
|
3310
|
+
}
|
|
3152
3311
|
/**
|
|
3153
3312
|
* Called when research is cancelled.
|
|
3154
3313
|
*/
|
|
@@ -3191,6 +3350,23 @@ interface on_research_finished {
|
|
|
3191
3350
|
*/
|
|
3192
3351
|
tick: uint;
|
|
3193
3352
|
}
|
|
3353
|
+
/**
|
|
3354
|
+
* Called when research is moved forwards or backwards in the research queue.
|
|
3355
|
+
*/
|
|
3356
|
+
interface on_research_moved {
|
|
3357
|
+
/**
|
|
3358
|
+
* The force whose research was re-arranged.
|
|
3359
|
+
*/
|
|
3360
|
+
force: LuaForce;
|
|
3361
|
+
/**
|
|
3362
|
+
* Identifier of the event
|
|
3363
|
+
*/
|
|
3364
|
+
name: defines.events;
|
|
3365
|
+
/**
|
|
3366
|
+
* Tick the event was generated.
|
|
3367
|
+
*/
|
|
3368
|
+
tick: uint;
|
|
3369
|
+
}
|
|
3194
3370
|
/**
|
|
3195
3371
|
* Called when a research is reversed (unresearched).
|
|
3196
3372
|
*/
|
|
@@ -3251,7 +3427,7 @@ interface on_robot_built_entity {
|
|
|
3251
3427
|
/**
|
|
3252
3428
|
* The entity built.
|
|
3253
3429
|
*/
|
|
3254
|
-
|
|
3430
|
+
entity: LuaEntity;
|
|
3255
3431
|
/**
|
|
3256
3432
|
* Identifier of the event
|
|
3257
3433
|
*/
|
|
@@ -3277,6 +3453,10 @@ interface on_robot_built_entity {
|
|
|
3277
3453
|
* Called after a robot builds tiles.
|
|
3278
3454
|
*/
|
|
3279
3455
|
interface on_robot_built_tile {
|
|
3456
|
+
/**
|
|
3457
|
+
* The inventory containing the stacks used to build the tiles.
|
|
3458
|
+
*/
|
|
3459
|
+
inventory: LuaInventory;
|
|
3280
3460
|
/**
|
|
3281
3461
|
* The item type used to build the tiles.
|
|
3282
3462
|
*/
|
|
@@ -3286,13 +3466,13 @@ interface on_robot_built_tile {
|
|
|
3286
3466
|
*/
|
|
3287
3467
|
name: defines.events;
|
|
3288
3468
|
/**
|
|
3289
|
-
* The
|
|
3469
|
+
* The quality the item used to build the tiles.
|
|
3290
3470
|
*/
|
|
3291
|
-
|
|
3471
|
+
quality: LuaQualityPrototype;
|
|
3292
3472
|
/**
|
|
3293
|
-
* The
|
|
3473
|
+
* The robot.
|
|
3294
3474
|
*/
|
|
3295
|
-
|
|
3475
|
+
robot: LuaEntity;
|
|
3296
3476
|
/**
|
|
3297
3477
|
* The surface the tile(s) are build on.
|
|
3298
3478
|
*/
|
|
@@ -3322,6 +3502,10 @@ interface on_robot_exploded_cliff {
|
|
|
3322
3502
|
* Identifier of the event
|
|
3323
3503
|
*/
|
|
3324
3504
|
name: defines.events;
|
|
3505
|
+
/**
|
|
3506
|
+
* The quality of the cliff explosive used.
|
|
3507
|
+
*/
|
|
3508
|
+
quality: LuaQualityPrototype;
|
|
3325
3509
|
robot: LuaEntity;
|
|
3326
3510
|
/**
|
|
3327
3511
|
* Tick the event was generated.
|
|
@@ -3547,6 +3731,10 @@ interface on_script_path_request_finished {
|
|
|
3547
3731
|
* Called when a script trigger effect is triggered.
|
|
3548
3732
|
*/
|
|
3549
3733
|
interface on_script_trigger_effect {
|
|
3734
|
+
/**
|
|
3735
|
+
* The entity that originally caused the sequence of triggers
|
|
3736
|
+
*/
|
|
3737
|
+
cause_entity?: LuaEntity;
|
|
3550
3738
|
/**
|
|
3551
3739
|
* The effect_id specified in the trigger effect.
|
|
3552
3740
|
*/
|
|
@@ -3593,6 +3781,20 @@ interface on_sector_scanned {
|
|
|
3593
3781
|
*/
|
|
3594
3782
|
tick: uint;
|
|
3595
3783
|
}
|
|
3784
|
+
/**
|
|
3785
|
+
* Called when an individual segment of a SegmentedUnit is created.
|
|
3786
|
+
*/
|
|
3787
|
+
interface on_segment_entity_created {
|
|
3788
|
+
entity: LuaEntity;
|
|
3789
|
+
/**
|
|
3790
|
+
* Identifier of the event
|
|
3791
|
+
*/
|
|
3792
|
+
name: defines.events;
|
|
3793
|
+
/**
|
|
3794
|
+
* Tick the event was generated.
|
|
3795
|
+
*/
|
|
3796
|
+
tick: uint;
|
|
3797
|
+
}
|
|
3596
3798
|
/**
|
|
3597
3799
|
* Called after the selected entity changes for a given player.
|
|
3598
3800
|
*/
|
|
@@ -3614,6 +3816,187 @@ interface on_selected_entity_changed {
|
|
|
3614
3816
|
*/
|
|
3615
3817
|
tick: uint;
|
|
3616
3818
|
}
|
|
3819
|
+
/**
|
|
3820
|
+
* Called when a space platform builds an entity.
|
|
3821
|
+
*/
|
|
3822
|
+
interface on_space_platform_built_entity {
|
|
3823
|
+
/**
|
|
3824
|
+
* The entity built.
|
|
3825
|
+
*/
|
|
3826
|
+
entity: LuaEntity;
|
|
3827
|
+
/**
|
|
3828
|
+
* Identifier of the event
|
|
3829
|
+
*/
|
|
3830
|
+
name: defines.events;
|
|
3831
|
+
/**
|
|
3832
|
+
* The platform that did the building.
|
|
3833
|
+
*/
|
|
3834
|
+
platform: LuaSpacePlatform;
|
|
3835
|
+
/**
|
|
3836
|
+
* The item used to do the building.
|
|
3837
|
+
*/
|
|
3838
|
+
stack: LuaItemStack;
|
|
3839
|
+
/**
|
|
3840
|
+
* The tags associated with this entity if any.
|
|
3841
|
+
*/
|
|
3842
|
+
tags?: Tags;
|
|
3843
|
+
/**
|
|
3844
|
+
* Tick the event was generated.
|
|
3845
|
+
*/
|
|
3846
|
+
tick: uint;
|
|
3847
|
+
}
|
|
3848
|
+
/**
|
|
3849
|
+
* Called after a space platform builds tiles.
|
|
3850
|
+
*/
|
|
3851
|
+
interface on_space_platform_built_tile {
|
|
3852
|
+
/**
|
|
3853
|
+
* The inventory containing the stacks used to build the tiles.
|
|
3854
|
+
*/
|
|
3855
|
+
inventory: LuaInventory;
|
|
3856
|
+
/**
|
|
3857
|
+
* The item type used to build the tiles.
|
|
3858
|
+
*/
|
|
3859
|
+
item: LuaItemPrototype;
|
|
3860
|
+
/**
|
|
3861
|
+
* Identifier of the event
|
|
3862
|
+
*/
|
|
3863
|
+
name: defines.events;
|
|
3864
|
+
/**
|
|
3865
|
+
* The platform.
|
|
3866
|
+
*/
|
|
3867
|
+
platform: LuaSpacePlatform;
|
|
3868
|
+
/**
|
|
3869
|
+
* The quality the item used to build the tiles.
|
|
3870
|
+
*/
|
|
3871
|
+
quality: LuaQualityPrototype;
|
|
3872
|
+
/**
|
|
3873
|
+
* The surface the tile(s) are build on.
|
|
3874
|
+
*/
|
|
3875
|
+
surface_index: uint;
|
|
3876
|
+
/**
|
|
3877
|
+
* Tick the event was generated.
|
|
3878
|
+
*/
|
|
3879
|
+
tick: uint;
|
|
3880
|
+
/**
|
|
3881
|
+
* The tile prototype that was placed.
|
|
3882
|
+
*/
|
|
3883
|
+
tile: LuaTilePrototype;
|
|
3884
|
+
/**
|
|
3885
|
+
* The position data.
|
|
3886
|
+
*/
|
|
3887
|
+
tiles: OldTileAndPosition[];
|
|
3888
|
+
}
|
|
3889
|
+
/**
|
|
3890
|
+
* Called when a space platform changes state
|
|
3891
|
+
*/
|
|
3892
|
+
interface on_space_platform_changed_state {
|
|
3893
|
+
/**
|
|
3894
|
+
* Identifier of the event
|
|
3895
|
+
*/
|
|
3896
|
+
name: defines.events;
|
|
3897
|
+
old_state: defines.space_platform_state;
|
|
3898
|
+
platform: LuaSpacePlatform;
|
|
3899
|
+
/**
|
|
3900
|
+
* Tick the event was generated.
|
|
3901
|
+
*/
|
|
3902
|
+
tick: uint;
|
|
3903
|
+
}
|
|
3904
|
+
/**
|
|
3905
|
+
* Called after the results of an entity being mined are collected just before the entity is destroyed.
|
|
3906
|
+
*
|
|
3907
|
+
* After this event any items in the buffer will be transferred into the platform as if they came from mining the entity.
|
|
3908
|
+
*
|
|
3909
|
+
* The buffer inventory is special in that it's only valid during this event and has a dynamic size expanding as more items are transferred into it.
|
|
3910
|
+
*/
|
|
3911
|
+
interface on_space_platform_mined_entity {
|
|
3912
|
+
/**
|
|
3913
|
+
* The temporary inventory that holds the result of mining the entity.
|
|
3914
|
+
*/
|
|
3915
|
+
buffer: LuaInventory;
|
|
3916
|
+
/**
|
|
3917
|
+
* The entity that has been mined.
|
|
3918
|
+
*/
|
|
3919
|
+
entity: LuaEntity;
|
|
3920
|
+
/**
|
|
3921
|
+
* Identifier of the event
|
|
3922
|
+
*/
|
|
3923
|
+
name: defines.events;
|
|
3924
|
+
/**
|
|
3925
|
+
* The platform doing the mining.
|
|
3926
|
+
*/
|
|
3927
|
+
platform: LuaSpacePlatform;
|
|
3928
|
+
/**
|
|
3929
|
+
* Tick the event was generated.
|
|
3930
|
+
*/
|
|
3931
|
+
tick: uint;
|
|
3932
|
+
}
|
|
3933
|
+
/**
|
|
3934
|
+
* Called when a platform mines an entity.
|
|
3935
|
+
*/
|
|
3936
|
+
interface on_space_platform_mined_item {
|
|
3937
|
+
/**
|
|
3938
|
+
* The entity the platform just picked up.
|
|
3939
|
+
*/
|
|
3940
|
+
item_stack: SimpleItemStack;
|
|
3941
|
+
/**
|
|
3942
|
+
* Identifier of the event
|
|
3943
|
+
*/
|
|
3944
|
+
name: defines.events;
|
|
3945
|
+
/**
|
|
3946
|
+
* The platform that did the mining.
|
|
3947
|
+
*/
|
|
3948
|
+
platform: LuaSpacePlatform;
|
|
3949
|
+
/**
|
|
3950
|
+
* Tick the event was generated.
|
|
3951
|
+
*/
|
|
3952
|
+
tick: uint;
|
|
3953
|
+
}
|
|
3954
|
+
/**
|
|
3955
|
+
* Called after a platform mines tiles.
|
|
3956
|
+
*/
|
|
3957
|
+
interface on_space_platform_mined_tile {
|
|
3958
|
+
/**
|
|
3959
|
+
* Identifier of the event
|
|
3960
|
+
*/
|
|
3961
|
+
name: defines.events;
|
|
3962
|
+
/**
|
|
3963
|
+
* The platform.
|
|
3964
|
+
*/
|
|
3965
|
+
platform: LuaSpacePlatform;
|
|
3966
|
+
/**
|
|
3967
|
+
* The surface the tile(s) were mined on.
|
|
3968
|
+
*/
|
|
3969
|
+
surface_index: uint;
|
|
3970
|
+
/**
|
|
3971
|
+
* Tick the event was generated.
|
|
3972
|
+
*/
|
|
3973
|
+
tick: uint;
|
|
3974
|
+
/**
|
|
3975
|
+
* The position data.
|
|
3976
|
+
*/
|
|
3977
|
+
tiles: OldTileAndPosition[];
|
|
3978
|
+
}
|
|
3979
|
+
/**
|
|
3980
|
+
* Called before a platform mines an entity.
|
|
3981
|
+
*/
|
|
3982
|
+
interface on_space_platform_pre_mined {
|
|
3983
|
+
/**
|
|
3984
|
+
* The entity which is about to be mined.
|
|
3985
|
+
*/
|
|
3986
|
+
entity: LuaEntity;
|
|
3987
|
+
/**
|
|
3988
|
+
* Identifier of the event
|
|
3989
|
+
*/
|
|
3990
|
+
name: defines.events;
|
|
3991
|
+
/**
|
|
3992
|
+
* The platform that's about to do the mining.
|
|
3993
|
+
*/
|
|
3994
|
+
platform: LuaSpacePlatform;
|
|
3995
|
+
/**
|
|
3996
|
+
* Tick the event was generated.
|
|
3997
|
+
*/
|
|
3998
|
+
tick: uint;
|
|
3999
|
+
}
|
|
3617
4000
|
/**
|
|
3618
4001
|
* Called when a spider finishes moving to its autopilot position.
|
|
3619
4002
|
*/
|
|
@@ -3825,7 +4208,7 @@ interface on_train_schedule_changed {
|
|
|
3825
4208
|
train: LuaTrain;
|
|
3826
4209
|
}
|
|
3827
4210
|
/**
|
|
3828
|
-
* Called when an entity with a trigger prototype (such as capsules) create an entity AND that trigger prototype defined `trigger_created_entity=
|
|
4211
|
+
* Called when an entity with a trigger prototype (such as capsules) create an entity AND that trigger prototype defined `trigger_created_entity=true`.
|
|
3829
4212
|
*/
|
|
3830
4213
|
interface on_trigger_created_entity {
|
|
3831
4214
|
entity: LuaEntity;
|
|
@@ -3840,7 +4223,7 @@ interface on_trigger_created_entity {
|
|
|
3840
4223
|
tick: uint;
|
|
3841
4224
|
}
|
|
3842
4225
|
/**
|
|
3843
|
-
* Called when an entity with a trigger prototype (such as capsules) fire an artillery projectile AND that trigger prototype defined `trigger_fired_artillery=
|
|
4226
|
+
* Called when an entity with a trigger prototype (such as capsules) fire an artillery projectile AND that trigger prototype defined `trigger_fired_artillery=true`.
|
|
3844
4227
|
*/
|
|
3845
4228
|
interface on_trigger_fired_artillery {
|
|
3846
4229
|
entity: LuaEntity;
|
|
@@ -3854,11 +4237,32 @@ interface on_trigger_fired_artillery {
|
|
|
3854
4237
|
*/
|
|
3855
4238
|
tick: uint;
|
|
3856
4239
|
}
|
|
4240
|
+
/**
|
|
4241
|
+
* Called when the player triggers "undo".
|
|
4242
|
+
*/
|
|
4243
|
+
interface on_undo_applied {
|
|
4244
|
+
/**
|
|
4245
|
+
* The context of the undo action.
|
|
4246
|
+
*/
|
|
4247
|
+
actions: UndoRedoAction[];
|
|
4248
|
+
/**
|
|
4249
|
+
* Identifier of the event
|
|
4250
|
+
*/
|
|
4251
|
+
name: defines.events;
|
|
4252
|
+
/**
|
|
4253
|
+
* The player who triggered the undo action.
|
|
4254
|
+
*/
|
|
4255
|
+
player_index: uint;
|
|
4256
|
+
/**
|
|
4257
|
+
* Tick the event was generated.
|
|
4258
|
+
*/
|
|
4259
|
+
tick: uint;
|
|
4260
|
+
}
|
|
3857
4261
|
/**
|
|
3858
4262
|
* Called when a unit is added to a unit group.
|
|
3859
4263
|
*/
|
|
3860
4264
|
interface on_unit_added_to_group {
|
|
3861
|
-
group:
|
|
4265
|
+
group: LuaCommandable;
|
|
3862
4266
|
/**
|
|
3863
4267
|
* Identifier of the event
|
|
3864
4268
|
*/
|
|
@@ -3873,7 +4277,7 @@ interface on_unit_added_to_group {
|
|
|
3873
4277
|
* Called when a new unit group is created, before any members are added to it.
|
|
3874
4278
|
*/
|
|
3875
4279
|
interface on_unit_group_created {
|
|
3876
|
-
group:
|
|
4280
|
+
group: LuaCommandable;
|
|
3877
4281
|
/**
|
|
3878
4282
|
* Identifier of the event
|
|
3879
4283
|
*/
|
|
@@ -3887,7 +4291,7 @@ interface on_unit_group_created {
|
|
|
3887
4291
|
* Called when a unit group finishes gathering and starts executing its command.
|
|
3888
4292
|
*/
|
|
3889
4293
|
interface on_unit_group_finished_gathering {
|
|
3890
|
-
group:
|
|
4294
|
+
group: LuaCommandable;
|
|
3891
4295
|
/**
|
|
3892
4296
|
* Identifier of the event
|
|
3893
4297
|
*/
|
|
@@ -3901,7 +4305,7 @@ interface on_unit_group_finished_gathering {
|
|
|
3901
4305
|
* Called when a unit is removed from a unit group.
|
|
3902
4306
|
*/
|
|
3903
4307
|
interface on_unit_removed_from_group {
|
|
3904
|
-
group:
|
|
4308
|
+
group: LuaCommandable;
|
|
3905
4309
|
/**
|
|
3906
4310
|
* Identifier of the event
|
|
3907
4311
|
*/
|