I want the advanced tool to move all addons not just some can someone please help me out? I am using the newest servUo repo! For example my advance tool will move a custom addon I made but it will not move a stone table addon that was already in the game!
 

Attachments

  • AdvanceInteriorDecorator.cs
    25.1 KB · Views: 16
correct but I know you can make it move addons because I have seen it on several shards but I can not get it to work on mine
 
Looking at the code it seems that addons are handled by the block following:
else if (!house.IsLockedDown(item) && !house.IsSecure(item) && !isDecorableComponent)
And there rest is all else if, so you need an exception to allow addons to reach the block that handles all the movement etc
 
ok, I will have to figure it out because we want to be able to move addons and I know it can be done just having a hard time getting it to work correctly.
 
C#:
/*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;
                        }
                    }
 
I too am on the hunt to make deco that can be nudged with the interior decorator tool. A few attempts to force the code to make an exception has failed. I'm going to make another attempt to solve it code side today.
 
I've made it operational again and separated the classes. A similar, nicely designed version already existed; I'll get that running again too. You can take a look if you like.

1713429134565.png

Colors should be better integrated; they could be expanded, along with the design of the gump, perhaps making it more modern, and other existing functions. A similar version existed before but had more features—I would need to search for it. There are now 3 classes.
 

Attachments

  • AdvanceInteriorDecorator.rar
    4.3 KB · Views: 0
Back