diff --git a/Program.cs b/Program.cs index e349508..161ee7d 100644 --- a/Program.cs +++ b/Program.cs @@ -24,8 +24,21 @@ public static void chapter1() string speed = _jsonData[0]["TextSpeed"].ToString(); int textspeed = Convert.ToInt32(speed); //TextTool.textGen("enter smt",1 /*text speed*/, true /*clear console*/, true /*add press continue*/, 1 /*delay after text complete*/); - TextTool.TextGen("This is chapter 1 test text", textspeed, true, true); - FileTool.SaveChaper("save1-1", "save", 1, 1, true); + TextTool.TextGen("This is chapter 1 test text", textspeed, true); + string choose = FileTool.ChoiceRoute("Do you like this game?", "Yes", "Kinda", "No"); + if (choose == "1") + { + FileTool.SaveChaper("save1-1", "save", 1, 1, true); + } + if (choose == "2") + { + FileTool.SaveChaper("save1-2", "save", 1, 2, true); + } + if (choose == "3") + { + TextTool.TextGen(":(", textspeed, true, true); + FileTool.SaveChaper("save1-3", "save", 1, 3, true); + } } public static void chapter2() { @@ -33,8 +46,21 @@ public static void chapter2() JsonNode _jsonData = Settings.Read()!; string speed = _jsonData[0]["TextSpeed"].ToString(); int textspeed = Convert.ToInt32(speed); - TextTool.TextGen("This is chapter 2 test text", textspeed, true, true); - FileTool.SaveChaper("save2-1", "save", 2, 1, true); + TextTool.TextGen("This is chapter 2 test text", textspeed, true); + string choose = FileTool.ChoiceRoute("Rate this game", "Like", "Normal", "Hate"); + if (choose == "1") + { + FileTool.SaveChaper("save2-1", "save", 2, 1, true); + } + if (choose == "2") + { + FileTool.SaveChaper("save2-2", "save", 2, 2, true); + } + if (choose == "3") + { + TextTool.TextGen("Fine", textspeed, true, true); + FileTool.SaveChaper("save2-3", "save", 2, 3, true); + } } } class Menu @@ -55,7 +81,7 @@ static void Main(string[] args) Console.Clear(); //Main menu Console.WriteLine("======================================================="); - Console.WriteLine(" A Text-base game name(Can't think of name just yet)\n\t1 New Game\n\t2 Load\n\t3 Quick Load\n\t4 Settings\n\t5 Guide\n\t6 Credits\n\t7 Update\n\n\t9 Exit\t\t\t\t0.0.4"); + Console.WriteLine(" A Text-base game name(Can't think of name just yet)\n\t1 New Game\n\t2 Load\n\t3 Quick Load\n\t4 Settings\n\t5 Guide\n\t6 Credits\n\t7 Update\n\n\t9 Exit\t\t\t\t0.0.43"); Console.WriteLine("======================================================="); TextTool.TextGen("Key command -=>", textspeed); string inPut = Console.ReadLine(); @@ -501,7 +527,7 @@ public static void SaveChaper(string filename, string path, int chapter, int rou File.WriteAllText(Path.Combine(dir, filename), savedata); if (quicksave = true) { - File.WriteAllText(Path.Combine(dir, "QuickSave"), savedata); + File.WriteAllText(Path.Combine(dir, "_QuickSave"), savedata); } } public static void CheckCreatedFolder(string foldername) @@ -543,8 +569,8 @@ public static void LoadChapter(string filename) } public static void QLoadChapter() { - string filename = "QuickSave"; - string fullqpath = @"save/QuickSave"; + string filename = "_QuickSave"; + string fullqpath = @"save/_QuickSave"; if (!File.Exists(fullqpath)) { Console.WriteLine("You don't have quick save file"); @@ -605,6 +631,31 @@ public static void DeleteSave(string filename, string path) } } } + public static void Choice(string Question, string Choice1, string Choice2, string Choice3) + { + //Choice that doesn't affect anything + + } + public static string ChoiceRoute(string Question, string Choice1, string Choice2, string Choice3) + { + //Choice that affect gameplay/ending + while (true) + { + TextTool.TextGen("\n" + Question); + Console.WriteLine("\n1 " + Choice1 + "\n2 " + Choice2 + "\n3 " + Choice3 + "\n"); + TextTool.TextGen("Your answer(1-3) >"); + string Choose = Console.ReadLine(); + if (Choose == "1" || Choose == "2" || Choose == "3") + { + return Choose; + break; + } + else + { + Console.Clear(); + } + } + } } diff --git a/_update.txt b/_update.txt index f04bc68..54b3d69 100644 --- a/_update.txt +++ b/_update.txt @@ -1,13 +1,7 @@ Don't forget to check if game version match this update note - Update Beta 0.0.42 + Update Beta 0.0.43 Framework -+- Move QuickSave file to save folder - -UI -+ Make quick load work again - -Settings -+- You can't enter value more than 500 now ++ Minor update uon ChoiceRoute function Future Update Code quality diff --git a/bin/Debug/net7.0/win-x64.zip b/bin/Debug/net7.0/VNgame-Linux.tar.xz similarity index 59% rename from bin/Debug/net7.0/win-x64.zip rename to bin/Debug/net7.0/VNgame-Linux.tar.xz index fa4f938..ed46442 100644 Binary files a/bin/Debug/net7.0/win-x64.zip and b/bin/Debug/net7.0/VNgame-Linux.tar.xz differ diff --git a/bin/Debug/net7.0/linux-x64.tar.xz b/bin/Debug/net7.0/VNgame-Windows.zip similarity index 70% rename from bin/Debug/net7.0/linux-x64.tar.xz rename to bin/Debug/net7.0/VNgame-Windows.zip index 75fd4e1..fd93f09 100644 Binary files a/bin/Debug/net7.0/linux-x64.tar.xz and b/bin/Debug/net7.0/VNgame-Windows.zip differ diff --git a/bin/Debug/net7.0/cs.dll b/bin/Debug/net7.0/cs.dll index 1e2e0fd..9ed57aa 100644 Binary files a/bin/Debug/net7.0/cs.dll and b/bin/Debug/net7.0/cs.dll differ diff --git a/bin/Debug/net7.0/cs.pdb b/bin/Debug/net7.0/cs.pdb index ba2e797..7961f23 100644 Binary files a/bin/Debug/net7.0/cs.pdb and b/bin/Debug/net7.0/cs.pdb differ diff --git a/bin/Debug/net7.0/linux-x64/cs.dll b/bin/Debug/net7.0/linux-x64/cs.dll index 4afb080..f7decdf 100644 Binary files a/bin/Debug/net7.0/linux-x64/cs.dll and b/bin/Debug/net7.0/linux-x64/cs.dll differ diff --git a/bin/Debug/net7.0/linux-x64/cs.pdb b/bin/Debug/net7.0/linux-x64/cs.pdb index 64782d2..a5728fb 100644 Binary files a/bin/Debug/net7.0/linux-x64/cs.pdb and b/bin/Debug/net7.0/linux-x64/cs.pdb differ diff --git a/bin/Debug/net7.0/win-x64/cs.dll b/bin/Debug/net7.0/win-x64/cs.dll index 9ced8a8..a93faa3 100644 Binary files a/bin/Debug/net7.0/win-x64/cs.dll and b/bin/Debug/net7.0/win-x64/cs.dll differ diff --git a/bin/Debug/net7.0/win-x64/cs.pdb b/bin/Debug/net7.0/win-x64/cs.pdb index 5ee2708..282a7ae 100644 Binary files a/bin/Debug/net7.0/win-x64/cs.pdb and b/bin/Debug/net7.0/win-x64/cs.pdb differ diff --git a/obj/Debug/net7.0/cs.dll b/obj/Debug/net7.0/cs.dll index 1e2e0fd..9ed57aa 100644 Binary files a/obj/Debug/net7.0/cs.dll and b/obj/Debug/net7.0/cs.dll differ diff --git a/obj/Debug/net7.0/cs.pdb b/obj/Debug/net7.0/cs.pdb index ba2e797..7961f23 100644 Binary files a/obj/Debug/net7.0/cs.pdb and b/obj/Debug/net7.0/cs.pdb differ diff --git a/obj/Debug/net7.0/linux-x64/cs.dll b/obj/Debug/net7.0/linux-x64/cs.dll index 4afb080..f7decdf 100644 Binary files a/obj/Debug/net7.0/linux-x64/cs.dll and b/obj/Debug/net7.0/linux-x64/cs.dll differ diff --git a/obj/Debug/net7.0/linux-x64/cs.pdb b/obj/Debug/net7.0/linux-x64/cs.pdb index 64782d2..a5728fb 100644 Binary files a/obj/Debug/net7.0/linux-x64/cs.pdb and b/obj/Debug/net7.0/linux-x64/cs.pdb differ diff --git a/obj/Debug/net7.0/linux-x64/ref/cs.dll b/obj/Debug/net7.0/linux-x64/ref/cs.dll index 2612840..b0f2433 100644 Binary files a/obj/Debug/net7.0/linux-x64/ref/cs.dll and b/obj/Debug/net7.0/linux-x64/ref/cs.dll differ diff --git a/obj/Debug/net7.0/linux-x64/refint/cs.dll b/obj/Debug/net7.0/linux-x64/refint/cs.dll index 2612840..b0f2433 100644 Binary files a/obj/Debug/net7.0/linux-x64/refint/cs.dll and b/obj/Debug/net7.0/linux-x64/refint/cs.dll differ diff --git a/obj/Debug/net7.0/ref/cs.dll b/obj/Debug/net7.0/ref/cs.dll index 17ee323..95d7b18 100644 Binary files a/obj/Debug/net7.0/ref/cs.dll and b/obj/Debug/net7.0/ref/cs.dll differ diff --git a/obj/Debug/net7.0/refint/cs.dll b/obj/Debug/net7.0/refint/cs.dll index 17ee323..95d7b18 100644 Binary files a/obj/Debug/net7.0/refint/cs.dll and b/obj/Debug/net7.0/refint/cs.dll differ diff --git a/obj/Debug/net7.0/win-x64/cs.dll b/obj/Debug/net7.0/win-x64/cs.dll index 9ced8a8..a93faa3 100644 Binary files a/obj/Debug/net7.0/win-x64/cs.dll and b/obj/Debug/net7.0/win-x64/cs.dll differ diff --git a/obj/Debug/net7.0/win-x64/cs.pdb b/obj/Debug/net7.0/win-x64/cs.pdb index 5ee2708..282a7ae 100644 Binary files a/obj/Debug/net7.0/win-x64/cs.pdb and b/obj/Debug/net7.0/win-x64/cs.pdb differ diff --git a/obj/Debug/net7.0/win-x64/ref/cs.dll b/obj/Debug/net7.0/win-x64/ref/cs.dll index 2612840..b0f2433 100644 Binary files a/obj/Debug/net7.0/win-x64/ref/cs.dll and b/obj/Debug/net7.0/win-x64/ref/cs.dll differ diff --git a/obj/Debug/net7.0/win-x64/refint/cs.dll b/obj/Debug/net7.0/win-x64/refint/cs.dll index 2612840..b0f2433 100644 Binary files a/obj/Debug/net7.0/win-x64/refint/cs.dll and b/obj/Debug/net7.0/win-x64/refint/cs.dll differ diff --git a/obj/cs.csproj.nuget.dgspec.json b/obj/cs.csproj.nuget.dgspec.json index 2de19a4..fef15ae 100644 --- a/obj/cs.csproj.nuget.dgspec.json +++ b/obj/cs.csproj.nuget.dgspec.json @@ -48,16 +48,6 @@ ], "assetTargetFallback": true, "warn": true, - "downloadDependencies": [ - { - "name": "Microsoft.AspNetCore.App.Runtime.linux-x64", - "version": "[7.0.0, 7.0.0]" - }, - { - "name": "Microsoft.NETCore.App.Runtime.linux-x64", - "version": "[7.0.0, 7.0.0]" - } - ], "frameworkReferences": { "Microsoft.NETCore.App": { "privateAssets": "all" @@ -65,11 +55,6 @@ }, "runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/7.0.100/RuntimeIdentifierGraph.json" } - }, - "runtimes": { - "linux-x64": { - "#import": [] - } } } } diff --git a/obj/project.assets.json b/obj/project.assets.json index 3410d3d..3d989c0 100644 --- a/obj/project.assets.json +++ b/obj/project.assets.json @@ -1,8 +1,7 @@ { "version": 3, "targets": { - "net7.0": {}, - "net7.0/linux-x64": {} + "net7.0": {} }, "libraries": {}, "projectFileDependencyGroups": { @@ -55,16 +54,6 @@ ], "assetTargetFallback": true, "warn": true, - "downloadDependencies": [ - { - "name": "Microsoft.AspNetCore.App.Runtime.linux-x64", - "version": "[7.0.0, 7.0.0]" - }, - { - "name": "Microsoft.NETCore.App.Runtime.linux-x64", - "version": "[7.0.0, 7.0.0]" - } - ], "frameworkReferences": { "Microsoft.NETCore.App": { "privateAssets": "all" @@ -72,11 +61,6 @@ }, "runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/7.0.100/RuntimeIdentifierGraph.json" } - }, - "runtimes": { - "linux-x64": { - "#import": [] - } } } } \ No newline at end of file diff --git a/obj/project.nuget.cache b/obj/project.nuget.cache index bbdc5e3..f30600f 100644 --- a/obj/project.nuget.cache +++ b/obj/project.nuget.cache @@ -1,11 +1,8 @@ { "version": 2, - "dgSpecHash": "8VZWUBXMmtIjk+JEnM1W911LzbzASMib9KSS+//5KMxfFZgcOCoZRf6T2P5BDmILOZrl37SXX4/uPJOyr+Llsg==", + "dgSpecHash": "VQlEl2RJ4ZXCZgONgUgoze2uE+5JmhbkSq8XTkt/c60W8lYBTP6ggQPc+1kS8NYi6r3/3DAvRX+N14kkpgV0gA==", "success": true, "projectFilePath": "/home/notrealsean/Desktop/Code/cs/consoleapp/VNgame/cs.csproj", - "expectedPackageFiles": [ - "/home/notrealsean/.nuget/packages/microsoft.netcore.app.runtime.linux-x64/7.0.0/microsoft.netcore.app.runtime.linux-x64.7.0.0.nupkg.sha512", - "/home/notrealsean/.nuget/packages/microsoft.aspnetcore.app.runtime.linux-x64/7.0.0/microsoft.aspnetcore.app.runtime.linux-x64.7.0.0.nupkg.sha512" - ], + "expectedPackageFiles": [], "logs": [] } \ No newline at end of file diff --git a/save/QuickSave b/save/QuickSave deleted file mode 100644 index 66c688d..0000000 --- a/save/QuickSave +++ /dev/null @@ -1 +0,0 @@ -[{"chapter":"2","route":"1"}] \ No newline at end of file diff --git a/save/_QuickSave b/save/_QuickSave new file mode 100644 index 0000000..fabf6de --- /dev/null +++ b/save/_QuickSave @@ -0,0 +1 @@ +[{"chapter":"1","route":"3"}] \ No newline at end of file diff --git a/save/save1-2 b/save/save1-2 new file mode 100644 index 0000000..fe760fc --- /dev/null +++ b/save/save1-2 @@ -0,0 +1 @@ +[{"chapter":"1","route":"2"}] \ No newline at end of file diff --git a/save/save1-3 b/save/save1-3 new file mode 100644 index 0000000..fabf6de --- /dev/null +++ b/save/save1-3 @@ -0,0 +1 @@ +[{"chapter":"1","route":"3"}] \ No newline at end of file diff --git a/save/save2-2 b/save/save2-2 new file mode 100644 index 0000000..fa9d5e9 --- /dev/null +++ b/save/save2-2 @@ -0,0 +1 @@ +[{"chapter":"2","route":"2"}] \ No newline at end of file diff --git a/save/save2-3 b/save/save2-3 new file mode 100644 index 0000000..41bf9a4 --- /dev/null +++ b/save/save2-3 @@ -0,0 +1 @@ +[{"chapter":"2","route":"3"}] \ No newline at end of file