Skip to content

Commit

Permalink
Update 1.2.0 加入了数据库
Browse files Browse the repository at this point in the history
  • Loading branch information
1242509682 committed Nov 23, 2024
1 parent 6fe821d commit 69bb67e
Show file tree
Hide file tree
Showing 15 changed files with 228 additions and 67 deletions.
Binary file modified .vs/AutoAirItem/DesignTimeBuild/.dtbcache.v2
Binary file not shown.
Binary file modified .vs/AutoAirItem/v17/.futdcache.v2
Binary file not shown.
31 changes: 18 additions & 13 deletions .vs/AutoAirItem/v17/DocumentLayout.backup.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
"Version": 1,
"WorkspaceRootPath": "D:\\\u6E38\u620F\\Terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011AutoAirItem v1.1.6\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{0EC057F9-C96B-4A85-ACA2-2DFDE9875E4D}|AutoAirItem.csproj|d:\\\u6E38\u620F\\terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011autoairitem v1.1.6\\readme.md||{EFC0BB08-EA7D-40C6-A696-C870411A895B}",
"RelativeMoniker": "D:0:0:{0EC057F9-C96B-4A85-ACA2-2DFDE9875E4D}|AutoAirItem.csproj|solutionrelative:readme.md||{EFC0BB08-EA7D-40C6-A696-C870411A895B}"
},
{
"AbsoluteMoniker": "D:0:0:{0EC057F9-C96B-4A85-ACA2-2DFDE9875E4D}|AutoAirItem.csproj|d:\\\u6E38\u620F\\terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011autoairitem v1.1.6\\autoairitem.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{0EC057F9-C96B-4A85-ACA2-2DFDE9875E4D}|AutoAirItem.csproj|solutionrelative:autoairitem.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
Expand All @@ -17,10 +21,6 @@
{
"AbsoluteMoniker": "D:0:0:{0EC057F9-C96B-4A85-ACA2-2DFDE9875E4D}|AutoAirItem.csproj|d:\\\u6E38\u620F\\terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011autoairitem v1.1.6\\mydata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{0EC057F9-C96B-4A85-ACA2-2DFDE9875E4D}|AutoAirItem.csproj|solutionrelative:mydata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{0EC057F9-C96B-4A85-ACA2-2DFDE9875E4D}|AutoAirItem.csproj|d:\\\u6E38\u620F\\terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011autoairitem v1.1.6\\readme.md||{EFC0BB08-EA7D-40C6-A696-C870411A895B}",
"RelativeMoniker": "D:0:0:{0EC057F9-C96B-4A85-ACA2-2DFDE9875E4D}|AutoAirItem.csproj|solutionrelative:readme.md||{EFC0BB08-EA7D-40C6-A696-C870411A895B}"
}
],
"DocumentGroupContainers": [
Expand All @@ -30,15 +30,19 @@
"DocumentGroups": [
{
"DockedWidth": 374,
"SelectedChildIndex": 5,
"SelectedChildIndex": 3,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:129:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
},
{
"$type": "Document",
"DocumentIndex": 3,
"DocumentIndex": 4,
"Title": "MyData.cs",
"DocumentMoniker": "D:\\\u6E38\u620F\\Terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011AutoAirItem v1.1.6\\MyData.cs",
"RelativeDocumentMoniker": "MyData.cs",
Expand All @@ -50,19 +54,20 @@
},
{
"$type": "Document",
"DocumentIndex": 4,
"DocumentIndex": 0,
"Title": "README.md",
"DocumentMoniker": "D:\\\u6E38\u620F\\Terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011AutoAirItem v1.1.6\\README.md",
"RelativeDocumentMoniker": "README.md",
"ToolTip": "D:\\\u6E38\u620F\\Terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011AutoAirItem v1.1.6\\README.md",
"RelativeToolTip": "README.md",
"ViewState": "AgIAAAAAAAAAAAAAAAAAABMAAAAAAAAAAAAAAA==",
"ViewState": "AgIAAAAAAAAAAAAAAAAAABIAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001818|",
"WhenOpened": "2024-10-31T13:12:26.842Z"
"WhenOpened": "2024-10-31T13:12:26.842Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 2,
"DocumentIndex": 3,
"Title": "Configuration.cs",
"DocumentMoniker": "D:\\\u6E38\u620F\\Terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011AutoAirItem v1.1.6\\Configuration.cs",
"RelativeDocumentMoniker": "Configuration.cs",
Expand All @@ -74,7 +79,7 @@
},
{
"$type": "Document",
"DocumentIndex": 1,
"DocumentIndex": 2,
"Title": "Commands.cs",
"DocumentMoniker": "D:\\\u6E38\u620F\\Terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011AutoAirItem v1.1.6\\Commands.cs",
"RelativeDocumentMoniker": "Commands.cs",
Expand All @@ -87,13 +92,13 @@
},
{
"$type": "Document",
"DocumentIndex": 0,
"DocumentIndex": 1,
"Title": "AutoAirItem.cs",
"DocumentMoniker": "D:\\\u6E38\u620F\\Terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011AutoAirItem v1.1.6\\AutoAirItem.cs",
"RelativeDocumentMoniker": "AutoAirItem.cs",
"ToolTip": "D:\\\u6E38\u620F\\Terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011AutoAirItem v1.1.6\\AutoAirItem.cs",
"RelativeToolTip": "AutoAirItem.cs",
"ViewState": "AgIAAIsAAAAAAAAAAAAmwKsAAAAkAAAAAAAAAA==",
"ViewState": "AgIAAAUAAAAAAAAAAAAgwK0AAAAOAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-23T00:17:38.457Z",
"EditorCaption": ""
Expand Down
61 changes: 24 additions & 37 deletions .vs/AutoAirItem/v17/DocumentLayout.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
{
"Version": 1,
"WorkspaceRootPath": "D:\\\u6E38\u620F\\Terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011AutoAirItem v1.1.6\\",
"WorkspaceRootPath": "D:\\\u6E38\u620F\\Terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011AutoAirItem v1.1.7\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{0EC057F9-C96B-4A85-ACA2-2DFDE9875E4D}|AutoAirItem.csproj|d:\\\u6E38\u620F\\terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011autoairitem v1.1.6\\autoairitem.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{0EC057F9-C96B-4A85-ACA2-2DFDE9875E4D}|AutoAirItem.csproj|solutionrelative:autoairitem.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
"AbsoluteMoniker": "D:0:0:{0EC057F9-C96B-4A85-ACA2-2DFDE9875E4D}|AutoAirItem.csproj|d:\\\u6E38\u620F\\terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011autoairitem v1.1.7\\readme.md||{EFC0BB08-EA7D-40C6-A696-C870411A895B}",
"RelativeMoniker": "D:0:0:{0EC057F9-C96B-4A85-ACA2-2DFDE9875E4D}|AutoAirItem.csproj|solutionrelative:readme.md||{EFC0BB08-EA7D-40C6-A696-C870411A895B}"
},
{
"AbsoluteMoniker": "D:0:0:{0EC057F9-C96B-4A85-ACA2-2DFDE9875E4D}|AutoAirItem.csproj|d:\\\u6E38\u620F\\terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011autoairitem v1.1.6\\commands.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"AbsoluteMoniker": "D:0:0:{0EC057F9-C96B-4A85-ACA2-2DFDE9875E4D}|AutoAirItem.csproj|d:\\\u6E38\u620F\\terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011autoairitem v1.1.7\\commands.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{0EC057F9-C96B-4A85-ACA2-2DFDE9875E4D}|AutoAirItem.csproj|solutionrelative:commands.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{0EC057F9-C96B-4A85-ACA2-2DFDE9875E4D}|AutoAirItem.csproj|d:\\\u6E38\u620F\\terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011autoairitem v1.1.6\\configuration.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"AbsoluteMoniker": "D:0:0:{0EC057F9-C96B-4A85-ACA2-2DFDE9875E4D}|AutoAirItem.csproj|d:\\\u6E38\u620F\\terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011autoairitem v1.1.7\\configuration.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{0EC057F9-C96B-4A85-ACA2-2DFDE9875E4D}|AutoAirItem.csproj|solutionrelative:configuration.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{0EC057F9-C96B-4A85-ACA2-2DFDE9875E4D}|AutoAirItem.csproj|d:\\\u6E38\u620F\\terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011autoairitem v1.1.6\\mydata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"AbsoluteMoniker": "D:0:0:{0EC057F9-C96B-4A85-ACA2-2DFDE9875E4D}|AutoAirItem.csproj|d:\\\u6E38\u620F\\terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011autoairitem v1.1.7\\mydata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{0EC057F9-C96B-4A85-ACA2-2DFDE9875E4D}|AutoAirItem.csproj|solutionrelative:mydata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{0EC057F9-C96B-4A85-ACA2-2DFDE9875E4D}|AutoAirItem.csproj|d:\\\u6E38\u620F\\terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011autoairitem v1.1.6\\readme.md||{EFC0BB08-EA7D-40C6-A696-C870411A895B}",
"RelativeMoniker": "D:0:0:{0EC057F9-C96B-4A85-ACA2-2DFDE9875E4D}|AutoAirItem.csproj|solutionrelative:readme.md||{EFC0BB08-EA7D-40C6-A696-C870411A895B}"
}
],
"DocumentGroupContainers": [
Expand All @@ -30,43 +26,48 @@
"DocumentGroups": [
{
"DockedWidth": 374,
"SelectedChildIndex": 5,
"SelectedChildIndex": 3,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:129:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
},
{
"$type": "Document",
"DocumentIndex": 3,
"Title": "MyData.cs",
"DocumentMoniker": "D:\\\u6E38\u620F\\Terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011AutoAirItem v1.1.6\\MyData.cs",
"DocumentMoniker": "D:\\\u6E38\u620F\\Terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011AutoAirItem v1.1.7\\MyData.cs",
"RelativeDocumentMoniker": "MyData.cs",
"ToolTip": "D:\\\u6E38\u620F\\Terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011AutoAirItem v1.1.6\\MyData.cs",
"ToolTip": "D:\\\u6E38\u620F\\Terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011AutoAirItem v1.1.7\\MyData.cs",
"RelativeToolTip": "MyData.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAIAAAANAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-11-03T01:14:22.302Z"
},
{
"$type": "Document",
"DocumentIndex": 4,
"DocumentIndex": 0,
"Title": "README.md",
"DocumentMoniker": "D:\\\u6E38\u620F\\Terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011AutoAirItem v1.1.6\\README.md",
"DocumentMoniker": "D:\\\u6E38\u620F\\Terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011AutoAirItem v1.1.7\\README.md",
"RelativeDocumentMoniker": "README.md",
"ToolTip": "D:\\\u6E38\u620F\\Terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011AutoAirItem v1.1.6\\README.md",
"ToolTip": "D:\\\u6E38\u620F\\Terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011AutoAirItem v1.1.7\\README.md",
"RelativeToolTip": "README.md",
"ViewState": "AgIAAAAAAAAAAAAAAAAAABMAAAAAAAAAAAAAAA==",
"ViewState": "AgIAAAAAAAAAAAAAAAAAABIAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001818|",
"WhenOpened": "2024-10-31T13:12:26.842Z"
"WhenOpened": "2024-10-31T13:12:26.842Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "Configuration.cs",
"DocumentMoniker": "D:\\\u6E38\u620F\\Terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011AutoAirItem v1.1.6\\Configuration.cs",
"DocumentMoniker": "D:\\\u6E38\u620F\\Terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011AutoAirItem v1.1.7\\Configuration.cs",
"RelativeDocumentMoniker": "Configuration.cs",
"ToolTip": "D:\\\u6E38\u620F\\Terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011AutoAirItem v1.1.6\\Configuration.cs",
"ToolTip": "D:\\\u6E38\u620F\\Terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011AutoAirItem v1.1.7\\Configuration.cs",
"RelativeToolTip": "Configuration.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAwAAAAqAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
Expand All @@ -76,27 +77,13 @@
"$type": "Document",
"DocumentIndex": 1,
"Title": "Commands.cs",
"DocumentMoniker": "D:\\\u6E38\u620F\\Terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011AutoAirItem v1.1.6\\Commands.cs",
"DocumentMoniker": "D:\\\u6E38\u620F\\Terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011AutoAirItem v1.1.7\\Commands.cs",
"RelativeDocumentMoniker": "Commands.cs",
"ToolTip": "D:\\\u6E38\u620F\\Terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011AutoAirItem v1.1.6\\Commands.cs",
"ToolTip": "D:\\\u6E38\u620F\\Terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011AutoAirItem v1.1.7\\Commands.cs",
"RelativeToolTip": "Commands.cs",
"ViewState": "AgIAANoAAAAAAAAAAAAAAOYAAAAdAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-30T18:40:42.79Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "AutoAirItem.cs",
"DocumentMoniker": "D:\\\u6E38\u620F\\Terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011AutoAirItem v1.1.6\\AutoAirItem.cs",
"RelativeDocumentMoniker": "AutoAirItem.cs",
"ToolTip": "D:\\\u6E38\u620F\\Terraria\\\u670D\u52A1\u5668\\\u63D2\u4EF6\u6E90\u7801\\\u3010\u81EA\u52A8\u5783\u573E\u6876\u6E90\u7801\u3011AutoAirItem v1.1.6\\AutoAirItem.cs",
"RelativeToolTip": "AutoAirItem.cs",
"ViewState": "AgIAAAUAAAAAAAAAAAAgwK0AAAAOAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-23T00:17:38.457Z",
"EditorCaption": ""
"WhenOpened": "2024-10-30T18:40:42.79Z"
}
]
}
Expand Down
Binary file not shown.
Binary file removed .vs/ProjectEvaluation/autoairitem.metadata.v9.bin
Binary file not shown.
Binary file not shown.
Binary file removed .vs/ProjectEvaluation/autoairitem.projects.v9.bin
Binary file not shown.
Binary file modified .vs/ProjectEvaluation/autoairitem.strings.v9.bin
Binary file not shown.
46 changes: 36 additions & 10 deletions AutoAirItem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Terraria;
using Microsoft.Data.Sqlite;
using Terraria;
using Terraria.ID;
using TerrariaApi.Server;
using TShockAPI;
Expand All @@ -12,20 +13,30 @@ public class AutoAirItem : TerrariaPlugin
#region 插件信息
public override string Name => "自动垃圾桶";
public override string Author => "羽学";
public override Version Version => new Version(1, 1, 7);
public override string Description => "涡轮增压不蒸鸭";
public override Version Version => new Version(1, 2, 0);
public override string Description => "自动垃圾桶";
#endregion

#region 注册与释放
public AutoAirItem(Main game) : base(game) { }
#region 实例变量
public static Database DB = new Database(new SqliteConnection("Data Source=" + Database.Path));
internal static Configuration Config = new();
internal static MyData Data = new();
#endregion

#region 注册与释放
public AutoAirItem(Main game) : base(game) { }
public override void Initialize()
{
LoadConfig();

if (Config.Db)
{
LoadAllPlayerData(); // 加载所有玩家的数据
}

GeneralHooks.ReloadEvent += ReloadConfig;
GetDataHandlers.PlayerUpdate.Register(this.OnPlayerUpdate);
ServerApi.Hooks.ServerJoin.Register(this, this.OnJoin);
ServerApi.Hooks.NetGreetPlayer.Register(this, this.OnGreetPlayer);
TShockAPI.Commands.ChatCommands.Add(new Command("AutoAir.use", Commands.AirCmd, "air", "垃圾"));
TShockAPI.Commands.ChatCommands.Add(new Command("AutoAir.admin", Commands.Reset, "airreset", "重置垃圾桶"));
}
Expand All @@ -36,7 +47,7 @@ protected override void Dispose(bool disposing)
{
GeneralHooks.ReloadEvent -= ReloadConfig;
GetDataHandlers.PlayerUpdate.UnRegister(this.OnPlayerUpdate);
ServerApi.Hooks.ServerJoin.Deregister(this, this.OnJoin);
ServerApi.Hooks.NetGreetPlayer.Deregister(this, this.OnGreetPlayer);
TShockAPI.Commands.ChatCommands.RemoveAll(x => x.CommandDelegate == Commands.AirCmd);
TShockAPI.Commands.ChatCommands.RemoveAll(x => x.CommandDelegate == Commands.Reset);
}
Expand All @@ -57,8 +68,19 @@ private static void LoadConfig()
}
#endregion

#region 玩家更新配置方法(创建配置结构)
private void OnJoin(JoinEventArgs args)
#region 加载所有玩家数据
private void LoadAllPlayerData()
{
var All = DB.LoadData();
foreach (var data in All)
{
Data.Items.Add(data);
}
}
#endregion

#region 创建玩家数据方法
private void OnGreetPlayer(GreetPlayerEventArgs args)
{
if (args == null || !Config.Open)
{
Expand All @@ -75,7 +97,7 @@ private void OnJoin(JoinEventArgs args)
// 如果玩家不在数据表中,则创建新的数据条目
if (!Data.Items.Any(item => item.Name == plr.Name))
{
Data.Items.Add(new MyData.ItemData()
Data.Items.Add(new MyData.PlayerData()
{
Name = plr.Name,
Enabled = true,
Expand All @@ -84,6 +106,8 @@ private void OnJoin(JoinEventArgs args)
ItemType = new List<int>(),
DelItem = new Dictionary<int, int> { { 0, 0 }, }
});

DB.CreateData(plr.Name);
}
}
#endregion
Expand Down Expand Up @@ -151,6 +175,8 @@ private void OnPlayerUpdate(object? sender, GetDataHandlers.PlayerUpdateEventArg
plr.SendData(PacketTypes.PlayerSlot, "", plr.Index, PlayerItemSlotID.Inventory0 + i);
}
}

DB.UpdateData(list); //更新数据库
}
}
#endregion
Expand Down
Loading

0 comments on commit 69bb67e

Please sign in to comment.