Cleanup
This commit is contained in:
@@ -73,5 +73,7 @@ putAutoDoor a b = Placement (PS 0 0) (PutCoord a) Nothing Nothing $ \_ apl ->
|
||||
defaultAutoWall
|
||||
a
|
||||
b
|
||||
(defaultDoor & drTrigger .~(WdBlCrFilterNearPoint 40 (0.5 *^ (x + y)) CrOpenAutoDoor)
|
||||
& drUpdate .~ DoorLerpWithTimer 0 3)
|
||||
( defaultDoor
|
||||
& drTrigger .~ (WdBlCrFilterNearPoint 40 (0.5 *^ (x + y)) CrOpenAutoDoor)
|
||||
& drUpdate .~ DoorLerpWithTimer 0 3
|
||||
)
|
||||
|
||||
@@ -45,6 +45,8 @@ mntLSOn ::
|
||||
mntLSOn shapeF mcol ls wallp lsp@(V3 lx ly _) =
|
||||
ps0jPushPS (PutLabel "light") .
|
||||
ps0jPushPS (putShape . setCol $ shapeF wallp lsp)
|
||||
--ps0j (PutLabel "light") .
|
||||
--ps0j (putShape . setCol $ shapeF wallp lsp)
|
||||
. pt0 (PutLS $ ls & lsParam . lsPos .~ lsp')
|
||||
where
|
||||
lsp' = lsp -.-.- V3 x y 1
|
||||
|
||||
@@ -125,7 +125,7 @@ placeSpotID rid ps pt w = case pt of
|
||||
PutForeground fs ->
|
||||
(0, w & gwWorld . cWorld . lWorld . foreShapes .:~ mvFS p rot fs)
|
||||
PutMachine pps mc mitm -> plMachine (map doShift pps) mc mitm p rot w
|
||||
PutLS ls -> plNewUpID (gwWorld . cWorld . lWorld . lightSources) lsID (mvLS p' rot ls) w
|
||||
PutLS ls -> plNewUpID (gwWorld . cWorld . lWorld . lightSources) lsID (mvLS p rot ls) w
|
||||
RandPS _ -> error "RandPS should not be reachable here" --evaluateRandPS rid rgn ps w
|
||||
PutDoor dr wl -> plDoor (dr & drZeroPos %~ pashift & drOnePos %~ pashift) wl w
|
||||
PutCoord cp -> plNewID (gwWorld . coordinates) (doShift cp) w
|
||||
@@ -144,8 +144,7 @@ placeSpotID rid ps pt w = case pt of
|
||||
(foldMap loopPairs (map (map doShift) qs)))
|
||||
PutLabel{} -> (0, w)
|
||||
where
|
||||
p@(V2 px py) = _psPos ps
|
||||
p' = V3 px py 0
|
||||
p = _psPos ps
|
||||
rot = _psRot ps
|
||||
doShift = shiftPointBy (p, rot)
|
||||
pashift = compP2A (p, rot)
|
||||
@@ -219,7 +218,5 @@ placeMachineWalls mat poly mcid = insertStructureWalls MachinePart baseWall poly
|
||||
baseWall = defaultMachineWall & wlStructure . wsMachine .~ mcid
|
||||
& wlMaterial .~ mat
|
||||
|
||||
mvLS :: Point3 -> Float -> LightSource -> LightSource
|
||||
mvLS (V3 x y z) rot ls = ls & lsParam . lsPos .~ V3 x y z + startPos
|
||||
where
|
||||
startPos = onXY (rotateV rot) $ _lsPos (_lsParam ls)
|
||||
mvLS :: Point2 -> Float -> LightSource -> LightSource
|
||||
mvLS x rot = lsParam . lsPos . _xy %~ ((+x) . rotateV rot)
|
||||
|
||||
Reference in New Issue
Block a user