Allow grenades to stick to creatures

This commit is contained in:
2025-01-01 17:44:00 +00:00
parent e8fe4c2d72
commit 511e765e3a
6 changed files with 178 additions and 163 deletions
-2
View File
@@ -61,11 +61,9 @@ destroyBlock bl w =
& deleteWallIDs wlids
& maybeClearPaths (_blObstructs bl) -- must happen after the walls are deleted
& cWorld . lWorld . blocks %~ IM.delete (_blID bl)
-- & matDesSound (_blMaterial bl) pos
& flip (foldl' $ flip (wlDustAt awl)) (map (pos +.+) ps)
where
wlids = _blWallIDs bl
--awl = _walls (_cWorld w) IM.! IS.findMin wlids
awl = w ^?! cWorld . lWorld . walls . ix (IS.findMin wlids)
pos = fst . _wlLine $ awl
ps = replicateM 25 (randInCirc 20) & evalState $ _randGen w