Remove LDTs from orientations + item shapes
This commit is contained in:
@@ -4,7 +4,7 @@ module Dodge.Item.Draw (
|
||||
itemEquipPict,
|
||||
) where
|
||||
|
||||
import Dodge.DoubleTree
|
||||
import qualified Quaternion as Q
|
||||
import Dodge.Data.Equipment.Misc
|
||||
import Dodge.Data.ComposedItem
|
||||
import Dodge.Data.DoubleTree
|
||||
@@ -16,18 +16,18 @@ import Dodge.Item.Draw.SPic
|
||||
import Dodge.Item.HeldOffset
|
||||
import ShapePicture
|
||||
|
||||
itemEquipPict :: Creature -> LDTree ItemLink CItem -> SPic
|
||||
itemEquipPict :: Creature -> DTree CItem -> SPic
|
||||
itemEquipPict cr itmtree
|
||||
| Just i <- itm ^? itLocation . ilInvID
|
||||
, Just esite <- cr ^? crInv . ix i . itLocation . ilEquipSite . _Just
|
||||
, Just attachpos <- equipAttachPos <$> itm ^? itType . ibtEquip
|
||||
= equipPosition esite cr attachpos (itemSPic itm)
|
||||
| itm ^? itLocation . ilInvID == cr ^? crManipulation . manObject . imRootSelectedItem
|
||||
= overPosSP (heldItemOffset loc cr) (itemTreeSPic $ ldtToDT itmtree)
|
||||
= overPosSP (Q.prePos $ handHandleOrient (loc) cr) (itemTreeSPic $ itmtree)
|
||||
| otherwise = mempty
|
||||
where
|
||||
itm = itmtree ^. ldtValue . _1
|
||||
loc = LocLDT TopLDT itmtree
|
||||
itm = itmtree ^. dtValue . _1
|
||||
loc = LocDT TopDT itmtree
|
||||
|
||||
equipAttachPos :: EquipItemType -> Point3
|
||||
equipAttachPos = \case
|
||||
|
||||
Reference in New Issue
Block a user