74 lines
2.9 KiB
Haskell
74 lines
2.9 KiB
Haskell
{-# OPTIONS_GHC -Wno-unused-imports #-}
|
|
module Dodge.TestString where
|
|
|
|
import Dodge.Data.DoubleTree
|
|
import Dodge.Item.Grammar
|
|
import Dodge.Item.Display
|
|
import AesonHelp
|
|
import Dodge.SmoothScroll
|
|
import HelpNum
|
|
import Dodge.Base.Coordinate
|
|
import Geometry.Vector
|
|
import Data.Maybe
|
|
import Dodge.Render.Lights
|
|
import Data.Aeson (ToJSON)
|
|
import Data.ByteString.Lazy.Char8 (unpack)
|
|
import qualified Data.Aeson.Encode.Pretty as AEP
|
|
import Control.Lens
|
|
import Dodge.Data.Universe
|
|
import qualified IntMapHelp as IM
|
|
|
|
testStringInit :: Universe -> [String]
|
|
testStringInit _ = mempty
|
|
--testStringInit u = fromMaybe mempty $ do
|
|
-- inv <- fmap invLDT $ u ^? uvWorld . cWorld . lWorld . creatures . ix 0 . crInv
|
|
-- return $ concatMap (prettyLDT (\(x,_,_,_) -> take 5 (show $ x ^. itType . iyBase))) inv
|
|
|
|
--testStringInit u = maybe [] invTree (u ^? uvWorld . cWorld . lWorld . creatures . ix 0 . crInv)
|
|
-- [fromMaybe "" $ do
|
|
-- cr <- u ^? uvWorld . cWorld . lWorld . creatures . ix 0
|
|
-- i <- cr ^? crManipulation . manObject . inInventory . ispItem
|
|
-- fmap (show . canAttachTargeting) (cr ^? crInv . ix i)
|
|
-- ]
|
|
|
|
|
|
-- getPrettyShort (u ^? uvWorld . cWorld . lWorld . creatures . ix 0 . crHotkeys)
|
|
-- <> ["---"]
|
|
-- <> getPrettyShort ( u ^? uvWorld . cWorld . lWorld . creatures . ix 0 . crInvHotkeys)
|
|
|
|
-- [show $ u ^. uvWorld . input . smoothScrollAmount
|
|
-- , show $ getSmoothScrollValue (u ^. uvWorld . input)
|
|
-- , show (u ^. uvConfig . windowX) ++ " " ++ show (u ^. uvConfig . windowY)
|
|
-- ]
|
|
-- [show $ length $ lightsToRender (u ^. uvConfig) (u ^. uvWorld . wCam)
|
|
-- (u ^. uvWorld . cWorld . lWorld)
|
|
-- , show a
|
|
-- , show $ u ^. uvWorld . input . mousePos
|
|
-- , show $ u ^. uvConfig . windowX
|
|
-- , show $ u ^. uvConfig . windowY
|
|
-- , show $ u ^. uvWorld . input . scrollTestInt
|
|
-- ]
|
|
-- where
|
|
-- w = u ^. uvWorld
|
|
-- a = fromMaybe 0 $ do
|
|
-- cpos <- w ^? cWorld . lWorld . creatures . ix 0 . crPos
|
|
-- return . toClosestMultiple (pi/ 8) $ argV (mouseWorldPos (w ^. input) (w ^. wCam) -.- cpos)
|
|
-- - w ^. wCam . camRot
|
|
|
|
--[show $ u ^? uvWorld . hud . hudElement . diSections . sssExtra . sssSelPos . _Just]
|
|
-- [show $ fmap IM.keys $ u ^? uvWorld . hud . hudElement . subInventory . ciSections . sssSections]
|
|
|
|
showTimeFlow :: TimeFlowStatus -> String
|
|
showTimeFlow tfs = case tfs of
|
|
DeathTime i -> "DeathTime"++show i
|
|
NormalTimeFlow -> "NormalTimeFlow"
|
|
ItemScrollTimeFlow {_reverseAmount = ra } -> "ItemScrollTimeFlow" ++ show ra
|
|
CameraScrollTimeFlow {_reverseAmount = ra } -> "CameraScrollTimeFlow" ++ show ra
|
|
RewindLeftClick {_reverseAmount = ra } -> "RewindLeftClick" ++ show ra
|
|
PausedTimeFlow {_timeFlowCharge = ra } -> "PausedTimeFlow" ++ show ra
|
|
-- [ show $ u ^? uvScreenLayers . _head . scOffset
|
|
-- ]
|
|
-- ++ [ shortShow $ u ^?! uvWorld . cWorld . lWorld . creatures . ix 0 . crPos
|
|
-- ]
|
|
-- ++ map show (M.toList (u ^. uvWorld . input . pressedKeys))
|