Up to now `eslint-plugin-brace-rules` was used to enforce a common brace
style for JavaScript code. This plugin was however updated the last time
over 9 years ago and will be incompatible with ESLint v10, as that
[removes `context.getSourceCode()`][1], the plugin relies on.
To keep the eslint config working with ESLint v10, this replaces
`eslint-plugin-brace-rules` with the [`@stylistic/brace-style`][2] rule
from `@stylistic/eslint-plugin`, a package we already use.
While `@stylistic/brace-style` doesn't offer an option to format braces
in exactly the same way as before, the "allman" style seems to be the
one closest to the existing code.
[1]: https://eslint.org/blog/2025/11/eslint-v10.0.0-alpha.0-released/#removed-deprecated-rule-context-members
[2]: https://eslint.style/rules/brace-style
During the eslint 8 cycle the formatting rules were split out [1],
deprecating the corresponding rules in core.
This replaces all rules that where moved to @stylistic/eslint-plugin [2]
and accounts for the difference in the indenting rule behaviour.
To allow the pre-commit import hack to continue to work with the
stylisitc plugin for a recent nodejs version to be used.
[1] https://eslint.org/blog/2023/10/deprecating-formatting-rules/
[2] https://eslint.style/packages/default
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
-lets building arrows target the closest unit by default.
-adds player control of building arrows.
-adds a tooltip to explain how to control arrows.
-Uses "F" for focus fire and concurrently use "F" for force-attack, since "C" is capture.
Who says only players should be able to conduct diplomacy?
Also separation of concerns, more maintainable files.
Differential revision: https://code.wildfiregames.com/D4921
Comments by: @elexis, @Stan
Refs. #5894
This was SVN commit r27722.
`ElevationBonus` is vague, as discussions proved. Therefore it is
renamed to `Origin`, which, describes better what the value stands for.
`Delay` is also quite vague, so renamed to `EffectDelay`.
Differential revision: https://code.wildfiregames.com/D2016
Comments by: @bb, @nani, @Nescio, @Silier, @Stan, @wraitii
This was SVN commit r26074.
Less object creations at addition time, more intuitive handling.
Differential revision: https://code.wildfiregames.com/D3854
Comments by: @Stan, @wraitii
This was SVN commit r25276.
While they often look alike, their behaviour is totally different.
This split has some implications:
- There are now separate auras for garrisoning and turrets.
- Entities can now have both turret points and garrison slots,
independent of eachother.
In general previous behaviour is maintained as much as possible.
Differential revision: D3150
Comments by: @Nescio, @wraitii
Tested by: @v32itas
This was SVN commit r25123.
Units sometimes ignored targets that entered their LoS. The cause is
d0fc8ff67d: range queries returned units farther away, and those units
might actually be out of range if distance is computed center-to-center,
which both UnitAI and LOS do. This meant that code relying on range
query updates was possibly broken, and indeed units missed things (see
ticket).
This introduces a boolean to switch between pre-d0fc8ff67d behaviour
(entity-as-point, center-to-center range queries) and post-d0fc8ff67d
(entities-as-circumscribing-circle, edge-to-edge range queries).
The former is used for UnitAI (where the new behaviour bugged), auras
(where varying structure sizes made it awkward) and build
restrictions(which simply did not really need it).
Reverts 7f1ee23d88, 050c5401b1 (with the exception of the iber monument
footprint), and the template changes in d0fc8ff67d itself.
It also reduces alertRaiser ranges slightly, this was missed in the
original diff.
#3381 is not reopened as BuildingAI still uses the new range queries.
Reported by: Freagarach
Comments By: Angen
Fixes#5968
Differential Revision: https://code.wildfiregames.com/D3456
This was SVN commit r24776.
CCmpRangeManager queries do not take obstruction size into account,
meaning they return fewer entities than they should. This particularly
affects buildings with ranged attacks, gates, and a few other templates.
This is, unfortunately, a slight performance decrease.
Discovered following Angen's comment [[
https://code.wildfiregames.com/D2738#116269 | here ]].
Comments by: Angen
Reviewed By: bb
Refs #3381 (not marking it down as 'fixes' and I'm not entirely sure it
was the only moving part here).
Differential Revision: https://code.wildfiregames.com/D2759
This was SVN commit r24217.
The logic concerning visible garrison points (i.e. turrets) is moved
from `GarrisonHolder` to a separate file.
This is logical because garrisoned != turreted, so this allows for
turrets that cannot be garrisoned (refs. D1958).
Also references #3488.
Differential Revision: D2367
Reviewed by: @wraitii
This was SVN commit r23856.
This moves most of what was in the Damage system component to a helper,
and renames that component DelayedDamage.
It also introduces a new global script with all possible attack effects.
Comments Taken From: Freagarach, Stan, bb
Differential Revision: https://code.wildfiregames.com/D2092
This was SVN commit r22754.
Add "melee", "ranged" etc. to the template tag name,
Allow and use specific sounds for slaughter,
Rearrange the templates a bit, and so add missing sounds.
Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D757
This was SVN commit r20367.
Patch By: bb
Differential Revision: D121
Refs: #4326
Removes the Random.js simulation helper and randomFloat function of the
random map scripts library.
Adds randomIntInclusive and randomIntExclusive to make the calls more
readable and fix and prevent off-by-one mistakes.
Adds randBool and use it in an AI occurance. It will be used in many
places by the random map scripts.
Use the pickRandom function introduced in 3c56638e8b in more applicable
occurances.
Replace remaining occurances of Math.random() with the new functions to
easily test completeness.
Cleanup of the random map script functions will come in a separate
commit.
This was SVN commit r19270.
This is in turn used by GetEnemies and the new GetAllies and
GetMutualAllies.
Use these in a few places as those are common queries.
Fixes#4161.
Reviewed by: fatherbushido
This was SVN commit r18649.
Notice the previous check `if (count > this.GetMaxArrowCount())`
implicitly relied on
numerical comparisons returning false if one of the two arguments is
undefined.
This was SVN commit r17944.
To achieve this, mirage entities are created per player, to replace the
real entities when these ones fall into the fog-of-war. These mirage
entities are created on-the-fly, and destroyed when they get back in
sight.
This depends heavily on the VisibilityChanged message added in
2174eaaeee.
As a temporary adjustment, territories do not explore the map anymore
when their borders change. See #2709.
Fixes#599
This was SVN commit r15612.