Rename NetModulesTypes to NetModuleType

This commit is contained in:
Chris 2020-06-02 14:20:49 +09:30
parent 292f310f69
commit c9b015027d
2 changed files with 11 additions and 11 deletions

View file

@ -1959,7 +1959,7 @@ namespace TShockAPI
/// <summary>
/// The type of net module being loaded
/// </summary>
public NetModulesTypes ModuleType { get; set; }
public NetModuleType ModuleType { get; set; }
}
/// <summary>
@ -1967,7 +1967,7 @@ namespace TShockAPI
/// </summary>
public static HandlerList<LoadNetModuleEventArgs> LoadNetModule = new HandlerList<LoadNetModuleEventArgs>();
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,

View file

@ -13,14 +13,14 @@ namespace TShockAPI.Handlers.NetModules
/// <summary>
/// Maps net module types to handlers for the net module type. Add to or edit this dictionary to customise handling
/// </summary>
public static Dictionary<NetModulesTypes, Type> NetModulesToHandlersMap = new Dictionary<NetModulesTypes, Type>
public static Dictionary<NetModuleType, Type> NetModulesToHandlersMap = new Dictionary<NetModuleType, Type>
{
{ 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) }
};
/// <summary>