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. Ramil

    Ramil Scavenger

    if (inv != null && (!inv.activeItem?.datablock?.name?.Contains("Torch") ?? false))
    How Torch Rock and more item ?
     
  2. Jakkee

    Jakkee Scavenger Plugin Developer

    Use "||" as an or
    E.G:
    Code (Text):
    if (inv != null && !inv.activeItem?.datablock?.name?.Contains("Torch") ?? false || !inv.activeItem?.datablock?.name?.Contains("Rock") ?? false

    // Below would be better

    if (inv != null)
    {
        if (!inv.activeItem?.datablock?.name?.Contains("Torch") ?? false)
        {
            // Remove Torch
        }
        if (!inv.activeItem?.datablock?.name?.Contains("Rock") ?? false)
        {
            //Remove rock
        }
    }