Add roots and parents to adjacency function from Double Trees

This commit is contained in:
2024-09-21 20:30:29 +01:00
parent 86d8e3a98a
commit 2154abfb1d
10 changed files with 118 additions and 124 deletions
+5 -4
View File
@@ -1,4 +1,6 @@
module Dodge.Projectile.Create where
module Dodge.Projectile.Create
( createProjectile
) where
import Dodge.SoundLogic
import Control.Monad
@@ -9,9 +11,8 @@ import qualified IntMapHelp as IM
import LensHelp
import qualified SDL
createProjectile' :: Maybe Int -> Muzzle -> Item -> Creature -> World -> World
createProjectile' mmagid muz itm cr = fromMaybe failsound $ do
createProjectile :: Maybe Int -> Muzzle -> Item -> Creature -> World -> World
createProjectile mmagid muz itm cr = fromMaybe failsound $ do
magid <- mmagid
ammoitem <- cr ^? crInv . ix magid
matype <- ammoitem ^? itUse . amagType