Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Callvote.API;
using Callvote.API.VoteTemplate;
using Callvote.Features;
using Callvote.API.Features.Votes;
using JetBrains.Annotations;
using LabApi.Features.Wrappers;
using MEC;
Expand Down Expand Up @@ -119,12 +117,13 @@ private static void RunSafeVote(
voteOptions.Add(new VoteOption(o.Option, o.DisplayText));
}

var voting = new CustomVote(
Server.Host!,
var voting = new Vote(
Server.Host.ReferenceHub!,
question,
$"SER.{question}",
VoteCallback,
voteOptions
callback: VoteCallback,
voteOptions,
Player.ReadyList.Select(p => p.ReferenceHub).ToHashSet()
);

VoteHandler.CallVote(voting);
Expand Down
11 changes: 5 additions & 6 deletions Code/MethodSystem/Methods/CallvoteMethods/StartVoteMethod.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Callvote.API;
using Callvote.API.VoteTemplate;
using Callvote.Features;
using Callvote.API.Features.Votes;
using JetBrains.Annotations;
using LabApi.Features.Wrappers;
using SER.Code.ArgumentSystem.Arguments;
Expand Down Expand Up @@ -46,12 +44,13 @@ public override void Execute()
voteOptions.Add(new VoteOption(o.Option, o.DisplayText));
}

var voting = new CustomVote(
Server.Host!,
var voting = new Vote(
Server.Host.ReferenceHub!,
question,
$"SER.{question}",
null,
voteOptions
voteOptions,
Player.ReadyList.Select(p => p.ReferenceHub).ToHashSet()
);

VoteHandler.CallVote(voting);
Expand Down
4 changes: 3 additions & 1 deletion SER.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@
<Reference Include="Pooling">
<HintPath>$(SL_DEV_REFERENCES)\Pooling.dll</HintPath>
</Reference>
<Reference Include="Callvote.API">
<HintPath>$(SL_DEV_REFERENCES)\Callvote.API.dll</HintPath>
</Reference>
<Reference Include="UnityEngine">
<HintPath>$(SL_DEV_REFERENCES)\UnityEngine.dll</HintPath>
</Reference>
Expand Down Expand Up @@ -106,7 +109,6 @@
<!-- nuget refs -->
<ItemGroup>
<PackageReference Include="AudioPlayerApi" Version="1.1.2" />
<PackageReference Include="Callvote.LabAPI" Version="6.8.0" />
<PackageReference Include="ExMod.Exiled" Version="9.13.1" />
<PackageReference Include="NCalc" Version="1.3.8" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
Expand Down