@@ -37,9 +37,10 @@ namespace OpenRA
|
|||||||
if (!Directory.Exists(dir))
|
if (!Directory.Exists(dir))
|
||||||
return noMaps;
|
return noMaps;
|
||||||
|
|
||||||
return Directory.GetDirectories(dir)
|
var dirsWithMaps = Directory.GetDirectories(dir)
|
||||||
.Concat(Directory.GetFiles(dir, "*.zip"))
|
.Where(d => Directory.GetFiles(d, "map.yaml").Any() && Directory.GetFiles(d, "map.bin").Any());
|
||||||
.Concat(Directory.GetFiles(dir, "*.oramap"));
|
|
||||||
|
return dirsWithMaps.Concat(Directory.GetFiles(dir, "*.oramap"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ModData(params string[] mods)
|
public ModData(params string[] mods)
|
||||||
@@ -52,7 +53,7 @@ namespace OpenRA
|
|||||||
LoadScreen.Display();
|
LoadScreen.Display();
|
||||||
WidgetLoader = new WidgetLoader(this);
|
WidgetLoader = new WidgetLoader(this);
|
||||||
|
|
||||||
AvailableMaps = FindMaps(Manifest.Mods);
|
AvailableMaps = FindMaps();
|
||||||
|
|
||||||
// HACK: Mount only local folders so we have a half-working environment for the asset installer
|
// HACK: Mount only local folders so we have a half-working environment for the asset installer
|
||||||
FileSystem.UnmountAll();
|
FileSystem.UnmountAll();
|
||||||
@@ -138,10 +139,9 @@ namespace OpenRA
|
|||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
Dictionary<string, Map> FindMaps(string[] mods)
|
Dictionary<string, Map> FindMaps()
|
||||||
{
|
{
|
||||||
var paths = mods.SelectMany(p => FindMapsIn("mods{0}{1}{0}maps{0}".F(Path.DirectorySeparatorChar, p)))
|
var paths = Manifest.Folders.SelectMany(f => FindMapsIn(f));
|
||||||
.Concat(mods.SelectMany(p => FindMapsIn("{1}maps{0}{2}{0}".F(Path.DirectorySeparatorChar, Platform.SupportDir, p))));
|
|
||||||
|
|
||||||
var ret = new Dictionary<string, Map>();
|
var ret = new Dictionary<string, Map>();
|
||||||
|
|
||||||
|
|||||||
@@ -8,8 +8,10 @@ Folders:
|
|||||||
.
|
.
|
||||||
./mods/cnc
|
./mods/cnc
|
||||||
./mods/cnc/bits
|
./mods/cnc/bits
|
||||||
|
./mods/cnc/maps
|
||||||
./mods/cnc/uibits
|
./mods/cnc/uibits
|
||||||
~^/Content/cnc
|
~^/Content/cnc
|
||||||
|
~^/maps/cnc
|
||||||
|
|
||||||
Packages:
|
Packages:
|
||||||
overrides.mix
|
overrides.mix
|
||||||
|
|||||||
@@ -8,11 +8,13 @@ Folders:
|
|||||||
.
|
.
|
||||||
./mods/d2k
|
./mods/d2k
|
||||||
./mods/d2k/bits
|
./mods/d2k/bits
|
||||||
|
./mods/d2k/maps
|
||||||
./mods/d2k/uibits
|
./mods/d2k/uibits
|
||||||
./mods/ra/uibits
|
./mods/ra/uibits
|
||||||
~^/Content/d2k
|
~^/Content/d2k
|
||||||
~^/Content/d2k/GAMESFX
|
~^/Content/d2k/GAMESFX
|
||||||
~^/Content/d2k/Music
|
~^/Content/d2k/Music
|
||||||
|
~^/maps/d2k
|
||||||
|
|
||||||
Packages:
|
Packages:
|
||||||
SOUND.RS
|
SOUND.RS
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
crate:
|
|
||||||
idle: DATA.R8
|
|
||||||
Start: 102
|
|
||||||
ZOffset: -511
|
|
||||||
Offset: -16,-16
|
|
||||||
land: DATA.R8
|
|
||||||
Start: 102
|
|
||||||
ZOffset: -511
|
|
||||||
Offset: -16,-16
|
|
||||||
|
|
||||||
spicebloom:
|
|
||||||
make: DATA.R8
|
|
||||||
Start: 107
|
|
||||||
Length: 3
|
|
||||||
Offset: -16,-16
|
|
||||||
active: DATA.R8
|
|
||||||
Start: 109
|
|
||||||
Length: 1
|
|
||||||
ZOffset: -511
|
|
||||||
Offset: -16,-16
|
|
||||||
idle: DATA.R8
|
|
||||||
Start: 109
|
|
||||||
ZOffset: -511
|
|
||||||
Offset: -16,-16
|
|
||||||
@@ -9,8 +9,10 @@ Folders:
|
|||||||
./mods/ra
|
./mods/ra
|
||||||
./mods/ra/bits
|
./mods/ra/bits
|
||||||
./mods/ra/bits/desert
|
./mods/ra/bits/desert
|
||||||
|
./mods/ra/maps
|
||||||
./mods/ra/uibits
|
./mods/ra/uibits
|
||||||
~^/Content/ra
|
~^/Content/ra
|
||||||
|
~^/maps/ra
|
||||||
|
|
||||||
Packages:
|
Packages:
|
||||||
~main.mix
|
~main.mix
|
||||||
|
|||||||
@@ -9,8 +9,10 @@ Folders:
|
|||||||
# Tiberian Sun
|
# Tiberian Sun
|
||||||
./mods/ts
|
./mods/ts
|
||||||
./mods/ts/bits
|
./mods/ts/bits
|
||||||
|
./mods/ts/maps
|
||||||
./mods/ts/uibits
|
./mods/ts/uibits
|
||||||
~^/Content/ts
|
~^/Content/ts
|
||||||
|
~^/maps/ts
|
||||||
# Red Alert
|
# Red Alert
|
||||||
./mods/ra/uibits
|
./mods/ra/uibits
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user