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
+10
View File
@@ -4,6 +4,7 @@ module Dodge.Render.HUD (
drawHUD,
) where
import Dodge.Item.Location
import Control.Applicative
import Control.Lens
import Control.Monad
@@ -163,6 +164,15 @@ drawSubInventory subinv cfig w = case subinv of
ExamineInventory -> drawExamineInventory cfig w
DisplayTerminal tid -> drawTerminalDisplay tid cfig (w ^. cWorld . lWorld)
CombineInventory{_ciSections = sss} -> drawCombineInventory cfig sss w
MapperInventory p z itid -> drawMapperInventory p z itid cfig w
drawMapperInventory :: Point2 -> Float -> NewInt ItmInt -> Configuration -> World -> Picture
drawMapperInventory p z itid _ w = fold $ do
itm <- w ^? pointerToItemID itid
ls <- itm ^? itUse . useMapperLines
let r = w ^. wCam . camRot
return . scale z z . rotate r . uncurryV translate p
$ foldMap (\(x,y) -> line [x,y]) ls
drawCombineInventory ::
Configuration ->