color = "#fff"
// or...
color = "white"
The above doesn't seem to work at all. Based on my testing, I believe it has something to do with the default color value being equal to null (white). I'm assuming this because you can use any other color besides white. This behavior only occurs in DS; the webclient works the way it should (in this case that's backwards though, huh).
After more testing, something to note is that the color white isn't the only culprit. I can switch to a red with no problem, but attempting to use white or a very light gray won't work and will set the color to whatever color the map uses. So essentially, I can only achieve white maptext if I leave the default text color for the map white.
Numbered Steps to Reproduce Problem: Make sure the default maptext color is something other than white. Try creating an object and changing its color to white. If reproduceable, the color of the object won't change and will remain (or switch to) the map's default color.
Code Snippet (if applicable) to Reproduce Problem:
proc/maptext_shadow(text, text_color = "#fff", x = 0, y = 0, width = 256, height = 256, offset = 1, shadow_dir = SOUTH, shadow_color = "#000")
var obj/temp = new/obj
temp.maptext = "[text]"
temp.maptext_width = width
temp.maptext_height = height
temp.color = "[shadow_color]"
temp.maptext_x = x + ((shadow_dir & (EAST | WEST)) ? ((shadow_dir & EAST && offset) || -offset) : (0))
temp.maptext_y = y + ((shadow_dir & (NORTH | SOUTH)) ? ((shadow_dir & NORTH && offset) || -offset) : (0))
temp.layer = MOB_LAYER
temp.underlays += temp.appearance
temp.maptext_x = 0
temp.maptext_y = 0
temp.color = "[text_color]"
temp.layer = MOB_LAYER + 1
temp.overlays += temp.appearance
return temp
The above code snippet works other than the fact that the default white text doesn't kick in if the map setting says different.
Expected Results: The color variable should update to its specified color with no problem.
Actual Results: The color variable seems to pick and choose when it wants to deliver the correct color, seeing the most problems dealing with white.
Does the problem occur:
Every time? Or how often? Every time.
In other games? Every game.
When does the problem NOT occur? When using the webclient.