factorio-types 1.2.58 → 1.2.60

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/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 2.0.77
5
+ // Factorio version 2.1.8
6
6
  // API version 6
7
7
 
8
8
  declare namespace runtime {
@@ -139,6 +139,43 @@ interface on_biter_base_built {
139
139
  */
140
140
  tick: MapTick;
141
141
  }
142
+ /**
143
+ * Called when a blueprint entity is pasted over an existing entity or entity ghost.
144
+ *
145
+ * The entity's settings, rotation, mirroring, wire connections, etc. may have been updated. This event is raised even if no settings actually changed.
146
+ *
147
+ * Note this event is not raised when an entity is upgraded or marked for upgrade, when a new entity is created, or when an entity ghost is instantly revived. {@link on_built_entity | runtime:on_built_entity} is raised instead in those cases.
148
+ */
149
+ interface on_blueprint_settings_pasted {
150
+ /**
151
+ * The entity that was updated. Can be either an entity or an entity ghost.
152
+ */
153
+ entity: LuaEntity;
154
+ /**
155
+ * Whether the blueprint changed the entity's mirroring.
156
+ */
157
+ mirrored: boolean;
158
+ /**
159
+ * Identifier of the event.
160
+ */
161
+ name: defines.events;
162
+ /**
163
+ * The player who pasted the blueprint, if any. `nil` if pasted by script.
164
+ */
165
+ player_index?: uint32;
166
+ /**
167
+ * If the blueprint rotated the entity, provides the entity's direction before the rotation. Note: not provided for rotations due to superforce printing.
168
+ */
169
+ previous_direction?: defines.direction;
170
+ /**
171
+ * Tags from the source blueprint, if any. Only provided for non-ghost entities. For ghost entities, access tags via `entity.tags`.
172
+ */
173
+ tags?: Tags;
174
+ /**
175
+ * Tick the event was generated.
176
+ */
177
+ tick: MapTick;
178
+ }
142
179
  /**
143
180
  * Called when a set of positions on the map is cloned.
144
181
  */
@@ -1184,6 +1221,63 @@ interface on_gui_hover {
1184
1221
  */
1185
1222
  tick: MapTick;
1186
1223
  }
1224
+ /**
1225
+ * Called when a player interacts with a custom inventory GUI.
1226
+ */
1227
+ interface on_gui_inventory_action {
1228
+ /**
1229
+ * The action performed.
1230
+ */
1231
+ action: defines.inventory_actions;
1232
+ /**
1233
+ * If alt was pressed.
1234
+ */
1235
+ alt: boolean;
1236
+ /**
1237
+ * The final mouse button used if any.
1238
+ */
1239
+ button: defines.mouse_button_type;
1240
+ /**
1241
+ * If control was pressed.
1242
+ */
1243
+ control: boolean;
1244
+ /**
1245
+ * The inventory element interacted with.
1246
+ */
1247
+ element: LuaGuiElement;
1248
+ /**
1249
+ * The item clicked on.
1250
+ */
1251
+ item?: LuaItemPrototype;
1252
+ /**
1253
+ * The item number clicked on (if it had one).
1254
+ */
1255
+ item_number?: uint32;
1256
+ /**
1257
+ * Identifier of the event.
1258
+ */
1259
+ name: defines.events;
1260
+ /**
1261
+ * The player doing the action.
1262
+ */
1263
+ player_index: uint32;
1264
+ /**
1265
+ * The item quality clicked on.
1266
+ */
1267
+ quality?: LuaQualityPrototype;
1268
+ /**
1269
+ * If shift was pressed.
1270
+ */
1271
+ shift: boolean;
1272
+ /**
1273
+ * The slot index that was interacted with.
1274
+ */
1275
+ slot: uint32;
1276
+ /**
1277
+ * Tick the event was generated.
1278
+ */
1279
+ tick: MapTick;
1280
+ }
1187
1281
  /**
1188
1282
  * Called when the player's cursor leaves a {@link LuaGuiElement | runtime:LuaGuiElement} that was previously hovered.
1189
1283
  *
@@ -1998,6 +2092,35 @@ interface on_player_clicked_gps_tag {
1998
2092
  */
1999
2093
  tick: MapTick;
2000
2094
  }
2095
+ /**
2096
+ * Called after a player's color changes.
2097
+ */
2098
+ interface on_player_color_changed {
2099
+ /**
2100
+ * If the change was done by script or the player.
2101
+ */
2102
+ by_script: boolean;
2103
+ /**
2104
+ * Identifier of the event.
2105
+ */
2106
+ name: defines.events;
2107
+ /**
2108
+ * The old chat color.
2109
+ */
2110
+ old_chat_color: Color;
2111
+ /**
2112
+ * The old color.
2113
+ */
2114
+ old_color: Color;
2115
+ /**
2116
+ * The player whose color changed.
2117
+ */
2118
+ player_index: uint32;
2119
+ /**
2120
+ * Tick the event was generated.
2121
+ */
2122
+ tick: MapTick;
2123
+ }
2001
2124
  /**
2002
2125
  * Called when a player clicks the "confirm" button in the configure Blueprint GUI.
2003
2126
  */
@@ -2562,6 +2685,23 @@ interface on_player_mined_tile {
2562
2685
  */
2563
2686
  tiles: OldTileAndPosition[];
2564
2687
  }
2688
+ /**
2689
+ * Called when a player's current music track (ambient sound) changes. This includes when the music track finishes playing.
2690
+ */
2691
+ interface on_player_music_changed {
2692
+ /**
2693
+ * Identifier of the event.
2694
+ */
2695
+ name: defines.events;
2696
+ /**
2697
+ * The player whose current music has changed.
2698
+ */
2699
+ player_index: uint32;
2700
+ /**
2701
+ * Tick the event was generated.
2702
+ */
2703
+ tick: MapTick;
2704
+ }
2565
2705
  /**
2566
2706
  * Called when a player is muted.
2567
2707
  */
@@ -2783,6 +2923,7 @@ interface on_player_rotated_entity {
2783
2923
  * The previous direction
2784
2924
  */
2785
2925
  previous_direction: defines.direction;
2926
+ previous_mirroring: boolean;
2786
2927
  /**
2787
2928
  * Tick the event was generated.
2788
2929
  */
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 2.0.77
5
+ // Factorio version 2.1.8
6
6
  // API version 6
7
7
 
8
8
  /**