Somewhat simplify RoomPos types
This commit is contained in:
@@ -97,7 +97,7 @@ roomRect x y xn yn =
|
||||
. zipCountDown
|
||||
pth = linksGridToPath lnks
|
||||
$ map (bimap (+.+ V2 20 20) (+.+ V2 20 20)) (makeGrid xd xn yd yn)
|
||||
makeonpos (p, a) = RoomPos p 0 (S.singleton $ RoomPosOnPath $ makerpedges a)
|
||||
makeonpos (p, a) = RoomPos p 0 (S.singleton $ RoomPosOnGrid $ makerpedges a)
|
||||
NotLink mempty
|
||||
makerpedges (a, b) =
|
||||
S.fromList
|
||||
@@ -109,7 +109,7 @@ roomRect x y xn 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
|
||||
p 0 (S.singleton $ RoomPosOffGrid $ makerpedges' a) NotLink mempty
|
||||
makerpedges' (a, b) =
|
||||
S.fromList
|
||||
[ PathFromEdge South b
|
||||
|
||||
@@ -205,7 +205,7 @@ weaponBetweenPillars = do
|
||||
(h, hn) <- takeOne [(240, 2), (340, 3)]
|
||||
let wpPos = rprBool $ \rp r ->
|
||||
and
|
||||
[ rpIsOnPath rp
|
||||
[ rpIsOnGrid rp
|
||||
, null $ _rpPlacementUse rp
|
||||
, _rpLinkStatus rp == NotLink
|
||||
, any ((< 100) . dist (_rpPos rp)) (usedRoomInLinkPoss r)
|
||||
@@ -215,7 +215,7 @@ weaponBetweenPillars = do
|
||||
critPlacementSpots <- replicateM ncrits $
|
||||
randDirPS $
|
||||
rprBool $ \rp r ->
|
||||
rpIsOnPath rp
|
||||
rpIsOnGrid rp
|
||||
&& null (_rpPlacementUse rp)
|
||||
&& all ((> 100) . dist (_rpPos rp)) (usedRoomLinkPoss r)
|
||||
( roomPillars 30 w h wn hn
|
||||
@@ -334,7 +334,7 @@ pistolerRoom = do
|
||||
.++~ replicate
|
||||
3
|
||||
( psPtPl
|
||||
(rprBool $ \rp _ -> null (_rpPlacementUse rp) && rpIsOnPath rp)
|
||||
(rprBool $ \rp _ -> null (_rpPlacementUse rp) && rpIsOnGrid rp)
|
||||
(PutCrit chaseCrit)
|
||||
)
|
||||
|
||||
@@ -374,7 +374,7 @@ spawnerRoom = do
|
||||
roomC x y <&> rmPmnts
|
||||
.:~ psPtPl
|
||||
( rprBool $ \rp _ ->
|
||||
null (_rpPlacementUse rp) && rpIsOnPath rp
|
||||
null (_rpPlacementUse rp) && rpIsOnGrid rp
|
||||
&& xV2 (_rpPos rp) < x / 2
|
||||
&& yV2 (_rpPos rp) < y / 2
|
||||
)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
module Dodge.Room.Tutorial where
|
||||
|
||||
import Dodge.Room.Pillar
|
||||
import Dodge.Item.Held.Utility
|
||||
import Control.Monad
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
@@ -43,6 +44,8 @@ tutAnoTree = do
|
||||
foldMTRS
|
||||
[ tToBTree "TutStartRez" . return . cleatOnward <$> tutRezBox
|
||||
, corDoor
|
||||
, tToBTree "x" . return . cleatOnward <$> roomPillarsSquare
|
||||
, corDoor
|
||||
, tutHub
|
||||
, tutLight
|
||||
, tutDrop
|
||||
|
||||
Reference in New Issue
Block a user