Skip to content
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

Bridge/tunnel remove cost does not take into account road/tram/rail remove cost. #7656

Closed
James103 opened this issue Jul 16, 2019 · 0 comments · Fixed by #8508
Closed

Bridge/tunnel remove cost does not take into account road/tram/rail remove cost. #7656

James103 opened this issue Jul 16, 2019 · 0 comments · Fixed by #8508
Labels
bug Something isn't working
Milestone

Comments

@James103
Copy link
Contributor

James103 commented Jul 16, 2019

Version of OpenTTD

20190707-master-g1e723934a1

Expected result

When removing a bridge (or tunnel), not only should the cost to remove a bridge get factored in, but also the cost to remove any roads/rails/tram tracks that may be on the bridge. Example: Removing a two tile bridge with both road and tram should add £110 to your bank balance (+£304 to remove tram tracks, -£120 to remove roads, -£74 to remove the bridge).

Edit: The same issue affects tunnels as well in the same way.

Actual result

When removing a bridge (or tunnel), any infrastructure on the bridge is not factored into the cost to remove the bridge. In the above example, while the expected cost is -£110 (i.e. add £110 to your bank balance), the actual cost is £74, since only the bridge removal cost is considered here.

Steps to reproduce

  1. Start new game, making sure to load a tram NewGRF.
  2. Build a two-tile bridge (or tunnel).
  3. Build some roads on the bridge.
  4. Build some tramways on the bridge.
  5. Demolish the bridge. "Cost: £74" (current), "Income: £110" (expected).
  6. Repeat steps 2-4.
  7. Remove the tramway. "Income: £304".
  8. Demolish the bridge: "Cost: £74" (current, totals to +£230), "Cost: £194" (expected)

Note: Changing this may expose a free money exploit when also using the Base Costs newGRF to inflate the road/tram removal cost. To prevent that, consider limiting the removal income (for both road and tram) to ~2/3 of the cost to build, just like rail removal.

@James103 James103 changed the title Bridge remove cost does not take into account road/tram/rail remove cost. Bridge/tunnel remove cost does not take into account road/tram/rail remove cost. Jul 25, 2019
@TrueBrain TrueBrain added this to the 1.11.0 milestone Jan 5, 2021
TrueBrain added a commit to TrueBrain/OpenTTD that referenced this issue Jan 6, 2021
…r cost calculation

This means that for rail bridges, the rail is first sold, and the
bridge is destroyed after. This means destroying bridges now often
makes you money, instead of costing.

Similar, with road/tram tracks. Destroying a road+tram bridge now
costs the same amount of money as first removing the tram tracks
and than destroying the road bridge. Especially as tram tracks
generate money when removing, this is a noticeable difference.
@TrueBrain TrueBrain added the bug Something isn't working label Jan 6, 2021
TrueBrain added a commit to TrueBrain/OpenTTD that referenced this issue Jan 6, 2021
…r cost calculation

This means that for rail bridges, the rail is first sold, and the
bridge is destroyed after. This means destroying bridges now often
makes you money, instead of costing.

Similar, with road/tram tracks. Destroying a road+tram bridge now
costs the same amount of money as first removing the tram tracks
and than destroying the road bridge. Especially as tram tracks
generate money when removing, this is a noticeable difference.
TrueBrain added a commit to TrueBrain/OpenTTD that referenced this issue Jan 6, 2021
…acks for cost calculation

This means that for rail tunnel/bridges, the rail is first sold,
and the tunnel/bridge is destroyed after. This means destroying
tunnels/ bridges now often makes you money, instead of costing.

Similar, with road/tram tracks. Destroying a road+tram
tunnel/bridge now costs the same amount of money as first
removing the tram tracks and than destroying the road
tunnel/bridge. Especially as tram tracks generate money when
removing, this is a noticeable difference.
TrueBrain added a commit to TrueBrain/OpenTTD that referenced this issue Jan 6, 2021
…acks for cost calculation

This means that for rail tunnel/bridges, the rail is first sold,
and the tunnel/bridge is destroyed after. This means destroying
tunnels/ bridges now often makes you money, instead of costing.

Similar, with road/tram tracks. Destroying a road+tram
tunnel/bridge now costs the same amount of money as first
removing the tram tracks and than destroying the road
tunnel/bridge. Especially as tram tracks generate money when
removing, this is a noticeable difference.
TrueBrain added a commit to TrueBrain/OpenTTD that referenced this issue Jan 8, 2021
…acks for cost calculation

This means that for rail tunnel/bridges, the rail is first sold,
and the tunnel/bridge is destroyed after. This means destroying
tunnels/ bridges now often makes you money, instead of costing.

Similar, with road/tram tracks. Destroying a road+tram
tunnel/bridge now costs the same amount of money as first
removing the tram tracks and than destroying the road
tunnel/bridge. Especially as tram tracks generate money when
removing, this is a noticeable difference.
TrueBrain added a commit that referenced this issue Jan 8, 2021
…r cost calculation

This means that for rail tunnel/bridges, the rail is first sold,
and the tunnel/bridge is destroyed after. This means destroying
tunnels/ bridges now often makes you money, instead of costing.

Similar, with road/tram tracks. Destroying a road+tram
tunnel/bridge now costs the same amount of money as first
removing the tram tracks and than destroying the road
tunnel/bridge. Especially as tram tracks generate money when
removing, this is a noticeable difference.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants