roguestar-engine 0.6.0.0 → 0.6.0.1
raw patch · 3 files changed
+25/−22 lines, 3 filesdep ~bytestringdep ~containersdep ~hslogger
Dependency ranges changed: bytestring, containers, hslogger, mtl, parallel, priority-sync, stm
Files
- roguestar-engine.cabal +21/−18
- src/DB.hs +2/−2
- src/Protocol.hs +2/−2
roguestar-engine.cabal view
@@ -1,18 +1,10 @@ name: roguestar-engine-version: 0.6.0.0-cabal-version: -any+version: 0.6.0.1+cabal-version: >=1.2 build-type: Simple license: OtherLicense license-file: LICENSE maintainer: Christopher Lane Hinson <lane@downstairspeople.org>-build-depends: hslogger >=1.1.0 && <1.2,- priority-sync >=0.2.1.0 && <0.3, PSQueue >=1.1 && <1.2,- bytestring >=0.9.1.5 && <0.10, parallel >=2.2.0.1 && <2.3,- stm >=2.1.1.2 && <2.2, data-memocombinators >=0.4.0 && <0.5,- MonadRandom >=0.1.4 && <0.2, MaybeT >=0.1.2 && <0.2,- mtl >=1.1.0.2 && <1.2, random >=1.0.0.2 && <1.1,- old-time >=1.0.0.3 && <1.1, array >=0.3.0.0 && <0.3.1,- containers >=0.3.0.0 && <0.3.1, base >=4 && <5 homepage: http://roguestar.downstairspeople.org/ synopsis: Sci-fi roguelike game. Backend. description: Requires roguestar and roguestar-glut.@@ -20,11 +12,18 @@ author: Christopher Lane Hinson tested-with: GHC ==6.12.1 -executable: roguestar-engine-main-is: Main.hs-pkgconfig-depends:-hs-source-dirs: src-other-modules: TravelData VisibilityData Stats FactionData Behavior+executable roguestar-engine+ main-is: Main.hs+ hs-source-dirs: src+ build-depends: hslogger >=1.1.0 ,+ priority-sync >=0.2.1.1 && <0.3, PSQueue >=1.1 && <1.2,+ bytestring >=0.9.1.5, parallel >=2.2.0.1 ,+ stm >=2.1.1.2, data-memocombinators >=0.4.0 && <0.5,+ MonadRandom >=0.1.4 && <0.2, MaybeT >=0.1.2 && <0.2,+ mtl >=1.1.0.2, random >=1.0.0.2 && <1.1,+ old-time >=1.0.0.3 && <1.1, array >=0.3.0.0 && <0.3.1,+ containers >=0.3.0.0, base >=4 && <5+ other-modules: TravelData VisibilityData Stats FactionData Behavior Alignment PlaneData Grids Perception PlaneVisibility Turns Plane CreatureData StatsData Protocol Character Tool Substances HierarchicalDatabase Travel ToolData CharacterData Creature Facing@@ -34,6 +33,10 @@ Random PlayerState MakeData DBErrorFlag Construction Make Activate Contact DeviceActivation WorkCluster Planet PlanetData Logging NodeData CharacterAdvancement-ghc-prof-options: -prof -auto-all-ghc-shared-options: -prof -auto-all-ghc-options: -threaded -fno-warn-type-defaults+ ghc-prof-options: -prof -auto-all+ ghc-shared-options: -prof -auto-all+ if impl(ghc >= 7.0)+ ghc-options: -threaded -fno-warn-type-defaults -rtsopts=all+ else+ ghc-options: -threaded -fno-warn-type-defaults+
src/DB.hs view
@@ -192,9 +192,9 @@ sortByRO :: (DBReadable db,Ord b) => (forall m. DBReadable m => a -> m b) -> [a] -> db [a] sortByRO f xs =- liftM (List.map fst . sortBy (comparing snd)) $ flip mapRO xs $ \x ->+ liftM (List.map fst . sortBy (comparing snd)) $ mapRO (\x -> do y <- f x- return (x,y)+ return (x,y)) xs -- | Run action synthesized from a read-only action (prepare-execute pattern). atomic :: (x -> DB ()) -> (forall m. DBReadable m => m x) -> DB x
src/Protocol.hs view
@@ -352,11 +352,11 @@ do maybe_plane_ref <- dbGetCurrentPlane (visibles :: [Reference ()]) <- maybe (return [])- (flip dbGetVisibleObjectsForFaction Player $ \ref ->+ (dbGetVisibleObjectsForFaction (\ref -> do let f = (== uid) . B.pack . show . toUID let m_wielder = coerceReference ref m_wield <- maybe (return Nothing) dbGetWielded m_wielder- return $ maybe False f m_wield || f ref)+ return $ maybe False f m_wield || f ref) Player) maybe_plane_ref let creature_refs = mapMaybe (coerceReferenceTyped _creature) visibles wielded <- liftM catMaybes $ mapM dbGetWielded creature_refs