Cleanup, improve auto wall rotate

This commit is contained in:
2026-03-24 11:28:11 +00:00
parent be2f7160ba
commit 32f1740577
25 changed files with 226 additions and 252 deletions
+13 -13
View File
@@ -8,7 +8,6 @@ import Control.Monad
import qualified Data.IntMap.Strict as IM
import qualified Data.IntSet as IS
import Data.Maybe
import Data.Maybe (mapMaybe)
import qualified Data.Set as S
import Dodge.Cleat
import Dodge.Data.AmmoType
@@ -304,20 +303,21 @@ chasmSpitTerminal = do
l3 = mntLightLnkShape shp $ resetPLUse $ rprBool $ \rp _ -> f rp East North
l4 = mntLightLnkShape shp $ resetPLUse $ rprBool $ \rp _ -> f rp East South
ls <- takeOne [[l1,l2],[l3,l4]
--j ,[spanLightI (V2 120 0) (V2 120 300)]
--j , [spanLightI (V2 0 128) (V2 300 128)]
--j , [spanLightI (V2 300 0) (V2 0 300), sps0 $ putShape $ thinHighBar 95 0 300]
,[spanLightI (V2 120 0) (V2 120 300)]
, [spanLightI (V2 0 128) (V2 300 128)]
, [spanLightI (V2 300 0) (V2 0 300), sps0 $ putShape $ thinHighBar 95 0 300]
]
gh <- takeOne [55,75,97]
gird <- takeOne [girderZ gh 30 10,girder gh 30 10,girderV gh 30 10]
dec <- takeOne $ -- replicate 3 [] <>
[--[]
-- ,[sps0 $ putShape $ gird (V2 30 0) (V2 30 300)
-- ,sps0 $ putShape $ gird (V2 270 0) (V2 270 300)]
-- ,[sps0 $ putShape $ gird (V2 0 20) (V2 300 20)]
[sps0 $ putShape $ gird (V2 0 200) (V2 300 200)]
dec <- takeOne $ replicate 3 [] <>
[[sps0 $ putShape $ gird (V2 30 0) (V2 30 300)]
,[sps0 $ putShape $ gird (V2 270 0) (V2 270 300)]
,[sps0 $ putShape $ gird (V2 30 0) (V2 30 300),sps0 $ putShape $ gird (V2 270 0) (V2 270 300)]
,[sps0 $ putShape $ gird (V2 0 20) (V2 300 20)]
,[sps0 $ putShape $ gird (V2 0 200) (V2 300 200)]
,[sps0 $ putShape $ gird (V2 0 280) (V2 300 280)]
,[sps0 $ putShape $ gird (V2 0 20) (V2 300 20),sps0 $ putShape $ gird (V2 0 280) (V2 300 280)]
]
-- let y' = y & rmPmnts <>~ [l3, l4, l5]
let y' = y & rmPmnts <>~ ls <> dec
return $
tToBTree "chasmTerm" $
@@ -328,8 +328,8 @@ chasmSpitTerminal = do
, return $ cleatOnward $ triggerDoorRoom i1
]
where
f rp a b = FromEdge a 2 `S.member` (fold $ rp ^? rpType . rplsType)
&& OnEdge b `S.member` (fold $ rp ^? rpType . rplsType)
f rp a b = FromEdge a 2 `S.member` fold (rp ^? rpType . rplsType)
&& OnEdge b `S.member` fold (rp ^? rpType . rplsType)
polyChasm :: Int -> Float -> State LayoutVars Room
polyChasm n x =