-
-
Notifications
You must be signed in to change notification settings - Fork 42
/
HEROsModModWorld.cs
44 lines (39 loc) · 1.06 KB
/
HEROsModModWorld.cs
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
41
42
43
44
using HEROsMod.HEROsModNetwork;
using HEROsMod.HEROsModServices;
using HEROsMod.UIKit;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using System;
using System.Collections.Generic;
using System.IO;
using Terraria;
using Terraria.DataStructures;
using Terraria.ModLoader;
using Terraria.ModLoader.IO;
using Terraria.UI;
namespace HEROsMod
{
internal class HEROsModModWorld : ModSystem
{
// public override bool Autoload(ref string name) => true;
//private const int saveVersion = 0;
// When a world is loaded on Server or client, we need to load settings.
public override void OnWorldLoad()
{
HEROsModNetwork.DatabaseController.InitializeWorld();
HEROsModNetwork.Network.InitializeWorld();
}
public override void SaveWorldData(TagCompound tag)
{
//if (Main.dedServ) // What about clients? do they save?
{
HEROsModNetwork.DatabaseController.SaveSetting();
}
}
public override void LoadWorldData(TagCompound tag)
{
// Just here to not upset ModSystem.ValidateType
}
}
}