1. Hey does anyone know how I could make it so that items of clothing that are not allowed to be warn together can be? Example: When you try and wear a Burlap Headwrap with a Bandana Mask, it puts one or the other in your inventory. Is there a way around this?
     
  2. Calytic

    Calytic Community Admin Community Mod

    Unlikely. It should technically be feasible but I would venture a guess that the rust client does not synchronize item occupation slots - as most item options, with a few exceptions, are not currently synchronized. In other words, you could change the item occupation slots on your server, however the players who join your server would not receive the modified item definitions and the mismatch would likely cause unexpected behavior or errors.

    In short, FacePunch could add this (relatively easily) and it's really up to them.
     
  3. I have been playing around with this back in 2015, it was possible without any hassles.
    Here's a ways:
    1. Using hook CanWearItem
    2. Replacing the delegate ItemContainer.canAcceptItem, like this:
    Code:
    player.inventory.containerWear.canAcceptItem = _ => true;
    In that way you probably can decide if some item can coexist with another.

    p.s Here's i've got:
    Imgur: The most awesome images on the Internet
     
  4. Something like:
    Code:
    using System.Collections.Generic;namespace Oxide.Plugins
    {
        [Info("Test Plugin", "DylanSMR", "1.0.0", ResourceId = 0)]
        [Description("Test Plugin")]
        class TestPlugin : RustPlugin
        {
            Dictionary<string, string> blacklisted = new Dictionary<string, string>()
            {
                {"item name","item name"},
            };
            bool CanWearItem(PlayerInventory inventory, Item item)
            {
                Item[] array = inventory.containerWear.itemList.ToArray();
                for(var i = 0; i < array.Length; i++)
                {
                    var itemMain = array[i];
                    foreach(var e in blacklisted)
                    {
                        if(e.Key == itemMain.name && e.Value == item.name)
                        {
                            return false;
                        }
                        if(e.Value == itemMain.name && e.Key == item.name)
                        {
                            return false;
                        }
                    }
                }
                return null;
            }
        }
    }
     
    Last edited by a moderator: Mar 25, 2017
  5. Calytic

    Calytic Community Admin Community Mod

    That's a smart workaround, though it doesn't actually change the item occupation slots.
     
  6. Oooh I misunderstood he question it seems. I thought he just wanted it so say he couldn't have a pair of jeans and like a hat on or something. My bad :p