using System; using System.Collections.Generic; using System.IO; namespace Artemis.Core { /// /// A few useful constant values /// public static class Constants { /// /// The full path to the Artemis application folder /// public static readonly string ApplicationFolder = Path.GetDirectoryName(typeof(Constants).Assembly.Location)!; /// /// The full path to the Artemis executable /// public static readonly string ExecutablePath = Utilities.GetCurrentLocation(); /// /// The full path to the Artemis data folder /// public static readonly string DataFolder = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\Artemis\\"; /// /// The connection string used to connect to the database /// public static readonly string ConnectionString = $"FileName={DataFolder}\\database.db"; /// /// The plugin info used by core components of Artemis /// public static readonly PluginInfo CorePluginInfo = new PluginInfo { Guid = Guid.Parse("ffffffff-ffff-ffff-ffff-ffffffffffff"), Name = "Artemis Core" }; /// /// The plugin used by core components of Artemis /// public static readonly Plugin CorePlugin = new Plugin(CorePluginInfo, new DirectoryInfo(ApplicationFolder)); internal static readonly CorePluginFeature CorePluginFeature = new CorePluginFeature {Plugin = CorePlugin}; internal static readonly EffectPlaceholderPlugin EffectPlaceholderPlugin = new EffectPlaceholderPlugin {Plugin = CorePlugin}; /// /// A read-only collection containing all primitive numeric types /// public static IReadOnlyCollection NumberTypes = new List { typeof(sbyte), typeof(byte), typeof(short), typeof(ushort), typeof(int), typeof(uint), typeof(long), typeof(ulong), typeof(float), typeof(double), typeof(decimal) }; /// /// A read-only collection containing all primitive integral numeric types /// public static IReadOnlyCollection IntegralNumberTypes = new List { typeof(sbyte), typeof(byte), typeof(short), typeof(ushort), typeof(int), typeof(uint), typeof(long), typeof(ulong) }; /// /// A read-only collection containing all primitive floating-point numeric types /// public static IReadOnlyCollection FloatNumberTypes = new List { typeof(float), typeof(double), typeof(decimal) }; } }