Commit Graph

17837 Commits

Author SHA1 Message Date
Stan 72e2d0440e Remove ram from fortress to let people in charge of balancing make the call on whether it should be added to the civ or not.
Add Alexandermb to the list of 3D contributors.
Thanks elexis for raising concerns

This was SVN commit r20450.
2017-11-14 18:48:13 +00:00
mimo 6b4d73f6df ai cleanup: move some functions from Entity to template where they should have been
This was SVN commit r20449.
2017-11-14 17:38:05 +00:00
Imarok 15ff2f0ca9 unitActions is a global variable (unitActions --> g_UnitActions)
Reviewed By: O8 JS GUI, elexis
Differential Revision: https://code.wildfiregames.com/D1012
This was SVN commit r20448.
2017-11-14 13:43:14 +00:00
Imarok fb8aa3ef19 Not so small input.js (originally been batch training) cleanup
* Move selection_panels.js helper functions into a separate file
 * Move unit_action helper functions from input.js into unit_actions.js
 * Rearrange some functions, to better represent the execution flow
 * Make batch training use `g_NumberOfBatches` instead of
`g_BatchTrainingCount` so remember the number of batches instead of the
number of units to train (needed for finishing P60)
 * Simplify the batch training code a bit
 * Also cleanup the moved functions a bit

Reviewed by: bb, Commented by elexis
Differential Revision: https://code.wildfiregames.com/D753
This was SVN commit r20447.
2017-11-14 13:30:01 +00:00
Stan 3e9b7fa5fa New ram for Mauryans, by AlexanderMB, with a new icon. This mechanical unit is now trainable in the fortress.
Blend file + Icon xcf committed to the art repository

This was SVN commit r20446.
2017-11-14 12:53:45 +00:00
mimo 72e2cbeb3a Fix Ptolemy catapult packing entity
Patch by temple

Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D1032
This was SVN commit r20445.
2017-11-13 17:55:24 +00:00
Stan d53cde2c8c New Brittonic workshop + compressed blendfile with packed textures
Reviewed by LordGood

This was SVN commit r20443.
2017-11-12 21:28:31 +00:00
Stan 68996d5749 Remove some specific useless specific names from my previous commits
This was SVN commit r20442.
2017-11-12 21:25:43 +00:00
wraitii 62f07098ea Introduce a new hotkey to order only one unit from the current selection.
This new hotkey, by default assigned to alt, makes it so that only one
unit receives the order.
This can be used to easily order a group of units to build different
buildings at the same time, or attack different enemies.
It's intended to make the usual "select a unit, order, select another
unit, order" micro much faster.


Reviewed By: Imarok
Differential Revision: https://code.wildfiregames.com/D308
This was SVN commit r20441.
2017-11-11 17:20:37 +00:00
Itms 82d6256171 Silence build output with third-party libs on Unix during Jenkins builds.
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D958
This was SVN commit r20440.
2017-11-11 16:21:30 +00:00
elexis a39aae833b Tidy up rmgen point location randomization and retry loops.
Remove retryPlacing args helperobject by making use of the hoisting
effect.
Remove the deprecation warning in retryPlacing and equally and the
unused behaveDeprecated argument from createAreas and
createAreasInAreas, refs #4294, a639050a41, D249.

Rename randomizePlacerCoordinates to randomizeCoordinates and placer to
group in the four createObjectGroups functions following 6052716a78,
because Groups aren't Placers (as established in f6c2ea6b0e), just share
the randomizable x/z properties.

Fix randomizeCoordinates on square maps offering entity locations
outside of the passable map area that are only rejected later in the
codeflow, missed first in ca0575e422, but also d30ee0292b and
3a1c5669f8, refs #4012, #4814.
Clarify randomizeCoordinates by passing a boolean stating whether to
include the impassable map border instead of a varying halfMapSize.
Remove the unused halfMapSize argument from the
randomizePlacerCoordinatesFromAreas call in createAreasInAreas.

This was SVN commit r20439.
2017-11-11 14:54:10 +00:00
wraitii f60f58d3d6 Use the rangeManager's subdivisions in the obstruction manager shape tests
Completes an existing TODO. This is a large speedup in some cases for
those test functions, particularly the "sunken ship lag" issue.

Patch By: temple
Reviewed By: elexis, mimo, bb, wraitii
Accepted By: bb, wraitii
Trac Tickets: #4713

Differential Revision: https://code.wildfiregames.com/D850
This was SVN commit r20438.
2017-11-11 11:14:39 +00:00
elexis c56f0976bd Unify rmgen modifyTilesBasedOnHeight (d970c5019a) with the HeightPlacer (24f02d97eb).
Create global constants for the elevation modes and make that Placer
more versatile by adding the mode argument.
Improves the performance of these functions by not repeating the mode,
createTerrain and getTileClass lookups every tile.
Move the functions to library.js, refs #4804.

This was SVN commit r20437.
2017-11-10 22:29:04 +00:00
mimo 8eb7aa368b petra: remove an old hack against rabbits as its template was modified some time ago
This was SVN commit r20436.
2017-11-10 17:37:30 +00:00
elexis db1d94bad0 Further clarify geometric meaning of the river painting in a9b963c3a5 and e596ef6011.
Refer to the normalized river vector instead of the river vector divided
by the length of the river.
Rename mag to magnitude.

This was SVN commit r20435.
2017-11-10 17:17:59 +00:00
elexis d33130d8d6 Prevent the mountains on the Unknown map variant "Passes" from becoming passable to only one player. Fixes #4060.
This was SVN commit r20434.
2017-11-10 15:37:21 +00:00
elexis 54460e926b Fix straggler trees on Phoenician Levant following ac8f4f49fc and remove two unused variables.
This was SVN commit r20433.
2017-11-10 13:19:53 +00:00
bb ae74075a22 Rename TriggerHelper.EntityHasClass to TriggerHelper.EntityMatchesClassList
and so making that function much more general by using MatchesClassList.

Some suggestion and checking by leper
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1020
This was SVN commit r20432.
2017-11-10 12:14:16 +00:00
elexis ea404a8825 Credit mmayfield45 for the Ardennes Forest map from 9272153ee7 after the JS note was removed in 62b7c07353.
This was SVN commit r20430.
2017-11-09 22:19:53 +00:00
elexis e596ef6011 Extend the random map river algorithm (7d0cc59136) to allow arbitrary start and end points.
Reverse engineer and cleanup obfuscated Rivers map code, refs
a9b963c3a5.
Use vector algebra to replace magic equations and express geometric
intend.
Fix seed typo by removing river curve duplicate.

On the Rivers map, use areAllies directly instead of copying the
diplomacies to a 2D array called isRiver.
Use modulo operator instead of an if-statement with duplication to
determine the neighbor of the last player, refs 9272153ee7.

This was SVN commit r20429.
2017-11-09 19:08:31 +00:00
elexis b3dbcc457b Add Vector3D crossproduct and Vector2D perpendicular function.
Describe geometric features of the two cross- and dot-product functions.

This was SVN commit r20428.
2017-11-09 19:04:39 +00:00
LordGood 8ee600b979 Carthaginian range, workshop, elephant stable, mauryan stable, babylonian defense tower
This was SVN commit r20427.
2017-11-08 22:24:51 +00:00
Stan a35da35c33 "Remove History string wrongly re-added in previous commit and height tag, which is inherited from the parent template"
This was SVN commit r20426.
2017-11-08 22:00:11 +00:00
Stan 28b2bd9d03 New Brittonic storehouse + compressed blendfile with packed textures
Reviewed by LordGood & Enrique

This was SVN commit r20425.
2017-11-08 21:31:54 +00:00
vladislavbelov aa6617f431 Removes a buffer_zone from the game speed dropdown, introduced in 16de5c75ac
This was SVN commit r20423.
2017-11-07 23:13:42 +00:00
mimo 34557b5bb8 petra: few tunings
This was SVN commit r20422.
2017-11-07 19:11:06 +00:00
mimo dcdc89056f remove town_phase from crannog techs as this tech is required to build the crannog, and that gives a weird structree
This was SVN commit r20421.
2017-11-07 17:36:45 +00:00
elexis efd9b3e212 Obliterate Unknown (0d0bc32736), Unknown Land (25682da568) and Unknown Nomad (7f8adcf8cb) triplication of doom, fixes #4317.
Refactor by moving from procedural programming to functional
programming.
Fix the horrendous shoreline performance bug on "Continent" of Unknown
as in 49721cff33 by dropping the historic differences between the maps.

Remove misleading player coordinate computation when generating the
terrain on Unknown Nomad, because the players are spawned elsewhere
then.
Remove names like md, mdd1 and mdd2 with different connotations in every
landscape type.
Remove six more paintRiver copies in the "Edge Seas" variant as in
7d0cc59136.
Remove createShoreJaggedness and createExtensionsOrIslands duplication
within this triplication.
Remove heightmap initialization octuplication by adding initHeight.
Remove horizontal/vertical duplication by using logical operators.
Remove Painters redundant with the paintTerrainBasedOnHeight calls,
pointless comments and cleanup createArea calls as in 376d8b3d1e.
Remove some forest helper duplication as in ac8f4f49fc.
Remove references to Math proxies and use the prototype functions
directly.
Remove whitespace issues.

Describe remaining calls with human-readable log messages.
Always spawn enough treasures for a CC (instead of sometimes only giving
enough for a dock), refs 5dd3cbb254.
Generate "Mainland" variant with the same probability as the other
landscape types.
Generate "Central Sea" variant on Unknown Land too by forcing an Isthmus
then.
Don't split players on Unknown Nomad on the "Rivers And Lake" variation,
because the resource imbalance is too drastic.
Consistently call markPlayerArea before terrain generation on non-Nomad
maps.

Differential Revision: https://code.wildfiregames.com/D252
This was SVN commit r20420.
2017-11-07 17:11:51 +00:00
elexis 280a797620 Fix reference error in cfdd37f6d9 by computing that value independent from prior code.
This was SVN commit r20419.
2017-11-07 16:20:43 +00:00
Stan 680186478e New Brittonic range + compressed blendfile with packed textures
Reviewed by LordGood

This was SVN commit r20418.
2017-11-06 22:40:03 +00:00
elexis 75c479d3cb Unify Caledonian Meadows and Wild Lake player location duplication from ca654e3f79 / 8d4af29faf, refs #4805.
Move getOrderOfPointsForShortestClosePath from library.js to math.js,
refs #4804 and name it sortPointsShortestCycle.

This was SVN commit r20417.
2017-11-06 13:51:43 +00:00
elexis 6fb6a65fc5 Move rmgen player location functions from library.js to player.js, refs #4804.
Doesn't change the code besides abstracting distributePointsOnCircle and
attempting to improve the documentation, refs #4831.

This was SVN commit r20416.
2017-11-06 13:40:10 +00:00
elexis df14c914e6 Move starting player entity rmgen functions from misc.js to a new player.js, refs #4804.
Remove two duplicates of the starting entity placement code in the
Fortress map of 208e642089 and placeCivDefaultEntities of 9c3e94acfd by
just making the distance an argument, refs #4805.

Equally to the starting cavalry, don't spawn special units like dogs or
worker elephants on Fortress twice, but only the women and Infantry.
Consider the weird kwargs iberWalls argument of placeCivDefaultEntities
from 9c3e94acfd deprecated and just make the orientation a regular
optional argument.
Rename createStartingPlayerEntities to placeStartingEntities.

This was SVN commit r20415.
2017-11-06 12:17:56 +00:00
Stan a10b8e16c2 New Brittonic stable + compressed blendfile with packed textures
Reviewed by LordGood

This was SVN commit r20414.
2017-11-05 22:51:58 +00:00
mimo 567c485d92 petra: fix 86b9159609 (typo and deserialization)
This was SVN commit r20413.
2017-11-05 21:08:37 +00:00
elexis b1e8036f35 Cleanup gate locking GUI code of 013ab4bda7.
Differential Revision: https://code.wildfiregames.com/D1004
Patch By: temple
Remove any unneeded complexity to compute the button states.
The entity state of selected gates was changed, so fix the read-only
errors following 9cb0a60d73, refs #4257.

This was SVN commit r20412.
2017-11-05 16:59:09 +00:00
elexis 6a890127f6 Unify 5 copies of the tributary river placement code, refs #4805.
This was SVN commit r20411.
2017-11-05 15:51:40 +00:00
elexis cfdd37f6d9 Move landscape generation functions from misc.js to gaia_terrain.js, refs #4804.
Rename passageMaker to createShallowsPassage to avoid confusion with
straightPassageMaker aka PassMaker from Corsica & Sardinia and Pyrenean
Sierra.
Remove TILE_CENTERED_HEIGHT_MAP operations in that function from
3c6bce057e that don't do anything.
Add infinite loop protection to getTIPIADBON.
Remove unneeded parentheses, braces, redundancy, whitespace issues, use
early return and merge consecutive if-statements with a logical or in
these functions.

This was SVN commit r20410.
2017-11-05 13:56:21 +00:00
mimo 86b9159609 petra: revisit the management of constructions for better performances and cleaner implementation
This was SVN commit r20409.
2017-11-05 13:56:16 +00:00
elexis 4562bc998c Fix wrong dock owner (off-by-1) in Migration in 376d8b3d1e, fixes #4837.
This was SVN commit r20408.
2017-11-05 11:06:26 +00:00
elexis ac8f4f49fc Delete the remains of rmgen/utilityfunctions.js, refs #4804 by
cleaning up the createForests function.

Remove g_numStragglerTrees and clForest references from the rmgen
library.
Compute the number of forest- and straggler trees in a new function
instead of hiding it and obstructing the placement code.
Remove unused numMultiplier argument.

Replace duplication of these three functions with calls to them, refs
#4805.
Remove duplicate random biome JSON constants of the Islands, Migration
and Snowflake Searocks map.
There is significant partial createForests duplication that should be
unified eventually.

This was SVN commit r20406.
2017-11-04 13:04:54 +00:00
elexis 822e37f70c Remove references from the random mapgen library to terrain globals of maps.
Maps should not be required to define all these globals and use them
with the connotation implied by these utilities.

Split utilityfunctions.js to gaia_entities.js and gaia_terrain.js to
make it more transparent what files contain, refs #4804.
Document these functions #4831.

Refactor stoneMine placing and use for...of loops.
Fix Extinct Volcano call.
Forest utilities will be handled separately.

This was SVN commit r20405.
2017-11-04 11:17:23 +00:00
fatherbushido 17b50a2aa7 Remove duplicated builder list.
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1008
This was SVN commit r20404.
2017-11-03 17:23:44 +00:00
fatherbushido 22d1481cf5 Template organization: move some structures from other/ to structures/
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1002
This was SVN commit r20403.
2017-11-03 11:00:07 +00:00
fatherbushido 4104bf6ce0 Fix a typo.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D1005
This was SVN commit r20402.
2017-11-03 10:22:27 +00:00
elexis 886096e215 Use @file JSDoc tag for the rmgen library, so that these comments are distinguished from block tags about globals, refs #4831.
Cleanup Area class.

This was SVN commit r20400.
2017-11-02 17:35:19 +00:00
mimo 2ead236afe petra: allow elephant stables for all civs, and some internal cleanups
This was SVN commit r20399.
2017-11-02 16:16:11 +00:00
mimo bff1f33bfd template organization: elephant stables
Patch by: Nescio
Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D1001
This was SVN commit r20398.
2017-11-02 15:58:19 +00:00
elexis 63e77de94e Use only one coordinate system for locations in the rmgen system.
Thereby fix the distance check of the SimpleObject, refs #4338, D189 and
remove the CELL_SIZE engine constant magic number, refs #4034.

Differential Revision: https://code.wildfiregames.com/D996
Thanks a lot to rapidelectron and temple who independently discovered
this!

This was SVN commit r20396.
2017-11-01 22:59:27 +00:00
elexis 1f36686e6c Move checkIfIntersect and distanceOfPointFromLine from misc.js to math.js (because the latter should only contain terrain and entity placement utilities), refs #4804.
Delete unused getGradient and move getAngle from library.js to math.js.

This was SVN commit r20395.
2017-11-01 22:30:03 +00:00