Skip to content

Commit

Permalink
Adjust to use byml object
Browse files Browse the repository at this point in the history
  • Loading branch information
KillzXGaming committed Nov 18, 2023
1 parent 8497be4 commit 512351c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Fushigi/course/CourseInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace Fushigi.course
{
[Serializable]
public class CourseInfo
public class CourseInfo : BymlObject
{
public string CourseDifficulty { get; set; }
public string CourseNameLabel { get; set; }
Expand All @@ -29,14 +29,14 @@ public CourseInfo(string name)
var courseFilePath = FileUtil.FindContentPath(Path.Combine("Stage", "CourseInfo", $"{name}.game__stage__CourseInfo.bgyml"));
var byml = new Byml.Byml(new MemoryStream(File.ReadAllBytes(courseFilePath)));

BymlSerialize.Deserialize(this, byml.Root);
this.Load((BymlHashTable)byml.Root);

Console.WriteLine();
}

public void Save(string name)
{
var root = BymlSerialize.Serialize(this);
var root = this.Serialize();

var courseFilePath = FileUtil.FindContentPath(Path.Combine("Stage", "CourseInfo", $"{name}.game__stage__CourseInfo.bgyml"));
using (var fs = new FileStream(courseFilePath, FileMode.Create, FileAccess.Write))
Expand Down

0 comments on commit 512351c

Please sign in to comment.