diff --git a/OpenRA.Game/GameRules/Rules.cs b/OpenRA.Game/GameRules/Rules.cs index 2b6842ff01..1215311c6e 100755 --- a/OpenRA.Game/GameRules/Rules.cs +++ b/OpenRA.Game/GameRules/Rules.cs @@ -25,7 +25,6 @@ namespace OpenRA public static Dictionary Music; public static Dictionary Movies; public static Dictionary TileSets; - public static Dictionary PackageContents; public static void LoadRules(Manifest m, Map map) { @@ -36,7 +35,6 @@ namespace OpenRA Notifications = LoadYamlRules(m.Notifications, map.Notifications, (k, _) => new SoundInfo(k.Value)); Music = LoadYamlRules(m.Music, new List(), (k, _) => new MusicInfo(k.Key, k.Value)); Movies = LoadYamlRules(m.Movies, new List(), (k, v) => k.Value.Value); - PackageContents = LoadYamlRules(m.PackageContents, new List(), (k, v) => k.Value.Value); TileSets = new Dictionary(); foreach (var file in m.TileSets) diff --git a/OpenRA.Mods.RA/Widgets/Logic/AssetBrowserLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/AssetBrowserLogic.cs index 91da7972ee..63e0b3170a 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/AssetBrowserLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/AssetBrowserLogic.cs @@ -44,7 +44,6 @@ namespace OpenRA.Mods.RA.Widgets.Logic sourceDropdown.OnMouseDown = _ => ShowSourceDropdown(sourceDropdown); sourceDropdown.GetText = () => AssetSource == SourceType.Folders ? "Folders" : AssetSource == SourceType.Packages ? "Packages" : "None"; - sourceDropdown.Disabled = !Rules.PackageContents.Keys.Any(); spriteImage = panel.Get("SPRITE"); @@ -234,9 +233,9 @@ namespace OpenRA.Mods.RA.Widgets.Logic assetList.RemoveChildren(); AvailableShps.Clear(); - if (AssetSource == SourceType.Folders) + foreach (var folder in FileSystem.FolderPaths) { - foreach (var folder in FileSystem.FolderPaths) + if (AssetSource == SourceType.Folders) { if (Directory.Exists(folder)) { @@ -248,14 +247,27 @@ namespace OpenRA.Mods.RA.Widgets.Logic } } } - } - - if (AssetSource == SourceType.Packages) - foreach (var hiddenFile in Rules.PackageContents.Keys) + else if (AssetSource == SourceType.Packages) { - AddAsset(assetList, hiddenFile, template); - AvailableShps.Add(hiddenFile); + if (Directory.Exists(folder)) + { + var mixs = Directory.GetFiles(folder, "*.mix"); + foreach (var mix in mixs) + { + var package = new MixFile(mix, 0); + foreach (string hiddenFile in package.AllFileNames()) + { + if (hiddenFile.Contains("shp")) + { + AddAsset(assetList, hiddenFile, template); + AvailableShps.Add(hiddenFile); + } + } + } + } } + } } + } } diff --git a/global mix database.dat b/global mix database.dat new file mode 100644 index 0000000000..6c7259f768 Binary files /dev/null and b/global mix database.dat differ diff --git a/mods/cnc/mod.yaml b/mods/cnc/mod.yaml index 9b6a4fa3fb..a306881e58 100644 --- a/mods/cnc/mod.yaml +++ b/mods/cnc/mod.yaml @@ -29,8 +29,6 @@ Packages: ~scores2.mix ~transit.mix -PackageContents: - Rules: mods/cnc/rules/defaults.yaml mods/cnc/rules/system.yaml diff --git a/mods/d2k/mod.yaml b/mods/d2k/mod.yaml index dbebb7c280..f34fc4a7ac 100644 --- a/mods/d2k/mod.yaml +++ b/mods/d2k/mod.yaml @@ -21,8 +21,6 @@ Packages: ~main.mix conquer.mix -PackageContents: - Rules: mods/d2k/rules/system.yaml mods/d2k/rules/defaults.yaml diff --git a/mods/ra/mix/conquer.yaml b/mods/ra/mix/conquer.yaml deleted file mode 100644 index 83bba64bc1..0000000000 --- a/mods/ra/mix/conquer.yaml +++ /dev/null @@ -1,227 +0,0 @@ -# conquer.mix filename list for the game asset browser -#appear1.aud: -#beepy6.aud: -#briefing.aud: -#clock1.aud: -#country1.aud: -#country4.aud: -#keystrok.aud: -#mapwipe2.aud: -#mapwipe5.aud: -#scold1.aud: -#sfx4.aud: -#toney10.aud: -#toney4.aud: -#toney7.aud: -#type.fnt: -#alibackh.pcx: -#sovback.pcx: -120mm.shp: -1tnk.shp:light tank -2tnk.shp:medium tank -3tnk.shp:heavy tank -4tnk.shp:mammoth tank -50cal.shp: -afld.shp: -afldmake.shp: -agun.shp: -agunmake.shp: -apc.shp: -apwr.shp: -apwrmake.shp: -armor.shp: -art-exp1.shp: -arty.shp: -atek.shp: -atekmake.shp: -atomicdn.shp: -atomicup.shp: -atomsfx.shp: -badr.shp: -bar3bhr.shp: -bar3blu.shp: -bar3red.shp: -bar3rhr.shp: -barb.shp: -barl.shp: -barr.shp: -barrmake.shp: -bio.shp: -biomake.shp: -bomb.shp: -bomblet.shp: -brik.shp: -brl3.shp: -burn-l.shp: -burn-m.shp: -burn-s.shp: -ca.shp: -chronbox.shp: -countrya.shp: -countrye.shp: -credsa.shp: -credsahr.shp: -credsu.shp: -credsuhr.shp: -cycl.shp: -dd.shp: -deviator.shp: -dog.shp: -dogbullt.shp: -dollar.shp: -dome.shp: -domemake.shp: -dragon.shp: -earth.shp: -ebtn-dn.shp: -electdog.shp: -empulse.shp: -fact.shp: -factmake.shp: -fb1.shp: -fb2.shp: -fball1.shp: -fcom.shp: -fenc.shp: -fire1.shp: -fire2.shp: -fire3.shp: -fire4.shp: -fix.shp: -fixmake.shp: -flagfly.shp: -flak.shp: -flmspt.shp: -fpls.shp: -fpower.shp: -frag1.shp: -ftnk.shp: -ftur.shp: -fturmake.shp: -gap.shp: -gapmake.shp: -gpsbox.shp: -gun.shp: -gunfire.shp: -gunmake.shp: -h2o_exp1.shp: -h2o_exp2.shp: -h2o_exp3.shp: -harv.shp: -heli.shp: -hind.shp: -hisc1-hr.shp: -hisc2-hr.shp: -hiscore1.shp: -hiscore2.shp: -hosp.shp: -hospmake.shp: -hpad.shp: -hpadmake.shp: -invulbox.shp: -invun.shp: -iron.shp: -ironmake.shp: -jeep.shp: -kenn.shp: -kennmake.shp: -litning.shp: -lrotor.shp: -lst.shp: -mcv.shp: -mgg.shp: -mgun.shp: -mhq.shp: -mig.shp: -mine.shp: -minigun.shp: -minp.shp: -minpmake.shp: -minv.shp: -minvmake.shp: -miss.shp: -missile.shp: -missile2.shp: -mlrs.shp: -mnly.shp: -mrj.shp: -napalm1.shp: -napalm2.shp: -napalm3.shp: -orca.shp: -parabomb.shp: -parabox.shp: -parach.shp: -patriot.shp: -pbox.shp: -pboxmake.shp: -pdox.shp: -pdoxmake.shp: -piff.shp: -piffpiff.shp: -powr.shp: -powrmake.shp: -pt.shp: -pumpmake.shp: -radarfrm.shp: -rapid.shp: -rrotor.shp: -sam.shp: -samfire.shp: -sammake.shp: -sbag.shp: -scrate.shp: -select.shp: -repair.shp: -shadow.shp: -silo.shp: -silomake.shp: -smig.shp: -smoke_m.shp: -smokey.shp: -smokland.shp: -sonarbox.shp: -speed.shp: -spen.shp: -spenmake.shp: -sputdoor.shp: -sputnik.shp: -ss.shp: -ssam.shp: -stealth2.shp: -stek.shp: -stekmake.shp: -stnk.shp: -syrd.shp: -syrdmake.shp: -tent.shp: -tentmake.shp: -time.shp: -timehr.shp: -tquake.shp: -tran.shp: -truk.shp: -tsla.shp: -tslamake.shp: -turr.shp: -twinkle1.shp: -twinkle2.shp: -twinkle3.shp: -u2.shp: -v19.shp: -v2.shp: -v2rl.shp: -veh-hit1.shp: -veh-hit2.shp: -wake.shp: -wcrate.shp: -weap.shp: -weap2.shp: -weapmake.shp: -wood.shp: -wwcrate.shp: -yak.shp: -#trans.icn: -#ali-tran.wsa: -#mltiplyr.wsa: -#sov-tran.wsa: \ No newline at end of file diff --git a/mods/ra/mix/hires.yaml b/mods/ra/mix/hires.yaml deleted file mode 100644 index 61bf1bcb3e..0000000000 --- a/mods/ra/mix/hires.yaml +++ /dev/null @@ -1,135 +0,0 @@ -# hires.mix filename list for the game asset browser -1tnkicon.shp: -2tnkicon.shp: -3tnkicon.shp: -4tnkicon.shp: -afldicon.shp: -agunicon.shp: -apcicon.shp: -apwricon.shp: -artyicon.shp: -atekicon.shp: -atomicon.shp: -badricon.shp: -barricon.shp: -brikicon.shp: -btn-dn.shp: -btn-pl.shp: -btn-st.shp: -btn-up.shp: -c1.shp: -c2.shp: -caicon.shp: -camicon.shp: -chan.shp: -clock.shp: -dd-bkgnd.shp: -dd-botm.shp: -dd-crnr.shp: -dd-edge.shp: -dd-left.shp: -dd-right.shp: -dd-top.shp: -ddicon.shp: -delphi.shp: -dogicon.shp: -domeicon.shp: -domficon.shp: -e1.shp: -e1icon.shp: -e2.shp: -e2icon.shp: -e3.shp: -e3icon.shp: -e4.shp: -e4icon.shp: -e5.shp: -e6.shp: -e6icon.shp: -e7.shp: -e7icon.shp: -einstein.shp: -facficon.shp: -facticon.shp: -fencicon.shp: -fixicon.shp: -fturicon.shp: -gapicon.shp: -gnrl.shp: -gpssicon.shp: -gunicon.shp: -harvicon.shp: -hboxicon.shp: -heliicon.shp: -hindicon.shp: -hpadicon.shp: -infxicon.shp: -ironicon.shp: -jeepicon.shp: -kennicon.shp: -lsticon.shp: -map.shp: -mcvicon.shp: -medi.shp: -mediicon.shp: -mggicon.shp: -migicon.shp: -mnlyicon.shp: -mrjicon.shp: -msloicon.shp: -natoradr.shp: -nradrfrm.shp: -pbmbicon.shp: -pboxicon.shp: -pdoxicon.shp: -pinficon.shp: -pips.shp: -power.shp: -powerbar.shp: -powricon.shp: -procicon.shp: -pticon.shp: -pulse.shp: -repair.shp: -samicon.shp: -sbagicon.shp: -sell.shp: -side1na.shp: -side1us.shp: -side2na.shp: -side2us.shp: -side3na.shp: -side3us.shp: -#sidebar.shp:will crash -siloicon.shp: -smigicon.shp: -sonricon.shp: -speficon.shp: -spenicon.shp: -spy.shp: -spyicon.shp: -ssicon.shp: -stekicon.shp: -strip.shp: -stripdn.shp: -stripna.shp: -stripup.shp: -stripus.shp: -syrdicon.shp: -syrficon.shp: -tabs.shp: -tenticon.shp: -thf.shp: -thficon.shp: -tranicon.shp: -trukicon.shp: -tslaicon.shp: -u2icon.shp: -uradrfrm.shp: -ussrradr.shp: -v2rlicon.shp: -warpicon.shp: -weaficon.shp: -weapicon.shp: -yakicon.shp: -#mouse.shp:Dune II format \ No newline at end of file diff --git a/mods/ra/mod.yaml b/mods/ra/mod.yaml index 76cb2a1749..fc3c76de28 100644 --- a/mods/ra/mod.yaml +++ b/mods/ra/mod.yaml @@ -29,10 +29,6 @@ Packages: ~movies1.mix ~movies2.mix -PackageContents: - mods/ra/mix/conquer.yaml - mods/ra/mix/hires.yaml - Rules: mods/ra/rules/defaults.yaml mods/ra/rules/system.yaml