From 9156844657483bab1ad1a7e10da71d8eeef3c86b Mon Sep 17 00:00:00 2001 From: austin Date: Sun, 11 May 2025 15:32:15 -0400 Subject: [PATCH] small code cleanup --- .../simulation/chara/CharaSimulation.java | 39 ------------------- 1 file changed, 39 deletions(-) diff --git a/src/main/java/electrosphere/server/simulation/chara/CharaSimulation.java b/src/main/java/electrosphere/server/simulation/chara/CharaSimulation.java index 6b3d1a37..9edfd730 100644 --- a/src/main/java/electrosphere/server/simulation/chara/CharaSimulation.java +++ b/src/main/java/electrosphere/server/simulation/chara/CharaSimulation.java @@ -44,7 +44,6 @@ public class CharaSimulation { */ protected static void checkForShelter(Realm realm, Character chara){ MacroData macroData = realm.getMacroData(); -// for(Character chara : Globals.macroData.getAliveCharacters()){ /* If doesn’t have shelter, check if in town If in town, @@ -68,16 +67,6 @@ public class CharaSimulation { shelter.setRepairable(false); } } - // Vector2i charPos = CharacterUtils.getDiscretePosition(chara); - // Town nearbyTown = Town.getTownAtPosition(charPos.x,charPos.y); - // if(nearbyTown != null){ - // //if town has a place to stay - // if(false){ - - // } else { - // //try to find a place to put down a structure - - // } } else { Vector3d position = chara.getPos(); StructureData structureData = Globals.gameConfigCurrent.getStructureData().getTypes().iterator().next(); @@ -93,35 +82,7 @@ public class CharaSimulation { //target the struct CharacterGoal.setCharacterGoal(chara, new CharacterGoal(CharacterGoalType.BUILD_STRUCTURE, struct)); - // //cry - // //TODO: Get building type to place - // String buildingTypeToPlace = "building1"; - // //try to find a place to put down a structure - // // int dynamicInterpRatio = Globals.serverTerrainManager.getDynamicInterpolationRatio(); - // // Vector2f placementPos = new Vector2f( - // // (float)(charPos.x * dynamicInterpRatio + Math.random() * dynamicInterpRatio), - // // (float)(charPos.y * dynamicInterpRatio + Math.random() * dynamicInterpRatio) - // // ); - // // int attempts = 0; - // // while(!VirtualStructureUtils.validStructurePlacementPosition(placementPos.x, placementPos.y, buildingTypeToPlace)){ - // // placementPos = new Vector2f( - // // (float)(charPos.x * dynamicInterpRatio + Math.random() * dynamicInterpRatio), - // // (float)(charPos.y * dynamicInterpRatio + Math.random() * dynamicInterpRatio) - // // ); - // // attempts++; - // // if(attempts > MAX_PLACE_ATTEMPTS){ - // // placementPos = null; - // // break; - // // } - // // } - // // if(placementPos != null){ - // // // Structure placedStructure = VirtualStructureUtils.placeStructureAtPoint(placementPos.x, placementPos.y, buildingTypeToPlace); - // // // CharacterUtils.addShelter(chara, placedStructure); - // // // VirtualStructureUtils.addResident(placedStructure, chara); - // // } - // } } -// } } protected static void checkTownMembership(Character chara){