Make all items have an id an associated location

This commit is contained in:
2022-08-01 23:50:26 +01:00
parent 237cd3e020
commit 82aedc3830
11 changed files with 123 additions and 84 deletions
+1 -2
View File
@@ -5,7 +5,6 @@ import Dodge.Item.Location
import Geometry
import qualified IntMapHelp as IM
import LensHelp
import Data.Maybe
createProjectile :: ProjectileCreate -> Item -> Creature -> World -> World
createProjectile pt = case pt of
@@ -47,7 +46,7 @@ makeShell it cr theupdate w =
, _prjPayload = _amPayload $ _laAmmoType am
, _prjTimer = 350
, _prjUpdates = theupdate
, _prjMITID = Just . fromJust $ _itID it
, _prjMITID = Just $ _itID it
}
where
i = IM.newKey $ _props (_cWorld w)