HomeWildfire Games

Don't increase entity limit counter when we upgrade to an entity with the same…

Description

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

Details

Committed
fatherbushidoFeb 1 2017, 5:35 PM
Reviewer
Restricted Owners Package
Differential Revision
Restricted Differential Revision
Parents
rP19194: Improve AI chat messages
Branches
Unknown
Tags
Unknown
Build Status
Buildable 433
Build 700: Post-Commit BuildJenkins