Remove (by commenting out) module item-type system

This commit is contained in:
2024-09-30 11:42:10 +01:00
parent 4545caa7e6
commit 0701c4043e
37 changed files with 877 additions and 696 deletions
+31 -31
View File
@@ -1,43 +1,43 @@
module Dodge.Module (
moduleSizes,
moduleStrings,
moduleName,
-- moduleSizes,
-- moduleStrings,
-- moduleName,
) where
import qualified Data.Map.Strict as M
import Dodge.Data.Item
import Dodge.Module.Info
moduleSizes :: Item -> Int
moduleSizes = sum . fmap moduleSize . _iyModules . _itType
--moduleSizes :: Item -> Int
--moduleSizes = sum . fmap moduleSize . _iyModules . _itType
--
--moduleSize :: ItemModuleType -> Int
--moduleSize imt = case imt of
-- EMPTYMODULE -> 0
-- _ -> 1
moduleSize :: ItemModuleType -> Int
moduleSize imt = case imt of
EMPTYMODULE -> 0
_ -> 1
--moduleStrings :: Item -> [String]
--moduleStrings = M.elems . M.mapMaybe moduleName . _iyModules . _itType
moduleStrings :: Item -> [String]
moduleStrings = M.elems . M.mapMaybe moduleName . _iyModules . _itType
moduleName :: ItemModuleType -> Maybe String
moduleName imt = case imt of
EMPTYMODULE -> Nothing
-- BELTMAG -> Just "+BELT FEED"
MAGNETMAG -> Just "+MAGNET FEED"
BULPAY thepayload -> Just $ "+" ++ displayBulletPayload thepayload
BULBODY thebody -> Just $ "+" ++ displayBulletBody thebody
BULTRAJ thetraj -> Just $ "+" ++ displayBulletTraj thetraj
TARGET TargetRBCreature -> Just "+CREATURETARGETING"
TARGET TARGETLASER -> Just "+LASERTARGETING"
TARGET TargetRBPress -> Just "+POSTIONALTARGETING"
TARGET TargetCursor -> Just "+CURSORTARGETING"
TARGET TargetRBLine -> Just "+LINETARGETING"
INCENDLAS -> Just "+INCENDIARY"
SPLITLAS -> Just "+SPLIT"
STATICLAS -> Just "+STATIC"
-- WEPTELE -> Just "+DIRECTEDTELE"
LAUNCHHOME -> Just "+TARGET HOMING"
ATTACHTORCH -> Just "+TORCH"
--moduleName :: ItemModuleType -> Maybe String
--moduleName imt = case imt of
-- EMPTYMODULE -> Nothing
---- BELTMAG -> Just "+BELT FEED"
-- MAGNETMAG -> Just "+MAGNET FEED"
-- BULPAY thepayload -> Just $ "+" ++ displayBulletPayload thepayload
-- BULBODY thebody -> Just $ "+" ++ displayBulletBody thebody
-- BULTRAJ thetraj -> Just $ "+" ++ displayBulletTraj thetraj
-- TARGET TargetRBCreature -> Just "+CREATURETARGETING"
-- TARGET TARGETLASER -> Just "+LASERTARGETING"
-- TARGET TargetRBPress -> Just "+POSTIONALTARGETING"
-- TARGET TargetCursor -> Just "+CURSORTARGETING"
-- TARGET TargetRBLine -> Just "+LINETARGETING"
-- INCENDLAS -> Just "+INCENDIARY"
-- SPLITLAS -> Just "+SPLIT"
-- STATICLAS -> Just "+STATIC"
---- WEPTELE -> Just "+DIRECTEDTELE"
-- LAUNCHHOME -> Just "+TARGET HOMING"
-- ATTACHTORCH -> Just "+TORCH"
--moduleFold :: (m -> m -> m) -> (ItemModule -> Maybe m) -> m -> Item -> m