Commit before using item structural function more prominently
This commit is contained in:
@@ -3,10 +3,6 @@ module Dodge.Render.ShapePicture (
|
||||
) where
|
||||
|
||||
import Data.Strict.Tuple
|
||||
import Control.Applicative
|
||||
import Dodge.Data.DoubleTree
|
||||
import Dodge.Data.ComposedItem
|
||||
import Dodge.Item.Grammar
|
||||
import NewInt
|
||||
import Dodge.Render.List
|
||||
import Control.Lens
|
||||
@@ -39,7 +35,6 @@ worldSPic cfig u =
|
||||
<> foldup btSPic (filtOn _btPos _buttons)
|
||||
<> foldup mcSPic (filtOn _mcPos _machines)
|
||||
<> aimDelaySweep w
|
||||
-- <> anyTargeting w
|
||||
where
|
||||
w = _uvWorld u
|
||||
foldup = foldMap'
|
||||
@@ -72,18 +67,6 @@ drawSweep cr w = fromMaybe mempty $ do
|
||||
theinput = w ^. input
|
||||
mwp = mouseWorldPos theinput campos
|
||||
|
||||
-- assume for now that targeting is above the root,
|
||||
-- and the augmented hud is above that
|
||||
anyTargeting :: World -> SPic
|
||||
anyTargeting w = fromMaybe mempty $ do
|
||||
cr <- w ^? cWorld . lWorld . creatures . ix 0
|
||||
itinvid <- cr ^? crManipulation . manObject . imRootItem
|
||||
itmtree <- invTrees (_crInv cr) ^? ix itinvid
|
||||
ttree <- lookup WeaponTargetingLink (itmtree ^. ldtRight)
|
||||
_ <- lookup AugmentedHUDLink (ttree ^. ldtLeft)
|
||||
<|> lookup AugmentedHUDLink (ttree ^. ldtRight)
|
||||
return . noShape $ drawTargeting (ttree ^. ldtValue) w
|
||||
|
||||
drawCreature :: Creature -> SPic
|
||||
drawCreature cr = case _crType cr of
|
||||
Humanoid{} -> basicCrPict cr
|
||||
|
||||
Reference in New Issue
Block a user