packages feed

rattletrap 4.0.6 → 4.0.7

raw patch · 17 files changed

+141/−6 lines, 17 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

+ Rattletrap: AttributeValueStatEvent :: StatEventAttribute -> AttributeValue
+ Rattletrap: AttributeValueTitle :: TitleAttribute -> AttributeValue
+ Rattletrap: [loadoutAttributeUnknown3] :: LoadoutAttribute -> Maybe Word32le
+ Rattletrap.Decode.StatEventAttribute: decodeStatEventAttributeBits :: DecodeBits StatEventAttribute
+ Rattletrap.Decode.TitleAttribute: decodeTitleAttributeBits :: DecodeBits TitleAttribute
+ Rattletrap.Encode.StatEventAttribute: putStatEventAttribute :: StatEventAttribute -> BitPut ()
+ Rattletrap.Encode.TitleAttribute: putTitleAttribute :: TitleAttribute -> BitPut ()
+ Rattletrap.Type.AttributeType: AttributeTypeStatEvent :: AttributeType
+ Rattletrap.Type.AttributeType: AttributeTypeTitle :: AttributeType
+ Rattletrap.Type.AttributeValue: AttributeValueStatEvent :: StatEventAttribute -> AttributeValue
+ Rattletrap.Type.AttributeValue: AttributeValueTitle :: TitleAttribute -> AttributeValue
+ Rattletrap.Type.LoadoutAttribute: [loadoutAttributeUnknown3] :: LoadoutAttribute -> Maybe Word32le
+ Rattletrap.Type.StatEventAttribute: StatEventAttribute :: Bool -> Int32le -> StatEventAttribute
+ Rattletrap.Type.StatEventAttribute: [statEventAttributeObjectId] :: StatEventAttribute -> Int32le
+ Rattletrap.Type.StatEventAttribute: [statEventAttributeUnknown] :: StatEventAttribute -> Bool
+ Rattletrap.Type.StatEventAttribute: data StatEventAttribute
+ Rattletrap.Type.StatEventAttribute: instance Data.Aeson.Types.FromJSON.FromJSON Rattletrap.Type.StatEventAttribute.StatEventAttribute
+ Rattletrap.Type.StatEventAttribute: instance Data.Aeson.Types.ToJSON.ToJSON Rattletrap.Type.StatEventAttribute.StatEventAttribute
+ Rattletrap.Type.StatEventAttribute: instance GHC.Classes.Eq Rattletrap.Type.StatEventAttribute.StatEventAttribute
+ Rattletrap.Type.StatEventAttribute: instance GHC.Classes.Ord Rattletrap.Type.StatEventAttribute.StatEventAttribute
+ Rattletrap.Type.StatEventAttribute: instance GHC.Show.Show Rattletrap.Type.StatEventAttribute.StatEventAttribute
+ Rattletrap.Type.TitleAttribute: TitleAttribute :: Bool -> Bool -> Word32le -> Word32le -> Word32le -> Word32le -> Word32le -> Bool -> TitleAttribute
+ Rattletrap.Type.TitleAttribute: [titleAttributeUnknown1] :: TitleAttribute -> Bool
+ Rattletrap.Type.TitleAttribute: [titleAttributeUnknown2] :: TitleAttribute -> Bool
+ Rattletrap.Type.TitleAttribute: [titleAttributeUnknown3] :: TitleAttribute -> Word32le
+ Rattletrap.Type.TitleAttribute: [titleAttributeUnknown4] :: TitleAttribute -> Word32le
+ Rattletrap.Type.TitleAttribute: [titleAttributeUnknown5] :: TitleAttribute -> Word32le
+ Rattletrap.Type.TitleAttribute: [titleAttributeUnknown6] :: TitleAttribute -> Word32le
+ Rattletrap.Type.TitleAttribute: [titleAttributeUnknown7] :: TitleAttribute -> Word32le
+ Rattletrap.Type.TitleAttribute: [titleAttributeUnknown8] :: TitleAttribute -> Bool
+ Rattletrap.Type.TitleAttribute: data TitleAttribute
+ Rattletrap.Type.TitleAttribute: instance Data.Aeson.Types.FromJSON.FromJSON Rattletrap.Type.TitleAttribute.TitleAttribute
+ Rattletrap.Type.TitleAttribute: instance Data.Aeson.Types.ToJSON.ToJSON Rattletrap.Type.TitleAttribute.TitleAttribute
+ Rattletrap.Type.TitleAttribute: instance GHC.Classes.Eq Rattletrap.Type.TitleAttribute.TitleAttribute
+ Rattletrap.Type.TitleAttribute: instance GHC.Classes.Ord Rattletrap.Type.TitleAttribute.TitleAttribute
+ Rattletrap.Type.TitleAttribute: instance GHC.Show.Show Rattletrap.Type.TitleAttribute.TitleAttribute
- Rattletrap: LoadoutAttribute :: Word8le -> Word32le -> Word32le -> Word32le -> Word32le -> Word32le -> Word32le -> Word32le -> Maybe Word32le -> Maybe Word32le -> Maybe Word32le -> Maybe Word32le -> Maybe Word32le -> LoadoutAttribute
+ Rattletrap: LoadoutAttribute :: Word8le -> Word32le -> Word32le -> Word32le -> Word32le -> Word32le -> Word32le -> Word32le -> Maybe Word32le -> Maybe Word32le -> Maybe Word32le -> Maybe Word32le -> Maybe Word32le -> Maybe Word32le -> LoadoutAttribute
- Rattletrap.Type.LoadoutAttribute: LoadoutAttribute :: Word8le -> Word32le -> Word32le -> Word32le -> Word32le -> Word32le -> Word32le -> Word32le -> Maybe Word32le -> Maybe Word32le -> Maybe Word32le -> Maybe Word32le -> Maybe Word32le -> LoadoutAttribute
+ Rattletrap.Type.LoadoutAttribute: LoadoutAttribute :: Word8le -> Word32le -> Word32le -> Word32le -> Word32le -> Word32le -> Word32le -> Word32le -> Maybe Word32le -> Maybe Word32le -> Maybe Word32le -> Maybe Word32le -> Maybe Word32le -> Maybe Word32le -> LoadoutAttribute

Files

library/Rattletrap/Data.hs view
@@ -232,8 +232,10 @@   , ("TAGame.GameEvent_Soccar_TA:GameTime", AttributeTypeInt)   , ("TAGame.GameEvent_Soccar_TA:ReplicatedMusicStinger", AttributeTypeMusicStinger)   , ("TAGame.GameEvent_Soccar_TA:ReplicatedScoredOnTeam", AttributeTypeByte)+  , ("TAGame.GameEvent_Soccar_TA:ReplicatedStatEvent", AttributeTypeStatEvent)   , ("TAGame.GameEvent_Soccar_TA:RoundNum", AttributeTypeInt)   , ("TAGame.GameEvent_Soccar_TA:SecondsRemaining", AttributeTypeInt)+  , ("TAGame.GameEvent_Soccar_TA:SeriesLength", AttributeTypeInt)   , ("TAGame.GameEvent_Soccar_TA:SubRulesArchetype", AttributeTypeFlaggedInt)   , ("TAGame.GameEvent_SoccarPrivate_TA:MatchSettings", AttributeTypePrivateMatchSettings)   , ("TAGame.GameEvent_TA:bCanVoteToForfeit", AttributeTypeBoolean)@@ -242,6 +244,7 @@   , ("TAGame.GameEvent_TA:GameMode", AttributeTypeGameMode)   , ("TAGame.GameEvent_TA:MatchTypeClass", AttributeTypeFlaggedInt)   , ("TAGame.GameEvent_TA:ReplicatedGameStateTimeRemaining", AttributeTypeInt)+  , ("TAGame.GameEvent_TA:ReplicatedRoundCountDownNumber", AttributeTypeInt)   , ("TAGame.GameEvent_TA:ReplicatedStateIndex", AttributeTypeByte)   , ("TAGame.GameEvent_TA:ReplicatedStateName", AttributeTypeInt)   , ("TAGame.GameEvent_Team_TA:bForfeit", AttributeTypeBoolean)@@ -275,7 +278,10 @@   , ("TAGame.PRI_TA:PersistentCamera", AttributeTypeFlaggedInt)   , ("TAGame.PRI_TA:PlayerHistoryKey", AttributeTypePlayerHistoryKey)   , ("TAGame.PRI_TA:PlayerHistoryValid", AttributeTypeBoolean)+  , ("TAGame.PRI_TA:PrimaryTitle", AttributeTypeTitle)   , ("TAGame.PRI_TA:ReplicatedGameEvent", AttributeTypeFlaggedInt)+  , ("TAGame.PRI_TA:ReplicatedWorstNetQualityBeyondLatency", AttributeTypeByte)+  , ("TAGame.PRI_TA:SecondaryTitle", AttributeTypeTitle)   , ("TAGame.PRI_TA:SteeringSensitivity", AttributeTypeFloat)   , ("TAGame.PRI_TA:TimeTillItem", AttributeTypeInt)   , ("TAGame.PRI_TA:Title", AttributeTypeInt)
library/Rattletrap/Decode/AttributeValue.hs view
@@ -32,8 +32,10 @@ import Rattletrap.Decode.QWordAttribute import Rattletrap.Decode.ReservationAttribute import Rattletrap.Decode.RigidBodyStateAttribute+import Rattletrap.Decode.StatEventAttribute import Rattletrap.Decode.StringAttribute import Rattletrap.Decode.TeamPaintAttribute+import Rattletrap.Decode.TitleAttribute import Rattletrap.Decode.UniqueIdAttribute import Rattletrap.Decode.WeldedInfoAttribute import Rattletrap.Type.AttributeType@@ -103,9 +105,12 @@       AttributeValueReservation <$> decodeReservationAttributeBits version     AttributeTypeRigidBodyState ->       AttributeValueRigidBodyState <$> decodeRigidBodyStateAttributeBits+    AttributeTypeStatEvent ->+      AttributeValueStatEvent <$> decodeStatEventAttributeBits     AttributeTypeString -> AttributeValueString <$> decodeStringAttributeBits     AttributeTypeTeamPaint ->       AttributeValueTeamPaint <$> decodeTeamPaintAttributeBits+    AttributeTypeTitle -> AttributeValueTitle <$> decodeTitleAttributeBits     AttributeTypeUniqueId ->       AttributeValueUniqueId <$> decodeUniqueIdAttributeBits version     AttributeTypeWeldedInfo ->
library/Rattletrap/Decode/LoadoutAttribute.hs view
@@ -24,3 +24,4 @@     <*> decodeWhen (version >= Word8le 16) decodeWord32leBits     <*> decodeWhen (version >= Word8le 16) decodeWord32leBits     <*> decodeWhen (version >= Word8le 17) decodeWord32leBits+    <*> decodeWhen (version >= Word8le 19) decodeWord32leBits
+ library/Rattletrap/Decode/StatEventAttribute.hs view
@@ -0,0 +1,13 @@+module Rattletrap.Decode.StatEventAttribute+  ( decodeStatEventAttributeBits+  ) where++import Rattletrap.Decode.Common+import Rattletrap.Decode.Int32le+import Rattletrap.Type.StatEventAttribute++decodeStatEventAttributeBits :: DecodeBits StatEventAttribute+decodeStatEventAttributeBits =+  StatEventAttribute+    <$> getBool+    <*> decodeInt32leBits
+ library/Rattletrap/Decode/TitleAttribute.hs view
@@ -0,0 +1,19 @@+module Rattletrap.Decode.TitleAttribute+  ( decodeTitleAttributeBits+  ) where++import Rattletrap.Decode.Common+import Rattletrap.Decode.Word32le+import Rattletrap.Type.TitleAttribute++decodeTitleAttributeBits :: DecodeBits TitleAttribute+decodeTitleAttributeBits =+  TitleAttribute+    <$> getBool+    <*> getBool+    <*> decodeWord32leBits+    <*> decodeWord32leBits+    <*> decodeWord32leBits+    <*> decodeWord32leBits+    <*> decodeWord32leBits+    <*> getBool
library/Rattletrap/Encode/AttributeValue.hs view
@@ -29,8 +29,10 @@ import Rattletrap.Encode.QWordAttribute import Rattletrap.Encode.ReservationAttribute import Rattletrap.Encode.RigidBodyStateAttribute+import Rattletrap.Encode.StatEventAttribute import Rattletrap.Encode.StringAttribute import Rattletrap.Encode.TeamPaintAttribute+import Rattletrap.Encode.TitleAttribute import Rattletrap.Encode.UniqueIdAttribute import Rattletrap.Encode.WeldedInfoAttribute import Rattletrap.Type.AttributeValue@@ -66,7 +68,9 @@   AttributeValueQWord x -> putQWordAttribute x   AttributeValueReservation x -> putReservationAttribute x   AttributeValueRigidBodyState x -> putRigidBodyStateAttribute x+  AttributeValueStatEvent x -> putStatEventAttribute x   AttributeValueString x -> putStringAttribute x   AttributeValueTeamPaint x -> putTeamPaintAttribute x+  AttributeValueTitle x -> putTitleAttribute x   AttributeValueUniqueId x -> putUniqueIdAttribute x   AttributeValueWeldedInfo x -> putWeldedInfoAttribute x
library/Rattletrap/Encode/LoadoutAttribute.hs view
@@ -23,6 +23,7 @@   putOptional (loadoutAttributeTrail loadoutAttribute) putWord32Bits   putOptional (loadoutAttributeGoalExplosion loadoutAttribute) putWord32Bits   putOptional (loadoutAttributeBanner loadoutAttribute) putWord32Bits+  putOptional (loadoutAttributeUnknown3 loadoutAttribute) putWord32Bits  putOptional :: Maybe a -> (a -> BinaryBits.BitPut ()) -> BinaryBits.BitPut () putOptional m f = case m of
+ library/Rattletrap/Encode/StatEventAttribute.hs view
@@ -0,0 +1,13 @@+module Rattletrap.Encode.StatEventAttribute+  ( putStatEventAttribute+  ) where++import Rattletrap.Encode.Int32le+import Rattletrap.Type.StatEventAttribute++import qualified Data.Binary.Bits.Put as BinaryBits++putStatEventAttribute :: StatEventAttribute -> BinaryBits.BitPut ()+putStatEventAttribute statEventAttribute = do+  BinaryBits.putBool (statEventAttributeUnknown statEventAttribute)+  putInt32Bits (statEventAttributeObjectId statEventAttribute)
+ library/Rattletrap/Encode/TitleAttribute.hs view
@@ -0,0 +1,19 @@+module Rattletrap.Encode.TitleAttribute+  ( putTitleAttribute+  ) where++import Rattletrap.Encode.Word32le+import Rattletrap.Type.TitleAttribute++import qualified Data.Binary.Bits.Put as BinaryBits++putTitleAttribute :: TitleAttribute -> BinaryBits.BitPut ()+putTitleAttribute titleAttribute = do+  BinaryBits.putBool (titleAttributeUnknown1 titleAttribute)+  BinaryBits.putBool (titleAttributeUnknown2 titleAttribute)+  putWord32Bits (titleAttributeUnknown3 titleAttribute)+  putWord32Bits (titleAttributeUnknown4 titleAttribute)+  putWord32Bits (titleAttributeUnknown5 titleAttribute)+  putWord32Bits (titleAttributeUnknown6 titleAttribute)+  putWord32Bits (titleAttributeUnknown7 titleAttribute)+  BinaryBits.putBool (titleAttributeUnknown8 titleAttribute)
library/Rattletrap/Type/AttributeType.hs view
@@ -34,8 +34,10 @@   | AttributeTypeQWord   | AttributeTypeReservation   | AttributeTypeRigidBodyState+  | AttributeTypeStatEvent   | AttributeTypeString   | AttributeTypeTeamPaint+  | AttributeTypeTitle   | AttributeTypeUniqueId   | AttributeTypeWeldedInfo   deriving (Eq, Ord, Show)
library/Rattletrap/Type/AttributeValue.hs view
@@ -32,8 +32,10 @@ import Rattletrap.Type.QWordAttribute import Rattletrap.Type.ReservationAttribute import Rattletrap.Type.RigidBodyStateAttribute+import Rattletrap.Type.StatEventAttribute import Rattletrap.Type.StringAttribute import Rattletrap.Type.TeamPaintAttribute+import Rattletrap.Type.TitleAttribute import Rattletrap.Type.UniqueIdAttribute import Rattletrap.Type.WeldedInfoAttribute @@ -65,8 +67,10 @@   | AttributeValueQWord QWordAttribute   | AttributeValueReservation ReservationAttribute   | AttributeValueRigidBodyState RigidBodyStateAttribute+  | AttributeValueStatEvent StatEventAttribute   | AttributeValueString StringAttribute   | AttributeValueTeamPaint TeamPaintAttribute+  | AttributeValueTitle TitleAttribute   | AttributeValueUniqueId UniqueIdAttribute   | AttributeValueWeldedInfo WeldedInfoAttribute   deriving (Eq, Ord, Show)
library/Rattletrap/Type/LoadoutAttribute.hs view
@@ -23,6 +23,7 @@   , loadoutAttributeTrail :: Maybe Word32le   , loadoutAttributeGoalExplosion :: Maybe Word32le   , loadoutAttributeBanner :: Maybe Word32le+  , loadoutAttributeUnknown3 :: Maybe Word32le   } deriving (Eq, Ord, Show)  $(deriveJson ''LoadoutAttribute)
+ library/Rattletrap/Type/StatEventAttribute.hs view
@@ -0,0 +1,15 @@+{-# LANGUAGE TemplateHaskell #-}++module Rattletrap.Type.StatEventAttribute+  ( StatEventAttribute(..)+  ) where++import Rattletrap.Type.Common+import Rattletrap.Type.Int32le++data StatEventAttribute = StatEventAttribute+  { statEventAttributeUnknown :: Bool+  , statEventAttributeObjectId :: Int32le+  } deriving (Eq, Ord, Show)++$(deriveJson ''StatEventAttribute)
+ library/Rattletrap/Type/TitleAttribute.hs view
@@ -0,0 +1,21 @@+{-# LANGUAGE TemplateHaskell #-}++module Rattletrap.Type.TitleAttribute+  ( TitleAttribute(..)+  ) where++import Rattletrap.Type.Common+import Rattletrap.Type.Word32le++data TitleAttribute = TitleAttribute+  { titleAttributeUnknown1 :: Bool+  , titleAttributeUnknown2 :: Bool+  , titleAttributeUnknown3 :: Word32le+  , titleAttributeUnknown4 :: Word32le+  , titleAttributeUnknown5 :: Word32le+  , titleAttributeUnknown6 :: Word32le+  , titleAttributeUnknown7 :: Word32le+  , titleAttributeUnknown8 :: Bool+  } deriving (Eq, Ord, Show)++$(deriveJson ''TitleAttribute)
package.yaml view
@@ -1,5 +1,5 @@ name: rattletrap-version: 4.0.6+version: 4.0.7  category: Game description: Rattletrap parses and generates Rocket League replays.@@ -29,6 +29,7 @@   text: '>= 1.2.3 && < 1.3'   transformers: '>= 0.5.2 && < 0.6' ghc-options:+  - -optP -Wno-nonportable-include-path # https://github.com/haskell/cabal/issues/4739   - -Weverything   - -Wno-implicit-prelude   - -Wno-missing-import-lists
rattletrap.cabal view
@@ -2,10 +2,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 3efcb239df0220707c5c504915148f31ca35e35cbc60839eded9c1863d47855c+-- hash: 506b00a9786db5c66b3f6cad1c14a655db6095b51be068ee1373ef7b5ca563cd  name:           rattletrap-version:        4.0.6+version:        4.0.7 synopsis:       Parse and generate Rocket League replays. description:    Rattletrap parses and generates Rocket League replays. category:       Game@@ -30,7 +30,7 @@ library   hs-source-dirs:       library-  ghc-options: -Weverything -Wno-implicit-prelude -Wno-missing-import-lists -Wno-safe -Wno-unsafe+  ghc-options: -optP -Wno-nonportable-include-path -Weverything -Wno-implicit-prelude -Wno-missing-import-lists -Wno-safe -Wno-unsafe   build-depends:       aeson >=1.2.4 && <1.3     , aeson-pretty >=0.8.5 && <0.9@@ -108,9 +108,11 @@       Rattletrap.Decode.RigidBodyStateAttribute       Rattletrap.Decode.Section       Rattletrap.Decode.SpawnedReplication+      Rattletrap.Decode.StatEventAttribute       Rattletrap.Decode.Str       Rattletrap.Decode.StringAttribute       Rattletrap.Decode.TeamPaintAttribute+      Rattletrap.Decode.TitleAttribute       Rattletrap.Decode.UniqueIdAttribute       Rattletrap.Decode.UpdatedReplication       Rattletrap.Decode.Vector@@ -176,9 +178,11 @@       Rattletrap.Encode.RigidBodyStateAttribute       Rattletrap.Encode.Section       Rattletrap.Encode.SpawnedReplication+      Rattletrap.Encode.StatEventAttribute       Rattletrap.Encode.Str       Rattletrap.Encode.StringAttribute       Rattletrap.Encode.TeamPaintAttribute+      Rattletrap.Encode.TitleAttribute       Rattletrap.Encode.UniqueIdAttribute       Rattletrap.Encode.UpdatedReplication       Rattletrap.Encode.Vector@@ -247,9 +251,11 @@       Rattletrap.Type.RigidBodyStateAttribute       Rattletrap.Type.Section       Rattletrap.Type.SpawnedReplication+      Rattletrap.Type.StatEventAttribute       Rattletrap.Type.Str       Rattletrap.Type.StringAttribute       Rattletrap.Type.TeamPaintAttribute+      Rattletrap.Type.TitleAttribute       Rattletrap.Type.UniqueIdAttribute       Rattletrap.Type.UpdatedReplication       Rattletrap.Type.Vector@@ -268,7 +274,7 @@   main-is: Main.hs   hs-source-dirs:       executables-  ghc-options: -Weverything -Wno-implicit-prelude -Wno-missing-import-lists -Wno-safe -Wno-unsafe -rtsopts -threaded+  ghc-options: -optP -Wno-nonportable-include-path -Weverything -Wno-implicit-prelude -Wno-missing-import-lists -Wno-safe -Wno-unsafe -rtsopts -threaded   build-depends:       aeson >=1.2.4 && <1.3     , aeson-pretty >=0.8.5 && <0.9@@ -293,7 +299,7 @@   main-is: Main.hs   hs-source-dirs:       tests-  ghc-options: -Weverything -Wno-implicit-prelude -Wno-missing-import-lists -Wno-safe -Wno-unsafe -rtsopts -threaded+  ghc-options: -optP -Wno-nonportable-include-path -Weverything -Wno-implicit-prelude -Wno-missing-import-lists -Wno-safe -Wno-unsafe -rtsopts -threaded   build-depends:       HUnit >=1.6.0 && <1.7     , aeson >=1.2.4 && <1.3
tests/Main.hs view
@@ -80,11 +80,14 @@   , ("6f7c", "a map with numbers")   , ("7083", "weird basketball capitalization")   , ("7109", "a boost modifier")+  , ("75ce", "primary and secondary titles")   , ("7bf6", "an online loadouts attribute")   , ("89cb", "remote user data")   , ("8ae5", "new painted items")+  , ("946f", "patch 1.43")   , ("9704", "a batarang")   , ("98e5", "a player using behind view")+  , ("a09e", "a tournament")   , ("a128", "a round count down")   , ("a52f", "some more mutators")   , ("a558", "extended explosion data")@@ -98,6 +101,7 @@   , ("d044", "hoops mutators")   , ("d428", "a private hockey match")   , ("d7fb", "an explosion attribute")+  , ("db70", "new lag indicator")   , ("dcb3", "a pawn type attribute")   , ("de56", "a problematic product attribute")   , ("eae3", "an actor/object ID collision")