.gitattributes forces LF (CRLF only for .bat/.cmd), core.autocrlf is off; files that differed only by CRLF are normalized.
40 lines
1.4 KiB
C#
40 lines
1.4 KiB
C#
using System.Collections.Generic;
|
|
using Cthangover.Core.Localization;
|
|
using Cthangover.Mods.Dialog;
|
|
using Cthangover.Core.UI;
|
|
using Cthangover.Mods.Interface.Base.Lists;
|
|
using Cthangover.Core.UI.Dialog;
|
|
using Cthangover.Core.UI.Event;
|
|
using Cthangover.Core.UI.Executable;
|
|
using Cthangover.Core.Scenarios;
|
|
using Cthangover.Core.Scenes;
|
|
using Cthangover.Core.Interactive;
|
|
|
|
namespace Cthangover.Mods.Dialog.Scenarios
|
|
{
|
|
/// <summary>
|
|
/// Handles the <c>music</c> DSL command. Starts playing a background music
|
|
/// track from the given resource path. Implements <see cref="ICommandReferenceMetadata"/>
|
|
/// with <see cref="PositionalReferenceKind.Music"/> so the build pipeline
|
|
/// can track referenced audio assets.
|
|
/// </summary>
|
|
public class MusicCommandStrategy : IScenarioCommandStrategy, ICommandReferenceMetadata, IScenarioCommandSpec
|
|
{
|
|
/// <inheritdoc/>
|
|
public string Command => "music";
|
|
/// <inheritdoc/>
|
|
public PositionalReferenceKind Positional0Kind => PositionalReferenceKind.Music;
|
|
/// <inheritdoc/>
|
|
public int MinPositional => 1;
|
|
/// <inheritdoc/>
|
|
public int MaxPositional => 1;
|
|
|
|
/// <inheritdoc/>
|
|
public void Execute(DialogQueue dlg, List<string> positional, Dictionary<string, string> named, string arrowTarget, ILocalizationProvider locale)
|
|
{
|
|
if (positional.Count > 0)
|
|
dlg.Music(positional[0]);
|
|
}
|
|
}
|
|
}
|