Add border to terminal display
This commit is contained in:
+6
-14
@@ -717,13 +717,8 @@ basicMuzFlare pos dir =
|
||||
isAmmoIntLink :: Int -> ItemSF -> Bool
|
||||
isAmmoIntLink i sf = Just i == sf ^? amsfLink
|
||||
|
||||
useLoadedAmmo ::
|
||||
LocationDT OItem ->
|
||||
Creature ->
|
||||
Muzzle ->
|
||||
Maybe (Int, DTree OItem) ->
|
||||
World ->
|
||||
World
|
||||
useLoadedAmmo
|
||||
:: LocationDT OItem -> Creature -> Muzzle -> Maybe (Int, DTree OItem) -> World -> World
|
||||
useLoadedAmmo loc cr mz m w =
|
||||
makeMuzzleFlare pq loc (mz ^. mzFlareType) $ case _mzEffect mz of
|
||||
MuzzleShootBullet -> shootBullets loc cr (mz, x, magtree) w
|
||||
@@ -905,7 +900,8 @@ shootPulseBall (p, q) w =
|
||||
i = IM.newKey $ w ^. cWorld . lWorld . pulseBalls
|
||||
|
||||
removeAmmoFromMag :: Int -> Int -> World -> World
|
||||
removeAmmoFromMag x magid = cWorld . lWorld . items . ix magid . itConsumables . _Just -~ x
|
||||
removeAmmoFromMag x magid
|
||||
= cWorld . lWorld . items . ix magid . itConsumables . _Just -~ x
|
||||
|
||||
getBulletType :: DTree OItem -> Maybe Bullet
|
||||
getBulletType magtree =
|
||||
@@ -960,12 +956,8 @@ magAmmoParams itm = case itm ^. itType of
|
||||
-- Just x | x /= 0 -> fst . randomR (- x, x) $ _randGen w
|
||||
-- _ -> 0
|
||||
|
||||
shootBullets ::
|
||||
LocationDT OItem ->
|
||||
Creature ->
|
||||
(Muzzle, Int, DTree OItem) ->
|
||||
World ->
|
||||
World
|
||||
shootBullets
|
||||
:: LocationDT OItem -> Creature -> (Muzzle, Int, DTree OItem) -> World -> World
|
||||
shootBullets loc cr (mz, x, magtree) w = fromMaybe w $ do
|
||||
thebullet <- getBulletType magtree
|
||||
return $ foldl' (&) w (replicate x (shootBullet thebullet loc cr mz))
|
||||
|
||||
Reference in New Issue
Block a user