Ejemplo n.º 1
0
        protected override string PrintElement(ListQueue <MapElement> elements)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat(@"spawn(""{0}"",{1},{2},{3},{4},""{5}""){6}", type, x, y, (int)orientation, h, uniqueID, '\n');
            foreach (string item in itemsId)
            {
                int        index   = elements.FindIndex(x => x.uniqueID.Equals(item));
                MapElement element = elements[index];
                elements.RemoveAt(index);

                sb.Append(element.Print(elements));
                sb.AppendFormat(@"{0}.surface:addItem({1}.item){2}", uniqueID, item, '\n');//FIXME: tem de estar feito o spawn do item.
            }
            return(sb.ToString());
        }