typed-factorio 1.11.0 → 1.12.0

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typed-factorio",
3
- "version": "1.11.0",
3
+ "version": "1.12.0",
4
4
  "description": "Featureful typescript definitions for the the Factorio modding lua api.",
5
5
  "keywords": [
6
6
  "factorio",
@@ -19078,11 +19078,21 @@ interface LuaPlayer extends LuaControl {
19078
19078
  *
19079
19079
  * **Raised events:**
19080
19080
  * - {@link OnStringTranslatedEvent on_string_translated}? _future_tick_ Raised if the request was successfully sent.
19081
- * @returns Whether the request was sent or not.
19081
+ * @returns The unique id for the requested translation.
19082
19082
  * @remarks Does nothing if this player is not connected. (see {@link LuaPlayer#connected LuaPlayer::connected}).
19083
19083
  * @see {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.request_translation Online documentation}
19084
19084
  */
19085
- request_translation(localised_string: LocalisedString): boolean
19085
+ request_translation(localised_string: LocalisedString): uint | nil
19086
+ /**
19087
+ * Requests a translation for the given localised strings. If the request is successful the {@link OnStringTranslatedEvent on_string_translated} event will be fired at a later time with the results.
19088
+ *
19089
+ * **Raised events:**
19090
+ * - {@link OnStringTranslatedEvent on_string_translated}? _future_tick_ Raised if the request was successfully sent.
19091
+ * @returns The unique id for the requested translation.
19092
+ * @remarks Does nothing if this player is not connected. (see {@link LuaPlayer#connected LuaPlayer::connected}).
19093
+ * @see {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.request_translations Online documentation}
19094
+ */
19095
+ request_translations(localised_strings: readonly LocalisedString[]): uint[] | nil
19086
19096
  /**
19087
19097
  * 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.
19088
19098
  * @param index The index to get.
@@ -19292,6 +19302,11 @@ interface LuaPlayer extends LuaControl {
19292
19302
  * @see {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.hand_location Online documentation}
19293
19303
  */
19294
19304
  hand_location?: ItemStackLocation
19305
+ /**
19306
+ * Returns true if the current item stack in cursor will be destroyed after clearing the cursor. Manually putting it into inventory still preserves the item. If the cursor stack is not one of the supported types (blueprint, blueprint-book, deconstruction-planner, upgrade-planner), write operation will be silently ignored.
19307
+ * @see {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.cursor_stack_temporary Online documentation}
19308
+ */
19309
+ cursor_stack_temporary: boolean
19295
19310
  /**
19296
19311
  * The player's zoom-level.
19297
19312
  * @see {@link https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.zoom Online documentation}
@@ -3814,6 +3814,10 @@ interface OnStringTranslatedEvent extends EventData {
3814
3814
  * The translated `localised_string`.
3815
3815
  */
3816
3816
  readonly result: string
3817
+ /**
3818
+ * The unique id for this translation request.
3819
+ */
3820
+ readonly id: uint
3817
3821
  /**
3818
3822
  * Whether the requested localised string was valid and could be translated.
3819
3823
  */