Table of Contents

Class SignInstancer

Namespace
Uncreated.Warfare.Signs
Assembly
Uncreated.Warfare.dll

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

module WarfareModule
logger ILogger<SignInstancer>
translationService ITranslationService

Methods

GetSignProvider(BarricadeDrop)

Get the sign provider for a specific sign.

public ISignInstanceProvider? GetSignProvider(BarricadeDrop drop)

Parameters

drop BarricadeDrop

Returns

ISignInstanceProvider

Exceptions

GameThreadException

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

drop BarricadeDrop
language LanguageInfo
culture CultureInfo

Returns

string

Exceptions

GameThreadException

GetSignText(BarricadeDrop, WarfarePlayer)

Get the text that would show on a sign for a player.

public string GetSignText(BarricadeDrop drop, WarfarePlayer player)

Parameters

drop BarricadeDrop
player WarfarePlayer

Returns

string

Exceptions

GameThreadException

IsInstanced(BarricadeDrop)

Check if a specific sign is being instanced.

public bool IsInstanced(BarricadeDrop drop)

Parameters

drop BarricadeDrop

Returns

bool

Exceptions

GameThreadException

UpdateSign(BarricadeDrop)

Update a specific sign.

public void UpdateSign(BarricadeDrop barricade)

Parameters

barricade BarricadeDrop

Exceptions

GameThreadException

UpdateSigns()

Update all signs.

public int UpdateSigns()

Returns

int

Exceptions

GameThreadException

UpdateSigns(WarfarePlayer)

Update all signs for a player.

public int UpdateSigns(WarfarePlayer player)

Parameters

player WarfarePlayer

Returns

int

Exceptions

GameThreadException

UpdateSigns(LanguageSet)

Update all signs for a set of players.

public int UpdateSigns(LanguageSet set)

Parameters

set LanguageSet

Returns

int

Exceptions

GameThreadException

UpdateSigns<TProvider>()

Update all signs with a certain provider type.

public int UpdateSigns<TProvider>() where TProvider : class, ISignInstanceProvider

Returns

int

Type Parameters

TProvider

Exceptions

GameThreadException

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

selector Func<InteractableSign, TProvider, bool>

Returns

int

Type Parameters

TProvider

Exceptions

GameThreadException

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

player WarfarePlayer

Returns

int

Type Parameters

TProvider

Exceptions

GameThreadException

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

player WarfarePlayer
selector Func<InteractableSign, TProvider, bool>

Returns

int

Type Parameters

TProvider

Exceptions

GameThreadException

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

set LanguageSet

Returns

int

Type Parameters

TProvider

Exceptions

GameThreadException

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

set LanguageSet
selector Func<InteractableSign, TProvider, bool>

Returns

int

Type Parameters

TProvider

Exceptions

GameThreadException