Class DutyService
- Namespace
- Uncreated.Warfare.Players.Permissions
- Assembly
- Uncreated.Warfare.dll
[GenerateRpcSource]
[RpcGeneratedProxyType(TypeSetupMethodName = "__ModularRpcsGeneratedSetupStaticGeneratedProxy")]
public class DutyService : IAsyncEventListener<PlayerLeft>
- Inheritance
-
DutyService
- Implements
- Inherited Members
Constructors
DutyService(SignInstancer, TranslationInjection<DutyCommandTranslations>, ChatService, ILogger<DutyService>, UserPermissionStore, IConfiguration, IPlayerService, DutyUI, ZoneStore)
public DutyService(SignInstancer signs, TranslationInjection<DutyCommandTranslations> translations, ChatService chatService, ILogger<DutyService> logger, UserPermissionStore permissionStore, IConfiguration configuration, IPlayerService playerService, DutyUI dutyUi, ZoneStore zoneStore)
Parameters
signsSignInstancertranslationsTranslationInjection<DutyCommandTranslations>chatServiceChatServiceloggerILogger<DutyService>permissionStoreUserPermissionStoreconfigurationIConfigurationplayerServiceIPlayerServicedutyUiDutyUIzoneStoreZoneStore
Fields
PermissionFreecam
public static readonly PermissionLeaf PermissionFreecam
Field Value
PermissionWorkzone
public static readonly PermissionLeaf PermissionWorkzone
Field Value
Properties
AdminOffDuty
public string AdminOffDuty { get; }
Property Value
AdminOnDuty
public string AdminOnDuty { get; }
Property Value
Owner
public string Owner { get; }
Property Value
StaffOffDuty
public string StaffOffDuty { get; }
Property Value
StaffOnDuty
public string StaffOnDuty { get; }
Property Value
TrialOffDuty
public string TrialOffDuty { get; }
Property Value
TrialOnDuty
public string TrialOnDuty { get; }
Property Value
Methods
CheckDutyStateAsync(CSteamID, bool, CancellationToken)
public Task<(DutyLevel Level, bool IsOnDuty)> CheckDutyStateAsync(CSteamID player, bool validatePermissions, CancellationToken token = default)
Parameters
playerCSteamIDvalidatePermissionsbooltokenCancellationToken
Returns
SendDutyChanged(ulong, DutyLevel, bool)
[RpcSend]
protected RpcTask SendDutyChanged(ulong steam64, DutyLevel level, bool isOnDuty)
Parameters
Returns
- RpcTask
SetDutyStateAsync(CSteamID, bool, CancellationToken)
Sets the player's duty state to whatever it isn't currently.
[RpcReceive]
public Task<bool> SetDutyStateAsync(CSteamID steam64, bool isOnDuty, CancellationToken token = default)
Parameters
steam64CSteamIDisOnDutybooltokenCancellationToken
Returns
- Task<bool>
true if the player's duty state was set, otherwise false because they are already in the requested duty state or are not staff.
ToggleDutyStateAsync(CSteamID, CancellationToken)
Switch the player's duty state to whatever it isn't currently.
[RpcReceive]
public Task<bool> ToggleDutyStateAsync(CSteamID player, CancellationToken token = default)
Parameters
playerCSteamIDtokenCancellationToken