1. Oxide for Rust Legacy has been discontinued and is no longer supported. No updates or additions will be made, and Rust Legacy-specific plugin submissions will no longer be accepted. We recommend upgrading to the latest version of Rust as able.
    Dismiss Notice
  1. DC4

    DC4 Naked Wanderer

    Is it possible to track the movement of things in the desired slot?
     
  2. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    Pretty sure that'd mostly be handled client-side, so likely not.
     
  3. DC4

    DC4 Naked Wanderer

    Why not? I just need to get information if I let the player put MP5A4 in 1 active slot
     
  4. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    Because the client doesn't send every action to the server.
     
  5. DC4

    DC4 Naked Wanderer

    How can I not send?

    Code (Text):
    public static Inventory.Transfer[] Build(Inventory.Slot.KindFlags fallbackKindFlags)
    {
        if (!begun)
        {
            throw new InvalidOperationException();
        }
        Inventory.Transfer[] transferArray = new Inventory.Transfer[totalItemCount];
        int slotNumber = 0;
        foreach (KeyValuePair<int, Inventory.Report> pair in dict)
        {
            Inventory.Transfer transfer;
            Inventory.Report first = pair.Value;
            transfer.addition.Ident = (Datablock.Ident) first.datablock;
            int length = first.length;
            first = first.first;
            bool splittable = first.splittable;
            for (int i = 0; i < length; i++)
            {
                transfer.addition.SlotPreference = Inventory.Slot.Preference.Define(slotNumber, false, fallbackKindFlags);
                transfer.addition.UsesQuantity = Inventory.Uses.Quantity.Manual(first.amount);
                transfer.item = first.item;
                transferArray[slotNumber++] = transfer;
                Inventory.Report report2 = first;
                first = first.typeNext;
                if (!report2.Disposed)
                {
                    report2.Disposed = true;
                    report2.dumpNext = dump;
                    report2.first = (Inventory.Report) (report2.typeNext = null);
                    report2.datablock = null;
                    report2.item = null;
                    dump = report2;
                    dumpSize++;
                }
            }
        }
        dict.Clear();
        begun = false;
        return transferArray;
    }