typed-factorio 1.7.3 → 1.7.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -286,7 +286,7 @@ interface LuaBootstrap {
286
286
  * @remarks Depending on when a given entity is destroyed, {@link OnEntityDestroyedEvent on_entity_destroyed} will either be fired at the end of the current tick or at the end of the next tick.
287
287
  * @see {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.register_on_entity_destroyed Online documentation}
288
288
  */
289
- register_on_entity_destroyed(entity: LuaEntity): uint64
289
+ register_on_entity_destroyed(entity: LuaEntity): RegistrationNumber
290
290
  /**
291
291
  * Generate a new, unique event ID that can be used to raise custom events with {@link LuaBootstrap#raise_event LuaBootstrap::raise_event}.
292
292
  * @returns The newly generated event ID.
@@ -1575,7 +1575,10 @@ interface LuaControlBehavior {
1575
1575
  * @returns The circuit network or nil.
1576
1576
  * @see {@link https://lua-api.factorio.com/latest/LuaControlBehavior.html#LuaControlBehavior.get_circuit_network Online documentation}
1577
1577
  */
1578
- get_circuit_network(wire: defines.wire_type, circuit_connector?: defines.circuit_connector_id): LuaCircuitNetwork
1578
+ get_circuit_network(
1579
+ wire: defines.wire_type,
1580
+ circuit_connector?: defines.circuit_connector_id
1581
+ ): LuaCircuitNetwork | nil
1579
1582
  /**
1580
1583
  * The concrete type of this control behavior.
1581
1584
  * @see {@link https://lua-api.factorio.com/latest/LuaControlBehavior.html#LuaControlBehavior.type Online documentation}
@@ -10506,7 +10509,7 @@ interface LuaFluidBox extends Array<Fluid | nil> {
10506
10509
  * Gets unique fluid system identifier of selected fluid box. May return nil for fluid wagon, fluid turret's internal buffer or a fluidbox which does not belong to a fluid system
10507
10510
  * @see {@link https://lua-api.factorio.com/latest/LuaFluidBox.html#LuaFluidBox.get_fluid_system_id Online documentation}
10508
10511
  */
10509
- get_fluid_system_id(index: uint): uint
10512
+ get_fluid_system_id(index: uint): uint | nil
10510
10513
  /**
10511
10514
  * Flushes all fluid from this fluidbox and its fluid system.
10512
10515
  * @param fluid If provided, only this fluid is flushed.
@@ -20081,7 +20084,7 @@ interface LuaRendering {
20081
20084
  * Gets the type of the given object. The types are "text", "line", "circle", "rectangle", "arc", "polygon", "sprite", "light" and "animation".
20082
20085
  * @see {@link https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.get_type Online documentation}
20083
20086
  */
20084
- get_type(id: uint64): string
20087
+ get_type(id: uint64): "text" | "line" | "circle" | "rectangle" | "arc" | "polygon" | "sprite" | "light" | "animation"
20085
20088
  /**
20086
20089
  * Reorder this object so that it is drawn in front of the already existing objects.
20087
20090
  * @see {@link https://lua-api.factorio.com/latest/LuaRendering.html#LuaRendering.bring_to_front Online documentation}
@@ -22429,7 +22432,7 @@ interface LuaSurface {
22429
22432
  * The force the result will be an enemy of. Uses the player force if not specified.
22430
22433
  */
22431
22434
  readonly force?: ForceIdentification
22432
- }): LuaEntity
22435
+ }): LuaEntity | nil
22433
22436
  /**
22434
22437
  * Give a command to multiple units. This will automatically select suitable units for the task.
22435
22438
  * @returns Number of units actually sent. May be less than `count` if not enough units were available.
package/package.json CHANGED
@@ -1,12 +1,9 @@
1
1
  {
2
2
  "name": "typed-factorio",
3
- "version": "1.7.3",
3
+ "version": "1.7.4",
4
4
  "description": "Featureful typescript definitions for the the Factorio modding lua api.",
5
5
  "keywords": [
6
- "factorio",
7
- "types",
8
- "typescript-to-lua",
9
- "tstl"
6
+ "factorio", "types", "typescript-to-lua", "tstl"
10
7
  ],
11
8
  "repository": "https://github.com/GlassBricks/typed-factorio",
12
9
  "license": "MIT",