Refactor, try to limit dependencies
This commit is contained in:
+38
-30
@@ -1,48 +1,56 @@
|
||||
module Dodge.Item.Craftable where
|
||||
import Dodge.Data
|
||||
import Dodge.Default.Weapon
|
||||
--import Dodge.Particle.Bullet.HitEffect
|
||||
--import Dodge.WorldEvent.HitEffect
|
||||
|
||||
import Dodge.Default.Item
|
||||
import Color
|
||||
--import Dodge.Picture.Layer
|
||||
--import Picture
|
||||
--import Geometry
|
||||
import Control.Lens
|
||||
import Dodge.Data.Item
|
||||
|
||||
makeTypeCraftNum :: Int -> CraftType -> Item
|
||||
makeTypeCraftNum i ct = defaultCraftable
|
||||
& itInvSize .~ 0.5
|
||||
& itCurseStatus .~ Uncursed
|
||||
& itUse . useAmount .~ fromIntegral i
|
||||
& itType . iyBase .~ CRAFT ct
|
||||
makeTypeCraftNum i ct =
|
||||
defaultCraftItem
|
||||
& itInvSize .~ 0.5
|
||||
& itCurseStatus .~ Uncursed
|
||||
& itUse . useAmount .~ fromIntegral i
|
||||
& itType . iyBase .~ CRAFT ct
|
||||
|
||||
makeTypeCraft :: CraftType -> Item
|
||||
makeTypeCraft = makeTypeCraftNum 1
|
||||
|
||||
incendiaryModule :: Item
|
||||
incendiaryModule = makeTypeCraft INCENDIARYMODULE
|
||||
& itInvSize .~ 1
|
||||
& itInvColor .~ chartreuse
|
||||
incendiaryModule =
|
||||
makeTypeCraft INCENDIARYMODULE
|
||||
& itInvSize .~ 1
|
||||
& itInvColor .~ chartreuse
|
||||
|
||||
bounceModule :: Item
|
||||
bounceModule = makeTypeCraft BOUNCEMODULE
|
||||
& itInvSize .~ 1
|
||||
& itInvColor .~ chartreuse
|
||||
bounceModule =
|
||||
makeTypeCraft BOUNCEMODULE
|
||||
& itInvSize .~ 1
|
||||
& itInvColor .~ chartreuse
|
||||
|
||||
teleportModule :: Item
|
||||
teleportModule = makeTypeCraft TELEPORTMODULE
|
||||
& itInvSize .~ 1
|
||||
& itInvColor .~ chartreuse
|
||||
teleportModule =
|
||||
makeTypeCraft TELEPORTMODULE
|
||||
& itInvSize .~ 1
|
||||
& itInvColor .~ chartreuse
|
||||
|
||||
timeModule :: Item
|
||||
timeModule = makeTypeCraft TIMEMODULE
|
||||
& itInvSize .~ 1
|
||||
& itInvColor .~ chartreuse
|
||||
timeModule =
|
||||
makeTypeCraft TIMEMODULE
|
||||
& itInvSize .~ 1
|
||||
& itInvColor .~ chartreuse
|
||||
|
||||
sizeModule :: Item
|
||||
sizeModule = makeTypeCraft SIZEMODULE
|
||||
& itInvSize .~ 1
|
||||
& itInvColor .~ chartreuse
|
||||
sizeModule =
|
||||
makeTypeCraft SIZEMODULE
|
||||
& itInvSize .~ 1
|
||||
& itInvColor .~ chartreuse
|
||||
|
||||
gravityModule :: Item
|
||||
gravityModule = makeTypeCraft GRAVITYMODULE
|
||||
& itInvSize .~ 1
|
||||
& itInvColor .~ chartreuse
|
||||
gravityModule =
|
||||
makeTypeCraft GRAVITYMODULE
|
||||
& itInvSize .~ 1
|
||||
& itInvColor .~ chartreuse
|
||||
|
||||
pipe :: Item
|
||||
pipe = makeTypeCraft PIPE
|
||||
|
||||
Reference in New Issue
Block a user