1
0
vibe-plugin/FFXIV_Vibe_Plugin/App/Triggers/ChatTrigger.cs
2023-01-24 22:50:56 +01:00

28 lines
723 B
C#

using System;
namespace FFXIV_Vibe_Plugin.Triggers {
[Serializable]
public class ChatTrigger : IComparable {
public ChatTrigger(int intensity, string text) {
Intensity = intensity;
Text = text;
}
public int Intensity { get; }
public string Text { get; }
public override string ToString() {
return $"Trigger(intensity: {Intensity}, text: '{Text}')";
}
public string ToConfigString() {
return $"{Intensity} {Text}";
}
public int CompareTo(object? obj) {
int thatintensity = obj is ChatTrigger that ? that.Intensity : 0;
return this.Intensity.CompareTo(thatintensity);
}
}
}