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
worldSimWorld
Returns
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
idstringentriesIReadOnlyList<CustomEventSound>
Returns
FindTrigger(SimWorld, int)
public static TriggerDef FindTrigger(SimWorld world, int index)
Parameters
Returns
FindWeapon(SimWorld, int)
public static WeaponState FindWeapon(SimWorld world, int slot)
Parameters
Returns
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
valueSimEventkeysSoundCueKeysweaponWeaponStatetriggerTriggerDefoverridesIReadOnlyList<WeaponSoundOverride>homingUsesMagicbool
Returns
StatusCue(int, SoundCueKeys)
Cue for a status index (StatusKind).
public static string StatusCue(int status, SoundCueKeys keys)
Parameters
statusintkeysSoundCueKeys
Returns
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
weaponWeaponDefstyleMeleeStylekeysSoundCueKeysoverridesIReadOnlyList<WeaponSoundOverride>homingUsesMagicbool