New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RDY] Adds tostring on humanoid #1355
Conversation
CorsixTH/Lua/entities/humanoid.lua
Outdated
|
||
-- METAMETHODS | ||
|
||
local Humanoid_mt = Humanoid._metatable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Figure out how to make metatables inherit form super metattable
CorsixTH/Luatest/class_test_base.lua
Outdated
@@ -22,6 +22,13 @@ SOFTWARE. --]] | |||
-- classes. | |||
|
|||
require("busted") | |||
-- local say = require("say") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this I guess
@@ -23,10 +23,24 @@ require("class_test_base") | |||
require("entity") | |||
require("entities.humanoid") | |||
|
|||
|
|||
-- TODO figure out how to move out of this test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO
@@ -23,10 +23,16 @@ require("class_test_base") | |||
require("entity") | |||
require("entities.humanoid") | |||
|
|||
assert:register("assertion", "matches", assertion_matches, "assertion.matches") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This I am still not happy about, but I am not sure how to solve it. It would be best to register the assertion inside the class_test_base, but the assert table isn't defined there (I don't know why:() Any Ideas?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you try adding local assert = require("luassert")
to class_test_base?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome it worked! Thanks man. How come i don't need to require luassert inside the test classes? Is it some internal magic?
Mostly good, this is how the resulting error looks to me:
I think a newline and a label is warranted in the error, maybe something like:
let me know what you think. |
* Also breaks out staff specific printing
a90ea08
to
aa6404e
Compare
Good point. I added a new line and some more logic to the name of the humanoid. This is the current state. What do you think?
|
I don't like that |
Actually it comes from CorsixTH/CorsixTH/Src/th_lua_strings.cpp Line 380 in 6af2a5c
|
Perhaps to distinguish between a literal English sentence and an English translation of a sentence. |
With @TheCycoONE we figured out that it comes from the |
Fixes #1353