-
-
Notifications
You must be signed in to change notification settings - Fork 35
/
WriteLine.cs
45 lines (40 loc) · 872 Bytes
/
WriteLine.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
45
using System;
namespace OTAPI.Callbacks.Terraria
{
internal partial class Console
{
internal static void WriteLine()
{
if (Hooks.Console.WriteLine?.Invoke(new ConsoleHookArgs()
{
Format = null,
Arg1 = null,
Arg2 = null
}) == HookResult.Cancel)
return;
System.Console.WriteLine();
}
internal static void WriteLine(string format, object arg0, object arg1)
{
if (Hooks.Console.WriteLine?.Invoke(new ConsoleHookArgs()
{
Format = format,
Arg1 = arg0,
Arg2 = arg1
}) == HookResult.Cancel)
return;
System.Console.WriteLine(format, arg0, arg1);
}
internal static void WriteLine(object value)
{
if (Hooks.Console.WriteLine?.Invoke(new ConsoleHookArgs()
{
Format = null,
Arg1 = value,
Arg2 = null
}) == HookResult.Cancel)
return;
System.Console.WriteLine(value);
}
}
}