typed-factorio 1.5.1 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
package/Changelog.md CHANGED
@@ -1,3 +1,7 @@
1
+ # v1.6.0
2
+
3
+ - Updated to factorio version 1.1.64
4
+
1
5
  # v1.5.1
2
6
 
3
7
  - Added old `Read` types as deprecated type aliases of new types; to help with migration.
@@ -4028,6 +4028,16 @@ interface LuaEntity extends LuaControl {
4028
4028
  * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.rocket_silo_status Online documentation}
4029
4029
  */
4030
4030
  readonly rocket_silo_status: defines.rocket_silo_status
4031
+ /**
4032
+ * 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.
4033
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.tile_width Online documentation}
4034
+ */
4035
+ readonly tile_width: uint
4036
+ /**
4037
+ * 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.
4038
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.tile_height Online documentation}
4039
+ */
4040
+ readonly tile_height: uint
4031
4041
  /**
4032
4042
  * 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.
4033
4043
  */
@@ -5058,6 +5068,16 @@ interface BaseEntity extends LuaControl {
5058
5068
  * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.rocket_silo_status Online documentation}
5059
5069
  */
5060
5070
  readonly rocket_silo_status: defines.rocket_silo_status
5071
+ /**
5072
+ * 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.
5073
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.tile_width Online documentation}
5074
+ */
5075
+ readonly tile_width: uint
5076
+ /**
5077
+ * 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.
5078
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.tile_height Online documentation}
5079
+ */
5080
+ readonly tile_height: uint
5061
5081
  /**
5062
5082
  * 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.
5063
5083
  */
@@ -7782,6 +7802,16 @@ interface LuaEntityPrototype {
7782
7802
  * @see {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.use_exact_mode Online documentation}
7783
7803
  */
7784
7804
  readonly use_exact_mode?: boolean
7805
+ /**
7806
+ * 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)
7807
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.tile_width Online documentation}
7808
+ */
7809
+ readonly tile_width: uint
7810
+ /**
7811
+ * 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)
7812
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.tile_height Online documentation}
7813
+ */
7814
+ readonly tile_height: uint
7785
7815
  /**
7786
7816
  * The current movement speed of this character, including effects from exoskeletons, tiles, stickers and shooting.
7787
7817
  *
@@ -8272,6 +8302,16 @@ interface BaseEntityPrototype {
8272
8302
  * @see {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.manual_range_modifier Online documentation}
8273
8303
  */
8274
8304
  readonly manual_range_modifier?: double
8305
+ /**
8306
+ * 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)
8307
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.tile_width Online documentation}
8308
+ */
8309
+ readonly tile_width: uint
8310
+ /**
8311
+ * 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)
8312
+ * @see {@link https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.tile_height Online documentation}
8313
+ */
8314
+ readonly tile_height: uint
8275
8315
  /**
8276
8316
  * 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.
8277
8317
  */
@@ -9883,6 +9923,19 @@ interface LuaEquipmentGrid {
9883
9923
  * @see {@link https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.get_contents Online documentation}
9884
9924
  */
9885
9925
  get_contents(): Record<string, uint>
9926
+ /**
9927
+ * Find equipment by name.
9928
+ * @param equipment Prototype name of the equipment to find.
9929
+ * @returns The first found equipment, or `nil` if equipment could not be found.
9930
+ * @see {@link https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.find Online documentation}
9931
+ */
9932
+ find(equipment: string): LuaEquipment | nil
9933
+ /**
9934
+ * Get the number of all or some equipment in this grid.
9935
+ * @param equipment Prototype name of the equipment to count. If not specified, count all equipment.
9936
+ * @see {@link https://lua-api.factorio.com/latest/LuaEquipmentGrid.html#LuaEquipmentGrid.count Online documentation}
9937
+ */
9938
+ count(equipment?: string): uint
9886
9939
  readonly prototype: LuaEquipmentGridPrototype
9887
9940
  /**
9888
9941
  * Width of the equipment grid.
@@ -11294,6 +11347,17 @@ interface LuaForce {
11294
11347
  * @see {@link https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.research_enabled Online documentation}
11295
11348
  */
11296
11349
  readonly research_enabled: boolean
11350
+ /**
11351
+ * Custom color for this force. If specified, will take priority over other sources of the force color. Writing nil clears custom color. Will return nil if it was not specified or if was set to {0,0,0,0}
11352
+ * @see {@link https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.custom_color Online documentation}
11353
+ */
11354
+ get custom_color(): Color
11355
+ set custom_color(value: Color | ColorArray)
11356
+ /**
11357
+ * Effective color of this force.
11358
+ * @see {@link https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.color Online documentation}
11359
+ */
11360
+ readonly color: Color
11297
11361
  /**
11298
11362
  * 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.
11299
11363
  */
@@ -3569,6 +3569,7 @@ interface ModuleEffects {
3569
3569
  * - `"not-selectable-in-game"`: Disallows selection of the entity even when a selection box is specified for other reasons. For example, selection boxes are used to determine the size of outlines to be shown when highlighting entities inside electric pole ranges.
3570
3570
  * - `"not-upgradable"`: Prevents the entity from being selected by the upgrade planner.
3571
3571
  * - `"not-in-kill-statistics"`: Prevents the entity from being shown in the kill statistics.
3572
+ * - `"not-in-made-in"`: Prevents the entity from being shown in the "made in" list in recipe tooltips.
3572
3573
  * @see {@link https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags Online documentation}
3573
3574
  */
3574
3575
  interface EntityPrototypeFlags {
@@ -3669,6 +3670,10 @@ interface EntityPrototypeFlags {
3669
3670
  * Prevents the entity from being shown in the kill statistics.
3670
3671
  */
3671
3672
  readonly "not-in-kill-statistics"?: true
3673
+ /**
3674
+ * Prevents the entity from being shown in the "made in" list in recipe tooltips.
3675
+ */
3676
+ readonly "not-in-made-in"?: true
3672
3677
  }
3673
3678
 
3674
3679
  /**
@@ -1572,6 +1572,10 @@ declare namespace defines {
1572
1572
  wire_dragging,
1573
1573
  write_to_console,
1574
1574
  }
1575
+ enum input_method {
1576
+ keyboard_and_mouse,
1577
+ game_controller,
1578
+ }
1575
1579
  enum inventory {
1576
1580
  fuel,
1577
1581
  burnt_result,
@@ -201,6 +201,8 @@ interface OnCancelledDeconstructionEvent extends EventData {
201
201
  interface OnCancelledUpgradeEvent extends EventData {
202
202
  readonly entity: LuaEntity
203
203
  readonly player_index?: PlayerIndex
204
+ readonly target: LuaEntityPrototype
205
+ readonly direction?: defines.direction
204
206
  /**
205
207
  * Identifier of the event
206
208
  */
@@ -2973,6 +2975,7 @@ interface OnPreGhostUpgradedEvent extends EventData {
2973
2975
  */
2974
2976
  readonly player_index?: PlayerIndex
2975
2977
  readonly ghost: LuaEntity
2978
+ readonly target: LuaEntityPrototype
2976
2979
  /**
2977
2980
  * Identifier of the event
2978
2981
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typed-factorio",
3
- "version": "1.5.1",
3
+ "version": "1.6.0",
4
4
  "description": "Featureful typescript definitions for the the Factorio modding lua api.",
5
5
  "keywords": [
6
6
  "factorio",
@@ -22,8 +22,9 @@
22
22
  "lint": "eslint .",
23
23
  "check": "yarn run lint && yarn run test",
24
24
  "prepublishOnly": "yarn run check",
25
- "download-latest-runtime-api": "ts-node ./scripts/downloadLatest.ts",
26
- "next-version": "yarn run download-latest-runtime-api && yarn run clean && yarn test && yarn version --minor"
25
+ "download-latest-runtime-api": "ts-node ./scripts/download-latest.ts",
26
+ "new-version-changelog": "ts-node ./scripts/new-version-changelog.ts",
27
+ "next-version": "yarn run download-latest-runtime-api && yarn run clean && yarn run check && yarn run new-version-changelog && git add . && yarn version --minor"
27
28
  },
28
29
  "peerDependencies": {
29
30
  "lua-types": "^2.11.0",