示例#1
0
        /// <summary>
        /// Converts this floor item to a string representation and returns it.
        /// </summary>
        public override string ToString()
        {
            /* Format example: public space object
             * 2732 invisichair 27 32 1 2
            */

            /* Format example: furniture
             * 802610
             * chair_polyfon
             * PB PA I I H 0.0
             * 0,0,0
             * 
             * H data
             */

            fuseStringBuilder FSB = new fuseStringBuilder();
            if (!this.Definition.Behaviour.isPublicSpaceObject)
            {
                FSB.appendClosedValue(this.ID.ToString());
                FSB.appendClosedValue(this.Definition.Sprite);

                FSB.appendWired(this.X);
                FSB.appendWired(this.Y);
                FSB.appendWired(this.Definition.Length);
                FSB.appendWired(this.Definition.Width);
                FSB.appendWired(this.Rotation);
                FSB.appendClosedValue(stringFunctions.formatFloatForClient(this.Z));

                FSB.appendClosedValue(this.Definition.Color);
                FSB.appendClosedValue(null);

                FSB.appendWired(this.teleporterID);
                FSB.appendClosedValue(this.customData);
            }
            else
            {
                FSB.appendWhiteSpacedValue(this.ID.ToString());
                FSB.appendWhiteSpacedValue(this.Definition.Sprite);
                FSB.appendWhiteSpacedValue(this.X.ToString());
                FSB.appendWhiteSpacedValue(this.Y.ToString());
                FSB.appendWhiteSpacedValue(this.Z.ToString());
                FSB.Append(this.Rotation.ToString());
                FSB.appendChar(13);
            }

            return FSB.ToString();
        }