Function for adding random lights to roomNGon
This commit is contained in:
@@ -181,7 +181,8 @@ spanColLightBlackI col h a b =
|
||||
V2 x y = 0.5 *.* (a +.+ b)
|
||||
|
||||
spanLightI :: Point2 -> Point2 -> Placement
|
||||
spanLightI = spanColLightI 0.75 50.1
|
||||
--spanLightI = spanColLightI 0.75 50.1
|
||||
spanLightI = spanColLightI 0.75 95
|
||||
|
||||
spanLightY :: Point2 -> Point2 -> Point2 -> Point2 -> Placement
|
||||
spanLightY l x y z =
|
||||
@@ -191,7 +192,7 @@ spanLightY l x y z =
|
||||
sps0 $ f z
|
||||
where
|
||||
f p = putShape $ thinHighBar h p (l + normalize (l-p))
|
||||
h = 50
|
||||
h = 95
|
||||
|
||||
--extendAway :: Point2 -> Point2 -> Point2
|
||||
--extendAway p x = p +.+ squashNormalizeV (p -.- x)
|
||||
|
||||
@@ -33,7 +33,7 @@ import NewInt
|
||||
placeSpot :: Int -> GenWorld -> Placement -> GenWorld
|
||||
placeSpot rid w plmnt = case plmnt ^. plSpot of
|
||||
PSRoomRand i f -> placeSpotRoomRand rid i f plmnt w
|
||||
PSPos extract eff fallback -> placeSpotUsingLink w rid plmnt extract eff fallback
|
||||
PSPos extract eff fallback -> placeSpotUsingRoomPos w rid plmnt extract eff fallback
|
||||
_ -> placePlainPSSpot w rid plmnt shift
|
||||
where
|
||||
shift = _rmShift $ w ^?! genRooms . ix rid
|
||||
@@ -62,7 +62,7 @@ placePlainPSSpot w rid plmnt shift = case plmnt ^. plType of
|
||||
(w' & genRooms . ix rid . rmPmnts .:~ newplmnt)
|
||||
|
||||
-- this should be tidied up
|
||||
placeSpotUsingLink ::
|
||||
placeSpotUsingRoomPos ::
|
||||
GenWorld ->
|
||||
Int ->
|
||||
Placement ->
|
||||
@@ -70,7 +70,7 @@ placeSpotUsingLink ::
|
||||
(RoomPos -> Room -> Room) ->
|
||||
Maybe Placement ->
|
||||
GenWorld
|
||||
placeSpotUsingLink w rid plmnt extract eff fallback =
|
||||
placeSpotUsingRoomPos w rid plmnt extract eff fallback =
|
||||
case searchedPoss (w ^?! genRooms . ix rid . rmPos) of
|
||||
Just (ps, rmposs) ->
|
||||
placeSpot
|
||||
|
||||
Reference in New Issue
Block a user