Cleanup
This commit is contained in:
@@ -16,15 +16,7 @@ itemSPic it = foldMap (modulesSPic it) (_iyModules $ _itType it) <> case it ^. i
|
||||
HELD ht -> heldItemSPic ht it
|
||||
LEFT lt -> leftItemSPic lt it
|
||||
EQUIP et -> equipItemSPic et it
|
||||
NOTDEFINED -> defSPic
|
||||
EFFGUN _ -> defSPic
|
||||
AUTOEFFGUN _ -> defSPic
|
||||
|
||||
--
|
||||
--
|
||||
KEYCARD _ -> noShape (setDepth 0 $ translate (-5) (-5) $ rotate (pi/2.5) keyPic)
|
||||
--
|
||||
MEDKIT _ -> defSPic
|
||||
Consumable {} -> defSPic
|
||||
|
||||
equipItemSPic :: EquipItemType -> Item -> SPic
|
||||
equipItemSPic et _ = case et of
|
||||
@@ -100,6 +92,7 @@ heldItemSPic ht it = case ht of
|
||||
DRONELAUNCHER -> defSPic
|
||||
SHATTERGUN -> shatterGunSPic
|
||||
HELDDETECTOR dt -> noPic (colorSH (detectorColor dt) $ upperPrismPoly 3 $ rectWH 2 2)
|
||||
KEYCARD _ -> noShape (setDepth 0 $ translate (-5) (-5) $ rotate (pi/2.5) keyPic)
|
||||
|
||||
torchShape :: Shape
|
||||
torchShape = colorSH blue
|
||||
@@ -132,7 +125,7 @@ baseStickShape :: Shape
|
||||
baseStickShape = colorSH green $ upperPrismPoly 3 $ rectXH 10 2
|
||||
|
||||
stickClip :: Item -> Shape
|
||||
stickClip it = case it ^? itConsumption . laLoaded of
|
||||
stickClip it = case it ^? itUse . heldConsumption . laLoaded of
|
||||
Just x | x > 0 -> foldMap f [0..x-1]
|
||||
_ -> mempty
|
||||
where
|
||||
@@ -163,7 +156,7 @@ baseRifleShape :: Shape
|
||||
baseRifleShape = colorSH red $ upperPrismPoly 3 $ rectXH 25 2
|
||||
|
||||
makeSingleClipAt :: Point3 -> Item -> Shape
|
||||
makeSingleClipAt p it = case it ^? itConsumption . laLoaded of
|
||||
makeSingleClipAt p it = case it ^? itUse . heldConsumption . laLoaded of
|
||||
Just 0 -> mempty
|
||||
_ -> translateSH p $ upperPrismPoly 1 $ square 1.5
|
||||
|
||||
@@ -172,7 +165,7 @@ makeTinClipAt r p it = translateSH p . overPosSH (rotate3z r) $ upperPrismPoly 1
|
||||
$ rectNSWE 0 (-y) (-2) 2
|
||||
where
|
||||
y = fromIntegral y' * 0.3
|
||||
y' = fromMaybe 0 $ it ^? itConsumption . laLoaded
|
||||
y' = fromMaybe 0 $ it ^? itUse . heldConsumption . laLoaded
|
||||
|
||||
volleyGunSPic :: Int -> Item -> SPic
|
||||
volleyGunSPic i it = noPic $
|
||||
@@ -183,7 +176,7 @@ volleyGunSPic i it = noPic $
|
||||
|
||||
|
||||
caneClipX :: Int -> Item -> Shape
|
||||
caneClipX i it = case it ^? itConsumption . laLoaded of
|
||||
caneClipX i it = case it ^? itUse . heldConsumption . laLoaded of
|
||||
Just la | la > 0 -> foldMap
|
||||
( (\y -> translateSH (V3 5 0 3) . upperPrismPoly 1 $ map (+.+ V2 0 y) $ square 1.5)
|
||||
. (\k -> fromIntegral k * 5 - ((fromIntegral i - 1) * 2.5)))
|
||||
@@ -191,9 +184,9 @@ caneClipX i it = case it ^? itConsumption . laLoaded of
|
||||
_ -> mempty
|
||||
|
||||
miniGunXPictItem :: Int -> Item -> SPic
|
||||
miniGunXPictItem i it = miniGunXPict i spin (_laLoaded $ _itConsumption it)
|
||||
miniGunXPictItem i it = miniGunXPict i spin (_laLoaded $ _heldConsumption (_itUse it))
|
||||
where
|
||||
spin = (-10) * _laLoaded (_itConsumption it) + _warmTime (_useDelay $ _itUse it)
|
||||
spin = (-10) * _laLoaded (_heldConsumption (_itUse it)) + _warmTime (_useDelay $ _itUse it)
|
||||
|
||||
miniGunXPict :: Int -> Int -> Int -> SPic
|
||||
miniGunXPict i spin _ =
|
||||
@@ -216,7 +209,7 @@ baseSonicShape :: Shape
|
||||
baseSonicShape = colorSH rose $ upperPrismPoly 3 $ rectXH 25 2
|
||||
|
||||
revolverClip :: Item -> Shape
|
||||
revolverClip it = case it ^? itConsumption . laLoaded of
|
||||
revolverClip it = case it ^? itUse . heldConsumption . laLoaded of
|
||||
Just al | al > 0 -> translateSH (V3 5 0 1) $ foldMap f [1..al]
|
||||
_ -> mempty
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user