make C4 Demolition frozen actor aware

This commit is contained in:
Matthias Mailänder
2014-06-08 11:19:24 +02:00
parent 799966d376
commit ee0df9c1cb
4 changed files with 19 additions and 15 deletions

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2014 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,
@@ -14,7 +14,12 @@ using OpenRA.FileFormats;
namespace OpenRA.Mods.RA
{
[Desc("Handle demolitions from C4 explosives.")]
public class DemolishableInfo : TraitInfo<Demolishable> { }
public class DemolishableInfo : IDemolishableInfo, ITraitInfo
{
public bool IsValidTarget(ActorInfo actorInfo, Actor saboteur) { return true; }
public object Create(ActorInitializer init) { return new Demolishable(); }
}
public class Demolishable : IDemolishable
{