Tweak bullet magazines
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -145,7 +145,7 @@ craftItemSPic = \case
|
|||||||
ammoMagSPic :: Item -> AmmoMagType -> SPic
|
ammoMagSPic :: Item -> AmmoMagType -> SPic
|
||||||
ammoMagSPic it = \case
|
ammoMagSPic it = \case
|
||||||
--TINMAG -> noPic $ upperPrismPolyTS 1 (rectNSWE 0 (- (am * 5)) (-1) 1)
|
--TINMAG -> noPic $ upperPrismPolyTS 1 (rectNSWE 0 (- (am * 5)) (-1) 1)
|
||||||
TINMAG -> noPic $ colorSH yellow $ upperPrismPolyTS 4 (rectNSWE 0 (-6) (-2) 2)
|
TINMAG -> noPic $ colorSH yellow $ upperBox Small Typical 4 (rectWH 2 3)
|
||||||
--DRUMMAG -> noPic $ colorSH yellow $ upperPrismPolyTS 1 (rectNSWE 0 (- (am * 15)) (-1) 1)
|
--DRUMMAG -> noPic $ colorSH yellow $ upperPrismPolyTS 1 (rectNSWE 0 (- (am * 15)) (-1) 1)
|
||||||
DRUMMAG -> noPic . colorSH yellow $ upperBox Small Typical 4 (polyCirc 3 4)
|
DRUMMAG -> noPic . colorSH yellow $ upperBox Small Typical 4 (polyCirc 3 4)
|
||||||
--DRUMMAG -> noPic $ colorSH yellow $ upperPrismPolyTS 2 (polyCirc 3 5)
|
--DRUMMAG -> noPic $ colorSH yellow $ upperPrismPolyTS 2 (polyCirc 3 5)
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ invDT =
|
|||||||
. fmap (singleDT . baseCI)
|
. fmap (singleDT . baseCI)
|
||||||
|
|
||||||
invDT' :: NewIntMap InvInt Item -> [DTree OItem]
|
invDT' :: NewIntMap InvInt Item -> [DTree OItem]
|
||||||
invDT' = fmap propagateOrientation' . invDT
|
invDT' = fmap propagateOrientation . invDT
|
||||||
|
|
||||||
-- this assumes the creature inventory is well formed, specifically the
|
-- this assumes the creature inventory is well formed, specifically the
|
||||||
-- location ids
|
-- location ids
|
||||||
@@ -243,7 +243,7 @@ invAdj = IM.unions . map g . invDT
|
|||||||
|
|
||||||
---- returns an intmap with trees for (only!) root items, indexed by inventory position
|
---- returns an intmap with trees for (only!) root items, indexed by inventory position
|
||||||
invIMDT :: NewIntMap InvInt Item -> IM.IntMap (DTree OItem)
|
invIMDT :: NewIntMap InvInt Item -> IM.IntMap (DTree OItem)
|
||||||
invIMDT = fmap propagateOrientation' . IM.fromDistinctAscList . reverse . map getid . invDT
|
invIMDT = fmap propagateOrientation . IM.fromDistinctAscList . reverse . map getid . invDT
|
||||||
where
|
where
|
||||||
getid :: DTree CItem -> (Int, DTree CItem)
|
getid :: DTree CItem -> (Int, DTree CItem)
|
||||||
getid t = (t ^?! dtValue . _1 . itLocation . ilInvID . unNInt, t)
|
getid t = (t ^?! dtValue . _1 . itLocation . ilInvID . unNInt, t)
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ maxAmmo :: Item -> Maybe Int
|
|||||||
maxAmmo itm = case itm ^. itType of
|
maxAmmo itm = case itm ^. itType of
|
||||||
EQUIP BATTERYPACK -> Just $ 10 ^ (9 :: Int)
|
EQUIP BATTERYPACK -> Just $ 10 ^ (9 :: Int)
|
||||||
AMMOMAG BATTERY -> Just $ 10 ^ (6 :: Int)
|
AMMOMAG BATTERY -> Just $ 10 ^ (6 :: Int)
|
||||||
AMMOMAG TINMAG -> Just 15
|
AMMOMAG TINMAG -> Just 30
|
||||||
AMMOMAG DRUMMAG -> Just 30
|
AMMOMAG DRUMMAG -> Just 90
|
||||||
AMMOMAG BELTMAG -> Just 90
|
AMMOMAG BELTMAG -> Just 90
|
||||||
AMMOMAG CHEMFUELPOUCH -> Just $ 10 ^ (6 :: Int)
|
AMMOMAG CHEMFUELPOUCH -> Just $ 10 ^ (6 :: Int)
|
||||||
AMMOMAG SHELLMAG -> Just 1
|
AMMOMAG SHELLMAG -> Just 1
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
module Dodge.Item.Orientation (
|
module Dodge.Item.Orientation (
|
||||||
orientAttachment,
|
orientAttachment,
|
||||||
propagateOrientation',
|
propagateOrientation,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Dodge.Data.ComposedItem
|
import Dodge.Data.ComposedItem
|
||||||
@@ -24,7 +24,7 @@ orientChild itm = case _itType itm of
|
|||||||
orientByParentChSF :: Item -> ItemSF -> Point3Q
|
orientByParentChSF :: Item -> ItemSF -> Point3Q
|
||||||
orientByParentChSF itm lt = case (_itType itm, lt) of
|
orientByParentChSF itm lt = case (_itType itm, lt) of
|
||||||
(HELD FLAMETHROWER, AmmoMagSF{}) -> (V3 4 (-6) 0, Q.qID)
|
(HELD FLAMETHROWER, AmmoMagSF{}) -> (V3 4 (-6) 0, Q.qID)
|
||||||
(HELD _, AmmoMagSF{}) -> (V3 7 (-2) 0, Q.qID)
|
(HELD _, AmmoMagSF{}) -> (V3 7 (-4) 0, Q.qID)
|
||||||
(HELD _, WeaponScopeSF) -> (V3 5 0 5, Q.qID)
|
(HELD _, WeaponScopeSF) -> (V3 5 0 5, Q.qID)
|
||||||
_ -> (0, Q.qID)
|
_ -> (0, Q.qID)
|
||||||
|
|
||||||
@@ -39,8 +39,8 @@ orientAttachment par (ch,chsf) = case (_itType par, chsf) of
|
|||||||
(t1, q1) = orientByParentChSF par chsf
|
(t1, q1) = orientByParentChSF par chsf
|
||||||
(t2, q2) = orientChild ch
|
(t2, q2) = orientChild ch
|
||||||
|
|
||||||
propagateOrientation' :: DTree CItem -> DTree OItem
|
propagateOrientation :: DTree CItem -> DTree OItem
|
||||||
propagateOrientation' = dtStartPropagate g f
|
propagateOrientation = dtStartPropagate g f
|
||||||
where
|
where
|
||||||
g (x,y) = (x,y,(V3 0 0 0,Q.qID))
|
g (x,y) = (x,y,(V3 0 0 0,Q.qID))
|
||||||
f (x,_,pq) (y,y1) = (y,y1,Q.comp pq $ orientAttachment x (y,y1))
|
f (x,_,pq) (y,y1) = (y,y1,Q.comp pq $ orientAttachment x (y,y1))
|
||||||
|
|||||||
@@ -246,7 +246,8 @@ tutHub = do
|
|||||||
=<< roomNgon 6 100
|
=<< roomNgon 6 100
|
||||||
bcor <- treeAttachDeep (return door) <$> blockedCorridor
|
bcor <- treeAttachDeep (return door) <$> blockedCorridor
|
||||||
r1 <- r burstRifle <&> rmPmnts .:~ t
|
r1 <- r burstRifle <&> rmPmnts .:~ t
|
||||||
r2 <- r (drumMag & itConsumables ?~ 500)
|
r2 <- r (drumMag & itConsumables ?~ 90)
|
||||||
|
--r2 <- r (tinMag & itConsumables ?~ 500)
|
||||||
return $
|
return $
|
||||||
tToBTree "DoorTest" $
|
tToBTree "DoorTest" $
|
||||||
Node
|
Node
|
||||||
|
|||||||
Reference in New Issue
Block a user