Add tile parameter for GSCompany.ChangeBankBalance to show text effect if needed #8573
Conversation
|
||
company = ResolveCompanyID(company); | ||
EnforcePrecondition(false, company != COMPANY_INVALID); | ||
|
||
return ScriptObject::DoCommand(0, (uint32)(delta), company | expenses_type << 8 , CMD_CHANGE_BANK_BALANCE); | ||
return ScriptObject::DoCommand(tile == INVALID_TILE ? 0 : tile , (uint32)(delta), company | expenses_type << 8 , CMD_CHANGE_BANK_BALANCE); |
LordAro
Jan 16, 2021
Member
Why use 0 instead of INVALID_TILE ?
Why use 0 instead of INVALID_TILE ?
ldpl
Jan 16, 2021
Author
Contributor
In network commands 0 stands for invalid tile. If you pass INVALID_TILE there it will just ignore the command.
In network commands 0 stands for invalid tile. If you pass INVALID_TILE there it will just ignore the command.
LordAro
Jan 18, 2021
Member
Can we have a comment stating as such? It's not clear :)
Can we have a comment stating as such? It's not clear :)
…ext effect if needed
LGTM |
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.
Add an extra tile parameter to GSCompany.ChangeBankBalance that if set to a valid tile triggers an income/cost text effect. Can be used to better communicate balance changes to a player when they can be related to a certain location. E.g. fees for using road of other company or passing a toll booth.

GS for testing: money-spring.zip
Checklist for review