Work on mapper item, simpler generation of items from console

This commit is contained in:
2025-01-02 11:16:04 +00:00
parent 03b25565f1
commit 725a59b9d0
20 changed files with 439 additions and 379 deletions
+19 -1
View File
@@ -1,3 +1,4 @@
{-# LANGUAGE LambdaCase #-}
module Dodge.Item.Info
( itemInfo
) where
@@ -25,8 +26,26 @@ itmBaseInfo itm = case itm ^. itType of
HELD hit -> heldInfo hit
EQUIP eit -> equipInfo eit
CRAFT fit -> craftInfo fit
DETECTOR d -> "A device that detects " ++ detectorInfo d ++ " in an expanding radius."
ATTACH t -> attachInfo t
_ -> "THIS SHOULD NOT BE DISPLAYED"
attachInfo :: AttachType -> String
attachInfo = \case
ZOOMSCOPE -> "An optical zoom. "
BULLETSYNTH -> "An item that prints bullets, when supplied with power. "
REMOTESCREEN -> "A display screen. Can be linked to projectiles. "
JOYSTICK -> "A control device. Can be used to control certain projectiles. "
GIMBAL -> "A device that can stabilize moving objects. "
GYROSCOPE -> "A device that can sustain angular velocity. "
-- UNDERBARRELSLOT
-- REMOTEDETONATOR
-- SMOKEREDUCER
-- HOMINGMODULE
-- AUGMENTEDHUD
-- SHELLPAYLOAD {}
_ -> "INCOMPLETE, TODO FINISH"
showInt :: Int -> String
showInt i = case i of
0 -> "zero"
@@ -87,7 +106,6 @@ heldInfo hit = case hit of
POISONSPRAYER -> "A weapon that releases noxious gases."
SHATTERGUN -> "A seismic device that shatters hard items in its line of fire."
-- FORCEFIELDGUN -> "A device that produces a durable forcefield."
DETECTOR d -> "A device that detects " ++ detectorInfo d ++ " in an expanding radius."
TORCH -> "A stick with a light on the end."
FLATSHIELD -> "A panel of metal that blocks unwanted objects from the front of the user."
KEYCARD i -> "A keycard. It is labelled " ++ show i ++ "."