Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
/VM/station wiki
Search
Search
Log in
Personal tools
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Text Formatting
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
So you're making some code to do something, and you'd like to use a chat-pane text message to inform the players about it. Good for you! Now, there's a few things to know when doing this. == Use Span Classes Goddamn == Span classes allow for '''consistent''' and informative text formatting. You may be familiar with span classes if you have previous experience with HTML. There are various types of classes, which can all be found in interface/stylesheet.dm. Make sure to use the appropriate one for the situation! ==== When you observe someone else doing something ==== <pre>user.visible_message("[user.name] begins welding [src.name]."</pre> John Smith begins welding the vent. :This one has '''no span class'''. It's when you see something mundane and boring. ==== When you observe yourself doing something ==== <pre>to_chat(user, "<span class='notice'>You begin welding the vent...</span>"</pre> <span style="color:blue">You begin welding the vent...</span> :This is a '''notice'''. Notices show up in simple blue text, and are used for benign informational messages. This notice ends with "...", which implies that the action will take a period of time to complete. ==== When you can't do something ==== <pre>to_chat(user, "<span class='warning'>You can't vent crawl while you're stunned!</span>"</pre> <span style="color:red">''You can't vent crawl while you're stunned!''</span> :This is a '''warning'''! It shows up as simple red text, and are used for things like restriction notifications and machines malfunctioning. ==== When you see someone getting hurt or something else alarming ==== <pre>user.visible_message("<span class='danger'>[user.name] was shocked by the [src.name]!</span>"</pre> <span style="color:red">'''John Smith''' was shocked by the door!</span> :This is '''danger'''! This is heavier red text, used in situations where someone other than yourself is being harmed or having some other potentionally harmful action taken against them, such as cuffing. ==== When you're hurt directly ==== <pre>to_chat(target, "<span class='userdanger'>You are absorbed by the changeling!</span>"</pre> <span style="font-size:125%;color:red">'''You are absorbed by the changeling!'''</span> :This is '''userdanger'''! Userdanger is used in only one situation: when the person receiving the text message is being directly harmed, such as from attacks or antagonist abilities. {{Contribution guides}} [[Category:Game Resources]] [[Category:Guides]]
Summary:
Please note that all contributions to /VM/station wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
/VM/station wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Template:Contribution guides
(
edit
)
Toggle limited content width