Allow for inventory item bolding

This commit is contained in:
2025-12-09 22:46:57 +00:00
parent bf8c538491
commit 851b26262a
18 changed files with 274 additions and 225 deletions
+21 -22
View File
@@ -3,30 +3,29 @@ module Dodge.Event.Test (testEvent) where
--import Dodge.Creature.State
--import Dodge.Flame
import Data.Maybe
--import Data.Maybe
import Dodge.Data.World
import LensHelp
import Linear
--import Linear
testEvent :: World -> World
testEvent w = fromMaybe w $ do
testEvent w = w & cWorld . highlightItems .~
(w ^. cWorld . lWorld . items & each .~ 20)
--fromMaybe w $ do
-- cpos <- w ^? cWorld . lWorld . creatures . ix 0 . crPos . _xy
-- return $ w & makeFlame (cpos + 25) 1
--testEvent w = fromMaybe w $ do
cpos <- w ^? cWorld . lWorld . creatures . ix 0 . crPos . _xy
let distR = 50
t1 = V2 1 (-1)
t2 = V2 1 1
t3 = V2 distR 0
v3 = V3 t1 t2 t3
distortionBulge =
RadialDistortion
cpos
(V2 distR 0)
(V2 0 distR)
v3 v3 v3
20
return $ w & cWorld . lWorld . distortions .~ [distortionBulge
, distortionBulge & rdPos +~ 50 & rdTR . _1 +~ V2 (-1) 1
, distortionBulge & rdPos +~ (-50)
]
-- let distR = 50
-- t1 = V2 1 (-1)
-- t2 = V2 1 1
-- t3 = V2 distR 0
-- v3 = V3 t1 t2 t3
-- distortionBulge =
-- RadialDistortion
-- cpos
-- (V2 distR 0)
-- (V2 0 distR)
-- v3 v3 v3
-- 20
-- return $ w & cWorld . lWorld . distortions .~ [distortionBulge
-- , distortionBulge & rdPos +~ 50 & rdTR . _1 +~ V2 (-1) 1
-- , distortionBulge & rdPos +~ (-50)
-- ]