From bcc999db38324eb9cc9444fde4482c9149d44dfb Mon Sep 17 00:00:00 2001 From: CPunch Date: Fri, 1 Dec 2023 16:56:55 -0600 Subject: [PATCH] moved internal/entity to shard/entity --- shard/chat.go | 2 +- {internal => shard}/entity/chunk.go | 0 {internal => shard}/entity/chunkposition.go | 0 {internal => shard}/entity/entity.go | 0 {internal => shard}/entity/entity_test.go | 2 +- {internal => shard}/entity/npc.go | 0 {internal => shard}/entity/player.go | 0 shard/entitymanager.go | 2 +- shard/join.go | 2 +- shard/movement.go | 2 +- shard/npcloader.go | 2 +- shard/shardserver.go | 2 +- 12 files changed, 7 insertions(+), 7 deletions(-) rename {internal => shard}/entity/chunk.go (100%) rename {internal => shard}/entity/chunkposition.go (100%) rename {internal => shard}/entity/entity.go (100%) rename {internal => shard}/entity/entity_test.go (93%) rename {internal => shard}/entity/npc.go (100%) rename {internal => shard}/entity/player.go (100%) diff --git a/shard/chat.go b/shard/chat.go index c093d4e..c79d556 100644 --- a/shard/chat.go +++ b/shard/chat.go @@ -4,8 +4,8 @@ import ( "fmt" "github.com/CPunch/gopenfusion/cnpeer" - "github.com/CPunch/gopenfusion/internal/entity" "github.com/CPunch/gopenfusion/internal/protocol" + "github.com/CPunch/gopenfusion/shard/entity" ) func (server *ShardServer) freeChat(peer *cnpeer.CNPeer, pkt protocol.Packet) error { diff --git a/internal/entity/chunk.go b/shard/entity/chunk.go similarity index 100% rename from internal/entity/chunk.go rename to shard/entity/chunk.go diff --git a/internal/entity/chunkposition.go b/shard/entity/chunkposition.go similarity index 100% rename from internal/entity/chunkposition.go rename to shard/entity/chunkposition.go diff --git a/internal/entity/entity.go b/shard/entity/entity.go similarity index 100% rename from internal/entity/entity.go rename to shard/entity/entity.go diff --git a/internal/entity/entity_test.go b/shard/entity/entity_test.go similarity index 93% rename from internal/entity/entity_test.go rename to shard/entity/entity_test.go index 05255b7..aa98a67 100644 --- a/internal/entity/entity_test.go +++ b/shard/entity/entity_test.go @@ -3,7 +3,7 @@ package entity_test import ( "testing" - "github.com/CPunch/gopenfusion/internal/entity" + "github.com/CPunch/gopenfusion/shard/entity" "github.com/matryer/is" ) diff --git a/internal/entity/npc.go b/shard/entity/npc.go similarity index 100% rename from internal/entity/npc.go rename to shard/entity/npc.go diff --git a/internal/entity/player.go b/shard/entity/player.go similarity index 100% rename from internal/entity/player.go rename to shard/entity/player.go diff --git a/shard/entitymanager.go b/shard/entitymanager.go index d972c14..ad98a05 100644 --- a/shard/entitymanager.go +++ b/shard/entitymanager.go @@ -1,7 +1,7 @@ package shard import ( - "github.com/CPunch/gopenfusion/internal/entity" + "github.com/CPunch/gopenfusion/shard/entity" ) func (server *ShardServer) addEntity(e entity.Entity) { diff --git a/shard/join.go b/shard/join.go index 8afa720..e157591 100644 --- a/shard/join.go +++ b/shard/join.go @@ -5,9 +5,9 @@ import ( "log" "github.com/CPunch/gopenfusion/cnpeer" - "github.com/CPunch/gopenfusion/internal/entity" "github.com/CPunch/gopenfusion/internal/protocol" "github.com/CPunch/gopenfusion/internal/redis" + "github.com/CPunch/gopenfusion/shard/entity" "github.com/CPunch/gopenfusion/util" ) diff --git a/shard/movement.go b/shard/movement.go index 09355d4..41dad47 100644 --- a/shard/movement.go +++ b/shard/movement.go @@ -4,8 +4,8 @@ import ( "fmt" "github.com/CPunch/gopenfusion/cnpeer" - "github.com/CPunch/gopenfusion/internal/entity" "github.com/CPunch/gopenfusion/internal/protocol" + "github.com/CPunch/gopenfusion/shard/entity" "github.com/CPunch/gopenfusion/util" ) diff --git a/shard/npcloader.go b/shard/npcloader.go index c3afe50..c5e58f0 100644 --- a/shard/npcloader.go +++ b/shard/npcloader.go @@ -6,7 +6,7 @@ import ( "os" "github.com/CPunch/gopenfusion/config" - "github.com/CPunch/gopenfusion/internal/entity" + "github.com/CPunch/gopenfusion/shard/entity" ) type NPCData struct { diff --git a/shard/shardserver.go b/shard/shardserver.go index 8d86410..a375a92 100644 --- a/shard/shardserver.go +++ b/shard/shardserver.go @@ -6,10 +6,10 @@ import ( "github.com/CPunch/gopenfusion/cnpeer" "github.com/CPunch/gopenfusion/config" "github.com/CPunch/gopenfusion/internal/db" - "github.com/CPunch/gopenfusion/internal/entity" "github.com/CPunch/gopenfusion/internal/protocol" "github.com/CPunch/gopenfusion/internal/redis" "github.com/CPunch/gopenfusion/internal/service" + "github.com/CPunch/gopenfusion/shard/entity" ) type PacketHandler func(peer *cnpeer.CNPeer, pkt protocol.Packet) error