Solved Modify Assembly-CSharp

Discussion in 'Rust Development' started by Inofix, Sep 21, 2015.

  1. Hi,

    I'm trying to modify the server assembly-csharp.

    I'm looking for the save function, for example the server.save command. Does anyone know where i can find that method? Been looking for the past 30 minutes but I can't find it.

    Found it.

    SaveRestore.Save(string)
     
    Last edited by a moderator: Sep 21, 2015
  2. i use telerik justdecompile....

    loaded assembly-csharp, then i clicked search then i get one result for word "server.save":
    Code:
    public static void quit(ConsoleSystem.Arg args)
        {
            BasePlayer[] array = BasePlayer.activePlayerList.ToArray();
            for (int i = 0; i < (int)array.Length; i++)
            {
                array[i].Kick("Server Shutting Down");
            }
            ConsoleSystem.Run.Server.Normal("server.save", new object[0]);
            ConsoleSystem.Run.Server.Normal("server.writecfg", new object[0]);
            Net.sv.Stop("quit");
            Debug.Log("Quitting");
            Application.Quit();
        }
    *there u can see server.save in the middle of the code

    I am wondering, where can u find the mentioned SaveRestore.Save(string) function?
     
  3. server.save is a console command, you should just search for Save.

    upload_2015-9-22_8-48-33.png

    Another option is looking for the code that is triggered by the console command. All the console commands are located under the ConVar namespace in Assembly-CSharp.dll, so if you'd go the Server class there you'd notice a method Save which calls SaveRestore.Save()

    upload_2015-9-22_8-47-48.png