From e0dffc19ed78d963ee09f44e61dfed2af888b823 Mon Sep 17 00:00:00 2001 From: Arvkus Date: Mon, 27 Jul 2020 23:21:07 +0300 Subject: [PATCH] Harmony & directory fix --- .vscode/launch.json | 2 -- README.md | 4 ++-- Source/Main.cs | 38 +++++++++++++++++--------------------- Source/Mod.csproj | 9 ++++++--- 4 files changed, 25 insertions(+), 28 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 66b86fd..6cd389a 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -10,8 +10,6 @@ "request": "launch", "preLaunchTask": "build dll", "args": [], - // [Windows] C:/Program Files (x86)/Steam/steamapps/common/RimWorld/RimWorldWin64.exe - // [Linux] "program": "../../RimWorldWin64.exe", "cwd": "${workspaceFolder}", "console": "internalConsole", diff --git a/README.md b/README.md index 02cc0cb..3f37b84 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Rimworld mod template +# Rimworld Mod Template -This template is created for Rimworld modders who don't want to use Visual Studio Code Community IDE. +This template is created for Rimworld moders who don't want to use Visual Studio Code Community IDE. ### Why Visual Studio Code? diff --git a/Source/Main.cs b/Source/Main.cs index e7df42c..4b01d1b 100644 --- a/Source/Main.cs +++ b/Source/Main.cs @@ -1,28 +1,24 @@ -// ---------------------------------------------------------------------- -// These are basic usings. Always let them be here. -// ---------------------------------------------------------------------- -using System; +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 UnityEngine; +using Verse; +using Verse.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 +using Verse.Sound; +using Verse.Noise; +using Verse.Grammar; +using RimWorld; +using RimWorld.Planet; +//using System.Reflection; +//using HarmonyLib; namespace Template { - [DefOf] public class TemplateDefOf { @@ -31,14 +27,14 @@ namespace Template public class MyMapComponent : MapComponent { - public MyMapComponent(Map map) : base(map) + public MyMapComponent(Map map) : base(map) { - } + } - public override void FinalizeInit() - { + public override void FinalizeInit() + { Messages.Message("Success", null, MessageTypeDefOf.PositiveEvent); - Find.LetterStack.ReceiveLetter("Success", TemplateDefOf.success_letter.description, TemplateDefOf.success_letter, null); - } + Find.LetterStack.ReceiveLetter("Success", TemplateDefOf.success_letter.description, TemplateDefOf.success_letter, null); + } } } diff --git a/Source/Mod.csproj b/Source/Mod.csproj index 9227135..8592695 100644 --- a/Source/Mod.csproj +++ b/Source/Mod.csproj @@ -4,7 +4,7 @@ net472 x64 - + Template Template ../1.1/Assemblies @@ -15,10 +15,13 @@ - - False +