move towards auto-import
This commit is contained in:
@ -1,34 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Globalization;
|
||||
|
||||
namespace StarsAssistant.Model;
|
||||
|
||||
public class Game (string gamePath, string baseName)
|
||||
{
|
||||
/// <summary>
|
||||
/// The base path in which all game files reside.
|
||||
/// </summary>
|
||||
public string GamePath { get; private set; } = gamePath;
|
||||
|
||||
/// <summary>
|
||||
/// The base name without extensions of your game, inside the GamePath folder.
|
||||
/// All dependant files are resolved using this name.
|
||||
/// </summary>
|
||||
public string BaseName { get; private set; } = baseName;
|
||||
|
||||
/// <summary>
|
||||
/// The number of the player, for example identifying the pxx planet file.
|
||||
/// </summary>
|
||||
public int PlayerId { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Combine into the DatabaseName
|
||||
/// </summary>
|
||||
public string DatabaseName => Path.Combine(GamePath, $"{BaseName}.sqlite");
|
||||
|
||||
/// <summary>
|
||||
/// Search for Planet files using this pattern, will give you all pxx files.
|
||||
/// </summary>
|
||||
public string PlanetFileSearchPattern => Path.Combine(GamePath, $"{BaseName}.p*");
|
||||
|
||||
}
|
@ -22,6 +22,8 @@ public class Race
|
||||
|
||||
public bool PlayerRace { get; set; } = false;
|
||||
|
||||
public int? PlayerFileId { get; set; }
|
||||
|
||||
public int? ColonistsPerResource { get; set; }
|
||||
|
||||
public int? GrowthRatePercent { get; set; }
|
||||
|
@ -37,7 +37,7 @@ public class StarsDatabase(string DbPath) : DbContext
|
||||
/// <summary>
|
||||
/// The record with all game metadata, will only contain a single line at all times.
|
||||
/// </summary>
|
||||
public DbSet<Game> Game { get; set; }
|
||||
// public DbSet<Game> Game { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
Reference in New Issue
Block a user