Work on room generation/laser run past
This commit is contained in:
@@ -27,8 +27,6 @@ import LensHelp
|
||||
import Linear
|
||||
import NewInt
|
||||
|
||||
--import System.Random
|
||||
|
||||
-- when placing a placement, we update the world and the room and assign an id
|
||||
-- to the placement. This id should be associated with the type of placement and
|
||||
-- match up with the created id for the object (creature id, flitid id, etc)
|
||||
@@ -199,7 +197,7 @@ plMachine ::
|
||||
plMachine wallpoly mc mitm p rot gw =
|
||||
( mcid
|
||||
, gw & tolw . machines . at mcid ?~ themc
|
||||
& gwWorld %~ placeMachineWalls wallpoly mcid wlid
|
||||
& gwWorld %~ placeMachineWalls (_mcMaterial mc) wallpoly mcid wlid
|
||||
& tolw %~ maybe id placeturretitm mitm
|
||||
)
|
||||
where
|
||||
@@ -215,10 +213,11 @@ plMachine wallpoly mc mitm p rot gw =
|
||||
itid = IM.newKey $ gw ^. gwWorld . cWorld . lWorld . items
|
||||
itm' = itm & itID .~ NInt itid & itLocation .~ OnTurret mcid
|
||||
|
||||
placeMachineWalls :: [Point2] -> Int -> Int -> World -> World
|
||||
placeMachineWalls poly mcid = insertStructureWalls MachinePart baseWall poly mcid
|
||||
placeMachineWalls :: Material -> [Point2] -> Int -> Int -> World -> World
|
||||
placeMachineWalls mat poly mcid = insertStructureWalls MachinePart baseWall poly mcid
|
||||
where
|
||||
baseWall = defaultMachineWall & wlStructure . wsMachine .~ mcid
|
||||
& wlMaterial .~ mat
|
||||
|
||||
mvLS :: Point3 -> Float -> LightSource -> LightSource
|
||||
mvLS (V3 x y z) rot ls = ls & lsParam . lsPos .~ V3 x y z + startPos
|
||||
|
||||
Reference in New Issue
Block a user