typed-factorio 1.1.0 → 1.2.0
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/Changelog.md +4 -0
- package/generated/classes.d.ts +173 -37
- package/generated/concepts.d.ts +4 -0
- package/package.json +1 -1
package/Changelog.md
CHANGED
package/generated/classes.d.ts
CHANGED
@@ -1554,6 +1554,10 @@ interface LuaControl {
|
|
1554
1554
|
/**
|
1555
1555
|
* `true` if the player is in a vehicle. Writing to this attribute puts the player in or out of a vehicle.
|
1556
1556
|
*
|
1557
|
+
* **Raised events:**
|
1558
|
+
* - {@link OnPlayerDrivingChangedStateEvent on_player_driving_changed_state}? _instantly_ Raised if the driving state successfully changed.
|
1559
|
+
*
|
1560
|
+
*
|
1557
1561
|
* {@link https://lua-api.factorio.com/latest/LuaControl.html#LuaControl.driving View documentation}
|
1558
1562
|
*/
|
1559
1563
|
driving: boolean
|
@@ -2885,6 +2889,9 @@ interface LuaEntity extends LuaControl {
|
|
2885
2889
|
/**
|
2886
2890
|
* Sets the driver of this vehicle.
|
2887
2891
|
*
|
2892
|
+
* **Raised events:**
|
2893
|
+
* - {@link OnPlayerDrivingChangedStateEvent on_player_driving_changed_state}? _instantly_
|
2894
|
+
*
|
2888
2895
|
* _Can only be used if this is Vehicle_
|
2889
2896
|
*
|
2890
2897
|
* {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_driver View documentation}
|
@@ -2905,6 +2912,9 @@ interface LuaEntity extends LuaControl {
|
|
2905
2912
|
/**
|
2906
2913
|
* Sets the passenger of this car or spidertron.
|
2907
2914
|
*
|
2915
|
+
* **Raised events:**
|
2916
|
+
* - {@link OnPlayerDrivingChangedStateEvent on_player_driving_changed_state}? _instantly_
|
2917
|
+
*
|
2908
2918
|
* _Can only be used if this is Vehicle_
|
2909
2919
|
*
|
2910
2920
|
* {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_passenger View documentation}
|
@@ -3848,7 +3858,7 @@ interface LuaEntity extends LuaControl {
|
|
3848
3858
|
*/
|
3849
3859
|
readonly bounding_box: BoundingBoxRead
|
3850
3860
|
/**
|
3851
|
-
* The secondary bounding box of this entity or `nil` if it doesn't have one.
|
3861
|
+
* The secondary bounding box of this entity or `nil` if it doesn't have one. This only exists for curved rails, and is automatically determined by the game.
|
3852
3862
|
*
|
3853
3863
|
* {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.secondary_bounding_box View documentation}
|
3854
3864
|
*/
|
@@ -3860,7 +3870,7 @@ interface LuaEntity extends LuaControl {
|
|
3860
3870
|
*/
|
3861
3871
|
readonly selection_box: BoundingBoxRead
|
3862
3872
|
/**
|
3863
|
-
* The secondary selection box of this entity or `nil` if it doesn't have one.
|
3873
|
+
* The secondary selection box of this entity or `nil` if it doesn't have one. This only exists for curved rails, and is automatically determined by the game.
|
3864
3874
|
*
|
3865
3875
|
* {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.secondary_selection_box View documentation}
|
3866
3876
|
*/
|
@@ -5402,7 +5412,7 @@ interface BaseEntity extends LuaControl {
|
|
5402
5412
|
*/
|
5403
5413
|
readonly bounding_box: BoundingBoxRead
|
5404
5414
|
/**
|
5405
|
-
* The secondary bounding box of this entity or `nil` if it doesn't have one.
|
5415
|
+
* The secondary bounding box of this entity or `nil` if it doesn't have one. This only exists for curved rails, and is automatically determined by the game.
|
5406
5416
|
*
|
5407
5417
|
* {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.secondary_bounding_box View documentation}
|
5408
5418
|
*/
|
@@ -5414,7 +5424,7 @@ interface BaseEntity extends LuaControl {
|
|
5414
5424
|
*/
|
5415
5425
|
readonly selection_box: BoundingBoxRead
|
5416
5426
|
/**
|
5417
|
-
* The secondary selection box of this entity or `nil` if it doesn't have one.
|
5427
|
+
* The secondary selection box of this entity or `nil` if it doesn't have one. This only exists for curved rails, and is automatically determined by the game.
|
5418
5428
|
*
|
5419
5429
|
* {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.secondary_selection_box View documentation}
|
5420
5430
|
*/
|
@@ -6293,6 +6303,9 @@ interface VehicleEntity extends BaseEntity {
|
|
6293
6303
|
/**
|
6294
6304
|
* Sets the driver of this vehicle.
|
6295
6305
|
*
|
6306
|
+
* **Raised events:**
|
6307
|
+
* - {@link OnPlayerDrivingChangedStateEvent on_player_driving_changed_state}? _instantly_
|
6308
|
+
*
|
6296
6309
|
* _Can only be used if this is Vehicle_
|
6297
6310
|
*
|
6298
6311
|
* {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_driver View documentation}
|
@@ -6313,6 +6326,9 @@ interface VehicleEntity extends BaseEntity {
|
|
6313
6326
|
/**
|
6314
6327
|
* Sets the passenger of this car or spidertron.
|
6315
6328
|
*
|
6329
|
+
* **Raised events:**
|
6330
|
+
* - {@link OnPlayerDrivingChangedStateEvent on_player_driving_changed_state}? _instantly_
|
6331
|
+
*
|
6316
6332
|
* _Can only be used if this is Vehicle_
|
6317
6333
|
*
|
6318
6334
|
* {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.set_passenger View documentation}
|
@@ -8334,6 +8350,58 @@ interface LuaEntityPrototype {
|
|
8334
8350
|
readonly robots_shrink_when_entering_and_exiting: boolean
|
8335
8351
|
}
|
8336
8352
|
| undefined
|
8353
|
+
/**
|
8354
|
+
* Gets the height of this prototype. `nil` if this is not a spider vechicle.
|
8355
|
+
*
|
8356
|
+
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.height View documentation}
|
8357
|
+
*/
|
8358
|
+
readonly height: double | undefined
|
8359
|
+
/**
|
8360
|
+
* Gets the torso rotation speed of this prototype. `nil` if this is not a spider vechicle.
|
8361
|
+
*
|
8362
|
+
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.torso_rotation_speed View documentation}
|
8363
|
+
*/
|
8364
|
+
readonly torso_rotation_speed: double | undefined
|
8365
|
+
/**
|
8366
|
+
* Does this prototoype automaticly cycle weapons. `nil` if this is not a spider vechicle.
|
8367
|
+
*
|
8368
|
+
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.automatic_weapon_cycling View documentation}
|
8369
|
+
*/
|
8370
|
+
readonly automatic_weapon_cycling: boolean | undefined
|
8371
|
+
/**
|
8372
|
+
* Gets the chain shooting cooldown modifier of this prototype. `nil` if this is not a spider vechicle.
|
8373
|
+
*
|
8374
|
+
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.chain_shooting_cooldown_modifier View documentation}
|
8375
|
+
*/
|
8376
|
+
readonly chain_shooting_cooldown_modifier: double | undefined
|
8377
|
+
/**
|
8378
|
+
* Gets the chunk exploration radius of this prototype. `nil` if this is not a spider vechicle.
|
8379
|
+
*
|
8380
|
+
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.chunk_exploration_radius View documentation}
|
8381
|
+
*/
|
8382
|
+
readonly chunk_exploration_radius: double | undefined
|
8383
|
+
/**
|
8384
|
+
* Gets the animation speed coefficient of this belt . `nil` if this is not transport belt connectable.
|
8385
|
+
*
|
8386
|
+
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.animation_speed_coefficient View documentation}
|
8387
|
+
*/
|
8388
|
+
readonly animation_speed_coefficient: double | undefined
|
8389
|
+
/**
|
8390
|
+
* Get the manual range modifier for artillery turret and artillery wagon prototypes. `nil` if not artillery type prototype
|
8391
|
+
*
|
8392
|
+
* subclass(ArtilleryWagon, ArtilleryTurret)
|
8393
|
+
*
|
8394
|
+
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.manual_range_modifier View documentation}
|
8395
|
+
*/
|
8396
|
+
readonly manual_range_modifier: double | undefined
|
8397
|
+
/**
|
8398
|
+
* The dying time of this corpse prototype. `nil` if not a corpse prototype.
|
8399
|
+
*
|
8400
|
+
* _Can only be used if this is Corpse_
|
8401
|
+
*
|
8402
|
+
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.dying_speed View documentation}
|
8403
|
+
*/
|
8404
|
+
readonly dying_speed: float | undefined
|
8337
8405
|
/**
|
8338
8406
|
* Gets the current movement speed of this character, including effects from exoskeletons, tiles, stickers and shooting.
|
8339
8407
|
*
|
@@ -9645,6 +9713,50 @@ interface BaseEntityPrototype {
|
|
9645
9713
|
readonly robots_shrink_when_entering_and_exiting: boolean
|
9646
9714
|
}
|
9647
9715
|
| undefined
|
9716
|
+
/**
|
9717
|
+
* Gets the height of this prototype. `nil` if this is not a spider vechicle.
|
9718
|
+
*
|
9719
|
+
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.height View documentation}
|
9720
|
+
*/
|
9721
|
+
readonly height: double | undefined
|
9722
|
+
/**
|
9723
|
+
* Gets the torso rotation speed of this prototype. `nil` if this is not a spider vechicle.
|
9724
|
+
*
|
9725
|
+
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.torso_rotation_speed View documentation}
|
9726
|
+
*/
|
9727
|
+
readonly torso_rotation_speed: double | undefined
|
9728
|
+
/**
|
9729
|
+
* Does this prototoype automaticly cycle weapons. `nil` if this is not a spider vechicle.
|
9730
|
+
*
|
9731
|
+
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.automatic_weapon_cycling View documentation}
|
9732
|
+
*/
|
9733
|
+
readonly automatic_weapon_cycling: boolean | undefined
|
9734
|
+
/**
|
9735
|
+
* Gets the chain shooting cooldown modifier of this prototype. `nil` if this is not a spider vechicle.
|
9736
|
+
*
|
9737
|
+
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.chain_shooting_cooldown_modifier View documentation}
|
9738
|
+
*/
|
9739
|
+
readonly chain_shooting_cooldown_modifier: double | undefined
|
9740
|
+
/**
|
9741
|
+
* Gets the chunk exploration radius of this prototype. `nil` if this is not a spider vechicle.
|
9742
|
+
*
|
9743
|
+
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.chunk_exploration_radius View documentation}
|
9744
|
+
*/
|
9745
|
+
readonly chunk_exploration_radius: double | undefined
|
9746
|
+
/**
|
9747
|
+
* Gets the animation speed coefficient of this belt . `nil` if this is not transport belt connectable.
|
9748
|
+
*
|
9749
|
+
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.animation_speed_coefficient View documentation}
|
9750
|
+
*/
|
9751
|
+
readonly animation_speed_coefficient: double | undefined
|
9752
|
+
/**
|
9753
|
+
* Get the manual range modifier for artillery turret and artillery wagon prototypes. `nil` if not artillery type prototype
|
9754
|
+
*
|
9755
|
+
* subclass(ArtilleryWagon, ArtilleryTurret)
|
9756
|
+
*
|
9757
|
+
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.manual_range_modifier View documentation}
|
9758
|
+
*/
|
9759
|
+
readonly manual_range_modifier: double | undefined
|
9648
9760
|
/**
|
9649
9761
|
* Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
|
9650
9762
|
*/
|
@@ -9752,6 +9864,17 @@ interface EntityWithOwnerEntityPrototype extends BaseEntityPrototype {
|
|
9752
9864
|
readonly allow_run_time_change_of_is_military_target: boolean
|
9753
9865
|
}
|
9754
9866
|
|
9867
|
+
interface CorpseEntityPrototype extends BaseEntityPrototype {
|
9868
|
+
/**
|
9869
|
+
* The dying time of this corpse prototype. `nil` if not a corpse prototype.
|
9870
|
+
*
|
9871
|
+
* _Can only be used if this is Corpse_
|
9872
|
+
*
|
9873
|
+
* {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.dying_speed View documentation}
|
9874
|
+
*/
|
9875
|
+
readonly dying_speed: float | undefined
|
9876
|
+
}
|
9877
|
+
|
9755
9878
|
interface CharacterEntityPrototype extends BaseEntityPrototype {
|
9756
9879
|
/**
|
9757
9880
|
* Gets the current movement speed of this character, including effects from exoskeletons, tiles, stickers and shooting.
|
@@ -10369,7 +10492,7 @@ interface LuaEquipmentPrototype {
|
|
10369
10492
|
*
|
10370
10493
|
* Examples:
|
10371
10494
|
* - The item production GUI shows "consumption" on the right, thus `output` describes the item consumption numbers. The same goes for fluid consumption.
|
10372
|
-
* - The kills
|
10495
|
+
* - The kills GUI shows "losses" on the right, so `output` describes how many of the force's entities were killed by enemies.
|
10373
10496
|
* - The electric network GUI shows "power consumption" on the left side, so in this case `input` describes the power consumption numbers.
|
10374
10497
|
*
|
10375
10498
|
* {@link https://lua-api.factorio.com/latest/LuaFlowStatistics.html View documentation}
|
@@ -10407,7 +10530,11 @@ interface LuaFlowStatistics {
|
|
10407
10530
|
*/
|
10408
10531
|
set_output_count(name: string, count: uint64 | double): void
|
10409
10532
|
/**
|
10410
|
-
* Gets the flow count value for the given time frame.
|
10533
|
+
* Gets the flow count value for the given time frame. If `sample_index` is not provided, then the value returned is the average across the provided precision time period. These are the values shown in the bottom section of the statistics GUIs.
|
10534
|
+
*
|
10535
|
+
* Use `sample_index` to access the data used to generate the statistics graphs. Each precision level contains 300 samples of data so at a precision of 1 minute, each sample contains data averaged across 60s / 300 = 0.2s = 12 ticks.
|
10536
|
+
*
|
10537
|
+
* All return values are normalized to be per-tick for electric networks and per-minute for all other types.
|
10411
10538
|
*
|
10412
10539
|
* {@link https://lua-api.factorio.com/latest/LuaFlowStatistics.html#LuaFlowStatistics.get_flow_count View documentation}
|
10413
10540
|
*/
|
@@ -10421,11 +10548,15 @@ interface LuaFlowStatistics {
|
|
10421
10548
|
*/
|
10422
10549
|
readonly input: boolean
|
10423
10550
|
/**
|
10424
|
-
* The precision to read.
|
10551
|
+
* The precision range to read.
|
10425
10552
|
*/
|
10426
10553
|
readonly precision_index: defines.flow_precision_index
|
10427
10554
|
/**
|
10428
|
-
* If
|
10555
|
+
* The sample index to read from within the precision range. If not provided, the entire precision range is read. Must be between 1 and 300 where 1 is the most recent sample and 300 is the oldest.
|
10556
|
+
*/
|
10557
|
+
readonly sample_index?: uint16
|
10558
|
+
/**
|
10559
|
+
* If true, the count of items/fluids/entities is returned instead of the per-time-frame value.
|
10429
10560
|
*/
|
10430
10561
|
readonly count?: boolean
|
10431
10562
|
}): double
|
@@ -10506,7 +10637,7 @@ interface LuaFluidBox extends Array<Fluid | undefined> {
|
|
10506
10637
|
*/
|
10507
10638
|
get_capacity(index: uint): double
|
10508
10639
|
/**
|
10509
|
-
* The
|
10640
|
+
* The fluidboxes to which the fluidbox at the given index is connected.
|
10510
10641
|
*
|
10511
10642
|
* {@link https://lua-api.factorio.com/latest/LuaFluidBox.html#LuaFluidBox.get_connections View documentation}
|
10512
10643
|
*/
|
@@ -11984,11 +12115,10 @@ interface LuaGameScript {
|
|
11984
12115
|
*/
|
11985
12116
|
is_valid_sound_path(sound_path: SoundPath): boolean
|
11986
12117
|
/**
|
11987
|
-
* Checks if the given SpritePath is valid and contains a loaded sprite.
|
12118
|
+
* Checks if the given SpritePath is valid and contains a loaded sprite. The existence of the image is not checked for paths of type `file`.
|
11988
12119
|
*
|
11989
12120
|
* {@link https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.is_valid_sprite_path View documentation}
|
11990
12121
|
* @param sprite_path Path to the image.
|
11991
|
-
* @remarks The existence of the image is not checked for paths of type `file`.
|
11992
12122
|
*/
|
11993
12123
|
is_valid_sprite_path(sprite_path: SpritePath): boolean
|
11994
12124
|
/**
|
@@ -12785,6 +12915,8 @@ interface LuaGui {
|
|
12785
12915
|
/**
|
12786
12916
|
* Returns `true` if sprite_path is valid and contains loaded sprite, otherwise `false`. Sprite path of type `file` doesn't validate if file exists.
|
12787
12917
|
*
|
12918
|
+
* If you want to avoid needing a LuaGui object, {@link LuaGameScript#is_valid_sprite_path LuaGameScript::is_valid_sprite_path} can be used instead.
|
12919
|
+
*
|
12788
12920
|
* {@link https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.is_valid_sprite_path View documentation}
|
12789
12921
|
* @param sprite_path Path to a image.
|
12790
12922
|
*/
|
@@ -12884,7 +13016,7 @@ interface BaseGuiSpec {
|
|
12884
13016
|
*/
|
12885
13017
|
readonly type: GuiElementType
|
12886
13018
|
/**
|
12887
|
-
* Name of the child element.
|
13019
|
+
* Name of the child element. It must be unique within the parent element.
|
12888
13020
|
*/
|
12889
13021
|
readonly name?: string
|
12890
13022
|
/**
|
@@ -13403,7 +13535,7 @@ interface BaseGuiElement {
|
|
13403
13535
|
* Other attributes may be specified depending on `type`:
|
13404
13536
|
*
|
13405
13537
|
* {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add View documentation}
|
13406
|
-
* @returns The
|
13538
|
+
* @returns The GUI element that was added.
|
13407
13539
|
*/
|
13408
13540
|
add<Type extends GuiElementType>(
|
13409
13541
|
element: GuiSpec & {
|
@@ -13492,7 +13624,7 @@ interface BaseGuiElement {
|
|
13492
13624
|
*/
|
13493
13625
|
readonly parent: LuaGuiElement | undefined
|
13494
13626
|
/**
|
13495
|
-
* The name of this element.
|
13627
|
+
* The name of this element. `""` if no name was set.
|
13496
13628
|
*
|
13497
13629
|
* {@link https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.name View documentation}
|
13498
13630
|
* @example
|
@@ -19142,6 +19274,10 @@ interface LuaPlayer extends LuaControl {
|
|
19142
19274
|
/**
|
19143
19275
|
* Invokes the "clear cursor" action on the player as if the user pressed it.
|
19144
19276
|
*
|
19277
|
+
* **Raised events:**
|
19278
|
+
* - {@link OnPlayerCursorStackChangedEvent on_player_cursor_stack_changed}? _current_tick_ Raised when the cursor was successfully cleared.
|
19279
|
+
*
|
19280
|
+
*
|
19145
19281
|
* {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.clear_cursor View documentation}
|
19146
19282
|
* @returns Whether the cursor is now empty.
|
19147
19283
|
*/
|
@@ -20521,11 +20657,11 @@ interface LuaRendering {
|
|
20521
20657
|
*/
|
20522
20658
|
readonly time_to_live?: uint
|
20523
20659
|
/**
|
20524
|
-
* The forces that this object is rendered to.
|
20660
|
+
* The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
|
20525
20661
|
*/
|
20526
20662
|
readonly forces?: readonly ForceIdentification[]
|
20527
20663
|
/**
|
20528
|
-
* The players that this object is rendered to.
|
20664
|
+
* The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
|
20529
20665
|
*/
|
20530
20666
|
readonly players?: readonly PlayerIdentification[]
|
20531
20667
|
/**
|
@@ -20570,11 +20706,11 @@ interface LuaRendering {
|
|
20570
20706
|
*/
|
20571
20707
|
readonly time_to_live?: uint
|
20572
20708
|
/**
|
20573
|
-
* The forces that this object is rendered to.
|
20709
|
+
* The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
|
20574
20710
|
*/
|
20575
20711
|
readonly forces?: readonly ForceIdentification[]
|
20576
20712
|
/**
|
20577
|
-
* The players that this object is rendered to.
|
20713
|
+
* The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
|
20578
20714
|
*/
|
20579
20715
|
readonly players?: readonly PlayerIdentification[]
|
20580
20716
|
/**
|
@@ -20637,11 +20773,11 @@ interface LuaRendering {
|
|
20637
20773
|
*/
|
20638
20774
|
readonly time_to_live?: uint
|
20639
20775
|
/**
|
20640
|
-
* The forces that this object is rendered to.
|
20776
|
+
* The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
|
20641
20777
|
*/
|
20642
20778
|
readonly forces?: readonly ForceIdentification[]
|
20643
20779
|
/**
|
20644
|
-
* The players that this object is rendered to.
|
20780
|
+
* The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
|
20645
20781
|
*/
|
20646
20782
|
readonly players?: readonly PlayerIdentification[]
|
20647
20783
|
/**
|
@@ -20689,11 +20825,11 @@ interface LuaRendering {
|
|
20689
20825
|
*/
|
20690
20826
|
readonly time_to_live?: uint
|
20691
20827
|
/**
|
20692
|
-
* The forces that this object is rendered to.
|
20828
|
+
* The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
|
20693
20829
|
*/
|
20694
20830
|
readonly forces?: readonly ForceIdentification[]
|
20695
20831
|
/**
|
20696
|
-
* The players that this object is rendered to.
|
20832
|
+
* The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
|
20697
20833
|
*/
|
20698
20834
|
readonly players?: readonly PlayerIdentification[]
|
20699
20835
|
/**
|
@@ -20744,11 +20880,11 @@ interface LuaRendering {
|
|
20744
20880
|
*/
|
20745
20881
|
readonly time_to_live?: uint
|
20746
20882
|
/**
|
20747
|
-
* The forces that this object is rendered to.
|
20883
|
+
* The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
|
20748
20884
|
*/
|
20749
20885
|
readonly forces?: readonly ForceIdentification[]
|
20750
20886
|
/**
|
20751
|
-
* The players that this object is rendered to.
|
20887
|
+
* The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
|
20752
20888
|
*/
|
20753
20889
|
readonly players?: readonly PlayerIdentification[]
|
20754
20890
|
/**
|
@@ -20799,11 +20935,11 @@ interface LuaRendering {
|
|
20799
20935
|
*/
|
20800
20936
|
readonly time_to_live?: uint
|
20801
20937
|
/**
|
20802
|
-
* The forces that this object is rendered to.
|
20938
|
+
* The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
|
20803
20939
|
*/
|
20804
20940
|
readonly forces?: readonly ForceIdentification[]
|
20805
20941
|
/**
|
20806
|
-
* The players that this object is rendered to.
|
20942
|
+
* The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
|
20807
20943
|
*/
|
20808
20944
|
readonly players?: readonly PlayerIdentification[]
|
20809
20945
|
/**
|
@@ -20877,11 +21013,11 @@ interface LuaRendering {
|
|
20877
21013
|
*/
|
20878
21014
|
readonly time_to_live?: uint
|
20879
21015
|
/**
|
20880
|
-
* The forces that this object is rendered to.
|
21016
|
+
* The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
|
20881
21017
|
*/
|
20882
21018
|
readonly forces?: readonly ForceIdentification[]
|
20883
21019
|
/**
|
20884
|
-
* The players that this object is rendered to.
|
21020
|
+
* The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
|
20885
21021
|
*/
|
20886
21022
|
readonly players?: readonly PlayerIdentification[]
|
20887
21023
|
/**
|
@@ -20940,11 +21076,11 @@ interface LuaRendering {
|
|
20940
21076
|
*/
|
20941
21077
|
readonly time_to_live?: uint
|
20942
21078
|
/**
|
20943
|
-
* The forces that this object is rendered to.
|
21079
|
+
* The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
|
20944
21080
|
*/
|
20945
21081
|
readonly forces?: readonly ForceIdentification[]
|
20946
21082
|
/**
|
20947
|
-
* The players that this object is rendered to.
|
21083
|
+
* The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
|
20948
21084
|
*/
|
20949
21085
|
readonly players?: readonly PlayerIdentification[]
|
20950
21086
|
/**
|
@@ -21015,11 +21151,11 @@ interface LuaRendering {
|
|
21015
21151
|
*/
|
21016
21152
|
readonly time_to_live?: uint
|
21017
21153
|
/**
|
21018
|
-
* The forces that this object is rendered to.
|
21154
|
+
* The forces that this object is rendered to. Passing `nil` or an empty table will render it to all forces.
|
21019
21155
|
*/
|
21020
21156
|
readonly forces?: readonly ForceIdentification[]
|
21021
21157
|
/**
|
21022
|
-
* The players that this object is rendered to.
|
21158
|
+
* The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
|
21023
21159
|
*/
|
21024
21160
|
readonly players?: readonly PlayerIdentification[]
|
21025
21161
|
/**
|
@@ -23118,7 +23254,7 @@ interface CharacterCorpseSurfaceCreateEntity extends BaseSurfaceCreateEntity {
|
|
23118
23254
|
|
23119
23255
|
interface HighlightBoxSurfaceCreateEntity extends BaseSurfaceCreateEntity {
|
23120
23256
|
/**
|
23121
|
-
* The bounding box defining the highlight box using absolute map coordinates. If specified, the `position` parameter
|
23257
|
+
* The bounding box defining the highlight box using absolute map coordinates. If specified, the general `position` parameter still needs to be present, but will be ignored. If not specified, the game falls back to the `source` parameter first, then the `target` parameter second. One of these three parameters need to be specified.
|
23122
23258
|
*/
|
23123
23259
|
readonly bounding_box?: BoundingBox
|
23124
23260
|
/**
|
@@ -24915,11 +25051,11 @@ interface LuaTilePrototype {
|
|
24915
25051
|
/**
|
24916
25052
|
* Energy required to mine a tile.
|
24917
25053
|
*/
|
24918
|
-
readonly
|
25054
|
+
readonly mining_time: double
|
24919
25055
|
/**
|
24920
25056
|
* Prototype name of the particle produced when mining this tile. Will only be present if this tile produces any particle during mining.
|
24921
25057
|
*/
|
24922
|
-
readonly
|
25058
|
+
readonly mining_particle?: string
|
24923
25059
|
/**
|
24924
25060
|
* Products obtained by mining this tile.
|
24925
25061
|
*/
|
@@ -24932,11 +25068,11 @@ interface LuaTilePrototype {
|
|
24932
25068
|
*/
|
24933
25069
|
readonly next_direction: LuaTilePrototype | undefined
|
24934
25070
|
/**
|
24935
|
-
* Items that when placed will produce this tile. It is a dictionary indexed by the item prototype name.
|
25071
|
+
* Items that when placed will produce this tile. It is a dictionary indexed by the item prototype name. `nil` (instead of an empty table) if no items can place this tile.
|
24936
25072
|
*
|
24937
25073
|
* {@link https://lua-api.factorio.com/latest/LuaTilePrototype.html#LuaTilePrototype.items_to_place_this View documentation}
|
24938
25074
|
*/
|
24939
|
-
readonly items_to_place_this: SimpleItemStack[]
|
25075
|
+
readonly items_to_place_this: SimpleItemStack[] | undefined
|
24940
25076
|
/**
|
24941
25077
|
* False if this tile is not allowed in blueprints regardless of the ability to build it.
|
24942
25078
|
*
|
package/generated/concepts.d.ts
CHANGED
@@ -2721,6 +2721,8 @@ type SpriteType =
|
|
2721
2721
|
/**
|
2722
2722
|
* It is specified by {@link string}. It can be either the name of a {@link https://wiki.factorio.com/Prototype/Sprite sprite prototype} defined in the data stage or a path in form "type/name".
|
2723
2723
|
*
|
2724
|
+
* The validity of a SpritePath can be verified at runtime using {@link LuaGameScript#is_valid_sprite_path LuaGameScript::is_valid_sprite_path}.
|
2725
|
+
*
|
2724
2726
|
* The supported types are:
|
2725
2727
|
* - `"item"` - for example "item/iron-plate" is the icon sprite of iron plate
|
2726
2728
|
* - `"entity"` - for example "entity/small-biter" is the icon sprite of the small biter
|
@@ -2742,6 +2744,8 @@ type SpritePath = string | `${SpriteType}/${string}`
|
|
2742
2744
|
/**
|
2743
2745
|
* A sound defined by a {@link string}. It can be either the name of a {@link https://wiki.factorio.com/Prototype/Sound sound prototype} defined in the data stage or a path in the form `"type/name"`. The latter option can be sorted into three categories.
|
2744
2746
|
*
|
2747
|
+
* The validity of a SoundPath can be verified at runtime using {@link LuaGameScript#is_valid_sound_path LuaGameScript::is_valid_sound_path}.
|
2748
|
+
*
|
2745
2749
|
* The utility and ambient types each contain general use sound prototypes defined by the game itself.
|
2746
2750
|
* - `"utility"` - Uses the {@link https://wiki.factorio.com/Prototype/UtilitySounds UtilitySounds} prototype. Example: `"utility/wire_connect_pole"`
|
2747
2751
|
* - `"ambient"` - Uses {@link https://wiki.factorio.com/Prototype/AmbientSound AmbientSound} prototypes. Example: `"ambient/resource-deficiency"`
|