Make Nearby Items subheading disappear if none nearby/not filtering
This commit is contained in:
@@ -37,7 +37,6 @@ crMvByNoStride p lw cr = crMvAbsoluteNoStride lw (rotateV (_crDir cr) p) cr
|
|||||||
|
|
||||||
crMvAbsolute :: LWorld -> Point2 -> Creature -> Creature
|
crMvAbsolute :: LWorld -> Point2 -> Creature -> Creature
|
||||||
crMvAbsolute lw p' cr =
|
crMvAbsolute lw p' cr =
|
||||||
-- advanceStepCounter (magV p)
|
|
||||||
cr
|
cr
|
||||||
& crPos . _xy +~ p
|
& crPos . _xy +~ p
|
||||||
& crMvDir .~ argV p
|
& crMvDir .~ argV p
|
||||||
@@ -58,14 +57,6 @@ strengthFactor i
|
|||||||
crMvForward :: Float -> LWorld -> Creature -> Creature
|
crMvForward :: Float -> LWorld -> Creature -> Creature
|
||||||
crMvForward speed = crMvBy (V2 speed 0)
|
crMvForward speed = crMvBy (V2 speed 0)
|
||||||
|
|
||||||
advanceStepCounter :: Float -> Creature -> Creature
|
|
||||||
advanceStepCounter speed cr = cr & crStance . carriage %~ f
|
|
||||||
where
|
|
||||||
f car = case car of
|
|
||||||
Standing -> f (Walking 0 RightForward)
|
|
||||||
Walking i ff -> Walking (min (cr ^. crStance . strideLength) (i + speed)) ff
|
|
||||||
_ -> car
|
|
||||||
|
|
||||||
creatureTurnTo :: Point2 -> Creature -> Creature
|
creatureTurnTo :: Point2 -> Creature -> Creature
|
||||||
creatureTurnTo p cr
|
creatureTurnTo p cr
|
||||||
| vToTarg == V2 0 0 = cr -- this should deal with the angleVV error
|
| vToTarg == V2 0 0 = cr -- this should deal with the angleVV error
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ data Stance = Stance
|
|||||||
|
|
||||||
data Carriage
|
data Carriage
|
||||||
= Walking {_strideAmount :: Float, _currentFoot :: FootForward}
|
= Walking {_strideAmount :: Float, _currentFoot :: FootForward}
|
||||||
| Standing
|
|
||||||
| Floating
|
| Floating
|
||||||
| Flying
|
| Flying
|
||||||
| Boosting Point2
|
| Boosting Point2
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ updateDisplaySections w cfig =
|
|||||||
, sinv
|
, sinv
|
||||||
, IM.singleton 0 $
|
, IM.singleton 0 $
|
||||||
SelItem [displayFreeSlots (crNumFreeSlots (w ^. cWorld . lWorld . items) cr)] 1 15 True invDimColor 2 Nothing NoSIDisplayMod
|
SelItem [displayFreeSlots (crNumFreeSlots (w ^. cWorld . lWorld . items) cr)] 1 15 True invDimColor 2 Nothing NoSIDisplayMod
|
||||||
, sfclose
|
, sfclose1
|
||||||
, sclose
|
, sclose
|
||||||
, interfaceshead
|
, interfaceshead
|
||||||
, btitems
|
, btitems
|
||||||
@@ -137,6 +137,9 @@ updateDisplaySections w cfig =
|
|||||||
filterSectionsPair invfiltcurs plainRegex invitems "INVENTORY" $
|
filterSectionsPair invfiltcurs plainRegex invitems "INVENTORY" $
|
||||||
w ^? hud . diInvFilter . _Just
|
w ^? hud . diInvFilter . _Just
|
||||||
closefiltcurs = mselpos ^? _Just . slSec == Just 2
|
closefiltcurs = mselpos ^? _Just . slSec == Just 2
|
||||||
|
sfclose1
|
||||||
|
| null sclose && sfclose ^? ix 0 . siIsSelectable == Just False = mempty
|
||||||
|
| otherwise = sfclose
|
||||||
(sfclose, sclose) =
|
(sfclose, sclose) =
|
||||||
filterSectionsPair closefiltcurs plainRegex closeitms "NEARBY ITEMS" $
|
filterSectionsPair closefiltcurs plainRegex closeitms "NEARBY ITEMS" $
|
||||||
w ^? hud . diCloseFilter . _Just
|
w ^? hud . diCloseFilter . _Just
|
||||||
|
|||||||
Reference in New Issue
Block a user