2021-02-28 22:11:45 +01:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using Robust.Server.Player;
|
2021-02-16 15:07:17 +01:00
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.Voting
|
|
|
|
|
|
{
|
|
|
|
|
|
public interface IVoteHandle
|
|
|
|
|
|
{
|
|
|
|
|
|
int Id { get; }
|
|
|
|
|
|
string Title { get; }
|
|
|
|
|
|
string InitiatorText { get; }
|
|
|
|
|
|
bool Finished { get; }
|
|
|
|
|
|
bool Cancelled { get; }
|
|
|
|
|
|
|
2021-02-28 22:11:45 +01:00
|
|
|
|
IReadOnlyDictionary<object, int> VotesPerOption { get; }
|
|
|
|
|
|
|
2021-02-16 15:07:17 +01:00
|
|
|
|
event VoteFinishedEventHandler OnFinished;
|
|
|
|
|
|
bool IsValidOption(int optionId);
|
|
|
|
|
|
void CastVote(IPlayerSession session, int? optionId);
|
|
|
|
|
|
void Cancel();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|