mirror of
https://github.com/kwsch/NHSE.git
synced 2026-09-08 03:05:18 -05:00
Condense some expressions
This commit is contained in:
@@ -6,44 +6,13 @@
|
||||
/// <remarks>
|
||||
/// These details are extracted from FgMainParam.bcsv
|
||||
/// </remarks>
|
||||
public class FieldItemDefinition : INamedValue
|
||||
/// <param name="Index">Item ID</param>
|
||||
/// <param name="Dig">Item ID that the player receives if the item is dug up. Is <see cref="Item.NONE"/> if it cannot be dug up.</param>
|
||||
/// <param name="Pick">Item ID that the player receives if the item is picked up. Is <see cref="Item.NONE"/> if it cannot be picked up.</param>
|
||||
/// <param name="Name">Internal Name of the Item</param>
|
||||
/// <param name="Kind">Classification of item.</param>
|
||||
public sealed record FieldItemDefinition(ushort Index, ushort Dig, ushort Pick, string Name, FieldItemKind Kind) : INamedValue
|
||||
{
|
||||
/// <summary>
|
||||
/// Item ID
|
||||
/// </summary>
|
||||
public ushort Index { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Internal Name of the Item
|
||||
/// </summary>
|
||||
public string Name { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Item ID that the player receives if the item is dug up.
|
||||
/// </summary>
|
||||
/// <remarks>Is <see cref="Item.NONE"/> if it cannot be dug up.</remarks>
|
||||
public readonly ushort Dig;
|
||||
|
||||
/// <summary>
|
||||
/// Item ID that the player receives if the item is dug up.
|
||||
/// </summary>
|
||||
/// <remarks>Is <see cref="Item.NONE"/> if it cannot be picked up.</remarks>
|
||||
public readonly ushort Pick;
|
||||
|
||||
/// <summary>
|
||||
/// Classification of item.
|
||||
/// </summary>
|
||||
public readonly FieldItemKind Kind;
|
||||
|
||||
public FieldItemDefinition(ushort id, ushort dig, ushort pick, string name, FieldItemKind kind)
|
||||
{
|
||||
Index = id;
|
||||
Dig = dig;
|
||||
Pick = pick;
|
||||
Name = name;
|
||||
Kind = kind;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// When the field item is picked up, this is the held item ID.
|
||||
/// </summary>
|
||||
|
||||
@@ -2,23 +2,8 @@
|
||||
|
||||
namespace NHSE.Core;
|
||||
|
||||
public class EventFlagHouse : INamedValue
|
||||
public sealed record EventFlagHouse(short DefaultValue, short MaxValue, ushort Index, string Name) : INamedValue
|
||||
{
|
||||
// these are actually unsigned
|
||||
public readonly short DefaultValue;
|
||||
public readonly short MaxValue;
|
||||
|
||||
public ushort Index { get; }
|
||||
public string Name { get; }
|
||||
|
||||
public EventFlagHouse(short init, short max, ushort index, string name)
|
||||
{
|
||||
Name = name;
|
||||
Index = index;
|
||||
DefaultValue = init;
|
||||
MaxValue = max;
|
||||
}
|
||||
|
||||
public static readonly IReadOnlyDictionary<ushort, EventFlagHouse> List = new Dictionary<ushort, EventFlagHouse>
|
||||
{
|
||||
{0x001, new EventFlagHouse(0, 1 , 0001, "HouseOrder1" )}, // テント→6x6増築申込
|
||||
|
||||
@@ -2,23 +2,8 @@
|
||||
|
||||
namespace NHSE.Core;
|
||||
|
||||
public class EventFlagLand : INamedValue
|
||||
public sealed record EventFlagLand(short DefaultValue, short MaxValue, ushort Index, string Name) : INamedValue
|
||||
{
|
||||
// these are actually unsigned
|
||||
public readonly short DefaultValue;
|
||||
public readonly short MaxValue;
|
||||
|
||||
public ushort Index { get; }
|
||||
public string Name { get; }
|
||||
|
||||
public EventFlagLand(short init, short max, ushort index, string name)
|
||||
{
|
||||
Name = name;
|
||||
Index = index;
|
||||
DefaultValue = init;
|
||||
MaxValue = max;
|
||||
}
|
||||
|
||||
public static readonly IReadOnlyDictionary<ushort, EventFlagLand> List = new Dictionary<ushort, EventFlagLand>
|
||||
{
|
||||
{0x000, new EventFlagLand(0 , 1 , 0000, "TodayCreateVillage" )}, // 今日村作成されたか
|
||||
|
||||
@@ -3,23 +3,8 @@
|
||||
|
||||
namespace NHSE.Core;
|
||||
|
||||
public class EventFlagPlayer : INamedValue
|
||||
public sealed record EventFlagPlayer(short DefaultValue, short MaxValue, ushort Index, string Name) : INamedValue
|
||||
{
|
||||
// these are actually unsigned
|
||||
public readonly short DefaultValue;
|
||||
public readonly short MaxValue;
|
||||
|
||||
public ushort Index { get; }
|
||||
public string Name { get; }
|
||||
|
||||
public EventFlagPlayer(short init, short max, ushort index, string name)
|
||||
{
|
||||
Name = name;
|
||||
Index = index;
|
||||
DefaultValue = init;
|
||||
MaxValue = max;
|
||||
}
|
||||
|
||||
public static readonly IReadOnlyDictionary<ushort, EventFlagPlayer> List = new Dictionary<ushort, EventFlagPlayer>
|
||||
{
|
||||
{0x002, new EventFlagPlayer(0 , 9 , 0002, "PrologueNpcHintCount" )}, // NPCの序盤ヒントをいくつまで聞いたか
|
||||
|
||||
@@ -3,22 +3,8 @@
|
||||
|
||||
namespace NHSE.Core;
|
||||
|
||||
public class EventFlagVillager : INamedValue
|
||||
public sealed record EventFlagVillager(short Value1, short Value2, ushort Index, string Name) : INamedValue
|
||||
{
|
||||
public readonly short Value1;
|
||||
public readonly short Value2;
|
||||
|
||||
public ushort Index { get; }
|
||||
public string Name { get; }
|
||||
|
||||
public EventFlagVillager(short v1, short v2, ushort index, string name)
|
||||
{
|
||||
Name = name;
|
||||
Index = index;
|
||||
Value1 = v1;
|
||||
Value2 = v2;
|
||||
}
|
||||
|
||||
public static readonly IReadOnlyDictionary<ushort, EventFlagVillager> List = new Dictionary<ushort, EventFlagVillager>
|
||||
{
|
||||
{0x000, new EventFlagVillager(0 , 200 , 0000, "NnpcHouseLoan" )}, // ローン返済カウント
|
||||
|
||||
@@ -2,22 +2,8 @@
|
||||
|
||||
namespace NHSE.Core;
|
||||
|
||||
public class EventFlagVillagerMemoryPlayer : INamedValue
|
||||
public sealed record EventFlagVillagerMemoryPlayer(byte Initial, byte Maximum, ushort Index, string Name) : INamedValue
|
||||
{
|
||||
public readonly byte Initial;
|
||||
public readonly byte Maximum;
|
||||
|
||||
public ushort Index { get; }
|
||||
public string Name { get; }
|
||||
|
||||
public EventFlagVillagerMemoryPlayer(byte init, byte max, ushort index, string name)
|
||||
{
|
||||
Name = name;
|
||||
Index = index;
|
||||
Initial = init;
|
||||
Maximum = max;
|
||||
}
|
||||
|
||||
public static readonly IReadOnlyDictionary<ushort, EventFlagVillagerMemoryPlayer> List = new Dictionary<ushort, EventFlagVillagerMemoryPlayer>
|
||||
{
|
||||
{0x00, new EventFlagVillagerMemoryPlayer(0 , 1 , 000, "TalkFreeMultiDayEventNow" )}, // (ボツ)今、期間型イベント用のFreeFを聞いたか?
|
||||
|
||||
Reference in New Issue
Block a user