bool?Match(Room room, string name, string description) { if (room == null) { // never match a null room; this shouldn't happen anyway return(false); } if (room.Name != name) { return(false); } if (!m_settings.VerboseTranscript) { // transcript is not verbose; // must assume room with same name is same room, // otherwise the user has to disambiguate potentially without descriptions, and very frequently. return(true); } if (m_settings.AssumeRoomsWithSameNameAreSameRoom) { // ignore the description return(true); } if (room.MatchDescription(description)) { // the descriptions match; they're the same room return(true); } // the descriptions don't match; they may or may not be the same room return(null); }
private bool? Match(Room room, string name, string description) { if (room == null) { // never match a null room; this shouldn't happen anyway return false; } if (room.Name != name) { return false; } if (!m_settings.VerboseTranscript) { // transcript is not verbose; // must assume room with same name is same room, // otherwise the user has to disambiguate potentially without descriptions, and very frequently. return true; } if (m_settings.AssumeRoomsWithSameNameAreSameRoom) { // ignore the description return true; } if (room.MatchDescription(description)) { // the descriptions match; they're the same room return true; } // the descriptions don't match; they may or may not be the same room return null; }