Ignore:
Timestamp:
Jan 27, 2023, 7:28:00 PM (22 months ago)
Author:
alloc
Message:
  • Major refactoring
  • Using Utf8Json for (de)serialization
  • Moving APIs to REST
  • Removing dependencies from WebServer and MapRenderer to ServerFixes
File:
1 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements2/7dtd-server-fixes/src/PersistentData/PersistentContainer.cs

    r391 r402  
    2222
    2323                public void Save () {
    24                         Stream stream = File.Open (GameIO.GetSaveGameDir () + "/AllocsPeristentData.bin", FileMode.Create);
     24                        Stream stream = File.Open ($"{GameIO.GetSaveGameDir ()}/AllocsPeristentData.bin", FileMode.Create);
    2525                        BinaryFormatter bFormatter = new BinaryFormatter ();
    2626                        bFormatter.Serialize (stream, this);
     
    2929
    3030                public static bool Load () {
    31                         if (!File.Exists (GameIO.GetSaveGameDir () + "/AllocsPeristentData.bin")) {
     31                        if (!File.Exists ($"{GameIO.GetSaveGameDir ()}/AllocsPeristentData.bin")) {
    3232                                return false;
    3333                        }
    3434
    3535                        try {
    36                                 Stream stream = File.Open (GameIO.GetSaveGameDir () + "/AllocsPeristentData.bin", FileMode.Open);
     36                                Stream stream = File.Open ($"{GameIO.GetSaveGameDir ()}/AllocsPeristentData.bin", FileMode.Open);
    3737                                BinaryFormatter bFormatter = new BinaryFormatter ();
    3838                                PersistentContainer obj = (PersistentContainer) bFormatter.Deserialize (stream);
Note: See TracChangeset for help on using the changeset viewer.