Oxide.Rust icon indicating copy to clipboard operation
Oxide.Rust copied to clipboard

More performant o.plugins

Open Tryhard999 opened this issue 1 year ago • 1 comments

Reduced allocations and overheard from running the O.plugins command, useful for RCON tools and such that might run it often

Tryhard999 avatar Dec 16 '23 20:12 Tryhard999

I'm not opposed to changing the way this command works but I feel like we can make it a little bit more readable and clean it up using StringBuilder.AppendFormat for example:

output.AppendLine();
output.AppendFormat(string.Format("  {0} \"{1}\" ({2}) by {3} ({4}s) - {5}", pluginCount++.ToString("00"), plugin.Title, plugin.Version, plugin.Author, plugin.TotalHookTime.ToString("0.00"), plugin.Filename.Basename()));

MrBlue avatar Jan 29 '24 05:01 MrBlue