Increase default mounted lamp range

This commit is contained in:
2025-10-01 17:26:08 +01:00
parent a2eb0e026b
commit 2973ad6eed
6 changed files with 54 additions and 46 deletions
+1 -1
View File
@@ -123,7 +123,7 @@ vShape wallpos (V3 x y z) =
mntLS :: (Point2 -> Point3 -> Shape) -> Point2 -> Point3 -> Placement
mntLS shp wallp lampp = mntLSOn shp Nothing defaultLS wallp lampp (const Nothing)
where
defaultLS = LS 0 $ LSParam 0 200 0.6
defaultLS = LS 0 $ LSParam 0 300 0.6
mntLSCol :: (Point2 -> Point3 -> Shape) -> Color -> Point2 -> Point3 -> Placement
mntLSCol shp col wallp lampp = mntLSOn shp (Just col) defaultLS wallp lampp (const Nothing)
+4 -4
View File
@@ -54,8 +54,8 @@ roomRect x y xn yn =
, --, _rmPos = map (roomposat (RoomPosOnPath S.empty)) posps
-- ++ map (roomposat (RoomPosOffPath S.empty)) interposps
_rmPos =
map makeonpos posps'
++ map makeoffpos interposps'
map makeonpos posps
++ map makeoffpos interposps
, _rmPmnts = []
, _rmBound = [rectNSWE (y + 5) (-5) (-5) (x + 5)]
, _rmFloor =
@@ -105,8 +105,8 @@ roomRect x y xn yn =
, PathFromEdge East (xn - a)
, PathFromEdge West a
]
posps' = map (over _1 (+.+ V2 20 20)) $ gridPoints'' xd (xn + 1) yd (yn + 1)
interposps' = map (over _1 (+.+ V2 (20 + xd / 2) (20 + yd / 2))) $ gridPoints'' xd xn yd yn
posps = map (over _1 (+.+ V2 20 20)) $ gridPoints'' xd (xn + 1) yd (yn + 1)
interposps = map (over _1 (+.+ V2 (20 + xd / 2) (20 + yd / 2))) $ gridPoints'' xd xn yd yn
makeoffpos (p, a) = RoomPos
p 0 (S.singleton $ RoomPosOffPath $ makerpedges' a) NotLink mempty
makerpedges' (a, b) =
+8
View File
@@ -36,6 +36,7 @@ import Geometry
import LensHelp
import MonadHelp
import RandomHelp
import Linear
roomC :: RandomGen g => Float -> Float -> State g Room
roomC w h = do
@@ -75,6 +76,8 @@ glassSwitchBack = do
hgt <- state $ randomR (400, 600)
wllen <- state $ randomR (60, wth / 2 -40)
l1 <- mntLightLnkCond (resetPLUse $ rprBool $ \rp _ -> isInLnk rp)
--l2 <- mntLightLnkCond (rprBool $ \rp _ -> (rp ^. rpPos . _x) > wth -1 && null (rp ^. rpPlacementUse))
l2 <- mntLightLnkCond (rprBool $ \rp _ -> rp ^. rpLinkStatus . rplsType . at (OnEdge West) == Just ()&& null (rp ^. rpPlacementUse))
let hf = hgt / 5
awindow h xl xr = windowLine (V2 xl h) (V2 xr h)
plmnts =
@@ -87,6 +90,11 @@ glassSwitchBack = do
, blockLine (V2 0 (3 * hf)) (V2 wllen (3 * hf))
, blockLine (V2 (wth - wllen) (4 * hf)) (V2 wth (4 * hf))
, l1
, l2
, l2
, l2
, l2
, l2
-- , sPS (V2 (wth / 2) (10 + hgt / 2)) 0 putLamp
]
let northPSs = do