Permalink
Browse files

More code cleanup.

  • Loading branch information...
Christopher Lane Hinson
Christopher Lane Hinson committed Apr 11, 2013
1 parent d9bd0fb commit 5eff417046ec4e7b3eeca469d659379d8c70c1e1
Showing with 115 additions and 115 deletions.
  1. +3 −3 Roguestar/Lib/Behavior.hs
  2. +1 −1 Roguestar/Lib/Behavior/Activate.hs
  3. +2 −2 Roguestar/Lib/Behavior/CharacterAdvancement.hs
  4. +1 −1 Roguestar/Lib/Behavior/Combat.hs
  5. +2 −2 Roguestar/Lib/Behavior/Construction.hs
  6. +3 −3 Roguestar/Lib/Behavior/Make.hs
  7. +2 −2 Roguestar/Lib/Behavior/Travel.hs
  8. +3 −3 Roguestar/Lib/Core/Building.hs
  9. +1 −1 Roguestar/Lib/Core/Monster.hs
  10. +5 −5 Roguestar/Lib/Core/Plane.hs
  11. +3 −3 Roguestar/Lib/DB.hs
  12. +2 −2 Roguestar/Lib/Data/BuildingData.hs
  13. +1 −1 Roguestar/Lib/Data/CharacterData.hs
  14. +2 −2 Roguestar/Lib/Data/LocationData.hs
  15. +2 −2 Roguestar/Lib/{ → Data}/MakeData.hs
  16. +3 −3 Roguestar/Lib/Data/MonsterData.hs
  17. +1 −1 Roguestar/Lib/{ → Data}/PersistantData.hs
  18. +2 −2 Roguestar/Lib/{ → Data}/PlaneData.hs
  19. +3 −3 Roguestar/Lib/{ → Data}/PlanetData.hs
  20. +2 −2 Roguestar/Lib/Data/PlayerState.hs
  21. +6 −0 Roguestar/Lib/Data/PowerUpData.hs
  22. +4 −4 Roguestar/Lib/Data/ReferenceTypes.hs
  23. +1 −1 Roguestar/Lib/{ → Data}/SpeciesData.hs
  24. +2 −2 Roguestar/Lib/{ → Data}/TerrainData.hs
  25. +1 −1 Roguestar/Lib/{ → Data}/ToolData.hs
  26. +1 −1 Roguestar/Lib/{ → Data}/TravelData.hs
  27. +2 −2 Roguestar/Lib/{ → Data}/VisibilityData.hs
  28. +3 −3 Roguestar/Lib/Perception.hs
  29. +5 −5 Roguestar/Lib/PlaneVisibility.hs
  30. +3 −3 Roguestar/Lib/Planet.hs
  31. +0 −6 Roguestar/Lib/PowerUpData.hs
  32. +2 −2 Roguestar/Lib/Reference.hs
  33. +2 −2 Roguestar/Lib/Roguestar.hs
  34. +1 −1 Roguestar/Lib/Species.hs
  35. +2 −2 Roguestar/Lib/Tool.hs
  36. +2 −2 Roguestar/Lib/Turns.hs
  37. +1 −1 Roguestar/Lib/UnitTests.hs
  38. +1 −1 Roguestar/Lib/Utility/Contact.hs
  39. +2 −2 Roguestar/Lib/Utility/DetailedLocation.hs
  40. +1 −1 Roguestar/Lib/{ → Utility}/Grids.hs
  41. +7 −7 Roguestar/Lib/{ → Utility}/HierarchicalDatabase.hs
  42. +1 −1 Roguestar/Lib/{GridRayCaster.hs → Utility/RayCasting.hs}
  43. +1 −1 Roguestar/Lib/Utility/SiteCriteria.hs
  44. +3 −3 Roguestar/Lib/World/BeginGame.hs
  45. +3 −3 Roguestar/Server/Main.hs
  46. +14 −14 roguestar.cabal
@@ -20,19 +20,19 @@ import Control.Monad.Error
import Roguestar.Lib.Behavior.Combat
import Roguestar.Lib.Behavior.Activate
import Roguestar.Lib.Behavior.Travel
-import Roguestar.Lib.TravelData
+import Roguestar.Lib.Data.TravelData
import Roguestar.Lib.Core.Monster
import Roguestar.Lib.Data.MonsterData
import Roguestar.Lib.Core.Plane
import Roguestar.Lib.PlaneVisibility
import Data.List
-import Roguestar.Lib.TerrainData
+import Roguestar.Lib.Data.TerrainData
import Roguestar.Lib.Behavior.Make
import Roguestar.Lib.Behavior.Construction
import Roguestar.Lib.Core.Building
import Roguestar.Lib.Reference
import Roguestar.Lib.Utility.DetailedLocation
-import Roguestar.Lib.PlaneData
+import Roguestar.Lib.Data.PlaneData
data FacingBehavior =
Step
@@ -5,7 +5,7 @@ module Roguestar.Lib.Behavior.Activate
where
import Roguestar.Lib.Tool
-import Roguestar.Lib.ToolData
+import Roguestar.Lib.Data.ToolData
import Roguestar.Lib.Core.Monster
import Roguestar.Lib.DB
import Control.Monad.Error
@@ -9,8 +9,8 @@ module Roguestar.Lib.Behavior.CharacterAdvancement
import qualified Data.Map as Map
import Roguestar.Lib.Data.MonsterData
-import Roguestar.Lib.PowerUpData
-import Roguestar.Lib.PersistantData
+import Roguestar.Lib.Data.PowerUpData
+import Roguestar.Lib.Data.PersistantData
-- TODO: rename "bump" to more clear language, like "advance" or "advanceCharacterLevel".
@@ -12,7 +12,7 @@ import Roguestar.Lib.DB
import Roguestar.Lib.Core.Monster
import Roguestar.Lib.Data.MonsterData
import Roguestar.Lib.Tool
-import Roguestar.Lib.ToolData
+import Roguestar.Lib.Data.ToolData
import Control.Monad.Error
import Roguestar.Lib.Data.FacingData
import Data.Maybe
@@ -8,8 +8,8 @@ module Roguestar.Lib.Behavior.Construction
import Roguestar.Lib.DB
import Roguestar.Lib.Core.Plane
-import Roguestar.Lib.PlaneData
-import Roguestar.Lib.TerrainData
+import Roguestar.Lib.Data.PlaneData
+import Roguestar.Lib.Data.TerrainData
import Roguestar.Lib.Data.FacingData
import Control.Monad
import Control.Monad.Maybe
@@ -1,14 +1,14 @@
module Roguestar.Lib.Behavior.Make
- (module Roguestar.Lib.MakeData,
+ (module Roguestar.Lib.Data.MakeData,
MakeOutcome,
resolveMake,
executeMake)
where
-import Roguestar.Lib.MakeData
+import Roguestar.Lib.Data.MakeData
import Roguestar.Lib.DB
import Roguestar.Lib.Tool
-import Roguestar.Lib.ToolData
+import Roguestar.Lib.Data.ToolData
import Data.List
data MakeOutcome = MakeSuccess MonsterRef Tool [ToolRef] | MakeFailed
@@ -20,12 +20,12 @@ import Control.Monad
import Control.Monad.Trans
import Data.Ord
import Roguestar.Lib.Position as Position
-import Roguestar.Lib.TerrainData
+import Roguestar.Lib.Data.TerrainData
import Data.List (minimumBy)
import Roguestar.Lib.Core.Monster
import Roguestar.Lib.Data.MonsterData
import Roguestar.Lib.Logging
-import Roguestar.Lib.TravelData
+import Roguestar.Lib.Data.TravelData
import Roguestar.Lib.Utility.DetailedLocation
import Roguestar.Lib.Utility.DetailedTravel as DetailedTravel
@@ -16,12 +16,12 @@ import Roguestar.Lib.Data.FacingData
import Data.Maybe
import Control.Monad.Maybe
import Control.Monad.Random
-import Roguestar.Lib.PlaneData
+import Roguestar.Lib.Data.PlaneData
import Roguestar.Lib.Core.Plane
import Roguestar.Lib.Position
-import Roguestar.Lib.TerrainData
+import Roguestar.Lib.Data.TerrainData
import Control.Monad.Error
-import Roguestar.Lib.PowerUpData
+import Roguestar.Lib.Data.PowerUpData
import Roguestar.Lib.Behavior.CharacterAdvancement
import Roguestar.Lib.Utility.DetailedLocation
import Roguestar.Lib.Data.PlayerState
@@ -18,7 +18,7 @@ module Roguestar.Lib.Core.Monster
import Prelude hiding (getContents)
import Roguestar.Lib.Data.MonsterData
import Roguestar.Lib.DB
-import Roguestar.Lib.SpeciesData
+import Roguestar.Lib.Data.SpeciesData
import Roguestar.Lib.Species
import Roguestar.Lib.Data.FactionData
import Control.Monad.Error
@@ -18,13 +18,13 @@ module Roguestar.Lib.Core.Plane
where
import Prelude hiding (getContents)
-import Roguestar.Lib.Grids
+import Roguestar.Lib.Utility.Grids
import Roguestar.Lib.Reference
import Roguestar.Lib.DB
-import Roguestar.Lib.TerrainData
-import Roguestar.Lib.PlaneData
-import Roguestar.Lib.PlanetData
-import Roguestar.Lib.ToolData (Tool)
+import Roguestar.Lib.Data.TerrainData
+import Roguestar.Lib.Data.PlaneData
+import Roguestar.Lib.Data.PlanetData
+import Roguestar.Lib.Data.ToolData (Tool)
import Roguestar.Lib.Data.MonsterData (Monster)
import Control.Monad
import Control.Monad.Random as Random
View
@@ -58,14 +58,14 @@ import Roguestar.Lib.Data.ReferenceTypes
import Roguestar.Lib.Data.LocationData
import Roguestar.Lib.Reference
import Roguestar.Lib.Data.MonsterData
-import Roguestar.Lib.PlaneData
+import Roguestar.Lib.Data.PlaneData
import Roguestar.Lib.Data.BuildingData
import Roguestar.Lib.RNG
import Data.Map as Map
import Data.List as List
-import qualified Roguestar.Lib.HierarchicalDatabase as HD
+import qualified Roguestar.Lib.Utility.HierarchicalDatabase as HD
import Data.Maybe
-import Roguestar.Lib.ToolData
+import Roguestar.Lib.Data.ToolData
import Control.Monad.State
import Control.Monad.Error
import Control.Monad.Reader
@@ -13,8 +13,8 @@ module Roguestar.Lib.Data.BuildingData
buildingOccupies)
where
-import Roguestar.Lib.PowerUpData
-import Roguestar.Lib.PersistantData
+import Roguestar.Lib.Data.PowerUpData
+import Roguestar.Lib.Data.PersistantData
basic_stargate :: BuildingPrototype
basic_stargate = BuildingPrototype (TwoWayStargate NonAlignedRegion) Portal (Just Magnetic)
@@ -3,7 +3,7 @@ module Roguestar.Lib.Data.CharacterData
where
import Roguestar.Lib.Data.MonsterData
-import Roguestar.Lib.PersistantData
+import Roguestar.Lib.Data.PersistantData
applyCharacterClass :: CharacterClass -> Monster -> Monster
applyCharacterClass character_class creature = applyToMonster (CharacterClass character_class : classInfo character_class) creature
@@ -32,9 +32,9 @@ module Roguestar.Lib.Data.LocationData
import Roguestar.Lib.Data.FacingData
import Roguestar.Lib.Data.ReferenceTypes
-import Roguestar.Lib.ToolData
+import Roguestar.Lib.Data.ToolData
import Roguestar.Lib.Data.MonsterData
-import Roguestar.Lib.PlaneData
+import Roguestar.Lib.Data.PlaneData
import Roguestar.Lib.Data.BuildingData
import Control.Monad
import Roguestar.Lib.Position
@@ -1,6 +1,6 @@
{-# LANGUAGE FlexibleInstances #-}
--Mechanics
-module Roguestar.Lib.MakeData
+module Roguestar.Lib.Data.MakeData
(PrepareMake(..),
prepare_make,
isFinished,
@@ -15,7 +15,7 @@ module Roguestar.Lib.MakeData
where
import Roguestar.Lib.Data.LocationData
-import Roguestar.Lib.ToolData
+import Roguestar.Lib.Data.ToolData
import Roguestar.Lib.Substances
-- | Multi-step process for gathering the materials to make something.
@@ -13,16 +13,16 @@ module Roguestar.Lib.Data.MonsterData
empty_creature)
where
-import Roguestar.Lib.PersistantData
+import Roguestar.Lib.Data.PersistantData
import Data.Ratio
import Data.Maybe
import Roguestar.Lib.Data.FactionData
import Data.Monoid
import qualified Data.Map as Map
import qualified Data.Set as Set
import Data.List as List
-import Roguestar.Lib.SpeciesData
-import Roguestar.Lib.TerrainData
+import Roguestar.Lib.Data.SpeciesData
+import Roguestar.Lib.Data.TerrainData
data Monster = Monster { creature_traits :: Map.Map MonsterTrait Integer,
creature_specials :: Set.Set MonsterSpecial,
@@ -1,5 +1,5 @@
--Data
-module Roguestar.Lib.PersistantData
+module Roguestar.Lib.Data.PersistantData
(CharacterClass(..),
PowerUpData(..),
PlanetRegion(..),
@@ -1,9 +1,9 @@
--Data
-module Roguestar.Lib.PlaneData
+module Roguestar.Lib.Data.PlaneData
(Plane(..))
where
-import Roguestar.Lib.TerrainData
+import Roguestar.Lib.Data.TerrainData
import qualified Data.ByteString.Char8 as B
import Roguestar.Lib.Random as Random
@@ -1,6 +1,6 @@
{-# LANGUAGE OverloadedStrings #-}
--World
-module Roguestar.Lib.PlanetData
+module Roguestar.Lib.Data.PlanetData
(PlanetRegion(..),
PlanetInfo(..),
addTown,
@@ -9,8 +9,8 @@ module Roguestar.Lib.PlanetData
cyborg_planets)
where
-import Roguestar.Lib.PersistantData
-import Roguestar.Lib.TerrainData
+import Roguestar.Lib.Data.PersistantData
+import Roguestar.Lib.Data.TerrainData
import Roguestar.Lib.Data.BuildingData
import qualified Roguestar.Lib.Random as Random
import Data.Ratio
@@ -7,8 +7,8 @@ module Roguestar.Lib.Data.PlayerState
import Roguestar.Lib.Data.LocationData
import Roguestar.Lib.Data.MonsterData
-import Roguestar.Lib.TravelData
-import Roguestar.Lib.PersistantData
+import Roguestar.Lib.Data.TravelData
+import Roguestar.Lib.Data.PersistantData
import Data.Maybe
data PlayerState =
@@ -0,0 +1,6 @@
+module Roguestar.Lib.Data.PowerUpData
+ (PowerUpData(..))
+ where
+
+import Roguestar.Lib.Data.PersistantData
+
@@ -18,13 +18,13 @@ module Roguestar.Lib.Data.ReferenceTypes
BuildingRef)
where
-import Roguestar.Lib.HierarchicalDatabase
+import Roguestar.Lib.Utility.HierarchicalDatabase
import Roguestar.Lib.Data.FacingData
import Roguestar.Lib.Data.MonsterData
-import Roguestar.Lib.ToolData
-import Roguestar.Lib.PlaneData
+import Roguestar.Lib.Data.ToolData
+import Roguestar.Lib.Data.PlaneData
import Roguestar.Lib.Data.BuildingData
-import Roguestar.Lib.PlanetData
+import Roguestar.Lib.Data.PlanetData
import Roguestar.Lib.Position
--
@@ -1,5 +1,5 @@
--Data
-module Roguestar.Lib.SpeciesData
+module Roguestar.Lib.Data.SpeciesData
(Species(..),
all_species)
where
@@ -1,5 +1,5 @@
--Data
-module Roguestar.Lib.TerrainData
+module Roguestar.Lib.Data.TerrainData
(Biome(..),
Terrain(..),
MetaTerrain(..),
@@ -14,7 +14,7 @@ module Roguestar.Lib.TerrainData
impassable_terrains)
where
-import Roguestar.Lib.Grids
+import Roguestar.Lib.Utility.Grids
import Data.List as List
import Data.Map as Map
--import Substances hiding (Water)
@@ -1,7 +1,7 @@
{-# LANGUAGE OverloadedStrings #-}
--Data
-module Roguestar.Lib.ToolData
+module Roguestar.Lib.Data.ToolData
(Tool(..),
toolName,
fromSphere,
@@ -1,5 +1,5 @@
--Data
-module Roguestar.Lib.TravelData
+module Roguestar.Lib.Data.TravelData
(ClimbDirection(..)) where
data ClimbDirection = ClimbUp | ClimbDown
@@ -1,12 +1,12 @@
--Data
-module Roguestar.Lib.VisibilityData
+module Roguestar.Lib.Data.VisibilityData
(distanceCostForSight,
terrainHideMultiplier,
terrainOpacity,
maximumRangeForSpotCheck)
where
-import Roguestar.Lib.TerrainData
+import Roguestar.Lib.Data.TerrainData
import Data.List
import Roguestar.Lib.Data.FacingData
@@ -42,15 +42,15 @@ import Data.Map as Map
import Control.Applicative
import Roguestar.Lib.Data.FacingData
import Roguestar.Lib.Position as Position
-import Roguestar.Lib.TerrainData
+import Roguestar.Lib.Data.TerrainData
import Roguestar.Lib.Data.BuildingData
import Roguestar.Lib.Core.Building
import Roguestar.Lib.Core.Plane
import Roguestar.Lib.Utility.DetailedLocation
-import Roguestar.Lib.SpeciesData
+import Roguestar.Lib.Data.SpeciesData
import Roguestar.Lib.Data.MonsterData
import Roguestar.Lib.Tool
-import Roguestar.Lib.ToolData
+import Roguestar.Lib.Data.ToolData
import Roguestar.Lib.Behavior as Behavior
import qualified Roguestar.Lib.Utility.DetailedTravel as DT
@@ -9,15 +9,15 @@ module Roguestar.Lib.PlaneVisibility
import Prelude hiding (getContents)
import Roguestar.Lib.Data.FactionData
import Roguestar.Lib.DB
-import Roguestar.Lib.TerrainData
+import Roguestar.Lib.Data.TerrainData
import Roguestar.Lib.Core.Plane
-import Roguestar.Lib.PlaneData
+import Roguestar.Lib.Data.PlaneData
import Control.Monad
import Roguestar.Lib.Data.MonsterData
import Data.List as List
-import Roguestar.Lib.Grids
-import Roguestar.Lib.GridRayCaster
-import Roguestar.Lib.VisibilityData
+import Roguestar.Lib.Utility.Grids
+import Roguestar.Lib.Utility.RayCasting
+import Roguestar.Lib.Data.VisibilityData
import Roguestar.Lib.Data.FacingData
import Data.Ratio
import Roguestar.Lib.Core.Building
Oops, something went wrong.

0 comments on commit 5eff417

Please sign in to comment.