Add destroyable lighting
This commit is contained in:
@@ -39,6 +39,7 @@ import qualified Data.Set as S
|
||||
import qualified Data.Map as M
|
||||
|
||||
-- deals with placement of objects within the world
|
||||
-- after they have had their coordinates set by the layout
|
||||
|
||||
placeSpots :: [PlacementSpot] -> World -> World
|
||||
placeSpots pss w = foldr placeSpot w basicPlacements
|
||||
@@ -75,9 +76,6 @@ placeSpot ps w = case ps of
|
||||
PS {_psPos = p, _psRot = rot, _psType = PutBlock (hp:hps) col ps}
|
||||
-> putBlock (map (shiftPointBy (p,rot)) ps) hp col False hps w
|
||||
|
||||
-- PS {_psPos = p, _psRot = rot, _psType = PutBlockWall (hp:hps) col ps}
|
||||
-- -> putBlockWallPart (map (shiftPointBy (p,rot)) ps) hp col False hps w
|
||||
|
||||
PS {_psPos = p, _psRot = rot, _psType = PutBtDoor c bp f a b}
|
||||
-> addButtonDoor c (shiftPointBy (p,rot) bp) (f + rot)
|
||||
(shiftPointBy (p,rot) a) (shiftPointBy (p,rot) b) w
|
||||
@@ -95,6 +93,7 @@ placeSpot ps w = case ps of
|
||||
|
||||
_ -> w
|
||||
|
||||
-- TODO: remove this typeclass
|
||||
class Shiftable a where
|
||||
translateS :: Point2 -> a -> a
|
||||
rotateS :: Float -> a -> a
|
||||
|
||||
Reference in New Issue
Block a user