From ecb183a24a965b2882b4a066ebf91c8dc879aa48 Mon Sep 17 00:00:00 2001 From: chessmaster42 Date: Fri, 22 Aug 2014 12:55:23 -0500 Subject: [PATCH] -Converted many reflection calls to use the new wrapper methods in BaseObject --- SEModAPIInternal/API/Common/NetworkManager.cs | 19 ++++--------- SEModAPIInternal/API/Common/PlayerManager.cs | 25 ++++------------- SEModAPIInternal/API/Common/PowerManager.cs | 9 +----- SEModAPIInternal/API/Common/RadioManager.cs | 8 +----- .../API/Common/SandboxGameAssemblyWrapper.cs | 28 ++++++------------- SEModAPIInternal/API/Common/WorldManager.cs | 19 ++++--------- SEModAPIInternal/API/Entity/BaseEntity.cs | 16 +---------- .../API/Entity/InventoryEntity.cs | 25 ++++++----------- SEModAPIInternal/API/Entity/PowerProducer.cs | 8 ------ SEModAPIInternal/API/Entity/PowerReceiver.cs | 14 ++-------- .../Sector/SectorObject/CharacterEntity.cs | 11 -------- .../Sector/SectorObject/FloatingObject.cs | 4 --- .../API/Entity/Sector/SectorObject/Meteor.cs | 8 ------ .../Entity/Sector/SectorObject/VoxelMap.cs | 5 ---- SEModAPIInternal/API/Entity/SectorEntity.cs | 11 -------- 15 files changed, 39 insertions(+), 171 deletions(-) diff --git a/SEModAPIInternal/API/Common/NetworkManager.cs b/SEModAPIInternal/API/Common/NetworkManager.cs index 3f287407..d73da109 100644 --- a/SEModAPIInternal/API/Common/NetworkManager.cs +++ b/SEModAPIInternal/API/Common/NetworkManager.cs @@ -2,11 +2,10 @@ using System; using System.Collections.Generic; -using System.Linq; using System.Reflection; -using System.Text; using SEModAPIInternal.Support; +using SEModAPIInternal.API.Entity; namespace SEModAPIInternal.API.Common { @@ -152,8 +151,7 @@ public static Object GetNetworkManager() try { Type networkManagerWrapper = SandboxGameAssemblyWrapper.Instance.GetAssemblyType(NetworkManagerWrapperNamespace, NetworkManagerWrapperClass); - FieldInfo networkManagerField = networkManagerWrapper.GetField(NetworkManagerWrapperManagerInstanceField, BindingFlags.NonPublic | BindingFlags.Static); - Object networkManager = networkManagerField.GetValue(null); + Object networkManager = BaseObject.GetStaticFieldValue(networkManagerWrapper, NetworkManagerWrapperManagerInstanceField); return networkManager; } @@ -185,10 +183,8 @@ public void RegisterChatReceiver(Action action { try { - MethodInfo registerChatHook = NetworkManagerType.GetMethod(NetworkManagerRegisterChatReceiverMethod); - var netManager = GetNetworkManager(); - registerChatHook.Invoke(netManager, new object[] { action }); + BaseObject.InvokeEntityMethod(netManager, NetworkManagerRegisterChatReceiverMethod, new object[] { action }); } catch (Exception ex) { @@ -202,8 +198,7 @@ protected Object GetInternalNetManager() { try { - FieldInfo internalNetManagerField = NetworkManagerType.GetField(NetworkManagerInternalNetManagerField); - Object internalNetManager = internalNetManagerField.GetValue(GetNetworkManager()); + Object internalNetManager = BaseObject.GetEntityFieldValue(GetNetworkManager(), NetworkManagerInternalNetManagerField); return internalNetManager; } @@ -219,8 +214,7 @@ protected Object GetPacketRegistry() try { Object internalNetManager = GetInternalNetManager(); - FieldInfo packetRegistryField = internalNetManager.GetType().GetField(InternalNetManagerPacketRegistryField); - Object packetRegistry = packetRegistryField.GetValue(internalNetManager); + Object packetRegistry = BaseObject.GetEntityFieldValue(internalNetManager, InternalNetManagerPacketRegistryField); return packetRegistry; } @@ -236,8 +230,7 @@ public Dictionary GetRegisteredPacketTypes() try { Object packetRegistry = GetPacketRegistry(); - FieldInfo typeIdMapField = packetRegistry.GetType().GetField(PacketRegistryTypeIdMapField, BindingFlags.NonPublic | BindingFlags.Static); - Dictionary packetTypeIdMap = (Dictionary)typeIdMapField.GetValue(packetRegistry); + Dictionary packetTypeIdMap = (Dictionary)BaseObject.GetEntityFieldValue(packetRegistry, PacketRegistryTypeIdMapField); return packetTypeIdMap; } diff --git a/SEModAPIInternal/API/Common/PlayerManager.cs b/SEModAPIInternal/API/Common/PlayerManager.cs index 59dfd3b0..ca6ef19c 100644 --- a/SEModAPIInternal/API/Common/PlayerManager.cs +++ b/SEModAPIInternal/API/Common/PlayerManager.cs @@ -1,8 +1,5 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System.Text; using Sandbox.Common.ObjectBuilders; @@ -12,8 +9,6 @@ using SEModAPIInternal.Support; using VRage.Serialization; -using VRage.Collections; -using SteamSDK; namespace SEModAPIInternal.API.Common { @@ -28,16 +23,10 @@ public struct InternalPlayerItem public InternalPlayerItem(Object source) { - Type type = source.GetType(); - FieldInfo field1 = BaseObject.GetEntityField(source, "E520D0BC4EC9B47A81D9F52D4B70345F"); - FieldInfo field2 = BaseObject.GetEntityField(source, "FE57DC9F46A21EA612B9769D5A7A9606"); - FieldInfo field3 = BaseObject.GetEntityField(source, "F18302983BC40AE893A0E0E0F2263A93"); - FieldInfo field4 = BaseObject.GetEntityField(source, "2E57D5D124FF88C06AD1DFF6FE070B73"); - - name = (string)field1.GetValue(source); - isDead = (bool)field2.GetValue(source); - steamId = (ulong)field3.GetValue(source); - model = (string)field4.GetValue(source); + name = (string)BaseObject.GetEntityFieldValue(source, "E520D0BC4EC9B47A81D9F52D4B70345F"); + isDead = (bool)BaseObject.GetEntityFieldValue(source, "FE57DC9F46A21EA612B9769D5A7A9606"); + steamId = (ulong)BaseObject.GetEntityFieldValue(source, "F18302983BC40AE893A0E0E0F2263A93"); + model = (string)BaseObject.GetEntityFieldValue(source, "2E57D5D124FF88C06AD1DFF6FE070B73"); } } @@ -275,8 +264,7 @@ protected ulong GetSteamIdFromPlayer(Object player) { try { - FieldInfo steamIdField = BaseObject.GetEntityField(player, PlayerMapEntrySteamIdField); - ulong steamId = (ulong)steamIdField.GetValue(player); + ulong steamId = (ulong)BaseObject.GetEntityFieldValue(player, PlayerMapEntrySteamIdField); return steamId; } @@ -462,8 +450,7 @@ public static bool ReflectionUnitTest() public Object InternalGetPlayerMap() { - FieldInfo playerMapField = BaseObject.GetEntityField(BackingObject, PlayerManagerPlayerMapField); - Object playerMap = playerMapField.GetValue(BackingObject); + Object playerMap = BaseObject.GetEntityFieldValue(BackingObject, PlayerManagerPlayerMapField); return playerMap; } diff --git a/SEModAPIInternal/API/Common/PowerManager.cs b/SEModAPIInternal/API/Common/PowerManager.cs index 6825ef0b..6dc237e6 100644 --- a/SEModAPIInternal/API/Common/PowerManager.cs +++ b/SEModAPIInternal/API/Common/PowerManager.cs @@ -1,12 +1,6 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Reflection; using System.Runtime.Serialization; -using System.Text; -using SEModAPIInternal.API.Common; using SEModAPIInternal.API.Entity; using SEModAPIInternal.Support; @@ -52,8 +46,7 @@ public float TotalPower { try { - FieldInfo field = BaseObject.GetEntityField(m_powerManager, PowerManagerTotalPowerField); - float totalPower = (float)field.GetValue(m_powerManager); + float totalPower = (float)BaseObject.GetEntityFieldValue(m_powerManager, PowerManagerTotalPowerField); return totalPower; } catch (Exception ex) diff --git a/SEModAPIInternal/API/Common/RadioManager.cs b/SEModAPIInternal/API/Common/RadioManager.cs index 7c13dc7e..c0096dd2 100644 --- a/SEModAPIInternal/API/Common/RadioManager.cs +++ b/SEModAPIInternal/API/Common/RadioManager.cs @@ -1,11 +1,6 @@ using System; -using System.Collections.Generic; using System.ComponentModel; -using System.Linq; -using System.Reflection; -using System.Text; -using SEModAPIInternal.API.Common; using SEModAPIInternal.API.Entity; using SEModAPIInternal.Support; @@ -174,8 +169,7 @@ internal Object GetNetworkManager() { try { - FieldInfo field = BaseObject.GetEntityField(BackingObject, RadioManagerNetworkManagerField); - Object result = field.GetValue(BackingObject); + Object result = BaseObject.GetEntityFieldValue(BackingObject, RadioManagerNetworkManagerField); return result; } catch (Exception ex) diff --git a/SEModAPIInternal/API/Common/SandboxGameAssemblyWrapper.cs b/SEModAPIInternal/API/Common/SandboxGameAssemblyWrapper.cs index 5b440184..3c35ce05 100644 --- a/SEModAPIInternal/API/Common/SandboxGameAssemblyWrapper.cs +++ b/SEModAPIInternal/API/Common/SandboxGameAssemblyWrapper.cs @@ -1,9 +1,7 @@ using System; using System.Collections.Generic; using System.IO; -using System.Linq; using System.Reflection; -using System.Text; using Sandbox.Common.ObjectBuilders; @@ -219,8 +217,7 @@ public static Object MainGame { try { - FieldInfo field = BaseObject.GetStaticField(MainGameType, MainGameInstanceField); - Object mainGame = field.GetValue(null); + Object mainGame = BaseObject.GetStaticFieldValue(MainGameType, MainGameInstanceField); return mainGame; } @@ -243,8 +240,7 @@ public bool IsGameStarted if (!m_isGameLoaded) { - FieldInfo gameLoadedField = MainGameType.BaseType.GetField(MainGameIsLoadedField, BindingFlags.NonPublic | BindingFlags.Instance); - bool someValue = (bool)gameLoadedField.GetValue(MainGame); + bool someValue = (bool)BaseObject.GetEntityFieldValue(MainGame, MainGameIsLoadedField); if (someValue) { m_isGameLoaded = true; @@ -287,8 +283,7 @@ private Object GetServerConfigContainer() { try { - FieldInfo field = BaseObject.GetEntityField(MainGame, MainGameConfigContainerField); - Object configObject = field.GetValue(null); + Object configObject = BaseObject.GetEntityFieldValue(MainGame, MainGameConfigContainerField); return configObject; } @@ -343,8 +338,7 @@ public MyObjectBuilder_CubeBlock GetCubeBlockObjectBuilderFromEntity(Object enti { try { - MethodInfo method = CubeBlockObjectFactoryType.GetMethod(CubeBlockObjectFactoryGetBuilderFromEntityMethod); - MyObjectBuilder_CubeBlock newObjectBuilder = (MyObjectBuilder_CubeBlock)method.Invoke(null, new object[] { entity }); + MyObjectBuilder_CubeBlock newObjectBuilder = (MyObjectBuilder_CubeBlock)BaseObject.InvokeStaticMethod(CubeBlockObjectFactoryType, CubeBlockObjectFactoryGetBuilderFromEntityMethod, new object[] { entity }); return newObjectBuilder; } @@ -359,8 +353,7 @@ public MyObjectBuilder_EntityBase GetEntityBaseObjectBuilderFromEntity(Object en { try { - MethodInfo method = EntityBaseObjectFactoryType.GetMethod(EntityBaseObjectFactoryGetBuilderFromEntityMethod); - MyObjectBuilder_EntityBase newObjectBuilder = (MyObjectBuilder_EntityBase)method.Invoke(null, new object[] { entity }); + MyObjectBuilder_EntityBase newObjectBuilder = (MyObjectBuilder_EntityBase)BaseObject.InvokeStaticMethod(EntityBaseObjectFactoryType, EntityBaseObjectFactoryGetBuilderFromEntityMethod, new object[] { entity }); return newObjectBuilder; } @@ -407,12 +400,11 @@ public MyConfigDedicatedData GetServerConfig() try { Object configContainer = GetServerConfigContainer(); - FieldInfo field = BaseObject.GetEntityField(configContainer, ConfigContainerDedicatedDataField); - MyConfigDedicatedData config = (MyConfigDedicatedData)field.GetValue(configContainer); + MyConfigDedicatedData config = (MyConfigDedicatedData)BaseObject.GetEntityFieldValue(configContainer, ConfigContainerDedicatedDataField); if (config == null) { BaseObject.InvokeEntityMethod(configContainer, ConfigContainerGetConfigDataMethod); - config = (MyConfigDedicatedData)field.GetValue(configContainer); + config = (MyConfigDedicatedData)BaseObject.GetEntityFieldValue(configContainer, ConfigContainerDedicatedDataField); } return config; @@ -428,8 +420,7 @@ public void SetNullRender(bool nullRender) { try { - FieldInfo field = BaseObject.GetStaticField(ServerCoreType, ServerCoreNullRenderField); - field.SetValue(null, nullRender); + BaseObject.SetStaticFieldValue(ServerCoreType, ServerCoreNullRenderField, nullRender); } catch (Exception ex) { @@ -457,8 +448,7 @@ public int GetMainGameMilliseconds() { try { - MethodInfo getTimeMillisMethod = MainGameType.GetMethod(MainGameGetTimeMillisMethod); - int gameTimeMillis = (int)getTimeMillisMethod.Invoke(null, new object[] { }); + int gameTimeMillis = (int)BaseObject.InvokeStaticMethod(MainGameType, MainGameGetTimeMillisMethod); return gameTimeMillis; } diff --git a/SEModAPIInternal/API/Common/WorldManager.cs b/SEModAPIInternal/API/Common/WorldManager.cs index 181e9e53..d65f9895 100644 --- a/SEModAPIInternal/API/Common/WorldManager.cs +++ b/SEModAPIInternal/API/Common/WorldManager.cs @@ -1,8 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System.Text; using Sandbox.Common.ObjectBuilders; @@ -81,8 +77,7 @@ public Object BackingObject { try { - FieldInfo field = BaseObject.GetStaticField(InternalType, WorldManagerInstanceField); - Object worldManager = field.GetValue(null); + Object worldManager = BaseObject.GetStaticFieldValue(InternalType, WorldManagerInstanceField); return worldManager; } @@ -118,8 +113,7 @@ public MySessionSettings SessionSettings { try { - FieldInfo field = BaseObject.GetEntityField(BackingObject, WorldManagerSessionSettingsField); - MySessionSettings sessionSettings = (MySessionSettings)field.GetValue(BackingObject); + MySessionSettings sessionSettings = (MySessionSettings)BaseObject.GetEntityFieldValue(BackingObject, WorldManagerSessionSettingsField); return sessionSettings; } @@ -198,8 +192,7 @@ internal Object InternalGetFactionManager() { try { - FieldInfo field = BaseObject.GetEntityField(BackingObject, WorldManagerFactionManagerField); - Object worldManager = field.GetValue(BackingObject); + Object worldManager = BaseObject.GetEntityFieldValue(BackingObject, WorldManagerFactionManagerField); return worldManager; } @@ -222,8 +215,7 @@ internal FastResourceLock InternalGetResourceLock() try { Type type = SandboxGameAssemblyWrapper.Instance.GetAssemblyType(WorldResourceManagerNamespace, WorldResourceManagerClass); - FieldInfo field = BaseObject.GetStaticField(type, WorldResourceManagerResourceLockField); - FastResourceLock result = (FastResourceLock)field.GetValue(null); + FastResourceLock result = (FastResourceLock)BaseObject.GetStaticFieldValue(type, WorldResourceManagerResourceLockField); return result; } @@ -243,8 +235,7 @@ internal void InternalSaveWorld() Type type = BackingObject.GetType(); Type[] argTypes = new Type[1]; argTypes[0] = typeof(string); - MethodInfo method = type.GetMethod(WorldManagerSaveWorldMethod, argTypes); - bool result = (bool)method.Invoke(BackingObject, new object[] { null }); + bool result = (bool)BaseObject.InvokeEntityMethod(BackingObject, WorldManagerSaveWorldMethod, new object[] { null }, argTypes); if (result) { diff --git a/SEModAPIInternal/API/Entity/BaseEntity.cs b/SEModAPIInternal/API/Entity/BaseEntity.cs index 7854ade0..eb61e20d 100644 --- a/SEModAPIInternal/API/Entity/BaseEntity.cs +++ b/SEModAPIInternal/API/Entity/BaseEntity.cs @@ -3,31 +3,18 @@ using Microsoft.Xml.Serialization.GeneratedAssembly; using System; -using System.Collections.Generic; using System.ComponentModel; using System.IO; -using System.Linq; -using System.Reflection; -using System.Reflection.Emit; using System.Runtime.Serialization; -using System.Text; -using System.Threading; using Sandbox.Common.ObjectBuilders; -using Sandbox.Common.ObjectBuilders.Definitions; -using Sandbox.Common.ObjectBuilders.Voxels; -using Sandbox.Common.ObjectBuilders.VRageData; -using Sandbox.Game.Weapons; using SEModAPI.API; -using SEModAPI.API.Definitions; using SEModAPIInternal.API.Common; -using SEModAPIInternal.API.Entity.Sector.SectorObject; using SEModAPIInternal.API.Utility; using SEModAPIInternal.Support; -using VRage; using VRageMath; namespace SEModAPIInternal.API.Entity @@ -623,8 +610,7 @@ internal static long GetEntityId(Object entity) long entityId = 0L; try { - FieldInfo field = GetEntityField(entity, BaseEntityEntityIdField); - entityId = (long)field.GetValue(entity); + entityId = (long)GetEntityFieldValue(entity, BaseEntityEntityIdField); } catch (Exception ex) { diff --git a/SEModAPIInternal/API/Entity/InventoryEntity.cs b/SEModAPIInternal/API/Entity/InventoryEntity.cs index 48232a6f..13984d6d 100644 --- a/SEModAPIInternal/API/Entity/InventoryEntity.cs +++ b/SEModAPIInternal/API/Entity/InventoryEntity.cs @@ -1,15 +1,10 @@ using System; using System.Collections.Generic; using System.ComponentModel; -using System.Linq; -using System.Reflection; using System.Runtime.Serialization; -using System.Text; -using System.Threading; using Sandbox.Common.ObjectBuilders; using Sandbox.Common.ObjectBuilders.Definitions; -using Sandbox.Common.ObjectBuilders.VRageData; using SEModAPI.API; using SEModAPI.API.Definitions; @@ -236,8 +231,7 @@ public void RefreshInventory() if (BackingObject != null) { //Update the base entity - MethodInfo getObjectBuilder = BackingObject.GetType().GetMethod(InventoryGetObjectBuilderMethod); - MyObjectBuilder_Inventory inventory = (MyObjectBuilder_Inventory)getObjectBuilder.Invoke(BackingObject, new object[] { }); + MyObjectBuilder_Inventory inventory = (MyObjectBuilder_Inventory)InvokeEntityMethod(BackingObject, InventoryGetObjectBuilderMethod); ObjectBuilder = inventory; } else @@ -283,16 +277,15 @@ protected void InternalUpdateItemAmount() MyObjectBuilder_PhysicalObject physicalContent = m_itemToUpdate.ObjectBuilder.PhysicalContent; - MethodInfo method; - Object[] parameters; if (delta > 0) { - method = BackingObject.GetType().GetMethod(InventoryAddItemAmountMethod); - parameters = new object[] { + Object[] parameters = new object[] { (MyFixedPoint)delta, physicalContent, -1 }; + + InvokeEntityMethod(BackingObject, InventoryAddItemAmountMethod, parameters); } else { @@ -301,15 +294,14 @@ protected void InternalUpdateItemAmount() argTypes[1] = typeof(MyObjectBuilder_PhysicalObject); argTypes[2] = typeof(bool); - method = BackingObject.GetType().GetMethod(InventoryRemoveItemAmountMethod, argTypes); - parameters = new object[] { + Object[] parameters = new object[] { (MyFixedPoint)(-delta), physicalContent, Type.Missing }; - } - method.Invoke(BackingObject, parameters); + InvokeEntityMethod(BackingObject, InventoryRemoveItemAmountMethod, parameters, argTypes); + } m_itemToUpdate = null; m_oldItemAmount = 0; @@ -587,8 +579,7 @@ public static uint GetInventoryItemId(object item) { try { - FieldInfo field = GetEntityField(item, InventoryItemItemIdField); - uint result = (uint)field.GetValue(item); + uint result = (uint)GetEntityFieldValue(item, InventoryItemItemIdField); return result; } catch(Exception ex) { diff --git a/SEModAPIInternal/API/Entity/PowerProducer.cs b/SEModAPIInternal/API/Entity/PowerProducer.cs index cd5b49c4..2239aab7 100644 --- a/SEModAPIInternal/API/Entity/PowerProducer.cs +++ b/SEModAPIInternal/API/Entity/PowerProducer.cs @@ -1,12 +1,4 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Reflection; -using System.Text; - -using Sandbox.Definitions; -using Sandbox.Common.ObjectBuilders; using SEModAPIInternal.API.Common; using SEModAPIInternal.Support; diff --git a/SEModAPIInternal/API/Entity/PowerReceiver.cs b/SEModAPIInternal/API/Entity/PowerReceiver.cs index 873d7d4e..f77e86b2 100644 --- a/SEModAPIInternal/API/Entity/PowerReceiver.cs +++ b/SEModAPIInternal/API/Entity/PowerReceiver.cs @@ -1,12 +1,5 @@ using System; -using System.Collections.Generic; using System.ComponentModel; -using System.Linq; -using System.Reflection; -using System.Text; - -using Sandbox.Definitions; -using Sandbox.Common.ObjectBuilders; using SEModAPIInternal.API.Common; using SEModAPIInternal.Support; @@ -142,12 +135,9 @@ protected void InternalUpdateMaxRequiredInput() if (m_powerRateCallback == null) return; - FieldInfo field = BaseObject.GetEntityField(BackingObject, PowerReceiverInputRateCallbackField); - if(m_powerRateCallback != null) - field.SetValue(BackingObject, m_powerRateCallback); + BaseObject.SetEntityFieldValue(BackingObject, PowerReceiverInputRateCallbackField, m_powerRateCallback); - FieldInfo field2 = BaseObject.GetEntityField(BackingObject, PowerReceiverMaxRequiredInputField); - field2.SetValue(BackingObject, m_maxRequiredInput); + BaseObject.SetEntityFieldValue(BackingObject, PowerReceiverMaxRequiredInputField, m_maxRequiredInput); BaseObject.InvokeEntityMethod(BackingObject, PowerReceiverSetMaxRequiredInputMethod, new object[] { m_maxRequiredInput }); diff --git a/SEModAPIInternal/API/Entity/Sector/SectorObject/CharacterEntity.cs b/SEModAPIInternal/API/Entity/Sector/SectorObject/CharacterEntity.cs index ede5e423..41b2f310 100644 --- a/SEModAPIInternal/API/Entity/Sector/SectorObject/CharacterEntity.cs +++ b/SEModAPIInternal/API/Entity/Sector/SectorObject/CharacterEntity.cs @@ -1,27 +1,16 @@ using Microsoft.Xml.Serialization.GeneratedAssembly; using System; -using System.Collections.Generic; using System.ComponentModel; using System.IO; -using System.Linq; -using System.Reflection; using System.Runtime.Serialization; -using System.Text; using Sandbox.Common.ObjectBuilders; -using Sandbox.Common.ObjectBuilders.Definitions; -using Sandbox.Common.ObjectBuilders.VRageData; using Sandbox.Game.Weapons; -using SEModAPI.API; - using SEModAPIInternal.API.Common; -using SEModAPIInternal.API.Server; using SEModAPIInternal.Support; -using VRageMath; - namespace SEModAPIInternal.API.Entity.Sector.SectorObject { [DataContract(Name = "CharacterEntityProxy")] diff --git a/SEModAPIInternal/API/Entity/Sector/SectorObject/FloatingObject.cs b/SEModAPIInternal/API/Entity/Sector/SectorObject/FloatingObject.cs index 188134d9..7c2be2be 100644 --- a/SEModAPIInternal/API/Entity/Sector/SectorObject/FloatingObject.cs +++ b/SEModAPIInternal/API/Entity/Sector/SectorObject/FloatingObject.cs @@ -1,12 +1,8 @@ using System; -using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; using Sandbox.Common.ObjectBuilders; -using Sandbox.Common.ObjectBuilders.Definitions; - -using SEModAPI.API.Definitions; using SEModAPIInternal.API.Common; using SEModAPIInternal.Support; diff --git a/SEModAPIInternal/API/Entity/Sector/SectorObject/Meteor.cs b/SEModAPIInternal/API/Entity/Sector/SectorObject/Meteor.cs index 0fcc14e4..90a37975 100644 --- a/SEModAPIInternal/API/Entity/Sector/SectorObject/Meteor.cs +++ b/SEModAPIInternal/API/Entity/Sector/SectorObject/Meteor.cs @@ -1,20 +1,12 @@ using System; -using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; using Sandbox.Common.ObjectBuilders; -using Sandbox.Common.ObjectBuilders.Definitions; -using Sandbox.Common.ObjectBuilders.VRageData; - -using SEModAPI.API; -using SEModAPI.API.Definitions; using SEModAPIInternal.API.Common; using SEModAPIInternal.Support; -using VRageMath; - namespace SEModAPIInternal.API.Entity.Sector.SectorObject { [DataContract(Name = "MeteorProxy")] diff --git a/SEModAPIInternal/API/Entity/Sector/SectorObject/VoxelMap.cs b/SEModAPIInternal/API/Entity/Sector/SectorObject/VoxelMap.cs index 73c04f9e..2e47d15c 100644 --- a/SEModAPIInternal/API/Entity/Sector/SectorObject/VoxelMap.cs +++ b/SEModAPIInternal/API/Entity/Sector/SectorObject/VoxelMap.cs @@ -1,14 +1,9 @@ using System; -using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; -using Sandbox.Common.ObjectBuilders; -using Sandbox.Common.ObjectBuilders.Definitions; using Sandbox.Common.ObjectBuilders.Voxels; -using SEModAPI.API.Definitions; - using SEModAPIInternal.API.Common; using SEModAPIInternal.Support; diff --git a/SEModAPIInternal/API/Entity/SectorEntity.cs b/SEModAPIInternal/API/Entity/SectorEntity.cs index 7f8908b7..9e2cd204 100644 --- a/SEModAPIInternal/API/Entity/SectorEntity.cs +++ b/SEModAPIInternal/API/Entity/SectorEntity.cs @@ -3,18 +3,10 @@ using System; using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; using System.IO; -using System.Reflection; -using System.Runtime.Serialization; -using System.Threading; using Sandbox.Common.ObjectBuilders; -using Sandbox.Common.ObjectBuilders.Definitions; using Sandbox.Common.ObjectBuilders.Voxels; -using Sandbox.Common.ObjectBuilders.VRageData; - -using SEModAPI.API.Definitions; using SEModAPIInternal.API.Common; using SEModAPIInternal.API.Entity.Sector; @@ -22,9 +14,6 @@ using SEModAPIInternal.API.Utility; using SEModAPIInternal.Support; -using VRage; -using VRageMath; - namespace SEModAPIInternal.API.Entity { public class SectorEntity : BaseObject