Improve machines, tweak wall ids
This commit is contained in:
@@ -25,6 +25,7 @@ import Color
|
||||
|
||||
import Control.Monad.State
|
||||
import Control.Lens
|
||||
import qualified Data.IntSet as IS
|
||||
|
||||
placeSpot :: World -> ((Point2,Float) , Placement) -> World
|
||||
placeSpot w (shift, plmnt) =
|
||||
@@ -195,7 +196,7 @@ placeMachine color wallpoly mc p rot w = (mcid
|
||||
where
|
||||
mcid = IM.newKey $ _machines w
|
||||
wlid = IM.newKey $ _walls w
|
||||
wlids = [wlid .. wlid + length wallpoly]
|
||||
wlids = IS.fromList [wlid .. wlid + length wallpoly]
|
||||
addMc mcs = IM.insert mcid (mc {_mcPos = p,_mcDir = rot,_mcID = mcid, _mcWallIDs = wlids}) mcs
|
||||
-- TODO correctly remove/shift pathfinding lines (removePathsCrossing)
|
||||
placeMachineWalls :: Color -> [Point2] -> Int -> Int -> IM.IntMap Wall -> IM.IntMap Wall
|
||||
|
||||
Reference in New Issue
Block a user