Make launcherX use multiple ammo sources
This commit is contained in:
+9
-13
@@ -1,19 +1,22 @@
|
||||
module Dodge.Base.You where
|
||||
module Dodge.Base.You
|
||||
(you
|
||||
, yourScopeInvID
|
||||
, yourInv
|
||||
, yourScrollAttachment
|
||||
, yourItem
|
||||
)where
|
||||
|
||||
import Dodge.Data.World
|
||||
import Dodge.HeldScroll
|
||||
import qualified IntMapHelp as IM
|
||||
import qualified Data.Map.Strict as M
|
||||
--import qualified Data.Map.Strict as M
|
||||
import Control.Lens
|
||||
import Control.Monad
|
||||
import Data.Maybe
|
||||
--import Data.Maybe
|
||||
|
||||
you :: World -> Creature
|
||||
you w = w ^?! cWorld . lWorld . creatures . ix 0
|
||||
|
||||
youc :: CWorld -> Creature
|
||||
youc w = w ^?! lWorld . creatures . ix 0
|
||||
|
||||
yourItem :: World -> Maybe Item
|
||||
yourItem w = do
|
||||
i <- you w ^? crManipulation . manObject . inInventory . ispItem
|
||||
@@ -36,13 +39,6 @@ yourScopeInvID w = do
|
||||
yourInv :: World -> IM.IntMap Item
|
||||
yourInv = _crInv . you
|
||||
|
||||
attachmentTree :: Creature -> M.Map AttachType Int
|
||||
attachmentTree cr = fromMaybe mempty $ do
|
||||
i <- cr ^? crManipulation . manObject . inInventory . ispItem
|
||||
return $ upDownAttachments cr i i mempty
|
||||
|
||||
upDownAttachments :: Creature -> Int -> Int -> M.Map AttachType Int -> M.Map AttachType Int
|
||||
upDownAttachments _ _ _ s = s
|
||||
|
||||
--yourInvSel :: World -> Int
|
||||
--yourInvSel = crSel . you
|
||||
|
||||
Reference in New Issue
Block a user