Defunction-ify item modules, requires more cleanup
This commit is contained in:
+14
-32
@@ -1,6 +1,7 @@
|
||||
module Dodge.Default.Weapon
|
||||
where
|
||||
import Dodge.Data
|
||||
import Dodge.Default.Item
|
||||
import Dodge.Item.Weapon.InventoryDisplay
|
||||
import Dodge.Item.Draw
|
||||
import Picture
|
||||
@@ -94,11 +95,10 @@ defaultAimParams = AimParams
|
||||
, _aimStance = OneHand
|
||||
}
|
||||
|
||||
|
||||
defaultGun :: Item
|
||||
defaultGun = Item
|
||||
{ _itName = "default"
|
||||
, _itType = NoCombineType
|
||||
, _itCurseStatus = Uncursed
|
||||
defaultGun = defaultItem
|
||||
{ _itCurseStatus = Uncursed
|
||||
, _itConsumption = defaultAmmo
|
||||
, _itUse = defaultrUse
|
||||
, _itDimension = defItDimCol white
|
||||
@@ -113,41 +113,23 @@ defaultGun = Item
|
||||
, _itInvSize = 1
|
||||
, _itParams = NoParams
|
||||
, _itTweaks = NoTweaks
|
||||
, _itModules = M.fromList
|
||||
[(ModBullet, DefaultModule)
|
||||
,(ModTarget, DefaultModule)
|
||||
,(ModBulletTrajectory, DefaultModule)
|
||||
,(ModTeleport, DefaultModule)
|
||||
]
|
||||
, _itScope = NoScope
|
||||
, _itTargeting = NoTargeting
|
||||
, _itValue = defaultItemValue
|
||||
}
|
||||
}
|
||||
& itType . iyModules .~ M.fromList
|
||||
[(ModBullet, EMPTYMODULE)
|
||||
,(ModTarget, EMPTYMODULE)
|
||||
,(ModBulletTrajectory, EMPTYMODULE)
|
||||
,(ModTeleport, EMPTYMODULE)
|
||||
]
|
||||
|
||||
defaultItemValue :: ItemValue
|
||||
defaultItemValue = ItemValue 10 MundaneItem
|
||||
defaultCraftable :: Item
|
||||
defaultCraftable = Item
|
||||
{ _itName = "default"
|
||||
, _itType = NoCombineType
|
||||
, _itCurseStatus = Uncursed
|
||||
, _itConsumption = NoConsumption
|
||||
, _itUse = NoUse
|
||||
, _itEquipPict = pictureWeaponOnAim
|
||||
, _itAttachment = NoItAttachment
|
||||
, _itID = Nothing
|
||||
, _itInvPos = Nothing
|
||||
, _itIsHeld = False
|
||||
, _itEffect = NoItEffect
|
||||
, _itInvDisplay = basicItemDisplay
|
||||
defaultCraftable = defaultItem
|
||||
{ _itEquipPict = pictureWeaponOnAim
|
||||
, _itInvColor = green
|
||||
, _itInvSize = 1
|
||||
, _itParams = NoParams
|
||||
, _itDimension = defItDimCol green
|
||||
, _itTweaks = NoTweaks
|
||||
, _itModules = M.empty
|
||||
, _itScope = NoScope
|
||||
, _itTargeting = NoTargeting
|
||||
, _itValue = defaultItemValue
|
||||
}
|
||||
defItDim :: ItemDimension
|
||||
defItDim = ItemDimension
|
||||
|
||||
Reference in New Issue
Block a user