factorio-types 1.2.32 → 1.2.33
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 +83 -7
- package/dist/concepts.d.ts +64 -3
- package/dist/datacollection.d.ts +1 -1
- package/dist/defines.d.ts +9 -9
- package/dist/events.d.ts +1 -1
- package/dist/global.d.ts +1 -1
- package/dist/prototypes.d.ts +10 -1
- package/dist/types.d.ts +17 -3
- 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.47
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -6231,7 +6231,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6231
6231
|
*/
|
|
6232
6232
|
is_registered_for_deconstruction(this: void, force: ForceID): boolean;
|
|
6233
6233
|
/**
|
|
6234
|
-
* Is this entity registered for repair? If false, it means a construction robot has been dispatched to
|
|
6234
|
+
* Is this entity registered for repair? If false, it means a construction robot has been dispatched to repair it, or it is not damaged. This is worst-case O(N) complexity where N is the current number of things in the repair queue.
|
|
6235
6235
|
*/
|
|
6236
6236
|
is_registered_for_repair(this: void): boolean;
|
|
6237
6237
|
/**
|
|
@@ -6526,6 +6526,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6526
6526
|
* While train stops get the name of a backer when placed down, players can rename them if they want to. In this case, `backer_name` returns the player-given name of the entity.
|
|
6527
6527
|
*/
|
|
6528
6528
|
backer_name?: string;
|
|
6529
|
+
base_damage_modifiers: TriggerModifierData;
|
|
6529
6530
|
/**
|
|
6530
6531
|
* Number of beacons affecting this effect receiver. Can only be used when the entity has an effect receiver (AssemblingMachine, Furnace, Lab, MiningDrills)
|
|
6531
6532
|
*/
|
|
@@ -6553,6 +6554,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6553
6554
|
* Whether this underground belt goes into or out of the ground.
|
|
6554
6555
|
*/
|
|
6555
6556
|
readonly belt_to_ground_type: 'input' | 'output';
|
|
6557
|
+
bonus_damage_modifiers: TriggerModifierData;
|
|
6556
6558
|
/**
|
|
6557
6559
|
* The bonus mining progress for this mining drill. Read yields a number in range [0, mining_target.prototype.mineable_properties.mining_time]. `nil` if this isn't a mining drill.
|
|
6558
6560
|
*/
|
|
@@ -6941,6 +6943,10 @@ interface LuaEntity extends LuaControl {
|
|
|
6941
6943
|
* If the entity is updatable.
|
|
6942
6944
|
*/
|
|
6943
6945
|
readonly is_updatable: boolean;
|
|
6946
|
+
/**
|
|
6947
|
+
* The first found item request proxy targeting this entity.
|
|
6948
|
+
*/
|
|
6949
|
+
readonly item_request_proxy?: LuaEntity;
|
|
6944
6950
|
/**
|
|
6945
6951
|
* Items this ghost will request when revived or items this item request proxy is requesting.
|
|
6946
6952
|
*/
|
|
@@ -8296,6 +8302,10 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8296
8302
|
* The rocket rising delay for this rocket silo prototype.
|
|
8297
8303
|
*/
|
|
8298
8304
|
readonly rocket_rising_delay?: uint8;
|
|
8305
|
+
/**
|
|
8306
|
+
* The rotation snap angle of this car prototype.
|
|
8307
|
+
*/
|
|
8308
|
+
readonly rotation_snap_angle?: double;
|
|
8299
8309
|
/**
|
|
8300
8310
|
* The rotation speed of this car prototype.
|
|
8301
8311
|
*/
|
|
@@ -8441,7 +8451,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8441
8451
|
/**
|
|
8442
8452
|
* If this drill uses force productivity bonus
|
|
8443
8453
|
*/
|
|
8444
|
-
readonly uses_force_mining_productivity_bonus?:
|
|
8454
|
+
readonly uses_force_mining_productivity_bonus?: boolean;
|
|
8445
8455
|
/**
|
|
8446
8456
|
* 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.
|
|
8447
8457
|
*/
|
|
@@ -12665,9 +12675,9 @@ interface LuaItemStack extends LuaItemCommon {
|
|
|
12665
12675
|
swap_stack(this: void, stack: LuaItemStack): boolean;
|
|
12666
12676
|
/**
|
|
12667
12677
|
* Transfers the given item stack into this item stack.
|
|
12668
|
-
* @returns `true` if the full stack was transferred.
|
|
12678
|
+
* @returns `true` if the full stack (or requested amount) was transferred.
|
|
12669
12679
|
*/
|
|
12670
|
-
transfer_stack(this: void, stack: ItemStackIdentification): boolean;
|
|
12680
|
+
transfer_stack(this: void, stack: ItemStackIdentification, amount?: uint): boolean;
|
|
12671
12681
|
/**
|
|
12672
12682
|
* Use the capsule item with the entity as the source, targeting the given position.
|
|
12673
12683
|
* @param entity The entity to use the capsule item with.
|
|
@@ -14204,9 +14214,63 @@ interface LuaPlayer extends LuaControl {
|
|
|
14204
14214
|
*/
|
|
14205
14215
|
readonly valid: boolean;
|
|
14206
14216
|
/**
|
|
14207
|
-
* The player's zoom
|
|
14217
|
+
* The current player controller's zoom level. Must be positive. The baseline zoom level is 1. Values greater than 1 will zoom in closer to the world and values between 0 and 1 will zoom out away from the world.
|
|
14218
|
+
*
|
|
14219
|
+
* Writing values outside the current zoom limits is always valid, but read values will always be clamped to the range defined by {@link LuaPlayer::zoom_limits | runtime:LuaPlayer::zoom_limits}.
|
|
14208
14220
|
*/
|
|
14209
14221
|
zoom: double;
|
|
14222
|
+
/**
|
|
14223
|
+
* The current player controller's zoom limits.
|
|
14224
|
+
*
|
|
14225
|
+
* Reading this field creates a copy, so modifying the returned table's fields directly will not alter the player's zoom limits. To change the zoom limits for the player's current controller, set the entire field to the desired {@link ZoomLimits | runtime:ZoomLimits} table.
|
|
14226
|
+
*
|
|
14227
|
+
* Zoom limits may or may not reset to default any time the player controller changes. Use the {@link defines.events.on_player_controller_changed | runtime:defines.events.on_player_controller_changed} event to respond to and correct the new controller's zoom limits.
|
|
14228
|
+
* @example ```
|
|
14229
|
+
-- Lets the player zoom in to 4x the standard zoom level. (3x is the default for most controllers.)
|
|
14230
|
+
-- Increases the player zoom out level so that they can view approximately 800 tiles across.
|
|
14231
|
+
-- Sets furthest_game_view to furthest so that all zoom levels are rendered in game view, never chart (map) view.
|
|
14232
|
+
game.player.zoom_limits = {
|
|
14233
|
+
closest = { zoom = 4 },
|
|
14234
|
+
furthest = { distance = 800, max_distance = 1000 },
|
|
14235
|
+
furthest_game_view = { distance = 800, max_distance = 1000 }
|
|
14236
|
+
}
|
|
14237
|
+
```
|
|
14238
|
+
* @example ```
|
|
14239
|
+
-- Resets the closest and furthest_game_view limits to their defaults.
|
|
14240
|
+
-- Increases the furthest a player can zoom out to approximately 400 tiles across. There's a hard zoom limit at
|
|
14241
|
+
-- 800 tiles (either vertically or horizontally, whichever is more).
|
|
14242
|
+
game.player.zoom_limits = {
|
|
14243
|
+
furthest = { distance = 400, max_distance = 800 }
|
|
14244
|
+
}
|
|
14245
|
+
```
|
|
14246
|
+
* @example ```
|
|
14247
|
+
-- Sets the closest that the player can zoom in to 3x (the default for most controllers).
|
|
14248
|
+
-- Sets the furthest that the player can view in game view to some number GREATER than
|
|
14249
|
+
-- closest, guaranteeing that the player can only view the chart. However, this does NOT mean that the player
|
|
14250
|
+
-- can interact with the game as if in remote view if they are not explicitly using remote view.
|
|
14251
|
+
game.player.zoom_limits = {
|
|
14252
|
+
closest = { zoom = 3 },
|
|
14253
|
+
furthest_game_view = { zoom = 4 }
|
|
14254
|
+
}
|
|
14255
|
+
```
|
|
14256
|
+
* @example ```
|
|
14257
|
+
-- Save a copy of whatever zoom limits any script has previously set.
|
|
14258
|
+
local custom_limits = game.player.zoom_limits
|
|
14259
|
+
-- Resets all zoom limits to default.
|
|
14260
|
+
game.player.zoom_limits = {}
|
|
14261
|
+
-- Save a copy of whatever the default zoom limits are for the current controller.
|
|
14262
|
+
local default_limits = game.player.zoom_limits
|
|
14263
|
+
-- Set the zoom limits to a modification of the engine-default closest zoom limit (or 6 if the engine-default is
|
|
14264
|
+
-- not a fixed zoom value), the furthest limit previously defined by script (or the engine default if not
|
|
14265
|
+
-- previously set by a script), and some arbitrary value for `furthest_game_view`.
|
|
14266
|
+
game.player.zoom_limits = {
|
|
14267
|
+
closest = { zoom = (default_limits.furthest.zoom or 3.0) * 2 },
|
|
14268
|
+
furthest = custom_limits.furthest,
|
|
14269
|
+
furthest_game_view = { zoom = 0.25 }
|
|
14270
|
+
}
|
|
14271
|
+
```
|
|
14272
|
+
*/
|
|
14273
|
+
zoom_limits: ZoomLimits;
|
|
14210
14274
|
}
|
|
14211
14275
|
/**
|
|
14212
14276
|
* Prototype of a procession inheritance group which synchronizes offsets between procession steps.
|
|
@@ -17782,7 +17846,7 @@ interface LuaSurface {
|
|
|
17782
17846
|
*/
|
|
17783
17847
|
wind_speed: double;
|
|
17784
17848
|
}
|
|
17785
|
-
type LuaSurfaceCreateEntityParams = BaseLuaSurfaceCreateEntityParams | LuaSurfaceCreateEntityParamsArtilleryFlare | LuaSurfaceCreateEntityParamsArtilleryProjectile | LuaSurfaceCreateEntityParamsAssemblingMachine | LuaSurfaceCreateEntityParamsBeam | LuaSurfaceCreateEntityParamsCharacterCorpse | LuaSurfaceCreateEntityParamsCliff | LuaSurfaceCreateEntityParamsContainer | LuaSurfaceCreateEntityParamsElectricPole | LuaSurfaceCreateEntityParamsEntityGhost | LuaSurfaceCreateEntityParamsFire | LuaSurfaceCreateEntityParamsHighlightBox | LuaSurfaceCreateEntityParamsInserter | LuaSurfaceCreateEntityParamsItemEntity | LuaSurfaceCreateEntityParamsItemRequestProxy | LuaSurfaceCreateEntityParamsLamp | LuaSurfaceCreateEntityParamsLoader | LuaSurfaceCreateEntityParamsLoader1x1 | LuaSurfaceCreateEntityParamsLocomotive | LuaSurfaceCreateEntityParamsLogisticContainer | LuaSurfaceCreateEntityParamsParticle | LuaSurfaceCreateEntityParamsPlant | LuaSurfaceCreateEntityParamsProgrammableSpeaker | LuaSurfaceCreateEntityParamsProjectile | LuaSurfaceCreateEntityParamsRailChainSignal | LuaSurfaceCreateEntityParamsRailSignal | LuaSurfaceCreateEntityParamsResource | LuaSurfaceCreateEntityParamsRollingStock | LuaSurfaceCreateEntityParamsSimpleEntityWithForce | LuaSurfaceCreateEntityParamsSimpleEntityWithOwner | LuaSurfaceCreateEntityParamsSpeechBubble | LuaSurfaceCreateEntityParamsStream | LuaSurfaceCreateEntityParamsTileGhost | LuaSurfaceCreateEntityParamsUndergroundBelt;
|
|
17849
|
+
type LuaSurfaceCreateEntityParams = BaseLuaSurfaceCreateEntityParams | LuaSurfaceCreateEntityParamsArtilleryFlare | LuaSurfaceCreateEntityParamsArtilleryProjectile | LuaSurfaceCreateEntityParamsAssemblingMachine | LuaSurfaceCreateEntityParamsBeam | LuaSurfaceCreateEntityParamsCharacterCorpse | LuaSurfaceCreateEntityParamsCliff | LuaSurfaceCreateEntityParamsContainer | LuaSurfaceCreateEntityParamsElectricPole | LuaSurfaceCreateEntityParamsEntityGhost | LuaSurfaceCreateEntityParamsFire | LuaSurfaceCreateEntityParamsHighlightBox | LuaSurfaceCreateEntityParamsInserter | LuaSurfaceCreateEntityParamsItemEntity | LuaSurfaceCreateEntityParamsItemRequestProxy | LuaSurfaceCreateEntityParamsLamp | LuaSurfaceCreateEntityParamsLoader | LuaSurfaceCreateEntityParamsLoader1x1 | LuaSurfaceCreateEntityParamsLocomotive | LuaSurfaceCreateEntityParamsLogisticContainer | LuaSurfaceCreateEntityParamsParticle | LuaSurfaceCreateEntityParamsPlant | LuaSurfaceCreateEntityParamsProgrammableSpeaker | LuaSurfaceCreateEntityParamsProjectile | LuaSurfaceCreateEntityParamsProjectile | LuaSurfaceCreateEntityParamsRailChainSignal | LuaSurfaceCreateEntityParamsRailSignal | LuaSurfaceCreateEntityParamsResource | LuaSurfaceCreateEntityParamsRollingStock | LuaSurfaceCreateEntityParamsSimpleEntityWithForce | LuaSurfaceCreateEntityParamsSimpleEntityWithOwner | LuaSurfaceCreateEntityParamsSpeechBubble | LuaSurfaceCreateEntityParamsStream | LuaSurfaceCreateEntityParamsTileGhost | LuaSurfaceCreateEntityParamsUndergroundBelt;
|
|
17786
17850
|
interface BaseLuaSurfaceCreateEntityParams {
|
|
17787
17851
|
/**
|
|
17788
17852
|
* Cause entity / force. The entity or force that triggered the chain of events that led to this entity being created. Used for beams, projectiles, stickers, etc. so that the damage receiver can know which entity or force to retaliate against.
|
|
@@ -18137,6 +18201,14 @@ interface LuaSurfaceCreateEntityParamsProjectile extends BaseLuaSurfaceCreateEnt
|
|
|
18137
18201
|
*/
|
|
18138
18202
|
'speed'?: double;
|
|
18139
18203
|
}
|
|
18204
|
+
/**
|
|
18205
|
+
*
|
|
18206
|
+
* Applies to variant case `projectile`
|
|
18207
|
+
*/
|
|
18208
|
+
interface LuaSurfaceCreateEntityParamsProjectile extends BaseLuaSurfaceCreateEntityParams {
|
|
18209
|
+
'base_damage_modifiers'?: TriggerModifierData;
|
|
18210
|
+
'bonus_damage_modifiers'?: TriggerModifierData;
|
|
18211
|
+
}
|
|
18140
18212
|
/**
|
|
18141
18213
|
*
|
|
18142
18214
|
* Applies to variant case `rail-chain-signal`
|
|
@@ -19058,6 +19130,10 @@ interface LuaTransportLine {
|
|
|
19058
19130
|
* The entity this transport line belongs to.
|
|
19059
19131
|
*/
|
|
19060
19132
|
readonly owner: LuaEntity;
|
|
19133
|
+
/**
|
|
19134
|
+
* Total length of segment which consists of this line, all lines in front and lines in the back directly connected.
|
|
19135
|
+
*/
|
|
19136
|
+
readonly total_segment_length: double;
|
|
19061
19137
|
/**
|
|
19062
19138
|
* 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.
|
|
19063
19139
|
*/
|
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.47
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -45,9 +45,10 @@ interface AddRecordData {
|
|
|
45
45
|
* When `rail` is given, this can be provided to further narrow down direction from which that rail should be approached.
|
|
46
46
|
*/
|
|
47
47
|
rail_direction?: defines.rail_direction;
|
|
48
|
-
wait_conditions?: WaitCondition[];
|
|
49
48
|
temporary?: boolean;
|
|
49
|
+
created_by_interrupt?: boolean;
|
|
50
50
|
allows_unloading?: boolean;
|
|
51
|
+
wait_conditions?: WaitCondition[];
|
|
51
52
|
/**
|
|
52
53
|
* If index is not given, the record is appended.
|
|
53
54
|
*/
|
|
@@ -1631,7 +1632,7 @@ type EntityPrototypeFlag = /**
|
|
|
1631
1632
|
'not-blueprintable' | /**
|
|
1632
1633
|
* Hides the alt-info of this entity when in alt-mode.
|
|
1633
1634
|
*/
|
|
1634
|
-
'hide-alt-info' |
|
|
1635
|
+
'hide-alt-info' | /**
|
|
1635
1636
|
* Does not apply fire stickers to the entity.
|
|
1636
1637
|
*/
|
|
1637
1638
|
'not-flammable' | /**
|
|
@@ -5687,6 +5688,7 @@ interface PlaceAsTileResult {
|
|
|
5687
5688
|
result: LuaTilePrototype;
|
|
5688
5689
|
condition_size: uint;
|
|
5689
5690
|
condition: CollisionMask;
|
|
5691
|
+
invert: boolean;
|
|
5690
5692
|
}
|
|
5691
5693
|
interface PlatformSchedule {
|
|
5692
5694
|
/**
|
|
@@ -7671,6 +7673,11 @@ interface TriggerItem {
|
|
|
7671
7673
|
repeat_count: uint;
|
|
7672
7674
|
probability: float;
|
|
7673
7675
|
}
|
|
7676
|
+
interface TriggerModifierData {
|
|
7677
|
+
damage_modifier?: float;
|
|
7678
|
+
damage_addition?: float;
|
|
7679
|
+
radius_modifier?: float;
|
|
7680
|
+
}
|
|
7674
7681
|
/**
|
|
7675
7682
|
* A set of trigger target masks.
|
|
7676
7683
|
*/
|
|
@@ -8088,6 +8095,60 @@ interface WorkerRobotOrder {
|
|
|
8088
8095
|
*/
|
|
8089
8096
|
target_count?: ItemCountType;
|
|
8090
8097
|
}
|
|
8098
|
+
/**
|
|
8099
|
+
* A set of limitations for the player zoom level.
|
|
8100
|
+
* @example ```
|
|
8101
|
+
{
|
|
8102
|
+
closest = { zoom = 4 },
|
|
8103
|
+
furthest = { zoom = 1 / 16 },
|
|
8104
|
+
furthest_game_view = { distance = 200, max_distance = 400 }
|
|
8105
|
+
}
|
|
8106
|
+
```
|
|
8107
|
+
*/
|
|
8108
|
+
interface ZoomLimits {
|
|
8109
|
+
/**
|
|
8110
|
+
* The closest zoom level that the player's current controller can have. If not defined when overwriting {@link LuaPlayer::zoom_limits | runtime:LuaPlayer::zoom_limits}, then the default value for the current controller as defined by the engine will be used instead. When reading from {@link LuaPlayer::zoom_limits | runtime:LuaPlayer::zoom_limits}, this field will contain the value previously set by a script or the default value defined by the engine.
|
|
8111
|
+
*/
|
|
8112
|
+
closest?: ZoomSpecification;
|
|
8113
|
+
/**
|
|
8114
|
+
* The furthest zoom level that the player's current controller can have. If for any reason the `furthest` limit is closer than `closest`, then the player's zoom will be locked to the closer of the two values. If not defined when overwriting {@link LuaPlayer::zoom_limits | runtime:LuaPlayer::zoom_limits}, then the default value for the current controller as defined by the engine will be used instead. When reading from {@link LuaPlayer::zoom_limits | runtime:LuaPlayer::zoom_limits}, this field will contain the value previously set by a script or the default value defined by the engine.
|
|
8115
|
+
*/
|
|
8116
|
+
furthest?: ZoomSpecification;
|
|
8117
|
+
/**
|
|
8118
|
+
* The furthest zoom level at which the engine will render the game view. Zoom levels further than this limit will render using chart (map) view. Set this to the same value as `furthest` to force the game view at all zoom levels. Set this to some value closer than `closest` to force chart view at all zoom levels. If not defined when overwriting {@link LuaPlayer::zoom_limits | runtime:LuaPlayer::zoom_limits}, then the default value for the current controller as defined by the engine will be used instead. When reading from {@link LuaPlayer::zoom_limits | runtime:LuaPlayer::zoom_limits}, this field will contain the value previously set by a script or the default value defined by the engine.
|
|
8119
|
+
*/
|
|
8120
|
+
furthest_game_view?: ZoomSpecification;
|
|
8121
|
+
}
|
|
8122
|
+
/**
|
|
8123
|
+
* A table specifying a fixed or dynamically-computed zoom level using one of the supported methods. Used by {@link ZoomLimits | runtime:ZoomLimits}.
|
|
8124
|
+
*
|
|
8125
|
+
* Method 1 only uses the `zoom` field. The zoom level is fixed and will not change at runtime. Directly correlates to the perceived size of objects in the game world.
|
|
8126
|
+
*
|
|
8127
|
+
* Method 2 only uses `distance` and optionally `max_distance`. The zoom level is computed dynamically based on the player's window dimensions and aspect ratio. This method is ideal for limiting how far the player can see.
|
|
8128
|
+
*
|
|
8129
|
+
* If there is ambiguity in which method should be used (i.e. both `zoom` and `distance` fields are provided), an error will be thrown during parsing.
|
|
8130
|
+
* @example ```
|
|
8131
|
+
-- Method 1: Specify a fixed zoom level.
|
|
8132
|
+
{ zoom = 3.0 }
|
|
8133
|
+
|
|
8134
|
+
-- Method 2: Specify a dynamic zoom level based on the window dimensions.
|
|
8135
|
+
{ distance = 200, max_distance = 500 }
|
|
8136
|
+
```
|
|
8137
|
+
*/
|
|
8138
|
+
interface ZoomSpecification {
|
|
8139
|
+
/**
|
|
8140
|
+
* A fixed zoom level. Must be a positive value. 1.0 is the default zoom level. Mutually exclusive with `distance`.
|
|
8141
|
+
*/
|
|
8142
|
+
zoom?: double;
|
|
8143
|
+
/**
|
|
8144
|
+
* The number of game tiles across the horizontal axis at the game's default 16:9 aspect ratio. Must be a positive number. This specification is designed to comfortably accommodate displays with extreme aspect ratios such as ultrawide monitors. The exact zoom level is calculated at dynamically as follows. For aspect ratios between 16:9 and 9:16, the zoom level is computed so that `distance` number of tiles are visible along the game window's longer axis. For aspect ratios between 16:9 and 1:1, this is the window's width. For aspect ratios between 1:1 and 9:16, this is the window's height. For aspect ratios greater than 16:9 or smaller than 9:16, then the zoom level is actually computed so that `distance * 9 / 16` number of tiles are visible along the game window's shorter axis. So for aspect ratios greater than 16:9, this is the window's height. For aspect ratios smaller than 9:16, this is the window's height. Mutually exclusive with `zoom`. Used with `max_distance`.
|
|
8145
|
+
*/
|
|
8146
|
+
distance?: double;
|
|
8147
|
+
/**
|
|
8148
|
+
* The absolute maximum number of game tiles permitted along the window's longest axis, setting a hard limit on how far a player can see by simply manipulating the game window. Must be a positive number. Values greater than the default may allow players to see ungenerated chunks while exploring. The "closest" zoom level calculated from `distance` and `max_distance` is always used. Optionally used with `distance`. Defaults to `500`.
|
|
8149
|
+
*/
|
|
8150
|
+
max_distance?: double;
|
|
8151
|
+
}
|
|
8091
8152
|
/**
|
|
8092
8153
|
* A double-precision floating-point number. This is the same data type as all Lua numbers use.
|
|
8093
8154
|
*/
|
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.47
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
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.47
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace defines {
|
|
@@ -975,14 +975,14 @@ enum input_action {
|
|
|
975
975
|
change_active_quick_bar = 29,
|
|
976
976
|
change_arithmetic_combinator_parameters = 30,
|
|
977
977
|
change_entity_label = 31,
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
978
|
+
change_heading_riding_state = 32,
|
|
979
|
+
change_item_label = 33,
|
|
980
|
+
change_logistic_point_group = 34,
|
|
981
|
+
change_multiplayer_config = 35,
|
|
982
|
+
change_picking_state = 36,
|
|
983
|
+
change_programmable_speaker_alert_parameters = 37,
|
|
984
|
+
change_programmable_speaker_circuit_parameters = 38,
|
|
985
|
+
change_programmable_speaker_parameters = 39,
|
|
986
986
|
change_riding_state = 40,
|
|
987
987
|
change_selector_combinator_parameters = 41,
|
|
988
988
|
change_shooting_state = 42,
|
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.47
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
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.47
|
|
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.47
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -955,6 +955,10 @@ interface AutoplaceControl extends Prototype {
|
|
|
955
955
|
* Controls in what tab the autoplace is shown in the map generator GUI.
|
|
956
956
|
*/
|
|
957
957
|
category: 'resource' | 'terrain' | 'cliff' | 'enemy';
|
|
958
|
+
/**
|
|
959
|
+
* Whether this settings being lower than default disables fight related achievements
|
|
960
|
+
*/
|
|
961
|
+
related_to_fight_achievements?: boolean;
|
|
958
962
|
/**
|
|
959
963
|
* Sets whether this control's richness can be changed. The map generator GUI will only show the richness slider when the `category` is `"resource"`.
|
|
960
964
|
*
|
|
@@ -1308,6 +1312,10 @@ interface CarPrototype extends VehiclePrototype {
|
|
|
1308
1312
|
*/
|
|
1309
1313
|
light_animation?: RotatedAnimation;
|
|
1310
1314
|
render_layer?: RenderLayer;
|
|
1315
|
+
/**
|
|
1316
|
+
* Vehicle will snap the vertical, horizontal or diagonal axis if it's within this angle
|
|
1317
|
+
*/
|
|
1318
|
+
rotation_snap_angle: double;
|
|
1311
1319
|
rotation_speed: double;
|
|
1312
1320
|
sound_no_fuel?: Sound;
|
|
1313
1321
|
/**
|
|
@@ -8651,6 +8659,7 @@ interface StickerPrototype extends EntityPrototype {
|
|
|
8651
8659
|
* Effects (with cooldowns) to trigger every tick.
|
|
8652
8660
|
*/
|
|
8653
8661
|
update_effects?: TriggerEffectWithCooldown[];
|
|
8662
|
+
use_damage_substitute?: boolean;
|
|
8654
8663
|
vehicle_friction_modifier?: float;
|
|
8655
8664
|
/**
|
|
8656
8665
|
* Works similarly to `target_movement_modifier_from`.
|
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.47
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace prototype {
|
|
@@ -4307,7 +4307,7 @@ type EntityPrototypeFlags = (/**
|
|
|
4307
4307
|
'not-blueprintable' | /**
|
|
4308
4308
|
* Hides the alt-info of an entity in alt-mode, for example the recipe icon.
|
|
4309
4309
|
*/
|
|
4310
|
-
'hide-alt-info' |
|
|
4310
|
+
'hide-alt-info' | /**
|
|
4311
4311
|
* Do not apply fire stickers to the entity.
|
|
4312
4312
|
*/
|
|
4313
4313
|
'not-flammable' | /**
|
|
@@ -9797,7 +9797,7 @@ interface SpriteParameters extends SpriteSource {
|
|
|
9797
9797
|
/**
|
|
9798
9798
|
* Loaded only if `draw_as_shadow`, `draw_as_glow` and `draw_as_light` are `false`, and only by sprites used by tile renderer (decals and underwater patches). Purspose of setting this to `false` is to preserve water mask from sprites that are supposed to be drawn under the water.
|
|
9799
9799
|
*/
|
|
9800
|
-
occludes_light?:
|
|
9800
|
+
occludes_light?: boolean;
|
|
9801
9801
|
priority?: SpritePriority;
|
|
9802
9802
|
/**
|
|
9803
9803
|
* Whether to rotate the `shift` alongside the sprite's rotation. This only applies to sprites which are procedurally rotated by the game engine (like projectiles, wires, inserter hands, etc).
|
|
@@ -11514,12 +11514,26 @@ interface TransportBeltConnectorFrame {
|
|
|
11514
11514
|
*/
|
|
11515
11515
|
interface TreeVariation {
|
|
11516
11516
|
branch_generation: CreateParticleTriggerEffectItem;
|
|
11517
|
+
/**
|
|
11518
|
+
* This value is multiplied with the percent of health lost.
|
|
11519
|
+
*/
|
|
11520
|
+
branches_when_damaged?: uint8;
|
|
11521
|
+
branches_when_destroyed?: uint8;
|
|
11522
|
+
branches_when_mined_automatically?: uint8;
|
|
11523
|
+
branches_when_mined_manually?: uint8;
|
|
11517
11524
|
/**
|
|
11518
11525
|
* Only loaded if `shadow` is present. Defaults to `shadow.frame_count - 1`.
|
|
11519
11526
|
*/
|
|
11520
11527
|
disable_shadow_distortion_beginning_at_frame?: uint32;
|
|
11521
11528
|
leaf_generation: CreateParticleTriggerEffectItem;
|
|
11522
11529
|
leaves: Animation;
|
|
11530
|
+
/**
|
|
11531
|
+
* This value is multiplied with the percent of health lost.
|
|
11532
|
+
*/
|
|
11533
|
+
leaves_when_damaged?: uint8;
|
|
11534
|
+
leaves_when_destroyed?: uint8;
|
|
11535
|
+
leaves_when_mined_automatically?: uint8;
|
|
11536
|
+
leaves_when_mined_manually?: uint8;
|
|
11523
11537
|
/**
|
|
11524
11538
|
* Normal must have the same frame_count as `leaves`.
|
|
11525
11539
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "factorio-types",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.33",
|
|
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.47",
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"lua-types": "^2.13.1"
|
|
29
29
|
},
|