Created
June 10, 2021 17:51
-
-
Save Wampa842/4944730bee4f874162ae806b03a61036 to your computer and use it in GitHub Desktop.
A collection of Visual Studio snippets for mod development for My Summer Car using MSC Loader Pro.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>mcl</Title> | |
<Shortcut>mcl</Shortcut> | |
<Description>Inserts ModConsole.Log(), or wraps selected code inside the method.</Description> | |
<Author>Wampa842</Author> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> | |
<SnippetType>SurroundsWith</SnippetType> | |
</SnippetTypes> | |
</Header> | |
<Snippet> | |
<Declarations> | |
<Literal Editable="false"> | |
<ID>ModConsole</ID> | |
<Function>SimpleTypeName(global::MSCLoader.ModConsole)</Function> | |
</Literal> | |
</Declarations> | |
<Code Language="csharp"> | |
<![CDATA[$ModConsole$.Log($selected$$end$);]]> | |
</Code> | |
</Snippet> | |
</CodeSnippet> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>mclw</Title> | |
<Shortcut>mclw</Shortcut> | |
<Description>Inserts ModConsole.LogWarning(), or wraps selected code inside the method.</Description> | |
<Author>Wampa842</Author> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> | |
<SnippetType>SurroundsWith</SnippetType> | |
</SnippetTypes> | |
</Header> | |
<Snippet> | |
<Declarations> | |
<Literal Editable="false"> | |
<ID>ModConsole</ID> | |
<Function>SimpleTypeName(global::MSCLoader.ModConsole)</Function> | |
</Literal> | |
</Declarations> | |
<Code Language="csharp"> | |
<![CDATA[$ModConsole$.LogWarning($selected$$end$);]]> | |
</Code> | |
</Snippet> | |
</CodeSnippet> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>mcle</Title> | |
<Shortcut>mcle</Shortcut> | |
<Description>Inserts ModConsole.LogError(), or wraps selected code inside the method.</Description> | |
<Author>Wampa842</Author> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> | |
<SnippetType>SurroundsWith</SnippetType> | |
</SnippetTypes> | |
</Header> | |
<Snippet> | |
<Declarations> | |
<Literal Editable="false"> | |
<ID>ModConsole</ID> | |
<Function>SimpleTypeName(global::MSCLoader.ModConsole)</Function> | |
</Literal> | |
</Declarations> | |
<Code Language="csharp"> | |
<![CDATA[$ModConsole$.LogError($selected$$end$);]]> | |
</Code> | |
</Snippet> | |
</CodeSnippet> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>mclx</Title> | |
<Shortcut>mclx</Shortcut> | |
<Description>A try-catch block where the caught exception is passed to ModConsole.LogError().</Description> | |
<Author>Wampa842</Author> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> | |
<SnippetType>SurroundsWith</SnippetType> | |
</SnippetTypes> | |
</Header> | |
<Snippet> | |
<Declarations> | |
<Literal Editable="false"> | |
<ID>ModConsole</ID> | |
<Function>SimpleTypeName(global::MSCLoader.ModConsole)</Function> | |
</Literal> | |
<Literal> | |
<ID>exception</ID> | |
<ToolTip>Exception type</ToolTip> | |
<Function>SimpleTypeName(global::System.Exception)</Function> | |
</Literal> | |
</Declarations> | |
<Code Language="csharp"> | |
<![CDATA[try | |
{$selected$$end$ | |
} | |
catch ($exception$ ex) | |
{ | |
$ModConsole$.LogError(ex.ToString()); | |
}]]> | |
</Code> | |
</Snippet> | |
</CodeSnippet> | |
</CodeSnippets> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment