Add missing file, workaround for placement positions bug
This commit is contained in:
@@ -21,6 +21,7 @@ mntLSOn
|
||||
-> LightSource -> Point2 -> Point3 -> (Placement -> Maybe Placement) -> Placement
|
||||
mntLSOn shapeF mcol ls wallp lsp@(V3 lx ly _)
|
||||
= ps0jPushPS (PutShape . setCol $ shapeF wallp lsp)
|
||||
-- = ps0j (PutShape . setCol $ shapeF wallp lsp)
|
||||
. pt0 (PutLS $ ls & lsParam . lsPos .~ lsp')
|
||||
where
|
||||
lsp' = lsp -.-.- V3 x y 1
|
||||
|
||||
@@ -54,6 +54,7 @@ placePlainPSSpot :: GenWorld -> Room -> Placement -> DPoint2 -> ((GenWorld,Room)
|
||||
placePlainPSSpot w rm plmnt shift =
|
||||
let (i,w') = placeSpotID (shiftPSBy shift (_plSpot plmnt)) (_plType plmnt) w
|
||||
newplmnt = plmnt & plMID ?~ i
|
||||
--in maybe ((w',rm),[newplmnt]) (recrPlace newplmnt w') (_plIDCont plmnt newplmnt)
|
||||
in maybe ((w',rm),[newplmnt]) (recrPlace newplmnt w') (_plIDCont plmnt newplmnt)
|
||||
where
|
||||
recrPlace newplmnt w' pl = let (wr,newplmnts) = placeSpot (w',rm) pl
|
||||
|
||||
@@ -12,10 +12,10 @@ shiftPSBy (pos,rot) ps = ps
|
||||
& psRot +~ rot
|
||||
shiftPlacement :: (Point2,Float) -> Placement -> Placement
|
||||
shiftPlacement shift plmnt = case plmnt of
|
||||
-- slightly messy NoShiftCont, necessary to stop interference with ps0jPushPS
|
||||
Placement {_plSpot = PSNoShiftCont {}} -> plmnt & plSpot %~ shiftPSBy shift
|
||||
Placement {} -> plmnt & plSpot %~ shiftPSBy shift
|
||||
-- TODO check whether the following continuation is ever necessary
|
||||
-- it can interfere with ps0jPushPS
|
||||
-- & plIDCont %~ fmap (fmap $ shiftPlacement shift)
|
||||
& plIDCont %~ fmap (fmap $ shiftPlacement shift)
|
||||
PlacementUsingPos p f -> PlacementUsingPos (shiftPoint3By shift p)
|
||||
(fmap (shiftPlacement shift) f)
|
||||
RandomPlacement rpl -> RandomPlacement $ fmap (shiftPlacement shift) rpl
|
||||
|
||||
Reference in New Issue
Block a user