-
-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Developer utilities - do you want some SPAN (#1603)
* Refactors most spans into span procs (#59645) Converts most spans into span procs. Mostly used regex for this and sorted out any compile time errors afterwards so there could be some bugs. Was initially going to do defines, but ninja said to make it into a proc, and if there's any overhead, they can easily be changed to defines. Makes it easier to control the formatting and prevents typos when creating spans as it'll runtime if you misspell instead of silently failing. Reduces the code you need to write when writing spans, as you don't need to close the span as that's automatically handled by the proc. (Note from Lemon: This should be converted to defines once we update the minimum version to 514. Didn't do it now because byond pain and such) * Converts the new span_ procs to macros, fixing a few oversights/errors along the way (#59685) This is a partial re-implementation of #59645 oranges has expressed a desire for the span_ procs to instead be macros. I agree. Even though it's a small micro-optimisation, a well contained macro can be self-linting. I've already caught one edge case thanks to this in launch_pad.dm Similarly, there was an edge case where a [ was escaped inappropriately (that errored out) in watercloset.dm and a case where a ] that should probably have been escaped actually wasn't in robot_defense.dm I have opted to make an exception to the ALLCAPS convention for these macros. I have guaraded these macros in parenthesis. In doing so, additional error states can be captured as part of the build process as malformed inputs will then cause errors and prompt further investigation. * spannening * boop * spans for abnormality zayin folder * spans for abnormality teth folder * spans for abnormality he folder * spans for abnormality waw folder * spans for abnormality aleph folder * spans for _abnormality parent * spans for abnormality tools folder --------- Co-authored-by: Watermelon914 <[email protected]> Co-authored-by: Timberpoes <[email protected]>
- Loading branch information
1 parent
130c137
commit b1694b7
Showing
1,072 changed files
with
5,770 additions
and
5,636 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
// Sorted alphabetically | ||
#define span_abductor(str) ("<span class='abductor'>" + str + "</span>") | ||
#define span_admin(str) ("<span class='admin'>" + str + "</span>") | ||
#define span_adminhelp(str) ("<span class='adminhelp'>" + str + "</span>") | ||
#define span_adminnotice(str) ("<span class='adminnotice'>" + str + "</span>") | ||
#define span_adminobserverooc(str) ("<span class='adminobserverooc'>" + str + "</span>") | ||
#define span_adminooc(str) ("<span class='adminooc'>" + str + "</span>") | ||
#define span_adminsay(str) ("<span class='adminsay'>" + str + "</span>") | ||
#define span_aiprivradio(str) ("<span class='aiprivradio'>" + str + "</span>") | ||
#define span_alert(str) ("<span class='alert'>" + str + "</span>") | ||
#define span_alertalien(str) ("<span class='alertalien'>" + str + "</span>") | ||
#define span_alertsyndie(str) ("<span class='alertsyndie'>" + str + "</span>") | ||
#define span_alertwarning(str) ("<span class='alertwarning'>" + str + "</span>") | ||
#define span_alien(str) ("<span class='alien'>" + str + "</span>") | ||
#define span_announce(str) ("<span class='announce'>" + str + "</span>") | ||
#define span_big(str) ("<span class='big'>" + str + "</span>") | ||
#define span_bigicon(str) ("<span class='bigicon'>" + str + "</span>") | ||
#define span_binarysay(str) ("<span class='binarysay'>" + str + "</span>") | ||
#define span_blob(str) ("<span class='blob'>" + str + "</span>") | ||
#define span_blobannounce(str) ("<span class='blobannounce'>" + str + "</span>") | ||
#define span_blue(str) ("<span class='blue'>" + str + "</span>") | ||
#define span_blueteamradio(str) ("<span class='blueteamradio'>" + str + "</span>") | ||
#define span_bold(str) ("<span class='bold'>" + str + "</span>") | ||
#define span_boldannounce(str) ("<span class='boldannounce'>" + str + "</span>") | ||
#define span_bolddanger(str) ("<span class='bolddanger'>" + str + "</span>") | ||
#define span_boldnicegreen(str) ("<span class='boldnicegreen'>" + str + "</span>") | ||
#define span_boldnotice(str) ("<span class='boldnotice'>" + str + "</span>") | ||
#define span_boldwarning(str) ("<span class='boldwarning'>" + str + "</span>") | ||
#define span_boldbig(str) ("<span class='big bold'>" + str + "</span>") | ||
#define span_centcomradio(str) ("<span class='centcomradio'>" + str + "</span>") | ||
#define span_changeling(str) ("<span class='changeling'>" + str + "</span>") | ||
#define span_clown(str) ("<span class='clown'>" + str + "</span>") | ||
#define span_colossus(str) ("<span class='colossus'>" + str + "</span>") | ||
#define span_command_headset(str) ("<span class='command_headset'>" + str + "</span>") | ||
#define span_comradio(str) ("<span class='comradio'>" + str + "</span>") | ||
#define span_cult(str) ("<span class='cult'>" + str + "</span>") | ||
#define span_cultbold(str) ("<span class='cultbold'>" + str + "</span>") | ||
#define span_cultboldtalic(str) ("<span class='cultboldtalic'>" + str + "</span>") | ||
#define span_cultitalic(str) ("<span class='cultitalic'>" + str + "</span>") | ||
#define span_cultlarge(str) ("<span class='cultlarge'>" + str + "</span>") | ||
#define span_danger(str) ("<span class='danger'>" + str + "</span>") | ||
#define span_deadsay(str) ("<span class='deadsay'>" + str + "</span>") | ||
#define span_deconversion_message(str) ("<span class='deconversion_message'>" + str + "</span>") | ||
#define span_drone(str) ("<span class='drone'>" + str + "</span>") | ||
#define span_engradio(str) ("<span class='engradio'>" + str + "</span>") | ||
#define span_extremelybig(str) ("<span class='extremelybig'>" + str + "</span>") | ||
#define span_game_say(str) ("<span class='game say'>" + str + "</span>") | ||
#define span_ghostalert(str) ("<span class='ghostalert'>" + str + "</span>") | ||
#define span_green(str) ("<span class='green'>" + str + "</span>") | ||
#define span_greenannounce(str) ("<span class='greenannounce'>" + str + "</span>") | ||
#define span_greenteamradio(str) ("<span class='greenteamradio'>" + str + "</span>") | ||
#define span_greentext(str) ("<span class='greentext'>" + str + "</span>") | ||
#define span_grey(str) ("<span class='grey'>" + str + "</span>") | ||
#define span_header(str) ("<span class='header'>" + str + "</span>") | ||
#define span_hear(str) ("<span class='hear'>" + str + "</span>") | ||
#define span_hidden(str) ("<span class='hidden'>" + str + "</span>") | ||
#define span_hierophant(str) ("<span class='hierophant'>" + str + "</span>") | ||
#define span_hierophant_warning(str) ("<span class='hierophant_warning'>" + str + "</span>") | ||
#define span_highlight(str) ("<span class='highlight'>" + str + "</span>") | ||
#define span_his_grace(str) ("<span class='his_grace'>" + str + "</span>") | ||
#define span_holoparasite(str) ("<span class='holoparasite'>" + str + "</span>") | ||
#define span_boldholoparasite(str) ("<span class='holoparasite bold'>" + str + "</span>") | ||
#define span_hypnophrase(str) ("<span class='hypnophrase'>" + str + "</span>") | ||
#define span_icon(str) ("<span class='icon'>" + str + "</span>") | ||
#define span_info(str) ("<span class='info'>" + str + "</span>") | ||
#define span_infoplain(str) ("<span class='infoplain'>" + str + "</span>") | ||
#define span_interface(str) ("<span class='interface'>" + str + "</span>") | ||
#define span_linkify(str) ("<span class='linkify'>" + str + "</span>") | ||
#define span_looc(str) ("<span class='looc'>" + str + "</span>") | ||
#define span_medal(str) ("<span class='medal'>" + str + "</span>") | ||
#define span_medradio(str) ("<span class='medradio'>" + str + "</span>") | ||
#define span_memo(str) ("<span class='memo'>" + str + "</span>") | ||
#define span_memoedit(str) ("<span class='memoedit'>" + str + "</span>") | ||
#define span_message(str) ("<span class='message'>" + str + "</span>") | ||
#define span_mind_control(str) ("<span class='mind_control'>" + str + "</span>") | ||
#define span_minorannounce(str) ("<span class='minorannounce'>" + str + "</span>") | ||
#define span_minoralert(str) ("<span class='minoralert'>" + str + "</span>") | ||
#define span_monkey(str) ("<span class='monkey'>" + str + "</span>") | ||
#define span_name(str) ("<span class='name'>" + str + "</span>") | ||
#define span_narsie(str) ("<span class='narsie'>" + str + "</span>") | ||
#define span_narsiesmall(str) ("<span class='narsiesmall'>" + str + "</span>") | ||
#define span_nicegreen(str) ("<span class='nicegreen'>" + str + "</span>") | ||
#define span_notice(str) ("<span class='notice'>" + str + "</span>") | ||
#define span_noticealien(str) ("<span class='noticealien'>" + str + "</span>") | ||
#define span_ooc(str) ("<span class='ooc'>" + str + "</span>") | ||
#define span_papyrus(str) ("<span class='papyrus'>" + str + "</span>") | ||
#define span_phobia(str) ("<span class='phobia'>" + str + "</span>") | ||
#define span_prefix(str) ("<span class='prefix'>" + str + "</span>") | ||
#define span_priorityalert(str) ("<span class='priorityalert'>" + str + "</span>") | ||
#define span_priorityannounce(str) ("<span class='priorityannounce'>" + str + "</span>") | ||
#define span_prioritytitle(str) ("<span class='prioritytitle'>" + str + "</span>") | ||
#define span_purple(str) ("<span class='purple'>" + str + "</span>") | ||
#define span_radio(str) ("<span class='radio'>" + str + "</span>") | ||
#define span_reallybig(str) ("<span class='reallybig'>" + str + "</span>") | ||
#define span_red(str) ("<span class='red'>" + str + "</span>") | ||
#define span_redteamradio(str) ("<span class='redteamradio'>" + str + "</span>") | ||
#define span_redtext(str) ("<span class='redtext'>" + str + "</span>") | ||
#define span_resonate(str) ("<span class='resonate'>" + str + "</span>") | ||
#define span_revenbignotice(str) ("<span class='revenbignotice'>" + str + "</span>") | ||
#define span_revenboldnotice(str) ("<span class='revenboldnotice'>" + str + "</span>") | ||
#define span_revendanger(str) ("<span class='revendanger'>" + str + "</span>") | ||
#define span_revenminor(str) ("<span class='revenminor'>" + str + "</span>") | ||
#define span_revennotice(str) ("<span class='revennotice'>" + str + "</span>") | ||
#define span_revenwarning(str) ("<span class='revenwarning'>" + str + "</span>") | ||
#define span_robot(str) ("<span class='robot'>" + str + "</span>") | ||
#define span_rose(str) ("<span class='rose'>" + str + "</span>") | ||
#define span_sans(str) ("<span class='sans'>" + str + "</span>") | ||
#define span_sciradio(str) ("<span class='sciradio'>" + str + "</span>") | ||
#define span_secradio(str) ("<span class='secradio'>" + str + "</span>") | ||
#define span_servradio(str) ("<span class='servradio'>" + str + "</span>") | ||
#define span_singing(str) ("<span class='singing'>" + str + "</span>") | ||
#define span_slime(str) ("<span class='slime'>" + str + "</span>") | ||
#define span_small(str) ("<span class='small'>" + str + "</span>") | ||
#define span_smallnotice(str) ("<span class='smallnotice'>" + str + "</span>") | ||
#define span_smallnoticeital(str) ("<span class='smallnoticeital'>" + str + "</span>") | ||
#define span_spiderbroodmother(str) ("<span class='spiderbroodmother'>" + str + "</span>") | ||
#define span_spiderscout(str) ("<span class='spiderscout'>" + str + "</span>") | ||
#define span_spiderbreacher(str) ("<span class='spiderbreacher'>" + str + "</span>") | ||
#define span_suicide(str) ("<span class='suicide'>" + str + "</span>") | ||
#define span_suppradio(str) ("<span class='suppradio'>" + str + "</span>") | ||
#define span_syndradio(str) ("<span class='syndradio'>" + str + "</span>") | ||
#define span_tape_recorder(str) ("<span class='tape_recorder'>" + str + "</span>") | ||
#define span_tinynotice(str) ("<span class='tinynotice'>" + str + "</span>") | ||
#define span_tinynoticeital(str) ("<span class='tinynoticeital'>" + str + "</span>") | ||
#define span_unconscious(str) ("<span class='unconscious'>" + str + "</span>") | ||
#define span_userdanger(str) ("<span class='userdanger'>" + str + "</span>") | ||
#define span_warning(str) ("<span class='warning'>" + str + "</span>") | ||
#define span_yell(str) ("<span class='yell'>" + str + "</span>") | ||
#define span_yellowteamradio(str) ("<span class='yellowteamradio'>" + str + "</span>") | ||
|
||
// Spans that use embedded tgui components: | ||
// Sorted alphabetically | ||
#define span_tooltip(tip, main_text) ("<span data-component=\"Tooltip\" data-content=\"" + tip + "\" class=\"tooltip\">" + main_text + "</span>") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.