factorio-types 0.0.19 → 0.0.20
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 +51 -6
- package/dist/concepts.d.ts +1 -1
- package/dist/defines.d.ts +1 -1
- package/dist/events.d.ts +1 -1
- package/dist/global.d.ts +1 -1
- package/package.json +1 -1
package/dist/classes.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Factorio API reference https://lua-api.factorio.com/latest/index.html
|
|
3
3
|
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version 1.1.
|
|
5
|
+
// Factorio version 1.1.51
|
|
6
6
|
// API version 1
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -2328,6 +2328,14 @@ interface LuaEntity extends LuaControl {
|
|
|
2328
2328
|
get_request_slot(this: void,
|
|
2329
2329
|
slot: number): SimpleItemStack
|
|
2330
2330
|
|
|
2331
|
+
/**
|
|
2332
|
+
* Gets legs of given SpiderVehicle.
|
|
2333
|
+
* @remarks
|
|
2334
|
+
* Applies to subclasses: SpiderVehicle
|
|
2335
|
+
*
|
|
2336
|
+
*/
|
|
2337
|
+
get_spider_legs(this: void): LuaEntity[]
|
|
2338
|
+
|
|
2331
2339
|
/**
|
|
2332
2340
|
* The train currently stopped at this train stop or `nil` if none.
|
|
2333
2341
|
* @remarks
|
|
@@ -2460,7 +2468,7 @@ interface LuaEntity extends LuaControl {
|
|
|
2460
2468
|
is_registered_for_construction(this: void): boolean
|
|
2461
2469
|
|
|
2462
2470
|
/**
|
|
2463
|
-
* Is this entity registered for deconstruction with this force? If false, it means a construction robot has been dispatched to deconstruct it, or it is not marked for deconstruction.
|
|
2471
|
+
* Is this entity registered for deconstruction with this force? If false, it means a construction robot has been dispatched to deconstruct it, or it is not marked for deconstruction. The complexity is effectively O(1) - it depends on the number of objects targeting this entity which should be small enough.
|
|
2464
2472
|
* @param force - The force construction manager to check.
|
|
2465
2473
|
*/
|
|
2466
2474
|
is_registered_for_deconstruction(this: void,
|
|
@@ -3387,7 +3395,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3387
3395
|
inserter_stack_size_override: number
|
|
3388
3396
|
|
|
3389
3397
|
/**
|
|
3390
|
-
* If this entity is
|
|
3398
|
+
* (deprecated by 1.1.51) If this entity is a MilitaryTarget. Returns same value as LuaEntity::is_military_target
|
|
3391
3399
|
*/
|
|
3392
3400
|
readonly is_entity_with_force: boolean
|
|
3393
3401
|
|
|
@@ -3401,6 +3409,11 @@ interface LuaEntity extends LuaControl {
|
|
|
3401
3409
|
*/
|
|
3402
3410
|
readonly is_entity_with_owner: boolean
|
|
3403
3411
|
|
|
3412
|
+
/**
|
|
3413
|
+
* If this entity is a MilitaryTarget. Can be written to if LuaEntityPrototype::allow_run_time_change_of_is_military_target returns true
|
|
3414
|
+
*/
|
|
3415
|
+
is_military_target: boolean
|
|
3416
|
+
|
|
3404
3417
|
/**
|
|
3405
3418
|
* Items this ghost will request when revived or items this item request proxy is requesting. Result is a dictionary mapping each item prototype name to the required count.
|
|
3406
3419
|
*/
|
|
@@ -3527,6 +3540,7 @@ interface LuaEntity extends LuaControl {
|
|
|
3527
3540
|
* - When called on a pipe-connectable entity, this is an array of entity arrays of all entities a given fluidbox is connected to.
|
|
3528
3541
|
* - When called on an underground transport belt, this is the other end of the underground belt connection, or `nil` if none.
|
|
3529
3542
|
* - When called on a wall-connectable entity or reactor, this is a dictionary of all connections indexed by the connection direction "north", "south", "east", and "west".
|
|
3543
|
+
* - When called on a cliff entity, this is a dictionary of all connections indexed by the connection direction "north", "south", "east", and "west".
|
|
3530
3544
|
*/
|
|
3531
3545
|
readonly neighbours?: {[key: string]: LuaEntity[]} | Array<LuaEntity[]> | LuaEntity
|
|
3532
3546
|
|
|
@@ -4097,6 +4111,14 @@ interface LuaEntityPrototype {
|
|
|
4097
4111
|
*/
|
|
4098
4112
|
readonly allow_passengers: boolean
|
|
4099
4113
|
|
|
4114
|
+
/**
|
|
4115
|
+
* True if this entity-with-owner's is_military_target can be changed run-time (on the entity, not on the prototype itself)
|
|
4116
|
+
* @remarks
|
|
4117
|
+
* Applies to subclasses: EntityWithOwnerPrototype
|
|
4118
|
+
*
|
|
4119
|
+
*/
|
|
4120
|
+
readonly allow_run_time_change_of_is_military_target: boolean
|
|
4121
|
+
|
|
4100
4122
|
/**
|
|
4101
4123
|
* The allowed module effects for this entity or `nil`.
|
|
4102
4124
|
*/
|
|
@@ -4566,6 +4588,19 @@ interface LuaEntityPrototype {
|
|
|
4566
4588
|
|
|
4567
4589
|
readonly is_building: boolean
|
|
4568
4590
|
|
|
4591
|
+
/**
|
|
4592
|
+
* True if this is entity-with-owner
|
|
4593
|
+
*/
|
|
4594
|
+
readonly is_entity_with_owner: boolean
|
|
4595
|
+
|
|
4596
|
+
/**
|
|
4597
|
+
* True if this entity-with-owner is military target
|
|
4598
|
+
* @remarks
|
|
4599
|
+
* Applies to subclasses: EntityWithOwnerPrototype
|
|
4600
|
+
*
|
|
4601
|
+
*/
|
|
4602
|
+
readonly is_military_target: boolean
|
|
4603
|
+
|
|
4569
4604
|
/**
|
|
4570
4605
|
* @remarks
|
|
4571
4606
|
* Applies to subclasses: Character
|
|
@@ -4813,6 +4848,11 @@ interface LuaEntityPrototype {
|
|
|
4813
4848
|
*/
|
|
4814
4849
|
readonly pollution_to_join_attack: number
|
|
4815
4850
|
|
|
4851
|
+
/**
|
|
4852
|
+
* True if this entity prototype should be included during tile collision checks with {@link LuaTilePrototype::check_collision_with_entities | LuaTilePrototype::check_collision_with_entities} enabled.
|
|
4853
|
+
*/
|
|
4854
|
+
readonly protected_from_tile_building: boolean
|
|
4855
|
+
|
|
4816
4856
|
/**
|
|
4817
4857
|
* The pumping speed of this offshore pump, normal pump, or `nil`.
|
|
4818
4858
|
*/
|
|
@@ -5066,6 +5106,11 @@ interface LuaEntityPrototype {
|
|
|
5066
5106
|
*/
|
|
5067
5107
|
readonly tree_color_count: number
|
|
5068
5108
|
|
|
5109
|
+
/**
|
|
5110
|
+
* Collision mask entity must collide with to make landmine blowup
|
|
5111
|
+
*/
|
|
5112
|
+
readonly trigger_collision_mask: CollisionMask
|
|
5113
|
+
|
|
5069
5114
|
/**
|
|
5070
5115
|
* The range of this turret or `nil` if this isn't a turret related prototype.
|
|
5071
5116
|
*/
|
|
@@ -14911,11 +14956,11 @@ interface LuaSurface {
|
|
|
14911
14956
|
force: ForceIdentification): LuaLogisticNetwork[]
|
|
14912
14957
|
|
|
14913
14958
|
/**
|
|
14914
|
-
* Find the enemy
|
|
14959
|
+
* Find the enemy military target ({@link military entity | https://wiki.factorio.com/Military_units_and_structures}) closest to the given position.
|
|
14915
14960
|
* @param table.force - The force the result will be an enemy of. Uses the player force if not specified.
|
|
14916
14961
|
* @param table.max_distance - Radius of the circular search area.
|
|
14917
14962
|
* @param table.position - Center of the search area.
|
|
14918
|
-
* @returns The nearest enemy
|
|
14963
|
+
* @returns The nearest enemy military target or `nil` if no enemy could be found within the given area.
|
|
14919
14964
|
*/
|
|
14920
14965
|
find_nearest_enemy(this: void,
|
|
14921
14966
|
table: {
|
|
@@ -15051,7 +15096,7 @@ interface LuaSurface {
|
|
|
15051
15096
|
tiles: string[]): Position[]
|
|
15052
15097
|
|
|
15053
15098
|
/**
|
|
15054
|
-
* Returns all the entities with force on this chunk for the given force.
|
|
15099
|
+
* Returns all the military targets (entities with force) on this chunk for the given force.
|
|
15055
15100
|
* @param force - Entities of this force will be returned.
|
|
15056
15101
|
* @param position - The chunk's position.
|
|
15057
15102
|
*/
|
package/dist/concepts.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Factorio API reference https://lua-api.factorio.com/latest/index.html
|
|
3
3
|
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version 1.1.
|
|
5
|
+
// Factorio version 1.1.51
|
|
6
6
|
// API version 1
|
|
7
7
|
|
|
8
8
|
/**
|
package/dist/defines.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Factorio API reference https://lua-api.factorio.com/latest/index.html
|
|
3
3
|
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version 1.1.
|
|
5
|
+
// Factorio version 1.1.51
|
|
6
6
|
// API version 1
|
|
7
7
|
|
|
8
8
|
declare namespace defines {
|
package/dist/events.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Factorio API reference https://lua-api.factorio.com/latest/index.html
|
|
3
3
|
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version 1.1.
|
|
5
|
+
// Factorio version 1.1.51
|
|
6
6
|
// API version 1
|
|
7
7
|
|
|
8
8
|
/**
|
package/dist/global.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Factorio API reference https://lua-api.factorio.com/latest/index.html
|
|
3
3
|
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
|
|
4
4
|
// Definition source https://github.com/sguest/factorio-types
|
|
5
|
-
// Factorio version 1.1.
|
|
5
|
+
// Factorio version 1.1.51
|
|
6
6
|
// API version 1
|
|
7
7
|
|
|
8
8
|
/**
|