Cleanup inventory management, arbitrary limit on cloud height

This commit is contained in:
2022-05-24 17:25:39 +01:00
parent 0349443853
commit 28e9adaea3
4 changed files with 24 additions and 10 deletions
+20 -3
View File
@@ -221,10 +221,10 @@ brainHat = defaultEquipment
}
& itUse . eqSite .~ GoesOnHead
headLamp :: Item
headLamp = defaultEquipment
headLamp1 :: Item
headLamp1 = defaultEquipment
{ _itType = HEADLAMP
, _itName = "HEADLAMP"
, _itName = "HEADLAMP1"
, _itEquipPict = pictureOnEquip (noPic $ colorSH yellow $
translateSHf 5 2 (upperPrismPoly 8 $ rectWH 4 1)
<> translateSHf 5 (-2) (upperPrismPoly 8 $ rectWH 4 1)
@@ -235,6 +235,23 @@ headLamp = defaultEquipment
}
& itUse . eqUse .~ createHeadLamp
& itUse . eqSite .~ GoesOnHead
headLamp :: Item
headLamp = defaultEquipment
{ _itType = HEADLAMP
, _itName = "HEADLAMP"
, _itEquipPict = pictureOnEquip (noPic headLampShape)
, _itEffect = NoItEffect
, _itID = Nothing
}
& itUse . eqUse .~ createHeadLamp
& itUse . eqSite .~ GoesOnHead
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 :: Creature -> Int -> World -> World
createHeadLamp cr _ = tempLightSources .:~ tlsTimeRadColPos 1 200 0.7