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
Incorrect value for "Cost to Clear" for Company Headquarters in tile inspector #6938
Comments
It seems the issue is here: Lines 196 to 200 in fbfa4eb
I guess the logic is to raise temporarily the company value to its maximum, so no operation can fail. Anyway 1% of INT64_MAX are the 92,233,720,368,546,758 here in question. I'm not really seasoned in the openttd code, but why can't |
Summary of IRC: This bug only appears when magic bulldozer is enabled. Otherwise, the HQ is unmovable and doesn't have a removal cost associated with it Using git blame on misc_gui.cpp, you can see that |
@James103 Can you confirm it is only reproducible if the "magic bulldozer" is enabled? |
These meddling kids dared to play with magic, but the ancients texts weren't ready for that. Refactors logic to estimate costs that dated to even before OpenTTD 0.1;
I notice that when I use the tile inspector on my company headquarters (if I have one), then the "Cost to Clear" value is incorrect. Specifically, it shows up as £92 quadrillion instead of (for a company value of £1 million) £10,000. If I were to a actually demolish/relocate the headquarters, it would deduct £10,000 (for a company value of £1 million) from my bank balance.
What should have happened was that the "Cost to Clear" shows up as 1% of my company value for my headquarters, or "N/A" for another company's headquarters. What actually happened was it still shows "N/A" for another company's headquarters (expected), but it always shows £92 quadrillion as the "Cost to Clear" for my headquarters, regardless of my company's value.
To reproduce this unexpected behaviour, do the following:
A possible cause of this bug is that the Land Area Information tool gives the "Cost to Clear" as if your company value is always £9 quintillion (64-bit signed max) instead of (for example) £1 million. If that's the case, possible solutions include:
I'm leaning towards the following: If the magic bulldozer cheat is enabled, use plan B. Otherwise, use plan A.
The text was updated successfully, but these errors were encountered: