mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 16:02:55 +08:00
Move stable_config declaration, rename testscene
This commit is contained in:
parent
6e8a964c45
commit
3731e76b10
@ -39,7 +39,8 @@ namespace osu.Game.Tournament.IPC
|
|||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private StableInfo stableInfo { get; set; }
|
private StableInfo stableInfo { get; set; }
|
||||||
private const string STABLE_CONFIG = "tournament/stable.json";
|
|
||||||
|
public const string STABLE_CONFIG = "tournament/stable.json";
|
||||||
|
|
||||||
public Storage IPCStorage { get; private set; }
|
public Storage IPCStorage { get; private set; }
|
||||||
|
|
||||||
@ -166,6 +167,7 @@ namespace osu.Game.Tournament.IPC
|
|||||||
return stableInfo.StablePath.Value;
|
return stableInfo.StablePath.Value;
|
||||||
|
|
||||||
string stableInstallPath = string.Empty;
|
string stableInstallPath = string.Empty;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
List<Func<string>> stableFindMethods = new List<Func<string>>
|
List<Func<string>> stableFindMethods = new List<Func<string>>
|
||||||
@ -195,7 +197,6 @@ namespace osu.Game.Tournament.IPC
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void saveStableConfig(string path)
|
private void saveStableConfig(string path)
|
||||||
{
|
{
|
||||||
stableInfo.StablePath.Value = path;
|
stableInfo.StablePath.Value = path;
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using Newtonsoft.Json;
|
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
|
|
||||||
namespace osu.Game.Tournament.Models
|
namespace osu.Game.Tournament.Models
|
||||||
@ -14,6 +13,5 @@ namespace osu.Game.Tournament.Models
|
|||||||
public class StableInfo
|
public class StableInfo
|
||||||
{
|
{
|
||||||
public Bindable<string> StablePath = new Bindable<string>(string.Empty);
|
public Bindable<string> StablePath = new Bindable<string>(string.Empty);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -148,9 +148,9 @@ namespace osu.Game.Tournament
|
|||||||
if (stableInfo == null)
|
if (stableInfo == null)
|
||||||
stableInfo = new StableInfo();
|
stableInfo = new StableInfo();
|
||||||
|
|
||||||
if (storage.Exists(StableInfo.STABLE_CONFIG))
|
if (storage.Exists(FileBasedIPC.STABLE_CONFIG))
|
||||||
{
|
{
|
||||||
using (Stream stream = storage.GetStream(StableInfo.STABLE_CONFIG, FileAccess.Read, FileMode.Open))
|
using (Stream stream = storage.GetStream(FileBasedIPC.STABLE_CONFIG, FileAccess.Read, FileMode.Open))
|
||||||
using (var sr = new StreamReader(stream))
|
using (var sr = new StreamReader(stream))
|
||||||
{
|
{
|
||||||
stableInfo = JsonConvert.DeserializeObject<StableInfo>(sr.ReadToEnd());
|
stableInfo = JsonConvert.DeserializeObject<StableInfo>(sr.ReadToEnd());
|
||||||
|
Loading…
Reference in New Issue
Block a user