MudEngine:

- EditRealm command can now set or remove InitialRealm status from a Realm. 
 - EditRealm command can now set default sense of smell, listen and feel.
 - Realms now assign its default Sense descriptions to Zones when adding a Zone to the Realm, provided the Zone does not already have a value assigned to it.
 - Zones now assign its default sense descriptions to Rooms when adding a Room to the Zone, provided the Room does not already have a value assigned to it.
This commit is contained in:
Scionwest_cp 2010-09-05 11:56:34 -07:00
parent 9313611784
commit 1f21892c36
3 changed files with 138 additions and 20 deletions

View file

@ -114,6 +114,15 @@ namespace MudEngine.GameObjects.Environment
//TODO: Check fo duplicates
ZoneCollection.Add(zone);
zone.Realm = Filename;
//Set the Zones default senses to that of the Realm provided the Zone does
//not already have a sense description assigned to it.
if ((!String.IsNullOrEmpty(this.Feel)) && (String.IsNullOrEmpty(zone.Feel)))
zone.Feel = this.Feel;
if ((!String.IsNullOrEmpty(this.Listen)) && (String.IsNullOrEmpty(zone.Listen)))
zone.Listen = this.Listen;
if ((!String.IsNullOrEmpty(this.Smell)) && (String.IsNullOrEmpty(zone.Smell)))
zone.Smell = this.Smell;
}
}
}

View file

@ -160,6 +160,15 @@ namespace MudEngine.GameObjects.Environment
RoomCollection.Add(room);
room.Zone = Filename;
room.Realm = Realm;
//Set the Rooms default senses to that of the Zones provided the Room does
//not already have a sense description assigned to it.
if ((!String.IsNullOrEmpty(this.Feel)) && (String.IsNullOrEmpty(room.Feel)))
room.Feel = this.Feel;
if ((!String.IsNullOrEmpty(this.Listen)) && (String.IsNullOrEmpty(room.Listen)))
room.Listen = this.Listen;
if ((!String.IsNullOrEmpty(this.Smell)) && (String.IsNullOrEmpty(room.Smell)))
room.Smell = this.Smell;
}
public List<Room> GetRoom(String filename)