This commit is contained in:
Arvkus 2020-06-20 11:23:14 +03:00
commit 608b41247c
9 changed files with 127 additions and 0 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
Source/obj
Assemblies

19
.vscode/launch.json vendored Normal file
View file

@ -0,0 +1,19 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Rimworld Mod Project",
"type": "clr",
"request": "launch",
"preLaunchTask": "build dll",
"args": [],
"program": "C:/Program Files (x86)/Steam/steamapps/common/RimWorld/RimWorldWin64.exe",
"cwd": "${workspaceFolder}",
"console": "internalConsole",
"stopAtEntry": true
},
]
}

14
.vscode/tasks.json vendored Normal file
View file

@ -0,0 +1,14 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build dll",
"type": "shell",
"group": {
"kind": "build",
"isDefault": true
},
"command": "dotnet build 1.1/Source \n del 1.1/Source\\obj -r",
},
]
}

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<LetterDef>
<defName>success_letter</defName>
<color>(65, 200, 65)</color>
<flashColor>(85, 255, 85)</flashColor>
<flashInterval>6</flashInterval>
<bounce>false</bounce>
<arriveSound>LetterArrive_Good</arriveSound>
<description>If you can see this letter, then mod template is set up correctly.</description>
</LetterDef>
</Defs>

44
1.1/Source/Main.cs Normal file
View file

@ -0,0 +1,44 @@
// ----------------------------------------------------------------------
// These are basic usings. Always let them be here.
// ----------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
// ----------------------------------------------------------------------
// These are RimWorld-specific usings. Activate/Deactivate what you need:
// ----------------------------------------------------------------------
using UnityEngine; // Always needed
using Verse; // RimWorld universal objects are here (like 'Building')
using Verse.AI; // Needed when you do something with the AI
using Verse.AI.Group;
using Verse.Sound; // Needed when you do something with Sound
using Verse.Noise; // Needed when you do something with Noises
using RimWorld; // RimWorld specific functions are found here (like 'Building_Battery')
using RimWorld.Planet; // RimWorld specific functions for world creation
namespace Template
{
[DefOf]
public class TemplateDefOf
{
public static LetterDef success_letter;
}
public class MyMapComponent : MapComponent
{
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);
}
}
}

22
1.1/Source/Mod.csproj Normal file
View file

@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net472</TargetFramework>
<RootNamespace>Asthma.Gun</RootNamespace>
<AssemblyName>Template</AssemblyName>
<OutputPath>..\Assemblies\</OutputPath>
<PlatformTarget>x64</PlatformTarget>
<DebugType>none</DebugType>
<DebugSymbols>false</DebugSymbols>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\*.dll">
<Private>False</Private>
</Reference>
</ItemGroup>
</Project>

10
About/About.xml Normal file
View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<ModMetaData>
<name>Arvkus Mod Template</name>
<author>Arvkus</author>
<supportedVersions>
<li>1.1</li>
</supportedVersions>
<packageId>Arvkus.Rimworld.ModTemplate</packageId>
<description>Template</description>
</ModMetaData>

BIN
About/Preview.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 KiB

4
README.md Normal file
View file

@ -0,0 +1,4 @@
# Rimworld mod template for Visual Studio Code
## Rimworld version 1.1.2552 (64bit)
Command to build dll is `dotnet build source`