1
0
forked from 0ad/0ad
Commit Graph

17914 Commits

Author SHA1 Message Date
b856281197 Alpha 12 version of Premake 5, including prebuilt binary for Windows.
Directly taken from https://premake.github.io/.

Refs #3729.

This was SVN commit r20366.
2017-10-28 16:10:49 +00:00
e87517be69 Add our script for building patches with Jenkins to version control.
Refs #4419.
Reviewed By: leper, elexis
Differential Revision: https://code.wildfiregames.com/D18
This was SVN commit r20365.
2017-10-28 15:54:44 +00:00
7e0d19cd7a Linting with Coala.
This new script and the associated configuration files lint our source
code (JS and C++). This will be extended in the future, refs #4833.

Reviewed By: Imarok
Differential Revision: https://code.wildfiregames.com/D213
This was SVN commit r20364.
2017-10-28 15:30:37 +00:00
1033e105f0 Tweak a bit citizen cavalry costs. Follow the same infantry vs cavalry policy as for champs and heros. Motivations are: infantry vs cavalry consistency (from the abstract unit role point of view), preventing some unbalances, enforcing a more realistic infantry vs cavalry ratio in game.
Accepted by: Nescio, Grugnas
Differential Revision: https://code.wildfiregames.com/D983
This was SVN commit r20363.
2017-10-28 10:33:01 +00:00
f5375cbcb9 Delete _kali's Alpha 21 maps since it is not certain that they are not derived works, refs D957, 33e3e6c2ab, 34c26767ca, f61f051d74, c70975b116, a68881dd0f, 64b1da0ddf, 127ca4e177, #4226.
Keep now unused, yet unalteredly useful paintHeightmap JS function
(until CMapReader::LoadRandomMap can load PMP files, refs #4816),
bicubicInterpolation and randomPlayerPlacementAt.

This was SVN commit r20362.
2017-10-27 19:26:46 +00:00
24f02d97eb Move the HeightPlacer from the Schwarzwald map (49194819f6) to the placer library, refs #4804.
Remove the unneeded NullConstraint check.

This was SVN commit r20361.
2017-10-27 15:32:22 +00:00
6677f2bfe1 Rename placer.js to placer_centered.js and pathplacer.js to placer_noncentered.js, refs #4804.
Document the difference between the two types of classes, refs #4831.
Move RectPlacer (as of 7d0cc59136 unreferenced but possibly useful)to
placer_noncentered.js and remove three redundant checks there.

This was SVN commit r20360.
2017-10-27 12:40:30 +00:00
93b2211d17 Move SimpleObject and RandomObject from placers.js to a new file, because they aren't Placers, refs #4804.
Define what an Object is, refs #4831.
Remove RandomObject duplication from c02818ceea by just calling the
SimpleObject with a random template, refs #4805.

Remove the tautologous (!fail) check and replace needless multilevel
fail-check nesting with two && operators.
Move default parameters from the function body to the function header
and rename resultObjs to entities.
Throw errors instead of printing something if min > max.

This was SVN commit r20357.
2017-10-26 23:51:54 +00:00
c136848b74 Fix lineendings of new files and the ones in source/ that didn't receive the eol property yet.
To confirm, use svn diff -r 20355:20356 -x "-w --ignore-eol-style"
--ignore-properties  | less

This was SVN commit r20356.
2017-10-26 17:03:29 +00:00
f6c2ea6b0e Move SimpleGroup and RandomGroup from placers.js to a new file, because they aren't Placers, refs #4804.
Document what a Group is, refs #4831.
Remove duplicate place function by calling the SimpleGroup from the
RandomGroup, refs #4805.
Move the default parameters from the function body to the function
header, remove duplicate CELL_SIZE division, pointless comment and use
let instead of var.

This was SVN commit r20355.
2017-10-26 16:47:07 +00:00
77f28c5a56 Remove SemiRandomElevationPainter from Pyrenean Sierra, which is a painful straight copy of the SmoothElevationPainter introduced in a796800bb1, refs #4805.
It should have been added to the painters file instead of to the map if
a copy was acceptable.
Add the only simple capability it added (an unnoticeable random
elevation difference to each vertex) to the SmoothElevationPainter to
make it universally accessible.
That painter also had a bug, because it replaced the roughness with 5 if
0 was given.

This was SVN commit r20354.
2017-10-26 13:50:28 +00:00
8d49497671 Replace SmoothElevationPainter 8/9 weights with 1, so that the elevation of a heightmap grid vertex is exactly the average of the new elevation and the average of the existing elevation of the 9 vertices that are the current vertex or adjacent to it.
Doesn't change the result perceptibly while removing otherwise
incomprehensible magic numbers from 61387e95b2.
The equations are so similar that one might expect that the averaging
was the intended algorithm.

This was SVN commit r20353.
2017-10-26 13:25:51 +00:00
40289e4a1a band-aid for a couple spartan building's garrison points. actual fixes still needed
This was SVN commit r20352.
2017-10-26 13:16:50 +00:00
21ea4c3173 Do not use the spread operator in the AI euclidian distance helper function which made it 200 times slower, as reported.
(The spread operator is not faster in sm45 according to my test.)

Differential Revision: https://code.wildfiregames.com/D980
Refs 6590f301c2.
Not accepted by anyone.

This was SVN commit r20351.
2017-10-26 12:56:51 +00:00
ed0fb223b2 Unify duplicate Breadth-First-Search traversing of the LayeredPainter and SmoothElevationPainter in a new helper function, refs #4805, making it much more comprehensible what each part does.
Document the two classes, the new function and every step of their
execution, refs #4831.
Unify SmoothElevationPainter height computation duplication, remove
pointless comments, use array functions and the prefix increment
operator.

This was SVN commit r20350.
2017-10-26 12:37:02 +00:00
007748d9b3 Move ElevationPainter and SmoothElevationPainter constants above the SmoothElevationPainter, refs #4804 and define them, refs #4831.
Remove two unneeded variables and reduce the performance by some
milliseconds by using for...of loops, the destructing assignment and
inlining the unified DX/DZ array.
Fix a wrong comment in the BorderTileClassConstraint of 86d3cdf2d5.

Differential Revision: https://code.wildfiregames.com/D984
Not accepted by anyone

This was SVN commit r20349.
2017-10-26 11:51:54 +00:00
cb6c571c2d Fix bottom corners alignment in Modern dialog
Reviewed By: elexis, vladislavbelov
Differential Revision: https://code.wildfiregames.com/D982
This was SVN commit r20348.
2017-10-25 20:53:40 +00:00
7c89acc2ed Add rmgen Painter definitions, refs #4831.
Move the least complex rmgen painters (TileClassPainter,
TileClassPainter, MultiPainter, TerrainPainter) to the top of the
painters file, refs #4804.
Group the TerrainPainter with the LayeredPainter which both draw a
texture on the terrain contrary to the others.
Use for-of loops and remove unneeded variables.
(Diff split for auditability.)

This was SVN commit r20347.
2017-10-25 13:56:46 +00:00
6c9c9f728f Missing added files in 266ddfa8da. Noticed by Imarok.
This was SVN commit r20346.
2017-10-25 09:30:05 +00:00
266ddfa8da Display fruit tree as fruit and not as wood on the minimap. Rework a bit inheritence of fruit tree and of wood bushes. The noticeable change is that fruit tree block movement as other trees.
Patch by: Temple
Differential Revision: https://code.wildfiregames.com/D845
This was SVN commit r20345.
2017-10-25 08:05:53 +00:00
c5ccdccfc4 seleucid elephant stable and carthaginian regular stable. fixed persian hay cart
This was SVN commit r20342.
2017-10-24 23:40:30 +00:00
66a357f286 The server should choose the guid
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D943
This was SVN commit r20341.
2017-10-24 22:05:24 +00:00
4e2866baeb seleucid,persian, and stan's iberian models, actors, and templates. persian ballista tower in there for a goof. little seleucid house edit
This was SVN commit r20339.
2017-10-24 13:49:39 +00:00
5cc9e998e0 Remove abstract rmgen Terrain class that was inherited by SimpleTerrain and RandomTerrain.
It didn't add a benefit, hid a bug (see 0c9205e5b8), required the
inheriting classes to use terrainObjects, added confusing indirection
and none of the other classes (painters, placers, constraints) use that
inheritance.
Define what the Terrain classes do, refs #4831.
Rename treeType to templateName.
Remove unneeded round in the validT condition.

This was SVN commit r20338.
2017-10-24 03:24:05 +00:00
ba65661f3e Define rmgen Entity class, refs #4831.
Make playerID non-optional.
Move default orientation code to the function header.
Add missing quotes.

This was SVN commit r20337.
2017-10-24 03:09:42 +00:00
86d3cdf2d5 Define rmgen Constraints, refs #4831.
Use an array function instead of a loop.

This was SVN commit r20336.
2017-10-24 03:06:05 +00:00
0c9205e5b8 Fix missing [] to undefined replacement in b4503bb61e that was never noticeable because Terrain.place overwrites it on every tile of every map.
Fix wrong variable name in 45bb3d2a43.

This was SVN commit r20335.
2017-10-23 14:45:26 +00:00
0ddfe51b55 Tweak a bit Scipio's aura radius. Patch by temple. Reviewed by Grugnas.
Differential Revision: https://code.wildfiregames.com/D737
This was SVN commit r20334.
2017-10-23 14:05:07 +00:00
bb
f55aac2521 Make the biome setting visible for mp clients.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D979
This was SVN commit r20333.
2017-10-23 12:34:13 +00:00
1a896f531a Add diskArea rmgen helper function and use it instead of Math.PI * Math.pow(radius, 2).
Use getMapArea instead of mapSize*mapSize.

This was SVN commit r20332.
2017-10-23 10:39:32 +00:00
1dee1eced9 Remove rmgen euclidian distance helper function, refs 6590f301c2 / D969.
Use Math.square(x) instead of Math.pow(x, 2) in places that don't
multiply it with Math.PI.

This was SVN commit r20331.
2017-10-23 10:13:49 +00:00
32812f0974 Add unit tests to the EntityLimits component.
Differential Revision: https://code.wildfiregames.com/D970
This was SVN commit r20329.
2017-10-23 06:27:00 +00:00
6590f301c2 Add Math.square to compute the square of a number without the need to repeat the term, without using the slower Math.pow.
Start unifying the euclidian distance functions instead of adding yet
another helper function to the random map script library after this
diff.

Differential Revision: https://code.wildfiregames.com/D969
Math.square accepted by mimo
Includes changes proposed by bb, fatherbushido

This was SVN commit r20328.
2017-10-22 20:46:41 +00:00
67e27ed7ea Atlas: Cleanup horizontal alignment flags being ignored, fix warnings on a start.
Fix #3824
Patch by: Clockwork-Muse.
Reviewed by: vladislavbelov.
Differential Revision: https://code.wildfiregames.com/D824
This was SVN commit r20327.
2017-10-22 20:09:28 +00:00
ad7d7ec1e9 Fix a disabled template manager test.
Fix #4522
Patch by: Sandarac.
Reviewed by: elexis.
Differential Revision: https://code.wildfiregames.com/D968
This was SVN commit r20326.
2017-10-22 15:39:50 +00:00
aeaf3d1f43 Persian range and Stan's Iberian stables. Template edited for Iberian range.
This was SVN commit r20325.
2017-10-21 21:12:23 +00:00
56ba3e4416 Show stacktrace too in case custom JS exceptions are thrown.
This was SVN commit r20324.
2017-10-21 20:38:10 +00:00
3c2f5ca5a6 rework a bit D964
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D967
This was SVN commit r20323.
2017-10-21 19:05:52 +00:00
6c5a8269f3 Fix some style issues noticed by our linter
Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D585
This was SVN commit r20322.
2017-10-21 17:31:05 +00:00
5f0a0fbbef Add id for IQ stanzas
Patch by: Dunedan
Differential Revision: https://code.wildfiregames.com/D899
This was SVN commit r20321.
2017-10-21 14:11:25 +00:00
23893415d1 Unify trade gain computation between simulation and ai
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D964
This was SVN commit r20320.
2017-10-21 08:40:11 +00:00
e5ec6d0bff petra: allow gatherers to switch to a nearer resource when slots become available
This was SVN commit r20319.
2017-10-20 18:06:12 +00:00
00ce80a1b8 Gamesetup unification variable renaming
Reviewed by: bb
Differential Revision: https://code.wildfiregames.com/D429
This was SVN commit r20318.
2017-10-20 16:04:24 +00:00
7e0b54a36b Fix collisions of random resources and starting base resources on the Corinthian Isthmus random map script, refs #4600.
This was SVN commit r20316.
2017-10-19 22:52:23 +00:00
11c52a255f few minor edits to the spartan range and workshop, added template tree for future ranges, stables, and workshops and assigned new actors to them
This was SVN commit r20315.
2017-10-19 21:41:25 +00:00
2beea46de7 Revert a naked fanatic armor nerf done in 2e5138bad9. It has now the same armor as other champions but don't have the armor bonus of spearmen. Requested by Feldfeld, borg-, Grugnas.
This was SVN commit r20314.
2017-10-19 18:04:07 +00:00
b389c9f846 whoops! coulda sworn i had these checked. missing .dae files restored
This was SVN commit r20313.
2017-10-18 19:32:39 +00:00
fe1401ec3d Last of the Spartan buildings, wow's normal fix, and Stan's archery range
This was SVN commit r20312.
2017-10-18 18:34:11 +00:00
a37d8807f6 petra: some performance optimizations
This was SVN commit r20311.
2017-10-18 17:45:04 +00:00
dc40f711db ai: remove some unused filter stuff + cleanup
This was SVN commit r20310.
2017-10-18 17:00:38 +00:00