rimworld-mod-template/Source/Main.cs

48 lines
1,020 B
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-09-11 13:58:46 +02:00
public class MyMapComponent : MapComponent
2020-07-28 09:48:26 +02:00
{
2020-09-11 13:58:46 +02:00
public MyMapComponent(Map map) : base(map){}
public override void FinalizeInit()
2020-07-28 09:48:26 +02:00
{
2020-09-11 13:58:46 +02:00
Messages.Message("Success", null, MessageTypeDefOf.PositiveEvent);
Find.LetterStack.ReceiveLetter("Success", TemplateDefOf.success_letter.description, TemplateDefOf.success_letter, null);
2020-07-28 09:48:26 +02:00
}
}
2020-09-11 13:58:46 +02:00
[StaticConstructorOnStartup]
public static class Start
2020-06-20 10:23:14 +02:00
{
2020-09-11 13:58:46 +02:00
static Start() // quick debug
2020-07-27 22:21:07 +02:00
{
2020-09-11 13:58:46 +02:00
Log.Message("Mod init");
2020-07-27 22:21:07 +02:00
}
2020-06-20 10:23:14 +02:00
}
2020-09-11 13:58:46 +02:00
2020-06-20 10:23:14 +02:00
}