From 0237e655b519c6d6f37d64e984c2d6e7493ae323 Mon Sep 17 00:00:00 2001 From: justin Date: Mon, 4 Nov 2024 10:28:21 +0000 Subject: [PATCH] Cleanup --- ghcidOutput | 2 +- graph/itemCombinations.gv | 130 ++++++++++++++---------------- src/Dodge/Combine/Combinations.hs | 1 - src/Dodge/Update.hs | 29 +++---- 4 files changed, 75 insertions(+), 87 deletions(-) diff --git a/ghcidOutput b/ghcidOutput index 96d99557d..44651c24c 100644 --- a/ghcidOutput +++ b/ghcidOutput @@ -1 +1 @@ -All good (594 modules, at 10:18:45) +All good (594 modules, at 10:28:16) diff --git a/graph/itemCombinations.gv b/graph/itemCombinations.gv index d930541a4..6ae54b9ee 100644 --- a/graph/itemCombinations.gv +++ b/graph/itemCombinations.gv @@ -59,35 +59,35 @@ digraph { ,label="HELD {_ibtHeld = FLAMETORRENT}"]; 75 [shape=box ,label="HELD {_ibtHeld = LASER}"]; - 80 [shape=box + 79 [shape=box ,label="HELD {_ibtHeld = SPARKGUN}"]; - 82 [shape=box + 81 [shape=box ,label="HELD {_ibtHeld = TESLAGUN}"]; - 84 [shape=box + 83 [shape=box ,label="LEFT {_ibtLeft = BLINKER}"]; - 87 [shape=box + 86 [shape=box ,label="LEFT {_ibtLeft = BLINKERUNSAFE}"]; - 89 [shape=box + 88 [shape=box ,label="EQUIP {_ibtEquip = MAGSHIELD}"]; - 92 [shape=box + 91 [shape=box ,label="EQUIP {_ibtEquip = POWERLEGS}"]; - 98 [shape=box + 97 [shape=box ,label="HELD {_ibtHeld = FLATSHIELD}"]; - 108 [shape=box + 107 [shape=box ,label="EQUIP {_ibtEquip = AUTODETECTOR ITEMDETECTOR}"]; - 111 [shape=box + 110 [shape=box ,label="EQUIP {_ibtEquip = AUTODETECTOR WALLDETECTOR}"]; - 113 [shape=box + 112 [shape=box ,label="EQUIP {_ibtEquip = AUTODETECTOR CREATUREDETECTOR}"]; - 115 [shape=box + 114 [shape=box ,label="HELD {_ibtHeld = TORCH}"]; - 116 [shape=box + 115 [shape=box ,label="AMMOMAG {_ibtAmmoMag = BATTERY}"]; - 119 [shape=box + 118 [shape=box ,label="EQUIP {_ibtEquip = HEADLAMP}"]; - 120 [shape=box + 119 [shape=box ,label="EQUIP {_ibtEquip = HAT}"]; - 122 [shape=box + 121 [shape=box ,label="HELD {_ibtHeld = BANGSTICK {_xNum = 2}}"]; } subgraph 2 { @@ -121,30 +121,29 @@ digraph { 70 [shape=point]; 72 [shape=point]; 74 [shape=point]; - 76 [shape=point]; - 79 [shape=point]; - 81 [shape=point]; - 83 [shape=point]; - 86 [shape=point]; - 88 [shape=point]; - 91 [shape=point]; + 78 [shape=point]; + 80 [shape=point]; + 82 [shape=point]; + 85 [shape=point]; + 87 [shape=point]; + 90 [shape=point]; + 93 [shape=point]; 94 [shape=point]; 95 [shape=point]; 96 [shape=point]; - 97 [shape=point]; - 99 [shape=point]; - 101 [shape=point]; - 104 [shape=point]; - 107 [shape=point]; - 110 [shape=point]; - 112 [shape=point]; - 114 [shape=point]; - 118 [shape=point]; - 121 [shape=point]; - 123 [shape=point]; - 125 [shape=point]; - 127 [shape=point]; - 129 [shape=point]; + 98 [shape=point]; + 100 [shape=point]; + 103 [shape=point]; + 106 [shape=point]; + 109 [shape=point]; + 111 [shape=point]; + 113 [shape=point]; + 117 [shape=point]; + 120 [shape=point]; + 122 [shape=point]; + 124 [shape=point]; + 126 [shape=point]; + 128 [shape=point]; } 0 -> 1 [xlabel="",tailport=e]; 2 -> 0 [xlabel=1 @@ -173,13 +172,13 @@ digraph { 19 -> 40 [xlabel=1 ,arrowhead=onone ,headport=w]; - 19 -> 121 [xlabel=1 + 19 -> 120 [xlabel=1 ,arrowhead=onone ,headport=w]; - 19 -> 125 [xlabel=1 + 19 -> 124 [xlabel=1 ,arrowhead=onone ,headport=w]; - 19 -> 127 [xlabel=1 + 19 -> 126 [xlabel=1 ,arrowhead=onone ,headport=w]; 22 -> 23 [xlabel="",tailport=e]; @@ -204,7 +203,7 @@ digraph { ,arrowhead=onone ,headport=w]; 36 -> 37 [xlabel="",tailport=e]; - 37 -> 129 [xlabel=1 + 37 -> 128 [xlabel=1 ,arrowhead=onone ,headport=w]; 38 -> 39 [xlabel="",tailport=e]; @@ -221,16 +220,13 @@ digraph { 41 -> 46 [xlabel=1 ,arrowhead=onone ,headport=w]; - 41 -> 125 [xlabel=1 + 41 -> 124 [xlabel=1 ,arrowhead=onone ,headport=w]; 42 -> 43 [xlabel="",tailport=e]; 44 -> 45 [xlabel="",tailport=e]; - 45 -> 74 [xlabel=1 - ,arrowhead=onone - ,headport=w]; 46 -> 47 [xlabel="",tailport=e]; - 47 -> 127 [xlabel=1 + 47 -> 126 [xlabel=1 ,arrowhead=onone ,headport=w]; 49 -> 50 [xlabel="",tailport=e]; @@ -267,46 +263,42 @@ digraph { ,headport=w]; 70 -> 71 [xlabel="",tailport=e]; 72 -> 73 [xlabel="",tailport=e]; - 74 -> 73 [xlabel="",tailport=e]; - 75 -> 74 [xlabel=1 + 74 -> 75 [xlabel="",tailport=e]; + 78 -> 79 [xlabel="",tailport=e]; + 79 -> 80 [xlabel=1 ,arrowhead=onone ,headport=w]; - 76 -> 75 [xlabel="",tailport=e]; - 79 -> 80 [xlabel="",tailport=e]; - 80 -> 81 [xlabel=1 + 80 -> 81 [xlabel="",tailport=e]; + 82 -> 83 [xlabel="",tailport=e]; + 83 -> 85 [xlabel=1 ,arrowhead=onone ,headport=w]; - 81 -> 82 [xlabel="",tailport=e]; - 83 -> 84 [xlabel="",tailport=e]; - 84 -> 86 [xlabel=1 - ,arrowhead=onone - ,headport=w]; - 86 -> 87 [xlabel="",tailport=e]; - 88 -> 89 [xlabel="",tailport=e]; - 91 -> 92 [xlabel="",tailport=e]; - 97 -> 98 [xlabel="",tailport=e]; - 107 -> 108 [xlabel="" + 85 -> 86 [xlabel="",tailport=e]; + 87 -> 88 [xlabel="",tailport=e]; + 90 -> 91 [xlabel="",tailport=e]; + 96 -> 97 [xlabel="",tailport=e]; + 106 -> 107 [xlabel="" ,tailport=e]; - 110 -> 111 [xlabel="" + 109 -> 110 [xlabel="" ,tailport=e]; - 112 -> 113 [xlabel="" + 111 -> 112 [xlabel="" ,tailport=e]; - 114 -> 115 [xlabel="" + 113 -> 114 [xlabel="" ,tailport=e]; - 115 -> 118 [xlabel=1 + 114 -> 117 [xlabel=1 ,arrowhead=onone ,headport=w]; - 116 -> 114 [xlabel=1 + 115 -> 113 [xlabel=1 ,arrowhead=onone ,headport=w]; - 118 -> 119 [xlabel="" + 117 -> 118 [xlabel="" ,tailport=e]; - 120 -> 118 [xlabel=1 + 119 -> 117 [xlabel=1 ,arrowhead=onone ,headport=w]; - 121 -> 122 [xlabel="" + 120 -> 121 [xlabel="" ,tailport=e]; - 122 -> 123 [xlabel=1 + 121 -> 122 [xlabel=1 ,arrowhead=onone ,headport=w]; } \ No newline at end of file diff --git a/src/Dodge/Combine/Combinations.hs b/src/Dodge/Combine/Combinations.hs index 136b36405..382ae8eef 100644 --- a/src/Dodge/Combine/Combinations.hs +++ b/src/Dodge/Combine/Combinations.hs @@ -86,7 +86,6 @@ itemCombinations = , po [HELD FLAMESPITTER, cr STEELDRUM] flameThrower , po [HELD FLAMETHROWER, cr STEELDRUM] flameWall , po [HELD FLAMETHROWER, cr PUMP] flameTorrent - , po [HELD LASER, HELD BURSTRIFLE] flameTorrent , p [o $ cr PRISM, o $ cr TRANSFORMER, o $ cr PIPE] laser -- , po [HELD LASGUN, HELD LASGUN, cr HARDWARE] dualBeam -- , po [HELD LASGUN, cr TRANSFORMER] (lasWide 2) diff --git a/src/Dodge/Update.hs b/src/Dodge/Update.hs index 7f4cb10af..ec1a63e84 100644 --- a/src/Dodge/Update.hs +++ b/src/Dodge/Update.hs @@ -384,26 +384,23 @@ shiftInvItemsDown (_, i) x w = fromMaybe w $ do g i' m = fst <$> IM.lookupGT i' m updateMouseOverInventory :: Configuration -> World -> World -updateMouseOverInventory cfig w = fromMaybe - (w & hud . hudElement . diMouseOver .~ Nothing) - $ do - sss <- w ^? hud . hudElement . diSections - guard $ ButtonRight `M.notMember` (w ^. input . mouseButtons) - || not (null $ w ^? hud . hudElement . subInventory . ciSelection) - return $ - w & hud . hudElement . diMouseOver - .~ inverseSelNumPos cfig ldp sss (w ^. input . mousePos) +updateMouseOverInventory cfig w = + w & hud . hudElement . diMouseOver .~ newmouseover where - ldp = invDisplayParams w + newmouseover = do + sss <- w ^? hud . hudElement . diSections + guard $ + ButtonRight `M.notMember` (w ^. input . mouseButtons) + || not (null $ w ^? hud . hudElement . subInventory . ciSelection) + inverseSelNumPos cfig (invDisplayParams w) sss (w ^. input . mousePos) updateMouseOverCombineInventory :: Configuration -> World -> World -updateMouseOverCombineInventory cfig w = fromMaybe w $ do - sss <- w ^? hud . hudElement . subInventory . ciSections - return $ - w & hud . hudElement . subInventory . ciMouseOver - .~ inverseSelNumPos cfig ldp sss (w ^. input . mousePos) +updateMouseOverCombineInventory cfig w = + w & hud . hudElement . subInventory . ciMouseOver .~ newmouseover where - ldp = secondColumnParams + newmouseover = do + sss <- w ^? hud . hudElement . subInventory . ciSections + inverseSelNumPos cfig secondColumnParams sss (w ^. input . mousePos) updateWheelEvents :: World -> World updateWheelEvents w