Cleanup
This commit is contained in:
@@ -53,8 +53,8 @@ rmInvItem :: Int -- ^ Creature id
|
||||
-> Int -- ^ Inventory position
|
||||
-> World
|
||||
-> World
|
||||
rmInvItem cid invid w = case w ^? cWorld . creatures . ix cid . crInv . ix invid . itConsumption . icAmount of
|
||||
Just x | x > 1 -> w & cWorld . creatures . ix cid . crInv . ix invid . itConsumption . icAmount %~ subtract 1
|
||||
rmInvItem cid invid w = case w ^? cWorld . creatures . ix cid . crInv . ix invid . itUse . useAmount of
|
||||
Just x | x > 1 -> w & cWorld . creatures . ix cid . crInv . ix invid . itUse . useAmount %~ subtract 1
|
||||
_ -> w
|
||||
& cWorld . creatures . ix cid . crInv %~ f
|
||||
& cWorld . creatures . ix cid . crInvSel %~ stopCrInvSelAction
|
||||
|
||||
Reference in New Issue
Block a user