Remove some global state dependence in ActorInfo.

Instead on relying on the global Game.ModData.ObjectCreator, this is passed in via a parameter.
This commit is contained in:
RoosterDragon
2015-11-20 21:21:12 +00:00
committed by Oliver Brakmann
parent c7249e6fa6
commit 0caffa8196
4 changed files with 14 additions and 21 deletions

View File

@@ -61,7 +61,7 @@ namespace OpenRA
using (new PerfTimer("Actors"))
actors = LoadYamlRules(actorCache, m.Rules,
map != null ? map.RuleDefinitions : NoMapRules,
(k, y) => new ActorInfo(k.Key.ToLowerInvariant(), k.Value, y));
(k, y) => new ActorInfo(Game.ModData.ObjectCreator, k.Key.ToLowerInvariant(), k.Value, y));
using (new PerfTimer("Weapons"))
weapons = LoadYamlRules(weaponCache, m.Weapons,