Add various helpers for creating polyhedra

This commit is contained in:
2021-06-27 18:53:06 +02:00
parent 06f22a3ea5
commit 089dcc3f5d
14 changed files with 155 additions and 65 deletions
+2 -2
View File
@@ -41,7 +41,7 @@ initialiseLamp :: CRUpdate
initialiseLamp w (f,g) cr = ( (addLS . f , g), Just $ cr & crUpdate .~ updateLamp i)
where
i = IM.newKey $ _lightSources $ f w -- to give different lights different keys
addLS = over lightSources (IM.insert i (lightAt (x,y,0) i))
addLS = over lightSources (IM.insert i (lightAt (x,y,100) i))
(x,y) = _crPos cr
updateLamp :: Int -> CRUpdate
@@ -53,7 +53,7 @@ updateLamp i = unrandUpdate handleLS internalUpdate
| otherwise = w & lightSources . ix i . lsPos .~ f cPos
where
cPos = _crPos cr
f (x,y) = (x,y,0)
f (x,y) = (x,y,100)
internalUpdate cr
| _crHP cr < 0 = Nothing
| otherwise = Just $ doDamage cr