This commit is contained in:
Arvkus 2020-09-11 14:58:46 +03:00
parent 8e965e6065
commit ed08916c7a
10 changed files with 36 additions and 23 deletions

2
.vscode/build.bat vendored
View file

@ -1,7 +1,7 @@
echo off
REM remove unnecessary assemblies
DEL .\*\Assemblies\*.*
REM DEL .\*\Assemblies\*.*
REM build dll
dotnet build .vscode

16
.vscode/launch.json vendored
View file

@ -10,11 +10,25 @@
"request": "launch",
"preLaunchTask": "build dll",
"args": [],
"program": "../../RimWorldWin64.exe",
"program": "../../RimWorldWin64.exe",
"cwd": "${workspaceFolder}",
"console": "internalConsole",
"internalConsoleOptions":"neverOpen",
"stopAtEntry": true
},
{ // ignore
"name": ".NET Framework Attach",
"type": "clr",
"request": "attach",
"processId": "${command:pickProcess}",
"symbolOptions": {
"searchPaths": [
".vscode/obj/Debug/*"
],
"searchMicrosoftSymbolServer": false,
"searchNuGetOrgSymbolServer": false
}
}
]
}

10
.vscode/mod.csproj vendored
View file

@ -7,10 +7,12 @@
<!-- Modify [RootNamespace], [AssemblyName], [OutputPath], [VersionPrefix] -->
<RootNamespace>Template</RootNamespace>
<AssemblyName>Template</AssemblyName>
<OutputPath>../1.1/Assemblies</OutputPath>
<OutputPath>../1.2/Assemblies</OutputPath>
<VersionPrefix>1.0.0.0</VersionPrefix>
<!-- pdb file generation -->
<DebugType>none</DebugType>
<DebugSymbols>false</DebugSymbols>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
@ -25,10 +27,8 @@
</Reference>
<!-- Harmony -->
<!--
<Reference Include="../../Harmony/v1.1/Assemblies/0Harmony.dll">
<!-- <Reference Include="../../Harmony/v1.1/Assemblies/0Harmony.dll">
<Private>False</Private>
</Reference>
-->
</Reference> -->
</ItemGroup>
</Project>

3
.vscode/tasks.json vendored
View file

@ -8,7 +8,8 @@
"kind": "build",
"isDefault": true
},
"command": ".vscode/build.bat",
// "command": ".vscode/build.bat",
"command": "dotnet build .vscode"
},
]
}

BIN
1.2/Assemblies/Template.dll Normal file

Binary file not shown.

View file

@ -3,8 +3,8 @@
<name>Arvkus Mod Template</name>
<author>Arvkus</author>
<supportedVersions>
<li>1.1</li>
<li>1.2</li>
</supportedVersions>
<packageId>Arvkus.Rimworld.ModTemplate</packageId>
<packageId>Arvkus.Rimworld.ModTemplate2</packageId>
<description>Template</description>
</ModMetaData>

View file

@ -25,25 +25,23 @@ namespace Template
public static LetterDef success_letter;
}
[StaticConstructorOnStartup]
public static class Start
{
static Start()
{
Log.Message("Mod template: success");
}
}
public class MyMapComponent : MapComponent
{
public MyMapComponent(Map map) : base(map)
{
}
public MyMapComponent(Map map) : base(map){}
public override void FinalizeInit()
{
Messages.Message("Success", null, MessageTypeDefOf.PositiveEvent);
Find.LetterStack.ReceiveLetter("Success", TemplateDefOf.success_letter.description, TemplateDefOf.success_letter, null);
}
}
[StaticConstructorOnStartup]
public static class Start
{
static Start() // quick debug
{
Log.Message("Mod init");
}
}
}