Shared resources were introduced
here.
There are bugs in the implementation that are visible when one player is a net consumer (negative resources) and for another is a net producer (positive resources).
The bugs are most visible when the producer reaches the shared resource cap. For example, one faction, a producer, might have 4000/2000 gold when total storage is 4000, (2000 for each faction), while the other faction, a consumer, might have -3900 gold. The combined gold of the two factions only 100, but now, the producer cannot store any more gold; the only way for the team to get more gold is for the faction with negative gold to produce some. This kind of situation might occur when players agree to handle different roles (e.g. resources/combat), or when one player is a human and the other is CPU.
Now destroy the producer's storage building. The team's storage capacity decreases by 2000. However, the producer now has 0/0 gold--it decreased from 4000/2000! The consumer still has -3900 gold, so the team now has -3900 gold. The consumer now has to make up the gold debt before anything else can happen.
Desired behaviour:
There should be no resource cap per player; it should be possible for two players to respectively have, for example, 10000/2000 and -9999/2000, for a team total of 1/4000.
The individual resource count/cap should only be the net produced/consumed, which is just some possibly interesting information; it should have no effect on the game. Only the team total resource count/cap should matter.
When storage capacity is destroyed and it is necessary to cap the team's resources, it should only be decreased to the team's total storage cap; the deducted amount can be subtracted from the destroyed player's resource count, if it is necessary to keep track of that, but again, the individual resource counts should have no effect.