Remove _itInvColor
This commit is contained in:
@@ -8,6 +8,7 @@ import Dodge.Item.SlotsTaken
|
|||||||
import Dodge.Data.Universe
|
import Dodge.Data.Universe
|
||||||
import Dodge.Data.Combine
|
import Dodge.Data.Combine
|
||||||
import Dodge.Item.Display
|
import Dodge.Item.Display
|
||||||
|
import Dodge.Item.InventoryColor
|
||||||
import Color
|
import Color
|
||||||
--import Dodge.Data.SelectionList
|
--import Dodge.Data.SelectionList
|
||||||
import qualified Data.IntSet as IS
|
import qualified Data.IntSet as IS
|
||||||
@@ -57,7 +58,7 @@ combineList' = map f . combineListInfo
|
|||||||
{ _siPictures = basicItemDisplay itm
|
{ _siPictures = basicItemDisplay itm
|
||||||
, _siHeight = itSlotsTaken itm
|
, _siHeight = itSlotsTaken itm
|
||||||
, _siIsSelectable = True
|
, _siIsSelectable = True
|
||||||
, _siColor = _itInvColor itm
|
, _siColor = itemInvColor itm
|
||||||
, _siOffX = 0
|
, _siOffX = 0
|
||||||
, _siOffY = 0
|
, _siOffY = 0
|
||||||
, _siPayload = CombinableItem is itm strs
|
, _siPayload = CombinableItem is itm strs
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ module Dodge.Data.Item (
|
|||||||
module Dodge.Data.Item.Location,
|
module Dodge.Data.Item.Location,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Color
|
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import Data.Aeson.TH
|
import Data.Aeson.TH
|
||||||
@@ -39,7 +38,6 @@ data Item = Item
|
|||||||
, _itIsHeld :: Bool
|
, _itIsHeld :: Bool
|
||||||
, _itEffect :: ItEffect
|
, _itEffect :: ItEffect
|
||||||
, _itInvSize :: Float
|
, _itInvSize :: Float
|
||||||
, _itInvColor :: Color
|
|
||||||
, _itDimension :: ItemDimension
|
, _itDimension :: ItemDimension
|
||||||
, _itCurseStatus :: CurseStatus
|
, _itCurseStatus :: CurseStatus
|
||||||
, _itTweaks :: ItemTweaks
|
, _itTweaks :: ItemTweaks
|
||||||
|
|||||||
@@ -25,10 +25,7 @@ import Geometry
|
|||||||
import Picture
|
import Picture
|
||||||
|
|
||||||
defaultEquipment :: Item
|
defaultEquipment :: Item
|
||||||
defaultEquipment =
|
defaultEquipment = defaultItem & itUse .~ defaultEquipUse
|
||||||
defaultItem
|
|
||||||
& itInvColor .~ yellow
|
|
||||||
& itUse .~ defaultEquipUse
|
|
||||||
|
|
||||||
defaultFlIt :: FloorItem
|
defaultFlIt :: FloorItem
|
||||||
defaultFlIt = FlIt{_flItRot = 0, _flIt = defaultConsumable, _flItPos = V2 0 0, _flItID = 0}
|
defaultFlIt = FlIt{_flItRot = 0, _flIt = defaultConsumable, _flItPos = V2 0 0, _flItID = 0}
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ module Dodge.Default.Item (
|
|||||||
module Dodge.Default.Item.Effect,
|
module Dodge.Default.Item.Effect,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Color
|
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import qualified Data.Map.Strict as M
|
import qualified Data.Map.Strict as M
|
||||||
import Dodge.Data.Item
|
import Dodge.Data.Item
|
||||||
@@ -27,7 +26,7 @@ defaultItem =
|
|||||||
, _itEffect = defaultItEffect
|
, _itEffect = defaultItEffect
|
||||||
, _itID = 0
|
, _itID = 0
|
||||||
, _itIsHeld = False
|
, _itIsHeld = False
|
||||||
, _itInvColor = yellow
|
-- , _itInvColor = yellow
|
||||||
, _itInvSize = 1
|
, _itInvSize = 1
|
||||||
, _itLocation = InVoid
|
, _itLocation = InVoid
|
||||||
, _itDimension = defaultItemDimension
|
, _itDimension = defaultItemDimension
|
||||||
@@ -40,22 +39,13 @@ defaultItem =
|
|||||||
}
|
}
|
||||||
|
|
||||||
defaultLeftItem :: Item
|
defaultLeftItem :: Item
|
||||||
defaultLeftItem =
|
defaultLeftItem = defaultItem & itUse .~ defaultLeftUse
|
||||||
defaultItem
|
|
||||||
& itUse .~ defaultLeftUse
|
|
||||||
& itInvColor .~ cyan
|
|
||||||
|
|
||||||
defaultHeldItem :: Item
|
defaultHeldItem :: Item
|
||||||
defaultHeldItem =
|
defaultHeldItem = defaultItem & itUse .~ defaultHeldUse
|
||||||
defaultItem
|
|
||||||
& itInvColor .~ white
|
|
||||||
& itUse .~ defaultHeldUse
|
|
||||||
|
|
||||||
defaultCraftItem :: Item
|
defaultCraftItem :: Item
|
||||||
defaultCraftItem =
|
defaultCraftItem = defaultItem & itUse .~ CraftUse 1
|
||||||
defaultItem
|
|
||||||
& itUse .~ CraftUse 1
|
|
||||||
& itInvColor .~ green
|
|
||||||
|
|
||||||
defaultItemType :: ItemType
|
defaultItemType :: ItemType
|
||||||
defaultItemType = ItemType NoItemType mempty
|
defaultItemType = ItemType NoItemType mempty
|
||||||
@@ -73,7 +63,6 @@ defaultWeapon :: Item
|
|||||||
defaultWeapon =
|
defaultWeapon =
|
||||||
defaultHeldItem
|
defaultHeldItem
|
||||||
& itUse .~ defaultHeldUse
|
& itUse .~ defaultHeldUse
|
||||||
& itInvColor .~ white
|
|
||||||
& itType . iyModules
|
& itType . iyModules
|
||||||
.~ M.fromList
|
.~ M.fromList
|
||||||
[ (ModTarget, EMPTYMODULE)
|
[ (ModTarget, EMPTYMODULE)
|
||||||
@@ -81,8 +70,5 @@ defaultWeapon =
|
|||||||
]
|
]
|
||||||
|
|
||||||
defaultConsumable :: Item
|
defaultConsumable :: Item
|
||||||
defaultConsumable =
|
defaultConsumable = defaultItem & itUse .~ ConsumeUse CDoNothing 1
|
||||||
defaultItem
|
|
||||||
& itUse .~ ConsumeUse CDoNothing 1
|
|
||||||
& itInvColor .~ blue
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import Dodge.Data.SelectionList
|
|||||||
import Dodge.Data.World
|
import Dodge.Data.World
|
||||||
import Dodge.Item.SlotsTaken
|
import Dodge.Item.SlotsTaken
|
||||||
import Dodge.Item.Display
|
import Dodge.Item.Display
|
||||||
|
import Dodge.Item.InventoryColor
|
||||||
import LensHelp
|
import LensHelp
|
||||||
import Picture.Base
|
import Picture.Base
|
||||||
|
|
||||||
@@ -26,7 +27,7 @@ invSelectionItem cr i it =
|
|||||||
where
|
where
|
||||||
anyhotkey = maybe [] ((' ':) .hotkeyToString) (cr ^? crInvHotkeys . ix i)
|
anyhotkey = maybe [] ((' ':) .hotkeyToString) (cr ^? crInvHotkeys . ix i)
|
||||||
anyequippos = maybe [] (rightPad 8 ' ' . (' ':) . eqPosText) (cr ^? crInvEquipped . ix i)
|
anyequippos = maybe [] (rightPad 8 ' ' . (' ':) . eqPosText) (cr ^? crInvEquipped . ix i)
|
||||||
col = _itInvColor it
|
col = itemInvColor it
|
||||||
(yoff,pics) = case _itCurseStatus it of
|
(yoff,pics) = case _itCurseStatus it of
|
||||||
UndroppableIdentified -> itemDisplayOffset cr it
|
UndroppableIdentified -> itemDisplayOffset cr it
|
||||||
_ -> itemDisplayOffset cr it
|
_ -> itemDisplayOffset cr it
|
||||||
@@ -64,5 +65,5 @@ closeObjectToSelectionItem e =
|
|||||||
--
|
--
|
||||||
closeObjectToTextPictures :: Either FloorItem Button -> ([String], Color)
|
closeObjectToTextPictures :: Either FloorItem Button -> ([String], Color)
|
||||||
closeObjectToTextPictures e = case e of
|
closeObjectToTextPictures e = case e of
|
||||||
Left flit -> let it = _flIt flit in (basicItemDisplay it, _itInvColor it)
|
Left flit -> let it = _flIt flit in (basicItemDisplay it, itemInvColor it)
|
||||||
Right bt -> ([_btText bt], yellow)
|
Right bt -> ([_btText bt], yellow)
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
module Dodge.Item.Craftable where
|
module Dodge.Item.Craftable where
|
||||||
|
|
||||||
import Dodge.Default.Item
|
import Dodge.Default.Item
|
||||||
import Color
|
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Dodge.Data.Item
|
import Dodge.Data.Item
|
||||||
|
|
||||||
@@ -17,10 +16,7 @@ makeTypeCraft :: CraftType -> Item
|
|||||||
makeTypeCraft = makeTypeCraftNum 1
|
makeTypeCraft = makeTypeCraftNum 1
|
||||||
|
|
||||||
energyBallCraft :: EnergyBallType -> Item
|
energyBallCraft :: EnergyBallType -> Item
|
||||||
energyBallCraft ebt =
|
energyBallCraft ebt = makeTypeCraft (ENERGYBALLCRAFT ebt) & itInvSize .~ 1
|
||||||
makeTypeCraft (ENERGYBALLCRAFT ebt)
|
|
||||||
& itInvSize .~ 1
|
|
||||||
& itInvColor .~ chartreuse
|
|
||||||
|
|
||||||
incendiaryModule :: Item
|
incendiaryModule :: Item
|
||||||
incendiaryModule = energyBallCraft IncBall
|
incendiaryModule = energyBallCraft IncBall
|
||||||
@@ -29,34 +25,21 @@ bulletBodyCraft :: BulletEffect -> Item
|
|||||||
bulletBodyCraft ebt =
|
bulletBodyCraft ebt =
|
||||||
makeTypeCraft (BULBODYCRAFT ebt)
|
makeTypeCraft (BULBODYCRAFT ebt)
|
||||||
& itInvSize .~ 1
|
& itInvSize .~ 1
|
||||||
& itInvColor .~ chartreuse
|
|
||||||
|
|
||||||
bounceModule :: Item
|
bounceModule :: Item
|
||||||
bounceModule = bulletBodyCraft BounceBullet
|
bounceModule = bulletBodyCraft BounceBullet
|
||||||
|
|
||||||
teleportModule :: Item
|
teleportModule :: Item
|
||||||
teleportModule =
|
teleportModule = makeTypeCraft TELEPORTMODULE & itInvSize .~ 1
|
||||||
makeTypeCraft TELEPORTMODULE
|
|
||||||
& itInvSize .~ 1
|
|
||||||
& itInvColor .~ chartreuse
|
|
||||||
|
|
||||||
timeModule :: Item
|
timeModule :: Item
|
||||||
timeModule =
|
timeModule = makeTypeCraft TIMEMODULE & itInvSize .~ 1
|
||||||
makeTypeCraft TIMEMODULE
|
|
||||||
& itInvSize .~ 1
|
|
||||||
& itInvColor .~ chartreuse
|
|
||||||
|
|
||||||
sizeModule :: Item
|
sizeModule :: Item
|
||||||
sizeModule =
|
sizeModule = makeTypeCraft SIZEMODULE & itInvSize .~ 1
|
||||||
makeTypeCraft SIZEMODULE
|
|
||||||
& itInvSize .~ 1
|
|
||||||
& itInvColor .~ chartreuse
|
|
||||||
|
|
||||||
gravityModule :: Item
|
gravityModule :: Item
|
||||||
gravityModule =
|
gravityModule = makeTypeCraft GRAVITYMODULE & itInvSize .~ 1
|
||||||
makeTypeCraft GRAVITYMODULE
|
|
||||||
& itInvSize .~ 1
|
|
||||||
& itInvColor .~ chartreuse
|
|
||||||
|
|
||||||
pipe :: Item
|
pipe :: Item
|
||||||
pipe = makeTypeCraft PIPE
|
pipe = makeTypeCraft PIPE
|
||||||
|
|||||||
@@ -127,14 +127,10 @@ powerLegs =
|
|||||||
& itType . iyBase .~ EQUIP POWERLEGS
|
& itType . iyBase .~ EQUIP POWERLEGS
|
||||||
|
|
||||||
speedLegs :: Item
|
speedLegs :: Item
|
||||||
speedLegs =
|
speedLegs = powerLegs & itType . iyBase .~ EQUIP SPEEDLEGS
|
||||||
powerLegs
|
|
||||||
& itType . iyBase .~ EQUIP SPEEDLEGS
|
|
||||||
|
|
||||||
jumpLegs :: Item
|
jumpLegs :: Item
|
||||||
jumpLegs =
|
jumpLegs = powerLegs & itType . iyBase .~ EQUIP JUMPLEGS
|
||||||
powerLegs
|
|
||||||
& itType . iyBase .~ EQUIP JUMPLEGS
|
|
||||||
|
|
||||||
wristInvisibility :: Item
|
wristInvisibility :: Item
|
||||||
wristInvisibility =
|
wristInvisibility =
|
||||||
|
|||||||
@@ -55,7 +55,8 @@ rifle =
|
|||||||
& itUse . heldAim . aimStance .~ TwoHandUnder
|
& itUse . heldAim . aimStance .~ TwoHandUnder
|
||||||
& itType . iyBase .~ HELD RIFLE
|
& itType . iyBase .~ HELD RIFLE
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaMax .~ 1
|
& itUse . heldConsumption . laSource . _InternalSource . iaMax .~ 1
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaCycle .~ [loadEject 5, loadInsert 5, loadPrime 5]
|
& itUse . heldConsumption . laSource . _InternalSource . iaCycle
|
||||||
|
.~ [loadEject 5, loadInsert 5, loadPrime 5]
|
||||||
& itUse . heldAim . aimWeight .~ 6
|
& itUse . heldAim . aimWeight .~ 6
|
||||||
& itUse . heldAim . aimRange .~ 1
|
& itUse . heldAim . aimRange .~ 1
|
||||||
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
|
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ module Dodge.Item.Held.Utility where
|
|||||||
|
|
||||||
import Linear
|
import Linear
|
||||||
import Dodge.Default.Item
|
import Dodge.Default.Item
|
||||||
import Color
|
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Dodge.Data.Item
|
import Dodge.Data.Item
|
||||||
--import Geometry.Data
|
--import Geometry.Data
|
||||||
@@ -19,15 +18,10 @@ flatShield =
|
|||||||
& itType . iyBase .~ HELD FLATSHIELD
|
& itType . iyBase .~ HELD FLATSHIELD
|
||||||
|
|
||||||
keyCard :: Int -> Item
|
keyCard :: Int -> Item
|
||||||
keyCard n =
|
keyCard n = defaultHeldItem & itType . iyBase .~ HELD (KEYCARD n)
|
||||||
defaultHeldItem
|
|
||||||
& itInvColor .~ aquamarine
|
|
||||||
& itType . iyBase .~ HELD (KEYCARD n)
|
|
||||||
|
|
||||||
latchkey :: Int -> Item
|
latchkey :: Int -> Item
|
||||||
latchkey _ =
|
latchkey _ = defaultHeldItem
|
||||||
defaultHeldItem
|
|
||||||
& itInvColor .~ yellow
|
|
||||||
|
|
||||||
binoculars :: Item
|
binoculars :: Item
|
||||||
binoculars =
|
binoculars =
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ module Dodge.Item.Weapon.Utility
|
|||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Dodge.Data.Item
|
import Dodge.Data.Item
|
||||||
import Dodge.Default
|
import Dodge.Default
|
||||||
import Picture
|
|
||||||
|
|
||||||
stopWatch :: Item
|
stopWatch :: Item
|
||||||
stopWatch =
|
stopWatch =
|
||||||
@@ -20,7 +19,6 @@ stopWatch =
|
|||||||
& leftUse .~ LTimePause
|
& leftUse .~ LTimePause
|
||||||
& equipEffect . eeSite .~ GoesOnWrist
|
& equipEffect . eeSite .~ GoesOnWrist
|
||||||
)
|
)
|
||||||
& itInvColor .~ cyan
|
|
||||||
& itEffect . ieInv .~ ChargeIfEquipped
|
& itEffect . ieInv .~ ChargeIfEquipped
|
||||||
& itEffect . ieOnDrop .~ SetCharge 0
|
& itEffect . ieOnDrop .~ SetCharge 0
|
||||||
& itType . iyBase .~ LEFT STOPWATCH
|
& itType . iyBase .~ LEFT STOPWATCH
|
||||||
@@ -53,8 +51,7 @@ shrinkGun =
|
|||||||
blinkGun :: Item
|
blinkGun :: Item
|
||||||
blinkGun =
|
blinkGun =
|
||||||
defaultLeftItem
|
defaultLeftItem
|
||||||
{ _itInvColor = cyan
|
{ _itUse =
|
||||||
, _itUse =
|
|
||||||
defaultLeftUse
|
defaultLeftUse
|
||||||
& leftUse .~ LBlink --hammerCheckL (shootL $ const blinkAction)
|
& leftUse .~ LBlink --hammerCheckL (shootL $ const blinkAction)
|
||||||
& equipEffect . eeSite .~ GoesOnWrist
|
& equipEffect . eeSite .~ GoesOnWrist
|
||||||
|
|||||||
Reference in New Issue
Block a user