This commit is contained in:
Arvkus 2020-07-27 23:00:37 +03:00
parent 24d25676c8
commit 4f0a452ab5
8 changed files with 39 additions and 12 deletions

8
.gitignore vendored
View file

@ -1,6 +1,2 @@
Source/obj
1.0/Assemblies
1.1/Assemblies
1.2/Assemblies
1.3/Assemblies
1.4/Assemblies
/Source/obj
/*/Assemblies

10
.vscode/build.bat vendored Normal file
View file

@ -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

0
.vscode/build.sh vendored Normal file
View file

5
.vscode/launch.json vendored
View file

@ -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
},
]

2
.vscode/tasks.json vendored
View file

@ -8,7 +8,7 @@
"kind": "build",
"isDefault": true
},
"command": "dotnet build Source \n del Source/obj -r",
"command": ".\\.vscode\\build.bat",
},
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 300 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View file

@ -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

View file

@ -4,6 +4,7 @@
<TargetFramework>net472</TargetFramework>
<PlatformTarget>x64</PlatformTarget>
<!-- Modify these 3 variables to your needs -->
<RootNamespace>Template</RootNamespace>
<AssemblyName>Template</AssemblyName>
<OutputPath>../1.1/Assemblies</OutputPath>
@ -14,7 +15,8 @@
</PropertyGroup>
<ItemGroup>
<!-- C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\*.dll -->
<!-- [Windows] C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\*.dll -->
<!-- [Linux] -->
<Reference Include="../../../RimWorldWin64_Data/Managed/*.dll">
<Private>False</Private>
</Reference>