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

Streetcar track removal fails when bank balance negative #8068

Closed
bfut opened this issue Apr 8, 2020 · 2 comments
Closed

Streetcar track removal fails when bank balance negative #8068

bfut opened this issue Apr 8, 2020 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@bfut
Copy link

bfut commented Apr 8, 2020

Version of OpenTTD

20200407-master-gd50e4641ae

Expected result

Removing streetcar track generates income, e.g. €156.

Actual result

Removing streetcar track issues error, e.g. "Not enough cash - requires -€156", when bank balance is negative, but generates income when bank balance is positive. Haven't checked bank balance equal to zero.

Steps to reproduce

  1. Start new game, making sure to load a tram NewGRF. Tested with Fake Subways + other NewGRFs, and vanilla + CZTR Tram set)
  2. Build streetcar tracks.
  3. Reduce bank balance until negative.
  4. Attempt removing streetcar track, see screenshot.
    Screenshot from 2020-04-08 13-42-21

Note: may be related to #7656, even though not a duplicate

@James103
Copy link
Contributor

James103 commented Apr 8, 2020

Can reproduce in 1.10.0 stable, tried removing tram track on both normal road and bridges. Only occurs if current bank balance (negative) plus removal cost (positive) < 0.

@TrueBrain TrueBrain added the bug Something isn't working label Jan 6, 2021
@TrueBrain TrueBrain added this to the 1.11.0 milestone Jan 6, 2021
@TrueBrain
Copy link
Member

Thank you @James103 for that final remark ("Only occurs if current bank balance (negative) plus removal cost (positive) < 0."). Took me a while to reproduce :D I was balancing in the in-between at first, not being able to reproduce :D Bug confirmed, fix incoming :)

TrueBrain added a commit to TrueBrain/OpenTTD that referenced this issue Jan 6, 2021
…s money

Even if you are completely broke, generating money should always
be allowed.
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
Development

No branches or pull requests

3 participants