-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathCensus.cs
More file actions
41 lines (36 loc) · 1.07 KB
/
Census.cs
File metadata and controls
41 lines (36 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System.IO;
using Terraria.ModLoader;
namespace Census
{
// TODO: sync WorldGen.prioritizedTownNPC and Main.townNPCCanSpawn[townNPCInfo.type] for MP clients.
// manual check button?
// cheat for heros mod.
internal class Census : Mod
{
public override void HandlePacket(BinaryReader reader, int whoAmI) {
CensusSystem.instance.HandlePacket(reader, whoAmI);
}
// string:"TownNPCCondition" - int:npcid - string:condition
public override object Call(params object[] args) {
if(CensusSystem.instance == null) {
Logger.Error("Call was called before CensusSystem class loaded. Make sure to only use Call during or after Mod.PostSetupContent.");
return "Failure";
}
return CensusSystem.instance.Call(args);
}
//public override void HandlePacket(BinaryReader reader, int whoAmI)
//{
// CensusMessageType msgType = (CensusMessageType)reader.ReadByte();
// switch (msgType)
// {
// default:
// ErrorLogger.Log("Census: Unknown Message type: " + msgType);
// break;
// }
//}
}
enum CensusMessageType : byte
{
CensusInfo
}
}