Don't increase entity limit counter when we upgrade to an entity with the same restriction category.
Summary:
In some mods (for hero) or in the current game (for sentry tower), when we have reach the entity limit related to a restriction category, we can't upgrade any entity wich have that restriction category to one with the same restriction category (for example, upgrading an hero to an hero as the 1 max limit is yet reached).
That diff should allow that in the gui and the sim.
Code could be concatenated. So comments are welcome.
Test Plan:
For in game testing, you can for example in the Player template reduce the DefenseTower limit to 2. Then build 2 sentry towers.
Without the patch you can't upgrade any of them. With you can upgrade them to defense tower.
Reviewers: wraitii, O8 JS GUI, O2 JS Simulation
Reviewed By: wraitii, O8 JS GUI, O2 JS Simulation
Subscribers: leper, mimo, wraitii, Vulcan, O8 JS GUI
Differential Revision: https://code.wildfiregames.com/D81