Fix logging and documentation for LuaTranslation and LuaRotation (closes #3176)

This commit is contained in:
Alexander Bock
2024-04-11 20:09:24 +02:00
parent e22af5cd56
commit ca5d02cc02
2 changed files with 4 additions and 4 deletions

View File

@@ -111,7 +111,7 @@ glm::dmat3 LuaRotation::matrix(const UpdateData& data) const {
const int success = lua_pcall(_state, 2, 9, 0);
if (success != 0) {
LERRORC(
"LuaScale",
"LuaRotation",
std::format("Error executing 'rotation': {}", lua_tostring(_state, -1))
);
}

View File

@@ -41,7 +41,7 @@ namespace {
"Script",
"This value is the path to the Lua script that will be executed to compute the "
"translation for this transformation. The script needs to define a function "
"'translate' that takes the current simulation time in seconds past the J2000 "
"'translation' that takes the current simulation time in seconds past the J2000 "
"epoch as the first argument, the current wall time as milliseconds past the "
"J2000 epoch as the second argument and computes the translation",
// @VISIBILITY(3.75)
@@ -90,7 +90,7 @@ glm::dvec3 LuaTranslation::position(const UpdateData& data) const {
const bool isFunction = lua_isfunction(_state, -1);
if (!isFunction) {
LERRORC(
"LuaScale",
"LuaTranslation",
std::format(
"Script '{}' does not have a function 'translation'",
_luaScriptFile.value()
@@ -114,7 +114,7 @@ glm::dvec3 LuaTranslation::position(const UpdateData& data) const {
const int success = lua_pcall(_state, 2, 3, 0);
if (success != 0) {
LERRORC(
"LuaScale",
"LuaTranslation",
std::format("Error executing 'translation': {}", lua_tostring(_state, -1))
);
}