factorio-types 1.2.43 → 1.2.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/classes.d.ts +698 -79
- package/dist/concepts.d.ts +6160 -4178
- package/dist/datacollection.d.ts +1 -1
- package/dist/defines.d.ts +339 -266
- package/dist/events.d.ts +296 -24
- package/dist/global.d.ts +1 -1
- package/dist/prototypes.d.ts +45 -34
- package/dist/types.d.ts +25 -23
- package/package.json +2 -2
package/dist/events.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Factorio API reference https://lua-api.factorio.com/latest/index.html
|
|
3
3
|
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version 2.0.
|
|
5
|
+
// Factorio version 2.0.62
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -1037,27 +1037,27 @@ interface on_gui_click {
|
|
|
1037
1037
|
*/
|
|
1038
1038
|
interface on_gui_closed {
|
|
1039
1039
|
/**
|
|
1040
|
-
* The custom GUI element that was
|
|
1040
|
+
* The custom GUI element that was closed.
|
|
1041
1041
|
*/
|
|
1042
1042
|
element?: LuaGuiElement;
|
|
1043
1043
|
/**
|
|
1044
|
-
* The entity
|
|
1044
|
+
* The entity or entity grid whose GUI was closed.
|
|
1045
1045
|
*/
|
|
1046
1046
|
entity?: LuaEntity;
|
|
1047
1047
|
/**
|
|
1048
|
-
* The equipment
|
|
1048
|
+
* The equipment whose GUI was closed.
|
|
1049
1049
|
*/
|
|
1050
1050
|
equipment?: LuaEquipment;
|
|
1051
1051
|
/**
|
|
1052
|
-
* The GUI
|
|
1052
|
+
* The type of GUI that was closed.
|
|
1053
1053
|
*/
|
|
1054
1054
|
gui_type: defines.gui_type;
|
|
1055
1055
|
/**
|
|
1056
|
-
* The script inventory
|
|
1056
|
+
* The script inventory whose GUI was closed.
|
|
1057
1057
|
*/
|
|
1058
1058
|
inventory?: LuaInventory;
|
|
1059
1059
|
/**
|
|
1060
|
-
* The item
|
|
1060
|
+
* The item whose GUI was closed.
|
|
1061
1061
|
*/
|
|
1062
1062
|
item?: LuaItemStack;
|
|
1063
1063
|
/**
|
|
@@ -1065,23 +1065,23 @@ interface on_gui_closed {
|
|
|
1065
1065
|
*/
|
|
1066
1066
|
name: defines.events;
|
|
1067
1067
|
/**
|
|
1068
|
-
* The other player
|
|
1068
|
+
* The other player whose GUI was closed.
|
|
1069
1069
|
*/
|
|
1070
1070
|
other_player?: LuaPlayer;
|
|
1071
1071
|
/**
|
|
1072
|
-
* The player.
|
|
1072
|
+
* The player closing the GUI.
|
|
1073
1073
|
*/
|
|
1074
1074
|
player_index: uint;
|
|
1075
1075
|
/**
|
|
1076
|
-
* The
|
|
1076
|
+
* The surface index of the global electric network whose GUI was closed.
|
|
1077
1077
|
*/
|
|
1078
|
-
|
|
1078
|
+
surface_index?: uint;
|
|
1079
1079
|
/**
|
|
1080
1080
|
* Tick the event was generated.
|
|
1081
1081
|
*/
|
|
1082
1082
|
tick: uint;
|
|
1083
1083
|
/**
|
|
1084
|
-
* The tile
|
|
1084
|
+
* The position of the tile whose GUI was closed.
|
|
1085
1085
|
*/
|
|
1086
1086
|
tile_position?: TilePosition;
|
|
1087
1087
|
}
|
|
@@ -1211,27 +1211,27 @@ interface on_gui_location_changed {
|
|
|
1211
1211
|
*/
|
|
1212
1212
|
interface on_gui_opened {
|
|
1213
1213
|
/**
|
|
1214
|
-
* The custom GUI element that was opened
|
|
1214
|
+
* The custom GUI element that was opened.
|
|
1215
1215
|
*/
|
|
1216
1216
|
element?: LuaGuiElement;
|
|
1217
1217
|
/**
|
|
1218
|
-
* The entity
|
|
1218
|
+
* The entity or entity grid whose GUI was opened.
|
|
1219
1219
|
*/
|
|
1220
1220
|
entity?: LuaEntity;
|
|
1221
1221
|
/**
|
|
1222
|
-
* The equipment
|
|
1222
|
+
* The equipment whose GUI was opened.
|
|
1223
1223
|
*/
|
|
1224
1224
|
equipment?: LuaEquipment;
|
|
1225
1225
|
/**
|
|
1226
|
-
* The GUI
|
|
1226
|
+
* The type of GUI that was opened.
|
|
1227
1227
|
*/
|
|
1228
1228
|
gui_type: defines.gui_type;
|
|
1229
1229
|
/**
|
|
1230
|
-
* The script inventory
|
|
1230
|
+
* The script inventory whose GUI was opened.
|
|
1231
1231
|
*/
|
|
1232
1232
|
inventory?: LuaInventory;
|
|
1233
1233
|
/**
|
|
1234
|
-
* The item
|
|
1234
|
+
* The item whose GUI was opened.
|
|
1235
1235
|
*/
|
|
1236
1236
|
item?: LuaItemStack;
|
|
1237
1237
|
/**
|
|
@@ -1239,17 +1239,25 @@ interface on_gui_opened {
|
|
|
1239
1239
|
*/
|
|
1240
1240
|
name: defines.events;
|
|
1241
1241
|
/**
|
|
1242
|
-
* The other player
|
|
1242
|
+
* The other player whose GUI was opened.
|
|
1243
1243
|
*/
|
|
1244
1244
|
other_player?: LuaPlayer;
|
|
1245
1245
|
/**
|
|
1246
|
-
* The player.
|
|
1246
|
+
* The player closing the GUI.
|
|
1247
1247
|
*/
|
|
1248
1248
|
player_index: uint;
|
|
1249
|
+
/**
|
|
1250
|
+
* The surface index of the global electric network whose GUI was opened.
|
|
1251
|
+
*/
|
|
1252
|
+
surface_index?: uint;
|
|
1249
1253
|
/**
|
|
1250
1254
|
* Tick the event was generated.
|
|
1251
1255
|
*/
|
|
1252
1256
|
tick: uint;
|
|
1257
|
+
/**
|
|
1258
|
+
* The position of the tile whose GUI was opened.
|
|
1259
|
+
*/
|
|
1260
|
+
tile_position?: TilePosition;
|
|
1253
1261
|
}
|
|
1254
1262
|
/**
|
|
1255
1263
|
* Called when {@link LuaGuiElement | runtime:LuaGuiElement} selected tab is changed (related to tabbed-panes).
|
|
@@ -1626,7 +1634,7 @@ interface on_permission_string_imported {
|
|
|
1626
1634
|
* Called when a player picks up an item.
|
|
1627
1635
|
*/
|
|
1628
1636
|
interface on_picked_up_item {
|
|
1629
|
-
item_stack:
|
|
1637
|
+
item_stack: ItemWithQualityCount;
|
|
1630
1638
|
/**
|
|
1631
1639
|
* Identifier of the event
|
|
1632
1640
|
*/
|
|
@@ -2470,7 +2478,7 @@ interface on_player_mined_item {
|
|
|
2470
2478
|
/**
|
|
2471
2479
|
* The item given to the player
|
|
2472
2480
|
*/
|
|
2473
|
-
item_stack:
|
|
2481
|
+
item_stack: ItemWithQualityCount;
|
|
2474
2482
|
/**
|
|
2475
2483
|
* Identifier of the event
|
|
2476
2484
|
*/
|
|
@@ -3024,6 +3032,47 @@ interface on_post_entity_died {
|
|
|
3024
3032
|
*/
|
|
3025
3033
|
unit_number?: uint;
|
|
3026
3034
|
}
|
|
3035
|
+
/**
|
|
3036
|
+
* Called after a segmented unit dies.
|
|
3037
|
+
*/
|
|
3038
|
+
interface on_post_segmented_unit_died {
|
|
3039
|
+
/**
|
|
3040
|
+
* The damage type that did the killing if any.
|
|
3041
|
+
*/
|
|
3042
|
+
damage_type?: LuaDamagePrototype;
|
|
3043
|
+
/**
|
|
3044
|
+
* The force that did the killing if any.
|
|
3045
|
+
*/
|
|
3046
|
+
force?: LuaForce;
|
|
3047
|
+
/**
|
|
3048
|
+
* Identifier of the event
|
|
3049
|
+
*/
|
|
3050
|
+
name: defines.events;
|
|
3051
|
+
/**
|
|
3052
|
+
* The prototype of the unit that died.
|
|
3053
|
+
*/
|
|
3054
|
+
prototype: LuaEntityPrototype;
|
|
3055
|
+
/**
|
|
3056
|
+
* The quality of the unit that died.
|
|
3057
|
+
*/
|
|
3058
|
+
quality: LuaQualityPrototype;
|
|
3059
|
+
/**
|
|
3060
|
+
* Information about each of the unit's individual segments when it died.
|
|
3061
|
+
*/
|
|
3062
|
+
segments: PostSegmentDiedData;
|
|
3063
|
+
/**
|
|
3064
|
+
* The surface the entity was on.
|
|
3065
|
+
*/
|
|
3066
|
+
surface_index: uint;
|
|
3067
|
+
/**
|
|
3068
|
+
* Tick the event was generated.
|
|
3069
|
+
*/
|
|
3070
|
+
tick: uint;
|
|
3071
|
+
/**
|
|
3072
|
+
* The unit number of the unit that died.
|
|
3073
|
+
*/
|
|
3074
|
+
unit_number: uint;
|
|
3075
|
+
}
|
|
3027
3076
|
/**
|
|
3028
3077
|
* Called when players uses an item to build something. Called before {@link on_built_entity | runtime:on_built_entity}.
|
|
3029
3078
|
*/
|
|
@@ -3658,7 +3707,7 @@ interface on_robot_mined {
|
|
|
3658
3707
|
/**
|
|
3659
3708
|
* The entity the robot just picked up.
|
|
3660
3709
|
*/
|
|
3661
|
-
item_stack:
|
|
3710
|
+
item_stack: ItemWithQualityCount;
|
|
3662
3711
|
/**
|
|
3663
3712
|
* Identifier of the event
|
|
3664
3713
|
*/
|
|
@@ -3931,6 +3980,99 @@ interface on_segment_entity_created {
|
|
|
3931
3980
|
*/
|
|
3932
3981
|
tick: uint;
|
|
3933
3982
|
}
|
|
3983
|
+
/**
|
|
3984
|
+
* Called when a segmented unit is created for any reason.
|
|
3985
|
+
*/
|
|
3986
|
+
interface on_segmented_unit_created {
|
|
3987
|
+
/**
|
|
3988
|
+
* The reason that the segmented unit was created.
|
|
3989
|
+
*/
|
|
3990
|
+
cause: defines.segmented_unit_created_cause;
|
|
3991
|
+
/**
|
|
3992
|
+
* If the new segmented unit was cloned, the segmented unit from which the new unit was cloned.
|
|
3993
|
+
*/
|
|
3994
|
+
clone_source?: LuaSegmentedUnit;
|
|
3995
|
+
/**
|
|
3996
|
+
* Identifier of the event
|
|
3997
|
+
*/
|
|
3998
|
+
name: defines.events;
|
|
3999
|
+
/**
|
|
4000
|
+
* The segmented unit that was created.
|
|
4001
|
+
*/
|
|
4002
|
+
segmented_unit: LuaSegmentedUnit;
|
|
4003
|
+
/**
|
|
4004
|
+
* Tick the event was generated.
|
|
4005
|
+
*/
|
|
4006
|
+
tick: uint;
|
|
4007
|
+
}
|
|
4008
|
+
/**
|
|
4009
|
+
* Called when a segmented unit is damaged. This is not called when a segmented unit's health is set directly by another mod.
|
|
4010
|
+
*/
|
|
4011
|
+
interface on_segmented_unit_damaged {
|
|
4012
|
+
/**
|
|
4013
|
+
* The entity that originally triggered the events that led to this damage, if available (e.g. the character, turret, etc. that pulled the trigger).
|
|
4014
|
+
*/
|
|
4015
|
+
cause?: LuaEntity;
|
|
4016
|
+
damage_type: LuaDamagePrototype;
|
|
4017
|
+
/**
|
|
4018
|
+
* The damage amount after resistances.
|
|
4019
|
+
*/
|
|
4020
|
+
final_damage_amount: float;
|
|
4021
|
+
/**
|
|
4022
|
+
* The health of the unit after the damage was applied.
|
|
4023
|
+
*/
|
|
4024
|
+
final_health: float;
|
|
4025
|
+
/**
|
|
4026
|
+
* The force that did the attacking.
|
|
4027
|
+
*/
|
|
4028
|
+
force?: LuaForce;
|
|
4029
|
+
/**
|
|
4030
|
+
* Identifier of the event
|
|
4031
|
+
*/
|
|
4032
|
+
name: defines.events;
|
|
4033
|
+
/**
|
|
4034
|
+
* The damage amount before resistances.
|
|
4035
|
+
*/
|
|
4036
|
+
original_damage_amount: float;
|
|
4037
|
+
segmented_unit: LuaSegmentedUnit;
|
|
4038
|
+
/**
|
|
4039
|
+
* The entity that is directly dealing the damage, if available (e.g. the projectile, flame, sticker, grenade, laser beam, etc.).
|
|
4040
|
+
*/
|
|
4041
|
+
source?: LuaEntity;
|
|
4042
|
+
/**
|
|
4043
|
+
* Tick the event was generated.
|
|
4044
|
+
*/
|
|
4045
|
+
tick: uint;
|
|
4046
|
+
}
|
|
4047
|
+
/**
|
|
4048
|
+
* Called when a segmented unit dies.
|
|
4049
|
+
*/
|
|
4050
|
+
interface on_segmented_unit_died {
|
|
4051
|
+
/**
|
|
4052
|
+
* The entity that did the killing if available.
|
|
4053
|
+
*/
|
|
4054
|
+
cause?: LuaEntity;
|
|
4055
|
+
/**
|
|
4056
|
+
* The damage type if any.
|
|
4057
|
+
*/
|
|
4058
|
+
damage_type?: LuaDamagePrototype;
|
|
4059
|
+
/**
|
|
4060
|
+
* The force that did the killing if any.
|
|
4061
|
+
*/
|
|
4062
|
+
force?: LuaForce;
|
|
4063
|
+
/**
|
|
4064
|
+
* Identifier of the event
|
|
4065
|
+
*/
|
|
4066
|
+
name: defines.events;
|
|
4067
|
+
/**
|
|
4068
|
+
* The unit that died.
|
|
4069
|
+
*/
|
|
4070
|
+
segmented_unit: LuaSegmentedUnit;
|
|
4071
|
+
/**
|
|
4072
|
+
* Tick the event was generated.
|
|
4073
|
+
*/
|
|
4074
|
+
tick: uint;
|
|
4075
|
+
}
|
|
3934
4076
|
/**
|
|
3935
4077
|
* Called after the selected entity changes for a given player.
|
|
3936
4078
|
*/
|
|
@@ -4086,7 +4228,7 @@ interface on_space_platform_mined_item {
|
|
|
4086
4228
|
/**
|
|
4087
4229
|
* The entity the platform just picked up.
|
|
4088
4230
|
*/
|
|
4089
|
-
item_stack:
|
|
4231
|
+
item_stack: ItemWithQualityCount;
|
|
4090
4232
|
/**
|
|
4091
4233
|
* Identifier of the event
|
|
4092
4234
|
*/
|
|
@@ -4288,6 +4430,44 @@ interface on_technology_effects_reset {
|
|
|
4288
4430
|
*/
|
|
4289
4431
|
tick: uint;
|
|
4290
4432
|
}
|
|
4433
|
+
/**
|
|
4434
|
+
* Called when a territory is created for any reason.
|
|
4435
|
+
*/
|
|
4436
|
+
interface on_territory_created {
|
|
4437
|
+
/**
|
|
4438
|
+
* The reason the territory was created.
|
|
4439
|
+
*/
|
|
4440
|
+
cause: defines.territory_created_cause;
|
|
4441
|
+
/**
|
|
4442
|
+
* Identifier of the event
|
|
4443
|
+
*/
|
|
4444
|
+
name: defines.events;
|
|
4445
|
+
/**
|
|
4446
|
+
* The territory that was created.
|
|
4447
|
+
*/
|
|
4448
|
+
territory: LuaTerritory;
|
|
4449
|
+
/**
|
|
4450
|
+
* Tick the event was generated.
|
|
4451
|
+
*/
|
|
4452
|
+
tick: uint;
|
|
4453
|
+
}
|
|
4454
|
+
/**
|
|
4455
|
+
* Called when a territory is destroyed from a surface.
|
|
4456
|
+
*/
|
|
4457
|
+
interface on_territory_destroyed {
|
|
4458
|
+
/**
|
|
4459
|
+
* Identifier of the event
|
|
4460
|
+
*/
|
|
4461
|
+
name: defines.events;
|
|
4462
|
+
/**
|
|
4463
|
+
* The territory that will be destroyed. This object will be valid so that you can still read and modify its properties before it is finally destroyed.
|
|
4464
|
+
*/
|
|
4465
|
+
territory: LuaTerritory;
|
|
4466
|
+
/**
|
|
4467
|
+
* Tick the event was generated.
|
|
4468
|
+
*/
|
|
4469
|
+
tick: uint;
|
|
4470
|
+
}
|
|
4291
4471
|
/**
|
|
4292
4472
|
* It is fired once every tick. Since this event is fired every tick, its handler shouldn't include performance heavy code.
|
|
4293
4473
|
*/
|
|
@@ -4301,6 +4481,81 @@ interface on_tick {
|
|
|
4301
4481
|
*/
|
|
4302
4482
|
tick: uint;
|
|
4303
4483
|
}
|
|
4484
|
+
/**
|
|
4485
|
+
* Called after the results of an entity being mined are collected just before the entity is destroyed.
|
|
4486
|
+
*
|
|
4487
|
+
* After this event any items in the buffer will be transferred into the tower as if they came from mining the entity.
|
|
4488
|
+
*
|
|
4489
|
+
* 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.
|
|
4490
|
+
*/
|
|
4491
|
+
interface on_tower_mined_plant {
|
|
4492
|
+
/**
|
|
4493
|
+
* The temporary inventory that holds the result of mining the entity.
|
|
4494
|
+
*/
|
|
4495
|
+
buffer: LuaInventory;
|
|
4496
|
+
/**
|
|
4497
|
+
* Identifier of the event
|
|
4498
|
+
*/
|
|
4499
|
+
name: defines.events;
|
|
4500
|
+
/**
|
|
4501
|
+
* The entity that has been mined.
|
|
4502
|
+
*/
|
|
4503
|
+
plant: LuaEntity;
|
|
4504
|
+
/**
|
|
4505
|
+
* Tick the event was generated.
|
|
4506
|
+
*/
|
|
4507
|
+
tick: uint;
|
|
4508
|
+
/**
|
|
4509
|
+
* The tower doing the mining.
|
|
4510
|
+
*/
|
|
4511
|
+
tower: LuaEntity;
|
|
4512
|
+
}
|
|
4513
|
+
/**
|
|
4514
|
+
* Called before an agricultural tower planets a seed.
|
|
4515
|
+
*/
|
|
4516
|
+
interface on_tower_planted_seed {
|
|
4517
|
+
/**
|
|
4518
|
+
* Identifier of the event
|
|
4519
|
+
*/
|
|
4520
|
+
name: defines.events;
|
|
4521
|
+
/**
|
|
4522
|
+
* The plant which was planted.
|
|
4523
|
+
*/
|
|
4524
|
+
plant: LuaEntity;
|
|
4525
|
+
/**
|
|
4526
|
+
* The seed that was used.
|
|
4527
|
+
*/
|
|
4528
|
+
seed: ItemIDAndQualityIDPair;
|
|
4529
|
+
/**
|
|
4530
|
+
* Tick the event was generated.
|
|
4531
|
+
*/
|
|
4532
|
+
tick: uint;
|
|
4533
|
+
/**
|
|
4534
|
+
* The tower that's did the planting.
|
|
4535
|
+
*/
|
|
4536
|
+
tower: LuaEntity;
|
|
4537
|
+
}
|
|
4538
|
+
/**
|
|
4539
|
+
* Called before an agricultural tower mines a plant.
|
|
4540
|
+
*/
|
|
4541
|
+
interface on_tower_pre_mined_plant {
|
|
4542
|
+
/**
|
|
4543
|
+
* Identifier of the event
|
|
4544
|
+
*/
|
|
4545
|
+
name: defines.events;
|
|
4546
|
+
/**
|
|
4547
|
+
* The plant which is about to be mined.
|
|
4548
|
+
*/
|
|
4549
|
+
plant: LuaEntity;
|
|
4550
|
+
/**
|
|
4551
|
+
* Tick the event was generated.
|
|
4552
|
+
*/
|
|
4553
|
+
tick: uint;
|
|
4554
|
+
/**
|
|
4555
|
+
* The tower that's about to do the mining.
|
|
4556
|
+
*/
|
|
4557
|
+
tower: LuaEntity;
|
|
4558
|
+
}
|
|
4304
4559
|
/**
|
|
4305
4560
|
* Called when a train changes state (started to stopped and vice versa)
|
|
4306
4561
|
*/
|
|
@@ -4538,6 +4793,23 @@ interface script_raised_destroy {
|
|
|
4538
4793
|
*/
|
|
4539
4794
|
tick: uint;
|
|
4540
4795
|
}
|
|
4796
|
+
/**
|
|
4797
|
+
* A static event that mods can use to tell other mods they destroyed a segmented unit by script. This event is only raised if a mod does so with {@link LuaBootstrap::raise_event | runtime:LuaBootstrap::raise_event}, or {@link LuaBootstrap::raise_script_destroy_segmented_unit | runtime:LuaBootstrap::raise_script_destroy_segmented_unit}, or when `raise_destroy` is passed to {@link LuaSegmentedUnit::destroy | runtime:LuaSegmentedUnit::destroy}.
|
|
4798
|
+
*/
|
|
4799
|
+
interface script_raised_destroy_segmented_unit {
|
|
4800
|
+
/**
|
|
4801
|
+
* Identifier of the event
|
|
4802
|
+
*/
|
|
4803
|
+
name: defines.events;
|
|
4804
|
+
/**
|
|
4805
|
+
* The segmented unit that was destroyed.
|
|
4806
|
+
*/
|
|
4807
|
+
segmented_unit: LuaSegmentedUnit;
|
|
4808
|
+
/**
|
|
4809
|
+
* Tick the event was generated.
|
|
4810
|
+
*/
|
|
4811
|
+
tick: uint;
|
|
4812
|
+
}
|
|
4541
4813
|
/**
|
|
4542
4814
|
* A static event mods can use to tell other mods they revived something by script. This event is only raised if a mod does so with {@link LuaBootstrap::raise_event | runtime:LuaBootstrap::raise_event} or {@link LuaBootstrap::raise_script_revive | runtime:LuaBootstrap::raise_script_revive}, or when `raise_revive` is passed to {@link LuaEntity::revive | runtime:LuaEntity::revive}.
|
|
4543
4815
|
*/
|
package/dist/global.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Factorio API reference https://lua-api.factorio.com/latest/index.html
|
|
3
3
|
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version 2.0.
|
|
5
|
+
// Factorio version 2.0.62
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
/**
|
package/dist/prototypes.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Factorio API reference https://lua-api.factorio.com/latest/index.html
|
|
3
3
|
// Generated from JSON source https://lua-api.factorio.com/latest/prototype-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version 2.0.
|
|
5
|
+
// Factorio version 2.0.62
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -1404,7 +1404,7 @@ interface CargoLandingPadPrototype extends EntityWithOwnerPrototype {
|
|
|
1404
1404
|
*/
|
|
1405
1405
|
robot_animation?: Animation;
|
|
1406
1406
|
/**
|
|
1407
|
-
* Played when a robot brings/takes items from this landing pad.
|
|
1407
|
+
* Played when a robot brings/takes items from this landing pad. Only loaded if `robot_animation` is defined.
|
|
1408
1408
|
*/
|
|
1409
1409
|
robot_animation_sound?: Sound;
|
|
1410
1410
|
/**
|
|
@@ -5038,14 +5038,18 @@ interface LabPrototype extends EntityWithOwnerPrototype {
|
|
|
5038
5038
|
type = "lamp",
|
|
5039
5039
|
name = "small-lamp",
|
|
5040
5040
|
icon = "__base__/graphics/icons/small-lamp.png",
|
|
5041
|
-
icon_size = 64,
|
|
5042
5041
|
flags = {"placeable-neutral", "player-creation"},
|
|
5042
|
+
fast_replaceable_group = "lamp",
|
|
5043
5043
|
minable = {mining_time = 0.1, result = "small-lamp"},
|
|
5044
5044
|
max_health = 100,
|
|
5045
5045
|
corpse = "lamp-remnants",
|
|
5046
5046
|
dying_explosion = "lamp-explosion",
|
|
5047
5047
|
collision_box = {{-0.15, -0.15}, {0.15, 0.15}},
|
|
5048
5048
|
selection_box = {{-0.5, -0.5}, {0.5, 0.5}},
|
|
5049
|
+
damaged_trigger_effect = hit_effects.entity(),
|
|
5050
|
+
impact_category = "glass",
|
|
5051
|
+
open_sound = {filename = "__base__/sound/open-close/electric-small-open.ogg", volume = 0.7},
|
|
5052
|
+
close_sound = {filename = "__base__/sound/open-close/electric-small-close.ogg", volume = 0.7},
|
|
5049
5053
|
energy_source =
|
|
5050
5054
|
{
|
|
5051
5055
|
type = "electric",
|
|
@@ -5054,8 +5058,8 @@ interface LabPrototype extends EntityWithOwnerPrototype {
|
|
|
5054
5058
|
energy_usage_per_tick = "5kW",
|
|
5055
5059
|
darkness_for_all_lamps_on = 0.5,
|
|
5056
5060
|
darkness_for_all_lamps_off = 0.3,
|
|
5057
|
-
light = {intensity = 0.9, size = 40, color = {
|
|
5058
|
-
light_when_colored = {intensity = 0, size = 6, color = {
|
|
5061
|
+
light = {intensity = 0.9, size = 40, color = {1, 1, 0.75}},
|
|
5062
|
+
light_when_colored = {intensity = 0, size = 6, color = {1, 1, 0.75}},
|
|
5059
5063
|
glow_size = 6,
|
|
5060
5064
|
glow_color_intensity = 1,
|
|
5061
5065
|
glow_render_mode = "multiplicative",
|
|
@@ -5066,23 +5070,19 @@ interface LabPrototype extends EntityWithOwnerPrototype {
|
|
|
5066
5070
|
{
|
|
5067
5071
|
filename = "__base__/graphics/entity/small-lamp/lamp.png",
|
|
5068
5072
|
priority = "high",
|
|
5069
|
-
width =
|
|
5070
|
-
height =
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
direction_count = 1,
|
|
5074
|
-
shift = util.by_pixel(0,3)
|
|
5073
|
+
width = 83,
|
|
5074
|
+
height = 70,
|
|
5075
|
+
shift = util.by_pixel(0.25,3),
|
|
5076
|
+
scale = 0.5
|
|
5075
5077
|
},
|
|
5076
5078
|
{
|
|
5077
5079
|
filename = "__base__/graphics/entity/small-lamp/lamp-shadow.png",
|
|
5078
5080
|
priority = "high",
|
|
5079
|
-
width =
|
|
5080
|
-
height =
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
shift = util.by_pixel(4,5),
|
|
5085
|
-
draw_as_shadow = true
|
|
5081
|
+
width = 76,
|
|
5082
|
+
height = 47,
|
|
5083
|
+
shift = util.by_pixel(4, 4.75),
|
|
5084
|
+
draw_as_shadow = true,
|
|
5085
|
+
scale = 0.5
|
|
5086
5086
|
}
|
|
5087
5087
|
}
|
|
5088
5088
|
},
|
|
@@ -5090,23 +5090,27 @@ interface LabPrototype extends EntityWithOwnerPrototype {
|
|
|
5090
5090
|
{
|
|
5091
5091
|
filename = "__base__/graphics/entity/small-lamp/lamp-light.png",
|
|
5092
5092
|
priority = "high",
|
|
5093
|
-
width =
|
|
5094
|
-
height =
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
direction_count = 1,
|
|
5098
|
-
shift = util.by_pixel(0, -7)
|
|
5093
|
+
width = 90,
|
|
5094
|
+
height = 78,
|
|
5095
|
+
shift = util.by_pixel(0, -7),
|
|
5096
|
+
scale = 0.5
|
|
5099
5097
|
},
|
|
5100
5098
|
signal_to_color_mapping =
|
|
5101
5099
|
{
|
|
5102
|
-
{type = "virtual", name = "signal-red", color = {
|
|
5103
|
-
{type = "virtual", name = "signal-green", color = {
|
|
5104
|
-
{type = "virtual", name = "signal-blue", color = {
|
|
5105
|
-
{type = "virtual", name = "signal-yellow", color = {
|
|
5106
|
-
{type = "virtual", name = "signal-pink", color = {
|
|
5107
|
-
{type = "virtual", name = "signal-cyan", color = {
|
|
5108
|
-
{type = "virtual", name = "signal-white", color = {
|
|
5100
|
+
{type = "virtual", name = "signal-red", color = {1, 0, 0}},
|
|
5101
|
+
{type = "virtual", name = "signal-green", color = {0, 1, 0}},
|
|
5102
|
+
{type = "virtual", name = "signal-blue", color = {0, 0, 1}},
|
|
5103
|
+
{type = "virtual", name = "signal-yellow", color = {1, 1, 0}},
|
|
5104
|
+
{type = "virtual", name = "signal-pink", color = {1, 0, 1}},
|
|
5105
|
+
{type = "virtual", name = "signal-cyan", color = {0, 1, 1}},
|
|
5106
|
+
{type = "virtual", name = "signal-white", color = {1, 1, 1}},
|
|
5107
|
+
{type = "virtual", name = "signal-grey", color = {0.5, 0.5, 0.5}},
|
|
5108
|
+
{type = "virtual", name = "signal-black", color = {0, 0, 0}}
|
|
5109
5109
|
},
|
|
5110
|
+
default_red_signal = { type = "virtual", name = "signal-red" },
|
|
5111
|
+
default_green_signal = { type = "virtual", name = "signal-green" },
|
|
5112
|
+
default_blue_signal = { type = "virtual", name = "signal-blue" },
|
|
5113
|
+
default_rgb_signal = { type = "virtual", name = "signal-white" },
|
|
5110
5114
|
|
|
5111
5115
|
circuit_connector = circuit_connector_definitions["lamp"],
|
|
5112
5116
|
circuit_wire_max_distance = default_circuit_wire_max_distance
|
|
@@ -5408,7 +5412,7 @@ interface LogisticContainerPrototype extends ContainerPrototype {
|
|
|
5408
5412
|
*/
|
|
5409
5413
|
animation?: Animation;
|
|
5410
5414
|
/**
|
|
5411
|
-
* Played when a robot brings/takes items from this container.
|
|
5415
|
+
* Played when a robot brings/takes items from this container. Only loaded if `animation` is defined.
|
|
5412
5416
|
*/
|
|
5413
5417
|
animation_sound?: Sound;
|
|
5414
5418
|
/**
|
|
@@ -6522,6 +6526,8 @@ interface QualityPrototype extends Prototype {
|
|
|
6522
6526
|
name: string;
|
|
6523
6527
|
next?: QualityID;
|
|
6524
6528
|
/**
|
|
6529
|
+
* The quality {@link effect of the module | prototype:ModulePrototype::effect} is multiplied by this. For example, if a module's quality effect is 0.2 and the current quality's next_probability is 0.1, then the chance to get the next quality item is 2%.
|
|
6530
|
+
*
|
|
6525
6531
|
* Must be in range [0, 1.0].
|
|
6526
6532
|
*/
|
|
6527
6533
|
next_probability?: double;
|
|
@@ -6939,6 +6945,7 @@ interface RecipePrototype extends Prototype {
|
|
|
6939
6945
|
* The amount of time it takes to make this recipe. Must be `> 0.001`. Equals the number of seconds it takes to craft at crafting speed `1`.
|
|
6940
6946
|
*/
|
|
6941
6947
|
energy_required?: double;
|
|
6948
|
+
hide_from_bonus_gui?: boolean;
|
|
6942
6949
|
/**
|
|
6943
6950
|
* Hides the recipe from the player's crafting screen. The recipe will still show up for selection in machines.
|
|
6944
6951
|
*/
|
|
@@ -7864,7 +7871,7 @@ interface SegmentedUnitPrototype extends SegmentPrototype {
|
|
|
7864
7871
|
/**
|
|
7865
7872
|
* The number of ticks to remain enraged after last taking damage.
|
|
7866
7873
|
*/
|
|
7867
|
-
enraged_duration:
|
|
7874
|
+
enraged_duration: MapTick;
|
|
7868
7875
|
/**
|
|
7869
7876
|
* The movement speed while enraged, in tiles per tick. Cannot be negative.
|
|
7870
7877
|
*/
|
|
@@ -8446,6 +8453,10 @@ interface SpaceLocationPrototype extends Prototype {
|
|
|
8446
8453
|
* Only loaded if `starmap_icons` is not defined.
|
|
8447
8454
|
*/
|
|
8448
8455
|
starmap_icon?: FileName;
|
|
8456
|
+
/**
|
|
8457
|
+
* Orientation of the starmap icon, defaults to pointing towards the parent body.
|
|
8458
|
+
*/
|
|
8459
|
+
starmap_icon_orientation?: RealOrientation;
|
|
8449
8460
|
/**
|
|
8450
8461
|
* The size of the starmap icon, in pixels. E.g. `32` for a 32px by 32px icon. Must be larger than `0`.
|
|
8451
8462
|
*
|
|
@@ -9973,7 +9984,7 @@ interface UtilityConstants extends PrototypeBase {
|
|
|
9973
9984
|
asteroid_collector_max_nurbs_control_point_separation: double;
|
|
9974
9985
|
asteroid_collector_navmesh_refresh_tick_interval: uint32;
|
|
9975
9986
|
asteroid_collector_static_head_swing_segment_count: uint32;
|
|
9976
|
-
asteroid_collector_static_head_swing_strength_scale:
|
|
9987
|
+
asteroid_collector_static_head_swing_strength_scale: float;
|
|
9977
9988
|
asteroid_fading_range: float;
|
|
9978
9989
|
asteroid_position_offset_to_speed_coefficient: double;
|
|
9979
9990
|
asteroid_spawning_offset: SimpleBoundingBox;
|