Class AudioCueRules

Namespace
SurvivorsMaker.Presentation
Assembly
SurvivorsMaker.Presentation.dll

Pure cue selection and playback-limit calculations shared by sound components.

public static class AudioCueRules
Inheritance
AudioCueRules
Inherited Members

Methods

BossAlive(SimWorld)

public static bool BossAlive(SimWorld world)

Parameters

world SimWorld

Returns

bool

CustomCue(string, IReadOnlyList<CustomEventSound>)

The cue mapped to a custom event id, "" when it is mapped to silence, or null when it has no entry (first entry wins). Checked before ForEvent(SimEvent, SoundCueKeys, WeaponState, TriggerDef, IReadOnlyList<WeaponSoundOverride>, bool), so a mapped id also replaces a built-in event's cue.

public static string CustomCue(string id, IReadOnlyList<CustomEventSound> entries)

Parameters

id string
entries IReadOnlyList<CustomEventSound>

Returns

string

FindTrigger(SimWorld, int)

public static TriggerDef FindTrigger(SimWorld world, int index)

Parameters

world SimWorld
index int

Returns

TriggerDef

FindWeapon(SimWorld, int)

public static WeaponState FindWeapon(SimWorld world, int slot)

Parameters

world SimWorld
slot int

Returns

WeaponState

ForEvent(SimEvent, SoundCueKeys, WeaponState, TriggerDef, IReadOnlyList<WeaponSoundOverride>, bool)

The cue key a simulation event plays, or "" for none. weapon is the firing weapon for WeaponFired and trigger the fired trigger for TriggerFired; both parameters are optional.

public static string ForEvent(SimEvent value, SoundCueKeys keys, WeaponState weapon = null, TriggerDef trigger = null, IReadOnlyList<WeaponSoundOverride> overrides = null, bool homingUsesMagic = true)

Parameters

value SimEvent
keys SoundCueKeys
weapon WeaponState
trigger TriggerDef
overrides IReadOnlyList<WeaponSoundOverride>
homingUsesMagic bool

Returns

string

StatusCue(int, SoundCueKeys)

Cue for a status index (StatusKind).

public static string StatusCue(int status, SoundCueKeys keys)

Parameters

status int
keys SoundCueKeys

Returns

string

WeaponCue(WeaponDef, MeleeStyle, SoundCueKeys, IReadOnlyList<WeaponSoundOverride>, bool)

Override by the longest matching id prefix, else by kind: melee swing/thrust, ranged (homing = magic), orbit, aura.

public static string WeaponCue(WeaponDef weapon, MeleeStyle style, SoundCueKeys keys, IReadOnlyList<WeaponSoundOverride> overrides = null, bool homingUsesMagic = true)

Parameters

weapon WeaponDef
style MeleeStyle
keys SoundCueKeys
overrides IReadOnlyList<WeaponSoundOverride>
homingUsesMagic bool

Returns

string