This commit is contained in:
2025-06-05 13:52:59 +01:00
parent c8d44fea79
commit cf7a5b2362
4 changed files with 139 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
module Dodge.Data.AmmoType where
--import Data.Aeson
--import Data.Aeson.TH
data AmmoType
= LauncherAmmo
| BulletAmmo
| BeltBulletAmmo
| ElectricalAmmo
| DroneAmmo
| GasAmmo
| PrintMaterial
| ExplosivePutty
deriving (Eq, Ord, Show, Read) --Generic, Flat)
--deriveJSON defaultOptions ''AmmoType
+30
View File
@@ -0,0 +1,30 @@
{-# LANGUAGE LambdaCase #-}
module Dodge.Data.EquipType (equipType) where
import Control.Lens
import Dodge.Data.Item
equipType :: Item -> Maybe EquipType
equipType itm = case itm ^. itType of
EQUIP eit -> Just $ eitType eit
_ -> Nothing
eitType :: EquipItemType -> EquipType
eitType = \case
MAGSHIELD -> GoesOnWrist
FLAMESHIELD -> GoesOnWrist
FRONTARMOUR -> GoesOnChest
WRISTARMOUR -> GoesOnWrist
INVISIBILITYEQUIPMENT x -> x
BRAINHAT -> GoesOnHead
HAT -> GoesOnHead
HEADLAMP -> GoesOnHead
POWERLEGS -> GoesOnLegs
SPEEDLEGS -> GoesOnLegs
JUMPLEGS -> GoesOnLegs
FUELPACK -> GoesOnBack
BULLETBELTPACK -> GoesOnBack
BULLETBELTBRACER -> GoesOnWrist
BATTERYPACK -> GoesOnBack
WRIST_ECG -> GoesOnWrist