From 53e959e6ccc493f79d7f8c424bec07d0aed99532 Mon Sep 17 00:00:00 2001 From: justin Date: Mon, 30 Sep 2024 14:21:19 +0100 Subject: [PATCH] Cleanup --- ghcidOutput | 51 +---------------------- src/Dodge/Creature/Impulse/UseItem.hs | 10 ++--- src/Dodge/Data/Item.hs | 20 +-------- src/Dodge/Data/Item/Tweak.hs | 39 ----------------- src/Dodge/Data/Item/Use.hs | 10 ++--- src/Dodge/Default/Item.hs | 3 -- src/Dodge/Default/Item/Use.hs | 52 +++++++++++------------ src/Dodge/Item/Display.hs | 9 ++-- src/Dodge/Item/Draw.hs | 2 +- src/Dodge/Item/Held/BatteryGuns.hs | 30 +++++++------- src/Dodge/Item/Held/Launcher.hs | 60 +++++++++++++-------------- src/Dodge/Render/HUD.hs | 40 +++++++----------- src/Dodge/Tweak.hs | 14 +++---- src/Dodge/Tweak/Show.hs | 48 ++++++++++----------- src/Dodge/Update/Input/InGame.hs | 2 +- src/Dodge/Update/Scroll.hs | 2 +- 16 files changed, 129 insertions(+), 263 deletions(-) delete mode 100644 src/Dodge/Data/Item/Tweak.hs diff --git a/ghcidOutput b/ghcidOutput index 334355fdf..4fb914876 100644 --- a/ghcidOutput +++ b/ghcidOutput @@ -1,50 +1 @@ -/home/justin/Haskell/loop/src/Dodge/Render/HUD.hs:317:1-10: warning: [-Wunused-top-binds] - Defined but not used: ‘tweakItems’ - | -317 | tweakItems = textSelItems . ammoTweakStrings - | ^^^^^^^^^^ -/home/justin/Haskell/loop/src/Dodge/Render/HUD.hs:320:1-16: warning: [-Wunused-top-binds] - Defined but not used: ‘ammoTweakStrings’ - | -320 | ammoTweakStrings _ = []-- case it ^? _Just . itTweaks . tweakParams of - | ^^^^^^^^^^^^^^^^ -/home/justin/Haskell/loop/src/Dodge/Render/HUD.hs:326:1-11: warning: [-Wunused-top-binds] - Defined but not used: ‘tweakString’ - | -326 | tweakString tp = rightPad 12 ' ' (show $ _tweakType tp) ++ " " ++ showTweak tp - | ^^^^^^^^^^^ -/home/justin/Haskell/loop/src/Dodge/Render/HUD.hs:379:1-12: warning: [-Wunused-top-binds] - Defined but not used: ‘textSelItems’ - | -379 | textSelItems = map (picsToSelectable . (: [])) - | ^^^^^^^^^^^^ -/home/justin/Haskell/loop/src/Dodge/Render/HUD.hs:382:1-16: warning: [-Wunused-top-binds] - Defined but not used: ‘picsToSelectable’ - | -382 | picsToSelectable pics = - | ^^^^^^^^^^^^^^^^ -/home/justin/Haskell/loop/src/Dodge/Update/Scroll.hs:15:1-18: warning: [-Wunused-imports] - The import of ‘Dodge.Tweak’ is redundant - | -15 | import Dodge.Tweak - | ^^^^^^^^^^^^^^^^^^ -/home/justin/Haskell/loop/src/Dodge/Update/Input/InGame.hs:9:1-21: warning: [-Wunused-imports] - The import of ‘Dodge.Base.You’ is redundant - | -9 | import Dodge.Base.You - | ^^^^^^^^^^^^^^^^^^^^^ -/home/justin/Haskell/loop/src/Dodge/Item/Held/BatteryGuns.hs:19:1-33: warning: [-Wunused-imports] - The qualified import of ‘IntMapHelp’ is redundant - | -19 | import qualified IntMapHelp as IM - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -/home/justin/Haskell/loop/src/Dodge/Item/Held/BatteryGuns.hs:79:1-11: warning: [-Wunused-top-binds] - Defined but not used: ‘lasGunTweak’ - | -79 | lasGunTweak = - | ^^^^^^^^^^^ -/home/justin/Haskell/loop/src/Dodge/Item/Held/BatteryGuns.hs:102:1-15: warning: [-Wunused-top-binds] - Defined but not used: ‘tractorGunTweak’ - | -102 | tractorGunTweak = - | ^^^^^^^^^^^^^^^ +All good (608 modules, at 14:21:16) diff --git a/src/Dodge/Creature/Impulse/UseItem.hs b/src/Dodge/Creature/Impulse/UseItem.hs index b784d3a80..f3eb4a31b 100644 --- a/src/Dodge/Creature/Impulse/UseItem.hs +++ b/src/Dodge/Creature/Impulse/UseItem.hs @@ -34,9 +34,9 @@ useRootItem crid w = fromMaybe w $ do itemUseEffect :: Creature -> LabelDoubleTree ComposeLinkType Item -> World -> World itemUseEffect cr it w = case it ^. ldtValue . itUse of - HeldUse{ } -> heldEffect it cr w + UseHeld{} -> heldEffect it cr w & pointerToItem itm . itUse . heldHammer .~ HammerDown - LeftUse{} -> doequipmentchange + UseHotkey{} -> doequipmentchange EquipUse{} -> doequipmentchange (ConsumeUse eff) -> useC eff (_ldtValue it) cr w CraftUse{} -> w @@ -103,13 +103,11 @@ useItemLeftClick cr w = fromMaybe w $ do invid <- cr ^? crManipulation . manObject . imSelectedItem ituse <- cr ^? crInv . ix invid . itUse case ituse of - --HeldUse{} -> return $ hammerTest (cWorld . lWorld . creatures . ix (_crID cr) %~ crReloadToggle) - HeldUse{} -> return w + UseHeld{} -> return w ConsumeUse{} -> return $ useItemLeftClick' cr w EquipUse{} -> return $ useItemLeftClick' cr w - LeftUse{} -> return $ useItemLeftClick' cr w + UseHotkey{} -> return $ useItemLeftClick' cr w AmmoMagUse{} -> return w - --AmmoMagUse{} -> return $ hammerTest (cWorld . lWorld . creatures . ix (_crID cr) %~ crReloadToggle) _ -> Nothing useItemLeftClick' :: Creature -> World -> World diff --git a/src/Dodge/Data/Item.hs b/src/Dodge/Data/Item.hs index 9d7292357..dbd741085 100644 --- a/src/Dodge/Data/Item.hs +++ b/src/Dodge/Data/Item.hs @@ -5,7 +5,6 @@ module Dodge.Data.Item ( module Dodge.Data.Item, module Dodge.Data.Item.Effect, module Dodge.Data.Item.Misc, - module Dodge.Data.Item.Tweak, module Dodge.Data.Item.Params, module Dodge.Data.Item.Use, module Dodge.Data.Item.CurseStatus, @@ -17,7 +16,6 @@ module Dodge.Data.Item ( import Control.Lens import Data.Aeson import Data.Aeson.TH -import Data.Set (Set) import Dodge.Data.Item.Combine import Dodge.Data.Item.CurseStatus import Dodge.Data.Item.Effect @@ -25,12 +23,10 @@ import Dodge.Data.Item.Location import Dodge.Data.Item.Misc import Dodge.Data.Item.Params import Dodge.Data.Item.Scope -import Dodge.Data.Item.Tweak import Dodge.Data.Item.Use import NewInt -data ItID = ItID - deriving (Eq, Ord, Show, Read) +data ItID = ItID deriving (Eq, Ord, Show, Read) data Item = Item { _itUse :: ItemUse @@ -41,23 +37,9 @@ data Item = Item , _itInvSize :: Int , _itDimension :: ItemDimension , _itCurseStatus :: CurseStatus --- , _itTweaks :: ItemTweaks , _itParams :: ItemParams - , _itAttachments :: Set ItemAttachment } -data ItemAttachment - = ScopeAttachment - | BulletClipAttachment - | BulletBeltAttachment - | StandAttachment - | PowerSourceAttachment - deriving (Eq, Ord) - -_itUseAimStance :: Item -> AimStance -_itUseAimStance = _aimStance . _heldAim . _itUse - makeLenses ''Item deriveJSON defaultOptions ''ItID -deriveJSON defaultOptions ''ItemAttachment deriveJSON defaultOptions ''Item diff --git a/src/Dodge/Data/Item/Tweak.hs b/src/Dodge/Data/Item/Tweak.hs deleted file mode 100644 index e9c14f65e..000000000 --- a/src/Dodge/Data/Item/Tweak.hs +++ /dev/null @@ -1,39 +0,0 @@ -{-# LANGUAGE DeriveGeneric #-} -{-# LANGUAGE DeriveAnyClass #-} -{-# LANGUAGE StrictData #-} -{-# LANGUAGE TemplateHaskell #-} - -module Dodge.Data.Item.Tweak where - -import Control.Lens -import Data.Aeson -import Data.Aeson.TH -import qualified IntMapHelp as IM - -data ItemTweaks - = NoTweaks - | Tweakable - { _tweakParams :: IM.IntMap TweakParam - } - deriving (Eq, Show, Read) --Generic, Flat) - -data TweakType - = TweakPhaseV - | TweakTractionPower - | TweakSpinDrag - | TweakSpinAmount - | TweakThrustDelay - deriving (Eq, Show, Read) --Generic, Flat) - -data TweakParam = TweakParam - { _tweakType :: TweakType -- Int -> Item -> Item - , _tweakVal :: Int - , _tweakMax :: Int - } - deriving (Eq, Show, Read) --Generic, Flat) - -makeLenses ''TweakParam -makeLenses ''ItemTweaks -deriveJSON defaultOptions ''TweakType -deriveJSON defaultOptions ''TweakParam -deriveJSON defaultOptions ''ItemTweaks diff --git a/src/Dodge/Data/Item/Use.hs b/src/Dodge/Data/Item/Use.hs index 1f32613bd..811885f9c 100644 --- a/src/Dodge/Data/Item/Use.hs +++ b/src/Dodge/Data/Item/Use.hs @@ -34,19 +34,15 @@ import Geometry.Data import Sound.Data data ItemUse - = HeldUse - { -- _heldUse :: Huse - _heldDelay :: UseDelay --- , _heldMods :: HeldMod + = UseHeld + { _heldDelay :: UseDelay , _heldHammer :: HammerPosition , _heldAim :: AimParams , _heldAmmoTypes :: IM.IntMap AmmoType , _heldParams :: HeldParams , _heldTriggerType :: TriggerType - , _heldUsageTime :: Int -- this is not yet implemented - -- , _useTargeting :: Maybe TargetType } - | LeftUse + | UseHotkey { _leftUse :: Luse , _leftDelay :: UseDelay , _leftHammer :: HammerPosition diff --git a/src/Dodge/Default/Item.hs b/src/Dodge/Default/Item.hs index bf1065cc2..10b06cd88 100644 --- a/src/Dodge/Default/Item.hs +++ b/src/Dodge/Default/Item.hs @@ -30,9 +30,6 @@ defaultHeldItem = Item , _itDimension = defaultItemDimension , _itUse = defaultHeldUse , _itParams = NoParams --- , _itTweaks = NoTweaks --- , _itScope = NoScope - , _itAttachments = mempty } defaultLeftItem :: Item diff --git a/src/Dodge/Default/Item/Use.hs b/src/Dodge/Default/Item/Use.hs index ba8a36f8b..68814b043 100644 --- a/src/Dodge/Default/Item/Use.hs +++ b/src/Dodge/Default/Item/Use.hs @@ -12,14 +12,13 @@ import Dodge.Default.Item.Use.Consumption import Dodge.Default.Item.Use.Equipment defaultLeftUse :: ItemUse -defaultLeftUse = - LeftUse - { _leftUse = LDoNothing - , _leftDelay = FixedRate{_rateMax = 8, _rateTime = 0} - , _leftHammer = HammerUp - , _equipEffect = defaultEquip - , _leftConsumption = defaultLeftLoadable - } +defaultLeftUse = UseHotkey + { _leftUse = LDoNothing + , _leftDelay = FixedRate{_rateMax = 8, _rateTime = 0} + , _leftHammer = HammerUp + , _equipEffect = defaultEquip + , _leftConsumption = defaultLeftLoadable + } defaultEquipUse :: ItemUse defaultEquipUse = EquipUse @@ -28,24 +27,21 @@ defaultEquipUse = EquipUse } defaultHeldUse :: ItemUse -defaultHeldUse = - HeldUse - { _heldDelay = FixedRate{_rateMax = 8, _rateTime = 0} --- , _heldMods = DoNothingMod - , _heldHammer = HammerUp - , _heldAim = defaultAimParams - , _heldAmmoTypes = mempty - , _heldParams = BulletShooterParams - { _muzVel = ConstFloat 0.8 - , _rifling = ConstFloat 0.8 - , _recoil = 10 - , _torqueAfter = 0.2 - , _randomOffset = 0 - , _sidePush = 0 - , _bulGunSound = Just (tap3S, 0) - , _weaponInvLock = 0 - , _weaponRepeat = [] - } - , _heldTriggerType = HammerTrigger - , _heldUsageTime = 0 +defaultHeldUse = UseHeld + { _heldDelay = FixedRate{_rateMax = 8, _rateTime = 0} + , _heldHammer = HammerUp + , _heldAim = defaultAimParams + , _heldAmmoTypes = mempty + , _heldParams = BulletShooterParams + { _muzVel = ConstFloat 0.8 + , _rifling = ConstFloat 0.8 + , _recoil = 10 + , _torqueAfter = 0.2 + , _randomOffset = 0 + , _sidePush = 0 + , _bulGunSound = Just (tap3S, 0) + , _weaponInvLock = 0 + , _weaponRepeat = [] } + , _heldTriggerType = HammerTrigger + } diff --git a/src/Dodge/Item/Display.hs b/src/Dodge/Item/Display.hs index f40bd3fe5..dfb2b7d75 100644 --- a/src/Dodge/Item/Display.hs +++ b/src/Dodge/Item/Display.hs @@ -109,15 +109,12 @@ showAutoRechargeProgress lc = case lc of itemNumberDisplay :: Creature -> Item -> [String] itemNumberDisplay cr itm = case iu of - --HeldUse{} -> [showReloadProgress cr itm] - HeldUse{} -> [] - LeftUse{} -> [showAutoRechargeProgress (_leftConsumption iu)] + UseHeld{} -> [] + UseHotkey{} -> [showAutoRechargeProgress (_leftConsumption iu)] EquipUse{} -> showEquipmentNumber cr itm - --CraftUse x -> [show $ x ^. getItAmount] CraftUse -> [] - --ConsumeUse {_useAmount = x} -> [show $ x ^. getItAmount] ConsumeUse {} -> [] - AttachUse {} -> [] --[showReloadProgress cr itm] + AttachUse {} -> [] AmmoMagUse {} -> [maybe "" shortShow $ itm ^? itUse . amagLoadStatus . iaLoaded] ScopeUse OpticScope {_opticZoom = x} -> [shortShow x] ScopeUse {} -> [] diff --git a/src/Dodge/Item/Draw.hs b/src/Dodge/Item/Draw.hs index 1c6f33d6d..fa02e039b 100644 --- a/src/Dodge/Item/Draw.hs +++ b/src/Dodge/Item/Draw.hs @@ -18,7 +18,7 @@ import ShapePicture itemEquipPict :: Creature -> LabelDoubleTree ComposeLinkType PartiallyComposedItem -> SPic itemEquipPict cr itmtree = case itm ^. itUse of - HeldUse{} | itm ^? itLocation . ilIsRoot == Just True + UseHeld{} | itm ^? itLocation . ilIsRoot == Just True -> overPosSP (heldItemOffset itm cr) (itemSPic itmtree) ituse -> fromMaybe mempty $ do attachpos <- ituse ^? equipEffect . eeAttachPos diff --git a/src/Dodge/Item/Held/BatteryGuns.hs b/src/Dodge/Item/Held/BatteryGuns.hs index b026db4b2..1d1c77461 100644 --- a/src/Dodge/Item/Held/BatteryGuns.hs +++ b/src/Dodge/Item/Held/BatteryGuns.hs @@ -16,7 +16,7 @@ import Dodge.Data.Item --import Dodge.Reloading.Action import Dodge.Tesla.ItemParams import Geometry.Data -import qualified IntMapHelp as IM +--import qualified IntMapHelp as IM sparkGun :: Item sparkGun = @@ -75,13 +75,13 @@ lasGun = -- & itUse . heldAim . aimMuzPos .~ 30 & itType .~ HELD LASGUN -lasGunTweak :: TweakParam -lasGunTweak = - TweakParam - { _tweakType = TweakPhaseV - , _tweakVal = 1 - , _tweakMax = 3 - } +--lasGunTweak :: TweakParam +--lasGunTweak = +-- TweakParam +-- { _tweakType = TweakPhaseV +-- , _tweakVal = 1 +-- , _tweakMax = 3 +-- } tractorGun :: Item tractorGun = @@ -98,13 +98,13 @@ tractorGun = & itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleTractor & itType .~ HELD TRACTORGUN -tractorGunTweak :: TweakParam -tractorGunTweak = - TweakParam - { _tweakType = TweakTractionPower - , _tweakVal = 1 - , _tweakMax = 4 - } +--tractorGunTweak :: TweakParam +--tractorGunTweak = +-- TweakParam +-- { _tweakType = TweakTractionPower +-- , _tweakVal = 1 +-- , _tweakMax = 4 +-- } --lasWide :: Int -> Item --lasWide n = diff --git a/src/Dodge/Item/Held/Launcher.hs b/src/Dodge/Item/Held/Launcher.hs index 462f2a43c..aece533c9 100644 --- a/src/Dodge/Item/Held/Launcher.hs +++ b/src/Dodge/Item/Held/Launcher.hs @@ -63,34 +63,34 @@ launcherX i = -- & itScope .~ RemoteScope (V2 0 0) 1 ---- & itUse . heldConsumption . laAmmoType . amPjDraw .~ DrawRemoteShell -basicAmPjMoves :: IM.IntMap TweakParam -basicAmPjMoves = - IM.fromList . zip [0 ..] $ - [ spinDrag - , spinStart - , thrustParam - ] +--basicAmPjMoves :: IM.IntMap TweakParam +--basicAmPjMoves = +-- IM.fromList . zip [0 ..] $ +-- [ spinDrag +-- , spinStart +-- , thrustParam +-- ] -spinDrag :: TweakParam -spinDrag = - TweakParam - { _tweakType = TweakSpinDrag - , _tweakVal = 1 - , _tweakMax = 5 - } - -spinStart :: TweakParam -spinStart = - TweakParam - { _tweakType = TweakSpinAmount - , _tweakVal = 2 - , _tweakMax = 5 - } - -thrustParam :: TweakParam -thrustParam = - TweakParam - { _tweakType = TweakThrustDelay - , _tweakVal = 1 - , _tweakMax = 5 - } +--spinDrag :: TweakParam +--spinDrag = +-- TweakParam +-- { _tweakType = TweakSpinDrag +-- , _tweakVal = 1 +-- , _tweakMax = 5 +-- } +-- +--spinStart :: TweakParam +--spinStart = +-- TweakParam +-- { _tweakType = TweakSpinAmount +-- , _tweakVal = 2 +-- , _tweakMax = 5 +-- } +-- +--thrustParam :: TweakParam +--thrustParam = +-- TweakParam +-- { _tweakType = TweakThrustDelay +-- , _tweakVal = 1 +-- , _tweakMax = 5 +-- } diff --git a/src/Dodge/Render/HUD.hs b/src/Dodge/Render/HUD.hs index 8588b2417..be977be7c 100644 --- a/src/Dodge/Render/HUD.hs +++ b/src/Dodge/Render/HUD.hs @@ -30,12 +30,12 @@ import Dodge.Render.List import Dodge.ScreenPos import Dodge.SelectionSections import Dodge.SelectionSections.Draw -import Dodge.Tweak.Show +--import Dodge.Tweak.Show import Geometry import qualified IntMapHelp as IM import Justify --import ListHelp -import Padding +--import Padding import Picture import SDL (MouseButton (..)) @@ -313,18 +313,6 @@ lnkMidPosInvSelsCol cfig w i col = foldMap f invcol <- selSecSelCol 0 j sss return $ zConnectCol (rp - V2 5 0) (lp + V2 175 0) col col col invcol -tweakItems :: Maybe Item -> [SelectionItem ()] -tweakItems = textSelItems . ammoTweakStrings - -ammoTweakStrings :: Maybe Item -> [String] -ammoTweakStrings _ = []-- case it ^? _Just . itTweaks . tweakParams of ---ammoTweakStrings it = case it ^? _Just . itTweaks . tweakParams of --- Just l -> map tweakString $ IM.elems l --- _ -> ["NOT TWEAKABLE"] - -tweakString :: TweakParam -> String -tweakString tp = rightPad 12 ' ' (show $ _tweakType tp) ++ " " ++ showTweak tp - invHead :: Configuration -> String -> Picture invHead cfig = translateScreenPos cfig (fromTopLeft (V2 (subInvX - 5) 80)) @@ -375,19 +363,19 @@ invHead cfig = -- ( halfHeight cfig - 20* (fromIntegral invPos +1) + 2.5) -- return . winScale cfig . color col $ lConnect p itScreenPos -textSelItems :: [String] -> [SelectionItem ()] -textSelItems = map (picsToSelectable . (: [])) +--textSelItems :: [String] -> [SelectionItem ()] +--textSelItems = map (picsToSelectable . (: [])) -picsToSelectable :: [String] -> SelectionItem () -picsToSelectable pics = - SelectionItem - { _siPictures = pics - , _siHeight = length pics - , _siIsSelectable = True - , _siColor = white - , _siOffX = 0 - , _siPayload = () - } +--picsToSelectable :: [String] -> SelectionItem () +--picsToSelectable pics = +-- SelectionItem +-- { _siPictures = pics +-- , _siHeight = length pics +-- , _siIsSelectable = True +-- , _siColor = white +-- , _siOffX = 0 +-- , _siPayload = () +-- } -- would be nice to add parameter to orient this with NSEW, cf cursor selNumPos :: diff --git a/src/Dodge/Tweak.hs b/src/Dodge/Tweak.hs index 61b24c0b8..577f959bb 100644 --- a/src/Dodge/Tweak.hs +++ b/src/Dodge/Tweak.hs @@ -3,13 +3,13 @@ module Dodge.Tweak where import Control.Lens import Dodge.Data.Item -doTweak :: TweakType -> Int -> Item -> Item -doTweak tt = case tt of - TweakPhaseV -> tweakPhaseV - TweakTractionPower -> tweakTractionPower - TweakSpinDrag -> \i -> itParams . shellSpinDrag .~ i - TweakSpinAmount -> \i -> itParams . shellSpinAmount .~ i - TweakThrustDelay -> \i -> itParams . shellThrustDelay .~ i +--doTweak :: TweakType -> Int -> Item -> Item +--doTweak tt = case tt of +-- TweakPhaseV -> tweakPhaseV +-- TweakTractionPower -> tweakTractionPower +-- TweakSpinDrag -> \i -> itParams . shellSpinDrag .~ i +-- TweakSpinAmount -> \i -> itParams . shellSpinAmount .~ i +-- TweakThrustDelay -> \i -> itParams . shellThrustDelay .~ i tweakTractionPower :: Int -> Item -> Item tweakTractionPower 0 = itParams . attractionPower .~ 1 diff --git a/src/Dodge/Tweak/Show.hs b/src/Dodge/Tweak/Show.hs index 0169f5aa0..2aed4e80e 100644 --- a/src/Dodge/Tweak/Show.hs +++ b/src/Dodge/Tweak/Show.hs @@ -1,27 +1,27 @@ module Dodge.Tweak.Show where -import Dodge.Data.Item.Tweak +--import Dodge.Data.Item.Tweak -showTweak :: TweakParam -> String -showTweak tp = case tt of - TweakPhaseV -> showPhaseV ct - TweakTractionPower -> showTractionPower ct - TweakSpinDrag -> show ct - TweakSpinAmount -> show ct - TweakThrustDelay -> show ct - where - tt = _tweakType tp - ct = _tweakVal tp - -showPhaseV :: Int -> String -showPhaseV 0 = "V" -showPhaseV 1 = "/" -showPhaseV 2 = "Z" -showPhaseV i = show i ++ " should not be possible" - -showTractionPower :: Int -> String -showTractionPower 0 = "+" -showTractionPower 1 = "-" -showTractionPower 2 = "#" -showTractionPower 3 = "0" -- object should stay in the center of the beam -showTractionPower i = "THIS SHOULD NOT BE POSSIBLE" ++ show i +--showTweak :: TweakParam -> String +--showTweak tp = case tt of +-- TweakPhaseV -> showPhaseV ct +-- TweakTractionPower -> showTractionPower ct +-- TweakSpinDrag -> show ct +-- TweakSpinAmount -> show ct +-- TweakThrustDelay -> show ct +-- where +-- tt = _tweakType tp +-- ct = _tweakVal tp +-- +--showPhaseV :: Int -> String +--showPhaseV 0 = "V" +--showPhaseV 1 = "/" +--showPhaseV 2 = "Z" +--showPhaseV i = show i ++ " should not be possible" +-- +--showTractionPower :: Int -> String +--showTractionPower 0 = "+" +--showTractionPower 1 = "-" +--showTractionPower 2 = "#" +--showTractionPower 3 = "0" -- object should stay in the center of the beam +--showTractionPower i = "THIS SHOULD NOT BE POSSIBLE" ++ show i diff --git a/src/Dodge/Update/Input/InGame.hs b/src/Dodge/Update/Input/InGame.hs index 4a6108830..b81042ab5 100644 --- a/src/Dodge/Update/Input/InGame.hs +++ b/src/Dodge/Update/Input/InGame.hs @@ -6,7 +6,7 @@ import qualified Data.IntMap.Strict as IM import Data.List (sort) import qualified Data.Map.Strict as M import Data.Maybe -import Dodge.Base.You +--import Dodge.Base.You import Dodge.Button.Event import Dodge.Camera import Dodge.Creature.Action diff --git a/src/Dodge/Update/Scroll.hs b/src/Dodge/Update/Scroll.hs index 6add0482c..217f6d2ee 100644 --- a/src/Dodge/Update/Scroll.hs +++ b/src/Dodge/Update/Scroll.hs @@ -12,7 +12,7 @@ import Dodge.Inventory import Dodge.SelectionSections --import Dodge.SoundLogic import Dodge.Terminal -import Dodge.Tweak +--import Dodge.Tweak import qualified IntMapHelp as IM import LensHelp import SDL