ID:116948
 
Applies to:Dream Maker
Status: Open

Issue hasn't been assigned a status value.
I would like to see a new command added to the DM code editor which toggles between hiding or showing code comments. If possible, allow for the distinction between hiding single line or multi-line comments. The two following sections of code are identical, the only difference is whether or not Dream Maker is set to display code comments.

Comments Enabled
//Players use this command to speak.
mob/verb/Say(var/msg as text)
world<<"[src]: [msg]"//Their name is displayed before the message.


Comments Disabled
mob/verb/Say(var/msg as text)
world<<"[src]: [msg]"
If this were to be added, what would happen if you tried to type a comment when comments were disabled?

Also, couldn't you achieve a similar effect (although, a little silly) by setting your comment color to white (or whatever background color you're using).
Complex Robot wrote:
If this were to be added, what would happen if you tried to type a comment when comments were disabled?

I'd imagine it would show the comment until you moved on to another line.

Also, couldn't you achieve a similar effect (although, a little silly) by setting your comment color to white (or whatever background color you're using).

You can't press a button and switch between font colors.
What's the purpose?
Forum_account wrote:
What's the purpose?

To make code easier to read without sacrificing the usefulness of code comments.
To make code easier to read without sacrificing the usefulness of code comments.

Comments are supposed to make code easier to read. If a comment is making the code harder to read, fix it or remove it.

I can't imagine this working effectively. Some comments are more important than others. There are some comments you'd want to always be there and some you rarely need to see. Short of being able to hide or show individual comments, it might be helpful if you could define a level of detail for each comment and adjust the level of detail that's displayed. That way you can pick a detail level and stick with it. But with only having two modes (showing comments or hiding them), it'd be tough to manage. You'd spend more time flipping modes than you currently lose by being annoyed by having the comments there all the time.
That's a bit more complicated than what I'm asking for. All I want is a button to toggle comments on or off.