factorio-types 1.2.5 → 1.2.7
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 +121 -4
- package/dist/concepts.d.ts +3 -1
- package/dist/datacollection.d.ts +5 -17
- package/dist/defines.d.ts +107 -107
- package/dist/events.d.ts +5 -1
- package/dist/global.d.ts +1 -1
- package/dist/prototypes.d.ts +30 -14
- package/dist/types.d.ts +13 -45
- package/package.json +2 -2
package/dist/classes.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.13
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -79,7 +79,7 @@ interface LuaAchievementPrototype extends LuaPrototypeBase {
|
|
|
79
79
|
readonly minimum_damage?: float;
|
|
80
80
|
readonly minimum_distance?: double;
|
|
81
81
|
readonly minimum_energy_produced?: double;
|
|
82
|
-
readonly module?:
|
|
82
|
+
readonly module?: string[];
|
|
83
83
|
readonly more_than_manually?: boolean;
|
|
84
84
|
readonly not_to_kill?: LuaEntityPrototype;
|
|
85
85
|
/**
|
|
@@ -5011,7 +5011,7 @@ interface LuaControl {
|
|
|
5011
5011
|
*
|
|
5012
5012
|
* Write supports any of the types. Read will return the `entity`, `equipment`, `equipment-grid`, `player`, `element`, `inventory` or `nil`.
|
|
5013
5013
|
*/
|
|
5014
|
-
opened?: LuaEntity | LuaItemStack | LuaEquipment | LuaEquipmentGrid | LuaPlayer | LuaGuiElement | LuaInventory | defines.gui_type;
|
|
5014
|
+
opened?: LuaEntity | LuaItemStack | LuaEquipment | LuaEquipmentGrid | LuaPlayer | LuaGuiElement | LuaInventory | LuaLogisticNetwork | defines.gui_type;
|
|
5015
5015
|
readonly opened_gui_type?: defines.gui_type;
|
|
5016
5016
|
/**
|
|
5017
5017
|
* Current item-picking state.
|
|
@@ -13656,6 +13656,10 @@ interface LuaPlayer extends LuaControl {
|
|
|
13656
13656
|
* The permission group this player is part of, if any.
|
|
13657
13657
|
*/
|
|
13658
13658
|
permission_group?: LuaPermissionGroup;
|
|
13659
|
+
/**
|
|
13660
|
+
* The player's "physical" controller. When a player is in the remote controller, this specifies the controller they will return to. When the player is not in the remote controller, this is equivalent to {@link LuaPlayer::controller_type | runtime:LuaPlayer::controller_type}.
|
|
13661
|
+
*/
|
|
13662
|
+
readonly physical_controller_type: defines.controllers;
|
|
13659
13663
|
/**
|
|
13660
13664
|
* The current position of this players physical controller.
|
|
13661
13665
|
*/
|
|
@@ -14125,6 +14129,10 @@ interface LuaPumpControlBehavior extends LuaGenericOnOffControlBehavior {
|
|
|
14125
14129
|
*/
|
|
14126
14130
|
interface LuaQualityPrototype extends LuaPrototypeBase {
|
|
14127
14131
|
readonly beacon_power_usage_multiplier: float;
|
|
14132
|
+
/**
|
|
14133
|
+
* The color of the prototype
|
|
14134
|
+
*/
|
|
14135
|
+
readonly color: Color;
|
|
14128
14136
|
readonly draw_sprite_by_default: boolean;
|
|
14129
14137
|
/**
|
|
14130
14138
|
* Level basically specifies the stat-increasing value of this quality level
|
|
@@ -15598,6 +15606,115 @@ interface LuaShortcutPrototype extends LuaPrototypeBase {
|
|
|
15598
15606
|
* The simulation object instance can be obtained from {@link LuaGameScript::simulation | runtime:LuaGameScript::simulation}.
|
|
15599
15607
|
*/
|
|
15600
15608
|
interface LuaSimulation {
|
|
15609
|
+
/**
|
|
15610
|
+
* Activate the rail planner at the given position.
|
|
15611
|
+
* @param table.ghost_mode Defaults to `false`.
|
|
15612
|
+
* @param table.build_mode Defaults to {@link normal | runtime:defines.build_mode.normal}.
|
|
15613
|
+
*/
|
|
15614
|
+
activate_rail_planner(this: void, table: {
|
|
15615
|
+
position?: MapPosition;
|
|
15616
|
+
ghost_mode?: boolean;
|
|
15617
|
+
build_mode?: defines.build_mode;
|
|
15618
|
+
}): void;
|
|
15619
|
+
/**
|
|
15620
|
+
* Send a control press event at the current cursor position.
|
|
15621
|
+
* @param table.control The name of the control input to press.
|
|
15622
|
+
* @param table.notify Whether to show flying text of the activated control.
|
|
15623
|
+
*/
|
|
15624
|
+
control_down(this: void, table: {
|
|
15625
|
+
control: string;
|
|
15626
|
+
notify: boolean;
|
|
15627
|
+
}): void;
|
|
15628
|
+
/**
|
|
15629
|
+
* Send a control down and up event at the current cursor position. This is equivalent to calling {@link LuaSimulation::control_down | runtime:LuaSimulation::control_down}, then {@link LuaSimulation::control_up | runtime:LuaSimulation::control_up}.
|
|
15630
|
+
* @param table.control The name of the control input to press and release.
|
|
15631
|
+
* @param table.notify Whether to show flying text of the activated control.
|
|
15632
|
+
*/
|
|
15633
|
+
control_press(this: void, table: {
|
|
15634
|
+
control: string;
|
|
15635
|
+
notify: boolean;
|
|
15636
|
+
}): void;
|
|
15637
|
+
/**
|
|
15638
|
+
* Send a control release event at the current cursor position.
|
|
15639
|
+
* @param table.control The name of the control input to release.
|
|
15640
|
+
*/
|
|
15641
|
+
control_up(this: void, table: {
|
|
15642
|
+
control: string;
|
|
15643
|
+
}): void;
|
|
15644
|
+
/**
|
|
15645
|
+
* @param table.name The name of the new player.
|
|
15646
|
+
* @returns The created player.
|
|
15647
|
+
*/
|
|
15648
|
+
create_test_player(this: void, table: {
|
|
15649
|
+
name: string;
|
|
15650
|
+
}): LuaPlayer;
|
|
15651
|
+
/**
|
|
15652
|
+
* Deactivate the rail planner.
|
|
15653
|
+
*/
|
|
15654
|
+
deactivate_rail_planner(this: void): void;
|
|
15655
|
+
/**
|
|
15656
|
+
* @param table.inventory Defaults to `"character"`.
|
|
15657
|
+
* @returns Position of the GUI slot on the screen, if successfully found.
|
|
15658
|
+
*/
|
|
15659
|
+
get_slot_position(this: void, table: {
|
|
15660
|
+
inventory_index: InventoryIndex;
|
|
15661
|
+
slot_index: ItemStackIndex;
|
|
15662
|
+
inventory?: 'character' | 'entity';
|
|
15663
|
+
}): MapPosition | null;
|
|
15664
|
+
/**
|
|
15665
|
+
* @returns Center of the GUI widget on the screen, if successfully found.
|
|
15666
|
+
*/
|
|
15667
|
+
get_widget_position(this: void, table: {
|
|
15668
|
+
type: SimulationWidgetType;
|
|
15669
|
+
data?: string;
|
|
15670
|
+
data2?: string;
|
|
15671
|
+
}): MapPosition | null;
|
|
15672
|
+
/**
|
|
15673
|
+
* Send a left mouse button click event at its current position. This is equivalent to calling {@link LuaSimulation::mouse_down | runtime:LuaSimulation::mouse_down}, then {@link LuaSimulation::mouse_up | runtime:LuaSimulation::mouse_up}.
|
|
15674
|
+
*/
|
|
15675
|
+
mouse_click(this: void): void;
|
|
15676
|
+
/**
|
|
15677
|
+
* Send a left mouse button-down event at its current position.
|
|
15678
|
+
*/
|
|
15679
|
+
mouse_down(this: void): void;
|
|
15680
|
+
/**
|
|
15681
|
+
* Send a left mouse button-up event at its current position.
|
|
15682
|
+
*/
|
|
15683
|
+
mouse_up(this: void): void;
|
|
15684
|
+
/**
|
|
15685
|
+
* Move the cursor towards the given position at the given speed.
|
|
15686
|
+
* @param table.speed Defaults to `0.2`.
|
|
15687
|
+
* @returns Whether the cursor will reach the target position with this move.
|
|
15688
|
+
*/
|
|
15689
|
+
move_cursor(this: void, table: {
|
|
15690
|
+
position: MapPosition;
|
|
15691
|
+
speed?: double;
|
|
15692
|
+
}): boolean;
|
|
15693
|
+
/**
|
|
15694
|
+
* Scroll the clipboard backwards by one entry.
|
|
15695
|
+
*/
|
|
15696
|
+
scroll_clipboard_backwards(this: void): void;
|
|
15697
|
+
/**
|
|
15698
|
+
* Scroll the clipboard forwards by one entry.
|
|
15699
|
+
*/
|
|
15700
|
+
scroll_clipboard_forwards(this: void): void;
|
|
15701
|
+
/**
|
|
15702
|
+
* Write text as if it was typed by a player. Overwrites existing text by selecting it first.
|
|
15703
|
+
* @param table.text The text to write. Does nothing if no text is provided.
|
|
15704
|
+
*/
|
|
15705
|
+
write(this: void, table: {
|
|
15706
|
+
text?: string;
|
|
15707
|
+
}): void;
|
|
15708
|
+
active_quickbars: uint8;
|
|
15709
|
+
camera_alt_info: boolean;
|
|
15710
|
+
camera_player: PlayerIdentification;
|
|
15711
|
+
camera_player_cursor_direction: defines.direction;
|
|
15712
|
+
camera_player_cursor_position?: MapPosition;
|
|
15713
|
+
camera_position?: MapPosition;
|
|
15714
|
+
camera_surface_index?: uint;
|
|
15715
|
+
camera_zoom: double;
|
|
15716
|
+
gui_tooltip_interval: double;
|
|
15717
|
+
hide_cursor: boolean;
|
|
15601
15718
|
/**
|
|
15602
15719
|
* The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
|
15603
15720
|
*/
|
|
@@ -15737,7 +15854,7 @@ interface LuaSpacePlatform {
|
|
|
15737
15854
|
/**
|
|
15738
15855
|
* The name of this space platform.
|
|
15739
15856
|
*/
|
|
15740
|
-
|
|
15857
|
+
name: string;
|
|
15741
15858
|
/**
|
|
15742
15859
|
* The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
|
|
15743
15860
|
*/
|
package/dist/concepts.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.13
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -2434,6 +2434,7 @@ interface InventoryFilter {
|
|
|
2434
2434
|
*/
|
|
2435
2435
|
name: string;
|
|
2436
2436
|
}
|
|
2437
|
+
type InventoryIndex = uint8;
|
|
2437
2438
|
interface InventoryPosition {
|
|
2438
2439
|
/**
|
|
2439
2440
|
* The ID of the inventory to insert into.
|
|
@@ -6632,6 +6633,7 @@ string | /**
|
|
|
6632
6633
|
* The detailed definition of an item stack.
|
|
6633
6634
|
*/
|
|
6634
6635
|
ItemStackDefinition;
|
|
6636
|
+
type SimulationWidgetType = 'signal-id' | 'signal-id-base' | 'signal-or-number' | 'simple-slot' | 'simple-item-slot' | 'recipe-slot' | 'quickbar-slot' | 'logistics-button' | 'logistics-button-space' | 'text-button-localised-substring' | 'text-button' | 'text-button-substring' | 'inventory-limit-slot-button' | 'train-schedule-action-button' | 'choose-button' | 'textfield' | 'item-group-tab' | 'drop-down' | 'check-box' | 'switch' | 'label';
|
|
6635
6637
|
interface SmokeSource {
|
|
6636
6638
|
name: string;
|
|
6637
6639
|
frequency: float;
|
package/dist/datacollection.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.13
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -169,9 +169,6 @@ interface dataCollection {
|
|
|
169
169
|
'corpse': {
|
|
170
170
|
[key: string]: CorpsePrototype;
|
|
171
171
|
};
|
|
172
|
-
'crafting-machine': {
|
|
173
|
-
[key: string]: CraftingMachinePrototype;
|
|
174
|
-
};
|
|
175
172
|
'create-platform-achievement': {
|
|
176
173
|
[key: string]: CreatePlatformAchievementPrototype;
|
|
177
174
|
};
|
|
@@ -434,7 +431,7 @@ interface dataCollection {
|
|
|
434
431
|
[key: string]: Loader1x1Prototype;
|
|
435
432
|
};
|
|
436
433
|
'loader': {
|
|
437
|
-
[key: string]: Loader1x2Prototype
|
|
434
|
+
[key: string]: Loader1x2Prototype;
|
|
438
435
|
};
|
|
439
436
|
'locomotive': {
|
|
440
437
|
[key: string]: LocomotivePrototype;
|
|
@@ -547,9 +544,6 @@ interface dataCollection {
|
|
|
547
544
|
'rail-planner': {
|
|
548
545
|
[key: string]: RailPlannerPrototype;
|
|
549
546
|
};
|
|
550
|
-
'rail': {
|
|
551
|
-
[key: string]: RailPrototype;
|
|
552
|
-
};
|
|
553
547
|
'rail-ramp': {
|
|
554
548
|
[key: string]: RailRampPrototype;
|
|
555
549
|
};
|
|
@@ -604,9 +598,6 @@ interface dataCollection {
|
|
|
604
598
|
'rocket-silo-rocket-shadow': {
|
|
605
599
|
[key: string]: RocketSiloRocketShadowPrototype;
|
|
606
600
|
};
|
|
607
|
-
'rolling-stock': {
|
|
608
|
-
[key: string]: RollingStockPrototype;
|
|
609
|
-
};
|
|
610
601
|
'segment': {
|
|
611
602
|
[key: string]: SegmentPrototype;
|
|
612
603
|
};
|
|
@@ -733,9 +724,6 @@ interface dataCollection {
|
|
|
733
724
|
'train-stop': {
|
|
734
725
|
[key: string]: TrainStopPrototype;
|
|
735
726
|
};
|
|
736
|
-
'transport-belt-connectable': {
|
|
737
|
-
[key: string]: TransportBeltConnectablePrototype;
|
|
738
|
-
};
|
|
739
727
|
'transport-belt': {
|
|
740
728
|
[key: string]: TransportBeltPrototype;
|
|
741
729
|
};
|
|
@@ -763,6 +751,9 @@ interface dataCollection {
|
|
|
763
751
|
'upgrade-item': {
|
|
764
752
|
[key: string]: UpgradeItemPrototype;
|
|
765
753
|
};
|
|
754
|
+
'use-entity-in-energy-production-achievement': {
|
|
755
|
+
[key: string]: UseEntityInEnergyProductionAchievementPrototype;
|
|
756
|
+
};
|
|
766
757
|
'use-item-achievement': {
|
|
767
758
|
[key: string]: UseItemAchievementPrototype;
|
|
768
759
|
};
|
|
@@ -775,9 +766,6 @@ interface dataCollection {
|
|
|
775
766
|
'utility-sprites': {
|
|
776
767
|
[key: string]: UtilitySprites;
|
|
777
768
|
};
|
|
778
|
-
'vehicle': {
|
|
779
|
-
[key: string]: VehiclePrototype;
|
|
780
|
-
};
|
|
781
769
|
'virtual-signal': {
|
|
782
770
|
[key: string]: VirtualSignalPrototype;
|
|
783
771
|
};
|
package/dist/defines.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.13
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace defines {
|
|
@@ -1327,7 +1327,8 @@ namespace prototypes {
|
|
|
1327
1327
|
'shoot-achievement' = 26,
|
|
1328
1328
|
'space-connection-distance-traveled-achievement' = 27,
|
|
1329
1329
|
'train-path-achievement' = 28,
|
|
1330
|
-
'use-
|
|
1330
|
+
'use-entity-in-energy-production-achievement' = 29,
|
|
1331
|
+
'use-item-achievement' = 30
|
|
1331
1332
|
}
|
|
1332
1333
|
/**
|
|
1333
1334
|
* @customName active-trigger
|
|
@@ -1451,111 +1452,106 @@ namespace prototypes {
|
|
|
1451
1452
|
'construction-robot' = 27,
|
|
1452
1453
|
container = 28,
|
|
1453
1454
|
corpse = 29,
|
|
1454
|
-
'
|
|
1455
|
-
'curved-rail-
|
|
1456
|
-
'
|
|
1457
|
-
'
|
|
1458
|
-
'
|
|
1459
|
-
'
|
|
1460
|
-
'electric-
|
|
1461
|
-
'electric-
|
|
1462
|
-
'
|
|
1463
|
-
'elevated-curved-rail-
|
|
1464
|
-
'elevated-
|
|
1465
|
-
'elevated-
|
|
1466
|
-
'
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
'fluid-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
'fusion-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
'
|
|
1479
|
-
'heat-
|
|
1480
|
-
'
|
|
1481
|
-
'
|
|
1482
|
-
'infinity-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
'item-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
'
|
|
1490
|
-
'
|
|
1491
|
-
'legacy-
|
|
1492
|
-
|
|
1493
|
-
lightning = 69,
|
|
1494
|
-
'
|
|
1495
|
-
'linked-
|
|
1496
|
-
|
|
1497
|
-
loader = 73,
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
'logistic-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
'
|
|
1504
|
-
'
|
|
1505
|
-
|
|
1506
|
-
pipe = 82,
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
'
|
|
1510
|
-
'
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
rail = 91,
|
|
1516
|
-
'rail-
|
|
1517
|
-
'rail-
|
|
1518
|
-
'rail-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
'rocket-silo' = 100,
|
|
1525
|
-
|
|
1526
|
-
'
|
|
1527
|
-
'
|
|
1528
|
-
|
|
1529
|
-
'
|
|
1530
|
-
'
|
|
1531
|
-
'
|
|
1532
|
-
'
|
|
1533
|
-
'
|
|
1534
|
-
'
|
|
1535
|
-
'
|
|
1536
|
-
'
|
|
1537
|
-
'
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
'
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
'
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
'
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
'
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
'underground-belt' = 130,
|
|
1555
|
-
unit = 131,
|
|
1556
|
-
'unit-spawner' = 132,
|
|
1557
|
-
vehicle = 133,
|
|
1558
|
-
wall = 134
|
|
1455
|
+
'curved-rail-a' = 30,
|
|
1456
|
+
'curved-rail-b' = 31,
|
|
1457
|
+
'decider-combinator' = 32,
|
|
1458
|
+
'deconstructible-tile-proxy' = 33,
|
|
1459
|
+
'display-panel' = 34,
|
|
1460
|
+
'electric-energy-interface' = 35,
|
|
1461
|
+
'electric-pole' = 36,
|
|
1462
|
+
'electric-turret' = 37,
|
|
1463
|
+
'elevated-curved-rail-a' = 38,
|
|
1464
|
+
'elevated-curved-rail-b' = 39,
|
|
1465
|
+
'elevated-half-diagonal-rail' = 40,
|
|
1466
|
+
'elevated-straight-rail' = 41,
|
|
1467
|
+
'entity-ghost' = 42,
|
|
1468
|
+
explosion = 43,
|
|
1469
|
+
fire = 44,
|
|
1470
|
+
fish = 45,
|
|
1471
|
+
'fluid-turret' = 46,
|
|
1472
|
+
'fluid-wagon' = 47,
|
|
1473
|
+
furnace = 48,
|
|
1474
|
+
'fusion-generator' = 49,
|
|
1475
|
+
'fusion-reactor' = 50,
|
|
1476
|
+
gate = 51,
|
|
1477
|
+
generator = 52,
|
|
1478
|
+
'half-diagonal-rail' = 53,
|
|
1479
|
+
'heat-interface' = 54,
|
|
1480
|
+
'heat-pipe' = 55,
|
|
1481
|
+
'highlight-box' = 56,
|
|
1482
|
+
'infinity-container' = 57,
|
|
1483
|
+
'infinity-pipe' = 58,
|
|
1484
|
+
inserter = 59,
|
|
1485
|
+
'item-entity' = 60,
|
|
1486
|
+
'item-request-proxy' = 61,
|
|
1487
|
+
lab = 62,
|
|
1488
|
+
lamp = 63,
|
|
1489
|
+
'land-mine' = 64,
|
|
1490
|
+
'lane-splitter' = 65,
|
|
1491
|
+
'legacy-curved-rail' = 66,
|
|
1492
|
+
'legacy-straight-rail' = 67,
|
|
1493
|
+
lightning = 68,
|
|
1494
|
+
'lightning-attractor' = 69,
|
|
1495
|
+
'linked-belt' = 70,
|
|
1496
|
+
'linked-container' = 71,
|
|
1497
|
+
loader = 72,
|
|
1498
|
+
'loader-1x1' = 73,
|
|
1499
|
+
locomotive = 74,
|
|
1500
|
+
'logistic-container' = 75,
|
|
1501
|
+
'logistic-robot' = 76,
|
|
1502
|
+
market = 77,
|
|
1503
|
+
'mining-drill' = 78,
|
|
1504
|
+
'offshore-pump' = 79,
|
|
1505
|
+
'particle-source' = 80,
|
|
1506
|
+
pipe = 81,
|
|
1507
|
+
'pipe-to-ground' = 82,
|
|
1508
|
+
plant = 83,
|
|
1509
|
+
'player-port' = 84,
|
|
1510
|
+
'power-switch' = 85,
|
|
1511
|
+
'programmable-speaker' = 86,
|
|
1512
|
+
projectile = 87,
|
|
1513
|
+
pump = 88,
|
|
1514
|
+
radar = 89,
|
|
1515
|
+
'rail-chain-signal' = 90,
|
|
1516
|
+
'rail-ramp' = 91,
|
|
1517
|
+
'rail-remnants' = 92,
|
|
1518
|
+
'rail-signal' = 93,
|
|
1519
|
+
'rail-support' = 94,
|
|
1520
|
+
reactor = 95,
|
|
1521
|
+
resource = 96,
|
|
1522
|
+
roboport = 97,
|
|
1523
|
+
'rocket-silo' = 98,
|
|
1524
|
+
'rocket-silo-rocket' = 99,
|
|
1525
|
+
'rocket-silo-rocket-shadow' = 100,
|
|
1526
|
+
segment = 101,
|
|
1527
|
+
'segmented-unit' = 102,
|
|
1528
|
+
'selector-combinator' = 103,
|
|
1529
|
+
'simple-entity' = 104,
|
|
1530
|
+
'simple-entity-with-force' = 105,
|
|
1531
|
+
'simple-entity-with-owner' = 106,
|
|
1532
|
+
'smoke-with-trigger' = 107,
|
|
1533
|
+
'solar-panel' = 108,
|
|
1534
|
+
'space-platform-hub' = 109,
|
|
1535
|
+
'speech-bubble' = 110,
|
|
1536
|
+
'spider-leg' = 111,
|
|
1537
|
+
'spider-unit' = 112,
|
|
1538
|
+
'spider-vehicle' = 113,
|
|
1539
|
+
splitter = 114,
|
|
1540
|
+
sticker = 115,
|
|
1541
|
+
'storage-tank' = 116,
|
|
1542
|
+
'straight-rail' = 117,
|
|
1543
|
+
stream = 118,
|
|
1544
|
+
'temporary-container' = 119,
|
|
1545
|
+
thruster = 120,
|
|
1546
|
+
'tile-ghost' = 121,
|
|
1547
|
+
'train-stop' = 122,
|
|
1548
|
+
'transport-belt' = 123,
|
|
1549
|
+
tree = 124,
|
|
1550
|
+
turret = 125,
|
|
1551
|
+
'underground-belt' = 126,
|
|
1552
|
+
unit = 127,
|
|
1553
|
+
'unit-spawner' = 128,
|
|
1554
|
+
wall = 129
|
|
1559
1555
|
}
|
|
1560
1556
|
enum equipment {
|
|
1561
1557
|
'active-defense-equipment' = 0,
|
|
@@ -2087,6 +2083,10 @@ enum space_platform_state {
|
|
|
2087
2083
|
* Following the path.
|
|
2088
2084
|
*/
|
|
2089
2085
|
on_the_path = 3,
|
|
2086
|
+
/**
|
|
2087
|
+
* Paused.
|
|
2088
|
+
*/
|
|
2089
|
+
paused = 8,
|
|
2090
2090
|
/**
|
|
2091
2091
|
* Starter pack is on the way.
|
|
2092
2092
|
*/
|
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.13
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -3224,6 +3224,10 @@ interface on_pre_scenario_finished {
|
|
|
3224
3224
|
* Identifier of the event
|
|
3225
3225
|
*/
|
|
3226
3226
|
name: defines.events;
|
|
3227
|
+
/**
|
|
3228
|
+
* If a player won
|
|
3229
|
+
*/
|
|
3230
|
+
player_won: boolean;
|
|
3227
3231
|
/**
|
|
3228
3232
|
* Tick the event was generated.
|
|
3229
3233
|
*/
|
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.13
|
|
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.13
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -5419,7 +5419,7 @@ interface ModuleTransferAchievementPrototype extends AchievementPrototype {
|
|
|
5419
5419
|
module = "quality-module"
|
|
5420
5420
|
```
|
|
5421
5421
|
*/
|
|
5422
|
-
module: ItemID;
|
|
5422
|
+
module: ItemID | ItemID[];
|
|
5423
5423
|
}
|
|
5424
5424
|
/**
|
|
5425
5425
|
* Used by {@link SelectionToolPrototype::mouse_cursor | prototype:SelectionToolPrototype::mouse_cursor}.
|
|
@@ -9419,6 +9419,32 @@ interface UpgradeItemPrototype extends SelectionToolPrototype {
|
|
|
9419
9419
|
*/
|
|
9420
9420
|
stack_size: 1;
|
|
9421
9421
|
}
|
|
9422
|
+
/**
|
|
9423
|
+
* This prototype is used for receiving an achievement when the player produces energy by entity.
|
|
9424
|
+
*/
|
|
9425
|
+
interface UseEntityInEnergyProductionAchievementPrototype extends AchievementPrototype {
|
|
9426
|
+
/**
|
|
9427
|
+
* This item need to be consumed before gaining the achievement.
|
|
9428
|
+
* @example ```
|
|
9429
|
+
consumed_condition = "uranium-fuel-cell"
|
|
9430
|
+
```
|
|
9431
|
+
*/
|
|
9432
|
+
consumed_condition?: ItemID;
|
|
9433
|
+
/**
|
|
9434
|
+
* This entity is needed to produce energy, for the player to complete the achievement.
|
|
9435
|
+
* @example ```
|
|
9436
|
+
entity = "steam-engine"
|
|
9437
|
+
```
|
|
9438
|
+
*/
|
|
9439
|
+
entity: EntityID;
|
|
9440
|
+
/**
|
|
9441
|
+
* This item need to be built before gaining the achievement.
|
|
9442
|
+
* @example ```
|
|
9443
|
+
required_to_build = "nuclear-reactor"
|
|
9444
|
+
```
|
|
9445
|
+
*/
|
|
9446
|
+
required_to_build?: EntityID;
|
|
9447
|
+
}
|
|
9422
9448
|
/**
|
|
9423
9449
|
* This prototype is used for receiving an achievement when the player uses a capsule.
|
|
9424
9450
|
*/
|
|
@@ -10574,8 +10600,6 @@ type dataExtendType = ({
|
|
|
10574
10600
|
} & CopyPasteToolPrototype) | ({
|
|
10575
10601
|
type: 'corpse';
|
|
10576
10602
|
} & CorpsePrototype) | ({
|
|
10577
|
-
type: 'crafting-machine';
|
|
10578
|
-
} & CraftingMachinePrototype) | ({
|
|
10579
10603
|
type: 'create-platform-achievement';
|
|
10580
10604
|
} & CreatePlatformAchievementPrototype) | ({
|
|
10581
10605
|
type: 'curved-rail-a';
|
|
@@ -10752,8 +10776,6 @@ type dataExtendType = ({
|
|
|
10752
10776
|
} & Loader1x1Prototype) | ({
|
|
10753
10777
|
type: 'loader';
|
|
10754
10778
|
} & Loader1x2Prototype) | ({
|
|
10755
|
-
type: 'loader';
|
|
10756
|
-
} & LoaderPrototype) | ({
|
|
10757
10779
|
type: 'locomotive';
|
|
10758
10780
|
} & LocomotivePrototype) | ({
|
|
10759
10781
|
type: 'logistic-container';
|
|
@@ -10828,8 +10850,6 @@ type dataExtendType = ({
|
|
|
10828
10850
|
} & RailChainSignalPrototype) | ({
|
|
10829
10851
|
type: 'rail-planner';
|
|
10830
10852
|
} & RailPlannerPrototype) | ({
|
|
10831
|
-
type: 'rail';
|
|
10832
|
-
} & RailPrototype) | ({
|
|
10833
10853
|
type: 'rail-ramp';
|
|
10834
10854
|
} & RailRampPrototype) | ({
|
|
10835
10855
|
type: 'rail-remnants';
|
|
@@ -10866,8 +10886,6 @@ type dataExtendType = ({
|
|
|
10866
10886
|
} & RocketSiloRocketPrototype) | ({
|
|
10867
10887
|
type: 'rocket-silo-rocket-shadow';
|
|
10868
10888
|
} & RocketSiloRocketShadowPrototype) | ({
|
|
10869
|
-
type: 'rolling-stock';
|
|
10870
|
-
} & RollingStockPrototype) | ({
|
|
10871
10889
|
type: 'segment';
|
|
10872
10890
|
} & SegmentPrototype) | ({
|
|
10873
10891
|
type: 'segmented-unit';
|
|
@@ -10952,8 +10970,6 @@ type dataExtendType = ({
|
|
|
10952
10970
|
} & TrainPathAchievementPrototype) | ({
|
|
10953
10971
|
type: 'train-stop';
|
|
10954
10972
|
} & TrainStopPrototype) | ({
|
|
10955
|
-
type: 'transport-belt-connectable';
|
|
10956
|
-
} & TransportBeltConnectablePrototype) | ({
|
|
10957
10973
|
type: 'transport-belt';
|
|
10958
10974
|
} & TransportBeltPrototype) | ({
|
|
10959
10975
|
type: 'tree';
|
|
@@ -10972,6 +10988,8 @@ type dataExtendType = ({
|
|
|
10972
10988
|
} & UnitPrototype) | ({
|
|
10973
10989
|
type: 'upgrade-item';
|
|
10974
10990
|
} & UpgradeItemPrototype) | ({
|
|
10991
|
+
type: 'use-entity-in-energy-production-achievement';
|
|
10992
|
+
} & UseEntityInEnergyProductionAchievementPrototype) | ({
|
|
10975
10993
|
type: 'use-item-achievement';
|
|
10976
10994
|
} & UseItemAchievementPrototype) | ({
|
|
10977
10995
|
type: 'utility-constants';
|
|
@@ -10980,8 +10998,6 @@ type dataExtendType = ({
|
|
|
10980
10998
|
} & UtilitySounds) | ({
|
|
10981
10999
|
type: 'utility-sprites';
|
|
10982
11000
|
} & UtilitySprites) | ({
|
|
10983
|
-
type: 'vehicle';
|
|
10984
|
-
} & VehiclePrototype) | ({
|
|
10985
11001
|
type: 'virtual-signal';
|
|
10986
11002
|
} & VirtualSignalPrototype) | ({
|
|
10987
11003
|
type: 'wall';
|
package/dist/types.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.13
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -723,9 +723,6 @@ CopyPasteToolPrototype | /**
|
|
|
723
723
|
* `'corpse'`
|
|
724
724
|
*/
|
|
725
725
|
CorpsePrototype | /**
|
|
726
|
-
* `'crafting-machine'`
|
|
727
|
-
*/
|
|
728
|
-
CraftingMachinePrototype | /**
|
|
729
726
|
* `'create-platform-achievement'`
|
|
730
727
|
*/
|
|
731
728
|
CreatePlatformAchievementPrototype | /**
|
|
@@ -990,9 +987,6 @@ Loader1x1Prototype | /**
|
|
|
990
987
|
* `'loader'`
|
|
991
988
|
*/
|
|
992
989
|
Loader1x2Prototype | /**
|
|
993
|
-
* `'loader'`
|
|
994
|
-
*/
|
|
995
|
-
LoaderPrototype | /**
|
|
996
990
|
* `'locomotive'`
|
|
997
991
|
*/
|
|
998
992
|
LocomotivePrototype | /**
|
|
@@ -1104,9 +1098,6 @@ RailChainSignalPrototype | /**
|
|
|
1104
1098
|
* `'rail-planner'`
|
|
1105
1099
|
*/
|
|
1106
1100
|
RailPlannerPrototype | /**
|
|
1107
|
-
* `'rail'`
|
|
1108
|
-
*/
|
|
1109
|
-
RailPrototype | /**
|
|
1110
1101
|
* `'rail-ramp'`
|
|
1111
1102
|
*/
|
|
1112
1103
|
RailRampPrototype | /**
|
|
@@ -1161,9 +1152,6 @@ RocketSiloRocketPrototype | /**
|
|
|
1161
1152
|
* `'rocket-silo-rocket-shadow'`
|
|
1162
1153
|
*/
|
|
1163
1154
|
RocketSiloRocketShadowPrototype | /**
|
|
1164
|
-
* `'rolling-stock'`
|
|
1165
|
-
*/
|
|
1166
|
-
RollingStockPrototype | /**
|
|
1167
1155
|
* `'segment'`
|
|
1168
1156
|
*/
|
|
1169
1157
|
SegmentPrototype | /**
|
|
@@ -1290,9 +1278,6 @@ TrainPathAchievementPrototype | /**
|
|
|
1290
1278
|
* `'train-stop'`
|
|
1291
1279
|
*/
|
|
1292
1280
|
TrainStopPrototype | /**
|
|
1293
|
-
* `'transport-belt-connectable'`
|
|
1294
|
-
*/
|
|
1295
|
-
TransportBeltConnectablePrototype | /**
|
|
1296
1281
|
* `'transport-belt'`
|
|
1297
1282
|
*/
|
|
1298
1283
|
TransportBeltPrototype | /**
|
|
@@ -1320,6 +1305,9 @@ UnitPrototype | /**
|
|
|
1320
1305
|
* `'upgrade-item'`
|
|
1321
1306
|
*/
|
|
1322
1307
|
UpgradeItemPrototype | /**
|
|
1308
|
+
* `'use-entity-in-energy-production-achievement'`
|
|
1309
|
+
*/
|
|
1310
|
+
UseEntityInEnergyProductionAchievementPrototype | /**
|
|
1323
1311
|
* `'use-item-achievement'`
|
|
1324
1312
|
*/
|
|
1325
1313
|
UseItemAchievementPrototype | /**
|
|
@@ -1332,9 +1320,6 @@ UtilitySounds | /**
|
|
|
1332
1320
|
* `'utility-sprites'`
|
|
1333
1321
|
*/
|
|
1334
1322
|
UtilitySprites | /**
|
|
1335
|
-
* `'vehicle'`
|
|
1336
|
-
*/
|
|
1337
|
-
VehiclePrototype | /**
|
|
1338
1323
|
* `'virtual-signal'`
|
|
1339
1324
|
*/
|
|
1340
1325
|
VirtualSignalPrototype | /**
|
|
@@ -5819,6 +5804,8 @@ interface LoaderStructure {
|
|
|
5819
5804
|
direction_in?: Sprite4Way;
|
|
5820
5805
|
direction_out?: Sprite4Way;
|
|
5821
5806
|
front_patch?: Sprite4Way;
|
|
5807
|
+
frozen_patch_in?: Sprite4Way;
|
|
5808
|
+
frozen_patch_out?: Sprite4Way;
|
|
5822
5809
|
}
|
|
5823
5810
|
/**
|
|
5824
5811
|
* Localised strings are a way to support translation of in-game text. They offer a language-independent code representation of the text that should be shown to players.
|
|
@@ -5890,11 +5877,11 @@ interface MainSound {
|
|
|
5890
5877
|
*/
|
|
5891
5878
|
audible_distance_modifier?: double;
|
|
5892
5879
|
/**
|
|
5893
|
-
* Can't be used when `match_progress_to_activity` is true
|
|
5880
|
+
* Can't be used when `match_progress_to_activity` is `true`.
|
|
5894
5881
|
*/
|
|
5895
5882
|
fade_in_ticks?: uint32;
|
|
5896
5883
|
/**
|
|
5897
|
-
* Can't be used when `match_progress_to_activity` is true
|
|
5884
|
+
* Can't be used when `match_progress_to_activity` is `true`.
|
|
5898
5885
|
*/
|
|
5899
5886
|
fade_out_ticks?: uint32;
|
|
5900
5887
|
match_progress_to_activity?: bool;
|
|
@@ -5909,6 +5896,10 @@ interface MainSound {
|
|
|
5909
5896
|
*/
|
|
5910
5897
|
probability?: double;
|
|
5911
5898
|
sound?: Sound;
|
|
5899
|
+
/**
|
|
5900
|
+
* Only used if {@link WorkingSound::persistent | prototype:WorkingSound::persistent} is `true`.
|
|
5901
|
+
*/
|
|
5902
|
+
volume_smoothing_window_size?: uint32;
|
|
5912
5903
|
}
|
|
5913
5904
|
interface ManualTransferTipTrigger extends CountBasedTipTrigger {
|
|
5914
5905
|
type: 'manual-transfer';
|
|
@@ -8774,30 +8765,7 @@ interface SimpleModifier extends BaseModifier {
|
|
|
8774
8765
|
modifier: double;
|
|
8775
8766
|
}
|
|
8776
8767
|
/**
|
|
8777
|
-
* Used by tips and tricks and main menu simulations.
|
|
8778
|
-
*
|
|
8779
|
-
* There are a few simulation-only APIs:
|
|
8780
|
-
*
|
|
8781
|
-
* ```
|
|
8782
|
-
* game.create_test_player{name=string}
|
|
8783
|
-
* game.activate_rail_planner{position=position,ghost_mode=bool,build_mode=defines.build_mode}
|
|
8784
|
-
* game.deactivate_rail_planner()
|
|
8785
|
-
* game.move_cursor{position=position,speed=number} -- should be called every tick; returns true when target is reached
|
|
8786
|
-
* game.activate_selection()
|
|
8787
|
-
* game.finish_selection()
|
|
8788
|
-
* game.deactivate_selection()
|
|
8789
|
-
* game.scroll_clipboard_forwards()
|
|
8790
|
-
* game.scroll_clipboard_backwards()
|
|
8791
|
-
* game.camera_player_cursor_position [RW]
|
|
8792
|
-
* game.camera_position [RW]
|
|
8793
|
-
* game.camera_zoom [W]
|
|
8794
|
-
* game.camera_player [W]
|
|
8795
|
-
* game.camera_player_cursor_direction [W]
|
|
8796
|
-
* game.camera_alt_info [W]
|
|
8797
|
-
* player.drag_start_position [W]
|
|
8798
|
-
* player.raw_build_from_cursor{ghost_mode=bool,created_by_moving=bool,position=position}
|
|
8799
|
-
* surface.create_entities_from_blueprint_string{string=string,position=position,force=force,direction=defines.direction,flip_horizontal=bool,flip_vertical=bool,by_player=player}
|
|
8800
|
-
* ```
|
|
8768
|
+
* Used by tips and tricks and main menu simulations. Simulations can be controlled at runtime via {@link LuaSimulation | runtime:LuaSimulation}.
|
|
8801
8769
|
*/
|
|
8802
8770
|
interface SimulationDefinition {
|
|
8803
8771
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "factorio-types",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.7",
|
|
4
4
|
"description": "Typescript declarations for the Factorio mod API",
|
|
5
5
|
"main": "index.d.ts",
|
|
6
6
|
"repository": "https://github.com/sguest/factorio-types.git",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"src/**/*.d.ts",
|
|
24
24
|
"dist/**/*.d.ts"
|
|
25
25
|
],
|
|
26
|
-
"factorioVersion": "2.0.
|
|
26
|
+
"factorioVersion": "2.0.13",
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"lua-types": "^2.13.1"
|
|
29
29
|
},
|