Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add a delay to the pause feature #6643
Add a delay to the pause feature #6643
Changes from 4 commits
0d1cc2b
ddc0bda
8bbfb9b
9d7f0f9
1f55159
be8077a
740d767
07522f9
89ef4a8
b289800
374a25d
43556ab
05456da
7eaafb7
e3232c8
d7122e3
499d678
2d21396
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I do not think this hook is necessary. Shouldn't the nonsensical case be handled by the engine already?
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.
I'll check this evening.
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.
If I am not mistaken then the message would be sent and it would override the person who initiated the pause.
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.
These hooks won't take effect until the file is imported. The re-assignment will also be re-run every time the file is imported. So I think it's better to just have a function here like
function SessionResumeHook()
and hook the global from UserInit.lua_G.SessionResume = import("/lua/ui/game/pause.lua").SessionResumeHook
.We already do this for a lot of global user functions except the entire function is written in user init in a
do end
block to protect the scope (which I believe can be bypassed by debugging functions but I digress).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.
Imports are cached, it won't run every time. But it will re-run if you change the file and have
/EnableDiskWatch
as a program argument.I can move it out if we feel uncomfortable with it.
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.
Right, I forgot about caching.
I still think user init is a better place to change the function because then there would never be a question of when the function is changed.
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.
Mmhh, I understand. If we do that then it becomes trivial to write a UI mod to remove the delay.
I'm fine either way, the moment someone does that and is reported then that's more data for the moderators to understand the intentions of the user in question.
What are your thoughts @lL1l1 ?
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.
Should have LOC tags for text. The time should also be rounded up so you can't tell the player to wait 0 seconds.
We already have:
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.
Chat messages (in the current setup) are not localized. This suggestion would fall in the category of properly supporting system messages, which is what @4z0t is suggesting below too.
I think it is outside of the scope of this pull request. If we would like to support system messages we first would need to do some refactoring in my point of view.