less ../../../

git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1355 993157c7-ee19-0410-b2c4-bb4e9862e678
This commit is contained in:
(no author)
2007-07-26 08:20:39 +00:00
parent 87ab32acc8
commit cd70038a3c
9 changed files with 20 additions and 27 deletions

View File

@@ -41,7 +41,7 @@ namespace OpenRa.TechTree
IEnumerable<Tuple<string, string, bool>> Lines(string filename, bool param)
{
Regex pattern = new Regex(@"^(\w+),([\w ]+)$");
foreach (string s in File.ReadAllLines(filename))
foreach (string s in File.ReadAllLines("../../../" + filename))
{
Match m = pattern.Match(s);
if (m == null || !m.Success)
@@ -54,10 +54,10 @@ namespace OpenRa.TechTree
void LoadRules()
{
IniFile rulesFile = new IniFile(File.OpenRead("../../../rules.ini"));
IniFile rulesFile = new IniFile(FileSystem.Open("rules.ini"));
IEnumerable<Tuple<string, string, bool>> definitions = Concat(
Lines("../../../buildings.txt", true),
Lines("../../../units.txt", false));
Lines("buildings.txt", true),
Lines("units.txt", false));
foreach (Tuple<string, string, bool> p in definitions)
objects.Add(p.a, new Item(p.a, p.b, rulesFile.GetSection(p.a), p.c));