-
-
Notifications
You must be signed in to change notification settings - Fork 388
/
Copy pathIAutomationFactory.cs
41 lines (36 loc) · 1.99 KB
/
IAutomationFactory.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using Microsoft.Xna.Framework;
using StardewValley;
using StardewValley.Buildings;
using StardewValley.TerrainFeatures;
using SObject = StardewValley.Object;
namespace Pathoschild.Stardew.Automate;
/// <summary>Constructs machines, containers, or connectors which can be added to a machine group.</summary>
public interface IAutomationFactory
{
/*********
** Accessors
*********/
/// <summary>Get a machine, container, or connector instance for a given object.</summary>
/// <param name="obj">The in-game object.</param>
/// <param name="location">The location to check.</param>
/// <param name="tile">The tile position to check.</param>
/// <returns>Returns an instance or <c>null</c>.</returns>
IAutomatable? GetFor(SObject obj, GameLocation location, in Vector2 tile);
/// <summary>Get a machine, container, or connector instance for a given terrain feature.</summary>
/// <param name="feature">The terrain feature.</param>
/// <param name="location">The location to check.</param>
/// <param name="tile">The tile position to check.</param>
/// <returns>Returns an instance or <c>null</c>.</returns>
IAutomatable? GetFor(TerrainFeature feature, GameLocation location, in Vector2 tile);
/// <summary>Get a machine, container, or connector instance for a given building.</summary>
/// <param name="building">The building.</param>
/// <param name="location">The location to check.</param>
/// <param name="tile">The tile position to check.</param>
/// <returns>Returns an instance or <c>null</c>.</returns>
IAutomatable? GetFor(Building building, GameLocation location, in Vector2 tile);
/// <summary>Get a machine, container, or connector instance for a given tile position.</summary>
/// <param name="location">The location to check.</param>
/// <param name="tile">The tile position to check.</param>
/// <returns>Returns an instance or <c>null</c>.</returns>
IAutomatable? GetForTile(GameLocation location, in Vector2 tile);
}