factorio-types 0.0.13 → 0.0.17
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 +310 -293
- package/dist/concepts.d.ts +25 -17
- package/dist/defines.d.ts +1 -1
- package/dist/events.d.ts +4 -1
- package/dist/global.d.ts +1 -1
- package/package.json +1 -1
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 1.1.
|
|
5
|
+
// Factorio version 1.1.47
|
|
6
6
|
// API version 1
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -985,23 +985,19 @@ interface LuaControl {
|
|
|
985
985
|
|
|
986
986
|
/**
|
|
987
987
|
* Gets the parameters of a personal logistic request and auto-trash slot.
|
|
988
|
-
* @remarks
|
|
989
|
-
* This will silently return an empty value (`name` will be `nil`) if personal logistics are not researched yet.
|
|
990
|
-
*
|
|
991
988
|
* @param slot_index - The slot to get.
|
|
989
|
+
* @returns The logistic parameters. If personal logistics are not researched yet, their `name` will be `nil`.
|
|
992
990
|
*/
|
|
993
991
|
get_personal_logistic_slot(this: void,
|
|
994
|
-
slot_index: number):
|
|
992
|
+
slot_index: number): LogisticParameters
|
|
995
993
|
|
|
996
994
|
/**
|
|
997
995
|
* Gets the parameters of a vehicle logistic request and auto-trash slot.
|
|
998
|
-
* @remarks
|
|
999
|
-
* This will silently return an empty value (`name` will be `nil`) if the vehicle does not use logistics.
|
|
1000
|
-
*
|
|
1001
996
|
* @param slot_index - The slot to get.
|
|
997
|
+
* @returns The logistic parameters. If the vehicle does not use logistics, their `name` will be `nil`.
|
|
1002
998
|
*/
|
|
1003
999
|
get_vehicle_logistic_slot(this: void,
|
|
1004
|
-
slot_index: number):
|
|
1000
|
+
slot_index: number): LogisticParameters
|
|
1005
1001
|
|
|
1006
1002
|
/**
|
|
1007
1003
|
* Does this entity have any item inside it?
|
|
@@ -1017,7 +1013,10 @@ interface LuaControl {
|
|
|
1017
1013
|
items: ItemStackIdentification): number
|
|
1018
1014
|
|
|
1019
1015
|
/**
|
|
1020
|
-
* Returns whether the player is holding a blueprint
|
|
1016
|
+
* Returns whether the player is holding a blueprint. This takes both blueprint items as well as blueprint records from the blueprint library into account.
|
|
1017
|
+
* @remarks
|
|
1018
|
+
* Both this method and {@link LuaControl::get_blueprint_entities | LuaControl::get_blueprint_entities} refer to the currently selected blueprint, meaning a blueprint book with a selected blueprint will return the information as well.
|
|
1019
|
+
*
|
|
1021
1020
|
*/
|
|
1022
1021
|
is_cursor_blueprint(this: void): boolean
|
|
1023
1022
|
|
|
@@ -1077,29 +1076,23 @@ interface LuaControl {
|
|
|
1077
1076
|
|
|
1078
1077
|
/**
|
|
1079
1078
|
* Sets a personal logistic request and auto-trash slot to the given value.
|
|
1080
|
-
* @remarks
|
|
1081
|
-
* This will silently fail if personal logistics are not researched yet.
|
|
1082
|
-
*
|
|
1083
1079
|
* @param slot_index - The slot to set.
|
|
1084
1080
|
* @param value - The logistic request parameters.
|
|
1085
|
-
* @returns Whether the slot was set successfully.
|
|
1081
|
+
* @returns Whether the slot was set successfully. `false` if personal logistics are not researched yet.
|
|
1086
1082
|
*/
|
|
1087
1083
|
set_personal_logistic_slot(this: void,
|
|
1088
1084
|
slot_index: number,
|
|
1089
|
-
value:
|
|
1085
|
+
value: LogisticParameters): boolean
|
|
1090
1086
|
|
|
1091
1087
|
/**
|
|
1092
1088
|
* Sets a vehicle logistic request and auto-trash slot to the given value.
|
|
1093
|
-
* @remarks
|
|
1094
|
-
* This will silently fail if the vehicle does not use logistics.
|
|
1095
|
-
*
|
|
1096
1089
|
* @param slot_index - The slot to set.
|
|
1097
1090
|
* @param value - The logistic request parameters.
|
|
1098
|
-
* @returns Whether the slot was set successfully.
|
|
1091
|
+
* @returns Whether the slot was set successfully. `false` if the vehicle does not use logistics.
|
|
1099
1092
|
*/
|
|
1100
1093
|
set_vehicle_logistic_slot(this: void,
|
|
1101
1094
|
slot_index: number,
|
|
1102
|
-
value:
|
|
1095
|
+
value: LogisticParameters): boolean
|
|
1103
1096
|
|
|
1104
1097
|
/**
|
|
1105
1098
|
* Teleport the entity to a given position, possibly on another surface.
|
|
@@ -1278,7 +1271,7 @@ interface LuaControl {
|
|
|
1278
1271
|
* ```
|
|
1279
1272
|
*
|
|
1280
1273
|
*/
|
|
1281
|
-
readonly cursor_stack
|
|
1274
|
+
readonly cursor_stack?: LuaItemStack
|
|
1282
1275
|
|
|
1283
1276
|
/**
|
|
1284
1277
|
* `true` if the player is in a vehicle. Writing to this attribute puts the player in or out of a vehicle.
|
|
@@ -1327,17 +1320,18 @@ interface LuaControl {
|
|
|
1327
1320
|
mining_state: { mining: boolean, position?: Position }
|
|
1328
1321
|
|
|
1329
1322
|
/**
|
|
1330
|
-
* The GUI
|
|
1323
|
+
* The GUI the player currently has open, or `nil` if no GUI is open. Writing to it fires the {@link on_gui_opened | on_gui_opened} event.
|
|
1324
|
+
* This is the GUI that will asked to close (by firing the {@link on_gui_closed | on_gui_closed} event) when the `Esc` or `E` keys are pressed. If this attribute is not `nil`, and a new GUI is written to it, the existing one will be asked to close.
|
|
1331
1325
|
* @remarks
|
|
1332
|
-
* Write supports any of the types. Read will return the entity
|
|
1326
|
+
* Write supports any of the types. Read will return the `entity`, `equipment`, `equipment-grid`, `player`, `element` or `nil`.
|
|
1333
1327
|
*
|
|
1334
1328
|
*/
|
|
1335
|
-
opened
|
|
1329
|
+
opened?: LuaEntity | LuaItemStack | LuaEquipment | LuaEquipmentGrid | LuaPlayer | LuaGuiElement | defines.gui_type
|
|
1336
1330
|
|
|
1337
1331
|
/**
|
|
1338
1332
|
* Returns the {@link defines.gui_type | defines.gui_type} or `nil`.
|
|
1339
1333
|
*/
|
|
1340
|
-
readonly opened_gui_type
|
|
1334
|
+
readonly opened_gui_type?: defines.gui_type
|
|
1341
1335
|
|
|
1342
1336
|
/**
|
|
1343
1337
|
* Current item-picking state.
|
|
@@ -1540,7 +1534,7 @@ interface LuaCustomInputPrototype {
|
|
|
1540
1534
|
/**
|
|
1541
1535
|
* The item that gets spawned when this custom input is fired or `nil`.
|
|
1542
1536
|
*/
|
|
1543
|
-
readonly item_to_spawn
|
|
1537
|
+
readonly item_to_spawn?: LuaItemPrototype
|
|
1544
1538
|
|
|
1545
1539
|
/**
|
|
1546
1540
|
* The default key sequence for this custom input.
|
|
@@ -1550,7 +1544,7 @@ interface LuaCustomInputPrototype {
|
|
|
1550
1544
|
/**
|
|
1551
1545
|
* The linked game control name or `nil`.
|
|
1552
1546
|
*/
|
|
1553
|
-
readonly linked_game_control
|
|
1547
|
+
readonly linked_game_control?: string
|
|
1554
1548
|
|
|
1555
1549
|
readonly localised_description: LocalisedString
|
|
1556
1550
|
|
|
@@ -2085,7 +2079,7 @@ interface LuaEntity extends LuaControl {
|
|
|
2085
2079
|
/**
|
|
2086
2080
|
* Get the rails that this signal is connected to.
|
|
2087
2081
|
* @remarks
|
|
2088
|
-
* Applies to subclasses: RailSignal
|
|
2082
|
+
* Applies to subclasses: RailSignal,RailChainSignal
|
|
2089
2083
|
*
|
|
2090
2084
|
*/
|
|
2091
2085
|
get_connected_rails(this: void): LuaEntity[]
|
|
@@ -2133,12 +2127,18 @@ interface LuaEntity extends LuaControl {
|
|
|
2133
2127
|
|
|
2134
2128
|
/**
|
|
2135
2129
|
* Get amounts of all fluids in this entity.
|
|
2130
|
+
* @remarks
|
|
2131
|
+
* If information about fluid temperatures is required, {@link LuaEntity::fluidbox | LuaEntity::fluidbox} should be used instead.
|
|
2132
|
+
*
|
|
2136
2133
|
* @returns The amounts, indexed by fluid names.
|
|
2137
2134
|
*/
|
|
2138
2135
|
get_fluid_contents(this: void): {[key: string]: number}
|
|
2139
2136
|
|
|
2140
2137
|
/**
|
|
2141
2138
|
* Get the amount of all or some fluid in this entity.
|
|
2139
|
+
* @remarks
|
|
2140
|
+
* If information about fluid temperatures is required, {@link LuaEntity::fluidbox | LuaEntity::fluidbox} should be used instead.
|
|
2141
|
+
*
|
|
2142
2142
|
* @param fluid - Prototype name of the fluid to count. If not specified, count all fluids.
|
|
2143
2143
|
*/
|
|
2144
2144
|
get_fluid_count(this: void,
|
|
@@ -2338,7 +2338,7 @@ interface LuaEntity extends LuaControl {
|
|
|
2338
2338
|
* @remarks
|
|
2339
2339
|
* Applies to subclasses: TransportBeltConnectable
|
|
2340
2340
|
*
|
|
2341
|
-
* @param index - Index of the requested transport line.
|
|
2341
|
+
* @param index - Index of the requested transport line. Transport lines are 1-indexed.
|
|
2342
2342
|
*/
|
|
2343
2343
|
get_transport_line(this: void,
|
|
2344
2344
|
index: number): LuaTransportLine
|
|
@@ -2356,11 +2356,11 @@ interface LuaEntity extends LuaControl {
|
|
|
2356
2356
|
get_upgrade_target(this: void): LuaEntityPrototype
|
|
2357
2357
|
|
|
2358
2358
|
/**
|
|
2359
|
-
* Same as {@link LuaEntity::has_flag | LuaEntity::has_flag} but targets the inner entity on a entity ghost.
|
|
2359
|
+
* Same as {@link LuaEntity::has_flag | LuaEntity::has_flag}, but targets the inner entity on a entity ghost.
|
|
2360
2360
|
* @remarks
|
|
2361
2361
|
* Applies to subclasses: EntityGhost
|
|
2362
2362
|
*
|
|
2363
|
-
* @param flag - The flag to test
|
|
2363
|
+
* @param flag - The flag to test. See [EntityPrototypeFlags](EntityPrototypeFlags) for a list of flags.
|
|
2364
2364
|
* @returns `true` if the entity has the given flag set.
|
|
2365
2365
|
*/
|
|
2366
2366
|
ghost_has_flag(this: void,
|
|
@@ -2375,12 +2375,12 @@ interface LuaEntity extends LuaControl {
|
|
|
2375
2375
|
has_command(this: void): boolean
|
|
2376
2376
|
|
|
2377
2377
|
/**
|
|
2378
|
-
* Test whether this entity's prototype has a flag set.
|
|
2378
|
+
* Test whether this entity's prototype has a certain flag set.
|
|
2379
2379
|
* @remarks
|
|
2380
2380
|
* `entity.has_flag(f)` is a shortcut for `entity.prototype.has_flag(f)`.
|
|
2381
2381
|
*
|
|
2382
|
-
* @param flag - The flag to test
|
|
2383
|
-
* @returns `true` if
|
|
2382
|
+
* @param flag - The flag to test. See [EntityPrototypeFlags](EntityPrototypeFlags) for a list of flags.
|
|
2383
|
+
* @returns `true` if this entity has the given flag set.
|
|
2384
2384
|
*/
|
|
2385
2385
|
has_flag(this: void,
|
|
2386
2386
|
flag: string): boolean
|
|
@@ -2723,7 +2723,7 @@ interface LuaEntity extends LuaControl {
|
|
|
2723
2723
|
/**
|
|
2724
2724
|
* Sets the current recipe in this assembly machine.
|
|
2725
2725
|
* @remarks
|
|
2726
|
-
* Applies to subclasses:
|
|
2726
|
+
* Applies to subclasses: AssemblingMachine
|
|
2727
2727
|
*
|
|
2728
2728
|
* @param recipe - The new recipe or `nil` to clear the recipe.
|
|
2729
2729
|
* @returns Any items removed from this entity as a result of setting the recipe.
|
|
@@ -2854,7 +2854,7 @@ interface LuaEntity extends LuaControl {
|
|
|
2854
2854
|
* Applies to subclasses: Character
|
|
2855
2855
|
*
|
|
2856
2856
|
*/
|
|
2857
|
-
associated_player
|
|
2857
|
+
associated_player?: LuaPlayer
|
|
2858
2858
|
|
|
2859
2859
|
/**
|
|
2860
2860
|
* Whether this rocket silo automatically launches the rocket when cargo is inserted.
|
|
@@ -2870,7 +2870,7 @@ interface LuaEntity extends LuaControl {
|
|
|
2870
2870
|
* Applies to subclasses: SpiderVehicle
|
|
2871
2871
|
*
|
|
2872
2872
|
*/
|
|
2873
|
-
autopilot_destination
|
|
2873
|
+
autopilot_destination?: Position
|
|
2874
2874
|
|
|
2875
2875
|
/**
|
|
2876
2876
|
* The queued destination positions of spidertron's autopilot.
|
|
@@ -2886,7 +2886,7 @@ interface LuaEntity extends LuaControl {
|
|
|
2886
2886
|
* 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.
|
|
2887
2887
|
*
|
|
2888
2888
|
*/
|
|
2889
|
-
backer_name
|
|
2889
|
+
backer_name?: string
|
|
2890
2890
|
|
|
2891
2891
|
/**
|
|
2892
2892
|
* The belt connectable neighbours of this belt connectable entity. Only entities that input to or are outputs of this entity. Does not contain the other end of an underground belt, see {@link LuaEntity::neighbours | LuaEntity::neighbours} for that. This is a dictionary with `"inputs"`, `"outputs"` entries that are arrays of transport belt connectable entities, or empty tables if no entities.
|
|
@@ -2907,7 +2907,7 @@ interface LuaEntity extends LuaControl {
|
|
|
2907
2907
|
/**
|
|
2908
2908
|
* The bonus mining progress for this mining drill or `nil` if this isn't a mining drill. Read yields a number in range [0, mining_target.prototype.mineable_properties.mining_time]
|
|
2909
2909
|
*/
|
|
2910
|
-
bonus_mining_progress
|
|
2910
|
+
bonus_mining_progress?: number
|
|
2911
2911
|
|
|
2912
2912
|
/**
|
|
2913
2913
|
* The current productivity bonus progress, as a number in range [0, 1].
|
|
@@ -2925,7 +2925,7 @@ interface LuaEntity extends LuaControl {
|
|
|
2925
2925
|
/**
|
|
2926
2926
|
* The burner energy source for this entity or `nil` if there isn't one.
|
|
2927
2927
|
*/
|
|
2928
|
-
readonly burner
|
|
2928
|
+
readonly burner?: LuaBurner
|
|
2929
2929
|
|
|
2930
2930
|
/**
|
|
2931
2931
|
* The state of this chain signal.
|
|
@@ -2981,7 +2981,7 @@ interface LuaEntity extends LuaControl {
|
|
|
2981
2981
|
* Car color is overridden by the color of the current driver/passenger, if there is one.
|
|
2982
2982
|
*
|
|
2983
2983
|
*/
|
|
2984
|
-
color
|
|
2984
|
+
color?: Color
|
|
2985
2985
|
|
|
2986
2986
|
/**
|
|
2987
2987
|
* The owner of this combat robot if any.
|
|
@@ -2994,7 +2994,7 @@ interface LuaEntity extends LuaControl {
|
|
|
2994
2994
|
* Applies to subclasses: Unit
|
|
2995
2995
|
*
|
|
2996
2996
|
*/
|
|
2997
|
-
readonly command
|
|
2997
|
+
readonly command?: Command
|
|
2998
2998
|
|
|
2999
2999
|
/**
|
|
3000
3000
|
* The rail entity this train stop is connected to or `nil` if there is none.
|
|
@@ -3002,7 +3002,15 @@ interface LuaEntity extends LuaControl {
|
|
|
3002
3002
|
* Applies to subclasses: TrainStop
|
|
3003
3003
|
*
|
|
3004
3004
|
*/
|
|
3005
|
-
readonly connected_rail
|
|
3005
|
+
readonly connected_rail?: LuaEntity
|
|
3006
|
+
|
|
3007
|
+
/**
|
|
3008
|
+
* Rail direction to which this train stop is binding. This returns a value even when no rails are present.
|
|
3009
|
+
* @remarks
|
|
3010
|
+
* Applies to subclasses: TrainStop
|
|
3011
|
+
*
|
|
3012
|
+
*/
|
|
3013
|
+
readonly connected_rail_direction: defines.rail_direction
|
|
3006
3014
|
|
|
3007
3015
|
/**
|
|
3008
3016
|
* The consumption bonus of this entity.
|
|
@@ -3077,7 +3085,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3077
3085
|
* Applies to subclasses: Unit
|
|
3078
3086
|
*
|
|
3079
3087
|
*/
|
|
3080
|
-
readonly distraction_command
|
|
3088
|
+
readonly distraction_command?: Command
|
|
3081
3089
|
|
|
3082
3090
|
/**
|
|
3083
3091
|
* Whether the driver of this car or spidertron is the gunner, if false, the passenger is the gunner.
|
|
@@ -3093,12 +3101,12 @@ interface LuaEntity extends LuaControl {
|
|
|
3093
3101
|
drop_position: Position
|
|
3094
3102
|
|
|
3095
3103
|
/**
|
|
3096
|
-
* The entity this entity is putting its
|
|
3104
|
+
* The entity this entity is putting its items to, or `nil` if there is no such entity. If there are multiple possible entities at the drop-off point, writing to this attribute allows a mod to choose which one to drop off items to. The entity needs to collide with the tile box under the drop-off position.
|
|
3097
3105
|
* @remarks
|
|
3098
|
-
* Meaningful only for entities that put
|
|
3106
|
+
* Meaningful only for entities that put items somewhere, such as mining drills or inserters. Returns `nil` for any other entity.
|
|
3099
3107
|
*
|
|
3100
3108
|
*/
|
|
3101
|
-
drop_target
|
|
3109
|
+
drop_target?: LuaEntity
|
|
3102
3110
|
|
|
3103
3111
|
/**
|
|
3104
3112
|
* The current speed of this unit in tiles per tick, taking into account any walking speed modifier given by the tile the unit is standing on.
|
|
@@ -3119,7 +3127,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3119
3127
|
/**
|
|
3120
3128
|
* The effects being applied to this entity or `nil`. For beacons this is the effect the beacon is broadcasting.
|
|
3121
3129
|
*/
|
|
3122
|
-
readonly effects
|
|
3130
|
+
readonly effects?: ModuleEffects
|
|
3123
3131
|
|
|
3124
3132
|
/**
|
|
3125
3133
|
* The buffer size for the electric energy source or nil if the entity doesn't have an electric energy source.
|
|
@@ -3147,7 +3155,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3147
3155
|
/**
|
|
3148
3156
|
* Returns the id of the electric network that this entity is connected to or `nil`.
|
|
3149
3157
|
*/
|
|
3150
|
-
readonly electric_network_id
|
|
3158
|
+
readonly electric_network_id?: number
|
|
3151
3159
|
|
|
3152
3160
|
/**
|
|
3153
3161
|
* The electric network statistics for this electric pole.
|
|
@@ -3195,7 +3203,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3195
3203
|
* only usable on entities that have labels (currently only spider-vehicles).
|
|
3196
3204
|
*
|
|
3197
3205
|
*/
|
|
3198
|
-
entity_label
|
|
3206
|
+
entity_label?: string
|
|
3199
3207
|
|
|
3200
3208
|
/**
|
|
3201
3209
|
* The number of filter slots this inserter, loader, or logistic storage container has. 0 if not one of those entities.
|
|
@@ -3287,12 +3295,12 @@ interface LuaEntity extends LuaControl {
|
|
|
3287
3295
|
/**
|
|
3288
3296
|
* The graphics variation for this entity or `nil` if this entity doesn't use graphics variations.
|
|
3289
3297
|
*/
|
|
3290
|
-
graphics_variation
|
|
3298
|
+
graphics_variation?: number
|
|
3291
3299
|
|
|
3292
3300
|
/**
|
|
3293
3301
|
* The equipment grid or `nil` if this entity doesn't have an equipment grid.
|
|
3294
3302
|
*/
|
|
3295
|
-
readonly grid
|
|
3303
|
+
readonly grid?: LuaEquipmentGrid
|
|
3296
3304
|
|
|
3297
3305
|
/**
|
|
3298
3306
|
* The current health of the entity, or `nil` if it doesn't have health. Health is automatically clamped to be between `0` and max health (inclusive). Entities with a health of `0` can not be attacked.
|
|
@@ -3300,7 +3308,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3300
3308
|
* To get the maximum possible health of this entity, see {@link LuaEntityPrototype::max_health | LuaEntityPrototype::max_health} on its prototype.
|
|
3301
3309
|
*
|
|
3302
3310
|
*/
|
|
3303
|
-
health
|
|
3311
|
+
health?: number
|
|
3304
3312
|
|
|
3305
3313
|
/**
|
|
3306
3314
|
* The item stack currently held in an inserter's hand.
|
|
@@ -3357,7 +3365,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3357
3365
|
* Applies to subclasses: Inserter
|
|
3358
3366
|
*
|
|
3359
3367
|
*/
|
|
3360
|
-
inserter_filter_mode
|
|
3368
|
+
inserter_filter_mode?: string
|
|
3361
3369
|
|
|
3362
3370
|
/**
|
|
3363
3371
|
* Sets the stack size limit on this inserter. If the stack size is > than the force stack size limit the value is ignored.
|
|
@@ -3472,7 +3480,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3472
3480
|
/**
|
|
3473
3481
|
* The mining progress for this mining drill or `nil` if this isn't a mining drill. Is a number in range [0, mining_target.prototype.mineable_properties.mining_time]
|
|
3474
3482
|
*/
|
|
3475
|
-
mining_progress
|
|
3483
|
+
mining_progress?: number
|
|
3476
3484
|
|
|
3477
3485
|
/**
|
|
3478
3486
|
* The mining target or `nil` if none
|
|
@@ -3480,7 +3488,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3480
3488
|
* Applies to subclasses: MiningDrill
|
|
3481
3489
|
*
|
|
3482
3490
|
*/
|
|
3483
|
-
readonly mining_target
|
|
3491
|
+
readonly mining_target?: LuaEntity
|
|
3484
3492
|
|
|
3485
3493
|
/**
|
|
3486
3494
|
* Returns true if this unit is moving.
|
|
@@ -3509,7 +3517,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3509
3517
|
* - When called on an underground transport belt, this is the other end of the underground belt connection, or `nil` if none.
|
|
3510
3518
|
* - When called on a wall-connectable entity or reactor, this is a dictionary of all connections indexed by the connection direction "north", "south", "east", and "west".
|
|
3511
3519
|
*/
|
|
3512
|
-
readonly neighbours
|
|
3520
|
+
readonly neighbours?: {[key: string]: LuaEntity[]} | Array<LuaEntity[]> | LuaEntity
|
|
3513
3521
|
|
|
3514
3522
|
/**
|
|
3515
3523
|
* 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.
|
|
@@ -3543,12 +3551,12 @@ interface LuaEntity extends LuaControl {
|
|
|
3543
3551
|
pickup_position: Position
|
|
3544
3552
|
|
|
3545
3553
|
/**
|
|
3546
|
-
* The entity
|
|
3554
|
+
* The entity this inserter will attempt to pick up items from, or `nil` if there is no such entity. If there are multiple possible entities at the pick-up point, writing to this attribute allows a mod to choose which one to pick up items from. The entity needs to collide with the tile box under the pick-up position.
|
|
3547
3555
|
* @remarks
|
|
3548
3556
|
* Applies to subclasses: Inserter
|
|
3549
3557
|
*
|
|
3550
3558
|
*/
|
|
3551
|
-
pickup_target
|
|
3559
|
+
pickup_target?: LuaEntity
|
|
3552
3560
|
|
|
3553
3561
|
/**
|
|
3554
3562
|
* The player connected to this character or `nil` if none.
|
|
@@ -3556,7 +3564,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3556
3564
|
* Applies to subclasses: Character
|
|
3557
3565
|
*
|
|
3558
3566
|
*/
|
|
3559
|
-
readonly player
|
|
3567
|
+
readonly player?: LuaPlayer
|
|
3560
3568
|
|
|
3561
3569
|
/**
|
|
3562
3570
|
* The pollution bonus of this entity.
|
|
@@ -3616,7 +3624,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3616
3624
|
/**
|
|
3617
3625
|
* The target entity for this item-request-proxy or `nil`
|
|
3618
3626
|
*/
|
|
3619
|
-
readonly proxy_target
|
|
3627
|
+
readonly proxy_target?: LuaEntity
|
|
3620
3628
|
|
|
3621
3629
|
/**
|
|
3622
3630
|
* The rail target of this pump or `nil`.
|
|
@@ -3624,7 +3632,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3624
3632
|
* Applies to subclasses: Pump
|
|
3625
3633
|
*
|
|
3626
3634
|
*/
|
|
3627
|
-
readonly pump_rail_target
|
|
3635
|
+
readonly pump_rail_target?: LuaEntity
|
|
3628
3636
|
|
|
3629
3637
|
/**
|
|
3630
3638
|
* When locked; the recipe in this assembling machine can't be changed by the player.
|
|
@@ -3640,7 +3648,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3640
3648
|
* Writing does nothing if the vehicle doesn't have a turret.
|
|
3641
3649
|
*
|
|
3642
3650
|
*/
|
|
3643
|
-
relative_turret_orientation
|
|
3651
|
+
relative_turret_orientation?: RealOrientation
|
|
3644
3652
|
|
|
3645
3653
|
/**
|
|
3646
3654
|
* If items not included in this infinity container filters should be removed from the container.
|
|
@@ -3695,12 +3703,12 @@ interface LuaEntity extends LuaControl {
|
|
|
3695
3703
|
/**
|
|
3696
3704
|
* The secondary bounding box of this entity or `nil` if it doesn't have one.
|
|
3697
3705
|
*/
|
|
3698
|
-
readonly secondary_bounding_box
|
|
3706
|
+
readonly secondary_bounding_box?: BoundingBox
|
|
3699
3707
|
|
|
3700
3708
|
/**
|
|
3701
3709
|
* The secondary selection box of this entity or `nil` if it doesn't have one.
|
|
3702
3710
|
*/
|
|
3703
|
-
readonly secondary_selection_box
|
|
3711
|
+
readonly secondary_selection_box?: BoundingBox
|
|
3704
3712
|
|
|
3705
3713
|
/**
|
|
3706
3714
|
* Index of the currently selected weapon slot of this character, car, or spidertron, or `nil` if the car/spidertron doesn't have guns.
|
|
@@ -3708,7 +3716,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3708
3716
|
* Applies to subclasses: Character,Car
|
|
3709
3717
|
*
|
|
3710
3718
|
*/
|
|
3711
|
-
selected_gun_index
|
|
3719
|
+
selected_gun_index?: number
|
|
3712
3720
|
|
|
3713
3721
|
/**
|
|
3714
3722
|
* {@link LuaEntityPrototype::selection_box | LuaEntityPrototype::selection_box} around entity's given position and respecting the current entity orientation.
|
|
@@ -3718,12 +3726,12 @@ interface LuaEntity extends LuaControl {
|
|
|
3718
3726
|
/**
|
|
3719
3727
|
* The shooting target for this turret or `nil`.
|
|
3720
3728
|
*/
|
|
3721
|
-
shooting_target
|
|
3729
|
+
shooting_target?: LuaEntity
|
|
3722
3730
|
|
|
3723
3731
|
/**
|
|
3724
3732
|
* The state of this rail signal.
|
|
3725
3733
|
* @remarks
|
|
3726
|
-
* Applies to subclasses: RailSignal
|
|
3734
|
+
* Applies to subclasses: RailSignal,RailChainSignal
|
|
3727
3735
|
*
|
|
3728
3736
|
*/
|
|
3729
3737
|
readonly signal_state: defines.signal_state
|
|
@@ -3731,7 +3739,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3731
3739
|
/**
|
|
3732
3740
|
* The spawner associated with this unit entity or `nil` if the unit has no associated spawner.
|
|
3733
3741
|
*/
|
|
3734
|
-
readonly spawner
|
|
3742
|
+
readonly spawner?: LuaEntity
|
|
3735
3743
|
|
|
3736
3744
|
/**
|
|
3737
3745
|
* The current speed of this car in tiles per tick, rolling stock, projectile or spider vehicle, or current max speed of the unit. Only the speed of units, cars, and projectiles are writable.
|
|
@@ -3752,7 +3760,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3752
3760
|
* Applies to subclasses: Splitter
|
|
3753
3761
|
*
|
|
3754
3762
|
*/
|
|
3755
|
-
splitter_filter
|
|
3763
|
+
splitter_filter?: LuaItemPrototype
|
|
3756
3764
|
|
|
3757
3765
|
/**
|
|
3758
3766
|
* The input priority for this splitter : "left", "none", or "right".
|
|
@@ -3780,7 +3788,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3780
3788
|
/**
|
|
3781
3789
|
* The status of this entity or `nil` if no status.
|
|
3782
3790
|
*/
|
|
3783
|
-
readonly status
|
|
3791
|
+
readonly status?: defines.entity_status
|
|
3784
3792
|
|
|
3785
3793
|
/**
|
|
3786
3794
|
* The entity this sticker is sticked to.
|
|
@@ -3790,7 +3798,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3790
3798
|
/**
|
|
3791
3799
|
* The sticker entities attached to this entity or `nil` if none.
|
|
3792
3800
|
*/
|
|
3793
|
-
readonly stickers
|
|
3801
|
+
readonly stickers?: LuaEntity[]
|
|
3794
3802
|
|
|
3795
3803
|
/**
|
|
3796
3804
|
* The storage filter for this logistic storage container.
|
|
@@ -3805,12 +3813,12 @@ interface LuaEntity extends LuaControl {
|
|
|
3805
3813
|
/**
|
|
3806
3814
|
* The tags associated with this entity ghost or `nil` if not an entity ghost.
|
|
3807
3815
|
*/
|
|
3808
|
-
tags
|
|
3816
|
+
tags?: Tags
|
|
3809
3817
|
|
|
3810
3818
|
/**
|
|
3811
3819
|
* The temperature of this entities heat energy source if this entity uses a heat energy source or `nil`.
|
|
3812
3820
|
*/
|
|
3813
|
-
temperature
|
|
3821
|
+
temperature?: number
|
|
3814
3822
|
|
|
3815
3823
|
/**
|
|
3816
3824
|
* The text of this flying-text entity.
|
|
@@ -3948,7 +3956,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3948
3956
|
* Applies to subclasses: Unit
|
|
3949
3957
|
*
|
|
3950
3958
|
*/
|
|
3951
|
-
readonly unit_group
|
|
3959
|
+
readonly unit_group?: LuaUnitGroup
|
|
3952
3960
|
|
|
3953
3961
|
/**
|
|
3954
3962
|
* The unit number or nil if the entity doesn't have one. This is universally unique for every entity that has one, for the lifetime of a whole game.
|
|
@@ -3986,30 +3994,9 @@ interface LuaEntityPrototype {
|
|
|
3986
3994
|
index: defines.inventory): number
|
|
3987
3995
|
|
|
3988
3996
|
/**
|
|
3989
|
-
*
|
|
3990
|
-
* @param flag - The flag to
|
|
3991
|
-
|
|
3992
|
-
- `"placeable-neutral"`
|
|
3993
|
-
- `"placeable-player"`
|
|
3994
|
-
- `"placeable-enemy"`
|
|
3995
|
-
- `"placeable-off-grid"`
|
|
3996
|
-
- `"player-creation"`
|
|
3997
|
-
- `"building-direction-8-way"`
|
|
3998
|
-
- `"filter-directions"`
|
|
3999
|
-
- `"fast-replaceable-no-build-while-moving"`
|
|
4000
|
-
- `"breaths-air"`
|
|
4001
|
-
- `"not-repairable"`
|
|
4002
|
-
- `"not-on-map"`
|
|
4003
|
-
- `"not-deconstructable"`
|
|
4004
|
-
- `"not-blueprintable"`
|
|
4005
|
-
- `"hide-from-bonus-gui"`
|
|
4006
|
-
- `"hide-alt-info"`
|
|
4007
|
-
- `"fast-replaceable-no-cross-type-while-moving"`
|
|
4008
|
-
- `"no-gap-fill-while-building"`
|
|
4009
|
-
- `"not-flammable"`
|
|
4010
|
-
- `"no-automated-item-removal"`
|
|
4011
|
-
- `"no-automated-item-insertion"`
|
|
4012
|
-
- `"not-upgradable"`
|
|
3997
|
+
* Test whether this entity prototype has a certain flag set.
|
|
3998
|
+
* @param flag - The flag to test. See [EntityPrototypeFlags](EntityPrototypeFlags) for a list of flags.
|
|
3999
|
+
* @returns `true` if this prototype has the given flag set.
|
|
4013
4000
|
*/
|
|
4014
4001
|
has_flag(this: void,
|
|
4015
4002
|
flag: string): boolean
|
|
@@ -4051,12 +4038,12 @@ interface LuaEntityPrototype {
|
|
|
4051
4038
|
/**
|
|
4052
4039
|
* Whether this unit prototype is affected by tile walking speed modifiers or `nil`.
|
|
4053
4040
|
*/
|
|
4054
|
-
readonly affected_by_tiles
|
|
4041
|
+
readonly affected_by_tiles?: boolean
|
|
4055
4042
|
|
|
4056
4043
|
/**
|
|
4057
4044
|
* The air resistance of this rolling stock prototype or `nil` if not a rolling stock prototype.
|
|
4058
4045
|
*/
|
|
4059
|
-
readonly air_resistance
|
|
4046
|
+
readonly air_resistance?: number
|
|
4060
4047
|
|
|
4061
4048
|
/**
|
|
4062
4049
|
* The alert icon shift of this entity prototype.
|
|
@@ -4066,12 +4053,12 @@ interface LuaEntityPrototype {
|
|
|
4066
4053
|
/**
|
|
4067
4054
|
* Does this turret prototype alert when attacking? or `nil` if not turret prototype.
|
|
4068
4055
|
*/
|
|
4069
|
-
readonly alert_when_attacking
|
|
4056
|
+
readonly alert_when_attacking?: boolean
|
|
4070
4057
|
|
|
4071
4058
|
/**
|
|
4072
4059
|
* Does this entity with health prototype alert when damaged? or `nil` if not entity with health prototype.
|
|
4073
4060
|
*/
|
|
4074
|
-
readonly alert_when_damaged
|
|
4061
|
+
readonly alert_when_damaged?: boolean
|
|
4075
4062
|
|
|
4076
4063
|
/**
|
|
4077
4064
|
* If this market allows access to all forces or just friendly ones.
|
|
@@ -4101,17 +4088,17 @@ interface LuaEntityPrototype {
|
|
|
4101
4088
|
/**
|
|
4102
4089
|
* The allowed module effects for this entity or `nil`.
|
|
4103
4090
|
*/
|
|
4104
|
-
readonly allowed_effects
|
|
4091
|
+
readonly allowed_effects?: {[key: string]: boolean}
|
|
4105
4092
|
|
|
4106
4093
|
/**
|
|
4107
4094
|
* Whether the lamp is always on (except when out of power or turned off by the circuit network) or `nil`.
|
|
4108
4095
|
*/
|
|
4109
|
-
readonly always_on
|
|
4096
|
+
readonly always_on?: boolean
|
|
4110
4097
|
|
|
4111
4098
|
/**
|
|
4112
4099
|
* The attack parameters for this entity or `nil` if the entity doesn't use attack parameters.
|
|
4113
4100
|
*/
|
|
4114
|
-
readonly attack_parameters
|
|
4101
|
+
readonly attack_parameters?: AttackParameters
|
|
4115
4102
|
|
|
4116
4103
|
/**
|
|
4117
4104
|
* The attack result of this entity if the entity has one, else `nil`.
|
|
@@ -4121,7 +4108,7 @@ interface LuaEntityPrototype {
|
|
|
4121
4108
|
/**
|
|
4122
4109
|
* The amount of ammo that inserters automatically insert into this ammo-turret or artillery-turret or `nil`.
|
|
4123
4110
|
*/
|
|
4124
|
-
readonly automated_ammo_count
|
|
4111
|
+
readonly automated_ammo_count?: number
|
|
4125
4112
|
|
|
4126
4113
|
/**
|
|
4127
4114
|
* Autoplace specification for this entity prototype. `nil` if none.
|
|
@@ -4131,7 +4118,7 @@ interface LuaEntityPrototype {
|
|
|
4131
4118
|
/**
|
|
4132
4119
|
* The base productivity of this crafting machine, lab, or mining drill, or `nil`.
|
|
4133
4120
|
*/
|
|
4134
|
-
readonly base_productivity
|
|
4121
|
+
readonly base_productivity?: number
|
|
4135
4122
|
|
|
4136
4123
|
/**
|
|
4137
4124
|
* @remarks
|
|
@@ -4150,12 +4137,12 @@ interface LuaEntityPrototype {
|
|
|
4150
4137
|
/**
|
|
4151
4138
|
* The speed of this transport belt or `nil` if this isn't a transport belt related prototype.
|
|
4152
4139
|
*/
|
|
4153
|
-
readonly belt_speed
|
|
4140
|
+
readonly belt_speed?: number
|
|
4154
4141
|
|
|
4155
4142
|
/**
|
|
4156
4143
|
* The braking force of this vehicle prototype or `nil` if not a vehicle prototype.
|
|
4157
4144
|
*/
|
|
4158
|
-
readonly braking_force
|
|
4145
|
+
readonly braking_force?: number
|
|
4159
4146
|
|
|
4160
4147
|
/**
|
|
4161
4148
|
* The evolution requirement to build this entity as a base when expanding enemy bases.
|
|
@@ -4177,14 +4164,14 @@ interface LuaEntityPrototype {
|
|
|
4177
4164
|
/**
|
|
4178
4165
|
* The burner energy source prototype this entity uses or `nil`.
|
|
4179
4166
|
*/
|
|
4180
|
-
readonly burner_prototype
|
|
4167
|
+
readonly burner_prototype?: LuaBurnerPrototype
|
|
4181
4168
|
|
|
4182
4169
|
readonly call_for_help_radius: number
|
|
4183
4170
|
|
|
4184
4171
|
/**
|
|
4185
4172
|
* Whether this unit prototype can open gates or `nil`.
|
|
4186
4173
|
*/
|
|
4187
|
-
readonly can_open_gates
|
|
4174
|
+
readonly can_open_gates?: boolean
|
|
4188
4175
|
|
|
4189
4176
|
/**
|
|
4190
4177
|
* The collision mask used only for collision test with tile directly at offshore pump position.
|
|
@@ -4204,7 +4191,7 @@ interface LuaEntityPrototype {
|
|
|
4204
4191
|
/**
|
|
4205
4192
|
* The item prototype name used to destroy this cliff or `nil`.
|
|
4206
4193
|
*/
|
|
4207
|
-
readonly cliff_explosive_prototype
|
|
4194
|
+
readonly cliff_explosive_prototype?: string
|
|
4208
4195
|
|
|
4209
4196
|
/**
|
|
4210
4197
|
* The bounding box used for collision checking.
|
|
@@ -4236,17 +4223,17 @@ interface LuaEntityPrototype {
|
|
|
4236
4223
|
/**
|
|
4237
4224
|
* The color of the prototype, or `nil` if the prototype doesn't have color.
|
|
4238
4225
|
*/
|
|
4239
|
-
readonly color
|
|
4226
|
+
readonly color?: Color
|
|
4240
4227
|
|
|
4241
4228
|
/**
|
|
4242
4229
|
* The construction radius for this roboport prototype or `nil`.
|
|
4243
4230
|
*/
|
|
4244
|
-
readonly construction_radius
|
|
4231
|
+
readonly construction_radius?: number
|
|
4245
4232
|
|
|
4246
4233
|
/**
|
|
4247
4234
|
* The energy consumption of this car prototype or `nil` if not a car prototype.
|
|
4248
4235
|
*/
|
|
4249
|
-
readonly consumption
|
|
4236
|
+
readonly consumption?: number
|
|
4250
4237
|
|
|
4251
4238
|
/**
|
|
4252
4239
|
* @remarks
|
|
@@ -4276,7 +4263,7 @@ interface LuaEntityPrototype {
|
|
|
4276
4263
|
/**
|
|
4277
4264
|
* The crafting speed of this crafting-machine or `nil`.
|
|
4278
4265
|
*/
|
|
4279
|
-
readonly crafting_speed
|
|
4266
|
+
readonly crafting_speed?: number
|
|
4280
4267
|
|
|
4281
4268
|
/**
|
|
4282
4269
|
* If this prototype will attempt to create a ghost of itself on death.
|
|
@@ -4289,12 +4276,12 @@ interface LuaEntityPrototype {
|
|
|
4289
4276
|
/**
|
|
4290
4277
|
* The trigger run when this entity is created or `nil`.
|
|
4291
4278
|
*/
|
|
4292
|
-
readonly created_effect
|
|
4279
|
+
readonly created_effect?: TriggerItem[]
|
|
4293
4280
|
|
|
4294
4281
|
/**
|
|
4295
4282
|
* The smoke trigger run when this entity is built or `nil`.
|
|
4296
4283
|
*/
|
|
4297
|
-
readonly created_smoke
|
|
4284
|
+
readonly created_smoke?: { initial_height: number, max_radius?: number, offset_deviation: BoundingBox, offsets: Vector[], smoke_name: string, speed: Vector, speed_from_center: number, speed_from_center_deviation: number, speed_multiplier: number, speed_multiplier_deviation: number, starting_frame: number, starting_frame_deviation: number, starting_frame_speed: number, starting_frame_speed_deviation: number }
|
|
4298
4285
|
|
|
4299
4286
|
/**
|
|
4300
4287
|
* @remarks
|
|
@@ -4306,12 +4293,12 @@ interface LuaEntityPrototype {
|
|
|
4306
4293
|
/**
|
|
4307
4294
|
* Value between 0 and 1 darkness where all lamps of this lamp prototype are off or `nil`.
|
|
4308
4295
|
*/
|
|
4309
|
-
readonly darkness_for_all_lamps_off
|
|
4296
|
+
readonly darkness_for_all_lamps_off?: number
|
|
4310
4297
|
|
|
4311
4298
|
/**
|
|
4312
4299
|
* Value between 0 and 1 darkness where all lamps of this lamp prototype are on or `nil`.
|
|
4313
4300
|
*/
|
|
4314
|
-
readonly darkness_for_all_lamps_on
|
|
4301
|
+
readonly darkness_for_all_lamps_on?: number
|
|
4315
4302
|
|
|
4316
4303
|
/**
|
|
4317
4304
|
* The hardcoded default collision mask (with flags) for this entity prototype type.
|
|
@@ -4321,22 +4308,22 @@ interface LuaEntityPrototype {
|
|
|
4321
4308
|
/**
|
|
4322
4309
|
* The distraction cooldown of this unit prototype or `nil`.
|
|
4323
4310
|
*/
|
|
4324
|
-
readonly distraction_cooldown
|
|
4311
|
+
readonly distraction_cooldown?: number
|
|
4325
4312
|
|
|
4326
4313
|
/**
|
|
4327
4314
|
* The distribution effectivity for this beacon prototype or `nil` if not a beacon prototype.
|
|
4328
4315
|
*/
|
|
4329
|
-
readonly distribution_effectivity
|
|
4316
|
+
readonly distribution_effectivity?: number
|
|
4330
4317
|
|
|
4331
4318
|
/**
|
|
4332
4319
|
* The door opening speed for this rocket silo prototype or `nil`.
|
|
4333
4320
|
*/
|
|
4334
|
-
readonly door_opening_speed
|
|
4321
|
+
readonly door_opening_speed?: number
|
|
4335
4322
|
|
|
4336
4323
|
/**
|
|
4337
4324
|
* Whether this logistics or construction robot renders its cargo when flying or `nil`.
|
|
4338
4325
|
*/
|
|
4339
|
-
readonly draw_cargo
|
|
4326
|
+
readonly draw_cargo?: boolean
|
|
4340
4327
|
|
|
4341
4328
|
/**
|
|
4342
4329
|
* The bounding box used for drawing the entity icon.
|
|
@@ -4353,12 +4340,12 @@ interface LuaEntityPrototype {
|
|
|
4353
4340
|
/**
|
|
4354
4341
|
* The effectivity of this car prototype, generator prototype or `nil`.
|
|
4355
4342
|
*/
|
|
4356
|
-
readonly effectivity
|
|
4343
|
+
readonly effectivity?: number
|
|
4357
4344
|
|
|
4358
4345
|
/**
|
|
4359
4346
|
* The electric energy source prototype this entity uses or `nil`.
|
|
4360
4347
|
*/
|
|
4361
|
-
readonly electric_energy_source_prototype
|
|
4348
|
+
readonly electric_energy_source_prototype?: LuaElectricEnergySourcePrototype
|
|
4362
4349
|
|
|
4363
4350
|
/**
|
|
4364
4351
|
* Amount of pollution emissions per second this entity will create.
|
|
@@ -4373,27 +4360,27 @@ interface LuaEntityPrototype {
|
|
|
4373
4360
|
/**
|
|
4374
4361
|
* The energy used per hitpoint taken for this vehicle during collisions or `nil`.
|
|
4375
4362
|
*/
|
|
4376
|
-
readonly energy_per_hit_point
|
|
4363
|
+
readonly energy_per_hit_point?: number
|
|
4377
4364
|
|
|
4378
4365
|
/**
|
|
4379
4366
|
* The energy consumed per tile moved for this flying robot or `nil`.
|
|
4380
4367
|
*/
|
|
4381
|
-
readonly energy_per_move
|
|
4368
|
+
readonly energy_per_move?: number
|
|
4382
4369
|
|
|
4383
4370
|
/**
|
|
4384
4371
|
* The energy consumed per tick for this flying robot or `nil`.
|
|
4385
4372
|
*/
|
|
4386
|
-
readonly energy_per_tick
|
|
4373
|
+
readonly energy_per_tick?: number
|
|
4387
4374
|
|
|
4388
4375
|
/**
|
|
4389
4376
|
* The direct energy usage of this entity or `nil` if this entity doesn't have a direct energy usage.
|
|
4390
4377
|
*/
|
|
4391
|
-
readonly energy_usage
|
|
4378
|
+
readonly energy_usage?: number
|
|
4392
4379
|
|
|
4393
4380
|
/**
|
|
4394
4381
|
* The engine starting speed for this rocket silo rocket prototype or `nil`.
|
|
4395
4382
|
*/
|
|
4396
|
-
readonly engine_starting_speed
|
|
4383
|
+
readonly engine_starting_speed?: number
|
|
4397
4384
|
|
|
4398
4385
|
/**
|
|
4399
4386
|
* @remarks
|
|
@@ -4405,12 +4392,12 @@ interface LuaEntityPrototype {
|
|
|
4405
4392
|
/**
|
|
4406
4393
|
* Does this explosion have a beam or `nil` if not an explosion prototype.
|
|
4407
4394
|
*/
|
|
4408
|
-
readonly explosion_beam
|
|
4395
|
+
readonly explosion_beam?: number
|
|
4409
4396
|
|
|
4410
4397
|
/**
|
|
4411
4398
|
* Does this explosion rotate or `nil` if not an explosion prototype.
|
|
4412
4399
|
*/
|
|
4413
|
-
readonly explosion_rotate
|
|
4400
|
+
readonly explosion_rotate?: number
|
|
4414
4401
|
|
|
4415
4402
|
/**
|
|
4416
4403
|
* The group of mutually fast-replaceable entities. Possibly `nil`.
|
|
@@ -4420,7 +4407,7 @@ interface LuaEntityPrototype {
|
|
|
4420
4407
|
/**
|
|
4421
4408
|
* The filter count of this inserter, loader, or logistic chest or `nil`. For logistic containers, `nil` means no limit.
|
|
4422
4409
|
*/
|
|
4423
|
-
readonly filter_count
|
|
4410
|
+
readonly filter_count?: number
|
|
4424
4411
|
|
|
4425
4412
|
/**
|
|
4426
4413
|
* The final attack result for projectiles `nil` if not a projectile
|
|
@@ -4430,17 +4417,17 @@ interface LuaEntityPrototype {
|
|
|
4430
4417
|
/**
|
|
4431
4418
|
* The fixed recipe name for this assembling machine prototype or `nil`.
|
|
4432
4419
|
*/
|
|
4433
|
-
readonly fixed_recipe
|
|
4420
|
+
readonly fixed_recipe?: string
|
|
4434
4421
|
|
|
4435
4422
|
/**
|
|
4436
|
-
* The
|
|
4423
|
+
* The flags for this entity prototype.
|
|
4437
4424
|
*/
|
|
4438
4425
|
readonly flags: EntityPrototypeFlags
|
|
4439
4426
|
|
|
4440
4427
|
/**
|
|
4441
4428
|
* The fluid this offshore pump produces or `nil`.
|
|
4442
4429
|
*/
|
|
4443
|
-
readonly fluid
|
|
4430
|
+
readonly fluid?: LuaFluidPrototype
|
|
4444
4431
|
|
|
4445
4432
|
/**
|
|
4446
4433
|
* The fluid capacity of this entity or 0 if this entity doesn't support fluids.
|
|
@@ -4453,12 +4440,12 @@ interface LuaEntityPrototype {
|
|
|
4453
4440
|
/**
|
|
4454
4441
|
* The fluid energy source prototype this entity uses or `nil`.
|
|
4455
4442
|
*/
|
|
4456
|
-
readonly fluid_energy_source_prototype
|
|
4443
|
+
readonly fluid_energy_source_prototype?: LuaFluidEnergySourcePrototype
|
|
4457
4444
|
|
|
4458
4445
|
/**
|
|
4459
4446
|
* The fluid usage of this generator prototype or `nil`.
|
|
4460
4447
|
*/
|
|
4461
|
-
readonly fluid_usage_per_tick
|
|
4448
|
+
readonly fluid_usage_per_tick?: number
|
|
4462
4449
|
|
|
4463
4450
|
/**
|
|
4464
4451
|
* The fluidbox prototypes for this entity.
|
|
@@ -4468,17 +4455,17 @@ interface LuaEntityPrototype {
|
|
|
4468
4455
|
/**
|
|
4469
4456
|
* The flying acceleration for this rocket silo rocket prototype or `nil`.
|
|
4470
4457
|
*/
|
|
4471
|
-
readonly flying_acceleration
|
|
4458
|
+
readonly flying_acceleration?: number
|
|
4472
4459
|
|
|
4473
4460
|
/**
|
|
4474
4461
|
* The flying speed for this rocket silo rocket prototype or `nil`.
|
|
4475
4462
|
*/
|
|
4476
|
-
readonly flying_speed
|
|
4463
|
+
readonly flying_speed?: number
|
|
4477
4464
|
|
|
4478
4465
|
/**
|
|
4479
4466
|
* The friction of this vehicle prototype or `nil` if not a vehicle prototype.
|
|
4480
4467
|
*/
|
|
4481
|
-
readonly friction_force
|
|
4468
|
+
readonly friction_force?: number
|
|
4482
4469
|
|
|
4483
4470
|
/**
|
|
4484
4471
|
* The friendly map color used when charting this entity.
|
|
@@ -4488,7 +4475,7 @@ interface LuaEntityPrototype {
|
|
|
4488
4475
|
/**
|
|
4489
4476
|
* The equipment grid prototype for this entity or `nil`.
|
|
4490
4477
|
*/
|
|
4491
|
-
readonly grid_prototype
|
|
4478
|
+
readonly grid_prototype?: LuaEquipmentGridPrototype
|
|
4492
4479
|
|
|
4493
4480
|
/**
|
|
4494
4481
|
* Group of this entity.
|
|
@@ -4498,7 +4485,7 @@ interface LuaEntityPrototype {
|
|
|
4498
4485
|
/**
|
|
4499
4486
|
* The guns this prototype uses or `nil`.
|
|
4500
4487
|
*/
|
|
4501
|
-
readonly guns
|
|
4488
|
+
readonly guns?: {[key: string]: LuaItemPrototype}
|
|
4502
4489
|
|
|
4503
4490
|
/**
|
|
4504
4491
|
* Whether this unit, car, or character prototype has belt immunity, `nil` if not car, unit, or character prototype.
|
|
@@ -4513,7 +4500,7 @@ interface LuaEntityPrototype {
|
|
|
4513
4500
|
/**
|
|
4514
4501
|
* The heat energy source prototype this entity uses or `nil`.
|
|
4515
4502
|
*/
|
|
4516
|
-
readonly heat_energy_source_prototype
|
|
4503
|
+
readonly heat_energy_source_prototype?: LuaHeatEnergySourcePrototype
|
|
4517
4504
|
|
|
4518
4505
|
/**
|
|
4519
4506
|
* Every time this infinite resource 'ticks' down it is reduced by this amount. `nil` when not a resource. Meaningless if this isn't an infinite type resource.
|
|
@@ -4528,37 +4515,42 @@ interface LuaEntityPrototype {
|
|
|
4528
4515
|
/**
|
|
4529
4516
|
* The max number of ingredients this crafting-machine prototype supports or `nil` if this isn't a crafting-machine prototype.
|
|
4530
4517
|
*/
|
|
4531
|
-
readonly ingredient_count
|
|
4518
|
+
readonly ingredient_count?: number
|
|
4532
4519
|
|
|
4533
4520
|
/**
|
|
4534
4521
|
* True if this inserter chases items on belts for pickup or `nil`.
|
|
4535
4522
|
*/
|
|
4536
|
-
readonly inserter_chases_belt_items
|
|
4523
|
+
readonly inserter_chases_belt_items?: boolean
|
|
4537
4524
|
|
|
4538
4525
|
/**
|
|
4539
4526
|
* The drop position for this inserter or `nil`.
|
|
4540
4527
|
*/
|
|
4541
|
-
readonly inserter_drop_position
|
|
4528
|
+
readonly inserter_drop_position?: Vector
|
|
4542
4529
|
|
|
4543
4530
|
/**
|
|
4544
4531
|
* The extension speed of this inserter or `nil`.
|
|
4545
4532
|
*/
|
|
4546
|
-
readonly inserter_extension_speed
|
|
4533
|
+
readonly inserter_extension_speed?: number
|
|
4547
4534
|
|
|
4548
4535
|
/**
|
|
4549
4536
|
* The pickup position for this inserter or `nil`.
|
|
4550
4537
|
*/
|
|
4551
|
-
readonly inserter_pickup_position
|
|
4538
|
+
readonly inserter_pickup_position?: Vector
|
|
4552
4539
|
|
|
4553
4540
|
/**
|
|
4554
4541
|
* The rotation speed of this inserter or `nil`.
|
|
4555
4542
|
*/
|
|
4556
|
-
readonly inserter_rotation_speed
|
|
4543
|
+
readonly inserter_rotation_speed?: number
|
|
4544
|
+
|
|
4545
|
+
/**
|
|
4546
|
+
* Gets the current stack size bonus of this entity, returns nil if not an inserter.
|
|
4547
|
+
*/
|
|
4548
|
+
readonly inserter_stack_size_bonus: number
|
|
4557
4549
|
|
|
4558
4550
|
/**
|
|
4559
4551
|
* The instruments for this programmable speaker or `nil`.
|
|
4560
4552
|
*/
|
|
4561
|
-
readonly instruments
|
|
4553
|
+
readonly instruments?: ProgrammableSpeakerInstrument[]
|
|
4562
4554
|
|
|
4563
4555
|
readonly is_building: boolean
|
|
4564
4556
|
|
|
@@ -4572,27 +4564,27 @@ interface LuaEntityPrototype {
|
|
|
4572
4564
|
/**
|
|
4573
4565
|
* The item slot count of this constant combinator prototype or `nil`.
|
|
4574
4566
|
*/
|
|
4575
|
-
readonly item_slot_count
|
|
4567
|
+
readonly item_slot_count?: number
|
|
4576
4568
|
|
|
4577
4569
|
/**
|
|
4578
4570
|
* Items that, when placed, will produce this entity. It is an array of items, or `nil` if no items place this entity. Construction bots will always choose the first item in this list to build this entity.
|
|
4579
4571
|
*/
|
|
4580
|
-
readonly items_to_place_this
|
|
4572
|
+
readonly items_to_place_this?: SimpleItemStack[]
|
|
4581
4573
|
|
|
4582
4574
|
/**
|
|
4583
4575
|
* The item prototype names that are the inputs of this lab prototype or `nil`.
|
|
4584
4576
|
*/
|
|
4585
|
-
readonly lab_inputs
|
|
4577
|
+
readonly lab_inputs?: string[]
|
|
4586
4578
|
|
|
4587
4579
|
/**
|
|
4588
4580
|
* The rocket launch delay for this rocket silo prototype or `nil`.
|
|
4589
4581
|
*/
|
|
4590
|
-
readonly launch_wait_time
|
|
4582
|
+
readonly launch_wait_time?: number
|
|
4591
4583
|
|
|
4592
4584
|
/**
|
|
4593
4585
|
* The light blinking speed for this rocket silo prototype or `nil`.
|
|
4594
4586
|
*/
|
|
4595
|
-
readonly light_blinking_speed
|
|
4587
|
+
readonly light_blinking_speed?: number
|
|
4596
4588
|
|
|
4597
4589
|
readonly localised_description: LocalisedString
|
|
4598
4590
|
|
|
@@ -4601,12 +4593,12 @@ interface LuaEntityPrototype {
|
|
|
4601
4593
|
/**
|
|
4602
4594
|
* The logistic mode of this logistic container or `nil` if this isn't a logistic container prototype. One of `"requester"`, `"active-provider"`, `"passive-provider"`, `"buffer"`, `"storage"`, `"none"`.
|
|
4603
4595
|
*/
|
|
4604
|
-
readonly logistic_mode
|
|
4596
|
+
readonly logistic_mode?: string
|
|
4605
4597
|
|
|
4606
4598
|
/**
|
|
4607
4599
|
* The logistic radius for this roboport prototype or `nil`.
|
|
4608
4600
|
*/
|
|
4609
|
-
readonly logistic_radius
|
|
4601
|
+
readonly logistic_radius?: number
|
|
4610
4602
|
|
|
4611
4603
|
/**
|
|
4612
4604
|
* Loot that will be dropped when this entity is killed. `nil` if there is no loot.
|
|
@@ -4623,7 +4615,7 @@ interface LuaEntityPrototype {
|
|
|
4623
4615
|
/**
|
|
4624
4616
|
* The map color used when charting this entity if a friendly or enemy color isn't defined or `nil`.
|
|
4625
4617
|
*/
|
|
4626
|
-
readonly map_color
|
|
4618
|
+
readonly map_color?: Color
|
|
4627
4619
|
|
|
4628
4620
|
/**
|
|
4629
4621
|
* The bounding box used for map generator collision checking.
|
|
@@ -4658,7 +4650,7 @@ interface LuaEntityPrototype {
|
|
|
4658
4650
|
/**
|
|
4659
4651
|
* The max energy for this flying robot or `nil`.
|
|
4660
4652
|
*/
|
|
4661
|
-
readonly max_energy
|
|
4653
|
+
readonly max_energy?: number
|
|
4662
4654
|
|
|
4663
4655
|
/**
|
|
4664
4656
|
* The theoretical maximum energy production for this this entity.
|
|
@@ -4683,32 +4675,32 @@ interface LuaEntityPrototype {
|
|
|
4683
4675
|
/**
|
|
4684
4676
|
* The max payload size of this logistics or construction robot or `nil`.
|
|
4685
4677
|
*/
|
|
4686
|
-
readonly max_payload_size
|
|
4678
|
+
readonly max_payload_size?: number
|
|
4687
4679
|
|
|
4688
4680
|
/**
|
|
4689
4681
|
* The maximum polyphony for this programmable speaker or `nil`.
|
|
4690
4682
|
*/
|
|
4691
|
-
readonly max_polyphony
|
|
4683
|
+
readonly max_polyphony?: number
|
|
4692
4684
|
|
|
4693
4685
|
/**
|
|
4694
4686
|
* The maximum pursue distance of this unit prototype or `nil`.
|
|
4695
4687
|
*/
|
|
4696
|
-
readonly max_pursue_distance
|
|
4688
|
+
readonly max_pursue_distance?: number
|
|
4697
4689
|
|
|
4698
4690
|
/**
|
|
4699
4691
|
* The max speed of this projectile prototype or flying robot prototype or `nil`.
|
|
4700
4692
|
*/
|
|
4701
|
-
readonly max_speed
|
|
4693
|
+
readonly max_speed?: number
|
|
4702
4694
|
|
|
4703
4695
|
/**
|
|
4704
4696
|
* The maximum energy for this flying robot above which it won't try to recharge when stationing or `nil`.
|
|
4705
4697
|
*/
|
|
4706
|
-
readonly max_to_charge
|
|
4698
|
+
readonly max_to_charge?: number
|
|
4707
4699
|
|
|
4708
4700
|
/**
|
|
4709
4701
|
* The max underground distance for underground belts and underground pipes or `nil` if this isn't one of those prototypes.
|
|
4710
4702
|
*/
|
|
4711
|
-
readonly max_underground_distance
|
|
4703
|
+
readonly max_underground_distance?: number
|
|
4712
4704
|
|
|
4713
4705
|
/**
|
|
4714
4706
|
* The maximum wire distance for this entity. 0 when the entity doesn't support wires.
|
|
@@ -4725,7 +4717,7 @@ interface LuaEntityPrototype {
|
|
|
4725
4717
|
/**
|
|
4726
4718
|
* The maximum fluid temperature of this generator prototype or `nil`.
|
|
4727
4719
|
*/
|
|
4728
|
-
readonly maximum_temperature
|
|
4720
|
+
readonly maximum_temperature?: number
|
|
4729
4721
|
|
|
4730
4722
|
/**
|
|
4731
4723
|
* The minimum darkness at which this unit spawner can spawn entities.
|
|
@@ -4735,12 +4727,12 @@ interface LuaEntityPrototype {
|
|
|
4735
4727
|
/**
|
|
4736
4728
|
* The minimum pursue time of this unit prototype or `nil`.
|
|
4737
4729
|
*/
|
|
4738
|
-
readonly min_pursue_time
|
|
4730
|
+
readonly min_pursue_time?: number
|
|
4739
4731
|
|
|
4740
4732
|
/**
|
|
4741
4733
|
* The minimum energy for this flying robot before it tries to recharge or `nil`.
|
|
4742
4734
|
*/
|
|
4743
|
-
readonly min_to_charge
|
|
4735
|
+
readonly min_to_charge?: number
|
|
4744
4736
|
|
|
4745
4737
|
/**
|
|
4746
4738
|
* Whether this entity is minable and what can be obtained by mining it.
|
|
@@ -4755,22 +4747,22 @@ interface LuaEntityPrototype {
|
|
|
4755
4747
|
/**
|
|
4756
4748
|
* The mining radius of this mining drill prototype or `nil` if this isn't a mining drill prototype.
|
|
4757
4749
|
*/
|
|
4758
|
-
readonly mining_drill_radius
|
|
4750
|
+
readonly mining_drill_radius?: number
|
|
4759
4751
|
|
|
4760
4752
|
/**
|
|
4761
4753
|
* The mining speed of this mining drill/character prototype or `nil`.
|
|
4762
4754
|
*/
|
|
4763
|
-
readonly mining_speed
|
|
4755
|
+
readonly mining_speed?: number
|
|
4764
4756
|
|
|
4765
4757
|
/**
|
|
4766
4758
|
* The module inventory size or `nil` if this entity doesn't support modules.
|
|
4767
4759
|
*/
|
|
4768
|
-
readonly module_inventory_size
|
|
4760
|
+
readonly module_inventory_size?: number
|
|
4769
4761
|
|
|
4770
4762
|
/**
|
|
4771
4763
|
* Whether this unit prototype can move while shooting or `nil`.
|
|
4772
4764
|
*/
|
|
4773
|
-
readonly move_while_shooting
|
|
4765
|
+
readonly move_while_shooting?: boolean
|
|
4774
4766
|
|
|
4775
4767
|
/**
|
|
4776
4768
|
* Name of this prototype.
|
|
@@ -4795,7 +4787,7 @@ interface LuaEntityPrototype {
|
|
|
4795
4787
|
/**
|
|
4796
4788
|
* The next upgrade for this entity or `nil`.
|
|
4797
4789
|
*/
|
|
4798
|
-
readonly next_upgrade
|
|
4790
|
+
readonly next_upgrade?: LuaEntityPrototype
|
|
4799
4791
|
|
|
4800
4792
|
/**
|
|
4801
4793
|
* The normal amount for this resource. `nil` when not a resource.
|
|
@@ -4820,12 +4812,12 @@ interface LuaEntityPrototype {
|
|
|
4820
4812
|
/**
|
|
4821
4813
|
* The pumping speed of this offshore pump, normal pump, or `nil`.
|
|
4822
4814
|
*/
|
|
4823
|
-
readonly pumping_speed
|
|
4815
|
+
readonly pumping_speed?: number
|
|
4824
4816
|
|
|
4825
4817
|
/**
|
|
4826
4818
|
* The radar range of this unit prototype or `nil`.
|
|
4827
4819
|
*/
|
|
4828
|
-
readonly radar_range
|
|
4820
|
+
readonly radar_range?: number
|
|
4829
4821
|
|
|
4830
4822
|
/**
|
|
4831
4823
|
* The radius of this entity prototype.
|
|
@@ -4868,7 +4860,7 @@ interface LuaEntityPrototype {
|
|
|
4868
4860
|
/**
|
|
4869
4861
|
* The base researching speed of this lab prototype or `nil`.
|
|
4870
4862
|
*/
|
|
4871
|
-
readonly researching_speed
|
|
4863
|
+
readonly researching_speed?: number
|
|
4872
4864
|
|
|
4873
4865
|
/**
|
|
4874
4866
|
* List of resistances towards each damage type. It is a dictionary indexed by damage type names (see `data/base/prototypes/damage-type.lua`).
|
|
@@ -4881,7 +4873,7 @@ interface LuaEntityPrototype {
|
|
|
4881
4873
|
* The value in the dictionary is meaningless and exists just to allow the dictionary type for easy lookup.
|
|
4882
4874
|
*
|
|
4883
4875
|
*/
|
|
4884
|
-
readonly resource_categories
|
|
4876
|
+
readonly resource_categories?: {[key: string]: boolean}
|
|
4885
4877
|
|
|
4886
4878
|
/**
|
|
4887
4879
|
* Name of the category of this resource or `nil` when not a resource.
|
|
@@ -4889,7 +4881,7 @@ interface LuaEntityPrototype {
|
|
|
4889
4881
|
* During data stage this property is named "category".
|
|
4890
4882
|
*
|
|
4891
4883
|
*/
|
|
4892
|
-
readonly resource_category
|
|
4884
|
+
readonly resource_category?: string
|
|
4893
4885
|
|
|
4894
4886
|
/**
|
|
4895
4887
|
* @remarks
|
|
@@ -4906,27 +4898,27 @@ interface LuaEntityPrototype {
|
|
|
4906
4898
|
/**
|
|
4907
4899
|
* The rising speed for this rocket silo rocket prototype or `nil`.
|
|
4908
4900
|
*/
|
|
4909
|
-
readonly rising_speed
|
|
4901
|
+
readonly rising_speed?: number
|
|
4910
4902
|
|
|
4911
4903
|
/**
|
|
4912
4904
|
* The rocket entity prototype associated with this rocket silo prototype or `nil`.
|
|
4913
4905
|
*/
|
|
4914
|
-
readonly rocket_entity_prototype
|
|
4906
|
+
readonly rocket_entity_prototype?: LuaEntityPrototype
|
|
4915
4907
|
|
|
4916
4908
|
/**
|
|
4917
4909
|
* The rocket parts required for this rocket silo prototype or `nil`.
|
|
4918
4910
|
*/
|
|
4919
|
-
readonly rocket_parts_required
|
|
4911
|
+
readonly rocket_parts_required?: number
|
|
4920
4912
|
|
|
4921
4913
|
/**
|
|
4922
4914
|
* The rocket rising delay for this rocket silo prototype or `nil`.
|
|
4923
4915
|
*/
|
|
4924
|
-
readonly rocket_rising_delay
|
|
4916
|
+
readonly rocket_rising_delay?: number
|
|
4925
4917
|
|
|
4926
4918
|
/**
|
|
4927
4919
|
* The rotation speed of this car prototype or `nil` if not a car prototype.
|
|
4928
4920
|
*/
|
|
4929
|
-
readonly rotation_speed
|
|
4921
|
+
readonly rotation_speed?: number
|
|
4930
4922
|
|
|
4931
4923
|
/**
|
|
4932
4924
|
* Gets the current movement speed of this character, including effects from exoskeletons, tiles, stickers and shooting.
|
|
@@ -4939,7 +4931,7 @@ interface LuaEntityPrototype {
|
|
|
4939
4931
|
/**
|
|
4940
4932
|
* The secondary bounding box used for collision checking, or `nil` if it doesn't have one. This is only used in rails and rail remnants.
|
|
4941
4933
|
*/
|
|
4942
|
-
readonly secondary_collision_box
|
|
4934
|
+
readonly secondary_collision_box?: BoundingBox
|
|
4943
4935
|
|
|
4944
4936
|
/**
|
|
4945
4937
|
* Is this entity selectable?
|
|
@@ -4964,7 +4956,7 @@ interface LuaEntityPrototype {
|
|
|
4964
4956
|
/**
|
|
4965
4957
|
* The spawning cooldown for this enemy spawner prototype or `nil`.
|
|
4966
4958
|
*/
|
|
4967
|
-
readonly spawn_cooldown
|
|
4959
|
+
readonly spawn_cooldown?: { max: number, min: number }
|
|
4968
4960
|
|
|
4969
4961
|
/**
|
|
4970
4962
|
* How far from the spawner can the units be spawned.
|
|
@@ -4979,7 +4971,7 @@ interface LuaEntityPrototype {
|
|
|
4979
4971
|
/**
|
|
4980
4972
|
* The spawning time modifier of this unit prototype or `nil`.
|
|
4981
4973
|
*/
|
|
4982
|
-
readonly spawning_time_modifier
|
|
4974
|
+
readonly spawning_time_modifier?: number
|
|
4983
4975
|
|
|
4984
4976
|
/**
|
|
4985
4977
|
* The default speed of this flying robot, rolling stock or unit, `nil` if not one of these.
|
|
@@ -4992,7 +4984,7 @@ interface LuaEntityPrototype {
|
|
|
4992
4984
|
/**
|
|
4993
4985
|
* The speed multiplier when this flying robot is out of energy or `nil`.
|
|
4994
4986
|
*/
|
|
4995
|
-
readonly speed_multiplier_when_out_of_energy
|
|
4987
|
+
readonly speed_multiplier_when_out_of_energy?: number
|
|
4996
4988
|
|
|
4997
4989
|
/**
|
|
4998
4990
|
* If this inserter is a stack-type.
|
|
@@ -5012,7 +5004,7 @@ interface LuaEntityPrototype {
|
|
|
5012
5004
|
/**
|
|
5013
5005
|
* The supply area of this electric pole, beacon, or `nil` if this is neither.
|
|
5014
5006
|
*/
|
|
5015
|
-
readonly supply_area_distance
|
|
5007
|
+
readonly supply_area_distance?: number
|
|
5016
5008
|
|
|
5017
5009
|
/**
|
|
5018
5010
|
* If this entity prototype could possibly ever be rotated.
|
|
@@ -5022,12 +5014,12 @@ interface LuaEntityPrototype {
|
|
|
5022
5014
|
/**
|
|
5023
5015
|
* If this car prototype uses tank controls to drive or `nil` if this is not a car prototype.
|
|
5024
5016
|
*/
|
|
5025
|
-
readonly tank_driving
|
|
5017
|
+
readonly tank_driving?: boolean
|
|
5026
5018
|
|
|
5027
5019
|
/**
|
|
5028
5020
|
* The target temperature of this boiler prototype or `nil`.
|
|
5029
5021
|
*/
|
|
5030
|
-
readonly target_temperature
|
|
5022
|
+
readonly target_temperature?: number
|
|
5031
5023
|
|
|
5032
5024
|
/**
|
|
5033
5025
|
* The terrain friction modifier for this vehicle.
|
|
@@ -5073,12 +5065,12 @@ interface LuaEntityPrototype {
|
|
|
5073
5065
|
/**
|
|
5074
5066
|
* The range of this turret or `nil` if this isn't a turret related prototype.
|
|
5075
5067
|
*/
|
|
5076
|
-
readonly turret_range
|
|
5068
|
+
readonly turret_range?: number
|
|
5077
5069
|
|
|
5078
5070
|
/**
|
|
5079
5071
|
* The turret rotation speed of this car prototype or `nil` if not a car prototype.
|
|
5080
5072
|
*/
|
|
5081
|
-
readonly turret_rotation_speed
|
|
5073
|
+
readonly turret_rotation_speed?: number
|
|
5082
5074
|
|
|
5083
5075
|
/**
|
|
5084
5076
|
* Type of this prototype.
|
|
@@ -5093,17 +5085,17 @@ interface LuaEntityPrototype {
|
|
|
5093
5085
|
/**
|
|
5094
5086
|
* The vision distance of this unit prototype or `nil`.
|
|
5095
5087
|
*/
|
|
5096
|
-
readonly vision_distance
|
|
5088
|
+
readonly vision_distance?: number
|
|
5097
5089
|
|
|
5098
5090
|
/**
|
|
5099
5091
|
* The void energy source prototype this entity uses or `nil`.
|
|
5100
5092
|
*/
|
|
5101
|
-
readonly void_energy_source_prototype
|
|
5093
|
+
readonly void_energy_source_prototype?: LuaVoidEnergySourcePrototype
|
|
5102
5094
|
|
|
5103
5095
|
/**
|
|
5104
5096
|
* The weight of this vehicle prototype or `nil` if not a vehicle prototype.
|
|
5105
5097
|
*/
|
|
5106
|
-
readonly weight
|
|
5098
|
+
readonly weight?: number
|
|
5107
5099
|
|
|
5108
5100
|
}
|
|
5109
5101
|
|
|
@@ -5122,7 +5114,7 @@ interface LuaEquipment {
|
|
|
5122
5114
|
/**
|
|
5123
5115
|
* The burner energy source for this equipment or `nil` if there isn't one.
|
|
5124
5116
|
*/
|
|
5125
|
-
readonly burner
|
|
5117
|
+
readonly burner?: LuaBurner
|
|
5126
5118
|
|
|
5127
5119
|
/**
|
|
5128
5120
|
* Current available energy.
|
|
@@ -5446,7 +5438,7 @@ interface LuaEquipmentPrototype {
|
|
|
5446
5438
|
/**
|
|
5447
5439
|
* The equipment attack parameters or `nil`.
|
|
5448
5440
|
*/
|
|
5449
|
-
readonly attack_parameters
|
|
5441
|
+
readonly attack_parameters?: AttackParameters
|
|
5450
5442
|
|
|
5451
5443
|
/**
|
|
5452
5444
|
* Is this active defense equipment automatic. Returns false if not active defense equipment.
|
|
@@ -5461,12 +5453,12 @@ interface LuaEquipmentPrototype {
|
|
|
5461
5453
|
/**
|
|
5462
5454
|
* The burner energy source prototype this equipment uses or `nil`.
|
|
5463
5455
|
*/
|
|
5464
|
-
readonly burner_prototype
|
|
5456
|
+
readonly burner_prototype?: LuaBurnerPrototype
|
|
5465
5457
|
|
|
5466
5458
|
/**
|
|
5467
5459
|
* The electric energy source prototype this equipment uses or `nil`.
|
|
5468
5460
|
*/
|
|
5469
|
-
readonly electric_energy_source_prototype
|
|
5461
|
+
readonly electric_energy_source_prototype?: LuaElectricEnergySourcePrototype
|
|
5470
5462
|
|
|
5471
5463
|
readonly energy_consumption: number
|
|
5472
5464
|
|
|
@@ -5629,7 +5621,7 @@ interface LuaFlowStatistics {
|
|
|
5629
5621
|
/**
|
|
5630
5622
|
* The force these statistics belong to or `nil` for pollution statistics.
|
|
5631
5623
|
*/
|
|
5632
|
-
readonly force
|
|
5624
|
+
readonly force?: LuaForce
|
|
5633
5625
|
|
|
5634
5626
|
/**
|
|
5635
5627
|
* List of input counts indexed by prototype name. Represents the data that is shown on the left side of the GUI for the given statistics.
|
|
@@ -5786,7 +5778,7 @@ interface LuaFluidBoxPrototype {
|
|
|
5786
5778
|
/**
|
|
5787
5779
|
* The filter or `nil` if no filter is set.
|
|
5788
5780
|
*/
|
|
5789
|
-
readonly filter
|
|
5781
|
+
readonly filter?: LuaFluidPrototype
|
|
5790
5782
|
|
|
5791
5783
|
readonly height: number
|
|
5792
5784
|
|
|
@@ -5798,12 +5790,12 @@ interface LuaFluidBoxPrototype {
|
|
|
5798
5790
|
/**
|
|
5799
5791
|
* The maximum temperature or `nil` if none is set.
|
|
5800
5792
|
*/
|
|
5801
|
-
readonly maximum_temperature
|
|
5793
|
+
readonly maximum_temperature?: number
|
|
5802
5794
|
|
|
5803
5795
|
/**
|
|
5804
5796
|
* The minimum temperature or `nil` if none is set.
|
|
5805
5797
|
*/
|
|
5806
|
-
readonly minimum_temperature
|
|
5798
|
+
readonly minimum_temperature?: number
|
|
5807
5799
|
|
|
5808
5800
|
/**
|
|
5809
5801
|
* 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.
|
|
@@ -5850,6 +5842,8 @@ interface LuaFluidEnergySourcePrototype {
|
|
|
5850
5842
|
|
|
5851
5843
|
readonly burns_fluid: boolean
|
|
5852
5844
|
|
|
5845
|
+
readonly destroy_non_fuel_fluid: boolean
|
|
5846
|
+
|
|
5853
5847
|
readonly effectivity: number
|
|
5854
5848
|
|
|
5855
5849
|
readonly emissions: number
|
|
@@ -5984,7 +5978,7 @@ interface LuaFontPrototype {
|
|
|
5984
5978
|
/**
|
|
5985
5979
|
* The border color or `nil` if not set.
|
|
5986
5980
|
*/
|
|
5987
|
-
readonly border_color
|
|
5981
|
+
readonly border_color?: Color
|
|
5988
5982
|
|
|
5989
5983
|
readonly filtered: boolean
|
|
5990
5984
|
|
|
@@ -6444,7 +6438,7 @@ interface LuaForce {
|
|
|
6444
6438
|
/**
|
|
6445
6439
|
* The current technology in research, or `nil` if no research is currently ongoing.
|
|
6446
6440
|
*/
|
|
6447
|
-
readonly current_research
|
|
6441
|
+
readonly current_research?: LuaTechnology
|
|
6448
6442
|
|
|
6449
6443
|
/**
|
|
6450
6444
|
* The time, in ticks, before a deconstruction order is removed.
|
|
@@ -6608,7 +6602,7 @@ interface LuaForce {
|
|
|
6608
6602
|
* This only allows mods to queue research that this force is able to research in the first place. As an example, an already researched technology or one whose prerequisites are not fulfilled will not be queued, but dropped silently instead.
|
|
6609
6603
|
*
|
|
6610
6604
|
*/
|
|
6611
|
-
research_queue
|
|
6605
|
+
research_queue?: TechnologyIdentification[]
|
|
6612
6606
|
|
|
6613
6607
|
/**
|
|
6614
6608
|
* Whether the research queue is available for this force.
|
|
@@ -7262,24 +7256,26 @@ interface LuaGameScript {
|
|
|
7262
7256
|
data: Table): string
|
|
7263
7257
|
|
|
7264
7258
|
/**
|
|
7265
|
-
* Take a screenshot and save it to a file.
|
|
7259
|
+
* Take a screenshot and save it to a file. The filename should include a file extension indicating the desired image format. Supports `.png`, `.jpg` / `.jpeg`, `.tga` and `.bmp`.
|
|
7266
7260
|
* @remarks
|
|
7267
7261
|
* If Factorio is running headless, this function will do nothing.
|
|
7268
7262
|
*
|
|
7269
|
-
* @param table.allow_in_replay -
|
|
7270
|
-
* @param table.anti_alias -
|
|
7263
|
+
* @param table.allow_in_replay - Whether to save the screenshot even during replay playback. Defaults to `false`.
|
|
7264
|
+
* @param table.anti_alias - Whether to render in double resolution and downscale the result (including GUI). Defaults to `false`.
|
|
7271
7265
|
* @param table.by_player - If defined, the screenshot will only be taken for this player.
|
|
7272
|
-
* @param table.daytime - Overrides current surface daytime for duration of screenshot rendering.
|
|
7273
|
-
* @param table.force_render - Screenshot requests are processed in between update and render. The game may skip rendering (drop frames) if previous frame has not finished rendering or the game simulation starts to fall
|
|
7274
|
-
* @param table.path -
|
|
7275
|
-
* @param table.
|
|
7276
|
-
* @param table.
|
|
7277
|
-
* @param table.
|
|
7278
|
-
* @param table.
|
|
7279
|
-
* @param table.
|
|
7280
|
-
* @param table.
|
|
7266
|
+
* @param table.daytime - Overrides the current surface daytime for the duration of screenshot rendering.
|
|
7267
|
+
* @param table.force_render - Screenshot requests are processed in between game update and render. The game may skip rendering (ie. drop frames) if the previous frame has not finished rendering or the game simulation starts to fall below 60 updates per second. If `force_render` is set to `true`, the game won't drop frames and process the screenshot request at the end of the update in which the request was created. This is not honored on multiplayer clients that are catching up to server. Defaults to `false`.
|
|
7268
|
+
* @param table.path - The sub-path in `"script-output"` to save the screenshot to. Defaults to `"screenshot.png"`.
|
|
7269
|
+
* @param table.player - The player to focus on. Defaults to the local player.
|
|
7270
|
+
* @param table.position - If defined, the screenshot will be centered on this position. Otherwise, the screenshot will center on `player`.
|
|
7271
|
+
* @param table.quality - The `.jpg` render quality as a percentage (from 0% to 100% inclusive), if used. A lower value means a more compressed image. Defaults to `80`.
|
|
7272
|
+
* @param table.resolution - The maximum allowed resolution is 16384x16384 (8192x8192 when `anti_alias` is `true`), but the maximum recommended resolution is 4096x4096 (resp. 2048x2048).
|
|
7273
|
+
* @param table.show_cursor_building_preview - When `true` and when `player` is specified, the building preview for the item in the player's cursor will also be rendered. Defaults to `false`.
|
|
7274
|
+
* @param table.show_entity_info - Whether to include entity info ("Alt mode") or not. Defaults to `false`.
|
|
7275
|
+
* @param table.show_gui - Whether to include GUIs in the screenshot or not. Defaults to `false`.
|
|
7281
7276
|
* @param table.surface - If defined, the screenshot will be taken on this surface.
|
|
7282
|
-
* @param table.water_tick - Overrides tick of water animation
|
|
7277
|
+
* @param table.water_tick - Overrides the tick of water animation, if animated water is enabled.
|
|
7278
|
+
* @param table.zoom - The map zoom to take the screenshot at. Defaults to `1`.
|
|
7283
7279
|
*/
|
|
7284
7280
|
take_screenshot(this: void,
|
|
7285
7281
|
table: {
|
|
@@ -7302,10 +7298,11 @@ interface LuaGameScript {
|
|
|
7302
7298
|
}): void
|
|
7303
7299
|
|
|
7304
7300
|
/**
|
|
7305
|
-
*
|
|
7306
|
-
* @param table.
|
|
7307
|
-
* @param table.
|
|
7308
|
-
* @param table.
|
|
7301
|
+
* Take a screenshot of the technology screen and save it to a file. The filename should include a file extension indicating the desired image format. Supports `.png`, `.jpg` / `.jpeg`, `.tga` and `.bmp`.
|
|
7302
|
+
* @param table.by_player - If given, the screenshot will only be taken for this player.
|
|
7303
|
+
* @param table.force - The force whose technology to screenshot. If not given, the `"player`" force is used.
|
|
7304
|
+
* @param table.path - The sub-path in `"script-output"` to save the screenshot to. Defaults to `"technology-screenshot.png"`.
|
|
7305
|
+
* @param table.quality - The `.jpg` render quality as a percentage (from 0% to 100% inclusive), if used. A lower value means a more compressed image. Defaults to `80`.
|
|
7309
7306
|
* @param table.selected_technology - The technology to highlight.
|
|
7310
7307
|
* @param table.skip_disabled - If `true`, disabled technologies will be skipped. Their successors will be attached to the disabled technology's parents. Defaults to `false`.
|
|
7311
7308
|
*/
|
|
@@ -8179,6 +8176,15 @@ interface LuaGuiElement {
|
|
|
8179
8176
|
set_slider_value_step(this: void,
|
|
8180
8177
|
value: number): void
|
|
8181
8178
|
|
|
8179
|
+
/**
|
|
8180
|
+
* Swaps the children at the given indices in this element.
|
|
8181
|
+
* @param index_1 - The index of the first child.
|
|
8182
|
+
* @param index_2 - The index of the second child.
|
|
8183
|
+
*/
|
|
8184
|
+
swap_children(this: void,
|
|
8185
|
+
index_1: number,
|
|
8186
|
+
index_2: number): void
|
|
8187
|
+
|
|
8182
8188
|
/**
|
|
8183
8189
|
* Whether this textfield (when in numeric mode) allows decimal numbers.
|
|
8184
8190
|
* @remarks
|
|
@@ -8343,7 +8349,7 @@ interface LuaGuiElement {
|
|
|
8343
8349
|
* ```
|
|
8344
8350
|
*
|
|
8345
8351
|
*/
|
|
8346
|
-
elem_filters
|
|
8352
|
+
elem_filters?: ItemPrototypeFilter | TilePrototypeFilter | EntityPrototypeFilter | FluidPrototypeFilter | RecipePrototypeFilter | DecorativePrototypeFilter | AchievementPrototypeFilter | EquipmentPrototypeFilter | TechnologyPrototypeFilter[]
|
|
8347
8353
|
|
|
8348
8354
|
/**
|
|
8349
8355
|
* The elem type of this choose-elem-button.
|
|
@@ -8360,7 +8366,7 @@ interface LuaGuiElement {
|
|
|
8360
8366
|
* Applies to subclasses: choose-elem-button
|
|
8361
8367
|
*
|
|
8362
8368
|
*/
|
|
8363
|
-
elem_value
|
|
8369
|
+
elem_value?: string | SignalID
|
|
8364
8370
|
|
|
8365
8371
|
/**
|
|
8366
8372
|
* Whether this GUI element is enabled. Disabled GUI elements don't trigger events when clicked.
|
|
@@ -8370,12 +8376,12 @@ interface LuaGuiElement {
|
|
|
8370
8376
|
/**
|
|
8371
8377
|
* The entity associated with this entity-preview, camera, minimap or `nil` if no entity is associated.
|
|
8372
8378
|
*/
|
|
8373
|
-
entity
|
|
8379
|
+
entity?: LuaEntity
|
|
8374
8380
|
|
|
8375
8381
|
/**
|
|
8376
8382
|
* The force this minimap is using or `nil` if no force is set.
|
|
8377
8383
|
*/
|
|
8378
|
-
force
|
|
8384
|
+
force?: string
|
|
8379
8385
|
|
|
8380
8386
|
/**
|
|
8381
8387
|
* The GUI this element is a child of.
|
|
@@ -8438,9 +8444,9 @@ interface LuaGuiElement {
|
|
|
8438
8444
|
left_label_tooltip: LocalisedString
|
|
8439
8445
|
|
|
8440
8446
|
/**
|
|
8441
|
-
* The location of this widget when stored in {@link LuaGui::screen | LuaGui::screen} or `nil` if not
|
|
8447
|
+
* The location of this widget when stored in {@link LuaGui::screen | LuaGui::screen}, or `nil` if not set or not in {@link LuaGui::screen | LuaGui::screen}.
|
|
8442
8448
|
*/
|
|
8443
|
-
location
|
|
8449
|
+
location?: GuiLocation
|
|
8444
8450
|
|
|
8445
8451
|
/**
|
|
8446
8452
|
* Whether this choose-elem-button can be changed by the player.
|
|
@@ -8562,7 +8568,7 @@ interface LuaGuiElement {
|
|
|
8562
8568
|
* Applies to subclasses: tabbed-pane
|
|
8563
8569
|
*
|
|
8564
8570
|
*/
|
|
8565
|
-
selected_tab_index
|
|
8571
|
+
selected_tab_index?: number
|
|
8566
8572
|
|
|
8567
8573
|
/**
|
|
8568
8574
|
* Related to the number to be shown in the bottom right corner of this sprite-button. When set to `true`, numbers that are non-zero and smaller than one are shown as a percentage rather than the value. For example, `0.5` will be shown as `50%` instead.
|
|
@@ -8970,22 +8976,22 @@ interface LuaInventory {
|
|
|
8970
8976
|
/**
|
|
8971
8977
|
* The entity that owns this inventory or `nil` if this isn't owned by an entity.
|
|
8972
8978
|
*/
|
|
8973
|
-
readonly entity_owner
|
|
8979
|
+
readonly entity_owner?: LuaEntity
|
|
8974
8980
|
|
|
8975
8981
|
/**
|
|
8976
8982
|
* The equipment that owns this inventory or `nil` if this isn't owned by an equipment.
|
|
8977
8983
|
*/
|
|
8978
|
-
readonly equipment_owner
|
|
8984
|
+
readonly equipment_owner?: LuaEquipment
|
|
8979
8985
|
|
|
8980
8986
|
/**
|
|
8981
8987
|
* The inventory index this inventory uses, or `nil` if the inventory doesn't have an index.
|
|
8982
8988
|
*/
|
|
8983
|
-
readonly index
|
|
8989
|
+
readonly index?: defines.inventory
|
|
8984
8990
|
|
|
8985
8991
|
/**
|
|
8986
8992
|
* The mod that owns this inventory or `nil` if this isn't owned by a mod.
|
|
8987
8993
|
*/
|
|
8988
|
-
readonly mod_owner
|
|
8994
|
+
readonly mod_owner?: string
|
|
8989
8995
|
|
|
8990
8996
|
/**
|
|
8991
8997
|
* 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.
|
|
@@ -8995,7 +9001,7 @@ interface LuaInventory {
|
|
|
8995
9001
|
/**
|
|
8996
9002
|
* The player that owns this inventory or `nil` if this isn't owned by a player.
|
|
8997
9003
|
*/
|
|
8998
|
-
readonly player_owner
|
|
9004
|
+
readonly player_owner?: LuaPlayer
|
|
8999
9005
|
|
|
9000
9006
|
/**
|
|
9001
9007
|
* 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.
|
|
@@ -9046,9 +9052,9 @@ interface LuaItemPrototype {
|
|
|
9046
9052
|
ammo_source_type?: string): AmmoType
|
|
9047
9053
|
|
|
9048
9054
|
/**
|
|
9049
|
-
*
|
|
9050
|
-
*
|
|
9051
|
-
* @
|
|
9055
|
+
* Test whether this item prototype has a certain flag set.
|
|
9056
|
+
* @param flag - The flag to test. See [ItemPrototypeFlags](ItemPrototypeFlags) for a list of flags.
|
|
9057
|
+
* @returns `true` if this prototype has the given flag set.
|
|
9052
9058
|
*/
|
|
9053
9059
|
has_flag(this: void,
|
|
9054
9060
|
flag: string): boolean
|
|
@@ -9133,12 +9139,12 @@ interface LuaItemPrototype {
|
|
|
9133
9139
|
/**
|
|
9134
9140
|
* The gun attack parameters or `nil` if not a gun item prototype.
|
|
9135
9141
|
*/
|
|
9136
|
-
readonly attack_parameters
|
|
9142
|
+
readonly attack_parameters?: AttackParameters
|
|
9137
9143
|
|
|
9138
9144
|
/**
|
|
9139
9145
|
* The result of burning this item as fuel or `nil`.
|
|
9140
9146
|
*/
|
|
9141
|
-
readonly burnt_result
|
|
9147
|
+
readonly burnt_result?: LuaItemPrototype
|
|
9142
9148
|
|
|
9143
9149
|
/**
|
|
9144
9150
|
* If this item can be mod-opened.
|
|
@@ -9148,7 +9154,7 @@ interface LuaItemPrototype {
|
|
|
9148
9154
|
/**
|
|
9149
9155
|
* The capsule action for this capsule item prototype or `nil` if this isn't a capsule item prototype.
|
|
9150
9156
|
*/
|
|
9151
|
-
readonly capsule_action
|
|
9157
|
+
readonly capsule_action?: CapsuleAction
|
|
9152
9158
|
|
|
9153
9159
|
/**
|
|
9154
9160
|
* The name of a {@link LuaModuleCategoryPrototype | LuaModuleCategoryPrototype}. Used when upgrading modules: Ctrl + click modules into an entity and it will replace lower tier modules of the same category with higher tier modules.
|
|
@@ -9193,7 +9199,7 @@ interface LuaItemPrototype {
|
|
|
9193
9199
|
* Applies to subclasses: ToolItem
|
|
9194
9200
|
*
|
|
9195
9201
|
*/
|
|
9196
|
-
readonly durability
|
|
9202
|
+
readonly durability?: number
|
|
9197
9203
|
|
|
9198
9204
|
/**
|
|
9199
9205
|
* The durability message key used when displaying the durability of this tool.
|
|
@@ -9217,7 +9223,7 @@ interface LuaItemPrototype {
|
|
|
9217
9223
|
* Applies to subclasses: DeconstructionItem
|
|
9218
9224
|
*
|
|
9219
9225
|
*/
|
|
9220
|
-
readonly entity_filter_slots
|
|
9226
|
+
readonly entity_filter_slots?: number
|
|
9221
9227
|
|
|
9222
9228
|
/**
|
|
9223
9229
|
* The entity filters used by this selection tool indexed by entity name.
|
|
@@ -9239,7 +9245,7 @@ interface LuaItemPrototype {
|
|
|
9239
9245
|
/**
|
|
9240
9246
|
* The prototype of this armor equipment grid or `nil` if none or this is not an armor item.
|
|
9241
9247
|
*/
|
|
9242
|
-
readonly equipment_grid
|
|
9248
|
+
readonly equipment_grid?: LuaEquipmentGridPrototype
|
|
9243
9249
|
|
|
9244
9250
|
/**
|
|
9245
9251
|
* If this item with inventory extends the inventory it resides in by default.
|
|
@@ -9258,7 +9264,7 @@ interface LuaItemPrototype {
|
|
|
9258
9264
|
readonly filter_mode: string
|
|
9259
9265
|
|
|
9260
9266
|
/**
|
|
9261
|
-
* The
|
|
9267
|
+
* The flags for this item prototype.
|
|
9262
9268
|
*/
|
|
9263
9269
|
readonly flags: ItemPrototypeFlags
|
|
9264
9270
|
|
|
@@ -9270,7 +9276,7 @@ interface LuaItemPrototype {
|
|
|
9270
9276
|
/**
|
|
9271
9277
|
* The fuel category or `nil`.
|
|
9272
9278
|
*/
|
|
9273
|
-
readonly fuel_category
|
|
9279
|
+
readonly fuel_category?: string
|
|
9274
9280
|
|
|
9275
9281
|
/**
|
|
9276
9282
|
* The emissions multiplier if this is used as fuel.
|
|
@@ -9412,7 +9418,7 @@ interface LuaItemPrototype {
|
|
|
9412
9418
|
/**
|
|
9413
9419
|
* Prototype of the equipment that will be created by placing this item in an equipment grid or `nil` if there is no equipment defined.
|
|
9414
9420
|
*/
|
|
9415
|
-
readonly place_as_equipment_result
|
|
9421
|
+
readonly place_as_equipment_result?: LuaEquipmentPrototype
|
|
9416
9422
|
|
|
9417
9423
|
/**
|
|
9418
9424
|
* The place-as-tile result if one is defined, else `nil`.
|
|
@@ -9422,12 +9428,12 @@ interface LuaItemPrototype {
|
|
|
9422
9428
|
/**
|
|
9423
9429
|
* Prototype of the entity that will be created by placing this item, or `nil` if there is no such entity.
|
|
9424
9430
|
*/
|
|
9425
|
-
readonly place_result
|
|
9431
|
+
readonly place_result?: LuaEntityPrototype
|
|
9426
9432
|
|
|
9427
9433
|
/**
|
|
9428
9434
|
* Amount of extra time (in ticks) it takes to reload the weapon after depleting the magazine or `nil` if this is not an ammo item.
|
|
9429
9435
|
*/
|
|
9430
|
-
readonly reload_time
|
|
9436
|
+
readonly reload_time?: number
|
|
9431
9437
|
|
|
9432
9438
|
/**
|
|
9433
9439
|
* The repair result of this repair tool prototype or `nil` if this isn't a repair tool prototype.
|
|
@@ -9435,7 +9441,7 @@ interface LuaItemPrototype {
|
|
|
9435
9441
|
* Applies to subclasses: RepairTool
|
|
9436
9442
|
*
|
|
9437
9443
|
*/
|
|
9438
|
-
readonly repair_result
|
|
9444
|
+
readonly repair_result?: TriggerItem[]
|
|
9439
9445
|
|
|
9440
9446
|
/**
|
|
9441
9447
|
* Resistances of this armour item, indexed by damage type name. `nil` if not an armor or the armor has no resistances.
|
|
@@ -9520,7 +9526,7 @@ interface LuaItemPrototype {
|
|
|
9520
9526
|
* Applies to subclasses: DeconstructionItem
|
|
9521
9527
|
*
|
|
9522
9528
|
*/
|
|
9523
|
-
readonly tile_filter_slots
|
|
9529
|
+
readonly tile_filter_slots?: number
|
|
9524
9530
|
|
|
9525
9531
|
/**
|
|
9526
9532
|
* The tile filters used by this selection tool indexed by tile name.
|
|
@@ -9576,7 +9582,6 @@ interface LuaItemStack {
|
|
|
9576
9582
|
amount: number): void
|
|
9577
9583
|
|
|
9578
9584
|
/**
|
|
9579
|
-
* Build this blueprint
|
|
9580
9585
|
* @remarks
|
|
9581
9586
|
* Built entities can be come invalid between the building of the blueprint and the function returning if by_player or raise_built is used and one of those events invalidates the entity.
|
|
9582
9587
|
*
|
|
@@ -9727,7 +9732,7 @@ interface LuaItemStack {
|
|
|
9727
9732
|
amount: number): void
|
|
9728
9733
|
|
|
9729
9734
|
/**
|
|
9730
|
-
* Export a supported item (blueprint, blueprint-book, deconstruction-planner, upgrade-planner, item-with-tags) to a string
|
|
9735
|
+
* Export a supported item (blueprint, blueprint-book, deconstruction-planner, upgrade-planner, item-with-tags) to a string.
|
|
9731
9736
|
* @returns The exported string
|
|
9732
9737
|
*/
|
|
9733
9738
|
export_stack(this: void): string
|
|
@@ -9830,7 +9835,7 @@ interface LuaItemStack {
|
|
|
9830
9835
|
help(this: void): string
|
|
9831
9836
|
|
|
9832
9837
|
/**
|
|
9833
|
-
* Import a supported item (blueprint, blueprint-book, deconstruction-planner, upgrade-planner, item-with-tags) from a string
|
|
9838
|
+
* Import a supported item (blueprint, blueprint-book, deconstruction-planner, upgrade-planner, item-with-tags) from a string.
|
|
9834
9839
|
* @param data - The string to import
|
|
9835
9840
|
* @returns 0 if the import succeeded with no errors. -1 if the import succeeded with errors. 1 if the import failed.
|
|
9836
9841
|
*/
|
|
@@ -10094,7 +10099,7 @@ interface LuaItemStack {
|
|
|
10094
10099
|
/**
|
|
10095
10100
|
* The equipment grid of this item or `nil` if this item doesn't have a grid.
|
|
10096
10101
|
*/
|
|
10097
|
-
readonly grid
|
|
10102
|
+
readonly grid?: LuaEquipmentGrid
|
|
10098
10103
|
|
|
10099
10104
|
/**
|
|
10100
10105
|
* How much health the item has, as a number in range [0, 1].
|
|
@@ -10300,7 +10305,7 @@ interface LuaLampControlBehavior extends LuaGenericOnOffControlBehavior {
|
|
|
10300
10305
|
/**
|
|
10301
10306
|
* The color the lamp is showing or `nil` if not using any color.
|
|
10302
10307
|
*/
|
|
10303
|
-
readonly color
|
|
10308
|
+
readonly color?: Color
|
|
10304
10309
|
|
|
10305
10310
|
/**
|
|
10306
10311
|
* 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.
|
|
@@ -10396,7 +10401,7 @@ interface LuaLogisticCell {
|
|
|
10396
10401
|
/**
|
|
10397
10402
|
* The network that owns this cell or `nil`.
|
|
10398
10403
|
*/
|
|
10399
|
-
readonly logistic_network
|
|
10404
|
+
readonly logistic_network?: LuaLogisticNetwork
|
|
10400
10405
|
|
|
10401
10406
|
/**
|
|
10402
10407
|
* Logistic radius of this cell.
|
|
@@ -10703,7 +10708,7 @@ interface LuaLogisticPoint {
|
|
|
10703
10708
|
* The returned array will always have an entry for each filter and will be indexed in sequence when not nil.
|
|
10704
10709
|
*
|
|
10705
10710
|
*/
|
|
10706
|
-
readonly filters
|
|
10711
|
+
readonly filters?: LogisticFilter[]
|
|
10707
10712
|
|
|
10708
10713
|
/**
|
|
10709
10714
|
* The force of this logistic point.
|
|
@@ -10805,17 +10810,17 @@ interface LuaModSettingPrototype {
|
|
|
10805
10810
|
/**
|
|
10806
10811
|
* If this string setting allows blank values or `nil` if not a string setting.
|
|
10807
10812
|
*/
|
|
10808
|
-
readonly allow_blank
|
|
10813
|
+
readonly allow_blank?: boolean
|
|
10809
10814
|
|
|
10810
10815
|
/**
|
|
10811
10816
|
* The allowed values for this setting or `nil` if this setting doesn't use the a fixed set of values.
|
|
10812
10817
|
*/
|
|
10813
|
-
readonly allowed_values
|
|
10818
|
+
readonly allowed_values?: string[] | number[]
|
|
10814
10819
|
|
|
10815
10820
|
/**
|
|
10816
10821
|
* If this string setting auto-trims values or `nil` if not a string setting.
|
|
10817
10822
|
*/
|
|
10818
|
-
readonly auto_trim
|
|
10823
|
+
readonly auto_trim?: boolean
|
|
10819
10824
|
|
|
10820
10825
|
/**
|
|
10821
10826
|
* The default value of this setting.
|
|
@@ -10834,12 +10839,12 @@ interface LuaModSettingPrototype {
|
|
|
10834
10839
|
/**
|
|
10835
10840
|
* The maximum value for this setting or `nil` if this setting type doesn't support a maximum.
|
|
10836
10841
|
*/
|
|
10837
|
-
readonly maximum_value
|
|
10842
|
+
readonly maximum_value?: number
|
|
10838
10843
|
|
|
10839
10844
|
/**
|
|
10840
10845
|
* The minimum value for this setting or `nil` if this setting type doesn't support a minimum.
|
|
10841
10846
|
*/
|
|
10842
|
-
readonly minimum_value
|
|
10847
|
+
readonly minimum_value?: number
|
|
10843
10848
|
|
|
10844
10849
|
/**
|
|
10845
10850
|
* The mod that owns this setting.
|
|
@@ -11736,7 +11741,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
11736
11741
|
* Will also return `nil` when the player is disconnected (see {@link LuaPlayer::connected | LuaPlayer::connected}).
|
|
11737
11742
|
*
|
|
11738
11743
|
*/
|
|
11739
|
-
character
|
|
11744
|
+
character?: LuaEntity
|
|
11740
11745
|
|
|
11741
11746
|
/**
|
|
11742
11747
|
* The color used when this player talks in game.
|
|
@@ -11825,7 +11830,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
11825
11830
|
/**
|
|
11826
11831
|
* Gets the current per-player settings for the this player, indexed by prototype name. Returns the same structure as {@link LuaSettings::get_player_settings | LuaSettings::get_player_settings}.
|
|
11827
11832
|
* @remarks
|
|
11828
|
-
* This
|
|
11833
|
+
* This table will become invalid if its associated player does.
|
|
11829
11834
|
*
|
|
11830
11835
|
*/
|
|
11831
11836
|
readonly mod_settings: {[key: string]: ModSetting}
|
|
@@ -11853,7 +11858,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
11853
11858
|
/**
|
|
11854
11859
|
* The permission group this player is part of or `nil` if not part of any group.
|
|
11855
11860
|
*/
|
|
11856
|
-
permission_group
|
|
11861
|
+
permission_group?: LuaPermissionGroup
|
|
11857
11862
|
|
|
11858
11863
|
/**
|
|
11859
11864
|
* If items not included in this map editor infinity inventory filters should be removed.
|
|
@@ -11865,6 +11870,11 @@ interface LuaPlayer extends LuaControl {
|
|
|
11865
11870
|
*/
|
|
11866
11871
|
readonly render_mode: defines.render_mode
|
|
11867
11872
|
|
|
11873
|
+
/**
|
|
11874
|
+
* If `true`, circle and name of given player is rendered on the map/chart.
|
|
11875
|
+
*/
|
|
11876
|
+
show_on_map: boolean
|
|
11877
|
+
|
|
11868
11878
|
/**
|
|
11869
11879
|
* If `true`, zoom-to-world noise effect will be disabled and environmental sounds will be based on zoom-to-world view instead of position of player's character.
|
|
11870
11880
|
*/
|
|
@@ -11876,7 +11886,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
11876
11886
|
* This is mainly useful when a player is in the map editor.
|
|
11877
11887
|
*
|
|
11878
11888
|
*/
|
|
11879
|
-
readonly stashed_controller_type
|
|
11889
|
+
readonly stashed_controller_type?: defines.controllers
|
|
11880
11890
|
|
|
11881
11891
|
/**
|
|
11882
11892
|
* The tag that is shown after the player in chat and on the map.
|
|
@@ -11890,7 +11900,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
11890
11900
|
* Set to any positive value to trigger the respawn state for this player.
|
|
11891
11901
|
*
|
|
11892
11902
|
*/
|
|
11893
|
-
ticks_to_respawn
|
|
11903
|
+
ticks_to_respawn?: number
|
|
11894
11904
|
|
|
11895
11905
|
/**
|
|
11896
11906
|
* 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.
|
|
@@ -13818,7 +13828,7 @@ interface LuaSettings {
|
|
|
13818
13828
|
/**
|
|
13819
13829
|
* Gets the current per-player settings for the given player, indexed by prototype name. Returns the same structure as {@link LuaPlayer::mod_settings | LuaPlayer::mod_settings}.
|
|
13820
13830
|
* @remarks
|
|
13821
|
-
* This
|
|
13831
|
+
* This table will become invalid if its associated player does.
|
|
13822
13832
|
*
|
|
13823
13833
|
*/
|
|
13824
13834
|
get_player_settings(this: void,
|
|
@@ -13937,6 +13947,13 @@ interface LuaStyle {
|
|
|
13937
13947
|
*/
|
|
13938
13948
|
badge_horizontal_spacing: number
|
|
13939
13949
|
|
|
13950
|
+
/**
|
|
13951
|
+
* @remarks
|
|
13952
|
+
* Applies to subclasses: LuaProgressBarStyle
|
|
13953
|
+
*
|
|
13954
|
+
*/
|
|
13955
|
+
bar_width: number
|
|
13956
|
+
|
|
13940
13957
|
/**
|
|
13941
13958
|
* Space between the table cell contents bottom and border.
|
|
13942
13959
|
* @remarks
|
|
@@ -14530,7 +14547,7 @@ interface LuaSurface {
|
|
|
14530
14547
|
|
|
14531
14548
|
/**
|
|
14532
14549
|
* Count entities of given type or name in a given area. Works just like {@link LuaSurface::find_entities_filtered | LuaSurface::find_entities_filtered}, except this only returns the count. As it doesn't construct all the wrapper objects, this is more efficient if one is only interested in the number of entities.
|
|
14533
|
-
* If no area or position are given,
|
|
14550
|
+
* If no `area` or `position` are given, the entire surface is searched. If `position` is given, this returns the entities colliding with that position (i.e the given position is within the entity's collision box). If `position` and `radius` are given, this returns entities in the radius of the position. If `area` is specified, this returns entities colliding with that area.
|
|
14534
14551
|
* @param table.invert - If the filters should be inverted. These filters are: name, type, ghost_name, ghost_type, direction, collision_mask, force.
|
|
14535
14552
|
* @param table.radius - If given with position, will count all entities within the radius of the position.
|
|
14536
14553
|
*/
|
|
@@ -14554,7 +14571,7 @@ interface LuaSurface {
|
|
|
14554
14571
|
|
|
14555
14572
|
/**
|
|
14556
14573
|
* Count tiles of a given name in a given area. Works just like {@link LuaSurface::find_tiles_filtered | LuaSurface::find_tiles_filtered}, except this only returns the count. As it doesn't construct all the wrapper objects, this is more efficient if one is only interested in the number of tiles.
|
|
14557
|
-
* If no area or position and radius is given,
|
|
14574
|
+
* If no `area` or `position` and `radius` is given, the entire surface is searched. If `position` and `radius` are given, only tiles within the radius of the position are included.
|
|
14558
14575
|
* @param table.position - Ignored if not given with radius.
|
|
14559
14576
|
* @param table.radius - If given with position, will return all entities within the radius of the position.
|
|
14560
14577
|
*/
|
|
@@ -14791,9 +14808,9 @@ interface LuaSurface {
|
|
|
14791
14808
|
area?: BoundingBox): LuaEntity[]
|
|
14792
14809
|
|
|
14793
14810
|
/**
|
|
14794
|
-
* Find entities of given type or name in
|
|
14795
|
-
* If no filters (`name`, `type`, `force`, etc.) are given, returns all entities in the search area. If multiple filters are specified,
|
|
14796
|
-
* If no area or position are given,
|
|
14811
|
+
* Find all entities of the given type or name in the given area.
|
|
14812
|
+
* If no filters (`name`, `type`, `force`, etc.) are given, this returns all entities in the search area. If multiple filters are specified, only entities matching all given filters are returned.
|
|
14813
|
+
* If no `area` or `position` are given, the entire surface is searched. If `position` is given, this returns the entities colliding with that position (i.e the given position is within the entity's collision box). If `position` and `radius` are given, this returns the entities within the radius of the position. If `area` is specified, this returns the entities colliding with that area.
|
|
14797
14814
|
* @param table.invert - If the filters should be inverted. These filters are: name, type, ghost_name, ghost_type, direction, collision_mask, force.
|
|
14798
14815
|
* @param table.position - Has precedence over area field.
|
|
14799
14816
|
* @param table.radius - If given with position, will return all entities within the radius of the position.
|
|
@@ -14920,9 +14937,9 @@ interface LuaSurface {
|
|
|
14920
14937
|
force_to_tile_center?: boolean): Position
|
|
14921
14938
|
|
|
14922
14939
|
/**
|
|
14923
|
-
* Find tiles of
|
|
14924
|
-
* If no filters are given returns all tiles in the search area.
|
|
14925
|
-
* If no area or position and radius is given,
|
|
14940
|
+
* Find all tiles of the given name in the given area.
|
|
14941
|
+
* If no filters are given, this returns all tiles in the search area.
|
|
14942
|
+
* If no `area` or `position` and `radius` is given, the entire surface is searched. If `position` and `radius` are given, only tiles within the radius of the position are included.
|
|
14926
14943
|
* @param table.position - Ignored if not given with radius.
|
|
14927
14944
|
* @param table.radius - If given with position, will return all entities within the radius of the position.
|
|
14928
14945
|
*/
|
|
@@ -15716,7 +15733,7 @@ interface LuaTile {
|
|
|
15716
15733
|
/**
|
|
15717
15734
|
* The name of the {@link LuaTilePrototype | LuaTilePrototype} hidden under this tile or `nil` if there is no hidden tile. During normal gameplay, only {@link non-mineable | LuaTilePrototype::mineable_properties} tiles can become hidden. This can however be circumvented with {@link LuaSurface::set_hidden_tile | LuaSurface::set_hidden_tile}.
|
|
15718
15735
|
*/
|
|
15719
|
-
readonly hidden_tile
|
|
15736
|
+
readonly hidden_tile?: string
|
|
15720
15737
|
|
|
15721
15738
|
/**
|
|
15722
15739
|
* Prototype name of this tile. E.g. `"sand-3"` or `"grass-2"`.
|
|
@@ -15815,7 +15832,7 @@ interface LuaTilePrototype {
|
|
|
15815
15832
|
/**
|
|
15816
15833
|
* The next direction of this tile or `nil` - used when a tile has multiple directions (such as hazard concrete)
|
|
15817
15834
|
*/
|
|
15818
|
-
readonly next_direction
|
|
15835
|
+
readonly next_direction?: LuaTilePrototype
|
|
15819
15836
|
|
|
15820
15837
|
/**
|
|
15821
15838
|
* 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.
|
|
@@ -15938,7 +15955,7 @@ interface LuaTrain {
|
|
|
15938
15955
|
/**
|
|
15939
15956
|
* The back stock of this train or `nil`.
|
|
15940
15957
|
*/
|
|
15941
|
-
readonly back_stock
|
|
15958
|
+
readonly back_stock?: LuaEntity
|
|
15942
15959
|
|
|
15943
15960
|
/**
|
|
15944
15961
|
* The cargo carriages the train contains.
|
|
@@ -15963,7 +15980,7 @@ interface LuaTrain {
|
|
|
15963
15980
|
/**
|
|
15964
15981
|
* The front stock of this train or `nil`.
|
|
15965
15982
|
*/
|
|
15966
|
-
readonly front_stock
|
|
15983
|
+
readonly front_stock?: LuaEntity
|
|
15967
15984
|
|
|
15968
15985
|
/**
|
|
15969
15986
|
* If this train has a path.
|
|
@@ -15982,7 +15999,7 @@ interface LuaTrain {
|
|
|
15982
15999
|
|
|
15983
16000
|
/**
|
|
15984
16001
|
* The players killed by this train.
|
|
15985
|
-
* The keys are the player
|
|
16002
|
+
* The keys are the player indices, the values are how often this train killed that player.
|
|
15986
16003
|
*/
|
|
15987
16004
|
readonly killed_players: {[key: number]: number}
|
|
15988
16005
|
|
|
@@ -16022,17 +16039,17 @@ interface LuaTrain {
|
|
|
16022
16039
|
/**
|
|
16023
16040
|
* The path this train is using or `nil` if none.
|
|
16024
16041
|
*/
|
|
16025
|
-
readonly path
|
|
16042
|
+
readonly path?: LuaRailPath
|
|
16026
16043
|
|
|
16027
16044
|
/**
|
|
16028
16045
|
* The destination rail this train is currently pathing to or `nil`.
|
|
16029
16046
|
*/
|
|
16030
|
-
readonly path_end_rail
|
|
16047
|
+
readonly path_end_rail?: LuaEntity
|
|
16031
16048
|
|
|
16032
16049
|
/**
|
|
16033
16050
|
* The destination train stop this train is currently pathing to or `nil`.
|
|
16034
16051
|
*/
|
|
16035
|
-
readonly path_end_stop
|
|
16052
|
+
readonly path_end_stop?: LuaEntity
|
|
16036
16053
|
|
|
16037
16054
|
readonly rail_direction_from_back_rail: defines.rail_direction
|
|
16038
16055
|
|
|
@@ -16049,12 +16066,12 @@ interface LuaTrain {
|
|
|
16049
16066
|
* The schedule can't be changed by modifying the returned table. Instead, changes must be made by assigning a new table to this attribute.
|
|
16050
16067
|
*
|
|
16051
16068
|
*/
|
|
16052
|
-
schedule
|
|
16069
|
+
schedule?: TrainSchedule
|
|
16053
16070
|
|
|
16054
16071
|
/**
|
|
16055
16072
|
* The signal this train is arriving or waiting at or `nil` if none.
|
|
16056
16073
|
*/
|
|
16057
|
-
readonly signal
|
|
16074
|
+
readonly signal?: LuaEntity
|
|
16058
16075
|
|
|
16059
16076
|
/**
|
|
16060
16077
|
* Current speed.
|
|
@@ -16072,7 +16089,7 @@ interface LuaTrain {
|
|
|
16072
16089
|
/**
|
|
16073
16090
|
* The train stop this train is stopped at or `nil`.
|
|
16074
16091
|
*/
|
|
16075
|
-
readonly station
|
|
16092
|
+
readonly station?: LuaEntity
|
|
16076
16093
|
|
|
16077
16094
|
/**
|
|
16078
16095
|
* 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.
|
|
@@ -16417,12 +16434,12 @@ interface LuaUnitGroup {
|
|
|
16417
16434
|
/**
|
|
16418
16435
|
* The command given to this group or `nil` is the group has no command.
|
|
16419
16436
|
*/
|
|
16420
|
-
readonly command
|
|
16437
|
+
readonly command?: Command
|
|
16421
16438
|
|
|
16422
16439
|
/**
|
|
16423
16440
|
* The distraction command given to this group or `nil` is the group currently isn't distracted.
|
|
16424
16441
|
*/
|
|
16425
|
-
readonly distraction_command
|
|
16442
|
+
readonly distraction_command?: Command
|
|
16426
16443
|
|
|
16427
16444
|
/**
|
|
16428
16445
|
* The force of this unit group.
|