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.
This commit is contained in:
Timberpoes
2021-06-19 18:39:00 -03:00
committed by GitHub
parent 2806d97f04
commit 1a0e64e890
6 changed files with 118 additions and 232 deletions
+1 -1
View File
@@ -215,7 +215,7 @@
to_chat(user, span_warning("[I] is too large for the drain enclosure."))
return
if(!user.transferItemToLoc(I, src))
to_chat(user, span_warning("\[I] is stuck to your hand, you cannot put it in the drain enclosure!"))
to_chat(user, span_warning("[I] is stuck to your hand, you cannot put it in the drain enclosure!"))
return
hiddenitem = I
to_chat(user, span_notice("You place [I] into the drain enclosure."))