More hlinting

This commit is contained in:
2025-12-21 19:27:49 +00:00
parent 2fbaa47c0b
commit 51c52ace7d
18 changed files with 41 additions and 46 deletions
+5 -10
View File
@@ -62,11 +62,7 @@ triggerSwitch col ps = psPtCont ps (PutTrigger False) $
where
trigid tp = fromJust $ _plMID tp
putLitButOnPos ::
Color ->
PlacementSpot ->
(Placement -> Maybe Placement) ->
Placement
putLitButOnPos :: Color -> PlacementSpot -> (Placement -> Maybe Placement) -> Placement
putLitButOnPos col theps subpl =
plSpot .~ theps $
mntLSOn aShape (Just col) ls 0 (V3 0 (-40) 40) $
@@ -77,20 +73,19 @@ putLitButOnPos col theps subpl =
<&> plSpot
.~ _plSpot plmnt
where
changeLight lsid = SetLSCol (V3 0 0.5 0) lsid
changeLight = SetLSCol (V3 0 0.5 0)
ls = lsColPosRad (V3 0.5 0 0) (V3 0 0 50) 50
-- creates a lit external trigger, passes the trigger placement forward
extTrigLitPos :: PlacementSpot -> (Placement -> Maybe Placement) -> Placement
extTrigLitPos ps f = psPtCont ps (PutTrigger False) $
\tp -> Just $
pContID (ps' tp) (PutLS thels) $
pContID (_plSpot tp) (PutLS thels) $
\lsid ->
Just $
pContID (ps' tp) (PutMod $ themod lsid tp) $
pContID (_plSpot tp) (PutMod $ themod lsid tp) $
const (f tp)
where
ps' tp = _plSpot tp
themod lsid tp =
ModIDID
{ _mdID = 0
@@ -126,6 +121,6 @@ putLitButOnPosExtTrig' col thePS cnt =
.~ _plSpot plmnt
where
trigid tp = fromJust $ _plMID tp
oneff tid = SetTrigger True tid
oneff = SetTrigger True
changeLight = SetLSCol (V3 0 0.5 0)
ls = lsColPosRad (V3 0.5 0 0) (V3 0 0 50) 50
+1 -2
View File
@@ -57,11 +57,10 @@ placePlainPSSpot w rid plmnt shift = case plmnt ^. plType of
f x gw = fromMaybe gw $ do
j <- x ^. plExternalID
return $ gw & genPmnt . at j ?~ x
recrPlace newplmnt w' pl =
recrPlace newplmnt w' =
placeSpot
rid
(w' & genRooms . ix rid . rmPmnts .:~ newplmnt)
pl
-- this should be tidied up
placeSpotUsingLink ::
+2 -2
View File
@@ -87,8 +87,8 @@ plLineBlock basePane blwidth a b gw =
$ upperBox Medium Typical 3
[a + x + n - midp, a + x - (n + midp), b - (n + x + midp), b + n - (x + midp)]
)
midp = (0.5 * (a + b))
x = (blwidth + 1) *^ (normalize $ a - b)
midp = 0.5 * (a + b)
x = (blwidth + 1) *^ normalize (a - b)
n = vNormal x
insertBlock (i, p) =
insertWalls (makeWallAt p i)