mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-01 03:32:38 +00:00
18 lines
554 B
C#
18 lines
554 B
C#
using QSB.Localization;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace QSB.DeathSync;
|
|
|
|
public static class Necronomicon
|
|
{
|
|
public static string GetPhrase(DeathType deathType, int index)
|
|
=> QSBLocalization.Current.DeathMessages.ContainsKey(deathType)
|
|
? QSBLocalization.Current.DeathMessages[deathType][index]
|
|
: null;
|
|
|
|
public static int GetRandomIndex(DeathType deathType)
|
|
=> QSBLocalization.Current.DeathMessages.ContainsKey(deathType)
|
|
? new Random().Next(0, QSBLocalization.Current.DeathMessages[deathType].Length)
|
|
: -1;
|
|
} |