using System.Collections.Generic;
using StardewValley;
namespace StardewModdingAPI.Framework.ModHelpers
{
/// Provides multiplayer utilities.
internal class MultiplayerHelper : BaseHelper, IMultiplayerHelper
{
/*********
** Properties
*********/
/// SMAPI's core multiplayer utility.
private readonly SMultiplayer Multiplayer;
/*********
** Public methods
*********/
/// Construct an instance.
/// The unique ID of the relevant mod.
/// SMAPI's core multiplayer utility.
public MultiplayerHelper(string modID, SMultiplayer multiplayer)
: base(modID)
{
this.Multiplayer = multiplayer;
}
/// Get the locations which are being actively synced from the host.
public IEnumerable GetActiveLocations()
{
return this.Multiplayer.activeLocations();
}
/// Get a new multiplayer ID.
public long GetNewID()
{
return this.Multiplayer.getNewID();
}
}
}