projectile info lookup the same way
This commit is contained in:
@@ -119,10 +119,7 @@ namespace OpenRA.GameRules
|
|||||||
// in this case, it's an implementation of IProjectileInfo
|
// in this case, it's an implementation of IProjectileInfo
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
var fullTypeName = typeof(IEffect).Namespace + "." + key + "Info";
|
Projectile = Game.CreateObject<IProjectileInfo>(key + "Info");
|
||||||
Projectile = (IProjectileInfo)typeof(IEffect).Assembly.CreateInstance(fullTypeName);
|
|
||||||
if (Projectile == null)
|
|
||||||
throw new InvalidOperationException("Cannot locate projectile type: {0}".F(key));
|
|
||||||
FieldLoader.Load(Projectile, kv.Value);
|
FieldLoader.Load(Projectile, kv.Value);
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user