mirror of
https://codeberg.org/icewind/vdf-reader.git
synced 2026-06-03 10:04:08 +02:00
serde for Entry/Table/Statement/Value
This commit is contained in:
parent
6a332d051f
commit
d7d26f530a
14 changed files with 367 additions and 72 deletions
|
|
@ -9,29 +9,29 @@ expression: parsed
|
|||
"FriendsDialogSheet": {
|
||||
"FriendsClansPage": {
|
||||
"BuddyList": {
|
||||
"0_collapsed": Value("0"),
|
||||
"1_collapsed": Value("0"),
|
||||
"2_collapsed": Value("0"),
|
||||
"3_collapsed": Value("0"),
|
||||
"0_collapsed": "0",
|
||||
"1_collapsed": "0",
|
||||
"2_collapsed": "0",
|
||||
"3_collapsed": "0",
|
||||
},
|
||||
},
|
||||
"FriendsFriendsPage": {
|
||||
"BuddyList": {
|
||||
"0_collapsed": Value("0"),
|
||||
"1_collapsed": Value("0"),
|
||||
"2_collapsed": Value("0"),
|
||||
"3_collapsed": Value("0"),
|
||||
"4_collapsed": Value("0"),
|
||||
"5_collapsed": Value("0"),
|
||||
"allfriends_collapsed": Value("0"),
|
||||
"0_collapsed": "0",
|
||||
"1_collapsed": "0",
|
||||
"2_collapsed": "0",
|
||||
"3_collapsed": "0",
|
||||
"4_collapsed": "0",
|
||||
"5_collapsed": "0",
|
||||
"allfriends_collapsed": "0",
|
||||
},
|
||||
},
|
||||
},
|
||||
"FriendsState": {},
|
||||
"tall": Value("440"),
|
||||
"wide": Value("252"),
|
||||
"xpos": Value("1028"),
|
||||
"ypos": Value("280"),
|
||||
"tall": "440",
|
||||
"wide": "252",
|
||||
"xpos": "1028",
|
||||
"ypos": "280",
|
||||
},
|
||||
"Servers": {
|
||||
"DialogServerBrowser.res": {
|
||||
|
|
@ -47,10 +47,10 @@ expression: parsed
|
|||
"#ServerBrowser_Players_hidden": "0",
|
||||
"#ServerBrowser_Secure_hidden": "0",
|
||||
"#ServerBrowser_Servers_hidden": "0",
|
||||
"sort_column": Value("#ServerBrowser_Latency"),
|
||||
"sort_column_asc": Value("1"),
|
||||
"sort_column_secondary": Value(""),
|
||||
"sort_column_secondary_asc": Value("1"),
|
||||
"sort_column": "#ServerBrowser_Latency",
|
||||
"sort_column_asc": "1",
|
||||
"sort_column_secondary": "",
|
||||
"sort_column_secondary_asc": "1",
|
||||
},
|
||||
},
|
||||
"FriendsGames": {
|
||||
|
|
@ -64,10 +64,10 @@ expression: parsed
|
|||
"#ServerBrowser_Players_hidden": "0",
|
||||
"#ServerBrowser_Secure_hidden": "0",
|
||||
"#ServerBrowser_Servers_hidden": "0",
|
||||
"sort_column": Value("#ServerBrowser_Latency"),
|
||||
"sort_column_asc": Value("1"),
|
||||
"sort_column_secondary": Value(""),
|
||||
"sort_column_secondary_asc": Value("1"),
|
||||
"sort_column": "#ServerBrowser_Latency",
|
||||
"sort_column_asc": "1",
|
||||
"sort_column_secondary": "",
|
||||
"sort_column_secondary_asc": "1",
|
||||
},
|
||||
},
|
||||
"HistoryGames": {
|
||||
|
|
@ -82,10 +82,10 @@ expression: parsed
|
|||
"#ServerBrowser_Players_hidden": "0",
|
||||
"#ServerBrowser_Secure_hidden": "0",
|
||||
"#ServerBrowser_Servers_hidden": "0",
|
||||
"sort_column": Value("#ServerBrowser_LastPlayed"),
|
||||
"sort_column_asc": Value("1"),
|
||||
"sort_column_secondary": Value("#ServerBrowser_Latency"),
|
||||
"sort_column_secondary_asc": Value("1"),
|
||||
"sort_column": "#ServerBrowser_LastPlayed",
|
||||
"sort_column_asc": "1",
|
||||
"sort_column_secondary": "#ServerBrowser_Latency",
|
||||
"sort_column_secondary_asc": "1",
|
||||
},
|
||||
},
|
||||
"InternetGames": {
|
||||
|
|
@ -99,10 +99,10 @@ expression: parsed
|
|||
"#ServerBrowser_Players_hidden": "0",
|
||||
"#ServerBrowser_Secure_hidden": "0",
|
||||
"#ServerBrowser_Servers_hidden": "0",
|
||||
"sort_column": Value("#ServerBrowser_Latency"),
|
||||
"sort_column_asc": Value("1"),
|
||||
"sort_column_secondary": Value(""),
|
||||
"sort_column_secondary_asc": Value("1"),
|
||||
"sort_column": "#ServerBrowser_Latency",
|
||||
"sort_column_asc": "1",
|
||||
"sort_column_secondary": "",
|
||||
"sort_column_secondary_asc": "1",
|
||||
},
|
||||
},
|
||||
"LanGames": {
|
||||
|
|
@ -116,10 +116,10 @@ expression: parsed
|
|||
"#ServerBrowser_Players_hidden": "0",
|
||||
"#ServerBrowser_Secure_hidden": "0",
|
||||
"#ServerBrowser_Servers_hidden": "0",
|
||||
"sort_column": Value("#ServerBrowser_Latency"),
|
||||
"sort_column_asc": Value("1"),
|
||||
"sort_column_secondary": Value(""),
|
||||
"sort_column_secondary_asc": Value("1"),
|
||||
"sort_column": "#ServerBrowser_Latency",
|
||||
"sort_column_asc": "1",
|
||||
"sort_column_secondary": "",
|
||||
"sort_column_secondary_asc": "1",
|
||||
},
|
||||
},
|
||||
"SpectateGames": {
|
||||
|
|
@ -133,17 +133,17 @@ expression: parsed
|
|||
"#ServerBrowser_Players_hidden": "0",
|
||||
"#ServerBrowser_Secure_hidden": "0",
|
||||
"#ServerBrowser_Servers_hidden": "0",
|
||||
"sort_column": Value("#ServerBrowser_Latency"),
|
||||
"sort_column_asc": Value("1"),
|
||||
"sort_column_secondary": Value(""),
|
||||
"sort_column_secondary_asc": Value("1"),
|
||||
"sort_column": "#ServerBrowser_Latency",
|
||||
"sort_column_asc": "1",
|
||||
"sort_column_secondary": "",
|
||||
"sort_column_secondary_asc": "1",
|
||||
},
|
||||
},
|
||||
},
|
||||
"tall": Value("720"),
|
||||
"wide": Value("1280"),
|
||||
"xpos": Value("0"),
|
||||
"ypos": Value("0"),
|
||||
"tall": "720",
|
||||
"wide": "1280",
|
||||
"xpos": "0",
|
||||
"ypos": "0",
|
||||
},
|
||||
},
|
||||
"Steam": {
|
||||
|
|
|
|||
|
|
@ -4,13 +4,13 @@ expression: parsed
|
|||
---
|
||||
{
|
||||
"LightmappedGeneric": {
|
||||
"$baseTexture": Value("cp_mountainlab/concrete/concretefloor003"),
|
||||
"$bumpmap": Value("concrete/concretefloor007b_height-ssbump"),
|
||||
"$detail": Value("overlays/detail001"),
|
||||
"$detailblendfactor": Value("1"),
|
||||
"$detailblendmode": Value("0"),
|
||||
"$detailscale": Value("1.9"),
|
||||
"$ssbump": Value("1"),
|
||||
"%keywords": Value("tf"),
|
||||
"$baseTexture": "cp_mountainlab/concrete/concretefloor003",
|
||||
"$bumpmap": "concrete/concretefloor007b_height-ssbump",
|
||||
"$detail": "overlays/detail001",
|
||||
"$detailblendfactor": "1",
|
||||
"$detailblendmode": "0",
|
||||
"$detailscale": "1.9",
|
||||
"$ssbump": "1",
|
||||
"%keywords": "tf",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,16 +4,16 @@ expression: parsed
|
|||
---
|
||||
{
|
||||
"Resource/specificPanel.res": {
|
||||
"$envmaptint": Value(".5"),
|
||||
".5": Value(".5"),
|
||||
"\\\\\"$translucent\"": Value("1"),
|
||||
"$envmaptint": ".5",
|
||||
".5": ".5",
|
||||
"\\\\\"$translucent\"": "1",
|
||||
"array": [
|
||||
Value("1"),
|
||||
Value("2"),
|
||||
Value("3"),
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
],
|
||||
"empty": Value(""),
|
||||
"empty quoted": Value("\"\""),
|
||||
"windows_path": Value("C:\\test\\no newline"),
|
||||
"empty": "",
|
||||
"empty quoted": "\"\"",
|
||||
"windows_path": "C:\\test\\no newline",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,6 @@ source: tests/parse.rs
|
|||
expression: parsed
|
||||
---
|
||||
{
|
||||
"bar": Value("asd"),
|
||||
"foo": Value("1"),
|
||||
"bar": "asd",
|
||||
"foo": "1",
|
||||
}
|
||||
|
|
|
|||
16
tests/snapshots/serde__table__tests__data__concrete.vmt.snap
Normal file
16
tests/snapshots/serde__table__tests__data__concrete.vmt.snap
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
source: tests/serde.rs
|
||||
expression: result
|
||||
---
|
||||
{
|
||||
"LightmappedGeneric": {
|
||||
"$baseTexture": "cp_mountainlab/concrete/concretefloor003",
|
||||
"$bumpmap": "concrete/concretefloor007b_height-ssbump",
|
||||
"$detail": "overlays/detail001",
|
||||
"$detailblendfactor": "1",
|
||||
"$detailblendmode": "0",
|
||||
"$detailscale": "1.9",
|
||||
"$ssbump": "1",
|
||||
"%keywords": "tf",
|
||||
},
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
source: tests/serde.rs
|
||||
expression: result
|
||||
---
|
||||
{
|
||||
"bar": "asd",
|
||||
"foo": "1",
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue