public string ConvertNameToFullPath(string itemName, string domain) { RawName = itemName; StringBuilder itemPath = new StringBuilder(Stellarmap.Globals.Generator.FunctionParameterLiteral); itemPath.Append(refIncludeFile.GetPathDefinitionIdentifier(Type, domain)); itemPath.Append(" \"/" + itemName); if (!itemPath.ToString().EndsWith(Globals.Model.RoomExtension)) { itemPath.Append(Globals.Model.RoomExtension); } itemPath.Append("\""); return(itemPath.ToString()); }
private bool LoadRoom(string roomName) { if (roomName.Length == 0 || RoomNameMap.ContainsKey(this.DomainFileReferences[THIS_DOMAIN].ConvertRoomNameToFullPath(roomName))) { return(false); } RoomModel room; try{ room = new RoomModel(roomName, this); } catch (DomainModelException exc) { throw new DomainModelException(exc.Message); } Rooms.AddLast(room); RoomNameMap.Add(this.DomainFileReferences[THIS_DOMAIN].ConvertRoomNameToFullPath(roomName), Rooms.Last.Value); //we have to get the raw roomname from linked list this.DomainFileReferences[THIS_DOMAIN].Rooms.Add(Include.GetPathDefinitionIdentifier(ItemSaveType.Room, this.Name) + " \"/" + Rooms.Last.Value.RawFileName + "\"", new FileReferenceModel(roomName, ItemSaveType.Room, Include, this.Name)); return(true); }