You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
1.2 KiB
27 lines
1.2 KiB
using System.Collections.Generic; |
|
using System.IO; |
|
|
|
namespace ET |
|
{ |
|
public class ConfigLoader: IConfigLoader |
|
{ |
|
public void GetAllConfigBytes(Dictionary<string, byte[]> output) |
|
{ |
|
foreach (string file in Directory.GetFiles($"../Config", "*.bytes")) |
|
{ |
|
string key = Path.GetFileNameWithoutExtension(file); |
|
output[key] = File.ReadAllBytes(file); |
|
} |
|
output["StartMachineConfigCategory"] = File.ReadAllBytes($"../Config/{Game.Options.StartConfig}/StartMachineConfigCategory.bytes"); |
|
output["StartProcessConfigCategory"] = File.ReadAllBytes($"../Config/{Game.Options.StartConfig}/StartProcessConfigCategory.bytes"); |
|
output["StartSceneConfigCategory"] = File.ReadAllBytes($"../Config/{Game.Options.StartConfig}/StartSceneConfigCategory.bytes"); |
|
output["StartZoneConfigCategory"] = File.ReadAllBytes($"../Config/{Game.Options.StartConfig}/StartZoneConfigCategory.bytes"); |
|
} |
|
|
|
public byte[] GetOneConfigBytes(string configName) |
|
{ |
|
byte[] configBytes = File.ReadAllBytes($"../Config/{configName}.bytes"); |
|
return configBytes; |
|
} |
|
} |
|
} |