Work toward adding wiring
This commit is contained in:
@@ -15,7 +15,6 @@ import Dodge.LevelGen.TriggerDoor
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.Default.Wall
|
||||
import Dodge.RandomHelp
|
||||
import Dodge.Room.Data
|
||||
import Dodge.Placements.Spot
|
||||
import Geometry
|
||||
import Geometry.Vector3D
|
||||
@@ -30,7 +29,7 @@ import qualified Data.IntSet as IS
|
||||
|
||||
-- when placing a placement, we update the world and the room and assign an id
|
||||
-- to the placement
|
||||
placeSpot :: (World,Room) -> Placement -> ( (World,Room), [Placement])
|
||||
placeSpot :: (World,Room) -> Placement -> ( (World,Room), [Placement] )
|
||||
placeSpot (w,rm) plmnt = case plmnt of
|
||||
Placement{_plSpot = PSRoomRand i} -> placeSpotRoomRand rm i plmnt w
|
||||
Placement{_plSpot = PSLnk{}} -> placeSpotUsingLink w rm plmnt
|
||||
@@ -58,11 +57,11 @@ placeSpotUsingLink w rm plmnt = case lnks of
|
||||
where
|
||||
uselnk lnki = rm & rmLinks %~ deletei lnki
|
||||
rps = _plSpot plmnt
|
||||
fallback = _psFallback rps
|
||||
test = _psLinkTest rps
|
||||
fallback = _psLnkFallback rps
|
||||
test = _psLnkTest rps
|
||||
(lnks,g) = runState (shuffle $ filter (test . snd) $ zip [0..]
|
||||
$ map (invShiftLinkBy $ _rmShift rm) $ _rmLinks rm) $ _randGen w
|
||||
f x (PSLnk t s _)
|
||||
f x (PSLnk t s _ _)
|
||||
| t x = uncurry PS $ s x
|
||||
f _ ps = ps
|
||||
invShiftLinkBy :: (Point2,Float) -> (Point2,Float) -> (Point2,Float)
|
||||
|
||||
Reference in New Issue
Block a user