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