Split UseItem module

This commit is contained in:
2021-03-16 11:54:41 +01:00
parent 97fd7f5576
commit ca5ff88522
19 changed files with 609 additions and 96 deletions
+1 -4
View File
@@ -362,7 +362,6 @@ displayAmount n | n > 1 = "-x" ++show n
rectangleSolid x y = polygon [(x,y),(x,-y),(-x,-y),(-x,y)]
drawItem :: FloorItem -> Drawing
drawItem (FlAm {_flItPos = p}) = uncurry translate p $ onLayer FlItLayer $ rectangleSolid 5 5
drawItem flIt = uncurry translate (_flItPos flIt)
$ rotateDrawing (radToDeg $ _flItRot flIt) (_itFloorPict (_flIt flIt))
@@ -415,9 +414,7 @@ drawItemName w flIt | magV (_crPos (you w) -.- _flItPos flIt) < 100
t = rotate (0 - (_cameraRot w))
. uncurry translate (zoom *.* (_flItPos flIt -.- _cameraPos w))
. rotate (_cameraRot w)
nameOfItem = case flIt of FlIt {} -> _itName $ _flIt flIt
FlAm {_flAm = PistolBullet} -> "Bullets"
FlAm {_flAm = LiquidFuel} -> "Liquid Fuel"
nameOfItem = _itName $ _flIt flIt
zoom = _cameraZoom w
ringPict :: Drawing