Class SignInstancer
Handles sending specific sign data to specific players.
public class SignInstancer : ILayoutHostedService, IEventListener<BarricadePlaced>, IEventListener<BarricadeDestroyed>, IEventListener<SignTextChanged>
- Inheritance
-
SignInstancer
- Implements
- Inherited Members
Constructors
SignInstancer(WarfareModule, ILogger<SignInstancer>, ITranslationService)
public SignInstancer(WarfareModule module, ILogger<SignInstancer> logger, ITranslationService translationService)
Parameters
moduleWarfareModuleloggerILogger<SignInstancer>translationServiceITranslationService
Methods
GetSignProvider(BarricadeDrop)
Get the sign provider for a specific sign.
public ISignInstanceProvider? GetSignProvider(BarricadeDrop drop)
Parameters
dropBarricadeDrop
Returns
Exceptions
GetSignText(BarricadeDrop, LanguageInfo, CultureInfo)
Get the text that would show on a sign for any player with the given language and culture.
public string GetSignText(BarricadeDrop drop, LanguageInfo language, CultureInfo culture)
Parameters
dropBarricadeDroplanguageLanguageInfocultureCultureInfo
Returns
Exceptions
GetSignText(BarricadeDrop, WarfarePlayer)
Get the text that would show on a sign for a player.
public string GetSignText(BarricadeDrop drop, WarfarePlayer player)
Parameters
dropBarricadeDropplayerWarfarePlayer
Returns
Exceptions
IsInstanced(BarricadeDrop)
Check if a specific sign is being instanced.
public bool IsInstanced(BarricadeDrop drop)
Parameters
dropBarricadeDrop
Returns
Exceptions
UpdateSign(BarricadeDrop)
Update a specific sign.
public void UpdateSign(BarricadeDrop barricade)
Parameters
barricadeBarricadeDrop
Exceptions
UpdateSigns()
Update all signs.
public int UpdateSigns()
Returns
Exceptions
UpdateSigns(WarfarePlayer)
Update all signs for a player.
public int UpdateSigns(WarfarePlayer player)
Parameters
playerWarfarePlayer
Returns
Exceptions
UpdateSigns(LanguageSet)
Update all signs for a set of players.
public int UpdateSigns(LanguageSet set)
Parameters
setLanguageSet
Returns
Exceptions
UpdateSigns<TProvider>()
Update all signs with a certain provider type.
public int UpdateSigns<TProvider>() where TProvider : class, ISignInstanceProvider
Returns
Type Parameters
TProvider
Exceptions
UpdateSigns<TProvider>(Func<InteractableSign, TProvider, bool>)
Update all signs that match a predicate with a certain provider type.
public int UpdateSigns<TProvider>(Func<InteractableSign, TProvider, bool> selector) where TProvider : class, ISignInstanceProvider
Parameters
Returns
Type Parameters
TProvider
Exceptions
UpdateSigns<TProvider>(WarfarePlayer)
Update all signs with a certain provider type for a player.
public int UpdateSigns<TProvider>(WarfarePlayer player) where TProvider : class, ISignInstanceProvider
Parameters
playerWarfarePlayer
Returns
Type Parameters
TProvider
Exceptions
UpdateSigns<TProvider>(WarfarePlayer, Func<InteractableSign, TProvider, bool>)
Update all signs that match a predicate with a certain provider type for a player.
public int UpdateSigns<TProvider>(WarfarePlayer player, Func<InteractableSign, TProvider, bool> selector) where TProvider : class, ISignInstanceProvider
Parameters
playerWarfarePlayerselectorFunc<InteractableSign, TProvider, bool>
Returns
Type Parameters
TProvider
Exceptions
UpdateSigns<TProvider>(LanguageSet)
Update all signs with a certain provider type for a set of players.
public int UpdateSigns<TProvider>(LanguageSet set) where TProvider : class, ISignInstanceProvider
Parameters
setLanguageSet
Returns
Type Parameters
TProvider
Exceptions
UpdateSigns<TProvider>(LanguageSet, Func<InteractableSign, TProvider, bool>)
Update all signs that match a predicate with a certain provider type for a set of players.
public int UpdateSigns<TProvider>(LanguageSet set, Func<InteractableSign, TProvider, bool> selector) where TProvider : class, ISignInstanceProvider
Parameters
setLanguageSetselectorFunc<InteractableSign, TProvider, bool>
Returns
Type Parameters
TProvider