18 lines
554 B
C#
Raw Normal View History

using QSB.Localization;
2022-06-04 16:19:55 +01:00
using System;
using System.Collections.Generic;
2022-03-02 19:46:33 -08:00
namespace QSB.DeathSync;
public static class Necronomicon
{
2022-03-02 19:46:33 -08:00
public static string GetPhrase(DeathType deathType, int index)
=> QSBLocalization.Current.DeathMessages.ContainsKey(deathType)
? QSBLocalization.Current.DeathMessages[deathType][index]
2022-03-02 19:46:33 -08:00
: null;
2022-03-02 19:46:33 -08:00
public static int GetRandomIndex(DeathType deathType)
=> QSBLocalization.Current.DeathMessages.ContainsKey(deathType)
? new Random().Next(0, QSBLocalization.Current.DeathMessages[deathType].Length)
2022-03-02 19:46:33 -08:00
: -1;
2020-12-03 08:28:05 +00:00
}