Start removing tweakables
This commit is contained in:
+49
-17
@@ -71,7 +71,8 @@ drawSubInventory :: SubInventory -> Configuration -> World -> Picture
|
||||
drawSubInventory subinv cfig w = case subinv of
|
||||
LockedInventory -> mempty -- topInvCursor col cursPos cfig w
|
||||
NoSubInventory -> drawRBOptions cfig w
|
||||
ExamineInventory mtweaki -> drawExamineInventory cfig mtweaki w
|
||||
--ExamineInventory mtweaki -> drawExamineInventory cfig mtweaki w
|
||||
ExamineInventory -> drawExamineInventory cfig w
|
||||
DisplayTerminal tid -> displayTerminal tid cfig (w ^. cWorld . lWorld)
|
||||
CombineInventory{_ciSections = sss} -> drawCombineInventory cfig sss w
|
||||
|
||||
@@ -80,16 +81,46 @@ drawCombineInventory cfig sss w =
|
||||
invHead cfig "COMBINE"
|
||||
<> drawSelectionSections sss secondColumnParams cfig
|
||||
<> combineInventoryExtra sss cfig w
|
||||
--drawExamineInventory :: Configuration -> Maybe Int -> World -> Picture
|
||||
--drawExamineInventory cfig mtweaki w =
|
||||
-- invHead cfig "EXAMINE"
|
||||
-- <> examineInventoryExtra mtweaki cfig
|
||||
-- <> drawSelectionList
|
||||
-- secondColumnParams
|
||||
-- cfig
|
||||
-- ( defaultSelectionList & slItems .~ tweakItems itm
|
||||
-- ++ map
|
||||
-- f
|
||||
-- ( makeParagraph 55 $
|
||||
-- yourAugmentedItem
|
||||
-- itemInfo
|
||||
-- (yourInfo (you w))
|
||||
-- (closeObjectInfo (crNumFreeSlots (you w)))
|
||||
-- w
|
||||
-- )
|
||||
-- )
|
||||
-- where
|
||||
-- itm = yourSelectedItem w
|
||||
-- f str =
|
||||
-- SelectionItem
|
||||
-- { _siPictures = [str]
|
||||
-- , _siHeight = 1
|
||||
-- , _siIsSelectable = True
|
||||
-- , _siColor = white
|
||||
-- , _siOffX = 0
|
||||
-- , _siPayload = ()
|
||||
-- }
|
||||
|
||||
drawExamineInventory :: Configuration -> Maybe Int -> World -> Picture
|
||||
drawExamineInventory cfig mtweaki w =
|
||||
drawExamineInventory :: Configuration -> World -> Picture
|
||||
drawExamineInventory cfig w =
|
||||
invHead cfig "EXAMINE"
|
||||
<> examineInventoryExtra mtweaki cfig
|
||||
-- <> examineInventoryExtra mtweaki cfig
|
||||
<> drawSelectionList
|
||||
secondColumnParams
|
||||
cfig
|
||||
( defaultSelectionList & slItems .~ tweakItems itm
|
||||
++ map
|
||||
( defaultSelectionList & slItems .~ -- tweakItems itm
|
||||
-- ++
|
||||
map
|
||||
f
|
||||
( makeParagraph 55 $
|
||||
yourAugmentedItem
|
||||
@@ -100,7 +131,7 @@ drawExamineInventory cfig mtweaki w =
|
||||
)
|
||||
)
|
||||
where
|
||||
itm = yourSelectedItem w
|
||||
-- itm = yourSelectedItem w
|
||||
f str =
|
||||
SelectionItem
|
||||
{ _siPictures = [str]
|
||||
@@ -178,13 +209,13 @@ drawRBOptions cfig w = fromMaybe mempty $ do
|
||||
itm <- you w ^? crInv . ix j
|
||||
return $ itemBaseName itm
|
||||
|
||||
examineInventoryExtra :: Maybe Int -> Configuration -> Picture
|
||||
examineInventoryExtra mtweaki cfig = fromMaybe mempty $ do
|
||||
tweaki <- mtweaki
|
||||
return $
|
||||
toTopLeft cfig $
|
||||
translate subInvX (-71) $
|
||||
listCursorChooseBorderScale 0 1 [North, South, West] tweaki 0 white 10 1
|
||||
--examineInventoryExtra :: Maybe Int -> Configuration -> Picture
|
||||
--examineInventoryExtra mtweaki cfig = fromMaybe mempty $ do
|
||||
-- tweaki <- mtweaki
|
||||
-- return $
|
||||
-- toTopLeft cfig $
|
||||
-- translate subInvX (-71) $
|
||||
-- listCursorChooseBorderScale 0 1 [North, South, West] tweaki 0 white 10 1
|
||||
|
||||
inventoryExtra :: SelectionSections () -> Configuration -> World
|
||||
-> IM.IntMap (Maybe (Int,Int),[Int],[Int]) -> Picture
|
||||
@@ -286,9 +317,10 @@ tweakItems :: Maybe Item -> [SelectionItem ()]
|
||||
tweakItems = textSelItems . ammoTweakStrings
|
||||
|
||||
ammoTweakStrings :: Maybe Item -> [String]
|
||||
ammoTweakStrings it = case it ^? _Just . itTweaks . tweakParams of
|
||||
Just l -> map tweakString $ IM.elems l
|
||||
_ -> ["NOT TWEAKABLE"]
|
||||
ammoTweakStrings _ = []-- case it ^? _Just . itTweaks . tweakParams of
|
||||
--ammoTweakStrings it = case it ^? _Just . itTweaks . tweakParams of
|
||||
-- Just l -> map tweakString $ IM.elems l
|
||||
-- _ -> ["NOT TWEAKABLE"]
|
||||
|
||||
tweakString :: TweakParam -> String
|
||||
tweakString tp = rightPad 12 ' ' (show $ _tweakType tp) ++ " " ++ showTweak tp
|
||||
|
||||
Reference in New Issue
Block a user