Skip to content

Commit 26990b2

Browse files
committed
style: rename files
1 parent 132c3fc commit 26990b2

File tree

13 files changed

+24
-27
lines changed

13 files changed

+24
-27
lines changed

src/OTAPI.UnifiedServerProcess.GlobalNetwork/Program.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ static void Main(string[] args) {
1919
Console.WriteLine(" Demonstration For Terraria v{0} & OTAPI v{1} ", version.TerrariaVersion, version.OTAPIVersion);
2020
Console.WriteLine("---------------------------------------------------------------------------------------------------");
2121

22-
Console.Write("[USP|Info] Waiting for servers instances creation... ");
22+
Console.Write("[USP|Info] Initializing... ");
2323
var spinner = new ConsoleSpinner(100);
2424
spinner.Start();
2525

@@ -28,7 +28,13 @@ static void Main(string[] args) {
2828
AppDomain.CurrentDomain.AssemblyResolve += ResolveHelpers.ResolveAssembly;
2929
Terraria.Program.SavePath = Platform.Get<IPathService>().GetStoragePath("Terraria");
3030
Terraria.Main.SkipAssemblyLoad = true;
31-
GlobalInitializer.InitializeEntryPoint();
31+
GlobalInitializer.Initialize();
32+
spinner.Stop();
33+
Console.WriteLine("- done.");
34+
35+
Console.Write("[USP|Info] Waiting for servers instances creation... ");
36+
spinner = new ConsoleSpinner(100);
37+
spinner.Start();
3238

3339
int port = 7777;
3440

src/OTAPI.UnifiedServerProcess.Test/Program.cs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,13 @@ static void Main(string[] args) {
1111
Terraria.Program.SavePath = Platform.Get<IPathService>().GetStoragePath("Terraria");
1212
Terraria.Main.SkipAssemblyLoad = true;
1313

14-
RootContext test;
15-
for (int i = 0; i < 1200; i++) {
16-
test = new RootContext("Test");
17-
}
14+
RootContext test = new RootContext("Test");
1815

19-
//test.Hooks.NetMessage.PlayerAnnounce += (sender, e) => {
20-
// Console.WriteLine("[USP] Player joined: " + test.Main.player[e.Plr].name);
21-
//};
16+
test.Hooks.NetMessage.PlayerAnnounce += (sender, e) => {
17+
Console.WriteLine("[USP] Player joined: " + test.Main.player[e.Plr].name);
18+
};
2219

23-
//test.Program.LaunchGame(args);
20+
test.Program.LaunchGame(args);
2421
}
2522
}
2623
}

src/OTAPI.UnifiedServerProcess/Constants.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public static class Constants
1313
public const string RootContextFullName = "UnifiedServerProcess.RootContext";
1414
public const string GlobalInitializerTypeName = "UnifiedServerProcess.GlobalInitializer";
1515
public const string InitializerAttributeTypeName = "UnifiedServerProcess.InitializerExtractFromAttribute";
16-
public const string GlobalInitializerEntryPointName = "InitializeEntryPoint";
16+
public const string GlobalInitializerEntryPointName = "Initialize";
1717

1818
public static class Modifiers
1919
{

src/OTAPI.UnifiedServerProcess/Core/Analysis/MethodCallAnalysis/MethodCallGraph.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
namespace OTAPI.UnifiedServerProcess.Core.Analysis.MethodCallAnalysis
1616
{
17-
public class MethodCallGraph : Analyzer, IMethodBehaivorFeature
17+
public class MethodCallGraph : Analyzer, IMethodImplementationFeature
1818
{
1919
public override string Name => "MethodCallGraph";
2020

src/OTAPI.UnifiedServerProcess/Core/Analysis/ParamModificationAnalysis/ParamModificationAnalyzer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
namespace OTAPI.UnifiedServerProcess.Core.Analysis.ParamModificationAnalysis
1818
{
19-
public class ParamModificationAnalyzer : Analyzer, IMethodBehaivorFeature
19+
public class ParamModificationAnalyzer : Analyzer, IMethodImplementationFeature
2020
{
2121
public sealed override string Name => "ParamModificationAnalyzer";
2222
public readonly ImmutableDictionary<string, ImmutableDictionary<int, ParamModifications>> ModifiedParameters;

src/OTAPI.UnifiedServerProcess/Core/Analysis/ParameterFlowAnalysis/ParameterFlowAnalyzer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
namespace OTAPI.UnifiedServerProcess.Core.Analysis.ParameterFlowAnalysis
1818
{
1919

20-
public sealed class ParameterFlowAnalyzer : Analyzer, IMethodBehaivorFeature
20+
public sealed class ParameterFlowAnalyzer : Analyzer, IMethodImplementationFeature
2121
{
2222
public readonly ImmutableDictionary<string, ParameterReferenceData> AnalyzedMethods;
2323
public sealed override string Name => "ParamFlowAnalyzer";

src/OTAPI.UnifiedServerProcess/Core/Analysis/StaticFieldModificationAnalysis/StaticFieldModificationAnalyzer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public class StaticFieldModificationAnalyzer(ILogger logger,
2828
MethodCallGraph callGraph,
2929
DelegateInvocationGraph invocationGraph,
3030
MethodInheritanceGraph inheritanceGraph,
31-
TypeInheritanceGraph typeInheritanceGraph) : Analyzer(logger), IMethodBehaivorFeature, IMethodCheckCacheFeature
31+
TypeInheritanceGraph typeInheritanceGraph) : Analyzer(logger), IMethodImplementationFeature, IMethodCheckCacheFeature
3232
{
3333
public DelegateInvocationGraph DelegateInvocationGraph => invocationGraph;
3434
public MethodInheritanceGraph MethodInheritanceGraph => inheritanceGraph;

src/OTAPI.UnifiedServerProcess/Core/Analysis/StaticFieldReferenceAnalysis/StaticFieldReferenceAnalyzer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
namespace OTAPI.UnifiedServerProcess.Core.Analysis.StaticFieldReferenceAnalysis
1818
{
19-
public sealed class StaticFieldReferenceAnalyzer : Analyzer, IMethodBehaivorFeature
19+
public sealed class StaticFieldReferenceAnalyzer : Analyzer, IMethodImplementationFeature
2020
{
2121
public readonly ImmutableDictionary<string, StaticFieldReferenceData> AnalyzedMethods;
2222
public sealed override string Name => "StaticFieldReferenceAnalyzer";

src/OTAPI.UnifiedServerProcess/Core/FunctionalFeatures/IMethodBehaivorFeature.cs renamed to src/OTAPI.UnifiedServerProcess/Core/FunctionalFeatures/IMethodImplementationFeature.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace OTAPI.UnifiedServerProcess.Core.FunctionalFeatures
1313
{
14-
public interface IMethodBehaivorFeature : ILoggedComponent
14+
public interface IMethodImplementationFeature : ILoggedComponent
1515
{
1616
DelegateInvocationGraph DelegateInvocationGraph { get; }
1717
MethodInheritanceGraph MethodInheritanceGraph { get; }
@@ -24,7 +24,7 @@ public static MethodDefinition[] GetMethodImplementations<TFeature>(this TFeatur
2424
Dictionary<Instruction, List<Instruction>> jumpSites,
2525
out bool isDelegateInvocation,
2626
bool noWarings = false)
27-
where TFeature : LoggedComponent, IMethodBehaivorFeature {
27+
where TFeature : LoggedComponent, IMethodImplementationFeature {
2828

2929
if (callInstruction.OpCode != OpCodes.Callvirt && callInstruction.OpCode != OpCodes.Call && callInstruction.OpCode != OpCodes.Newobj) {
3030
throw new Exception("Expected callvirt or call");

src/OTAPI.UnifiedServerProcess/Core/Patching/FieldFilterPatching/InitialFieldModificationProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
namespace OTAPI.UnifiedServerProcess.Core.Patching.FieldFilterPatching
1919
{
20-
public class InitialFieldModificationProcessor(ILogger logger, AnalyzerGroups analyzers) : LoggedComponent(logger), IFieldFilterArgProcessor, IJumpSitesCacheFeature, IMethodBehaivorFeature, IMethodCheckCacheFeature
20+
public class InitialFieldModificationProcessor(ILogger logger, AnalyzerGroups analyzers) : LoggedComponent(logger), IFieldFilterArgProcessor, IJumpSitesCacheFeature, IMethodImplementationFeature, IMethodCheckCacheFeature
2121
{
2222
public DelegateInvocationGraph DelegateInvocationGraph => analyzers.DelegateInvocationGraph;
2323
public MethodInheritanceGraph MethodInheritanceGraph => analyzers.MethodInheritanceGraph;

0 commit comments

Comments
 (0)