-
Notifications
You must be signed in to change notification settings - Fork 1
/
API.cs
39 lines (28 loc) · 955 Bytes
/
API.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
using ResetMode.Data;
using System;
using Terraria;
namespace ResetMode {
public static partial class ResetModeAPI {
public static ResetModeSessionData GetSessionData() {
if( Main.netMode == 1 ) { throw new Exception( "Clients cannot call this." ); }
return ResetModeMod.Instance.Session.Data;
}
public static void SaveSessionDataChanges() {
if( Main.netMode == 1 ) { throw new Exception( "Clients cannot call this." ); }
var mymod = ResetModeMod.Instance;
mymod.Session.Save();
}
////////////////
public static bool StartSession() {
if( Main.netMode == 1 ) { throw new Exception( "Clients cannot call this." ); }
var mymod = ResetModeMod.Instance;
return mymod.Session.StartSession();
}
public static bool StopSession() {
if( Main.netMode == 1 ) { throw new Exception( "Clients cannot call this." ); }
var mymod = ResetModeMod.Instance;
mymod.Session.EndSession();
return true;
}
}
}