-
-
Notifications
You must be signed in to change notification settings - Fork 356
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
Dynamic nation range issue #7668
Comments
I have looked over the code and I'm not sure about your theory about B and A towns not being close enough to each other. I'll probably get around to testing this with some smaller numbers though. |
Hello again, nation_proximity_to_capital_city: '15.0'
nation_proximity_to_other_nation_towns: '5.0'
absolute_distance_from_capital: '0.0' However, I was still able to replicate the issue by creating a chain of towns and then deleting one of them, as shown in the image below: I tried moving the homeblock of every town and triggering newdays, but the towns would not get kicked. Furthermore, I cannot move the capital's homeblock. The command does not output anything, and there are no server logs or errors. Thank you for your time |
I will probably have to add something into the order the towns are searched in, going from closest to farthest. The new code works fine as when its not checking far towns first I guess. |
I believe this sorts it out: https://github.com/TownyAdvanced/Towny/actions/runs/11801038567/artifacts/2177235259 if you wouldn't mind testing it on your end. It is working properly on mine. |
I tried different scenarios, everything is working as expected. |
If you like my work I'd urge you to become a sponsor, and you're welcome. |
What steps will reproduce the problem?
(This issue is only relevant if the
GNATION_SETTINGS_NATION_PROXIMITY_TO_OTHER_NATION_TOWNS
config node is set.)Looking at the code, it appears that:
The ProximityUtil.closeEnoughToOtherNationTowns method only requires 1 town (which we'll name "B") in the nation to be close enough to town "A". Therefore, even if town B itself is out of range, neither will be kicked, because they will satisfy each other's requirements.
This means that a nation can have 2+ towns completely detached from its "core" nation range and they will not be kicked.
What is the expected output?
Towny version
0.100.4.2
Server version
1.20.4
Please use Pastebin.com to link the following files
I cannot access those files as I am just a player, however there is no error or permission issue as it appears to be an issue in the code itself.
I can however provide the following config values:
GNATION_SETTINGS_NATION_PROXIMITY_TO_OTHER_NATION_TOWNS = 1000
GNATION_SETTINGS_NATION_PROXIMITY_TO_CAPITAL = 3500
GNATION_SETTINGS_NATION_PROXIMITY_TO_CAPITAL_CAP = 0
The text was updated successfully, but these errors were encountered: