diff --git a/.gitignore b/.gitignore index 18fc395..d812ba7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,2 @@ -Source/obj -1.0/Assemblies -1.1/Assemblies -1.2/Assemblies -1.3/Assemblies -1.4/Assemblies \ No newline at end of file +/Source/obj +/*/Assemblies diff --git a/.vscode/build.bat b/.vscode/build.bat new file mode 100644 index 0000000..f9251e9 --- /dev/null +++ b/.vscode/build.bat @@ -0,0 +1,10 @@ +echo off + +REM remove unnecessary assemblies +DEL .\*\Assemblies\*.* + +REM build dll +dotnet build Source + +REM remove obj folder for less clutter +RMDIR /s /q Source\obj \ No newline at end of file diff --git a/.vscode/build.sh b/.vscode/build.sh new file mode 100644 index 0000000..e69de29 diff --git a/.vscode/launch.json b/.vscode/launch.json index 18c708e..66b86fd 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -10,9 +10,12 @@ "request": "launch", "preLaunchTask": "build dll", "args": [], - "program": "../../RimWorldWin64.exe", // C:/Program Files (x86)/Steam/steamapps/common/RimWorld/RimWorldWin64.exe + // [Windows] C:/Program Files (x86)/Steam/steamapps/common/RimWorld/RimWorldWin64.exe + // [Linux] + "program": "../../RimWorldWin64.exe", "cwd": "${workspaceFolder}", "console": "internalConsole", + "internalConsoleOptions":"neverOpen", "stopAtEntry": true }, ] diff --git a/.vscode/tasks.json b/.vscode/tasks.json index fc22f54..f29fa31 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -8,7 +8,7 @@ "kind": "build", "isDefault": true }, - "command": "dotnet build Source \n del Source/obj -r", + "command": ".\\.vscode\\build.bat", }, ] } \ No newline at end of file diff --git a/About/Preview.png b/About/Preview.png index d4e70eb..4517967 100644 Binary files a/About/Preview.png and b/About/Preview.png differ diff --git a/README.md b/README.md index 2a5a677..02cc0cb 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,20 @@ -# Rimworld mod template for Visual Studio Code -## Rimworld version 1.1.2552 (64bit) -Command to build dll is `dotnet build source` +# Rimworld mod template +This template is created for Rimworld modders who don't want to use Visual Studio Code Community IDE. + +### Why Visual Studio Code? + +[Visual Studio Code (VSC)](https://code.visualstudio.com/) is an lightweight text editor created by Microsoft. With the help of extensions it can become powerful IDE for developers on any platform. VSC doesn't have virtual folder system, so it's much easier to manage project's files and can be used with almost any programming language via the help of extensions. + +### Install +#### Windows +1. Download and install [.NET Core SDK](https://dotnet.microsoft.com/download/dotnet-core) and [.Net Framework 4.7.2 Developer Pack]( https://dotnet.microsoft.com/download/dotnet-framework/net472). This step can be skipped if you already have C# package from Visual Studio Community. +2. Instal [C# extension](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp). +3. Make sure to have this project inside Rimworld `Mods` folder. +4. Once you have all prerequisites open project folder with VSC and press `CTRL + F5`. If everything is okay Rimworld will boot and print `Mod template: success` inside Rimworld dev console, assuming this mod is enabled. +5. Modify `About.xml` and `Mod.csproj` files to match your mod name and version. + +#### Linux +1. ... + +#### Modify diff --git a/Source/Mod.csproj b/Source/Mod.csproj index 94fb213..9227135 100644 --- a/Source/Mod.csproj +++ b/Source/Mod.csproj @@ -4,6 +4,7 @@ net472 x64 + Template Template ../1.1/Assemblies @@ -14,7 +15,8 @@ - + + False