mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-19 06:55:59 +01:00
fix(settings): a profile is not moved to physicslog.trains, and a closed tape window keeps nothing
- the one-time move runs on the player's own settings only; a profile from before it keeps physicslog as it was, and the player's mark of the move stays when it is applied - a read of the tapes under way when the window closes is let go
This commit is contained in:
@@ -1257,6 +1257,23 @@ public class SettingsStoreTests
|
||||
Assert.False(store.LoadFailed);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void A_profile_from_before_the_move_is_not_moved_and_keeps_the_players_mark()
|
||||
{
|
||||
var files = new InMemoryFileSystem()
|
||||
.WithFile(UserIni, "starter.physicslog.moved yes\nphysicslog yes\n")
|
||||
.WithFile(Profile, "physicslog yes\n");
|
||||
var store = WithHome(files).SettingsStore;
|
||||
store.Load();
|
||||
|
||||
Assert.True(store.TryLoadProfile(Profile));
|
||||
store.Save();
|
||||
|
||||
Assert.True(store.Settings.PhysicsLog);
|
||||
Assert.False(store.Settings.PhysicsLogTrains);
|
||||
Assert.Contains("starter.physicslog.moved yes", files.ReadAllText(UserIni, System.Text.Encoding.UTF8));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void A_missing_profile_leaves_the_settings_as_they_are()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user