@@ -827,7 +827,7 @@ public override void AddValue(DreamValue value) {
827827 var immutableOverlay = _appearanceSystem . AddAppearance ( overlayAppearance ?? MutableAppearance . Default ) ;
828828 overlayAppearance ? . Dispose ( ) ;
829829
830- //after UpdateApparance is done, the atom is set with a new immutable appearance containing a hard ref to the overlay
830+ //after UpdateAppearance is done, the atom is set with a new immutable appearance containing a hard ref to the overlay
831831 //only /mutable_appearance handles it differently, and that's done in DreamObjectImage
832832 _atomManager . UpdateAppearance ( _owner , appearance => {
833833 GetOverlaysList ( appearance ) . Add ( immutableOverlay ) ;
@@ -1567,8 +1567,8 @@ public override int FindValue(DreamValue value, int start = 1, int end = 0) {
15671567 }
15681568}
15691569
1570- // Savefile Dir List - always sync'd with Savefiles currentDir. Only stores keys.
1571- internal sealed class SavefileDirList ( DreamObjectDefinition listDef , DreamObjectSavefile backedSaveFile ) : DreamList ( listDef , 0 ) {
1570+ // Savefile Dir List - always synced with Savefiles currentDir. Only stores keys.
1571+ public sealed class SavefileDirList ( DreamObjectDefinition listDef , DreamObjectSavefile backedSaveFile ) : DreamList ( listDef , 0 ) {
15721572 public override DreamValue GetValue ( DreamValue key ) {
15731573 if ( ! key . TryGetValueAsInteger ( out var index ) )
15741574 throw new Exception ( $ "Invalid index on savefile dir list: { key } ") ;
@@ -1577,6 +1577,10 @@ public override DreamValue GetValue(DreamValue key) {
15771577 return new DreamValue ( backedSaveFile . CurrentDir . Keys . ElementAt ( index - 1 ) ) ;
15781578 }
15791579
1580+ public override bool ContainsValue ( DreamValue value ) {
1581+ return value . TryGetValueAsString ( out var str ) && backedSaveFile . CurrentDir . ContainsKey ( str ) ;
1582+ }
1583+
15801584 public override List < DreamValue > GetValues ( ) {
15811585 return EnumerateValues ( ) . ToList ( ) ;
15821586 }
0 commit comments