Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
-update namespaces across entire project
Browse files Browse the repository at this point in the history
  • Loading branch information
Cassunshine committed Dec 10, 2023
1 parent f52a354 commit fcfae3b
Show file tree
Hide file tree
Showing 42 changed files with 80 additions and 105 deletions.
4 changes: 2 additions & 2 deletions Client/Network/C2SConnection.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Common.Network;
using Common.Network.Packets.S2C;
using Voxel.Common.Network;
using Voxel.Common.Network.Packets.S2C;

namespace Voxel.Client.Network;

Expand Down
11 changes: 4 additions & 7 deletions Client/Network/ClientConnectionContext.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
using System;
using Common.Network.Packets;
using Common.Network.Packets.C2S;
using Common.Network.Packets.C2S.Handshake;
using Common.Network.Packets.S2C;
using Common.Network.Packets.S2C.Gameplay;
using Common.Network.Packets.S2C.Handshake;
using Common.Network.Packets.Utils;
using Voxel.Client.World;
using Voxel.Common.Network.Packets;
using Voxel.Common.Network.Packets.C2S;
using Voxel.Common.Network.Packets.S2C;
using Voxel.Common.Network.Packets.S2C.Gameplay;
using Voxel.Common.Network.Packets.S2C.Handshake;
using Voxel.Common.Network.Packets.Utils;

namespace Voxel.Client.Network;

Expand Down
12 changes: 6 additions & 6 deletions Client/Network/InternetC2SConnection.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
using System;
using System.Net;
using System.Net.Sockets;
using Common.Network.Packets;
using Common.Network.Packets.C2S;
using Common.Network.Packets.C2S.Handshake;
using Common.Network.Packets.S2C;
using Common.Network.Packets.Utils;
using Common.Util.Serialization.Compressed;
using LiteNetLib;
using Voxel.Common.Network.Packets;
using Voxel.Common.Network.Packets.C2S;
using Voxel.Common.Network.Packets.C2S.Handshake;
using Voxel.Common.Network.Packets.S2C;
using Voxel.Common.Network.Packets.Utils;
using Voxel.Common.Util.Serialization.Compressed;

namespace Voxel.Client.Network;

Expand Down
2 changes: 1 addition & 1 deletion Client/Rendering/GameRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using GlmSharp;
using Voxel.Client.Keybinding;
using Voxel.Client.Rendering.Debug;
using Voxel.Client.Rendering.GUI;
using Voxel.Client.Rendering.Gui;
using Voxel.Client.Rendering.World;
using Voxel.Common.Collision;
using Voxel.Common.World;
Expand Down
2 changes: 1 addition & 1 deletion Client/Rendering/Gui/GuiRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Veldrid;
using Voxel.Client.Rendering.VertexTypes;

namespace Voxel.Client.Rendering.GUI;
namespace Voxel.Client.Rendering.Gui;

public class GuiRenderer : Renderer, IDisposable {
public readonly Pipeline GuiPipeline;
Expand Down
2 changes: 1 addition & 1 deletion Client/Rendering/Models/BlockModelManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
using GlmSharp;
using Newtonsoft.Json;
using Voxel.Client.Rendering.Texture;
using Voxel.Client.Rendering.Utils;
using Voxel.Common.Tile;
using Voxel.Core.Assets;
using Voxel.Rendering.Utils;

namespace Voxel.Client.Rendering.Models;

Expand Down
2 changes: 1 addition & 1 deletion Client/Rendering/Utils/ColorFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using GlmSharp;
using Voxel.Common.Util;

namespace Voxel.Rendering.Utils;
namespace Voxel.Client.Rendering.Utils;

public static class ColorFunctions {
[MethodImpl(MethodImplOptions.AggressiveOptimization)]
Expand Down
2 changes: 1 addition & 1 deletion Client/Rendering/Utils/RenderingUtils.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using GlmSharp;

namespace Voxel.Rendering.Utils;
namespace Voxel.Client.Rendering.Utils;

public static class RenderingUtils {

Expand Down
2 changes: 1 addition & 1 deletion Client/Rendering/World/ChunkMeshBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
using GlmSharp;
using Newtonsoft.Json.Serialization;
using Voxel.Client.Rendering.Models;
using Voxel.Client.Rendering.Utils;
using Voxel.Client.Rendering.VertexTypes;
using Voxel.Client.World;
using Voxel.Common.Tile;
using Voxel.Common.Util;
using Voxel.Common.World.Storage;
using Voxel.Common.World.Views;
using Voxel.Rendering.Utils;

namespace Voxel.Client.Rendering.World;

Expand Down
2 changes: 1 addition & 1 deletion Client/Server/IntegratedServer.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Common.Server;
using Voxel.Common.Server;

namespace Voxel.Client.Server;

Expand Down
2 changes: 1 addition & 1 deletion Client/World/Entity/ControlledClientPlayerEntity.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System;
using Common.Network.Packets.Utils;
using GlmSharp;
using SharpGen.Runtime;
using Voxel.Client.Keybinding;
using Voxel.Common.Network.Packets.C2S.Gameplay;
using Voxel.Common.Network.Packets.Utils;
using Voxel.Common.Util;

namespace Voxel.Client.World.Entity;
Expand Down
4 changes: 1 addition & 3 deletions Common/Network/ConnectionBase.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using Common.Network.Packets;
using NLog.Targets;
using Voxel.Common.Network.Packets;

namespace Common.Network;
namespace Voxel.Common.Network;

public abstract class ConnectionBase<T> where T : Packet {

Expand Down
2 changes: 1 addition & 1 deletion Common/Network/Packets/C2S/C2SPacket.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Common.Network.Packets.C2S;
namespace Voxel.Common.Network.Packets.C2S;

public abstract class C2SPacket : Packet {

Expand Down
3 changes: 1 addition & 2 deletions Common/Network/Packets/C2S/Gameplay/PlayerUpdated.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Common.Network.Packets.C2S;
using Common.Util.Serialization;
using GlmSharp;
using Voxel.Common.Util.Serialization;

namespace Voxel.Common.Network.Packets.C2S.Gameplay;

Expand Down
4 changes: 2 additions & 2 deletions Common/Network/Packets/C2S/Handshake/C2SHandshakeDone.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Common.Util.Serialization;
using Voxel.Common.Util.Serialization;

namespace Common.Network.Packets.C2S.Handshake;
namespace Voxel.Common.Network.Packets.C2S.Handshake;

public class C2SHandshakeDone : C2SPacket {

Expand Down
4 changes: 2 additions & 2 deletions Common/Network/Packets/Packet.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Common.Util.Serialization;
using Voxel.Common.Util.Serialization;

namespace Common.Network.Packets;
namespace Voxel.Common.Network.Packets;

public abstract class Packet : VSerializable {

Expand Down
3 changes: 1 addition & 2 deletions Common/Network/Packets/PacketHandler.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Common.Network.Packets;
using Common.Network.Packets.Utils;
using Voxel.Common.Network.Packets.Utils;

namespace Voxel.Common.Network.Packets;

Expand Down
4 changes: 2 additions & 2 deletions Common/Network/Packets/S2C/Gameplay/ChunkData.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Common.Util.Serialization;
using GlmSharp;
using Voxel.Common.Tile;
using Voxel.Common.Util.Serialization;
using Voxel.Common.World;
using Voxel.Common.World.Storage;

namespace Common.Network.Packets.S2C.Gameplay;
namespace Voxel.Common.Network.Packets.S2C.Gameplay;

public class ChunkData : S2CPacket {

Expand Down
3 changes: 1 addition & 2 deletions Common/Network/Packets/S2C/Gameplay/ChunkUnload.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Common.Network.Packets.S2C;
using Common.Util.Serialization;
using GlmSharp;
using Voxel.Common.Util.Serialization;
using Voxel.Common.World;

namespace Voxel.Common.Network.Packets.S2C.Gameplay;
Expand Down
3 changes: 1 addition & 2 deletions Common/Network/Packets/S2C/Gameplay/Entity/EntityPacket.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Common.Network.Packets.S2C;
using Common.Util.Serialization;
using Voxel.Common.Util.Serialization;

namespace Voxel.Common.Network.Packets.S2C.Gameplay.Entity;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
using Common.Util.Serialization;
using GlmSharp;
using Voxel.Common.Network.Packets.S2C.Gameplay.Entity;
using Voxel.Common.World.Entity;
using Voxel.Common.Util.Serialization;

namespace Common.Network.Packets.S2C.Gameplay;
namespace Voxel.Common.Network.Packets.S2C.Gameplay.Entity;

public class EntityTransformUpdate : EntityPacket {
public dvec3 Position;
public float Rotation;

public override void Init(Entity entity) {
public override void Init(World.Entity.Entity entity) {
Position = entity.position;
Rotation = entity.rotation;
}

public override void Apply(Entity entity) {
public override void Apply(World.Entity.Entity entity) {
entity.position = Position;
entity.rotation = Rotation;
}
Expand Down
4 changes: 2 additions & 2 deletions Common/Network/Packets/S2C/Handshake/S2CHandshakeDone.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Common.Util.Serialization;
using Voxel.Common.Util.Serialization;

namespace Common.Network.Packets.S2C.Handshake;
namespace Voxel.Common.Network.Packets.S2C.Handshake;

public class S2CHandshakeDone : S2CPacket {

Expand Down
4 changes: 2 additions & 2 deletions Common/Network/Packets/S2C/Handshake/SetupWorld.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Common.Util.Serialization;
using Voxel.Common.Util.Serialization;

namespace Common.Network.Packets.S2C.Handshake;
namespace Voxel.Common.Network.Packets.S2C.Handshake;

public class SetupWorld : S2CPacket {
public override void Write(VDataWriter writer) {
Expand Down
2 changes: 1 addition & 1 deletion Common/Network/Packets/S2C/S2CPacket.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Common.Network.Packets.S2C;
namespace Voxel.Common.Network.Packets.S2C;

public abstract class S2CPacket : Packet {

Expand Down
4 changes: 2 additions & 2 deletions Common/Network/Packets/Utils/PacketMap.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Reflection;
using Common.Util.Serialization;
using Voxel.Common.Util.Serialization;

namespace Common.Network.Packets.Utils;
namespace Voxel.Common.Network.Packets.Utils;

public class PacketMap<T> : RawIDMap<Type> where T : Packet {
public void FillOutgoingMap() {
Expand Down
2 changes: 1 addition & 1 deletion Common/Network/Packets/Utils/PacketPool.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Collections.Concurrent;

namespace Common.Network.Packets.Utils;
namespace Voxel.Common.Network.Packets.Utils;

public static class PacketPool {
private static Dictionary<Type, ConcurrentQueue<Packet>> Pools = new();
Expand Down
4 changes: 2 additions & 2 deletions Common/Network/Packets/Utils/RawIDMap.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Diagnostics.CodeAnalysis;
using Common.Util.Serialization;
using Voxel.Common.Util.Serialization;

namespace Common.Network.Packets.Utils;
namespace Voxel.Common.Network.Packets.Utils;

/// <summary>
/// Maps a RawID to some type and back.
Expand Down
6 changes: 2 additions & 4 deletions Common/Network/S2CConnection.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using Common.Network.Packets;
using Common.Network.Packets.C2S;
using Common.Network.Packets.S2C;
using Voxel.Common.Network.Packets.C2S;

namespace Common.Network;
namespace Voxel.Common.Network;

/// <summary>
/// Connection out from the server to another client.
Expand Down
5 changes: 2 additions & 3 deletions Common/Server/Components/Networking/ConnectionManager.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Common.Network;
using Common.Network.Packets;
using Voxel.Common.Network;

namespace Common.Server.Components.Networking;
namespace Voxel.Common.Server.Components.Networking;

public class ConnectionManager : ServerComponent {

Expand Down
16 changes: 8 additions & 8 deletions Common/Server/Components/Networking/LNLHostManager.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
using System.Net;
using System.Net.Sockets;
using Common.Network;
using Common.Network.Packets;
using Common.Network.Packets.C2S;
using Common.Network.Packets.S2C;
using Common.Network.Packets.Utils;
using Common.Util.Serialization.Compressed;
using LiteNetLib;
using LiteNetLib.Utils;

namespace Common.Server.Components.Networking;
using Voxel.Common.Network;
using Voxel.Common.Network.Packets;
using Voxel.Common.Network.Packets.C2S;
using Voxel.Common.Network.Packets.S2C;
using Voxel.Common.Network.Packets.Utils;
using Voxel.Common.Util.Serialization.Compressed;

namespace Voxel.Common.Server.Components.Networking;

/// <summary>
/// Server component that opens this server up to being connected to over the internet.
Expand Down
16 changes: 7 additions & 9 deletions Common/Server/Components/Networking/ServerConnectionContext.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
using Common.Network;
using Common.Network.Packets;
using Common.Network.Packets.C2S;
using Common.Network.Packets.C2S.Handshake;
using Common.Network.Packets.S2C;
using Common.Network.Packets.S2C.Gameplay;
using Common.Network.Packets.S2C.Handshake;
using Common.Network.Packets.Utils;
using Voxel.Common.Network;
using Voxel.Common.Network.Packets;
using Voxel.Common.Network.Packets.C2S;
using Voxel.Common.Network.Packets.C2S.Gameplay;
using Voxel.Common.Network.Packets.C2S.Handshake;
using Voxel.Common.Network.Packets.S2C;
using Voxel.Common.Network.Packets.S2C.Gameplay;
using Voxel.Common.Network.Packets.S2C.Handshake;
using Voxel.Common.Network.Packets.Utils;
using Voxel.Common.World;
using Voxel.Common.World.Entity;

namespace Common.Server.Components.Networking;
namespace Voxel.Common.Server.Components.Networking;

/// <summary>
/// This is what controls a connection to a player from the server.
Expand Down
7 changes: 3 additions & 4 deletions Common/Server/Components/PlayerManager.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
using Common.Network.Packets.S2C.Handshake;
using Common.Server.Components.Networking;
using GlmSharp;
using Voxel.Common.Config;
using Voxel.Common.Network.Packets.S2C.Handshake;
using Voxel.Common.Server.Components.Networking;
using Voxel.Common.World.Entity;

namespace Common.Server.Components;
namespace Voxel.Common.Server.Components;

public class PlayerManager : ServerComponent {

Expand Down
2 changes: 1 addition & 1 deletion Common/Server/Components/ServerComponent.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Common.Server.Components;
namespace Voxel.Common.Server.Components;

public abstract class ServerComponent {
public readonly VoxelServer Server;
Expand Down
5 changes: 2 additions & 3 deletions Common/Server/Components/WorldManager.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Common.Server.World;
using Voxel.Common.World;
using Voxel.Common.Server.World;

namespace Common.Server.Components;
namespace Voxel.Common.Server.Components;

public class WorldManager : ServerComponent {

Expand Down
7 changes: 3 additions & 4 deletions Common/Server/VoxelServer.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using Common.Server.Components;
using Common.Server.Components.Networking;
using FastNoiseOO.Generators;
using Voxel.Common.Server.Components;
using Voxel.Common.Server.Components.Networking;
using Voxel.Common.Util;

namespace Common.Server;
namespace Voxel.Common.Server;

/// <summary>
/// A logical server for the game, used for both internal and external servers.
Expand Down
Loading

0 comments on commit fcfae3b

Please sign in to comment.