small bug in supplyradius widget

When sharing a unit which provides supplies to an enemy, the supplyradius widget does not remove the circle for this units.

See screenshots:

Then after sharing the deployed supply truck to the enemy:

This change fixes it:

@@ -562,11 +562,8 @@
 function widget:UnitTaken(unitID, unitDefID, unitTeam, newTeam)
-       local _, _, inBuild = GetUnitIsStunned(unitID)
-       if inBuild then
-               widget:UnitCreated(unitID, unitDefID, unitTeam)
-       else
-               widget:UnitFinished(unitID, unitDefID, unitTeam)
+       if (not AreTeamsAllied(unitTeam, newTeam)) then
+               widget:UnitDestroyed(unitID, unitDefID, unitTeam)

If you don’t mind a bunch of whitespace changes (I’ve always set up my editor to remove trailing whitespace from every line), then I could commit it myself.

Go ahead and commit. Looks like I misinterpreted UnitTaken.


Yeah, UnitGiven is ‘units are given to this team’ and UnitTaken is ‘units are taken away from this team’.