Add files
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
module Dodge.Item.Ammo where
|
||||
|
||||
import Control.Lens
|
||||
import Dodge.Data.World
|
||||
import Dodge.Default.Item
|
||||
|
||||
tinMag :: Item
|
||||
tinMag = defaultHeldItem & itType . iyBase .~ AMMO TINMAGAZINE
|
||||
& itUse .~ AttachUse AmmoAttachParams
|
||||
|
||||
drumMag :: Item
|
||||
drumMag = tinMag & itType . iyBase .~ AMMO DRUMMAGAZINE
|
||||
|
||||
beltMag :: Item
|
||||
beltMag = tinMag & itType . iyBase .~ AMMO BULLETBELT
|
||||
|
||||
zoomScope :: Item
|
||||
zoomScope = tinMag
|
||||
& itType . iyBase .~ ATTACH ZOOMSCOPE
|
||||
& itUse .~ AttachUse ZoomScopeParams
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
module Dodge.Item.InventoryColor where
|
||||
|
||||
import Color
|
||||
import Dodge.Data.Item
|
||||
import Control.Lens
|
||||
|
||||
itemInvColor :: Item -> Color
|
||||
itemInvColor itm = case itm ^. itType . iyBase of
|
||||
HELD {} -> white
|
||||
LEFT {} -> cyan
|
||||
EQUIP {} -> yellow
|
||||
AMMO {} -> orange
|
||||
CONSUMABLE {} -> blue
|
||||
CRAFT {} -> green
|
||||
ATTACH {} -> chartreuse
|
||||
Reference in New Issue
Block a user