Cleanup, remove spawngun
This commit is contained in:
+2
-6
@@ -1,17 +1,12 @@
|
||||
module Dodge.Bullet (
|
||||
updateBullet,
|
||||
-- shootBullet,
|
||||
) where
|
||||
|
||||
--import Dodge.Data.ComposedItem
|
||||
--import Dodge.Data.DoubleTree
|
||||
import Linear
|
||||
import Dodge.Item.Weapon.Bullet
|
||||
import System.Random
|
||||
import Data.Foldable
|
||||
import Data.Maybe
|
||||
--import Dodge.Base.Coordinate
|
||||
--import Dodge.Creature.HandPos
|
||||
import Dodge.Creature.Test
|
||||
import Dodge.Data.World
|
||||
import Dodge.EnergyBall
|
||||
@@ -50,7 +45,8 @@ applyMagnetsToBul bu =
|
||||
updateBulVel :: Bullet -> Bullet
|
||||
updateBulVel bt = case _buTrajectory bt of
|
||||
BasicBulletTrajectory -> bt & buVel .*.*~ _buDrag bt
|
||||
MagnetTrajectory tpos -> bt & buVel %~ (clipV 20 . (+.+ 5 *.* normalizeV (tpos -.- _buPos bt)))
|
||||
MagnetTrajectory tpos -> bt
|
||||
& buVel %~ (clipV 20 . (+.+ 5 *.* normalizeV (tpos -.- _buPos bt)))
|
||||
FlechetteTrajectory tpos -> bt & buVel %~ vecTurnTo 0.2 (_buPos bt) tpos
|
||||
BezierTrajectory spos tpos xpos ->
|
||||
let bf tm = bQuadToF (spos, xpos, tpos) $ (100 - tm) * 0.05
|
||||
|
||||
@@ -320,7 +320,6 @@ stackedInventory =
|
||||
, beltMag
|
||||
, boosterGun
|
||||
, flatShield
|
||||
, spawnGun (lamp 5)
|
||||
-- , lasWide 20
|
||||
, poisonSprayer
|
||||
, bulletBeltPack
|
||||
|
||||
@@ -20,7 +20,6 @@ import Dodge.Data.Creature
|
||||
import Geometry
|
||||
import ShapePicture
|
||||
|
||||
|
||||
translatePointToRightHand :: Creature -> Point3 -> Point3
|
||||
translatePointToRightHand cr = translatePointToRightHand' cr . mirrorV3xz
|
||||
|
||||
|
||||
@@ -191,6 +191,7 @@ flareCircleAt col alphax tranv =
|
||||
circleSolidCol (withAlpha 0 0) (withAlpha alphax col) 50
|
||||
)
|
||||
|
||||
-- previous phaseV parameters: 0.2, 1, 5
|
||||
getLaserPhaseV :: LabelDoubleTree ComposeLinkType Item -> Float
|
||||
getLaserPhaseV = const 1
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
module Dodge.Item.Weapon (
|
||||
module Dodge.Item.Weapon.TriggerType,
|
||||
module Dodge.Item.Weapon.ExtraEffect,
|
||||
module Dodge.Item.Weapon.Spawn,
|
||||
module Dodge.Item.Weapon.Radar,
|
||||
module Dodge.Item.Weapon.Utility,
|
||||
-- module Dodge.Item.Weapon.BatteryGuns,
|
||||
@@ -13,6 +12,5 @@ module Dodge.Item.Weapon (
|
||||
import Dodge.Item.Weapon.Drone
|
||||
import Dodge.Item.Weapon.ExtraEffect
|
||||
import Dodge.Item.Weapon.Radar
|
||||
import Dodge.Item.Weapon.Spawn
|
||||
import Dodge.Item.Weapon.TriggerType
|
||||
import Dodge.Item.Weapon.Utility
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
module Dodge.Item.Weapon.Spawn where
|
||||
|
||||
import Dodge.Default.Item
|
||||
import Control.Lens
|
||||
import Dodge.Data.World
|
||||
import Geometry
|
||||
import qualified IntMapHelp as IM
|
||||
|
||||
{- |
|
||||
Creates a creature next to the creature using the item.
|
||||
-}
|
||||
spawnGun :: Creature -> Item
|
||||
spawnGun _ =
|
||||
defaultHeldItem
|
||||
& itUse . heldDelay . rateMax .~ 100
|
||||
-- & itUse . heldUse .~ HeldDoNothing --(\_ -> spawnCrNextTo cr)
|
||||
-- & itUse . heldMods .~ DoNothingMod
|
||||
& itType .~ LEFT SPAWNER
|
||||
|
||||
spawnCrNextTo ::
|
||||
-- | Creature to spawn
|
||||
Creature ->
|
||||
-- | existing creature that will be spawned next to
|
||||
Creature ->
|
||||
World ->
|
||||
World
|
||||
spawnCrNextTo cr sCr w = w & cWorld . lWorld . creatures %~ IM.insert k newCr
|
||||
where
|
||||
k = IM.newKey $ w ^?! cWorld . lWorld . creatures -- _creatures (_cWorld w)
|
||||
newCr =
|
||||
cr
|
||||
& crID .~ k
|
||||
& crPos .~ _crPos sCr +.+ unitVectorAtAngle (_crDir sCr)
|
||||
& crOldPos .~ _crPos sCr +.+ unitVectorAtAngle (_crDir sCr)
|
||||
Reference in New Issue
Block a user