Automatically order placements

This commit is contained in:
2026-03-17 23:38:14 +00:00
parent 3b4cf68a15
commit d1c2870d63
25 changed files with 527 additions and 479 deletions
+1 -2
View File
@@ -55,8 +55,7 @@ heldTriggerType = \case
FLAMETORRENT -> NoTrigger
FLAMEWALL -> NoTrigger
BLOWTORCH -> NoTrigger
SPARKGUN -> NoTrigger
TESLAGUN -> NoTrigger
TESLACOIL -> NoTrigger
TRACTORGUN -> NoTrigger
RLAUNCHER -> SemiAutoTrigger 20
RLAUNCHERX{} -> SemiAutoTrigger 20
+1 -2
View File
@@ -92,8 +92,7 @@ itemCombinations =
-- , po [HELD LASGUN, HELD LASGUN, cr HARDWARE] dualBeam
-- , po [HELD LASGUN, cr TRANSFORMER] (lasWide 2)
-- , po [HELD LASGUN, HELD LASGUN, HELD LASGUN, cr HARDWARE] lasCircle
, p [o $ cr TRANSFORMER, p 2 $ cr CAN] sparkGun
, p [o (HELD SPARKGUN), p 2 $ cr PIPE] teslaGun
, p [o $ cr TRANSFORMER, p 2 $ cr CAN] teslaCoil
-- , p [o $ cr TELEPORTMODULE, p 2 $ cr MICROCHIP] blinker
, p [o $ HELD BLINKER, p 2 $ cr MICROCHIP] unsafeBlinker
, po [cr MAGNET, cr TIN] (magShield MagnetRepulse)
+1 -1
View File
@@ -345,7 +345,7 @@ stackedInventory =
, megaBattery
, capacitor
, makeTypeCraft TRANSFORMER
, teslaGun
, teslaCoil
, megaBattery
, flameThrower
, chemFuelPouch
+1 -2
View File
@@ -106,8 +106,7 @@ heldItemWeight = \case
FLAMETORRENT -> 10
FLAMEWALL -> 10
BLOWTORCH -> 10
SPARKGUN -> 15
TESLAGUN -> 15
TESLACOIL -> 15
TRACTORGUN -> 10
RLAUNCHER -> 20
RLAUNCHERX{} -> 20
+1 -2
View File
@@ -220,8 +220,7 @@ heldItemBulkiness = \case
FLAMETORRENT -> 1
FLAMEWALL -> 1
BLOWTORCH -> 1
SPARKGUN -> 1
TESLAGUN -> 1
TESLACOIL -> 1
TRACTORGUN -> 1
RLAUNCHER -> 0.9
RLAUNCHERX{} -> 0.9
+1 -2
View File
@@ -164,8 +164,7 @@ data HeldItemType
| FLAMETORRENT
| FLAMEWALL
| BLOWTORCH
| SPARKGUN
| TESLAGUN
| TESLACOIL
| TRACTORGUN
| RLAUNCHER
| RLAUNCHERX {_xNum :: Int}
+1
View File
@@ -80,6 +80,7 @@ data PathFromEdge = PathFromEdge CardinalPoint Int
data RoomPosFlag
= RoomPosOnGrid {_onGridFromEdges :: S.Set PathFromEdge}
| RoomPosOffGrid {_offGridFromEdges :: S.Set PathFromEdge}
| RoomPosOnFloor
deriving (Eq, Ord, Show)
data UsedPos
+1 -1
View File
@@ -29,7 +29,7 @@ initialRoomTree =
, passthroughLockKeyLists
[(sensorRoomRunPast ElectricSensor, takeOne
[-- CRAFT (ENERGYBALLCRAFT TeslaBall) ,
HELD SPARKGUN])]
HELD TESLACOIL])]
itemRooms
, lasSensorTurretTest
, -- , AnRoom $ tanksRoom [] [] <&> rmPmnts .~ []
+9 -16
View File
@@ -279,9 +279,9 @@ heldItemMuzzles loc = \case
<*> pure MuzzleRLauncher
<*> pure 0
)
TESLAGUN ->
TESLACOIL ->
dbwMuzzles
& ix 0 . mzPos .~ V2 10 0
& ix 0 . mzPos .~ V2 5 0
& ix 0 . mzInaccuracy .~ 0
& ix 0 . mzFlareType .~ TeslaGunFlare
& ix 0 . mzEffect .~ MuzzleTesla
@@ -429,8 +429,7 @@ itemSidePush = \case
FLAMETORRENT -> 0
FLAMEWALL -> 0
BLOWTORCH -> 0
SPARKGUN -> 0
TESLAGUN -> 0
TESLACOIL -> 0
TRACTORGUN -> 0
RLAUNCHER -> 0
RLAUNCHERX{} -> 0
@@ -512,8 +511,7 @@ recoilAmount itm
FLAMETORRENT -> 0
FLAMEWALL -> 0
BLOWTORCH -> 0
SPARKGUN -> 0
TESLAGUN -> 0
TESLACOIL -> 0
TRACTORGUN -> 0
RLAUNCHER -> 0
RLAUNCHERX _ -> 0
@@ -559,8 +557,7 @@ bgunSound itm
FLAMETORRENT -> Nothing
FLAMEWALL -> Nothing
BLOWTORCH -> Nothing
SPARKGUN -> Nothing
TESLAGUN -> Nothing
TESLACOIL -> Nothing
TRACTORGUN -> Nothing
RLAUNCHER -> Just (tap4S, 0)
RLAUNCHERX _ -> Just (tap4S, 0)
@@ -630,8 +627,7 @@ heldTorqueAmount = \case
FLAMETORRENT -> 0
FLAMEWALL -> 0
BLOWTORCH -> 0
SPARKGUN -> 0
TESLAGUN -> 0.01
TESLACOIL -> 0.01
TRACTORGUN -> 0
RLAUNCHER -> 0
RLAUNCHERX{} -> 0
@@ -1049,8 +1045,7 @@ heldItemMuzVel = \case
FLAMETORRENT -> ConstFloat 0.8
FLAMEWALL -> ConstFloat 0.8
BLOWTORCH -> ConstFloat 0.8
SPARKGUN -> ConstFloat 0.8
TESLAGUN -> ConstFloat 0.8
TESLACOIL -> ConstFloat 0.8
TRACTORGUN -> ConstFloat 0.8
RLAUNCHER -> ConstFloat 0
RLAUNCHERX{} -> ConstFloat 0
@@ -1092,8 +1087,7 @@ heldItemRifling = \case
FLAMETORRENT -> ConstFloat 0.8
FLAMEWALL -> ConstFloat 0.8
BLOWTORCH -> ConstFloat 0.8
SPARKGUN -> ConstFloat 0.8
TESLAGUN -> ConstFloat 0.8
TESLACOIL -> ConstFloat 0.8
TRACTORGUN -> ConstFloat 0.8
RLAUNCHER -> ConstFloat 0
RLAUNCHERX{} -> ConstFloat 0
@@ -1164,8 +1158,7 @@ gasType hit _ = case hit of
FLAMETORRENT -> Just CreateFlame
FLAMEWALL -> Just CreateFlame
BLOWTORCH -> Nothing
SPARKGUN -> Nothing
TESLAGUN -> Nothing
TESLACOIL -> Nothing
TRACTORGUN -> Nothing
RLAUNCHER -> Nothing
RLAUNCHERX{} -> Nothing
+1 -2
View File
@@ -50,8 +50,7 @@ heldAimStance = \case
FLAMETORRENT -> TwoHandUnder
FLAMEWALL -> TwoHandUnder
BLOWTORCH -> TwoHandUnder
SPARKGUN -> TwoHandFlat
TESLAGUN -> TwoHandFlat
TESLACOIL -> TwoHandFlat
TRACTORGUN -> TwoHandUnder
RLAUNCHER -> TwoHandOver
RLAUNCHERX{} -> TwoHandOver
+1 -2
View File
@@ -45,8 +45,7 @@ heldItemAmmoSlots = \case
FLAMESPITTER -> singleAmmo GasAmmo
FLAMEWALL -> singleAmmo GasAmmo
BLOWTORCH -> singleAmmo GasAmmo
TESLAGUN -> singleAmmo ElectricalAmmo
SPARKGUN -> singleAmmo ElectricalAmmo
TESLACOIL -> singleAmmo ElectricalAmmo
TRACTORGUN -> singleAmmo ElectricalAmmo
SHATTERGUN -> singleAmmo ElectricalAmmo
LED -> singleAmmo ElectricalAmmo
+1 -2
View File
@@ -259,8 +259,7 @@ heldItemSPic ht it = case ht of
FLAMETORRENT -> flamerPic it
FLAMEWALL -> flamerPic it
BLOWTORCH -> flamerPic it
SPARKGUN -> teslaGunPic
TESLAGUN -> teslaGunPic
TESLACOIL -> teslaGunPic
TRACTORGUN -> tractorGunPic it
RLAUNCHER -> rlauncherPic it
RLAUNCHERX _ -> rlauncherPic it
+1 -2
View File
@@ -58,8 +58,7 @@ itemFromHeldType ht = case ht of
FLAMETORRENT -> flameTorrent
FLAMEWALL -> flameWall
BLOWTORCH -> blowTorch
SPARKGUN -> sparkGun
TESLAGUN -> teslaGun
TESLACOIL -> teslaCoil
-- LASCIRCLE -> lasCircle
-- DUALBEAM -> dualBeam
-- LASWIDE i -> lasWide i
+4 -11
View File
@@ -1,6 +1,5 @@
module Dodge.Item.Held.BatteryGuns (
sparkGun,
teslaGun,
teslaCoil,
laser,
tractorGun,
) where
@@ -10,17 +9,11 @@ import Dodge.Data.Item
import Dodge.Default.Item
--import Geometry.Data
sparkGun :: Item
sparkGun =
teslaGun
& itType .~ HELD SPARKGUN
-- & itParams . arcSize .~ 10
teslaGun :: Item
teslaGun =
teslaCoil :: Item
teslaCoil =
defHeldItem
& itParams .~ teslaParams
& itType .~ HELD TESLAGUN
& itType .~ HELD TESLACOIL
teslaParams :: ItemParams
teslaParams =
+1 -2
View File
@@ -110,8 +110,7 @@ heldHandlePos = \case
FLAMETORRENT -> V2 3 0
FLAMEWALL -> V2 3 0
BLOWTORCH -> V2 3 0
SPARKGUN -> V2 3 0
TESLAGUN -> V2 3 0
TESLACOIL -> V2 3 0
TRACTORGUN -> V2 3 0
RLAUNCHER -> V2 3 0
RLAUNCHERX{} -> V2 3 0
+1 -2
View File
@@ -121,8 +121,7 @@ heldInfo hit = case hit of
FLAMETORRENT -> "A weapon that streams out burning fuel in a torrent."
FLAMEWALL -> "A weapon that squirts out burning fuel all around the user."
BLOWTORCH -> "A weapon that produces a concentrated flame."
SPARKGUN -> "A weapon that produces an arc of electricity. The arc will attempt to discharge at a nearby object."
TESLAGUN -> "A weapon that discharges a sustained arc of electricity. The arc will attempt to discharge at a nearby object."
TESLACOIL -> "An item that creates an arc of electricity."
TRACTORGUN -> "An item that produces a beam of gravitons."
GLAUNCHER -> "A large tube that can launch projectiles."
RLAUNCHER -> "A large tube that can launch self propelled projectiles. Moving the tube after launch will cause the projectile to spin."
+1 -1
View File
@@ -20,7 +20,7 @@ itInvHeight x = case x ^. itType of
itDim :: Item -> ItemDimension
itDim x = case x ^. itType of
HELD TESLAGUN -> ItemDimension 9 (V3 4 0 0) (V3 10 (-5) 3)
HELD TESLACOIL -> ItemDimension 9 (V3 4 0 0) (V3 10 (-5) 3)
LASER -> did & dimRad .~ 10
& dimCenter .~ V3 15 0 0
HELD TRACTORGUN -> did & dimRad .~ 10
+12 -4
View File
@@ -80,9 +80,10 @@ setTile r gw = case _rmFloor r of
. nubBy ((==) `on` roundPoint2) $ concat $ _rmPolys r
shuffleRoomPos :: RandomGen g => Room -> State g Room
shuffleRoomPos rm = do
newPos <- shuffle $ _rmPos rm
return $ rm & rmPos .~ newPos
shuffleRoomPos = rmPos shuffle
--shuffleRoomPos rm = do
-- newPos <- shuffle $ _rmPos rm
-- return $ rm & rmPos .~ newPos
doInPlacements :: GenWorld -> GenWorld
doInPlacements w = foldl' (\gw (i,(_,f)) -> placeSpot i gw (f gw)) w
@@ -103,10 +104,17 @@ doIndividualPlacements gw = foldl' doRoomPlacements gw (_genRooms gw)
doRoomPlacements :: GenWorld -> Room -> GenWorld
doRoomPlacements w rm = foldl' (placeSpot i) (w & genRooms . ix i . rmPmnts .~ mempty)
$ _rmPmnts rm
. sortOn plPriority $ _rmPmnts rm
where
i = rm ^?! rmMID . _Just
plPriority :: Placement -> Int
plPriority pl = case pl ^. plType of
PutChasm {} -> 0
PutBlock {} -> 1
PutDoor {} -> 2
_ -> 3
--placeSpot' :: Int -> GenWorld -> Placement -> GenWorld
--placeSpot' = placeSpot
--placeSpot' i gw x =
+6 -4
View File
@@ -1,5 +1,6 @@
module Dodge.LockAndKey where
import Dodge.Item.Ammo
import Dodge.Cleat
import Dodge.Creature
import Dodge.Data.GenWorld
@@ -24,7 +25,7 @@ lockRoomMultiItems =
lockRoomKeyItems :: [(Int -> State LayoutVars (MetaTree Room String), State LayoutVars ItemType)]
lockRoomKeyItems =
[ (lasCenSensEdge, takeOne [ HELD FLATSHIELD])
[ (lasCenSensEdge, takeOne [LASER,HELD TESLACOIL, HELD FLATSHIELD])
-- [ (lasCenSensEdge, takeOne [HELD RLAUNCHER, LASER, HELD SPARKGUN, HELD FLATSHIELD])
-- , (sensorRoomRunPast LaserSensor, return LASER)
-- , (const slowDoorRoomRunPast, return $ HELD (MINIGUNX 3))
@@ -59,14 +60,15 @@ itemRooms =
( LASER
, join $
takeOne
[ rc $ map makeTypeCraft [PRISM, TRANSFORMER, PIPE]
[ rc $ battery : map makeTypeCraft [PRISM, TRANSFORMER, PIPE, TRANSFORMER]
, rc $ battery : laser : [makeTypeCraft TRANSFORMER]
]
)
,
( HELD SPARKGUN
( HELD TESLACOIL
, join $
takeOne
[ rc $ map makeTypeCraft [TRANSFORMER, CAN, CAN]
[ rc (battery : map makeTypeCraft [TRANSFORMER, CAN, CAN])
]
)
,
+1 -1
View File
@@ -90,7 +90,7 @@ damagePiezoelectric = damageStone
damagePhotovoltaic :: Damage -> ECW -> World -> (Int,World)
damagePhotovoltaic dm ecw w = case dm of
Lasering _ p t -> f dmam $ laserSpark (outTo p t) (rdir p t)
Lasering _ p t -> f (3*dmam) $ laserSpark (outTo p t) (rdir p t)
Piercing _ p t ->
f dmam $ makeSpark NormalSpark (outTo p t) (rdir p t)
. makeDustAt Stone 200 (addZ 20 (outTo p t))
+6 -6
View File
@@ -27,12 +27,12 @@ roomsContaining' crs its = do
endroom <-
join $
takeOne
[ roomPillarsSquare <&> rmPmnts ++.~ crsItmsUnused crs its
, randomFourCornerRoomCrsIts crs its
, tanksRoom crs its
, tanksPipesRoom <&> rmPmnts ++.~ crsItmsUnused crs its
, roomPillarsContaining crs its
, roomPillarsPassage <&> rmPmnts ++.~ crsItmsUnused crs its
[-- roomPillarsSquare <&> rmPmnts ++.~ crsItmsUnused crs its
--, randomFourCornerRoomCrsIts crs its
--, tanksRoom crs its
-- tanksPipesRoom <&> rmPmnts ++.~ crsItmsUnused crs its
roomPillarsContaining crs its
-- , roomPillarsPassage <&> rmPmnts ++.~ crsItmsUnused crs its
]
return (pure $ cleatOnward endroom)
+308 -243
View File
@@ -14,18 +14,15 @@ module Dodge.Room.LasTurret (
lasCenRunClose1,
lasCenRunCloseLongCor,
lasRunRand,
setRoomInt,
storeRoomID,
) where
import Color
import Control.Monad
import Data.Foldable
import Data.Maybe
import Color
import Shape
import Dodge.Placement.Instance.LightSource
import Dodge.Room.Path
import Control.Monad
--import Data.Foldable (fold)
import Dodge.Room.Procedural
-- import Data.Foldable (fold)
import qualified Data.Set as S
import Dodge.Cleat
import Dodge.Data.GenWorld
@@ -38,6 +35,8 @@ import Dodge.Room.Corridor
import Dodge.Room.Door
import Dodge.Room.Link
import Dodge.Room.Ngon
import Dodge.Room.Path
import Dodge.Room.Procedural
import Dodge.Room.SensorDoor
import Dodge.RoomLink
import Dodge.Tree
@@ -45,54 +44,49 @@ import Dodge.Wire
import Geometry
import LensHelp
import RandomHelp
import Shape
-- no lights!
cenLasTur :: (RandomGen g) => State g Room
cenLasTur = do
-- lshape <- takeOne [vShape, lShape, jShape, liShape]
-- let lightn i = mntLSCond (fmap (fmap $ colorSH black) lshape)
-- $ rprBool $ const . (\rp -> PolyEdge i `S.member` (fold (rp ^? rpType . rplsType)))
-- thelight <- mntLightLnkCond $ rprBool $ const . isInLnk
roomNgon 8 200
<&> rmPmnts
.~ [ putLasTurret 0.02
, heightWallPS
(resetPLUse $ rprBoolShift (const . isInLnk) (shiftInBy 100 <&> (,S.singleton UsedPosLow)))
(resetPLUse $ rprBoolShift (const . isInLnk) (shiftInBy 120 <&> (,S.singleton UsedPosLow)))
30
covershape
-- , lightn 0
-- , lightn 3
-- , lightn 6
(rectWH 20 10)
]
<&> rmPath %~ addNodesCrossingCirc 0 30
where
covershape = rectNSWE 10 (-10) (-20) 20
<&> rmPath
%~ addNodesCrossingCirc 0 30
lightSensInsideDoor :: Int -> Room -> Room
lightSensInsideDoor i rm =
rm
& rmPmnts
.++~ [ psPt atFstLnkOut (PutForeground $ floorWire (V2 20 0) (V2 20 (-100)))
, psPt atFstLnkOut (PutForeground $ floorWire (V2 0 (-100)) (V2 20 (-100)))
lightSensInsideDoor i =
rmPmnts
.++~ [ psPt atFstLnkOut (PutForeground $ floorWire (V2 20 0) (V2 20 (-x)))
, psPt atFstLnkOut (PutForeground $ floorWire (V2 0 (-x)) (V2 20 (-x)))
, psPt atFstLnkOut (PutForeground $ verticalWire (V2 20 0) 0 80)
, sensAboveDoor LaserSensor 10 (atFstLnkOutShiftInward 100) & plExternalID ?~ i
, sensAboveDoor LaserSensor 10 (atFstLnkOutShiftInward x) & plExternalID ?~ i
]
where
x = 120
-- & rmOutPmnt . at i ?~ sensAboveDoor LaserSensor 10 (atFstLnkOutShiftInward 100)
lightSensByDoor :: Int -> Room -> Room
lightSensByDoor i rm =
rm
& rmPmnts
.++~ [ psPt atFstLnkOut $ PutForeground $ verticalWire (V2 20 0) 0 80
, heightWallPS (atNthLnkOutShiftInward 1 100) 30 covershape
, heightWallPS (atFstLnkOutShiftInward 100) 30 covershape
, sensAboveDoor LaserSensor 20 (atFstLnkOutShiftBy sensorshift) & plExternalID ?~ i
]
lightSensByDoor :: Int -> Room -> State LayoutVars Room
lightSensByDoor i rm = do
x <- takeOne [100, 120, 140]
y <- takeOne [100, 110, 120]
sh1 <- takeOne [rectWH 20 10, square 20]
return $
rm
& rmPmnts
.++~ [ psPt atFstLnkOut $ PutForeground $ verticalWire (V2 20 0) 0 80
, heightWallPS (atNthLnkOutShiftInward 1 x) 30 sh1
, heightWallPS (atFstLnkOutShiftInward y) 30 (rectWH 20 10)
, sensAboveDoor LaserSensor 20 (atFstLnkOutShiftBy sensorshift) & plExternalID ?~ i
]
where
-- & rmOutPmnt . at i ?~ sensAboveDoor LaserSensor 20 (atFstLnkOutShiftBy sensorshift)
covershape = rectNSWE 10 (-10) (-20) 20
sensorshift (p, a) = ((p +.+ rotateV a (V2 60 (-20)), a), S.singleton UsedPosLow)
keyCardRoomRunPast :: (RandomGen g) => Int -> Int -> State g (MetaTree Room String)
@@ -148,34 +142,32 @@ lasSensorTurretTest :: State LayoutVars (MetaTree Room String)
lasSensorTurretTest = do
n <- nextLayoutInt
cenroom' <- shuffleLinks . lightSensInsideDoor n =<< cenLasTur
(i,cenroom'') <- setRoomInt cenroom'
(i, cenroom'') <- storeRoomID cenroom'
lshape <- takeOne [vShape, lShape, jShape, liShape]
let alight a rp = mntLSCond (fmap (fmap $ colorSH black) lshape) (PS (rotateV a $ _rpPos rp) (a +_rpDir rp))
let cenroom = cenroom''
& rmInPmnt <>~
[(0, alight pi . f i)
,(0, alight (0.5*pi) . f i)
,(0, alight (1.5*pi) . f i)]
let alight a rp = mntLSCond (fmap (fmap $ colorSH black) lshape) (PS (rotateV a $ _rpPos rp) (a + _rpDir rp))
let cenroom =
cenroom''
& rmInPmnt
<>~ [ (0, alight pi . f i)
, (0, alight (0.5 * pi) . f i)
, (0, alight (1.5 * pi) . f i)
]
rToOnward "lasSensorTurretTest" $
treePost
[door, cenroom, triggerDoorRoom n, cleatOnward door]
where
f i gw = fromJust $ find (isused ._rpType) (gw ^?! genRooms . ix (gw ^?! genInts . ix i) . rmPos)
isused UsedOutLink{_rplsChildNum = 0} = True
isused _ = False
f i gw = fromJust $ find (isused . _rpType) (getRoomFromID i gw ^. rmPos)
isused UsedOutLink{_rplsChildNum = 0} = True
isused _ = False
-- note the double usage of the int, shouldn't cause a problem
lasCenSensEdge :: Int -> State LayoutVars (MetaTree Room String)
lasCenSensEdge n = do
cenroom' <- (shuffleLinks . lightSensByDoor n =<< cenLasTur)
(i,cenroom'') <- setRoomInt cenroom'
(i, cenroom') <- storeRoomID =<< shuffleLinks =<< lightSensByDoor n =<< cenLasTur
lshape <- takeOne [vShape, lShape, jShape, liShape]
let alight a rp = mntLSCond (fmap (fmap $ colorSH black) lshape) (PS (rotateV a $ _rpPos rp) (a +_rpDir rp))
let cenroom = cenroom''
& rmInPmnt <>~
[(0, alight pi . f i)
,(0, alight (0.5*pi) . f i)
,(0, alight (1.5*pi) . f i)]
let alight a rp = mntLSCond (fmap (fmap $ colorSH black) lshape) (PS (rotateV a $ _rpPos rp) (a + _rpDir rp))
blight a = (0, alight a . f i)
let cenroom = cenroom' & rmInPmnt <>~ map blight [pi, (0.5 * pi), (1.5 * pi)]
let doorroom = triggerDoorRoom n
rToOnward "lasCenSensEdge" $
treeFromTrunk [door] $
@@ -185,270 +177,343 @@ lasCenSensEdge n = do
, treePost [door, cleatLabel n corridor]
]
where
f i gw = fromJust $ find (isused ._rpType) (gw ^?! genRooms . ix (gw ^?! genInts . ix i) . rmPos)
isused UsedOutLink{_rplsChildNum = 0} = True
isused _ = False
f i gw = fromJust $ find (isused . _rpType) (getRoomFromID i gw ^. rmPos)
isused UsedOutLink{_rplsChildNum = 0} = True
isused _ = False
setRoomInt :: Room -> State LayoutVars (Int, Room)
setRoomInt x = do
storeRoomID :: Room -> State LayoutVars (Int, Room)
storeRoomID x = do
i <- nextLayoutInt
return (i, x & rmPmnts .:~ sps0 (PutWorldUpdate (f i)))
where
f i rid _ gw = gw & genInts . at i ?~ (gw ^?! genRooms . ix rid . rmMID . _Just)
-- unsafe! assumes that storeRoomID has been called
getRoomFromID :: Int -> GenWorld -> Room
getRoomFromID i gw = gw ^?! genRooms . ix (gw ^?! genInts . ix i)
lasRunYinYang :: (RandomGen g) => State g (MetaTree Room String)
lasRunYinYang = do
npoly <- takeOne [6,8,10,12]
npoly <- takeOne [6, 8, 10, 12]
thelight <- mntLightLnkCond $ rprBool $ const . isInLnk
thelight1 <- mntLightLnkCond $ rprBool $ const . isOutLnk
thelight2 <- mntLightLnkCond $ rprBool $ const . (\rp -> PolyEdge ((npoly + 1) `div` 4) `S.member`
(fold $ rp ^? rpType . rplsType))
thelight3 <- mntLightLnkCond $ rprBool $ const . (\rp -> PolyEdge (3*(npoly + 1) `div` 4) `S.member`
(fold $ rp ^? rpType . rplsType))
r <- shuffleLinks =<<
(roomNgon npoly 250
<&> rmPmnts
.~
[angwall a | a <- [0,pi/8..pi-pi/9]] <>
[bngwall a | a <- [0,pi/8..pi-pi/9]] <>
[ awall 0 (rectWH 15 5)
, putLasTurret 0.02 & plSpot . psPos .~ negate offxy
, putLasTurret 0.02 & plSpot . psPos .~ offxy
-- , awall (V2 0 50) (square 10)
, thelight
, thelight1
, thelight2
, thelight3
]
<&> rmPath %~ (addNodesCrossingCirc 0 30
. flip (foldr ($)) [apath a | a <- [0,pi/8..pi-2*pi/9]]
. flip (foldr ($)) [bpath a | a <- [0,pi/8..pi-2*pi/9]]
)
<&> rmLinks %~ setInLinksByType (PolyEdge 0)
<&> rmLinks %~ setOutLinksByType (PolyEdge (npoly `div` 2))
)
thelight2 <-
mntLightLnkCond $
rprBool $
const
. ( \rp ->
PolyEdge ((npoly + 1) `div` 4)
`S.member` (fold $ rp ^? rpType . rplsType)
)
thelight3 <-
mntLightLnkCond $
rprBool $
const
. ( \rp ->
PolyEdge (3 * (npoly + 1) `div` 4)
`S.member` (fold $ rp ^? rpType . rplsType)
)
r <-
shuffleLinks
=<< ( roomNgon npoly 250
<&> rmPmnts
.~ [angwall a | a <- [0, pi / 8 .. pi - pi / 9]]
<> [bngwall a | a <- [0, pi / 8 .. pi - pi / 9]]
<> [ awall 0 (rectWH 15 5)
, putLasTurret 0.02 & plSpot . psPos .~ negate offxy
, putLasTurret 0.02 & plSpot . psPos .~ offxy
, -- , awall (V2 0 50) (square 10)
thelight
, thelight1
, thelight2
, thelight3
]
<&> rmPath
%~ ( addNodesCrossingCirc 0 30
. flip (foldr ($)) [apath a | a <- [0, pi / 8 .. pi - 2 * pi / 9]]
. flip (foldr ($)) [bpath a | a <- [0, pi / 8 .. pi - 2 * pi / 9]]
)
<&> rmLinks
%~ setInLinksByType (PolyEdge 0)
<&> rmLinks
%~ setOutLinksByType (PolyEdge (npoly `div` 2))
)
rToOnward "lasCenRunClose" $ return $ cleatOnward r
where
awall x v = heightWallPS (PS x 0) 30 v
--angwall a = awall (V2 0 100 + rotateV a (V2 0 100)) (fmap (rotateV (pi/4 + a/2)) $ rectWH 5 (25 - a*10/pi ))
-- angwall a = awall (V2 0 100 + rotateV a (V2 0 100)) (fmap (rotateV (pi/4 + a/2)) $ rectWH 5 (25 - a*10/pi ))
rf = 0.8
offxy = V2 0 (-100)
angwall a = awall (V2 0 100 + rotateV a (V2 0 100)) (fmap (rotateV (pi/4 + a*rf)) $ rectWH 5 (23 - a*13/pi ))
apath a' = addNodesCrossing $ (\x -> (x + f (V2 0 100),x - f (V2 0 100))) (V2 0 100 + rotateV a (V2 0 100))
angwall a = awall (V2 0 100 + rotateV a (V2 0 100)) (fmap (rotateV (pi / 4 + a * rf)) $ rectWH 5 (23 - a * 13 / pi))
apath a' = addNodesCrossing $ (\x -> (x + f (V2 0 100), x - f (V2 0 100))) (V2 0 100 + rotateV a (V2 0 100))
where
a = a' + pi/16
f = rotateV (pi/4 + a *0.8)
bngwall a = awall (V2 0 (-100) + rotateV a (V2 0 (-100))) (fmap (rotateV (pi/4 + a*rf)) $ rectWH 5 (23 - a*13/pi ))
bpath a' = addNodesCrossing $ (\x -> (x + f (V2 0 100),x - f (V2 0 100))) (V2 0 (-100) + rotateV a (V2 0 (-100)))
a = a' + pi / 16
f = rotateV (pi / 4 + a * 0.8)
bngwall a = awall (V2 0 (-100) + rotateV a (V2 0 (-100))) (fmap (rotateV (pi / 4 + a * rf)) $ rectWH 5 (23 - a * 13 / pi))
bpath a' = addNodesCrossing $ (\x -> (x + f (V2 0 100), x - f (V2 0 100))) (V2 0 (-100) + rotateV a (V2 0 (-100)))
where
a = a' + pi/16
f = rotateV (pi/4 + a *0.8)
a = a' + pi / 16
f = rotateV (pi / 4 + a * 0.8)
lasRunYinYangCenter :: (RandomGen g) => State g (MetaTree Room String)
lasRunYinYangCenter = do
npoly <- takeOne [6,8,10,12]
npoly <- takeOne [6, 8, 10, 12]
thelight <- mntLightLnkCond $ rprBool $ const . isInLnk
thelight1 <- mntLightLnkCond $ rprBool $ const . isOutLnk
thelight2 <- mntLightLnkCond $ rprBool $ const . (\rp -> PolyEdge ((npoly + 1) `div` 4) `S.member`
(fold $ rp ^? rpType . rplsType))
thelight3 <- mntLightLnkCond $ rprBool $ const . (\rp -> PolyEdge (3*(npoly + 1) `div` 4) `S.member`
(fold $ rp ^? rpType . rplsType))
-- thelight3 <- mntLightLnkCond $ rprBool $ const . isOutLnk
r <- shuffleLinks =<<
(roomNgon npoly 250
<&> rmPmnts
.~
[angwall a | a <- [0,pi/8..pi-pi/9]] <>
[bngwall a | a <- [0,pi/8..pi-pi/9]] <>
[ putLasTurret 0.02
-- , awall (V2 0 50) (square 10)
, thelight
, thelight1
, thelight2
, thelight3
]
<&> rmPath %~ (addNodesCrossingCirc 0 30
. flip (foldr ($)) [apath a | a <- [0,pi/8..pi-2*pi/9]]
. flip (foldr ($)) [bpath a | a <- [0,pi/8..pi-2*pi/9]]
)
<&> rmLinks %~ setInLinksByType (PolyEdge 0)
<&> rmLinks %~ setOutLinksByType (PolyEdge (npoly `div` 2))
)
thelight2 <-
mntLightLnkCond $
rprBool $
const
. ( \rp ->
PolyEdge ((npoly + 1) `div` 4)
`S.member` (fold $ rp ^? rpType . rplsType)
)
thelight3 <-
mntLightLnkCond $
rprBool $
const
. ( \rp ->
PolyEdge (3 * (npoly + 1) `div` 4)
`S.member` (fold $ rp ^? rpType . rplsType)
)
-- thelight3 <- mntLightLnkCond $ rprBool $ const . isOutLnk
r <-
shuffleLinks
=<< ( roomNgon npoly 250
<&> rmPmnts
.~ [angwall a | a <- [0, pi / 8 .. pi - pi / 9]]
<> [bngwall a | a <- [0, pi / 8 .. pi - pi / 9]]
<> [ putLasTurret 0.02
, -- , awall (V2 0 50) (square 10)
thelight
, thelight1
, thelight2
, thelight3
]
<&> rmPath
%~ ( addNodesCrossingCirc 0 30
. flip (foldr ($)) [apath a | a <- [0, pi / 8 .. pi - 2 * pi / 9]]
. flip (foldr ($)) [bpath a | a <- [0, pi / 8 .. pi - 2 * pi / 9]]
)
<&> rmLinks
%~ setInLinksByType (PolyEdge 0)
<&> rmLinks
%~ setOutLinksByType (PolyEdge (npoly `div` 2))
)
rToOnward "lasCenRunClose" $ return $ cleatOnward r
where
awall x v = heightWallPS (PS x 0) 30 v
--angwall a = awall (V2 0 100 + rotateV a (V2 0 100)) (fmap (rotateV (pi/4 + a/2)) $ rectWH 5 (25 - a*10/pi ))
angwall a = awall (V2 0 100 + rotateV a (V2 0 100)) (fmap (rotateV (pi/4 + a*0.8)) $ rectWH 5 (23 - a*13/pi ))
apath a' = addNodesCrossing $ (\x -> (x + f (V2 0 100),x - f (V2 0 100))) (V2 0 100 + rotateV a (V2 0 100))
-- angwall a = awall (V2 0 100 + rotateV a (V2 0 100)) (fmap (rotateV (pi/4 + a/2)) $ rectWH 5 (25 - a*10/pi ))
angwall a = awall (V2 0 100 + rotateV a (V2 0 100)) (fmap (rotateV (pi / 4 + a * 0.8)) $ rectWH 5 (23 - a * 13 / pi))
apath a' = addNodesCrossing $ (\x -> (x + f (V2 0 100), x - f (V2 0 100))) (V2 0 100 + rotateV a (V2 0 100))
where
a = a' + pi/16
f = rotateV (pi/4 + a *0.8)
bngwall a = awall (V2 0 (-100) + rotateV a (V2 0 (-100))) (fmap (rotateV (pi/4 + a*0.8)) $ rectWH 5 (23 - a*13/pi ))
bpath a' = addNodesCrossing $ (\x -> (x + f (V2 0 100),x - f (V2 0 100))) (V2 0 (-100) + rotateV a (V2 0 (-100)))
a = a' + pi / 16
f = rotateV (pi / 4 + a * 0.8)
bngwall a = awall (V2 0 (-100) + rotateV a (V2 0 (-100))) (fmap (rotateV (pi / 4 + a * 0.8)) $ rectWH 5 (23 - a * 13 / pi))
bpath a' = addNodesCrossing $ (\x -> (x + f (V2 0 100), x - f (V2 0 100))) (V2 0 (-100) + rotateV a (V2 0 (-100)))
where
a = a' + pi/16
f = rotateV (pi/4 + a *0.8)
a = a' + pi / 16
f = rotateV (pi / 4 + a * 0.8)
lasCenRunClose' :: (RandomGen g) => State g (MetaTree Room String)
lasCenRunClose' = do
npoly <- takeOne [5..12]
npoly <- takeOne [5 .. 12]
inwall <- takeOne obwalls
outwall <- takeOne obwalls
thelight <- mntLightLnkCond $ rprBool $ const . isInLnk
thelight1 <- mntLightLnkCond $ rprBool $ const . isOutLnk
r <- shuffleLinks =<<
(roomNgon npoly 250
<&> rmPmnts
.~ (
fmap (uncurry inlinkwall) inwall <>
fmap (uncurry outlinkwall) outwall <>
[ putLasTurret 0.02
, thelight
, thelight1
]
r <-
shuffleLinks
=<< ( roomNgon npoly 250
<&> rmPmnts
.~ ( fmap (uncurry inlinkwall) inwall
<> fmap (uncurry outlinkwall) outwall
<> [ putLasTurret 0.02
, thelight
, thelight1
]
)
<&> rmPath
%~ addNodesCrossingCirc 0 30
<&> rmLinks
%~ setInLinksByType (PolyEdge 0)
<&> rmLinks
%~ setOutLinks (\rl -> or [PolyEdge i `S.member` _rlType rl | i <- [2 .. npoly - 2]])
)
<&> rmPath %~ addNodesCrossingCirc 0 30
<&> rmLinks %~ setInLinksByType (PolyEdge 0)
<&> rmLinks %~ setOutLinks (\rl -> or [PolyEdge i `S.member` _rlType rl | i <- [2..npoly-2]])
)
rToOnward "lasCenRunClose" $ return $ cleatOnward r
where
swall = [ (70, (rectNSWE 10 (-10) (-10) 30))
, (125, (rectNSWE 55 (-55) (-10) 10))
, (180, (rectNSWE 10 (-10) (-30) 10))
]
zwall = [ (70, (rectNSWE 10 (-10) (-30) 10))
, (125, (rectNSWE 55 (-55) (-10) 10))
, (180, (rectNSWE 10 (-10) (-10) 30))
]
iwall = [ (70, (rectNSWE 10 (-10) (-15) 20))
, (180, (rectNSWE 10 (-10) (-30) (-5)))
]
jwall = [ (70, (rectNSWE 10 (-10) (-20) 15))
, (180, (rectNSWE 10 (-10) 5 30))
]
uwall = [ (180, (rectNSWE 10 (-10) (-20) 20)) ]
obwalls = [swall,zwall,iwall,jwall,uwall]
linkwall f x = heightWallPS
(resetPLUse $ rprBoolShift (const . f) (shiftInBy x <&> (,S.singleton UsedPosLow)))
30
swall =
[ (70, (rectNSWE 10 (-10) (-10) 30))
, (125, (rectNSWE 55 (-55) (-10) 10))
, (180, (rectNSWE 10 (-10) (-30) 10))
]
zwall =
[ (70, (rectNSWE 10 (-10) (-30) 10))
, (125, (rectNSWE 55 (-55) (-10) 10))
, (180, (rectNSWE 10 (-10) (-10) 30))
]
iwall =
[ (70, (rectNSWE 10 (-10) (-15) 20))
, (180, (rectNSWE 10 (-10) (-30) (-5)))
]
jwall =
[ (70, (rectNSWE 10 (-10) (-20) 15))
, (180, (rectNSWE 10 (-10) 5 30))
]
uwall = [(180, (rectNSWE 10 (-10) (-20) 20))]
obwalls = [swall, zwall, iwall, jwall, uwall]
linkwall f x =
heightWallPS
(resetPLUse $ rprBoolShift (const . f) (shiftInBy x <&> (,S.singleton UsedPosLow)))
30
inlinkwall = linkwall isInLnk
outlinkwall = linkwall isOutLnk
lasCenRunCloseLongCor :: (RandomGen g) => State g (MetaTree Room String)
lasCenRunCloseLongCor = do
(alinks,blinks) <- shufflePair (rlinks,llinks)
rdir <- takeOne [negate,id]
a <- takeOne [5*pi/16]
(alinks, blinks) <- shufflePair (rlinks, llinks)
rdir <- takeOne [negate, id]
a <- takeOne [5 * pi / 16]
let h = 800
laspos <- takeOne [V2 (h/2) 80]
ls <- mntLightLnkCond (PS (V2 (h/2) 0) pi)
r <- shuffleLinks =<<
(roomRectAutoLights h 160
<&> rmPmnts
<>~ [ putLasTurret 0.02 & plSpot .~ PS laspos a
, awall (V2 (h /4) 80) (rotateV (rdir pi/16) <$> rectWH 180 10)
, awall (V2 (3*h/4) 80) (rotateV (rdir pi/16) <$> rectWH 180 10)
, ls
]
<&> rmLinks %~ setInLinks alinks
<&> rmLinks %~ setOutLinks blinks
<&> rmPath %~
(addNodesCrossing (V2 (h/2-10) 30,V2 (h/2+50) 90)
.addNodesCrossing (V2 (h/2+10) 130,V2 (h/2-50) 70) )
)
laspos <- takeOne [V2 (h / 2) 80]
ls <- mntLightLnkCond (PS (V2 (h / 2) 0) pi)
r <-
shuffleLinks
=<< ( roomRectAutoLights h 160
<&> rmPmnts
<>~ [ putLasTurret 0.02 & plSpot .~ PS laspos a
, awall (V2 (h / 4) 80) (rotateV (rdir pi / 16) <$> rectWH 180 10)
, awall (V2 (3 * h / 4) 80) (rotateV (rdir pi / 16) <$> rectWH 180 10)
, ls
]
<&> rmLinks
%~ setInLinks alinks
<&> rmLinks
%~ setOutLinks blinks
<&> rmPath
%~ ( addNodesCrossing (V2 (h / 2 - 10) 30, V2 (h / 2 + 50) 90)
. addNodesCrossing (V2 (h / 2 + 10) 130, V2 (h / 2 - 50) 70)
)
)
rToOnward "lasCenRunClose" $ return $ cleatOnward r
where
llinks = memtest (FromEdge South 1) (OnEdge West)
rlinks = memtest (FromEdge South 1) (OnEdge East)
awall x v = heightWallPS (PS x 0) 30 v
memtest a b x = let y = _rlType x
in a `S.member` y && b `S.member` y
memtest a b x =
let y = _rlType x
in a `S.member` y && b `S.member` y
lasCenRunClose1 :: (RandomGen g) => State g (MetaTree Room String)
lasCenRunClose1 = do
--(alinks,blinks) <- shufflePair (bllinks,brlinks)
--(alinks,blinks) <- shufflePair (bllinks,tmllink)
lnks <- shuffle [bllinks,brlinks,tmllink,tmrlink]
-- (alinks,blinks) <- shufflePair (bllinks,brlinks)
-- (alinks,blinks) <- shufflePair (bllinks,tmllink)
lnks <- shuffle [bllinks, brlinks, tmllink, tmrlink]
let alinks = lnks !! 0
blinks = lnks !! 1
outwall <- takeOne [awall (V2 185 25) (rectWH 10 50)
, awall (V2 200 50) (rectWH 50 10) ]
outwall <-
takeOne
[ awall (V2 185 25) (rectWH 10 50)
, awall (V2 200 50) (rectWH 50 10)
]
let z = 35
r <- roomRectAutoLights 250 200
<&> rmPolys .~ [[V2 0 0, V2 250 0
, V2 250 (200-z)
, V2 (250 - z) 200
, V2 z 200
, V2 0 (200-z)
]]
r <-
roomRectAutoLights 250 200
<&> rmPolys
.~ [
[ V2 0 0
, V2 250 0
, V2 250 (200 - z)
, V2 (250 - z) 200
, V2 z 200
, V2 0 (200 - z)
]
]
<&> rmPmnts
<>~ [ putLasTurret 0.02 & plSpot .~ PS (V2 125 100) 0
, awall (V2 65 25) (rectWH 10 50)
, awall (V2 65 25) (rectWH 10 50)
, outwall
, awall (V2 95 150) (rectWH 10 20)
, awall (V2 155 150) (rectWH 10 20)
, awall (V2 95 150) (rectWH 10 20)
, awall (V2 155 150) (rectWH 10 20)
, sps0 $ putConvexChasm $ rectNSWE 200 110 105 145
-- , awall (V2 150 215) (rectWH 60 10)
]
<&> rmLinks %~ setInLinks alinks
-- <&> rmLinks %~ setOutLinks (memtest (OnEdge South) (FromEdge West 3))
<&> rmLinks %~ setOutLinks blinks
<&> rmLinks . each %~ mvlinks
<&> rmPath %~ S.map (both %~ mvpath)
-- , awall (V2 150 215) (rectWH 60 10)
]
<&> rmLinks
%~ setInLinks alinks
-- <&> rmLinks %~ setOutLinks (memtest (OnEdge South) (FromEdge West 3))
<&> rmLinks
%~ setOutLinks blinks
<&> rmLinks
. each
%~ mvlinks
<&> rmPath
%~ S.map (both %~ mvpath)
rToOnward "lasCenRunClose" $ return $ cleatOnward r
where
mvlinks lnk | tmllink lnk = lnk & rlPos -~ V2 20 0
mvlinks lnk
| tmllink lnk = lnk & rlPos -~ V2 20 0
| tmrlink lnk = lnk & rlPos +~ V2 20 0
| otherwise = lnk
mvpath (V2 x y) | y > 190 , x > 50 , x < 125 = V2 (x- 20) y
| y > 190 , x > 125 , x < 200 = V2 (x+ 20) y
mvpath (V2 x y)
| y > 190, x > 50, x < 125 = V2 (x - 20) y
| y > 190, x > 125, x < 200 = V2 (x + 20) y
| otherwise = V2 x y
tmllink = memtest (FromEdge West 1) (OnEdge North)
tmrlink = memtest (FromEdge West 2) (OnEdge North)
bllinks = etest
(memtest (FromEdge West 0) (OnEdge South))
(memtest (FromEdge South 0) (OnEdge West))
brlinks = etest
(memtest (FromEdge East 0) (OnEdge South))
(memtest (FromEdge South 0) (OnEdge East))
bllinks =
etest
(memtest (FromEdge West 0) (OnEdge South))
(memtest (FromEdge South 0) (OnEdge West))
brlinks =
etest
(memtest (FromEdge East 0) (OnEdge South))
(memtest (FromEdge South 0) (OnEdge East))
awall x v = heightWallPS (PS x 0) 30 v
etest f g x = f x || g x
memtest a b x = let y = _rlType x
in a `S.member` y && b `S.member` y
memtest a b x =
let y = _rlType x
in a `S.member` y && b `S.member` y
lasRunRand :: (RandomGen g) => State g (MetaTree Room String)
lasRunRand = join $ takeOne [lasCenRunClose2,lasCenRunClose1]
lasRunRand = join $ takeOne [lasCenRunClose2, lasCenRunClose1]
lasCenRunClose2 :: (RandomGen g) => State g (MetaTree Room String)
lasCenRunClose2 = do
(alinks,blinks) <- shufflePair (bllinks,trlinks)
a <- takeOne [3*pi/2,3*pi/4]
(alinks, blinks) <- shufflePair (bllinks, trlinks)
a <- takeOne [3 * pi / 2, 3 * pi / 4]
laspos <- takeOne [V2 60 190, V2 65 185]
r <- shuffleLinks =<<
(roomRectAutoLights 250 250
<&> rmPmnts
<>~ [ putLasTurret 0.02 & plSpot .~ PS laspos a
, awall (V2 35 100) (rectWH 10 60)
, awall (V2 150 215) (rectWH 60 10)
]
<&> rmLinks %~ setInLinks alinks
<&> rmLinks %~ setOutLinks blinks
<&> rmPath %~ (addNodesCrossing (V2 110 170,V2 30 250)
.addNodesCrossing (V2 70 150,V2 10 210) )
)
r <-
shuffleLinks
=<< ( roomRectAutoLights 250 250
<&> rmPmnts
<>~ [ putLasTurret 0.02 & plSpot .~ PS laspos a
, awall (V2 35 100) (rectWH 10 60)
, awall (V2 150 215) (rectWH 60 10)
]
<&> rmLinks
%~ setInLinks alinks
<&> rmLinks
%~ setOutLinks blinks
<&> rmPath
%~ ( addNodesCrossing (V2 110 170, V2 30 250)
. addNodesCrossing (V2 70 150, V2 10 210)
)
)
rToOnward "lasCenRunClose" $ return $ cleatOnward r
where
bllinks = etest
(memtest (FromEdge West 0) (OnEdge South))
(memtest (FromEdge South 0) (OnEdge West))
trlinks = etest
(memtest (FromEdge East 0) (OnEdge North))
(memtest (FromEdge North 0) (OnEdge East))
bllinks =
etest
(memtest (FromEdge West 0) (OnEdge South))
(memtest (FromEdge South 0) (OnEdge West))
trlinks =
etest
(memtest (FromEdge East 0) (OnEdge North))
(memtest (FromEdge North 0) (OnEdge East))
awall x v = heightWallPS (PS x 0) 30 v
etest f g x = f x || g x
memtest a b x = let y = _rlType x
in a `S.member` y && b `S.member` y
memtest a b x =
let y = _rlType x
in a `S.member` y && b `S.member` y
lasTunnel :: (RandomGen g) => Float -> State g Room
lasTunnel y = do
+3 -4
View File
@@ -53,8 +53,7 @@ tutAnoTree = do
foldMTRS
[ tToBTree "TutStartRez" . return . cleatOnward <$> tutRezBox
, corDoor
, lasSensorTurretTest
--ccc , passthroughLockKeyLists lockRoomKeyItems itemRooms
, passthroughLockKeyLists lockRoomKeyItems itemRooms
--bbb , -- , return . tToBTree "door" $ treePost [corridor, cleatOnward door]
--bbb corDoor
--bbb , -- , tToBTree "cor" . return <$> shuffleLinks (cleatOnward corridor)
@@ -107,7 +106,7 @@ foldMTRS xs = do
setTreeInts :: Tree Room -> State LayoutVars ([Int], Tree Room)
setTreeInts x = do
y <- traverse setRoomInt x
y <- traverse storeRoomID x
return (foldMap ((: []) . fst) y, fmap snd y)
tutDrop :: State LayoutVars (MetaTree Room String)
@@ -115,7 +114,7 @@ tutDrop = do
x <- shuffleLinks =<< roomNgon 6 100
i <- nextLayoutInt
-- let y = decontamRoom i
(j, y) <- setRoomInt (decontamRoom i)
(j, y) <- storeRoomID (decontamRoom i)
rm <- roomRectAutoLights 40 100
return $
tToBTree "TutDrop" $
+1 -2
View File
@@ -183,8 +183,7 @@ heldAimZoom = \case
FLAMETORRENT -> 1
FLAMEWALL -> 1
BLOWTORCH -> 1
SPARKGUN -> 1
TESLAGUN -> 1.5
TESLACOIL -> 1.5
TRACTORGUN -> 1.5
RLAUNCHER -> 1.5
RLAUNCHERX{} -> 1.5