Fix more item bugs
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
{-# OPTIONS_GHC -Wno-unused-imports #-}
|
||||
module Dodge.TestString where
|
||||
|
||||
import Data.List ((\\))
|
||||
import ShortShow
|
||||
import Geometry
|
||||
import qualified SDL
|
||||
@@ -30,13 +31,14 @@ import NewInt
|
||||
import Data.Foldable
|
||||
|
||||
testStringInit :: Universe -> [String]
|
||||
testStringInit u = map f (IM.elems $ u ^. uvWorld . cWorld . lWorld . items)
|
||||
testStringInit u = map f (IM.toList $ u ^. uvWorld . cWorld . lWorld . items)
|
||||
<> ["---"]
|
||||
<> map show (IM.toList . fold $ u ^? uvWorld . cWorld . lWorld . creatures . ix 0 . crInv)
|
||||
<> ["---"]
|
||||
<> map show (IM.keys $ u ^. uvWorld . cWorld . lWorld . floorItems)
|
||||
|
||||
where
|
||||
f itm = show (itm ^. itID . unNInt) <> ":"<> show (itm ^. itLocation)
|
||||
f (i,itm) = show i <> ":" <> show (itm ^. itID . unNInt) <> ":"<> shortShow (itm ^. itLocation)
|
||||
-- map shortShow (u ^.. uvWorld . cWorld . lWorld . debris . each . to g)
|
||||
-- where
|
||||
-- g db = (pz,z,norm v)
|
||||
|
||||
Reference in New Issue
Block a user