1
0
forked from mirrors/0ad
Commit Graph

17864 Commits

Author SHA1 Message Date
mimo 1af6ccbd41 petra: a few tunings and add a protection in tradeRoute serialization in case a market was destroyed in the last few turns between AI running and serialization
This was SVN commit r20479.
2017-11-19 14:56:22 +00:00
mimo cfa3f4a993 petra: cleanup of a142dfa2df (treat all events of hq and baseManager in a same place)
This was SVN commit r20478.
2017-11-19 14:43:41 +00:00
elexis 4aa1632365 Rename oWood to oWoodTreasure et cetera on random maps to prevent confusion with resource templates.
This was SVN commit r20477.
2017-11-18 15:43:24 +00:00
elexis 8f4363f146 Split uncommon random map playerbase terrain code from the common playerbase starting entities code.
This allows replacing the common code with a library call in only one or
two hunks each.

On Archipelago move the random resources closer to the playerbase to
make the map more enjoyable.
Use default/skirmish templates for the docks on Islands/Migration and
the market on Polar Sea while at it.
Abort map generation if the dock placement failed.
Remove clForest dummy variable on Polar Sea following the removal of
references to map defined tileclasses in the library following
822e37f70c.

This was SVN commit r20476.
2017-11-18 15:35:29 +00:00
elexis 46979b52a9 Fix units getting wet feet on Corinthian Isthmus due to an unrightful right angle in b0bd645fbb until rubber boots are implemented.
This was SVN commit r20475.
2017-11-18 15:25:59 +00:00
mimo a142dfa2df petra: some tweaks for playing on nomad maps (mainly delaying some strategic choices after the cc is built)
This was SVN commit r20474.
2017-11-17 19:20:18 +00:00
elexis b10f2b5a62 Move all units (which only is the Mustang plane) from the templates/other/ directory to the templates/units/ directory, refs #4770.
Differential Revision: https://code.wildfiregames.com/D1007
Patch By: Nescio
Comments By: fatherbushido, leper
This was SVN commit r20473.
2017-11-17 17:15:11 +00:00
elexis 74b83e9634 On both Deep Forest (83422923aa) and Schwarzwald (49194819f6) random maps, replace the copy of the magic number approximating the engine constant specifying the impassable map border tiles with a passability check from the library. Refs #4814, #4805.
Remove the duplication of the subsequent createArea call as in
376d8b3d1e.

This was SVN commit r20472.
2017-11-17 16:09:31 +00:00
bb 722578fdcd Cleanup the conquest code
Stop listening to OnTrainingFinished and OnStructureBuild messages but
use OnOwnershipChanged messages. This fixes the defeat when only
promoted/upgrades/regi-hero units remain.
Add foundations to the conquest lists and make them visible on the
minimap.

Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1022
This was SVN commit r20471.
2017-11-17 11:38:51 +00:00
elexis b0bd645fbb Unify the other axis of the 8 remaining playerPlacementRiver calls following f1e352927c, refs #4805.
Use the rotateAround function from eb96b61954, refs #4845.
Freely randomize the river angle on Corinthian Isthmus following
4256744e26 and eb96b61954, refs #4855.

This was SVN commit r20469.
2017-11-17 03:11:12 +00:00
elexis eb96b61954 Add rotateAround Vector2D function.
Remove the rmgen rotateCoordinates helper function from 4256744e26 and
clean the implementation of that commit, refs #4845, #4804.
Deepfreeze mapCenter vector from 5256d8497e used here to prevent
accidental overwrites with the mutating Vector2D functions, refs #4854.

This was SVN commit r20468.
2017-11-17 00:10:29 +00:00
elexis a2f7dba96c Move simulation test for approximate equality from e18598cd62 to the test setup, so that it can be reused.
Remove unneeded helper variable from e18598cd62 as intended by
7778a7b436 by using the set method.

This was SVN commit r20467.
2017-11-16 23:54:38 +00:00
elexis 05ea4c84d8 Unify 7 variants of the rmgen player line-positioning code, refs #4805.
Drop the negligible per-player location randomization on Latium.

This was SVN commit r20466.
2017-11-16 17:54:38 +00:00
elexis db9a52b94a Fix some unintended obliteration in efd9b3e212.
In the Edge Seas variant, fix a wrong horizontal/vertical negation and
the direction of the riversize randomization.
Fix the wrong river location translation in that variant in e596ef6011,
refs #4851.
Prevent resource collisions on Unknown maps by adding back the large
territory marking (after the small territory marking prior to the
terrain generation).
Slightly improve river painting performance by not generating the
meandering of the second shoreline if that is outside of the map
boundary.

This was SVN commit r20465.
2017-11-16 17:33:59 +00:00
elexis 5cfd4382dd Delete unused "blank" random map script from 0e0ed94926 which doesn't have an accompanying json file either.
This was SVN commit r20464.
2017-11-16 13:51:58 +00:00
elexis 5256d8497e Survival Of The Fittest cleanup:
Replace complicated starting unit code with a call to
placeStartingEntities equal to df14c914e6.
Use distributePointsOnCircle to remove sin/cos/distance computations.
Add map center getter for rmgen code, refs #4854.

This was SVN commit r20463.
2017-11-16 13:11:03 +00:00
bb 0a6d78ddd5 Allow loot to be modified by technologies and auras
Patch By: Grugnas
Commented on By: fatherbushido, elexis
Differential Revision: https://code.wildfiregames.com/D408
This was SVN commit r20462.
2017-11-15 22:56:04 +00:00
mimo 446889bc52 workshop repair aura
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D1043
This was SVN commit r20461.
2017-11-15 22:33:27 +00:00
mimo 34d7477b5b petra cleanup following 77a2f484a2
This was SVN commit r20460.
2017-11-15 22:31:25 +00:00
bb 77a2f484a2 Rearrange tower templates
Rename tower techs to tower_{tech}
Remove duplication in tower templates
Create tower parent, with sentry, stone and outpost as childs
Move all outpost as child of tower
Add a sentry tower default building

refs #4849

Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D914
This was SVN commit r20459.
2017-11-15 21:16:17 +00:00
Stan 013a93293b New bows and arrows for every civ ! Blendfiles are in the repo.
Reviewed by LordGood and partially WGOYCP
Thread :
https://wildfiregames.com/forum/index.php?/topic/21546-enhancement-macedonian-helmets/&page=2

This was SVN commit r20458.
2017-11-15 20:56:56 +00:00
mimo 1447bfbd7c Workshop templates reorganization
Discussed with elexis and Nescio

Differential Revision: https://code.wildfiregames.com/D1031
This was SVN commit r20457.
2017-11-15 18:44:23 +00:00
elexis f5f094602f Fix typo in e596ef6011, fixes #4851.
This was SVN commit r20456.
2017-11-15 18:38:18 +00:00
mimo 93be4091cc petra: look for initial treasures at start game, sometimes needed on nomad maps to build the first cc
This was SVN commit r20455.
2017-11-15 18:27:50 +00:00
elexis 57e547bd32 Split vector test scopes to make it easier to add tests in between, refs 99494251a1.
This was SVN commit r20454.
2017-11-15 12:47:48 +00:00
Stan 260c78cc1a Fix an issue with the woman basket having a hole at the bottom. Use a different actor for gathering, as the previous basket was tilted on the wrong side. Slightly tweak the tip of the basket to look like there is a hole in it. Fix indent in the file.
This was SVN commit r20452.
2017-11-14 20:31:25 +00:00
bb 62c8403eab Fix some SelectionGroupNames
Change wrong civs in ptol and sele walls
Let Persian trireme units depend on there land counterparts
Make the buildtime consistent with the land counterparts by decreasing
with 3
Nuke duplication for rome infantry champ

Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1033
This was SVN commit r20451.
2017-11-14 19:21:58 +00:00
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