Allow deleting of miraged foundations.
Add component method to set units undeletable. Based on patch by bb,
refs #3102.
If the control-all-units cheat is active, delete sheep, mostly captured
buildings and undeletable units.
Merge duplicate delete checks in the GUI. Thereby take into account the
control-all-units cheat and undeletability in all places.
Disable the delete button if the entity can't be deleted.
Add a tooltip for undeletability.
Don't colorize whitespace.
Remove unneeded comments.
This was SVN commit r18487.
Add comments to document that GetEntityState and GetTemplateDataHelper
need to use the same object structure.
Remove four unneeded conditionals that are always true from
GetTemplateDataHelper.
Inline 3 splash damage variables in the attack component.
This was SVN commit r18485.
The order change to GetAttackTypes in a09c59e044 revealed that it was
only the GUI not triggering the buggy code.
Eliminate for-each of UnitAI calling that function.
This was SVN commit r18481.
Cache the viewed profile directly.
Remove the rating check since it is always true ("-2" used if the rating
doesn't exist).
This was SVN commit r18474.
Use the cheat multiplier for upgrading and un/packing.
Remove if-statements that are always true.
Remove unused undefined "time" item from array in the selection panel.
Pass that object directly instead of copying each property explicitly.
Various indentation fixes in the selection panel code.
This was SVN commit r18472.
This new components allows giving the upgrade a cost, required
technologies, and a required time.
Implement gates using this generic component.
Fixes#2706
This was SVN commit r18467.
Use .filter(), .every() and .some() to simplify, Math.max/min instead of
if-statements, inline functions, add newlines and allow attack orders
while flying.
This was SVN commit r18465.
Also clean up the Health component.
Rename healer to heal (as that is the actual component name).
Remove the structure tree code to replace a proper Templates.js
implementation.
This was SVN commit r18464.
Show how many units can be garrisoned, the number of arrows shot by
default, per unit and limit, fixes#3816.
Thus remove a lot of hardcoded numbers in the translated strings and
correct a wrong number for the mauryan ship, fixes#3904.
This was SVN commit r18455.
Also contains a patch by fatherbushido for attackRateDetails and
getAttackTooltip to
not show something broken for buildingAI units that can capture, fixes
#4061 (see #4000).
Make tooltip functions uniform.
Pass template everywhere
instead of template.armour in getArmorTooltip
rate in getRepairRateTooltip and getBuildRateTooltip and
entState in attackRateDetails.
Add an early return for every tooltip function.
Use empty string instead of "Armor: (None)" for trees etc..
Don't prefix tooltip return values with "\n", but let the user of that
function add them.
Thus make tooltip concatenation much nicer (f.e. draw.js).
Use a loop instead of duplicating per damage type in damageTypesToText.
Add font functions to avoid duplicating tag code.
Merge sprintf's and inline variables.
Add few TODOs.
Fix some strings:
Use "%(specificName)s %(fontStart)s(%(genericName)s)%(fontEnd)s")
instead of "(" + foo + ")" ...
Use existing "%(percentage)s%%" instead of foo + "%" in
armorLevelToPercentageString.
Remove
duplication by calling/introducing shared functions (getEntityTooltip,
getHealthTooltip, getGatherTooltip, getVisibleEntityClassesFormatted),
unused function damageTypeDetails which was also a duplicate of
damageTypesToText,
unused function damageValues,
some warns that are equivalent to errors they attempt to cover up
(getAttackTypeLabel, getCostComponentDisplayIcon, getEntityNames,
getEntityNamesFormatted),
some unused variables,
"???" and translate("???").
Don't fix translate("Foo:") strings to avoid a lot of translation work.
This was SVN commit r18454.
It might be unexpected in the first place to let them gather.
(However that is not really weirder than having cavalry hunt sheep.)
This was SVN commit r18453.