module Dodge.Item.Weapon.InventoryDisplay where import Dodge.Data import Dodge.Base basicWeaponDisplay :: Item -> String basicWeaponDisplay it = midPadL 10 ' ' (_itName it) (' ' : aIfLoaded) where availableAmmo = show $ _wpMaxAmmo it aIfLoaded = case (_wpReloadState it) of 0 -> show $ _wpLoadedAmmo it x -> "R" ++ show x displayAutoGun :: Item -> String displayAutoGun it@(Weapon {_itAttachment = mayMode}) = midPadL 10 ' ' "AUTOGUN" (' ':aIfLoaded) ++ (' ':phaseS) where aIfLoaded = case (_wpReloadState it) of 0 -> show $ _wpLoadedAmmo it x -> "R" ++ show x phaseS = case mayMode of Just (ItMode 0) -> "M" Just (ItMode 1) -> "S" Just (ItMode 2) -> "B" displayLasGun :: Item -> String displayLasGun it@(Weapon {_itAttachment = mayPhase}) = midPadL 10 ' ' "LASER" (' ':aIfLoaded) ++ (' ':phaseS) where aIfLoaded = case (_wpReloadState it) of 0 -> show $ _wpLoadedAmmo it x -> "R" ++ show x phaseS = case mayPhase of Just (ItPhaseV 0.2) -> "V" Just (ItPhaseV 1) -> "/" Just (ItPhaseV 5) -> "Z"