1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. 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 Plugin Developer

    Use "||" as an or
    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