Package move to Roguestar.Lib.

parent 1954e7c7
# Boring file regexps:
(^|/)haddock($|/)
(^|/)products($|/)
\.hi$
\.o$
\.o\.cmd$
# *.ko files aren't boring by default because they might
# be Korean translations rather than kernel modules.
# \.ko$
\.ko\.cmd$
\.mod\.c$
(^|/)\.tmp_versions($|/)
(^|/)CVS($|/)
(^|/)RCS($|/)
~$
#(^|/)\.[^/]
(^|/)_darcs($|/)
\.bak$
\.BAK$
\.orig$
(^|/)vssver\.scc$
\.swp$
(^|/)MT($|/)
(^|/)\{arch\}($|/)
(^|/).arch-ids($|/)
(^|/),
\.class$
\.prof$
(^|/)\.DS_Store$
(^|/)BitKeeper($|/)
(^|/)ChangeSet($|/)
(^|/)\.svn($|/)
\.py[co]$
\#
\.cvsignore$
(^|/)Thumbs\.db$
(^|/)autom4te\.cache($|/)
Roguestar: Meta-Package / Maintainer's Package README
=====================================================
This git repository contains all of the packages that make up roguestar.
The binary packages:
* roguestar-engine
* roguestar-gl
* rsagl-demos
And the library packages:
* rsagl (RogueStar Animation and Graphics Library)
* rsagl-math
* rsagl-frp
The library packages must be installed before the binary packages can
even be configured.
Maintainer Scripts
------------------
To facilitate maintenance, there is a `Makefile` that contains
numerous convenient maintainer scripts.
install-deps [-e OPTS=cabal install opts]
: Use cabal to install all dependencies not in the
: haskell-platform.
clean [-e OPTS=cabal clean opts]
: Restore everything to a pristine state.
install [-e OPTS=cabal install opts]
: Install everything using cabal.
dev [-e OPTS=cabal install opts]
: Install everything using cabal, with -Wall on.
sdist -e "VERSION=0.5" [-e OPTS=cabal sdist opts]
: Perform a cabal sdist, and gather everything under roguestar-sdist.
: The version parameter is required and must reflect the version number in cabal.
module Activate
module Roguestar.Lib.Activate
(ActivationOutcome,
resolveActivation,
executeActivation)
where
import Tool
import ToolData
import Creature
import DB
import Roguestar.Lib.Tool
import Roguestar.Lib.ToolData
import Roguestar.Lib.Creature
import Roguestar.Lib.DB
import Control.Monad.Error
import Substances
import Roguestar.Lib.Substances
-- | Outcome of activating a tool.
data ActivationOutcome =
......
module Alignment
module Roguestar.Lib.Alignment
(Alignment,
MoralAlignment(..),
EthicalAlignment(..),
......
-- | Generates random lists of specific data points "attributes" of any data type.
-- The attributes themselves aren't random, only their arrangement and frequency within the list.
--
module AttributeGeneration
module Roguestar.Lib.AttributeGeneration
where
import Data.Ratio
......
{-# LANGUAGE OverloadedStrings #-}
module BeginGame
module Roguestar.Lib.BeginGame
(dbBeginGame)
where
import Plane
import CreatureData
import Character
import CharacterData
import BuildingData
import DB
import Facing
import TerrainData
import ToolData
import Roguestar.Lib.Plane
import Roguestar.Lib.CreatureData
import Roguestar.Lib.Character
import Roguestar.Lib.CharacterData
import Roguestar.Lib.BuildingData
import Roguestar.Lib.DB
import Roguestar.Lib.Facing
import Roguestar.Lib.TerrainData
import Roguestar.Lib.ToolData
import Control.Monad
import SpeciesData
import Substances
import PlayerState
import Town
import PlanetData
import Planet
import Roguestar.Lib.SpeciesData
import Roguestar.Lib.Substances as Substances
import Roguestar.Lib.PlayerState
import Roguestar.Lib.Town
import Roguestar.Lib.PlanetData
import Roguestar.Lib.Planet
import qualified Data.ByteString.Char8 as B ()
homeBiome :: Species -> Biome
......
{-# LANGUAGE ExistentialQuantification, Rank2Types, ScopedTypeVariables #-}
module Behavior
module Roguestar.Lib.Behavior
(Behavior(..),
facingBehavior,
dbBehave)
where
import Prelude hiding (getContents)
import DB
import Logging
import Position
import Facing
import Roguestar.Lib.DB
import Roguestar.Lib.Logging
import Roguestar.Lib.Position
import Roguestar.Lib.Facing
import Data.Ratio
import Tool
import ToolData
import Roguestar.Lib.Tool
import Roguestar.Lib.ToolData
import Control.Monad.Error
import Combat
import Activate
import Travel
import TravelData
import Creature
import CreatureData
import Plane
import PlaneVisibility
import Roguestar.Lib.Combat
import Roguestar.Lib.Activate
import Roguestar.Lib.Travel
import Roguestar.Lib.TravelData
import Roguestar.Lib.Creature
import Roguestar.Lib.CreatureData
import Roguestar.Lib.Plane
import Roguestar.Lib.PlaneVisibility
import Data.List
import Control.Monad.Maybe
import TerrainData
import Make
import Construction
import Building
import Reference
import DetailedLocation
import Plane
import PlaneData
import Roguestar.Lib.TerrainData
import Roguestar.Lib.Make
import Roguestar.Lib.Construction
import Roguestar.Lib.Building
import Roguestar.Lib.Reference
import Roguestar.Lib.DetailedLocation
import Roguestar.Lib.Plane
import Roguestar.Lib.PlaneData
--
-- Every possible behavior that a creature might take, AI or Human.
......
{-# LANGUAGE ScopedTypeVariables #-}
module Building
module Roguestar.Lib.Building
(buildingSize,
buildingShape,
buildingBehavior,
......@@ -9,20 +9,21 @@ module Building
where
import Prelude hiding (getContents)
import DB
import BuildingData
import Roguestar.Lib.DB
import Roguestar.Lib.BuildingData
import Data.List
import Facing
import Roguestar.Lib.Facing
import Data.Maybe
import Control.Monad.Maybe
import PlaneData
import Plane
import Position
import TerrainData
import Control.Monad.Random
import Roguestar.Lib.PlaneData
import Roguestar.Lib.Plane
import Roguestar.Lib.Position
import Roguestar.Lib.TerrainData
import Control.Monad.Error
import PowerUpData
import CharacterAdvancement
import DetailedLocation
import Roguestar.Lib.PowerUpData
import Roguestar.Lib.CharacterAdvancement
import Roguestar.Lib.DetailedLocation
-- | The total occupied surface area of a building.
buildingSize :: (DBReadable db) => BuildingRef -> db Integer
......
module BuildingData
module Roguestar.Lib.BuildingData
(Building(..),
BuildingBehavior(..),
BuildingShape(..),
......@@ -12,9 +12,9 @@ module BuildingData
buildingOccupies)
where
import PowerUpData
import CharacterData
import PersistantData
import Roguestar.Lib.PowerUpData
import Roguestar.Lib.CharacterData
import Roguestar.Lib.PersistantData
basic_stargate :: BuildingPrototype
basic_stargate = BuildingPrototype (TwoWayStargate NonAlignedRegion) Portal (Just Magnetic)
......
module Character
module Roguestar.Lib.Character
(getEligableCharacterClasses,
getEligableBaseCharacterClasses,
applyCharacterClass)
where
import Alignment
import CharacterData
import CreatureAttribute
import CreatureData
import TerrainData
import Roguestar.Lib.Alignment
import Roguestar.Lib.CharacterData
import Roguestar.Lib.CreatureAttribute
import Roguestar.Lib.CreatureData
import Roguestar.Lib.TerrainData
type Prerequisite = Creature -> Bool
......
module CharacterAdvancement
module Roguestar.Lib.CharacterAdvancement
(CharacterBumpResult(..),
characterFitness,
bumpCharacter,
......@@ -8,9 +8,9 @@ module CharacterAdvancement
where
import qualified Data.Map as Map
import CreatureData
import CharacterData
import PowerUpData
import Roguestar.Lib.CreatureData
import Roguestar.Lib.CharacterData
import Roguestar.Lib.PowerUpData
data CharacterBumpResult =
CharacterAwarded { character_points_awarded :: Integer,
......
module CharacterData
module Roguestar.Lib.CharacterData
(CharacterClass(..),
all_character_classes,
base_character_classes)
where
import PersistantData
import Roguestar.Lib.PersistantData
all_character_classes :: [CharacterClass]
all_character_classes = [minBound..maxBound]
......
{-# LANGUAGE PatternGuards, FlexibleContexts #-}
module Combat
module Roguestar.Lib.Combat
(AttackModel,
meleeAttackModel,
rangedAttackModel,
......@@ -8,18 +8,18 @@ module Combat
executeAttack)
where
import DB
import Creature
import CreatureData
import Tool
import ToolData
import Roguestar.Lib.DB
import Roguestar.Lib.Creature
import Roguestar.Lib.CreatureData
import Roguestar.Lib.Tool
import Roguestar.Lib.ToolData
import Control.Monad.Error
import Facing
import Roguestar.Lib.Facing
import Data.Maybe
import DeviceActivation
import Contact
import Plane
import DetailedLocation
import Roguestar.Lib.DeviceActivation
import Roguestar.Lib.Contact
import Roguestar.Lib.Plane as Plane
import Roguestar.Lib.DetailedLocation
data AttackModel =
RangedAttackModel CreatureRef ToolRef Device
......
{-# LANGUAGE ScopedTypeVariables #-}
-- | All construction (terrain clearing, etc) actions that a creature might take.
module Construction
module Roguestar.Lib.Construction
(modifyFacingTerrain,
clearTerrain)
where
import DB
import Plane
import PlaneData
import TerrainData
import Facing
import Roguestar.Lib.DB
import Roguestar.Lib.Plane
import Roguestar.Lib.PlaneData
import Roguestar.Lib.TerrainData
import Roguestar.Lib.Facing
import Control.Monad
import Control.Monad.Maybe
import Control.Monad.Trans
import Position
import Roguestar.Lib.Position
import Data.Maybe
-- | Modifies terrain in the specified walking direction, returning
......
{-# LANGUAGE FlexibleContexts, ScopedTypeVariables #-}
module Contact
module Roguestar.Lib.Contact
(findContacts,
ContactMode(..),
ContactModeType(..))
where
import Prelude hiding (getContents)
import Position
import Facing
import DB
import Reference
import CreatureData
import Roguestar.Lib.Position as Position
import Roguestar.Lib.Facing
import Roguestar.Lib.DB
import Roguestar.Lib.Reference
import Roguestar.Lib.CreatureData
import Control.Monad
import Plane
import PlaneData
import Roguestar.Lib.Plane
import Roguestar.Lib.PlaneData
import Data.Ord
import Data.List as List
import Data.Maybe
import DetailedLocation
import Roguestar.Lib.DetailedLocation
-- | 'Touch' contacts are on the same or facing square as the subject.
-- 'Line' contacts are on any point starting on the same square and anywhere directly along a line traced in the
......
{-# LANGUAGE TypeFamilies, PatternGuards #-}
module Creature
module Roguestar.Lib.Creature
(generateInitialPlayerCreature,
newCreature,
Roll(..),
......@@ -19,21 +19,21 @@ module Creature
where
import Prelude hiding (getContents)
import CreatureData
import DB
import SpeciesData
import Species
import FactionData
import Roguestar.Lib.CreatureData
import Roguestar.Lib.DB
import Roguestar.Lib.SpeciesData
import Roguestar.Lib.Species
import Roguestar.Lib.FactionData
import Control.Monad.Error
import Tool
import CreatureAttribute
import Roguestar.Lib.Tool
import Roguestar.Lib.CreatureAttribute
import Data.Monoid
import Data.Ratio
import Facing
import Position
import Plane
import PlayerState
import DetailedLocation
import Roguestar.Lib.Facing
import Roguestar.Lib.Position
import Roguestar.Lib.Plane
import Roguestar.Lib.PlayerState
import Roguestar.Lib.DetailedLocation
-- |
-- Generates a new Creature from the specified species.
......
module CreatureAttribute
module Roguestar.Lib.CreatureAttribute
(CreatureAttribute,
CreatureAttributeGenerator,
gender,
CreatureAttribute.attributeStatic,
CreatureAttribute.attributeMinMax,
Roguestar.Lib.CreatureAttribute.attributeStatic,
Roguestar.Lib.CreatureAttribute.attributeMinMax,
AG.attributeChoice,
AG.attributeChoices,
CreatureAttribute.generateAttributes,
Roguestar.Lib.CreatureAttribute.generateAttributes,
(&))
where
import Data.Monoid
import AttributeGeneration as AG
import CreatureData
import Roguestar.Lib.AttributeGeneration as AG
import Roguestar.Lib.CreatureData
import Control.Monad.Random
import FactionData
import SpeciesData
import Roguestar.Lib.FactionData
import Roguestar.Lib.SpeciesData
newtype CreatureAttribute = CreatureAttribute { fromCreatureAttribute :: Endo Creature }
......@@ -31,8 +31,8 @@ type CreatureAttributeGenerator = AttributeGenerator CreatureAttribute
-- Generate a ratio of males to females.
--
gender :: Rational -> CreatureAttributeGenerator
gender r = AG.attributeChoice r [CreatureAttribute.attributeStatic 1 Male]
[CreatureAttribute.attributeStatic 1 Female]
gender r = AG.attributeChoice r [Roguestar.Lib.CreatureAttribute.attributeStatic 1 Male]
[Roguestar.Lib.CreatureAttribute.attributeStatic 1 Female]
attributeStatic :: (CreatureEndo a) => Integer -> a -> CreatureAttributeGenerator
attributeStatic n a = AG.attributeStatic n (CreatureAttribute $ Endo $ applyToCreature a)
......
module CreatureData
module Roguestar.Lib.CreatureData
(Creature(..),
CreatureGender(..),
CreatureAptitude(..),
......@@ -14,15 +14,15 @@ module CreatureData
empty_creature)
where
import CharacterData
import Alignment
import Roguestar.Lib.CharacterData
import Roguestar.Lib.Alignment
import Data.Maybe
import FactionData
import Roguestar.Lib.FactionData
import Data.Monoid
import qualified Data.Map as Map
import qualified Data.Set as Set
import SpeciesData
import TerrainData
import Roguestar.Lib.SpeciesData
import Roguestar.Lib.TerrainData
data Creature = Creature { creature_aptitude :: Map.Map CreatureAptitude Integer,
creature_ability :: Map.Map CreatureAbility Integer,
......
......@@ -6,7 +6,7 @@
ScopedTypeVariables,
TypeFamilies #-}
module DB
module Roguestar.Lib.DB
(DBResult,
DB,
runDB,
......@@ -49,39 +49,39 @@ module DB
dbPeepOldestSnapshot,
dbPopOldestSnapshot,
dbHasSnapshot,
module DBData,
module DBErrorFlag,
module Random)
module Roguestar.Lib.DBData,
module Roguestar.Lib.DBErrorFlag,
module Roguestar.Lib.Random)
where
import Prelude hiding (getContents)
import DBPrivate
import DBData
import Reference
import CreatureData
import PlaneData
import BuildingData
import RNG
import Roguestar.Lib.DBPrivate
import Roguestar.Lib.DBData
import Roguestar.Lib.Reference
import Roguestar.Lib.CreatureData
import Roguestar.Lib.PlaneData
import Roguestar.Lib.BuildingData
import Roguestar.Lib.RNG
import Data.Map as Map
import Data.List as List
import qualified HierarchicalDatabase as HD
import SpeciesData
import qualified Roguestar.Lib.HierarchicalDatabase as HD
import Roguestar.Lib.SpeciesData
import Data.Maybe
import ToolData
import Roguestar.Lib.ToolData
import Control.Monad.State
import Control.Monad.Error
import Control.Monad.Reader
import Control.Applicative
import TimeCoordinate
import Roguestar.Lib.TimeCoordinate
import Data.Ord
import Control.Arrow (first,second)
import Control.Monad.Random as Random
import Random
import PlayerState
import DBErrorFlag
import Roguestar.Lib.Random
import Roguestar.Lib.PlayerState
import Roguestar.Lib.DBErrorFlag
import Control.Parallel.Strategies
import System.IO.Unsafe
import Logging
import Roguestar.Lib.Logging
data DB_History = DB_History {
db_here :: DB_BaseType,
......@@ -430,7 +430,7 @@ setLocation loc =
--
shuntPlane :: (LocationDetail a) => (a -> Bool) -> PlaneRef -> DB ()
shuntPlane f p =
do locations <- liftM (List.filter (maybe False f . fromLocation)) $ DB.getContents p
do locations <- liftM (List.filter (maybe False f . fromLocation)) $ getContents p
mapM_ (maybe (return ()) setLocation . shuntToTheUniverse) locations
-- |
......
{-# LANGUAGE ScopedTypeVariables, PatternGuards, TypeFamilies #-}
module DBData
module Roguestar.Lib.DBData
(Reference,
toUID,
genericReference,
......@@ -30,16 +30,16 @@ module DBData
shuntToTheUniverse)
where
import Facing
import DBPrivate
import ToolData
import CreatureData
import PlaneData
import BuildingData
import Roguestar.Lib.Facing
import Roguestar.Lib.DBPrivate
import Roguestar.Lib.ToolData
import Roguestar.Lib.CreatureData
import Roguestar.Lib.PlaneData
import Roguestar.Lib.BuildingData
import Data.Maybe
import Control.Monad
import Position
import Reference
import Roguestar.Lib.Position
import Roguestar.Lib.Reference
--
-- Getting References generically.
......
module DBErrorFlag
module Roguestar.Lib.DBErrorFlag
(ErrorFlag(..))
where
......
module DBPrivate
module Roguestar.Lib.DBPrivate
(Reference(..),
unsafeReference,
toUID,
......@@ -18,14 +18,14 @@ module DBPrivate
BuildingRef)
where
import HierarchicalDatabase
import Facing
import CreatureData
import ToolData
import PlaneData
import BuildingData
import PlanetData
import Position
import Roguestar.Lib.HierarchicalDatabase
import Roguestar.Lib.Facing
import Roguestar.Lib.CreatureData
import Roguestar.Lib.ToolData
import Roguestar.Lib.PlaneData
import Roguestar.Lib.BuildingData
import Roguestar.Lib.PlanetData
import Roguestar.Lib.Position
--
-- For References and Locations we make considerable use of phantom types
......
{-# LANGUAGE TypeFamilies, EmptyDataDecls, ScopedTypeVariables, PatternGuards, FlexibleContexts #-}
module DetailedLocation
module Roguestar.Lib.DetailedLocation
(DetailedLocation,
PlaneLocation,
BuildingLocation,
......@@ -16,16 +16,16 @@ module DetailedLocation
LocationAssignmentTable)
where
import DBData
import PlaneData
import BuildingData
import ToolData
import CreatureData
import Position
import Roguestar.Lib.DBData
import Roguestar.Lib.PlaneData
import Roguestar.Lib.BuildingData
import Roguestar.Lib.ToolData
import Roguestar.Lib.CreatureData
import Roguestar.Lib.Position
import Data.Maybe
import Control.Monad
import Reference
import Facing
import Roguestar.Lib.Reference
import Roguestar.Lib.Facing
type PlaneLocation = DetailedLocation (Child Plane)
type BuildingLocation = DetailedLocation (Child Building)
......
{-# LANGUAGE TypeFamilies #-}
module DetailedTravel
(DetailedTravel.whereIs,
DetailedTravel.getContents)
module Roguestar.Lib.DetailedTravel
(Roguestar.Lib.DetailedTravel.whereIs,