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