Fix aiming with no weapon crash
This commit is contained in:
+34
-55
@@ -77,6 +77,8 @@ data World = World
|
||||
, _itemPositions :: IM.IntMap ItemPos
|
||||
, _clouds :: [Cloud]
|
||||
, _cloudsZone :: Zone [Cloud]
|
||||
, _gusts :: IM.IntMap Gust
|
||||
, _gustsZone :: Zone (IM.IntMap Gust)
|
||||
, _props :: IM.IntMap Prop
|
||||
, _instantParticles :: [Particle]
|
||||
, _particles :: [Particle]
|
||||
@@ -191,6 +193,12 @@ data Corpse = Corpse
|
||||
, _cpPict :: Picture
|
||||
, _cpRes :: Creature
|
||||
}
|
||||
data Gust = Gust
|
||||
{ _guID :: Int
|
||||
, _guPos :: Point2
|
||||
, _guVel :: Point2
|
||||
, _guTime :: Int
|
||||
}
|
||||
data Cloud = Cloud
|
||||
{ _clPos :: Point3
|
||||
, _clVel :: Point3
|
||||
@@ -361,44 +369,6 @@ data Item
|
||||
, _itParams :: ItemParams
|
||||
, _itTweaks :: ItemTweaks
|
||||
}
|
||||
-- | Equipment
|
||||
-- { _itName :: String
|
||||
-- , _itFloorPict :: Item -> SPic
|
||||
-- , _itEquipPict :: Creature -> Int -> SPic
|
||||
---- , _itIdentity :: ItemIdentity
|
||||
-- , _itEffect :: ItEffect
|
||||
-- , _itID :: Maybe Int
|
||||
-- , _itType :: CombineType
|
||||
-- , _itZoom :: ItZoom
|
||||
-- , _itInvSize :: Float
|
||||
-- , _itInvDisplay :: Item -> [String]
|
||||
-- , _itInvColor :: Color
|
||||
-- , _itCurseStatus :: CurseStatus
|
||||
-- , _itDimension :: ItemDimension
|
||||
-- }
|
||||
-- | Throwable
|
||||
-- { _itName :: String
|
||||
-- , _itMaxStack :: Int
|
||||
---- , _itAmount :: Int
|
||||
-- , _itFloorPict :: Item -> SPic
|
||||
-- , _twMaxRange :: Float
|
||||
-- , _twAccuracy :: Float
|
||||
-- , _itUse :: ItemUse
|
||||
---- , _itZoom :: ItZoom
|
||||
-- , _itEquipPict :: Creature -> Int -> SPic
|
||||
-- --, _itIdentity :: ItemIdentity
|
||||
-- , _itID :: Maybe Int
|
||||
-- , _itAttachment :: ItAttachment
|
||||
-- , _itType :: CombineType
|
||||
-- , _itInvSize :: Float
|
||||
-- , _itInvDisplay :: Item -> [String]
|
||||
-- , _itInvColor :: Color
|
||||
-- , _itEffect :: ItEffect
|
||||
-- , _itScroll :: Float -> Creature -> Item -> Item
|
||||
-- , _itCurseStatus :: CurseStatus
|
||||
-- , _itDimension :: ItemDimension
|
||||
-- }
|
||||
-- | NoItem
|
||||
|
||||
data ItemDimension = ItemDimension
|
||||
{ _dimRad :: Float
|
||||
@@ -467,33 +437,41 @@ data Particle
|
||||
, _btDrag :: Float
|
||||
, _ptColor :: Color
|
||||
, _ptTrail :: [Point2]
|
||||
, _btPassThrough' :: Maybe Int
|
||||
, _btWidth' :: Float
|
||||
, _btTimer' :: Int
|
||||
, _btHitEffect' :: HitEffect
|
||||
, _ptCrIgnore :: Maybe Int
|
||||
, _ptWidth :: Float
|
||||
, _ptTimer :: Int
|
||||
, _ptHitEff :: HitEffect
|
||||
}
|
||||
| PtZ
|
||||
{ _ptDraw :: Particle -> Picture
|
||||
, _ptUpdate :: World -> Particle -> (World, Maybe Particle)
|
||||
, _ptVel :: Point2
|
||||
, _ptColor :: Color
|
||||
, _btPos' :: Point2
|
||||
, _btPassThrough' :: Maybe Int
|
||||
, _btWidth' :: Float
|
||||
, _btTimer' :: Int
|
||||
, _btHitEffect' :: HitEffect
|
||||
, _ptPos :: Point2
|
||||
, _ptCrIgnore :: Maybe Int
|
||||
, _ptWidth :: Float
|
||||
, _ptTimer :: Int
|
||||
, _ptHitEff :: HitEffect
|
||||
, _ptZ :: Float
|
||||
}
|
||||
| Shockwave
|
||||
{ _ptDraw :: Particle -> Picture
|
||||
, _ptUpdate :: World -> Particle -> (World, Maybe Particle)
|
||||
, _ptUpdate :: World -> Particle -> (World, Maybe Particle)
|
||||
, _ptColor :: Color
|
||||
, _btPos' :: Point2
|
||||
, _btRad' :: Float
|
||||
, _btDam' :: Int
|
||||
, _btPush' :: Float
|
||||
, _btMaxTime' :: Int
|
||||
, _btTimer' :: Int
|
||||
, _ptPos :: Point2
|
||||
, _ptRad :: Float
|
||||
, _ptDam :: Int
|
||||
, _ptPush :: Float
|
||||
, _ptMaxTime :: Int
|
||||
, _ptTimer :: Int
|
||||
}
|
||||
| ShockLine
|
||||
{ _ptDraw :: Particle -> Picture
|
||||
, _ptUpdate :: World -> Particle -> (World, Maybe Particle)
|
||||
, _ptPointDirs :: [[(Point2,Float)]]
|
||||
, _ptTimer :: Int
|
||||
, _ptColor :: Color
|
||||
, _ptCenter :: Point2
|
||||
}
|
||||
type HitEffect = Particle
|
||||
-> [(Point2, Either Creature Wall)]
|
||||
@@ -645,7 +623,7 @@ data Prop
|
||||
, _pjPayload :: Point2 -> World -> World
|
||||
, _pjTimer :: Int
|
||||
}
|
||||
| LinearShockwave
|
||||
| LinearShockwave
|
||||
{ _prDraw :: Prop -> SPic
|
||||
, _pjPos :: Point2
|
||||
, _pjID :: Int
|
||||
@@ -930,3 +908,4 @@ makeLenses ''Maybe'
|
||||
makeLenses ''InventoryMode
|
||||
makeLenses ''ItemPortage
|
||||
makeLenses ''Magnet
|
||||
makeLenses ''Gust
|
||||
|
||||
Reference in New Issue
Block a user