factorio-types 1.2.49 → 1.2.51
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 +823 -598
- package/dist/concepts.d.ts +282 -199
- package/dist/datacollection.d.ts +1 -1
- package/dist/defines.d.ts +215 -206
- package/dist/events.d.ts +449 -398
- package/dist/global.d.ts +2 -2
- package/dist/prototypes.d.ts +146 -20
- package/dist/types.d.ts +121 -24
- package/package.json +2 -2
package/dist/classes.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Factorio API reference https://lua-api.factorio.com/latest/index.html
|
|
3
3
|
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version 2.0.
|
|
5
|
+
// Factorio version 2.0.69
|
|
6
6
|
// API version 6
|
|
7
7
|
|
|
8
8
|
declare namespace runtime {
|
|
@@ -70,9 +70,9 @@ interface LuaAchievementPrototype extends LuaPrototypeBase {
|
|
|
70
70
|
readonly allowed_without_fight: boolean;
|
|
71
71
|
readonly alternative_armor?: LuaItemPrototype;
|
|
72
72
|
readonly ammo_type?: LuaItemPrototype;
|
|
73
|
-
readonly amount?:
|
|
73
|
+
readonly amount?: uint32;
|
|
74
74
|
readonly armor?: LuaItemPrototype;
|
|
75
|
-
readonly count?:
|
|
75
|
+
readonly count?: uint32;
|
|
76
76
|
readonly damage_dealer?: LuaEntityPrototype[];
|
|
77
77
|
readonly damage_type?: LuaDamagePrototype;
|
|
78
78
|
readonly dont_build?: LuaEntityPrototype[];
|
|
@@ -115,7 +115,7 @@ interface LuaAchievementPrototype extends LuaPrototypeBase {
|
|
|
115
115
|
* 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.
|
|
116
116
|
*/
|
|
117
117
|
readonly valid: boolean;
|
|
118
|
-
readonly within?:
|
|
118
|
+
readonly within?: uint32;
|
|
119
119
|
}
|
|
120
120
|
/**
|
|
121
121
|
* Prototype of an Active Trigger.
|
|
@@ -128,19 +128,19 @@ interface LuaActiveTriggerPrototype extends LuaPrototypeBase {
|
|
|
128
128
|
/**
|
|
129
129
|
* The tick delay between each jump. 0 = all jumps instantaneous. default = 0.
|
|
130
130
|
*/
|
|
131
|
-
readonly jump_delay_ticks:
|
|
131
|
+
readonly jump_delay_ticks: uint32;
|
|
132
132
|
/**
|
|
133
133
|
* maximum number of forks allowed to spawn for the entire chain. default = infinity.
|
|
134
134
|
*/
|
|
135
|
-
readonly max_forks:
|
|
135
|
+
readonly max_forks: uint32;
|
|
136
136
|
/**
|
|
137
137
|
* The maximum number of forks that can spawn from a single jump. default = 1.
|
|
138
138
|
*/
|
|
139
|
-
readonly max_forks_per_jump:
|
|
139
|
+
readonly max_forks_per_jump: uint32;
|
|
140
140
|
/**
|
|
141
141
|
* The max number of jumps per trigger. default = 5.
|
|
142
142
|
*/
|
|
143
|
-
readonly max_jumps:
|
|
143
|
+
readonly max_jumps: uint32;
|
|
144
144
|
/**
|
|
145
145
|
* The max distance jumps are allowed to travel away from the original target. default = infinity.
|
|
146
146
|
*/
|
|
@@ -221,7 +221,7 @@ interface LuaArithmeticCombinatorControlBehavior extends LuaCombinatorControlBeh
|
|
|
221
221
|
/**
|
|
222
222
|
* This arithmetic combinator's parameters. Writing `nil` clears the combinator's parameters.
|
|
223
223
|
*/
|
|
224
|
-
parameters
|
|
224
|
+
parameters?: ArithmeticCombinatorParameters;
|
|
225
225
|
/**
|
|
226
226
|
* 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.
|
|
227
227
|
*/
|
|
@@ -627,6 +627,24 @@ interface LuaBootstrap {
|
|
|
627
627
|
script.on_event(defines.events.on_built_entity,
|
|
628
628
|
function(event) game.print("Gotta go fast!") end,
|
|
629
629
|
{{filter = "name", name = "fast-inserter"}})
|
|
630
|
+
```
|
|
631
|
+
*/
|
|
632
|
+
on_event(this: void, event: defines.events.on_cargo_pod_started_ascending, handler: ((this: void, arg0: runtime.on_cargo_pod_started_ascending) => any) | nil, filters?: EventFilter): void;
|
|
633
|
+
/**
|
|
634
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
635
|
+
* @param event The event(s) or custom-input to invoke the handler on.
|
|
636
|
+
* @param handler The handler for this event. Passing `nil` will unregister it.
|
|
637
|
+
* @param filters The filters for this event. Can only be used when registering for individual events.
|
|
638
|
+
* @example ```
|
|
639
|
+
-- Register for the on_tick event to print the current tick to console each tick
|
|
640
|
+
script.on_event(defines.events.on_tick,
|
|
641
|
+
function(event) game.print(event.tick) end)
|
|
642
|
+
```
|
|
643
|
+
* @example ```
|
|
644
|
+
-- Register for the on_built_entity event, limiting it to only be received when a `"fast-inserter"` is built
|
|
645
|
+
script.on_event(defines.events.on_built_entity,
|
|
646
|
+
function(event) game.print("Gotta go fast!") end,
|
|
647
|
+
{{filter = "name", name = "fast-inserter"}})
|
|
630
648
|
```
|
|
631
649
|
*/
|
|
632
650
|
on_event(this: void, event: defines.events.on_character_corpse_expired, handler: ((this: void, arg0: runtime.on_character_corpse_expired) => any) | nil, filters?: EventFilter): void;
|
|
@@ -2139,6 +2157,24 @@ interface LuaBootstrap {
|
|
|
2139
2157
|
script.on_event(defines.events.on_built_entity,
|
|
2140
2158
|
function(event) game.print("Gotta go fast!") end,
|
|
2141
2159
|
{{filter = "name", name = "fast-inserter"}})
|
|
2160
|
+
```
|
|
2161
|
+
*/
|
|
2162
|
+
on_event(this: void, event: defines.events.on_player_dropped_item_into_entity, handler: ((this: void, arg0: runtime.on_player_dropped_item_into_entity) => any) | nil, filters?: EventFilter): void;
|
|
2163
|
+
/**
|
|
2164
|
+
* Register a handler to run on the specified event(s). Each mod can only register once for every event, as any additional registration will overwrite the previous one. This holds true even if different filters are used for subsequent registrations.
|
|
2165
|
+
* @param event The event(s) or custom-input to invoke the handler on.
|
|
2166
|
+
* @param handler The handler for this event. Passing `nil` will unregister it.
|
|
2167
|
+
* @param filters The filters for this event. Can only be used when registering for individual events.
|
|
2168
|
+
* @example ```
|
|
2169
|
+
-- Register for the on_tick event to print the current tick to console each tick
|
|
2170
|
+
script.on_event(defines.events.on_tick,
|
|
2171
|
+
function(event) game.print(event.tick) end)
|
|
2172
|
+
```
|
|
2173
|
+
* @example ```
|
|
2174
|
+
-- Register for the on_built_entity event, limiting it to only be received when a `"fast-inserter"` is built
|
|
2175
|
+
script.on_event(defines.events.on_built_entity,
|
|
2176
|
+
function(event) game.print("Gotta go fast!") end,
|
|
2177
|
+
{{filter = "name", name = "fast-inserter"}})
|
|
2142
2178
|
```
|
|
2143
2179
|
*/
|
|
2144
2180
|
on_event(this: void, event: defines.events.on_player_fast_transferred, handler: ((this: void, arg0: runtime.on_player_fast_transferred) => any) | nil, filters?: EventFilter): void;
|
|
@@ -4341,7 +4377,7 @@ interface LuaBootstrap {
|
|
|
4341
4377
|
* @param tick The nth-tick(s) to invoke the handler on. Passing `nil` as the only parameter will unregister all nth-tick handlers.
|
|
4342
4378
|
* @param handler The handler to run. Passing `nil` will unregister it for the provided nth-tick(s).
|
|
4343
4379
|
*/
|
|
4344
|
-
on_nth_tick(this: void, tick:
|
|
4380
|
+
on_nth_tick(this: void, tick: uint32 | uint32[] | nil, handler: ((this: void, arg0: NthTickEventData) => any) | nil): void;
|
|
4345
4381
|
/**
|
|
4346
4382
|
* @param table.entity The entity that was built.
|
|
4347
4383
|
*/
|
|
@@ -4353,7 +4389,7 @@ interface LuaBootstrap {
|
|
|
4353
4389
|
* @param table.message The chat message to send.
|
|
4354
4390
|
*/
|
|
4355
4391
|
raise_console_chat(this: void, table: {
|
|
4356
|
-
player_index:
|
|
4392
|
+
player_index: uint32;
|
|
4357
4393
|
message: string;
|
|
4358
4394
|
}): void;
|
|
4359
4395
|
/**
|
|
@@ -4386,10 +4422,10 @@ interface LuaBootstrap {
|
|
|
4386
4422
|
* @param table.count The amount of offers purchased.
|
|
4387
4423
|
*/
|
|
4388
4424
|
raise_market_item_purchased(this: void, table: {
|
|
4389
|
-
player_index:
|
|
4425
|
+
player_index: uint32;
|
|
4390
4426
|
market: LuaEntity;
|
|
4391
|
-
offer_index:
|
|
4392
|
-
count:
|
|
4427
|
+
offer_index: uint32;
|
|
4428
|
+
count: uint32;
|
|
4393
4429
|
}): void;
|
|
4394
4430
|
/**
|
|
4395
4431
|
* @param table.item_stack The item that has been crafted.
|
|
@@ -4398,7 +4434,7 @@ interface LuaBootstrap {
|
|
|
4398
4434
|
*/
|
|
4399
4435
|
raise_player_crafted_item(this: void, table: {
|
|
4400
4436
|
item_stack: LuaItemStack;
|
|
4401
|
-
player_index:
|
|
4437
|
+
player_index: uint32;
|
|
4402
4438
|
recipe: RecipeID;
|
|
4403
4439
|
}): void;
|
|
4404
4440
|
/**
|
|
@@ -4408,7 +4444,7 @@ interface LuaBootstrap {
|
|
|
4408
4444
|
* @param table.is_split Whether the transfer was a split action (half stack).
|
|
4409
4445
|
*/
|
|
4410
4446
|
raise_player_fast_transferred(this: void, table: {
|
|
4411
|
-
player_index:
|
|
4447
|
+
player_index: uint32;
|
|
4412
4448
|
entity: LuaEntity;
|
|
4413
4449
|
from_player: boolean;
|
|
4414
4450
|
is_split: boolean;
|
|
@@ -4444,7 +4480,7 @@ interface LuaBootstrap {
|
|
|
4444
4480
|
* @param table.tiles The tiles that have been changed.
|
|
4445
4481
|
*/
|
|
4446
4482
|
raise_script_set_tiles(this: void, table: {
|
|
4447
|
-
surface_index:
|
|
4483
|
+
surface_index: uint32;
|
|
4448
4484
|
tiles: Tile[];
|
|
4449
4485
|
}): void;
|
|
4450
4486
|
/**
|
|
@@ -4644,7 +4680,7 @@ interface LuaBurner {
|
|
|
4644
4680
|
* Prototype of a burner energy source.
|
|
4645
4681
|
*/
|
|
4646
4682
|
interface LuaBurnerPrototype {
|
|
4647
|
-
readonly burnt_inventory_size:
|
|
4683
|
+
readonly burnt_inventory_size: uint32;
|
|
4648
4684
|
readonly effectivity: double;
|
|
4649
4685
|
/**
|
|
4650
4686
|
* The table of emissions of this energy source in `pollution/Joule`, indexed by pollutant type. Multiplying it by energy consumption in `Watt` gives `pollution/second`.
|
|
@@ -4654,7 +4690,7 @@ interface LuaBurnerPrototype {
|
|
|
4654
4690
|
* The value in the dictionary is meaningless and exists just to allow for easy lookup.
|
|
4655
4691
|
*/
|
|
4656
4692
|
readonly fuel_categories: Record<string, true>;
|
|
4657
|
-
readonly fuel_inventory_size:
|
|
4693
|
+
readonly fuel_inventory_size: uint32;
|
|
4658
4694
|
readonly initial_fuel?: LuaItemPrototype;
|
|
4659
4695
|
readonly initial_fuel_percent: double;
|
|
4660
4696
|
/**
|
|
@@ -4770,11 +4806,11 @@ interface LuaCircuitNetwork {
|
|
|
4770
4806
|
* @param signal The signal to read.
|
|
4771
4807
|
* @returns The current value of the signal.
|
|
4772
4808
|
*/
|
|
4773
|
-
get_signal(this: void, signal: SignalID):
|
|
4809
|
+
get_signal(this: void, signal: SignalID): int32;
|
|
4774
4810
|
/**
|
|
4775
4811
|
* The number of circuits connected to this network.
|
|
4776
4812
|
*/
|
|
4777
|
-
readonly connected_circuit_count:
|
|
4813
|
+
readonly connected_circuit_count: uint32;
|
|
4778
4814
|
/**
|
|
4779
4815
|
* The entity this circuit network reference is associated with.
|
|
4780
4816
|
*/
|
|
@@ -4782,7 +4818,7 @@ interface LuaCircuitNetwork {
|
|
|
4782
4818
|
/**
|
|
4783
4819
|
* The circuit networks ID.
|
|
4784
4820
|
*/
|
|
4785
|
-
readonly network_id:
|
|
4821
|
+
readonly network_id: uint32;
|
|
4786
4822
|
/**
|
|
4787
4823
|
* 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.
|
|
4788
4824
|
*/
|
|
@@ -4822,7 +4858,7 @@ interface LuaCombinatorControlBehavior extends LuaControlBehavior {
|
|
|
4822
4858
|
* Gets the value of a specific signal sent by this combinator behavior last tick or `nil` if the signal didn't exist.
|
|
4823
4859
|
* @param signal The signal to get
|
|
4824
4860
|
*/
|
|
4825
|
-
get_signal_last_tick(this: void, signal: SignalID):
|
|
4861
|
+
get_signal_last_tick(this: void, signal: SignalID): int32 | null;
|
|
4826
4862
|
/**
|
|
4827
4863
|
* The circuit network signals sent by this combinator last tick.
|
|
4828
4864
|
*/
|
|
@@ -4981,7 +5017,7 @@ interface LuaCommandable {
|
|
|
4981
5017
|
/**
|
|
4982
5018
|
* Unique identifier of this commandable.
|
|
4983
5019
|
*/
|
|
4984
|
-
readonly unique_id:
|
|
5020
|
+
readonly unique_id: uint32;
|
|
4985
5021
|
/**
|
|
4986
5022
|
* 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.
|
|
4987
5023
|
*/
|
|
@@ -5001,13 +5037,13 @@ interface LuaConstantCombinatorControlBehavior extends LuaControlBehavior {
|
|
|
5001
5037
|
* Gets section on the selected index, if it exists.
|
|
5002
5038
|
* @param section_index Index of the section.
|
|
5003
5039
|
*/
|
|
5004
|
-
get_section(this: void, section_index:
|
|
5040
|
+
get_section(this: void, section_index: uint32): LuaLogisticSection | null;
|
|
5005
5041
|
/**
|
|
5006
5042
|
* Removes the given logistic section if possible. Removal may fail if the section index is out of range or the section is not {@link manual | runtime:LuaLogisticSection::is_manual}.
|
|
5007
5043
|
* @param section_index Index of the section.
|
|
5008
5044
|
* @returns Whether section was removed.
|
|
5009
5045
|
*/
|
|
5010
|
-
remove_section(this: void, section_index:
|
|
5046
|
+
remove_section(this: void, section_index: uint32): boolean;
|
|
5011
5047
|
/**
|
|
5012
5048
|
* Turns this constant combinator on and off.
|
|
5013
5049
|
*/
|
|
@@ -5023,7 +5059,7 @@ interface LuaConstantCombinatorControlBehavior extends LuaControlBehavior {
|
|
|
5023
5059
|
/**
|
|
5024
5060
|
* Amount of logistic sections this constant combinator has.
|
|
5025
5061
|
*/
|
|
5026
|
-
readonly sections_count:
|
|
5062
|
+
readonly sections_count: uint32;
|
|
5027
5063
|
/**
|
|
5028
5064
|
* 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.
|
|
5029
5065
|
*/
|
|
@@ -5058,10 +5094,10 @@ interface LuaControl {
|
|
|
5058
5094
|
* @returns The count that was actually started crafting.
|
|
5059
5095
|
*/
|
|
5060
5096
|
begin_crafting(this: void, table: {
|
|
5061
|
-
count:
|
|
5097
|
+
count: uint32;
|
|
5062
5098
|
recipe: RecipeID;
|
|
5063
5099
|
silent?: boolean;
|
|
5064
|
-
}):
|
|
5100
|
+
}): uint32;
|
|
5065
5101
|
/**
|
|
5066
5102
|
* Can at least some items be inserted?
|
|
5067
5103
|
* @param items Items that would be inserted.
|
|
@@ -5089,8 +5125,8 @@ interface LuaControl {
|
|
|
5089
5125
|
* @param table.count The count to cancel crafting.
|
|
5090
5126
|
*/
|
|
5091
5127
|
cancel_crafting(this: void, table: {
|
|
5092
|
-
index:
|
|
5093
|
-
count:
|
|
5128
|
+
index: uint32;
|
|
5129
|
+
count: uint32;
|
|
5094
5130
|
}): void;
|
|
5095
5131
|
/**
|
|
5096
5132
|
* Removes the arrow created by `set_gui_arrow`.
|
|
@@ -5125,7 +5161,7 @@ interface LuaControl {
|
|
|
5125
5161
|
* @param recipe The recipe.
|
|
5126
5162
|
* @returns The count that can be crafted.
|
|
5127
5163
|
*/
|
|
5128
|
-
get_craftable_count(this: void, recipe: RecipeID):
|
|
5164
|
+
get_craftable_count(this: void, recipe: RecipeID): uint32;
|
|
5129
5165
|
/**
|
|
5130
5166
|
* Get an inventory belonging to this entity. This can be either the "main" inventory or some auxiliary one, like the module slots or logistic trash slots.
|
|
5131
5167
|
*
|
|
@@ -5141,7 +5177,7 @@ interface LuaControl {
|
|
|
5141
5177
|
* Get the number of all or some items in this entity.
|
|
5142
5178
|
* @param item The item to count. If not specified, count all items.
|
|
5143
5179
|
*/
|
|
5144
|
-
get_item_count(this: void, item?: ItemFilter):
|
|
5180
|
+
get_item_count(this: void, item?: ItemFilter): uint32;
|
|
5145
5181
|
/**
|
|
5146
5182
|
* Gets the main inventory for this character or player if this is a character or player.
|
|
5147
5183
|
* @returns The inventory or `nil` if this entity is not a character or player.
|
|
@@ -5167,7 +5203,7 @@ interface LuaControl {
|
|
|
5167
5203
|
* @param items The items to insert.
|
|
5168
5204
|
* @returns The number of items that were actually inserted.
|
|
5169
5205
|
*/
|
|
5170
|
-
insert(this: void, items: ItemStackIdentification):
|
|
5206
|
+
insert(this: void, items: ItemStackIdentification): uint32;
|
|
5171
5207
|
/**
|
|
5172
5208
|
* Returns whether the player is holding a blueprint. This takes both blueprint items as well as blueprint records from the blueprint library into account.
|
|
5173
5209
|
*
|
|
@@ -5213,7 +5249,7 @@ interface LuaControl {
|
|
|
5213
5249
|
* @param items The items to remove.
|
|
5214
5250
|
* @returns The number of items that were actually removed.
|
|
5215
5251
|
*/
|
|
5216
|
-
remove_item(this: void, items: ItemStackIdentification):
|
|
5252
|
+
remove_item(this: void, items: ItemStackIdentification): uint32;
|
|
5217
5253
|
/**
|
|
5218
5254
|
* Sets if this character or player is driving. Returns if the player or character is still driving.
|
|
5219
5255
|
* @param driving True for enter-vehicle, false for leave.
|
|
@@ -5248,7 +5284,7 @@ interface LuaControl {
|
|
|
5248
5284
|
/**
|
|
5249
5285
|
* The build distance of this character or max uint when not a character or player connected to a character.
|
|
5250
5286
|
*/
|
|
5251
|
-
readonly build_distance:
|
|
5287
|
+
readonly build_distance: uint32;
|
|
5252
5288
|
/**
|
|
5253
5289
|
* The cargo pod the player is currently sitting in or the cargo pod attached to this rocket silo.
|
|
5254
5290
|
*/
|
|
@@ -5260,7 +5296,7 @@ interface LuaControl {
|
|
|
5260
5296
|
/**
|
|
5261
5297
|
* When called on a {@link LuaPlayer | runtime:LuaPlayer}, it must be associated with a character (see {@link LuaPlayer::character | runtime:LuaPlayer::character}).
|
|
5262
5298
|
*/
|
|
5263
|
-
character_build_distance_bonus:
|
|
5299
|
+
character_build_distance_bonus: uint32;
|
|
5264
5300
|
/**
|
|
5265
5301
|
* When called on a {@link LuaPlayer | runtime:LuaPlayer}, it must be associated with a character (see {@link LuaPlayer::character | runtime:LuaPlayer::character}).
|
|
5266
5302
|
*/
|
|
@@ -5272,23 +5308,23 @@ interface LuaControl {
|
|
|
5272
5308
|
/**
|
|
5273
5309
|
* When called on a {@link LuaPlayer | runtime:LuaPlayer}, it must be associated with a character (see {@link LuaPlayer::character | runtime:LuaPlayer::character}).
|
|
5274
5310
|
*/
|
|
5275
|
-
character_inventory_slots_bonus:
|
|
5311
|
+
character_inventory_slots_bonus: uint32;
|
|
5276
5312
|
/**
|
|
5277
5313
|
* When called on a {@link LuaPlayer | runtime:LuaPlayer}, it must be associated with a character (see {@link LuaPlayer::character | runtime:LuaPlayer::character}).
|
|
5278
5314
|
*/
|
|
5279
|
-
character_item_drop_distance_bonus:
|
|
5315
|
+
character_item_drop_distance_bonus: uint32;
|
|
5280
5316
|
/**
|
|
5281
5317
|
* When called on a {@link LuaPlayer | runtime:LuaPlayer}, it must be associated with a character (see {@link LuaPlayer::character | runtime:LuaPlayer::character}).
|
|
5282
5318
|
*/
|
|
5283
|
-
character_item_pickup_distance_bonus:
|
|
5319
|
+
character_item_pickup_distance_bonus: uint32;
|
|
5284
5320
|
/**
|
|
5285
5321
|
* When called on a {@link LuaPlayer | runtime:LuaPlayer}, it must be associated with a character (see {@link LuaPlayer::character | runtime:LuaPlayer::character}).
|
|
5286
5322
|
*/
|
|
5287
|
-
character_loot_pickup_distance_bonus:
|
|
5323
|
+
character_loot_pickup_distance_bonus: uint32;
|
|
5288
5324
|
/**
|
|
5289
5325
|
* When called on a {@link LuaPlayer | runtime:LuaPlayer}, it must be associated with a character (see {@link LuaPlayer::character | runtime:LuaPlayer::character}).
|
|
5290
5326
|
*/
|
|
5291
|
-
character_maximum_following_robot_count_bonus:
|
|
5327
|
+
character_maximum_following_robot_count_bonus: uint32;
|
|
5292
5328
|
/**
|
|
5293
5329
|
* The current mining progress between 0 and 1 of this character, or 0 if they aren't mining.
|
|
5294
5330
|
*/
|
|
@@ -5300,11 +5336,11 @@ interface LuaControl {
|
|
|
5300
5336
|
/**
|
|
5301
5337
|
* When called on a {@link LuaPlayer | runtime:LuaPlayer}, it must be associated with a character (see {@link LuaPlayer::character | runtime:LuaPlayer::character}).
|
|
5302
5338
|
*/
|
|
5303
|
-
character_reach_distance_bonus:
|
|
5339
|
+
character_reach_distance_bonus: uint32;
|
|
5304
5340
|
/**
|
|
5305
5341
|
* When called on a {@link LuaPlayer | runtime:LuaPlayer}, it must be associated with a character (see {@link LuaPlayer::character | runtime:LuaPlayer::character}).
|
|
5306
5342
|
*/
|
|
5307
|
-
character_resource_reach_distance_bonus:
|
|
5343
|
+
character_resource_reach_distance_bonus: uint32;
|
|
5308
5344
|
/**
|
|
5309
5345
|
* The current movement speed of this character, including effects from exoskeletons, tiles, stickers and shooting.
|
|
5310
5346
|
*/
|
|
@@ -5318,7 +5354,7 @@ interface LuaControl {
|
|
|
5318
5354
|
/**
|
|
5319
5355
|
* When called on a {@link LuaPlayer | runtime:LuaPlayer}, it must be associated with a character (see {@link LuaPlayer::character | runtime:LuaPlayer::character}).
|
|
5320
5356
|
*/
|
|
5321
|
-
character_trash_slot_count_bonus:
|
|
5357
|
+
character_trash_slot_count_bonus: uint32;
|
|
5322
5358
|
/**
|
|
5323
5359
|
* When `true` hand crafting is free and instant.
|
|
5324
5360
|
*/
|
|
@@ -5334,7 +5370,7 @@ interface LuaControl {
|
|
|
5334
5370
|
/**
|
|
5335
5371
|
* Size of the crafting queue.
|
|
5336
5372
|
*/
|
|
5337
|
-
readonly crafting_queue_size:
|
|
5373
|
+
readonly crafting_queue_size: uint32;
|
|
5338
5374
|
/**
|
|
5339
5375
|
* The ghost prototype in the player's cursor.
|
|
5340
5376
|
*
|
|
@@ -5368,7 +5404,7 @@ interface LuaControl {
|
|
|
5368
5404
|
/**
|
|
5369
5405
|
* The item drop distance of this character or max uint when not a character or player connected to a character.
|
|
5370
5406
|
*/
|
|
5371
|
-
readonly drop_item_distance:
|
|
5407
|
+
readonly drop_item_distance: uint32;
|
|
5372
5408
|
/**
|
|
5373
5409
|
* The current flight height for this player or character entity.
|
|
5374
5410
|
*
|
|
@@ -5393,7 +5429,7 @@ interface LuaControl {
|
|
|
5393
5429
|
/**
|
|
5394
5430
|
* Unique {@link index | runtime:LuaForce::index} (ID) associated with the force of this entity.
|
|
5395
5431
|
*/
|
|
5396
|
-
readonly force_index:
|
|
5432
|
+
readonly force_index: uint32;
|
|
5397
5433
|
/**
|
|
5398
5434
|
* The space platform hub the player is currently sitting in.
|
|
5399
5435
|
*/
|
|
@@ -5451,7 +5487,7 @@ interface LuaControl {
|
|
|
5451
5487
|
/**
|
|
5452
5488
|
* The reach distance of this character or max uint when not a character or player connected to a character.
|
|
5453
5489
|
*/
|
|
5454
|
-
readonly reach_distance:
|
|
5490
|
+
readonly reach_distance: uint32;
|
|
5455
5491
|
/**
|
|
5456
5492
|
* The current render position of the entity.
|
|
5457
5493
|
*/
|
|
@@ -5501,7 +5537,7 @@ interface LuaControl {
|
|
|
5501
5537
|
/**
|
|
5502
5538
|
* Unique {@link index | runtime:LuaSurface::index} (ID) associated with the surface this entity is currently on.
|
|
5503
5539
|
*/
|
|
5504
|
-
readonly surface_index:
|
|
5540
|
+
readonly surface_index: uint32;
|
|
5505
5541
|
/**
|
|
5506
5542
|
* The vehicle the player is currently sitting in.
|
|
5507
5543
|
*/
|
|
@@ -5526,7 +5562,7 @@ interface LuaControl {
|
|
|
5526
5562
|
}
|
|
5527
5563
|
type LuaControlSetGuiArrowParams = BaseLuaControlSetGuiArrowParams | LuaControlSetGuiArrowParamsCraftingQueue | LuaControlSetGuiArrowParamsEntity | LuaControlSetGuiArrowParamsItemStack | LuaControlSetGuiArrowParamsPosition;
|
|
5528
5564
|
interface BaseLuaControlSetGuiArrowParams {
|
|
5529
|
-
'margin':
|
|
5565
|
+
'margin': uint32;
|
|
5530
5566
|
/**
|
|
5531
5567
|
* Where to point to. This field determines what other fields are mandatory.
|
|
5532
5568
|
*/
|
|
@@ -5544,7 +5580,7 @@ interface LuaControlSetGuiArrowParamsCraftingQueue extends BaseLuaControlSetGuiA
|
|
|
5544
5580
|
/**
|
|
5545
5581
|
* Index in the crafting queue to point to.
|
|
5546
5582
|
*/
|
|
5547
|
-
'crafting_queueindex':
|
|
5583
|
+
'crafting_queueindex': uint32;
|
|
5548
5584
|
}
|
|
5549
5585
|
/**
|
|
5550
5586
|
*
|
|
@@ -5573,7 +5609,7 @@ interface LuaControlSetGuiArrowParamsItemStack extends BaseLuaControlSetGuiArrow
|
|
|
5573
5609
|
/**
|
|
5574
5610
|
* Which stack to point to.
|
|
5575
5611
|
*/
|
|
5576
|
-
'item_stack_index':
|
|
5612
|
+
'item_stack_index': uint32;
|
|
5577
5613
|
'source': 'player' | 'target' | 'player-quickbar';
|
|
5578
5614
|
}
|
|
5579
5615
|
/**
|
|
@@ -5622,11 +5658,16 @@ interface LuaCustomChartTag {
|
|
|
5622
5658
|
/**
|
|
5623
5659
|
* This tag's icon, if it has one. Writing `nil` removes it.
|
|
5624
5660
|
*/
|
|
5625
|
-
icon
|
|
5661
|
+
icon?: SignalID;
|
|
5626
5662
|
/**
|
|
5627
5663
|
* The player who last edited this tag.
|
|
5628
5664
|
*/
|
|
5629
|
-
last_user?: LuaPlayer;
|
|
5665
|
+
readonly last_user?: LuaPlayer;
|
|
5666
|
+
/**
|
|
5667
|
+
* The player who last edited this tag.
|
|
5668
|
+
* @customName last_user
|
|
5669
|
+
*/
|
|
5670
|
+
last_user_write?: PlayerIdentification;
|
|
5630
5671
|
/**
|
|
5631
5672
|
* 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.
|
|
5632
5673
|
*/
|
|
@@ -5634,15 +5675,15 @@ interface LuaCustomChartTag {
|
|
|
5634
5675
|
/**
|
|
5635
5676
|
* The position of this tag.
|
|
5636
5677
|
*/
|
|
5637
|
-
|
|
5678
|
+
position: MapPosition;
|
|
5638
5679
|
/**
|
|
5639
5680
|
* The surface this tag belongs to.
|
|
5640
5681
|
*/
|
|
5641
|
-
|
|
5682
|
+
surface: LuaSurface;
|
|
5642
5683
|
/**
|
|
5643
5684
|
* The unique ID for this tag on this force.
|
|
5644
5685
|
*/
|
|
5645
|
-
readonly tag_number:
|
|
5686
|
+
readonly tag_number: uint32;
|
|
5646
5687
|
text: string;
|
|
5647
5688
|
/**
|
|
5648
5689
|
* 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.
|
|
@@ -5778,7 +5819,7 @@ interface LuaCustomTable {
|
|
|
5778
5819
|
/**
|
|
5779
5820
|
* Number of elements in this table.
|
|
5780
5821
|
*/
|
|
5781
|
-
length: LuaLengthMethod<
|
|
5822
|
+
length: LuaLengthMethod<uint32>;
|
|
5782
5823
|
}
|
|
5783
5824
|
/**
|
|
5784
5825
|
* Prototype of a damage.
|
|
@@ -5802,45 +5843,45 @@ interface LuaDeciderCombinatorControlBehavior extends LuaCombinatorControlBehavi
|
|
|
5802
5843
|
* @param condition New condition to insert.
|
|
5803
5844
|
* @param index Index to insert new condition at. If not specified, appends to the end.
|
|
5804
5845
|
*/
|
|
5805
|
-
add_condition(this: void, condition: DeciderCombinatorCondition, index?:
|
|
5846
|
+
add_condition(this: void, condition: DeciderCombinatorCondition, index?: uint32): void;
|
|
5806
5847
|
/**
|
|
5807
5848
|
* Adds a new output.
|
|
5808
5849
|
* @param output New output to insert.
|
|
5809
5850
|
* @param index Index to insert new output at. If not specified, appends to the end.
|
|
5810
5851
|
*/
|
|
5811
|
-
add_output(this: void, output: DeciderCombinatorOutput, index?:
|
|
5852
|
+
add_output(this: void, output: DeciderCombinatorOutput, index?: uint32): void;
|
|
5812
5853
|
/**
|
|
5813
5854
|
* Gets the condition at `index`.
|
|
5814
5855
|
* @param index Index of condition to get.
|
|
5815
5856
|
*/
|
|
5816
|
-
get_condition(this: void, index:
|
|
5857
|
+
get_condition(this: void, index: uint32): DeciderCombinatorCondition;
|
|
5817
5858
|
/**
|
|
5818
5859
|
* Gets the output at `index`.
|
|
5819
5860
|
* @param index Index of output to get.
|
|
5820
5861
|
*/
|
|
5821
|
-
get_output(this: void, index:
|
|
5862
|
+
get_output(this: void, index: uint32): DeciderCombinatorOutput;
|
|
5822
5863
|
/**
|
|
5823
5864
|
* Removes the condition at `index`.
|
|
5824
5865
|
* @param index Index of condition to remove.
|
|
5825
5866
|
*/
|
|
5826
|
-
remove_condition(this: void, index:
|
|
5867
|
+
remove_condition(this: void, index: uint32): void;
|
|
5827
5868
|
/**
|
|
5828
5869
|
* Removes the output at `index`.
|
|
5829
5870
|
* @param index Index of output to remove.
|
|
5830
5871
|
*/
|
|
5831
|
-
remove_output(this: void, index:
|
|
5872
|
+
remove_output(this: void, index: uint32): void;
|
|
5832
5873
|
/**
|
|
5833
5874
|
* Sets the condition at `index`.
|
|
5834
5875
|
* @param index Index of condition to modify.
|
|
5835
5876
|
* @param condition Data to set selected condition to.
|
|
5836
5877
|
*/
|
|
5837
|
-
set_condition(this: void, index:
|
|
5878
|
+
set_condition(this: void, index: uint32, condition: DeciderCombinatorCondition): void;
|
|
5838
5879
|
/**
|
|
5839
5880
|
* Sets the output at `index`.
|
|
5840
5881
|
* @param index Index of output to modify.
|
|
5841
5882
|
* @param output Data to set selected output to.
|
|
5842
5883
|
*/
|
|
5843
|
-
set_output(this: void, index:
|
|
5884
|
+
set_output(this: void, index: uint32, output: DeciderCombinatorOutput): void;
|
|
5844
5885
|
/**
|
|
5845
5886
|
* 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.
|
|
5846
5887
|
*/
|
|
@@ -5848,7 +5889,7 @@ interface LuaDeciderCombinatorControlBehavior extends LuaCombinatorControlBehavi
|
|
|
5848
5889
|
/**
|
|
5849
5890
|
* This decider combinator's parameters. Writing `nil` clears the combinator's parameters.
|
|
5850
5891
|
*/
|
|
5851
|
-
parameters
|
|
5892
|
+
parameters?: DeciderCombinatorParameters;
|
|
5852
5893
|
/**
|
|
5853
5894
|
* 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.
|
|
5854
5895
|
*/
|
|
@@ -5879,7 +5920,7 @@ interface LuaDecorativePrototype extends LuaPrototypeBase {
|
|
|
5879
5920
|
readonly object_name: string;
|
|
5880
5921
|
readonly placed_effect?: TriggerEffectItem[];
|
|
5881
5922
|
readonly render_layer: RenderLayer;
|
|
5882
|
-
readonly target_count:
|
|
5923
|
+
readonly target_count: uint32;
|
|
5883
5924
|
readonly trigger_effect?: TriggerEffectItem[];
|
|
5884
5925
|
/**
|
|
5885
5926
|
* 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.
|
|
@@ -5895,13 +5936,13 @@ interface LuaDisplayPanelControlBehavior extends LuaControlBehavior {
|
|
|
5895
5936
|
* @param index Message index.
|
|
5896
5937
|
* @returns The message definition at the specified index.
|
|
5897
5938
|
*/
|
|
5898
|
-
get_message(this: void, index:
|
|
5939
|
+
get_message(this: void, index: uint32): DisplayPanelMessageDefinition;
|
|
5899
5940
|
/**
|
|
5900
5941
|
* Set the message at the specified index
|
|
5901
5942
|
* @param index Message index. Use `-1` to append new element.
|
|
5902
5943
|
* @param message The message definition for the specified index. Specify `nil` to remove the message.
|
|
5903
5944
|
*/
|
|
5904
|
-
set_message(this: void, index:
|
|
5945
|
+
set_message(this: void, index: uint32, message: DisplayPanelMessageDefinition): void;
|
|
5905
5946
|
/**
|
|
5906
5947
|
* The full list of configured messages.
|
|
5907
5948
|
*/
|
|
@@ -5980,7 +6021,7 @@ interface LuaEntity extends LuaControl {
|
|
|
5980
6021
|
* @param index The item stack index
|
|
5981
6022
|
* @param filter The item filter
|
|
5982
6023
|
*/
|
|
5983
|
-
can_set_inventory_filter(this: void, inventory_index: defines.inventory, index:
|
|
6024
|
+
can_set_inventory_filter(this: void, inventory_index: defines.inventory, index: uint32, filter: ItemFilter): boolean;
|
|
5984
6025
|
/**
|
|
5985
6026
|
* Whether this character can shoot the given entity or position.
|
|
5986
6027
|
*/
|
|
@@ -6082,7 +6123,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6082
6123
|
do_cliff_correction?: boolean;
|
|
6083
6124
|
raise_destroy?: boolean;
|
|
6084
6125
|
player?: PlayerIdentification;
|
|
6085
|
-
undo_index?:
|
|
6126
|
+
undo_index?: uint32;
|
|
6086
6127
|
}): boolean;
|
|
6087
6128
|
/**
|
|
6088
6129
|
* Immediately kills the entity. Does nothing if the entity doesn't have health.
|
|
@@ -6201,17 +6242,17 @@ interface LuaEntity extends LuaControl {
|
|
|
6201
6242
|
* @param slot_index Index of the slot to get the filter for.
|
|
6202
6243
|
* @returns The filter, or `nil` if the given slot has no filter.
|
|
6203
6244
|
*/
|
|
6204
|
-
get_filter(this: void, slot_index:
|
|
6245
|
+
get_filter(this: void, slot_index: uint32): (ItemFilter | EntityID | AsteroidChunkID) | null;
|
|
6205
6246
|
/**
|
|
6206
|
-
* Gets fluid of the
|
|
6247
|
+
* Gets fluid of the index-th fluid storage. This includes fluidbox and non-fluidbox fluid storages like fluid wagon contents. Refer to {@link LuaEntity::fluids_count | runtime:LuaEntity::fluids_count} for more information on available storages.
|
|
6207
6248
|
* @param index Fluid storage index. Valid values are from 1 up to {@link LuaEntity::fluids_count | runtime:LuaEntity::fluids_count}.
|
|
6208
|
-
* @returns Fluid in this storage. nil if fluid storage is empty.
|
|
6249
|
+
* @returns Fluid in this storage. `nil` if fluid storage is empty.
|
|
6209
6250
|
*/
|
|
6210
|
-
get_fluid(this: void, index:
|
|
6251
|
+
get_fluid(this: void, index: uint32): Fluid | null;
|
|
6211
6252
|
/**
|
|
6212
6253
|
* Get amounts of all fluids in this entity.
|
|
6213
6254
|
*
|
|
6214
|
-
* If information about fluid temperatures is required, {@link LuaEntity::fluidbox | runtime:LuaEntity::fluidbox} should be used instead.
|
|
6255
|
+
* If information about fluid temperatures is required, {@link LuaEntity::get_fluid | runtime:LuaEntity::get_fluid} or {@link LuaEntity::fluidbox | runtime:LuaEntity::fluidbox} should be used instead.
|
|
6215
6256
|
* @returns The amounts, indexed by fluid names.
|
|
6216
6257
|
*/
|
|
6217
6258
|
get_fluid_contents(this: void): Record<string, FluidAmount>;
|
|
@@ -6252,7 +6293,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6252
6293
|
* Gets the filter for this infinity container at the given index, or `nil` if the filter index doesn't exist or is empty.
|
|
6253
6294
|
* @param index The index to get.
|
|
6254
6295
|
*/
|
|
6255
|
-
get_infinity_container_filter(this: void, index:
|
|
6296
|
+
get_infinity_container_filter(this: void, index: uint32): InfinityInventoryFilter | null;
|
|
6256
6297
|
/**
|
|
6257
6298
|
* Gets the filter for this infinity pipe, or `nil` if the filter is empty.
|
|
6258
6299
|
*/
|
|
@@ -6260,13 +6301,13 @@ interface LuaEntity extends LuaControl {
|
|
|
6260
6301
|
/**
|
|
6261
6302
|
* The same as {@link LuaInventory::get_bar | runtime:LuaInventory::get_bar} but also works for ghosts where the inventory is not available through {@link LuaControl::get_inventory | runtime:LuaControl::get_inventory}.
|
|
6262
6303
|
*/
|
|
6263
|
-
get_inventory_bar(this: void, inventory_index: defines.inventory):
|
|
6304
|
+
get_inventory_bar(this: void, inventory_index: defines.inventory): uint32;
|
|
6264
6305
|
/**
|
|
6265
6306
|
* The same as {@link LuaInventory::get_filter | runtime:LuaInventory::get_filter} but also works for ghosts where the inventory is not available through {@link LuaControl::get_inventory | runtime:LuaControl::get_inventory}.
|
|
6266
6307
|
* @param index The item stack index
|
|
6267
6308
|
* @returns The current filter or `nil` if none.
|
|
6268
6309
|
*/
|
|
6269
|
-
get_inventory_filter(this: void, inventory_index: defines.inventory, index:
|
|
6310
|
+
get_inventory_filter(this: void, inventory_index: defines.inventory, index: uint32): ItemFilter | null;
|
|
6270
6311
|
/**
|
|
6271
6312
|
* Gets the inventory size override of the selected inventory if size override was set using {@link set_inventory_size_override | runtime:LuaEntity::set_inventory_size_override}.
|
|
6272
6313
|
*/
|
|
@@ -6278,7 +6319,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6278
6319
|
* @returns [1] - Position along the transport line where item should be dropped.
|
|
6279
6320
|
*/
|
|
6280
6321
|
get_item_insert_specification(this: void, position: MapPosition): LuaMultiReturn<[
|
|
6281
|
-
|
|
6322
|
+
uint32,
|
|
6282
6323
|
float
|
|
6283
6324
|
]>;
|
|
6284
6325
|
/**
|
|
@@ -6286,7 +6327,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6286
6327
|
* @param index Index of the transport line. Transport lines are 1-indexed.
|
|
6287
6328
|
* @param position Linear position along the transport line. Clamped to the transport line range.
|
|
6288
6329
|
*/
|
|
6289
|
-
get_line_item_position(this: void, index:
|
|
6330
|
+
get_line_item_position(this: void, index: uint32, position: float): MapPosition;
|
|
6290
6331
|
/**
|
|
6291
6332
|
* Gets all the `LuaLogisticPoint`s that this entity owns. Optionally returns only the point specified by the index parameter.
|
|
6292
6333
|
* @param index If provided, this method only returns the `LuaLogisticPoint` specified by this index, or `nil` if it doesn't exist.
|
|
@@ -6303,11 +6344,17 @@ interface LuaEntity extends LuaControl {
|
|
|
6303
6344
|
/**
|
|
6304
6345
|
* Get the maximum transport line index of a belt or belt connectable entity.
|
|
6305
6346
|
*/
|
|
6306
|
-
get_max_transport_line_index(this: void):
|
|
6347
|
+
get_max_transport_line_index(this: void): uint32;
|
|
6307
6348
|
/**
|
|
6308
6349
|
* Inventory for storing modules of this entity; `nil` if this entity has no module inventory.
|
|
6309
6350
|
*/
|
|
6310
6351
|
get_module_inventory(this: void): LuaInventory | null;
|
|
6352
|
+
/**
|
|
6353
|
+
* Gets the combined movement vector (direction and speed) of this combat robot or asteroid. The entity moves by this vector each tick.
|
|
6354
|
+
*
|
|
6355
|
+
* Note that for combat robots this does not include the constant drift in the direction they are facing.
|
|
6356
|
+
*/
|
|
6357
|
+
get_movement(this: void): Vector;
|
|
6311
6358
|
/**
|
|
6312
6359
|
* Gets (and or creates if needed) the control behavior of the entity.
|
|
6313
6360
|
* @returns The control behavior or `nil`.
|
|
@@ -6337,9 +6384,9 @@ interface LuaEntity extends LuaControl {
|
|
|
6337
6384
|
* Get the entity ID at the specified position in the turret's priority list.
|
|
6338
6385
|
* @param index The index of the entry to fetch.
|
|
6339
6386
|
*/
|
|
6340
|
-
get_priority_target(this: void, index:
|
|
6387
|
+
get_priority_target(this: void, index: uint32): LuaEntityPrototype | null;
|
|
6341
6388
|
/**
|
|
6342
|
-
* The radius of this entity.
|
|
6389
|
+
* The radius of this entity. The radius is defined as half the distance between the top left corner and bottom right corner of the collision box.
|
|
6343
6390
|
*/
|
|
6344
6391
|
get_radius(this: void): double;
|
|
6345
6392
|
/**
|
|
@@ -6410,7 +6457,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6410
6457
|
* @param extra_wire_connector_id Additional wire connector ID. If specified, signal will be added to the result
|
|
6411
6458
|
* @returns The current value of the signal.
|
|
6412
6459
|
*/
|
|
6413
|
-
get_signal(this: void, signal: SignalID, wire_connector_id: defines.wire_connector_id, extra_wire_connector_id?: defines.wire_connector_id):
|
|
6460
|
+
get_signal(this: void, signal: SignalID, wire_connector_id: defines.wire_connector_id, extra_wire_connector_id?: defines.wire_connector_id): int32;
|
|
6414
6461
|
/**
|
|
6415
6462
|
* Read all signals from the selected wire connector.
|
|
6416
6463
|
* @param wire_connector_id Wire connector ID from which to get the signal
|
|
@@ -6434,7 +6481,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6434
6481
|
* Get a transport line of a belt or belt connectable entity.
|
|
6435
6482
|
* @param index Index of the requested transport line. Transport lines are 1-indexed.
|
|
6436
6483
|
*/
|
|
6437
|
-
get_transport_line(this: void, index:
|
|
6484
|
+
get_transport_line(this: void, index: uint32): LuaTransportLine;
|
|
6438
6485
|
/**
|
|
6439
6486
|
* Returns the new entity prototype and its quality.
|
|
6440
6487
|
* @returns [0] - `nil` if this entity is not marked for upgrade.
|
|
@@ -6566,7 +6613,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6566
6613
|
* @param undo_index The index of the undo item to add this action to. An index of `0` creates a new undo item for it. An index of `1` adds the action to the latest undo action on the stack. Defaults to putting it into the appropriate undo item automatically if one is not specified.
|
|
6567
6614
|
* @returns if the entity was marked for deconstruction.
|
|
6568
6615
|
*/
|
|
6569
|
-
order_deconstruction(this: void, force: ForceID, player?: PlayerIdentification, undo_index?:
|
|
6616
|
+
order_deconstruction(this: void, force: ForceID, player?: PlayerIdentification, undo_index?: uint32): boolean;
|
|
6570
6617
|
/**
|
|
6571
6618
|
* Sets the entity to be upgraded by construction robots.
|
|
6572
6619
|
* @param table.target The prototype of the entity to upgrade to.
|
|
@@ -6579,13 +6626,13 @@ interface LuaEntity extends LuaControl {
|
|
|
6579
6626
|
target: EntityWithQualityID;
|
|
6580
6627
|
force: ForceID;
|
|
6581
6628
|
player?: PlayerIdentification;
|
|
6582
|
-
undo_index?:
|
|
6629
|
+
undo_index?: uint32;
|
|
6583
6630
|
}): boolean;
|
|
6584
6631
|
/**
|
|
6585
6632
|
* Plays a note with the given instrument and note.
|
|
6586
6633
|
* @returns Whether the request is valid. The sound may or may not be played depending on polyphony settings.
|
|
6587
6634
|
*/
|
|
6588
|
-
play_note(this: void, instrument:
|
|
6635
|
+
play_note(this: void, instrument: uint32, note: uint32, stop_playing_sounds?: boolean): boolean;
|
|
6589
6636
|
/**
|
|
6590
6637
|
* Registers the given tree in this agricultural tower.
|
|
6591
6638
|
*
|
|
@@ -6621,7 +6668,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6621
6668
|
* @param offer Index of offer to remove.
|
|
6622
6669
|
* @returns `true` if the offer was successfully removed; `false` when the given index was not valid.
|
|
6623
6670
|
*/
|
|
6624
|
-
remove_market_item(this: void, offer:
|
|
6671
|
+
remove_market_item(this: void, offer: uint32): boolean;
|
|
6625
6672
|
/**
|
|
6626
6673
|
* @param force The force that requests the gate to be closed.
|
|
6627
6674
|
*/
|
|
@@ -6630,7 +6677,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6630
6677
|
* @param force The force that requests the gate to be open.
|
|
6631
6678
|
* @param extra_time Extra ticks to stay open.
|
|
6632
6679
|
*/
|
|
6633
|
-
request_to_open(this: void, force: ForceID, extra_time?:
|
|
6680
|
+
request_to_open(this: void, force: ForceID, extra_time?: uint32): void;
|
|
6634
6681
|
/**
|
|
6635
6682
|
* Revive a ghost, which turns it from a ghost into a real entity or tile.
|
|
6636
6683
|
* @param table.raise_revive If true, and an entity ghost; {@link script_raised_revive | runtime:script_raised_revive} will be called. Else if true, and a tile ghost; {@link script_raised_set_tiles | runtime:script_raised_set_tiles} will be called.
|
|
@@ -6643,7 +6690,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6643
6690
|
raise_revive?: boolean;
|
|
6644
6691
|
overflow?: LuaInventory;
|
|
6645
6692
|
}): LuaMultiReturn<[
|
|
6646
|
-
Record<string,
|
|
6693
|
+
Record<string, uint32> | null,
|
|
6647
6694
|
LuaEntity | null,
|
|
6648
6695
|
LuaEntity | null
|
|
6649
6696
|
]>;
|
|
@@ -6676,16 +6723,16 @@ interface LuaEntity extends LuaControl {
|
|
|
6676
6723
|
* @param index Index of the slot to set the filter for.
|
|
6677
6724
|
* @param filter The item or entity to filter, or `nil` to clear the filter.
|
|
6678
6725
|
*/
|
|
6679
|
-
set_filter(this: void, index:
|
|
6726
|
+
set_filter(this: void, index: uint32, filter?: ItemFilter | ItemWithQualityID | EntityID | AsteroidChunkID): void;
|
|
6680
6727
|
/**
|
|
6681
|
-
* Sets fluid to the
|
|
6728
|
+
* Sets fluid to the index-th fluid storage. This includes fluidbox and non-fluidbox fluid storages like fluid wagon contents. Refer to {@link LuaEntity::fluids_count | runtime:LuaEntity::fluids_count} for more information on available storages.
|
|
6682
6729
|
*
|
|
6683
|
-
* Fluid storages that are part of
|
|
6730
|
+
* Fluid storages that are part of fluidboxes (also available through {@link LuaFluidBox | runtime:LuaFluidBox}) may reject some fluids if they do not match filters or are above the fluidbox volume. To verify how much fluid was set a return value can be used which is the same as value that would be returned by {@link LuaEntity::get_fluid | runtime:LuaEntity::get_fluid}.
|
|
6684
6731
|
* @param index Fluid storage index. Valid values are from 1 up to {@link LuaEntity::fluids_count | runtime:LuaEntity::fluids_count}.
|
|
6685
6732
|
* @param fluid Fluid to set. Fluid storage will be cleared if this is not provided.
|
|
6686
|
-
* @returns Fluid in this storage after it was set. nil if fluid storage is empty.
|
|
6733
|
+
* @returns Fluid in this storage after it was set. `nil` if fluid storage is empty.
|
|
6687
6734
|
*/
|
|
6688
|
-
set_fluid(this: void, index:
|
|
6735
|
+
set_fluid(this: void, index: uint32, fluid?: Fluid): Fluid | null;
|
|
6689
6736
|
/**
|
|
6690
6737
|
* Sets the heat setting for this heat interface.
|
|
6691
6738
|
* @param filter The new setting.
|
|
@@ -6696,7 +6743,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6696
6743
|
* @param index The index to set.
|
|
6697
6744
|
* @param filter The new filter, or `nil` to clear the filter.
|
|
6698
6745
|
*/
|
|
6699
|
-
set_infinity_container_filter(this: void, index:
|
|
6746
|
+
set_infinity_container_filter(this: void, index: uint32, filter: InfinityInventoryFilter | nil): void;
|
|
6700
6747
|
/**
|
|
6701
6748
|
* Sets the filter for this infinity pipe.
|
|
6702
6749
|
* @param filter The new filter, or `nil` to clear the filter.
|
|
@@ -6706,19 +6753,27 @@ interface LuaEntity extends LuaControl {
|
|
|
6706
6753
|
* The same as {@link LuaInventory::set_bar | runtime:LuaInventory::set_bar} but also works for ghosts where the inventory is not available through {@link LuaControl::get_inventory | runtime:LuaControl::get_inventory}.
|
|
6707
6754
|
* @param bar The new limit. Omitting this parameter or passing `nil` will clear the limit.
|
|
6708
6755
|
*/
|
|
6709
|
-
set_inventory_bar(this: void, inventory_index: defines.inventory, bar?:
|
|
6756
|
+
set_inventory_bar(this: void, inventory_index: defines.inventory, bar?: uint32): void;
|
|
6710
6757
|
/**
|
|
6711
6758
|
* The same as {@link LuaInventory::set_filter | runtime:LuaInventory::set_filter} but also works for ghosts where the inventory is not available through {@link LuaControl::get_inventory | runtime:LuaControl::get_inventory}.
|
|
6712
6759
|
* @param index The item stack index.
|
|
6713
6760
|
* @param filter The new filter. `nil` erases any existing filter.
|
|
6714
6761
|
* @returns If the filter was allowed to be set.
|
|
6715
6762
|
*/
|
|
6716
|
-
set_inventory_filter(this: void, inventory_index: defines.inventory, index:
|
|
6763
|
+
set_inventory_filter(this: void, inventory_index: defines.inventory, index: uint32, filter: ItemFilter | nil): boolean;
|
|
6717
6764
|
/**
|
|
6718
6765
|
* Sets inventory size override. When set, supported entity will ignore inventory size from prototype and will instead keep inventory size equal to the override. Setting `nil` will restore default inventory size.
|
|
6719
6766
|
* @param overflow Items that would be deleted due to change of inventory size will be transferred to this inventory. Must be a script inventory or inventory of other entity. Inventory references obtained from proxy container are not allowed.
|
|
6720
6767
|
*/
|
|
6721
6768
|
set_inventory_size_override(this: void, inventory_index: defines.inventory, size_override: uint16 | nil, overflow?: LuaInventory): void;
|
|
6769
|
+
/**
|
|
6770
|
+
* Sets the movement direction and movement speed for this combat robot or asteroid.
|
|
6771
|
+
*
|
|
6772
|
+
* Note that for combat robots this does not affect the constant drift in the direction they are facing.
|
|
6773
|
+
* @param direction This normalized form of this vector is used for the movement direction.
|
|
6774
|
+
* @param speed Speed in tiles per tick. Cannot be less than 0.
|
|
6775
|
+
*/
|
|
6776
|
+
set_movement(this: void, direction: Vector, speed: double): void;
|
|
6722
6777
|
/**
|
|
6723
6778
|
* Sets the passenger of this car, spidertron, or cargo pod.
|
|
6724
6779
|
*
|
|
@@ -6731,7 +6786,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6731
6786
|
* @param index The index of the entry to set.
|
|
6732
6787
|
* @param entity_id The name of the entity prototype, or `nil` to clear the entry.
|
|
6733
6788
|
*/
|
|
6734
|
-
set_priority_target(this: void, index:
|
|
6789
|
+
set_priority_target(this: void, index: uint32, entity_id?: EntityID): void;
|
|
6735
6790
|
/**
|
|
6736
6791
|
* Sets the given recipe in this assembly machine.
|
|
6737
6792
|
* @param recipe The new recipe. Writing `nil` clears the recipe, if any.
|
|
@@ -6793,11 +6848,11 @@ interface LuaEntity extends LuaControl {
|
|
|
6793
6848
|
/**
|
|
6794
6849
|
* Deactivating an entity will stop all its operations (car will stop moving, inserters will stop working, fish will stop moving etc).
|
|
6795
6850
|
*
|
|
6796
|
-
*
|
|
6851
|
+
* Writing to this is deprecated and affects only the {@link disabled_by_script | runtime:LuaEntity::disabled_by_script} state.
|
|
6797
6852
|
*
|
|
6798
|
-
*
|
|
6853
|
+
* Reading from this returns `false` if the entity is deactivated in at least one of the following ways: {@link by script | runtime:LuaEntity::disabled_by_script}, {@link by circuit network | runtime:LuaEntity::disabled_by_control_behavior}, {@link by recipe | runtime:LuaEntity::disabled_by_recipe}, {@link by freezing | runtime:LuaEntity::frozen}, or by deconstruction.
|
|
6799
6854
|
*
|
|
6800
|
-
*
|
|
6855
|
+
* Entities that are not active naturally can't be set to be active (setting it to be active will do nothing). Some entities (Corpse, FireFlame, Roboport, RollingStock, dying entities) need to remain active and will ignore writes.
|
|
6801
6856
|
*/
|
|
6802
6857
|
active: boolean;
|
|
6803
6858
|
/**
|
|
@@ -6816,7 +6871,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6816
6871
|
/**
|
|
6817
6872
|
* Count of resource units contained.
|
|
6818
6873
|
*/
|
|
6819
|
-
amount:
|
|
6874
|
+
amount: uint32;
|
|
6820
6875
|
/**
|
|
6821
6876
|
* Whether this land mine is armed.
|
|
6822
6877
|
*/
|
|
@@ -6864,7 +6919,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6864
6919
|
/**
|
|
6865
6920
|
* Number of beacons affecting this effect receiver. Can only be used when the entity has an effect receiver (AssemblingMachine, Furnace, Lab, MiningDrills)
|
|
6866
6921
|
*/
|
|
6867
|
-
readonly beacons_count?:
|
|
6922
|
+
readonly beacons_count?: uint32;
|
|
6868
6923
|
/**
|
|
6869
6924
|
* 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 | runtime:LuaEntity::neighbours} for that.
|
|
6870
6925
|
*/
|
|
@@ -6938,17 +6993,17 @@ interface LuaEntity extends LuaControl {
|
|
|
6938
6993
|
*
|
|
6939
6994
|
* The index is not guaranteed to be valid so it should always be checked first if a player with that index actually exists.
|
|
6940
6995
|
*/
|
|
6941
|
-
character_corpse_player_index:
|
|
6996
|
+
character_corpse_player_index: uint32;
|
|
6942
6997
|
/**
|
|
6943
6998
|
* The tick this character corpse died at.
|
|
6944
6999
|
*/
|
|
6945
|
-
character_corpse_tick_of_death:
|
|
7000
|
+
character_corpse_tick_of_death: uint32;
|
|
6946
7001
|
/**
|
|
6947
7002
|
* The orientation of this cliff.
|
|
6948
7003
|
*/
|
|
6949
7004
|
readonly cliff_orientation: CliffOrientation;
|
|
6950
7005
|
/**
|
|
6951
|
-
* The color of this character, rolling stock, corpse, train stop, simple-entity-with-owner, car, spider-vehicle, or lamp. `nil` if this entity doesn't use custom colors.
|
|
7006
|
+
* The color of this character, rolling stock, corpse, character corpse, train stop, simple-entity-with-owner, car, spider-vehicle, or lamp. `nil` if this entity doesn't use custom colors.
|
|
6952
7007
|
*
|
|
6953
7008
|
* Car color is overridden by the color of the current driver/passenger, if there is one.
|
|
6954
7009
|
*/
|
|
@@ -7048,7 +7103,7 @@ interface LuaEntity extends LuaControl {
|
|
|
7048
7103
|
*/
|
|
7049
7104
|
readonly disabled_by_control_behavior: boolean;
|
|
7050
7105
|
/**
|
|
7051
|
-
* If the
|
|
7106
|
+
* If the assembling machine is disabled by recipe, e.g. due to {@link AssemblingMachinePrototype::disabled_when_recipe_not_researched | prototype:AssemblingMachinePrototype::disabled_when_recipe_not_researched}.
|
|
7052
7107
|
*/
|
|
7053
7108
|
readonly disabled_by_recipe: boolean;
|
|
7054
7109
|
/**
|
|
@@ -7092,7 +7147,7 @@ interface LuaEntity extends LuaControl {
|
|
|
7092
7147
|
*/
|
|
7093
7148
|
readonly effective_speed?: float;
|
|
7094
7149
|
/**
|
|
7095
|
-
* Multiplies the acceleration the
|
|
7150
|
+
* Multiplies the acceleration the car can create for one unit of energy. Defaults to `1`.
|
|
7096
7151
|
*/
|
|
7097
7152
|
effectivity_modifier: float;
|
|
7098
7153
|
/**
|
|
@@ -7116,7 +7171,7 @@ interface LuaEntity extends LuaControl {
|
|
|
7116
7171
|
/**
|
|
7117
7172
|
* Returns the id of the electric network that this entity is connected to, if any.
|
|
7118
7173
|
*/
|
|
7119
|
-
readonly electric_network_id?:
|
|
7174
|
+
readonly electric_network_id?: uint32;
|
|
7120
7175
|
/**
|
|
7121
7176
|
* The electric network statistics for this electric pole.
|
|
7122
7177
|
*/
|
|
@@ -7144,15 +7199,15 @@ interface LuaEntity extends LuaControl {
|
|
|
7144
7199
|
/**
|
|
7145
7200
|
* The number of filter slots this inserter, loader, mining drill, asteroid collector or logistic storage container has. 0 if not one of those entities.
|
|
7146
7201
|
*/
|
|
7147
|
-
readonly filter_slot_count:
|
|
7202
|
+
readonly filter_slot_count: uint32;
|
|
7148
7203
|
/**
|
|
7149
7204
|
* Fluidboxes of this entity.
|
|
7150
7205
|
*/
|
|
7151
7206
|
readonly fluidbox: LuaFluidBox;
|
|
7152
7207
|
/**
|
|
7153
|
-
* Returns count of fluid storages. This includes fluid storages provided by
|
|
7208
|
+
* Returns count of fluid storages. This includes fluid storages provided by fluidboxes but also covers other fluid storages like fluid turret's internal buffer and fluid wagon's fluid since they are not fluidbox and cannot be exposed through {@link LuaFluidBox | runtime:LuaFluidBox}.
|
|
7154
7209
|
*/
|
|
7155
|
-
readonly fluids_count:
|
|
7210
|
+
readonly fluids_count: uint32;
|
|
7156
7211
|
/**
|
|
7157
7212
|
* The follow offset of this spidertron, if any entity is being followed. This is randomized each time the follow entity is set.
|
|
7158
7213
|
*/
|
|
@@ -7234,7 +7289,7 @@ interface LuaEntity extends LuaControl {
|
|
|
7234
7289
|
/**
|
|
7235
7290
|
* The blink interval of this highlight box entity. `0` indicates no blink.
|
|
7236
7291
|
*/
|
|
7237
|
-
highlight_box_blink_interval:
|
|
7292
|
+
highlight_box_blink_interval: uint32;
|
|
7238
7293
|
/**
|
|
7239
7294
|
* The highlight box type of this highlight box entity.
|
|
7240
7295
|
*/
|
|
@@ -7252,7 +7307,7 @@ interface LuaEntity extends LuaControl {
|
|
|
7252
7307
|
*
|
|
7253
7308
|
* If this is not an infinite resource, writing will produce an error.
|
|
7254
7309
|
*/
|
|
7255
|
-
initial_amount?:
|
|
7310
|
+
initial_amount?: uint32;
|
|
7256
7311
|
/**
|
|
7257
7312
|
* The insert plan for this ghost or item request proxy.
|
|
7258
7313
|
*/
|
|
@@ -7270,13 +7325,13 @@ interface LuaEntity extends LuaControl {
|
|
|
7270
7325
|
*
|
|
7271
7326
|
* Set to `0` to reset.
|
|
7272
7327
|
*/
|
|
7273
|
-
inserter_stack_size_override:
|
|
7328
|
+
inserter_stack_size_override: uint32;
|
|
7274
7329
|
/**
|
|
7275
7330
|
* Returns the current target pickup count of the inserter.
|
|
7276
7331
|
*
|
|
7277
7332
|
* This considers the circuit network, manual override and the inserter stack size limit based on technology.
|
|
7278
7333
|
*/
|
|
7279
|
-
readonly inserter_target_pickup_count:
|
|
7334
|
+
readonly inserter_target_pickup_count: uint32;
|
|
7280
7335
|
/**
|
|
7281
7336
|
* If this entity is EntityWithHealth
|
|
7282
7337
|
*/
|
|
@@ -7312,7 +7367,7 @@ interface LuaEntity extends LuaControl {
|
|
|
7312
7367
|
/**
|
|
7313
7368
|
* The number of units killed by this turret, artillery turret, or artillery wagon.
|
|
7314
7369
|
*/
|
|
7315
|
-
kills:
|
|
7370
|
+
kills: uint32;
|
|
7316
7371
|
/**
|
|
7317
7372
|
* The last player that changed any setting on this entity. This includes building the entity, changing its color, or configuring its circuit network. `nil` if the last user is not part of the save anymore.
|
|
7318
7373
|
*/
|
|
@@ -7325,7 +7380,7 @@ interface LuaEntity extends LuaControl {
|
|
|
7325
7380
|
/**
|
|
7326
7381
|
* The link ID this linked container is using.
|
|
7327
7382
|
*/
|
|
7328
|
-
link_id:
|
|
7383
|
+
link_id: uint32;
|
|
7329
7384
|
/**
|
|
7330
7385
|
* Neighbour to which this linked belt is connected to, if any.
|
|
7331
7386
|
*
|
|
@@ -7383,6 +7438,10 @@ interface LuaEntity extends LuaControl {
|
|
|
7383
7438
|
* Script controlled flag that allows entity to be mined.
|
|
7384
7439
|
*/
|
|
7385
7440
|
minable_flag: boolean;
|
|
7441
|
+
/**
|
|
7442
|
+
* Area in which this mining drill looks for resources to mine.
|
|
7443
|
+
*/
|
|
7444
|
+
readonly mining_area: BoundingBox;
|
|
7386
7445
|
/**
|
|
7387
7446
|
* The filter mode for this mining drill. `nil` if this mining drill doesn't have filters.
|
|
7388
7447
|
*/
|
|
@@ -7396,7 +7455,9 @@ interface LuaEntity extends LuaControl {
|
|
|
7396
7455
|
*/
|
|
7397
7456
|
readonly mining_target?: LuaEntity;
|
|
7398
7457
|
/**
|
|
7399
|
-
*
|
|
7458
|
+
* Whether the entity is currently mirrored. This state is referred to as `flipped` elsewhere, such as on the {@link on_player_flipped_entity | runtime:on_player_flipped_entity} event.
|
|
7459
|
+
*
|
|
7460
|
+
* If an entity is mirrored, it is flipped over the axis that is pointing in the entity's direction. For example if a mirrored entity is facing north, everything that was defined to be facing east in the prototype now faces west.
|
|
7400
7461
|
*/
|
|
7401
7462
|
mirroring: boolean;
|
|
7402
7463
|
/**
|
|
@@ -7430,7 +7491,7 @@ interface LuaEntity extends LuaControl {
|
|
|
7430
7491
|
*/
|
|
7431
7492
|
operable: boolean;
|
|
7432
7493
|
/**
|
|
7433
|
-
* The smooth orientation of this entity.
|
|
7494
|
+
* The smooth orientation of this entity. For turrets this is the orientation of the weapon.
|
|
7434
7495
|
*/
|
|
7435
7496
|
orientation: RealOrientation;
|
|
7436
7497
|
/**
|
|
@@ -7497,7 +7558,7 @@ interface LuaEntity extends LuaControl {
|
|
|
7497
7558
|
/**
|
|
7498
7559
|
* The number of products this machine finished crafting in its lifetime.
|
|
7499
7560
|
*/
|
|
7500
|
-
products_finished:
|
|
7561
|
+
products_finished: uint32;
|
|
7501
7562
|
/**
|
|
7502
7563
|
* The entity prototype of this entity.
|
|
7503
7564
|
*/
|
|
@@ -7536,6 +7597,10 @@ interface LuaEntity extends LuaControl {
|
|
|
7536
7597
|
* Gets rail layer of a given signal
|
|
7537
7598
|
*/
|
|
7538
7599
|
readonly rail_layer: defines.rail_layer;
|
|
7600
|
+
/**
|
|
7601
|
+
* Length of this rail piece.
|
|
7602
|
+
*/
|
|
7603
|
+
readonly rail_length: double;
|
|
7539
7604
|
/**
|
|
7540
7605
|
* When locked; the recipe in this assembling machine can't be changed by the player.
|
|
7541
7606
|
*/
|
|
@@ -7544,6 +7609,8 @@ interface LuaEntity extends LuaControl {
|
|
|
7544
7609
|
* The relative orientation of the vehicle turret, artillery turret, artillery wagon. `nil` if this entity isn't a vehicle with a vehicle turret or artillery turret/wagon.
|
|
7545
7610
|
*
|
|
7546
7611
|
* Writing does nothing if the vehicle doesn't have a turret.
|
|
7612
|
+
*
|
|
7613
|
+
* For the turret orientation of non-artillery turrets, use {@link LuaEntity::orientation | runtime:LuaEntity::orientation}.
|
|
7547
7614
|
*/
|
|
7548
7615
|
relative_turret_orientation?: RealOrientation;
|
|
7549
7616
|
/**
|
|
@@ -7599,7 +7666,7 @@ interface LuaEntity extends LuaControl {
|
|
|
7599
7666
|
/**
|
|
7600
7667
|
* Number of rocket parts in the silo.
|
|
7601
7668
|
*/
|
|
7602
|
-
rocket_parts:
|
|
7669
|
+
rocket_parts: uint32;
|
|
7603
7670
|
/**
|
|
7604
7671
|
* The status of this rocket silo entity.
|
|
7605
7672
|
*/
|
|
@@ -7625,7 +7692,7 @@ interface LuaEntity extends LuaControl {
|
|
|
7625
7692
|
/**
|
|
7626
7693
|
* Index of the currently selected weapon slot of this character, car, or spidertron. `nil` if this entity doesn't have guns.
|
|
7627
7694
|
*/
|
|
7628
|
-
selected_gun_index?:
|
|
7695
|
+
selected_gun_index?: uint32;
|
|
7629
7696
|
/**
|
|
7630
7697
|
* {@link LuaEntityPrototype::selection_box | runtime:LuaEntityPrototype::selection_box} around entity's given position and respecting the current entity orientation.
|
|
7631
7698
|
*/
|
|
@@ -7719,19 +7786,19 @@ interface LuaEntity extends LuaControl {
|
|
|
7719
7786
|
/**
|
|
7720
7787
|
* The last tick this character entity was attacked.
|
|
7721
7788
|
*/
|
|
7722
|
-
tick_of_last_attack:
|
|
7789
|
+
tick_of_last_attack: uint32;
|
|
7723
7790
|
/**
|
|
7724
7791
|
* The last tick this character entity was damaged.
|
|
7725
7792
|
*/
|
|
7726
|
-
tick_of_last_damage:
|
|
7793
|
+
tick_of_last_damage: uint32;
|
|
7727
7794
|
/**
|
|
7728
7795
|
* Specifies the tiling size of the entity, is used to decide, if the center should be in the center of the tile (odd tile size dimension) or on the tile border (even tile size dimension). Uses the current direction of the entity.
|
|
7729
7796
|
*/
|
|
7730
|
-
readonly tile_height:
|
|
7797
|
+
readonly tile_height: uint32;
|
|
7731
7798
|
/**
|
|
7732
7799
|
* Specifies the tiling size of the entity, is used to decide, if the center should be in the center of the tile (odd tile size dimension) or on the tile border (even tile size dimension). Uses the current direction of the entity.
|
|
7733
7800
|
*/
|
|
7734
|
-
readonly tile_width:
|
|
7801
|
+
readonly tile_width: uint32;
|
|
7735
7802
|
/**
|
|
7736
7803
|
* The ticks left before a combat robot, highlight box, smoke, or sticker entity is destroyed.
|
|
7737
7804
|
*/
|
|
@@ -7739,11 +7806,11 @@ interface LuaEntity extends LuaControl {
|
|
|
7739
7806
|
/**
|
|
7740
7807
|
* The ticks until the next trigger effect of this smoke-with-trigger.
|
|
7741
7808
|
*/
|
|
7742
|
-
time_to_next_effect:
|
|
7809
|
+
time_to_next_effect: uint32;
|
|
7743
7810
|
/**
|
|
7744
7811
|
* The timeout that's left on this landmine in ticks. It describes the time between the landmine being placed and it being armed.
|
|
7745
7812
|
*/
|
|
7746
|
-
timeout:
|
|
7813
|
+
timeout: uint32;
|
|
7747
7814
|
/**
|
|
7748
7815
|
* Will this item entity be picked up automatically when the player walks over it?
|
|
7749
7816
|
*/
|
|
@@ -7767,17 +7834,21 @@ interface LuaEntity extends LuaControl {
|
|
|
7767
7834
|
*
|
|
7768
7835
|
* Value may be read even when train stop has no control behavior.
|
|
7769
7836
|
*/
|
|
7770
|
-
readonly trains_count:
|
|
7837
|
+
readonly trains_count: uint32;
|
|
7771
7838
|
/**
|
|
7772
7839
|
* The number of trains in this rail block for this rail entity.
|
|
7773
7840
|
*/
|
|
7774
|
-
readonly trains_in_block:
|
|
7841
|
+
readonly trains_in_block: uint32;
|
|
7775
7842
|
/**
|
|
7776
7843
|
* Amount of trains above which no new trains will be sent to this train stop. Writing nil will disable the limit (will set a maximum possible value).
|
|
7777
7844
|
*
|
|
7778
7845
|
* When a train stop has a control behavior with wire connected and set_trains_limit enabled, this value will be overwritten by it.
|
|
7779
7846
|
*/
|
|
7780
|
-
trains_limit:
|
|
7847
|
+
trains_limit: uint32;
|
|
7848
|
+
/**
|
|
7849
|
+
* The space platform in orbit this rocket silo is automatically requesting items for.
|
|
7850
|
+
*/
|
|
7851
|
+
readonly transitional_request_target?: LuaSpacePlatform;
|
|
7781
7852
|
/**
|
|
7782
7853
|
* Index of the tree color.
|
|
7783
7854
|
*/
|
|
@@ -7823,7 +7894,7 @@ interface LuaEntity extends LuaControl {
|
|
|
7823
7894
|
*/
|
|
7824
7895
|
use_filters: boolean;
|
|
7825
7896
|
/**
|
|
7826
|
-
* When true, the rocket silo will request items for space platforms in orbit.
|
|
7897
|
+
* When true, the rocket silo will automatically request items for space platforms in orbit.
|
|
7827
7898
|
*
|
|
7828
7899
|
* Setting the value will have no effect when the silo doesn't support logistics.
|
|
7829
7900
|
*/
|
|
@@ -7847,10 +7918,12 @@ interface LuaEntity extends LuaControl {
|
|
|
7847
7918
|
* Prototype of an entity.
|
|
7848
7919
|
*/
|
|
7849
7920
|
interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
7921
|
+
get_attraction_range_elongation(this: void, quality?: QualityID): double | null;
|
|
7850
7922
|
/**
|
|
7851
7923
|
* The crafting speed of this crafting-machine or character.
|
|
7852
7924
|
*/
|
|
7853
7925
|
get_crafting_speed(this: void, quality?: QualityID): double;
|
|
7926
|
+
get_energy_distribution_efficiency(this: void, quality?: QualityID): double | null;
|
|
7854
7927
|
/**
|
|
7855
7928
|
* Gets the fluid capacity of this entity or 0 if this entity doesn't support fluids.
|
|
7856
7929
|
*
|
|
@@ -7873,7 +7946,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
7873
7946
|
* Gets the base size of the given inventory on this entity or `nil` if the given inventory doesn't exist.
|
|
7874
7947
|
* @param quality Defaults to `"normal"`.
|
|
7875
7948
|
*/
|
|
7876
|
-
get_inventory_size(this: void, index: defines.inventory, quality?: QualityID):
|
|
7949
|
+
get_inventory_size(this: void, index: defines.inventory, quality?: QualityID): uint32 | null;
|
|
7877
7950
|
/**
|
|
7878
7951
|
* The maximum circuit wire distance for this entity. 0 if the entity doesn't support circuit wires.
|
|
7879
7952
|
*/
|
|
@@ -7881,11 +7954,11 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
7881
7954
|
/**
|
|
7882
7955
|
* The radius of the area constantly revealed by this radar, or cargo landing pad, in chunks.
|
|
7883
7956
|
*/
|
|
7884
|
-
get_max_distance_of_nearby_sector_revealed(this: void, quality?: QualityID):
|
|
7957
|
+
get_max_distance_of_nearby_sector_revealed(this: void, quality?: QualityID): uint32 | null;
|
|
7885
7958
|
/**
|
|
7886
7959
|
* The radius of the area this radar can chart, in chunks.
|
|
7887
7960
|
*/
|
|
7888
|
-
get_max_distance_of_sector_revealed(this: void, quality?: QualityID):
|
|
7961
|
+
get_max_distance_of_sector_revealed(this: void, quality?: QualityID): uint32 | null;
|
|
7889
7962
|
/**
|
|
7890
7963
|
* The max energy for this flying robot prototype.
|
|
7891
7964
|
*/
|
|
@@ -7942,6 +8015,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
7942
8015
|
readonly absorptions_to_join_attack?: Record<string, float>;
|
|
7943
8016
|
readonly acceleration_rate: double;
|
|
7944
8017
|
readonly accepted_seeds?: string[];
|
|
8018
|
+
readonly activation_buffer_ratio?: FluidAmount;
|
|
7945
8019
|
/**
|
|
7946
8020
|
* The active energy usage of this rocket silo or combinator prototype.
|
|
7947
8021
|
*/
|
|
@@ -8022,10 +8096,10 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8022
8096
|
readonly arm_angular_speed_cap_base?: float;
|
|
8023
8097
|
readonly arm_angular_speed_cap_quality_scaling?: float;
|
|
8024
8098
|
readonly arm_color_gradient?: Color[];
|
|
8025
|
-
readonly arm_count_base?:
|
|
8026
|
-
readonly arm_count_quality_scaling?:
|
|
8099
|
+
readonly arm_count_base?: uint32;
|
|
8100
|
+
readonly arm_count_quality_scaling?: uint32;
|
|
8027
8101
|
readonly arm_energy_usage?: double;
|
|
8028
|
-
readonly arm_inventory_size_quality_increase?:
|
|
8102
|
+
readonly arm_inventory_size_quality_increase?: uint32;
|
|
8029
8103
|
readonly arm_slow_energy_usage?: double;
|
|
8030
8104
|
readonly arm_speed_base?: float;
|
|
8031
8105
|
readonly arm_speed_quality_scaling?: float;
|
|
@@ -8039,11 +8113,12 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8039
8113
|
*/
|
|
8040
8114
|
readonly attack_result?: TriggerItem[];
|
|
8041
8115
|
readonly attacking_speed?: double;
|
|
8116
|
+
readonly attractor_hit_effect?: TriggerItem[];
|
|
8042
8117
|
readonly auto_setup_collision_box: boolean;
|
|
8043
8118
|
/**
|
|
8044
8119
|
* The amount of ammo that inserters automatically insert into this ammo-turret or artillery-turret.
|
|
8045
8120
|
*/
|
|
8046
|
-
readonly automated_ammo_count?:
|
|
8121
|
+
readonly automated_ammo_count?: uint32;
|
|
8047
8122
|
/**
|
|
8048
8123
|
* Whether this spider vehicle prototype automatically cycles weapons.
|
|
8049
8124
|
*/
|
|
@@ -8074,11 +8149,11 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8074
8149
|
* The evolution requirement to build this entity as a base when expanding enemy bases.
|
|
8075
8150
|
*/
|
|
8076
8151
|
readonly build_base_evolution_requirement: double;
|
|
8077
|
-
readonly build_distance?:
|
|
8152
|
+
readonly build_distance?: uint32;
|
|
8078
8153
|
/**
|
|
8079
8154
|
* The log2 of {@link grid size | prototype:EntityPrototype::build_grid_size} of the building.
|
|
8080
8155
|
*/
|
|
8081
|
-
readonly building_grid_bit_shift:
|
|
8156
|
+
readonly building_grid_bit_shift: uint32;
|
|
8082
8157
|
/**
|
|
8083
8158
|
* Whether this inserter is a bulk-type.
|
|
8084
8159
|
*/
|
|
@@ -8135,6 +8210,8 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8135
8210
|
* The color of the prototype, if any.
|
|
8136
8211
|
*/
|
|
8137
8212
|
readonly color?: Color;
|
|
8213
|
+
readonly combat_robot_friction?: double;
|
|
8214
|
+
readonly connection_category: string[];
|
|
8138
8215
|
readonly connection_distance?: double;
|
|
8139
8216
|
/**
|
|
8140
8217
|
* The construction radius for this roboport prototype.
|
|
@@ -8190,6 +8267,10 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8190
8267
|
speed_from_center: float;
|
|
8191
8268
|
speed_from_center_deviation: float;
|
|
8192
8269
|
};
|
|
8270
|
+
/**
|
|
8271
|
+
* When lightning strikes something that is not a lightning attractor, this damage is applied to the target.
|
|
8272
|
+
*/
|
|
8273
|
+
readonly damage?: double;
|
|
8193
8274
|
readonly damage_hit_tint?: Color;
|
|
8194
8275
|
readonly damaged_trigger_effect?: TriggerEffectItem[];
|
|
8195
8276
|
/**
|
|
@@ -8201,6 +8282,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8201
8282
|
*/
|
|
8202
8283
|
readonly darkness_for_all_lamps_on?: float;
|
|
8203
8284
|
readonly deposit_radius?: float;
|
|
8285
|
+
readonly destroy_action?: TriggerItem[];
|
|
8204
8286
|
/**
|
|
8205
8287
|
* Whether this generator prototype destroys non-fuel fluids.
|
|
8206
8288
|
*/
|
|
@@ -8208,7 +8290,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8208
8290
|
/**
|
|
8209
8291
|
* The distraction cooldown of this unit prototype.
|
|
8210
8292
|
*/
|
|
8211
|
-
readonly distraction_cooldown?:
|
|
8293
|
+
readonly distraction_cooldown?: uint32;
|
|
8212
8294
|
/**
|
|
8213
8295
|
* The distribution effectivity for this beacon prototype.
|
|
8214
8296
|
*/
|
|
@@ -8229,7 +8311,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8229
8311
|
* Extra vertical space needed to see the whole entity in GUIs. This is used to calculate the correct zoom and positioning in the entity info gui, for example in the entity tooltip.
|
|
8230
8312
|
*/
|
|
8231
8313
|
readonly drawing_box_vertical_extension: double;
|
|
8232
|
-
readonly drop_item_distance?:
|
|
8314
|
+
readonly drop_item_distance?: uint32;
|
|
8233
8315
|
readonly dying_explosion?: ExplosionDefinition[];
|
|
8234
8316
|
/**
|
|
8235
8317
|
* The dying time of this corpse prototype.
|
|
@@ -8256,6 +8338,10 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8256
8338
|
* The enemy map color used when charting this entity.
|
|
8257
8339
|
*/
|
|
8258
8340
|
readonly enemy_map_color: Color;
|
|
8341
|
+
/**
|
|
8342
|
+
* When lightning hits a lightning attractor this amount of energy is transferred to the lightning attractor.
|
|
8343
|
+
*/
|
|
8344
|
+
readonly energy?: double;
|
|
8259
8345
|
/**
|
|
8260
8346
|
* The energy used per hit point taken for this vehicle during collisions.
|
|
8261
8347
|
*/
|
|
@@ -8299,7 +8385,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8299
8385
|
/**
|
|
8300
8386
|
* The filter count of this inserter, loader, mining drill or logistic chest. For logistic containers, `nil` means no limit.
|
|
8301
8387
|
*/
|
|
8302
|
-
readonly filter_count?:
|
|
8388
|
+
readonly filter_count?: uint32;
|
|
8303
8389
|
/**
|
|
8304
8390
|
* The final attack result for this projectile.
|
|
8305
8391
|
*/
|
|
@@ -8313,6 +8399,8 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8313
8399
|
*/
|
|
8314
8400
|
readonly flags: EntityPrototypeFlags;
|
|
8315
8401
|
readonly flow_scaling?: boolean;
|
|
8402
|
+
readonly fluid_buffer_input_flow?: FluidAmount;
|
|
8403
|
+
readonly fluid_buffer_size?: FluidAmount;
|
|
8316
8404
|
/**
|
|
8317
8405
|
* The fluid capacity of this entity or 0 if this entity doesn't support fluids.
|
|
8318
8406
|
*
|
|
@@ -8340,6 +8428,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8340
8428
|
* The flying speed for this rocket silo rocket prototype.
|
|
8341
8429
|
*/
|
|
8342
8430
|
readonly flying_speed?: double;
|
|
8431
|
+
readonly follows_player?: boolean;
|
|
8343
8432
|
/**
|
|
8344
8433
|
* The friction of this vehicle prototype.
|
|
8345
8434
|
*/
|
|
@@ -8353,8 +8442,8 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8353
8442
|
*/
|
|
8354
8443
|
readonly grid_prototype?: LuaEquipmentGridPrototype;
|
|
8355
8444
|
readonly growth_area_radius?: double;
|
|
8356
|
-
readonly growth_grid_tile_size?:
|
|
8357
|
-
readonly growth_ticks?:
|
|
8445
|
+
readonly growth_grid_tile_size?: uint32;
|
|
8446
|
+
readonly growth_ticks?: uint32;
|
|
8358
8447
|
/**
|
|
8359
8448
|
* A mapping of the gun name to the gun prototype this prototype uses. `nil` if this entity prototype doesn't use guns.
|
|
8360
8449
|
*/
|
|
@@ -8407,7 +8496,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8407
8496
|
/**
|
|
8408
8497
|
* Every time this infinite resource 'ticks' down, it is reduced by this amount. Meaningless if this isn't an infinite resource.
|
|
8409
8498
|
*/
|
|
8410
|
-
readonly infinite_depletion_resource_amount?:
|
|
8499
|
+
readonly infinite_depletion_resource_amount?: uint32;
|
|
8411
8500
|
/**
|
|
8412
8501
|
* Whether this resource is infinite.
|
|
8413
8502
|
*/
|
|
@@ -8415,7 +8504,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8415
8504
|
/**
|
|
8416
8505
|
* The max number of ingredients this crafting machine prototype supports.
|
|
8417
8506
|
*/
|
|
8418
|
-
readonly ingredient_count?:
|
|
8507
|
+
readonly ingredient_count?: uint32;
|
|
8419
8508
|
/**
|
|
8420
8509
|
* True if this inserter chases items on belts for pickup.
|
|
8421
8510
|
*/
|
|
@@ -8431,7 +8520,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8431
8520
|
/**
|
|
8432
8521
|
* The built-in stack size bonus of this inserter prototype.
|
|
8433
8522
|
*/
|
|
8434
|
-
readonly inserter_stack_size_bonus?:
|
|
8523
|
+
readonly inserter_stack_size_bonus?: uint32;
|
|
8435
8524
|
/**
|
|
8436
8525
|
* The instruments for this programmable speaker.
|
|
8437
8526
|
*/
|
|
@@ -8440,7 +8529,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8440
8529
|
* Properties of custom inventory. Only provided if inventory_type is `"with_custom_stack_size"`.
|
|
8441
8530
|
*/
|
|
8442
8531
|
readonly inventory_properties?: InventoryWithCustomStackSizeSpecification;
|
|
8443
|
-
readonly inventory_size_quality_increase?:
|
|
8532
|
+
readonly inventory_size_quality_increase?: uint32;
|
|
8444
8533
|
/**
|
|
8445
8534
|
* The inventory type this container or linked container uses.
|
|
8446
8535
|
*/
|
|
@@ -8568,14 +8657,14 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8568
8657
|
charge_approach_distance: float;
|
|
8569
8658
|
logistic_radius: float;
|
|
8570
8659
|
construction_radius: float;
|
|
8571
|
-
charging_station_count:
|
|
8660
|
+
charging_station_count: uint32;
|
|
8572
8661
|
charging_distance: float;
|
|
8573
8662
|
charging_station_shift: Vector;
|
|
8574
8663
|
charging_energy: double;
|
|
8575
8664
|
charging_threshold_distance: float;
|
|
8576
8665
|
robot_vertical_acceleration: float;
|
|
8577
8666
|
stationing_offset: Vector;
|
|
8578
|
-
robot_limit:
|
|
8667
|
+
robot_limit: uint32;
|
|
8579
8668
|
logistics_connection_distance: float;
|
|
8580
8669
|
robots_shrink_when_entering_and_exiting: boolean;
|
|
8581
8670
|
};
|
|
@@ -8623,16 +8712,20 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8623
8712
|
/**
|
|
8624
8713
|
* The max number of item products this crafting machine prototype supports.
|
|
8625
8714
|
*/
|
|
8626
|
-
readonly max_item_product_count?:
|
|
8715
|
+
readonly max_item_product_count?: uint32;
|
|
8627
8716
|
/**
|
|
8628
|
-
* The
|
|
8717
|
+
* The cargo carrying capacity of this logistics or construction robot.
|
|
8629
8718
|
*/
|
|
8630
|
-
readonly max_payload_size?:
|
|
8719
|
+
readonly max_payload_size?: uint32;
|
|
8720
|
+
/**
|
|
8721
|
+
* The maximum possible cargo carrying capacity of this logistics or construction robot. Bonuses from technologies/forces can't increase the carrying capacity beyond this number.
|
|
8722
|
+
*/
|
|
8723
|
+
readonly max_payload_size_after_bonus?: uint32;
|
|
8631
8724
|
readonly max_performance?: ThrusterPerformancePoint;
|
|
8632
8725
|
/**
|
|
8633
8726
|
* The maximum polyphony for this programmable speaker.
|
|
8634
8727
|
*/
|
|
8635
|
-
readonly max_polyphony?:
|
|
8728
|
+
readonly max_polyphony?: uint32;
|
|
8636
8729
|
/**
|
|
8637
8730
|
* The default maximum power output of this generator prototype. This property is deprecated in favor of {@link LuaEntityPrototype::get_max_power_output | runtime:LuaEntityPrototype::get_max_power_output} and should not be used.
|
|
8638
8731
|
*/
|
|
@@ -8666,7 +8759,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8666
8759
|
/**
|
|
8667
8760
|
* The minimum pursue time of this unit prototype.
|
|
8668
8761
|
*/
|
|
8669
|
-
readonly min_pursue_time?:
|
|
8762
|
+
readonly min_pursue_time?: uint32;
|
|
8670
8763
|
/**
|
|
8671
8764
|
* The minimum energy for this flying robot before it tries to recharge.
|
|
8672
8765
|
*/
|
|
@@ -8675,11 +8768,11 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8675
8768
|
* Whether this entity is minable and what can be obtained by mining it.
|
|
8676
8769
|
*/
|
|
8677
8770
|
readonly mineable_properties: MineableProperties;
|
|
8678
|
-
readonly minimal_arm_swing_segment_retraction?:
|
|
8771
|
+
readonly minimal_arm_swing_segment_retraction?: uint32;
|
|
8679
8772
|
/**
|
|
8680
8773
|
* Minimum amount of this resource.
|
|
8681
8774
|
*/
|
|
8682
|
-
readonly minimum_resource_amount?:
|
|
8775
|
+
readonly minimum_resource_amount?: uint32;
|
|
8683
8776
|
/**
|
|
8684
8777
|
* The mining radius of this mining drill prototype.
|
|
8685
8778
|
*/
|
|
@@ -8691,7 +8784,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8691
8784
|
/**
|
|
8692
8785
|
* The module inventory size. `nil` if this entity doesn't support modules.
|
|
8693
8786
|
*/
|
|
8694
|
-
readonly module_inventory_size?:
|
|
8787
|
+
readonly module_inventory_size?: uint32;
|
|
8695
8788
|
/**
|
|
8696
8789
|
* Whether this unit prototype can move while shooting.
|
|
8697
8790
|
*/
|
|
@@ -8705,7 +8798,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8705
8798
|
/**
|
|
8706
8799
|
* The normal amount for this resource.
|
|
8707
8800
|
*/
|
|
8708
|
-
readonly normal_resource_amount?:
|
|
8801
|
+
readonly normal_resource_amount?: uint32;
|
|
8709
8802
|
/**
|
|
8710
8803
|
* 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.
|
|
8711
8804
|
*/
|
|
@@ -8733,14 +8826,15 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8733
8826
|
/**
|
|
8734
8827
|
* The radar range of this unit prototype.
|
|
8735
8828
|
*/
|
|
8736
|
-
readonly radar_range?:
|
|
8829
|
+
readonly radar_range?: uint32;
|
|
8737
8830
|
/**
|
|
8738
|
-
* The radius of this entity prototype.
|
|
8831
|
+
* The radius of this entity prototype. The radius is defined as half the distance between the top left corner and bottom right corner of the collision box.
|
|
8739
8832
|
*/
|
|
8740
8833
|
readonly radius: double;
|
|
8741
8834
|
readonly radius_visualisation_specification?: RadiusVisualisationSpecification;
|
|
8742
8835
|
readonly random_corpse_variation?: boolean;
|
|
8743
|
-
readonly
|
|
8836
|
+
readonly range_from_player?: double;
|
|
8837
|
+
readonly reach_distance?: uint32;
|
|
8744
8838
|
readonly reach_resource_distance?: double;
|
|
8745
8839
|
readonly related_underground_belt?: LuaEntityPrototype;
|
|
8746
8840
|
/**
|
|
@@ -8775,7 +8869,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8775
8869
|
* The resource drain rate percent of this mining drill prototype.
|
|
8776
8870
|
*/
|
|
8777
8871
|
readonly resource_drain_rate_percent?: uint8;
|
|
8778
|
-
readonly respawn_time?:
|
|
8872
|
+
readonly respawn_time?: uint32;
|
|
8779
8873
|
/**
|
|
8780
8874
|
* The result units and spawn points with weight and evolution factor for a biter spawner entity.
|
|
8781
8875
|
*/
|
|
@@ -8796,7 +8890,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8796
8890
|
/**
|
|
8797
8891
|
* The rocket parts required for this rocket silo prototype.
|
|
8798
8892
|
*/
|
|
8799
|
-
readonly rocket_parts_required?:
|
|
8893
|
+
readonly rocket_parts_required?: uint32;
|
|
8800
8894
|
/**
|
|
8801
8895
|
* The rocket rising delay for this rocket silo prototype.
|
|
8802
8896
|
*/
|
|
@@ -8837,7 +8931,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8837
8931
|
/**
|
|
8838
8932
|
* The selection priority of this entity - a value between `0` and `255`.
|
|
8839
8933
|
*/
|
|
8840
|
-
readonly selection_priority:
|
|
8934
|
+
readonly selection_priority: uint32;
|
|
8841
8935
|
/**
|
|
8842
8936
|
* The cursor size used when shooting at this entity.
|
|
8843
8937
|
*/
|
|
@@ -8874,10 +8968,13 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8874
8968
|
* The speed multiplier when this flying robot is out of energy.
|
|
8875
8969
|
*/
|
|
8876
8970
|
readonly speed_multiplier_when_out_of_energy?: float;
|
|
8971
|
+
readonly spider_engine?: SpiderEngineSpecification;
|
|
8877
8972
|
/**
|
|
8878
8973
|
* The bounding box used to attach sticker type entities.
|
|
8879
8974
|
*/
|
|
8880
8975
|
readonly sticker_box: BoundingBox;
|
|
8976
|
+
readonly strike_effect?: TriggerItem[];
|
|
8977
|
+
readonly support_range?: float;
|
|
8881
8978
|
/**
|
|
8882
8979
|
* Whether this entity prototype could possibly ever be rotated.
|
|
8883
8980
|
*/
|
|
@@ -8898,12 +8995,12 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8898
8995
|
* The terrain friction modifier for this vehicle.
|
|
8899
8996
|
*/
|
|
8900
8997
|
readonly terrain_friction_modifier?: float;
|
|
8901
|
-
readonly territory_radius?:
|
|
8998
|
+
readonly territory_radius?: uint32;
|
|
8902
8999
|
readonly tether_size?: float;
|
|
8903
|
-
readonly ticks_per_scan?:
|
|
8904
|
-
readonly ticks_to_keep_aiming_direction?:
|
|
8905
|
-
readonly ticks_to_keep_gun?:
|
|
8906
|
-
readonly ticks_to_stay_in_combat?:
|
|
9000
|
+
readonly ticks_per_scan?: uint32;
|
|
9001
|
+
readonly ticks_to_keep_aiming_direction?: uint32;
|
|
9002
|
+
readonly ticks_to_keep_gun?: uint32;
|
|
9003
|
+
readonly ticks_to_stay_in_combat?: uint32;
|
|
8907
9004
|
/**
|
|
8908
9005
|
* The tile buildability rules of this entity prototype.
|
|
8909
9006
|
*/
|
|
@@ -8911,19 +9008,19 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8911
9008
|
/**
|
|
8912
9009
|
* Specifies the tiling size of the entity, is used to decide, if the center should be in the center of the tile (odd tile size dimension) or on the tile border (even tile size dimension)
|
|
8913
9010
|
*/
|
|
8914
|
-
readonly tile_height:
|
|
9011
|
+
readonly tile_height: uint32;
|
|
8915
9012
|
/**
|
|
8916
9013
|
* Specifies the tiling size of the entity, is used to decide, if the center should be in the center of the tile (odd tile size dimension) or on the tile border (even tile size dimension)
|
|
8917
9014
|
*/
|
|
8918
|
-
readonly tile_width:
|
|
9015
|
+
readonly tile_width: uint32;
|
|
8919
9016
|
/**
|
|
8920
9017
|
* The time to live for this prototype or `0` if prototype doesn't have time_to_live or time_before_removed.
|
|
8921
9018
|
*/
|
|
8922
|
-
readonly time_to_live:
|
|
9019
|
+
readonly time_to_live: uint32;
|
|
8923
9020
|
/**
|
|
8924
9021
|
* The time it takes this land mine to arm.
|
|
8925
9022
|
*/
|
|
8926
|
-
readonly timeout?:
|
|
9023
|
+
readonly timeout?: uint32;
|
|
8927
9024
|
/**
|
|
8928
9025
|
* The torso bob speed of this spider vehicle prototype.
|
|
8929
9026
|
*/
|
|
@@ -8951,7 +9048,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8951
9048
|
/**
|
|
8952
9049
|
* The range of this turret.
|
|
8953
9050
|
*/
|
|
8954
|
-
readonly turret_range?:
|
|
9051
|
+
readonly turret_range?: uint32;
|
|
8955
9052
|
/**
|
|
8956
9053
|
* The turret rotation speed of this car prototype.
|
|
8957
9054
|
*/
|
|
@@ -9038,7 +9135,7 @@ interface LuaEquipment {
|
|
|
9038
9135
|
/**
|
|
9039
9136
|
* Inventory size bonus.
|
|
9040
9137
|
*/
|
|
9041
|
-
readonly inventory_bonus:
|
|
9138
|
+
readonly inventory_bonus: uint32;
|
|
9042
9139
|
/**
|
|
9043
9140
|
* Maximum amount of energy that can be stored in this equipment.
|
|
9044
9141
|
*/
|
|
@@ -9076,8 +9173,8 @@ interface LuaEquipment {
|
|
|
9076
9173
|
* Shape of this equipment.
|
|
9077
9174
|
*/
|
|
9078
9175
|
readonly shape: {
|
|
9079
|
-
width:
|
|
9080
|
-
height:
|
|
9176
|
+
width: uint32;
|
|
9177
|
+
height: uint32;
|
|
9081
9178
|
};
|
|
9082
9179
|
/**
|
|
9083
9180
|
* Current shield value of the equipment. Can't be set higher than {@link LuaEquipment::max_shield | runtime:LuaEquipment::max_shield}.
|
|
@@ -9138,7 +9235,7 @@ interface LuaEquipmentGrid {
|
|
|
9138
9235
|
* Get the number of all or some equipment in this grid.
|
|
9139
9236
|
* @param equipment The equipment to count. If not specified, count all equipment.
|
|
9140
9237
|
*/
|
|
9141
|
-
count(this: void, equipment?: EquipmentWithQualityID):
|
|
9238
|
+
count(this: void, equipment?: EquipmentWithQualityID): uint32;
|
|
9142
9239
|
/**
|
|
9143
9240
|
* Find equipment by name.
|
|
9144
9241
|
* @param equipment Prototype of the equipment to find.
|
|
@@ -9159,6 +9256,7 @@ interface LuaEquipmentGrid {
|
|
|
9159
9256
|
get_contents(this: void): EquipmentWithQualityCounts[];
|
|
9160
9257
|
/**
|
|
9161
9258
|
* Total energy per tick generated by the equipment inside this grid.
|
|
9259
|
+
* @param quality Defaults to `"normal"`.
|
|
9162
9260
|
*/
|
|
9163
9261
|
get_generator_energy(this: void, quality?: QualityID): double;
|
|
9164
9262
|
/**
|
|
@@ -9236,7 +9334,7 @@ interface LuaEquipmentGrid {
|
|
|
9236
9334
|
/**
|
|
9237
9335
|
* Height of the equipment grid.
|
|
9238
9336
|
*/
|
|
9239
|
-
readonly height:
|
|
9337
|
+
readonly height: uint32;
|
|
9240
9338
|
/**
|
|
9241
9339
|
* Whether this grid's equipment movement bonus is active.
|
|
9242
9340
|
*/
|
|
@@ -9244,13 +9342,13 @@ interface LuaEquipmentGrid {
|
|
|
9244
9342
|
/**
|
|
9245
9343
|
* The total amount of inventory bonus this equipment grid gives.
|
|
9246
9344
|
*/
|
|
9247
|
-
readonly inventory_bonus:
|
|
9345
|
+
readonly inventory_bonus: uint32;
|
|
9248
9346
|
/**
|
|
9249
9347
|
* The item stack that this equipment grid is owned by.
|
|
9250
9348
|
*/
|
|
9251
9349
|
readonly itemstack_owner?: LuaItemStack;
|
|
9252
9350
|
/**
|
|
9253
|
-
* The maximum amount of
|
|
9351
|
+
* The maximum amount of shield hitpoints this equipment grid has across all shield equipment.
|
|
9254
9352
|
*/
|
|
9255
9353
|
readonly max_shield: float;
|
|
9256
9354
|
/**
|
|
@@ -9260,7 +9358,7 @@ interface LuaEquipmentGrid {
|
|
|
9260
9358
|
/**
|
|
9261
9359
|
* The total amount of movement bonus this equipment grid gives.
|
|
9262
9360
|
*
|
|
9263
|
-
* Returns `0` if {@link LuaEquipmentGrid::inhibit_movement_bonus | runtime:LuaEquipmentGrid::inhibit_movement_bonus} is `
|
|
9361
|
+
* Returns `0` if {@link LuaEquipmentGrid::inhibit_movement_bonus | runtime:LuaEquipmentGrid::inhibit_movement_bonus} is `true`.
|
|
9264
9362
|
*/
|
|
9265
9363
|
readonly movement_bonus: double;
|
|
9266
9364
|
/**
|
|
@@ -9273,13 +9371,13 @@ interface LuaEquipmentGrid {
|
|
|
9273
9371
|
readonly player_owner?: LuaPlayer;
|
|
9274
9372
|
readonly prototype: LuaEquipmentGridPrototype;
|
|
9275
9373
|
/**
|
|
9276
|
-
* The amount of
|
|
9374
|
+
* The amount of shield hitpoints this equipment grid currently has across all shield equipment.
|
|
9277
9375
|
*/
|
|
9278
9376
|
readonly shield: float;
|
|
9279
9377
|
/**
|
|
9280
9378
|
* Unique identifier of this equipment grid.
|
|
9281
9379
|
*/
|
|
9282
|
-
readonly unique_id:
|
|
9380
|
+
readonly unique_id: uint32;
|
|
9283
9381
|
/**
|
|
9284
9382
|
* 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.
|
|
9285
9383
|
*/
|
|
@@ -9287,7 +9385,7 @@ interface LuaEquipmentGrid {
|
|
|
9287
9385
|
/**
|
|
9288
9386
|
* Width of the equipment grid.
|
|
9289
9387
|
*/
|
|
9290
|
-
readonly width:
|
|
9388
|
+
readonly width: uint32;
|
|
9291
9389
|
}
|
|
9292
9390
|
/**
|
|
9293
9391
|
* Prototype of an equipment grid.
|
|
@@ -9297,7 +9395,7 @@ interface LuaEquipmentGridPrototype extends LuaPrototypeBase {
|
|
|
9297
9395
|
* Equipment category names for the {@link categories | runtime:LuaEquipmentPrototype::equipment_categories} that may be inserted into this equipment grid. The grid will accept any equipment that has at least one category in this list.
|
|
9298
9396
|
*/
|
|
9299
9397
|
readonly equipment_categories: string[];
|
|
9300
|
-
readonly height:
|
|
9398
|
+
readonly height: uint32;
|
|
9301
9399
|
/**
|
|
9302
9400
|
* If the player can move equipment into or out of this grid.
|
|
9303
9401
|
*/
|
|
@@ -9310,14 +9408,14 @@ interface LuaEquipmentGridPrototype extends LuaPrototypeBase {
|
|
|
9310
9408
|
* 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.
|
|
9311
9409
|
*/
|
|
9312
9410
|
readonly valid: boolean;
|
|
9313
|
-
readonly width:
|
|
9411
|
+
readonly width: uint32;
|
|
9314
9412
|
}
|
|
9315
9413
|
/**
|
|
9316
9414
|
* Prototype of a modular equipment.
|
|
9317
9415
|
*/
|
|
9318
9416
|
interface LuaEquipmentPrototype extends LuaPrototypeBase {
|
|
9319
9417
|
get_energy_consumption(this: void, quality?: QualityID): double;
|
|
9320
|
-
get_inventory_bonus(this: void, quality?: QualityID):
|
|
9418
|
+
get_inventory_bonus(this: void, quality?: QualityID): uint32 | null;
|
|
9321
9419
|
get_movement_bonus(this: void, quality?: QualityID): float | null;
|
|
9322
9420
|
/**
|
|
9323
9421
|
* The shield value of this equipment. 0 for non-shield equipment.
|
|
@@ -9369,14 +9467,14 @@ interface LuaEquipmentPrototype extends LuaPrototypeBase {
|
|
|
9369
9467
|
charge_approach_distance: float;
|
|
9370
9468
|
logistic_radius: float;
|
|
9371
9469
|
construction_radius: float;
|
|
9372
|
-
charging_station_count:
|
|
9470
|
+
charging_station_count: uint32;
|
|
9373
9471
|
charging_distance: float;
|
|
9374
9472
|
charging_station_shift: Vector;
|
|
9375
9473
|
charging_energy: double;
|
|
9376
9474
|
charging_threshold_distance: float;
|
|
9377
9475
|
robot_vertical_acceleration: float;
|
|
9378
9476
|
stationing_offset: Vector;
|
|
9379
|
-
robot_limit:
|
|
9477
|
+
robot_limit: uint32;
|
|
9380
9478
|
logistics_connection_distance: float;
|
|
9381
9479
|
robots_shrink_when_entering_and_exiting: boolean;
|
|
9382
9480
|
};
|
|
@@ -9388,8 +9486,8 @@ interface LuaEquipmentPrototype extends LuaPrototypeBase {
|
|
|
9388
9486
|
* Shape of this equipment prototype.
|
|
9389
9487
|
*/
|
|
9390
9488
|
readonly shape: {
|
|
9391
|
-
width:
|
|
9392
|
-
height:
|
|
9489
|
+
width: uint32;
|
|
9490
|
+
height: uint32;
|
|
9393
9491
|
/**
|
|
9394
9492
|
* Only set when the shape is "manual"
|
|
9395
9493
|
*/
|
|
@@ -9527,46 +9625,50 @@ interface LuaFluidBox {
|
|
|
9527
9625
|
*
|
|
9528
9626
|
* Linked connections cannot go to the same entity even if they would be part of other fluidbox.
|
|
9529
9627
|
*/
|
|
9530
|
-
add_linked_connection(this: void, this_linked_connection_id:
|
|
9628
|
+
add_linked_connection(this: void, this_linked_connection_id: uint32, other_entity: LuaEntity, other_linked_connection_id: uint32): void;
|
|
9531
9629
|
/**
|
|
9532
9630
|
* Flushes all fluid from this fluidbox and its fluid system.
|
|
9533
9631
|
* @param fluid If provided, only this fluid is flushed.
|
|
9534
9632
|
* @returns The removed fluid.
|
|
9535
9633
|
*/
|
|
9536
|
-
flush(this: void, index:
|
|
9634
|
+
flush(this: void, index: uint32, fluid?: FluidID): Record<string, FluidAmount>;
|
|
9537
9635
|
/**
|
|
9538
9636
|
* The capacity of the given fluidbox segment.
|
|
9539
9637
|
*/
|
|
9540
|
-
get_capacity(this: void, index:
|
|
9638
|
+
get_capacity(this: void, index: uint32): double;
|
|
9541
9639
|
/**
|
|
9542
9640
|
* The fluidboxes to which the fluidbox at the given index is connected.
|
|
9543
9641
|
*/
|
|
9544
|
-
get_connections(this: void, index:
|
|
9642
|
+
get_connections(this: void, index: uint32): LuaFluidBox[];
|
|
9545
9643
|
/**
|
|
9546
9644
|
* Get a fluid box filter
|
|
9547
9645
|
* @param index The index of the filter to get.
|
|
9548
9646
|
* @returns The filter at the requested index, or `nil` if there isn't one.
|
|
9549
9647
|
*/
|
|
9550
|
-
get_filter(this: void, index:
|
|
9648
|
+
get_filter(this: void, index: uint32): FluidBoxFilter | null;
|
|
9551
9649
|
/**
|
|
9552
9650
|
* Gets counts of all fluids in the fluid segment. May return `nil` for fluid wagon, fluid turret's internal buffer, or a fluidbox which does not belong to a fluid segment.
|
|
9553
9651
|
*
|
|
9554
9652
|
* Note that this method only ever returns one fluid, since fluids can't be mixed anymore.
|
|
9555
9653
|
* @returns The counts, indexed by fluid name.
|
|
9556
9654
|
*/
|
|
9557
|
-
get_fluid_segment_contents(this: void, index:
|
|
9655
|
+
get_fluid_segment_contents(this: void, index: uint32): Record<string, uint32> | null;
|
|
9656
|
+
/**
|
|
9657
|
+
* Gets the current extent bounding box of the fluid segment this fluid box belongs to. May return `nil` for fluid wagon, fluid turret's internal buffer, or a fluidbox which does not belong to a fluid segment.
|
|
9658
|
+
*/
|
|
9659
|
+
get_fluid_segment_extent_bounding_box(this: void, index: uint32): BoundingBox | null;
|
|
9558
9660
|
/**
|
|
9559
9661
|
* Gets the unique ID of the fluid segment this fluid box belongs to. May return `nil` for fluid wagon, fluid turret's internal buffer or a fluidbox which does not belong to a fluid segment.
|
|
9560
9662
|
*/
|
|
9561
|
-
get_fluid_segment_id(this: void, index:
|
|
9663
|
+
get_fluid_segment_id(this: void, index: uint32): uint32 | null;
|
|
9562
9664
|
/**
|
|
9563
9665
|
* Returns other end of a linked connection.
|
|
9564
9666
|
* @returns [0] - Other entity to which a linked connection was made
|
|
9565
9667
|
* @returns [1] - linked_connection_id on other entity
|
|
9566
9668
|
*/
|
|
9567
|
-
get_linked_connection(this: void, this_linked_connection_id:
|
|
9669
|
+
get_linked_connection(this: void, this_linked_connection_id: uint32): LuaMultiReturn<[
|
|
9568
9670
|
LuaEntity | null,
|
|
9569
|
-
|
|
9671
|
+
uint32 | null
|
|
9570
9672
|
]>;
|
|
9571
9673
|
/**
|
|
9572
9674
|
* Returns list of all linked connections registered for this entity.
|
|
@@ -9576,19 +9678,19 @@ interface LuaFluidBox {
|
|
|
9576
9678
|
* Returns the fluid the fluidbox is locked onto
|
|
9577
9679
|
* @returns `nil` if the fluidbox is not locked to any fluid.
|
|
9578
9680
|
*/
|
|
9579
|
-
get_locked_fluid(this: void, index:
|
|
9681
|
+
get_locked_fluid(this: void, index: uint32): string | null;
|
|
9580
9682
|
/**
|
|
9581
9683
|
* Get the fluid box's connections and associated data.
|
|
9582
9684
|
*/
|
|
9583
|
-
get_pipe_connections(this: void, index:
|
|
9685
|
+
get_pipe_connections(this: void, index: uint32): PipeConnection[];
|
|
9584
9686
|
/**
|
|
9585
9687
|
* The prototype of this fluidbox index. If this is used on a fluidbox of a crafting machine which due to recipe was created by merging multiple prototypes, a table of prototypes that were merged will be returned instead
|
|
9586
9688
|
*/
|
|
9587
|
-
get_prototype(this: void, index:
|
|
9689
|
+
get_prototype(this: void, index: uint32): LuaFluidBoxPrototype | LuaFluidBoxPrototype[];
|
|
9588
9690
|
/**
|
|
9589
9691
|
* Removes linked connection record. If connected, other end will be also removed.
|
|
9590
9692
|
*/
|
|
9591
|
-
remove_linked_connection(this: void, this_linked_connection_id:
|
|
9693
|
+
remove_linked_connection(this: void, this_linked_connection_id: uint32): void;
|
|
9592
9694
|
/**
|
|
9593
9695
|
* Set a fluid box filter.
|
|
9594
9696
|
*
|
|
@@ -9597,7 +9699,7 @@ interface LuaFluidBox {
|
|
|
9597
9699
|
* @param filter The filter to set. Setting `nil` clears the filter.
|
|
9598
9700
|
* @returns Whether the filter was set successfully.
|
|
9599
9701
|
*/
|
|
9600
|
-
set_filter(this: void, index:
|
|
9702
|
+
set_filter(this: void, index: uint32, filter: FluidBoxFilterSpec | nil): boolean;
|
|
9601
9703
|
/**
|
|
9602
9704
|
* 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.
|
|
9603
9705
|
*/
|
|
@@ -9625,7 +9727,7 @@ interface LuaFluidBox {
|
|
|
9625
9727
|
/**
|
|
9626
9728
|
* Number of fluid boxes.
|
|
9627
9729
|
*/
|
|
9628
|
-
length: LuaLengthMethod<
|
|
9730
|
+
length: LuaLengthMethod<uint32>;
|
|
9629
9731
|
}
|
|
9630
9732
|
/**
|
|
9631
9733
|
* A prototype of a fluidbox owned by some {@link LuaEntityPrototype | runtime:LuaEntityPrototype}.
|
|
@@ -9642,7 +9744,7 @@ interface LuaFluidBoxPrototype {
|
|
|
9642
9744
|
/**
|
|
9643
9745
|
* The index of this fluidbox prototype in the owning entity.
|
|
9644
9746
|
*/
|
|
9645
|
-
readonly index:
|
|
9747
|
+
readonly index: uint32;
|
|
9646
9748
|
/**
|
|
9647
9749
|
* The maximum temperature, if any is set.
|
|
9648
9750
|
*/
|
|
@@ -9670,7 +9772,7 @@ interface LuaFluidBoxPrototype {
|
|
|
9670
9772
|
/**
|
|
9671
9773
|
* The secondary draw orders for the 4 possible connection directions.
|
|
9672
9774
|
*/
|
|
9673
|
-
readonly secondary_draw_orders:
|
|
9775
|
+
readonly secondary_draw_orders: int32[];
|
|
9674
9776
|
/**
|
|
9675
9777
|
* 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.
|
|
9676
9778
|
*/
|
|
@@ -9772,7 +9874,7 @@ interface LuaFontPrototype {
|
|
|
9772
9874
|
* 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.
|
|
9773
9875
|
*/
|
|
9774
9876
|
readonly object_name: string;
|
|
9775
|
-
readonly size:
|
|
9877
|
+
readonly size: int32;
|
|
9776
9878
|
readonly spacing: float;
|
|
9777
9879
|
/**
|
|
9778
9880
|
* 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.
|
|
@@ -9918,7 +10020,7 @@ interface LuaForce {
|
|
|
9918
10020
|
* @param name Prototype name of the entity.
|
|
9919
10021
|
* @returns Number of entities of given prototype belonging to this force.
|
|
9920
10022
|
*/
|
|
9921
|
-
get_entity_count(this: void, name: EntityID):
|
|
10023
|
+
get_entity_count(this: void, name: EntityID): uint32;
|
|
9922
10024
|
/**
|
|
9923
10025
|
* Fetches the evolution factor of this force on the given surface.
|
|
9924
10026
|
* @param surface Defaults to "nauvis".
|
|
@@ -9960,7 +10062,7 @@ interface LuaForce {
|
|
|
9960
10062
|
* @param item The item to get
|
|
9961
10063
|
* @returns The count of the item that has been launched.
|
|
9962
10064
|
*/
|
|
9963
|
-
get_item_launched(this: void, item: ItemID):
|
|
10065
|
+
get_item_launched(this: void, item: ItemID): uint32;
|
|
9964
10066
|
/**
|
|
9965
10067
|
* The item production statistics for this force for the given surface.
|
|
9966
10068
|
*/
|
|
@@ -9972,7 +10074,7 @@ interface LuaForce {
|
|
|
9972
10074
|
/**
|
|
9973
10075
|
* Gets the linked inventory for the given prototype and link ID if it exists or `nil`.
|
|
9974
10076
|
*/
|
|
9975
|
-
get_linked_inventory(this: void, prototype: EntityID, link_id:
|
|
10077
|
+
get_linked_inventory(this: void, prototype: EntityID, link_id: uint32): LuaInventory | null;
|
|
9976
10078
|
/**
|
|
9977
10079
|
* Gets the information about the given logistic group.
|
|
9978
10080
|
* @param type Defaults to `defines.logistic_group_type.with_trash`.
|
|
@@ -10090,6 +10192,10 @@ interface LuaForce {
|
|
|
10090
10192
|
* Reapplies all possible research effects, including unlocked recipes. Any custom changes are lost. Preserves research state of technologies.
|
|
10091
10193
|
*/
|
|
10092
10194
|
reset_technology_effects(this: void): void;
|
|
10195
|
+
/**
|
|
10196
|
+
* Trigger the "scripted" {@link research trigger | runtime:ResearchTrigger} of a technology, researching it. Does nothing if the technology does not have a "scripted" research trigger.
|
|
10197
|
+
*/
|
|
10198
|
+
script_trigger_research(this: void, technology: TechnologyID): void;
|
|
10093
10199
|
/**
|
|
10094
10200
|
* @param ammo Ammo category
|
|
10095
10201
|
*/
|
|
@@ -10135,7 +10241,7 @@ interface LuaForce {
|
|
|
10135
10241
|
* @param item The item to set
|
|
10136
10242
|
* @param count The count to set
|
|
10137
10243
|
*/
|
|
10138
|
-
set_item_launched(this: void, item: ItemID, count:
|
|
10244
|
+
set_item_launched(this: void, item: ItemID, count: uint32): void;
|
|
10139
10245
|
/**
|
|
10140
10246
|
* @param position The new position on the given surface.
|
|
10141
10247
|
* @param surface Surface to set the spawn position for.
|
|
@@ -10182,25 +10288,25 @@ interface LuaForce {
|
|
|
10182
10288
|
/**
|
|
10183
10289
|
* Belt stack size bonus.
|
|
10184
10290
|
*/
|
|
10185
|
-
belt_stack_size_bonus:
|
|
10291
|
+
belt_stack_size_bonus: uint32;
|
|
10186
10292
|
/**
|
|
10187
10293
|
* Number of items that can be transferred by bulk inserters. When writing to this value, it must be >= 0 and <= 254.
|
|
10188
10294
|
*/
|
|
10189
|
-
bulk_inserter_capacity_bonus:
|
|
10190
|
-
character_build_distance_bonus:
|
|
10295
|
+
bulk_inserter_capacity_bonus: uint32;
|
|
10296
|
+
character_build_distance_bonus: uint32;
|
|
10191
10297
|
character_health_bonus: double;
|
|
10192
10298
|
/**
|
|
10193
10299
|
* The number of additional inventory slots the character main inventory has.
|
|
10194
10300
|
*/
|
|
10195
|
-
character_inventory_slots_bonus:
|
|
10196
|
-
character_item_drop_distance_bonus:
|
|
10301
|
+
character_inventory_slots_bonus: uint32;
|
|
10302
|
+
character_item_drop_distance_bonus: uint32;
|
|
10197
10303
|
character_item_pickup_distance_bonus: double;
|
|
10198
10304
|
/**
|
|
10199
10305
|
* `true` if character requester logistics is enabled.
|
|
10200
10306
|
*/
|
|
10201
10307
|
character_logistic_requests: boolean;
|
|
10202
10308
|
character_loot_pickup_distance_bonus: double;
|
|
10203
|
-
character_reach_distance_bonus:
|
|
10309
|
+
character_reach_distance_bonus: uint32;
|
|
10204
10310
|
character_resource_reach_distance_bonus: double;
|
|
10205
10311
|
/**
|
|
10206
10312
|
* Modifies the running speed of all characters in this force by the given value as a percentage. Setting the running modifier to `0.5` makes the character run 50% faster. The minimum value of `-1` reduces the movement speed by 100%, resulting in a speed of `0`.
|
|
@@ -10242,7 +10348,7 @@ interface LuaForce {
|
|
|
10242
10348
|
/**
|
|
10243
10349
|
* The time, in ticks, before a deconstruction order is removed.
|
|
10244
10350
|
*/
|
|
10245
|
-
deconstruction_time_to_live:
|
|
10351
|
+
deconstruction_time_to_live: uint32;
|
|
10246
10352
|
/**
|
|
10247
10353
|
* Additional lifetime for following robots.
|
|
10248
10354
|
*/
|
|
@@ -10254,7 +10360,7 @@ interface LuaForce {
|
|
|
10254
10360
|
/**
|
|
10255
10361
|
* This force's index in {@link LuaGameScript::forces | runtime:LuaGameScript::forces} (unique ID). It is assigned when a force is created, and remains so until it is {@link merged | runtime:on_forces_merged} (ie. deleted). Indexes of merged forces can be reused.
|
|
10256
10362
|
*/
|
|
10257
|
-
readonly index:
|
|
10363
|
+
readonly index: uint32;
|
|
10258
10364
|
/**
|
|
10259
10365
|
* The inserter stack size bonus for non stack inserters
|
|
10260
10366
|
*/
|
|
@@ -10285,12 +10391,12 @@ interface LuaForce {
|
|
|
10285
10391
|
```
|
|
10286
10392
|
*/
|
|
10287
10393
|
manual_mining_speed_modifier: double;
|
|
10288
|
-
max_failed_attempts_per_tick_per_construction_queue:
|
|
10289
|
-
max_successful_attempts_per_tick_per_construction_queue:
|
|
10394
|
+
max_failed_attempts_per_tick_per_construction_queue: uint32;
|
|
10395
|
+
max_successful_attempts_per_tick_per_construction_queue: uint32;
|
|
10290
10396
|
/**
|
|
10291
10397
|
* Maximum number of follower robots.
|
|
10292
10398
|
*/
|
|
10293
|
-
maximum_following_robot_count:
|
|
10399
|
+
maximum_following_robot_count: uint32;
|
|
10294
10400
|
mining_drill_productivity_bonus: double;
|
|
10295
10401
|
mining_with_fluid: boolean;
|
|
10296
10402
|
/**
|
|
@@ -10309,7 +10415,7 @@ interface LuaForce {
|
|
|
10309
10415
|
*
|
|
10310
10416
|
* This will include platforms that are pending deletion.
|
|
10311
10417
|
*/
|
|
10312
|
-
readonly platforms:
|
|
10418
|
+
readonly platforms: LuaTable<uint32, LuaSpacePlatform>;
|
|
10313
10419
|
/**
|
|
10314
10420
|
* Players belonging to this force.
|
|
10315
10421
|
*/
|
|
@@ -10347,7 +10453,7 @@ interface LuaForce {
|
|
|
10347
10453
|
/**
|
|
10348
10454
|
* The number of rockets launched.
|
|
10349
10455
|
*/
|
|
10350
|
-
rockets_launched:
|
|
10456
|
+
rockets_launched: uint32;
|
|
10351
10457
|
/**
|
|
10352
10458
|
* If sharing chart data is enabled for this force.
|
|
10353
10459
|
*/
|
|
@@ -10484,7 +10590,7 @@ interface LuaGameScript {
|
|
|
10484
10590
|
*
|
|
10485
10591
|
* *Make sure* you actually want to use this over math.random(...) as this provides entirely different functionality over math.random(...).
|
|
10486
10592
|
*/
|
|
10487
|
-
create_random_generator(this: void, seed?:
|
|
10593
|
+
create_random_generator(this: void, seed?: uint32): LuaRandomGenerator;
|
|
10488
10594
|
/**
|
|
10489
10595
|
* Create a new surface.
|
|
10490
10596
|
*
|
|
@@ -10515,7 +10621,7 @@ interface LuaGameScript {
|
|
|
10515
10621
|
/**
|
|
10516
10622
|
* Returns entity with a specified unit number or nil if entity with such number was not found or prototype does not have {@link EntityPrototypeFlags::get-by-unit-number | prototype:EntityPrototypeFlags::get_by_unit_number} flag set.
|
|
10517
10623
|
*/
|
|
10518
|
-
get_entity_by_unit_number(this: void, unit_number:
|
|
10624
|
+
get_entity_by_unit_number(this: void, unit_number: uint32): LuaEntity | null;
|
|
10519
10625
|
/**
|
|
10520
10626
|
* Gets the map exchange string for the map generation settings that were used to create this map.
|
|
10521
10627
|
*/
|
|
@@ -10524,7 +10630,7 @@ interface LuaGameScript {
|
|
|
10524
10630
|
* Gets the given player or returns `nil` if no player is found.
|
|
10525
10631
|
* @param player The player index or name.
|
|
10526
10632
|
*/
|
|
10527
|
-
get_player(this: void, player:
|
|
10633
|
+
get_player(this: void, player: uint32 | string): LuaPlayer | null;
|
|
10528
10634
|
/**
|
|
10529
10635
|
* The pollution statistics for this the given surface.
|
|
10530
10636
|
*/
|
|
@@ -10543,13 +10649,12 @@ interface LuaGameScript {
|
|
|
10543
10649
|
* This is a shortcut for {@link LuaGameScript::surfaces | runtime:LuaGameScript::surfaces}.
|
|
10544
10650
|
* @param surface The surface index or name.
|
|
10545
10651
|
*/
|
|
10546
|
-
get_surface(this: void, surface:
|
|
10652
|
+
get_surface(this: void, surface: uint32 | string): LuaSurface | null;
|
|
10547
10653
|
/**
|
|
10548
|
-
* Returns vehicles in game
|
|
10549
|
-
* @param table.surface )
|
|
10654
|
+
* Returns vehicles in game.
|
|
10550
10655
|
*/
|
|
10551
10656
|
get_vehicles(this: void, table: {
|
|
10552
|
-
unit_number?:
|
|
10657
|
+
unit_number?: uint32;
|
|
10553
10658
|
force?: ForceID;
|
|
10554
10659
|
surface?: SurfaceIdentification;
|
|
10555
10660
|
type?: EntityID | EntityID[];
|
|
@@ -10737,10 +10842,10 @@ interface LuaGameScript {
|
|
|
10737
10842
|
anti_alias?: boolean;
|
|
10738
10843
|
hide_clouds?: boolean;
|
|
10739
10844
|
hide_fog?: boolean;
|
|
10740
|
-
quality?:
|
|
10845
|
+
quality?: int32;
|
|
10741
10846
|
allow_in_replay?: boolean;
|
|
10742
10847
|
daytime?: double;
|
|
10743
|
-
water_tick?:
|
|
10848
|
+
water_tick?: uint32;
|
|
10744
10849
|
force_render?: boolean;
|
|
10745
10850
|
}): void;
|
|
10746
10851
|
/**
|
|
@@ -10756,7 +10861,7 @@ interface LuaGameScript {
|
|
|
10756
10861
|
player: PlayerIdentification;
|
|
10757
10862
|
selected_technology?: TechnologyID;
|
|
10758
10863
|
skip_disabled?: boolean;
|
|
10759
|
-
quality?:
|
|
10864
|
+
quality?: int32;
|
|
10760
10865
|
}): void;
|
|
10761
10866
|
/**
|
|
10762
10867
|
* Unbans the given player from this multiplayer game. Does nothing if this is a single player game of if the player running this isn't an admin.
|
|
@@ -10787,7 +10892,7 @@ interface LuaGameScript {
|
|
|
10787
10892
|
/**
|
|
10788
10893
|
* Array of the names of all the backers that supported the game development early on. These are used as names for labs, locomotives, radars, roboports, and train stops.
|
|
10789
10894
|
*/
|
|
10790
|
-
readonly backer_names:
|
|
10895
|
+
readonly backer_names: LuaTable<uint32, string>;
|
|
10791
10896
|
/**
|
|
10792
10897
|
* Records contained in the "game blueprints" tab of the blueprint library.
|
|
10793
10898
|
*/
|
|
@@ -10837,7 +10942,7 @@ interface LuaGameScript {
|
|
|
10837
10942
|
/**
|
|
10838
10943
|
* Get a table of all the forces that currently exist. This sparse table allows you to find forces by indexing it with either their `name` or `index`. Iterating this table with `pairs()` will provide the `name`s as the keys. Iterating with `ipairs()` will not work at all.
|
|
10839
10944
|
*/
|
|
10840
|
-
readonly forces:
|
|
10945
|
+
readonly forces: LuaTable<uint32 | string, LuaForce>;
|
|
10841
10946
|
/**
|
|
10842
10947
|
* The currently active set of map settings. Even though this property is marked as read-only, the members of the dictionary that is returned can be modified mid-game.
|
|
10843
10948
|
*
|
|
@@ -10861,7 +10966,7 @@ interface LuaGameScript {
|
|
|
10861
10966
|
*
|
|
10862
10967
|
* If only a single player is required, {@link LuaGameScript::get_player | runtime:LuaGameScript::get_player} should be used instead, as it avoids the unnecessary overhead of passing the whole table to Lua.
|
|
10863
10968
|
*/
|
|
10864
|
-
readonly players:
|
|
10969
|
+
readonly players: LuaTable<uint32 | string, LuaPlayer>;
|
|
10865
10970
|
/**
|
|
10866
10971
|
* Simulation-related functions, or `nil` if the current game is not a simulation.
|
|
10867
10972
|
*/
|
|
@@ -10873,7 +10978,7 @@ interface LuaGameScript {
|
|
|
10873
10978
|
/**
|
|
10874
10979
|
* Get a table of all the surfaces that currently exist. This sparse table allows you to find surfaces by indexing it with either their `name` or `index`. Iterating this table with `pairs()` will provide the `name`s as the keys. Iterating with `ipairs()` will not work at all.
|
|
10875
10980
|
*/
|
|
10876
|
-
readonly surfaces:
|
|
10981
|
+
readonly surfaces: LuaTable<uint32 | string, LuaSurface>;
|
|
10877
10982
|
/**
|
|
10878
10983
|
* True by default. Can be used to prevent the game engine from printing certain messages.
|
|
10879
10984
|
* Prevented messages:
|
|
@@ -10903,7 +11008,7 @@ interface LuaGameScript {
|
|
|
10903
11008
|
*
|
|
10904
11009
|
* When {@link LuaGameScript::tick_paused | runtime:LuaGameScript::tick_paused} is true, ticks_to_run behaves the following way: While this is > 0, the entity update is running normally and this value is decremented every tick. When this reaches 0, the game will pause again.
|
|
10905
11010
|
*/
|
|
10906
|
-
ticks_to_run:
|
|
11011
|
+
ticks_to_run: uint32;
|
|
10907
11012
|
readonly train_manager: LuaTrainManager;
|
|
10908
11013
|
}
|
|
10909
11014
|
/**
|
|
@@ -10922,7 +11027,7 @@ interface LuaGenericOnOffControlBehavior extends LuaControlBehavior {
|
|
|
10922
11027
|
}
|
|
10923
11028
|
```
|
|
10924
11029
|
*/
|
|
10925
|
-
circuit_condition
|
|
11030
|
+
circuit_condition?: CircuitConditionDefinition;
|
|
10926
11031
|
/**
|
|
10927
11032
|
* `true` if this entity enable/disable state is controlled by circuit condition
|
|
10928
11033
|
*/
|
|
@@ -10947,7 +11052,7 @@ interface LuaGenericOnOffControlBehavior extends LuaControlBehavior {
|
|
|
10947
11052
|
}
|
|
10948
11053
|
```
|
|
10949
11054
|
*/
|
|
10950
|
-
logistic_condition
|
|
11055
|
+
logistic_condition?: CircuitConditionDefinition;
|
|
10951
11056
|
}
|
|
10952
11057
|
/**
|
|
10953
11058
|
* Item group or subgroup.
|
|
@@ -11066,7 +11171,7 @@ interface LuaGuiElement {
|
|
|
11066
11171
|
* @param string The text to insert.
|
|
11067
11172
|
* @param index The index at which to insert the item.
|
|
11068
11173
|
*/
|
|
11069
|
-
add_item(this: void, string: LocalisedString, index?:
|
|
11174
|
+
add_item(this: void, string: LocalisedString, index?: uint32): void;
|
|
11070
11175
|
/**
|
|
11071
11176
|
* Adds the given tab and content widgets to this tabbed pane as a new tab.
|
|
11072
11177
|
* @param tab The tab to add, must be a GUI element of type "tab".
|
|
@@ -11116,12 +11221,12 @@ interface LuaGuiElement {
|
|
|
11116
11221
|
*
|
|
11117
11222
|
* This iterates through the children of the parent of this element, meaning this has a non-free cost to get, but is faster than doing the equivalent in Lua.
|
|
11118
11223
|
*/
|
|
11119
|
-
get_index_in_parent(this: void):
|
|
11224
|
+
get_index_in_parent(this: void): uint32;
|
|
11120
11225
|
/**
|
|
11121
11226
|
* Gets the item at the given index from this dropdown or listbox.
|
|
11122
11227
|
* @param index The index to get
|
|
11123
11228
|
*/
|
|
11124
|
-
get_item(this: void, index:
|
|
11229
|
+
get_item(this: void, index: uint32): LocalisedString;
|
|
11125
11230
|
/**
|
|
11126
11231
|
* The mod that owns this Gui element or `nil` if it's owned by the scenario script.
|
|
11127
11232
|
*
|
|
@@ -11148,7 +11253,7 @@ interface LuaGuiElement {
|
|
|
11148
11253
|
* Removes the item at the given index from this dropdown or listbox.
|
|
11149
11254
|
* @param index The index
|
|
11150
11255
|
*/
|
|
11151
|
-
remove_item(this: void, index:
|
|
11256
|
+
remove_item(this: void, index: uint32): void;
|
|
11152
11257
|
/**
|
|
11153
11258
|
* Removes the given tab and its associated content from this tabbed pane.
|
|
11154
11259
|
*
|
|
@@ -11171,7 +11276,7 @@ interface LuaGuiElement {
|
|
|
11171
11276
|
* @param index The item index to scroll to.
|
|
11172
11277
|
* @param scroll_mode Where the item should be positioned in the list-box. Defaults to `"in-view"`.
|
|
11173
11278
|
*/
|
|
11174
|
-
scroll_to_item(this: void, index:
|
|
11279
|
+
scroll_to_item(this: void, index: int32, scroll_mode?: 'in-view' | 'top-third'): void;
|
|
11175
11280
|
/**
|
|
11176
11281
|
* Scrolls this scroll bar to the left.
|
|
11177
11282
|
*/
|
|
@@ -11197,7 +11302,7 @@ interface LuaGuiElement {
|
|
|
11197
11302
|
textbox.select(1, 0)
|
|
11198
11303
|
```
|
|
11199
11304
|
*/
|
|
11200
|
-
select(this: void, start_index:
|
|
11305
|
+
select(this: void, start_index: int32, end_index: int32): void;
|
|
11201
11306
|
/**
|
|
11202
11307
|
* Selects all the text in this textbox.
|
|
11203
11308
|
*/
|
|
@@ -11207,7 +11312,7 @@ interface LuaGuiElement {
|
|
|
11207
11312
|
* @param index The index whose text to replace.
|
|
11208
11313
|
* @param string The text to set at the given index.
|
|
11209
11314
|
*/
|
|
11210
|
-
set_item(this: void, index:
|
|
11315
|
+
set_item(this: void, index: uint32, string: LocalisedString): void;
|
|
11211
11316
|
/**
|
|
11212
11317
|
* Sets whether this slider only allows discrete values.
|
|
11213
11318
|
*/
|
|
@@ -11225,7 +11330,7 @@ interface LuaGuiElement {
|
|
|
11225
11330
|
* @param index_1 The index of the first child.
|
|
11226
11331
|
* @param index_2 The index of the second child.
|
|
11227
11332
|
*/
|
|
11228
|
-
swap_children(this: void, index_1:
|
|
11333
|
+
swap_children(this: void, index_1: uint32, index_2: uint32): void;
|
|
11229
11334
|
/**
|
|
11230
11335
|
* Whether this textfield (when in numeric mode) allows decimal numbers.
|
|
11231
11336
|
*/
|
|
@@ -11277,7 +11382,7 @@ interface LuaGuiElement {
|
|
|
11277
11382
|
/**
|
|
11278
11383
|
* The number of columns in this table.
|
|
11279
11384
|
*/
|
|
11280
|
-
readonly column_count:
|
|
11385
|
+
readonly column_count: uint32;
|
|
11281
11386
|
/**
|
|
11282
11387
|
* Direction of this element's layout.
|
|
11283
11388
|
*/
|
|
@@ -11317,7 +11422,7 @@ interface LuaGuiElement {
|
|
|
11317
11422
|
```
|
|
11318
11423
|
* @example ```
|
|
11319
11424
|
-- Then, there are some types of filters that work on a specific kind of attribute. The following will configure a
|
|
11320
|
-
-- choose-elem-button of type "entity" to only show entities that have their
|
|
11425
|
+
-- choose-elem-button of type "entity" to only show entities that have their `hidden` property set to `true`.
|
|
11321
11426
|
button.elem_filters = {{filter = "hidden"}}
|
|
11322
11427
|
```
|
|
11323
11428
|
* @example ```
|
|
@@ -11373,6 +11478,10 @@ interface LuaGuiElement {
|
|
|
11373
11478
|
* The sprite to display on this sprite-button when it is hovered.
|
|
11374
11479
|
*/
|
|
11375
11480
|
hovered_sprite: SpritePath;
|
|
11481
|
+
/**
|
|
11482
|
+
* Whether this textfield or text-box was created with an icon selector.
|
|
11483
|
+
*/
|
|
11484
|
+
readonly icon_selector: boolean;
|
|
11376
11485
|
/**
|
|
11377
11486
|
* Whether this GUI element is ignored by interaction. This makes clicks on this element 'go through' to the GUI element or even the game surface below it.
|
|
11378
11487
|
*/
|
|
@@ -11380,7 +11489,7 @@ interface LuaGuiElement {
|
|
|
11380
11489
|
/**
|
|
11381
11490
|
* The index of this GUI element (unique amongst the GUI elements of a LuaPlayer).
|
|
11382
11491
|
*/
|
|
11383
|
-
readonly index:
|
|
11492
|
+
readonly index: uint32;
|
|
11384
11493
|
/**
|
|
11385
11494
|
* Whether this textfield displays as a password field, which renders all characters as `*`.
|
|
11386
11495
|
*/
|
|
@@ -11412,7 +11521,7 @@ interface LuaGuiElement {
|
|
|
11412
11521
|
/**
|
|
11413
11522
|
* The player index this minimap is using.
|
|
11414
11523
|
*/
|
|
11415
|
-
minimap_player_index:
|
|
11524
|
+
minimap_player_index: uint32;
|
|
11416
11525
|
/**
|
|
11417
11526
|
* The mouse button filters for this button or sprite-button.
|
|
11418
11527
|
*/
|
|
@@ -11443,7 +11552,7 @@ interface LuaGuiElement {
|
|
|
11443
11552
|
/**
|
|
11444
11553
|
* Index into {@link LuaGameScript::players | runtime:LuaGameScript::players} specifying the player who owns this element.
|
|
11445
11554
|
*/
|
|
11446
|
-
readonly player_index:
|
|
11555
|
+
readonly player_index: uint32;
|
|
11447
11556
|
/**
|
|
11448
11557
|
* The position this camera or minimap is focused on, if any.
|
|
11449
11558
|
*/
|
|
@@ -11484,11 +11593,11 @@ interface LuaGuiElement {
|
|
|
11484
11593
|
/**
|
|
11485
11594
|
* The selected index for this dropdown or listbox. Returns `0` if none is selected.
|
|
11486
11595
|
*/
|
|
11487
|
-
selected_index:
|
|
11596
|
+
selected_index: uint32;
|
|
11488
11597
|
/**
|
|
11489
11598
|
* The selected tab index for this tabbed pane, if any.
|
|
11490
11599
|
*/
|
|
11491
|
-
selected_tab_index?:
|
|
11600
|
+
selected_tab_index?: uint32;
|
|
11492
11601
|
/**
|
|
11493
11602
|
* 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.
|
|
11494
11603
|
*/
|
|
@@ -11512,7 +11621,7 @@ interface LuaGuiElement {
|
|
|
11512
11621
|
/**
|
|
11513
11622
|
* The surface index this camera or minimap is using.
|
|
11514
11623
|
*/
|
|
11515
|
-
surface_index:
|
|
11624
|
+
surface_index: uint32;
|
|
11516
11625
|
/**
|
|
11517
11626
|
* The switch state for this switch.
|
|
11518
11627
|
*
|
|
@@ -11609,7 +11718,7 @@ interface BaseLuaGuiElementAddParams {
|
|
|
11609
11718
|
/**
|
|
11610
11719
|
* Location in its parent that the child element should slot into. By default, the child will be appended onto the end.
|
|
11611
11720
|
*/
|
|
11612
|
-
'index'?:
|
|
11721
|
+
'index'?: uint32;
|
|
11613
11722
|
/**
|
|
11614
11723
|
* Whether the child element is locked. Defaults to `false`.
|
|
11615
11724
|
*/
|
|
@@ -11681,7 +11790,7 @@ interface LuaGuiElementAddParamsCamera extends BaseLuaGuiElementAddParams {
|
|
|
11681
11790
|
/**
|
|
11682
11791
|
* The surface that the camera will render. Defaults to the player's current surface.
|
|
11683
11792
|
*/
|
|
11684
|
-
'surface_index'?:
|
|
11793
|
+
'surface_index'?: uint32;
|
|
11685
11794
|
/**
|
|
11686
11795
|
* The initial camera zoom. Defaults to `0.75`.
|
|
11687
11796
|
*/
|
|
@@ -11803,7 +11912,7 @@ interface LuaGuiElementAddParamsDropDown extends BaseLuaGuiElementAddParams {
|
|
|
11803
11912
|
/**
|
|
11804
11913
|
* The index of the initially selected item. Defaults to 0.
|
|
11805
11914
|
*/
|
|
11806
|
-
'selected_index'?:
|
|
11915
|
+
'selected_index'?: uint32;
|
|
11807
11916
|
}
|
|
11808
11917
|
/**
|
|
11809
11918
|
*
|
|
@@ -11863,7 +11972,7 @@ interface LuaGuiElementAddParamsListBox extends BaseLuaGuiElementAddParams {
|
|
|
11863
11972
|
/**
|
|
11864
11973
|
* The index of the initially selected item. Defaults to 0.
|
|
11865
11974
|
*/
|
|
11866
|
-
'selected_index'?:
|
|
11975
|
+
'selected_index'?: uint32;
|
|
11867
11976
|
}
|
|
11868
11977
|
/**
|
|
11869
11978
|
*
|
|
@@ -11877,7 +11986,7 @@ interface LuaGuiElementAddParamsMinimap extends BaseLuaGuiElementAddParams {
|
|
|
11877
11986
|
/**
|
|
11878
11987
|
* The player index the map should use. Defaults to the current player.
|
|
11879
11988
|
*/
|
|
11880
|
-
'chart_player_index'?:
|
|
11989
|
+
'chart_player_index'?: uint32;
|
|
11881
11990
|
/**
|
|
11882
11991
|
* The force this minimap should use. Defaults to the player's current force.
|
|
11883
11992
|
*/
|
|
@@ -11889,7 +11998,7 @@ interface LuaGuiElementAddParamsMinimap extends BaseLuaGuiElementAddParams {
|
|
|
11889
11998
|
/**
|
|
11890
11999
|
* The surface the camera will render. Defaults to the player's current surface.
|
|
11891
12000
|
*/
|
|
11892
|
-
'surface_index'?:
|
|
12001
|
+
'surface_index'?: uint32;
|
|
11893
12002
|
/**
|
|
11894
12003
|
* The initial camera zoom. Defaults to `0.75`.
|
|
11895
12004
|
*/
|
|
@@ -12083,7 +12192,7 @@ interface LuaGuiElementAddParamsTable extends BaseLuaGuiElementAddParams {
|
|
|
12083
12192
|
/**
|
|
12084
12193
|
* Number of columns. This can't be changed after the table is created.
|
|
12085
12194
|
*/
|
|
12086
|
-
'column_count':
|
|
12195
|
+
'column_count': uint32;
|
|
12087
12196
|
/**
|
|
12088
12197
|
* Whether the table should draw a single horizontal grid line after the headers. Defaults to `false`.
|
|
12089
12198
|
*/
|
|
@@ -12224,7 +12333,7 @@ interface LuaHelpers {
|
|
|
12224
12333
|
* @param second Second version string to compare.
|
|
12225
12334
|
* @returns -1 if first is smaller than second, 0 if first equal second, 1 if first is greater than second.
|
|
12226
12335
|
*/
|
|
12227
|
-
compare_versions(this: void, first: string, second: string):
|
|
12336
|
+
compare_versions(this: void, first: string, second: string): int32;
|
|
12228
12337
|
/**
|
|
12229
12338
|
* Creates a {@link LuaProfiler | runtime:LuaProfiler}, which is used for measuring script performance.
|
|
12230
12339
|
*
|
|
@@ -12281,6 +12390,11 @@ interface LuaHelpers {
|
|
|
12281
12390
|
* @returns The returned object, or `nil` if the JSON string was invalid.
|
|
12282
12391
|
*/
|
|
12283
12392
|
json_to_table(this: void, json: string): AnyBasic | null;
|
|
12393
|
+
/**
|
|
12394
|
+
* Converts the given string to lowercase and returns it. Unlike `string.lower()`, this function supports {@link non-Latin characters | https://factorio.com/blog/post/fff-436}.
|
|
12395
|
+
* @returns The input string converted to lowercase.
|
|
12396
|
+
*/
|
|
12397
|
+
multilingual_to_lower(this: void, input: string): string;
|
|
12284
12398
|
/**
|
|
12285
12399
|
* Convert a map exchange string to map gen settings and map settings.
|
|
12286
12400
|
*
|
|
@@ -12299,7 +12413,7 @@ interface LuaHelpers {
|
|
|
12299
12413
|
* Not available in settings and prototype stages.
|
|
12300
12414
|
* @param for_player If given, packets will only be read from this `player_index`. Providing `0` will only read from the server if present.
|
|
12301
12415
|
*/
|
|
12302
|
-
recv_udp(this: void, for_player?:
|
|
12416
|
+
recv_udp(this: void, for_player?: uint32): void;
|
|
12303
12417
|
/**
|
|
12304
12418
|
* Remove a file or directory in the `script-output` folder, located in the game's {@link user data directory | https://wiki.factorio.com/User_data_directory}. Can be used to remove files created by {@link LuaHelpers::write_file | runtime:LuaHelpers::write_file}.
|
|
12305
12419
|
* @param path The path to the file or directory to remove, relative to `script-output`.
|
|
@@ -12313,7 +12427,7 @@ interface LuaHelpers {
|
|
|
12313
12427
|
* @param data The content to send.
|
|
12314
12428
|
* @param for_player If given, the packet will only be sent from this `player_index`. Providing `0` will only send from the server if present. `for_player` cannot be used in settings and prototype stages.
|
|
12315
12429
|
*/
|
|
12316
|
-
send_udp(this: void, port: uint16, data: LocalisedString, for_player?:
|
|
12430
|
+
send_udp(this: void, port: uint16, data: LocalisedString, for_player?: uint32): void;
|
|
12317
12431
|
/**
|
|
12318
12432
|
* Convert a table to a JSON string
|
|
12319
12433
|
*/
|
|
@@ -12325,7 +12439,7 @@ interface LuaHelpers {
|
|
|
12325
12439
|
* @param append If `true`, `data` will be appended to the end of the file. Defaults to `false`, which will overwrite any pre-existing file with the new `data`.
|
|
12326
12440
|
* @param for_player If given, the file will only be written for this `player_index`. Providing `0` will only write to the server's output if present. `for_player` cannot be used in settings and prototype stages.
|
|
12327
12441
|
*/
|
|
12328
|
-
write_file(this: void, filename: string, data: LocalisedString, append?: boolean, for_player?:
|
|
12442
|
+
write_file(this: void, filename: string, data: LocalisedString, append?: boolean, for_player?: uint32): void;
|
|
12329
12443
|
/**
|
|
12330
12444
|
* Current version of game
|
|
12331
12445
|
*/
|
|
@@ -12383,9 +12497,9 @@ interface LuaInventory {
|
|
|
12383
12497
|
* @param index The item stack index
|
|
12384
12498
|
* @param filter The item filter
|
|
12385
12499
|
*/
|
|
12386
|
-
can_set_filter(this: void, index:
|
|
12500
|
+
can_set_filter(this: void, index: uint32, filter: ItemFilter): boolean;
|
|
12387
12501
|
/**
|
|
12388
|
-
*
|
|
12502
|
+
* Clear this inventory of all items so that it becomes empty.
|
|
12389
12503
|
*/
|
|
12390
12504
|
clear(this: void): void;
|
|
12391
12505
|
/**
|
|
@@ -12393,7 +12507,7 @@ interface LuaInventory {
|
|
|
12393
12507
|
* @param include_filtered If true, filtered slots will be included. Defaults to false.
|
|
12394
12508
|
* @param include_bar If true, slots blocked by the current bar will be included. Defaults to true.
|
|
12395
12509
|
*/
|
|
12396
|
-
count_empty_stacks(this: void, include_filtered?: boolean, include_bar?: boolean):
|
|
12510
|
+
count_empty_stacks(this: void, include_filtered?: boolean, include_bar?: boolean): uint32;
|
|
12397
12511
|
/**
|
|
12398
12512
|
* Destroys this inventory.
|
|
12399
12513
|
*
|
|
@@ -12408,7 +12522,7 @@ interface LuaInventory {
|
|
|
12408
12522
|
*/
|
|
12409
12523
|
find_empty_stack(this: void, item?: ItemWithQualityID): LuaMultiReturn<[
|
|
12410
12524
|
LuaItemStack | null,
|
|
12411
|
-
|
|
12525
|
+
uint32 | null
|
|
12412
12526
|
]>;
|
|
12413
12527
|
/**
|
|
12414
12528
|
* Finds the first LuaItemStack in the inventory that matches the given item name.
|
|
@@ -12418,14 +12532,14 @@ interface LuaInventory {
|
|
|
12418
12532
|
*/
|
|
12419
12533
|
find_item_stack(this: void, item: ItemWithQualityID): LuaMultiReturn<[
|
|
12420
12534
|
LuaItemStack | null,
|
|
12421
|
-
|
|
12535
|
+
uint32 | null
|
|
12422
12536
|
]>;
|
|
12423
12537
|
/**
|
|
12424
12538
|
* Get the current bar. This is the index at which the red area starts.
|
|
12425
12539
|
*
|
|
12426
12540
|
* Only useable if this inventory supports having a bar.
|
|
12427
12541
|
*/
|
|
12428
|
-
get_bar(this: void):
|
|
12542
|
+
get_bar(this: void): uint32;
|
|
12429
12543
|
/**
|
|
12430
12544
|
* Get counts of all items in this inventory.
|
|
12431
12545
|
* @returns List of all items in the inventory.
|
|
@@ -12436,7 +12550,7 @@ interface LuaInventory {
|
|
|
12436
12550
|
* @param index The item stack index
|
|
12437
12551
|
* @returns The current filter or `nil` if none.
|
|
12438
12552
|
*/
|
|
12439
|
-
get_filter(this: void, index:
|
|
12553
|
+
get_filter(this: void, index: uint32): ItemFilter | null;
|
|
12440
12554
|
/**
|
|
12441
12555
|
* Gets the number of the given item that can be inserted into this inventory.
|
|
12442
12556
|
*
|
|
@@ -12445,18 +12559,26 @@ interface LuaInventory {
|
|
|
12445
12559
|
* This accounts for the 'bar' on the inventory.
|
|
12446
12560
|
* @param item The item to check.
|
|
12447
12561
|
*/
|
|
12448
|
-
get_insertable_count(this: void, item: ItemWithQualityID):
|
|
12562
|
+
get_insertable_count(this: void, item: ItemWithQualityID): uint32;
|
|
12449
12563
|
/**
|
|
12450
12564
|
* Get the number of all or some items in this inventory.
|
|
12451
12565
|
* @param item The item to count. If not specified, count all items.
|
|
12452
12566
|
*/
|
|
12453
|
-
get_item_count(this: void, item?: ItemWithQualityID):
|
|
12567
|
+
get_item_count(this: void, item?: ItemWithQualityID): uint32;
|
|
12568
|
+
/**
|
|
12569
|
+
* Get the number of items in this inventory that match provided filter.
|
|
12570
|
+
*/
|
|
12571
|
+
get_item_count_filtered(this: void, filter: ItemFilter): uint32;
|
|
12572
|
+
/**
|
|
12573
|
+
* Get the number of all or some items in this inventory, aggregated by quality.
|
|
12574
|
+
*/
|
|
12575
|
+
get_item_quality_counts(this: void, item?: ItemID): Record<string, uint32>;
|
|
12454
12576
|
/**
|
|
12455
12577
|
* Insert items into this inventory.
|
|
12456
12578
|
* @param items Items to insert.
|
|
12457
12579
|
* @returns Number of items actually inserted.
|
|
12458
12580
|
*/
|
|
12459
|
-
insert(this: void, items: ItemStackIdentification):
|
|
12581
|
+
insert(this: void, items: ItemStackIdentification): uint32;
|
|
12460
12582
|
/**
|
|
12461
12583
|
* Does this inventory contain nothing?
|
|
12462
12584
|
*/
|
|
@@ -12476,7 +12598,7 @@ interface LuaInventory {
|
|
|
12476
12598
|
* @param items Items to remove.
|
|
12477
12599
|
* @returns Number of items actually removed.
|
|
12478
12600
|
*/
|
|
12479
|
-
remove(this: void, items: ItemStackIdentification):
|
|
12601
|
+
remove(this: void, items: ItemStackIdentification): uint32;
|
|
12480
12602
|
/**
|
|
12481
12603
|
* Resizes the inventory.
|
|
12482
12604
|
*
|
|
@@ -12492,7 +12614,7 @@ interface LuaInventory {
|
|
|
12492
12614
|
* Only useable if this inventory supports having a bar.
|
|
12493
12615
|
* @param bar The new limit. Omitting this parameter or passing `nil` will clear the limit.
|
|
12494
12616
|
*/
|
|
12495
|
-
set_bar(this: void, bar?:
|
|
12617
|
+
set_bar(this: void, bar?: uint32): void;
|
|
12496
12618
|
/**
|
|
12497
12619
|
* Sets the filter for the given item stack index.
|
|
12498
12620
|
*
|
|
@@ -12501,7 +12623,7 @@ interface LuaInventory {
|
|
|
12501
12623
|
* @param filter The new filter. `nil` erases any existing filter.
|
|
12502
12624
|
* @returns If the filter was allowed to be set.
|
|
12503
12625
|
*/
|
|
12504
|
-
set_filter(this: void, index:
|
|
12626
|
+
set_filter(this: void, index: uint32, filter: ItemFilter | nil): boolean;
|
|
12505
12627
|
/**
|
|
12506
12628
|
* Sorts and merges the items in this inventory.
|
|
12507
12629
|
*/
|
|
@@ -12579,7 +12701,7 @@ interface LuaInventory {
|
|
|
12579
12701
|
game.player.print(#game.player.get_main_inventory())
|
|
12580
12702
|
```
|
|
12581
12703
|
*/
|
|
12582
|
-
length: LuaLengthMethod<
|
|
12704
|
+
length: LuaLengthMethod<uint32>;
|
|
12583
12705
|
}
|
|
12584
12706
|
/**
|
|
12585
12707
|
* A reference to an item with data. In contrast to LuaItemStack, this is binding to a specific item data even if it would move between entities or inventories.
|
|
@@ -12694,7 +12816,7 @@ interface LuaItemCommon {
|
|
|
12694
12816
|
include_station_names?: boolean;
|
|
12695
12817
|
include_trains?: boolean;
|
|
12696
12818
|
include_fuel?: boolean;
|
|
12697
|
-
}):
|
|
12819
|
+
}): LuaTable<uint32, LuaEntity>;
|
|
12698
12820
|
/**
|
|
12699
12821
|
* Deconstruct the given area with this deconstruction item.
|
|
12700
12822
|
* @param table.surface Surface to deconstruct on
|
|
@@ -12719,17 +12841,17 @@ interface LuaItemCommon {
|
|
|
12719
12841
|
/**
|
|
12720
12842
|
* Gets the number of entities in this blueprint item.
|
|
12721
12843
|
*/
|
|
12722
|
-
get_blueprint_entity_count(this: void):
|
|
12844
|
+
get_blueprint_entity_count(this: void): uint32;
|
|
12723
12845
|
/**
|
|
12724
12846
|
* Gets the given tag on the given blueprint entity index in this blueprint item.
|
|
12725
12847
|
* @param index The entity index.
|
|
12726
12848
|
* @param tag The tag to get.
|
|
12727
12849
|
*/
|
|
12728
|
-
get_blueprint_entity_tag(this: void, index:
|
|
12850
|
+
get_blueprint_entity_tag(this: void, index: uint32, tag: string): AnyBasic | null;
|
|
12729
12851
|
/**
|
|
12730
12852
|
* Gets the tags for the given blueprint entity index in this blueprint item.
|
|
12731
12853
|
*/
|
|
12732
|
-
get_blueprint_entity_tags(this: void, index:
|
|
12854
|
+
get_blueprint_entity_tags(this: void, index: uint32): Tags;
|
|
12733
12855
|
/**
|
|
12734
12856
|
* A list of the tiles in this blueprint.
|
|
12735
12857
|
*/
|
|
@@ -12737,7 +12859,7 @@ interface LuaItemCommon {
|
|
|
12737
12859
|
/**
|
|
12738
12860
|
* Gets the entity filter at the given index for this deconstruction item.
|
|
12739
12861
|
*/
|
|
12740
|
-
get_entity_filter(this: void, index:
|
|
12862
|
+
get_entity_filter(this: void, index: uint32): ItemFilter | null;
|
|
12741
12863
|
/**
|
|
12742
12864
|
* Access the inner inventory of an item.
|
|
12743
12865
|
* @param inventory Index of the inventory to access, which can only be {@link defines.inventory.item_main | runtime:defines.inventory.item_main}.
|
|
@@ -12750,7 +12872,7 @@ interface LuaItemCommon {
|
|
|
12750
12872
|
* In contrast to {@link LuaItemCommon::set_mapper | runtime:LuaItemCommon::set_mapper}, indices past the upgrade item's current size are considered to be out of bounds.
|
|
12751
12873
|
* @param index The index of the mapper to read.
|
|
12752
12874
|
*/
|
|
12753
|
-
get_mapper(this: void, index:
|
|
12875
|
+
get_mapper(this: void, index: uint32, type: 'from' | 'to'): (UpgradeMapperSource | UpgradeMapperDestination) | null;
|
|
12754
12876
|
/**
|
|
12755
12877
|
* Gets the tag with the given name or returns `nil` if it doesn't exist.
|
|
12756
12878
|
*/
|
|
@@ -12758,7 +12880,7 @@ interface LuaItemCommon {
|
|
|
12758
12880
|
/**
|
|
12759
12881
|
* Gets the tile filter at the given index for this deconstruction item.
|
|
12760
12882
|
*/
|
|
12761
|
-
get_tile_filter(this: void, index:
|
|
12883
|
+
get_tile_filter(this: void, index: uint32): string | null;
|
|
12762
12884
|
/**
|
|
12763
12885
|
* Is this blueprint item setup? I.e. is it a non-empty blueprint?
|
|
12764
12886
|
*/
|
|
@@ -12779,12 +12901,12 @@ interface LuaItemCommon {
|
|
|
12779
12901
|
* @param tag The tag to set.
|
|
12780
12902
|
* @param value The tag value to set or `nil` to clear the tag.
|
|
12781
12903
|
*/
|
|
12782
|
-
set_blueprint_entity_tag(this: void, index:
|
|
12904
|
+
set_blueprint_entity_tag(this: void, index: uint32, tag: string, value: AnyBasic): void;
|
|
12783
12905
|
/**
|
|
12784
12906
|
* Sets the tags on the given blueprint entity index in this blueprint item.
|
|
12785
12907
|
* @param index The entity index
|
|
12786
12908
|
*/
|
|
12787
|
-
set_blueprint_entity_tags(this: void, index:
|
|
12909
|
+
set_blueprint_entity_tags(this: void, index: uint32, tags: Tags): void;
|
|
12788
12910
|
/**
|
|
12789
12911
|
* Set specific tiles in this blueprint.
|
|
12790
12912
|
* @param tiles Tiles to be a part of the blueprint.
|
|
@@ -12795,7 +12917,7 @@ interface LuaItemCommon {
|
|
|
12795
12917
|
* @param filter Writing `nil` removes the filter.
|
|
12796
12918
|
* @returns Whether the new filter was successfully set (meaning it was valid).
|
|
12797
12919
|
*/
|
|
12798
|
-
set_entity_filter(this: void, index:
|
|
12920
|
+
set_entity_filter(this: void, index: uint32, filter: ItemFilter | nil): boolean;
|
|
12799
12921
|
/**
|
|
12800
12922
|
* Sets the module filter at the given index for this upgrade item.
|
|
12801
12923
|
*
|
|
@@ -12803,7 +12925,7 @@ interface LuaItemCommon {
|
|
|
12803
12925
|
* @param index The index of the mapper to set.
|
|
12804
12926
|
* @param mapper The mapper to set. Set `nil` to clear the mapper.
|
|
12805
12927
|
*/
|
|
12806
|
-
set_mapper(this: void, index:
|
|
12928
|
+
set_mapper(this: void, index: uint32, type: 'from' | 'to', mapper: UpgradeMapperSource | UpgradeMapperDestination | nil): void;
|
|
12807
12929
|
/**
|
|
12808
12930
|
* Sets the tag with the given name and value.
|
|
12809
12931
|
*/
|
|
@@ -12813,11 +12935,11 @@ interface LuaItemCommon {
|
|
|
12813
12935
|
* @param filter Writing `nil` removes the filter.
|
|
12814
12936
|
* @returns Whether the new filter was successfully set (meaning it was valid).
|
|
12815
12937
|
*/
|
|
12816
|
-
set_tile_filter(this: void, index:
|
|
12938
|
+
set_tile_filter(this: void, index: uint32, filter: string | LuaTilePrototype | LuaTile | nil): boolean;
|
|
12817
12939
|
/**
|
|
12818
12940
|
* The active blueprint index for this blueprint book. `nil` if this blueprint book is empty.
|
|
12819
12941
|
*/
|
|
12820
|
-
active_index?:
|
|
12942
|
+
active_index?: uint32;
|
|
12821
12943
|
/**
|
|
12822
12944
|
* Whether the label for this item can be manually changed. When false the label can only be changed through the API.
|
|
12823
12945
|
*/
|
|
@@ -12825,7 +12947,7 @@ interface LuaItemCommon {
|
|
|
12825
12947
|
/**
|
|
12826
12948
|
* Number of bullets left in the magazine.
|
|
12827
12949
|
*/
|
|
12828
|
-
ammo:
|
|
12950
|
+
ammo: uint32;
|
|
12829
12951
|
/**
|
|
12830
12952
|
* If absolute snapping is enabled on this blueprint item.
|
|
12831
12953
|
*/
|
|
@@ -12858,14 +12980,30 @@ interface LuaItemCommon {
|
|
|
12858
12980
|
* Durability of the contained item. Automatically capped at the item's maximum durability.
|
|
12859
12981
|
*/
|
|
12860
12982
|
durability: double;
|
|
12983
|
+
/**
|
|
12984
|
+
* If this is an item with entity data, get the stored auto target with gunner state.
|
|
12985
|
+
*/
|
|
12986
|
+
entity_auto_target_with_gunner: boolean;
|
|
12987
|
+
/**
|
|
12988
|
+
* If this is an item with entity data, get the stored auto target without gunner state.
|
|
12989
|
+
*/
|
|
12990
|
+
entity_auto_target_without_gunner: boolean;
|
|
12861
12991
|
/**
|
|
12862
12992
|
* If this is an item with entity data, get the stored entity color.
|
|
12863
12993
|
*/
|
|
12864
12994
|
entity_color?: Color;
|
|
12995
|
+
/**
|
|
12996
|
+
* If this is an item with entity data, get the stored driver is gunner state.
|
|
12997
|
+
*/
|
|
12998
|
+
entity_driver_is_gunner: boolean;
|
|
12999
|
+
/**
|
|
13000
|
+
* If this is an item with entity data, get the stored enable logistics while moving state.
|
|
13001
|
+
*/
|
|
13002
|
+
entity_enable_logistics_while_moving: boolean;
|
|
12865
13003
|
/**
|
|
12866
13004
|
* The number of entity filters this deconstruction item supports.
|
|
12867
13005
|
*/
|
|
12868
|
-
readonly entity_filter_count:
|
|
13006
|
+
readonly entity_filter_count: uint32;
|
|
12869
13007
|
/**
|
|
12870
13008
|
* The blacklist/whitelist entity filter mode for this deconstruction item.
|
|
12871
13009
|
*/
|
|
@@ -12878,6 +13016,18 @@ interface LuaItemCommon {
|
|
|
12878
13016
|
* If this is an item with entity data, get the stored entity label.
|
|
12879
13017
|
*/
|
|
12880
13018
|
entity_label?: string;
|
|
13019
|
+
/**
|
|
13020
|
+
* If this is an item with entity data, get the stored logistic filters.
|
|
13021
|
+
*/
|
|
13022
|
+
entity_logistic_sections: LogisticSections;
|
|
13023
|
+
/**
|
|
13024
|
+
* If this is an item with entity data, get the stored vehicle logistics enabled state.
|
|
13025
|
+
*/
|
|
13026
|
+
entity_logistics_enabled: boolean;
|
|
13027
|
+
/**
|
|
13028
|
+
* If this is an item with entity data, get the stored request from buffer state.
|
|
13029
|
+
*/
|
|
13030
|
+
entity_request_from_buffers: boolean;
|
|
12881
13031
|
/**
|
|
12882
13032
|
* The equipment grid of this item, if any.
|
|
12883
13033
|
*/
|
|
@@ -12949,7 +13099,7 @@ interface LuaItemCommon {
|
|
|
12949
13099
|
/**
|
|
12950
13100
|
* The current count of mappers in the upgrade item.
|
|
12951
13101
|
*/
|
|
12952
|
-
readonly mapper_count:
|
|
13102
|
+
readonly mapper_count: uint32;
|
|
12953
13103
|
/**
|
|
12954
13104
|
* The location of this item if it can be found.
|
|
12955
13105
|
*/
|
|
@@ -12962,7 +13112,7 @@ interface LuaItemCommon {
|
|
|
12962
13112
|
/**
|
|
12963
13113
|
* The number of tile filters this deconstruction item supports.
|
|
12964
13114
|
*/
|
|
12965
|
-
readonly tile_filter_count:
|
|
13115
|
+
readonly tile_filter_count: uint32;
|
|
12966
13116
|
/**
|
|
12967
13117
|
* The blacklist/whitelist tile filter mode for this deconstruction item.
|
|
12968
13118
|
*/
|
|
@@ -13011,7 +13161,11 @@ interface LuaItemPrototype extends LuaPrototypeBase {
|
|
|
13011
13161
|
/**
|
|
13012
13162
|
* The inventory size bonus for this armor prototype.
|
|
13013
13163
|
*/
|
|
13014
|
-
get_inventory_size_bonus(this: void, quality?: QualityID):
|
|
13164
|
+
get_inventory_size_bonus(this: void, quality?: QualityID): uint32 | null;
|
|
13165
|
+
/**
|
|
13166
|
+
* Effects of this module at the specified quality.
|
|
13167
|
+
*/
|
|
13168
|
+
get_module_effects(this: void, quality?: QualityID): ModuleEffects | null;
|
|
13015
13169
|
/**
|
|
13016
13170
|
* The color used when doing normal selection with this selection tool prototype.
|
|
13017
13171
|
*/
|
|
@@ -13023,7 +13177,7 @@ interface LuaItemPrototype extends LuaPrototypeBase {
|
|
|
13023
13177
|
/**
|
|
13024
13178
|
* The number of ticks before this item spoils, or `0` if it does not spoil.
|
|
13025
13179
|
*/
|
|
13026
|
-
get_spoil_ticks(this: void, quality?: QualityID):
|
|
13180
|
+
get_spoil_ticks(this: void, quality?: QualityID): uint32;
|
|
13027
13181
|
/**
|
|
13028
13182
|
* The tile filter mode used by this selection tool.
|
|
13029
13183
|
*/
|
|
@@ -13093,7 +13247,7 @@ interface LuaItemPrototype extends LuaPrototypeBase {
|
|
|
13093
13247
|
/**
|
|
13094
13248
|
* The number of entity filters this deconstruction item has.
|
|
13095
13249
|
*/
|
|
13096
|
-
readonly entity_filter_slots?:
|
|
13250
|
+
readonly entity_filter_slots?: uint32;
|
|
13097
13251
|
/**
|
|
13098
13252
|
* The prototype of this armor's equipment grid, if any.
|
|
13099
13253
|
*/
|
|
@@ -13152,7 +13306,7 @@ interface LuaItemPrototype extends LuaPrototypeBase {
|
|
|
13152
13306
|
/**
|
|
13153
13307
|
* The main inventory size for item-with-inventory-prototype.
|
|
13154
13308
|
*/
|
|
13155
|
-
readonly inventory_size?:
|
|
13309
|
+
readonly inventory_size?: uint32;
|
|
13156
13310
|
readonly item_filters?: LuaItemPrototype[];
|
|
13157
13311
|
readonly item_group_filters?: LuaGroup[];
|
|
13158
13312
|
readonly item_subgroup_filters?: LuaGroup[];
|
|
@@ -13232,7 +13386,7 @@ interface LuaItemPrototype extends LuaPrototypeBase {
|
|
|
13232
13386
|
/**
|
|
13233
13387
|
* Maximum stack size of the item specified by this prototype.
|
|
13234
13388
|
*/
|
|
13235
|
-
readonly stack_size:
|
|
13389
|
+
readonly stack_size: uint32;
|
|
13236
13390
|
/**
|
|
13237
13391
|
* Is this item allowed to stack at all?
|
|
13238
13392
|
*/
|
|
@@ -13245,11 +13399,11 @@ interface LuaItemPrototype extends LuaPrototypeBase {
|
|
|
13245
13399
|
/**
|
|
13246
13400
|
* Tier of the module inside its category. Used when upgrading modules: Ctrl + click modules into an entity and it will replace lower tier modules with higher tier modules if they have the same category.
|
|
13247
13401
|
*/
|
|
13248
|
-
readonly tier?:
|
|
13402
|
+
readonly tier?: uint32;
|
|
13249
13403
|
/**
|
|
13250
13404
|
* The number of tile filters this deconstruction item has.
|
|
13251
13405
|
*/
|
|
13252
|
-
readonly tile_filter_slots?:
|
|
13406
|
+
readonly tile_filter_slots?: uint32;
|
|
13253
13407
|
readonly tiles?: SpacePlatformTileDefinition[];
|
|
13254
13408
|
readonly trigger?: TriggerItem;
|
|
13255
13409
|
/**
|
|
@@ -13312,7 +13466,7 @@ interface LuaItemStack extends LuaItemCommon {
|
|
|
13312
13466
|
* @param data The string to import
|
|
13313
13467
|
* @returns 0 if the import succeeded with no errors. -1 if the import succeeded with errors. 1 if the import failed.
|
|
13314
13468
|
*/
|
|
13315
|
-
import_stack(this: void, data: string):
|
|
13469
|
+
import_stack(this: void, data: string): int32;
|
|
13316
13470
|
/**
|
|
13317
13471
|
* Set this item stack to another item stack.
|
|
13318
13472
|
* @param stack Item stack to set it to. Omitting this parameter or passing `nil` will clear this item stack, as if {@link LuaItemStack::clear | runtime:LuaItemStack::clear} was called.
|
|
@@ -13332,7 +13486,7 @@ interface LuaItemStack extends LuaItemCommon {
|
|
|
13332
13486
|
* Transfers the given item stack into this item stack.
|
|
13333
13487
|
* @returns `true` if the full stack (or requested amount) was transferred.
|
|
13334
13488
|
*/
|
|
13335
|
-
transfer_stack(this: void, stack: ItemStackIdentification, amount?:
|
|
13489
|
+
transfer_stack(this: void, stack: ItemStackIdentification, amount?: uint32): boolean;
|
|
13336
13490
|
/**
|
|
13337
13491
|
* Use the capsule item with the entity as the source, targeting the given position.
|
|
13338
13492
|
* @param entity The entity to use the capsule item with.
|
|
@@ -13343,7 +13497,7 @@ interface LuaItemStack extends LuaItemCommon {
|
|
|
13343
13497
|
/**
|
|
13344
13498
|
* Number of items in this stack.
|
|
13345
13499
|
*/
|
|
13346
|
-
count:
|
|
13500
|
+
count: uint32;
|
|
13347
13501
|
/**
|
|
13348
13502
|
* How much health the item has, as a number in range `[0, 1]`.
|
|
13349
13503
|
*/
|
|
@@ -13482,7 +13636,7 @@ interface LuaLogisticCell {
|
|
|
13482
13636
|
/**
|
|
13483
13637
|
* Number of robots currently charging.
|
|
13484
13638
|
*/
|
|
13485
|
-
readonly charging_robot_count:
|
|
13639
|
+
readonly charging_robot_count: uint32;
|
|
13486
13640
|
/**
|
|
13487
13641
|
* Robots currently being charged.
|
|
13488
13642
|
*/
|
|
@@ -13522,15 +13676,15 @@ interface LuaLogisticCell {
|
|
|
13522
13676
|
/**
|
|
13523
13677
|
* Number of stationed construction robots in this cell.
|
|
13524
13678
|
*/
|
|
13525
|
-
readonly stationed_construction_robot_count:
|
|
13679
|
+
readonly stationed_construction_robot_count: uint32;
|
|
13526
13680
|
/**
|
|
13527
13681
|
* Number of stationed logistic robots in this cell.
|
|
13528
13682
|
*/
|
|
13529
|
-
readonly stationed_logistic_robot_count:
|
|
13683
|
+
readonly stationed_logistic_robot_count: uint32;
|
|
13530
13684
|
/**
|
|
13531
13685
|
* Number of robots waiting to charge.
|
|
13532
13686
|
*/
|
|
13533
|
-
readonly to_charge_robot_count:
|
|
13687
|
+
readonly to_charge_robot_count: uint32;
|
|
13534
13688
|
/**
|
|
13535
13689
|
* Robots waiting to charge.
|
|
13536
13690
|
*/
|
|
@@ -13580,7 +13734,7 @@ interface LuaLogisticNetwork {
|
|
|
13580
13734
|
* @param include_buffers Should buffers be considered? Defaults to false.
|
|
13581
13735
|
* @returns Whether the network can satisfy the request.
|
|
13582
13736
|
*/
|
|
13583
|
-
can_satisfy_request(this: void, item: ItemWithQualityID, count?:
|
|
13737
|
+
can_satisfy_request(this: void, item: ItemWithQualityID, count?: uint32, include_buffers?: boolean): boolean;
|
|
13584
13738
|
/**
|
|
13585
13739
|
* Find logistic cell closest to a given position.
|
|
13586
13740
|
* @returns `nil` if no cell was found.
|
|
@@ -13597,7 +13751,7 @@ interface LuaLogisticNetwork {
|
|
|
13597
13751
|
* @param item Item name to count. If not given, gives counts of all items in the network.
|
|
13598
13752
|
* @param member Logistic members to check. If not given, gives count in the entire network.
|
|
13599
13753
|
*/
|
|
13600
|
-
get_item_count(this: void, item?: ItemWithQualityID, member?: 'storage' | 'providers'):
|
|
13754
|
+
get_item_count(this: void, item?: ItemWithQualityID, member?: 'storage' | 'providers'): int32;
|
|
13601
13755
|
/**
|
|
13602
13756
|
* Get the amount of items of the given type indexed by the storage member.
|
|
13603
13757
|
* @param item Item name to check.
|
|
@@ -13614,14 +13768,14 @@ interface LuaLogisticNetwork {
|
|
|
13614
13768
|
* @param members Which logistic members to insert the items to. `"storage-empty"` inserts into storage chests that are completely empty, `"storage-empty-slot"` inserts into storage chests that have an empty slot. If not specified, inserts items into the logistic network in the usual order.
|
|
13615
13769
|
* @returns Number of items actually inserted.
|
|
13616
13770
|
*/
|
|
13617
|
-
insert(this: void, item: ItemStackIdentification, members?: 'storage' | 'storage-empty' | 'storage-empty-slot' | 'requester'):
|
|
13771
|
+
insert(this: void, item: ItemStackIdentification, members?: 'storage' | 'storage-empty' | 'storage-empty-slot' | 'requester'): uint32;
|
|
13618
13772
|
/**
|
|
13619
13773
|
* Remove items from the logistic network. This will actually remove the items from some logistic chests.
|
|
13620
13774
|
* @param item What to remove.
|
|
13621
13775
|
* @param members Which logistic members to remove from. If not specified, removes from the network in the usual order.
|
|
13622
13776
|
* @returns Number of items removed.
|
|
13623
13777
|
*/
|
|
13624
|
-
remove_item(this: void, item: ItemStackIdentification, members?: 'active-provider' | 'passive-provider' | 'buffer' | 'storage'):
|
|
13778
|
+
remove_item(this: void, item: ItemStackIdentification, members?: 'active-provider' | 'passive-provider' | 'buffer' | 'storage'): uint32;
|
|
13625
13779
|
/**
|
|
13626
13780
|
* Find a logistic point to drop the specific item stack.
|
|
13627
13781
|
* @param table.stack Name of the item to drop off.
|
|
@@ -13653,19 +13807,19 @@ interface LuaLogisticNetwork {
|
|
|
13653
13807
|
/**
|
|
13654
13808
|
* The total number of construction robots in the network (idle and active + in roboports).
|
|
13655
13809
|
*/
|
|
13656
|
-
readonly all_construction_robots:
|
|
13810
|
+
readonly all_construction_robots: uint32;
|
|
13657
13811
|
/**
|
|
13658
13812
|
* The total number of logistic robots in the network (idle and active + in roboports).
|
|
13659
13813
|
*/
|
|
13660
|
-
readonly all_logistic_robots:
|
|
13814
|
+
readonly all_logistic_robots: uint32;
|
|
13661
13815
|
/**
|
|
13662
13816
|
* Number of construction robots available for a job.
|
|
13663
13817
|
*/
|
|
13664
|
-
readonly available_construction_robots:
|
|
13818
|
+
readonly available_construction_robots: uint32;
|
|
13665
13819
|
/**
|
|
13666
13820
|
* Number of logistic robots available for a job.
|
|
13667
13821
|
*/
|
|
13668
|
-
readonly available_logistic_robots:
|
|
13822
|
+
readonly available_logistic_robots: uint32;
|
|
13669
13823
|
/**
|
|
13670
13824
|
* All cells in this network.
|
|
13671
13825
|
*/
|
|
@@ -13674,6 +13828,10 @@ interface LuaLogisticNetwork {
|
|
|
13674
13828
|
* All construction robots in this logistic network.
|
|
13675
13829
|
*/
|
|
13676
13830
|
readonly construction_robots: LuaEntity[];
|
|
13831
|
+
/**
|
|
13832
|
+
* The custom logistic network name set by the player or by script, if any.
|
|
13833
|
+
*/
|
|
13834
|
+
custom_name?: string;
|
|
13677
13835
|
/**
|
|
13678
13836
|
* All things that have empty provider points in this network.
|
|
13679
13837
|
*/
|
|
@@ -13697,7 +13855,7 @@ interface LuaLogisticNetwork {
|
|
|
13697
13855
|
/**
|
|
13698
13856
|
* The unique logistic network ID.
|
|
13699
13857
|
*/
|
|
13700
|
-
readonly network_id:
|
|
13858
|
+
readonly network_id: uint32;
|
|
13701
13859
|
/**
|
|
13702
13860
|
* 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.
|
|
13703
13861
|
*/
|
|
@@ -13725,7 +13883,7 @@ interface LuaLogisticNetwork {
|
|
|
13725
13883
|
/**
|
|
13726
13884
|
* Maximum number of robots the network can work with. Currently only used for the personal roboport.
|
|
13727
13885
|
*/
|
|
13728
|
-
readonly robot_limit:
|
|
13886
|
+
readonly robot_limit: uint32;
|
|
13729
13887
|
/**
|
|
13730
13888
|
* All robots in this logistic network.
|
|
13731
13889
|
*/
|
|
@@ -13757,13 +13915,13 @@ interface LuaLogisticPoint {
|
|
|
13757
13915
|
* Gets section on the selected index, if it exists
|
|
13758
13916
|
* @param section_index Index of the section
|
|
13759
13917
|
*/
|
|
13760
|
-
get_section(this: void, section_index:
|
|
13918
|
+
get_section(this: void, section_index: uint32): LuaLogisticSection;
|
|
13761
13919
|
/**
|
|
13762
13920
|
* Removes the given logistic section if possible. Removal may fail if the section index is out of range or the section is not {@link manual | runtime:LuaLogisticSection::is_manual}.
|
|
13763
13921
|
* @param section_index Index of the section
|
|
13764
13922
|
* @returns Whether section was removed.
|
|
13765
13923
|
*/
|
|
13766
|
-
remove_section(this: void, section_index:
|
|
13924
|
+
remove_section(this: void, section_index: uint32): boolean;
|
|
13767
13925
|
/**
|
|
13768
13926
|
* Whether this logistic point is active, related to disabling logistics on player/spidertron.
|
|
13769
13927
|
*
|
|
@@ -13789,7 +13947,7 @@ interface LuaLogisticPoint {
|
|
|
13789
13947
|
/**
|
|
13790
13948
|
* The Logistic member index of this logistic point.
|
|
13791
13949
|
*/
|
|
13792
|
-
readonly logistic_member_index:
|
|
13950
|
+
readonly logistic_member_index: uint32;
|
|
13793
13951
|
readonly logistic_network: LuaLogisticNetwork;
|
|
13794
13952
|
/**
|
|
13795
13953
|
* The logistic mode.
|
|
@@ -13810,7 +13968,7 @@ interface LuaLogisticPoint {
|
|
|
13810
13968
|
/**
|
|
13811
13969
|
* Amount of logistic sections this logistic point has.
|
|
13812
13970
|
*/
|
|
13813
|
-
readonly sections_count:
|
|
13971
|
+
readonly sections_count: uint32;
|
|
13814
13972
|
/**
|
|
13815
13973
|
* Items targeted to be dropped off into this logistic point by robots.
|
|
13816
13974
|
*/
|
|
@@ -13868,7 +14026,7 @@ interface LuaLogisticSection {
|
|
|
13868
14026
|
/**
|
|
13869
14027
|
* Amount of filters this section has
|
|
13870
14028
|
*/
|
|
13871
|
-
readonly filters_count:
|
|
14029
|
+
readonly filters_count: uint32;
|
|
13872
14030
|
/**
|
|
13873
14031
|
* The group this section belongs to.
|
|
13874
14032
|
*
|
|
@@ -13880,7 +14038,7 @@ interface LuaLogisticSection {
|
|
|
13880
14038
|
/**
|
|
13881
14039
|
* The section index of this section.
|
|
13882
14040
|
*/
|
|
13883
|
-
readonly index:
|
|
14041
|
+
readonly index: uint32;
|
|
13884
14042
|
/**
|
|
13885
14043
|
* Shortcut to check whether {@link LuaLogisticSection::type | runtime:LuaLogisticSection::type} is equal to {@link manual | runtime:defines.logistic_section_type.manual}.
|
|
13886
14044
|
*/
|
|
@@ -13920,13 +14078,13 @@ interface LuaLogisticSections {
|
|
|
13920
14078
|
* Gets section on the selected index, if it exists.
|
|
13921
14079
|
* @param section_index Index of the section.
|
|
13922
14080
|
*/
|
|
13923
|
-
get_section(this: void, section_index:
|
|
14081
|
+
get_section(this: void, section_index: uint32): LuaLogisticSection | null;
|
|
13924
14082
|
/**
|
|
13925
14083
|
* Removes the given logistic section if possible. Removal may fail if the section index is out of range or the section is not {@link manual | runtime:LuaLogisticSection::is_manual}.
|
|
13926
14084
|
* @param section_index Index of the section.
|
|
13927
14085
|
* @returns Whether section was removed.
|
|
13928
14086
|
*/
|
|
13929
|
-
remove_section(this: void, section_index:
|
|
14087
|
+
remove_section(this: void, section_index: uint32): boolean;
|
|
13930
14088
|
/**
|
|
13931
14089
|
* 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.
|
|
13932
14090
|
*/
|
|
@@ -13938,7 +14096,7 @@ interface LuaLogisticSections {
|
|
|
13938
14096
|
/**
|
|
13939
14097
|
* Amount of logistic sections this entity has.
|
|
13940
14098
|
*/
|
|
13941
|
-
readonly sections_count:
|
|
14099
|
+
readonly sections_count: uint32;
|
|
13942
14100
|
/**
|
|
13943
14101
|
* 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.
|
|
13944
14102
|
*/
|
|
@@ -14004,7 +14162,7 @@ interface LuaModSettingPrototype extends LuaPrototypeBase {
|
|
|
14004
14162
|
/**
|
|
14005
14163
|
* The allowed values for this setting. `nil` if this setting doesn't use the a fixed set of values.
|
|
14006
14164
|
*/
|
|
14007
|
-
readonly allowed_values?: string[] |
|
|
14165
|
+
readonly allowed_values?: string[] | int32[] | double[];
|
|
14008
14166
|
/**
|
|
14009
14167
|
* Whether this string setting auto-trims values. `nil` if not a string setting
|
|
14010
14168
|
*/
|
|
@@ -14012,15 +14170,15 @@ interface LuaModSettingPrototype extends LuaPrototypeBase {
|
|
|
14012
14170
|
/**
|
|
14013
14171
|
* The default value of this setting.
|
|
14014
14172
|
*/
|
|
14015
|
-
readonly default_value: boolean | double |
|
|
14173
|
+
readonly default_value: boolean | double | int32 | string | Color;
|
|
14016
14174
|
/**
|
|
14017
14175
|
* The maximum value for this setting. `nil` if this setting type doesn't support a maximum.
|
|
14018
14176
|
*/
|
|
14019
|
-
readonly maximum_value?: double |
|
|
14177
|
+
readonly maximum_value?: double | int32;
|
|
14020
14178
|
/**
|
|
14021
14179
|
* The minimum value for this setting. `nil` if this setting type doesn't support a minimum.
|
|
14022
14180
|
*/
|
|
14023
|
-
readonly minimum_value?: double |
|
|
14181
|
+
readonly minimum_value?: double | int32;
|
|
14024
14182
|
/**
|
|
14025
14183
|
* The mod that owns this setting.
|
|
14026
14184
|
*/
|
|
@@ -14089,8 +14247,8 @@ interface LuaNamedNoiseFunction extends LuaPrototypeBase {
|
|
|
14089
14247
|
interface LuaParticlePrototype extends LuaPrototypeBase {
|
|
14090
14248
|
readonly ended_in_water_trigger_effect: TriggerEffectItem;
|
|
14091
14249
|
readonly ended_on_ground_trigger_effect: TriggerEffectItem;
|
|
14092
|
-
readonly fade_out_time:
|
|
14093
|
-
readonly life_time:
|
|
14250
|
+
readonly fade_out_time: uint32;
|
|
14251
|
+
readonly life_time: uint32;
|
|
14094
14252
|
readonly mining_particle_frame_speed: float;
|
|
14095
14253
|
readonly movement_modifier: float;
|
|
14096
14254
|
readonly movement_modifier_when_on_ground: float;
|
|
@@ -14099,7 +14257,7 @@ interface LuaParticlePrototype extends LuaPrototypeBase {
|
|
|
14099
14257
|
*/
|
|
14100
14258
|
readonly object_name: string;
|
|
14101
14259
|
readonly regular_trigger_effect: TriggerEffectItem;
|
|
14102
|
-
readonly regular_trigger_effect_frequency:
|
|
14260
|
+
readonly regular_trigger_effect_frequency: uint32;
|
|
14103
14261
|
readonly render_layer: RenderLayer;
|
|
14104
14262
|
readonly render_layer_when_on_ground: RenderLayer;
|
|
14105
14263
|
/**
|
|
@@ -14142,7 +14300,7 @@ interface LuaPermissionGroup {
|
|
|
14142
14300
|
/**
|
|
14143
14301
|
* The group ID
|
|
14144
14302
|
*/
|
|
14145
|
-
readonly group_id:
|
|
14303
|
+
readonly group_id: uint32;
|
|
14146
14304
|
/**
|
|
14147
14305
|
* The name of this group. Setting the name to `nil` or an empty string sets the name to the default value.
|
|
14148
14306
|
*/
|
|
@@ -14173,7 +14331,7 @@ interface LuaPermissionGroups {
|
|
|
14173
14331
|
* Gets the permission group with the given name or group ID.
|
|
14174
14332
|
* @returns `nil` if there is no matching group.
|
|
14175
14333
|
*/
|
|
14176
|
-
get_group(this: void, group: string |
|
|
14334
|
+
get_group(this: void, group: string | uint32): LuaPermissionGroup | null;
|
|
14177
14335
|
/**
|
|
14178
14336
|
* All of the permission groups.
|
|
14179
14337
|
*/
|
|
@@ -14295,31 +14453,39 @@ interface LuaPlayer extends LuaControl {
|
|
|
14295
14453
|
* @param table.position Where the entity would be placed
|
|
14296
14454
|
* @param table.direction Direction the entity would be placed
|
|
14297
14455
|
* @param table.mirror Whether to mirror the entity
|
|
14298
|
-
* @param table.
|
|
14299
|
-
* @param table.
|
|
14300
|
-
* @param table.
|
|
14456
|
+
* @param table.flip_horizontal Whether to flip the blueprint horizontally. Defaults to `false`.
|
|
14457
|
+
* @param table.flip_vertical Whether to flip the blueprint vertically. Defaults to `false`.
|
|
14458
|
+
* @param table.build_mode Which build mode should be used instead of normal build. Defaults to `defines.build_mode.normal`.
|
|
14459
|
+
* @param table.terrain_building_size The size for building terrain if building terrain. Defaults to `2`.
|
|
14460
|
+
* @param table.skip_fog_of_war If chunks covered by fog-of-war are skipped. Defaults to `false`.
|
|
14301
14461
|
*/
|
|
14302
14462
|
build_from_cursor(this: void, table: {
|
|
14303
14463
|
position: MapPosition;
|
|
14304
14464
|
direction?: defines.direction;
|
|
14305
14465
|
mirror?: boolean;
|
|
14466
|
+
flip_horizontal?: boolean;
|
|
14467
|
+
flip_vertical?: boolean;
|
|
14306
14468
|
build_mode?: defines.build_mode;
|
|
14307
|
-
terrain_building_size?:
|
|
14469
|
+
terrain_building_size?: uint32;
|
|
14308
14470
|
skip_fog_of_war?: boolean;
|
|
14309
14471
|
}): void;
|
|
14310
14472
|
/**
|
|
14311
14473
|
* Checks if this player can build what ever is in the cursor on the surface the player is on.
|
|
14312
14474
|
* @param table.position Where the entity would be placed
|
|
14313
14475
|
* @param table.direction Direction the entity would be placed
|
|
14314
|
-
* @param table.
|
|
14315
|
-
* @param table.
|
|
14316
|
-
* @param table.
|
|
14476
|
+
* @param table.flip_horizontal Whether to flip the blueprint horizontally. Defaults to `false`.
|
|
14477
|
+
* @param table.flip_vertical Whether to flip the blueprint vertically. Defaults to `false`.
|
|
14478
|
+
* @param table.build_mode Which build mode should be used instead of normal build. Defaults to `defines.build_mode.normal`.
|
|
14479
|
+
* @param table.terrain_building_size The size for building terrain if building terrain. Defaults to `2`.
|
|
14480
|
+
* @param table.skip_fog_of_war If chunks covered by fog-of-war are skipped. Defaults to `false`.
|
|
14317
14481
|
*/
|
|
14318
14482
|
can_build_from_cursor(this: void, table: {
|
|
14319
14483
|
position: MapPosition;
|
|
14320
14484
|
direction?: defines.direction;
|
|
14485
|
+
flip_horizontal?: boolean;
|
|
14486
|
+
flip_vertical?: boolean;
|
|
14321
14487
|
build_mode?: defines.build_mode;
|
|
14322
|
-
terrain_building_size?:
|
|
14488
|
+
terrain_building_size?: uint32;
|
|
14323
14489
|
skip_fog_of_war?: boolean;
|
|
14324
14490
|
}): boolean;
|
|
14325
14491
|
/**
|
|
@@ -14394,7 +14560,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
14394
14560
|
surface?: SurfaceIdentification;
|
|
14395
14561
|
create_at_cursor?: boolean;
|
|
14396
14562
|
color?: Color;
|
|
14397
|
-
time_to_live?:
|
|
14563
|
+
time_to_live?: uint32;
|
|
14398
14564
|
speed?: double;
|
|
14399
14565
|
}): void;
|
|
14400
14566
|
/**
|
|
@@ -14442,7 +14608,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
14442
14608
|
* Enters the given space platform if possible.
|
|
14443
14609
|
* @returns If the player entered the platform.
|
|
14444
14610
|
*/
|
|
14445
|
-
enter_space_platform(this: void, space_platform:
|
|
14611
|
+
enter_space_platform(this: void, space_platform: LuaSpacePlatform): boolean;
|
|
14446
14612
|
/**
|
|
14447
14613
|
* Exit the current cutscene. Errors if not in a cutscene.
|
|
14448
14614
|
*/
|
|
@@ -14455,7 +14621,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
14455
14621
|
* Gets which quick bar page is being used for the given screen page or `nil` if not known.
|
|
14456
14622
|
* @param index The screen page. Index 1 is the top row in the gui. Index can go beyond the visible number of bars on the screen to account for the interface config setting change.
|
|
14457
14623
|
*/
|
|
14458
|
-
get_active_quick_bar_page(this: void, index:
|
|
14624
|
+
get_active_quick_bar_page(this: void, index: uint32): uint8 | null;
|
|
14459
14625
|
/**
|
|
14460
14626
|
* Get all alerts matching the given filters, or all alerts if no filters are given.
|
|
14461
14627
|
* @returns A mapping of surface index to an array of arrays of {@link alerts | runtime:Alert} indexed by the {@link alert type | runtime:defines.alert_type}.
|
|
@@ -14466,7 +14632,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
14466
14632
|
position?: MapPosition;
|
|
14467
14633
|
type?: defines.alert_type;
|
|
14468
14634
|
surface?: SurfaceIdentification;
|
|
14469
|
-
}):
|
|
14635
|
+
}): LuaTable<uint32, Record<defines.alert_type, Alert[]>>;
|
|
14470
14636
|
/**
|
|
14471
14637
|
* The characters associated with this player.
|
|
14472
14638
|
*
|
|
@@ -14483,12 +14649,16 @@ interface LuaPlayer extends LuaControl {
|
|
|
14483
14649
|
* Gets the filter for this map editor infinity filters at the given index or `nil` if the filter index doesn't exist or is empty.
|
|
14484
14650
|
* @param index The index to get.
|
|
14485
14651
|
*/
|
|
14486
|
-
get_infinity_inventory_filter(this: void, index:
|
|
14652
|
+
get_infinity_inventory_filter(this: void, index: uint32): InfinityInventoryFilter | null;
|
|
14487
14653
|
/**
|
|
14488
14654
|
* Gets the quick bar filter for the given slot or `nil`.
|
|
14489
14655
|
* @param index The slot index. 1 for the first slot of page one, 2 for slot two of page one, 11 for the first slot of page 2, etc.
|
|
14490
14656
|
*/
|
|
14491
|
-
get_quick_bar_slot(this: void, index:
|
|
14657
|
+
get_quick_bar_slot(this: void, index: uint32): ItemFilter | null;
|
|
14658
|
+
/**
|
|
14659
|
+
* Get all recipes that currently have recipe notifications for this player.
|
|
14660
|
+
*/
|
|
14661
|
+
get_recipe_notifications(this: void): LuaRecipePrototype[];
|
|
14492
14662
|
/**
|
|
14493
14663
|
* If the given alert type is currently enabled.
|
|
14494
14664
|
*/
|
|
@@ -14510,7 +14680,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
14510
14680
|
/**
|
|
14511
14681
|
* Jump to the specified cutscene waypoint. Only works when the player is viewing a cutscene.
|
|
14512
14682
|
*/
|
|
14513
|
-
jump_to_cutscene_waypoint(this: void, waypoint_index:
|
|
14683
|
+
jump_to_cutscene_waypoint(this: void, waypoint_index: uint32): void;
|
|
14514
14684
|
/**
|
|
14515
14685
|
* Ejects this player from the current space platform and lands on the current planet.
|
|
14516
14686
|
* @returns If the player successfully landed on the planet.
|
|
@@ -14581,20 +14751,20 @@ interface LuaPlayer extends LuaControl {
|
|
|
14581
14751
|
* Does nothing if this player is not connected (see {@link LuaPlayer::connected | runtime:LuaPlayer::connected}).
|
|
14582
14752
|
* @returns The unique ID for the requested translation.
|
|
14583
14753
|
*/
|
|
14584
|
-
request_translation(this: void, localised_string: LocalisedString):
|
|
14754
|
+
request_translation(this: void, localised_string: LocalisedString): uint32 | null;
|
|
14585
14755
|
/**
|
|
14586
14756
|
* Requests translation for the given set of localised strings. If the request is successful, a {@link on_string_translated | runtime:on_string_translated} event will be fired for each string with the results.
|
|
14587
14757
|
*
|
|
14588
14758
|
* Does nothing if this player is not connected (see {@link LuaPlayer::connected | runtime:LuaPlayer::connected}).
|
|
14589
14759
|
* @returns The unique IDs for the requested translations.
|
|
14590
14760
|
*/
|
|
14591
|
-
request_translations(this: void, localised_strings: LocalisedString[]):
|
|
14761
|
+
request_translations(this: void, localised_strings: LocalisedString[]): uint32[] | null;
|
|
14592
14762
|
/**
|
|
14593
14763
|
* Sets which quick bar page is being used for the given screen page.
|
|
14594
14764
|
* @param screen_index The screen page. Index 1 is the top row in the gui. Index can go beyond the visible number of bars on the screen to account for the interface config setting change.
|
|
14595
14765
|
* @param page_index The new quick bar page.
|
|
14596
14766
|
*/
|
|
14597
|
-
set_active_quick_bar_page(this: void, screen_index:
|
|
14767
|
+
set_active_quick_bar_page(this: void, screen_index: uint32, page_index: uint32): void;
|
|
14598
14768
|
/**
|
|
14599
14769
|
* Set the controller type of the player.
|
|
14600
14770
|
*
|
|
@@ -14615,7 +14785,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
14615
14785
|
waypoints?: CutsceneWaypoint[];
|
|
14616
14786
|
start_position?: MapPosition;
|
|
14617
14787
|
start_zoom?: double;
|
|
14618
|
-
final_transition_time?:
|
|
14788
|
+
final_transition_time?: uint32;
|
|
14619
14789
|
chart_mode_cutoff?: double;
|
|
14620
14790
|
position?: MapPosition;
|
|
14621
14791
|
surface?: SurfaceIdentification;
|
|
@@ -14637,13 +14807,13 @@ interface LuaPlayer extends LuaControl {
|
|
|
14637
14807
|
* @param index The index to set.
|
|
14638
14808
|
* @param filter The new filter or `nil` to clear the filter.
|
|
14639
14809
|
*/
|
|
14640
|
-
set_infinity_inventory_filter(this: void, index:
|
|
14810
|
+
set_infinity_inventory_filter(this: void, index: uint32, filter: InfinityInventoryFilter | nil): void;
|
|
14641
14811
|
/**
|
|
14642
14812
|
* Sets the quick bar filter for the given slot. If a {@link LuaItemStack | runtime:LuaItemStack} is provided, the slot will be set to that particular item instance if it has extra data, for example a specific blueprint or spidertron remote. Otherwise, it will be set to all items of that prototype, for example iron plates.
|
|
14643
14813
|
* @param index The slot index. 1 for the first slot of page one, 2 for slot two of page one, 11 for the first slot of page 2, etc.
|
|
14644
14814
|
* @param filter The filter or `nil` to clear it.
|
|
14645
14815
|
*/
|
|
14646
|
-
set_quick_bar_slot(this: void, index:
|
|
14816
|
+
set_quick_bar_slot(this: void, index: uint32, filter: LuaItemStack | ItemWithQualityID | nil): void;
|
|
14647
14817
|
/**
|
|
14648
14818
|
* Make a custom Lua shortcut available or unavailable.
|
|
14649
14819
|
* @param prototype_name Prototype name of the custom shortcut.
|
|
@@ -14666,6 +14836,12 @@ interface LuaPlayer extends LuaControl {
|
|
|
14666
14836
|
* @param selection_mode The type of selection to start.
|
|
14667
14837
|
*/
|
|
14668
14838
|
start_selection(this: void, position: MapPosition, selection_mode: defines.selection_mode): void;
|
|
14839
|
+
/**
|
|
14840
|
+
* Swaps this player's character with another player's character.
|
|
14841
|
+
* @param player The player to swap characters with.
|
|
14842
|
+
* @returns `true` if the swap was successful.
|
|
14843
|
+
*/
|
|
14844
|
+
swap_characters(this: void, player: PlayerIdentification): boolean;
|
|
14669
14845
|
/**
|
|
14670
14846
|
* Toggles this player into or out of the map editor. Does nothing if this player isn't an admin or if the player doesn't have permission to use the map editor.
|
|
14671
14847
|
*/
|
|
@@ -14694,7 +14870,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
14694
14870
|
/**
|
|
14695
14871
|
* How many ticks since the last action of this player.
|
|
14696
14872
|
*/
|
|
14697
|
-
readonly afk_time:
|
|
14873
|
+
readonly afk_time: uint32;
|
|
14698
14874
|
/**
|
|
14699
14875
|
* If the main inventory will be auto sorted.
|
|
14700
14876
|
*/
|
|
@@ -14776,7 +14952,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
14776
14952
|
/**
|
|
14777
14953
|
* This player's index in {@link LuaGameScript::players | runtime:LuaGameScript::players} (unique ID). It is assigned when a player is created, and remains so (even when the player is not {@link connected | runtime:LuaPlayer::connected}) until the player is irreversibly {@link removed | runtime:on_player_removed}. Indexes of removed players can be reused.
|
|
14778
14954
|
*/
|
|
14779
|
-
readonly index:
|
|
14955
|
+
readonly index: uint32;
|
|
14780
14956
|
/**
|
|
14781
14957
|
* The filters for this map editor infinity inventory settings.
|
|
14782
14958
|
*/
|
|
@@ -14788,7 +14964,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
14788
14964
|
/**
|
|
14789
14965
|
* At what tick this player was last online.
|
|
14790
14966
|
*/
|
|
14791
|
-
readonly last_online:
|
|
14967
|
+
readonly last_online: uint32;
|
|
14792
14968
|
/**
|
|
14793
14969
|
* The active locale for this player.
|
|
14794
14970
|
*
|
|
@@ -14824,7 +15000,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
14824
15000
|
/**
|
|
14825
15001
|
* How many ticks did this player spend playing this save (all sessions combined).
|
|
14826
15002
|
*/
|
|
14827
|
-
readonly online_time:
|
|
15003
|
+
readonly online_time: uint32;
|
|
14828
15004
|
/**
|
|
14829
15005
|
* `true` if the player opened itself. I.e. if they opened the character or god-controller GUI.
|
|
14830
15006
|
*/
|
|
@@ -14848,7 +15024,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
14848
15024
|
/**
|
|
14849
15025
|
* Unique ID associated with the surface this player's physical controller is currently on.
|
|
14850
15026
|
*/
|
|
14851
|
-
readonly physical_surface_index:
|
|
15027
|
+
readonly physical_surface_index: uint32;
|
|
14852
15028
|
/**
|
|
14853
15029
|
* The current vehicle of this player's physical controller.
|
|
14854
15030
|
*/
|
|
@@ -14888,7 +15064,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
14888
15064
|
*
|
|
14889
15065
|
* Set to any positive value to trigger the respawn state for this player.
|
|
14890
15066
|
*/
|
|
14891
|
-
ticks_to_respawn?:
|
|
15067
|
+
ticks_to_respawn?: uint32;
|
|
14892
15068
|
/**
|
|
14893
15069
|
* The undo and redo stack for this player.
|
|
14894
15070
|
*/
|
|
@@ -15044,6 +15220,10 @@ interface LuaProgrammableSpeakerControlBehavior extends LuaControlBehavior {
|
|
|
15044
15220
|
* Base for all prototype classes.
|
|
15045
15221
|
*/
|
|
15046
15222
|
interface LuaPrototypeBase {
|
|
15223
|
+
/**
|
|
15224
|
+
* Extra description items in the tooltip and Factoriopedia.
|
|
15225
|
+
*/
|
|
15226
|
+
readonly custom_tooltip_fields?: CustomTooltipField[];
|
|
15047
15227
|
/**
|
|
15048
15228
|
* Provides additional description used in factoriopedia.
|
|
15049
15229
|
*/
|
|
@@ -15256,10 +15436,10 @@ interface LuaPrototypes {
|
|
|
15256
15436
|
* A MapGenPreset is an exact copy of the prototype table provided from the data stage.
|
|
15257
15437
|
*/
|
|
15258
15438
|
readonly map_gen_preset: Record<string, MapGenPreset>;
|
|
15259
|
-
readonly max_beacon_supply_area_distance:
|
|
15439
|
+
readonly max_beacon_supply_area_distance: uint32;
|
|
15260
15440
|
readonly max_electric_pole_connection_distance: double;
|
|
15261
15441
|
readonly max_electric_pole_supply_area_distance: float;
|
|
15262
|
-
readonly max_force_distraction_chunk_distance:
|
|
15442
|
+
readonly max_force_distraction_chunk_distance: uint32;
|
|
15263
15443
|
readonly max_force_distraction_distance: double;
|
|
15264
15444
|
readonly max_gate_activation_distance: double;
|
|
15265
15445
|
readonly max_inserter_reach_distance: double;
|
|
@@ -15393,7 +15573,7 @@ interface LuaPumpControlBehavior extends LuaGenericOnOffControlBehavior {
|
|
|
15393
15573
|
*/
|
|
15394
15574
|
interface LuaQualityPrototype extends LuaPrototypeBase {
|
|
15395
15575
|
readonly accumulator_capacity_multiplier: double;
|
|
15396
|
-
readonly asteroid_collector_collection_radius_bonus:
|
|
15576
|
+
readonly asteroid_collector_collection_radius_bonus: uint32;
|
|
15397
15577
|
readonly beacon_module_slots_bonus: ItemStackIndex;
|
|
15398
15578
|
readonly beacon_power_usage_multiplier: float;
|
|
15399
15579
|
readonly beacon_supply_area_distance_bonus: float;
|
|
@@ -15419,9 +15599,9 @@ interface LuaQualityPrototype extends LuaPrototypeBase {
|
|
|
15419
15599
|
/**
|
|
15420
15600
|
* Level basically specifies the stat-increasing value of this quality level.
|
|
15421
15601
|
*/
|
|
15422
|
-
readonly level:
|
|
15602
|
+
readonly level: uint32;
|
|
15423
15603
|
readonly logistic_cell_charging_energy_multiplier: double;
|
|
15424
|
-
readonly logistic_cell_charging_station_count_bonus:
|
|
15604
|
+
readonly logistic_cell_charging_station_count_bonus: uint32;
|
|
15425
15605
|
readonly mining_drill_mining_radius_bonus: float;
|
|
15426
15606
|
readonly mining_drill_module_slots_bonus: ItemStackIndex;
|
|
15427
15607
|
readonly mining_drill_resource_drain_multiplier: float;
|
|
@@ -15546,7 +15726,7 @@ interface LuaRailPath {
|
|
|
15546
15726
|
/**
|
|
15547
15727
|
* The current rail index.
|
|
15548
15728
|
*/
|
|
15549
|
-
readonly current:
|
|
15729
|
+
readonly current: uint32;
|
|
15550
15730
|
/**
|
|
15551
15731
|
* If the path goes from the front of the train
|
|
15552
15732
|
*/
|
|
@@ -15558,11 +15738,11 @@ interface LuaRailPath {
|
|
|
15558
15738
|
/**
|
|
15559
15739
|
* Array of the rails that this path travels over.
|
|
15560
15740
|
*/
|
|
15561
|
-
readonly rails:
|
|
15741
|
+
readonly rails: LuaTable<uint32, LuaEntity>;
|
|
15562
15742
|
/**
|
|
15563
15743
|
* The total number of rails in this path.
|
|
15564
15744
|
*/
|
|
15565
|
-
readonly size:
|
|
15745
|
+
readonly size: uint32;
|
|
15566
15746
|
/**
|
|
15567
15747
|
* The total path distance.
|
|
15568
15748
|
*/
|
|
@@ -15621,7 +15801,7 @@ interface LuaRandomGenerator {
|
|
|
15621
15801
|
*
|
|
15622
15802
|
* Seeds that are close together will produce similar results. Seeds from 0 to 341 will produce the same results.
|
|
15623
15803
|
*/
|
|
15624
|
-
re_seed(this: void, seed:
|
|
15804
|
+
re_seed(this: void, seed: uint32): void;
|
|
15625
15805
|
/**
|
|
15626
15806
|
* 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.
|
|
15627
15807
|
*/
|
|
@@ -15635,7 +15815,7 @@ interface LuaRandomGenerator {
|
|
|
15635
15815
|
* @param lower Inclusive lower bound on the result
|
|
15636
15816
|
* @param upper Inclusive upper bound on the result
|
|
15637
15817
|
*/
|
|
15638
|
-
(this: void, lower?:
|
|
15818
|
+
(this: void, lower?: int32, upper?: int32): double;
|
|
15639
15819
|
}
|
|
15640
15820
|
/**
|
|
15641
15821
|
* Control behavior for Reactor
|
|
@@ -15877,7 +16057,7 @@ interface LuaRecipePrototype extends LuaPrototypeBase {
|
|
|
15877
16057
|
/**
|
|
15878
16058
|
* Used to determine how many extra items are put into an assembling machine before it's considered "full enough".
|
|
15879
16059
|
*/
|
|
15880
|
-
readonly overload_multiplier:
|
|
16060
|
+
readonly overload_multiplier: uint32;
|
|
15881
16061
|
readonly preserve_products_in_machine_output: boolean;
|
|
15882
16062
|
/**
|
|
15883
16063
|
* The results/products of this recipe.
|
|
@@ -15890,7 +16070,7 @@ interface LuaRecipePrototype extends LuaPrototypeBase {
|
|
|
15890
16070
|
/**
|
|
15891
16071
|
* The multiplier used when this recipe is copied from an assembling machine to a requester chest. For each item in the recipe the item count * this value is set in the requester chest.
|
|
15892
16072
|
*/
|
|
15893
|
-
readonly request_paste_multiplier:
|
|
16073
|
+
readonly request_paste_multiplier: uint32;
|
|
15894
16074
|
readonly reset_freshness_on_craft: boolean;
|
|
15895
16075
|
readonly result_is_always_fresh: boolean;
|
|
15896
16076
|
/**
|
|
@@ -15994,7 +16174,7 @@ interface LuaRecord {
|
|
|
15994
16174
|
include_station_names?: boolean;
|
|
15995
16175
|
include_trains?: boolean;
|
|
15996
16176
|
include_fuel?: boolean;
|
|
15997
|
-
}):
|
|
16177
|
+
}): LuaTable<uint32, LuaEntity>;
|
|
15998
16178
|
/**
|
|
15999
16179
|
* Deconstruct the given area with this deconstruction planner.
|
|
16000
16180
|
* @param table.surface Surface to deconstruct on
|
|
@@ -16012,10 +16192,14 @@ interface LuaRecord {
|
|
|
16012
16192
|
by_player?: PlayerIdentification;
|
|
16013
16193
|
super_forced?: boolean;
|
|
16014
16194
|
}): void;
|
|
16195
|
+
/**
|
|
16196
|
+
* Exports this record to a string.
|
|
16197
|
+
*/
|
|
16198
|
+
export_record(this: void): string;
|
|
16015
16199
|
/**
|
|
16016
16200
|
* The active index of this BlueprintBookRecord. For records in "my blueprints", the result will be the same regardless of the player, but records in "game blueprints" may have different active indices per player.
|
|
16017
16201
|
*/
|
|
16018
|
-
get_active_index(this: void, player: PlayerIdentification):
|
|
16202
|
+
get_active_index(this: void, player: PlayerIdentification): uint32;
|
|
16019
16203
|
/**
|
|
16020
16204
|
* The entities in this blueprint.
|
|
16021
16205
|
*/
|
|
@@ -16023,17 +16207,17 @@ interface LuaRecord {
|
|
|
16023
16207
|
/**
|
|
16024
16208
|
* Gets the number of entities in this blueprint blueprint.
|
|
16025
16209
|
*/
|
|
16026
|
-
get_blueprint_entity_count(this: void):
|
|
16210
|
+
get_blueprint_entity_count(this: void): uint32;
|
|
16027
16211
|
/**
|
|
16028
|
-
* Gets the given tag on the given blueprint entity index in this blueprint
|
|
16212
|
+
* Gets the given tag on the given blueprint entity index in this blueprint.
|
|
16029
16213
|
* @param index The entity index.
|
|
16030
16214
|
* @param tag The tag to get.
|
|
16031
16215
|
*/
|
|
16032
|
-
get_blueprint_entity_tag(this: void, index:
|
|
16216
|
+
get_blueprint_entity_tag(this: void, index: uint32, tag: string): AnyBasic | null;
|
|
16033
16217
|
/**
|
|
16034
16218
|
* Gets the tags for the given blueprint entity index in this blueprint.
|
|
16035
16219
|
*/
|
|
16036
|
-
get_blueprint_entity_tags(this: void, index:
|
|
16220
|
+
get_blueprint_entity_tags(this: void, index: uint32): Tags;
|
|
16037
16221
|
/**
|
|
16038
16222
|
* A list of the tiles in this blueprint.
|
|
16039
16223
|
*/
|
|
@@ -16041,18 +16225,24 @@ interface LuaRecord {
|
|
|
16041
16225
|
/**
|
|
16042
16226
|
* Gets the entity filter at the given index for this deconstruction planner.
|
|
16043
16227
|
*/
|
|
16044
|
-
get_entity_filter(this: void, index:
|
|
16228
|
+
get_entity_filter(this: void, index: uint32): ItemFilter | null;
|
|
16045
16229
|
/**
|
|
16046
16230
|
* Gets the filter at the given index for this upgrade item. Note that sources (`"from"` type) that are undefined will read as `{type = "item"}`, while destinations (`"to"` type) that are undefined will read as `nil`.
|
|
16047
16231
|
*
|
|
16048
16232
|
* In contrast to {@link LuaRecord::set_mapper | runtime:LuaRecord::set_mapper}, indices past the upgrade item's current size are considered to be out of bounds.
|
|
16049
16233
|
* @param index The index of the mapper to read.
|
|
16050
16234
|
*/
|
|
16051
|
-
get_mapper(this: void, index:
|
|
16235
|
+
get_mapper(this: void, index: uint32, type: 'from' | 'to'): UpgradeMapperSource | UpgradeMapperDestination;
|
|
16236
|
+
/**
|
|
16237
|
+
* Gets the currently selected record of the book for the given player.
|
|
16238
|
+
*
|
|
16239
|
+
* Note: this will return a record even if the book is in a preview state.
|
|
16240
|
+
*/
|
|
16241
|
+
get_selected_record(this: void, player: PlayerIdentification): LuaRecord | null;
|
|
16052
16242
|
/**
|
|
16053
16243
|
* Gets the tile filter at the given index for this deconstruction planner.
|
|
16054
16244
|
*/
|
|
16055
|
-
get_tile_filter(this: void, index:
|
|
16245
|
+
get_tile_filter(this: void, index: uint32): string | null;
|
|
16056
16246
|
/**
|
|
16057
16247
|
* Is this blueprint setup? I.e. is it a non-empty blueprint?
|
|
16058
16248
|
*/
|
|
@@ -16063,17 +16253,17 @@ interface LuaRecord {
|
|
|
16063
16253
|
*/
|
|
16064
16254
|
set_blueprint_entities(this: void, entities: BlueprintEntity[]): void;
|
|
16065
16255
|
/**
|
|
16066
|
-
* Sets the given tag on the given blueprint entity index in this blueprint
|
|
16256
|
+
* Sets the given tag on the given blueprint entity index in this blueprint.
|
|
16067
16257
|
* @param index The entity index.
|
|
16068
16258
|
* @param tag The tag to set.
|
|
16069
16259
|
* @param value The tag value to set or `nil` to clear the tag.
|
|
16070
16260
|
*/
|
|
16071
|
-
set_blueprint_entity_tag(this: void, index:
|
|
16261
|
+
set_blueprint_entity_tag(this: void, index: uint32, tag: string, value: AnyBasic): void;
|
|
16072
16262
|
/**
|
|
16073
16263
|
* Sets the tags on the given blueprint entity index in this blueprint.
|
|
16074
16264
|
* @param index The entity index
|
|
16075
16265
|
*/
|
|
16076
|
-
set_blueprint_entity_tags(this: void, index:
|
|
16266
|
+
set_blueprint_entity_tags(this: void, index: uint32, tags: Tags): void;
|
|
16077
16267
|
/**
|
|
16078
16268
|
* Set specific tiles in this blueprint.
|
|
16079
16269
|
* @param tiles Tiles to be a part of the blueprint.
|
|
@@ -16084,7 +16274,7 @@ interface LuaRecord {
|
|
|
16084
16274
|
* @param filter Writing `nil` removes the filter.
|
|
16085
16275
|
* @returns Whether the new filter was successfully set (ie. was valid).
|
|
16086
16276
|
*/
|
|
16087
|
-
set_entity_filter(this: void, index:
|
|
16277
|
+
set_entity_filter(this: void, index: uint32, filter: ItemFilter | nil): boolean;
|
|
16088
16278
|
/**
|
|
16089
16279
|
* Sets the module filter at the given index for this upgrade item.
|
|
16090
16280
|
*
|
|
@@ -16092,19 +16282,19 @@ interface LuaRecord {
|
|
|
16092
16282
|
* @param index The index of the mapper to set.
|
|
16093
16283
|
* @param mapper The mapper to set. Set `nil` to clear the mapper.
|
|
16094
16284
|
*/
|
|
16095
|
-
set_mapper(this: void, index:
|
|
16285
|
+
set_mapper(this: void, index: uint32, type: 'from' | 'to', mapper: UpgradeMapperSource | UpgradeMapperDestination | nil): void;
|
|
16096
16286
|
/**
|
|
16097
16287
|
* Sets the tile filter at the given index for this deconstruction planner.
|
|
16098
16288
|
* @param filter Setting to nil erases the filter.
|
|
16099
16289
|
* @returns Whether the new filter was successfully set (ie. was valid).
|
|
16100
16290
|
*/
|
|
16101
|
-
set_tile_filter(this: void, index:
|
|
16291
|
+
set_tile_filter(this: void, index: uint32, filter: string | LuaTilePrototype | LuaTile): boolean;
|
|
16102
16292
|
/**
|
|
16103
16293
|
* If absolute snapping is enabled on this blueprint.
|
|
16104
16294
|
*/
|
|
16105
16295
|
blueprint_absolute_snapping: boolean;
|
|
16106
16296
|
/**
|
|
16107
|
-
* The description for this blueprint or blueprint book
|
|
16297
|
+
* The description for this blueprint or blueprint book.
|
|
16108
16298
|
*/
|
|
16109
16299
|
blueprint_description: string;
|
|
16110
16300
|
/**
|
|
@@ -16134,7 +16324,7 @@ interface LuaRecord {
|
|
|
16134
16324
|
/**
|
|
16135
16325
|
* The number of entity filters this deconstruction planner supports.
|
|
16136
16326
|
*/
|
|
16137
|
-
readonly entity_filter_count:
|
|
16327
|
+
readonly entity_filter_count: uint32;
|
|
16138
16328
|
/**
|
|
16139
16329
|
* The blacklist/whitelist entity filter mode for this deconstruction planner.
|
|
16140
16330
|
*/
|
|
@@ -16144,7 +16334,7 @@ interface LuaRecord {
|
|
|
16144
16334
|
*/
|
|
16145
16335
|
entity_filters: ItemFilter[];
|
|
16146
16336
|
/**
|
|
16147
|
-
* Is this blueprint record a preview? A preview record must be synced by the player before entity and tile data can be read.
|
|
16337
|
+
* Is this blueprint record a preview? A preview record must be synced by the player before entity and tile data can be read. This property is deprecated in favor of {@link LuaRecord::is_preview | runtime:LuaRecord::is_preview} and should not be used.
|
|
16148
16338
|
*/
|
|
16149
16339
|
readonly is_blueprint_preview: boolean;
|
|
16150
16340
|
/**
|
|
@@ -16154,7 +16344,7 @@ interface LuaRecord {
|
|
|
16154
16344
|
/**
|
|
16155
16345
|
* The current count of mappers in the upgrade item.
|
|
16156
16346
|
*/
|
|
16157
|
-
readonly mapper_count:
|
|
16347
|
+
readonly mapper_count: uint32;
|
|
16158
16348
|
/**
|
|
16159
16349
|
* 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.
|
|
16160
16350
|
*/
|
|
@@ -16166,7 +16356,7 @@ interface LuaRecord {
|
|
|
16166
16356
|
/**
|
|
16167
16357
|
* The number of tile filters this deconstruction planner supports.
|
|
16168
16358
|
*/
|
|
16169
|
-
readonly tile_filter_count:
|
|
16359
|
+
readonly tile_filter_count: uint32;
|
|
16170
16360
|
/**
|
|
16171
16361
|
* The blacklist/whitelist tile filter mode for this deconstruction planner.
|
|
16172
16362
|
*/
|
|
@@ -16441,7 +16631,7 @@ interface LuaRenderObject {
|
|
|
16441
16631
|
/**
|
|
16442
16632
|
* Time to live of this object. This will be 0 if the object does not expire.
|
|
16443
16633
|
*/
|
|
16444
|
-
time_to_live:
|
|
16634
|
+
time_to_live: uint32;
|
|
16445
16635
|
/**
|
|
16446
16636
|
* Where this line is drawn to.
|
|
16447
16637
|
*/
|
|
@@ -16533,7 +16723,7 @@ interface LuaRendering {
|
|
|
16533
16723
|
oriented_offset?: Vector;
|
|
16534
16724
|
target: ScriptRenderTarget;
|
|
16535
16725
|
surface: SurfaceIdentification;
|
|
16536
|
-
time_to_live?:
|
|
16726
|
+
time_to_live?: uint32;
|
|
16537
16727
|
blink_interval?: uint16;
|
|
16538
16728
|
forces?: ForceSet;
|
|
16539
16729
|
players?: PlayerIdentification[];
|
|
@@ -16564,7 +16754,7 @@ interface LuaRendering {
|
|
|
16564
16754
|
angle: float;
|
|
16565
16755
|
target: ScriptRenderTarget;
|
|
16566
16756
|
surface: SurfaceIdentification;
|
|
16567
|
-
time_to_live?:
|
|
16757
|
+
time_to_live?: uint32;
|
|
16568
16758
|
blink_interval?: uint16;
|
|
16569
16759
|
forces?: ForceSet;
|
|
16570
16760
|
players?: PlayerIdentification[];
|
|
@@ -16594,7 +16784,7 @@ interface LuaRendering {
|
|
|
16594
16784
|
filled?: boolean;
|
|
16595
16785
|
target: ScriptRenderTarget;
|
|
16596
16786
|
surface: SurfaceIdentification;
|
|
16597
|
-
time_to_live?:
|
|
16787
|
+
time_to_live?: uint32;
|
|
16598
16788
|
blink_interval?: uint16;
|
|
16599
16789
|
forces?: ForceSet;
|
|
16600
16790
|
players?: PlayerIdentification[];
|
|
@@ -16632,7 +16822,7 @@ interface LuaRendering {
|
|
|
16632
16822
|
color?: Color;
|
|
16633
16823
|
target: ScriptRenderTarget;
|
|
16634
16824
|
surface: SurfaceIdentification;
|
|
16635
|
-
time_to_live?:
|
|
16825
|
+
time_to_live?: uint32;
|
|
16636
16826
|
blink_interval?: uint16;
|
|
16637
16827
|
forces?: ForceSet;
|
|
16638
16828
|
players?: PlayerIdentification[];
|
|
@@ -16672,7 +16862,7 @@ interface LuaRendering {
|
|
|
16672
16862
|
from: ScriptRenderTarget;
|
|
16673
16863
|
to: ScriptRenderTarget;
|
|
16674
16864
|
surface: SurfaceIdentification;
|
|
16675
|
-
time_to_live?:
|
|
16865
|
+
time_to_live?: uint32;
|
|
16676
16866
|
blink_interval?: uint16;
|
|
16677
16867
|
forces?: ForceSet;
|
|
16678
16868
|
players?: PlayerIdentification[];
|
|
@@ -16704,7 +16894,7 @@ interface LuaRendering {
|
|
|
16704
16894
|
orientation_target?: ScriptRenderTarget;
|
|
16705
16895
|
use_target_orientation?: boolean;
|
|
16706
16896
|
surface: SurfaceIdentification;
|
|
16707
|
-
time_to_live?:
|
|
16897
|
+
time_to_live?: uint32;
|
|
16708
16898
|
blink_interval?: uint16;
|
|
16709
16899
|
forces?: ForceSet;
|
|
16710
16900
|
players?: PlayerIdentification[];
|
|
@@ -16737,7 +16927,7 @@ interface LuaRendering {
|
|
|
16737
16927
|
left_top: ScriptRenderTarget;
|
|
16738
16928
|
right_bottom: ScriptRenderTarget;
|
|
16739
16929
|
surface: SurfaceIdentification;
|
|
16740
|
-
time_to_live?:
|
|
16930
|
+
time_to_live?: uint32;
|
|
16741
16931
|
blink_interval?: uint16;
|
|
16742
16932
|
forces?: ForceSet;
|
|
16743
16933
|
players?: PlayerIdentification[];
|
|
@@ -16762,6 +16952,7 @@ interface LuaRendering {
|
|
|
16762
16952
|
* @param table.players The players that this object is rendered to. Passing `nil` or an empty table will render it to all players.
|
|
16763
16953
|
* @param table.visible If this is rendered to anyone at all. Defaults to true.
|
|
16764
16954
|
* @param table.only_in_alt_mode If this should only be rendered in alt mode. Defaults to false.
|
|
16955
|
+
* @param table.render_mode Mode which this object should render in. Defaults to "game".
|
|
16765
16956
|
* @example ```
|
|
16766
16957
|
-- This will draw an iron plate icon at the character's feet. The sprite will move together with the character.
|
|
16767
16958
|
rendering.draw_sprite{sprite = "item.iron-plate", target = game.player.character, surface = game.player.surface}
|
|
@@ -16769,7 +16960,6 @@ interface LuaRendering {
|
|
|
16769
16960
|
* @example ```
|
|
16770
16961
|
-- This will draw an iron plate icon at the character's head. The sprite will move together with the character.
|
|
16771
16962
|
rendering.draw_sprite{sprite = "item.iron-plate", target = {entity = game.player.character, offset = {0, -2}}, surface = game.player.surface}
|
|
16772
|
-
$field(render_mode, ScriptRenderMode, $optional) Mode which this object should render in. Defaults to "game".
|
|
16773
16963
|
```
|
|
16774
16964
|
*/
|
|
16775
16965
|
draw_sprite(this: void, table: {
|
|
@@ -16784,12 +16974,13 @@ interface LuaRendering {
|
|
|
16784
16974
|
oriented_offset?: Vector;
|
|
16785
16975
|
target: ScriptRenderTarget;
|
|
16786
16976
|
surface: SurfaceIdentification;
|
|
16787
|
-
time_to_live?:
|
|
16977
|
+
time_to_live?: uint32;
|
|
16788
16978
|
blink_interval?: uint16;
|
|
16789
16979
|
forces?: ForceSet;
|
|
16790
16980
|
players?: PlayerIdentification[];
|
|
16791
16981
|
visible?: boolean;
|
|
16792
16982
|
only_in_alt_mode?: boolean;
|
|
16983
|
+
render_mode?: ScriptRenderMode;
|
|
16793
16984
|
}): LuaRenderObject;
|
|
16794
16985
|
/**
|
|
16795
16986
|
* Create a text.
|
|
@@ -16818,7 +17009,7 @@ interface LuaRendering {
|
|
|
16818
17009
|
color: Color;
|
|
16819
17010
|
scale?: double;
|
|
16820
17011
|
font?: string;
|
|
16821
|
-
time_to_live?:
|
|
17012
|
+
time_to_live?: uint32;
|
|
16822
17013
|
blink_interval?: uint16;
|
|
16823
17014
|
forces?: ForceSet;
|
|
16824
17015
|
players?: PlayerIdentification[];
|
|
@@ -16913,7 +17104,7 @@ interface LuaSchedule {
|
|
|
16913
17104
|
/**
|
|
16914
17105
|
* Activates the interrupt at the given index, if the index is valid.
|
|
16915
17106
|
*/
|
|
16916
|
-
activate_interrupt(this: void, index:
|
|
17107
|
+
activate_interrupt(this: void, index: uint32): void;
|
|
16917
17108
|
/**
|
|
16918
17109
|
* Adds the given interrupt to the schedule if an interrupt with the given name does not already exist.
|
|
16919
17110
|
*/
|
|
@@ -16922,19 +17113,19 @@ interface LuaSchedule {
|
|
|
16922
17113
|
* Adds the given record to the end of the current schedule or at the given index using the provided data.
|
|
16923
17114
|
* @returns The index the record was added at.
|
|
16924
17115
|
*/
|
|
16925
|
-
add_record(this: void, data: AddRecordData):
|
|
17116
|
+
add_record(this: void, data: AddRecordData): uint32 | null;
|
|
16926
17117
|
/**
|
|
16927
17118
|
* Adds the given wait condition to the given record.
|
|
16928
17119
|
*/
|
|
16929
|
-
add_wait_condition(this: void,
|
|
17120
|
+
add_wait_condition(this: void, record_position: ScheduleRecordPosition, condition_index: uint32, type: WaitConditionType): void;
|
|
16930
17121
|
/**
|
|
16931
17122
|
* Changes the interrupt at the given index to the provided values. Note, the names must match.
|
|
16932
17123
|
*/
|
|
16933
|
-
change_interrupt(this: void, index:
|
|
17124
|
+
change_interrupt(this: void, index: uint32, interrupt: ScheduleInterrupt): void;
|
|
16934
17125
|
/**
|
|
16935
17126
|
* Changes the wait condition on the given record to the new values.
|
|
16936
17127
|
*/
|
|
16937
|
-
change_wait_condition(this: void,
|
|
17128
|
+
change_wait_condition(this: void, record_position: ScheduleRecordPosition, condition_index: uint32, wait_condition: WaitCondition): void;
|
|
16938
17129
|
/**
|
|
16939
17130
|
* Removes all interrupts.
|
|
16940
17131
|
*/
|
|
@@ -16942,94 +17133,101 @@ interface LuaSchedule {
|
|
|
16942
17133
|
/**
|
|
16943
17134
|
* @param interrupt_index If provided, clears the records for this interrupt.
|
|
16944
17135
|
*/
|
|
16945
|
-
clear_records(this: void, interrupt_index?:
|
|
17136
|
+
clear_records(this: void, interrupt_index?: uint32): void;
|
|
16946
17137
|
/**
|
|
16947
17138
|
* Copies the record from the given schedule at the given index into this schedule at the given index.
|
|
16948
17139
|
*/
|
|
16949
|
-
copy_record(this: void, source_schedule: LuaSchedule, source_index:
|
|
16950
|
-
drag_interrupt(this: void, from:
|
|
17140
|
+
copy_record(this: void, source_schedule: LuaSchedule, source_index: uint32, destination_index: uint32): void;
|
|
17141
|
+
drag_interrupt(this: void, from: uint32, to: uint32): void;
|
|
16951
17142
|
/**
|
|
16952
17143
|
* @param interrupt_index The interrupt to operate on, if any.
|
|
16953
17144
|
*/
|
|
16954
|
-
drag_record(this: void, from:
|
|
17145
|
+
drag_record(this: void, from: uint32, to: uint32, interrupt_index?: uint32): void;
|
|
16955
17146
|
/**
|
|
16956
|
-
* @param
|
|
17147
|
+
* @param record_position The record to change.
|
|
16957
17148
|
*/
|
|
16958
|
-
drag_wait_condition(this: void,
|
|
17149
|
+
drag_wait_condition(this: void, record_position: ScheduleRecordPosition, from: uint32, to: uint32): void;
|
|
16959
17150
|
/**
|
|
16960
17151
|
* Gets if the given interrupt can be triggered inside other interrupts.
|
|
16961
17152
|
*/
|
|
16962
|
-
get_inside_interrupt(this: void, interrupt_index:
|
|
16963
|
-
get_interrupt(this: void, index:
|
|
17153
|
+
get_inside_interrupt(this: void, interrupt_index: uint32): boolean;
|
|
17154
|
+
get_interrupt(this: void, index: uint32): ScheduleInterrupt | null;
|
|
16964
17155
|
get_interrupts(this: void): ScheduleInterrupt[];
|
|
16965
|
-
get_record(this: void,
|
|
17156
|
+
get_record(this: void, record_position: ScheduleRecordPosition): ScheduleRecord | null;
|
|
16966
17157
|
/**
|
|
16967
17158
|
* If the given index is invalid, `nil` is returned.
|
|
16968
17159
|
* @param interrupt_index If provided, the record count in this interrupt is read.
|
|
16969
17160
|
*/
|
|
16970
|
-
get_record_count(this: void, interrupt_index?:
|
|
17161
|
+
get_record_count(this: void, interrupt_index?: uint32): uint32 | null;
|
|
16971
17162
|
/**
|
|
16972
17163
|
* @param interrupt_index If provided, gets the records for this interrupt.
|
|
16973
17164
|
*/
|
|
16974
|
-
get_records(this: void, interrupt_index?:
|
|
17165
|
+
get_records(this: void, interrupt_index?: uint32): ScheduleRecord[] | null;
|
|
16975
17166
|
/**
|
|
16976
|
-
* Gets the wait condition at the given
|
|
17167
|
+
* Gets the wait condition at the given record position if one exists.
|
|
16977
17168
|
*/
|
|
16978
|
-
get_wait_condition(this: void,
|
|
17169
|
+
get_wait_condition(this: void, record_position: ScheduleRecordPosition, condition_index: uint32): WaitCondition | null;
|
|
16979
17170
|
/**
|
|
16980
17171
|
* The number of wait conditions in the given schedule record.
|
|
16981
17172
|
*/
|
|
16982
|
-
get_wait_condition_count(this: void,
|
|
17173
|
+
get_wait_condition_count(this: void, record_position: ScheduleRecordPosition): uint32 | null;
|
|
16983
17174
|
/**
|
|
16984
|
-
* Gets the wait conditions at the given
|
|
17175
|
+
* Gets the wait conditions at the given record position if they exist.
|
|
16985
17176
|
*/
|
|
16986
|
-
get_wait_conditions(this: void,
|
|
17177
|
+
get_wait_conditions(this: void, record_position: ScheduleRecordPosition): WaitCondition[] | null;
|
|
16987
17178
|
/**
|
|
17179
|
+
* Sets the train or space platform to go to a destination, including changing the train/space platform to automatic mode.
|
|
16988
17180
|
* @param schedule_index The schedule index
|
|
16989
17181
|
*/
|
|
16990
|
-
go_to_station(this: void, schedule_index:
|
|
17182
|
+
go_to_station(this: void, schedule_index: uint32): void;
|
|
16991
17183
|
/**
|
|
16992
17184
|
* Removes the interrupt at the given index, if the index is valid.
|
|
16993
17185
|
*/
|
|
16994
|
-
remove_interrupt(this: void, index:
|
|
17186
|
+
remove_interrupt(this: void, index: uint32): void;
|
|
16995
17187
|
/**
|
|
16996
|
-
* Removes the record at the given
|
|
17188
|
+
* Removes the record at the given record position, if the record position is valid.
|
|
16997
17189
|
*/
|
|
16998
|
-
remove_record(this: void,
|
|
17190
|
+
remove_record(this: void, record_position: ScheduleRecordPosition): void;
|
|
16999
17191
|
/**
|
|
17000
17192
|
* Removes the given wait condition from the given record.
|
|
17001
17193
|
*/
|
|
17002
|
-
remove_wait_condition(this: void,
|
|
17194
|
+
remove_wait_condition(this: void, record_position: ScheduleRecordPosition, condition_index: uint32): void;
|
|
17003
17195
|
/**
|
|
17004
17196
|
* @param old_name The interrupt to rename
|
|
17005
17197
|
* @param new_name The new name - if it already exists, does nothing.
|
|
17006
17198
|
*/
|
|
17007
17199
|
rename_interrupt(this: void, old_name: string, new_name: string): void;
|
|
17008
17200
|
/**
|
|
17009
|
-
* Sets if unloading is allowed at the given schedule
|
|
17201
|
+
* Sets if unloading is allowed at the given schedule record position. Only relevant for space platforms.
|
|
17010
17202
|
*/
|
|
17011
|
-
set_allow_unloading(this: void,
|
|
17203
|
+
set_allow_unloading(this: void, record_position: ScheduleRecordPosition, allow: boolean): void;
|
|
17012
17204
|
/**
|
|
17013
17205
|
* Sets if the given interrupt can be triggered inside other interrupts.
|
|
17014
17206
|
*/
|
|
17015
|
-
set_inside_interrupt(this: void, interrupt_index:
|
|
17207
|
+
set_inside_interrupt(this: void, interrupt_index: uint32, value: boolean): void;
|
|
17016
17208
|
set_interrupts(this: void, interrupts: ScheduleInterrupt[]): void;
|
|
17017
17209
|
/**
|
|
17018
17210
|
* @param interrupt_index If provided, the records will be set on this interrupt.
|
|
17019
17211
|
*/
|
|
17020
|
-
set_records(this: void, records: ScheduleRecord[], interrupt_index?:
|
|
17212
|
+
set_records(this: void, records: ScheduleRecord[], interrupt_index?: uint32): void;
|
|
17213
|
+
/**
|
|
17214
|
+
* Sets whether this train is in {@link manual mode | runtime:LuaTrain::manual_mode} or this space platform is {@link paused | runtime:LuaSpacePlatform::paused}.
|
|
17215
|
+
*/
|
|
17021
17216
|
set_stopped(this: void, stopped: boolean): void;
|
|
17022
17217
|
/**
|
|
17023
17218
|
* Sets the comparison on the given wait condition.
|
|
17024
17219
|
* @param mode `"and"`, or `"or"`
|
|
17025
17220
|
*/
|
|
17026
|
-
set_wait_condition_mode(this: void,
|
|
17027
|
-
|
|
17221
|
+
set_wait_condition_mode(this: void, record_position: ScheduleRecordPosition, condition_index: uint32, mode: string): void;
|
|
17222
|
+
/**
|
|
17223
|
+
* The schedule index of the current destination.
|
|
17224
|
+
*/
|
|
17225
|
+
readonly current: uint32;
|
|
17028
17226
|
/**
|
|
17029
17227
|
* The group this schedule is part of, if any.
|
|
17030
17228
|
*/
|
|
17031
17229
|
group?: string;
|
|
17032
|
-
readonly interrupt_count:
|
|
17230
|
+
readonly interrupt_count: uint32;
|
|
17033
17231
|
/**
|
|
17034
17232
|
* 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.
|
|
17035
17233
|
*/
|
|
@@ -17039,10 +17237,15 @@ interface LuaSchedule {
|
|
|
17039
17237
|
*/
|
|
17040
17238
|
readonly owner?: LuaTrain | LuaSpacePlatform;
|
|
17041
17239
|
/**
|
|
17240
|
+
* The time when the train or space platform was last considered active for the inactivity condition.
|
|
17241
|
+
*
|
|
17042
17242
|
* Note: when writing, value must not be larger than LuaGameScript::tick
|
|
17043
17243
|
*/
|
|
17044
17244
|
tick_of_last_activity: MapTick;
|
|
17045
17245
|
readonly tick_of_last_schedule_change: MapTick;
|
|
17246
|
+
/**
|
|
17247
|
+
* How long this train or space platform has been in the current station.
|
|
17248
|
+
*/
|
|
17046
17249
|
readonly ticks_in_station: MapTick;
|
|
17047
17250
|
/**
|
|
17048
17251
|
* 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.
|
|
@@ -17205,7 +17408,7 @@ interface LuaSegmentedUnit {
|
|
|
17205
17408
|
/**
|
|
17206
17409
|
* The maximum length of {@link LuaSegmentedUnit::get_body_nodes | runtime:LuaSegmentedUnit::get_body_nodes}.
|
|
17207
17410
|
*/
|
|
17208
|
-
readonly max_body_nodes:
|
|
17411
|
+
readonly max_body_nodes: uint32;
|
|
17209
17412
|
/**
|
|
17210
17413
|
* The maximum health of the unit.
|
|
17211
17414
|
*/
|
|
@@ -17273,7 +17476,7 @@ interface LuaSelectorCombinatorControlBehavior extends LuaCombinatorControlBehav
|
|
|
17273
17476
|
readonly valid: boolean;
|
|
17274
17477
|
}
|
|
17275
17478
|
/**
|
|
17276
|
-
* Object containing
|
|
17479
|
+
* Object containing the three different types of mod settings: startup settings, global runtime settings and per-player runtime settings. An instance of LuaSettings is available through the global object named `settings`.
|
|
17277
17480
|
*/
|
|
17278
17481
|
interface LuaSettings {
|
|
17279
17482
|
/**
|
|
@@ -17446,7 +17649,7 @@ interface LuaSimulation {
|
|
|
17446
17649
|
camera_player_cursor_direction: defines.direction;
|
|
17447
17650
|
camera_player_cursor_position?: MapPosition;
|
|
17448
17651
|
camera_position?: MapPosition;
|
|
17449
|
-
camera_surface_index?:
|
|
17652
|
+
camera_surface_index?: uint32;
|
|
17450
17653
|
camera_zoom: double;
|
|
17451
17654
|
gui_tooltip_interval: double;
|
|
17452
17655
|
hide_cursor: boolean;
|
|
@@ -17470,7 +17673,7 @@ interface LuaSpaceConnectionPrototype extends LuaPrototypeBase {
|
|
|
17470
17673
|
*/
|
|
17471
17674
|
readonly factoriopedia_alternative?: LuaSpaceConnectionPrototype;
|
|
17472
17675
|
readonly from: LuaSpaceLocationPrototype;
|
|
17473
|
-
readonly length:
|
|
17676
|
+
readonly length: uint32;
|
|
17474
17677
|
/**
|
|
17475
17678
|
* 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.
|
|
17476
17679
|
*/
|
|
@@ -17493,7 +17696,7 @@ interface LuaSpaceLocationPrototype extends LuaPrototypeBase {
|
|
|
17493
17696
|
*/
|
|
17494
17697
|
readonly factoriopedia_alternative?: LuaSpaceLocationPrototype;
|
|
17495
17698
|
readonly map_gen_settings?: MapGenSettings;
|
|
17496
|
-
readonly map_seed_offset?:
|
|
17699
|
+
readonly map_seed_offset?: uint32;
|
|
17497
17700
|
/**
|
|
17498
17701
|
* 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.
|
|
17499
17702
|
*/
|
|
@@ -17506,7 +17709,7 @@ interface LuaSpaceLocationPrototype extends LuaPrototypeBase {
|
|
|
17506
17709
|
* A mapping of the surface property name to the value.
|
|
17507
17710
|
*/
|
|
17508
17711
|
readonly surface_properties?: Record<string, double>;
|
|
17509
|
-
readonly ticks_between_player_effects?:
|
|
17712
|
+
readonly ticks_between_player_effects?: uint32;
|
|
17510
17713
|
/**
|
|
17511
17714
|
* 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.
|
|
17512
17715
|
*/
|
|
@@ -17549,18 +17752,19 @@ interface LuaSpacePlatform {
|
|
|
17549
17752
|
* Schedules this space platform for deletion.
|
|
17550
17753
|
* @param ticks The number of ticks from now when this platform will be deleted.
|
|
17551
17754
|
*/
|
|
17552
|
-
destroy(this: void, ticks?:
|
|
17755
|
+
destroy(this: void, ticks?: uint32): void;
|
|
17553
17756
|
/**
|
|
17554
17757
|
* Destroys all asteroid chunks from the given area. If no area and no position are given, then the entire surface is searched.
|
|
17555
17758
|
* @param table.invert If the filters should be inverted.
|
|
17759
|
+
* @returns The number of destroyed chunks.
|
|
17556
17760
|
*/
|
|
17557
17761
|
destroy_asteroid_chunks(this: void, table: {
|
|
17558
17762
|
area?: BoundingBox;
|
|
17559
17763
|
position?: MapPosition;
|
|
17560
17764
|
name?: AsteroidChunkID | AsteroidChunkID[];
|
|
17561
|
-
limit?:
|
|
17765
|
+
limit?: uint32;
|
|
17562
17766
|
invert?: boolean;
|
|
17563
|
-
}):
|
|
17767
|
+
}): uint32;
|
|
17564
17768
|
/**
|
|
17565
17769
|
* Ejects an item into space on this space platform.
|
|
17566
17770
|
*
|
|
@@ -17582,7 +17786,7 @@ interface LuaSpacePlatform {
|
|
|
17582
17786
|
area?: BoundingBox;
|
|
17583
17787
|
position?: MapPosition;
|
|
17584
17788
|
name?: AsteroidChunkID | AsteroidChunkID[];
|
|
17585
|
-
limit?:
|
|
17789
|
+
limit?: uint32;
|
|
17586
17790
|
invert?: boolean;
|
|
17587
17791
|
}): AsteroidChunk[];
|
|
17588
17792
|
get_schedule(this: void): LuaSchedule;
|
|
@@ -17624,7 +17828,7 @@ interface LuaSpacePlatform {
|
|
|
17624
17828
|
/**
|
|
17625
17829
|
* The unique index of this space platform.
|
|
17626
17830
|
*/
|
|
17627
|
-
readonly index:
|
|
17831
|
+
readonly index: uint32;
|
|
17628
17832
|
/**
|
|
17629
17833
|
* The space location this space platform previously went through or stopped at.
|
|
17630
17834
|
*/
|
|
@@ -17652,7 +17856,7 @@ interface LuaSpacePlatform {
|
|
|
17652
17856
|
*
|
|
17653
17857
|
* Returns how many ticks are left before the platform will be deleted. 0 if not scheduled for deletion.
|
|
17654
17858
|
*/
|
|
17655
|
-
readonly scheduled_for_deletion:
|
|
17859
|
+
readonly scheduled_for_deletion: uint32;
|
|
17656
17860
|
/**
|
|
17657
17861
|
* The space connection this space platform is traveling through or `nil`.
|
|
17658
17862
|
*
|
|
@@ -17732,6 +17936,26 @@ interface LuaSpacePlatformHubControlBehavior extends LuaControlBehavior {
|
|
|
17732
17936
|
*/
|
|
17733
17937
|
readonly valid: boolean;
|
|
17734
17938
|
}
|
|
17939
|
+
/**
|
|
17940
|
+
* Control behavior for splitter.
|
|
17941
|
+
*/
|
|
17942
|
+
interface LuaSplitterControlBehavior extends LuaControlBehavior {
|
|
17943
|
+
input_left_condition: CircuitConditionDefinition;
|
|
17944
|
+
input_right_condition: CircuitConditionDefinition;
|
|
17945
|
+
/**
|
|
17946
|
+
* 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.
|
|
17947
|
+
*/
|
|
17948
|
+
readonly object_name: string;
|
|
17949
|
+
output_left_condition: CircuitConditionDefinition;
|
|
17950
|
+
output_right_condition: CircuitConditionDefinition;
|
|
17951
|
+
set_filter: boolean;
|
|
17952
|
+
set_input_side: boolean;
|
|
17953
|
+
set_output_side: boolean;
|
|
17954
|
+
/**
|
|
17955
|
+
* 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.
|
|
17956
|
+
*/
|
|
17957
|
+
readonly valid: boolean;
|
|
17958
|
+
}
|
|
17735
17959
|
/**
|
|
17736
17960
|
* Control behavior for storage tanks.
|
|
17737
17961
|
*/
|
|
@@ -17754,20 +17978,20 @@ interface LuaStorageTankControlBehavior extends LuaControlBehavior {
|
|
|
17754
17978
|
*/
|
|
17755
17979
|
interface LuaStyle {
|
|
17756
17980
|
badge_font: string;
|
|
17757
|
-
badge_horizontal_spacing:
|
|
17758
|
-
bar_width:
|
|
17981
|
+
badge_horizontal_spacing: int32;
|
|
17982
|
+
bar_width: uint32;
|
|
17759
17983
|
/**
|
|
17760
17984
|
* Space between the table cell contents bottom and border.
|
|
17761
17985
|
*/
|
|
17762
|
-
bottom_cell_padding:
|
|
17763
|
-
bottom_margin:
|
|
17764
|
-
bottom_padding:
|
|
17986
|
+
bottom_cell_padding: int32;
|
|
17987
|
+
bottom_margin: int32;
|
|
17988
|
+
bottom_padding: int32;
|
|
17765
17989
|
/**
|
|
17766
17990
|
* Space between the table cell contents and border. Sets top/right/bottom/left cell paddings to this value.
|
|
17767
17991
|
*/
|
|
17768
|
-
cell_padding:
|
|
17992
|
+
cell_padding: int32;
|
|
17769
17993
|
clicked_font_color: Color;
|
|
17770
|
-
clicked_vertical_offset:
|
|
17994
|
+
clicked_vertical_offset: int32;
|
|
17771
17995
|
color: Color;
|
|
17772
17996
|
/**
|
|
17773
17997
|
* Array containing the alignment for every column of this table element. Even though this property is marked as read-only, the alignment can be changed by indexing the LuaCustomTable, like so:
|
|
@@ -17775,31 +17999,31 @@ interface LuaStyle {
|
|
|
17775
17999
|
table_element.style.column_alignments[1] = "center"
|
|
17776
18000
|
```
|
|
17777
18001
|
*/
|
|
17778
|
-
readonly column_alignments:
|
|
18002
|
+
readonly column_alignments: LuaTable<uint32, Alignment>;
|
|
17779
18003
|
default_badge_font_color: Color;
|
|
17780
18004
|
disabled_badge_font_color: Color;
|
|
17781
18005
|
disabled_font_color: Color;
|
|
17782
18006
|
draw_grayscale_picture: boolean;
|
|
17783
|
-
extra_bottom_margin_when_activated:
|
|
17784
|
-
extra_bottom_padding_when_activated:
|
|
17785
|
-
extra_left_margin_when_activated:
|
|
17786
|
-
extra_left_padding_when_activated:
|
|
18007
|
+
extra_bottom_margin_when_activated: int32;
|
|
18008
|
+
extra_bottom_padding_when_activated: int32;
|
|
18009
|
+
extra_left_margin_when_activated: int32;
|
|
18010
|
+
extra_left_padding_when_activated: int32;
|
|
17787
18011
|
/**
|
|
17788
18012
|
* Sets `extra_top/right/bottom/left_margin_when_activated` to this value.
|
|
17789
18013
|
*
|
|
17790
18014
|
* An array with two values sets top/bottom margin to the first value and left/right margin to the second value. An array with four values sets top, right, bottom, left margin respectively.
|
|
17791
18015
|
*/
|
|
17792
|
-
extra_margin_when_activated:
|
|
18016
|
+
extra_margin_when_activated: int32 | int32[];
|
|
17793
18017
|
/**
|
|
17794
18018
|
* Sets `extra_top/right/bottom/left_padding_when_activated` to this value.
|
|
17795
18019
|
*
|
|
17796
18020
|
* An array with two values sets top/bottom padding to the first value and left/right padding to the second value. An array with four values sets top, right, bottom, left padding respectively.
|
|
17797
18021
|
*/
|
|
17798
|
-
extra_padding_when_activated:
|
|
17799
|
-
extra_right_margin_when_activated:
|
|
17800
|
-
extra_right_padding_when_activated:
|
|
17801
|
-
extra_top_margin_when_activated:
|
|
17802
|
-
extra_top_padding_when_activated:
|
|
18022
|
+
extra_padding_when_activated: int32 | int32[];
|
|
18023
|
+
extra_right_margin_when_activated: int32;
|
|
18024
|
+
extra_right_padding_when_activated: int32;
|
|
18025
|
+
extra_top_margin_when_activated: int32;
|
|
18026
|
+
extra_top_padding_when_activated: int32;
|
|
17803
18027
|
font: string;
|
|
17804
18028
|
font_color: Color;
|
|
17805
18029
|
/**
|
|
@@ -17809,7 +18033,7 @@ interface LuaStyle {
|
|
|
17809
18033
|
/**
|
|
17810
18034
|
* Sets both minimal and maximal height to the given value.
|
|
17811
18035
|
*/
|
|
17812
|
-
height:
|
|
18036
|
+
height: int32;
|
|
17813
18037
|
/**
|
|
17814
18038
|
* Horizontal align of the inner content of the widget, if any.
|
|
17815
18039
|
*/
|
|
@@ -17817,7 +18041,7 @@ interface LuaStyle {
|
|
|
17817
18041
|
/**
|
|
17818
18042
|
* Horizontal space between individual cells.
|
|
17819
18043
|
*/
|
|
17820
|
-
horizontal_spacing:
|
|
18044
|
+
horizontal_spacing: int32;
|
|
17821
18045
|
/**
|
|
17822
18046
|
* Whether the GUI element can be squashed (by maximal width of some parent element) horizontally. `nil` if this element does not support squashing.
|
|
17823
18047
|
*
|
|
@@ -17832,31 +18056,31 @@ interface LuaStyle {
|
|
|
17832
18056
|
/**
|
|
17833
18057
|
* Space between the table cell contents left and border.
|
|
17834
18058
|
*/
|
|
17835
|
-
left_cell_padding:
|
|
17836
|
-
left_margin:
|
|
17837
|
-
left_padding:
|
|
18059
|
+
left_cell_padding: int32;
|
|
18060
|
+
left_margin: int32;
|
|
18061
|
+
left_padding: int32;
|
|
17838
18062
|
/**
|
|
17839
18063
|
* Sets top/right/bottom/left margins to this value.
|
|
17840
18064
|
*
|
|
17841
18065
|
* An array with two values sets top/bottom margin to the first value and left/right margin to the second value. An array with four values sets top, right, bottom, left margin respectively.
|
|
17842
18066
|
*/
|
|
17843
|
-
margin:
|
|
18067
|
+
margin: int32 | int32[];
|
|
17844
18068
|
/**
|
|
17845
18069
|
* Maximal height ensures, that the widget will never be bigger than than that size. It can't be stretched to be bigger.
|
|
17846
18070
|
*/
|
|
17847
|
-
maximal_height:
|
|
18071
|
+
maximal_height: int32;
|
|
17848
18072
|
/**
|
|
17849
18073
|
* Maximal width ensures, that the widget will never be bigger than than that size. It can't be stretched to be bigger.
|
|
17850
18074
|
*/
|
|
17851
|
-
maximal_width:
|
|
18075
|
+
maximal_width: int32;
|
|
17852
18076
|
/**
|
|
17853
18077
|
* Minimal height ensures, that the widget will never be smaller than than that size. It can't be squashed to be smaller.
|
|
17854
18078
|
*/
|
|
17855
|
-
minimal_height:
|
|
18079
|
+
minimal_height: int32;
|
|
17856
18080
|
/**
|
|
17857
18081
|
* Minimal width ensures, that the widget will never be smaller than than that size. It can't be squashed to be smaller.
|
|
17858
18082
|
*/
|
|
17859
|
-
minimal_width:
|
|
18083
|
+
minimal_width: int32;
|
|
17860
18084
|
/**
|
|
17861
18085
|
* Name of this style.
|
|
17862
18086
|
*/
|
|
@@ -17864,11 +18088,11 @@ interface LuaStyle {
|
|
|
17864
18088
|
/**
|
|
17865
18089
|
* Natural height specifies the height of the element tries to have, but it can still be squashed/stretched to have a smaller or bigger size.
|
|
17866
18090
|
*/
|
|
17867
|
-
natural_height:
|
|
18091
|
+
natural_height: int32;
|
|
17868
18092
|
/**
|
|
17869
18093
|
* Natural width specifies the width of the element tries to have, but it can still be squashed/stretched to have a smaller or bigger size.
|
|
17870
18094
|
*/
|
|
17871
|
-
natural_width:
|
|
18095
|
+
natural_width: int32;
|
|
17872
18096
|
/**
|
|
17873
18097
|
* 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.
|
|
17874
18098
|
*/
|
|
@@ -17878,7 +18102,7 @@ interface LuaStyle {
|
|
|
17878
18102
|
*
|
|
17879
18103
|
* An array with two values sets top/bottom padding to the first value and left/right padding to the second value. An array with four values sets top, right, bottom, left padding respectively.
|
|
17880
18104
|
*/
|
|
17881
|
-
padding:
|
|
18105
|
+
padding: int32 | int32[];
|
|
17882
18106
|
pie_progress_color: Color;
|
|
17883
18107
|
/**
|
|
17884
18108
|
* How this GUI element handles rich text.
|
|
@@ -17887,9 +18111,9 @@ interface LuaStyle {
|
|
|
17887
18111
|
/**
|
|
17888
18112
|
* Space between the table cell contents right and border.
|
|
17889
18113
|
*/
|
|
17890
|
-
right_cell_padding:
|
|
17891
|
-
right_margin:
|
|
17892
|
-
right_padding:
|
|
18114
|
+
right_cell_padding: int32;
|
|
18115
|
+
right_margin: int32;
|
|
18116
|
+
right_padding: int32;
|
|
17893
18117
|
selected_badge_font_color: Color;
|
|
17894
18118
|
selected_clicked_font_color: Color;
|
|
17895
18119
|
selected_font_color: Color;
|
|
@@ -17898,15 +18122,15 @@ interface LuaStyle {
|
|
|
17898
18122
|
/**
|
|
17899
18123
|
* Sets both width and height to the given value. Also accepts an array with two values, setting width to the first and height to the second one.
|
|
17900
18124
|
*/
|
|
17901
|
-
size:
|
|
18125
|
+
size: int32 | int32[];
|
|
17902
18126
|
stretch_image_to_widget_size: boolean;
|
|
17903
18127
|
strikethrough_color: Color;
|
|
17904
18128
|
/**
|
|
17905
18129
|
* Space between the table cell contents top and border.
|
|
17906
18130
|
*/
|
|
17907
|
-
top_cell_padding:
|
|
17908
|
-
top_margin:
|
|
17909
|
-
top_padding:
|
|
18131
|
+
top_cell_padding: int32;
|
|
18132
|
+
top_margin: int32;
|
|
18133
|
+
top_padding: int32;
|
|
17910
18134
|
use_header_filler: boolean;
|
|
17911
18135
|
/**
|
|
17912
18136
|
* 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.
|
|
@@ -17919,7 +18143,7 @@ interface LuaStyle {
|
|
|
17919
18143
|
/**
|
|
17920
18144
|
* Vertical space between individual cells.
|
|
17921
18145
|
*/
|
|
17922
|
-
vertical_spacing:
|
|
18146
|
+
vertical_spacing: int32;
|
|
17923
18147
|
/**
|
|
17924
18148
|
* Whether the GUI element can be squashed (by maximal height of some parent element) vertically. `nil` if this element does not support squashing.
|
|
17925
18149
|
*
|
|
@@ -17933,7 +18157,7 @@ interface LuaStyle {
|
|
|
17933
18157
|
/**
|
|
17934
18158
|
* Sets both minimal and maximal width to the given value.
|
|
17935
18159
|
*/
|
|
17936
|
-
width:
|
|
18160
|
+
width: int32;
|
|
17937
18161
|
}
|
|
17938
18162
|
/**
|
|
17939
18163
|
* A "domain" of the world. Surfaces can only be created and deleted through the API. Surfaces are uniquely identified by their name. Every game contains at least the surface "nauvis".
|
|
@@ -17943,12 +18167,12 @@ interface LuaSurface {
|
|
|
17943
18167
|
* Adds the given script area.
|
|
17944
18168
|
* @returns The id of the created area.
|
|
17945
18169
|
*/
|
|
17946
|
-
add_script_area(this: void, area: ScriptArea):
|
|
18170
|
+
add_script_area(this: void, area: ScriptArea): uint32;
|
|
17947
18171
|
/**
|
|
17948
18172
|
* Adds the given script position.
|
|
17949
18173
|
* @returns The id of the created position.
|
|
17950
18174
|
*/
|
|
17951
|
-
add_script_position(this: void, position: ScriptPosition):
|
|
18175
|
+
add_script_position(this: void, position: ScriptPosition): uint32;
|
|
17952
18176
|
/**
|
|
17953
18177
|
* Sets the given area to the checkerboard lab tiles.
|
|
17954
18178
|
* @param area The tile area.
|
|
@@ -17962,7 +18186,7 @@ interface LuaSurface {
|
|
|
17962
18186
|
* @param unit_count Number of biters to send for the base-building task.
|
|
17963
18187
|
* @param force Force the new base will belong to. Defaults to enemy.
|
|
17964
18188
|
*/
|
|
17965
|
-
build_enemy_base(this: void, position: MapPosition, unit_count:
|
|
18189
|
+
build_enemy_base(this: void, position: MapPosition, unit_count: uint32, force?: ForceID): void;
|
|
17966
18190
|
/**
|
|
17967
18191
|
* Calculate values for a list of tile properties at a list of positions. Requests for unrecognized properties will be ignored, so this can also be used to test whether those properties exist.
|
|
17968
18192
|
* @param property_names Names of properties (`"elevation"`, etc) to calculate.
|
|
@@ -18018,7 +18242,7 @@ interface LuaSurface {
|
|
|
18018
18242
|
player?: PlayerIdentification;
|
|
18019
18243
|
skip_fog_of_war?: boolean;
|
|
18020
18244
|
item?: LuaItemStack;
|
|
18021
|
-
undo_index?:
|
|
18245
|
+
undo_index?: uint32;
|
|
18022
18246
|
super_forced?: boolean;
|
|
18023
18247
|
}): void;
|
|
18024
18248
|
/**
|
|
@@ -18136,13 +18360,13 @@ interface LuaSurface {
|
|
|
18136
18360
|
*
|
|
18137
18361
|
* - If `area` is specified, this returns entities colliding with that area.
|
|
18138
18362
|
*/
|
|
18139
|
-
count_entities_filtered(this: void, filter: EntitySearchFilters):
|
|
18363
|
+
count_entities_filtered(this: void, filter: EntitySearchFilters): uint32;
|
|
18140
18364
|
/**
|
|
18141
18365
|
* Count tiles of a given name in a given area. Works just like {@link LuaSurface::find_tiles_filtered | runtime: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.
|
|
18142
18366
|
*
|
|
18143
18367
|
* 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.
|
|
18144
18368
|
*/
|
|
18145
|
-
count_tiles_filtered(this: void, filter: TileSearchFilters):
|
|
18369
|
+
count_tiles_filtered(this: void, filter: TileSearchFilters): uint32;
|
|
18146
18370
|
/**
|
|
18147
18371
|
* Adds the given decoratives to the surface.
|
|
18148
18372
|
*
|
|
@@ -18174,7 +18398,7 @@ interface LuaSurface {
|
|
|
18174
18398
|
flip_horizontal?: boolean;
|
|
18175
18399
|
flip_vertical?: boolean;
|
|
18176
18400
|
by_player?: PlayerIdentification;
|
|
18177
|
-
}):
|
|
18401
|
+
}): int32 | null;
|
|
18178
18402
|
/**
|
|
18179
18403
|
* Create an entity on this surface.
|
|
18180
18404
|
* @example ```
|
|
@@ -18300,7 +18524,7 @@ interface LuaSurface {
|
|
|
18300
18524
|
from_layer?: string;
|
|
18301
18525
|
to_layer?: string;
|
|
18302
18526
|
exclude_soft?: boolean;
|
|
18303
|
-
limit?:
|
|
18527
|
+
limit?: uint32;
|
|
18304
18528
|
invert?: boolean;
|
|
18305
18529
|
}): void;
|
|
18306
18530
|
/**
|
|
@@ -18311,12 +18535,12 @@ interface LuaSurface {
|
|
|
18311
18535
|
* Sets the given script area to the new values.
|
|
18312
18536
|
* @param id The area to edit.
|
|
18313
18537
|
*/
|
|
18314
|
-
edit_script_area(this: void, id:
|
|
18538
|
+
edit_script_area(this: void, id: uint32, area: ScriptArea): void;
|
|
18315
18539
|
/**
|
|
18316
18540
|
* Sets the given script position to the new values.
|
|
18317
18541
|
* @param id The position to edit.
|
|
18318
18542
|
*/
|
|
18319
|
-
edit_script_position(this: void, id:
|
|
18543
|
+
edit_script_position(this: void, id: uint32, position: ScriptPosition): void;
|
|
18320
18544
|
/**
|
|
18321
18545
|
* Whether the given entity prototype collides at the given position and direction.
|
|
18322
18546
|
* @param prototype The entity prototype to check.
|
|
@@ -18356,7 +18580,7 @@ interface LuaSurface {
|
|
|
18356
18580
|
from_layer?: string;
|
|
18357
18581
|
to_layer?: string;
|
|
18358
18582
|
exclude_soft?: boolean;
|
|
18359
|
-
limit?:
|
|
18583
|
+
limit?: uint32;
|
|
18360
18584
|
invert?: boolean;
|
|
18361
18585
|
}): DecorativeResult[];
|
|
18362
18586
|
/**
|
|
@@ -18571,12 +18795,12 @@ interface LuaSurface {
|
|
|
18571
18795
|
/**
|
|
18572
18796
|
* Gets the resource amount of all resources on this surface
|
|
18573
18797
|
*/
|
|
18574
|
-
get_resource_counts(this: void): Record<string,
|
|
18798
|
+
get_resource_counts(this: void): Record<string, uint32>;
|
|
18575
18799
|
/**
|
|
18576
18800
|
* Gets the first script area by name or id.
|
|
18577
18801
|
* @param key The name or id of the area to get.
|
|
18578
18802
|
*/
|
|
18579
|
-
get_script_area(this: void, key?: string |
|
|
18803
|
+
get_script_area(this: void, key?: string | uint32): ScriptArea | null;
|
|
18580
18804
|
/**
|
|
18581
18805
|
* Gets the script areas that match the given name or if no name is given all areas are returned.
|
|
18582
18806
|
*/
|
|
@@ -18585,7 +18809,7 @@ interface LuaSurface {
|
|
|
18585
18809
|
* Gets the first script position by name or id.
|
|
18586
18810
|
* @param key The name or id of the position to get.
|
|
18587
18811
|
*/
|
|
18588
|
-
get_script_position(this: void, key?: string |
|
|
18812
|
+
get_script_position(this: void, key?: string | uint32): ScriptPosition | null;
|
|
18589
18813
|
/**
|
|
18590
18814
|
* Gets the script positions that match the given name or if no name is given all positions are returned.
|
|
18591
18815
|
*/
|
|
@@ -18612,7 +18836,7 @@ interface LuaSurface {
|
|
|
18612
18836
|
*
|
|
18613
18837
|
* Non-integer values will result in them being rounded down.
|
|
18614
18838
|
*/
|
|
18615
|
-
get_tile(this: void, x:
|
|
18839
|
+
get_tile(this: void, x: int32, y: int32): LuaTile;
|
|
18616
18840
|
/**
|
|
18617
18841
|
* Gets the total amount of pollution on the surface by iterating over all the chunks containing pollution.
|
|
18618
18842
|
*/
|
|
@@ -18662,12 +18886,12 @@ interface LuaSurface {
|
|
|
18662
18886
|
* Removes the given script area.
|
|
18663
18887
|
* @returns If the area was actually removed. False when it didn't exist.
|
|
18664
18888
|
*/
|
|
18665
|
-
remove_script_area(this: void, id:
|
|
18889
|
+
remove_script_area(this: void, id: uint32): boolean;
|
|
18666
18890
|
/**
|
|
18667
18891
|
* Removes the given script position.
|
|
18668
18892
|
* @returns If the position was actually removed. False when it didn't exist.
|
|
18669
18893
|
*/
|
|
18670
|
-
remove_script_position(this: void, id:
|
|
18894
|
+
remove_script_position(this: void, id: uint32): boolean;
|
|
18671
18895
|
/**
|
|
18672
18896
|
* Generates a path with the specified constraints (as an array of {@link PathfinderWaypoints | runtime:PathfinderWaypoint}) using the unit pathfinding algorithm. This path can be used to emulate pathing behavior by script for non-unit entities, such as vehicles. If you want to command actual units (such as biters or spitters) to move, use {@link LuaCommandable::set_command | runtime:LuaCommandable::set_command} via {@link LuaEntity::commandable | runtime:LuaEntity::commandable} instead.
|
|
18673
18897
|
*
|
|
@@ -18695,17 +18919,17 @@ interface LuaSurface {
|
|
|
18695
18919
|
radius?: double;
|
|
18696
18920
|
pathfind_flags?: PathfinderFlags;
|
|
18697
18921
|
can_open_gates?: boolean;
|
|
18698
|
-
path_resolution_modifier?:
|
|
18699
|
-
max_gap_size?:
|
|
18922
|
+
path_resolution_modifier?: int32;
|
|
18923
|
+
max_gap_size?: int32;
|
|
18700
18924
|
max_attack_distance?: double;
|
|
18701
18925
|
entity_to_ignore?: LuaEntity;
|
|
18702
|
-
}):
|
|
18926
|
+
}): uint32;
|
|
18703
18927
|
/**
|
|
18704
18928
|
* Request that the game's map generator generate chunks at the given position for the given radius on this surface. If the radius is `0`, then only the chunk at the given position is generated.
|
|
18705
18929
|
* @param position Where to generate the new chunks.
|
|
18706
18930
|
* @param radius The chunk radius from `position` to generate new chunks in. Defaults to `0`.
|
|
18707
18931
|
*/
|
|
18708
|
-
request_to_generate_chunks(this: void, position: MapPosition, radius?:
|
|
18932
|
+
request_to_generate_chunks(this: void, position: MapPosition, radius?: uint32): void;
|
|
18709
18933
|
/**
|
|
18710
18934
|
* Set generated status of a chunk. Useful when copying chunks.
|
|
18711
18935
|
* @param position The chunk's position.
|
|
@@ -18739,10 +18963,10 @@ interface LuaSurface {
|
|
|
18739
18963
|
*/
|
|
18740
18964
|
set_multi_command(this: void, table: {
|
|
18741
18965
|
command: Command;
|
|
18742
|
-
unit_count:
|
|
18966
|
+
unit_count: uint32;
|
|
18743
18967
|
force?: ForceID;
|
|
18744
|
-
unit_search_distance?:
|
|
18745
|
-
}):
|
|
18968
|
+
unit_search_distance?: uint32;
|
|
18969
|
+
}): uint32;
|
|
18746
18970
|
/**
|
|
18747
18971
|
* Set the pollution for a given position.
|
|
18748
18972
|
*
|
|
@@ -18782,7 +19006,7 @@ interface LuaSurface {
|
|
|
18782
19006
|
* @param player The player whose undo queue to add these actions to.
|
|
18783
19007
|
* @param undo_index The index of the undo item to add this action to. An index of `0` creates a new undo item for it. Defaults to putting it into the appropriate undo item automatically if not specified.
|
|
18784
19008
|
*/
|
|
18785
|
-
set_tiles(this: void, tiles: Tile[], correct_tiles?: boolean, remove_colliding_entities?: boolean | 'abort_on_collision', remove_colliding_decoratives?: boolean, raise_event?: boolean, player?: PlayerIdentification, undo_index?:
|
|
19009
|
+
set_tiles(this: void, tiles: Tile[], correct_tiles?: boolean, remove_colliding_entities?: boolean | 'abort_on_collision', remove_colliding_decoratives?: boolean, raise_event?: boolean, player?: PlayerIdentification, undo_index?: uint32): void;
|
|
18786
19010
|
/**
|
|
18787
19011
|
* Spill inventory on the ground centered at a given location.
|
|
18788
19012
|
* @param table.position Center of the spillage
|
|
@@ -18932,7 +19156,7 @@ interface LuaSurface {
|
|
|
18932
19156
|
/**
|
|
18933
19157
|
* This surface's index in {@link LuaGameScript::surfaces | runtime:LuaGameScript::surfaces} (unique ID). It is assigned when a surface is created, and remains so until it is {@link deleted | runtime:on_surface_deleted}. Indexes of deleted surfaces can be reused.
|
|
18934
19158
|
*/
|
|
18935
|
-
readonly index:
|
|
19159
|
+
readonly index: uint32;
|
|
18936
19160
|
/**
|
|
18937
19161
|
* Localised name of this surface. When set, will replace the internal surface name in places where a player sees surface name.
|
|
18938
19162
|
*
|
|
@@ -18995,7 +19219,7 @@ interface LuaSurface {
|
|
|
18995
19219
|
/**
|
|
18996
19220
|
* The number of ticks per day for this surface.
|
|
18997
19221
|
*/
|
|
18998
|
-
ticks_per_day:
|
|
19222
|
+
ticks_per_day: uint32;
|
|
18999
19223
|
/**
|
|
19000
19224
|
* 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.
|
|
19001
19225
|
*/
|
|
@@ -19102,7 +19326,7 @@ interface BaseLuaSurfaceCreateEntityParams {
|
|
|
19102
19326
|
/**
|
|
19103
19327
|
* The index of the undo item to add this action to. An index of `0` creates a new undo item for it. Defaults to putting it into the appropriate undo item automatically if not specified.
|
|
19104
19328
|
*/
|
|
19105
|
-
'undo_index'?:
|
|
19329
|
+
'undo_index'?: uint32;
|
|
19106
19330
|
}
|
|
19107
19331
|
/**
|
|
19108
19332
|
*
|
|
@@ -19217,11 +19441,11 @@ interface LuaSurfaceCreateEntityParamsBeam extends BaseLuaSurfaceCreateEntityPar
|
|
|
19217
19441
|
/**
|
|
19218
19442
|
* If set, beam will be destroyed after this value of ticks.
|
|
19219
19443
|
*/
|
|
19220
|
-
'duration'?:
|
|
19444
|
+
'duration'?: uint32;
|
|
19221
19445
|
/**
|
|
19222
19446
|
* If set, beam will be destroyed when distance between source and target is greater than this value.
|
|
19223
19447
|
*/
|
|
19224
|
-
'max_length'?:
|
|
19448
|
+
'max_length'?: uint32;
|
|
19225
19449
|
/**
|
|
19226
19450
|
* Source position will be offset by this value when rendering the beam.
|
|
19227
19451
|
*/
|
|
@@ -19254,7 +19478,7 @@ interface LuaSurfaceCreateEntityParamsCar extends BaseLuaSurfaceCreateEntityPara
|
|
|
19254
19478
|
* Applies to variant case `cargo-landing-pad`
|
|
19255
19479
|
*/
|
|
19256
19480
|
interface LuaSurfaceCreateEntityParamsCargoLandingPad extends BaseLuaSurfaceCreateEntityParams {
|
|
19257
|
-
'bar'?:
|
|
19481
|
+
'bar'?: uint32;
|
|
19258
19482
|
'control_behavior'?: CargoLandingPadBlueprintControlBehavior;
|
|
19259
19483
|
'request_filters'?: BlueprintLogisticSections;
|
|
19260
19484
|
}
|
|
@@ -19282,8 +19506,8 @@ interface LuaSurfaceCreateEntityParamsCargoWagon extends BaseLuaSurfaceCreateEnt
|
|
|
19282
19506
|
*/
|
|
19283
19507
|
interface LuaSurfaceCreateEntityParamsCharacterCorpse extends BaseLuaSurfaceCreateEntityParams {
|
|
19284
19508
|
'color'?: Color;
|
|
19285
|
-
'inventory_size'?:
|
|
19286
|
-
'player_index'?:
|
|
19509
|
+
'inventory_size'?: uint32;
|
|
19510
|
+
'player_index'?: uint32;
|
|
19287
19511
|
}
|
|
19288
19512
|
/**
|
|
19289
19513
|
*
|
|
@@ -19311,7 +19535,7 @@ interface LuaSurfaceCreateEntityParamsContainer extends BaseLuaSurfaceCreateEnti
|
|
|
19311
19535
|
/**
|
|
19312
19536
|
* Inventory index where the red limiting bar should be set.
|
|
19313
19537
|
*/
|
|
19314
|
-
'bar'?:
|
|
19538
|
+
'bar'?: uint32;
|
|
19315
19539
|
'control_behavior'?: ContainerBlueprintControlBehavior;
|
|
19316
19540
|
}
|
|
19317
19541
|
/**
|
|
@@ -19439,7 +19663,7 @@ interface LuaSurfaceCreateEntityParamsHighlightBox extends BaseLuaSurfaceCreateE
|
|
|
19439
19663
|
/**
|
|
19440
19664
|
* The blink interval for this highlight box. Makes it be shown every `blink_interval` ticks. Defaults to `0` (constantly shown).
|
|
19441
19665
|
*/
|
|
19442
|
-
'blink_interval'?:
|
|
19666
|
+
'blink_interval'?: uint32;
|
|
19443
19667
|
/**
|
|
19444
19668
|
* The bounding box defining the highlight box using absolute map coordinates. If specified, the general `position` parameter still needs to be present, but will be ignored. If not specified, the game falls back to the `source` parameter first, then the `target` parameter second. One of these three parameters need to be specified.
|
|
19445
19669
|
*/
|
|
@@ -19451,11 +19675,11 @@ interface LuaSurfaceCreateEntityParamsHighlightBox extends BaseLuaSurfaceCreateE
|
|
|
19451
19675
|
/**
|
|
19452
19676
|
* The player to render the highlight box for. If not provided, it will be rendered for all players.
|
|
19453
19677
|
*/
|
|
19454
|
-
'render_player_index'?:
|
|
19678
|
+
'render_player_index'?: uint32;
|
|
19455
19679
|
/**
|
|
19456
19680
|
* The amount of time in ticks that the highlight box will exist for. Defaults to existing forever.
|
|
19457
19681
|
*/
|
|
19458
|
-
'time_to_live'?:
|
|
19682
|
+
'time_to_live'?: uint32;
|
|
19459
19683
|
}
|
|
19460
19684
|
/**
|
|
19461
19685
|
*
|
|
@@ -19481,7 +19705,7 @@ interface LuaSurfaceCreateEntityParamsInfinityCargoWagon extends BaseLuaSurfaceC
|
|
|
19481
19705
|
* Applies to variant case `infinity-container`
|
|
19482
19706
|
*/
|
|
19483
19707
|
interface LuaSurfaceCreateEntityParamsInfinityContainer extends BaseLuaSurfaceCreateEntityParams {
|
|
19484
|
-
'bar'?:
|
|
19708
|
+
'bar'?: uint32;
|
|
19485
19709
|
'control_behavior'?: LogisticContainerBlueprintControlBehavior;
|
|
19486
19710
|
'infinity_settings'?: BlueprintInfinityInventorySettings;
|
|
19487
19711
|
'request_filters'?: BlueprintLogisticSections;
|
|
@@ -19579,7 +19803,7 @@ interface LuaSurfaceCreateEntityParamsLinkedBelt extends BaseLuaSurfaceCreateEnt
|
|
|
19579
19803
|
* Applies to variant case `linked-container`
|
|
19580
19804
|
*/
|
|
19581
19805
|
interface LuaSurfaceCreateEntityParamsLinkedContainer extends BaseLuaSurfaceCreateEntityParams {
|
|
19582
|
-
'link_id'?:
|
|
19806
|
+
'link_id'?: uint32;
|
|
19583
19807
|
}
|
|
19584
19808
|
/**
|
|
19585
19809
|
*
|
|
@@ -19633,7 +19857,7 @@ interface LuaSurfaceCreateEntityParamsLocomotive extends BaseLuaSurfaceCreateEnt
|
|
|
19633
19857
|
* Applies to variant case `logistic-container`
|
|
19634
19858
|
*/
|
|
19635
19859
|
interface LuaSurfaceCreateEntityParamsLogisticContainer extends BaseLuaSurfaceCreateEntityParams {
|
|
19636
|
-
'bar'?:
|
|
19860
|
+
'bar'?: uint32;
|
|
19637
19861
|
'control_behavior'?: LogisticContainerBlueprintControlBehavior;
|
|
19638
19862
|
'request_filters'?: SlotFilter[];
|
|
19639
19863
|
}
|
|
@@ -19663,7 +19887,7 @@ interface LuaSurfaceCreateEntityParamsPlant extends BaseLuaSurfaceCreateEntityPa
|
|
|
19663
19887
|
/**
|
|
19664
19888
|
* The tick the plant will be fully grown. If not specified, the plants normal growth time is used.
|
|
19665
19889
|
*/
|
|
19666
|
-
'tick_grown'?:
|
|
19890
|
+
'tick_grown'?: uint32;
|
|
19667
19891
|
}
|
|
19668
19892
|
/**
|
|
19669
19893
|
*
|
|
@@ -19747,7 +19971,7 @@ interface LuaSurfaceCreateEntityParamsReactor extends BaseLuaSurfaceCreateEntity
|
|
|
19747
19971
|
* Applies to variant case `resource`
|
|
19748
19972
|
*/
|
|
19749
19973
|
interface LuaSurfaceCreateEntityParamsResource extends BaseLuaSurfaceCreateEntityParams {
|
|
19750
|
-
'amount'?:
|
|
19974
|
+
'amount'?: uint32;
|
|
19751
19975
|
/**
|
|
19752
19976
|
* If colliding cliffs are removed. Default is true.
|
|
19753
19977
|
*/
|
|
@@ -19794,7 +20018,7 @@ interface LuaSurfaceCreateEntityParamsSelectorCombinator extends BaseLuaSurfaceC
|
|
|
19794
20018
|
*/
|
|
19795
20019
|
interface LuaSurfaceCreateEntityParamsSimpleEntityWithForce extends BaseLuaSurfaceCreateEntityParams {
|
|
19796
20020
|
'color'?: Color;
|
|
19797
|
-
'render_player_index'?:
|
|
20021
|
+
'render_player_index'?: uint32;
|
|
19798
20022
|
'variation'?: uint8;
|
|
19799
20023
|
}
|
|
19800
20024
|
/**
|
|
@@ -19803,7 +20027,7 @@ interface LuaSurfaceCreateEntityParamsSimpleEntityWithForce extends BaseLuaSurfa
|
|
|
19803
20027
|
*/
|
|
19804
20028
|
interface LuaSurfaceCreateEntityParamsSimpleEntityWithOwner extends BaseLuaSurfaceCreateEntityParams {
|
|
19805
20029
|
'color'?: Color;
|
|
19806
|
-
'render_player_index'?:
|
|
20030
|
+
'render_player_index'?: uint32;
|
|
19807
20031
|
'variation'?: uint8;
|
|
19808
20032
|
}
|
|
19809
20033
|
/**
|
|
@@ -19821,7 +20045,7 @@ interface LuaSurfaceCreateEntityParamsSpacePlatformHub extends BaseLuaSurfaceCre
|
|
|
19821
20045
|
* Applies to variant case `speech-bubble`
|
|
19822
20046
|
*/
|
|
19823
20047
|
interface LuaSurfaceCreateEntityParamsSpeechBubble extends BaseLuaSurfaceCreateEntityParams {
|
|
19824
|
-
'lifetime'?:
|
|
20048
|
+
'lifetime'?: uint32;
|
|
19825
20049
|
'text': LocalisedString;
|
|
19826
20050
|
}
|
|
19827
20051
|
/**
|
|
@@ -19845,6 +20069,7 @@ interface LuaSurfaceCreateEntityParamsSpiderVehicle extends BaseLuaSurfaceCreate
|
|
|
19845
20069
|
* Applies to variant case `splitter`
|
|
19846
20070
|
*/
|
|
19847
20071
|
interface LuaSurfaceCreateEntityParamsSplitter extends BaseLuaSurfaceCreateEntityParams {
|
|
20072
|
+
'control_behavior'?: SplitterBlueprintControlBehavior;
|
|
19848
20073
|
'filter'?: ItemFilter;
|
|
19849
20074
|
'input_priority'?: SplitterPriority;
|
|
19850
20075
|
'output_priority'?: SplitterPriority;
|
|
@@ -19887,7 +20112,7 @@ interface LuaSurfaceCreateEntityParamsTileGhost extends BaseLuaSurfaceCreateEnti
|
|
|
19887
20112
|
interface LuaSurfaceCreateEntityParamsTrainStop extends BaseLuaSurfaceCreateEntityParams {
|
|
19888
20113
|
'color'?: Color;
|
|
19889
20114
|
'control_behavior'?: TrainStopBlueprintControlBehavior;
|
|
19890
|
-
'manual_trains_limit'?:
|
|
20115
|
+
'manual_trains_limit'?: uint32;
|
|
19891
20116
|
'priority'?: uint8;
|
|
19892
20117
|
'station'?: string;
|
|
19893
20118
|
}
|
|
@@ -20038,7 +20263,7 @@ interface LuaTechnology {
|
|
|
20038
20263
|
/**
|
|
20039
20264
|
* The current level of this technology. For level-based technology writing to this is the same as researching the technology to the previous level. Writing the level will set {@link LuaTechnology::enabled | runtime:LuaTechnology::enabled} to `true`.
|
|
20040
20265
|
*/
|
|
20041
|
-
level:
|
|
20266
|
+
level: uint32;
|
|
20042
20267
|
readonly localised_description: LocalisedString;
|
|
20043
20268
|
/**
|
|
20044
20269
|
* Localised name of this technology.
|
|
@@ -20069,7 +20294,7 @@ interface LuaTechnology {
|
|
|
20069
20294
|
*
|
|
20070
20295
|
* This is multiplied by the current research cost multiplier, unless {@link LuaTechnologyPrototype::ignore_tech_cost_multiplier | runtime:LuaTechnologyPrototype::ignore_tech_cost_multiplier} is `true`.
|
|
20071
20296
|
*/
|
|
20072
|
-
readonly research_unit_count:
|
|
20297
|
+
readonly research_unit_count: uint32;
|
|
20073
20298
|
/**
|
|
20074
20299
|
* The count formula, if this research has any. See {@link TechnologyUnit::count_formula | prototype:TechnologyUnit::count_formula} for details.
|
|
20075
20300
|
*/
|
|
@@ -20137,11 +20362,11 @@ interface LuaTechnologyPrototype extends LuaPrototypeBase {
|
|
|
20137
20362
|
/**
|
|
20138
20363
|
* The level of this research.
|
|
20139
20364
|
*/
|
|
20140
|
-
readonly level:
|
|
20365
|
+
readonly level: uint32;
|
|
20141
20366
|
/**
|
|
20142
20367
|
* The max level of this research.
|
|
20143
20368
|
*/
|
|
20144
|
-
readonly max_level:
|
|
20369
|
+
readonly max_level: uint32;
|
|
20145
20370
|
/**
|
|
20146
20371
|
* 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.
|
|
20147
20372
|
*/
|
|
@@ -20159,7 +20384,7 @@ interface LuaTechnologyPrototype extends LuaPrototypeBase {
|
|
|
20159
20384
|
*
|
|
20160
20385
|
* This is multiplied by the current research cost multiplier, unless {@link LuaTechnologyPrototype::ignore_tech_cost_multiplier | runtime:LuaTechnologyPrototype::ignore_tech_cost_multiplier} is `true`.
|
|
20161
20386
|
*/
|
|
20162
|
-
readonly research_unit_count:
|
|
20387
|
+
readonly research_unit_count: uint32;
|
|
20163
20388
|
/**
|
|
20164
20389
|
* The count formula, if this research has any. See {@link TechnologyUnit::count_formula | prototype:TechnologyUnit::count_formula} for details.
|
|
20165
20390
|
*/
|
|
@@ -20386,7 +20611,7 @@ interface LuaTilePrototype extends LuaPrototypeBase {
|
|
|
20386
20611
|
* Items that when placed will produce this tile, if any. Construction bots will choose the first item in the list to build this tile.
|
|
20387
20612
|
*/
|
|
20388
20613
|
readonly items_to_place_this?: ItemToPlace[];
|
|
20389
|
-
readonly layer:
|
|
20614
|
+
readonly layer: uint32;
|
|
20390
20615
|
readonly map_color: Color;
|
|
20391
20616
|
readonly max_health: float;
|
|
20392
20617
|
readonly mineable_properties: {
|
|
@@ -20461,7 +20686,7 @@ interface LuaTrain {
|
|
|
20461
20686
|
* Get the amount of a particular item stored in the train.
|
|
20462
20687
|
* @param item If not given, counts all items.
|
|
20463
20688
|
*/
|
|
20464
|
-
get_item_count(this: void, item?: ItemFilter):
|
|
20689
|
+
get_item_count(this: void, item?: ItemFilter): uint32;
|
|
20465
20690
|
/**
|
|
20466
20691
|
* Gets a LuaRailEnd object pointing away from the train at specified end of the train
|
|
20467
20692
|
*/
|
|
@@ -20474,7 +20699,7 @@ interface LuaTrain {
|
|
|
20474
20699
|
/**
|
|
20475
20700
|
* Go to the station specified by the index in the train's schedule.
|
|
20476
20701
|
*/
|
|
20477
|
-
go_to_station(this: void, index:
|
|
20702
|
+
go_to_station(this: void, index: uint32): void;
|
|
20478
20703
|
/**
|
|
20479
20704
|
* Insert a stack into the train.
|
|
20480
20705
|
*/
|
|
@@ -20500,7 +20725,7 @@ interface LuaTrain {
|
|
|
20500
20725
|
* @param stack The amount and type of items to remove
|
|
20501
20726
|
* @returns Number of items actually removed.
|
|
20502
20727
|
*/
|
|
20503
|
-
remove_item(this: void, stack: ItemStackIdentification):
|
|
20728
|
+
remove_item(this: void, stack: ItemStackIdentification): uint32;
|
|
20504
20729
|
/**
|
|
20505
20730
|
* Back end of the train: Rail and direction on that rail where the train will go when moving backward
|
|
20506
20731
|
*/
|
|
@@ -20542,17 +20767,17 @@ interface LuaTrain {
|
|
|
20542
20767
|
/**
|
|
20543
20768
|
* The unique train ID.
|
|
20544
20769
|
*/
|
|
20545
|
-
readonly id:
|
|
20770
|
+
readonly id: uint32;
|
|
20546
20771
|
/**
|
|
20547
20772
|
* The total number of kills by this train.
|
|
20548
20773
|
*/
|
|
20549
|
-
readonly kill_count:
|
|
20774
|
+
readonly kill_count: uint32;
|
|
20550
20775
|
/**
|
|
20551
20776
|
* The players killed by this train.
|
|
20552
20777
|
*
|
|
20553
20778
|
* The keys are the player indices, the values are how often this train killed that player.
|
|
20554
20779
|
*/
|
|
20555
|
-
readonly killed_players:
|
|
20780
|
+
readonly killed_players: LuaTable<uint32, uint32>;
|
|
20556
20781
|
/**
|
|
20557
20782
|
* Locomotives of the train.
|
|
20558
20783
|
* @example ```
|
|
@@ -20652,7 +20877,7 @@ interface LuaTrainManager {
|
|
|
20652
20877
|
* @param train_id Train ID to search
|
|
20653
20878
|
* @returns Train if found
|
|
20654
20879
|
*/
|
|
20655
|
-
get_train_by_id(this: void, train_id:
|
|
20880
|
+
get_train_by_id(this: void, train_id: uint32): LuaTrain | null;
|
|
20656
20881
|
/**
|
|
20657
20882
|
* Gets all train stops that pass given filter
|
|
20658
20883
|
* @param filter Filters the train stop must pass in order to be returned here
|
|
@@ -20683,7 +20908,7 @@ interface LuaTrainManager {
|
|
|
20683
20908
|
starts?: RailEndStart[];
|
|
20684
20909
|
search_direction?: 'respect-movement-direction' | 'any-direction-with-locomotives';
|
|
20685
20910
|
in_chain_signal_section?: boolean;
|
|
20686
|
-
steps_limit?:
|
|
20911
|
+
steps_limit?: uint32;
|
|
20687
20912
|
shortest_path?: boolean;
|
|
20688
20913
|
}): TrainPathFinderOneGoalResult | TrainPathAllGoalsResult;
|
|
20689
20914
|
/**
|
|
@@ -20806,7 +21031,7 @@ interface LuaTransportLine {
|
|
|
20806
21031
|
* Count some or all items on this line, similar to how {@link LuaInventory::get_item_count | runtime:LuaInventory::get_item_count} does.
|
|
20807
21032
|
* @param item If not specified, count all items.
|
|
20808
21033
|
*/
|
|
20809
|
-
get_item_count(this: void, item?: ItemFilter):
|
|
21034
|
+
get_item_count(this: void, item?: ItemFilter): uint32;
|
|
20810
21035
|
/**
|
|
20811
21036
|
* Get a map position related to a position on a transport line.
|
|
20812
21037
|
* @param position Linear position along the transport line. Clamped to the transport line range.
|
|
@@ -20837,7 +21062,7 @@ interface LuaTransportLine {
|
|
|
20837
21062
|
* @param items Items to remove.
|
|
20838
21063
|
* @returns Number of items actually removed.
|
|
20839
21064
|
*/
|
|
20840
|
-
remove_item(this: void, items: ItemStackIdentification):
|
|
21065
|
+
remove_item(this: void, items: ItemStackIdentification): uint32;
|
|
20841
21066
|
/**
|
|
20842
21067
|
* The transport lines that this transport line is fed by or an empty table if none.
|
|
20843
21068
|
*/
|
|
@@ -20877,7 +21102,7 @@ interface LuaTransportLine {
|
|
|
20877
21102
|
/**
|
|
20878
21103
|
* Get the number of items on this transport line.
|
|
20879
21104
|
*/
|
|
20880
|
-
length: LuaLengthMethod<
|
|
21105
|
+
length: LuaLengthMethod<uint32>;
|
|
20881
21106
|
}
|
|
20882
21107
|
/**
|
|
20883
21108
|
* Prototype of a trivial smoke.
|
|
@@ -20886,12 +21111,12 @@ interface LuaTrivialSmokePrototype extends LuaPrototypeBase {
|
|
|
20886
21111
|
readonly affected_by_wind: boolean;
|
|
20887
21112
|
readonly color: Color;
|
|
20888
21113
|
readonly cyclic: boolean;
|
|
20889
|
-
readonly duration:
|
|
21114
|
+
readonly duration: uint32;
|
|
20890
21115
|
readonly end_scale: double;
|
|
20891
|
-
readonly fade_away_duration:
|
|
20892
|
-
readonly fade_in_duration:
|
|
21116
|
+
readonly fade_away_duration: uint32;
|
|
21117
|
+
readonly fade_in_duration: uint32;
|
|
20893
21118
|
readonly glow_animation: boolean;
|
|
20894
|
-
readonly glow_fade_away_duration:
|
|
21119
|
+
readonly glow_fade_away_duration: uint32;
|
|
20895
21120
|
readonly movement_slow_down_factor: double;
|
|
20896
21121
|
/**
|
|
20897
21122
|
* 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.
|
|
@@ -20899,7 +21124,7 @@ interface LuaTrivialSmokePrototype extends LuaPrototypeBase {
|
|
|
20899
21124
|
readonly object_name: string;
|
|
20900
21125
|
readonly render_layer: RenderLayer;
|
|
20901
21126
|
readonly show_when_smoke_off: boolean;
|
|
20902
|
-
readonly spread_duration:
|
|
21127
|
+
readonly spread_duration: uint32;
|
|
20903
21128
|
readonly start_scale: double;
|
|
20904
21129
|
/**
|
|
20905
21130
|
* 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.
|
|
@@ -20945,57 +21170,57 @@ interface LuaUndoRedoStack {
|
|
|
20945
21170
|
* Gets an undo item from the redo stack.
|
|
20946
21171
|
* @param index The index of the item to get, ordered from most recent to oldest.
|
|
20947
21172
|
*/
|
|
20948
|
-
get_redo_item(this: void, index:
|
|
21173
|
+
get_redo_item(this: void, index: uint32): UndoRedoAction[];
|
|
20949
21174
|
/**
|
|
20950
21175
|
* The number of undo items in the redo stack.
|
|
20951
21176
|
*/
|
|
20952
|
-
get_redo_item_count(this: void):
|
|
21177
|
+
get_redo_item_count(this: void): uint32;
|
|
20953
21178
|
/**
|
|
20954
21179
|
* Gets the tag with the given name from a specific redo item action, or `nil` if it doesn't exist.
|
|
20955
21180
|
* @param item_index The index of the redo item, ordered from most recent to oldest.
|
|
20956
21181
|
* @param action_index The index of the redo action.
|
|
20957
21182
|
* @param tag_name The name of the tag to get.
|
|
20958
21183
|
*/
|
|
20959
|
-
get_redo_tag(this: void, item_index:
|
|
21184
|
+
get_redo_tag(this: void, item_index: uint32, action_index: uint32, tag_name: string): AnyBasic;
|
|
20960
21185
|
/**
|
|
20961
21186
|
* Gets all tags for the given redo action.
|
|
20962
21187
|
* @param item_index The index of the redo item, ordered from most recent to oldest.
|
|
20963
21188
|
* @param action_index The index of the redo action.
|
|
20964
21189
|
*/
|
|
20965
|
-
get_redo_tags(this: void, item_index:
|
|
21190
|
+
get_redo_tags(this: void, item_index: uint32, action_index: uint32): Tags;
|
|
20966
21191
|
/**
|
|
20967
21192
|
* Gets an undo item from the undo stack.
|
|
20968
21193
|
* @param index The index of the undo item to get, ordered from most recent to oldest.
|
|
20969
21194
|
*/
|
|
20970
|
-
get_undo_item(this: void, index:
|
|
21195
|
+
get_undo_item(this: void, index: uint32): UndoRedoAction[];
|
|
20971
21196
|
/**
|
|
20972
21197
|
* The number undo items in the undo stack.
|
|
20973
21198
|
*/
|
|
20974
|
-
get_undo_item_count(this: void):
|
|
21199
|
+
get_undo_item_count(this: void): uint32;
|
|
20975
21200
|
/**
|
|
20976
21201
|
* Gets the tag with the given name from a specific undo item action, or `nil` if it doesn't exist.
|
|
20977
21202
|
* @param item_index The index of the undo item, ordered from most recent to oldest.
|
|
20978
21203
|
* @param action_index The index of the undo action.
|
|
20979
21204
|
* @param tag_name The name of the tag to get.
|
|
20980
21205
|
*/
|
|
20981
|
-
get_undo_tag(this: void, item_index:
|
|
21206
|
+
get_undo_tag(this: void, item_index: uint32, action_index: uint32, tag_name: string): AnyBasic;
|
|
20982
21207
|
/**
|
|
20983
21208
|
* Gets all tags for the given undo action.
|
|
20984
21209
|
* @param item_index The index of the undo item, ordered from most recent to oldest.
|
|
20985
21210
|
* @param action_index The index of the undo action.
|
|
20986
21211
|
*/
|
|
20987
|
-
get_undo_tags(this: void, item_index:
|
|
21212
|
+
get_undo_tags(this: void, item_index: uint32, action_index: uint32): Tags;
|
|
20988
21213
|
/**
|
|
20989
21214
|
* Removes an undo action from the specified undo item on the redo stack.
|
|
20990
21215
|
* @param item_index The index of the undo item to change, ordered from most recent to oldest.
|
|
20991
21216
|
* @param action_index The index of the undo action to remove.
|
|
20992
21217
|
*/
|
|
20993
|
-
remove_redo_action(this: void, item_index:
|
|
21218
|
+
remove_redo_action(this: void, item_index: uint32, action_index: uint32): void;
|
|
20994
21219
|
/**
|
|
20995
21220
|
* Removes an undo item from the redo stack.
|
|
20996
21221
|
* @param index The index of the undo item to remove, ordered from most recent to oldest.
|
|
20997
21222
|
*/
|
|
20998
|
-
remove_redo_item(this: void, index:
|
|
21223
|
+
remove_redo_item(this: void, index: uint32): void;
|
|
20999
21224
|
/**
|
|
21000
21225
|
* Removes a tag with the given name from the specified redo item.
|
|
21001
21226
|
* @param item_index The index of the redo item, ordered from most recent to oldest.
|
|
@@ -21003,18 +21228,18 @@ interface LuaUndoRedoStack {
|
|
|
21003
21228
|
* @param tag The name of the tag to remove.
|
|
21004
21229
|
* @returns Whether the tag existed and was successfully removed.
|
|
21005
21230
|
*/
|
|
21006
|
-
remove_redo_tag(this: void, item_index:
|
|
21231
|
+
remove_redo_tag(this: void, item_index: uint32, action_index: uint32, tag: string): boolean;
|
|
21007
21232
|
/**
|
|
21008
21233
|
* Removes an undo action from the specified undo item on the undo stack.
|
|
21009
21234
|
* @param item_index The index of the undo item to change, ordered from most recent to oldest.
|
|
21010
21235
|
* @param action_index The index of the undo action to remove.
|
|
21011
21236
|
*/
|
|
21012
|
-
remove_undo_action(this: void, item_index:
|
|
21237
|
+
remove_undo_action(this: void, item_index: uint32, action_index: uint32): void;
|
|
21013
21238
|
/**
|
|
21014
21239
|
* Removes an undo item from the undo stack.
|
|
21015
21240
|
* @param index The index of the undo item to remove, ordered from most recent to oldest.
|
|
21016
21241
|
*/
|
|
21017
|
-
remove_undo_item(this: void, index:
|
|
21242
|
+
remove_undo_item(this: void, index: uint32): void;
|
|
21018
21243
|
/**
|
|
21019
21244
|
* Removes a tag with the given name from the specified undo item.
|
|
21020
21245
|
* @param item_index The index of the undo item, ordered from most recent to oldest.
|
|
@@ -21022,7 +21247,7 @@ interface LuaUndoRedoStack {
|
|
|
21022
21247
|
* @param tag The name of the tag to remove.
|
|
21023
21248
|
* @returns Whether the tag existed and was successfully removed.
|
|
21024
21249
|
*/
|
|
21025
|
-
remove_undo_tag(this: void, item_index:
|
|
21250
|
+
remove_undo_tag(this: void, item_index: uint32, action_index: uint32, tag: string): boolean;
|
|
21026
21251
|
/**
|
|
21027
21252
|
* Sets a new tag with the given name and value on the specified redo item action.
|
|
21028
21253
|
* @param item_index The index of the redo item, ordered from most recent to oldest.
|
|
@@ -21030,7 +21255,7 @@ interface LuaUndoRedoStack {
|
|
|
21030
21255
|
* @param tag_name The name of the tag to set.
|
|
21031
21256
|
* @param tag The contents of the new tag.
|
|
21032
21257
|
*/
|
|
21033
|
-
set_redo_tag(this: void, item_index:
|
|
21258
|
+
set_redo_tag(this: void, item_index: uint32, action_index: uint32, tag_name: string, tag: AnyBasic): void;
|
|
21034
21259
|
/**
|
|
21035
21260
|
* Sets a new tag with the given name and value on the specified undo item action.
|
|
21036
21261
|
* @param item_index The index of the undo item, ordered from most recent to oldest.
|
|
@@ -21038,7 +21263,7 @@ interface LuaUndoRedoStack {
|
|
|
21038
21263
|
* @param tag_name The name of the tag to set.
|
|
21039
21264
|
* @param tag The contents of the new tag.
|
|
21040
21265
|
*/
|
|
21041
|
-
set_undo_tag(this: void, item_index:
|
|
21266
|
+
set_undo_tag(this: void, item_index: uint32, action_index: uint32, tag_name: string, tag: AnyBasic): void;
|
|
21042
21267
|
/**
|
|
21043
21268
|
* 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.
|
|
21044
21269
|
*/
|
|
@@ -21046,7 +21271,7 @@ interface LuaUndoRedoStack {
|
|
|
21046
21271
|
/**
|
|
21047
21272
|
* The index of the player to whom this stack belongs to.
|
|
21048
21273
|
*/
|
|
21049
|
-
readonly player_index:
|
|
21274
|
+
readonly player_index: uint32;
|
|
21050
21275
|
/**
|
|
21051
21276
|
* 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.
|
|
21052
21277
|
*/
|
|
@@ -21156,9 +21381,9 @@ interface LuaWireConnector {
|
|
|
21156
21381
|
/**
|
|
21157
21382
|
* Amount of wires going out of this connector. It includes all wires (ghost wires and real wires).
|
|
21158
21383
|
*/
|
|
21159
|
-
readonly connection_count:
|
|
21384
|
+
readonly connection_count: uint32;
|
|
21160
21385
|
/**
|
|
21161
|
-
* All wire connectors this connector is connected to.
|
|
21386
|
+
* All wire connectors this connector is connected to. It includes all wires (ghost wires and real wires).
|
|
21162
21387
|
*/
|
|
21163
21388
|
readonly connections: WireConnection[];
|
|
21164
21389
|
/**
|
|
@@ -21168,7 +21393,7 @@ interface LuaWireConnector {
|
|
|
21168
21393
|
/**
|
|
21169
21394
|
* Index of a CircuitNetwork or ElectricSubNetwork which is going through this wire connector. Returns 0 if there is no network associated with this wire connector right now. CircuitNetwork indexes are independent of indexes of ElectricSubNetwork so they may collide with each other.
|
|
21170
21395
|
*/
|
|
21171
|
-
readonly network_id:
|
|
21396
|
+
readonly network_id: uint32;
|
|
21172
21397
|
/**
|
|
21173
21398
|
* 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.
|
|
21174
21399
|
*/
|
|
@@ -21180,9 +21405,9 @@ interface LuaWireConnector {
|
|
|
21180
21405
|
/**
|
|
21181
21406
|
* Amount of real wires going out of this connector. It only includes wires for which both wire connectors are real (not ghosts).
|
|
21182
21407
|
*/
|
|
21183
|
-
readonly real_connection_count:
|
|
21408
|
+
readonly real_connection_count: uint32;
|
|
21184
21409
|
/**
|
|
21185
|
-
* All wire connectors this connector is connected to with real wires.
|
|
21410
|
+
* All wire connectors this connector is connected to with real wires. It only includes wires that are between two non-ghost entities.
|
|
21186
21411
|
*/
|
|
21187
21412
|
readonly real_connections: WireConnection[];
|
|
21188
21413
|
/**
|