forked from RainOrigami/BattleBitBaseModules
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSnipers.cs
More file actions
34 lines (33 loc) · 939 Bytes
/
Copy pathSnipers.cs
File metadata and controls
34 lines (33 loc) · 939 Bytes
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
using BattleBitAPI.Common;
using BBRAPIModules;
using System.Threading.Tasks;
namespace Snipers
{
public class Snipers : BattleBitModule
{
//
// Sets player's role to recon when they join
//
public override Task OnPlayerConnected(RunnerPlayer player)
{
player.SetNewRole(GameRole.Recon);
return Task.CompletedTask;
}
//
// Only allows to choose recon role
//
public override async Task<bool> OnPlayerRequestingToChangeRole(RunnerPlayer player, GameRole requestedRole)
{
return GameRole.Recon == requestedRole;
}
//
// Disables night voting
//
public override Task OnConnected()
{
this.Server.ServerSettings.CanVoteDay = true;
this.Server.ServerSettings.CanVoteNight = false;
return Task.CompletedTask;
}
}
}