Work on mapper item, simpler generation of items from console
This commit is contained in:
@@ -69,6 +69,7 @@ itemBaseName = \case
|
||||
ITEMSCAN -> "ITEMSCAN"
|
||||
INTROSCAN t -> show t
|
||||
MAPPER -> "MAPPER"
|
||||
DETECTOR t -> show t
|
||||
|
||||
showAttachItem :: AttachType -> String
|
||||
showAttachItem t = case t of
|
||||
|
||||
@@ -44,6 +44,7 @@ itemSPic it = case it ^. itType of
|
||||
ITEMSCAN -> defSPic
|
||||
MAPPER -> defSPic
|
||||
INTROSCAN {} -> defSPic
|
||||
DETECTOR dt -> noPic (colorSH (detectorColor dt) $ upperPrismPolySU 3 $ rectWH 2 2)
|
||||
|
||||
craftItemSPic :: CraftType -> Shape
|
||||
craftItemSPic = \case
|
||||
@@ -251,7 +252,6 @@ heldItemSPic ht it = case ht of
|
||||
TIMESTOPPER -> defSPic
|
||||
TIMESCROLLER -> defSPic
|
||||
SHATTERGUN -> shatterGunSPic
|
||||
DETECTOR dt -> noPic (colorSH (detectorColor dt) $ upperPrismPolySU 3 $ rectWH 2 2)
|
||||
KEYCARD _ -> noShape (setDepth 0 $ translate (-5) (-5) $ rotate (pi / 2.5) keyPic)
|
||||
|
||||
torchShape :: Shape
|
||||
|
||||
@@ -66,12 +66,15 @@ itemToBreakLists itm itmf = case (itm ^. itType, itmf) of
|
||||
(_, HeldPlatformSF) ->
|
||||
( getAmmoLinks itm
|
||||
<> extraWeaponLinksBelow itm
|
||||
--( extraWeaponLinksBelow itm
|
||||
-- <>getAmmoLinks itm
|
||||
, [(WeaponTargetingSF, WeaponTargetingLink), (WeaponScopeSF, WeaponScopeLink)]
|
||||
<> getAutoSpringLinks itm
|
||||
<> extraWeaponLinks itm
|
||||
)
|
||||
(DETECTOR {}, _) ->
|
||||
( getAmmoLinks itm
|
||||
, [(MapperSF,SFLink MapperSF),(TriggerSF, TriggerLink)]
|
||||
)
|
||||
|
||||
(_, GadgetPlatformSF) ->
|
||||
( getAmmoLinks itm
|
||||
, [(TriggerSF, TriggerLink), (WeaponTargetingSF, WeaponTargetingLink), (WeaponScopeSF, WeaponScopeLink)]
|
||||
@@ -131,6 +134,8 @@ getAmmoLinks itm =
|
||||
|
||||
itemToFunction :: Item -> ItemStructuralFunction
|
||||
itemToFunction itm = case itm ^. itType of
|
||||
DETECTOR {} -> GadgetPlatformSF
|
||||
MAPPER -> MapperSF
|
||||
ITEMSCAN -> ToggleSF
|
||||
INTROSCAN {} -> IntroScanSF
|
||||
HELD LASER -> WeaponTargetingSF
|
||||
|
||||
@@ -69,5 +69,4 @@ itemFromHeldType ht = case ht of
|
||||
GLAUNCHER -> gLauncher
|
||||
RLAUNCHERX i -> rLauncherX i
|
||||
POISONSPRAYER -> poisonSprayer
|
||||
DETECTOR d -> detector d
|
||||
FLATSHIELD -> flatShield
|
||||
|
||||
@@ -47,7 +47,7 @@ detector dt =
|
||||
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1}
|
||||
& itAmmoSlots .~ singleAmmo ElectricalAmmo
|
||||
& itUse . heldParams .~ DefaultHeldParams
|
||||
& itType .~ HELD (DETECTOR dt)
|
||||
& itType .~ DETECTOR dt
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleDetector
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzAmmoPerShot .~ UseExactly 100
|
||||
|
||||
|
||||
+19
-1
@@ -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 ++ "."
|
||||
|
||||
@@ -8,6 +8,7 @@ import Dodge.Data.ComposedItem
|
||||
|
||||
itemInvColor :: ComposedItem -> Color
|
||||
itemInvColor ci = case ci ^. _2 of
|
||||
MapperSF -> white
|
||||
GrenadeHitEffectSF -> yellow
|
||||
IntroScanSF -> white
|
||||
ToggleSF -> white
|
||||
|
||||
@@ -67,7 +67,7 @@ mapper :: Item
|
||||
mapper =
|
||||
defaultHeldItem
|
||||
& itType .~ MAPPER
|
||||
& itUse .~ UseNothing
|
||||
& itUse .~ UseMapper mempty mempty
|
||||
|
||||
bulletModule :: BulletMod -> Item
|
||||
bulletModule bm =
|
||||
|
||||
Reference in New Issue
Block a user