80 lines
2.3 KiB
C#
80 lines
2.3 KiB
C#
using System.Collections.Generic;
|
|
using System.Collections.ObjectModel;
|
|
|
|
namespace BriarQueen.Data.Identifiers
|
|
{
|
|
public enum DocumentEntryID
|
|
{
|
|
None = 0,
|
|
C1CarNewspaper,
|
|
}
|
|
|
|
public enum ClueEntryID
|
|
{
|
|
None = 0,
|
|
JasonsNote,
|
|
}
|
|
|
|
public enum PhotoEntryID
|
|
{
|
|
None = 0,
|
|
}
|
|
|
|
public static class CodexEntryIDs
|
|
{
|
|
private const string DOCUMENT_PREFIX = "Codex:Document";
|
|
private const string CLUE_PREFIX = "Codex:Clue";
|
|
private const string PHOTO_PREFIX = "Codex:Photo";
|
|
|
|
private static readonly IReadOnlyDictionary<DocumentEntryID, string> _documents =
|
|
new ReadOnlyDictionary<DocumentEntryID, string>(
|
|
new Dictionary<DocumentEntryID, string>
|
|
{
|
|
{ DocumentEntryID.C1CarNewspaper, GetDocumentIdentifier(DocumentEntryID.C1CarNewspaper) },
|
|
});
|
|
|
|
private static readonly IReadOnlyDictionary<ClueEntryID, string> _clues =
|
|
new ReadOnlyDictionary<ClueEntryID, string>(
|
|
new Dictionary<ClueEntryID, string>
|
|
{
|
|
{ ClueEntryID.JasonsNote, GetClueIdentifier(ClueEntryID.JasonsNote) },
|
|
});
|
|
|
|
private static readonly IReadOnlyDictionary<PhotoEntryID, string> _photos =
|
|
new ReadOnlyDictionary<PhotoEntryID, string>(
|
|
new Dictionary<PhotoEntryID, string>
|
|
{
|
|
});
|
|
|
|
public static string Get(DocumentEntryID id)
|
|
{
|
|
return _documents.TryGetValue(id, out var value) ? value : string.Empty;
|
|
}
|
|
|
|
public static string Get(ClueEntryID id)
|
|
{
|
|
return _clues.TryGetValue(id, out var value) ? value : string.Empty;
|
|
}
|
|
|
|
public static string Get(PhotoEntryID id)
|
|
{
|
|
return _photos.TryGetValue(id, out var value) ? value : string.Empty;
|
|
}
|
|
|
|
private static string GetDocumentIdentifier(DocumentEntryID id)
|
|
{
|
|
return $"{DOCUMENT_PREFIX}:{id}";
|
|
}
|
|
|
|
private static string GetClueIdentifier(ClueEntryID id)
|
|
{
|
|
return $"{CLUE_PREFIX}:{id}";
|
|
}
|
|
|
|
private static string GetPhotoIdentifier(PhotoEntryID id)
|
|
{
|
|
return $"{PHOTO_PREFIX}:{id}";
|
|
}
|
|
}
|
|
}
|