﻿using System.IO;
using Unity.VisualScripting;

namespace BansheeGz.BGDatabase
{
    [UnitCategory("BansheeGz")]
    public partial class SaveGame : SaveLoadWithNameA
    {
        protected override ControlOutput Enter(Flow flow)
        {
            var fullFileName = FullFileName(flow);
            File.WriteAllBytes(fullFileName, BGRepo.I.Addons.Get<BGAddonSaveLoad>().Save());
            Log(flow,"Saved OK. File at: $", fullFileName);
            return _out; 
        }
    }
}