Files
loop/src/Dodge/Item/Weapon/Drone.hs
T
2024-10-01 01:20:29 +01:00

53 lines
1.4 KiB
Haskell

module Dodge.Item.Weapon.Drone where
import Dodge.Default.Item
import Control.Lens
import Dodge.Data.World
import Geometry
import Picture
import Shape
import ShapePicture
droneLauncher :: Item
droneLauncher =
defaultHeldItem
& itUse . heldDelay . rateMax .~ 20
-- & itUse . heldMods .~ AmmoUseCheckMod
& itUse . heldAim . aimWeight .~ 8
& itUse . heldAim . aimRange .~ 0.5
& itUse . heldAim . aimStance .~ TwoHandOver
& itUse . heldAmmoTypes .~ singleAmmo DroneAmmo
& itType .~ HELD DRONELAUNCHER
lasDronesPic :: Item -> SPic
lasDronesPic _ = noPic
( colorSH chartreuse $
prismPoly Small Typical
(map (+.+.+ V3 10 0 4.5) $ polyCircx 4 5)
(map (+.+.+ V3 (-10) 0 4.5) $ polyCircx 4 5)
)
aDroneWithItemParams ::
-- | Firing item
Item ->
Creature ->
World ->
World
aDroneWithItemParams = undefined
--aDroneWithItemParams it cr w = over props (IM.insert i theShell) w
-- where
-- am = _itConsumption it
-- i = IM.newKey $ _props w
-- pos = _crPos cr +.+ ((_crRad cr +1) *.* unitVectorAtAngle dir)
-- dir = _crDir cr
-- --ammoMvs pj w' = foldr (\pjP -> _pjMoveParam pjP (_pjIntParam pjP) it cr pj) w' (_amPjParams am)
-- theShell = Drone
-- { _prPos = pos
-- , _pjStartPos = pos
-- , _pjVel = rotateV dir (V2 1 0)
-- , _prDraw = undefined
-- , _pjID = i
-- , _pjUpdate = const id
-- }