Add files

This commit is contained in:
2023-09-25 13:39:06 +01:00
parent 0a7f5079ad
commit 8f0dd8cd1b
2 changed files with 36 additions and 0 deletions
+21
View File
@@ -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
+15
View File
@@ -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