Remove item picture field, handled by outside function

This commit is contained in:
2022-07-11 12:34:39 +01:00
parent 33d94bd05a
commit 53548fb1ff
20 changed files with 303 additions and 412 deletions
-34
View File
@@ -27,8 +27,6 @@ import Dodge.Wall.ForceField
import Dodge.Magnet
import Picture
import Geometry
import ShapePicture
import Shape
import qualified IntMapHelp as IM
import LensHelp
--import ShortShow
@@ -67,12 +65,6 @@ frontArmour = defaultEquipment
}
& itUse . eqEq . eqSite .~ GoesOnChest
& itType . iyBase .~ FRONTARMOUR
& itDimension . dimSPic .~ const (emptySH , setDepth 20 $ pictures
[color thecol $ thickArc 0 (pi/2) 10 5
,color thecol $ thickArc (3*pi/2) (2*pi) 10 5
])
where
thecol = yellow -- (greyN 0.1)
wristArmour :: Item
wristArmour = defaultEquipment
@@ -83,7 +75,6 @@ wristArmour = defaultEquipment
& itUse . eqEq . eqUse .~ setWristShieldPos
& itUse . eqEq . eqOnRemove .~ onRemoveWristShield
& itType . iyBase .~ WRISTARMOUR
& itDimension . dimSPic .~ const mempty
onEquipWristShield :: Item -> Creature -> World -> World
onEquipWristShield itm cr w = w
@@ -138,12 +129,6 @@ flatShield = defaultEquipment
, _itInvSize = 3
}
& itType . iyBase .~ FLATSHIELD
& itDimension . dimSPic .~ flatShieldEquipSPic
flatShieldEquipSPic :: Item -> SPic
flatShieldEquipSPic _ =
( colorSH yellow $ upperPrismPoly 10 (rectWH 2 10)
, mempty
)
shieldWall :: Int -> Wall
shieldWall crid = defaultWall
@@ -212,9 +197,6 @@ jetPack = defaultEquipment
, _itID = Nothing
} & itUse . eqEq . eqSite .~ GoesOnBack
& itType . iyBase .~ JETPACK
& itDimension . dimSPic .~ ( \_ -> (,) emptySH $ setDepth 20
$ pictures [color yellow $ polygon $ reverse $ rectNSWE 5 (-5) (-11) (-3) ]
)
brainHat :: Item
brainHat = defaultEquipment
@@ -223,8 +205,6 @@ brainHat = defaultEquipment
}
& itUse . eqEq . eqSite .~ GoesOnHead
& itType . iyBase .~ BRAINHAT
& itDimension . dimSPic .~
const (noPic $ colorSH yellow $ upperPrismPoly 3 $ rectWH 4 4)
headLamp1 :: Item
headLamp1 = defaultEquipment
@@ -234,10 +214,6 @@ headLamp1 = defaultEquipment
& itUse . eqEq . eqUse .~ createHeadLamp
& itUse . eqEq . eqSite .~ GoesOnHead
& itType . iyBase .~ HEADLAMP1
& itDimension . dimSPic .~
const (noPic $ colorSH yellow $
translateSHf 5 2 (upperPrismPoly 8 $ rectWH 4 1)
<> translateSHf 5 (-2) (upperPrismPoly 8 $ rectWH 4 1))
headLamp :: Item
headLamp = defaultEquipment
{ _itEffect = NoItEffect
@@ -246,14 +222,7 @@ headLamp = defaultEquipment
& itUse . eqEq . eqUse .~ createHeadLamp
& itUse . eqEq . eqSite .~ GoesOnHead
& itType . iyBase .~ HEADLAMP
& itDimension . dimSPic .~ const (noPic headLampShape)
headLampShape :: Shape
headLampShape = colorSH yellow $
translateSH (V3 5 2 4) (upperPrismPoly 4 $ rectWH 4 1)
<> translateSH (V3 5 2 0) (upperPrismPoly 4 $ rectWH 4 1)
<> translateSH (V3 5 (-2) 4) (upperPrismPoly 4 $ rectWH 4 1)
<> translateSH (V3 5 (-2) 0) (upperPrismPoly 4 $ rectWH 4 1)
createHeadLamp :: Item -> Creature -> World -> World
createHeadLamp _ cr = tempLightSources .:~ tlsTimeRadColPos 1 200 0.7
@@ -266,8 +235,6 @@ powerLegs = defaultEquipment
}
& itUse . eqEq . eqSite .~ GoesOnLegs
& itType . iyBase .~ POWERLEGS
& itDimension . dimSPic .~ const
(noPic $ translateSH (V3 0 4 0) $ colorSH yellow $ upperPrismPoly 3 $ rectWH 2 2)
speedLegs :: Item
speedLegs = powerLegs
& itType . iyBase .~ SPEEDLEGS
@@ -283,7 +250,6 @@ wristInvisibility = defaultEquipment
& itUse . eqEq . eqOnEquip .~ overCID (crCamouflage .~ Invisible)
& itUse . eqEq . eqOnRemove .~ overCID (crCamouflage .~ FullyVisible)
& itType . iyBase .~ INVISIBILITYEQUIPMENT GoesOnWrist
& itDimension . dimSPic .~ const (noPic (colorSH chartreuse $ upperPrismPoly 3 $ rectWH 2 2))
overCID :: (Creature -> Creature) -> Item -> Creature -> World -> World
overCID f _ cr = creatures . ix (_crID cr) %~ f