Allow grenades to stick to creatures
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
module Dodge.Data.Projectile where
|
||||
|
||||
import Dodge.Data.Wall.Structure
|
||||
import Dodge.Data.Item.Location
|
||||
import NewInt
|
||||
import Control.Lens
|
||||
@@ -51,8 +52,8 @@ data RocketHoming
|
||||
data GrenadeHitEffect
|
||||
= GBounce {_bounceTolerance :: Float}
|
||||
| GStick
|
||||
| GStuckCreature {_stuckCrID :: Int, _stuckCrOffset :: Point2}
|
||||
| GStuckWall {_stuckWlID :: Int}
|
||||
| GStuckCreature {_stuckCrID :: Int, _stuckCrOffset :: Point2, _stuckCrRot :: Float}
|
||||
| GStuckWall {_stuckWlID :: WallStructure}
|
||||
deriving (Show, Eq, Ord, Read) --Generic, Flat)
|
||||
|
||||
data RocketSmoke
|
||||
|
||||
+3
-13
@@ -1,10 +1,11 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
module Dodge.Data.Wall (
|
||||
module Dodge.Data.Wall,
|
||||
module Dodge.Data.Wall.Structure,
|
||||
module Dodge.Data.Material,
|
||||
) where
|
||||
|
||||
@@ -13,6 +14,7 @@ import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
import Dodge.Data.Material
|
||||
import Dodge.Data.Wall.Structure
|
||||
import Geometry
|
||||
|
||||
data Wall = Wall
|
||||
@@ -45,20 +47,8 @@ data Opacity
|
||||
data WallDraw = DrawForceField
|
||||
deriving (Eq, Ord, Show, Enum, Bounded, Read) --Generic, Flat)
|
||||
|
||||
data WallStructure
|
||||
= StandaloneWall
|
||||
| DoorPart {_wsDoor :: Int}
|
||||
| MachinePart {_wsMachine :: Int}
|
||||
| BlockPart {_wsBlock :: Int}
|
||||
| CreaturePart
|
||||
{ _wlStCreature :: Int
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
|
||||
makeLenses ''Wall
|
||||
makeLenses ''Opacity
|
||||
makeLenses ''WallStructure
|
||||
deriveJSON defaultOptions ''WallDraw
|
||||
deriveJSON defaultOptions ''Opacity
|
||||
deriveJSON defaultOptions ''WallStructure
|
||||
deriveJSON defaultOptions ''Wall
|
||||
|
||||
Reference in New Issue
Block a user