1
0
forked from 0ad/0ad
Commit Graph

21759 Commits

Author SHA1 Message Date
9db72570c2 Disable wicker baskets on polar sea.
There is no fruit on the map, therefore much like wood techs, the fruit
tech is disabled.

Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D3595
This was SVN commit r25059.
2021-03-15 15:52:32 +00:00
8e34371deb Streamline ship stats.
- Fishing boat build time from 20 to 15 (5 less than bireme/merchant).
- Quinquereme population from 3 to 5 (biremes have 2, triremes 3)
- Warships get a 2:1 wood to metal cost
- Loot is standardized to 20% of costs, XP to 10% of health, similar to
siege engines and structures.
- Fishing boath & Merchant ship have the same resistance as warships but
accordingly lower HP, for easier stat comparison.

Patch by: Nescio
Accepted By: borg-, wraitii
Differential Revision: https://code.wildfiregames.com/D2956
This was SVN commit r25058.
2021-03-15 15:45:20 +00:00
f05235ec09 Lower cavalry melee attack range again.
D3482/5701ffccf8 raised the melee attack range to 6 to compensate for
movement over a turn with 500ms MP turns.
Following D3275/d4c2cf4430, this is no longer necessary. Revert to 4
(half the footprint length + 1 & their capture range).

Patch by: Nescio
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3673
This was SVN commit r25057.
2021-03-15 15:38:41 +00:00
c9f37fc613 Lint update: use arclint, remove JSHint, remove coala on CI.
This runs linting using the "arc lint" command of arcanist, which
notably gets run automatically as part of the arc diff workflow.

Changes:
- The major change is that arc lint reports, by default, only issues on
changed lines instead of changed files (--lintall changes that).
- JSHint is largely redundant with eslint and does not support some of
the new Javascript functionality that we are able to use in 0 A.D., such
as conditional chaining, thus it is removed (of course, users can still
run it manually).
- Eslint 7 is supported out of the box and updated to ES 2020
- cppcheck and eslint are optional - if the executable is not found
(e.g. in PATH), it will fallback to a 'dummy' PHP script that does
nothing. This has been tested on windows, mac and Debian (CI).
- The licence year linter now suggests replacement, and has been
rewritten as an arcanist linter.
- Add a JSON error linter.

The intention is to have non-intrusive external linting, and largely the
same text linting.

Coala has largely gone unmaintained in the past few years (more so than
arcanist anyways) and installing it on modern Python is convoluted.

Differential Revision: https://code.wildfiregames.com/D3639
This was SVN commit r25056.
2021-03-15 15:14:28 +00:00
ab53a351ba Fix siege_attack tech not affecting Maurya.
Patch by: borg-
Accepted By: Nescio, wraitii
Differential Revision: https://code.wildfiregames.com/D3655
This was SVN commit r25055.
2021-03-15 10:15:00 +00:00
7026d1a702 Fix typo in prop-point of Iberian blacksmith.
Patch by: @nwtour
Differential revision: D3667
Reviewed by: @Stan
This was SVN commit r25054.
2021-03-15 08:49:52 +00:00
6bd30fe150 Elephant_stables -> elephant_stable.
- Renames the elephant_stables.xml templates to elephant_stable.xml
(without plural s), as well as their generic template_*.xml parent,
consistent with e.g the stable.
- Corrects all occurrences in simulation and map files accordingly.
- Renames the stable and elephant stable audio files.
- Drops pers_ from the barrack.png and stable.png icons.

Patch by: @Nescio
Differential revision: D3343
This was SVN commit r25053.
2021-03-15 08:45:09 +00:00
8dc86d20bb Improve Army camp and Amun temple tooltips.
Mention they train ranked entities.

Patch by: @borg-
Differential revision: D3677
Reviewed by: @Nescio
This was SVN commit r25052.
2021-03-15 08:34:37 +00:00
Angen
2f5c99776e Fix 85f8d97859
This was SVN commit r25050.
2021-03-14 13:00:13 +00:00
Angen
85f8d97859 Add missing queueplanBuilding.js changes lost somewhere when updating D3654
This was SVN commit r25049.
2021-03-14 12:59:10 +00:00
Angen
6598433108 Call get without has in getEntityById
getEntityById calls .has before actually getting the entity by .get and
otherwise returns undefined.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/get

The element associated with the specified key, or undefined if the key
can't be found in the Map object.

So calling has is redundant causing performance loss.

Differential revision: D3653
Reviewed by: @Freagarach
This was SVN commit r25048.
2021-03-14 12:45:08 +00:00
Angen
665f16d1bb Let Petra to build apartments
Teach her to build advanced houses available for cart players as they
provide more population.

Reviewed by: @Freagarach
Differential revision: D3654
This was SVN commit r25047.
2021-03-14 12:43:19 +00:00
56047ac9fa Adds logs to CameraController for speed changes of camera scroll, rotate and zoom.
Patch By: nwtour
Differential Revision: https://code.wildfiregames.com/D3604
This was SVN commit r25045.
2021-03-12 20:57:33 +00:00
f1e1edad43 Move movement logic from UnitAIs "Garrisoned"-state to approaching.
Reduces switching of states, improves readability.

Refs. #6081
Differential revision: D2368
Comments by: @Stan, @wraitii
This was SVN commit r25044.
2021-03-12 19:53:52 +00:00
90831d5d88 Let PetraAI use the GarrisonHolder from cmpGarrisonable instead of UnitAI.
References 3851a48298.

Differential revision: D3645
Reviewed by: @Angen
This was SVN commit r25043.
2021-03-12 19:47:31 +00:00
4d58b0729e Moves CreateDateTimeInstance from the public L10n header to its implementation.
This was SVN commit r25042.
2021-03-12 09:11:22 +00:00
d6ddc4f3ac Removes tinygettext from the L10n header.
Noticed By: nwtour
This was SVN commit r25041.
2021-03-12 08:51:50 +00:00
533e78b2e5 Clean up RemoveBatch -> RemoveItem code in ProductionQueue.
- Rename `RemoveBatch` to `RemoveItem`.
- Refactor that function. (Don't clear the cached entities when *any*
item is removed.)

Fixes the bug that the training is still blocked when a tech is the next
in the queue and the blocking item is removed.

Based on a patch by: @Polakrity
Differential revision: D1843
Comments by: @Angen, @bb
This was SVN commit r25040.
2021-03-12 08:45:39 +00:00
cd705967ce Clean up timer code in production queue.
- Use an interval instead of requesting a timeout every timeout.
- Integrate the lateness-parameter.
- Some other cleanup.
- Don't create objects for null values in messages.
- Don't create this.timer on init.

Based on a patch by: @Polakrity
Differential revision: D1906
Comments by: @Angen, @Stan
This was SVN commit r25038.
2021-03-12 07:22:52 +00:00
c4ab28cdbe Improve consistency in tutorial and random map texts.
- Combines multi-spaces into one.
- `\u000a` -> `\n`.
- Proper quotation marks instead of programmers quotes.
- A few typos.
- Capitalise classes.

Scenarios and skirmishes are excluded due to checkrefs.pl not being able
to handle proper quotes in XML.

Patch by: @Nescio
Differential revision: D3493
Comments by: @Stan
This was SVN commit r25037.
2021-03-12 06:52:26 +00:00
d46d0032ca Clean attack lines in templates.
- Listing all damage types everywhere is not needed anymore, therefore
0-damage lines are purged.
- Trailing zeros are removed from <Attack> node lines (e.g. <MaxRange>,
<Spread>), per @bb.
- Attack nodes in templates that were effectively replaced by all their
children are deleted too.
- Clean up the confusing and haphazard attack situation in the fauna
templates.
- The now obsolete template_unit_fauna_wild_defensive_fox.xml is
deleted.
- All animals got an attack range that's at half their footprint length
+ 1 and an attack <PrepareTime> that's half their <RepeatTime>, for
consistency.

Patch by: @Nescio
Differential revision: D3342
This was SVN commit r25036.
2021-03-12 06:43:47 +00:00
96ab4a2de6 Fix ownership changing assertion with a garrison holder with multiple garrisoned entities.
In lieu of a better solution.

Reverts: 4b951cf4ba

This was SVN commit r25034.
2021-03-11 06:14:13 +00:00
7376e43e06 Fix typos in log and warn messages
Patch by: LudovicRousseau
Refs: #6098

Differential Revision: https://code.wildfiregames.com/D3659
Differential Revision: https://code.wildfiregames.com/D3660
This was SVN commit r25033.
2021-03-10 16:50:15 +00:00
4b951cf4ba Handle ownership changes of a garrisoned entity in cmpGarrisonable.
Makes sure GarrisonHolders don't need to needlessly listen to global
ownership changes anymore.
Also fixes dying entities on turret points.

Refs. #6081
Differential revision: D3648
This was SVN commit r25031.
2021-03-08 07:26:09 +00:00
d3c3072c83 Give the Garrisonable component the power to set garrisoned on an entity with UnitAI, instead of leaving it to UnitAI.
Since the only way of garrisoning is using `cmpGarrisonable`.
025a00340e introduced the `this.isGarrisoned`-flag, its meaning was
discussed in https://code.wildfiregames.com/D1403.

Refs. #5979, #6081
Differential revision: D2379
Comments by: @elexis, @Stan, @wraitii
This was SVN commit r25030.
2021-03-08 07:19:06 +00:00
c310d4afcd Use seperate message to handle skirmish replacements.
Meaning GarrisonHolders won't listen for GlobalEntityRenamed messages
uselessly for the rest of the match after init.

Refs. #6081
Differential revision: D3627
This was SVN commit r25029.
2021-03-08 07:01:17 +00:00
637e44cfd7 Hotkey search - lowercase comparison.
It is better to do case-insensitive search.
Improves on a4852c4c01, though the sensitivity is only an issue since
09ad8bfbe5

Tested by: nwtour
Reported by: nwtour
Differential Revision: https://code.wildfiregames.com/D3647
This was SVN commit r25027.
2021-03-07 15:29:19 +00:00
839cd0ec12 Update the replay cache to consider modification time.
This makes the cache work consistently if replays are changed
externally.

Patch by: nwtour
Differential Revision: https://code.wildfiregames.com/D3615
This was SVN commit r25026.
2021-03-07 08:55:27 +00:00
e24e48f32d Fix AutoGarrison UnitAI order.
Typo introduced in e18001e897.
Found by PetraAI.

Differential revision: D3643
Fixes #6089
Comment by: @wraitii
This was SVN commit r25025.
2021-03-07 06:54:28 +00:00
b48cd5244f Fix PushOrderFront with construction.
POF introduced in afd1eaee0d.
Placing foundations takes another route, for which was warned in the
original ticket but not done nonetheless.
This fixes that route.

Differential revision: D3642
Comments by: @wraitii
Fixes #6090

This was SVN commit r25024.
2021-03-07 05:55:57 +00:00
09ad8bfbe5 Customize hotkey categories & ordering, prepare for translation.
- adds JSON files to specify the human-readable categorization, name and
description of hotkeys.
- clean up code

Translation support via messages.json not yet added - the strings need
another pass and that avoids translators doing redundant work. See D3641

Refs #5867, Refs #5996

Differential Revision: https://code.wildfiregames.com/D3596
This was SVN commit r25023.
2021-03-06 18:11:41 +00:00
3b3a297cca Fix checkrefs following D11 / 1c9efa6fb5
Fixes D11 / 1c9efa6fb5.

The problem is that some GUI pages were simply named "page.xml" which
the regex didn't like.

Accepted By: Nescio
Differential Revision: https://code.wildfiregames.com/D3644
This was SVN commit r25022.
2021-03-06 13:57:11 +00:00
afd1eaee0d Allow players to push orders to the front of the queue.
Differential revision: D3605
This was SVN commit r25020.
2021-03-06 06:12:07 +00:00
979636cc57 Ungarrison entities using cmpGarrisonable.
Follow-up to e18001e897.
This moves responsibilities even further to the garrisoning entity.

Fixes the garrison flag when renaming entities cannot garrison (#5906).
Allows easy fixing of #6087.

Ticket: #6081
Differential revision: D3628
Comments by: @Stan, @wraitii (also in length on IRC)
This was SVN commit r25019.
2021-03-06 06:07:32 +00:00
76af18b23a Removes deprecated gl_*Matrix builtins from GLSL shaders.
Tested By: Freagarach, Stan
Differential Revision: https://code.wildfiregames.com/D3635
This was SVN commit r25018.
2021-03-05 22:32:32 +00:00
373b8b6ff1 Fix 4b7b9325ac - idle units are frozen in walk anim.
Fixes 4b7b9325ac

Differential Revision: https://code.wildfiregames.com/D3640
This was SVN commit r25017.
2021-03-05 18:34:06 +00:00
2be7479265 Fix quickloading/quicksaving following d4c2cf4430
Fixes d4c2cf4430.

Differential Revision: https://code.wildfiregames.com/D3636
This was SVN commit r25016.
2021-03-05 13:36:27 +00:00
4718690f71 Make attacker data explicitly optional in status effects.
Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D3633
This was SVN commit r25015.
2021-03-05 09:40:23 +00:00
b4fd4ab655 Combine attacker data in "data"-object in attack-related code.
Allowing for easier introduction of new parameters.
Split from D781, (D368).

Differential revision: D2269
Comments by: @Angen, @Stan, @wraitii
Idea accepted by: @wraitii
This was SVN commit r25013.
2021-03-05 06:32:44 +00:00
4b7b9325ac Fix a rare case of unit 'gliding' while moving.
Fixes a1dc9cadd8: if the speed doesn't change, UnitMotion doesn't update
the visual actor. Unfortunately, if another component has in the
meantime reset the animation to 'Idle', the unit will now move while
Idle. This can happen when leaving formation to do something else,
though it'srare.

This fixes that by instead always calling VisualActor, which does its
own checking to avoid redundancy. It's a bit less efficient, but not too
much.
Note that this relies on UnitMotion::UpdateMovementState being called
after any UnitAI code that could reset the animation to IDLE.

Differential Revision: https://code.wildfiregames.com/D3619
This was SVN commit r25011.
2021-03-04 18:32:48 +00:00
007bf75264 Fix map previews/descriptions in the lobby game list.
Map previews are broken in the lobby game list, except for maps with
specific previews (such as biome RMs). Descriptions were broken in
general. The error lies in 1ae4f497e8, which forgot to add the xml
extension.

Differential Revision: https://code.wildfiregames.com/D3632
This was SVN commit r25010.
2021-03-04 18:31:33 +00:00
765a40ac5c Fix compilation with --without-audio
Compilation --without-audio was broken since D3108 / 876f6d5e50

Patch by: nwtour
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3631
This was SVN commit r25009.
2021-03-04 17:36:24 +00:00
40399011f7 Fixes revealed missed include after e104b41be2.
This was SVN commit r25008.
2021-03-04 08:55:49 +00:00
cfaddf51f9 Remove 'New' tag on Atlas Valleys
Missed in 68b81f63b1.

Reported by: langbart
This was SVN commit r25007.
2021-03-04 08:40:04 +00:00
8fe9e420ee Fixes removed include after 2e4639e6dc.
This was SVN commit r25005.
2021-03-03 23:07:50 +00:00
2e4639e6dc Removes unused containers included in headers.
This was SVN commit r25004.
2021-03-03 23:01:08 +00:00
c29423c723 Fixes revealed missed includes after e104b41be2.
This was SVN commit r25003.
2021-03-03 22:38:59 +00:00
e104b41be2 Cleanups includes for cassert and streams.
This was SVN commit r25002.
2021-03-03 22:26:49 +00:00
d4c2cf4430 Increase MP Command delay to 4 turns, decrease MP turns to 200ms.
To hide network latency, MP turns send commands not for the next turn
but N turns after that (introduced in c684c211a2).
Further, MP turn length was increased to 500ms compared to 200ms SP
turns (introduced in 6a15b78c98).
Unfortunately, increasing MP turn length has negative consequences:
- makes pathfinding/unit motion much worse & unit behaviour worse in
general.
- makes the game more 'lag-spikey', since computations are done less
often, but thus then can take more time.

This diff essentially reverts 6a15b78c98, instead increasing
COMMAND_DELAY from 2 to 4 in MP. This:
- Reduces the 'inherent command lag' in MP from 1000ms to 800ms
- Increases the lag range at which MP will run smoothtly from 500ms to
600ms
- makes SP and MP turns behave identically again, removing the
hindrances described above.

As a side effect, single-player was not actually using COMMAND_DELAY,
this is now done (can be used to simulate MP command lag).

Refs #3752

Differential Revision: https://code.wildfiregames.com/D3275
This was SVN commit r25001.
2021-03-03 21:02:57 +00:00
5e6b775d1a [Gameplay] - Search for resources near a current location before the init-pos.
This should bring the behaviour back to pre-A24 and means entities will
stray a lot less when gathering.
The entity will search close to the current position, which is mostly
next to a dropsite.
When there is nothing found there, the entity searches nigh the initPos.

Differential revision: D3607
Comments by: @wraitii
Tested by: @Nescio
This was SVN commit r25000.
2021-03-03 18:24:16 +00:00