-
-
Notifications
You must be signed in to change notification settings - Fork 399
/
Copy pathIMachineGroup.cs
42 lines (32 loc) · 1.54 KB
/
IMachineGroup.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
42
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using Microsoft.Xna.Framework;
namespace Pathoschild.Stardew.Automate.Framework;
/// <summary>A collection of machines and storage which work as one unit.</summary>
internal interface IMachineGroup
{
/*********
** Accessors
*********/
/// <summary>The main location containing the group (as formatted by <see cref="MachineGroupFactory.GetLocationKey"/>), unless this is an aggregate machine group.</summary>
string? LocationKey { get; }
/// <summary>The keys for all containers which are linked to global inventories.</summary>
HashSet<string> GlobalContainerKeys { get; }
/// <summary>The machines in the group.</summary>
IMachine[] Machines { get; }
/// <summary>The containers in the group.</summary>
IContainer[] Containers { get; }
/// <summary>Whether the machine group is linked to a global inventory.</summary>
[MemberNotNullWhen(false, nameof(IMachineGroup.LocationKey))]
bool IsGlobalGroup { get; }
/// <summary>Whether the group has the minimum requirements to enable internal automation (i.e., at least one chest and one machine).</summary>
bool HasInternalAutomation { get; }
/*********
** Methods
*********/
/// <summary>Automate the machines inside the group.</summary>
void Automate();
/// <summary>Get the tiles covered by this machine group.</summary>
/// <param name="locationKey">The location key for which to get tiles.</param>
IReadOnlySet<Vector2> GetTiles(string locationKey);
}