Remove unnecessary packages
This commit is contained in:
+5
-5
@@ -22,10 +22,10 @@ description: Description text, TODO link to README.md
|
||||
dependencies:
|
||||
- base >= 4.7 && < 5
|
||||
- containers
|
||||
- strict-containers
|
||||
- strict-containers-lens
|
||||
#- strict-containers
|
||||
#- strict-containers-lens
|
||||
- unordered-containers
|
||||
- bitwise-enum
|
||||
#- bitwise-enum
|
||||
- graphviz
|
||||
- template-haskell
|
||||
#- heap
|
||||
@@ -54,12 +54,12 @@ dependencies:
|
||||
#- store
|
||||
#- binary
|
||||
#- flat
|
||||
- th-utilities
|
||||
#- th-utilities
|
||||
- directory
|
||||
- extra
|
||||
- primitive
|
||||
- streaming
|
||||
- repa
|
||||
#- repa
|
||||
- monad-parallel
|
||||
- parallel
|
||||
- Clipboard
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
module Dodge.LevelGen.Data where
|
||||
|
||||
import Control.Lens
|
||||
import Data.Maybe
|
||||
import Dodge.Data.GenWorld
|
||||
import Geometry
|
||||
|
||||
--spNoID
|
||||
psPtPl :: PlacementSpot -> PSType -> Placement
|
||||
psPtPl ps pst = Placement 10 ps pst Nothing (const . const Nothing)
|
||||
|
||||
psPtJpl :: PlacementSpot -> PSType -> Maybe Placement
|
||||
psPtJpl ps = Just . psPtPl ps
|
||||
|
||||
pContID :: PlacementSpot -> PSType -> (Int -> Maybe Placement) -> Placement
|
||||
pContID ps pt = Placement 10 ps pt Nothing . contToIDCont
|
||||
|
||||
psPtCont :: PlacementSpot -> PSType -> (Placement -> Maybe Placement) -> Placement
|
||||
psPtCont ps pt = Placement 10 ps pt Nothing . const
|
||||
|
||||
ptCont :: PSType -> (Placement -> Maybe Placement) -> Placement
|
||||
ptCont = psPtCont (PS 0 0)
|
||||
|
||||
psPt :: PlacementSpot -> PSType -> Placement
|
||||
psPt ps pt = Placement 10 ps pt Nothing (const . const Nothing)
|
||||
|
||||
sPS :: Point2 -> Float -> PSType -> Placement
|
||||
sPS p a pt = Placement 10 (PS p a) pt Nothing (const . const Nothing)
|
||||
|
||||
sps :: PlacementSpot -> PSType -> Placement
|
||||
sps ps pt = Placement 10 ps pt Nothing (const . const Nothing)
|
||||
|
||||
plRRpt :: Int -> PSType -> Placement
|
||||
plRRpt i pt = Placement 10 (PSRoomRand i (uncurry PS)) pt Nothing (const . const Nothing)
|
||||
|
||||
jsps :: Point2 -> Float -> PSType -> Maybe Placement
|
||||
jsps p a pst = Just $ Placement 10 (PS p a) pst Nothing $ const . const Nothing
|
||||
|
||||
jsps0 :: PSType -> Maybe Placement
|
||||
jsps0 = Just . sPS (V2 0 0) 0
|
||||
|
||||
sps0 :: PSType -> Placement
|
||||
sps0 = sPS (V2 0 0) 0
|
||||
|
||||
jspsJ :: Point2 -> Float -> PSType -> Placement -> Maybe Placement
|
||||
jspsJ p a pst plm = Just $ Placement 10 (PS p a) pst Nothing $ \_ _ -> Just plm
|
||||
|
||||
jsps0J :: PSType -> Placement -> Maybe Placement
|
||||
jsps0J pst plm = Just $ Placement 10 (PS (V2 0 0) 0) pst Nothing $ \_ _ -> Just plm
|
||||
|
||||
ps0 :: PSType -> (Int -> Maybe Placement) -> Placement
|
||||
ps0 pst = Placement 10 (PS (V2 0 0) 0) pst Nothing . contToIDCont
|
||||
|
||||
pt0 :: PSType -> (Placement -> Maybe Placement) -> Placement
|
||||
pt0 pst = Placement 10 (PS (V2 0 0) 0) pst Nothing . const
|
||||
|
||||
contToIDCont :: (Int -> Maybe Placement) -> World -> Placement -> Maybe Placement
|
||||
contToIDCont f _ = f . fromJust . _plMID
|
||||
|
||||
jps0' :: PSType -> (Placement -> Maybe Placement) -> Maybe Placement
|
||||
jps0' pst = Just . Placement 10 (PS (V2 0 0) 0) pst Nothing . const
|
||||
|
||||
jps0PushPS :: PSType -> (Int -> Maybe Placement) -> Maybe Placement
|
||||
jps0PushPS pst f = Just . Placement 10 (PSNoShiftCont (V2 0 0) 0) pst Nothing $
|
||||
\_ plmnt -> f (fromJust $ _plMID plmnt) <&> plSpot .~ _plSpot plmnt
|
||||
|
||||
ps0j :: PSType -> Placement -> Placement
|
||||
ps0j pst plmnt = Placement 10 (PS (V2 0 0) 0) pst Nothing (\_ -> const $ Just plmnt)
|
||||
|
||||
psj :: PlacementSpot -> PSType -> Placement -> Placement
|
||||
psj ps pst plmnt = Placement 10 ps pst Nothing (\_ -> const $ Just plmnt)
|
||||
|
||||
-- the NoShiftCont is necessary when shifting then combining rooms
|
||||
ps0jPushPS :: PSType -> Placement -> Placement
|
||||
ps0jPushPS pst plmnt = Placement 10 (PSNoShiftCont (V2 0 0) 0) pst Nothing $
|
||||
\_ p -> Just $ plmnt & plSpot .~ _plSpot p
|
||||
|
||||
-- the NoShiftCont is necessary when shifting then combining rooms
|
||||
ps0PushPS :: PSType -> (Placement -> Maybe Placement) -> Placement
|
||||
ps0PushPS pst f = Placement 10 (PSNoShiftCont (V2 0 0) 0) pst Nothing $
|
||||
\_ pl -> f pl & _Just . plSpot %~ const (_plSpot pl)
|
||||
|
||||
ps0PushPSw :: PSType -> (World -> Placement -> Maybe Placement) -> Placement
|
||||
ps0PushPSw pst f = Placement 10 (PSNoShiftCont (V2 0 0) 0) pst Nothing $
|
||||
\w pl -> f w pl & _Just . plSpot %~ const (_plSpot pl)
|
||||
|
||||
addPlmnt :: Placement -> Placement -> Placement
|
||||
addPlmnt pl pl2 = case pl2 of
|
||||
(PlacementUsingPos p f) -> PlacementUsingPos p (fmap (addPlmnt pl) f)
|
||||
(RandomPlacement rp) -> RandomPlacement $ fmap (addPlmnt pl) rp
|
||||
(Placement i ps pt mi f) -> Placement i ps pt mi (fmap (fmap g) f)
|
||||
PickOnePlacement{} -> error "not written how to combine PickOnePlacement with others yet"
|
||||
where
|
||||
g Nothing = Just pl
|
||||
g (Just pl') = Just $ addPlmnt pl pl'
|
||||
@@ -1,12 +1,12 @@
|
||||
module Dodge.LevelGen.LevelStructure (
|
||||
module Dodge.LevelGen.Data,
|
||||
module Dodge.LevelGen.PlacementHelper,
|
||||
worldToGenWorld,
|
||||
) where
|
||||
|
||||
import Color
|
||||
import qualified Data.Map.Strict as M
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import qualified IntMapHelp as IM
|
||||
import LensHelp
|
||||
import RandomHelp
|
||||
|
||||
@@ -3,7 +3,7 @@ module Dodge.LevelGen.SwarmPlacement
|
||||
)
|
||||
where
|
||||
--import Dodge.Data
|
||||
--import Dodge.LevelGen.Data
|
||||
--import Dodge.LevelGen.PlacementHelper
|
||||
--import Dodge.Creature.State.Data
|
||||
----import Geometry
|
||||
--import Geometry.ConvexPoly
|
||||
|
||||
@@ -4,7 +4,7 @@ import Color
|
||||
import Control.Lens
|
||||
import Data.Maybe
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import Dodge.LevelGen.Switch
|
||||
import Dodge.LightSource
|
||||
import Dodge.Placement.Instance.LightSource
|
||||
|
||||
@@ -10,7 +10,7 @@ import Control.Lens
|
||||
import Dodge.Data.CreatureEffect
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.Default.Door
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import Dodge.LevelGen.Switch
|
||||
import Geometry
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import Data.Maybe
|
||||
import Dodge.Creature.Inanimate
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.Default
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import Dodge.LightSource
|
||||
import Dodge.Room.Foreground
|
||||
import Geometry
|
||||
|
||||
@@ -3,7 +3,7 @@ module Dodge.Placement.Instance.LightSource.Flicker where
|
||||
import Control.Lens
|
||||
import Data.Maybe
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import System.Random
|
||||
|
||||
-- Supposes the orginal placement is a light source, adds a flicker
|
||||
|
||||
@@ -8,7 +8,7 @@ import Control.Lens
|
||||
import qualified Data.Map.Strict as M
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.Default
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import Dodge.LightSource
|
||||
import Geometry
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ module Dodge.Placement.Instance.Tank (
|
||||
|
||||
import Color
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import Dodge.Placement.Instance.Block
|
||||
import Dodge.Room.Foreground
|
||||
import Geometry
|
||||
|
||||
@@ -8,7 +8,7 @@ import Color
|
||||
import Data.Maybe
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.Default
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import Dodge.SoundLogic
|
||||
import Geometry
|
||||
import LensHelp
|
||||
|
||||
@@ -4,7 +4,7 @@ import Dodge.Item.Held.BatteryGuns
|
||||
import Color
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.Default
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import Geometry
|
||||
import LensHelp
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import Data.List
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.Default.Block
|
||||
import Dodge.Default.Wall
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import Dodge.Placement.Instance.Block
|
||||
import Geometry
|
||||
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@ module Dodge.Room (
|
||||
module Dodge.Room.RoadBlock,
|
||||
module Dodge.Room.LasTurret,
|
||||
module Dodge.Room.Foreground,
|
||||
module Dodge.LevelGen.Data,
|
||||
module Dodge.LevelGen.PlacementHelper,
|
||||
module Dodge.Room.Procedural,
|
||||
module Dodge.Room.Corridor,
|
||||
module Dodge.Room.Link,
|
||||
@@ -28,7 +28,7 @@ module Dodge.Room (
|
||||
module Dodge.Room.Pillar,
|
||||
) where
|
||||
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import Dodge.Room.Airlock
|
||||
import Dodge.Room.BlinkAcross
|
||||
import Dodge.Room.Boss
|
||||
|
||||
@@ -6,7 +6,7 @@ module Dodge.Room.Airlock where
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.Default.Door
|
||||
import Dodge.Default.Room
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import Dodge.LevelGen.Switch
|
||||
import Dodge.Placement.Instance
|
||||
import Dodge.Room.Foreground
|
||||
|
||||
@@ -4,7 +4,7 @@ module Dodge.Room.Boss where
|
||||
import Dodge.Creature
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.Default.Room
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import Dodge.LevelGen.StaticWalls
|
||||
import Dodge.Placement.Instance
|
||||
import Dodge.Room.Corridor
|
||||
|
||||
@@ -4,7 +4,7 @@ module Dodge.Room.Containing where
|
||||
import Dodge.Cleat
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.Item.Display
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import Dodge.PlacementSpot
|
||||
import Dodge.Room.Link
|
||||
import Dodge.Room.Ngon
|
||||
|
||||
@@ -7,7 +7,7 @@ import Dodge.Cleat
|
||||
import Dodge.Creature
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.Default.Wall
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import Dodge.Placement.Instance
|
||||
import Dodge.Room.Corridor
|
||||
import Dodge.Room.Door
|
||||
|
||||
@@ -5,7 +5,7 @@ import Dodge.Cleat
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.Default.Room
|
||||
import Dodge.Item.Consumable
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import Dodge.Placement.Instance
|
||||
import Dodge.Placement.Instance.Analyser
|
||||
import Dodge.PlacementSpot
|
||||
|
||||
@@ -9,7 +9,7 @@ import Dodge.Creature
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.Default.Door
|
||||
import Dodge.Default.Room
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import Dodge.LightSource
|
||||
import Dodge.Placement.Instance
|
||||
import Dodge.PlacementSpot
|
||||
|
||||
@@ -6,7 +6,7 @@ import Dodge.Cleat
|
||||
import Dodge.Creature
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.Default.Wall
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import Dodge.Placement.Instance
|
||||
import Dodge.Room.Corridor
|
||||
import Dodge.Room.Door
|
||||
|
||||
@@ -13,7 +13,7 @@ import Data.List (nub)
|
||||
import Data.Maybe
|
||||
import qualified Data.Set as S
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import Dodge.LightSource
|
||||
import Dodge.PlacementSpot
|
||||
import Dodge.Room.Foreground
|
||||
|
||||
@@ -6,7 +6,7 @@ module Dodge.Room.NoNeedWeapon (
|
||||
import Control.Lens
|
||||
import Dodge.Creature
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import Dodge.Room.Procedural
|
||||
import Geometry.Data
|
||||
import RandomHelp
|
||||
|
||||
@@ -4,7 +4,7 @@ import qualified Data.Set as S
|
||||
import Dodge.Cleat
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.Default.Block
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import Dodge.Placement.Instance
|
||||
import Dodge.PlacementSpot
|
||||
import Dodge.Room.Link
|
||||
|
||||
@@ -16,7 +16,7 @@ import Dodge.Creature
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.Default.Door
|
||||
import Dodge.Default.Room
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import Dodge.LevelGen.Switch
|
||||
import Dodge.Placement.Instance
|
||||
import Dodge.Placement.Shift
|
||||
|
||||
@@ -4,7 +4,7 @@ import qualified Data.Set as S
|
||||
import Dodge.Cleat
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.Item.Random
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import Dodge.LightSource
|
||||
import Dodge.Placement.Instance
|
||||
import Dodge.Room.Corridor
|
||||
|
||||
@@ -8,7 +8,7 @@ import Dodge.Data.GenWorld
|
||||
import Dodge.Default.Block
|
||||
import Dodge.Default.Room
|
||||
import Dodge.Default.Wall
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import Dodge.Placement.Instance
|
||||
import Dodge.Room.Corridor
|
||||
import Dodge.Room.Link
|
||||
|
||||
@@ -16,7 +16,7 @@ import Dodge.Creature
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.Default.Room
|
||||
import Dodge.Item.Display
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import Dodge.Placement.Instance
|
||||
import Dodge.Placement.Random
|
||||
import Dodge.PlacementSpot
|
||||
|
||||
@@ -7,7 +7,7 @@ import qualified Data.Set as S
|
||||
import Dodge.Cleat
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.Item.Random
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import Dodge.LightSource
|
||||
import Dodge.Placement.Instance
|
||||
import Dodge.PlacementSpot
|
||||
|
||||
@@ -7,7 +7,7 @@ import qualified Data.Set as S
|
||||
import Dodge.Annotation.Data
|
||||
import Dodge.Cleat
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import Dodge.Placement.Instance
|
||||
import Dodge.PlacementSpot
|
||||
import Dodge.Room.Corridor
|
||||
|
||||
@@ -11,7 +11,7 @@ import Dodge.Cleat
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.Item.Craftable
|
||||
import Dodge.Item.Weapon
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import Dodge.Room.Containing
|
||||
import Dodge.Room.Corridor
|
||||
import Dodge.Room.Door
|
||||
@@ -20,7 +20,7 @@ import Dodge.Room.RezBox
|
||||
import Dodge.Room.Room
|
||||
import Dodge.Room.RunPast
|
||||
import Dodge.Tree
|
||||
--import Dodge.LevelGen.Data
|
||||
--import Dodge.LevelGen.PlacementHelper
|
||||
--import Geometry.Data
|
||||
--import Padding
|
||||
--import Shape
|
||||
|
||||
@@ -2,7 +2,7 @@ module Dodge.Room.Tanks where
|
||||
import Color
|
||||
import Dodge.Base.CardinalPoint
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import Dodge.Placement.Instance
|
||||
import Dodge.Placement.Instance.Pipe
|
||||
import Dodge.Placement.TopDecoration
|
||||
|
||||
@@ -4,7 +4,7 @@ module Dodge.Room.Teleport where
|
||||
import Control.Lens
|
||||
import Control.Monad.State
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import Dodge.Placement.Instance
|
||||
import Dodge.Room.Procedural
|
||||
import Geometry
|
||||
|
||||
@@ -7,7 +7,7 @@ module Dodge.Room.Treasure where
|
||||
import Control.Monad.State
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.Default.Room
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import Dodge.Placement.Instance
|
||||
import Dodge.RoomLink
|
||||
import Geometry
|
||||
|
||||
+4
-3
@@ -12,7 +12,7 @@ import Dodge.Concurrent
|
||||
import Control.Lens
|
||||
import Dodge.Data.SaveSlot
|
||||
import Data.Aeson
|
||||
import qualified Data.Aeson.Encode.Pretty as AEP
|
||||
--import qualified Data.Aeson.Encode.Pretty as AEP
|
||||
import qualified Data.ByteString.Lazy as BS
|
||||
--import qualified Data.ByteString as BSS
|
||||
import Dodge.Data.Universe
|
||||
@@ -25,8 +25,9 @@ writeSaveSlot ss u = do
|
||||
putStrLn $ "Saving " ++ saveSlotPath ss
|
||||
createDirectoryIfMissing True "saveSlot"
|
||||
BS.writeFile (saveSlotPath ss) $
|
||||
AEP.encodePretty'
|
||||
(AEP.Config (AEP.Spaces 2) compare AEP.Generic False)
|
||||
--AEP.encodePretty'
|
||||
-- (AEP.Config (AEP.Spaces 2) compare AEP.Generic False)
|
||||
encode
|
||||
(u ^. uvWorld . cWorld)
|
||||
return Just
|
||||
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
module MapHelp
|
||||
( module Data.Strict.Map
|
||||
) where
|
||||
import Data.Strict.Map
|
||||
Reference in New Issue
Block a user