Форматирование текста: различия между версиями

imported>Cheridan
Нет описания правки
imported>Ikarrus
Нет описания правки
Строка 4: Строка 4:
Span classes allow for '''consistent''' and informative text formatting.
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 SOMEWHEEEEEERE. Make sure to use the appropriate one for the situation!
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!





Версия от 15:42, 22 апреля 2015

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!


user << "<span class='notice'>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.

user << "<span class='warning'>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, machines malfunctioning,

user.visible_message("<span class='danger'>[user.name] was shocked by the [src.name]!</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.

target << "<span class='userdanger'>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.


Hosting Hosting a serverSetting up the databaseWorking with /tg/station as an upstream repository
Contributing Guide to contributing to the gameSetting up gitDownloading the source codeReporting issuesChangelogs
Coding Understanding SS13 codeSS13 for experienced programmersCode docsCoding standardsGetting Your Pull AcceptedBinary flags‎Text FormattingMySQL
Mapping Guide to mappingMap mergerGuide to door access
Spriting Guide to spritingResolving icon conflicts
Wiki Guide to contributing to the wikiWikicodeAutowiki