[core] Load packet rate limits from config#10895
Open
sruon wants to merge 1 commit into
Open
Conversation
Xaver-DaRed
reviewed
Jul 25, 2026
| rateLimits_[0x0F5] = 1s; // Wide Scan Track | ||
| rateLimits_[0x11B] = 2s; // Set Job Master Display | ||
| rateLimits_[0x11D] = 2s; // Jump | ||
| const auto limits = lua["xi"]["settings"]["network"]["PACKET_RATE_LIMITS"].get_or_create<sol::table>(); |
Contributor
There was a problem hiding this comment.
Is this how we call settings from core?
settings::get<data_type>("network.PACKET_RATE_WHATEVER");
Contributor
Author
There was a problem hiding this comment.
settings::get cannot deal with nested/complex tables as it's coded to only hold primitive data types, hence why we're reaching into the state directly (this is also done in xi_search for the white list).
I do intend to leverage the YAML parser for reading and loading settings in the future which will get us rid of these hacks.
Changing settings::get to support complex nesting is more hassle than it's worth right now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I affirm:
What does this pull request do?
Been meaning to fix this for a while.
Tweaked settings code to support nested tables and moved the existing rate limits to network.lua
Steps to test these changes