Allow arbitrary changes to a room when using a link slot

This commit is contained in:
2021-11-14 01:47:33 +00:00
parent 4a089ff0cc
commit 52946f33a7
10 changed files with 55 additions and 18 deletions
+10
View File
@@ -0,0 +1,10 @@
module Dodge.Wire where
import Dodge.LevelGen.Data
import Dodge.Room.Link
import Geometry
import qualified Data.IntMap.Strict as IM
import Control.Lens
putWireEnd :: Int -> (Point2,Float) -> Room -> Room
putWireEnd i pos rm = rm & rmEndWires %~ IM.insert i (uncurry RoomWire $ invShiftLinkBy (_rmShift rm) pos)