Move "give money" to company window
Posted: 07 Jan 2013 17:52
An attempt to implement "Change the "give money to" function so that money is donated to the company and not a specific player" (from the TODO list) raises some questions which I would like to hear your opinions on. My implementation basically adds a button to the company gui and removes the give money selection from the client list.
This allows giving money to a company which has no player. However, since the original implementation of the "give money" feature uses the "send to team" network chat functionality to notify the players, and since there is no player in that team, the message is not displayed for any player (also not at the giver). So, there is no confirmation, that the action succeeded (other than the decreased money...). The question is now, whether this is desireable and, if not, what would be the best solution.
The easiest one is not to display the button, if there is no player in the company, but i doubt that this is a good solution, since it relates the company finance to the network status.
A second also rather easy option would be to change the type of the message not to be a team chat, but a broadcast, making it available to all players (incl. spectators), so it is not "secret" any more. This is also very easy to implement, but still does not convince me to 100%.
The third option, that comes to my mind is to make a newspaper message of the company information category of it. This also would make it an "official" notification, not related to the network at all, and would allow to include the give-money feature also in offline/singleplayer mode (e.g., to finacially support an AI). (Potentially, this would alo require a notification to the AI so it can react. (Are there even notification callbacks for the AI? This is IMHO already an additional step/patch on top then.))
Any other ideas? What are your thoughts on this? I would be interested in your opinions.
This allows giving money to a company which has no player. However, since the original implementation of the "give money" feature uses the "send to team" network chat functionality to notify the players, and since there is no player in that team, the message is not displayed for any player (also not at the giver). So, there is no confirmation, that the action succeeded (other than the decreased money...). The question is now, whether this is desireable and, if not, what would be the best solution.
The easiest one is not to display the button, if there is no player in the company, but i doubt that this is a good solution, since it relates the company finance to the network status.
A second also rather easy option would be to change the type of the message not to be a team chat, but a broadcast, making it available to all players (incl. spectators), so it is not "secret" any more. This is also very easy to implement, but still does not convince me to 100%.
The third option, that comes to my mind is to make a newspaper message of the company information category of it. This also would make it an "official" notification, not related to the network at all, and would allow to include the give-money feature also in offline/singleplayer mode (e.g., to finacially support an AI). (Potentially, this would alo require a notification to the AI so it can react. (Are there even notification callbacks for the AI? This is IMHO already an additional step/patch on top then.))
Any other ideas? What are your thoughts on this? I would be interested in your opinions.