rattletrap 6.1.0 → 6.2.0
raw patch · 6 files changed
+10/−3 lines, 6 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Rattletrap.Type.ProductAttribute: ProductAttributeValueSpecialEdition :: Word32 -> ProductAttributeValue
Files
- library/Rattletrap/Decode/ProductAttribute.hs +4/−0
- library/Rattletrap/Encode/ProductAttribute.hs +1/−0
- library/Rattletrap/Type/ProductAttribute.hs +1/−0
- package.yaml +1/−1
- rattletrap.cabal +2/−2
- tests/Main.hs +1/−0
library/Rattletrap/Decode/ProductAttribute.hs view
@@ -35,6 +35,7 @@ let maybeObjectName = Map.lookup objectId objectMap value <- case fromStr <$> maybeObjectName of Just "TAGame.ProductAttribute_Painted_TA" -> decodePainted version+ Just "TAGame.ProductAttribute_SpecialEdition_TA" -> decodeSpecialEdition Just "TAGame.ProductAttribute_TitleID_TA" -> decodeTitle Just "TAGame.ProductAttribute_UserColor_TA" -> decodeColor version Just objectName ->@@ -46,6 +47,9 @@ ) Nothing -> fail ("missing object name for ID " <> show objectId) pure (ProductAttribute flag objectId maybeObjectName value)++decodeSpecialEdition :: DecodeBits ProductAttributeValue+decodeSpecialEdition = ProductAttributeValueSpecialEdition <$> getWord32be 31 decodePainted :: (Int, Int, Int) -> DecodeBits ProductAttributeValue decodePainted version = if version >= (868, 18, 0)
library/Rattletrap/Encode/ProductAttribute.hs view
@@ -25,6 +25,7 @@ case productAttributeValue attribute of ProductAttributeValuePaintedOld x -> putCompressedWord x ProductAttributeValuePaintedNew x -> BinaryBits.putWord32be 31 x+ ProductAttributeValueSpecialEdition x -> BinaryBits.putWord32be 31 x ProductAttributeValueUserColorOld x -> case x of Nothing -> BinaryBits.putBool False Just y -> do
library/Rattletrap/Type/ProductAttribute.hs view
@@ -14,6 +14,7 @@ data ProductAttributeValue = ProductAttributeValuePaintedOld CompressedWord | ProductAttributeValuePaintedNew Word32+ | ProductAttributeValueSpecialEdition Word32 | ProductAttributeValueUserColorOld (Maybe Word32) | ProductAttributeValueUserColorNew Word32le | ProductAttributeValueTitleId Str
package.yaml view
@@ -1,5 +1,5 @@ name: rattletrap-version: 6.1.0+version: 6.2.0 category: Game description: Rattletrap parses and generates Rocket League replays.
rattletrap.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: e44066bb6822553d7fde67c4f7450b604aa5bf73e01d840b240bae5161a5d176+-- hash: 4f54574900746b808a6fd145bb2d35d31a08e94bda7873189f38db0ce866bd55 name: rattletrap-version: 6.1.0+version: 6.2.0 synopsis: Parse and generate Rocket League replays. description: Rattletrap parses and generates Rocket League replays. category: Game
tests/Main.hs view
@@ -137,6 +137,7 @@ , ("6f7c", "a map with numbers") , ("7083", "weird basketball capitalization") , ("7109", "a boost modifier")+ , ("7256", "special edition") , ("75ce", "primary and secondary titles") , ("7bf6", "an online loadouts attribute") , ("89cb", "remote user data")