Skip to content

Commit

Permalink
refactor IsEditor field
Browse files Browse the repository at this point in the history
  • Loading branch information
eugene-doobu committed Jul 11, 2024
1 parent 6e1fcdf commit af597cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
5 changes: 3 additions & 2 deletions Lib9c/GameConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ namespace Nekoyume
{
public static class GameConfig
{
// ReSharper disable once ConvertToConstant.Global
#if LIB9C_DEV_EXTENSIONS || UNITY_EDITOR
public const bool IsEditor = true;
public static readonly bool IsEditor = true;
#else
public const bool IsEditor = false;
public static readonly bool IsEditor = false;
#endif

public const int SlotCount = 3;
Expand Down
5 changes: 0 additions & 5 deletions Lib9c/TableData/Item/ItemRequirementSheet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,8 @@ public class Row : SheetRow<int>
public override void Set(IReadOnlyList<string> fields)
{
ItemId = ParseInt(fields[0]);
#if UNITY_EDITOR
Level = GameConfig.IsEditor ? 1 : ParseInt(fields[1]);
MimisLevel = GameConfig.IsEditor ? 1 : ParseInt(fields[2]);
#else
Level = ParseInt(fields[1]);
MimisLevel = ParseInt(fields[2]);
#endif
}
}

Expand Down

0 comments on commit af597cf

Please sign in to comment.