Work on mapper item, simpler generation of items from console
This commit is contained in:
@@ -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 ->
|
||||
|
||||
Reference in New Issue
Block a user