Cleanup targeting
This commit is contained in:
@@ -270,12 +270,12 @@ updateAutoRecharge it = case it ^? itUse . leftConsumption of
|
||||
_ -> it
|
||||
|
||||
doItemTargeting :: Int -> Creature -> World -> World
|
||||
doItemTargeting invid cr w = case cr ^? crInv . ix invid . itTargeting of
|
||||
doItemTargeting invid cr w = case cr ^? crInv . ix invid . itUse . heldTargeting of
|
||||
Nothing -> w
|
||||
Just NoTargeting -> w
|
||||
Just t ->
|
||||
let (w', t') = updateTargeting (_tgUpdate t) (_crInv cr IM.! invid) cr w t
|
||||
in w' & cWorld . lWorld . creatures . ix (_crID cr) . crInv . ix invid . itTargeting .~ t'
|
||||
let (w', t') = updateTargeting (_tgType t) (_crInv cr IM.! invid) cr w t
|
||||
in w' & cWorld . lWorld . creatures . ix (_crID cr) . crInv . ix invid . itUse . heldTargeting .~ t'
|
||||
|
||||
weaponReloadSounds :: Creature -> World -> World
|
||||
weaponReloadSounds cr w = case cr ^? crInvSel . iselAction of
|
||||
|
||||
Reference in New Issue
Block a user