/*In the OnTarget method*/
else if (targeted is Item && CheckUse(m_Decorator, from))
{
BaseHouse house = BaseHouse.FindHouseAt(from);
Item item = (Item)targeted;
bool isDecorableComponent = false;
if (m_Decorator.Command == DecorateCommand.Turn && IsKingsCollection(item))
{
isDecorableComponent = true;
}
else if (/*Include your item class here || */ item is AddonComponent || item is AddonContainerComponent || item is BaseAddonContainer)
{
object addon = null;
int count = 0;
/* Include your item class here
else */ if (item is AddonComponent)
{
AddonComponent component = (AddonComponent)item;
count = component.Addon.Components.Count;
addon = component.Addon;
}
else if (item is AddonContainerComponent)
{
AddonContainerComponent component = (AddonContainerComponent)item;
count = component.Addon.Components.Count;
addon = component.Addon;
}
else if (item is BaseAddonContainer)
{
BaseAddonContainer container = (BaseAddonContainer)item;
count = container.Components.Count;
addon = container;
}
if (count == 1 && Core.SE)
isDecorableComponent = true;
if (item is EnormousVenusFlytrapAddon)
isDecorableComponent = true;
if (m_Decorator.Command == DecorateCommand.Turn)
{
FlipableAddonAttribute[] attributes = (FlipableAddonAttribute[])addon.GetType().GetCustomAttributes(typeof(FlipableAddonAttribute), false);
if (attributes.Length > 0)
isDecorableComponent = true;
}
}