From ea0eed03e218324dfec9fe8ea7a7b52dfce959cf Mon Sep 17 00:00:00 2001 From: OrekiWoof Date: Sun, 15 Mar 2026 21:28:29 +0100 Subject: [PATCH] add readme, update ways to run --- .timetracker | 47 ++++++++++++++++++- .vscode/launch.json | 17 +------ .vscode/tasks.json | 16 ++++--- ChestPreview/ChestPreview/ChestPreview.csproj | 9 ++-- readme.md | 32 +++++++++++++ 5 files changed, 96 insertions(+), 25 deletions(-) create mode 100644 readme.md diff --git a/.timetracker b/.timetracker index f66f816..a35cccf 100644 --- a/.timetracker +++ b/.timetracker @@ -1,5 +1,5 @@ { - "total": 56092, + "total": 66247, "sessions": [ { "begin": "2026-03-11T23:50:47+01:00", @@ -20,6 +20,51 @@ "begin": "2026-03-14T16:53:26+01:00", "end": "2026-03-14T17:36:35+01:00", "duration": 2589 + }, + { + "begin": "2026-03-15T14:05:14+01:00", + "end": "2026-03-15T14:07:31+01:00", + "duration": 136 + }, + { + "begin": "2026-03-15T14:07:37+01:00", + "end": "2026-03-15T14:10:04+01:00", + "duration": 146 + }, + { + "begin": "2026-03-15T14:10:10+01:00", + "end": "2026-03-15T14:30:11+01:00", + "duration": 1201 + }, + { + "begin": "2026-03-15T14:58:59+01:00", + "end": "2026-03-15T15:35:46+01:00", + "duration": 2207 + }, + { + "begin": "2026-03-15T15:55:03+01:00", + "end": "2026-03-15T15:56:54+01:00", + "duration": 111 + }, + { + "begin": "2026-03-15T16:11:45+01:00", + "end": "2026-03-15T16:45:08+01:00", + "duration": 1719 + }, + { + "begin": "2026-03-15T17:28:55+01:00", + "end": "2026-03-15T17:49:07+01:00", + "duration": 1212 + }, + { + "begin": "2026-03-15T18:06:10+01:00", + "end": "2026-03-15T18:38:52+01:00", + "duration": 1611 + }, + { + "begin": "2026-03-15T20:33:08+01:00", + "end": "2026-03-15T20:53:09+01:00", + "duration": 1201 } ] } \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index 3596cb1..ae35258 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -3,22 +3,9 @@ "configurations": [ { "name": "Vintage Story Client", - "type": "coreclr", + "type": "dotnet", "request": "launch", - "preLaunchTask": "build mod", - "program": "${env:VINTAGE_STORY}/Vintagestory.dll", - "args": [ - "--tracelog", - "--dataPath", - "${env:VINTAGE_STORY_DATA}", - "--addModPath", - "${workspaceFolder}/ChestPreview/ChestPreview/bin/Debug/Mods", - "--addOrigin", - "${workspaceFolder}/ChestPreview/ChestPreview/assets" - ], - "cwd": "${env:VINTAGE_STORY}", - "console": "integratedTerminal", - "stopAtEntry": false + "projectPath": "${workspaceFolder}/ChestPreview/ChestPreview/ChestPreview.csproj" } ] } \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 80173e6..e464cad 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -16,20 +16,24 @@ "type": "process", "dependsOn": ["check env"], "dependsOrder": "sequence", - "options": { - "env": { - "VINTAGE_STORY": "${env:VINTAGE_STORY}" - } - }, "args": [ "build", "${workspaceFolder}/ChestPreview/ChestPreview/ChestPreview.csproj", "-c", - "Debug", + "${input:buildConfig}", "/property:GenerateFullPaths=true", "/consoleloggerparameters:NoSummary;ForceNoAlign" ], "problemMatcher": "$msCompile" } + ], + "inputs": [ + { + "id": "buildConfig", + "type": "pickString", + "description": "Build configuration", + "options": ["Debug", "Release", "Version22"], + "default": "Debug" + } ] } \ No newline at end of file diff --git a/ChestPreview/ChestPreview/ChestPreview.csproj b/ChestPreview/ChestPreview/ChestPreview.csproj index d43b131..80225f8 100644 --- a/ChestPreview/ChestPreview/ChestPreview.csproj +++ b/ChestPreview/ChestPreview/ChestPreview.csproj @@ -6,7 +6,6 @@ bin\$(Configuration)\Mods\mod enable Debug;Release;Version22 - $([System.Environment]::GetEnvironmentVariable('VS_CONFIGLIB')) true $(DefineConstants);CONFIGLIB @@ -14,8 +13,12 @@ net10.0 - $(VINTAGE_STORY_22PRE2) - --dataPath "..\VintageStory22Data" + $(VINTAGE_STORY_22) + $(VINTAGE_STORY_DATA_22) + + + + --dataPath "$(VINTAGE_STORY_DATA)" diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..5bb8eec --- /dev/null +++ b/readme.md @@ -0,0 +1,32 @@ +# ChestPreview + +## Requirements for the solution + +- .NET 8 SDK for 1.21 +- .NET 10 SDK when building `Version22` for 1.22 +- Vintage Story install - 1.21 or 1.22, with environment variables describing the paths. +- env vars described below + +### Required env vars + +- `VINTAGE_STORY`: path to the 1.21 game install (on Windows default is %appdata%/VintageStory) +- `VINTAGE_STORY_DATA`: path to the 1.21 game data directory (on Windows default is %appdata%/VintageStoryData) +- `VINTAGE_STORY_22`: for 1.22 (`Version22` configuration) +- `VINTAGE_STORY_DATA_22`: for 1.22 (`Version22` configuration) +- `VS_CONFIGLIB`: path to `configlib.dll`. If not set, will compile with a warning and without configlib support + +## Running + +If you know what you're doing, `dotnet build` etc obviously will work. This was created with the official mod template. + +### VS Code with `C# Dev Kit` extension + +- select appropriate solution configuration: `F1` (run command) -> `.NET: Select a configuration` +- for 1.21 select `Debug` or `Release`, for 1.22 select `Version22` +- run action `Start debugging` or `Start without debugging` (might be `f5` and `ctrl+f5` by default). + +### Visual Studio + +- use configuration picker at the top - `Debug` or `Release` for 1.21, `Version22` for 1.22 +- set ChestPreview project as the startup project +- run \ No newline at end of file