Start ai cleanup

This commit is contained in:
2021-09-05 22:27:31 +01:00
parent 68ba11aa91
commit e366698064
19 changed files with 352 additions and 489 deletions
+4 -5
View File
@@ -1,4 +1,8 @@
module Dodge.Creature.Action.UseItem
( useItem
, tryUseItem
, useLeftItem
)
where
import Dodge.Data
import Dodge.Inventory
@@ -13,11 +17,6 @@ useItem n w = itemEffect c it w
c = _creatures w IM.! n
it = _crInv c IM.! _crInvSel c
-- TODO this needs sorting out and possibly removing
crUseItem :: Creature -> World -> World
--crUseItem cr = itemEffect (_crID cr) (_crInv cr IM.! _crInvSel cr)
crUseItem = tryUseItem
tryUseItem
:: Creature
-> World