[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Writting Buffer

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Writting Buffer

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Tux   (8 posts)  [Biography] bio
Date Mon 23 Oct 2006 12:16 PM (UTC)  quote  ]
Message
Is there any easy way to accomplish this? Currently, we have a lot of people editing the game in the writing buffer. when someone writes too much for a singular line, it trims it to fit the buffer. Is there a way to make it wrap it? This is a fairly heavily modded smaug.
[Go to top] top

Posted by Zeno   USA  (2,868 posts)  [Biography] bio   Moderator
Date Reply #1 on Mon 23 Oct 2006 02:12 PM (UTC)  quote  ]
Message
I believe there is a snippet out there that redoes the buffer, and that is one of the things changed.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Nargsbrood   (54 posts)  [Biography] bio
Date Reply #2 on Mon 23 Oct 2006 09:38 PM (UTC)  quote  ]
Message
a good rule of thumb for smaug writing buffers:
you'll see the
------------------------------------------------
the length of your line should be around the length of this line when you start the write buffer. little bit more or less should be alright.

if you want the text lines to be longer/shorter, then manually change the length of the --------- in the code.

or if you really want to go through all the trouble and you cannot find a suitable snippet...

You can make a new command for the write buffer like the /d for deleting lines, /s for save. you could make a /f for format which would remove all line breaks and combine the 2dimensional char array into one single char array and beign clipping it up and putting it back into the 2d char array.

count, say 50(or however long you want each line to be) spaces out and then go backwards until you find the first space. cut if off there, remove that section do it again for the next line... and again again until it reaches the end of the char array... of course you'll need some if checks so you dont go out of bounds in the array and a few other additionals for formatting the spaces and adding them when necessary(since your new lines dont begin with spaces).

you probably dont want to do all this automatically in each write buffer if you want to keep the formatting of the line you have just edited like for maps, text art, etc...

if you do want it to do it automatically, just call the function automatically when the writebuffer recieves the /s for save command.
[Go to top] top

Posted by Samson   USA  (683 posts)  [Biography] bio
Date Reply #3 on Tue 24 Oct 2006 02:28 PM (UTC)  quote  ]
Message
Formatting patch for the editor:
http://www.mudbytes.net/index.php?a=files&s=viewfile&fid=584

SmaugMuds.org: http://www.smaugmuds.org - The Smaug MUDs Community Center

"The past was erased, the erasure was forgotten, the lie became truth." -- George Orwell, 1984
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


1,779 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]