rimworld-mod-template/Source/Main.cs

45 lines
1.6 KiB
C#
Raw Normal View History

2020-06-20 10:23:14 +02:00
// ----------------------------------------------------------------------
// 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);
}
}
}