rimworld-mod-template/Source/Main.cs

50 lines
1 KiB
C#
Raw Normal View History

2020-07-27 22:21:07 +02:00
using System;
2020-06-20 10:23:14 +02:00
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
2020-07-27 22:21:07 +02:00
using UnityEngine;
using Verse;
using Verse.AI;
2020-06-20 10:23:14 +02:00
using Verse.AI.Group;
2020-07-27 22:21:07 +02:00
using Verse.Sound;
using Verse.Noise;
using Verse.Grammar;
using RimWorld;
using RimWorld.Planet;
2020-06-20 10:23:14 +02:00
2020-07-27 22:21:07 +02:00
//using System.Reflection;
//using HarmonyLib;
2020-06-20 10:23:14 +02:00
namespace Template
{
[DefOf]
public class TemplateDefOf
{
public static LetterDef success_letter;
}
2020-07-28 09:48:26 +02:00
[StaticConstructorOnStartup]
public static class Start
{
static Start()
{
Log.Message("Mod template: success");
}
}
2020-06-20 10:23:14 +02:00
public class MyMapComponent : MapComponent
{
2020-07-27 22:21:07 +02:00
public MyMapComponent(Map map) : base(map)
2020-06-20 10:23:14 +02:00
{
2020-07-27 22:21:07 +02:00
}
2020-06-20 10:23:14 +02:00
2020-07-27 22:21:07 +02:00
public override void FinalizeInit()
{
2020-06-20 10:23:14 +02:00
Messages.Message("Success", null, MessageTypeDefOf.PositiveEvent);
2020-07-27 22:21:07 +02:00
Find.LetterStack.ReceiveLetter("Success", TemplateDefOf.success_letter.description, TemplateDefOf.success_letter, null);
}
2020-06-20 10:23:14 +02:00
}
}