Change: move "give money" from client-list to company window

This is a much better location for this button, as you send
money from one company to another company, not from player
to player.

This is based on work done by JGRPP in:
f820543391
and surrounding commits, which took the work from estys:
https://www.tt-forums.net/viewtopic.php?p=1183311#p1183311

We did modify it to fix several bugs and clean up the code while
here anyway.

The callback was removed, as it meant a modified client could
prevent anyone from seeing money was transfered. The message
is now generated in the command itself, making that impossible.
This commit is contained in:
Patric Stout
2021-01-05 18:06:48 +01:00
committed by Patric Stout
parent d6e15d4943
commit 62cdadb582
15 changed files with 96 additions and 124 deletions

View File

@@ -46,6 +46,9 @@ enum CompanyWidgets {
WID_C_VIEW_INFRASTRUCTURE, ///< Panel about infrastructure.
WID_C_SELECT_GIVE_MONEY, ///< Selection widget for the give money button.
WID_C_GIVE_MONEY, ///< Button to give money.
WID_C_HAS_PASSWORD, ///< Has company password lock.
WID_C_SELECT_MULTIPLAYER, ///< Multiplayer selection panel.
WID_C_COMPANY_PASSWORD, ///< Button to set company password.