Adds an exception to 'turn()' on invalid direction types#2371
Adds an exception to 'turn()' on invalid direction types#2371wixoaGit merged 3 commits intoOpenDreamProject:masterfrom
Conversation
Kapu1178
left a comment
There was a problem hiding this comment.
This is not parity with byond.
Byond allows the second argument (the dir argument) to be anything. This can have an exception implemented as an Optional Exception.
The linked issue was actually referring to the first argument, which only allows "turnable" things like numbers and matrices.
|
The first argument is the Dir argument. Angle is the second. |
FUCK nevermind |
|
I don't really know why my code is failing the tests but I think the test is passing a bad argument and triggering the exception. I don't know how tests work so I'll have to look into it later. |
|
It's failing on line 59 of the turn.dm test. This says it's supposed to return a random direction, but my testing in BYOND gives a |
So this means the test should be changed then? |
Yes, it's not testing for correct behavior anymore |
|
This should be ready to review now |
Fixes #2352
I tried testing by inverting the if and it looks like its working.