Implement headlamp
This commit is contained in:
@@ -2,6 +2,7 @@ module Dodge.Item.Equipment where
|
||||
import Dodge.Data
|
||||
import Dodge.Item.Draw
|
||||
import Dodge.Item.Weapon.InventoryDisplay
|
||||
import Dodge.LightSource
|
||||
import Dodge.Default
|
||||
import Dodge.Default.Wall
|
||||
import Dodge.Creature.Test
|
||||
@@ -219,6 +220,26 @@ brainHat = defaultEquipment
|
||||
}
|
||||
& itUse . eqSite .~ GoesOnHead
|
||||
|
||||
headLamp :: Item
|
||||
headLamp = defaultEquipment
|
||||
{ _itType = HEADLAMP
|
||||
, _itName = "HEADLAMP"
|
||||
, _itEquipPict = pictureOnEquip (noPic $ colorSH yellow $
|
||||
translateSHf 5 2 (upperPrismPoly 8 $ rectWH 4 1)
|
||||
<> translateSHf 5 (-2) (upperPrismPoly 8 $ rectWH 4 1)
|
||||
-- <> (upperPrismPoly 3 $ rectWH 4 4)
|
||||
)
|
||||
, _itEffect = NoItEffect
|
||||
, _itID = Nothing
|
||||
}
|
||||
& itUse . eqUse .~ createHeadLamp
|
||||
& itUse . eqSite .~ GoesOnHead
|
||||
|
||||
createHeadLamp :: Creature -> Int -> World -> World
|
||||
createHeadLamp cr _ w = w
|
||||
& tempLightSources .:~ tlsTimeRadColPos 1 200 0.5
|
||||
((_crPos cr `v2z` 0) +.+.+ rotate3 (_crDir cr) (translatePointToHead cr (V3 5 0 3)))
|
||||
|
||||
powerLegs :: Item
|
||||
powerLegs = defaultEquipment
|
||||
{ _itType = POWERLEGS
|
||||
|
||||
Reference in New Issue
Block a user