From c9b015027d409078869e4951b09dfe8078a5d30e Mon Sep 17 00:00:00 2001
From: Chris <2648373+QuiCM@users.noreply.github.com>
Date: Tue, 2 Jun 2020 14:20:49 +0930
Subject: [PATCH] Rename NetModulesTypes to NetModuleType
---
TShockAPI/GetDataHandlers.cs | 8 ++++----
.../Handlers/NetModules/NetModulePacketHandler.cs | 14 +++++++-------
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs
index 52394f38..cc4174d0 100644
--- a/TShockAPI/GetDataHandlers.cs
+++ b/TShockAPI/GetDataHandlers.cs
@@ -1959,7 +1959,7 @@ namespace TShockAPI
///
/// The type of net module being loaded
///
- public NetModulesTypes ModuleType { get; set; }
+ public NetModuleType ModuleType { get; set; }
}
///
@@ -1967,7 +1967,7 @@ namespace TShockAPI
///
public static HandlerList LoadNetModule = new HandlerList();
- private static bool OnLoadNetModule(TSPlayer player, MemoryStream data, NetModulesTypes moduleType)
+ private static bool OnLoadNetModule(TSPlayer player, MemoryStream data, NetModuleType moduleType)
{
if (LoadNetModule == null)
{
@@ -3260,7 +3260,7 @@ namespace TShockAPI
{
short moduleId = args.Data.ReadInt16();
- if (OnLoadNetModule(args.Player, args.Data, (NetModulesTypes)moduleId))
+ if (OnLoadNetModule(args.Player, args.Data, (NetModuleType)moduleId))
{
return true;
}
@@ -3779,7 +3779,7 @@ namespace TShockAPI
public bool Killed { get; internal set; }
}
- public enum NetModulesTypes
+ public enum NetModuleType
{
Liquid,
Text,
diff --git a/TShockAPI/Handlers/NetModules/NetModulePacketHandler.cs b/TShockAPI/Handlers/NetModules/NetModulePacketHandler.cs
index 8c1b2c8e..9fe5c30f 100644
--- a/TShockAPI/Handlers/NetModules/NetModulePacketHandler.cs
+++ b/TShockAPI/Handlers/NetModules/NetModulePacketHandler.cs
@@ -13,14 +13,14 @@ namespace TShockAPI.Handlers.NetModules
///
/// Maps net module types to handlers for the net module type. Add to or edit this dictionary to customise handling
///
- public static Dictionary NetModulesToHandlersMap = new Dictionary
+ public static Dictionary NetModulesToHandlersMap = new Dictionary
{
- { NetModulesTypes.CreativePowers, typeof(CreativePowerHandler) },
- { NetModulesTypes.CreativeUnlocksPlayerReport, typeof(CreativeUnlocksHandler) },
- { NetModulesTypes.TeleportPylon, typeof(PylonHandler) },
- { NetModulesTypes.Liquid, typeof(LiquidHandler) },
- { NetModulesTypes.Bestiary, typeof(BestiaryHandler) },
- { NetModulesTypes.Ambience, typeof(AmbienceHandler) }
+ { NetModuleType.CreativePowers, typeof(CreativePowerHandler) },
+ { NetModuleType.CreativeUnlocksPlayerReport, typeof(CreativeUnlocksHandler) },
+ { NetModuleType.TeleportPylon, typeof(PylonHandler) },
+ { NetModuleType.Liquid, typeof(LiquidHandler) },
+ { NetModuleType.Bestiary, typeof(BestiaryHandler) },
+ { NetModuleType.Ambience, typeof(AmbienceHandler) }
};
///