mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Nicer time setting logging
Now logs ACTION[ServerThread]: player sets time to 6:03 instead of ACTION[ServerThread]: player sets time to 6:3
This commit is contained in:
@@ -713,7 +713,7 @@ core.register_chatcommand("time", {
|
|||||||
return false, "Invalid minute (must be between 0 and 59 inclusive)."
|
return false, "Invalid minute (must be between 0 and 59 inclusive)."
|
||||||
end
|
end
|
||||||
core.set_timeofday((hour * 60 + minute) / 1440)
|
core.set_timeofday((hour * 60 + minute) / 1440)
|
||||||
core.log("action", name .. " sets time to " .. hour .. ":" .. minute)
|
core.log("action", ("%s sets time to %d:%02d"):format(name, hour, minute))
|
||||||
return true, "Time of day changed."
|
return true, "Time of day changed."
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user