diff --git a/docs/src/progress/renderertodo.md b/docs/src/progress/renderertodo.md index e9515d8d..4cf46c0c 100644 --- a/docs/src/progress/renderertodo.md +++ b/docs/src/progress/renderertodo.md @@ -1703,6 +1703,8 @@ GriddedDataCellManager simulates cells that contain creatures Characters can pursue goal to leave sim range and the real entity is unloaded when they leave range Move all character to database instead of macro data object Major work on CharacterService +Move character utils classe to macro data +Move CharacterService to service package diff --git a/src/main/java/electrosphere/net/server/protocol/CharacterProtocol.java b/src/main/java/electrosphere/net/server/protocol/CharacterProtocol.java index 328160ff..fa300e4f 100644 --- a/src/main/java/electrosphere/net/server/protocol/CharacterProtocol.java +++ b/src/main/java/electrosphere/net/server/protocol/CharacterProtocol.java @@ -24,12 +24,12 @@ import electrosphere.net.parser.net.message.PlayerMessage; import electrosphere.net.server.ServerConnectionHandler; import electrosphere.net.server.player.Player; import electrosphere.net.template.ServerProtocolTemplate; -import electrosphere.server.character.CharacterService; -import electrosphere.server.character.PlayerCharacterCreation; import electrosphere.server.datacell.Realm; import electrosphere.server.datacell.ServerWorldData; import electrosphere.server.entity.serialization.ContentSerialization; import electrosphere.server.macro.character.Character; +import electrosphere.server.macro.character.PlayerCharacterCreation; +import electrosphere.server.service.CharacterService; import electrosphere.util.Utilities; /** diff --git a/src/main/java/electrosphere/server/entity/ServerContentManager.java b/src/main/java/electrosphere/server/entity/ServerContentManager.java index ac6ee682..4efc6076 100644 --- a/src/main/java/electrosphere/server/entity/ServerContentManager.java +++ b/src/main/java/electrosphere/server/entity/ServerContentManager.java @@ -8,12 +8,12 @@ import electrosphere.engine.Globals; import electrosphere.entity.Entity; import electrosphere.entity.state.server.ServerCharacterData; import electrosphere.entity.types.creature.CreatureUtils; -import electrosphere.server.character.CharacterService; import electrosphere.server.datacell.Realm; import electrosphere.server.datacell.ServerDataCell; import electrosphere.server.entity.serialization.ContentSerialization; import electrosphere.server.macro.MacroData; import electrosphere.server.saves.SaveUtils; +import electrosphere.server.service.CharacterService; import electrosphere.util.FileUtils; import electrosphere.util.math.HashUtils; import electrosphere.server.macro.character.Character; diff --git a/src/main/java/electrosphere/server/macro/MacroData.java b/src/main/java/electrosphere/server/macro/MacroData.java index bf909cde..cbf77e63 100644 --- a/src/main/java/electrosphere/server/macro/MacroData.java +++ b/src/main/java/electrosphere/server/macro/MacroData.java @@ -5,7 +5,6 @@ import java.util.List; import electrosphere.engine.Globals; import electrosphere.logger.LoggerInterface; -import electrosphere.server.character.CharacterService; import electrosphere.server.datacell.ServerWorldData; import electrosphere.server.macro.character.Character; import electrosphere.server.macro.character.CharacterUtils; @@ -18,6 +17,7 @@ import electrosphere.server.macro.spatial.MacroAreaObject; import electrosphere.server.macro.structure.Structure; import electrosphere.server.macro.symbolism.Symbol; import electrosphere.server.macro.town.Town; +import electrosphere.server.service.CharacterService; import electrosphere.util.FileUtils; import java.util.Random; diff --git a/src/main/java/electrosphere/server/macro/character/CharacterUtils.java b/src/main/java/electrosphere/server/macro/character/CharacterUtils.java index abc341d8..9702c1ba 100644 --- a/src/main/java/electrosphere/server/macro/character/CharacterUtils.java +++ b/src/main/java/electrosphere/server/macro/character/CharacterUtils.java @@ -2,13 +2,13 @@ package electrosphere.server.macro.character; import org.joml.Vector3d; -import electrosphere.server.character.CharacterService; import electrosphere.server.datacell.Realm; import electrosphere.server.macro.character.data.CharacterDataStrings; import electrosphere.server.macro.character.diety.Diety; import electrosphere.server.macro.race.Race; import electrosphere.server.macro.structure.Structure; import electrosphere.server.macro.town.Town; +import electrosphere.server.service.CharacterService; /** * Utility functions for dealing with characters diff --git a/src/main/java/electrosphere/server/character/PlayerCharacterCreation.java b/src/main/java/electrosphere/server/macro/character/PlayerCharacterCreation.java similarity index 98% rename from src/main/java/electrosphere/server/character/PlayerCharacterCreation.java rename to src/main/java/electrosphere/server/macro/character/PlayerCharacterCreation.java index 2ed00fab..7250a03a 100644 --- a/src/main/java/electrosphere/server/character/PlayerCharacterCreation.java +++ b/src/main/java/electrosphere/server/macro/character/PlayerCharacterCreation.java @@ -1,4 +1,4 @@ -package electrosphere.server.character; +package electrosphere.server.macro.character; import org.joml.Vector3d; import org.joml.Vector3i; @@ -15,7 +15,7 @@ import electrosphere.net.server.player.Player; import electrosphere.net.server.protocol.CharacterProtocol; import electrosphere.server.datacell.Realm; import electrosphere.server.datacell.ServerWorldData; -import electrosphere.server.macro.character.Character; +import electrosphere.server.service.CharacterService; /** * Deals with spawning player characters diff --git a/src/main/java/electrosphere/server/character/CharacterService.java b/src/main/java/electrosphere/server/service/CharacterService.java similarity index 99% rename from src/main/java/electrosphere/server/character/CharacterService.java rename to src/main/java/electrosphere/server/service/CharacterService.java index bee400cc..087e2229 100644 --- a/src/main/java/electrosphere/server/character/CharacterService.java +++ b/src/main/java/electrosphere/server/service/CharacterService.java @@ -1,4 +1,4 @@ -package electrosphere.server.character; +package electrosphere.server.service; import java.util.HashMap; import java.util.LinkedList; diff --git a/src/test/java/electrosphere/test/testutils/TestEngineUtils.java b/src/test/java/electrosphere/test/testutils/TestEngineUtils.java index c4eb4777..9034cd43 100644 --- a/src/test/java/electrosphere/test/testutils/TestEngineUtils.java +++ b/src/test/java/electrosphere/test/testutils/TestEngineUtils.java @@ -15,8 +15,8 @@ import electrosphere.entity.Entity; import electrosphere.entity.types.creature.CreatureTemplate; import electrosphere.net.server.ServerConnectionHandler; import electrosphere.net.server.protocol.CharacterProtocol; -import electrosphere.server.character.PlayerCharacterCreation; import electrosphere.server.datacell.utils.EntityLookupUtils; +import electrosphere.server.macro.character.PlayerCharacterCreation; /** * Utils for testing the engine diff --git a/src/test/java/electrosphere/test/testutils/TestViewportUtils.java b/src/test/java/electrosphere/test/testutils/TestViewportUtils.java index 386acd35..70416c93 100644 --- a/src/test/java/electrosphere/test/testutils/TestViewportUtils.java +++ b/src/test/java/electrosphere/test/testutils/TestViewportUtils.java @@ -12,7 +12,7 @@ import electrosphere.entity.types.creature.CreatureUtils; import electrosphere.net.NetUtils; import electrosphere.net.server.ServerConnectionHandler; import electrosphere.net.server.player.Player; -import electrosphere.server.character.PlayerCharacterCreation; +import electrosphere.server.macro.character.PlayerCharacterCreation; /** * Utilities for testing in the viewport