factorio-types 1.2.49 → 1.2.50
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 +763 -588
- package/dist/concepts.d.ts +272 -197
- package/dist/datacollection.d.ts +1 -1
- package/dist/defines.d.ts +214 -206
- package/dist/events.d.ts +431 -398
- package/dist/global.d.ts +2 -2
- package/dist/prototypes.d.ts +111 -15
- package/dist/types.d.ts +89 -21
- 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.67
|
|
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;
|
|
@@ -4341,7 +4359,7 @@ interface LuaBootstrap {
|
|
|
4341
4359
|
* @param tick The nth-tick(s) to invoke the handler on. Passing `nil` as the only parameter will unregister all nth-tick handlers.
|
|
4342
4360
|
* @param handler The handler to run. Passing `nil` will unregister it for the provided nth-tick(s).
|
|
4343
4361
|
*/
|
|
4344
|
-
on_nth_tick(this: void, tick:
|
|
4362
|
+
on_nth_tick(this: void, tick: uint32 | uint32[] | nil, handler: ((this: void, arg0: NthTickEventData) => any) | nil): void;
|
|
4345
4363
|
/**
|
|
4346
4364
|
* @param table.entity The entity that was built.
|
|
4347
4365
|
*/
|
|
@@ -4353,7 +4371,7 @@ interface LuaBootstrap {
|
|
|
4353
4371
|
* @param table.message The chat message to send.
|
|
4354
4372
|
*/
|
|
4355
4373
|
raise_console_chat(this: void, table: {
|
|
4356
|
-
player_index:
|
|
4374
|
+
player_index: uint32;
|
|
4357
4375
|
message: string;
|
|
4358
4376
|
}): void;
|
|
4359
4377
|
/**
|
|
@@ -4386,10 +4404,10 @@ interface LuaBootstrap {
|
|
|
4386
4404
|
* @param table.count The amount of offers purchased.
|
|
4387
4405
|
*/
|
|
4388
4406
|
raise_market_item_purchased(this: void, table: {
|
|
4389
|
-
player_index:
|
|
4407
|
+
player_index: uint32;
|
|
4390
4408
|
market: LuaEntity;
|
|
4391
|
-
offer_index:
|
|
4392
|
-
count:
|
|
4409
|
+
offer_index: uint32;
|
|
4410
|
+
count: uint32;
|
|
4393
4411
|
}): void;
|
|
4394
4412
|
/**
|
|
4395
4413
|
* @param table.item_stack The item that has been crafted.
|
|
@@ -4398,7 +4416,7 @@ interface LuaBootstrap {
|
|
|
4398
4416
|
*/
|
|
4399
4417
|
raise_player_crafted_item(this: void, table: {
|
|
4400
4418
|
item_stack: LuaItemStack;
|
|
4401
|
-
player_index:
|
|
4419
|
+
player_index: uint32;
|
|
4402
4420
|
recipe: RecipeID;
|
|
4403
4421
|
}): void;
|
|
4404
4422
|
/**
|
|
@@ -4408,7 +4426,7 @@ interface LuaBootstrap {
|
|
|
4408
4426
|
* @param table.is_split Whether the transfer was a split action (half stack).
|
|
4409
4427
|
*/
|
|
4410
4428
|
raise_player_fast_transferred(this: void, table: {
|
|
4411
|
-
player_index:
|
|
4429
|
+
player_index: uint32;
|
|
4412
4430
|
entity: LuaEntity;
|
|
4413
4431
|
from_player: boolean;
|
|
4414
4432
|
is_split: boolean;
|
|
@@ -4444,7 +4462,7 @@ interface LuaBootstrap {
|
|
|
4444
4462
|
* @param table.tiles The tiles that have been changed.
|
|
4445
4463
|
*/
|
|
4446
4464
|
raise_script_set_tiles(this: void, table: {
|
|
4447
|
-
surface_index:
|
|
4465
|
+
surface_index: uint32;
|
|
4448
4466
|
tiles: Tile[];
|
|
4449
4467
|
}): void;
|
|
4450
4468
|
/**
|
|
@@ -4644,7 +4662,7 @@ interface LuaBurner {
|
|
|
4644
4662
|
* Prototype of a burner energy source.
|
|
4645
4663
|
*/
|
|
4646
4664
|
interface LuaBurnerPrototype {
|
|
4647
|
-
readonly burnt_inventory_size:
|
|
4665
|
+
readonly burnt_inventory_size: uint32;
|
|
4648
4666
|
readonly effectivity: double;
|
|
4649
4667
|
/**
|
|
4650
4668
|
* 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 +4672,7 @@ interface LuaBurnerPrototype {
|
|
|
4654
4672
|
* The value in the dictionary is meaningless and exists just to allow for easy lookup.
|
|
4655
4673
|
*/
|
|
4656
4674
|
readonly fuel_categories: Record<string, true>;
|
|
4657
|
-
readonly fuel_inventory_size:
|
|
4675
|
+
readonly fuel_inventory_size: uint32;
|
|
4658
4676
|
readonly initial_fuel?: LuaItemPrototype;
|
|
4659
4677
|
readonly initial_fuel_percent: double;
|
|
4660
4678
|
/**
|
|
@@ -4770,11 +4788,11 @@ interface LuaCircuitNetwork {
|
|
|
4770
4788
|
* @param signal The signal to read.
|
|
4771
4789
|
* @returns The current value of the signal.
|
|
4772
4790
|
*/
|
|
4773
|
-
get_signal(this: void, signal: SignalID):
|
|
4791
|
+
get_signal(this: void, signal: SignalID): int32;
|
|
4774
4792
|
/**
|
|
4775
4793
|
* The number of circuits connected to this network.
|
|
4776
4794
|
*/
|
|
4777
|
-
readonly connected_circuit_count:
|
|
4795
|
+
readonly connected_circuit_count: uint32;
|
|
4778
4796
|
/**
|
|
4779
4797
|
* The entity this circuit network reference is associated with.
|
|
4780
4798
|
*/
|
|
@@ -4782,7 +4800,7 @@ interface LuaCircuitNetwork {
|
|
|
4782
4800
|
/**
|
|
4783
4801
|
* The circuit networks ID.
|
|
4784
4802
|
*/
|
|
4785
|
-
readonly network_id:
|
|
4803
|
+
readonly network_id: uint32;
|
|
4786
4804
|
/**
|
|
4787
4805
|
* 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
4806
|
*/
|
|
@@ -4822,7 +4840,7 @@ interface LuaCombinatorControlBehavior extends LuaControlBehavior {
|
|
|
4822
4840
|
* Gets the value of a specific signal sent by this combinator behavior last tick or `nil` if the signal didn't exist.
|
|
4823
4841
|
* @param signal The signal to get
|
|
4824
4842
|
*/
|
|
4825
|
-
get_signal_last_tick(this: void, signal: SignalID):
|
|
4843
|
+
get_signal_last_tick(this: void, signal: SignalID): int32 | null;
|
|
4826
4844
|
/**
|
|
4827
4845
|
* The circuit network signals sent by this combinator last tick.
|
|
4828
4846
|
*/
|
|
@@ -4981,7 +4999,7 @@ interface LuaCommandable {
|
|
|
4981
4999
|
/**
|
|
4982
5000
|
* Unique identifier of this commandable.
|
|
4983
5001
|
*/
|
|
4984
|
-
readonly unique_id:
|
|
5002
|
+
readonly unique_id: uint32;
|
|
4985
5003
|
/**
|
|
4986
5004
|
* 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
5005
|
*/
|
|
@@ -5001,13 +5019,13 @@ interface LuaConstantCombinatorControlBehavior extends LuaControlBehavior {
|
|
|
5001
5019
|
* Gets section on the selected index, if it exists.
|
|
5002
5020
|
* @param section_index Index of the section.
|
|
5003
5021
|
*/
|
|
5004
|
-
get_section(this: void, section_index:
|
|
5022
|
+
get_section(this: void, section_index: uint32): LuaLogisticSection | null;
|
|
5005
5023
|
/**
|
|
5006
5024
|
* 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
5025
|
* @param section_index Index of the section.
|
|
5008
5026
|
* @returns Whether section was removed.
|
|
5009
5027
|
*/
|
|
5010
|
-
remove_section(this: void, section_index:
|
|
5028
|
+
remove_section(this: void, section_index: uint32): boolean;
|
|
5011
5029
|
/**
|
|
5012
5030
|
* Turns this constant combinator on and off.
|
|
5013
5031
|
*/
|
|
@@ -5023,7 +5041,7 @@ interface LuaConstantCombinatorControlBehavior extends LuaControlBehavior {
|
|
|
5023
5041
|
/**
|
|
5024
5042
|
* Amount of logistic sections this constant combinator has.
|
|
5025
5043
|
*/
|
|
5026
|
-
readonly sections_count:
|
|
5044
|
+
readonly sections_count: uint32;
|
|
5027
5045
|
/**
|
|
5028
5046
|
* 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
5047
|
*/
|
|
@@ -5058,10 +5076,10 @@ interface LuaControl {
|
|
|
5058
5076
|
* @returns The count that was actually started crafting.
|
|
5059
5077
|
*/
|
|
5060
5078
|
begin_crafting(this: void, table: {
|
|
5061
|
-
count:
|
|
5079
|
+
count: uint32;
|
|
5062
5080
|
recipe: RecipeID;
|
|
5063
5081
|
silent?: boolean;
|
|
5064
|
-
}):
|
|
5082
|
+
}): uint32;
|
|
5065
5083
|
/**
|
|
5066
5084
|
* Can at least some items be inserted?
|
|
5067
5085
|
* @param items Items that would be inserted.
|
|
@@ -5089,8 +5107,8 @@ interface LuaControl {
|
|
|
5089
5107
|
* @param table.count The count to cancel crafting.
|
|
5090
5108
|
*/
|
|
5091
5109
|
cancel_crafting(this: void, table: {
|
|
5092
|
-
index:
|
|
5093
|
-
count:
|
|
5110
|
+
index: uint32;
|
|
5111
|
+
count: uint32;
|
|
5094
5112
|
}): void;
|
|
5095
5113
|
/**
|
|
5096
5114
|
* Removes the arrow created by `set_gui_arrow`.
|
|
@@ -5125,7 +5143,7 @@ interface LuaControl {
|
|
|
5125
5143
|
* @param recipe The recipe.
|
|
5126
5144
|
* @returns The count that can be crafted.
|
|
5127
5145
|
*/
|
|
5128
|
-
get_craftable_count(this: void, recipe: RecipeID):
|
|
5146
|
+
get_craftable_count(this: void, recipe: RecipeID): uint32;
|
|
5129
5147
|
/**
|
|
5130
5148
|
* 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
5149
|
*
|
|
@@ -5141,7 +5159,7 @@ interface LuaControl {
|
|
|
5141
5159
|
* Get the number of all or some items in this entity.
|
|
5142
5160
|
* @param item The item to count. If not specified, count all items.
|
|
5143
5161
|
*/
|
|
5144
|
-
get_item_count(this: void, item?: ItemFilter):
|
|
5162
|
+
get_item_count(this: void, item?: ItemFilter): uint32;
|
|
5145
5163
|
/**
|
|
5146
5164
|
* Gets the main inventory for this character or player if this is a character or player.
|
|
5147
5165
|
* @returns The inventory or `nil` if this entity is not a character or player.
|
|
@@ -5167,7 +5185,7 @@ interface LuaControl {
|
|
|
5167
5185
|
* @param items The items to insert.
|
|
5168
5186
|
* @returns The number of items that were actually inserted.
|
|
5169
5187
|
*/
|
|
5170
|
-
insert(this: void, items: ItemStackIdentification):
|
|
5188
|
+
insert(this: void, items: ItemStackIdentification): uint32;
|
|
5171
5189
|
/**
|
|
5172
5190
|
* 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
5191
|
*
|
|
@@ -5213,7 +5231,7 @@ interface LuaControl {
|
|
|
5213
5231
|
* @param items The items to remove.
|
|
5214
5232
|
* @returns The number of items that were actually removed.
|
|
5215
5233
|
*/
|
|
5216
|
-
remove_item(this: void, items: ItemStackIdentification):
|
|
5234
|
+
remove_item(this: void, items: ItemStackIdentification): uint32;
|
|
5217
5235
|
/**
|
|
5218
5236
|
* Sets if this character or player is driving. Returns if the player or character is still driving.
|
|
5219
5237
|
* @param driving True for enter-vehicle, false for leave.
|
|
@@ -5248,7 +5266,7 @@ interface LuaControl {
|
|
|
5248
5266
|
/**
|
|
5249
5267
|
* The build distance of this character or max uint when not a character or player connected to a character.
|
|
5250
5268
|
*/
|
|
5251
|
-
readonly build_distance:
|
|
5269
|
+
readonly build_distance: uint32;
|
|
5252
5270
|
/**
|
|
5253
5271
|
* The cargo pod the player is currently sitting in or the cargo pod attached to this rocket silo.
|
|
5254
5272
|
*/
|
|
@@ -5260,7 +5278,7 @@ interface LuaControl {
|
|
|
5260
5278
|
/**
|
|
5261
5279
|
* When called on a {@link LuaPlayer | runtime:LuaPlayer}, it must be associated with a character (see {@link LuaPlayer::character | runtime:LuaPlayer::character}).
|
|
5262
5280
|
*/
|
|
5263
|
-
character_build_distance_bonus:
|
|
5281
|
+
character_build_distance_bonus: uint32;
|
|
5264
5282
|
/**
|
|
5265
5283
|
* When called on a {@link LuaPlayer | runtime:LuaPlayer}, it must be associated with a character (see {@link LuaPlayer::character | runtime:LuaPlayer::character}).
|
|
5266
5284
|
*/
|
|
@@ -5272,23 +5290,23 @@ interface LuaControl {
|
|
|
5272
5290
|
/**
|
|
5273
5291
|
* When called on a {@link LuaPlayer | runtime:LuaPlayer}, it must be associated with a character (see {@link LuaPlayer::character | runtime:LuaPlayer::character}).
|
|
5274
5292
|
*/
|
|
5275
|
-
character_inventory_slots_bonus:
|
|
5293
|
+
character_inventory_slots_bonus: uint32;
|
|
5276
5294
|
/**
|
|
5277
5295
|
* When called on a {@link LuaPlayer | runtime:LuaPlayer}, it must be associated with a character (see {@link LuaPlayer::character | runtime:LuaPlayer::character}).
|
|
5278
5296
|
*/
|
|
5279
|
-
character_item_drop_distance_bonus:
|
|
5297
|
+
character_item_drop_distance_bonus: uint32;
|
|
5280
5298
|
/**
|
|
5281
5299
|
* When called on a {@link LuaPlayer | runtime:LuaPlayer}, it must be associated with a character (see {@link LuaPlayer::character | runtime:LuaPlayer::character}).
|
|
5282
5300
|
*/
|
|
5283
|
-
character_item_pickup_distance_bonus:
|
|
5301
|
+
character_item_pickup_distance_bonus: uint32;
|
|
5284
5302
|
/**
|
|
5285
5303
|
* When called on a {@link LuaPlayer | runtime:LuaPlayer}, it must be associated with a character (see {@link LuaPlayer::character | runtime:LuaPlayer::character}).
|
|
5286
5304
|
*/
|
|
5287
|
-
character_loot_pickup_distance_bonus:
|
|
5305
|
+
character_loot_pickup_distance_bonus: uint32;
|
|
5288
5306
|
/**
|
|
5289
5307
|
* When called on a {@link LuaPlayer | runtime:LuaPlayer}, it must be associated with a character (see {@link LuaPlayer::character | runtime:LuaPlayer::character}).
|
|
5290
5308
|
*/
|
|
5291
|
-
character_maximum_following_robot_count_bonus:
|
|
5309
|
+
character_maximum_following_robot_count_bonus: uint32;
|
|
5292
5310
|
/**
|
|
5293
5311
|
* The current mining progress between 0 and 1 of this character, or 0 if they aren't mining.
|
|
5294
5312
|
*/
|
|
@@ -5300,11 +5318,11 @@ interface LuaControl {
|
|
|
5300
5318
|
/**
|
|
5301
5319
|
* When called on a {@link LuaPlayer | runtime:LuaPlayer}, it must be associated with a character (see {@link LuaPlayer::character | runtime:LuaPlayer::character}).
|
|
5302
5320
|
*/
|
|
5303
|
-
character_reach_distance_bonus:
|
|
5321
|
+
character_reach_distance_bonus: uint32;
|
|
5304
5322
|
/**
|
|
5305
5323
|
* When called on a {@link LuaPlayer | runtime:LuaPlayer}, it must be associated with a character (see {@link LuaPlayer::character | runtime:LuaPlayer::character}).
|
|
5306
5324
|
*/
|
|
5307
|
-
character_resource_reach_distance_bonus:
|
|
5325
|
+
character_resource_reach_distance_bonus: uint32;
|
|
5308
5326
|
/**
|
|
5309
5327
|
* The current movement speed of this character, including effects from exoskeletons, tiles, stickers and shooting.
|
|
5310
5328
|
*/
|
|
@@ -5318,7 +5336,7 @@ interface LuaControl {
|
|
|
5318
5336
|
/**
|
|
5319
5337
|
* When called on a {@link LuaPlayer | runtime:LuaPlayer}, it must be associated with a character (see {@link LuaPlayer::character | runtime:LuaPlayer::character}).
|
|
5320
5338
|
*/
|
|
5321
|
-
character_trash_slot_count_bonus:
|
|
5339
|
+
character_trash_slot_count_bonus: uint32;
|
|
5322
5340
|
/**
|
|
5323
5341
|
* When `true` hand crafting is free and instant.
|
|
5324
5342
|
*/
|
|
@@ -5334,7 +5352,7 @@ interface LuaControl {
|
|
|
5334
5352
|
/**
|
|
5335
5353
|
* Size of the crafting queue.
|
|
5336
5354
|
*/
|
|
5337
|
-
readonly crafting_queue_size:
|
|
5355
|
+
readonly crafting_queue_size: uint32;
|
|
5338
5356
|
/**
|
|
5339
5357
|
* The ghost prototype in the player's cursor.
|
|
5340
5358
|
*
|
|
@@ -5368,7 +5386,7 @@ interface LuaControl {
|
|
|
5368
5386
|
/**
|
|
5369
5387
|
* The item drop distance of this character or max uint when not a character or player connected to a character.
|
|
5370
5388
|
*/
|
|
5371
|
-
readonly drop_item_distance:
|
|
5389
|
+
readonly drop_item_distance: uint32;
|
|
5372
5390
|
/**
|
|
5373
5391
|
* The current flight height for this player or character entity.
|
|
5374
5392
|
*
|
|
@@ -5393,7 +5411,7 @@ interface LuaControl {
|
|
|
5393
5411
|
/**
|
|
5394
5412
|
* Unique {@link index | runtime:LuaForce::index} (ID) associated with the force of this entity.
|
|
5395
5413
|
*/
|
|
5396
|
-
readonly force_index:
|
|
5414
|
+
readonly force_index: uint32;
|
|
5397
5415
|
/**
|
|
5398
5416
|
* The space platform hub the player is currently sitting in.
|
|
5399
5417
|
*/
|
|
@@ -5451,7 +5469,7 @@ interface LuaControl {
|
|
|
5451
5469
|
/**
|
|
5452
5470
|
* The reach distance of this character or max uint when not a character or player connected to a character.
|
|
5453
5471
|
*/
|
|
5454
|
-
readonly reach_distance:
|
|
5472
|
+
readonly reach_distance: uint32;
|
|
5455
5473
|
/**
|
|
5456
5474
|
* The current render position of the entity.
|
|
5457
5475
|
*/
|
|
@@ -5501,7 +5519,7 @@ interface LuaControl {
|
|
|
5501
5519
|
/**
|
|
5502
5520
|
* Unique {@link index | runtime:LuaSurface::index} (ID) associated with the surface this entity is currently on.
|
|
5503
5521
|
*/
|
|
5504
|
-
readonly surface_index:
|
|
5522
|
+
readonly surface_index: uint32;
|
|
5505
5523
|
/**
|
|
5506
5524
|
* The vehicle the player is currently sitting in.
|
|
5507
5525
|
*/
|
|
@@ -5526,7 +5544,7 @@ interface LuaControl {
|
|
|
5526
5544
|
}
|
|
5527
5545
|
type LuaControlSetGuiArrowParams = BaseLuaControlSetGuiArrowParams | LuaControlSetGuiArrowParamsCraftingQueue | LuaControlSetGuiArrowParamsEntity | LuaControlSetGuiArrowParamsItemStack | LuaControlSetGuiArrowParamsPosition;
|
|
5528
5546
|
interface BaseLuaControlSetGuiArrowParams {
|
|
5529
|
-
'margin':
|
|
5547
|
+
'margin': uint32;
|
|
5530
5548
|
/**
|
|
5531
5549
|
* Where to point to. This field determines what other fields are mandatory.
|
|
5532
5550
|
*/
|
|
@@ -5544,7 +5562,7 @@ interface LuaControlSetGuiArrowParamsCraftingQueue extends BaseLuaControlSetGuiA
|
|
|
5544
5562
|
/**
|
|
5545
5563
|
* Index in the crafting queue to point to.
|
|
5546
5564
|
*/
|
|
5547
|
-
'crafting_queueindex':
|
|
5565
|
+
'crafting_queueindex': uint32;
|
|
5548
5566
|
}
|
|
5549
5567
|
/**
|
|
5550
5568
|
*
|
|
@@ -5573,7 +5591,7 @@ interface LuaControlSetGuiArrowParamsItemStack extends BaseLuaControlSetGuiArrow
|
|
|
5573
5591
|
/**
|
|
5574
5592
|
* Which stack to point to.
|
|
5575
5593
|
*/
|
|
5576
|
-
'item_stack_index':
|
|
5594
|
+
'item_stack_index': uint32;
|
|
5577
5595
|
'source': 'player' | 'target' | 'player-quickbar';
|
|
5578
5596
|
}
|
|
5579
5597
|
/**
|
|
@@ -5622,11 +5640,16 @@ interface LuaCustomChartTag {
|
|
|
5622
5640
|
/**
|
|
5623
5641
|
* This tag's icon, if it has one. Writing `nil` removes it.
|
|
5624
5642
|
*/
|
|
5625
|
-
icon
|
|
5643
|
+
icon?: SignalID;
|
|
5626
5644
|
/**
|
|
5627
5645
|
* The player who last edited this tag.
|
|
5628
5646
|
*/
|
|
5629
|
-
last_user?: LuaPlayer;
|
|
5647
|
+
readonly last_user?: LuaPlayer;
|
|
5648
|
+
/**
|
|
5649
|
+
* The player who last edited this tag.
|
|
5650
|
+
* @customName last_user
|
|
5651
|
+
*/
|
|
5652
|
+
last_user_write?: PlayerIdentification;
|
|
5630
5653
|
/**
|
|
5631
5654
|
* 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
5655
|
*/
|
|
@@ -5634,15 +5657,15 @@ interface LuaCustomChartTag {
|
|
|
5634
5657
|
/**
|
|
5635
5658
|
* The position of this tag.
|
|
5636
5659
|
*/
|
|
5637
|
-
|
|
5660
|
+
position: MapPosition;
|
|
5638
5661
|
/**
|
|
5639
5662
|
* The surface this tag belongs to.
|
|
5640
5663
|
*/
|
|
5641
|
-
|
|
5664
|
+
surface: LuaSurface;
|
|
5642
5665
|
/**
|
|
5643
5666
|
* The unique ID for this tag on this force.
|
|
5644
5667
|
*/
|
|
5645
|
-
readonly tag_number:
|
|
5668
|
+
readonly tag_number: uint32;
|
|
5646
5669
|
text: string;
|
|
5647
5670
|
/**
|
|
5648
5671
|
* 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 +5801,7 @@ interface LuaCustomTable {
|
|
|
5778
5801
|
/**
|
|
5779
5802
|
* Number of elements in this table.
|
|
5780
5803
|
*/
|
|
5781
|
-
length: LuaLengthMethod<
|
|
5804
|
+
length: LuaLengthMethod<uint32>;
|
|
5782
5805
|
}
|
|
5783
5806
|
/**
|
|
5784
5807
|
* Prototype of a damage.
|
|
@@ -5802,45 +5825,45 @@ interface LuaDeciderCombinatorControlBehavior extends LuaCombinatorControlBehavi
|
|
|
5802
5825
|
* @param condition New condition to insert.
|
|
5803
5826
|
* @param index Index to insert new condition at. If not specified, appends to the end.
|
|
5804
5827
|
*/
|
|
5805
|
-
add_condition(this: void, condition: DeciderCombinatorCondition, index?:
|
|
5828
|
+
add_condition(this: void, condition: DeciderCombinatorCondition, index?: uint32): void;
|
|
5806
5829
|
/**
|
|
5807
5830
|
* Adds a new output.
|
|
5808
5831
|
* @param output New output to insert.
|
|
5809
5832
|
* @param index Index to insert new output at. If not specified, appends to the end.
|
|
5810
5833
|
*/
|
|
5811
|
-
add_output(this: void, output: DeciderCombinatorOutput, index?:
|
|
5834
|
+
add_output(this: void, output: DeciderCombinatorOutput, index?: uint32): void;
|
|
5812
5835
|
/**
|
|
5813
5836
|
* Gets the condition at `index`.
|
|
5814
5837
|
* @param index Index of condition to get.
|
|
5815
5838
|
*/
|
|
5816
|
-
get_condition(this: void, index:
|
|
5839
|
+
get_condition(this: void, index: uint32): DeciderCombinatorCondition;
|
|
5817
5840
|
/**
|
|
5818
5841
|
* Gets the output at `index`.
|
|
5819
5842
|
* @param index Index of output to get.
|
|
5820
5843
|
*/
|
|
5821
|
-
get_output(this: void, index:
|
|
5844
|
+
get_output(this: void, index: uint32): DeciderCombinatorOutput;
|
|
5822
5845
|
/**
|
|
5823
5846
|
* Removes the condition at `index`.
|
|
5824
5847
|
* @param index Index of condition to remove.
|
|
5825
5848
|
*/
|
|
5826
|
-
remove_condition(this: void, index:
|
|
5849
|
+
remove_condition(this: void, index: uint32): void;
|
|
5827
5850
|
/**
|
|
5828
5851
|
* Removes the output at `index`.
|
|
5829
5852
|
* @param index Index of output to remove.
|
|
5830
5853
|
*/
|
|
5831
|
-
remove_output(this: void, index:
|
|
5854
|
+
remove_output(this: void, index: uint32): void;
|
|
5832
5855
|
/**
|
|
5833
5856
|
* Sets the condition at `index`.
|
|
5834
5857
|
* @param index Index of condition to modify.
|
|
5835
5858
|
* @param condition Data to set selected condition to.
|
|
5836
5859
|
*/
|
|
5837
|
-
set_condition(this: void, index:
|
|
5860
|
+
set_condition(this: void, index: uint32, condition: DeciderCombinatorCondition): void;
|
|
5838
5861
|
/**
|
|
5839
5862
|
* Sets the output at `index`.
|
|
5840
5863
|
* @param index Index of output to modify.
|
|
5841
5864
|
* @param output Data to set selected output to.
|
|
5842
5865
|
*/
|
|
5843
|
-
set_output(this: void, index:
|
|
5866
|
+
set_output(this: void, index: uint32, output: DeciderCombinatorOutput): void;
|
|
5844
5867
|
/**
|
|
5845
5868
|
* 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
5869
|
*/
|
|
@@ -5848,7 +5871,7 @@ interface LuaDeciderCombinatorControlBehavior extends LuaCombinatorControlBehavi
|
|
|
5848
5871
|
/**
|
|
5849
5872
|
* This decider combinator's parameters. Writing `nil` clears the combinator's parameters.
|
|
5850
5873
|
*/
|
|
5851
|
-
parameters
|
|
5874
|
+
parameters?: DeciderCombinatorParameters;
|
|
5852
5875
|
/**
|
|
5853
5876
|
* 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
5877
|
*/
|
|
@@ -5879,7 +5902,7 @@ interface LuaDecorativePrototype extends LuaPrototypeBase {
|
|
|
5879
5902
|
readonly object_name: string;
|
|
5880
5903
|
readonly placed_effect?: TriggerEffectItem[];
|
|
5881
5904
|
readonly render_layer: RenderLayer;
|
|
5882
|
-
readonly target_count:
|
|
5905
|
+
readonly target_count: uint32;
|
|
5883
5906
|
readonly trigger_effect?: TriggerEffectItem[];
|
|
5884
5907
|
/**
|
|
5885
5908
|
* 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 +5918,13 @@ interface LuaDisplayPanelControlBehavior extends LuaControlBehavior {
|
|
|
5895
5918
|
* @param index Message index.
|
|
5896
5919
|
* @returns The message definition at the specified index.
|
|
5897
5920
|
*/
|
|
5898
|
-
get_message(this: void, index:
|
|
5921
|
+
get_message(this: void, index: uint32): DisplayPanelMessageDefinition;
|
|
5899
5922
|
/**
|
|
5900
5923
|
* Set the message at the specified index
|
|
5901
5924
|
* @param index Message index. Use `-1` to append new element.
|
|
5902
5925
|
* @param message The message definition for the specified index. Specify `nil` to remove the message.
|
|
5903
5926
|
*/
|
|
5904
|
-
set_message(this: void, index:
|
|
5927
|
+
set_message(this: void, index: uint32, message: DisplayPanelMessageDefinition): void;
|
|
5905
5928
|
/**
|
|
5906
5929
|
* The full list of configured messages.
|
|
5907
5930
|
*/
|
|
@@ -5980,7 +6003,7 @@ interface LuaEntity extends LuaControl {
|
|
|
5980
6003
|
* @param index The item stack index
|
|
5981
6004
|
* @param filter The item filter
|
|
5982
6005
|
*/
|
|
5983
|
-
can_set_inventory_filter(this: void, inventory_index: defines.inventory, index:
|
|
6006
|
+
can_set_inventory_filter(this: void, inventory_index: defines.inventory, index: uint32, filter: ItemFilter): boolean;
|
|
5984
6007
|
/**
|
|
5985
6008
|
* Whether this character can shoot the given entity or position.
|
|
5986
6009
|
*/
|
|
@@ -6082,7 +6105,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6082
6105
|
do_cliff_correction?: boolean;
|
|
6083
6106
|
raise_destroy?: boolean;
|
|
6084
6107
|
player?: PlayerIdentification;
|
|
6085
|
-
undo_index?:
|
|
6108
|
+
undo_index?: uint32;
|
|
6086
6109
|
}): boolean;
|
|
6087
6110
|
/**
|
|
6088
6111
|
* Immediately kills the entity. Does nothing if the entity doesn't have health.
|
|
@@ -6201,17 +6224,17 @@ interface LuaEntity extends LuaControl {
|
|
|
6201
6224
|
* @param slot_index Index of the slot to get the filter for.
|
|
6202
6225
|
* @returns The filter, or `nil` if the given slot has no filter.
|
|
6203
6226
|
*/
|
|
6204
|
-
get_filter(this: void, slot_index:
|
|
6227
|
+
get_filter(this: void, slot_index: uint32): (ItemFilter | EntityID | AsteroidChunkID) | null;
|
|
6205
6228
|
/**
|
|
6206
|
-
* Gets fluid of the
|
|
6229
|
+
* 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
6230
|
* @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.
|
|
6231
|
+
* @returns Fluid in this storage. `nil` if fluid storage is empty.
|
|
6209
6232
|
*/
|
|
6210
|
-
get_fluid(this: void, index:
|
|
6233
|
+
get_fluid(this: void, index: uint32): Fluid | null;
|
|
6211
6234
|
/**
|
|
6212
6235
|
* Get amounts of all fluids in this entity.
|
|
6213
6236
|
*
|
|
6214
|
-
* If information about fluid temperatures is required, {@link LuaEntity::fluidbox | runtime:LuaEntity::fluidbox} should be used instead.
|
|
6237
|
+
* 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
6238
|
* @returns The amounts, indexed by fluid names.
|
|
6216
6239
|
*/
|
|
6217
6240
|
get_fluid_contents(this: void): Record<string, FluidAmount>;
|
|
@@ -6252,7 +6275,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6252
6275
|
* Gets the filter for this infinity container at the given index, or `nil` if the filter index doesn't exist or is empty.
|
|
6253
6276
|
* @param index The index to get.
|
|
6254
6277
|
*/
|
|
6255
|
-
get_infinity_container_filter(this: void, index:
|
|
6278
|
+
get_infinity_container_filter(this: void, index: uint32): InfinityInventoryFilter | null;
|
|
6256
6279
|
/**
|
|
6257
6280
|
* Gets the filter for this infinity pipe, or `nil` if the filter is empty.
|
|
6258
6281
|
*/
|
|
@@ -6260,13 +6283,13 @@ interface LuaEntity extends LuaControl {
|
|
|
6260
6283
|
/**
|
|
6261
6284
|
* 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
6285
|
*/
|
|
6263
|
-
get_inventory_bar(this: void, inventory_index: defines.inventory):
|
|
6286
|
+
get_inventory_bar(this: void, inventory_index: defines.inventory): uint32;
|
|
6264
6287
|
/**
|
|
6265
6288
|
* 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
6289
|
* @param index The item stack index
|
|
6267
6290
|
* @returns The current filter or `nil` if none.
|
|
6268
6291
|
*/
|
|
6269
|
-
get_inventory_filter(this: void, inventory_index: defines.inventory, index:
|
|
6292
|
+
get_inventory_filter(this: void, inventory_index: defines.inventory, index: uint32): ItemFilter | null;
|
|
6270
6293
|
/**
|
|
6271
6294
|
* 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
6295
|
*/
|
|
@@ -6278,7 +6301,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6278
6301
|
* @returns [1] - Position along the transport line where item should be dropped.
|
|
6279
6302
|
*/
|
|
6280
6303
|
get_item_insert_specification(this: void, position: MapPosition): LuaMultiReturn<[
|
|
6281
|
-
|
|
6304
|
+
uint32,
|
|
6282
6305
|
float
|
|
6283
6306
|
]>;
|
|
6284
6307
|
/**
|
|
@@ -6286,7 +6309,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6286
6309
|
* @param index Index of the transport line. Transport lines are 1-indexed.
|
|
6287
6310
|
* @param position Linear position along the transport line. Clamped to the transport line range.
|
|
6288
6311
|
*/
|
|
6289
|
-
get_line_item_position(this: void, index:
|
|
6312
|
+
get_line_item_position(this: void, index: uint32, position: float): MapPosition;
|
|
6290
6313
|
/**
|
|
6291
6314
|
* Gets all the `LuaLogisticPoint`s that this entity owns. Optionally returns only the point specified by the index parameter.
|
|
6292
6315
|
* @param index If provided, this method only returns the `LuaLogisticPoint` specified by this index, or `nil` if it doesn't exist.
|
|
@@ -6303,11 +6326,17 @@ interface LuaEntity extends LuaControl {
|
|
|
6303
6326
|
/**
|
|
6304
6327
|
* Get the maximum transport line index of a belt or belt connectable entity.
|
|
6305
6328
|
*/
|
|
6306
|
-
get_max_transport_line_index(this: void):
|
|
6329
|
+
get_max_transport_line_index(this: void): uint32;
|
|
6307
6330
|
/**
|
|
6308
6331
|
* Inventory for storing modules of this entity; `nil` if this entity has no module inventory.
|
|
6309
6332
|
*/
|
|
6310
6333
|
get_module_inventory(this: void): LuaInventory | null;
|
|
6334
|
+
/**
|
|
6335
|
+
* Gets the combined movement vector (direction and speed) of this combat robot or asteroid. The entity moves by this vector each tick.
|
|
6336
|
+
*
|
|
6337
|
+
* Note that for combat robots this does not include the constant drift in the direction they are facing.
|
|
6338
|
+
*/
|
|
6339
|
+
get_movement(this: void): Vector;
|
|
6311
6340
|
/**
|
|
6312
6341
|
* Gets (and or creates if needed) the control behavior of the entity.
|
|
6313
6342
|
* @returns The control behavior or `nil`.
|
|
@@ -6337,9 +6366,9 @@ interface LuaEntity extends LuaControl {
|
|
|
6337
6366
|
* Get the entity ID at the specified position in the turret's priority list.
|
|
6338
6367
|
* @param index The index of the entry to fetch.
|
|
6339
6368
|
*/
|
|
6340
|
-
get_priority_target(this: void, index:
|
|
6369
|
+
get_priority_target(this: void, index: uint32): LuaEntityPrototype | null;
|
|
6341
6370
|
/**
|
|
6342
|
-
* The radius of this entity.
|
|
6371
|
+
* 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
6372
|
*/
|
|
6344
6373
|
get_radius(this: void): double;
|
|
6345
6374
|
/**
|
|
@@ -6410,7 +6439,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6410
6439
|
* @param extra_wire_connector_id Additional wire connector ID. If specified, signal will be added to the result
|
|
6411
6440
|
* @returns The current value of the signal.
|
|
6412
6441
|
*/
|
|
6413
|
-
get_signal(this: void, signal: SignalID, wire_connector_id: defines.wire_connector_id, extra_wire_connector_id?: defines.wire_connector_id):
|
|
6442
|
+
get_signal(this: void, signal: SignalID, wire_connector_id: defines.wire_connector_id, extra_wire_connector_id?: defines.wire_connector_id): int32;
|
|
6414
6443
|
/**
|
|
6415
6444
|
* Read all signals from the selected wire connector.
|
|
6416
6445
|
* @param wire_connector_id Wire connector ID from which to get the signal
|
|
@@ -6434,7 +6463,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6434
6463
|
* Get a transport line of a belt or belt connectable entity.
|
|
6435
6464
|
* @param index Index of the requested transport line. Transport lines are 1-indexed.
|
|
6436
6465
|
*/
|
|
6437
|
-
get_transport_line(this: void, index:
|
|
6466
|
+
get_transport_line(this: void, index: uint32): LuaTransportLine;
|
|
6438
6467
|
/**
|
|
6439
6468
|
* Returns the new entity prototype and its quality.
|
|
6440
6469
|
* @returns [0] - `nil` if this entity is not marked for upgrade.
|
|
@@ -6566,7 +6595,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6566
6595
|
* @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
6596
|
* @returns if the entity was marked for deconstruction.
|
|
6568
6597
|
*/
|
|
6569
|
-
order_deconstruction(this: void, force: ForceID, player?: PlayerIdentification, undo_index?:
|
|
6598
|
+
order_deconstruction(this: void, force: ForceID, player?: PlayerIdentification, undo_index?: uint32): boolean;
|
|
6570
6599
|
/**
|
|
6571
6600
|
* Sets the entity to be upgraded by construction robots.
|
|
6572
6601
|
* @param table.target The prototype of the entity to upgrade to.
|
|
@@ -6579,13 +6608,13 @@ interface LuaEntity extends LuaControl {
|
|
|
6579
6608
|
target: EntityWithQualityID;
|
|
6580
6609
|
force: ForceID;
|
|
6581
6610
|
player?: PlayerIdentification;
|
|
6582
|
-
undo_index?:
|
|
6611
|
+
undo_index?: uint32;
|
|
6583
6612
|
}): boolean;
|
|
6584
6613
|
/**
|
|
6585
6614
|
* Plays a note with the given instrument and note.
|
|
6586
6615
|
* @returns Whether the request is valid. The sound may or may not be played depending on polyphony settings.
|
|
6587
6616
|
*/
|
|
6588
|
-
play_note(this: void, instrument:
|
|
6617
|
+
play_note(this: void, instrument: uint32, note: uint32, stop_playing_sounds?: boolean): boolean;
|
|
6589
6618
|
/**
|
|
6590
6619
|
* Registers the given tree in this agricultural tower.
|
|
6591
6620
|
*
|
|
@@ -6621,7 +6650,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6621
6650
|
* @param offer Index of offer to remove.
|
|
6622
6651
|
* @returns `true` if the offer was successfully removed; `false` when the given index was not valid.
|
|
6623
6652
|
*/
|
|
6624
|
-
remove_market_item(this: void, offer:
|
|
6653
|
+
remove_market_item(this: void, offer: uint32): boolean;
|
|
6625
6654
|
/**
|
|
6626
6655
|
* @param force The force that requests the gate to be closed.
|
|
6627
6656
|
*/
|
|
@@ -6630,7 +6659,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6630
6659
|
* @param force The force that requests the gate to be open.
|
|
6631
6660
|
* @param extra_time Extra ticks to stay open.
|
|
6632
6661
|
*/
|
|
6633
|
-
request_to_open(this: void, force: ForceID, extra_time?:
|
|
6662
|
+
request_to_open(this: void, force: ForceID, extra_time?: uint32): void;
|
|
6634
6663
|
/**
|
|
6635
6664
|
* Revive a ghost, which turns it from a ghost into a real entity or tile.
|
|
6636
6665
|
* @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 +6672,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6643
6672
|
raise_revive?: boolean;
|
|
6644
6673
|
overflow?: LuaInventory;
|
|
6645
6674
|
}): LuaMultiReturn<[
|
|
6646
|
-
Record<string,
|
|
6675
|
+
Record<string, uint32> | null,
|
|
6647
6676
|
LuaEntity | null,
|
|
6648
6677
|
LuaEntity | null
|
|
6649
6678
|
]>;
|
|
@@ -6676,16 +6705,16 @@ interface LuaEntity extends LuaControl {
|
|
|
6676
6705
|
* @param index Index of the slot to set the filter for.
|
|
6677
6706
|
* @param filter The item or entity to filter, or `nil` to clear the filter.
|
|
6678
6707
|
*/
|
|
6679
|
-
set_filter(this: void, index:
|
|
6708
|
+
set_filter(this: void, index: uint32, filter?: ItemFilter | ItemWithQualityID | EntityID | AsteroidChunkID): void;
|
|
6680
6709
|
/**
|
|
6681
|
-
* Sets fluid to the
|
|
6710
|
+
* 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
6711
|
*
|
|
6683
|
-
* Fluid storages that are part of
|
|
6712
|
+
* 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
6713
|
* @param index Fluid storage index. Valid values are from 1 up to {@link LuaEntity::fluids_count | runtime:LuaEntity::fluids_count}.
|
|
6685
6714
|
* @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.
|
|
6715
|
+
* @returns Fluid in this storage after it was set. `nil` if fluid storage is empty.
|
|
6687
6716
|
*/
|
|
6688
|
-
set_fluid(this: void, index:
|
|
6717
|
+
set_fluid(this: void, index: uint32, fluid?: Fluid): Fluid | null;
|
|
6689
6718
|
/**
|
|
6690
6719
|
* Sets the heat setting for this heat interface.
|
|
6691
6720
|
* @param filter The new setting.
|
|
@@ -6696,7 +6725,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6696
6725
|
* @param index The index to set.
|
|
6697
6726
|
* @param filter The new filter, or `nil` to clear the filter.
|
|
6698
6727
|
*/
|
|
6699
|
-
set_infinity_container_filter(this: void, index:
|
|
6728
|
+
set_infinity_container_filter(this: void, index: uint32, filter: InfinityInventoryFilter | nil): void;
|
|
6700
6729
|
/**
|
|
6701
6730
|
* Sets the filter for this infinity pipe.
|
|
6702
6731
|
* @param filter The new filter, or `nil` to clear the filter.
|
|
@@ -6706,19 +6735,27 @@ interface LuaEntity extends LuaControl {
|
|
|
6706
6735
|
* 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
6736
|
* @param bar The new limit. Omitting this parameter or passing `nil` will clear the limit.
|
|
6708
6737
|
*/
|
|
6709
|
-
set_inventory_bar(this: void, inventory_index: defines.inventory, bar?:
|
|
6738
|
+
set_inventory_bar(this: void, inventory_index: defines.inventory, bar?: uint32): void;
|
|
6710
6739
|
/**
|
|
6711
6740
|
* 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
6741
|
* @param index The item stack index.
|
|
6713
6742
|
* @param filter The new filter. `nil` erases any existing filter.
|
|
6714
6743
|
* @returns If the filter was allowed to be set.
|
|
6715
6744
|
*/
|
|
6716
|
-
set_inventory_filter(this: void, inventory_index: defines.inventory, index:
|
|
6745
|
+
set_inventory_filter(this: void, inventory_index: defines.inventory, index: uint32, filter: ItemFilter | nil): boolean;
|
|
6717
6746
|
/**
|
|
6718
6747
|
* 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
6748
|
* @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
6749
|
*/
|
|
6721
6750
|
set_inventory_size_override(this: void, inventory_index: defines.inventory, size_override: uint16 | nil, overflow?: LuaInventory): void;
|
|
6751
|
+
/**
|
|
6752
|
+
* Sets the movement direction and movement speed for this combat robot or asteroid.
|
|
6753
|
+
*
|
|
6754
|
+
* Note that for combat robots this does not affect the constant drift in the direction they are facing.
|
|
6755
|
+
* @param direction This normalized form of this vector is used for the movement direction.
|
|
6756
|
+
* @param speed Speed in tiles per tick. Cannot be less than 0.
|
|
6757
|
+
*/
|
|
6758
|
+
set_movement(this: void, direction: Vector, speed: double): void;
|
|
6722
6759
|
/**
|
|
6723
6760
|
* Sets the passenger of this car, spidertron, or cargo pod.
|
|
6724
6761
|
*
|
|
@@ -6731,7 +6768,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6731
6768
|
* @param index The index of the entry to set.
|
|
6732
6769
|
* @param entity_id The name of the entity prototype, or `nil` to clear the entry.
|
|
6733
6770
|
*/
|
|
6734
|
-
set_priority_target(this: void, index:
|
|
6771
|
+
set_priority_target(this: void, index: uint32, entity_id?: EntityID): void;
|
|
6735
6772
|
/**
|
|
6736
6773
|
* Sets the given recipe in this assembly machine.
|
|
6737
6774
|
* @param recipe The new recipe. Writing `nil` clears the recipe, if any.
|
|
@@ -6816,7 +6853,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6816
6853
|
/**
|
|
6817
6854
|
* Count of resource units contained.
|
|
6818
6855
|
*/
|
|
6819
|
-
amount:
|
|
6856
|
+
amount: uint32;
|
|
6820
6857
|
/**
|
|
6821
6858
|
* Whether this land mine is armed.
|
|
6822
6859
|
*/
|
|
@@ -6864,7 +6901,7 @@ interface LuaEntity extends LuaControl {
|
|
|
6864
6901
|
/**
|
|
6865
6902
|
* Number of beacons affecting this effect receiver. Can only be used when the entity has an effect receiver (AssemblingMachine, Furnace, Lab, MiningDrills)
|
|
6866
6903
|
*/
|
|
6867
|
-
readonly beacons_count?:
|
|
6904
|
+
readonly beacons_count?: uint32;
|
|
6868
6905
|
/**
|
|
6869
6906
|
* 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
6907
|
*/
|
|
@@ -6938,17 +6975,17 @@ interface LuaEntity extends LuaControl {
|
|
|
6938
6975
|
*
|
|
6939
6976
|
* The index is not guaranteed to be valid so it should always be checked first if a player with that index actually exists.
|
|
6940
6977
|
*/
|
|
6941
|
-
character_corpse_player_index:
|
|
6978
|
+
character_corpse_player_index: uint32;
|
|
6942
6979
|
/**
|
|
6943
6980
|
* The tick this character corpse died at.
|
|
6944
6981
|
*/
|
|
6945
|
-
character_corpse_tick_of_death:
|
|
6982
|
+
character_corpse_tick_of_death: uint32;
|
|
6946
6983
|
/**
|
|
6947
6984
|
* The orientation of this cliff.
|
|
6948
6985
|
*/
|
|
6949
6986
|
readonly cliff_orientation: CliffOrientation;
|
|
6950
6987
|
/**
|
|
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.
|
|
6988
|
+
* 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
6989
|
*
|
|
6953
6990
|
* Car color is overridden by the color of the current driver/passenger, if there is one.
|
|
6954
6991
|
*/
|
|
@@ -7116,7 +7153,7 @@ interface LuaEntity extends LuaControl {
|
|
|
7116
7153
|
/**
|
|
7117
7154
|
* Returns the id of the electric network that this entity is connected to, if any.
|
|
7118
7155
|
*/
|
|
7119
|
-
readonly electric_network_id?:
|
|
7156
|
+
readonly electric_network_id?: uint32;
|
|
7120
7157
|
/**
|
|
7121
7158
|
* The electric network statistics for this electric pole.
|
|
7122
7159
|
*/
|
|
@@ -7144,15 +7181,15 @@ interface LuaEntity extends LuaControl {
|
|
|
7144
7181
|
/**
|
|
7145
7182
|
* 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
7183
|
*/
|
|
7147
|
-
readonly filter_slot_count:
|
|
7184
|
+
readonly filter_slot_count: uint32;
|
|
7148
7185
|
/**
|
|
7149
7186
|
* Fluidboxes of this entity.
|
|
7150
7187
|
*/
|
|
7151
7188
|
readonly fluidbox: LuaFluidBox;
|
|
7152
7189
|
/**
|
|
7153
|
-
* Returns count of fluid storages. This includes fluid storages provided by
|
|
7190
|
+
* 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
7191
|
*/
|
|
7155
|
-
readonly fluids_count:
|
|
7192
|
+
readonly fluids_count: uint32;
|
|
7156
7193
|
/**
|
|
7157
7194
|
* The follow offset of this spidertron, if any entity is being followed. This is randomized each time the follow entity is set.
|
|
7158
7195
|
*/
|
|
@@ -7234,7 +7271,7 @@ interface LuaEntity extends LuaControl {
|
|
|
7234
7271
|
/**
|
|
7235
7272
|
* The blink interval of this highlight box entity. `0` indicates no blink.
|
|
7236
7273
|
*/
|
|
7237
|
-
highlight_box_blink_interval:
|
|
7274
|
+
highlight_box_blink_interval: uint32;
|
|
7238
7275
|
/**
|
|
7239
7276
|
* The highlight box type of this highlight box entity.
|
|
7240
7277
|
*/
|
|
@@ -7252,7 +7289,7 @@ interface LuaEntity extends LuaControl {
|
|
|
7252
7289
|
*
|
|
7253
7290
|
* If this is not an infinite resource, writing will produce an error.
|
|
7254
7291
|
*/
|
|
7255
|
-
initial_amount?:
|
|
7292
|
+
initial_amount?: uint32;
|
|
7256
7293
|
/**
|
|
7257
7294
|
* The insert plan for this ghost or item request proxy.
|
|
7258
7295
|
*/
|
|
@@ -7270,13 +7307,13 @@ interface LuaEntity extends LuaControl {
|
|
|
7270
7307
|
*
|
|
7271
7308
|
* Set to `0` to reset.
|
|
7272
7309
|
*/
|
|
7273
|
-
inserter_stack_size_override:
|
|
7310
|
+
inserter_stack_size_override: uint32;
|
|
7274
7311
|
/**
|
|
7275
7312
|
* Returns the current target pickup count of the inserter.
|
|
7276
7313
|
*
|
|
7277
7314
|
* This considers the circuit network, manual override and the inserter stack size limit based on technology.
|
|
7278
7315
|
*/
|
|
7279
|
-
readonly inserter_target_pickup_count:
|
|
7316
|
+
readonly inserter_target_pickup_count: uint32;
|
|
7280
7317
|
/**
|
|
7281
7318
|
* If this entity is EntityWithHealth
|
|
7282
7319
|
*/
|
|
@@ -7312,7 +7349,7 @@ interface LuaEntity extends LuaControl {
|
|
|
7312
7349
|
/**
|
|
7313
7350
|
* The number of units killed by this turret, artillery turret, or artillery wagon.
|
|
7314
7351
|
*/
|
|
7315
|
-
kills:
|
|
7352
|
+
kills: uint32;
|
|
7316
7353
|
/**
|
|
7317
7354
|
* 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
7355
|
*/
|
|
@@ -7325,7 +7362,7 @@ interface LuaEntity extends LuaControl {
|
|
|
7325
7362
|
/**
|
|
7326
7363
|
* The link ID this linked container is using.
|
|
7327
7364
|
*/
|
|
7328
|
-
link_id:
|
|
7365
|
+
link_id: uint32;
|
|
7329
7366
|
/**
|
|
7330
7367
|
* Neighbour to which this linked belt is connected to, if any.
|
|
7331
7368
|
*
|
|
@@ -7430,7 +7467,7 @@ interface LuaEntity extends LuaControl {
|
|
|
7430
7467
|
*/
|
|
7431
7468
|
operable: boolean;
|
|
7432
7469
|
/**
|
|
7433
|
-
* The smooth orientation of this entity.
|
|
7470
|
+
* The smooth orientation of this entity. For turrets this is the orientation of the weapon.
|
|
7434
7471
|
*/
|
|
7435
7472
|
orientation: RealOrientation;
|
|
7436
7473
|
/**
|
|
@@ -7497,7 +7534,7 @@ interface LuaEntity extends LuaControl {
|
|
|
7497
7534
|
/**
|
|
7498
7535
|
* The number of products this machine finished crafting in its lifetime.
|
|
7499
7536
|
*/
|
|
7500
|
-
products_finished:
|
|
7537
|
+
products_finished: uint32;
|
|
7501
7538
|
/**
|
|
7502
7539
|
* The entity prototype of this entity.
|
|
7503
7540
|
*/
|
|
@@ -7536,6 +7573,10 @@ interface LuaEntity extends LuaControl {
|
|
|
7536
7573
|
* Gets rail layer of a given signal
|
|
7537
7574
|
*/
|
|
7538
7575
|
readonly rail_layer: defines.rail_layer;
|
|
7576
|
+
/**
|
|
7577
|
+
* Length of this rail piece.
|
|
7578
|
+
*/
|
|
7579
|
+
readonly rail_length: double;
|
|
7539
7580
|
/**
|
|
7540
7581
|
* When locked; the recipe in this assembling machine can't be changed by the player.
|
|
7541
7582
|
*/
|
|
@@ -7544,6 +7585,8 @@ interface LuaEntity extends LuaControl {
|
|
|
7544
7585
|
* 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
7586
|
*
|
|
7546
7587
|
* Writing does nothing if the vehicle doesn't have a turret.
|
|
7588
|
+
*
|
|
7589
|
+
* For the turret orientation of non-artillery turrets, use {@link LuaEntity::orientation | runtime:LuaEntity::orientation}.
|
|
7547
7590
|
*/
|
|
7548
7591
|
relative_turret_orientation?: RealOrientation;
|
|
7549
7592
|
/**
|
|
@@ -7599,7 +7642,7 @@ interface LuaEntity extends LuaControl {
|
|
|
7599
7642
|
/**
|
|
7600
7643
|
* Number of rocket parts in the silo.
|
|
7601
7644
|
*/
|
|
7602
|
-
rocket_parts:
|
|
7645
|
+
rocket_parts: uint32;
|
|
7603
7646
|
/**
|
|
7604
7647
|
* The status of this rocket silo entity.
|
|
7605
7648
|
*/
|
|
@@ -7625,7 +7668,7 @@ interface LuaEntity extends LuaControl {
|
|
|
7625
7668
|
/**
|
|
7626
7669
|
* Index of the currently selected weapon slot of this character, car, or spidertron. `nil` if this entity doesn't have guns.
|
|
7627
7670
|
*/
|
|
7628
|
-
selected_gun_index?:
|
|
7671
|
+
selected_gun_index?: uint32;
|
|
7629
7672
|
/**
|
|
7630
7673
|
* {@link LuaEntityPrototype::selection_box | runtime:LuaEntityPrototype::selection_box} around entity's given position and respecting the current entity orientation.
|
|
7631
7674
|
*/
|
|
@@ -7719,19 +7762,19 @@ interface LuaEntity extends LuaControl {
|
|
|
7719
7762
|
/**
|
|
7720
7763
|
* The last tick this character entity was attacked.
|
|
7721
7764
|
*/
|
|
7722
|
-
tick_of_last_attack:
|
|
7765
|
+
tick_of_last_attack: uint32;
|
|
7723
7766
|
/**
|
|
7724
7767
|
* The last tick this character entity was damaged.
|
|
7725
7768
|
*/
|
|
7726
|
-
tick_of_last_damage:
|
|
7769
|
+
tick_of_last_damage: uint32;
|
|
7727
7770
|
/**
|
|
7728
7771
|
* 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
7772
|
*/
|
|
7730
|
-
readonly tile_height:
|
|
7773
|
+
readonly tile_height: uint32;
|
|
7731
7774
|
/**
|
|
7732
7775
|
* 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
7776
|
*/
|
|
7734
|
-
readonly tile_width:
|
|
7777
|
+
readonly tile_width: uint32;
|
|
7735
7778
|
/**
|
|
7736
7779
|
* The ticks left before a combat robot, highlight box, smoke, or sticker entity is destroyed.
|
|
7737
7780
|
*/
|
|
@@ -7739,11 +7782,11 @@ interface LuaEntity extends LuaControl {
|
|
|
7739
7782
|
/**
|
|
7740
7783
|
* The ticks until the next trigger effect of this smoke-with-trigger.
|
|
7741
7784
|
*/
|
|
7742
|
-
time_to_next_effect:
|
|
7785
|
+
time_to_next_effect: uint32;
|
|
7743
7786
|
/**
|
|
7744
7787
|
* The timeout that's left on this landmine in ticks. It describes the time between the landmine being placed and it being armed.
|
|
7745
7788
|
*/
|
|
7746
|
-
timeout:
|
|
7789
|
+
timeout: uint32;
|
|
7747
7790
|
/**
|
|
7748
7791
|
* Will this item entity be picked up automatically when the player walks over it?
|
|
7749
7792
|
*/
|
|
@@ -7767,17 +7810,21 @@ interface LuaEntity extends LuaControl {
|
|
|
7767
7810
|
*
|
|
7768
7811
|
* Value may be read even when train stop has no control behavior.
|
|
7769
7812
|
*/
|
|
7770
|
-
readonly trains_count:
|
|
7813
|
+
readonly trains_count: uint32;
|
|
7771
7814
|
/**
|
|
7772
7815
|
* The number of trains in this rail block for this rail entity.
|
|
7773
7816
|
*/
|
|
7774
|
-
readonly trains_in_block:
|
|
7817
|
+
readonly trains_in_block: uint32;
|
|
7775
7818
|
/**
|
|
7776
7819
|
* 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
7820
|
*
|
|
7778
7821
|
* When a train stop has a control behavior with wire connected and set_trains_limit enabled, this value will be overwritten by it.
|
|
7779
7822
|
*/
|
|
7780
|
-
trains_limit:
|
|
7823
|
+
trains_limit: uint32;
|
|
7824
|
+
/**
|
|
7825
|
+
* The space platform in orbit this rocket silo is automatically requesting items for.
|
|
7826
|
+
*/
|
|
7827
|
+
readonly transitional_request_target?: LuaSpacePlatform;
|
|
7781
7828
|
/**
|
|
7782
7829
|
* Index of the tree color.
|
|
7783
7830
|
*/
|
|
@@ -7823,7 +7870,7 @@ interface LuaEntity extends LuaControl {
|
|
|
7823
7870
|
*/
|
|
7824
7871
|
use_filters: boolean;
|
|
7825
7872
|
/**
|
|
7826
|
-
* When true, the rocket silo will request items for space platforms in orbit.
|
|
7873
|
+
* When true, the rocket silo will automatically request items for space platforms in orbit.
|
|
7827
7874
|
*
|
|
7828
7875
|
* Setting the value will have no effect when the silo doesn't support logistics.
|
|
7829
7876
|
*/
|
|
@@ -7847,10 +7894,12 @@ interface LuaEntity extends LuaControl {
|
|
|
7847
7894
|
* Prototype of an entity.
|
|
7848
7895
|
*/
|
|
7849
7896
|
interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
7897
|
+
get_attraction_range_elongation(this: void, quality?: QualityID): double | null;
|
|
7850
7898
|
/**
|
|
7851
7899
|
* The crafting speed of this crafting-machine or character.
|
|
7852
7900
|
*/
|
|
7853
7901
|
get_crafting_speed(this: void, quality?: QualityID): double;
|
|
7902
|
+
get_energy_distribution_efficiency(this: void, quality?: QualityID): double | null;
|
|
7854
7903
|
/**
|
|
7855
7904
|
* Gets the fluid capacity of this entity or 0 if this entity doesn't support fluids.
|
|
7856
7905
|
*
|
|
@@ -7873,7 +7922,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
7873
7922
|
* Gets the base size of the given inventory on this entity or `nil` if the given inventory doesn't exist.
|
|
7874
7923
|
* @param quality Defaults to `"normal"`.
|
|
7875
7924
|
*/
|
|
7876
|
-
get_inventory_size(this: void, index: defines.inventory, quality?: QualityID):
|
|
7925
|
+
get_inventory_size(this: void, index: defines.inventory, quality?: QualityID): uint32 | null;
|
|
7877
7926
|
/**
|
|
7878
7927
|
* The maximum circuit wire distance for this entity. 0 if the entity doesn't support circuit wires.
|
|
7879
7928
|
*/
|
|
@@ -7881,11 +7930,11 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
7881
7930
|
/**
|
|
7882
7931
|
* The radius of the area constantly revealed by this radar, or cargo landing pad, in chunks.
|
|
7883
7932
|
*/
|
|
7884
|
-
get_max_distance_of_nearby_sector_revealed(this: void, quality?: QualityID):
|
|
7933
|
+
get_max_distance_of_nearby_sector_revealed(this: void, quality?: QualityID): uint32 | null;
|
|
7885
7934
|
/**
|
|
7886
7935
|
* The radius of the area this radar can chart, in chunks.
|
|
7887
7936
|
*/
|
|
7888
|
-
get_max_distance_of_sector_revealed(this: void, quality?: QualityID):
|
|
7937
|
+
get_max_distance_of_sector_revealed(this: void, quality?: QualityID): uint32 | null;
|
|
7889
7938
|
/**
|
|
7890
7939
|
* The max energy for this flying robot prototype.
|
|
7891
7940
|
*/
|
|
@@ -7942,6 +7991,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
7942
7991
|
readonly absorptions_to_join_attack?: Record<string, float>;
|
|
7943
7992
|
readonly acceleration_rate: double;
|
|
7944
7993
|
readonly accepted_seeds?: string[];
|
|
7994
|
+
readonly activation_buffer_ratio?: FluidAmount;
|
|
7945
7995
|
/**
|
|
7946
7996
|
* The active energy usage of this rocket silo or combinator prototype.
|
|
7947
7997
|
*/
|
|
@@ -8022,10 +8072,10 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8022
8072
|
readonly arm_angular_speed_cap_base?: float;
|
|
8023
8073
|
readonly arm_angular_speed_cap_quality_scaling?: float;
|
|
8024
8074
|
readonly arm_color_gradient?: Color[];
|
|
8025
|
-
readonly arm_count_base?:
|
|
8026
|
-
readonly arm_count_quality_scaling?:
|
|
8075
|
+
readonly arm_count_base?: uint32;
|
|
8076
|
+
readonly arm_count_quality_scaling?: uint32;
|
|
8027
8077
|
readonly arm_energy_usage?: double;
|
|
8028
|
-
readonly arm_inventory_size_quality_increase?:
|
|
8078
|
+
readonly arm_inventory_size_quality_increase?: uint32;
|
|
8029
8079
|
readonly arm_slow_energy_usage?: double;
|
|
8030
8080
|
readonly arm_speed_base?: float;
|
|
8031
8081
|
readonly arm_speed_quality_scaling?: float;
|
|
@@ -8039,11 +8089,12 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8039
8089
|
*/
|
|
8040
8090
|
readonly attack_result?: TriggerItem[];
|
|
8041
8091
|
readonly attacking_speed?: double;
|
|
8092
|
+
readonly attractor_hit_effect?: TriggerItem[];
|
|
8042
8093
|
readonly auto_setup_collision_box: boolean;
|
|
8043
8094
|
/**
|
|
8044
8095
|
* The amount of ammo that inserters automatically insert into this ammo-turret or artillery-turret.
|
|
8045
8096
|
*/
|
|
8046
|
-
readonly automated_ammo_count?:
|
|
8097
|
+
readonly automated_ammo_count?: uint32;
|
|
8047
8098
|
/**
|
|
8048
8099
|
* Whether this spider vehicle prototype automatically cycles weapons.
|
|
8049
8100
|
*/
|
|
@@ -8074,11 +8125,11 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8074
8125
|
* The evolution requirement to build this entity as a base when expanding enemy bases.
|
|
8075
8126
|
*/
|
|
8076
8127
|
readonly build_base_evolution_requirement: double;
|
|
8077
|
-
readonly build_distance?:
|
|
8128
|
+
readonly build_distance?: uint32;
|
|
8078
8129
|
/**
|
|
8079
8130
|
* The log2 of {@link grid size | prototype:EntityPrototype::build_grid_size} of the building.
|
|
8080
8131
|
*/
|
|
8081
|
-
readonly building_grid_bit_shift:
|
|
8132
|
+
readonly building_grid_bit_shift: uint32;
|
|
8082
8133
|
/**
|
|
8083
8134
|
* Whether this inserter is a bulk-type.
|
|
8084
8135
|
*/
|
|
@@ -8135,6 +8186,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8135
8186
|
* The color of the prototype, if any.
|
|
8136
8187
|
*/
|
|
8137
8188
|
readonly color?: Color;
|
|
8189
|
+
readonly combat_robot_friction?: double;
|
|
8138
8190
|
readonly connection_distance?: double;
|
|
8139
8191
|
/**
|
|
8140
8192
|
* The construction radius for this roboport prototype.
|
|
@@ -8190,6 +8242,10 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8190
8242
|
speed_from_center: float;
|
|
8191
8243
|
speed_from_center_deviation: float;
|
|
8192
8244
|
};
|
|
8245
|
+
/**
|
|
8246
|
+
* When lightning strikes something that is not a lightning attractor, this damage is applied to the target.
|
|
8247
|
+
*/
|
|
8248
|
+
readonly damage?: double;
|
|
8193
8249
|
readonly damage_hit_tint?: Color;
|
|
8194
8250
|
readonly damaged_trigger_effect?: TriggerEffectItem[];
|
|
8195
8251
|
/**
|
|
@@ -8201,6 +8257,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8201
8257
|
*/
|
|
8202
8258
|
readonly darkness_for_all_lamps_on?: float;
|
|
8203
8259
|
readonly deposit_radius?: float;
|
|
8260
|
+
readonly destroy_action?: TriggerItem[];
|
|
8204
8261
|
/**
|
|
8205
8262
|
* Whether this generator prototype destroys non-fuel fluids.
|
|
8206
8263
|
*/
|
|
@@ -8208,7 +8265,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8208
8265
|
/**
|
|
8209
8266
|
* The distraction cooldown of this unit prototype.
|
|
8210
8267
|
*/
|
|
8211
|
-
readonly distraction_cooldown?:
|
|
8268
|
+
readonly distraction_cooldown?: uint32;
|
|
8212
8269
|
/**
|
|
8213
8270
|
* The distribution effectivity for this beacon prototype.
|
|
8214
8271
|
*/
|
|
@@ -8229,7 +8286,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8229
8286
|
* 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
8287
|
*/
|
|
8231
8288
|
readonly drawing_box_vertical_extension: double;
|
|
8232
|
-
readonly drop_item_distance?:
|
|
8289
|
+
readonly drop_item_distance?: uint32;
|
|
8233
8290
|
readonly dying_explosion?: ExplosionDefinition[];
|
|
8234
8291
|
/**
|
|
8235
8292
|
* The dying time of this corpse prototype.
|
|
@@ -8256,6 +8313,10 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8256
8313
|
* The enemy map color used when charting this entity.
|
|
8257
8314
|
*/
|
|
8258
8315
|
readonly enemy_map_color: Color;
|
|
8316
|
+
/**
|
|
8317
|
+
* When lightning hits a lightning attractor this amount of energy is transferred to the lightning attractor.
|
|
8318
|
+
*/
|
|
8319
|
+
readonly energy?: double;
|
|
8259
8320
|
/**
|
|
8260
8321
|
* The energy used per hit point taken for this vehicle during collisions.
|
|
8261
8322
|
*/
|
|
@@ -8299,7 +8360,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8299
8360
|
/**
|
|
8300
8361
|
* The filter count of this inserter, loader, mining drill or logistic chest. For logistic containers, `nil` means no limit.
|
|
8301
8362
|
*/
|
|
8302
|
-
readonly filter_count?:
|
|
8363
|
+
readonly filter_count?: uint32;
|
|
8303
8364
|
/**
|
|
8304
8365
|
* The final attack result for this projectile.
|
|
8305
8366
|
*/
|
|
@@ -8313,6 +8374,8 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8313
8374
|
*/
|
|
8314
8375
|
readonly flags: EntityPrototypeFlags;
|
|
8315
8376
|
readonly flow_scaling?: boolean;
|
|
8377
|
+
readonly fluid_buffer_input_flow?: FluidAmount;
|
|
8378
|
+
readonly fluid_buffer_size?: FluidAmount;
|
|
8316
8379
|
/**
|
|
8317
8380
|
* The fluid capacity of this entity or 0 if this entity doesn't support fluids.
|
|
8318
8381
|
*
|
|
@@ -8340,6 +8403,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8340
8403
|
* The flying speed for this rocket silo rocket prototype.
|
|
8341
8404
|
*/
|
|
8342
8405
|
readonly flying_speed?: double;
|
|
8406
|
+
readonly follows_player?: boolean;
|
|
8343
8407
|
/**
|
|
8344
8408
|
* The friction of this vehicle prototype.
|
|
8345
8409
|
*/
|
|
@@ -8353,8 +8417,8 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8353
8417
|
*/
|
|
8354
8418
|
readonly grid_prototype?: LuaEquipmentGridPrototype;
|
|
8355
8419
|
readonly growth_area_radius?: double;
|
|
8356
|
-
readonly growth_grid_tile_size?:
|
|
8357
|
-
readonly growth_ticks?:
|
|
8420
|
+
readonly growth_grid_tile_size?: uint32;
|
|
8421
|
+
readonly growth_ticks?: uint32;
|
|
8358
8422
|
/**
|
|
8359
8423
|
* A mapping of the gun name to the gun prototype this prototype uses. `nil` if this entity prototype doesn't use guns.
|
|
8360
8424
|
*/
|
|
@@ -8407,7 +8471,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8407
8471
|
/**
|
|
8408
8472
|
* Every time this infinite resource 'ticks' down, it is reduced by this amount. Meaningless if this isn't an infinite resource.
|
|
8409
8473
|
*/
|
|
8410
|
-
readonly infinite_depletion_resource_amount?:
|
|
8474
|
+
readonly infinite_depletion_resource_amount?: uint32;
|
|
8411
8475
|
/**
|
|
8412
8476
|
* Whether this resource is infinite.
|
|
8413
8477
|
*/
|
|
@@ -8415,7 +8479,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8415
8479
|
/**
|
|
8416
8480
|
* The max number of ingredients this crafting machine prototype supports.
|
|
8417
8481
|
*/
|
|
8418
|
-
readonly ingredient_count?:
|
|
8482
|
+
readonly ingredient_count?: uint32;
|
|
8419
8483
|
/**
|
|
8420
8484
|
* True if this inserter chases items on belts for pickup.
|
|
8421
8485
|
*/
|
|
@@ -8431,7 +8495,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8431
8495
|
/**
|
|
8432
8496
|
* The built-in stack size bonus of this inserter prototype.
|
|
8433
8497
|
*/
|
|
8434
|
-
readonly inserter_stack_size_bonus?:
|
|
8498
|
+
readonly inserter_stack_size_bonus?: uint32;
|
|
8435
8499
|
/**
|
|
8436
8500
|
* The instruments for this programmable speaker.
|
|
8437
8501
|
*/
|
|
@@ -8440,7 +8504,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8440
8504
|
* Properties of custom inventory. Only provided if inventory_type is `"with_custom_stack_size"`.
|
|
8441
8505
|
*/
|
|
8442
8506
|
readonly inventory_properties?: InventoryWithCustomStackSizeSpecification;
|
|
8443
|
-
readonly inventory_size_quality_increase?:
|
|
8507
|
+
readonly inventory_size_quality_increase?: uint32;
|
|
8444
8508
|
/**
|
|
8445
8509
|
* The inventory type this container or linked container uses.
|
|
8446
8510
|
*/
|
|
@@ -8568,14 +8632,14 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8568
8632
|
charge_approach_distance: float;
|
|
8569
8633
|
logistic_radius: float;
|
|
8570
8634
|
construction_radius: float;
|
|
8571
|
-
charging_station_count:
|
|
8635
|
+
charging_station_count: uint32;
|
|
8572
8636
|
charging_distance: float;
|
|
8573
8637
|
charging_station_shift: Vector;
|
|
8574
8638
|
charging_energy: double;
|
|
8575
8639
|
charging_threshold_distance: float;
|
|
8576
8640
|
robot_vertical_acceleration: float;
|
|
8577
8641
|
stationing_offset: Vector;
|
|
8578
|
-
robot_limit:
|
|
8642
|
+
robot_limit: uint32;
|
|
8579
8643
|
logistics_connection_distance: float;
|
|
8580
8644
|
robots_shrink_when_entering_and_exiting: boolean;
|
|
8581
8645
|
};
|
|
@@ -8623,16 +8687,20 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8623
8687
|
/**
|
|
8624
8688
|
* The max number of item products this crafting machine prototype supports.
|
|
8625
8689
|
*/
|
|
8626
|
-
readonly max_item_product_count?:
|
|
8690
|
+
readonly max_item_product_count?: uint32;
|
|
8691
|
+
/**
|
|
8692
|
+
* The cargo carrying capacity of this logistics or construction robot.
|
|
8693
|
+
*/
|
|
8694
|
+
readonly max_payload_size?: uint32;
|
|
8627
8695
|
/**
|
|
8628
|
-
* The
|
|
8696
|
+
* 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.
|
|
8629
8697
|
*/
|
|
8630
|
-
readonly
|
|
8698
|
+
readonly max_payload_size_after_bonus?: uint32;
|
|
8631
8699
|
readonly max_performance?: ThrusterPerformancePoint;
|
|
8632
8700
|
/**
|
|
8633
8701
|
* The maximum polyphony for this programmable speaker.
|
|
8634
8702
|
*/
|
|
8635
|
-
readonly max_polyphony?:
|
|
8703
|
+
readonly max_polyphony?: uint32;
|
|
8636
8704
|
/**
|
|
8637
8705
|
* 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
8706
|
*/
|
|
@@ -8666,7 +8734,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8666
8734
|
/**
|
|
8667
8735
|
* The minimum pursue time of this unit prototype.
|
|
8668
8736
|
*/
|
|
8669
|
-
readonly min_pursue_time?:
|
|
8737
|
+
readonly min_pursue_time?: uint32;
|
|
8670
8738
|
/**
|
|
8671
8739
|
* The minimum energy for this flying robot before it tries to recharge.
|
|
8672
8740
|
*/
|
|
@@ -8675,11 +8743,11 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8675
8743
|
* Whether this entity is minable and what can be obtained by mining it.
|
|
8676
8744
|
*/
|
|
8677
8745
|
readonly mineable_properties: MineableProperties;
|
|
8678
|
-
readonly minimal_arm_swing_segment_retraction?:
|
|
8746
|
+
readonly minimal_arm_swing_segment_retraction?: uint32;
|
|
8679
8747
|
/**
|
|
8680
8748
|
* Minimum amount of this resource.
|
|
8681
8749
|
*/
|
|
8682
|
-
readonly minimum_resource_amount?:
|
|
8750
|
+
readonly minimum_resource_amount?: uint32;
|
|
8683
8751
|
/**
|
|
8684
8752
|
* The mining radius of this mining drill prototype.
|
|
8685
8753
|
*/
|
|
@@ -8691,7 +8759,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8691
8759
|
/**
|
|
8692
8760
|
* The module inventory size. `nil` if this entity doesn't support modules.
|
|
8693
8761
|
*/
|
|
8694
|
-
readonly module_inventory_size?:
|
|
8762
|
+
readonly module_inventory_size?: uint32;
|
|
8695
8763
|
/**
|
|
8696
8764
|
* Whether this unit prototype can move while shooting.
|
|
8697
8765
|
*/
|
|
@@ -8705,7 +8773,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8705
8773
|
/**
|
|
8706
8774
|
* The normal amount for this resource.
|
|
8707
8775
|
*/
|
|
8708
|
-
readonly normal_resource_amount?:
|
|
8776
|
+
readonly normal_resource_amount?: uint32;
|
|
8709
8777
|
/**
|
|
8710
8778
|
* 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
8779
|
*/
|
|
@@ -8733,14 +8801,15 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8733
8801
|
/**
|
|
8734
8802
|
* The radar range of this unit prototype.
|
|
8735
8803
|
*/
|
|
8736
|
-
readonly radar_range?:
|
|
8804
|
+
readonly radar_range?: uint32;
|
|
8737
8805
|
/**
|
|
8738
|
-
* The radius of this entity prototype.
|
|
8806
|
+
* 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
8807
|
*/
|
|
8740
8808
|
readonly radius: double;
|
|
8741
8809
|
readonly radius_visualisation_specification?: RadiusVisualisationSpecification;
|
|
8742
8810
|
readonly random_corpse_variation?: boolean;
|
|
8743
|
-
readonly
|
|
8811
|
+
readonly range_from_player?: double;
|
|
8812
|
+
readonly reach_distance?: uint32;
|
|
8744
8813
|
readonly reach_resource_distance?: double;
|
|
8745
8814
|
readonly related_underground_belt?: LuaEntityPrototype;
|
|
8746
8815
|
/**
|
|
@@ -8775,7 +8844,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8775
8844
|
* The resource drain rate percent of this mining drill prototype.
|
|
8776
8845
|
*/
|
|
8777
8846
|
readonly resource_drain_rate_percent?: uint8;
|
|
8778
|
-
readonly respawn_time?:
|
|
8847
|
+
readonly respawn_time?: uint32;
|
|
8779
8848
|
/**
|
|
8780
8849
|
* The result units and spawn points with weight and evolution factor for a biter spawner entity.
|
|
8781
8850
|
*/
|
|
@@ -8796,7 +8865,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8796
8865
|
/**
|
|
8797
8866
|
* The rocket parts required for this rocket silo prototype.
|
|
8798
8867
|
*/
|
|
8799
|
-
readonly rocket_parts_required?:
|
|
8868
|
+
readonly rocket_parts_required?: uint32;
|
|
8800
8869
|
/**
|
|
8801
8870
|
* The rocket rising delay for this rocket silo prototype.
|
|
8802
8871
|
*/
|
|
@@ -8837,7 +8906,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8837
8906
|
/**
|
|
8838
8907
|
* The selection priority of this entity - a value between `0` and `255`.
|
|
8839
8908
|
*/
|
|
8840
|
-
readonly selection_priority:
|
|
8909
|
+
readonly selection_priority: uint32;
|
|
8841
8910
|
/**
|
|
8842
8911
|
* The cursor size used when shooting at this entity.
|
|
8843
8912
|
*/
|
|
@@ -8874,10 +8943,13 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8874
8943
|
* The speed multiplier when this flying robot is out of energy.
|
|
8875
8944
|
*/
|
|
8876
8945
|
readonly speed_multiplier_when_out_of_energy?: float;
|
|
8946
|
+
readonly spider_engine?: SpiderEngineSpecification;
|
|
8877
8947
|
/**
|
|
8878
8948
|
* The bounding box used to attach sticker type entities.
|
|
8879
8949
|
*/
|
|
8880
8950
|
readonly sticker_box: BoundingBox;
|
|
8951
|
+
readonly strike_effect?: TriggerItem[];
|
|
8952
|
+
readonly support_range?: float;
|
|
8881
8953
|
/**
|
|
8882
8954
|
* Whether this entity prototype could possibly ever be rotated.
|
|
8883
8955
|
*/
|
|
@@ -8898,12 +8970,12 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8898
8970
|
* The terrain friction modifier for this vehicle.
|
|
8899
8971
|
*/
|
|
8900
8972
|
readonly terrain_friction_modifier?: float;
|
|
8901
|
-
readonly territory_radius?:
|
|
8973
|
+
readonly territory_radius?: uint32;
|
|
8902
8974
|
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?:
|
|
8975
|
+
readonly ticks_per_scan?: uint32;
|
|
8976
|
+
readonly ticks_to_keep_aiming_direction?: uint32;
|
|
8977
|
+
readonly ticks_to_keep_gun?: uint32;
|
|
8978
|
+
readonly ticks_to_stay_in_combat?: uint32;
|
|
8907
8979
|
/**
|
|
8908
8980
|
* The tile buildability rules of this entity prototype.
|
|
8909
8981
|
*/
|
|
@@ -8911,19 +8983,19 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8911
8983
|
/**
|
|
8912
8984
|
* 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
8985
|
*/
|
|
8914
|
-
readonly tile_height:
|
|
8986
|
+
readonly tile_height: uint32;
|
|
8915
8987
|
/**
|
|
8916
8988
|
* 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
8989
|
*/
|
|
8918
|
-
readonly tile_width:
|
|
8990
|
+
readonly tile_width: uint32;
|
|
8919
8991
|
/**
|
|
8920
8992
|
* The time to live for this prototype or `0` if prototype doesn't have time_to_live or time_before_removed.
|
|
8921
8993
|
*/
|
|
8922
|
-
readonly time_to_live:
|
|
8994
|
+
readonly time_to_live: uint32;
|
|
8923
8995
|
/**
|
|
8924
8996
|
* The time it takes this land mine to arm.
|
|
8925
8997
|
*/
|
|
8926
|
-
readonly timeout?:
|
|
8998
|
+
readonly timeout?: uint32;
|
|
8927
8999
|
/**
|
|
8928
9000
|
* The torso bob speed of this spider vehicle prototype.
|
|
8929
9001
|
*/
|
|
@@ -8951,7 +9023,7 @@ interface LuaEntityPrototype extends LuaPrototypeBase {
|
|
|
8951
9023
|
/**
|
|
8952
9024
|
* The range of this turret.
|
|
8953
9025
|
*/
|
|
8954
|
-
readonly turret_range?:
|
|
9026
|
+
readonly turret_range?: uint32;
|
|
8955
9027
|
/**
|
|
8956
9028
|
* The turret rotation speed of this car prototype.
|
|
8957
9029
|
*/
|
|
@@ -9038,7 +9110,7 @@ interface LuaEquipment {
|
|
|
9038
9110
|
/**
|
|
9039
9111
|
* Inventory size bonus.
|
|
9040
9112
|
*/
|
|
9041
|
-
readonly inventory_bonus:
|
|
9113
|
+
readonly inventory_bonus: uint32;
|
|
9042
9114
|
/**
|
|
9043
9115
|
* Maximum amount of energy that can be stored in this equipment.
|
|
9044
9116
|
*/
|
|
@@ -9076,8 +9148,8 @@ interface LuaEquipment {
|
|
|
9076
9148
|
* Shape of this equipment.
|
|
9077
9149
|
*/
|
|
9078
9150
|
readonly shape: {
|
|
9079
|
-
width:
|
|
9080
|
-
height:
|
|
9151
|
+
width: uint32;
|
|
9152
|
+
height: uint32;
|
|
9081
9153
|
};
|
|
9082
9154
|
/**
|
|
9083
9155
|
* Current shield value of the equipment. Can't be set higher than {@link LuaEquipment::max_shield | runtime:LuaEquipment::max_shield}.
|
|
@@ -9138,7 +9210,7 @@ interface LuaEquipmentGrid {
|
|
|
9138
9210
|
* Get the number of all or some equipment in this grid.
|
|
9139
9211
|
* @param equipment The equipment to count. If not specified, count all equipment.
|
|
9140
9212
|
*/
|
|
9141
|
-
count(this: void, equipment?: EquipmentWithQualityID):
|
|
9213
|
+
count(this: void, equipment?: EquipmentWithQualityID): uint32;
|
|
9142
9214
|
/**
|
|
9143
9215
|
* Find equipment by name.
|
|
9144
9216
|
* @param equipment Prototype of the equipment to find.
|
|
@@ -9159,6 +9231,7 @@ interface LuaEquipmentGrid {
|
|
|
9159
9231
|
get_contents(this: void): EquipmentWithQualityCounts[];
|
|
9160
9232
|
/**
|
|
9161
9233
|
* Total energy per tick generated by the equipment inside this grid.
|
|
9234
|
+
* @param quality Defaults to `"normal"`.
|
|
9162
9235
|
*/
|
|
9163
9236
|
get_generator_energy(this: void, quality?: QualityID): double;
|
|
9164
9237
|
/**
|
|
@@ -9236,7 +9309,7 @@ interface LuaEquipmentGrid {
|
|
|
9236
9309
|
/**
|
|
9237
9310
|
* Height of the equipment grid.
|
|
9238
9311
|
*/
|
|
9239
|
-
readonly height:
|
|
9312
|
+
readonly height: uint32;
|
|
9240
9313
|
/**
|
|
9241
9314
|
* Whether this grid's equipment movement bonus is active.
|
|
9242
9315
|
*/
|
|
@@ -9244,13 +9317,13 @@ interface LuaEquipmentGrid {
|
|
|
9244
9317
|
/**
|
|
9245
9318
|
* The total amount of inventory bonus this equipment grid gives.
|
|
9246
9319
|
*/
|
|
9247
|
-
readonly inventory_bonus:
|
|
9320
|
+
readonly inventory_bonus: uint32;
|
|
9248
9321
|
/**
|
|
9249
9322
|
* The item stack that this equipment grid is owned by.
|
|
9250
9323
|
*/
|
|
9251
9324
|
readonly itemstack_owner?: LuaItemStack;
|
|
9252
9325
|
/**
|
|
9253
|
-
* The maximum amount of
|
|
9326
|
+
* The maximum amount of shield hitpoints this equipment grid has across all shield equipment.
|
|
9254
9327
|
*/
|
|
9255
9328
|
readonly max_shield: float;
|
|
9256
9329
|
/**
|
|
@@ -9260,7 +9333,7 @@ interface LuaEquipmentGrid {
|
|
|
9260
9333
|
/**
|
|
9261
9334
|
* The total amount of movement bonus this equipment grid gives.
|
|
9262
9335
|
*
|
|
9263
|
-
* Returns `0` if {@link LuaEquipmentGrid::inhibit_movement_bonus | runtime:LuaEquipmentGrid::inhibit_movement_bonus} is `
|
|
9336
|
+
* Returns `0` if {@link LuaEquipmentGrid::inhibit_movement_bonus | runtime:LuaEquipmentGrid::inhibit_movement_bonus} is `true`.
|
|
9264
9337
|
*/
|
|
9265
9338
|
readonly movement_bonus: double;
|
|
9266
9339
|
/**
|
|
@@ -9273,13 +9346,13 @@ interface LuaEquipmentGrid {
|
|
|
9273
9346
|
readonly player_owner?: LuaPlayer;
|
|
9274
9347
|
readonly prototype: LuaEquipmentGridPrototype;
|
|
9275
9348
|
/**
|
|
9276
|
-
* The amount of
|
|
9349
|
+
* The amount of shield hitpoints this equipment grid currently has across all shield equipment.
|
|
9277
9350
|
*/
|
|
9278
9351
|
readonly shield: float;
|
|
9279
9352
|
/**
|
|
9280
9353
|
* Unique identifier of this equipment grid.
|
|
9281
9354
|
*/
|
|
9282
|
-
readonly unique_id:
|
|
9355
|
+
readonly unique_id: uint32;
|
|
9283
9356
|
/**
|
|
9284
9357
|
* 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
9358
|
*/
|
|
@@ -9287,7 +9360,7 @@ interface LuaEquipmentGrid {
|
|
|
9287
9360
|
/**
|
|
9288
9361
|
* Width of the equipment grid.
|
|
9289
9362
|
*/
|
|
9290
|
-
readonly width:
|
|
9363
|
+
readonly width: uint32;
|
|
9291
9364
|
}
|
|
9292
9365
|
/**
|
|
9293
9366
|
* Prototype of an equipment grid.
|
|
@@ -9297,7 +9370,7 @@ interface LuaEquipmentGridPrototype extends LuaPrototypeBase {
|
|
|
9297
9370
|
* 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
9371
|
*/
|
|
9299
9372
|
readonly equipment_categories: string[];
|
|
9300
|
-
readonly height:
|
|
9373
|
+
readonly height: uint32;
|
|
9301
9374
|
/**
|
|
9302
9375
|
* If the player can move equipment into or out of this grid.
|
|
9303
9376
|
*/
|
|
@@ -9310,14 +9383,14 @@ interface LuaEquipmentGridPrototype extends LuaPrototypeBase {
|
|
|
9310
9383
|
* 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
9384
|
*/
|
|
9312
9385
|
readonly valid: boolean;
|
|
9313
|
-
readonly width:
|
|
9386
|
+
readonly width: uint32;
|
|
9314
9387
|
}
|
|
9315
9388
|
/**
|
|
9316
9389
|
* Prototype of a modular equipment.
|
|
9317
9390
|
*/
|
|
9318
9391
|
interface LuaEquipmentPrototype extends LuaPrototypeBase {
|
|
9319
9392
|
get_energy_consumption(this: void, quality?: QualityID): double;
|
|
9320
|
-
get_inventory_bonus(this: void, quality?: QualityID):
|
|
9393
|
+
get_inventory_bonus(this: void, quality?: QualityID): uint32 | null;
|
|
9321
9394
|
get_movement_bonus(this: void, quality?: QualityID): float | null;
|
|
9322
9395
|
/**
|
|
9323
9396
|
* The shield value of this equipment. 0 for non-shield equipment.
|
|
@@ -9369,14 +9442,14 @@ interface LuaEquipmentPrototype extends LuaPrototypeBase {
|
|
|
9369
9442
|
charge_approach_distance: float;
|
|
9370
9443
|
logistic_radius: float;
|
|
9371
9444
|
construction_radius: float;
|
|
9372
|
-
charging_station_count:
|
|
9445
|
+
charging_station_count: uint32;
|
|
9373
9446
|
charging_distance: float;
|
|
9374
9447
|
charging_station_shift: Vector;
|
|
9375
9448
|
charging_energy: double;
|
|
9376
9449
|
charging_threshold_distance: float;
|
|
9377
9450
|
robot_vertical_acceleration: float;
|
|
9378
9451
|
stationing_offset: Vector;
|
|
9379
|
-
robot_limit:
|
|
9452
|
+
robot_limit: uint32;
|
|
9380
9453
|
logistics_connection_distance: float;
|
|
9381
9454
|
robots_shrink_when_entering_and_exiting: boolean;
|
|
9382
9455
|
};
|
|
@@ -9388,8 +9461,8 @@ interface LuaEquipmentPrototype extends LuaPrototypeBase {
|
|
|
9388
9461
|
* Shape of this equipment prototype.
|
|
9389
9462
|
*/
|
|
9390
9463
|
readonly shape: {
|
|
9391
|
-
width:
|
|
9392
|
-
height:
|
|
9464
|
+
width: uint32;
|
|
9465
|
+
height: uint32;
|
|
9393
9466
|
/**
|
|
9394
9467
|
* Only set when the shape is "manual"
|
|
9395
9468
|
*/
|
|
@@ -9527,46 +9600,50 @@ interface LuaFluidBox {
|
|
|
9527
9600
|
*
|
|
9528
9601
|
* Linked connections cannot go to the same entity even if they would be part of other fluidbox.
|
|
9529
9602
|
*/
|
|
9530
|
-
add_linked_connection(this: void, this_linked_connection_id:
|
|
9603
|
+
add_linked_connection(this: void, this_linked_connection_id: uint32, other_entity: LuaEntity, other_linked_connection_id: uint32): void;
|
|
9531
9604
|
/**
|
|
9532
9605
|
* Flushes all fluid from this fluidbox and its fluid system.
|
|
9533
9606
|
* @param fluid If provided, only this fluid is flushed.
|
|
9534
9607
|
* @returns The removed fluid.
|
|
9535
9608
|
*/
|
|
9536
|
-
flush(this: void, index:
|
|
9609
|
+
flush(this: void, index: uint32, fluid?: FluidID): Record<string, FluidAmount>;
|
|
9537
9610
|
/**
|
|
9538
9611
|
* The capacity of the given fluidbox segment.
|
|
9539
9612
|
*/
|
|
9540
|
-
get_capacity(this: void, index:
|
|
9613
|
+
get_capacity(this: void, index: uint32): double;
|
|
9541
9614
|
/**
|
|
9542
9615
|
* The fluidboxes to which the fluidbox at the given index is connected.
|
|
9543
9616
|
*/
|
|
9544
|
-
get_connections(this: void, index:
|
|
9617
|
+
get_connections(this: void, index: uint32): LuaFluidBox[];
|
|
9545
9618
|
/**
|
|
9546
9619
|
* Get a fluid box filter
|
|
9547
9620
|
* @param index The index of the filter to get.
|
|
9548
9621
|
* @returns The filter at the requested index, or `nil` if there isn't one.
|
|
9549
9622
|
*/
|
|
9550
|
-
get_filter(this: void, index:
|
|
9623
|
+
get_filter(this: void, index: uint32): FluidBoxFilter | null;
|
|
9551
9624
|
/**
|
|
9552
9625
|
* 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
9626
|
*
|
|
9554
9627
|
* Note that this method only ever returns one fluid, since fluids can't be mixed anymore.
|
|
9555
9628
|
* @returns The counts, indexed by fluid name.
|
|
9556
9629
|
*/
|
|
9557
|
-
get_fluid_segment_contents(this: void, index:
|
|
9630
|
+
get_fluid_segment_contents(this: void, index: uint32): Record<string, uint32> | null;
|
|
9631
|
+
/**
|
|
9632
|
+
* 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.
|
|
9633
|
+
*/
|
|
9634
|
+
get_fluid_segment_extent_bounding_box(this: void, index: uint32): BoundingBox | null;
|
|
9558
9635
|
/**
|
|
9559
9636
|
* 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
9637
|
*/
|
|
9561
|
-
get_fluid_segment_id(this: void, index:
|
|
9638
|
+
get_fluid_segment_id(this: void, index: uint32): uint32 | null;
|
|
9562
9639
|
/**
|
|
9563
9640
|
* Returns other end of a linked connection.
|
|
9564
9641
|
* @returns [0] - Other entity to which a linked connection was made
|
|
9565
9642
|
* @returns [1] - linked_connection_id on other entity
|
|
9566
9643
|
*/
|
|
9567
|
-
get_linked_connection(this: void, this_linked_connection_id:
|
|
9644
|
+
get_linked_connection(this: void, this_linked_connection_id: uint32): LuaMultiReturn<[
|
|
9568
9645
|
LuaEntity | null,
|
|
9569
|
-
|
|
9646
|
+
uint32 | null
|
|
9570
9647
|
]>;
|
|
9571
9648
|
/**
|
|
9572
9649
|
* Returns list of all linked connections registered for this entity.
|
|
@@ -9576,19 +9653,19 @@ interface LuaFluidBox {
|
|
|
9576
9653
|
* Returns the fluid the fluidbox is locked onto
|
|
9577
9654
|
* @returns `nil` if the fluidbox is not locked to any fluid.
|
|
9578
9655
|
*/
|
|
9579
|
-
get_locked_fluid(this: void, index:
|
|
9656
|
+
get_locked_fluid(this: void, index: uint32): string | null;
|
|
9580
9657
|
/**
|
|
9581
9658
|
* Get the fluid box's connections and associated data.
|
|
9582
9659
|
*/
|
|
9583
|
-
get_pipe_connections(this: void, index:
|
|
9660
|
+
get_pipe_connections(this: void, index: uint32): PipeConnection[];
|
|
9584
9661
|
/**
|
|
9585
9662
|
* 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
9663
|
*/
|
|
9587
|
-
get_prototype(this: void, index:
|
|
9664
|
+
get_prototype(this: void, index: uint32): LuaFluidBoxPrototype | LuaFluidBoxPrototype[];
|
|
9588
9665
|
/**
|
|
9589
9666
|
* Removes linked connection record. If connected, other end will be also removed.
|
|
9590
9667
|
*/
|
|
9591
|
-
remove_linked_connection(this: void, this_linked_connection_id:
|
|
9668
|
+
remove_linked_connection(this: void, this_linked_connection_id: uint32): void;
|
|
9592
9669
|
/**
|
|
9593
9670
|
* Set a fluid box filter.
|
|
9594
9671
|
*
|
|
@@ -9597,7 +9674,7 @@ interface LuaFluidBox {
|
|
|
9597
9674
|
* @param filter The filter to set. Setting `nil` clears the filter.
|
|
9598
9675
|
* @returns Whether the filter was set successfully.
|
|
9599
9676
|
*/
|
|
9600
|
-
set_filter(this: void, index:
|
|
9677
|
+
set_filter(this: void, index: uint32, filter: FluidBoxFilterSpec | nil): boolean;
|
|
9601
9678
|
/**
|
|
9602
9679
|
* 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
9680
|
*/
|
|
@@ -9625,7 +9702,7 @@ interface LuaFluidBox {
|
|
|
9625
9702
|
/**
|
|
9626
9703
|
* Number of fluid boxes.
|
|
9627
9704
|
*/
|
|
9628
|
-
length: LuaLengthMethod<
|
|
9705
|
+
length: LuaLengthMethod<uint32>;
|
|
9629
9706
|
}
|
|
9630
9707
|
/**
|
|
9631
9708
|
* A prototype of a fluidbox owned by some {@link LuaEntityPrototype | runtime:LuaEntityPrototype}.
|
|
@@ -9642,7 +9719,7 @@ interface LuaFluidBoxPrototype {
|
|
|
9642
9719
|
/**
|
|
9643
9720
|
* The index of this fluidbox prototype in the owning entity.
|
|
9644
9721
|
*/
|
|
9645
|
-
readonly index:
|
|
9722
|
+
readonly index: uint32;
|
|
9646
9723
|
/**
|
|
9647
9724
|
* The maximum temperature, if any is set.
|
|
9648
9725
|
*/
|
|
@@ -9670,7 +9747,7 @@ interface LuaFluidBoxPrototype {
|
|
|
9670
9747
|
/**
|
|
9671
9748
|
* The secondary draw orders for the 4 possible connection directions.
|
|
9672
9749
|
*/
|
|
9673
|
-
readonly secondary_draw_orders:
|
|
9750
|
+
readonly secondary_draw_orders: int32[];
|
|
9674
9751
|
/**
|
|
9675
9752
|
* 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
9753
|
*/
|
|
@@ -9772,7 +9849,7 @@ interface LuaFontPrototype {
|
|
|
9772
9849
|
* 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
9850
|
*/
|
|
9774
9851
|
readonly object_name: string;
|
|
9775
|
-
readonly size:
|
|
9852
|
+
readonly size: int32;
|
|
9776
9853
|
readonly spacing: float;
|
|
9777
9854
|
/**
|
|
9778
9855
|
* 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 +9995,7 @@ interface LuaForce {
|
|
|
9918
9995
|
* @param name Prototype name of the entity.
|
|
9919
9996
|
* @returns Number of entities of given prototype belonging to this force.
|
|
9920
9997
|
*/
|
|
9921
|
-
get_entity_count(this: void, name: EntityID):
|
|
9998
|
+
get_entity_count(this: void, name: EntityID): uint32;
|
|
9922
9999
|
/**
|
|
9923
10000
|
* Fetches the evolution factor of this force on the given surface.
|
|
9924
10001
|
* @param surface Defaults to "nauvis".
|
|
@@ -9960,7 +10037,7 @@ interface LuaForce {
|
|
|
9960
10037
|
* @param item The item to get
|
|
9961
10038
|
* @returns The count of the item that has been launched.
|
|
9962
10039
|
*/
|
|
9963
|
-
get_item_launched(this: void, item: ItemID):
|
|
10040
|
+
get_item_launched(this: void, item: ItemID): uint32;
|
|
9964
10041
|
/**
|
|
9965
10042
|
* The item production statistics for this force for the given surface.
|
|
9966
10043
|
*/
|
|
@@ -9972,7 +10049,7 @@ interface LuaForce {
|
|
|
9972
10049
|
/**
|
|
9973
10050
|
* Gets the linked inventory for the given prototype and link ID if it exists or `nil`.
|
|
9974
10051
|
*/
|
|
9975
|
-
get_linked_inventory(this: void, prototype: EntityID, link_id:
|
|
10052
|
+
get_linked_inventory(this: void, prototype: EntityID, link_id: uint32): LuaInventory | null;
|
|
9976
10053
|
/**
|
|
9977
10054
|
* Gets the information about the given logistic group.
|
|
9978
10055
|
* @param type Defaults to `defines.logistic_group_type.with_trash`.
|
|
@@ -10135,7 +10212,7 @@ interface LuaForce {
|
|
|
10135
10212
|
* @param item The item to set
|
|
10136
10213
|
* @param count The count to set
|
|
10137
10214
|
*/
|
|
10138
|
-
set_item_launched(this: void, item: ItemID, count:
|
|
10215
|
+
set_item_launched(this: void, item: ItemID, count: uint32): void;
|
|
10139
10216
|
/**
|
|
10140
10217
|
* @param position The new position on the given surface.
|
|
10141
10218
|
* @param surface Surface to set the spawn position for.
|
|
@@ -10182,25 +10259,25 @@ interface LuaForce {
|
|
|
10182
10259
|
/**
|
|
10183
10260
|
* Belt stack size bonus.
|
|
10184
10261
|
*/
|
|
10185
|
-
belt_stack_size_bonus:
|
|
10262
|
+
belt_stack_size_bonus: uint32;
|
|
10186
10263
|
/**
|
|
10187
10264
|
* Number of items that can be transferred by bulk inserters. When writing to this value, it must be >= 0 and <= 254.
|
|
10188
10265
|
*/
|
|
10189
|
-
bulk_inserter_capacity_bonus:
|
|
10190
|
-
character_build_distance_bonus:
|
|
10266
|
+
bulk_inserter_capacity_bonus: uint32;
|
|
10267
|
+
character_build_distance_bonus: uint32;
|
|
10191
10268
|
character_health_bonus: double;
|
|
10192
10269
|
/**
|
|
10193
10270
|
* The number of additional inventory slots the character main inventory has.
|
|
10194
10271
|
*/
|
|
10195
|
-
character_inventory_slots_bonus:
|
|
10196
|
-
character_item_drop_distance_bonus:
|
|
10272
|
+
character_inventory_slots_bonus: uint32;
|
|
10273
|
+
character_item_drop_distance_bonus: uint32;
|
|
10197
10274
|
character_item_pickup_distance_bonus: double;
|
|
10198
10275
|
/**
|
|
10199
10276
|
* `true` if character requester logistics is enabled.
|
|
10200
10277
|
*/
|
|
10201
10278
|
character_logistic_requests: boolean;
|
|
10202
10279
|
character_loot_pickup_distance_bonus: double;
|
|
10203
|
-
character_reach_distance_bonus:
|
|
10280
|
+
character_reach_distance_bonus: uint32;
|
|
10204
10281
|
character_resource_reach_distance_bonus: double;
|
|
10205
10282
|
/**
|
|
10206
10283
|
* 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 +10319,7 @@ interface LuaForce {
|
|
|
10242
10319
|
/**
|
|
10243
10320
|
* The time, in ticks, before a deconstruction order is removed.
|
|
10244
10321
|
*/
|
|
10245
|
-
deconstruction_time_to_live:
|
|
10322
|
+
deconstruction_time_to_live: uint32;
|
|
10246
10323
|
/**
|
|
10247
10324
|
* Additional lifetime for following robots.
|
|
10248
10325
|
*/
|
|
@@ -10254,7 +10331,7 @@ interface LuaForce {
|
|
|
10254
10331
|
/**
|
|
10255
10332
|
* 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
10333
|
*/
|
|
10257
|
-
readonly index:
|
|
10334
|
+
readonly index: uint32;
|
|
10258
10335
|
/**
|
|
10259
10336
|
* The inserter stack size bonus for non stack inserters
|
|
10260
10337
|
*/
|
|
@@ -10285,12 +10362,12 @@ interface LuaForce {
|
|
|
10285
10362
|
```
|
|
10286
10363
|
*/
|
|
10287
10364
|
manual_mining_speed_modifier: double;
|
|
10288
|
-
max_failed_attempts_per_tick_per_construction_queue:
|
|
10289
|
-
max_successful_attempts_per_tick_per_construction_queue:
|
|
10365
|
+
max_failed_attempts_per_tick_per_construction_queue: uint32;
|
|
10366
|
+
max_successful_attempts_per_tick_per_construction_queue: uint32;
|
|
10290
10367
|
/**
|
|
10291
10368
|
* Maximum number of follower robots.
|
|
10292
10369
|
*/
|
|
10293
|
-
maximum_following_robot_count:
|
|
10370
|
+
maximum_following_robot_count: uint32;
|
|
10294
10371
|
mining_drill_productivity_bonus: double;
|
|
10295
10372
|
mining_with_fluid: boolean;
|
|
10296
10373
|
/**
|
|
@@ -10309,7 +10386,7 @@ interface LuaForce {
|
|
|
10309
10386
|
*
|
|
10310
10387
|
* This will include platforms that are pending deletion.
|
|
10311
10388
|
*/
|
|
10312
|
-
readonly platforms:
|
|
10389
|
+
readonly platforms: LuaTable<uint32, LuaSpacePlatform>;
|
|
10313
10390
|
/**
|
|
10314
10391
|
* Players belonging to this force.
|
|
10315
10392
|
*/
|
|
@@ -10347,7 +10424,7 @@ interface LuaForce {
|
|
|
10347
10424
|
/**
|
|
10348
10425
|
* The number of rockets launched.
|
|
10349
10426
|
*/
|
|
10350
|
-
rockets_launched:
|
|
10427
|
+
rockets_launched: uint32;
|
|
10351
10428
|
/**
|
|
10352
10429
|
* If sharing chart data is enabled for this force.
|
|
10353
10430
|
*/
|
|
@@ -10484,7 +10561,7 @@ interface LuaGameScript {
|
|
|
10484
10561
|
*
|
|
10485
10562
|
* *Make sure* you actually want to use this over math.random(...) as this provides entirely different functionality over math.random(...).
|
|
10486
10563
|
*/
|
|
10487
|
-
create_random_generator(this: void, seed?:
|
|
10564
|
+
create_random_generator(this: void, seed?: uint32): LuaRandomGenerator;
|
|
10488
10565
|
/**
|
|
10489
10566
|
* Create a new surface.
|
|
10490
10567
|
*
|
|
@@ -10515,7 +10592,7 @@ interface LuaGameScript {
|
|
|
10515
10592
|
/**
|
|
10516
10593
|
* 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
10594
|
*/
|
|
10518
|
-
get_entity_by_unit_number(this: void, unit_number:
|
|
10595
|
+
get_entity_by_unit_number(this: void, unit_number: uint32): LuaEntity | null;
|
|
10519
10596
|
/**
|
|
10520
10597
|
* Gets the map exchange string for the map generation settings that were used to create this map.
|
|
10521
10598
|
*/
|
|
@@ -10524,7 +10601,7 @@ interface LuaGameScript {
|
|
|
10524
10601
|
* Gets the given player or returns `nil` if no player is found.
|
|
10525
10602
|
* @param player The player index or name.
|
|
10526
10603
|
*/
|
|
10527
|
-
get_player(this: void, player:
|
|
10604
|
+
get_player(this: void, player: uint32 | string): LuaPlayer | null;
|
|
10528
10605
|
/**
|
|
10529
10606
|
* The pollution statistics for this the given surface.
|
|
10530
10607
|
*/
|
|
@@ -10543,13 +10620,12 @@ interface LuaGameScript {
|
|
|
10543
10620
|
* This is a shortcut for {@link LuaGameScript::surfaces | runtime:LuaGameScript::surfaces}.
|
|
10544
10621
|
* @param surface The surface index or name.
|
|
10545
10622
|
*/
|
|
10546
|
-
get_surface(this: void, surface:
|
|
10623
|
+
get_surface(this: void, surface: uint32 | string): LuaSurface | null;
|
|
10547
10624
|
/**
|
|
10548
|
-
* Returns vehicles in game
|
|
10549
|
-
* @param table.surface )
|
|
10625
|
+
* Returns vehicles in game.
|
|
10550
10626
|
*/
|
|
10551
10627
|
get_vehicles(this: void, table: {
|
|
10552
|
-
unit_number?:
|
|
10628
|
+
unit_number?: uint32;
|
|
10553
10629
|
force?: ForceID;
|
|
10554
10630
|
surface?: SurfaceIdentification;
|
|
10555
10631
|
type?: EntityID | EntityID[];
|
|
@@ -10737,10 +10813,10 @@ interface LuaGameScript {
|
|
|
10737
10813
|
anti_alias?: boolean;
|
|
10738
10814
|
hide_clouds?: boolean;
|
|
10739
10815
|
hide_fog?: boolean;
|
|
10740
|
-
quality?:
|
|
10816
|
+
quality?: int32;
|
|
10741
10817
|
allow_in_replay?: boolean;
|
|
10742
10818
|
daytime?: double;
|
|
10743
|
-
water_tick?:
|
|
10819
|
+
water_tick?: uint32;
|
|
10744
10820
|
force_render?: boolean;
|
|
10745
10821
|
}): void;
|
|
10746
10822
|
/**
|
|
@@ -10756,7 +10832,7 @@ interface LuaGameScript {
|
|
|
10756
10832
|
player: PlayerIdentification;
|
|
10757
10833
|
selected_technology?: TechnologyID;
|
|
10758
10834
|
skip_disabled?: boolean;
|
|
10759
|
-
quality?:
|
|
10835
|
+
quality?: int32;
|
|
10760
10836
|
}): void;
|
|
10761
10837
|
/**
|
|
10762
10838
|
* 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 +10863,7 @@ interface LuaGameScript {
|
|
|
10787
10863
|
/**
|
|
10788
10864
|
* 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
10865
|
*/
|
|
10790
|
-
readonly backer_names:
|
|
10866
|
+
readonly backer_names: LuaTable<uint32, string>;
|
|
10791
10867
|
/**
|
|
10792
10868
|
* Records contained in the "game blueprints" tab of the blueprint library.
|
|
10793
10869
|
*/
|
|
@@ -10837,7 +10913,7 @@ interface LuaGameScript {
|
|
|
10837
10913
|
/**
|
|
10838
10914
|
* 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
10915
|
*/
|
|
10840
|
-
readonly forces:
|
|
10916
|
+
readonly forces: LuaTable<uint32 | string, LuaForce>;
|
|
10841
10917
|
/**
|
|
10842
10918
|
* 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
10919
|
*
|
|
@@ -10861,7 +10937,7 @@ interface LuaGameScript {
|
|
|
10861
10937
|
*
|
|
10862
10938
|
* 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
10939
|
*/
|
|
10864
|
-
readonly players:
|
|
10940
|
+
readonly players: LuaTable<uint32 | string, LuaPlayer>;
|
|
10865
10941
|
/**
|
|
10866
10942
|
* Simulation-related functions, or `nil` if the current game is not a simulation.
|
|
10867
10943
|
*/
|
|
@@ -10873,7 +10949,7 @@ interface LuaGameScript {
|
|
|
10873
10949
|
/**
|
|
10874
10950
|
* 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
10951
|
*/
|
|
10876
|
-
readonly surfaces:
|
|
10952
|
+
readonly surfaces: LuaTable<uint32 | string, LuaSurface>;
|
|
10877
10953
|
/**
|
|
10878
10954
|
* True by default. Can be used to prevent the game engine from printing certain messages.
|
|
10879
10955
|
* Prevented messages:
|
|
@@ -10903,7 +10979,7 @@ interface LuaGameScript {
|
|
|
10903
10979
|
*
|
|
10904
10980
|
* 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
10981
|
*/
|
|
10906
|
-
ticks_to_run:
|
|
10982
|
+
ticks_to_run: uint32;
|
|
10907
10983
|
readonly train_manager: LuaTrainManager;
|
|
10908
10984
|
}
|
|
10909
10985
|
/**
|
|
@@ -10922,7 +10998,7 @@ interface LuaGenericOnOffControlBehavior extends LuaControlBehavior {
|
|
|
10922
10998
|
}
|
|
10923
10999
|
```
|
|
10924
11000
|
*/
|
|
10925
|
-
circuit_condition
|
|
11001
|
+
circuit_condition?: CircuitConditionDefinition;
|
|
10926
11002
|
/**
|
|
10927
11003
|
* `true` if this entity enable/disable state is controlled by circuit condition
|
|
10928
11004
|
*/
|
|
@@ -10947,7 +11023,7 @@ interface LuaGenericOnOffControlBehavior extends LuaControlBehavior {
|
|
|
10947
11023
|
}
|
|
10948
11024
|
```
|
|
10949
11025
|
*/
|
|
10950
|
-
logistic_condition
|
|
11026
|
+
logistic_condition?: CircuitConditionDefinition;
|
|
10951
11027
|
}
|
|
10952
11028
|
/**
|
|
10953
11029
|
* Item group or subgroup.
|
|
@@ -11066,7 +11142,7 @@ interface LuaGuiElement {
|
|
|
11066
11142
|
* @param string The text to insert.
|
|
11067
11143
|
* @param index The index at which to insert the item.
|
|
11068
11144
|
*/
|
|
11069
|
-
add_item(this: void, string: LocalisedString, index?:
|
|
11145
|
+
add_item(this: void, string: LocalisedString, index?: uint32): void;
|
|
11070
11146
|
/**
|
|
11071
11147
|
* Adds the given tab and content widgets to this tabbed pane as a new tab.
|
|
11072
11148
|
* @param tab The tab to add, must be a GUI element of type "tab".
|
|
@@ -11116,12 +11192,12 @@ interface LuaGuiElement {
|
|
|
11116
11192
|
*
|
|
11117
11193
|
* 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
11194
|
*/
|
|
11119
|
-
get_index_in_parent(this: void):
|
|
11195
|
+
get_index_in_parent(this: void): uint32;
|
|
11120
11196
|
/**
|
|
11121
11197
|
* Gets the item at the given index from this dropdown or listbox.
|
|
11122
11198
|
* @param index The index to get
|
|
11123
11199
|
*/
|
|
11124
|
-
get_item(this: void, index:
|
|
11200
|
+
get_item(this: void, index: uint32): LocalisedString;
|
|
11125
11201
|
/**
|
|
11126
11202
|
* The mod that owns this Gui element or `nil` if it's owned by the scenario script.
|
|
11127
11203
|
*
|
|
@@ -11148,7 +11224,7 @@ interface LuaGuiElement {
|
|
|
11148
11224
|
* Removes the item at the given index from this dropdown or listbox.
|
|
11149
11225
|
* @param index The index
|
|
11150
11226
|
*/
|
|
11151
|
-
remove_item(this: void, index:
|
|
11227
|
+
remove_item(this: void, index: uint32): void;
|
|
11152
11228
|
/**
|
|
11153
11229
|
* Removes the given tab and its associated content from this tabbed pane.
|
|
11154
11230
|
*
|
|
@@ -11171,7 +11247,7 @@ interface LuaGuiElement {
|
|
|
11171
11247
|
* @param index The item index to scroll to.
|
|
11172
11248
|
* @param scroll_mode Where the item should be positioned in the list-box. Defaults to `"in-view"`.
|
|
11173
11249
|
*/
|
|
11174
|
-
scroll_to_item(this: void, index:
|
|
11250
|
+
scroll_to_item(this: void, index: int32, scroll_mode?: 'in-view' | 'top-third'): void;
|
|
11175
11251
|
/**
|
|
11176
11252
|
* Scrolls this scroll bar to the left.
|
|
11177
11253
|
*/
|
|
@@ -11197,7 +11273,7 @@ interface LuaGuiElement {
|
|
|
11197
11273
|
textbox.select(1, 0)
|
|
11198
11274
|
```
|
|
11199
11275
|
*/
|
|
11200
|
-
select(this: void, start_index:
|
|
11276
|
+
select(this: void, start_index: int32, end_index: int32): void;
|
|
11201
11277
|
/**
|
|
11202
11278
|
* Selects all the text in this textbox.
|
|
11203
11279
|
*/
|
|
@@ -11207,7 +11283,7 @@ interface LuaGuiElement {
|
|
|
11207
11283
|
* @param index The index whose text to replace.
|
|
11208
11284
|
* @param string The text to set at the given index.
|
|
11209
11285
|
*/
|
|
11210
|
-
set_item(this: void, index:
|
|
11286
|
+
set_item(this: void, index: uint32, string: LocalisedString): void;
|
|
11211
11287
|
/**
|
|
11212
11288
|
* Sets whether this slider only allows discrete values.
|
|
11213
11289
|
*/
|
|
@@ -11225,7 +11301,7 @@ interface LuaGuiElement {
|
|
|
11225
11301
|
* @param index_1 The index of the first child.
|
|
11226
11302
|
* @param index_2 The index of the second child.
|
|
11227
11303
|
*/
|
|
11228
|
-
swap_children(this: void, index_1:
|
|
11304
|
+
swap_children(this: void, index_1: uint32, index_2: uint32): void;
|
|
11229
11305
|
/**
|
|
11230
11306
|
* Whether this textfield (when in numeric mode) allows decimal numbers.
|
|
11231
11307
|
*/
|
|
@@ -11277,7 +11353,7 @@ interface LuaGuiElement {
|
|
|
11277
11353
|
/**
|
|
11278
11354
|
* The number of columns in this table.
|
|
11279
11355
|
*/
|
|
11280
|
-
readonly column_count:
|
|
11356
|
+
readonly column_count: uint32;
|
|
11281
11357
|
/**
|
|
11282
11358
|
* Direction of this element's layout.
|
|
11283
11359
|
*/
|
|
@@ -11317,7 +11393,7 @@ interface LuaGuiElement {
|
|
|
11317
11393
|
```
|
|
11318
11394
|
* @example ```
|
|
11319
11395
|
-- 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
|
|
11396
|
+
-- choose-elem-button of type "entity" to only show entities that have their `hidden` property set to `true`.
|
|
11321
11397
|
button.elem_filters = {{filter = "hidden"}}
|
|
11322
11398
|
```
|
|
11323
11399
|
* @example ```
|
|
@@ -11373,6 +11449,10 @@ interface LuaGuiElement {
|
|
|
11373
11449
|
* The sprite to display on this sprite-button when it is hovered.
|
|
11374
11450
|
*/
|
|
11375
11451
|
hovered_sprite: SpritePath;
|
|
11452
|
+
/**
|
|
11453
|
+
* Whether this textfield or text-box was created with an icon selector.
|
|
11454
|
+
*/
|
|
11455
|
+
readonly icon_selector: boolean;
|
|
11376
11456
|
/**
|
|
11377
11457
|
* 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
11458
|
*/
|
|
@@ -11380,7 +11460,7 @@ interface LuaGuiElement {
|
|
|
11380
11460
|
/**
|
|
11381
11461
|
* The index of this GUI element (unique amongst the GUI elements of a LuaPlayer).
|
|
11382
11462
|
*/
|
|
11383
|
-
readonly index:
|
|
11463
|
+
readonly index: uint32;
|
|
11384
11464
|
/**
|
|
11385
11465
|
* Whether this textfield displays as a password field, which renders all characters as `*`.
|
|
11386
11466
|
*/
|
|
@@ -11412,7 +11492,7 @@ interface LuaGuiElement {
|
|
|
11412
11492
|
/**
|
|
11413
11493
|
* The player index this minimap is using.
|
|
11414
11494
|
*/
|
|
11415
|
-
minimap_player_index:
|
|
11495
|
+
minimap_player_index: uint32;
|
|
11416
11496
|
/**
|
|
11417
11497
|
* The mouse button filters for this button or sprite-button.
|
|
11418
11498
|
*/
|
|
@@ -11443,7 +11523,7 @@ interface LuaGuiElement {
|
|
|
11443
11523
|
/**
|
|
11444
11524
|
* Index into {@link LuaGameScript::players | runtime:LuaGameScript::players} specifying the player who owns this element.
|
|
11445
11525
|
*/
|
|
11446
|
-
readonly player_index:
|
|
11526
|
+
readonly player_index: uint32;
|
|
11447
11527
|
/**
|
|
11448
11528
|
* The position this camera or minimap is focused on, if any.
|
|
11449
11529
|
*/
|
|
@@ -11484,11 +11564,11 @@ interface LuaGuiElement {
|
|
|
11484
11564
|
/**
|
|
11485
11565
|
* The selected index for this dropdown or listbox. Returns `0` if none is selected.
|
|
11486
11566
|
*/
|
|
11487
|
-
selected_index:
|
|
11567
|
+
selected_index: uint32;
|
|
11488
11568
|
/**
|
|
11489
11569
|
* The selected tab index for this tabbed pane, if any.
|
|
11490
11570
|
*/
|
|
11491
|
-
selected_tab_index?:
|
|
11571
|
+
selected_tab_index?: uint32;
|
|
11492
11572
|
/**
|
|
11493
11573
|
* 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
11574
|
*/
|
|
@@ -11512,7 +11592,7 @@ interface LuaGuiElement {
|
|
|
11512
11592
|
/**
|
|
11513
11593
|
* The surface index this camera or minimap is using.
|
|
11514
11594
|
*/
|
|
11515
|
-
surface_index:
|
|
11595
|
+
surface_index: uint32;
|
|
11516
11596
|
/**
|
|
11517
11597
|
* The switch state for this switch.
|
|
11518
11598
|
*
|
|
@@ -11609,7 +11689,7 @@ interface BaseLuaGuiElementAddParams {
|
|
|
11609
11689
|
/**
|
|
11610
11690
|
* Location in its parent that the child element should slot into. By default, the child will be appended onto the end.
|
|
11611
11691
|
*/
|
|
11612
|
-
'index'?:
|
|
11692
|
+
'index'?: uint32;
|
|
11613
11693
|
/**
|
|
11614
11694
|
* Whether the child element is locked. Defaults to `false`.
|
|
11615
11695
|
*/
|
|
@@ -11681,7 +11761,7 @@ interface LuaGuiElementAddParamsCamera extends BaseLuaGuiElementAddParams {
|
|
|
11681
11761
|
/**
|
|
11682
11762
|
* The surface that the camera will render. Defaults to the player's current surface.
|
|
11683
11763
|
*/
|
|
11684
|
-
'surface_index'?:
|
|
11764
|
+
'surface_index'?: uint32;
|
|
11685
11765
|
/**
|
|
11686
11766
|
* The initial camera zoom. Defaults to `0.75`.
|
|
11687
11767
|
*/
|
|
@@ -11803,7 +11883,7 @@ interface LuaGuiElementAddParamsDropDown extends BaseLuaGuiElementAddParams {
|
|
|
11803
11883
|
/**
|
|
11804
11884
|
* The index of the initially selected item. Defaults to 0.
|
|
11805
11885
|
*/
|
|
11806
|
-
'selected_index'?:
|
|
11886
|
+
'selected_index'?: uint32;
|
|
11807
11887
|
}
|
|
11808
11888
|
/**
|
|
11809
11889
|
*
|
|
@@ -11863,7 +11943,7 @@ interface LuaGuiElementAddParamsListBox extends BaseLuaGuiElementAddParams {
|
|
|
11863
11943
|
/**
|
|
11864
11944
|
* The index of the initially selected item. Defaults to 0.
|
|
11865
11945
|
*/
|
|
11866
|
-
'selected_index'?:
|
|
11946
|
+
'selected_index'?: uint32;
|
|
11867
11947
|
}
|
|
11868
11948
|
/**
|
|
11869
11949
|
*
|
|
@@ -11877,7 +11957,7 @@ interface LuaGuiElementAddParamsMinimap extends BaseLuaGuiElementAddParams {
|
|
|
11877
11957
|
/**
|
|
11878
11958
|
* The player index the map should use. Defaults to the current player.
|
|
11879
11959
|
*/
|
|
11880
|
-
'chart_player_index'?:
|
|
11960
|
+
'chart_player_index'?: uint32;
|
|
11881
11961
|
/**
|
|
11882
11962
|
* The force this minimap should use. Defaults to the player's current force.
|
|
11883
11963
|
*/
|
|
@@ -11889,7 +11969,7 @@ interface LuaGuiElementAddParamsMinimap extends BaseLuaGuiElementAddParams {
|
|
|
11889
11969
|
/**
|
|
11890
11970
|
* The surface the camera will render. Defaults to the player's current surface.
|
|
11891
11971
|
*/
|
|
11892
|
-
'surface_index'?:
|
|
11972
|
+
'surface_index'?: uint32;
|
|
11893
11973
|
/**
|
|
11894
11974
|
* The initial camera zoom. Defaults to `0.75`.
|
|
11895
11975
|
*/
|
|
@@ -12083,7 +12163,7 @@ interface LuaGuiElementAddParamsTable extends BaseLuaGuiElementAddParams {
|
|
|
12083
12163
|
/**
|
|
12084
12164
|
* Number of columns. This can't be changed after the table is created.
|
|
12085
12165
|
*/
|
|
12086
|
-
'column_count':
|
|
12166
|
+
'column_count': uint32;
|
|
12087
12167
|
/**
|
|
12088
12168
|
* Whether the table should draw a single horizontal grid line after the headers. Defaults to `false`.
|
|
12089
12169
|
*/
|
|
@@ -12224,7 +12304,7 @@ interface LuaHelpers {
|
|
|
12224
12304
|
* @param second Second version string to compare.
|
|
12225
12305
|
* @returns -1 if first is smaller than second, 0 if first equal second, 1 if first is greater than second.
|
|
12226
12306
|
*/
|
|
12227
|
-
compare_versions(this: void, first: string, second: string):
|
|
12307
|
+
compare_versions(this: void, first: string, second: string): int32;
|
|
12228
12308
|
/**
|
|
12229
12309
|
* Creates a {@link LuaProfiler | runtime:LuaProfiler}, which is used for measuring script performance.
|
|
12230
12310
|
*
|
|
@@ -12281,6 +12361,11 @@ interface LuaHelpers {
|
|
|
12281
12361
|
* @returns The returned object, or `nil` if the JSON string was invalid.
|
|
12282
12362
|
*/
|
|
12283
12363
|
json_to_table(this: void, json: string): AnyBasic | null;
|
|
12364
|
+
/**
|
|
12365
|
+
* 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}.
|
|
12366
|
+
* @returns The input string converted to lowercase.
|
|
12367
|
+
*/
|
|
12368
|
+
multilingual_to_lower(this: void, input: string): string;
|
|
12284
12369
|
/**
|
|
12285
12370
|
* Convert a map exchange string to map gen settings and map settings.
|
|
12286
12371
|
*
|
|
@@ -12299,7 +12384,7 @@ interface LuaHelpers {
|
|
|
12299
12384
|
* Not available in settings and prototype stages.
|
|
12300
12385
|
* @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
12386
|
*/
|
|
12302
|
-
recv_udp(this: void, for_player?:
|
|
12387
|
+
recv_udp(this: void, for_player?: uint32): void;
|
|
12303
12388
|
/**
|
|
12304
12389
|
* 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
12390
|
* @param path The path to the file or directory to remove, relative to `script-output`.
|
|
@@ -12313,7 +12398,7 @@ interface LuaHelpers {
|
|
|
12313
12398
|
* @param data The content to send.
|
|
12314
12399
|
* @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
12400
|
*/
|
|
12316
|
-
send_udp(this: void, port: uint16, data: LocalisedString, for_player?:
|
|
12401
|
+
send_udp(this: void, port: uint16, data: LocalisedString, for_player?: uint32): void;
|
|
12317
12402
|
/**
|
|
12318
12403
|
* Convert a table to a JSON string
|
|
12319
12404
|
*/
|
|
@@ -12325,7 +12410,7 @@ interface LuaHelpers {
|
|
|
12325
12410
|
* @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
12411
|
* @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
12412
|
*/
|
|
12328
|
-
write_file(this: void, filename: string, data: LocalisedString, append?: boolean, for_player?:
|
|
12413
|
+
write_file(this: void, filename: string, data: LocalisedString, append?: boolean, for_player?: uint32): void;
|
|
12329
12414
|
/**
|
|
12330
12415
|
* Current version of game
|
|
12331
12416
|
*/
|
|
@@ -12383,9 +12468,9 @@ interface LuaInventory {
|
|
|
12383
12468
|
* @param index The item stack index
|
|
12384
12469
|
* @param filter The item filter
|
|
12385
12470
|
*/
|
|
12386
|
-
can_set_filter(this: void, index:
|
|
12471
|
+
can_set_filter(this: void, index: uint32, filter: ItemFilter): boolean;
|
|
12387
12472
|
/**
|
|
12388
|
-
*
|
|
12473
|
+
* Clear this inventory of all items so that it becomes empty.
|
|
12389
12474
|
*/
|
|
12390
12475
|
clear(this: void): void;
|
|
12391
12476
|
/**
|
|
@@ -12393,7 +12478,7 @@ interface LuaInventory {
|
|
|
12393
12478
|
* @param include_filtered If true, filtered slots will be included. Defaults to false.
|
|
12394
12479
|
* @param include_bar If true, slots blocked by the current bar will be included. Defaults to true.
|
|
12395
12480
|
*/
|
|
12396
|
-
count_empty_stacks(this: void, include_filtered?: boolean, include_bar?: boolean):
|
|
12481
|
+
count_empty_stacks(this: void, include_filtered?: boolean, include_bar?: boolean): uint32;
|
|
12397
12482
|
/**
|
|
12398
12483
|
* Destroys this inventory.
|
|
12399
12484
|
*
|
|
@@ -12408,7 +12493,7 @@ interface LuaInventory {
|
|
|
12408
12493
|
*/
|
|
12409
12494
|
find_empty_stack(this: void, item?: ItemWithQualityID): LuaMultiReturn<[
|
|
12410
12495
|
LuaItemStack | null,
|
|
12411
|
-
|
|
12496
|
+
uint32 | null
|
|
12412
12497
|
]>;
|
|
12413
12498
|
/**
|
|
12414
12499
|
* Finds the first LuaItemStack in the inventory that matches the given item name.
|
|
@@ -12418,14 +12503,14 @@ interface LuaInventory {
|
|
|
12418
12503
|
*/
|
|
12419
12504
|
find_item_stack(this: void, item: ItemWithQualityID): LuaMultiReturn<[
|
|
12420
12505
|
LuaItemStack | null,
|
|
12421
|
-
|
|
12506
|
+
uint32 | null
|
|
12422
12507
|
]>;
|
|
12423
12508
|
/**
|
|
12424
12509
|
* Get the current bar. This is the index at which the red area starts.
|
|
12425
12510
|
*
|
|
12426
12511
|
* Only useable if this inventory supports having a bar.
|
|
12427
12512
|
*/
|
|
12428
|
-
get_bar(this: void):
|
|
12513
|
+
get_bar(this: void): uint32;
|
|
12429
12514
|
/**
|
|
12430
12515
|
* Get counts of all items in this inventory.
|
|
12431
12516
|
* @returns List of all items in the inventory.
|
|
@@ -12436,7 +12521,7 @@ interface LuaInventory {
|
|
|
12436
12521
|
* @param index The item stack index
|
|
12437
12522
|
* @returns The current filter or `nil` if none.
|
|
12438
12523
|
*/
|
|
12439
|
-
get_filter(this: void, index:
|
|
12524
|
+
get_filter(this: void, index: uint32): ItemFilter | null;
|
|
12440
12525
|
/**
|
|
12441
12526
|
* Gets the number of the given item that can be inserted into this inventory.
|
|
12442
12527
|
*
|
|
@@ -12445,18 +12530,26 @@ interface LuaInventory {
|
|
|
12445
12530
|
* This accounts for the 'bar' on the inventory.
|
|
12446
12531
|
* @param item The item to check.
|
|
12447
12532
|
*/
|
|
12448
|
-
get_insertable_count(this: void, item: ItemWithQualityID):
|
|
12533
|
+
get_insertable_count(this: void, item: ItemWithQualityID): uint32;
|
|
12449
12534
|
/**
|
|
12450
12535
|
* Get the number of all or some items in this inventory.
|
|
12451
12536
|
* @param item The item to count. If not specified, count all items.
|
|
12452
12537
|
*/
|
|
12453
|
-
get_item_count(this: void, item?: ItemWithQualityID):
|
|
12538
|
+
get_item_count(this: void, item?: ItemWithQualityID): uint32;
|
|
12539
|
+
/**
|
|
12540
|
+
* Get the number of items in this inventory that match provided filter.
|
|
12541
|
+
*/
|
|
12542
|
+
get_item_count_filtered(this: void, filter: ItemFilter): uint32;
|
|
12543
|
+
/**
|
|
12544
|
+
* Get the number of all or some items in this inventory, aggregated by quality.
|
|
12545
|
+
*/
|
|
12546
|
+
get_item_quality_counts(this: void, item?: ItemID): Record<string, uint32>;
|
|
12454
12547
|
/**
|
|
12455
12548
|
* Insert items into this inventory.
|
|
12456
12549
|
* @param items Items to insert.
|
|
12457
12550
|
* @returns Number of items actually inserted.
|
|
12458
12551
|
*/
|
|
12459
|
-
insert(this: void, items: ItemStackIdentification):
|
|
12552
|
+
insert(this: void, items: ItemStackIdentification): uint32;
|
|
12460
12553
|
/**
|
|
12461
12554
|
* Does this inventory contain nothing?
|
|
12462
12555
|
*/
|
|
@@ -12476,7 +12569,7 @@ interface LuaInventory {
|
|
|
12476
12569
|
* @param items Items to remove.
|
|
12477
12570
|
* @returns Number of items actually removed.
|
|
12478
12571
|
*/
|
|
12479
|
-
remove(this: void, items: ItemStackIdentification):
|
|
12572
|
+
remove(this: void, items: ItemStackIdentification): uint32;
|
|
12480
12573
|
/**
|
|
12481
12574
|
* Resizes the inventory.
|
|
12482
12575
|
*
|
|
@@ -12492,7 +12585,7 @@ interface LuaInventory {
|
|
|
12492
12585
|
* Only useable if this inventory supports having a bar.
|
|
12493
12586
|
* @param bar The new limit. Omitting this parameter or passing `nil` will clear the limit.
|
|
12494
12587
|
*/
|
|
12495
|
-
set_bar(this: void, bar?:
|
|
12588
|
+
set_bar(this: void, bar?: uint32): void;
|
|
12496
12589
|
/**
|
|
12497
12590
|
* Sets the filter for the given item stack index.
|
|
12498
12591
|
*
|
|
@@ -12501,7 +12594,7 @@ interface LuaInventory {
|
|
|
12501
12594
|
* @param filter The new filter. `nil` erases any existing filter.
|
|
12502
12595
|
* @returns If the filter was allowed to be set.
|
|
12503
12596
|
*/
|
|
12504
|
-
set_filter(this: void, index:
|
|
12597
|
+
set_filter(this: void, index: uint32, filter: ItemFilter | nil): boolean;
|
|
12505
12598
|
/**
|
|
12506
12599
|
* Sorts and merges the items in this inventory.
|
|
12507
12600
|
*/
|
|
@@ -12579,7 +12672,7 @@ interface LuaInventory {
|
|
|
12579
12672
|
game.player.print(#game.player.get_main_inventory())
|
|
12580
12673
|
```
|
|
12581
12674
|
*/
|
|
12582
|
-
length: LuaLengthMethod<
|
|
12675
|
+
length: LuaLengthMethod<uint32>;
|
|
12583
12676
|
}
|
|
12584
12677
|
/**
|
|
12585
12678
|
* 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 +12787,7 @@ interface LuaItemCommon {
|
|
|
12694
12787
|
include_station_names?: boolean;
|
|
12695
12788
|
include_trains?: boolean;
|
|
12696
12789
|
include_fuel?: boolean;
|
|
12697
|
-
}):
|
|
12790
|
+
}): LuaTable<uint32, LuaEntity>;
|
|
12698
12791
|
/**
|
|
12699
12792
|
* Deconstruct the given area with this deconstruction item.
|
|
12700
12793
|
* @param table.surface Surface to deconstruct on
|
|
@@ -12719,17 +12812,17 @@ interface LuaItemCommon {
|
|
|
12719
12812
|
/**
|
|
12720
12813
|
* Gets the number of entities in this blueprint item.
|
|
12721
12814
|
*/
|
|
12722
|
-
get_blueprint_entity_count(this: void):
|
|
12815
|
+
get_blueprint_entity_count(this: void): uint32;
|
|
12723
12816
|
/**
|
|
12724
12817
|
* Gets the given tag on the given blueprint entity index in this blueprint item.
|
|
12725
12818
|
* @param index The entity index.
|
|
12726
12819
|
* @param tag The tag to get.
|
|
12727
12820
|
*/
|
|
12728
|
-
get_blueprint_entity_tag(this: void, index:
|
|
12821
|
+
get_blueprint_entity_tag(this: void, index: uint32, tag: string): AnyBasic | null;
|
|
12729
12822
|
/**
|
|
12730
12823
|
* Gets the tags for the given blueprint entity index in this blueprint item.
|
|
12731
12824
|
*/
|
|
12732
|
-
get_blueprint_entity_tags(this: void, index:
|
|
12825
|
+
get_blueprint_entity_tags(this: void, index: uint32): Tags;
|
|
12733
12826
|
/**
|
|
12734
12827
|
* A list of the tiles in this blueprint.
|
|
12735
12828
|
*/
|
|
@@ -12737,7 +12830,7 @@ interface LuaItemCommon {
|
|
|
12737
12830
|
/**
|
|
12738
12831
|
* Gets the entity filter at the given index for this deconstruction item.
|
|
12739
12832
|
*/
|
|
12740
|
-
get_entity_filter(this: void, index:
|
|
12833
|
+
get_entity_filter(this: void, index: uint32): ItemFilter | null;
|
|
12741
12834
|
/**
|
|
12742
12835
|
* Access the inner inventory of an item.
|
|
12743
12836
|
* @param inventory Index of the inventory to access, which can only be {@link defines.inventory.item_main | runtime:defines.inventory.item_main}.
|
|
@@ -12750,7 +12843,7 @@ interface LuaItemCommon {
|
|
|
12750
12843
|
* 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
12844
|
* @param index The index of the mapper to read.
|
|
12752
12845
|
*/
|
|
12753
|
-
get_mapper(this: void, index:
|
|
12846
|
+
get_mapper(this: void, index: uint32, type: 'from' | 'to'): (UpgradeMapperSource | UpgradeMapperDestination) | null;
|
|
12754
12847
|
/**
|
|
12755
12848
|
* Gets the tag with the given name or returns `nil` if it doesn't exist.
|
|
12756
12849
|
*/
|
|
@@ -12758,7 +12851,7 @@ interface LuaItemCommon {
|
|
|
12758
12851
|
/**
|
|
12759
12852
|
* Gets the tile filter at the given index for this deconstruction item.
|
|
12760
12853
|
*/
|
|
12761
|
-
get_tile_filter(this: void, index:
|
|
12854
|
+
get_tile_filter(this: void, index: uint32): string | null;
|
|
12762
12855
|
/**
|
|
12763
12856
|
* Is this blueprint item setup? I.e. is it a non-empty blueprint?
|
|
12764
12857
|
*/
|
|
@@ -12779,12 +12872,12 @@ interface LuaItemCommon {
|
|
|
12779
12872
|
* @param tag The tag to set.
|
|
12780
12873
|
* @param value The tag value to set or `nil` to clear the tag.
|
|
12781
12874
|
*/
|
|
12782
|
-
set_blueprint_entity_tag(this: void, index:
|
|
12875
|
+
set_blueprint_entity_tag(this: void, index: uint32, tag: string, value: AnyBasic): void;
|
|
12783
12876
|
/**
|
|
12784
12877
|
* Sets the tags on the given blueprint entity index in this blueprint item.
|
|
12785
12878
|
* @param index The entity index
|
|
12786
12879
|
*/
|
|
12787
|
-
set_blueprint_entity_tags(this: void, index:
|
|
12880
|
+
set_blueprint_entity_tags(this: void, index: uint32, tags: Tags): void;
|
|
12788
12881
|
/**
|
|
12789
12882
|
* Set specific tiles in this blueprint.
|
|
12790
12883
|
* @param tiles Tiles to be a part of the blueprint.
|
|
@@ -12795,7 +12888,7 @@ interface LuaItemCommon {
|
|
|
12795
12888
|
* @param filter Writing `nil` removes the filter.
|
|
12796
12889
|
* @returns Whether the new filter was successfully set (meaning it was valid).
|
|
12797
12890
|
*/
|
|
12798
|
-
set_entity_filter(this: void, index:
|
|
12891
|
+
set_entity_filter(this: void, index: uint32, filter: ItemFilter | nil): boolean;
|
|
12799
12892
|
/**
|
|
12800
12893
|
* Sets the module filter at the given index for this upgrade item.
|
|
12801
12894
|
*
|
|
@@ -12803,7 +12896,7 @@ interface LuaItemCommon {
|
|
|
12803
12896
|
* @param index The index of the mapper to set.
|
|
12804
12897
|
* @param mapper The mapper to set. Set `nil` to clear the mapper.
|
|
12805
12898
|
*/
|
|
12806
|
-
set_mapper(this: void, index:
|
|
12899
|
+
set_mapper(this: void, index: uint32, type: 'from' | 'to', mapper: UpgradeMapperSource | UpgradeMapperDestination | nil): void;
|
|
12807
12900
|
/**
|
|
12808
12901
|
* Sets the tag with the given name and value.
|
|
12809
12902
|
*/
|
|
@@ -12813,11 +12906,11 @@ interface LuaItemCommon {
|
|
|
12813
12906
|
* @param filter Writing `nil` removes the filter.
|
|
12814
12907
|
* @returns Whether the new filter was successfully set (meaning it was valid).
|
|
12815
12908
|
*/
|
|
12816
|
-
set_tile_filter(this: void, index:
|
|
12909
|
+
set_tile_filter(this: void, index: uint32, filter: string | LuaTilePrototype | LuaTile | nil): boolean;
|
|
12817
12910
|
/**
|
|
12818
12911
|
* The active blueprint index for this blueprint book. `nil` if this blueprint book is empty.
|
|
12819
12912
|
*/
|
|
12820
|
-
active_index?:
|
|
12913
|
+
active_index?: uint32;
|
|
12821
12914
|
/**
|
|
12822
12915
|
* Whether the label for this item can be manually changed. When false the label can only be changed through the API.
|
|
12823
12916
|
*/
|
|
@@ -12825,7 +12918,7 @@ interface LuaItemCommon {
|
|
|
12825
12918
|
/**
|
|
12826
12919
|
* Number of bullets left in the magazine.
|
|
12827
12920
|
*/
|
|
12828
|
-
ammo:
|
|
12921
|
+
ammo: uint32;
|
|
12829
12922
|
/**
|
|
12830
12923
|
* If absolute snapping is enabled on this blueprint item.
|
|
12831
12924
|
*/
|
|
@@ -12865,7 +12958,7 @@ interface LuaItemCommon {
|
|
|
12865
12958
|
/**
|
|
12866
12959
|
* The number of entity filters this deconstruction item supports.
|
|
12867
12960
|
*/
|
|
12868
|
-
readonly entity_filter_count:
|
|
12961
|
+
readonly entity_filter_count: uint32;
|
|
12869
12962
|
/**
|
|
12870
12963
|
* The blacklist/whitelist entity filter mode for this deconstruction item.
|
|
12871
12964
|
*/
|
|
@@ -12878,6 +12971,14 @@ interface LuaItemCommon {
|
|
|
12878
12971
|
* If this is an item with entity data, get the stored entity label.
|
|
12879
12972
|
*/
|
|
12880
12973
|
entity_label?: string;
|
|
12974
|
+
/**
|
|
12975
|
+
* If this is an item with entity data, get the stored logistic filters.
|
|
12976
|
+
*/
|
|
12977
|
+
entity_logistic_sections: LogisticSections;
|
|
12978
|
+
/**
|
|
12979
|
+
* If this is an item with entity data, get the stored request from buffer state.
|
|
12980
|
+
*/
|
|
12981
|
+
entity_request_from_buffers: boolean;
|
|
12881
12982
|
/**
|
|
12882
12983
|
* The equipment grid of this item, if any.
|
|
12883
12984
|
*/
|
|
@@ -12949,7 +13050,7 @@ interface LuaItemCommon {
|
|
|
12949
13050
|
/**
|
|
12950
13051
|
* The current count of mappers in the upgrade item.
|
|
12951
13052
|
*/
|
|
12952
|
-
readonly mapper_count:
|
|
13053
|
+
readonly mapper_count: uint32;
|
|
12953
13054
|
/**
|
|
12954
13055
|
* The location of this item if it can be found.
|
|
12955
13056
|
*/
|
|
@@ -12962,7 +13063,7 @@ interface LuaItemCommon {
|
|
|
12962
13063
|
/**
|
|
12963
13064
|
* The number of tile filters this deconstruction item supports.
|
|
12964
13065
|
*/
|
|
12965
|
-
readonly tile_filter_count:
|
|
13066
|
+
readonly tile_filter_count: uint32;
|
|
12966
13067
|
/**
|
|
12967
13068
|
* The blacklist/whitelist tile filter mode for this deconstruction item.
|
|
12968
13069
|
*/
|
|
@@ -13011,7 +13112,11 @@ interface LuaItemPrototype extends LuaPrototypeBase {
|
|
|
13011
13112
|
/**
|
|
13012
13113
|
* The inventory size bonus for this armor prototype.
|
|
13013
13114
|
*/
|
|
13014
|
-
get_inventory_size_bonus(this: void, quality?: QualityID):
|
|
13115
|
+
get_inventory_size_bonus(this: void, quality?: QualityID): uint32 | null;
|
|
13116
|
+
/**
|
|
13117
|
+
* Effects of this module at the specified quality.
|
|
13118
|
+
*/
|
|
13119
|
+
get_module_effects(this: void, quality?: QualityID): ModuleEffects | null;
|
|
13015
13120
|
/**
|
|
13016
13121
|
* The color used when doing normal selection with this selection tool prototype.
|
|
13017
13122
|
*/
|
|
@@ -13023,7 +13128,7 @@ interface LuaItemPrototype extends LuaPrototypeBase {
|
|
|
13023
13128
|
/**
|
|
13024
13129
|
* The number of ticks before this item spoils, or `0` if it does not spoil.
|
|
13025
13130
|
*/
|
|
13026
|
-
get_spoil_ticks(this: void, quality?: QualityID):
|
|
13131
|
+
get_spoil_ticks(this: void, quality?: QualityID): uint32;
|
|
13027
13132
|
/**
|
|
13028
13133
|
* The tile filter mode used by this selection tool.
|
|
13029
13134
|
*/
|
|
@@ -13093,7 +13198,7 @@ interface LuaItemPrototype extends LuaPrototypeBase {
|
|
|
13093
13198
|
/**
|
|
13094
13199
|
* The number of entity filters this deconstruction item has.
|
|
13095
13200
|
*/
|
|
13096
|
-
readonly entity_filter_slots?:
|
|
13201
|
+
readonly entity_filter_slots?: uint32;
|
|
13097
13202
|
/**
|
|
13098
13203
|
* The prototype of this armor's equipment grid, if any.
|
|
13099
13204
|
*/
|
|
@@ -13152,7 +13257,7 @@ interface LuaItemPrototype extends LuaPrototypeBase {
|
|
|
13152
13257
|
/**
|
|
13153
13258
|
* The main inventory size for item-with-inventory-prototype.
|
|
13154
13259
|
*/
|
|
13155
|
-
readonly inventory_size?:
|
|
13260
|
+
readonly inventory_size?: uint32;
|
|
13156
13261
|
readonly item_filters?: LuaItemPrototype[];
|
|
13157
13262
|
readonly item_group_filters?: LuaGroup[];
|
|
13158
13263
|
readonly item_subgroup_filters?: LuaGroup[];
|
|
@@ -13232,7 +13337,7 @@ interface LuaItemPrototype extends LuaPrototypeBase {
|
|
|
13232
13337
|
/**
|
|
13233
13338
|
* Maximum stack size of the item specified by this prototype.
|
|
13234
13339
|
*/
|
|
13235
|
-
readonly stack_size:
|
|
13340
|
+
readonly stack_size: uint32;
|
|
13236
13341
|
/**
|
|
13237
13342
|
* Is this item allowed to stack at all?
|
|
13238
13343
|
*/
|
|
@@ -13245,11 +13350,11 @@ interface LuaItemPrototype extends LuaPrototypeBase {
|
|
|
13245
13350
|
/**
|
|
13246
13351
|
* 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
13352
|
*/
|
|
13248
|
-
readonly tier?:
|
|
13353
|
+
readonly tier?: uint32;
|
|
13249
13354
|
/**
|
|
13250
13355
|
* The number of tile filters this deconstruction item has.
|
|
13251
13356
|
*/
|
|
13252
|
-
readonly tile_filter_slots?:
|
|
13357
|
+
readonly tile_filter_slots?: uint32;
|
|
13253
13358
|
readonly tiles?: SpacePlatformTileDefinition[];
|
|
13254
13359
|
readonly trigger?: TriggerItem;
|
|
13255
13360
|
/**
|
|
@@ -13312,7 +13417,7 @@ interface LuaItemStack extends LuaItemCommon {
|
|
|
13312
13417
|
* @param data The string to import
|
|
13313
13418
|
* @returns 0 if the import succeeded with no errors. -1 if the import succeeded with errors. 1 if the import failed.
|
|
13314
13419
|
*/
|
|
13315
|
-
import_stack(this: void, data: string):
|
|
13420
|
+
import_stack(this: void, data: string): int32;
|
|
13316
13421
|
/**
|
|
13317
13422
|
* Set this item stack to another item stack.
|
|
13318
13423
|
* @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 +13437,7 @@ interface LuaItemStack extends LuaItemCommon {
|
|
|
13332
13437
|
* Transfers the given item stack into this item stack.
|
|
13333
13438
|
* @returns `true` if the full stack (or requested amount) was transferred.
|
|
13334
13439
|
*/
|
|
13335
|
-
transfer_stack(this: void, stack: ItemStackIdentification, amount?:
|
|
13440
|
+
transfer_stack(this: void, stack: ItemStackIdentification, amount?: uint32): boolean;
|
|
13336
13441
|
/**
|
|
13337
13442
|
* Use the capsule item with the entity as the source, targeting the given position.
|
|
13338
13443
|
* @param entity The entity to use the capsule item with.
|
|
@@ -13343,7 +13448,7 @@ interface LuaItemStack extends LuaItemCommon {
|
|
|
13343
13448
|
/**
|
|
13344
13449
|
* Number of items in this stack.
|
|
13345
13450
|
*/
|
|
13346
|
-
count:
|
|
13451
|
+
count: uint32;
|
|
13347
13452
|
/**
|
|
13348
13453
|
* How much health the item has, as a number in range `[0, 1]`.
|
|
13349
13454
|
*/
|
|
@@ -13482,7 +13587,7 @@ interface LuaLogisticCell {
|
|
|
13482
13587
|
/**
|
|
13483
13588
|
* Number of robots currently charging.
|
|
13484
13589
|
*/
|
|
13485
|
-
readonly charging_robot_count:
|
|
13590
|
+
readonly charging_robot_count: uint32;
|
|
13486
13591
|
/**
|
|
13487
13592
|
* Robots currently being charged.
|
|
13488
13593
|
*/
|
|
@@ -13522,15 +13627,15 @@ interface LuaLogisticCell {
|
|
|
13522
13627
|
/**
|
|
13523
13628
|
* Number of stationed construction robots in this cell.
|
|
13524
13629
|
*/
|
|
13525
|
-
readonly stationed_construction_robot_count:
|
|
13630
|
+
readonly stationed_construction_robot_count: uint32;
|
|
13526
13631
|
/**
|
|
13527
13632
|
* Number of stationed logistic robots in this cell.
|
|
13528
13633
|
*/
|
|
13529
|
-
readonly stationed_logistic_robot_count:
|
|
13634
|
+
readonly stationed_logistic_robot_count: uint32;
|
|
13530
13635
|
/**
|
|
13531
13636
|
* Number of robots waiting to charge.
|
|
13532
13637
|
*/
|
|
13533
|
-
readonly to_charge_robot_count:
|
|
13638
|
+
readonly to_charge_robot_count: uint32;
|
|
13534
13639
|
/**
|
|
13535
13640
|
* Robots waiting to charge.
|
|
13536
13641
|
*/
|
|
@@ -13580,7 +13685,7 @@ interface LuaLogisticNetwork {
|
|
|
13580
13685
|
* @param include_buffers Should buffers be considered? Defaults to false.
|
|
13581
13686
|
* @returns Whether the network can satisfy the request.
|
|
13582
13687
|
*/
|
|
13583
|
-
can_satisfy_request(this: void, item: ItemWithQualityID, count?:
|
|
13688
|
+
can_satisfy_request(this: void, item: ItemWithQualityID, count?: uint32, include_buffers?: boolean): boolean;
|
|
13584
13689
|
/**
|
|
13585
13690
|
* Find logistic cell closest to a given position.
|
|
13586
13691
|
* @returns `nil` if no cell was found.
|
|
@@ -13597,7 +13702,7 @@ interface LuaLogisticNetwork {
|
|
|
13597
13702
|
* @param item Item name to count. If not given, gives counts of all items in the network.
|
|
13598
13703
|
* @param member Logistic members to check. If not given, gives count in the entire network.
|
|
13599
13704
|
*/
|
|
13600
|
-
get_item_count(this: void, item?: ItemWithQualityID, member?: 'storage' | 'providers'):
|
|
13705
|
+
get_item_count(this: void, item?: ItemWithQualityID, member?: 'storage' | 'providers'): int32;
|
|
13601
13706
|
/**
|
|
13602
13707
|
* Get the amount of items of the given type indexed by the storage member.
|
|
13603
13708
|
* @param item Item name to check.
|
|
@@ -13614,14 +13719,14 @@ interface LuaLogisticNetwork {
|
|
|
13614
13719
|
* @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
13720
|
* @returns Number of items actually inserted.
|
|
13616
13721
|
*/
|
|
13617
|
-
insert(this: void, item: ItemStackIdentification, members?: 'storage' | 'storage-empty' | 'storage-empty-slot' | 'requester'):
|
|
13722
|
+
insert(this: void, item: ItemStackIdentification, members?: 'storage' | 'storage-empty' | 'storage-empty-slot' | 'requester'): uint32;
|
|
13618
13723
|
/**
|
|
13619
13724
|
* Remove items from the logistic network. This will actually remove the items from some logistic chests.
|
|
13620
13725
|
* @param item What to remove.
|
|
13621
13726
|
* @param members Which logistic members to remove from. If not specified, removes from the network in the usual order.
|
|
13622
13727
|
* @returns Number of items removed.
|
|
13623
13728
|
*/
|
|
13624
|
-
remove_item(this: void, item: ItemStackIdentification, members?: 'active-provider' | 'passive-provider' | 'buffer' | 'storage'):
|
|
13729
|
+
remove_item(this: void, item: ItemStackIdentification, members?: 'active-provider' | 'passive-provider' | 'buffer' | 'storage'): uint32;
|
|
13625
13730
|
/**
|
|
13626
13731
|
* Find a logistic point to drop the specific item stack.
|
|
13627
13732
|
* @param table.stack Name of the item to drop off.
|
|
@@ -13653,19 +13758,19 @@ interface LuaLogisticNetwork {
|
|
|
13653
13758
|
/**
|
|
13654
13759
|
* The total number of construction robots in the network (idle and active + in roboports).
|
|
13655
13760
|
*/
|
|
13656
|
-
readonly all_construction_robots:
|
|
13761
|
+
readonly all_construction_robots: uint32;
|
|
13657
13762
|
/**
|
|
13658
13763
|
* The total number of logistic robots in the network (idle and active + in roboports).
|
|
13659
13764
|
*/
|
|
13660
|
-
readonly all_logistic_robots:
|
|
13765
|
+
readonly all_logistic_robots: uint32;
|
|
13661
13766
|
/**
|
|
13662
13767
|
* Number of construction robots available for a job.
|
|
13663
13768
|
*/
|
|
13664
|
-
readonly available_construction_robots:
|
|
13769
|
+
readonly available_construction_robots: uint32;
|
|
13665
13770
|
/**
|
|
13666
13771
|
* Number of logistic robots available for a job.
|
|
13667
13772
|
*/
|
|
13668
|
-
readonly available_logistic_robots:
|
|
13773
|
+
readonly available_logistic_robots: uint32;
|
|
13669
13774
|
/**
|
|
13670
13775
|
* All cells in this network.
|
|
13671
13776
|
*/
|
|
@@ -13674,6 +13779,10 @@ interface LuaLogisticNetwork {
|
|
|
13674
13779
|
* All construction robots in this logistic network.
|
|
13675
13780
|
*/
|
|
13676
13781
|
readonly construction_robots: LuaEntity[];
|
|
13782
|
+
/**
|
|
13783
|
+
* The custom logistic network name set by the player or by script, if any.
|
|
13784
|
+
*/
|
|
13785
|
+
custom_name?: string;
|
|
13677
13786
|
/**
|
|
13678
13787
|
* All things that have empty provider points in this network.
|
|
13679
13788
|
*/
|
|
@@ -13697,7 +13806,7 @@ interface LuaLogisticNetwork {
|
|
|
13697
13806
|
/**
|
|
13698
13807
|
* The unique logistic network ID.
|
|
13699
13808
|
*/
|
|
13700
|
-
readonly network_id:
|
|
13809
|
+
readonly network_id: uint32;
|
|
13701
13810
|
/**
|
|
13702
13811
|
* 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
13812
|
*/
|
|
@@ -13725,7 +13834,7 @@ interface LuaLogisticNetwork {
|
|
|
13725
13834
|
/**
|
|
13726
13835
|
* Maximum number of robots the network can work with. Currently only used for the personal roboport.
|
|
13727
13836
|
*/
|
|
13728
|
-
readonly robot_limit:
|
|
13837
|
+
readonly robot_limit: uint32;
|
|
13729
13838
|
/**
|
|
13730
13839
|
* All robots in this logistic network.
|
|
13731
13840
|
*/
|
|
@@ -13757,13 +13866,13 @@ interface LuaLogisticPoint {
|
|
|
13757
13866
|
* Gets section on the selected index, if it exists
|
|
13758
13867
|
* @param section_index Index of the section
|
|
13759
13868
|
*/
|
|
13760
|
-
get_section(this: void, section_index:
|
|
13869
|
+
get_section(this: void, section_index: uint32): LuaLogisticSection;
|
|
13761
13870
|
/**
|
|
13762
13871
|
* 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
13872
|
* @param section_index Index of the section
|
|
13764
13873
|
* @returns Whether section was removed.
|
|
13765
13874
|
*/
|
|
13766
|
-
remove_section(this: void, section_index:
|
|
13875
|
+
remove_section(this: void, section_index: uint32): boolean;
|
|
13767
13876
|
/**
|
|
13768
13877
|
* Whether this logistic point is active, related to disabling logistics on player/spidertron.
|
|
13769
13878
|
*
|
|
@@ -13789,7 +13898,7 @@ interface LuaLogisticPoint {
|
|
|
13789
13898
|
/**
|
|
13790
13899
|
* The Logistic member index of this logistic point.
|
|
13791
13900
|
*/
|
|
13792
|
-
readonly logistic_member_index:
|
|
13901
|
+
readonly logistic_member_index: uint32;
|
|
13793
13902
|
readonly logistic_network: LuaLogisticNetwork;
|
|
13794
13903
|
/**
|
|
13795
13904
|
* The logistic mode.
|
|
@@ -13810,7 +13919,7 @@ interface LuaLogisticPoint {
|
|
|
13810
13919
|
/**
|
|
13811
13920
|
* Amount of logistic sections this logistic point has.
|
|
13812
13921
|
*/
|
|
13813
|
-
readonly sections_count:
|
|
13922
|
+
readonly sections_count: uint32;
|
|
13814
13923
|
/**
|
|
13815
13924
|
* Items targeted to be dropped off into this logistic point by robots.
|
|
13816
13925
|
*/
|
|
@@ -13868,7 +13977,7 @@ interface LuaLogisticSection {
|
|
|
13868
13977
|
/**
|
|
13869
13978
|
* Amount of filters this section has
|
|
13870
13979
|
*/
|
|
13871
|
-
readonly filters_count:
|
|
13980
|
+
readonly filters_count: uint32;
|
|
13872
13981
|
/**
|
|
13873
13982
|
* The group this section belongs to.
|
|
13874
13983
|
*
|
|
@@ -13880,7 +13989,7 @@ interface LuaLogisticSection {
|
|
|
13880
13989
|
/**
|
|
13881
13990
|
* The section index of this section.
|
|
13882
13991
|
*/
|
|
13883
|
-
readonly index:
|
|
13992
|
+
readonly index: uint32;
|
|
13884
13993
|
/**
|
|
13885
13994
|
* Shortcut to check whether {@link LuaLogisticSection::type | runtime:LuaLogisticSection::type} is equal to {@link manual | runtime:defines.logistic_section_type.manual}.
|
|
13886
13995
|
*/
|
|
@@ -13920,13 +14029,13 @@ interface LuaLogisticSections {
|
|
|
13920
14029
|
* Gets section on the selected index, if it exists.
|
|
13921
14030
|
* @param section_index Index of the section.
|
|
13922
14031
|
*/
|
|
13923
|
-
get_section(this: void, section_index:
|
|
14032
|
+
get_section(this: void, section_index: uint32): LuaLogisticSection | null;
|
|
13924
14033
|
/**
|
|
13925
14034
|
* 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
14035
|
* @param section_index Index of the section.
|
|
13927
14036
|
* @returns Whether section was removed.
|
|
13928
14037
|
*/
|
|
13929
|
-
remove_section(this: void, section_index:
|
|
14038
|
+
remove_section(this: void, section_index: uint32): boolean;
|
|
13930
14039
|
/**
|
|
13931
14040
|
* 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
14041
|
*/
|
|
@@ -13938,7 +14047,7 @@ interface LuaLogisticSections {
|
|
|
13938
14047
|
/**
|
|
13939
14048
|
* Amount of logistic sections this entity has.
|
|
13940
14049
|
*/
|
|
13941
|
-
readonly sections_count:
|
|
14050
|
+
readonly sections_count: uint32;
|
|
13942
14051
|
/**
|
|
13943
14052
|
* 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
14053
|
*/
|
|
@@ -14004,7 +14113,7 @@ interface LuaModSettingPrototype extends LuaPrototypeBase {
|
|
|
14004
14113
|
/**
|
|
14005
14114
|
* The allowed values for this setting. `nil` if this setting doesn't use the a fixed set of values.
|
|
14006
14115
|
*/
|
|
14007
|
-
readonly allowed_values?: string[] |
|
|
14116
|
+
readonly allowed_values?: string[] | int32[] | double[];
|
|
14008
14117
|
/**
|
|
14009
14118
|
* Whether this string setting auto-trims values. `nil` if not a string setting
|
|
14010
14119
|
*/
|
|
@@ -14012,15 +14121,15 @@ interface LuaModSettingPrototype extends LuaPrototypeBase {
|
|
|
14012
14121
|
/**
|
|
14013
14122
|
* The default value of this setting.
|
|
14014
14123
|
*/
|
|
14015
|
-
readonly default_value: boolean | double |
|
|
14124
|
+
readonly default_value: boolean | double | int32 | string | Color;
|
|
14016
14125
|
/**
|
|
14017
14126
|
* The maximum value for this setting. `nil` if this setting type doesn't support a maximum.
|
|
14018
14127
|
*/
|
|
14019
|
-
readonly maximum_value?: double |
|
|
14128
|
+
readonly maximum_value?: double | int32;
|
|
14020
14129
|
/**
|
|
14021
14130
|
* The minimum value for this setting. `nil` if this setting type doesn't support a minimum.
|
|
14022
14131
|
*/
|
|
14023
|
-
readonly minimum_value?: double |
|
|
14132
|
+
readonly minimum_value?: double | int32;
|
|
14024
14133
|
/**
|
|
14025
14134
|
* The mod that owns this setting.
|
|
14026
14135
|
*/
|
|
@@ -14089,8 +14198,8 @@ interface LuaNamedNoiseFunction extends LuaPrototypeBase {
|
|
|
14089
14198
|
interface LuaParticlePrototype extends LuaPrototypeBase {
|
|
14090
14199
|
readonly ended_in_water_trigger_effect: TriggerEffectItem;
|
|
14091
14200
|
readonly ended_on_ground_trigger_effect: TriggerEffectItem;
|
|
14092
|
-
readonly fade_out_time:
|
|
14093
|
-
readonly life_time:
|
|
14201
|
+
readonly fade_out_time: uint32;
|
|
14202
|
+
readonly life_time: uint32;
|
|
14094
14203
|
readonly mining_particle_frame_speed: float;
|
|
14095
14204
|
readonly movement_modifier: float;
|
|
14096
14205
|
readonly movement_modifier_when_on_ground: float;
|
|
@@ -14099,7 +14208,7 @@ interface LuaParticlePrototype extends LuaPrototypeBase {
|
|
|
14099
14208
|
*/
|
|
14100
14209
|
readonly object_name: string;
|
|
14101
14210
|
readonly regular_trigger_effect: TriggerEffectItem;
|
|
14102
|
-
readonly regular_trigger_effect_frequency:
|
|
14211
|
+
readonly regular_trigger_effect_frequency: uint32;
|
|
14103
14212
|
readonly render_layer: RenderLayer;
|
|
14104
14213
|
readonly render_layer_when_on_ground: RenderLayer;
|
|
14105
14214
|
/**
|
|
@@ -14142,7 +14251,7 @@ interface LuaPermissionGroup {
|
|
|
14142
14251
|
/**
|
|
14143
14252
|
* The group ID
|
|
14144
14253
|
*/
|
|
14145
|
-
readonly group_id:
|
|
14254
|
+
readonly group_id: uint32;
|
|
14146
14255
|
/**
|
|
14147
14256
|
* The name of this group. Setting the name to `nil` or an empty string sets the name to the default value.
|
|
14148
14257
|
*/
|
|
@@ -14173,7 +14282,7 @@ interface LuaPermissionGroups {
|
|
|
14173
14282
|
* Gets the permission group with the given name or group ID.
|
|
14174
14283
|
* @returns `nil` if there is no matching group.
|
|
14175
14284
|
*/
|
|
14176
|
-
get_group(this: void, group: string |
|
|
14285
|
+
get_group(this: void, group: string | uint32): LuaPermissionGroup | null;
|
|
14177
14286
|
/**
|
|
14178
14287
|
* All of the permission groups.
|
|
14179
14288
|
*/
|
|
@@ -14295,31 +14404,39 @@ interface LuaPlayer extends LuaControl {
|
|
|
14295
14404
|
* @param table.position Where the entity would be placed
|
|
14296
14405
|
* @param table.direction Direction the entity would be placed
|
|
14297
14406
|
* @param table.mirror Whether to mirror the entity
|
|
14298
|
-
* @param table.
|
|
14299
|
-
* @param table.
|
|
14300
|
-
* @param table.
|
|
14407
|
+
* @param table.flip_horizontal Whether to flip the blueprint horizontally. Defaults to `false`.
|
|
14408
|
+
* @param table.flip_vertical Whether to flip the blueprint vertically. Defaults to `false`.
|
|
14409
|
+
* @param table.build_mode Which build mode should be used instead of normal build. Defaults to `defines.build_mode.normal`.
|
|
14410
|
+
* @param table.terrain_building_size The size for building terrain if building terrain. Defaults to `2`.
|
|
14411
|
+
* @param table.skip_fog_of_war If chunks covered by fog-of-war are skipped. Defaults to `false`.
|
|
14301
14412
|
*/
|
|
14302
14413
|
build_from_cursor(this: void, table: {
|
|
14303
14414
|
position: MapPosition;
|
|
14304
14415
|
direction?: defines.direction;
|
|
14305
14416
|
mirror?: boolean;
|
|
14417
|
+
flip_horizontal?: boolean;
|
|
14418
|
+
flip_vertical?: boolean;
|
|
14306
14419
|
build_mode?: defines.build_mode;
|
|
14307
|
-
terrain_building_size?:
|
|
14420
|
+
terrain_building_size?: uint32;
|
|
14308
14421
|
skip_fog_of_war?: boolean;
|
|
14309
14422
|
}): void;
|
|
14310
14423
|
/**
|
|
14311
14424
|
* Checks if this player can build what ever is in the cursor on the surface the player is on.
|
|
14312
14425
|
* @param table.position Where the entity would be placed
|
|
14313
14426
|
* @param table.direction Direction the entity would be placed
|
|
14314
|
-
* @param table.
|
|
14315
|
-
* @param table.
|
|
14316
|
-
* @param table.
|
|
14427
|
+
* @param table.flip_horizontal Whether to flip the blueprint horizontally. Defaults to `false`.
|
|
14428
|
+
* @param table.flip_vertical Whether to flip the blueprint vertically. Defaults to `false`.
|
|
14429
|
+
* @param table.build_mode Which build mode should be used instead of normal build. Defaults to `defines.build_mode.normal`.
|
|
14430
|
+
* @param table.terrain_building_size The size for building terrain if building terrain. Defaults to `2`.
|
|
14431
|
+
* @param table.skip_fog_of_war If chunks covered by fog-of-war are skipped. Defaults to `false`.
|
|
14317
14432
|
*/
|
|
14318
14433
|
can_build_from_cursor(this: void, table: {
|
|
14319
14434
|
position: MapPosition;
|
|
14320
14435
|
direction?: defines.direction;
|
|
14436
|
+
flip_horizontal?: boolean;
|
|
14437
|
+
flip_vertical?: boolean;
|
|
14321
14438
|
build_mode?: defines.build_mode;
|
|
14322
|
-
terrain_building_size?:
|
|
14439
|
+
terrain_building_size?: uint32;
|
|
14323
14440
|
skip_fog_of_war?: boolean;
|
|
14324
14441
|
}): boolean;
|
|
14325
14442
|
/**
|
|
@@ -14394,7 +14511,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
14394
14511
|
surface?: SurfaceIdentification;
|
|
14395
14512
|
create_at_cursor?: boolean;
|
|
14396
14513
|
color?: Color;
|
|
14397
|
-
time_to_live?:
|
|
14514
|
+
time_to_live?: uint32;
|
|
14398
14515
|
speed?: double;
|
|
14399
14516
|
}): void;
|
|
14400
14517
|
/**
|
|
@@ -14442,7 +14559,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
14442
14559
|
* Enters the given space platform if possible.
|
|
14443
14560
|
* @returns If the player entered the platform.
|
|
14444
14561
|
*/
|
|
14445
|
-
enter_space_platform(this: void, space_platform:
|
|
14562
|
+
enter_space_platform(this: void, space_platform: LuaSpacePlatform): boolean;
|
|
14446
14563
|
/**
|
|
14447
14564
|
* Exit the current cutscene. Errors if not in a cutscene.
|
|
14448
14565
|
*/
|
|
@@ -14455,7 +14572,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
14455
14572
|
* Gets which quick bar page is being used for the given screen page or `nil` if not known.
|
|
14456
14573
|
* @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
14574
|
*/
|
|
14458
|
-
get_active_quick_bar_page(this: void, index:
|
|
14575
|
+
get_active_quick_bar_page(this: void, index: uint32): uint8 | null;
|
|
14459
14576
|
/**
|
|
14460
14577
|
* Get all alerts matching the given filters, or all alerts if no filters are given.
|
|
14461
14578
|
* @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 +14583,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
14466
14583
|
position?: MapPosition;
|
|
14467
14584
|
type?: defines.alert_type;
|
|
14468
14585
|
surface?: SurfaceIdentification;
|
|
14469
|
-
}):
|
|
14586
|
+
}): LuaTable<uint32, Record<defines.alert_type, Alert[]>>;
|
|
14470
14587
|
/**
|
|
14471
14588
|
* The characters associated with this player.
|
|
14472
14589
|
*
|
|
@@ -14483,12 +14600,16 @@ interface LuaPlayer extends LuaControl {
|
|
|
14483
14600
|
* 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
14601
|
* @param index The index to get.
|
|
14485
14602
|
*/
|
|
14486
|
-
get_infinity_inventory_filter(this: void, index:
|
|
14603
|
+
get_infinity_inventory_filter(this: void, index: uint32): InfinityInventoryFilter | null;
|
|
14487
14604
|
/**
|
|
14488
14605
|
* Gets the quick bar filter for the given slot or `nil`.
|
|
14489
14606
|
* @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
14607
|
*/
|
|
14491
|
-
get_quick_bar_slot(this: void, index:
|
|
14608
|
+
get_quick_bar_slot(this: void, index: uint32): ItemFilter | null;
|
|
14609
|
+
/**
|
|
14610
|
+
* Get all recipes that currently have recipe notifications for this player.
|
|
14611
|
+
*/
|
|
14612
|
+
get_recipe_notifications(this: void): LuaRecipePrototype[];
|
|
14492
14613
|
/**
|
|
14493
14614
|
* If the given alert type is currently enabled.
|
|
14494
14615
|
*/
|
|
@@ -14510,7 +14631,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
14510
14631
|
/**
|
|
14511
14632
|
* Jump to the specified cutscene waypoint. Only works when the player is viewing a cutscene.
|
|
14512
14633
|
*/
|
|
14513
|
-
jump_to_cutscene_waypoint(this: void, waypoint_index:
|
|
14634
|
+
jump_to_cutscene_waypoint(this: void, waypoint_index: uint32): void;
|
|
14514
14635
|
/**
|
|
14515
14636
|
* Ejects this player from the current space platform and lands on the current planet.
|
|
14516
14637
|
* @returns If the player successfully landed on the planet.
|
|
@@ -14581,20 +14702,20 @@ interface LuaPlayer extends LuaControl {
|
|
|
14581
14702
|
* Does nothing if this player is not connected (see {@link LuaPlayer::connected | runtime:LuaPlayer::connected}).
|
|
14582
14703
|
* @returns The unique ID for the requested translation.
|
|
14583
14704
|
*/
|
|
14584
|
-
request_translation(this: void, localised_string: LocalisedString):
|
|
14705
|
+
request_translation(this: void, localised_string: LocalisedString): uint32 | null;
|
|
14585
14706
|
/**
|
|
14586
14707
|
* 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
14708
|
*
|
|
14588
14709
|
* Does nothing if this player is not connected (see {@link LuaPlayer::connected | runtime:LuaPlayer::connected}).
|
|
14589
14710
|
* @returns The unique IDs for the requested translations.
|
|
14590
14711
|
*/
|
|
14591
|
-
request_translations(this: void, localised_strings: LocalisedString[]):
|
|
14712
|
+
request_translations(this: void, localised_strings: LocalisedString[]): uint32[] | null;
|
|
14592
14713
|
/**
|
|
14593
14714
|
* Sets which quick bar page is being used for the given screen page.
|
|
14594
14715
|
* @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
14716
|
* @param page_index The new quick bar page.
|
|
14596
14717
|
*/
|
|
14597
|
-
set_active_quick_bar_page(this: void, screen_index:
|
|
14718
|
+
set_active_quick_bar_page(this: void, screen_index: uint32, page_index: uint32): void;
|
|
14598
14719
|
/**
|
|
14599
14720
|
* Set the controller type of the player.
|
|
14600
14721
|
*
|
|
@@ -14615,7 +14736,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
14615
14736
|
waypoints?: CutsceneWaypoint[];
|
|
14616
14737
|
start_position?: MapPosition;
|
|
14617
14738
|
start_zoom?: double;
|
|
14618
|
-
final_transition_time?:
|
|
14739
|
+
final_transition_time?: uint32;
|
|
14619
14740
|
chart_mode_cutoff?: double;
|
|
14620
14741
|
position?: MapPosition;
|
|
14621
14742
|
surface?: SurfaceIdentification;
|
|
@@ -14637,13 +14758,13 @@ interface LuaPlayer extends LuaControl {
|
|
|
14637
14758
|
* @param index The index to set.
|
|
14638
14759
|
* @param filter The new filter or `nil` to clear the filter.
|
|
14639
14760
|
*/
|
|
14640
|
-
set_infinity_inventory_filter(this: void, index:
|
|
14761
|
+
set_infinity_inventory_filter(this: void, index: uint32, filter: InfinityInventoryFilter | nil): void;
|
|
14641
14762
|
/**
|
|
14642
14763
|
* 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
14764
|
* @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
14765
|
* @param filter The filter or `nil` to clear it.
|
|
14645
14766
|
*/
|
|
14646
|
-
set_quick_bar_slot(this: void, index:
|
|
14767
|
+
set_quick_bar_slot(this: void, index: uint32, filter: LuaItemStack | ItemWithQualityID | nil): void;
|
|
14647
14768
|
/**
|
|
14648
14769
|
* Make a custom Lua shortcut available or unavailable.
|
|
14649
14770
|
* @param prototype_name Prototype name of the custom shortcut.
|
|
@@ -14666,6 +14787,12 @@ interface LuaPlayer extends LuaControl {
|
|
|
14666
14787
|
* @param selection_mode The type of selection to start.
|
|
14667
14788
|
*/
|
|
14668
14789
|
start_selection(this: void, position: MapPosition, selection_mode: defines.selection_mode): void;
|
|
14790
|
+
/**
|
|
14791
|
+
* Swaps this player's character with another player's character.
|
|
14792
|
+
* @param player The player to swap characters with.
|
|
14793
|
+
* @returns `true` if the swap was successful.
|
|
14794
|
+
*/
|
|
14795
|
+
swap_characters(this: void, player: PlayerIdentification): boolean;
|
|
14669
14796
|
/**
|
|
14670
14797
|
* 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
14798
|
*/
|
|
@@ -14694,7 +14821,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
14694
14821
|
/**
|
|
14695
14822
|
* How many ticks since the last action of this player.
|
|
14696
14823
|
*/
|
|
14697
|
-
readonly afk_time:
|
|
14824
|
+
readonly afk_time: uint32;
|
|
14698
14825
|
/**
|
|
14699
14826
|
* If the main inventory will be auto sorted.
|
|
14700
14827
|
*/
|
|
@@ -14776,7 +14903,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
14776
14903
|
/**
|
|
14777
14904
|
* 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
14905
|
*/
|
|
14779
|
-
readonly index:
|
|
14906
|
+
readonly index: uint32;
|
|
14780
14907
|
/**
|
|
14781
14908
|
* The filters for this map editor infinity inventory settings.
|
|
14782
14909
|
*/
|
|
@@ -14788,7 +14915,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
14788
14915
|
/**
|
|
14789
14916
|
* At what tick this player was last online.
|
|
14790
14917
|
*/
|
|
14791
|
-
readonly last_online:
|
|
14918
|
+
readonly last_online: uint32;
|
|
14792
14919
|
/**
|
|
14793
14920
|
* The active locale for this player.
|
|
14794
14921
|
*
|
|
@@ -14824,7 +14951,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
14824
14951
|
/**
|
|
14825
14952
|
* How many ticks did this player spend playing this save (all sessions combined).
|
|
14826
14953
|
*/
|
|
14827
|
-
readonly online_time:
|
|
14954
|
+
readonly online_time: uint32;
|
|
14828
14955
|
/**
|
|
14829
14956
|
* `true` if the player opened itself. I.e. if they opened the character or god-controller GUI.
|
|
14830
14957
|
*/
|
|
@@ -14848,7 +14975,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
14848
14975
|
/**
|
|
14849
14976
|
* Unique ID associated with the surface this player's physical controller is currently on.
|
|
14850
14977
|
*/
|
|
14851
|
-
readonly physical_surface_index:
|
|
14978
|
+
readonly physical_surface_index: uint32;
|
|
14852
14979
|
/**
|
|
14853
14980
|
* The current vehicle of this player's physical controller.
|
|
14854
14981
|
*/
|
|
@@ -14888,7 +15015,7 @@ interface LuaPlayer extends LuaControl {
|
|
|
14888
15015
|
*
|
|
14889
15016
|
* Set to any positive value to trigger the respawn state for this player.
|
|
14890
15017
|
*/
|
|
14891
|
-
ticks_to_respawn?:
|
|
15018
|
+
ticks_to_respawn?: uint32;
|
|
14892
15019
|
/**
|
|
14893
15020
|
* The undo and redo stack for this player.
|
|
14894
15021
|
*/
|
|
@@ -15044,6 +15171,10 @@ interface LuaProgrammableSpeakerControlBehavior extends LuaControlBehavior {
|
|
|
15044
15171
|
* Base for all prototype classes.
|
|
15045
15172
|
*/
|
|
15046
15173
|
interface LuaPrototypeBase {
|
|
15174
|
+
/**
|
|
15175
|
+
* Extra description items in the tooltip and Factoriopedia.
|
|
15176
|
+
*/
|
|
15177
|
+
readonly custom_tooltip_fields?: CustomTooltipField[];
|
|
15047
15178
|
/**
|
|
15048
15179
|
* Provides additional description used in factoriopedia.
|
|
15049
15180
|
*/
|
|
@@ -15256,10 +15387,10 @@ interface LuaPrototypes {
|
|
|
15256
15387
|
* A MapGenPreset is an exact copy of the prototype table provided from the data stage.
|
|
15257
15388
|
*/
|
|
15258
15389
|
readonly map_gen_preset: Record<string, MapGenPreset>;
|
|
15259
|
-
readonly max_beacon_supply_area_distance:
|
|
15390
|
+
readonly max_beacon_supply_area_distance: uint32;
|
|
15260
15391
|
readonly max_electric_pole_connection_distance: double;
|
|
15261
15392
|
readonly max_electric_pole_supply_area_distance: float;
|
|
15262
|
-
readonly max_force_distraction_chunk_distance:
|
|
15393
|
+
readonly max_force_distraction_chunk_distance: uint32;
|
|
15263
15394
|
readonly max_force_distraction_distance: double;
|
|
15264
15395
|
readonly max_gate_activation_distance: double;
|
|
15265
15396
|
readonly max_inserter_reach_distance: double;
|
|
@@ -15393,7 +15524,7 @@ interface LuaPumpControlBehavior extends LuaGenericOnOffControlBehavior {
|
|
|
15393
15524
|
*/
|
|
15394
15525
|
interface LuaQualityPrototype extends LuaPrototypeBase {
|
|
15395
15526
|
readonly accumulator_capacity_multiplier: double;
|
|
15396
|
-
readonly asteroid_collector_collection_radius_bonus:
|
|
15527
|
+
readonly asteroid_collector_collection_radius_bonus: uint32;
|
|
15397
15528
|
readonly beacon_module_slots_bonus: ItemStackIndex;
|
|
15398
15529
|
readonly beacon_power_usage_multiplier: float;
|
|
15399
15530
|
readonly beacon_supply_area_distance_bonus: float;
|
|
@@ -15419,9 +15550,9 @@ interface LuaQualityPrototype extends LuaPrototypeBase {
|
|
|
15419
15550
|
/**
|
|
15420
15551
|
* Level basically specifies the stat-increasing value of this quality level.
|
|
15421
15552
|
*/
|
|
15422
|
-
readonly level:
|
|
15553
|
+
readonly level: uint32;
|
|
15423
15554
|
readonly logistic_cell_charging_energy_multiplier: double;
|
|
15424
|
-
readonly logistic_cell_charging_station_count_bonus:
|
|
15555
|
+
readonly logistic_cell_charging_station_count_bonus: uint32;
|
|
15425
15556
|
readonly mining_drill_mining_radius_bonus: float;
|
|
15426
15557
|
readonly mining_drill_module_slots_bonus: ItemStackIndex;
|
|
15427
15558
|
readonly mining_drill_resource_drain_multiplier: float;
|
|
@@ -15546,7 +15677,7 @@ interface LuaRailPath {
|
|
|
15546
15677
|
/**
|
|
15547
15678
|
* The current rail index.
|
|
15548
15679
|
*/
|
|
15549
|
-
readonly current:
|
|
15680
|
+
readonly current: uint32;
|
|
15550
15681
|
/**
|
|
15551
15682
|
* If the path goes from the front of the train
|
|
15552
15683
|
*/
|
|
@@ -15558,11 +15689,11 @@ interface LuaRailPath {
|
|
|
15558
15689
|
/**
|
|
15559
15690
|
* Array of the rails that this path travels over.
|
|
15560
15691
|
*/
|
|
15561
|
-
readonly rails:
|
|
15692
|
+
readonly rails: LuaTable<uint32, LuaEntity>;
|
|
15562
15693
|
/**
|
|
15563
15694
|
* The total number of rails in this path.
|
|
15564
15695
|
*/
|
|
15565
|
-
readonly size:
|
|
15696
|
+
readonly size: uint32;
|
|
15566
15697
|
/**
|
|
15567
15698
|
* The total path distance.
|
|
15568
15699
|
*/
|
|
@@ -15621,7 +15752,7 @@ interface LuaRandomGenerator {
|
|
|
15621
15752
|
*
|
|
15622
15753
|
* Seeds that are close together will produce similar results. Seeds from 0 to 341 will produce the same results.
|
|
15623
15754
|
*/
|
|
15624
|
-
re_seed(this: void, seed:
|
|
15755
|
+
re_seed(this: void, seed: uint32): void;
|
|
15625
15756
|
/**
|
|
15626
15757
|
* 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
15758
|
*/
|
|
@@ -15635,7 +15766,7 @@ interface LuaRandomGenerator {
|
|
|
15635
15766
|
* @param lower Inclusive lower bound on the result
|
|
15636
15767
|
* @param upper Inclusive upper bound on the result
|
|
15637
15768
|
*/
|
|
15638
|
-
(this: void, lower?:
|
|
15769
|
+
(this: void, lower?: int32, upper?: int32): double;
|
|
15639
15770
|
}
|
|
15640
15771
|
/**
|
|
15641
15772
|
* Control behavior for Reactor
|
|
@@ -15877,7 +16008,7 @@ interface LuaRecipePrototype extends LuaPrototypeBase {
|
|
|
15877
16008
|
/**
|
|
15878
16009
|
* Used to determine how many extra items are put into an assembling machine before it's considered "full enough".
|
|
15879
16010
|
*/
|
|
15880
|
-
readonly overload_multiplier:
|
|
16011
|
+
readonly overload_multiplier: uint32;
|
|
15881
16012
|
readonly preserve_products_in_machine_output: boolean;
|
|
15882
16013
|
/**
|
|
15883
16014
|
* The results/products of this recipe.
|
|
@@ -15890,7 +16021,7 @@ interface LuaRecipePrototype extends LuaPrototypeBase {
|
|
|
15890
16021
|
/**
|
|
15891
16022
|
* 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
16023
|
*/
|
|
15893
|
-
readonly request_paste_multiplier:
|
|
16024
|
+
readonly request_paste_multiplier: uint32;
|
|
15894
16025
|
readonly reset_freshness_on_craft: boolean;
|
|
15895
16026
|
readonly result_is_always_fresh: boolean;
|
|
15896
16027
|
/**
|
|
@@ -15994,7 +16125,7 @@ interface LuaRecord {
|
|
|
15994
16125
|
include_station_names?: boolean;
|
|
15995
16126
|
include_trains?: boolean;
|
|
15996
16127
|
include_fuel?: boolean;
|
|
15997
|
-
}):
|
|
16128
|
+
}): LuaTable<uint32, LuaEntity>;
|
|
15998
16129
|
/**
|
|
15999
16130
|
* Deconstruct the given area with this deconstruction planner.
|
|
16000
16131
|
* @param table.surface Surface to deconstruct on
|
|
@@ -16012,10 +16143,14 @@ interface LuaRecord {
|
|
|
16012
16143
|
by_player?: PlayerIdentification;
|
|
16013
16144
|
super_forced?: boolean;
|
|
16014
16145
|
}): void;
|
|
16146
|
+
/**
|
|
16147
|
+
* Exports this record to a string.
|
|
16148
|
+
*/
|
|
16149
|
+
export_record(this: void): string;
|
|
16015
16150
|
/**
|
|
16016
16151
|
* 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
16152
|
*/
|
|
16018
|
-
get_active_index(this: void, player: PlayerIdentification):
|
|
16153
|
+
get_active_index(this: void, player: PlayerIdentification): uint32;
|
|
16019
16154
|
/**
|
|
16020
16155
|
* The entities in this blueprint.
|
|
16021
16156
|
*/
|
|
@@ -16023,17 +16158,17 @@ interface LuaRecord {
|
|
|
16023
16158
|
/**
|
|
16024
16159
|
* Gets the number of entities in this blueprint blueprint.
|
|
16025
16160
|
*/
|
|
16026
|
-
get_blueprint_entity_count(this: void):
|
|
16161
|
+
get_blueprint_entity_count(this: void): uint32;
|
|
16027
16162
|
/**
|
|
16028
16163
|
* Gets the given tag on the given blueprint entity index in this blueprint blueprint.
|
|
16029
16164
|
* @param index The entity index.
|
|
16030
16165
|
* @param tag The tag to get.
|
|
16031
16166
|
*/
|
|
16032
|
-
get_blueprint_entity_tag(this: void, index:
|
|
16167
|
+
get_blueprint_entity_tag(this: void, index: uint32, tag: string): AnyBasic | null;
|
|
16033
16168
|
/**
|
|
16034
16169
|
* Gets the tags for the given blueprint entity index in this blueprint.
|
|
16035
16170
|
*/
|
|
16036
|
-
get_blueprint_entity_tags(this: void, index:
|
|
16171
|
+
get_blueprint_entity_tags(this: void, index: uint32): Tags;
|
|
16037
16172
|
/**
|
|
16038
16173
|
* A list of the tiles in this blueprint.
|
|
16039
16174
|
*/
|
|
@@ -16041,18 +16176,24 @@ interface LuaRecord {
|
|
|
16041
16176
|
/**
|
|
16042
16177
|
* Gets the entity filter at the given index for this deconstruction planner.
|
|
16043
16178
|
*/
|
|
16044
|
-
get_entity_filter(this: void, index:
|
|
16179
|
+
get_entity_filter(this: void, index: uint32): ItemFilter | null;
|
|
16045
16180
|
/**
|
|
16046
16181
|
* 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
16182
|
*
|
|
16048
16183
|
* 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
16184
|
* @param index The index of the mapper to read.
|
|
16050
16185
|
*/
|
|
16051
|
-
get_mapper(this: void, index:
|
|
16186
|
+
get_mapper(this: void, index: uint32, type: 'from' | 'to'): UpgradeMapperSource | UpgradeMapperDestination;
|
|
16187
|
+
/**
|
|
16188
|
+
* Gets the currently selected record of the book for the given player.
|
|
16189
|
+
*
|
|
16190
|
+
* Note: this will return a record even if the book is in a preview state.
|
|
16191
|
+
*/
|
|
16192
|
+
get_selected_record(this: void, player: PlayerIdentification): LuaRecord | null;
|
|
16052
16193
|
/**
|
|
16053
16194
|
* Gets the tile filter at the given index for this deconstruction planner.
|
|
16054
16195
|
*/
|
|
16055
|
-
get_tile_filter(this: void, index:
|
|
16196
|
+
get_tile_filter(this: void, index: uint32): string | null;
|
|
16056
16197
|
/**
|
|
16057
16198
|
* Is this blueprint setup? I.e. is it a non-empty blueprint?
|
|
16058
16199
|
*/
|
|
@@ -16068,12 +16209,12 @@ interface LuaRecord {
|
|
|
16068
16209
|
* @param tag The tag to set.
|
|
16069
16210
|
* @param value The tag value to set or `nil` to clear the tag.
|
|
16070
16211
|
*/
|
|
16071
|
-
set_blueprint_entity_tag(this: void, index:
|
|
16212
|
+
set_blueprint_entity_tag(this: void, index: uint32, tag: string, value: AnyBasic): void;
|
|
16072
16213
|
/**
|
|
16073
16214
|
* Sets the tags on the given blueprint entity index in this blueprint.
|
|
16074
16215
|
* @param index The entity index
|
|
16075
16216
|
*/
|
|
16076
|
-
set_blueprint_entity_tags(this: void, index:
|
|
16217
|
+
set_blueprint_entity_tags(this: void, index: uint32, tags: Tags): void;
|
|
16077
16218
|
/**
|
|
16078
16219
|
* Set specific tiles in this blueprint.
|
|
16079
16220
|
* @param tiles Tiles to be a part of the blueprint.
|
|
@@ -16084,7 +16225,7 @@ interface LuaRecord {
|
|
|
16084
16225
|
* @param filter Writing `nil` removes the filter.
|
|
16085
16226
|
* @returns Whether the new filter was successfully set (ie. was valid).
|
|
16086
16227
|
*/
|
|
16087
|
-
set_entity_filter(this: void, index:
|
|
16228
|
+
set_entity_filter(this: void, index: uint32, filter: ItemFilter | nil): boolean;
|
|
16088
16229
|
/**
|
|
16089
16230
|
* Sets the module filter at the given index for this upgrade item.
|
|
16090
16231
|
*
|
|
@@ -16092,13 +16233,13 @@ interface LuaRecord {
|
|
|
16092
16233
|
* @param index The index of the mapper to set.
|
|
16093
16234
|
* @param mapper The mapper to set. Set `nil` to clear the mapper.
|
|
16094
16235
|
*/
|
|
16095
|
-
set_mapper(this: void, index:
|
|
16236
|
+
set_mapper(this: void, index: uint32, type: 'from' | 'to', mapper: UpgradeMapperSource | UpgradeMapperDestination | nil): void;
|
|
16096
16237
|
/**
|
|
16097
16238
|
* Sets the tile filter at the given index for this deconstruction planner.
|
|
16098
16239
|
* @param filter Setting to nil erases the filter.
|
|
16099
16240
|
* @returns Whether the new filter was successfully set (ie. was valid).
|
|
16100
16241
|
*/
|
|
16101
|
-
set_tile_filter(this: void, index:
|
|
16242
|
+
set_tile_filter(this: void, index: uint32, filter: string | LuaTilePrototype | LuaTile): boolean;
|
|
16102
16243
|
/**
|
|
16103
16244
|
* If absolute snapping is enabled on this blueprint.
|
|
16104
16245
|
*/
|
|
@@ -16134,7 +16275,7 @@ interface LuaRecord {
|
|
|
16134
16275
|
/**
|
|
16135
16276
|
* The number of entity filters this deconstruction planner supports.
|
|
16136
16277
|
*/
|
|
16137
|
-
readonly entity_filter_count:
|
|
16278
|
+
readonly entity_filter_count: uint32;
|
|
16138
16279
|
/**
|
|
16139
16280
|
* The blacklist/whitelist entity filter mode for this deconstruction planner.
|
|
16140
16281
|
*/
|
|
@@ -16144,7 +16285,7 @@ interface LuaRecord {
|
|
|
16144
16285
|
*/
|
|
16145
16286
|
entity_filters: ItemFilter[];
|
|
16146
16287
|
/**
|
|
16147
|
-
* Is this blueprint record a preview? A preview record must be synced by the player before entity and tile data can be read.
|
|
16288
|
+
* 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
16289
|
*/
|
|
16149
16290
|
readonly is_blueprint_preview: boolean;
|
|
16150
16291
|
/**
|
|
@@ -16154,7 +16295,7 @@ interface LuaRecord {
|
|
|
16154
16295
|
/**
|
|
16155
16296
|
* The current count of mappers in the upgrade item.
|
|
16156
16297
|
*/
|
|
16157
|
-
readonly mapper_count:
|
|
16298
|
+
readonly mapper_count: uint32;
|
|
16158
16299
|
/**
|
|
16159
16300
|
* 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
16301
|
*/
|
|
@@ -16166,7 +16307,7 @@ interface LuaRecord {
|
|
|
16166
16307
|
/**
|
|
16167
16308
|
* The number of tile filters this deconstruction planner supports.
|
|
16168
16309
|
*/
|
|
16169
|
-
readonly tile_filter_count:
|
|
16310
|
+
readonly tile_filter_count: uint32;
|
|
16170
16311
|
/**
|
|
16171
16312
|
* The blacklist/whitelist tile filter mode for this deconstruction planner.
|
|
16172
16313
|
*/
|
|
@@ -16441,7 +16582,7 @@ interface LuaRenderObject {
|
|
|
16441
16582
|
/**
|
|
16442
16583
|
* Time to live of this object. This will be 0 if the object does not expire.
|
|
16443
16584
|
*/
|
|
16444
|
-
time_to_live:
|
|
16585
|
+
time_to_live: uint32;
|
|
16445
16586
|
/**
|
|
16446
16587
|
* Where this line is drawn to.
|
|
16447
16588
|
*/
|
|
@@ -16533,7 +16674,7 @@ interface LuaRendering {
|
|
|
16533
16674
|
oriented_offset?: Vector;
|
|
16534
16675
|
target: ScriptRenderTarget;
|
|
16535
16676
|
surface: SurfaceIdentification;
|
|
16536
|
-
time_to_live?:
|
|
16677
|
+
time_to_live?: uint32;
|
|
16537
16678
|
blink_interval?: uint16;
|
|
16538
16679
|
forces?: ForceSet;
|
|
16539
16680
|
players?: PlayerIdentification[];
|
|
@@ -16564,7 +16705,7 @@ interface LuaRendering {
|
|
|
16564
16705
|
angle: float;
|
|
16565
16706
|
target: ScriptRenderTarget;
|
|
16566
16707
|
surface: SurfaceIdentification;
|
|
16567
|
-
time_to_live?:
|
|
16708
|
+
time_to_live?: uint32;
|
|
16568
16709
|
blink_interval?: uint16;
|
|
16569
16710
|
forces?: ForceSet;
|
|
16570
16711
|
players?: PlayerIdentification[];
|
|
@@ -16594,7 +16735,7 @@ interface LuaRendering {
|
|
|
16594
16735
|
filled?: boolean;
|
|
16595
16736
|
target: ScriptRenderTarget;
|
|
16596
16737
|
surface: SurfaceIdentification;
|
|
16597
|
-
time_to_live?:
|
|
16738
|
+
time_to_live?: uint32;
|
|
16598
16739
|
blink_interval?: uint16;
|
|
16599
16740
|
forces?: ForceSet;
|
|
16600
16741
|
players?: PlayerIdentification[];
|
|
@@ -16632,7 +16773,7 @@ interface LuaRendering {
|
|
|
16632
16773
|
color?: Color;
|
|
16633
16774
|
target: ScriptRenderTarget;
|
|
16634
16775
|
surface: SurfaceIdentification;
|
|
16635
|
-
time_to_live?:
|
|
16776
|
+
time_to_live?: uint32;
|
|
16636
16777
|
blink_interval?: uint16;
|
|
16637
16778
|
forces?: ForceSet;
|
|
16638
16779
|
players?: PlayerIdentification[];
|
|
@@ -16672,7 +16813,7 @@ interface LuaRendering {
|
|
|
16672
16813
|
from: ScriptRenderTarget;
|
|
16673
16814
|
to: ScriptRenderTarget;
|
|
16674
16815
|
surface: SurfaceIdentification;
|
|
16675
|
-
time_to_live?:
|
|
16816
|
+
time_to_live?: uint32;
|
|
16676
16817
|
blink_interval?: uint16;
|
|
16677
16818
|
forces?: ForceSet;
|
|
16678
16819
|
players?: PlayerIdentification[];
|
|
@@ -16704,7 +16845,7 @@ interface LuaRendering {
|
|
|
16704
16845
|
orientation_target?: ScriptRenderTarget;
|
|
16705
16846
|
use_target_orientation?: boolean;
|
|
16706
16847
|
surface: SurfaceIdentification;
|
|
16707
|
-
time_to_live?:
|
|
16848
|
+
time_to_live?: uint32;
|
|
16708
16849
|
blink_interval?: uint16;
|
|
16709
16850
|
forces?: ForceSet;
|
|
16710
16851
|
players?: PlayerIdentification[];
|
|
@@ -16737,7 +16878,7 @@ interface LuaRendering {
|
|
|
16737
16878
|
left_top: ScriptRenderTarget;
|
|
16738
16879
|
right_bottom: ScriptRenderTarget;
|
|
16739
16880
|
surface: SurfaceIdentification;
|
|
16740
|
-
time_to_live?:
|
|
16881
|
+
time_to_live?: uint32;
|
|
16741
16882
|
blink_interval?: uint16;
|
|
16742
16883
|
forces?: ForceSet;
|
|
16743
16884
|
players?: PlayerIdentification[];
|
|
@@ -16784,7 +16925,7 @@ interface LuaRendering {
|
|
|
16784
16925
|
oriented_offset?: Vector;
|
|
16785
16926
|
target: ScriptRenderTarget;
|
|
16786
16927
|
surface: SurfaceIdentification;
|
|
16787
|
-
time_to_live?:
|
|
16928
|
+
time_to_live?: uint32;
|
|
16788
16929
|
blink_interval?: uint16;
|
|
16789
16930
|
forces?: ForceSet;
|
|
16790
16931
|
players?: PlayerIdentification[];
|
|
@@ -16818,7 +16959,7 @@ interface LuaRendering {
|
|
|
16818
16959
|
color: Color;
|
|
16819
16960
|
scale?: double;
|
|
16820
16961
|
font?: string;
|
|
16821
|
-
time_to_live?:
|
|
16962
|
+
time_to_live?: uint32;
|
|
16822
16963
|
blink_interval?: uint16;
|
|
16823
16964
|
forces?: ForceSet;
|
|
16824
16965
|
players?: PlayerIdentification[];
|
|
@@ -16913,7 +17054,7 @@ interface LuaSchedule {
|
|
|
16913
17054
|
/**
|
|
16914
17055
|
* Activates the interrupt at the given index, if the index is valid.
|
|
16915
17056
|
*/
|
|
16916
|
-
activate_interrupt(this: void, index:
|
|
17057
|
+
activate_interrupt(this: void, index: uint32): void;
|
|
16917
17058
|
/**
|
|
16918
17059
|
* Adds the given interrupt to the schedule if an interrupt with the given name does not already exist.
|
|
16919
17060
|
*/
|
|
@@ -16922,19 +17063,19 @@ interface LuaSchedule {
|
|
|
16922
17063
|
* Adds the given record to the end of the current schedule or at the given index using the provided data.
|
|
16923
17064
|
* @returns The index the record was added at.
|
|
16924
17065
|
*/
|
|
16925
|
-
add_record(this: void, data: AddRecordData):
|
|
17066
|
+
add_record(this: void, data: AddRecordData): uint32 | null;
|
|
16926
17067
|
/**
|
|
16927
17068
|
* Adds the given wait condition to the given record.
|
|
16928
17069
|
*/
|
|
16929
|
-
add_wait_condition(this: void,
|
|
17070
|
+
add_wait_condition(this: void, record_position: ScheduleRecordPosition, condition_index: uint32, type: WaitConditionType): void;
|
|
16930
17071
|
/**
|
|
16931
17072
|
* Changes the interrupt at the given index to the provided values. Note, the names must match.
|
|
16932
17073
|
*/
|
|
16933
|
-
change_interrupt(this: void, index:
|
|
17074
|
+
change_interrupt(this: void, index: uint32, interrupt: ScheduleInterrupt): void;
|
|
16934
17075
|
/**
|
|
16935
17076
|
* Changes the wait condition on the given record to the new values.
|
|
16936
17077
|
*/
|
|
16937
|
-
change_wait_condition(this: void,
|
|
17078
|
+
change_wait_condition(this: void, record_position: ScheduleRecordPosition, condition_index: uint32, wait_condition: WaitCondition): void;
|
|
16938
17079
|
/**
|
|
16939
17080
|
* Removes all interrupts.
|
|
16940
17081
|
*/
|
|
@@ -16942,94 +17083,101 @@ interface LuaSchedule {
|
|
|
16942
17083
|
/**
|
|
16943
17084
|
* @param interrupt_index If provided, clears the records for this interrupt.
|
|
16944
17085
|
*/
|
|
16945
|
-
clear_records(this: void, interrupt_index?:
|
|
17086
|
+
clear_records(this: void, interrupt_index?: uint32): void;
|
|
16946
17087
|
/**
|
|
16947
17088
|
* Copies the record from the given schedule at the given index into this schedule at the given index.
|
|
16948
17089
|
*/
|
|
16949
|
-
copy_record(this: void, source_schedule: LuaSchedule, source_index:
|
|
16950
|
-
drag_interrupt(this: void, from:
|
|
17090
|
+
copy_record(this: void, source_schedule: LuaSchedule, source_index: uint32, destination_index: uint32): void;
|
|
17091
|
+
drag_interrupt(this: void, from: uint32, to: uint32): void;
|
|
16951
17092
|
/**
|
|
16952
17093
|
* @param interrupt_index The interrupt to operate on, if any.
|
|
16953
17094
|
*/
|
|
16954
|
-
drag_record(this: void, from:
|
|
17095
|
+
drag_record(this: void, from: uint32, to: uint32, interrupt_index?: uint32): void;
|
|
16955
17096
|
/**
|
|
16956
|
-
* @param
|
|
17097
|
+
* @param record_position The record to change.
|
|
16957
17098
|
*/
|
|
16958
|
-
drag_wait_condition(this: void,
|
|
17099
|
+
drag_wait_condition(this: void, record_position: ScheduleRecordPosition, from: uint32, to: uint32): void;
|
|
16959
17100
|
/**
|
|
16960
17101
|
* Gets if the given interrupt can be triggered inside other interrupts.
|
|
16961
17102
|
*/
|
|
16962
|
-
get_inside_interrupt(this: void, interrupt_index:
|
|
16963
|
-
get_interrupt(this: void, index:
|
|
17103
|
+
get_inside_interrupt(this: void, interrupt_index: uint32): boolean;
|
|
17104
|
+
get_interrupt(this: void, index: uint32): ScheduleInterrupt | null;
|
|
16964
17105
|
get_interrupts(this: void): ScheduleInterrupt[];
|
|
16965
|
-
get_record(this: void,
|
|
17106
|
+
get_record(this: void, record_position: ScheduleRecordPosition): ScheduleRecord | null;
|
|
16966
17107
|
/**
|
|
16967
17108
|
* If the given index is invalid, `nil` is returned.
|
|
16968
17109
|
* @param interrupt_index If provided, the record count in this interrupt is read.
|
|
16969
17110
|
*/
|
|
16970
|
-
get_record_count(this: void, interrupt_index?:
|
|
17111
|
+
get_record_count(this: void, interrupt_index?: uint32): uint32 | null;
|
|
16971
17112
|
/**
|
|
16972
17113
|
* @param interrupt_index If provided, gets the records for this interrupt.
|
|
16973
17114
|
*/
|
|
16974
|
-
get_records(this: void, interrupt_index?:
|
|
17115
|
+
get_records(this: void, interrupt_index?: uint32): ScheduleRecord[] | null;
|
|
16975
17116
|
/**
|
|
16976
|
-
* Gets the wait condition at the given
|
|
17117
|
+
* Gets the wait condition at the given record position if one exists.
|
|
16977
17118
|
*/
|
|
16978
|
-
get_wait_condition(this: void,
|
|
17119
|
+
get_wait_condition(this: void, record_position: ScheduleRecordPosition, condition_index: uint32): WaitCondition | null;
|
|
16979
17120
|
/**
|
|
16980
17121
|
* The number of wait conditions in the given schedule record.
|
|
16981
17122
|
*/
|
|
16982
|
-
get_wait_condition_count(this: void,
|
|
17123
|
+
get_wait_condition_count(this: void, record_position: ScheduleRecordPosition): uint32 | null;
|
|
16983
17124
|
/**
|
|
16984
|
-
* Gets the wait conditions at the given
|
|
17125
|
+
* Gets the wait conditions at the given record position if they exist.
|
|
16985
17126
|
*/
|
|
16986
|
-
get_wait_conditions(this: void,
|
|
17127
|
+
get_wait_conditions(this: void, record_position: ScheduleRecordPosition): WaitCondition[] | null;
|
|
16987
17128
|
/**
|
|
17129
|
+
* Sets the train or space platform to go to a destination, including changing the train/space platform to automatic mode.
|
|
16988
17130
|
* @param schedule_index The schedule index
|
|
16989
17131
|
*/
|
|
16990
|
-
go_to_station(this: void, schedule_index:
|
|
17132
|
+
go_to_station(this: void, schedule_index: uint32): void;
|
|
16991
17133
|
/**
|
|
16992
17134
|
* Removes the interrupt at the given index, if the index is valid.
|
|
16993
17135
|
*/
|
|
16994
|
-
remove_interrupt(this: void, index:
|
|
17136
|
+
remove_interrupt(this: void, index: uint32): void;
|
|
16995
17137
|
/**
|
|
16996
|
-
* Removes the record at the given
|
|
17138
|
+
* Removes the record at the given record position, if the record position is valid.
|
|
16997
17139
|
*/
|
|
16998
|
-
remove_record(this: void,
|
|
17140
|
+
remove_record(this: void, record_position: ScheduleRecordPosition): void;
|
|
16999
17141
|
/**
|
|
17000
17142
|
* Removes the given wait condition from the given record.
|
|
17001
17143
|
*/
|
|
17002
|
-
remove_wait_condition(this: void,
|
|
17144
|
+
remove_wait_condition(this: void, record_position: ScheduleRecordPosition, condition_index: uint32): void;
|
|
17003
17145
|
/**
|
|
17004
17146
|
* @param old_name The interrupt to rename
|
|
17005
17147
|
* @param new_name The new name - if it already exists, does nothing.
|
|
17006
17148
|
*/
|
|
17007
17149
|
rename_interrupt(this: void, old_name: string, new_name: string): void;
|
|
17008
17150
|
/**
|
|
17009
|
-
* Sets if unloading is allowed at the given schedule
|
|
17151
|
+
* Sets if unloading is allowed at the given schedule record position. Only relevant for space platforms.
|
|
17010
17152
|
*/
|
|
17011
|
-
set_allow_unloading(this: void,
|
|
17153
|
+
set_allow_unloading(this: void, record_position: ScheduleRecordPosition, allow: boolean): void;
|
|
17012
17154
|
/**
|
|
17013
17155
|
* Sets if the given interrupt can be triggered inside other interrupts.
|
|
17014
17156
|
*/
|
|
17015
|
-
set_inside_interrupt(this: void, interrupt_index:
|
|
17157
|
+
set_inside_interrupt(this: void, interrupt_index: uint32, value: boolean): void;
|
|
17016
17158
|
set_interrupts(this: void, interrupts: ScheduleInterrupt[]): void;
|
|
17017
17159
|
/**
|
|
17018
17160
|
* @param interrupt_index If provided, the records will be set on this interrupt.
|
|
17019
17161
|
*/
|
|
17020
|
-
set_records(this: void, records: ScheduleRecord[], interrupt_index?:
|
|
17162
|
+
set_records(this: void, records: ScheduleRecord[], interrupt_index?: uint32): void;
|
|
17163
|
+
/**
|
|
17164
|
+
* Sets whether this train is in {@link manual mode | runtime:LuaTrain::manual_mode} or this space platform is {@link paused | runtime:LuaSpacePlatform::paused}.
|
|
17165
|
+
*/
|
|
17021
17166
|
set_stopped(this: void, stopped: boolean): void;
|
|
17022
17167
|
/**
|
|
17023
17168
|
* Sets the comparison on the given wait condition.
|
|
17024
17169
|
* @param mode `"and"`, or `"or"`
|
|
17025
17170
|
*/
|
|
17026
|
-
set_wait_condition_mode(this: void,
|
|
17027
|
-
|
|
17171
|
+
set_wait_condition_mode(this: void, record_position: ScheduleRecordPosition, condition_index: uint32, mode: string): void;
|
|
17172
|
+
/**
|
|
17173
|
+
* The schedule index of the current destination.
|
|
17174
|
+
*/
|
|
17175
|
+
readonly current: uint32;
|
|
17028
17176
|
/**
|
|
17029
17177
|
* The group this schedule is part of, if any.
|
|
17030
17178
|
*/
|
|
17031
17179
|
group?: string;
|
|
17032
|
-
readonly interrupt_count:
|
|
17180
|
+
readonly interrupt_count: uint32;
|
|
17033
17181
|
/**
|
|
17034
17182
|
* 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
17183
|
*/
|
|
@@ -17039,10 +17187,15 @@ interface LuaSchedule {
|
|
|
17039
17187
|
*/
|
|
17040
17188
|
readonly owner?: LuaTrain | LuaSpacePlatform;
|
|
17041
17189
|
/**
|
|
17190
|
+
* The time when the train or space platform was last considered active for the inactivity condition.
|
|
17191
|
+
*
|
|
17042
17192
|
* Note: when writing, value must not be larger than LuaGameScript::tick
|
|
17043
17193
|
*/
|
|
17044
17194
|
tick_of_last_activity: MapTick;
|
|
17045
17195
|
readonly tick_of_last_schedule_change: MapTick;
|
|
17196
|
+
/**
|
|
17197
|
+
* How long this train or space platform has been in the current station.
|
|
17198
|
+
*/
|
|
17046
17199
|
readonly ticks_in_station: MapTick;
|
|
17047
17200
|
/**
|
|
17048
17201
|
* 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 +17358,7 @@ interface LuaSegmentedUnit {
|
|
|
17205
17358
|
/**
|
|
17206
17359
|
* The maximum length of {@link LuaSegmentedUnit::get_body_nodes | runtime:LuaSegmentedUnit::get_body_nodes}.
|
|
17207
17360
|
*/
|
|
17208
|
-
readonly max_body_nodes:
|
|
17361
|
+
readonly max_body_nodes: uint32;
|
|
17209
17362
|
/**
|
|
17210
17363
|
* The maximum health of the unit.
|
|
17211
17364
|
*/
|
|
@@ -17273,7 +17426,7 @@ interface LuaSelectorCombinatorControlBehavior extends LuaCombinatorControlBehav
|
|
|
17273
17426
|
readonly valid: boolean;
|
|
17274
17427
|
}
|
|
17275
17428
|
/**
|
|
17276
|
-
* Object containing
|
|
17429
|
+
* 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
17430
|
*/
|
|
17278
17431
|
interface LuaSettings {
|
|
17279
17432
|
/**
|
|
@@ -17446,7 +17599,7 @@ interface LuaSimulation {
|
|
|
17446
17599
|
camera_player_cursor_direction: defines.direction;
|
|
17447
17600
|
camera_player_cursor_position?: MapPosition;
|
|
17448
17601
|
camera_position?: MapPosition;
|
|
17449
|
-
camera_surface_index?:
|
|
17602
|
+
camera_surface_index?: uint32;
|
|
17450
17603
|
camera_zoom: double;
|
|
17451
17604
|
gui_tooltip_interval: double;
|
|
17452
17605
|
hide_cursor: boolean;
|
|
@@ -17470,7 +17623,7 @@ interface LuaSpaceConnectionPrototype extends LuaPrototypeBase {
|
|
|
17470
17623
|
*/
|
|
17471
17624
|
readonly factoriopedia_alternative?: LuaSpaceConnectionPrototype;
|
|
17472
17625
|
readonly from: LuaSpaceLocationPrototype;
|
|
17473
|
-
readonly length:
|
|
17626
|
+
readonly length: uint32;
|
|
17474
17627
|
/**
|
|
17475
17628
|
* 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
17629
|
*/
|
|
@@ -17493,7 +17646,7 @@ interface LuaSpaceLocationPrototype extends LuaPrototypeBase {
|
|
|
17493
17646
|
*/
|
|
17494
17647
|
readonly factoriopedia_alternative?: LuaSpaceLocationPrototype;
|
|
17495
17648
|
readonly map_gen_settings?: MapGenSettings;
|
|
17496
|
-
readonly map_seed_offset?:
|
|
17649
|
+
readonly map_seed_offset?: uint32;
|
|
17497
17650
|
/**
|
|
17498
17651
|
* 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
17652
|
*/
|
|
@@ -17506,7 +17659,7 @@ interface LuaSpaceLocationPrototype extends LuaPrototypeBase {
|
|
|
17506
17659
|
* A mapping of the surface property name to the value.
|
|
17507
17660
|
*/
|
|
17508
17661
|
readonly surface_properties?: Record<string, double>;
|
|
17509
|
-
readonly ticks_between_player_effects?:
|
|
17662
|
+
readonly ticks_between_player_effects?: uint32;
|
|
17510
17663
|
/**
|
|
17511
17664
|
* 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
17665
|
*/
|
|
@@ -17549,18 +17702,19 @@ interface LuaSpacePlatform {
|
|
|
17549
17702
|
* Schedules this space platform for deletion.
|
|
17550
17703
|
* @param ticks The number of ticks from now when this platform will be deleted.
|
|
17551
17704
|
*/
|
|
17552
|
-
destroy(this: void, ticks?:
|
|
17705
|
+
destroy(this: void, ticks?: uint32): void;
|
|
17553
17706
|
/**
|
|
17554
17707
|
* Destroys all asteroid chunks from the given area. If no area and no position are given, then the entire surface is searched.
|
|
17555
17708
|
* @param table.invert If the filters should be inverted.
|
|
17709
|
+
* @returns The number of destroyed chunks.
|
|
17556
17710
|
*/
|
|
17557
17711
|
destroy_asteroid_chunks(this: void, table: {
|
|
17558
17712
|
area?: BoundingBox;
|
|
17559
17713
|
position?: MapPosition;
|
|
17560
17714
|
name?: AsteroidChunkID | AsteroidChunkID[];
|
|
17561
|
-
limit?:
|
|
17715
|
+
limit?: uint32;
|
|
17562
17716
|
invert?: boolean;
|
|
17563
|
-
}):
|
|
17717
|
+
}): uint32;
|
|
17564
17718
|
/**
|
|
17565
17719
|
* Ejects an item into space on this space platform.
|
|
17566
17720
|
*
|
|
@@ -17582,7 +17736,7 @@ interface LuaSpacePlatform {
|
|
|
17582
17736
|
area?: BoundingBox;
|
|
17583
17737
|
position?: MapPosition;
|
|
17584
17738
|
name?: AsteroidChunkID | AsteroidChunkID[];
|
|
17585
|
-
limit?:
|
|
17739
|
+
limit?: uint32;
|
|
17586
17740
|
invert?: boolean;
|
|
17587
17741
|
}): AsteroidChunk[];
|
|
17588
17742
|
get_schedule(this: void): LuaSchedule;
|
|
@@ -17624,7 +17778,7 @@ interface LuaSpacePlatform {
|
|
|
17624
17778
|
/**
|
|
17625
17779
|
* The unique index of this space platform.
|
|
17626
17780
|
*/
|
|
17627
|
-
readonly index:
|
|
17781
|
+
readonly index: uint32;
|
|
17628
17782
|
/**
|
|
17629
17783
|
* The space location this space platform previously went through or stopped at.
|
|
17630
17784
|
*/
|
|
@@ -17652,7 +17806,7 @@ interface LuaSpacePlatform {
|
|
|
17652
17806
|
*
|
|
17653
17807
|
* Returns how many ticks are left before the platform will be deleted. 0 if not scheduled for deletion.
|
|
17654
17808
|
*/
|
|
17655
|
-
readonly scheduled_for_deletion:
|
|
17809
|
+
readonly scheduled_for_deletion: uint32;
|
|
17656
17810
|
/**
|
|
17657
17811
|
* The space connection this space platform is traveling through or `nil`.
|
|
17658
17812
|
*
|
|
@@ -17732,6 +17886,26 @@ interface LuaSpacePlatformHubControlBehavior extends LuaControlBehavior {
|
|
|
17732
17886
|
*/
|
|
17733
17887
|
readonly valid: boolean;
|
|
17734
17888
|
}
|
|
17889
|
+
/**
|
|
17890
|
+
* Control behavior for splitter.
|
|
17891
|
+
*/
|
|
17892
|
+
interface LuaSplitterControlBehavior extends LuaControlBehavior {
|
|
17893
|
+
input_left_condition: CircuitConditionDefinition;
|
|
17894
|
+
input_right_condition: CircuitConditionDefinition;
|
|
17895
|
+
/**
|
|
17896
|
+
* 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.
|
|
17897
|
+
*/
|
|
17898
|
+
readonly object_name: string;
|
|
17899
|
+
output_left_condition: CircuitConditionDefinition;
|
|
17900
|
+
output_right_condition: CircuitConditionDefinition;
|
|
17901
|
+
set_filter: boolean;
|
|
17902
|
+
set_input_side: boolean;
|
|
17903
|
+
set_output_side: boolean;
|
|
17904
|
+
/**
|
|
17905
|
+
* 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.
|
|
17906
|
+
*/
|
|
17907
|
+
readonly valid: boolean;
|
|
17908
|
+
}
|
|
17735
17909
|
/**
|
|
17736
17910
|
* Control behavior for storage tanks.
|
|
17737
17911
|
*/
|
|
@@ -17754,20 +17928,20 @@ interface LuaStorageTankControlBehavior extends LuaControlBehavior {
|
|
|
17754
17928
|
*/
|
|
17755
17929
|
interface LuaStyle {
|
|
17756
17930
|
badge_font: string;
|
|
17757
|
-
badge_horizontal_spacing:
|
|
17758
|
-
bar_width:
|
|
17931
|
+
badge_horizontal_spacing: int32;
|
|
17932
|
+
bar_width: uint32;
|
|
17759
17933
|
/**
|
|
17760
17934
|
* Space between the table cell contents bottom and border.
|
|
17761
17935
|
*/
|
|
17762
|
-
bottom_cell_padding:
|
|
17763
|
-
bottom_margin:
|
|
17764
|
-
bottom_padding:
|
|
17936
|
+
bottom_cell_padding: int32;
|
|
17937
|
+
bottom_margin: int32;
|
|
17938
|
+
bottom_padding: int32;
|
|
17765
17939
|
/**
|
|
17766
17940
|
* Space between the table cell contents and border. Sets top/right/bottom/left cell paddings to this value.
|
|
17767
17941
|
*/
|
|
17768
|
-
cell_padding:
|
|
17942
|
+
cell_padding: int32;
|
|
17769
17943
|
clicked_font_color: Color;
|
|
17770
|
-
clicked_vertical_offset:
|
|
17944
|
+
clicked_vertical_offset: int32;
|
|
17771
17945
|
color: Color;
|
|
17772
17946
|
/**
|
|
17773
17947
|
* 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 +17949,31 @@ interface LuaStyle {
|
|
|
17775
17949
|
table_element.style.column_alignments[1] = "center"
|
|
17776
17950
|
```
|
|
17777
17951
|
*/
|
|
17778
|
-
readonly column_alignments:
|
|
17952
|
+
readonly column_alignments: LuaTable<uint32, Alignment>;
|
|
17779
17953
|
default_badge_font_color: Color;
|
|
17780
17954
|
disabled_badge_font_color: Color;
|
|
17781
17955
|
disabled_font_color: Color;
|
|
17782
17956
|
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:
|
|
17957
|
+
extra_bottom_margin_when_activated: int32;
|
|
17958
|
+
extra_bottom_padding_when_activated: int32;
|
|
17959
|
+
extra_left_margin_when_activated: int32;
|
|
17960
|
+
extra_left_padding_when_activated: int32;
|
|
17787
17961
|
/**
|
|
17788
17962
|
* Sets `extra_top/right/bottom/left_margin_when_activated` to this value.
|
|
17789
17963
|
*
|
|
17790
17964
|
* 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
17965
|
*/
|
|
17792
|
-
extra_margin_when_activated:
|
|
17966
|
+
extra_margin_when_activated: int32 | int32[];
|
|
17793
17967
|
/**
|
|
17794
17968
|
* Sets `extra_top/right/bottom/left_padding_when_activated` to this value.
|
|
17795
17969
|
*
|
|
17796
17970
|
* 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
17971
|
*/
|
|
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:
|
|
17972
|
+
extra_padding_when_activated: int32 | int32[];
|
|
17973
|
+
extra_right_margin_when_activated: int32;
|
|
17974
|
+
extra_right_padding_when_activated: int32;
|
|
17975
|
+
extra_top_margin_when_activated: int32;
|
|
17976
|
+
extra_top_padding_when_activated: int32;
|
|
17803
17977
|
font: string;
|
|
17804
17978
|
font_color: Color;
|
|
17805
17979
|
/**
|
|
@@ -17809,7 +17983,7 @@ interface LuaStyle {
|
|
|
17809
17983
|
/**
|
|
17810
17984
|
* Sets both minimal and maximal height to the given value.
|
|
17811
17985
|
*/
|
|
17812
|
-
height:
|
|
17986
|
+
height: int32;
|
|
17813
17987
|
/**
|
|
17814
17988
|
* Horizontal align of the inner content of the widget, if any.
|
|
17815
17989
|
*/
|
|
@@ -17817,7 +17991,7 @@ interface LuaStyle {
|
|
|
17817
17991
|
/**
|
|
17818
17992
|
* Horizontal space between individual cells.
|
|
17819
17993
|
*/
|
|
17820
|
-
horizontal_spacing:
|
|
17994
|
+
horizontal_spacing: int32;
|
|
17821
17995
|
/**
|
|
17822
17996
|
* Whether the GUI element can be squashed (by maximal width of some parent element) horizontally. `nil` if this element does not support squashing.
|
|
17823
17997
|
*
|
|
@@ -17832,31 +18006,31 @@ interface LuaStyle {
|
|
|
17832
18006
|
/**
|
|
17833
18007
|
* Space between the table cell contents left and border.
|
|
17834
18008
|
*/
|
|
17835
|
-
left_cell_padding:
|
|
17836
|
-
left_margin:
|
|
17837
|
-
left_padding:
|
|
18009
|
+
left_cell_padding: int32;
|
|
18010
|
+
left_margin: int32;
|
|
18011
|
+
left_padding: int32;
|
|
17838
18012
|
/**
|
|
17839
18013
|
* Sets top/right/bottom/left margins to this value.
|
|
17840
18014
|
*
|
|
17841
18015
|
* 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
18016
|
*/
|
|
17843
|
-
margin:
|
|
18017
|
+
margin: int32 | int32[];
|
|
17844
18018
|
/**
|
|
17845
18019
|
* Maximal height ensures, that the widget will never be bigger than than that size. It can't be stretched to be bigger.
|
|
17846
18020
|
*/
|
|
17847
|
-
maximal_height:
|
|
18021
|
+
maximal_height: int32;
|
|
17848
18022
|
/**
|
|
17849
18023
|
* Maximal width ensures, that the widget will never be bigger than than that size. It can't be stretched to be bigger.
|
|
17850
18024
|
*/
|
|
17851
|
-
maximal_width:
|
|
18025
|
+
maximal_width: int32;
|
|
17852
18026
|
/**
|
|
17853
18027
|
* Minimal height ensures, that the widget will never be smaller than than that size. It can't be squashed to be smaller.
|
|
17854
18028
|
*/
|
|
17855
|
-
minimal_height:
|
|
18029
|
+
minimal_height: int32;
|
|
17856
18030
|
/**
|
|
17857
18031
|
* Minimal width ensures, that the widget will never be smaller than than that size. It can't be squashed to be smaller.
|
|
17858
18032
|
*/
|
|
17859
|
-
minimal_width:
|
|
18033
|
+
minimal_width: int32;
|
|
17860
18034
|
/**
|
|
17861
18035
|
* Name of this style.
|
|
17862
18036
|
*/
|
|
@@ -17864,11 +18038,11 @@ interface LuaStyle {
|
|
|
17864
18038
|
/**
|
|
17865
18039
|
* 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
18040
|
*/
|
|
17867
|
-
natural_height:
|
|
18041
|
+
natural_height: int32;
|
|
17868
18042
|
/**
|
|
17869
18043
|
* 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
18044
|
*/
|
|
17871
|
-
natural_width:
|
|
18045
|
+
natural_width: int32;
|
|
17872
18046
|
/**
|
|
17873
18047
|
* 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
18048
|
*/
|
|
@@ -17878,7 +18052,7 @@ interface LuaStyle {
|
|
|
17878
18052
|
*
|
|
17879
18053
|
* 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
18054
|
*/
|
|
17881
|
-
padding:
|
|
18055
|
+
padding: int32 | int32[];
|
|
17882
18056
|
pie_progress_color: Color;
|
|
17883
18057
|
/**
|
|
17884
18058
|
* How this GUI element handles rich text.
|
|
@@ -17887,9 +18061,9 @@ interface LuaStyle {
|
|
|
17887
18061
|
/**
|
|
17888
18062
|
* Space between the table cell contents right and border.
|
|
17889
18063
|
*/
|
|
17890
|
-
right_cell_padding:
|
|
17891
|
-
right_margin:
|
|
17892
|
-
right_padding:
|
|
18064
|
+
right_cell_padding: int32;
|
|
18065
|
+
right_margin: int32;
|
|
18066
|
+
right_padding: int32;
|
|
17893
18067
|
selected_badge_font_color: Color;
|
|
17894
18068
|
selected_clicked_font_color: Color;
|
|
17895
18069
|
selected_font_color: Color;
|
|
@@ -17898,15 +18072,15 @@ interface LuaStyle {
|
|
|
17898
18072
|
/**
|
|
17899
18073
|
* 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
18074
|
*/
|
|
17901
|
-
size:
|
|
18075
|
+
size: int32 | int32[];
|
|
17902
18076
|
stretch_image_to_widget_size: boolean;
|
|
17903
18077
|
strikethrough_color: Color;
|
|
17904
18078
|
/**
|
|
17905
18079
|
* Space between the table cell contents top and border.
|
|
17906
18080
|
*/
|
|
17907
|
-
top_cell_padding:
|
|
17908
|
-
top_margin:
|
|
17909
|
-
top_padding:
|
|
18081
|
+
top_cell_padding: int32;
|
|
18082
|
+
top_margin: int32;
|
|
18083
|
+
top_padding: int32;
|
|
17910
18084
|
use_header_filler: boolean;
|
|
17911
18085
|
/**
|
|
17912
18086
|
* 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 +18093,7 @@ interface LuaStyle {
|
|
|
17919
18093
|
/**
|
|
17920
18094
|
* Vertical space between individual cells.
|
|
17921
18095
|
*/
|
|
17922
|
-
vertical_spacing:
|
|
18096
|
+
vertical_spacing: int32;
|
|
17923
18097
|
/**
|
|
17924
18098
|
* Whether the GUI element can be squashed (by maximal height of some parent element) vertically. `nil` if this element does not support squashing.
|
|
17925
18099
|
*
|
|
@@ -17933,7 +18107,7 @@ interface LuaStyle {
|
|
|
17933
18107
|
/**
|
|
17934
18108
|
* Sets both minimal and maximal width to the given value.
|
|
17935
18109
|
*/
|
|
17936
|
-
width:
|
|
18110
|
+
width: int32;
|
|
17937
18111
|
}
|
|
17938
18112
|
/**
|
|
17939
18113
|
* 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 +18117,12 @@ interface LuaSurface {
|
|
|
17943
18117
|
* Adds the given script area.
|
|
17944
18118
|
* @returns The id of the created area.
|
|
17945
18119
|
*/
|
|
17946
|
-
add_script_area(this: void, area: ScriptArea):
|
|
18120
|
+
add_script_area(this: void, area: ScriptArea): uint32;
|
|
17947
18121
|
/**
|
|
17948
18122
|
* Adds the given script position.
|
|
17949
18123
|
* @returns The id of the created position.
|
|
17950
18124
|
*/
|
|
17951
|
-
add_script_position(this: void, position: ScriptPosition):
|
|
18125
|
+
add_script_position(this: void, position: ScriptPosition): uint32;
|
|
17952
18126
|
/**
|
|
17953
18127
|
* Sets the given area to the checkerboard lab tiles.
|
|
17954
18128
|
* @param area The tile area.
|
|
@@ -17962,7 +18136,7 @@ interface LuaSurface {
|
|
|
17962
18136
|
* @param unit_count Number of biters to send for the base-building task.
|
|
17963
18137
|
* @param force Force the new base will belong to. Defaults to enemy.
|
|
17964
18138
|
*/
|
|
17965
|
-
build_enemy_base(this: void, position: MapPosition, unit_count:
|
|
18139
|
+
build_enemy_base(this: void, position: MapPosition, unit_count: uint32, force?: ForceID): void;
|
|
17966
18140
|
/**
|
|
17967
18141
|
* 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
18142
|
* @param property_names Names of properties (`"elevation"`, etc) to calculate.
|
|
@@ -18018,7 +18192,7 @@ interface LuaSurface {
|
|
|
18018
18192
|
player?: PlayerIdentification;
|
|
18019
18193
|
skip_fog_of_war?: boolean;
|
|
18020
18194
|
item?: LuaItemStack;
|
|
18021
|
-
undo_index?:
|
|
18195
|
+
undo_index?: uint32;
|
|
18022
18196
|
super_forced?: boolean;
|
|
18023
18197
|
}): void;
|
|
18024
18198
|
/**
|
|
@@ -18136,13 +18310,13 @@ interface LuaSurface {
|
|
|
18136
18310
|
*
|
|
18137
18311
|
* - If `area` is specified, this returns entities colliding with that area.
|
|
18138
18312
|
*/
|
|
18139
|
-
count_entities_filtered(this: void, filter: EntitySearchFilters):
|
|
18313
|
+
count_entities_filtered(this: void, filter: EntitySearchFilters): uint32;
|
|
18140
18314
|
/**
|
|
18141
18315
|
* 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
18316
|
*
|
|
18143
18317
|
* 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
18318
|
*/
|
|
18145
|
-
count_tiles_filtered(this: void, filter: TileSearchFilters):
|
|
18319
|
+
count_tiles_filtered(this: void, filter: TileSearchFilters): uint32;
|
|
18146
18320
|
/**
|
|
18147
18321
|
* Adds the given decoratives to the surface.
|
|
18148
18322
|
*
|
|
@@ -18174,7 +18348,7 @@ interface LuaSurface {
|
|
|
18174
18348
|
flip_horizontal?: boolean;
|
|
18175
18349
|
flip_vertical?: boolean;
|
|
18176
18350
|
by_player?: PlayerIdentification;
|
|
18177
|
-
}):
|
|
18351
|
+
}): int32 | null;
|
|
18178
18352
|
/**
|
|
18179
18353
|
* Create an entity on this surface.
|
|
18180
18354
|
* @example ```
|
|
@@ -18300,7 +18474,7 @@ interface LuaSurface {
|
|
|
18300
18474
|
from_layer?: string;
|
|
18301
18475
|
to_layer?: string;
|
|
18302
18476
|
exclude_soft?: boolean;
|
|
18303
|
-
limit?:
|
|
18477
|
+
limit?: uint32;
|
|
18304
18478
|
invert?: boolean;
|
|
18305
18479
|
}): void;
|
|
18306
18480
|
/**
|
|
@@ -18311,12 +18485,12 @@ interface LuaSurface {
|
|
|
18311
18485
|
* Sets the given script area to the new values.
|
|
18312
18486
|
* @param id The area to edit.
|
|
18313
18487
|
*/
|
|
18314
|
-
edit_script_area(this: void, id:
|
|
18488
|
+
edit_script_area(this: void, id: uint32, area: ScriptArea): void;
|
|
18315
18489
|
/**
|
|
18316
18490
|
* Sets the given script position to the new values.
|
|
18317
18491
|
* @param id The position to edit.
|
|
18318
18492
|
*/
|
|
18319
|
-
edit_script_position(this: void, id:
|
|
18493
|
+
edit_script_position(this: void, id: uint32, position: ScriptPosition): void;
|
|
18320
18494
|
/**
|
|
18321
18495
|
* Whether the given entity prototype collides at the given position and direction.
|
|
18322
18496
|
* @param prototype The entity prototype to check.
|
|
@@ -18356,7 +18530,7 @@ interface LuaSurface {
|
|
|
18356
18530
|
from_layer?: string;
|
|
18357
18531
|
to_layer?: string;
|
|
18358
18532
|
exclude_soft?: boolean;
|
|
18359
|
-
limit?:
|
|
18533
|
+
limit?: uint32;
|
|
18360
18534
|
invert?: boolean;
|
|
18361
18535
|
}): DecorativeResult[];
|
|
18362
18536
|
/**
|
|
@@ -18571,12 +18745,12 @@ interface LuaSurface {
|
|
|
18571
18745
|
/**
|
|
18572
18746
|
* Gets the resource amount of all resources on this surface
|
|
18573
18747
|
*/
|
|
18574
|
-
get_resource_counts(this: void): Record<string,
|
|
18748
|
+
get_resource_counts(this: void): Record<string, uint32>;
|
|
18575
18749
|
/**
|
|
18576
18750
|
* Gets the first script area by name or id.
|
|
18577
18751
|
* @param key The name or id of the area to get.
|
|
18578
18752
|
*/
|
|
18579
|
-
get_script_area(this: void, key?: string |
|
|
18753
|
+
get_script_area(this: void, key?: string | uint32): ScriptArea | null;
|
|
18580
18754
|
/**
|
|
18581
18755
|
* Gets the script areas that match the given name or if no name is given all areas are returned.
|
|
18582
18756
|
*/
|
|
@@ -18585,7 +18759,7 @@ interface LuaSurface {
|
|
|
18585
18759
|
* Gets the first script position by name or id.
|
|
18586
18760
|
* @param key The name or id of the position to get.
|
|
18587
18761
|
*/
|
|
18588
|
-
get_script_position(this: void, key?: string |
|
|
18762
|
+
get_script_position(this: void, key?: string | uint32): ScriptPosition | null;
|
|
18589
18763
|
/**
|
|
18590
18764
|
* Gets the script positions that match the given name or if no name is given all positions are returned.
|
|
18591
18765
|
*/
|
|
@@ -18612,7 +18786,7 @@ interface LuaSurface {
|
|
|
18612
18786
|
*
|
|
18613
18787
|
* Non-integer values will result in them being rounded down.
|
|
18614
18788
|
*/
|
|
18615
|
-
get_tile(this: void, x:
|
|
18789
|
+
get_tile(this: void, x: int32, y: int32): LuaTile;
|
|
18616
18790
|
/**
|
|
18617
18791
|
* Gets the total amount of pollution on the surface by iterating over all the chunks containing pollution.
|
|
18618
18792
|
*/
|
|
@@ -18662,12 +18836,12 @@ interface LuaSurface {
|
|
|
18662
18836
|
* Removes the given script area.
|
|
18663
18837
|
* @returns If the area was actually removed. False when it didn't exist.
|
|
18664
18838
|
*/
|
|
18665
|
-
remove_script_area(this: void, id:
|
|
18839
|
+
remove_script_area(this: void, id: uint32): boolean;
|
|
18666
18840
|
/**
|
|
18667
18841
|
* Removes the given script position.
|
|
18668
18842
|
* @returns If the position was actually removed. False when it didn't exist.
|
|
18669
18843
|
*/
|
|
18670
|
-
remove_script_position(this: void, id:
|
|
18844
|
+
remove_script_position(this: void, id: uint32): boolean;
|
|
18671
18845
|
/**
|
|
18672
18846
|
* 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
18847
|
*
|
|
@@ -18695,17 +18869,17 @@ interface LuaSurface {
|
|
|
18695
18869
|
radius?: double;
|
|
18696
18870
|
pathfind_flags?: PathfinderFlags;
|
|
18697
18871
|
can_open_gates?: boolean;
|
|
18698
|
-
path_resolution_modifier?:
|
|
18699
|
-
max_gap_size?:
|
|
18872
|
+
path_resolution_modifier?: int32;
|
|
18873
|
+
max_gap_size?: int32;
|
|
18700
18874
|
max_attack_distance?: double;
|
|
18701
18875
|
entity_to_ignore?: LuaEntity;
|
|
18702
|
-
}):
|
|
18876
|
+
}): uint32;
|
|
18703
18877
|
/**
|
|
18704
18878
|
* 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
18879
|
* @param position Where to generate the new chunks.
|
|
18706
18880
|
* @param radius The chunk radius from `position` to generate new chunks in. Defaults to `0`.
|
|
18707
18881
|
*/
|
|
18708
|
-
request_to_generate_chunks(this: void, position: MapPosition, radius?:
|
|
18882
|
+
request_to_generate_chunks(this: void, position: MapPosition, radius?: uint32): void;
|
|
18709
18883
|
/**
|
|
18710
18884
|
* Set generated status of a chunk. Useful when copying chunks.
|
|
18711
18885
|
* @param position The chunk's position.
|
|
@@ -18739,10 +18913,10 @@ interface LuaSurface {
|
|
|
18739
18913
|
*/
|
|
18740
18914
|
set_multi_command(this: void, table: {
|
|
18741
18915
|
command: Command;
|
|
18742
|
-
unit_count:
|
|
18916
|
+
unit_count: uint32;
|
|
18743
18917
|
force?: ForceID;
|
|
18744
|
-
unit_search_distance?:
|
|
18745
|
-
}):
|
|
18918
|
+
unit_search_distance?: uint32;
|
|
18919
|
+
}): uint32;
|
|
18746
18920
|
/**
|
|
18747
18921
|
* Set the pollution for a given position.
|
|
18748
18922
|
*
|
|
@@ -18782,7 +18956,7 @@ interface LuaSurface {
|
|
|
18782
18956
|
* @param player The player whose undo queue to add these actions to.
|
|
18783
18957
|
* @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
18958
|
*/
|
|
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?:
|
|
18959
|
+
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
18960
|
/**
|
|
18787
18961
|
* Spill inventory on the ground centered at a given location.
|
|
18788
18962
|
* @param table.position Center of the spillage
|
|
@@ -18932,7 +19106,7 @@ interface LuaSurface {
|
|
|
18932
19106
|
/**
|
|
18933
19107
|
* 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
19108
|
*/
|
|
18935
|
-
readonly index:
|
|
19109
|
+
readonly index: uint32;
|
|
18936
19110
|
/**
|
|
18937
19111
|
* Localised name of this surface. When set, will replace the internal surface name in places where a player sees surface name.
|
|
18938
19112
|
*
|
|
@@ -18995,7 +19169,7 @@ interface LuaSurface {
|
|
|
18995
19169
|
/**
|
|
18996
19170
|
* The number of ticks per day for this surface.
|
|
18997
19171
|
*/
|
|
18998
|
-
ticks_per_day:
|
|
19172
|
+
ticks_per_day: uint32;
|
|
18999
19173
|
/**
|
|
19000
19174
|
* 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
19175
|
*/
|
|
@@ -19102,7 +19276,7 @@ interface BaseLuaSurfaceCreateEntityParams {
|
|
|
19102
19276
|
/**
|
|
19103
19277
|
* 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
19278
|
*/
|
|
19105
|
-
'undo_index'?:
|
|
19279
|
+
'undo_index'?: uint32;
|
|
19106
19280
|
}
|
|
19107
19281
|
/**
|
|
19108
19282
|
*
|
|
@@ -19217,11 +19391,11 @@ interface LuaSurfaceCreateEntityParamsBeam extends BaseLuaSurfaceCreateEntityPar
|
|
|
19217
19391
|
/**
|
|
19218
19392
|
* If set, beam will be destroyed after this value of ticks.
|
|
19219
19393
|
*/
|
|
19220
|
-
'duration'?:
|
|
19394
|
+
'duration'?: uint32;
|
|
19221
19395
|
/**
|
|
19222
19396
|
* If set, beam will be destroyed when distance between source and target is greater than this value.
|
|
19223
19397
|
*/
|
|
19224
|
-
'max_length'?:
|
|
19398
|
+
'max_length'?: uint32;
|
|
19225
19399
|
/**
|
|
19226
19400
|
* Source position will be offset by this value when rendering the beam.
|
|
19227
19401
|
*/
|
|
@@ -19254,7 +19428,7 @@ interface LuaSurfaceCreateEntityParamsCar extends BaseLuaSurfaceCreateEntityPara
|
|
|
19254
19428
|
* Applies to variant case `cargo-landing-pad`
|
|
19255
19429
|
*/
|
|
19256
19430
|
interface LuaSurfaceCreateEntityParamsCargoLandingPad extends BaseLuaSurfaceCreateEntityParams {
|
|
19257
|
-
'bar'?:
|
|
19431
|
+
'bar'?: uint32;
|
|
19258
19432
|
'control_behavior'?: CargoLandingPadBlueprintControlBehavior;
|
|
19259
19433
|
'request_filters'?: BlueprintLogisticSections;
|
|
19260
19434
|
}
|
|
@@ -19282,8 +19456,8 @@ interface LuaSurfaceCreateEntityParamsCargoWagon extends BaseLuaSurfaceCreateEnt
|
|
|
19282
19456
|
*/
|
|
19283
19457
|
interface LuaSurfaceCreateEntityParamsCharacterCorpse extends BaseLuaSurfaceCreateEntityParams {
|
|
19284
19458
|
'color'?: Color;
|
|
19285
|
-
'inventory_size'?:
|
|
19286
|
-
'player_index'?:
|
|
19459
|
+
'inventory_size'?: uint32;
|
|
19460
|
+
'player_index'?: uint32;
|
|
19287
19461
|
}
|
|
19288
19462
|
/**
|
|
19289
19463
|
*
|
|
@@ -19311,7 +19485,7 @@ interface LuaSurfaceCreateEntityParamsContainer extends BaseLuaSurfaceCreateEnti
|
|
|
19311
19485
|
/**
|
|
19312
19486
|
* Inventory index where the red limiting bar should be set.
|
|
19313
19487
|
*/
|
|
19314
|
-
'bar'?:
|
|
19488
|
+
'bar'?: uint32;
|
|
19315
19489
|
'control_behavior'?: ContainerBlueprintControlBehavior;
|
|
19316
19490
|
}
|
|
19317
19491
|
/**
|
|
@@ -19439,7 +19613,7 @@ interface LuaSurfaceCreateEntityParamsHighlightBox extends BaseLuaSurfaceCreateE
|
|
|
19439
19613
|
/**
|
|
19440
19614
|
* The blink interval for this highlight box. Makes it be shown every `blink_interval` ticks. Defaults to `0` (constantly shown).
|
|
19441
19615
|
*/
|
|
19442
|
-
'blink_interval'?:
|
|
19616
|
+
'blink_interval'?: uint32;
|
|
19443
19617
|
/**
|
|
19444
19618
|
* 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
19619
|
*/
|
|
@@ -19451,11 +19625,11 @@ interface LuaSurfaceCreateEntityParamsHighlightBox extends BaseLuaSurfaceCreateE
|
|
|
19451
19625
|
/**
|
|
19452
19626
|
* The player to render the highlight box for. If not provided, it will be rendered for all players.
|
|
19453
19627
|
*/
|
|
19454
|
-
'render_player_index'?:
|
|
19628
|
+
'render_player_index'?: uint32;
|
|
19455
19629
|
/**
|
|
19456
19630
|
* The amount of time in ticks that the highlight box will exist for. Defaults to existing forever.
|
|
19457
19631
|
*/
|
|
19458
|
-
'time_to_live'?:
|
|
19632
|
+
'time_to_live'?: uint32;
|
|
19459
19633
|
}
|
|
19460
19634
|
/**
|
|
19461
19635
|
*
|
|
@@ -19481,7 +19655,7 @@ interface LuaSurfaceCreateEntityParamsInfinityCargoWagon extends BaseLuaSurfaceC
|
|
|
19481
19655
|
* Applies to variant case `infinity-container`
|
|
19482
19656
|
*/
|
|
19483
19657
|
interface LuaSurfaceCreateEntityParamsInfinityContainer extends BaseLuaSurfaceCreateEntityParams {
|
|
19484
|
-
'bar'?:
|
|
19658
|
+
'bar'?: uint32;
|
|
19485
19659
|
'control_behavior'?: LogisticContainerBlueprintControlBehavior;
|
|
19486
19660
|
'infinity_settings'?: BlueprintInfinityInventorySettings;
|
|
19487
19661
|
'request_filters'?: BlueprintLogisticSections;
|
|
@@ -19579,7 +19753,7 @@ interface LuaSurfaceCreateEntityParamsLinkedBelt extends BaseLuaSurfaceCreateEnt
|
|
|
19579
19753
|
* Applies to variant case `linked-container`
|
|
19580
19754
|
*/
|
|
19581
19755
|
interface LuaSurfaceCreateEntityParamsLinkedContainer extends BaseLuaSurfaceCreateEntityParams {
|
|
19582
|
-
'link_id'?:
|
|
19756
|
+
'link_id'?: uint32;
|
|
19583
19757
|
}
|
|
19584
19758
|
/**
|
|
19585
19759
|
*
|
|
@@ -19633,7 +19807,7 @@ interface LuaSurfaceCreateEntityParamsLocomotive extends BaseLuaSurfaceCreateEnt
|
|
|
19633
19807
|
* Applies to variant case `logistic-container`
|
|
19634
19808
|
*/
|
|
19635
19809
|
interface LuaSurfaceCreateEntityParamsLogisticContainer extends BaseLuaSurfaceCreateEntityParams {
|
|
19636
|
-
'bar'?:
|
|
19810
|
+
'bar'?: uint32;
|
|
19637
19811
|
'control_behavior'?: LogisticContainerBlueprintControlBehavior;
|
|
19638
19812
|
'request_filters'?: SlotFilter[];
|
|
19639
19813
|
}
|
|
@@ -19663,7 +19837,7 @@ interface LuaSurfaceCreateEntityParamsPlant extends BaseLuaSurfaceCreateEntityPa
|
|
|
19663
19837
|
/**
|
|
19664
19838
|
* The tick the plant will be fully grown. If not specified, the plants normal growth time is used.
|
|
19665
19839
|
*/
|
|
19666
|
-
'tick_grown'?:
|
|
19840
|
+
'tick_grown'?: uint32;
|
|
19667
19841
|
}
|
|
19668
19842
|
/**
|
|
19669
19843
|
*
|
|
@@ -19747,7 +19921,7 @@ interface LuaSurfaceCreateEntityParamsReactor extends BaseLuaSurfaceCreateEntity
|
|
|
19747
19921
|
* Applies to variant case `resource`
|
|
19748
19922
|
*/
|
|
19749
19923
|
interface LuaSurfaceCreateEntityParamsResource extends BaseLuaSurfaceCreateEntityParams {
|
|
19750
|
-
'amount'?:
|
|
19924
|
+
'amount'?: uint32;
|
|
19751
19925
|
/**
|
|
19752
19926
|
* If colliding cliffs are removed. Default is true.
|
|
19753
19927
|
*/
|
|
@@ -19794,7 +19968,7 @@ interface LuaSurfaceCreateEntityParamsSelectorCombinator extends BaseLuaSurfaceC
|
|
|
19794
19968
|
*/
|
|
19795
19969
|
interface LuaSurfaceCreateEntityParamsSimpleEntityWithForce extends BaseLuaSurfaceCreateEntityParams {
|
|
19796
19970
|
'color'?: Color;
|
|
19797
|
-
'render_player_index'?:
|
|
19971
|
+
'render_player_index'?: uint32;
|
|
19798
19972
|
'variation'?: uint8;
|
|
19799
19973
|
}
|
|
19800
19974
|
/**
|
|
@@ -19803,7 +19977,7 @@ interface LuaSurfaceCreateEntityParamsSimpleEntityWithForce extends BaseLuaSurfa
|
|
|
19803
19977
|
*/
|
|
19804
19978
|
interface LuaSurfaceCreateEntityParamsSimpleEntityWithOwner extends BaseLuaSurfaceCreateEntityParams {
|
|
19805
19979
|
'color'?: Color;
|
|
19806
|
-
'render_player_index'?:
|
|
19980
|
+
'render_player_index'?: uint32;
|
|
19807
19981
|
'variation'?: uint8;
|
|
19808
19982
|
}
|
|
19809
19983
|
/**
|
|
@@ -19821,7 +19995,7 @@ interface LuaSurfaceCreateEntityParamsSpacePlatformHub extends BaseLuaSurfaceCre
|
|
|
19821
19995
|
* Applies to variant case `speech-bubble`
|
|
19822
19996
|
*/
|
|
19823
19997
|
interface LuaSurfaceCreateEntityParamsSpeechBubble extends BaseLuaSurfaceCreateEntityParams {
|
|
19824
|
-
'lifetime'?:
|
|
19998
|
+
'lifetime'?: uint32;
|
|
19825
19999
|
'text': LocalisedString;
|
|
19826
20000
|
}
|
|
19827
20001
|
/**
|
|
@@ -19845,6 +20019,7 @@ interface LuaSurfaceCreateEntityParamsSpiderVehicle extends BaseLuaSurfaceCreate
|
|
|
19845
20019
|
* Applies to variant case `splitter`
|
|
19846
20020
|
*/
|
|
19847
20021
|
interface LuaSurfaceCreateEntityParamsSplitter extends BaseLuaSurfaceCreateEntityParams {
|
|
20022
|
+
'control_behavior'?: SplitterBlueprintControlBehavior;
|
|
19848
20023
|
'filter'?: ItemFilter;
|
|
19849
20024
|
'input_priority'?: SplitterPriority;
|
|
19850
20025
|
'output_priority'?: SplitterPriority;
|
|
@@ -19887,7 +20062,7 @@ interface LuaSurfaceCreateEntityParamsTileGhost extends BaseLuaSurfaceCreateEnti
|
|
|
19887
20062
|
interface LuaSurfaceCreateEntityParamsTrainStop extends BaseLuaSurfaceCreateEntityParams {
|
|
19888
20063
|
'color'?: Color;
|
|
19889
20064
|
'control_behavior'?: TrainStopBlueprintControlBehavior;
|
|
19890
|
-
'manual_trains_limit'?:
|
|
20065
|
+
'manual_trains_limit'?: uint32;
|
|
19891
20066
|
'priority'?: uint8;
|
|
19892
20067
|
'station'?: string;
|
|
19893
20068
|
}
|
|
@@ -20038,7 +20213,7 @@ interface LuaTechnology {
|
|
|
20038
20213
|
/**
|
|
20039
20214
|
* 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
20215
|
*/
|
|
20041
|
-
level:
|
|
20216
|
+
level: uint32;
|
|
20042
20217
|
readonly localised_description: LocalisedString;
|
|
20043
20218
|
/**
|
|
20044
20219
|
* Localised name of this technology.
|
|
@@ -20069,7 +20244,7 @@ interface LuaTechnology {
|
|
|
20069
20244
|
*
|
|
20070
20245
|
* 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
20246
|
*/
|
|
20072
|
-
readonly research_unit_count:
|
|
20247
|
+
readonly research_unit_count: uint32;
|
|
20073
20248
|
/**
|
|
20074
20249
|
* The count formula, if this research has any. See {@link TechnologyUnit::count_formula | prototype:TechnologyUnit::count_formula} for details.
|
|
20075
20250
|
*/
|
|
@@ -20137,11 +20312,11 @@ interface LuaTechnologyPrototype extends LuaPrototypeBase {
|
|
|
20137
20312
|
/**
|
|
20138
20313
|
* The level of this research.
|
|
20139
20314
|
*/
|
|
20140
|
-
readonly level:
|
|
20315
|
+
readonly level: uint32;
|
|
20141
20316
|
/**
|
|
20142
20317
|
* The max level of this research.
|
|
20143
20318
|
*/
|
|
20144
|
-
readonly max_level:
|
|
20319
|
+
readonly max_level: uint32;
|
|
20145
20320
|
/**
|
|
20146
20321
|
* 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
20322
|
*/
|
|
@@ -20159,7 +20334,7 @@ interface LuaTechnologyPrototype extends LuaPrototypeBase {
|
|
|
20159
20334
|
*
|
|
20160
20335
|
* 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
20336
|
*/
|
|
20162
|
-
readonly research_unit_count:
|
|
20337
|
+
readonly research_unit_count: uint32;
|
|
20163
20338
|
/**
|
|
20164
20339
|
* The count formula, if this research has any. See {@link TechnologyUnit::count_formula | prototype:TechnologyUnit::count_formula} for details.
|
|
20165
20340
|
*/
|
|
@@ -20386,7 +20561,7 @@ interface LuaTilePrototype extends LuaPrototypeBase {
|
|
|
20386
20561
|
* 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
20562
|
*/
|
|
20388
20563
|
readonly items_to_place_this?: ItemToPlace[];
|
|
20389
|
-
readonly layer:
|
|
20564
|
+
readonly layer: uint32;
|
|
20390
20565
|
readonly map_color: Color;
|
|
20391
20566
|
readonly max_health: float;
|
|
20392
20567
|
readonly mineable_properties: {
|
|
@@ -20461,7 +20636,7 @@ interface LuaTrain {
|
|
|
20461
20636
|
* Get the amount of a particular item stored in the train.
|
|
20462
20637
|
* @param item If not given, counts all items.
|
|
20463
20638
|
*/
|
|
20464
|
-
get_item_count(this: void, item?: ItemFilter):
|
|
20639
|
+
get_item_count(this: void, item?: ItemFilter): uint32;
|
|
20465
20640
|
/**
|
|
20466
20641
|
* Gets a LuaRailEnd object pointing away from the train at specified end of the train
|
|
20467
20642
|
*/
|
|
@@ -20474,7 +20649,7 @@ interface LuaTrain {
|
|
|
20474
20649
|
/**
|
|
20475
20650
|
* Go to the station specified by the index in the train's schedule.
|
|
20476
20651
|
*/
|
|
20477
|
-
go_to_station(this: void, index:
|
|
20652
|
+
go_to_station(this: void, index: uint32): void;
|
|
20478
20653
|
/**
|
|
20479
20654
|
* Insert a stack into the train.
|
|
20480
20655
|
*/
|
|
@@ -20500,7 +20675,7 @@ interface LuaTrain {
|
|
|
20500
20675
|
* @param stack The amount and type of items to remove
|
|
20501
20676
|
* @returns Number of items actually removed.
|
|
20502
20677
|
*/
|
|
20503
|
-
remove_item(this: void, stack: ItemStackIdentification):
|
|
20678
|
+
remove_item(this: void, stack: ItemStackIdentification): uint32;
|
|
20504
20679
|
/**
|
|
20505
20680
|
* Back end of the train: Rail and direction on that rail where the train will go when moving backward
|
|
20506
20681
|
*/
|
|
@@ -20542,17 +20717,17 @@ interface LuaTrain {
|
|
|
20542
20717
|
/**
|
|
20543
20718
|
* The unique train ID.
|
|
20544
20719
|
*/
|
|
20545
|
-
readonly id:
|
|
20720
|
+
readonly id: uint32;
|
|
20546
20721
|
/**
|
|
20547
20722
|
* The total number of kills by this train.
|
|
20548
20723
|
*/
|
|
20549
|
-
readonly kill_count:
|
|
20724
|
+
readonly kill_count: uint32;
|
|
20550
20725
|
/**
|
|
20551
20726
|
* The players killed by this train.
|
|
20552
20727
|
*
|
|
20553
20728
|
* The keys are the player indices, the values are how often this train killed that player.
|
|
20554
20729
|
*/
|
|
20555
|
-
readonly killed_players:
|
|
20730
|
+
readonly killed_players: LuaTable<uint32, uint32>;
|
|
20556
20731
|
/**
|
|
20557
20732
|
* Locomotives of the train.
|
|
20558
20733
|
* @example ```
|
|
@@ -20652,7 +20827,7 @@ interface LuaTrainManager {
|
|
|
20652
20827
|
* @param train_id Train ID to search
|
|
20653
20828
|
* @returns Train if found
|
|
20654
20829
|
*/
|
|
20655
|
-
get_train_by_id(this: void, train_id:
|
|
20830
|
+
get_train_by_id(this: void, train_id: uint32): LuaTrain | null;
|
|
20656
20831
|
/**
|
|
20657
20832
|
* Gets all train stops that pass given filter
|
|
20658
20833
|
* @param filter Filters the train stop must pass in order to be returned here
|
|
@@ -20683,7 +20858,7 @@ interface LuaTrainManager {
|
|
|
20683
20858
|
starts?: RailEndStart[];
|
|
20684
20859
|
search_direction?: 'respect-movement-direction' | 'any-direction-with-locomotives';
|
|
20685
20860
|
in_chain_signal_section?: boolean;
|
|
20686
|
-
steps_limit?:
|
|
20861
|
+
steps_limit?: uint32;
|
|
20687
20862
|
shortest_path?: boolean;
|
|
20688
20863
|
}): TrainPathFinderOneGoalResult | TrainPathAllGoalsResult;
|
|
20689
20864
|
/**
|
|
@@ -20806,7 +20981,7 @@ interface LuaTransportLine {
|
|
|
20806
20981
|
* Count some or all items on this line, similar to how {@link LuaInventory::get_item_count | runtime:LuaInventory::get_item_count} does.
|
|
20807
20982
|
* @param item If not specified, count all items.
|
|
20808
20983
|
*/
|
|
20809
|
-
get_item_count(this: void, item?: ItemFilter):
|
|
20984
|
+
get_item_count(this: void, item?: ItemFilter): uint32;
|
|
20810
20985
|
/**
|
|
20811
20986
|
* Get a map position related to a position on a transport line.
|
|
20812
20987
|
* @param position Linear position along the transport line. Clamped to the transport line range.
|
|
@@ -20837,7 +21012,7 @@ interface LuaTransportLine {
|
|
|
20837
21012
|
* @param items Items to remove.
|
|
20838
21013
|
* @returns Number of items actually removed.
|
|
20839
21014
|
*/
|
|
20840
|
-
remove_item(this: void, items: ItemStackIdentification):
|
|
21015
|
+
remove_item(this: void, items: ItemStackIdentification): uint32;
|
|
20841
21016
|
/**
|
|
20842
21017
|
* The transport lines that this transport line is fed by or an empty table if none.
|
|
20843
21018
|
*/
|
|
@@ -20877,7 +21052,7 @@ interface LuaTransportLine {
|
|
|
20877
21052
|
/**
|
|
20878
21053
|
* Get the number of items on this transport line.
|
|
20879
21054
|
*/
|
|
20880
|
-
length: LuaLengthMethod<
|
|
21055
|
+
length: LuaLengthMethod<uint32>;
|
|
20881
21056
|
}
|
|
20882
21057
|
/**
|
|
20883
21058
|
* Prototype of a trivial smoke.
|
|
@@ -20886,12 +21061,12 @@ interface LuaTrivialSmokePrototype extends LuaPrototypeBase {
|
|
|
20886
21061
|
readonly affected_by_wind: boolean;
|
|
20887
21062
|
readonly color: Color;
|
|
20888
21063
|
readonly cyclic: boolean;
|
|
20889
|
-
readonly duration:
|
|
21064
|
+
readonly duration: uint32;
|
|
20890
21065
|
readonly end_scale: double;
|
|
20891
|
-
readonly fade_away_duration:
|
|
20892
|
-
readonly fade_in_duration:
|
|
21066
|
+
readonly fade_away_duration: uint32;
|
|
21067
|
+
readonly fade_in_duration: uint32;
|
|
20893
21068
|
readonly glow_animation: boolean;
|
|
20894
|
-
readonly glow_fade_away_duration:
|
|
21069
|
+
readonly glow_fade_away_duration: uint32;
|
|
20895
21070
|
readonly movement_slow_down_factor: double;
|
|
20896
21071
|
/**
|
|
20897
21072
|
* 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 +21074,7 @@ interface LuaTrivialSmokePrototype extends LuaPrototypeBase {
|
|
|
20899
21074
|
readonly object_name: string;
|
|
20900
21075
|
readonly render_layer: RenderLayer;
|
|
20901
21076
|
readonly show_when_smoke_off: boolean;
|
|
20902
|
-
readonly spread_duration:
|
|
21077
|
+
readonly spread_duration: uint32;
|
|
20903
21078
|
readonly start_scale: double;
|
|
20904
21079
|
/**
|
|
20905
21080
|
* 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 +21120,57 @@ interface LuaUndoRedoStack {
|
|
|
20945
21120
|
* Gets an undo item from the redo stack.
|
|
20946
21121
|
* @param index The index of the item to get, ordered from most recent to oldest.
|
|
20947
21122
|
*/
|
|
20948
|
-
get_redo_item(this: void, index:
|
|
21123
|
+
get_redo_item(this: void, index: uint32): UndoRedoAction[];
|
|
20949
21124
|
/**
|
|
20950
21125
|
* The number of undo items in the redo stack.
|
|
20951
21126
|
*/
|
|
20952
|
-
get_redo_item_count(this: void):
|
|
21127
|
+
get_redo_item_count(this: void): uint32;
|
|
20953
21128
|
/**
|
|
20954
21129
|
* Gets the tag with the given name from a specific redo item action, or `nil` if it doesn't exist.
|
|
20955
21130
|
* @param item_index The index of the redo item, ordered from most recent to oldest.
|
|
20956
21131
|
* @param action_index The index of the redo action.
|
|
20957
21132
|
* @param tag_name The name of the tag to get.
|
|
20958
21133
|
*/
|
|
20959
|
-
get_redo_tag(this: void, item_index:
|
|
21134
|
+
get_redo_tag(this: void, item_index: uint32, action_index: uint32, tag_name: string): AnyBasic;
|
|
20960
21135
|
/**
|
|
20961
21136
|
* Gets all tags for the given redo action.
|
|
20962
21137
|
* @param item_index The index of the redo item, ordered from most recent to oldest.
|
|
20963
21138
|
* @param action_index The index of the redo action.
|
|
20964
21139
|
*/
|
|
20965
|
-
get_redo_tags(this: void, item_index:
|
|
21140
|
+
get_redo_tags(this: void, item_index: uint32, action_index: uint32): Tags;
|
|
20966
21141
|
/**
|
|
20967
21142
|
* Gets an undo item from the undo stack.
|
|
20968
21143
|
* @param index The index of the undo item to get, ordered from most recent to oldest.
|
|
20969
21144
|
*/
|
|
20970
|
-
get_undo_item(this: void, index:
|
|
21145
|
+
get_undo_item(this: void, index: uint32): UndoRedoAction[];
|
|
20971
21146
|
/**
|
|
20972
21147
|
* The number undo items in the undo stack.
|
|
20973
21148
|
*/
|
|
20974
|
-
get_undo_item_count(this: void):
|
|
21149
|
+
get_undo_item_count(this: void): uint32;
|
|
20975
21150
|
/**
|
|
20976
21151
|
* Gets the tag with the given name from a specific undo item action, or `nil` if it doesn't exist.
|
|
20977
21152
|
* @param item_index The index of the undo item, ordered from most recent to oldest.
|
|
20978
21153
|
* @param action_index The index of the undo action.
|
|
20979
21154
|
* @param tag_name The name of the tag to get.
|
|
20980
21155
|
*/
|
|
20981
|
-
get_undo_tag(this: void, item_index:
|
|
21156
|
+
get_undo_tag(this: void, item_index: uint32, action_index: uint32, tag_name: string): AnyBasic;
|
|
20982
21157
|
/**
|
|
20983
21158
|
* Gets all tags for the given undo action.
|
|
20984
21159
|
* @param item_index The index of the undo item, ordered from most recent to oldest.
|
|
20985
21160
|
* @param action_index The index of the undo action.
|
|
20986
21161
|
*/
|
|
20987
|
-
get_undo_tags(this: void, item_index:
|
|
21162
|
+
get_undo_tags(this: void, item_index: uint32, action_index: uint32): Tags;
|
|
20988
21163
|
/**
|
|
20989
21164
|
* Removes an undo action from the specified undo item on the redo stack.
|
|
20990
21165
|
* @param item_index The index of the undo item to change, ordered from most recent to oldest.
|
|
20991
21166
|
* @param action_index The index of the undo action to remove.
|
|
20992
21167
|
*/
|
|
20993
|
-
remove_redo_action(this: void, item_index:
|
|
21168
|
+
remove_redo_action(this: void, item_index: uint32, action_index: uint32): void;
|
|
20994
21169
|
/**
|
|
20995
21170
|
* Removes an undo item from the redo stack.
|
|
20996
21171
|
* @param index The index of the undo item to remove, ordered from most recent to oldest.
|
|
20997
21172
|
*/
|
|
20998
|
-
remove_redo_item(this: void, index:
|
|
21173
|
+
remove_redo_item(this: void, index: uint32): void;
|
|
20999
21174
|
/**
|
|
21000
21175
|
* Removes a tag with the given name from the specified redo item.
|
|
21001
21176
|
* @param item_index The index of the redo item, ordered from most recent to oldest.
|
|
@@ -21003,18 +21178,18 @@ interface LuaUndoRedoStack {
|
|
|
21003
21178
|
* @param tag The name of the tag to remove.
|
|
21004
21179
|
* @returns Whether the tag existed and was successfully removed.
|
|
21005
21180
|
*/
|
|
21006
|
-
remove_redo_tag(this: void, item_index:
|
|
21181
|
+
remove_redo_tag(this: void, item_index: uint32, action_index: uint32, tag: string): boolean;
|
|
21007
21182
|
/**
|
|
21008
21183
|
* Removes an undo action from the specified undo item on the undo stack.
|
|
21009
21184
|
* @param item_index The index of the undo item to change, ordered from most recent to oldest.
|
|
21010
21185
|
* @param action_index The index of the undo action to remove.
|
|
21011
21186
|
*/
|
|
21012
|
-
remove_undo_action(this: void, item_index:
|
|
21187
|
+
remove_undo_action(this: void, item_index: uint32, action_index: uint32): void;
|
|
21013
21188
|
/**
|
|
21014
21189
|
* Removes an undo item from the undo stack.
|
|
21015
21190
|
* @param index The index of the undo item to remove, ordered from most recent to oldest.
|
|
21016
21191
|
*/
|
|
21017
|
-
remove_undo_item(this: void, index:
|
|
21192
|
+
remove_undo_item(this: void, index: uint32): void;
|
|
21018
21193
|
/**
|
|
21019
21194
|
* Removes a tag with the given name from the specified undo item.
|
|
21020
21195
|
* @param item_index The index of the undo item, ordered from most recent to oldest.
|
|
@@ -21022,7 +21197,7 @@ interface LuaUndoRedoStack {
|
|
|
21022
21197
|
* @param tag The name of the tag to remove.
|
|
21023
21198
|
* @returns Whether the tag existed and was successfully removed.
|
|
21024
21199
|
*/
|
|
21025
|
-
remove_undo_tag(this: void, item_index:
|
|
21200
|
+
remove_undo_tag(this: void, item_index: uint32, action_index: uint32, tag: string): boolean;
|
|
21026
21201
|
/**
|
|
21027
21202
|
* Sets a new tag with the given name and value on the specified redo item action.
|
|
21028
21203
|
* @param item_index The index of the redo item, ordered from most recent to oldest.
|
|
@@ -21030,7 +21205,7 @@ interface LuaUndoRedoStack {
|
|
|
21030
21205
|
* @param tag_name The name of the tag to set.
|
|
21031
21206
|
* @param tag The contents of the new tag.
|
|
21032
21207
|
*/
|
|
21033
|
-
set_redo_tag(this: void, item_index:
|
|
21208
|
+
set_redo_tag(this: void, item_index: uint32, action_index: uint32, tag_name: string, tag: AnyBasic): void;
|
|
21034
21209
|
/**
|
|
21035
21210
|
* Sets a new tag with the given name and value on the specified undo item action.
|
|
21036
21211
|
* @param item_index The index of the undo item, ordered from most recent to oldest.
|
|
@@ -21038,7 +21213,7 @@ interface LuaUndoRedoStack {
|
|
|
21038
21213
|
* @param tag_name The name of the tag to set.
|
|
21039
21214
|
* @param tag The contents of the new tag.
|
|
21040
21215
|
*/
|
|
21041
|
-
set_undo_tag(this: void, item_index:
|
|
21216
|
+
set_undo_tag(this: void, item_index: uint32, action_index: uint32, tag_name: string, tag: AnyBasic): void;
|
|
21042
21217
|
/**
|
|
21043
21218
|
* 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
21219
|
*/
|
|
@@ -21046,7 +21221,7 @@ interface LuaUndoRedoStack {
|
|
|
21046
21221
|
/**
|
|
21047
21222
|
* The index of the player to whom this stack belongs to.
|
|
21048
21223
|
*/
|
|
21049
|
-
readonly player_index:
|
|
21224
|
+
readonly player_index: uint32;
|
|
21050
21225
|
/**
|
|
21051
21226
|
* 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
21227
|
*/
|
|
@@ -21156,9 +21331,9 @@ interface LuaWireConnector {
|
|
|
21156
21331
|
/**
|
|
21157
21332
|
* Amount of wires going out of this connector. It includes all wires (ghost wires and real wires).
|
|
21158
21333
|
*/
|
|
21159
|
-
readonly connection_count:
|
|
21334
|
+
readonly connection_count: uint32;
|
|
21160
21335
|
/**
|
|
21161
|
-
* All wire connectors this connector is connected to.
|
|
21336
|
+
* All wire connectors this connector is connected to. It includes all wires (ghost wires and real wires).
|
|
21162
21337
|
*/
|
|
21163
21338
|
readonly connections: WireConnection[];
|
|
21164
21339
|
/**
|
|
@@ -21168,7 +21343,7 @@ interface LuaWireConnector {
|
|
|
21168
21343
|
/**
|
|
21169
21344
|
* 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
21345
|
*/
|
|
21171
|
-
readonly network_id:
|
|
21346
|
+
readonly network_id: uint32;
|
|
21172
21347
|
/**
|
|
21173
21348
|
* 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
21349
|
*/
|
|
@@ -21180,9 +21355,9 @@ interface LuaWireConnector {
|
|
|
21180
21355
|
/**
|
|
21181
21356
|
* Amount of real wires going out of this connector. It only includes wires for which both wire connectors are real (not ghosts).
|
|
21182
21357
|
*/
|
|
21183
|
-
readonly real_connection_count:
|
|
21358
|
+
readonly real_connection_count: uint32;
|
|
21184
21359
|
/**
|
|
21185
|
-
* All wire connectors this connector is connected to with real wires.
|
|
21360
|
+
* All wire connectors this connector is connected to with real wires. It only includes wires that are between two non-ghost entities.
|
|
21186
21361
|
*/
|
|
21187
21362
|
readonly real_connections: WireConnection[];
|
|
21188
21363
|
/**
|