1
0
forked from 0ad/0ad
Commit Graph

16849 Commits

Author SHA1 Message Date
f3e4e619bc RangeManager returns Gaia entities in GetNonGaiaEntities
refs #4495
Reviewed By: leper, elexis
Differential Revision: https://code.wildfiregames.com/D164
This was SVN commit r19245.
2017-02-26 10:26:35 +00:00
b6e9514029 Remove the (only) inconsistent UnitMotion walk speed entry in the civ specific unit templates (cavalry) and an unneeded one (ship).
Patch by: Grugnas
Differential Revision: https://code.wildfiregames.com/D162
This was SVN commit r19244.
2017-02-26 07:27:16 +00:00
b062fbef17 Stop relying on the internal structure of the current Trader component.
Get the required information by returning it in the proper places.
Also clean up some pointless modulo operations.
This code is pulled out of the Silk Road code (refs #4314).

Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D161
This was SVN commit r19243.
2017-02-24 21:59:23 +00:00
360ba27865 Cleanup of CCmprangeManager
Summary: Following discussions in https://code.wildfiregames.com/D60 the
use of u8 to store each boolean has been cleanup up. Now only one u8 is
used, thus reducing the size of the struct.

Reviewed By: leper
Differential Revision: https://code.wildfiregames.com/D101
refs #3834

This was SVN commit r19242.
2017-02-24 19:15:54 +00:00
b6d2fad596 Petra: assign guards to the hero in regicide games
Summary:
Petra will assign military units as guards to the hero in the regicide
victory condition, preferring any available Champion units.

Also this diff fixes a broken loop through a Map in D140/a443bcfa65 that
was introduced when switching `criticalEnts.guards` from a Set to a Map.

Patch by Sandarac

Differential Revision: https://code.wildfiregames.com/D157
This was SVN commit r19241.
2017-02-24 18:26:53 +00:00
a0a0895a12 Pass some strings and a vector as const refs.
Reviewed By: Imarok
Differential Revision: https://code.wildfiregames.com/D160
This was SVN commit r19240.
2017-02-24 17:02:10 +00:00
1aa5ecb8a7 Remove entity if spawning fails.
Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D159
This was SVN commit r19239.
2017-02-24 15:41:19 +00:00
b2c3fc83da Nuke session/utility_functions.js since the file is much shorter than the others and since the functions are not logically related.
Slight cleanup while moving the affected code.

Differential Revision: https://code.wildfiregames.com/D108
Reviewed By: shookes
This was SVN commit r19238.
2017-02-23 23:34:35 +00:00
fb6e694fdd Show the tribute chat notification if a team member sends to another and if teams are locked. Fixes #4308.
Add a new options panel for the chat notifications (attack, barter,
tribute), so that players and observers can disable them if they appear
too noisy.

Patch By: Sandarac
Differential Revision: https://code.wildfiregames.com/D106
This was SVN commit r19237.
2017-02-23 19:35:55 +00:00
2c86b54838 Remove non-functional shallow generation code from the Unknown random maps.
The code paints far below the waterheight and the potential shallow
generation on that central river variation is done by the passageMaker
call some lines above.

Reviewed By: bb
(on #0ad-dev today)

Also add a declaration forgotton in 6036b48c1d.

This was SVN commit r19236.
2017-02-22 22:49:21 +00:00
5e5b5be656 Improve component cache lookup performance slightly.
We do not need iteration order, and this makes this explicit.

Reviewed By: echotangoecho
Differential Revision: https://code.wildfiregames.com/D82
This was SVN commit r19235.
2017-02-22 19:27:58 +00:00
e1e4ef0370 Add UpdateAutoScroll calls to some events where they were missing. For example when deleting, cutting, pasting, autocompleting or doubleclicking text. Patch by Vladislav, fixes #4401.
This was SVN commit r19234.
2017-02-22 15:28:09 +00:00
baea68def2 Copy the victory and defeat icons, so that they can be replaced easily by artists without changing the code or even looking at it.
Differential Revision: https://code.wildfiregames.com/D131
Reviewed By: leper
This was SVN commit r19233.
2017-02-22 03:50:05 +00:00
3894902bec Check the capturePoint state when diplomacyChanged, fixes #4491
Reviewed by elexis

This was SVN commit r19232.
2017-02-21 20:42:28 +00:00
7536afe2ee Fix lineendings of new files added in recent months.
This was SVN commit r19231.
2017-02-21 01:26:12 +00:00
fa257c285b Petra: cleanup of the gameTypeManager (follow up of a443bcfa65)
Patch by Sandarac
Differential Revision: https://code.wildfiregames.com/D149
This was SVN commit r19230.
2017-02-20 18:13:04 +00:00
ef46059796 Splash Damage shape tooltip
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D142
Fixes #4328

This was SVN commit r19229.
2017-02-20 15:39:36 +00:00
d0224c913e petra: finetuning of builder number
This was SVN commit r19228.
2017-02-19 16:06:07 +00:00
997d0fb6ee petra: fix a bug preventing petra to build additionnal markets if its second market was destroyed while still a foundation
This was SVN commit r19227.
2017-02-14 17:36:58 +00:00
a443bcfa65 Petra: assign guards to wonders in wonder games
Patch by Sandarac
Differential Revision: https://code.wildfiregames.com/D140
This was SVN commit r19226.
2017-02-14 17:21:54 +00:00
e0f7578fbe Ensure unique client GUIDs. Patch by sbirmi, fixes #3949.
Two clients chosing the same GUID is highly unlikely, yet possible.
A malicious client chosing an existing GUID would have resulted in
unassigning the player with that GUID.

This was SVN commit r19225.
2017-02-14 16:54:34 +00:00
e436af56ce Different description for African Plains by Hannibal Baraq.
This was SVN commit r19224.
2017-02-14 10:51:16 +00:00
0baf6d350a petra: be more incline to help an ally when getAlliedVictory
and deposit resources (if any) before starting to build

This was SVN commit r19223.
2017-02-13 16:19:12 +00:00
9dea08d179 petra: improve the use of garrisoning
Reviewed By: Sandarac
Differential Revision: https://code.wildfiregames.com/D141
This was SVN commit r19222.
2017-02-13 16:03:50 +00:00
1179b6298c African Plains random map script by Hannibal Baraq (a.k.a. Hannibal Barca).
Differential Revision: https://code.wildfiregames.com/D134
Reviewed By: FeXoR
Accepted By: niektb
This was SVN commit r19221.
2017-02-13 02:24:54 +00:00
4d00643ee3 Allow Romans to build the sentry tower, revealing the new model from 5d4604e767.
The faction couldn't build it before as the wooden tower added to all
factions except Romans in f56102967f was logically a part of the
palisade which Romans couldn't build either following 3bb1c01ccc.

Differential Revision: https://code.wildfiregames.com/D129
Patch By: fatherbushido
Accepted by: LordGood, scythetwirler, wowgetoffyourcellphone
This was SVN commit r19220.
2017-02-12 19:04:20 +00:00
50b5e4317f petra: fix a rare deserialization bug, when a dropsite change ownership between the last AI turn and the turn where serialization occurs (each AI is currently run only every 8 turns)
This was SVN commit r19219.
2017-02-11 16:06:00 +00:00
92164c8622 petra: remove a left over, used only for debug
This was SVN commit r19218.
2017-02-11 16:00:08 +00:00
cc8f991e2a Reset the RallyPoint in case the building changes Ownership to Gaia, so as to prevent the execution of commands like gathering resources or attacking someone if the garrisoned building becomes destroyed.
Add RallyPoint tests.

Reviewed By: mimo, Sandarac
Differential Revision: https://code.wildfiregames.com/D132
This was SVN commit r19217.
2017-02-10 18:47:25 +00:00
5f8f7bae20 Stay ready button
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D49
Fixes #4369.

This was SVN commit r19216.
2017-02-10 16:09:10 +00:00
94b0e5c0f3 Reset ready state when non-observers join in gamesetup
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D50
Fixes #4452. Refs #2529. Refs dfc7567561, a939b49de7, 903803ceec.

This was SVN commit r19215.
2017-02-10 15:52:04 +00:00
821657eff6 Correct siege wall icon
Reviewed by: elexis, Stan
Differential Revision: https://code.wildfiregames.com/D137
Refs #4487

This was SVN commit r19214.
2017-02-10 14:29:15 +00:00
b20b8250a5 Fix three tech tree bugs, relevant for mods like Delenda Est.
Parse paired techs correctly that appear as a tech requirement.
Don't list units with an empty production queue in the trainer panel.
Display a nice warning if a tech requires a technology that can't be
researched anywhere.

Patch By: s0600204
Differential Revision: https://code.wildfiregames.com/D113
This was SVN commit r19213.
2017-02-10 14:04:55 +00:00
c53c2edbed Remove the second, confusing and non-promotable skirmisher cavalry template from the Seleucid faction (which was a duplicate from the persian template).
Based on patch by: fatherbushido
Idea accepted by: scythetwirler
Differential Revision: https://code.wildfiregames.com/D128
This was SVN commit r19212.
2017-02-10 07:55:53 +00:00
8a99e0d639 Rename wooden tower template to sentry tower.
Patch By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D130
This was SVN commit r19211.
2017-02-10 07:02:45 +00:00
ecde67c19a Cleanup of GetBonusAttack function and use it inside petra
simulation part reviewed by fatherbushido
Differential Revision: https://code.wildfiregames.com/D138
This was SVN commit r19210.
2017-02-09 20:20:59 +00:00
689d5ed562 petra: improve the switch between attack and capture
Differential Revision: https://code.wildfiregames.com/D133
This was SVN commit r19209.
2017-02-09 18:41:03 +00:00
a82fe62747 Fix an ambiguity in the ai info text.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D136
This was SVN commit r19208.
2017-02-08 18:10:50 +00:00
f185817a1c This was SVN commit r19207. 2017-02-08 03:55:26 +00:00
d1e6205b70 Spy tech icon
This was SVN commit r19206.
2017-02-07 21:44:18 +00:00
0e2d2610c9 Display a nice error message when trying to register too many lobby accounts
(This is a workaround that will be removed when gloox has fixed the
issue.)

Reviewed by: elexis
Refs #3771
Differential Revision: https://code.wildfiregames.com/D87
This was SVN commit r19205.
2017-02-07 15:05:26 +00:00
2fabe80b20 Increase catapult and bolt shooter health by factor 2.5 and 2 (as rams have 4 times that health and still vanish quickly enough when encountering sword units).
Make catapults more affordable by reducing their stone cost from 350 to
250 per unit.

Differential Revision: https://code.wildfiregames.com/D102
Reviewed By: scythetwirler, fatherbushido
This was SVN commit r19204.
2017-02-07 13:18:04 +00:00
7487d27467 Fix infinite loop detection when placing players randomly on the newer random map scripts (and prevent them surely, not only almost surely).
Reviewed By: FeXoR
Differential Revision: https://code.wildfiregames.com/D118
This was SVN commit r19203.
2017-02-06 23:21:39 +00:00
20d34d4a97 Properly sort selected entities by owner
Fixes #4425. Refs #1807, #4167. Fixes a8b9416725

Reviewed by: mimo
Differential Revision: https://code.wildfiregames.com/D123
This was SVN commit r19202.
2017-02-06 22:17:21 +00:00
5130bb69d3 Use std::time_t in the replay menu (as 64bit integer conversion are implemented now) and remove the unused filemoddate fallback.
Differential Revision: https://code.wildfiregames.com/D112
Reviewed By: echotangoecho
This was SVN commit r19200.
2017-02-05 02:18:33 +00:00
39bb057ec5 Show the defeat/active state of players in the diplomacy window
Patch by javiergodas, rebased and negative review by elexis. Fixes
#4237.

This was SVN commit r19199.
2017-02-03 15:08:32 +00:00
863b8da240 Fix GarrisonHolder wich doesn't start to heal garrisoned units when the related technology is researched.
Summary:
When the heal technology is researched in a barrack, a wounded unit
garrisoned in it is not healed.
Indeed the component doesn't listen to value modification.
The patch fixes that.

Test Plan: Reproduce what is above and see that the patch fix it.

Reviewers: O2 JS Simulation, wraitii

Reviewed By: wraitii
Subscribers: wraitii, mimo, Vulcan

Differential Revision: https://code.wildfiregames.com/D63
This was SVN commit r19197.
2017-02-02 09:15:05 +00:00
17b8e60cc7 Fix ProjectileSpeed entry in Attack schema
Summary:
The documentation is imo misleading.
Projectile speed 0 is not supported anywhere in the code and doesn't
lead to a melee attack.

Test Plan: -

Reviewers: O2 JS Simulation, leper

Reviewed By: O2 JS Simulation, leper
Subscribers: leper, Vulcan

Differential Revision: https://code.wildfiregames.com/D115
This was SVN commit r19196.
2017-02-02 08:32:57 +00:00
223da5216b Don't increase entity limit counter when we upgrade to an entity with the same restriction category.
Summary:
In some mods (for hero) or in the current game (for sentry tower), when
we have reach the entity limit related to a restriction category, we
can't upgrade any entity wich have that restriction category to one with
the same restriction category (for example, upgrading an hero to an hero
as the 1 max limit is yet reached).
That diff should allow that in the gui and the sim.
Code could be concatenated. So comments are welcome.

Test Plan:
For in game testing, you can for example in the Player template reduce
the DefenseTower limit to 2. Then build 2 sentry towers.
Without the patch you can't upgrade any of them. With you can upgrade
them to defense tower.

Reviewers: wraitii, O8 JS GUI, O2 JS Simulation

Reviewed By: wraitii, O8 JS GUI, O2 JS Simulation
Subscribers: leper, mimo, wraitii, Vulcan, O8 JS GUI

Differential Revision: https://code.wildfiregames.com/D81
This was SVN commit r19195.
2017-02-01 16:35:08 +00:00
b052831529 Improve AI chat messages
Differential Revision: https://code.wildfiregames.com/D59
This was SVN commit r19194.
2017-01-31 18:03:36 +00:00