Get all monuments

Discussion in 'Rust Development' started by Riddle, Aug 1, 2018.

  1. Nvm, got a better option
     
    Last edited by a moderator: Aug 1, 2018
  2. take a look into this, the foreach loop:
    Code:
    // ConVar.World
    [ClientVar]
    public static void monuments(ConsoleSystem.Arg arg)
    {
        if (!global::TerrainMeta.Path)
        {
            return;
        }
        TextTable textTable = new TextTable();
        textTable.AddColumn("type");
        textTable.AddColumn("name");
        textTable.AddColumn("pos");
        foreach (global::MonumentInfo current in global::TerrainMeta.Path.Monuments)
        {
            textTable.AddRow(new string[]
            {
                current.Type.ToString(),
                current.name,
                current.transform.position.ToString()
            });
        }
        arg.ReplyWith(textTable.ToString());
    }
    
     
  3. You can use that, cowboy

    foreach (var monument in UnityEngine.Object.FindObjectsOfType<MonumentInfo>())
    {
    // Garbage here
    }