Function for adding random lights to roomNGon
This commit is contained in:
@@ -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