Implement torch
This commit is contained in:
@@ -110,11 +110,13 @@ torch :: Item
|
||||
torch = defaultWeapon
|
||||
& itEffect .~ effectOnOffHeld createHeldLight (const $ const id)
|
||||
& itType . iyBase .~ HELD TORCH
|
||||
& itUse . useAim . aimHandlePos .~ 5
|
||||
& itUse . useAim . aimMuzPos .~ 10
|
||||
|
||||
createHeldLight :: Creature -> Int -> World -> World
|
||||
createHeldLight cr i w = w
|
||||
& tempLightSources .:~ tlsTimeRadColPos 1 200 0.7
|
||||
(p +.+.+ heldItemOffset itm cr (V3 0 20 0))
|
||||
& tempLightSources .:~ tlsTimeRadColPos 1 250 0.7
|
||||
(p +.+.+ rotate3 (_crDir cr) (heldItemOffset itm cr (V3 8 0 1.5)))
|
||||
where
|
||||
p = addZ 0 $ _crPos cr
|
||||
itm = cr ^?! crInv . ix i
|
||||
|
||||
Reference in New Issue
Block a user