Modularise item data, change tesla arc from projectile to particle
This commit is contained in:
@@ -13,6 +13,7 @@ import Dodge.Default
|
||||
--import Dodge.Default.Shell
|
||||
import Dodge.Item.Draw
|
||||
import Dodge.Particle.Bullet.HitEffect
|
||||
import Dodge.Item.Data
|
||||
import Dodge.Item.Weapon.InventoryDisplay
|
||||
import Dodge.Item.Weapon.TriggerType
|
||||
import Dodge.Item.Weapon.ExtraEffect
|
||||
@@ -540,10 +541,10 @@ aTeslaArc cr w = aTeslaArc' cr $ soundFrom (CrWeaponSound cid) 25 1 0 w
|
||||
aTeslaArc' :: Creature -> World -> World
|
||||
aTeslaArc' cr w
|
||||
= teslaGunFlashAt (pos +.+ 5 *.* unitVectorAtAngle dir)
|
||||
$ over projectiles (IM.insert i (makeTeslaArcAt i pos dir))
|
||||
-- $ over projectiles (IM.insert i (makeTeslaArcAt i pos dir))
|
||||
$ set randGen g w
|
||||
& particles %~ (makeTeslaArcAt pos dir :)
|
||||
where
|
||||
i = newProjectileKey w
|
||||
pos = _crPos cr +.+ ((_crRad cr +1) *.* unitVectorAtAngle dir)
|
||||
+.+ sideOffset *.* vNormal (unitVectorAtAngle dir)
|
||||
(sideOffset,g) = randomR (-5,5) $ _randGen w
|
||||
@@ -720,6 +721,7 @@ grenade = Throwable
|
||||
, _itHammer = HammerUp
|
||||
, _itScrollUp = decreaseFuse fuseTime
|
||||
, _itScrollDown = increaseFuse fuseTime
|
||||
, _itAimStance = OneHand
|
||||
}
|
||||
where
|
||||
fuseTime = 50
|
||||
@@ -932,6 +934,7 @@ pipe = Craftable
|
||||
, _itID = Nothing
|
||||
, _itInvDisplay = _itName
|
||||
, _itInvColor = green
|
||||
, _itAimStance = LeaveHolstered
|
||||
}
|
||||
{- |
|
||||
Sends out pulses that display walls. -}
|
||||
|
||||
Reference in New Issue
Block a user