Globally assign attachment orientations
This commit is contained in:
@@ -5,6 +5,7 @@ module Dodge.Item.Draw.SPic (
|
||||
itemTreeSPic,
|
||||
) where
|
||||
|
||||
import Dodge.Item.Orientation
|
||||
import Dodge.Item.MaxAmmo
|
||||
import Color
|
||||
import Data.Maybe
|
||||
@@ -28,7 +29,7 @@ itemTreeSPic (LDT (itm,_,_) l r) =
|
||||
itemRotTreeSPic :: Item -> (ItemLink, LabelDoubleTree ItemLink CItem) -> SPic
|
||||
itemRotTreeSPic par (il, t) = translateSP p . overPosSP (Q.rotate q) $ itemTreeSPic t
|
||||
where
|
||||
(p, q) = _iatOrient il par (_iatType il) itm
|
||||
(p, q) = orientAttachment par (_iatType il) itm
|
||||
itm = t ^. ldtValue . _1
|
||||
|
||||
itemSPic :: Item -> SPic
|
||||
|
||||
@@ -24,7 +24,6 @@ import Dodge.Data.ComposedItem
|
||||
import Dodge.Data.DoubleTree
|
||||
import Dodge.Data.Item
|
||||
import Dodge.DoubleTree
|
||||
import Dodge.Item.Orientation
|
||||
import LensHelp
|
||||
import ListHelp
|
||||
|
||||
@@ -40,7 +39,7 @@ useBreakL ::
|
||||
LinkTest
|
||||
useBreakL x y = useBreakListsLinkTest (map (uncurry noa) x) (map (uncurry noa) y)
|
||||
where
|
||||
noa a b = (a, ILink b orientAttachment)
|
||||
noa a b = (a, ILink b)
|
||||
|
||||
useBreakListsLinkTest ::
|
||||
[(ItemStructuralFunction, ItemLink)] ->
|
||||
@@ -216,7 +215,7 @@ llright itm pci = case pci ^. ldtValue . _1 . itType of
|
||||
toLasgunUpdate :: Item -> LinkUpdate
|
||||
toLasgunUpdate itm =
|
||||
LUpdate
|
||||
(ILink FunctionChangeLink orientAttachment)
|
||||
(ILink FunctionChangeLink)
|
||||
(\(par, _, _) -> (par, HeldPlatformSF, uncurry useBreakL $ itemToBreakLists itm HeldPlatformSF))
|
||||
(\(chi, _, up) -> (chi, FunctionChangeSF, up))
|
||||
|
||||
@@ -226,7 +225,7 @@ springLinkTest = LTest (const Nothing) $
|
||||
CRAFT HARDWARE ->
|
||||
Just
|
||||
( LUpdate
|
||||
(ILink FunctionChangeLink orientAttachment)
|
||||
(ILink FunctionChangeLink)
|
||||
(\(par, _, up) -> (par, MakeAutoSF, up))
|
||||
(\(chi, _, up) -> (chi, FunctionChangeSF, up))
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user