Can reduced_hunger be set to 2?
Presumably you mean documentation in the sense of references that the engine checks to see what the value is, because
nothing is documented by or for the coders outside of the occasional, outdated and mistyped comment (and big fancy box-shaped header signs constructed from dozens of comment slashes!).
As for the variable itself, it's just a plain "var", so it can be bool, real, string, null or whatever else. I don't think I've ever seen a variable have its actual type determined before the compiler gets to it and tries to work things out... Not even sure it's possible within DM.
So, sure, it keeps things clear for someone that's wondering what kind of variable it is supposed to be, but it still looks like a dirty fix in a sea of dirty fixes. Then again, everything else is a goddamn spidery mess of hidden references placed hither and thither in different files and variables that are only used to be given the value of another variable for shorthand, but then
that variable is only ever called to replace it with
another variable for even shorterhand, so I guess in the grand scheme of things it's not so bad.
Still, for a non-coder, which the language is nominally intended for, it's not readily apparent that everything is working as planned.
I can't find which file it's in now, but there was a line that asked the return function to decide which of two values to bring back. Like,
(some sort of call)
if(!..())
return
return TRUE || .()
I believe that's the only place I've seen someone use "or" in a return function. And yes, the second option is supposed to be just the one dot, while the if check is looking to see if it's "..()". I'm not sure what either of those functions are, and ".()" is of course different from ".", which is yet another integral and unexplained piece of the whole. I don't know the extent of
how different they are, but there's probably a third party tutorial that explains it.