Add sounds, move data types out into separate folders

This commit is contained in:
2022-07-16 17:06:51 +01:00
parent f8f4766012
commit e4a4766ddf
48 changed files with 658 additions and 496 deletions
+3 -4
View File
@@ -11,10 +11,9 @@ import Control.Lens
makeTypeCraftNum :: Int -> CraftType -> Item
makeTypeCraftNum i ct = defaultCraftable
{ _itInvSize = 0.5
, _itCurseStatus = Uncursed
, _itConsumption = ItemItselfConsumable $ IcAmount i
}
& itInvSize .~ 0.5
& itCurseStatus .~ Uncursed
& itConsumption .~ ItemItselfConsumable (IcAmount i)
& itType . iyBase .~ CRAFT ct
makeTypeCraft :: CraftType -> Item
+5 -5
View File
@@ -11,7 +11,8 @@ import Geometry
import Data.Maybe
itemSPic :: Item -> SPic
itemSPic it = foldMap (modulesSPic it) (_iyModules $ _itType it) $ case it ^. itType . iyBase of
itemSPic it = foldMap (modulesSPic it) (_iyModules $ _itType it) <> case it ^. itType . iyBase of
CRAFT _ -> defSPic
HELD ht -> heldItemSPic ht it
LEFT lt -> leftItemSPic lt it
EQUIP et -> equipItemSPic et it
@@ -24,7 +25,6 @@ itemSPic it = foldMap (modulesSPic it) (_iyModules $ _itType it) $ case it ^. it
KEYCARD _ -> noShape (setDepth 0 $ translate (-5) (-5) $ rotate (pi/2.5) keyPic)
--
MEDKIT _ -> defSPic
CRAFT _ -> flatShieldEquipSPic
equipItemSPic :: EquipItemType -> Item -> SPic
equipItemSPic et _ = case et of
@@ -116,10 +116,10 @@ torchShape = colorSH blue
back = upperPrismPoly 3 $ rectXH 1 2
modulesSPic :: Item -> ItemModuleType -> SPic -> SPic
modulesSPic :: Item -> ItemModuleType -> SPic
modulesSPic it imt = case imt of
ATTACHTORCH -> (<> noPic (overPosSH (+.+.+ _dimAttachPos (_itDimension it)) torchShape))
_ -> id
ATTACHTORCH -> noPic (overPosSH (+.+.+ _dimAttachPos (_itDimension it)) torchShape)
_ -> mempty
baseStickShapeX :: Item -> Int -> Shape
baseStickShapeX it i = foldMap f [0..i-1]