#region Copyright & License Information /* * Copyright 2007-2015 The OpenRA Developers (see AUTHORS) * This file is part of OpenRA, which is free software. It is made * available to you under the terms of the GNU General Public License * as published by the Free Software Foundation. For more information, * see COPYING. */ #endregion using System.Collections.Generic; using System.Linq; using OpenRA.GameRules; using OpenRA.Graphics; namespace OpenRA { public class Ruleset { public readonly IReadOnlyDictionary Actors; public readonly IReadOnlyDictionary Weapons; public readonly IReadOnlyDictionary Voices; public readonly IReadOnlyDictionary Notifications; public readonly IReadOnlyDictionary Music; public readonly IReadOnlyDictionary TileSets; public readonly IReadOnlyDictionary Sequences; public Ruleset( IDictionary actors, IDictionary weapons, IDictionary voices, IDictionary notifications, IDictionary music, IDictionary tileSets, IDictionary sequences) { Actors = new ReadOnlyDictionary(actors); Weapons = new ReadOnlyDictionary(weapons); Voices = new ReadOnlyDictionary(voices); Notifications = new ReadOnlyDictionary(notifications); Music = new ReadOnlyDictionary(music); TileSets = new ReadOnlyDictionary(tileSets); Sequences = new ReadOnlyDictionary(sequences); } public IEnumerable> InstalledMusic { get { return Music.Where(m => m.Value.Exists); } } } }