Commit Graph

10152 Commits

Author SHA1 Message Date
541a5567d8 Show the attack-notification to observers.
Allow adding entities to the selection if they are owned by the observed
player.

This was SVN commit r17886.
2016-03-14 00:35:37 +00:00
a7b31398b0 Revert dbbc600dc3, refs #3745, refs #3823
This was SVN commit r17885.
2016-03-13 22:18:31 +00:00
f7ea533ab9 better icon from niektb, refs #3791
This was SVN commit r17884.
2016-03-13 17:38:23 +00:00
9238fc8713 Fix oversight in dbbc600dc3: GetExtendedEntityState is far too demanding for performance, and it is not needed.
Refs #3745

This was SVN commit r17883.
2016-03-13 17:06:12 +00:00
d84ad7799a Limit arrows on certain buildings and ships. Patch by sanderd17, fixes #3196.
Balancing by elexis, reverts fcf7344537 in favor of the new total arrow
limit.

This was SVN commit r17882.
2016-03-13 17:02:18 +00:00
042c9a9334 Allow hosting matches with 8 players and up to 16 observers, fixes #3254.
The host can change the number of allowed observers in running games.

Make sure that joining observers won't take the "slot" of disconnected
players, fixes #3671.

Send clients a new disconnect reason "Server full" instead of letting
them timeout.

This was SVN commit r17881.
2016-03-13 16:52:00 +00:00
dbbc600dc3 Workaround for the multiple-selection commands problem in the case of the back-to-work button. In this case a fix is really needed, as long as the system for handling the selection is not improved.
Also fix the wrong documentation for some functions.

Patch by svott, fixes #3745.

This was SVN commit r17880.
2016-03-13 16:44:21 +00:00
369ca4d012 Allow RMS authors to set the biomeID explicitly or to randomize excluding some biomes.
Add missing semicolon for random_sky.
Fix some scope whitespace issues.

This was SVN commit r17879.
2016-03-13 14:13:38 +00:00
2022aad5d1 decrease the hack armour of fields to favor rushes
This was SVN commit r17878.
2016-03-13 14:09:52 +00:00
6c8004c206 Player component cleanup.
Fat-arrow.
Whitespace fixes for some selected objects.
Newlines to make it more readable.
++i instead of i++.

This was SVN commit r17877.
2016-03-13 13:49:37 +00:00
2e5969c395 Thanks Guuts for #3606 and the other patches you have worked on!
This was SVN commit r17876.
2016-03-13 13:36:25 +00:00
028e573759 allow the use of allied dropsites using tech, fixes #3791
This was SVN commit r17875.
2016-03-13 13:33:21 +00:00
bcfa626bc4 Improve 27b4df0978.
This was SVN commit r17874.
2016-03-12 22:20:15 +00:00
26488bd892 Fix ugly all-bold tooltip for the multiple details area capture bar (reported by bb who has a good eyesight!)
This was SVN commit r17871.
2016-03-12 18:36:28 +00:00
753a79ff67 Fix messages.json
This was SVN commit r17868.
2016-03-12 17:48:16 +00:00
b2f0544215 Delete some broken actor and art files, listed by stanislas69, refs #2524
This was SVN commit r17867.
2016-03-12 15:46:26 +00:00
27b4df0978 Improve some aura and technology descriptions where there was a confusion between speed and time.
Patch by Palaxin, fixes #3600

This was SVN commit r17865.
2016-03-12 13:18:32 +00:00
2546eecbf3 fix modifications (by tech or aura) of garrison and formation auras, fixes #3799, patch by fatherbushido
This was SVN commit r17863.
2016-03-10 21:46:37 +00:00
18829e17c2 Fix comment following e0a9dfd5a2.
This was SVN commit r17862.
2016-03-10 17:11:36 +00:00
e0a9dfd5a2 Allow changing the late-observer flag in a running game, fixes #3669.
Remove it from the game-attributes, since it is not used in the
simulation, nor are they supposed to change in running games.

This was SVN commit r17861.
2016-03-10 11:35:43 +00:00
2305218d9f Optionnames are in lower case, refs #3604.
This was SVN commit r17860.
2016-03-10 11:16:15 +00:00
b71e7e3538 Petra chathelper cleanup.
Inline variables used only once.

This was SVN commit r17859.
2016-03-10 10:44:52 +00:00
aa1e3f6d06 Session cleanup
Simpler errorhandling when fetching GUIInterface-notifications.

This was SVN commit r17858.
2016-03-10 10:15:23 +00:00
4b636fc407 Add a precision to the instructions included in default.cfg.
This was SVN commit r17857.
2016-03-09 21:48:41 +00:00
212d8e7dd0 cleanup of 98b4fe6d00
This was SVN commit r17856.
2016-03-09 21:45:14 +00:00
04586c9e8b Adapt the number-of-players GUI objects of the lobby to support 10 and more clients.
This was SVN commit r17855.
2016-03-09 21:30:53 +00:00
98b4fe6d00 fixes confusion between markets when doing trade, fixes #3812, patch by leper and fatherbushido
This was SVN commit r17854.
2016-03-09 19:54:12 +00:00
7409fe4bec Defeated players are not supposed to do stuff.
Not sending resources on defeat also gives an incentive to completely
defeat players.
Patch by fatherbushido, refs #3265.

This was SVN commit r17853.
2016-03-09 16:11:55 +00:00
2fea95530f Quit if the user requested that while loading the replay list. Fixes #3446.
This was SVN commit r17852.
2016-03-09 16:06:41 +00:00
f2ed0098ee Make the playername-deduplication ("User" -> "User (2)") optional.
Have it disabled by default to fix #3604.
Prevents players from rejoining as late-observers in case they timed-out
on the client-side but not on the server-side.

This was SVN commit r17851.
2016-03-09 15:02:38 +00:00
c0f321b52e Add svott (refs #3736) and fpre (refs #3205) to the contributors.
This was SVN commit r17850.
2016-03-09 14:33:41 +00:00
7c33658fdd ships can be garrisoned in cart superDock with a heal rate, fixes #3810, patch by fatherbushido
This was SVN commit r17849.
2016-03-08 21:50:37 +00:00
a1c6d9149b fix typo from 8725c3ae7a
This was SVN commit r17848.
2016-03-08 18:49:06 +00:00
c7c8d9a5c7 Map previews for 3 random maps and some selected demo maps. Patch by yoreei, fixes #3798.
This was SVN commit r17847.
2016-03-08 17:29:18 +00:00
52bf894c50 Remove naval-tag from flood.
(It can be played without any ships and naval maps are not offered by
default).
Thanks yoreei for reporting.

This was SVN commit r17846.
2016-03-08 14:00:44 +00:00
c511e9c4ec To avoid unintentional joins, ask lobby users if they want to late-join the game as an observer before attempting to do so. Refs #3739.
Add selectedGame() to simplify some checks.
Add linebreaks to hostGame().

This was SVN commit r17845.
2016-03-08 00:18:21 +00:00
ea73e6b3b4 New random map script "Flood". Created by _kali and niektb, refs #3455.
This was SVN commit r17844.
2016-03-07 23:13:52 +00:00
35a13c5080 Remove trailing whitespace.
This was SVN commit r17843.
2016-03-07 17:28:31 +00:00
f3ba295593 Add new contributor _kali to the randommap-script credits.
Add existing contributors niektb and Stan to the map-section for the new
maps in alpha 20.

This was SVN commit r17842.
2016-03-07 17:12:34 +00:00
dd5cc3d02e Gamesetup cleanup.
Inline initializaiton of g_ServerName and fix a typo in e05c8263c5.

This was SVN commit r17841.
2016-03-07 15:05:16 +00:00
fc0f496e3d Fix indentation, refs #3803.
This was SVN commit r17840.
2016-03-07 11:44:03 +00:00
e827ebeb5c Multiplayer-gamesetup cleanup.
Eliminate deprecated for-each.
Quote object keys.
Remove unneeded sprintf from error() calls.
Remove unneeded comments.
Add linebreaks.

This was SVN commit r17839.
2016-03-07 11:42:52 +00:00
05bf260838 Fix the garrisoning flag for some Seleucid buildings, patch by stanislas69. Fixes #3631
This was SVN commit r17838.
2016-03-07 11:38:00 +00:00
49c30ae4b8 Give credit to three awesome contributors, refs #3802.
This was SVN commit r17837.
2016-03-07 10:24:38 +00:00
231586f2fa Aura cleanup.
Eliminate deprecated for-each.
Remove unused variable auraNames.
Use array-filter instead of for-loop.
Fix whitespace.
Don't use affectedPlayers outside of scope.

This was SVN commit r17835.
2016-03-06 14:57:39 +00:00
b1cacacff1 Fix the test of the Player-component following c9b0db7f5f. Patch by fatherbushido, fixes #3803, refs #3522.
This was SVN commit r17834.
2016-03-06 14:02:34 +00:00
5a8d7d1a58 petra cleanup
This was SVN commit r17831.
2016-03-05 16:20:49 +00:00
bcf2c75513 New in-game Credits page, fixes #3744.
This was SVN commit r17830.
2016-03-05 11:52:08 +00:00
1504115c14 I shouldn't rename things.
This was SVN commit r17829.
2016-03-05 11:43:14 +00:00
dfbf874d8b Some string fixes.
This was SVN commit r17828.
2016-03-05 11:30:27 +00:00
6451a4c3c1 Petra: improve choice of workers, fixes #3586, patch from otero
This was SVN commit r17827.
2016-03-04 17:08:45 +00:00
6b19eefdcb cleanup of some foreach
This was SVN commit r17826.
2016-03-04 16:51:52 +00:00
9d2b8a74b7 petra: do not let the ai build too much towers or fortresses
This was SVN commit r17824.
2016-03-03 18:38:13 +00:00
d3e9aa2101 petra: complete changes started in 8d0223d6aa + some cleanup"
This was SVN commit r17823.
2016-03-03 16:18:12 +00:00
7403b92785 petra cleanup: use some arrow functions for sort
This was SVN commit r17822.
2016-03-02 17:10:26 +00:00
8d0223d6aa petra: do not anymore assume that workers are necessarily builders and gatherers
This was SVN commit r17821.
2016-03-02 16:58:02 +00:00
8725c3ae7a Diplomacy-manager cleanup.
Move resource-tributing button code to a custom function.
Shorten comment.
Reuse RESOURCES.
Inline tributeResource.

This was SVN commit r17820.
2016-03-02 16:56:44 +00:00
ed1afbebfc Diplomacy-manager cleanup.
Move the text setup to a custom function.
Reuse colorizePlayernameByID.
Add newlines.

This was SVN commit r17819.
2016-03-02 16:44:57 +00:00
17e6b316fa Diplomacy manager cleanup.
Move the diplomatic stance button initialization to a custom function.
Always hide the button if locked-teams is enabled, refs #3702.
Inline setDiplomacy.

This was SVN commit r17818.
2016-03-02 16:38:05 +00:00
23d37f188a cleanup of some missing tabs
This was SVN commit r17817.
2016-03-02 16:25:14 +00:00
e99e7e33ba Diplomacy manager cleanup.
Split openDiplomacy into four smaller functions, starting with
diplomacyFormatAttackRequestButton in this commit.
Hide the button if the user has no allies and after defeat/win.

This was SVN commit r17816.
2016-03-02 16:23:46 +00:00
af396c9bf9 Player-component cleanup.
Remove deprecated for-each and inline a variable.

This was SVN commit r17815.
2016-03-02 15:00:24 +00:00
458b4a6567 Prohibit user-initiated diplomacy-changes in the simulation while ceasefire is active, refs #2749.
This was SVN commit r17814.
2016-03-02 14:43:18 +00:00
012b686e7c Two early returns. Refs #3265.
This was SVN commit r17813.
2016-03-02 13:42:47 +00:00
163af24a6c cleanup in petra, patch by otero
This was SVN commit r17812.
2016-03-01 17:57:19 +00:00
9c6082ec23 fix garrison aura from heros, patch by fatherbushido
This was SVN commit r17811.
2016-03-01 17:19:16 +00:00
04c94da3cb add some missing spaces in previous commit
This was SVN commit r17810.
2016-03-01 17:12:38 +00:00
c9b0db7f5f Techs can now modify an aura
Wonder population bonus is now an aura (reverted when the wonder is
destroyed) with 10 pop (wonder) with an additionnal +40 with the tech
patch by fatherbushido

This was SVN commit r17809.
2016-03-01 17:10:42 +00:00
b88fd4fe09 fix typo from 8a3bbdf4db
This was SVN commit r17808.
2016-02-29 17:21:35 +00:00
ba0700f612 garrisoning only works between mutual allies
This was SVN commit r17806.
2016-02-28 12:58:52 +00:00
ae309ed550 Replace the inscription on the altar in the main menu background.
The new inscription fits better with the scene, set in Sparta, and is
the Greek original epitaph written on the Cenotaph of Thermopylae,
according to Herodotus:
"Go, tell the Spartans, stranger passing by, that here, obedient to
their laws, we lie."

The previous inscription was apparently a fraction of a sentence and was
about Spartan foreign policy in Ionia.

Suggestion and research by Danny, art by wowgetoffyourcellphone.

This was SVN commit r17805.
2016-02-27 21:31:59 +00:00
c2fad862d8 Correct a typo in 2b0c40d7b2, thanks fede for reporting, fixes #3794.
This was SVN commit r17804.
2016-02-26 22:40:22 +00:00
652ec4f8e5 fix some resetting of gatherer walk animation
This was SVN commit r17802.
2016-02-24 18:57:23 +00:00
ec43274e2b drop carried resources when finishing to build a dropsite
This was SVN commit r17801.
2016-02-24 18:49:28 +00:00
05cf535c58 do not drop resources when garrisoning in allied structure
This was SVN commit r17800.
2016-02-24 17:45:13 +00:00
632901043e Give the mauryan pillar of ashoka a trade speed bonus, fixes #3639.
This was SVN commit r17799.
2016-02-23 23:30:42 +00:00
4ebcae8fa6 Highlight unassigned players in the player-assignments dropdown. Sort by player index. Based on patch by dalerank, fixes #3508.
This was SVN commit r17798.
2016-02-23 22:40:43 +00:00
8b85b72dfc Fix water-terrain painting following 6cc00f6a82. Based on patch by niektb.
This was SVN commit r17797.
2016-02-23 17:47:55 +00:00
2b0c40d7b2 Translate some untranslated strings, refs #3665.
Add a chat message if the control-all units cheat was used, refs #2676.

This was SVN commit r17796.
2016-02-23 17:29:39 +00:00
df42b9caba Commands.js cleanup.
This was SVN commit r17795.
2016-02-23 15:51:09 +00:00
e10ff35869 Commands.js cleanup. Remove unneeded characters of all sorts and use "early-continues".
This was SVN commit r17794.
2016-02-23 15:04:28 +00:00
b60c6f6b15 Commands.js cleanup - fix whitespace.
This was SVN commit r17793.
2016-02-23 14:52:20 +00:00
8a3bbdf4db Commands.js cleanup. Fix remaining for-each loops and increment operators.
This was SVN commit r17792.
2016-02-23 14:49:03 +00:00
e953ca23ba Commands.js cleanup. Replace deprecated for-each.
This was SVN commit r17791.
2016-02-23 14:36:50 +00:00
3a502c0d21 Commands.js cleanup, use fat-arrows.
This was SVN commit r17790.
2016-02-23 14:13:46 +00:00
844566c787 Translate the developer-overlay notification at the receiving end, fixes #3304.
This was SVN commit r17789.
2016-02-23 12:27:34 +00:00
7a5d75be11 Better placement for initial resources on Island Stronghold, based on patch by niektb, refs #3455.
First place all starting entities before placing initial resources to
avoid placing them on each other.
Don't place initial mines near the territory of allies.

This was SVN commit r17788.
2016-02-23 11:51:16 +00:00
c6804aad35 Small RMS library style improvement.
This was SVN commit r17787.
2016-02-23 10:46:32 +00:00
fc298eb3f5 Show time-notifications to observers, refs #3168.
This was SVN commit r17786.
2016-02-22 22:53:48 +00:00
b68654b52d Inlining this is not possible due to the closure.
This was SVN commit r17785.
2016-02-22 17:23:46 +00:00
97c3a166a8 Don't shoot an undocumented arrow from UnitAI if the entity also has a BuildingAI component shooting arrows. Fixes #3763.
Instead, add the arrow to the affected unit templates (except bireme and
trireme, refs #3196).

This was SVN commit r17784.
2016-02-22 17:01:16 +00:00
94ccb153a6 BuildingAI style fixes, refs #3763.
Remove a duplicate targetUnits-, some useless length-checks and unneeded
comments.

This was SVN commit r17783.
2016-02-22 16:44:57 +00:00
8f630789e6 Add/move the Mercenary tag to VisibleClasses, so that all mercenaries are influenced by auras and techs.
Patch by fatherbushido, fixes #3770.

This was SVN commit r17782.
2016-02-22 11:13:31 +00:00
6006edf031 Revert approach to detect offline players without remembering disconnect messages, since it doesn't work for entities of unassigned players. Refs #3677.
Remove unused AIManager.
Inline playerData.

This was SVN commit r17780.
2016-02-20 17:37:19 +00:00
6e9fd4ccf2 fix the ungarrison-all command from allied structures
This was SVN commit r17779.
2016-02-20 15:04:00 +00:00
7918347342 Hide the offline-hint for gaia, refs #3677.
Inline some variables.

This was SVN commit r17777.
2016-02-19 14:36:36 +00:00
4cda0b7040 Don't show the offline hint for AI-assigned players, refs #3677.
This was SVN commit r17774.
2016-02-18 14:46:45 +00:00
6cc00f6a82 Reduce base-height of the random map island stronghold, so units don't walk too far into the water. Patch by niektb, refs #3455.
This was SVN commit r17773.
2016-02-18 13:50:10 +00:00
f8b20d181d Add chat-addressee dropdown, refs #1767.
Add observer-only chat and allow private messages from observer to
observer.
Prevent defeated players from using the team-chat, fixes #3441.

This was SVN commit r17771.
2016-02-18 01:09:56 +00:00
365cbf5b64 Apply auras to resource costs of buildings. Fix some broken loops over a Map. Patch by fatherbushido, fixes #3769.
This was SVN commit r17770.
2016-02-17 23:27:36 +00:00
5aa7a232a4 Ceasefiremanager cleanup.
Let instead of var.
Remove unneeded comments.
Remove trailing whitespace.

This was SVN commit r17767.
2016-02-16 16:23:40 +00:00
badc75b0ad Show wall-aura in the construction tooltip. Patch by s0600204, fixes #3766.
This was SVN commit r17762.
2016-02-15 16:18:57 +00:00
ab57951198 Don't lose the player-offline hint on diplomacy change. Patch by dalerank, fixes #3677.
Also remove the "disconnected" property which has apparently never been
used since its introduction in 81f5e0ac5f.

This was SVN commit r17760.
2016-02-15 15:38:56 +00:00
5485f50948 Defeat the player if the only building owned is an athenian theatron. Patch by fatherbushido, refs #3229.
This was SVN commit r17759.
2016-02-15 13:08:59 +00:00
9ec4f35959 Improve and fix some wrong observer-checks that didn't take defeated players into account. Refs #3168, #3215.
Introduce isPlayerObserver to easily cover that case.
Move some checks and updates into selectViewPlayer and eliminate
setObserverMode.
Initialize the music before changing the perspective.

This was SVN commit r17758.
2016-02-15 12:53:06 +00:00
e3bd2e3fa8 Session cleanup, some simplifications.
This was SVN commit r17757.
2016-02-15 11:39:02 +00:00
823fe17dd4 Entity selection cleanup.
Replace deprecated for-each and remove trailing whitespace.

This was SVN commit r17755.
2016-02-14 23:25:28 +00:00
cb4f8989f1 add a small vision range for aggressive/violent animals, refs #3783
This was SVN commit r17754.
2016-02-14 17:08:55 +00:00
ecb65cd58d petra cleanup
This was SVN commit r17753.
2016-02-13 16:28:23 +00:00
2695e7c77b Remove trailing whitespace, refs #3586.
This was SVN commit r17752.
2016-02-13 11:44:46 +00:00
07133ceb8c fix sound options not propagated to sound manager when reverting/resetting options
This was SVN commit r17749.
2016-02-09 19:00:10 +00:00
ac1f935bad Split GUI updates from onSimulationUpdate.
This was SVN commit r17743.
2016-02-08 14:01:21 +00:00
971d70fa99 allows the user to restore the default game options, refs #3737
This was SVN commit r17739.
2016-02-07 15:10:44 +00:00
43f358563c when saving an option to file, write only that value and not all the content of the user configDB, refs #3737
This was SVN commit r17738.
2016-02-07 11:31:23 +00:00
a2f7d4d82a Show fog of war in observermode, fixes #3168.
This was SVN commit r17735.
2016-02-06 12:56:41 +00:00
875a774da9 New random map "Island Stronghold" by _kali, reworked by niektb. Refs #3455.
This was SVN commit r17734.
2016-02-06 12:30:40 +00:00
b973eebeda Add color indicator to the playerselection in observermode, refs #3168.
This was SVN commit r17733.
2016-02-06 12:19:02 +00:00
22f5b00fce Implement network-warnings, fixes #3264.
Shows a notification if the local client or other players connections
timeout or have bad latency.

This was SVN commit r17730.
2016-02-04 17:14:46 +00:00
4d41bd9622 reorganize options, adding dependences, refs #3737
This was SVN commit r17729.
2016-02-02 21:50:00 +00:00
6052716a78 Random-map-script cleanup.
Move duplicate code of the area- and object-group placing methods to
retryPlacing and two coordinate-randomization functions.
Remove three unused functions (println obsolete since 0e0ed94926,
chooseRand and its helper argsToArray since before 34f1817869).
Inline local calls to GetMapSize() and IsCircularMap(). Keep unused
isCircularMap for API access. Cache variables when retrying.
Map-generation can finish 2% faster.

This was SVN commit r17728.
2016-02-02 16:33:36 +00:00
fdc67768f0 Random random-map-script cleanup.
Simplify sortPlayers.
Use [] instead of new Array.
Remove unneeded braces.
Use JSDoc comments.
Use let instead of var.

This was SVN commit r17727.
2016-02-02 13:35:03 +00:00
b1fbc5b6bd Add newlines, remove unneeded braces.
This was SVN commit r17726.
2016-02-02 11:23:01 +00:00
254f6357f6 Fix a typo (terreins -> terrains).
This was SVN commit r17725.
2016-02-02 10:56:39 +00:00
d8b0404281 petra: some tweaks to be able to better deal with maps like the Migration scenario
i.e. maps with a small starting island, no initial population and no
initial gathering food

This was SVN commit r17723.
2016-01-29 19:41:34 +00:00
30bd2baeeb fix Migration scenario map
This was SVN commit r17722.
2016-01-29 18:53:09 +00:00
b65f2a338c petra cleanup
This was SVN commit r17720.
2016-01-28 19:44:18 +00:00
c46e64c4d2 fix dropdown option
This was SVN commit r17719.
2016-01-28 18:44:50 +00:00
30d0bcd350 petra remove some useless code
This was SVN commit r17718.
2016-01-28 18:30:39 +00:00
75d91c6a26 petra: fix account of foundation popbonus when checking if new houses are needed
This was SVN commit r17717.
2016-01-27 18:30:49 +00:00
06eadf2bc4 petra cleanup + some tweaks
This was SVN commit r17716.
2016-01-27 18:17:55 +00:00
564941c477 fix wall buildings after f34dc412b6, refs #3647
This was SVN commit r17715.
2016-01-26 19:04:29 +00:00
91ed318f0d fix typo
This was SVN commit r17714.
2016-01-26 18:36:59 +00:00
08d326cef5 clone the rallypoint data from cmd, fixes #3751
This was SVN commit r17713.
2016-01-26 18:03:06 +00:00
090f2ccfe5 Don't modify the command object. Refs #3647.
This was SVN commit r17712.
2016-01-26 17:58:15 +00:00
ab16ddb256 Show a more specific disconnect-message in case the host closed the server. Refs #3264, #3570.
This was SVN commit r17710.
2016-01-25 12:56:30 +00:00
68f87cb556 Proportionally adapt cost for civ-specific fortresses since the generic template was changed in 6b9b863747.
Thanks Hannibal Barca for reporting.

This was SVN commit r17706.
2016-01-25 00:38:33 +00:00
4a58c7f8b6 petra: improve performance of docks positioning (was really slow) + some cleanup
This was SVN commit r17705.
2016-01-24 20:43:27 +00:00
7c6f35b2c0 Update the unit selection for observers, refs #3168.
Don't disable the deselect button.

This was SVN commit r17704.
2016-01-24 12:33:34 +00:00
aa8541e8ce 2-player skirmish map "Golden Island". Created by scythetwirler and updated by niektb.
This was SVN commit r17697.
2016-01-23 23:02:25 +00:00
27d04d0165 Close previously opened dialogs before opening a new one. Fixes #3535. Also remove many duplicate calls.
This was SVN commit r17692.
2016-01-23 03:40:31 +00:00
4fbd550cda Correct z-ordering issue for chat panel and input form. Patch by dalerank, refs #3535.
This was SVN commit r17691.
2016-01-23 03:24:00 +00:00
c97a91f7bd Change displayed string instead of throwing errors in case of unspecified civs in replays.
This was SVN commit r17690.
2016-01-23 02:41:35 +00:00
dd7287c1c8 additionnal petra cleanup
fix a case with foundation access not defined

This was SVN commit r17688.
2016-01-22 19:46:51 +00:00
c955d74330 petra cleanup (thanks to leper's suggestion)
This was SVN commit r17687.
2016-01-22 18:45:28 +00:00
fdf7dabe18 check that the target can be built or repaired inside the canRepair function
This was SVN commit r17685.
2016-01-21 20:49:57 +00:00
edb16dafbb petra cleanup
This was SVN commit r17684.
2016-01-21 20:38:56 +00:00
df7da846ad some cleanup in ai api
This was SVN commit r17683.
2016-01-21 20:23:19 +00:00
cccd33e7fe petra cleanup
This was SVN commit r17679.
2016-01-20 19:45:47 +00:00
87886b7b03 fix the AI for the switch to the Repairable component
This was SVN commit r17678.
2016-01-20 19:04:38 +00:00
dd545bdbf1 petra cleanup
This was SVN commit r17677.
2016-01-19 23:19:40 +00:00
0a64bf25cd Sort globals, add JSDoc comments, remove trailing whitespace.
This was SVN commit r17676.
2016-01-19 18:09:34 +00:00
5308b95aa8 Let observers change perspective. Refs #3168.
Disable the controls for observers (unless the developer-option is
enabled).
Don't check for g_IsObserver, since observers should be able to use the
developer overlay as well.
Update all GUI elements when changing the perspective using
onSimulationUpdate().
Enable observermode for defeated players.

This was SVN commit r17675.
2016-01-19 17:23:16 +00:00
0e48b7df75 Update the idle-worker-button onSimulationUpdate. Patch by svott, fixes #3736.
This was SVN commit r17674.
2016-01-19 16:04:59 +00:00
e035e3e985 Restore the replay selection after deletion. Based on patch by dalerank, fixes #3473.
This was SVN commit r17672.
2016-01-18 20:16:45 +00:00
a6f8b3b3d7 rename the Close button, refs #3737
This was SVN commit r17671.
2016-01-18 19:44:48 +00:00
a59833102f Specify the default column sorting order in XML instead of JS.
Ref #2405, #3473.

This was SVN commit r17670.
2016-01-18 19:23:14 +00:00
9481c168bd petra cleanup
This was SVN commit r17669.
2016-01-18 19:20:09 +00:00
69f4614768 Don't use two different default values ("name" and "") in JS for the default lobby sorting order in b8fce56821, refs #2405.
Supplement a variable g_GameStatusOrder missing in 66ec6dbf12.

This was SVN commit r17668.
2016-01-18 18:29:16 +00:00
8d2a73bf52 Show the aura of city walls in the structure tree. Patch by s0600204, refs #3655.
This was SVN commit r17662.
2016-01-18 03:24:26 +00:00
c20ee2ad5e add dropdown capacity for options, fixes #2596
remove use of eval for function execution

This was SVN commit r17657.
2016-01-17 21:50:54 +00:00
dc9d1fff11 restore sorting in template, refs #3741
This was SVN commit r17656.
2016-01-17 15:44:38 +00:00
cfb2216b8c Remove JSDebugger. Closes #2419, #2973. Refs #410, #2348, #3708.
https://bugzilla.mozilla.org/show_bug.cgi?id=1069694

This was SVN commit r17655.
2016-01-17 00:34:33 +00:00
b4d11cf747 let farms have the terrain ownership, fixes #3741
This was SVN commit r17654.
2016-01-16 12:47:33 +00:00
c4d9b64fe5 fix undef var when in petra debug
This was SVN commit r17653.
2016-01-15 19:12:34 +00:00
0d33ec31cc Pass cmd to TryTransformWallToGate as that is used when debugging commands. Patch by dalerank. Fixes #3694.
This was SVN commit r17651.
2016-01-14 16:21:05 +00:00
419453e212 Allow randommap-scripts to set a custom fail-limit when placing objects. Patch by Stan, fixes #3567.
This was SVN commit r17649.
2016-01-13 23:51:46 +00:00
ad7c53e65a Adapt the template for corrals to the limitation in UnitAI.CanGarrison. Refs #3412.
This was SVN commit r17648.
2016-01-13 23:33:08 +00:00
aa7ef01105 rename reload to revert
This was SVN commit r17646.
2016-01-13 22:32:42 +00:00
5c61f68600 Rework the logics of options loading to allow more flexibility (i.e. adding a min or max value for number inputs)
Fix some problems when reloading saved options, refs #3511
Add the material quality option, refs #3737
Reload and Save buttons are only enabled when some options have changed.

This was SVN commit r17645.
2016-01-13 22:01:36 +00:00
cd22f9f722 Display all auras in the tooltips (even if there are some with an identical name). Patch by s0600204, fixes #3655.
Add an aura tooltip to the construction panel.
Remove duplicate tooltip code for the training panel.
Eliminate for-each and use the aura ID in GetTemplateDataHelper, since
only that is a unique identifier.
Change the name from "Hero Aura" to "Garrisoned Capture Aura" for that
aura that every hero has.

This was SVN commit r17644.
2016-01-13 19:32:17 +00:00
c9a22ec7c3 Show the population bonus of buildings in the structure tree. Patch by s0600204, fixes #3738.
Also fix a newline in the tooltip.

This was SVN commit r17643.
2016-01-13 18:44:30 +00:00
e6a8cd8c5e Do not redeclare a variable.
This was SVN commit r17640.
2016-01-12 20:04:33 +00:00
ee6a5fd915 Extend defensive-stance tooltip and add quotes to object keys.
This was SVN commit r17639.
2016-01-12 18:32:30 +00:00
a02f797169 Add unit-stance tooltips. Patch by bb, fixes #3385.
Reorder cases, correct indentation, remove unneeded variable and
sprintf.

This was SVN commit r17638.
2016-01-12 16:19:43 +00:00
83efc8363e fix old typos in sound config
This was SVN commit r17636.
2016-01-11 22:39:03 +00:00
f0fc36138d cleanup of previous patches
This was SVN commit r17627.
2016-01-10 22:46:37 +00:00
3246b02cda make easy AI levels easier and hard levels harders by also applying the bonus/malus to trade, fixes #3722
add some info on AI levels in the AI config window

This was SVN commit r17626.
2016-01-10 21:57:01 +00:00
7fa2962c45 allows changing options for one session without having to save them, fixes #3511
changes on text or number options are now detected without any need of
typing Return, fixes #2451
graphic options (using the renderer type) are now properly saved when
changed
sound options (using the function type) are still not saved

This was SVN commit r17625.
2016-01-10 21:41:34 +00:00
e9511d21d5 Fix bug in d4d05c6236.
This was SVN commit r17624.
2016-01-10 17:25:40 +00:00
8c7b6dceaa Show status-bars of all players to observers, fixes #3215.
This was SVN commit r17623.
2016-01-10 16:47:57 +00:00
8859f33b38 Rename PickFriendlyEntitiesOnScreen to PickPlayerEntitiesOnScreen.
Rename PickFriendlyEntitiesInRect to PickPlayerEntitiesInRect.
Rename PickSimilarFriendlyEntities to PickSimilarPlayerEntities.
Add comment.
Refs #3215.

This was SVN commit r17622.
2016-01-10 14:47:09 +00:00
ead85b1572 Update the control-all-units checkbox when changing the perspective and onSimulationUpdate so that it always shows the correct value.
This was SVN commit r17619.
2016-01-10 00:59:28 +00:00
9a623a8e00 Style fixes.
This was SVN commit r17618.
2016-01-09 23:01:07 +00:00
6b710f35b0 Show the selection panels to observers / in replays, fixes #3731.
This allows observers to see the training queue, researched techs, unit
stance, constructable buildings, garrisoned units, market prices etc.
for all players without changing the perspective.
All buttons are disabled if the user isn't allowed to control the
affected player.
Notice updateUnitCommands() fills out the panel differently in case of
selecting an allied building.
Extends the GUIInterface methods "GetNeededResources",
"CheckTechnologyRequirements" and "IsTechnologyResearched" to optionally
take a different player-argument.

This was SVN commit r17617.
2016-01-09 22:01:08 +00:00
9b922ebadd Remove invisible character introduced in deaa224785.
This was SVN commit r17616.
2016-01-09 12:12:42 +00:00
491cba314a Translate some notification messages. Refs #3665.
This was SVN commit r17614.
2016-01-08 23:22:45 +00:00
caa81a1d31 Remove garrison code duplication.
This was SVN commit r17613.
2016-01-08 23:02:26 +00:00
deaa224785 Fix some Gallic leader names, based on historic_bruno's suggestions. Fixes #3675
This was SVN commit r17612.
2016-01-08 20:12:25 +00:00
87a93b2498 Add version command line option. Fixes #2965.
This was SVN commit r17611.
2016-01-08 19:35:33 +00:00
b4f187b8d4 Defeat the player if he/she has no more units, nor buildings that can train units. Fixes #3229.
This was SVN commit r17610.
2016-01-08 12:21:40 +00:00
5b60f2d1f6 Display the buildrate of foundations in the tooltip. Patch by bb, fixes #3395.
This was SVN commit r17609.
2016-01-08 11:53:48 +00:00
e1e4a00ad7 Enable sky by default. This is usually not needed during gameplay (no sky visible), but it is with cinematic, committed in 89aef0b6eb, where camera can point to the sky.
Can still be disabled in game options menu.
Refs: #3301.

This was SVN commit r17607.
2016-01-07 12:38:43 +00:00
a7743e95b9 cleanup of unused counters
This was SVN commit r17605.
2016-01-06 21:15:58 +00:00
e0a1e2beb1 Session cleanup.
Don't send the simstate as an argument of reportGame().
Eliminate a for-each loop.
Remove some superfluous comments.

This was SVN commit r17604.
2016-01-05 03:02:59 +00:00
b18cd3254c Test FixedVector{2,3}D script conversions, and test calling functions of the prototypes.
Also ENSURE that the given value identifier is actually present in the
cache instead of creating one if it is not.

This was SVN commit r17603.
2016-01-04 21:41:40 +00:00
4c4beb8450 cleanup
This was SVN commit r17602.
2016-01-04 18:10:04 +00:00
9f334036ef Do not align object properties.
Do not construct objects if they only contain two atomic elements.
Revert getDisconnectReason so as to have a custom message for the error
case. Add a warning.

This was SVN commit r17601.
2016-01-04 17:59:12 +00:00
24b14fe201 allow the AI to build near walls (but not gates), fixes #3725
This was SVN commit r17596.
2016-01-03 21:04:23 +00:00
89aef0b6eb Cinematic camera core functionality. Patch by Vladislav Belov.
Based on existing code that was still around from an old(not working)
implementation.
Supports basic control from trigger scirpts (queue, start and stop
camera paths) and works in multiplayer.

This was SVN commit r17594.
2016-01-03 12:41:04 +00:00
a32aa3b6cf petra: use the proper attack number when deserializing, refs #3720
This was SVN commit r17592.
2016-01-02 18:16:50 +00:00
036f985017 Add missing semicolons.
Update timestamp.

This was SVN commit r17591.
2016-01-02 18:12:02 +00:00
8773d816ae add specific regeneration when idle, fixes #3606, patch by Guuts
This was SVN commit r17590.
2016-01-02 18:10:10 +00:00
1d00164b6b petra: make better use of the new fishing tech
This was SVN commit r17589.
2016-01-02 17:50:56 +00:00
7c89cfb3ba fix typo in petra debug outputs
This was SVN commit r17585.
2016-01-01 17:41:49 +00:00
9f9db45a03 Fix broken feedback display logic and broken error handling from ccb534259d. Additionally, streamline logic in prelobby.js and remove an unexplained check in lobby.js added by 76a1a84a58.
This was SVN commit r17584.
2016-01-01 17:18:17 +00:00
ccb534259d Major lobby cleanup.
Create an object holding the handling of all netmessage types.
Display private messages sent by moderators.

Details:
 Switch back the second and third argument of CreateSimpleMessage, so it
relates again to the switch/object.
 Reduce the dimension/nesting of the object/switch from three to two.
 Hence remove the useless "standard" and "internal" value send in the
text field.
 Rename CreateSimpleMessage to CreateGUIMessage
 Use the property "level" instead of "text" for "connect" and
"disconnect".
 Remove the handling of the "connect" event in lobby.js, since it is
never called.
 Translate the disconnect event.
 Add comments and explicit checks to handleMessage and handleMUCMessage
to make obvious where they differ.
 Remove the "message" property from those GUI messages, since it should
just use "text".
 Move the login-fail handling to JS.
 Remove useless sprintf calls from warning messages.
 Inline some variables.
 Add missing semicolons.

This was SVN commit r17581.
2015-12-31 17:08:23 +00:00
2bf194134b Repairrate cleanup. Refs #3395, patch by bb.
Rename ratio to rate.
Simplify translation.
Round in GUI, not simulation.
Check for div/0.
Fix wrong variable name in test_GuiInterface.js.

This was SVN commit r17580.
2015-12-31 15:20:12 +00:00
75eed7cc79 Missing semicolons, two wrong commata, jshint ftw.
This was SVN commit r17579.
2015-12-31 14:02:59 +00:00
460f17e6f7 Fix mauryan pillar of ashoka GUI panel bug. Refs #3639.
It can only be built while ashoka is alive.
Previously the structure was selectable from the panel but not placable
while he was absent.

This was SVN commit r17577.
2015-12-31 12:19:45 +00:00
082a32802b Refresh the diplomacy and trade window in case the playerselection (change perspective) has changed.
This was SVN commit r17572.
2015-12-30 12:10:11 +00:00
aa8e0159a0 Only regain health while idle (Battlefield Medicine tech). Fixes #3606, patch by Guuts.
This was SVN commit r17571.
2015-12-30 11:37:50 +00:00
6cdd99474a Fix fail.
This was SVN commit r17570.
2015-12-30 11:17:50 +00:00
7648b4f482 Gamesetup and session cleanup.
Convert network commands to an object and simplify the formating of
system chat messages.

This was SVN commit r17569.
2015-12-29 15:29:24 +00:00
46a42c04ef Gamesetup message cleanup.
Transform switch-statements into objects.
Make them more consistent, in particular the kick/ban and
ready-messages.
Also colorizes the playername in disconnect messages.
Fix a wrong comment in the network code and remove a duplicate check
(AIs).

This was SVN commit r17568.
2015-12-29 14:45:53 +00:00
f8ec158116 Session cleanup.
Transform trivial switch-statements to objects.
Move removeOldChatMessage right below addChatMessage, since it is only
used there.

This was SVN commit r17566.
2015-12-28 23:16:33 +00:00
2e8d5aa2c8 Session chat cleanup.
Unify switch-statement using objects.
Do not parse recursively, but do a linear 2-step process. Remove msg.me
property and move "/me" parsing out of that function.
Early return instead of using msg.hide.
Add observer-checks for private messages to impede abuse and fix #3270.
Remove the "/all" command, since it doesn't add functionality but
complexity.
Remove a TODO as displaying multiple contexts ("/team /allies text"?) is
not useful currently and made the previous code error-prone.

This was SVN commit r17565.
2015-12-28 22:16:21 +00:00
2a0d403b4b let promotion improve a bit the capture strength of citizen
This was SVN commit r17564.
2015-12-28 18:51:49 +00:00
6182385626 Session cleanup.
Remove variable action.
Close diplomacy and trade window on disconnect.

This was SVN commit r17563.
2015-12-28 17:19:29 +00:00
704c08d2b0 petra: fixes placement of dock when on the border of the map
fixes attack path computation when change of target during
preparation
       fixes #3710

This was SVN commit r17557.
2015-12-26 13:14:13 +00:00
0d41806e99 Session cleanup.
Move formating of resource-amounts to new function
translateResourceAmounts.
Rename player/player1 to sourcePlayer/targetPlayer.
Inline colorizedPlayername.

This was SVN commit r17556.
2015-12-26 01:40:50 +00:00
5d56ee0449 Session cleanup.
Move new objects to globals, which makes the code easier to read,
changable for mods and saves performance.
Move cheat functions below variable declarations.

Remove old function formatClientList, which for any reason didn't make
it into last commit.

This was SVN commit r17555.
2015-12-26 00:42:52 +00:00
a280cb87db Colorize playernames when using the /list command in the gamesetup/session.
Add two missing semicolons and remove an unnecessary one.
Eliminate formatClientList, message, formattedUsername and
formattedUsernamePrefix.
Move four hardcoded colors to globals.

This was SVN commit r17554.
2015-12-25 23:49:28 +00:00
5f95bca6b0 Session cleanup (trading dialog text).
Move the code to update the idle-traders text to two new simplified
functions.
Eliminate all if-statements (including quadruple-nested ones).

This was SVN commit r17553.
2015-12-25 19:35:14 +00:00
0fb87496e7 Display the correct AI name instead of "Unknown Player" in case an AI sends a formatted chat message (introduced in 03adf0111a).
Thanks Evulant (AlThePhoenix) for reporting.

This was SVN commit r17552.
2015-12-25 18:07:16 +00:00
b154056266 Those globals were removed in 5aae5ee55a.
This was SVN commit r17550.
2015-12-24 20:54:47 +00:00
5aae5ee55a Session menu cleanup.
Replace for-each with for-of.
Remove duplicate code from updateMenuPosition.
Eliminate three unneeded globals.
Rename savedGameData to g_SavedGameData.
Remove unneeded braces.

This was SVN commit r17549.
2015-12-24 14:59:03 +00:00
39ffb0a6bd Session menu cleanup.
Rename globals to g_Foo.
Remove unused variable playerID from updateTimeNotifications which
became obsolete in fe9eeedd66.
Use let instead of var.
Add some missing semicolons.
Fix whitespace, quote object keys.

This was SVN commit r17548.
2015-12-24 02:53:18 +00:00
7a75f22f9f Session cleanup.
Transform switch-statement in handleNetMessage to object of fat-arrow
functions.

Also add missing check to colorizePlayernameByGUID.

This was SVN commit r17547.
2015-12-24 01:46:06 +00:00
7caaa278d6 Session cleanup.
Move code from switch-statement to handlePlayerAssignmentsMessage.
Inline updatePlayerDataAdd and updatePlayerDataRemove as they are tiny
and only used here.
Remove comments, early return, eliminate for-each.

This was SVN commit r17546.
2015-12-24 01:06:01 +00:00
f276791069 Session cleanup.
Transform netstatus switch-statement to an object consisting of a
fat-arrow function per message type.

This was SVN commit r17545.
2015-12-23 23:51:18 +00:00
3dcf51c466 Session chat cleanup.
Remove duplicate code by transforming getUsernameAndColor to
colorizePlayername.
Notice the previous function getUsernameAndColorByGUID didn't work with
unassigned players.

This was SVN commit r17544.
2015-12-23 19:06:48 +00:00
48f72aacc9 petra: some defense tweaks + cleanup
This was SVN commit r17543.
2015-12-23 16:17:05 +00:00
4eedfac0ca Refactor session chat.
Show chatmessages for diplomacy-changes and tributed resources to
observers/in replays. Fixes #3379.

This was SVN commit r17542.
2015-12-23 15:48:06 +00:00
03adf0111a Session chat cleanup
Remove g_PlayerAssignments from calls to findGuidForPlayerID, since the
argument was removed in ae92736b02.
Simplify formatChatMessage by moving playercolor-detection to
formatDefeatMessage and formatChatCommand.

This was SVN commit r17541.
2015-12-22 21:45:09 +00:00
cf7b8329fb Use var instead of let, since this variable is defined with var in this function already.
This was SVN commit r17540.
2015-12-22 20:43:17 +00:00
67b7366528 petra: remove hyphen in file names
This was SVN commit r17538.
2015-12-22 18:21:37 +00:00
ae92736b02 Session chat cleanup.
Use .property instead of ["property"].
Use if (object.property) instead of if ("property" in object).
Use array- and fat-arrow functions.

This was SVN commit r17537.
2015-12-22 17:37:22 +00:00
3ba50b4ed4 decrease the repair rate of walls, refs #3707
This was SVN commit r17536.
2015-12-22 17:37:00 +00:00
ef7c01ee4c Don't error out when selecting maps with non-existent civs.
This was SVN commit r17534.
2015-12-22 17:04:57 +00:00
385101bbe7 petra: cleanup of defenseManager
This was SVN commit r17533.
2015-12-22 16:58:53 +00:00
dca07f9ddd Fix e9bc3e2089.
This was SVN commit r17532.
2015-12-22 16:44:27 +00:00
4212777334 Session chat cleanup.
Correct indentation.

This was SVN commit r17531.
2015-12-22 16:05:27 +00:00
e9bc3e2089 Session chat cleanup.
Split formatChatMessage into smaller functions.
Correct the indentation with the next commit.

This was SVN commit r17530.
2015-12-22 16:02:25 +00:00
0e40273c28 Session chat cleanup.
Move code from addChatMessage to a new function formatChatMessage.

This was SVN commit r17529.
2015-12-22 15:29:03 +00:00
57af0ac8b4 Session chat cleanup.
Remove duplicate call to parseChatCommands.
Rename msg.action to msg.me, as it only applies to the "/me" chat
command.
Remove some duplicate checks.
Remove unused variable userTag.
Also fix a wrong space in the loading screen.

This was SVN commit r17528.
2015-12-22 14:56:30 +00:00
bd35b097e2 Session chat cleanup.
Process the "system" case first.
Move shared variable to colorizedPlayername.
Remove trailing whitespace.

This was SVN commit r17526.
2015-12-22 13:38:38 +00:00
72dcd7422d Loading screen cleanup. Patch by Stan, refs #2087.
Use let instead of var.
Use g_ prefix for globals.
Remove trailing whitespace.

This was SVN commit r17523.
2015-12-20 23:02:18 +00:00
41fa85a34b Map cleanup.
Remove the "Seed" attribute as it is a relict of Atlas and not used
anywhere.
Also remove the author-tag of Forest Battle (4) as it's the only map
that has it.

This was SVN commit r17522.
2015-12-20 21:48:48 +00:00
0dda3b579c drop resources before switching to next queued order, fixes #1670
This was SVN commit r17521.
2015-12-20 21:30:34 +00:00
d4d05c6236 Session cleanup. Patch by Stan.
Eliminate the deprecated for-each.

This was SVN commit r17520.
2015-12-20 21:20:05 +00:00
423d26890a fix cases where changes in unitai orders were not transmitted to the ai
This was SVN commit r17519.
2015-12-20 21:07:47 +00:00
bacedf18bc Show the repair-ratio in the tooltip of buildings. Patch by bb, refs #3395.
This was SVN commit r17518.
2015-12-20 20:40:42 +00:00
eb8e381934 GuiInterface Cleanup
Remove trailing whitespace.

This was SVN commit r17517.
2015-12-20 19:18:39 +00:00
fab9327a14 GuiInterface cleanup. Refs #3395.
Simplify GetAverageRangeForBuildings and GetFormationInfoFromTemplate.
Use let instead of var.
Quote object keys.
Remove unneeded braces and variables.
Remove unused variable cmpMirage in L414 and numCleared in L1096.
Add missing semicolon in L637.
Use fat-arrow function.

This was SVN commit r17516.
2015-12-20 19:05:57 +00:00
c2b74197e0 Cleanup tooltips and selection details. Refs #3395.
Use let instead of var.
Quote object keys.
Prefix globals with g_.
Remove some unneeded variables.
Use ternary operator and fat arrow functions.

This was SVN commit r17515.
2015-12-20 17:15:21 +00:00
eea104748d Adjusts female citizen HP cost correctly using relative templates. Fixes #3510. Patch by Palaxin.
This was SVN commit r17514.
2015-12-19 22:57:28 +00:00
e80e37cb21 Fix whitespace.
This was SVN commit r17509.
2015-12-19 02:03:30 +00:00
56bf37a54e Simulation cleanup (Attack.js)
Use let instead of var.
Do not redeclare timeToTarget and cmpTimer.
Remove unused variable graphicalPosition.
Fix some whitespace issues.

This was SVN commit r17507.
2015-12-19 01:48:11 +00:00
825a2fcc34 Summary screen cleanup. Based on patch by bb, fixes #3518.
This was SVN commit r17503.
2015-12-19 01:00:32 +00:00
a381334976 Gamesetup cleanup
Unify the gameattributes-update of checkboxes.

This was SVN commit r17502.
2015-12-18 22:40:56 +00:00
659606b83e Revert the removal of setting the defaults in updateGUIObjects in b1e754c9b1 (until a better solution is found).
Add comments for the unsuspecting.

This was SVN commit r17499.
2015-12-18 12:48:04 +00:00
2d34b198df Remove a wrong tag from two skirmish maps.
This was SVN commit r17497.
2015-12-17 21:10:20 +00:00
d31afada25 Gamesetup cleanup
Move assignments of dropdownlist functions from XML to JS, so they are
all defined in one place.
Rename a function.

This was SVN commit r17496.
2015-12-16 23:13:59 +00:00
dca32228b5 fix dead tree actor, patch by stanislas69, fixes #3705
This was SVN commit r17495.
2015-12-16 20:45:08 +00:00
3196df663f some petra cleanup
This was SVN commit r17494.
2015-12-16 17:57:39 +00:00
6c4598fe16 increase a bit the loot xp of fauna_hunt, refs #3701
This was SVN commit r17493.
2015-12-16 17:54:00 +00:00
58cf3cb266 Correct two wrong references to variables in 5ccee7ade1. Patch by bb, fixes #3703.
This was SVN commit r17492.
2015-12-16 17:15:16 +00:00
7e9d105401 Toggle the session menu with the hotkey. Patch by Vladislav, fixes #3661.
This was SVN commit r17490.
2015-12-16 02:05:29 +00:00
1c6baed8e3 Gamesetup cleanup
Move creation of game-description to a separate function.

This was SVN commit r17489.
2015-12-16 01:37:43 +00:00
b1e754c9b1 Gamesetup cleanup
Remove all remaining variables referencing GUI objects in
updateGUIObjects.
Do more simple checks and insert new calls at more coherent places.

This was SVN commit r17488.
2015-12-16 00:42:26 +00:00
6873a5e5a9 Gamesetup cleanup
Unify switch-statement and remove unused variables.

This was SVN commit r17487.
2015-12-15 23:57:45 +00:00
f99de00779 Fix an operator precedence bug in the previous commit.
This was SVN commit r17486.
2015-12-15 23:19:01 +00:00
78cc57c16b Gamesetup cleanup (loadPersistMatchSettings, updateGUIObjects)
Move GUI updates from loadPersistMatchSettings to updateGUIObjects.
Simplify updateGUIObjects and use setGUIBoolean.
Move SetRankedGame from updateGUIObjects to handleGamesetupMessage.
Early return in handleGamesetupMessage.

This was SVN commit r17485.
2015-12-15 18:25:32 +00:00
df25d425dd Gamesetup cleanup (loadPersistMatchSettings)
Remove duplicate GUI updates which are done in initMapNameList and
updateGUIObjects.
Remove the g_IsInGuiUpdate line as the variable will be overwritten with
the next statement.

This was SVN commit r17484.
2015-12-15 17:16:35 +00:00
ffc70a2390 Gamesetup cleanup.
Don't copy the label from the dropdownlist, but create it from
g_MapFilters.
Move placeholder items to g_RandomMap and g_RandomCiv.

This was SVN commit r17483.
2015-12-15 15:40:34 +00:00
ab053fef3e Gamesetup cleanup
Remove 4 duplicate GUI updates in updateGUIObjects.
mapSelectionBox is updated in initMapNameList, the other three are done
80 lines below.
Inline finding of the selected map.

This was SVN commit r17482.
2015-12-15 14:57:06 +00:00
a960958379 Gamesetup cleanup.
Abort in case a client tries to update the gamesettings.

Rename onGameAttributesChange to updateGUIObjects.
Move a check to sendRegisterGameStanza().

This was SVN commit r17481.
2015-12-15 14:14:52 +00:00
8354adb74a Gamesetup cleanup
Deobfuscate mapfilter code. Remove unneeded, peculiar functions.
Construct g_MapFilters in-place and mark as const.

In initMapNameList, load "all" maps if no mapfilter is specified.

This was SVN commit r17480.
2015-12-15 12:23:39 +00:00
931f5f752b Gamesetup cleanup.
Resolve if-statements in initMultiplayerSettings.

This was SVN commit r17478.
2015-12-15 00:21:27 +00:00
5a7a56da41 more cleanup on petra
This was SVN commit r17477.
2015-12-14 21:17:22 +00:00
0ed4a4c102 update the XP loot points of animals, fixes #3701, and remove the outdated and not used elephant template
This was SVN commit r17476.
2015-12-14 20:49:04 +00:00
636cc34a13 Gamesetup cleanup & translation fix
The caption of mapSelectionText (mapname-label visible to clients)
showed "random" instead of a translated "Random".
Move hardcoded "orange" color to a global const.

Simplify loadMapData.
Rename saveGameAttributes() to savePersistMatchSettings().

This was SVN commit r17475.
2015-12-14 18:47:41 +00:00
a8ac537ebc Limit the number of units spawned when using cheats to prevent freezing the game. Based on patch by Stan, fixes #3545.
This was SVN commit r17474.
2015-12-14 17:10:55 +00:00
da9ec4f325 Session cleanup.
Remove unused and useless ambientsound code. The ambient actually stops
with EndGame.

This was SVN commit r17473.
2015-12-14 16:47:45 +00:00
5df6a0182a Gamesetup cleanup.
Use hideControl for playerdropdowns.
Remove some superfluous checks and  comments.
Simplify using logical or, math and ternary operator.

This was SVN commit r17472.
2015-12-14 15:37:58 +00:00
acde954f8d Gamesetup cleanup.
Use let in function scope too.

Though spider monkey doesn't support let fully yet, it might be able to
detect some more reference errors in the code with later versions.
For example if a let variable is referenced before being defined
(temporal dead zone).
Besides, it is an easier rule to follow (let in functions, var for
globals) and makes the code more coherent.

This was SVN commit r17471.
2015-12-14 14:32:43 +00:00
7665a9ee31 Session cleanup.
The usual suspects:
Move all constants to the top.
Rename all globals to g_Foo.
Use let for all local variables (except in the for-each parts which will
be updated later).
Quote object keys.
Ternary operator.
Fat-arrow functions.
Whitespace issues.

This was SVN commit r17468.
2015-12-14 05:37:34 +00:00
25e6136786 Clear g_ChatTimers too in case the new /clear command is used from the session. Refs #3396.
This was SVN commit r17467.
2015-12-14 04:14:58 +00:00
4dbc9b8b1d Cleanup color.js
Move some shared color-code to color.js.
Remove shuffleArray() as it's unused since bbc325fb5a.
Add JSdoc comments and use let.

This was SVN commit r17466.
2015-12-14 03:53:48 +00:00
6e80288d30 Add a chat-command to clear all messages. Works for lobby, gamesetup and session. Patch by ruiRanger, fixes #3396.
This was SVN commit r17465.
2015-12-14 03:12:26 +00:00
f776e06044 Session messages/notification cleanup.
Rename globals, use const, let, JSdoc comments.
Rename host to guid for coherency.
Don't use for-each.

This was SVN commit r17464.
2015-12-14 03:08:53 +00:00
45c7d1681f petra cleanup, mainly renaming stuff for better readability
This was SVN commit r17463.
2015-12-13 22:04:09 +00:00
5864447d92 Don't resurrect dead units when trying to promoting them while they die. Patch by karamel, fixes #3544.
This was SVN commit r17461.
2015-12-13 18:09:56 +00:00
b87b3ff3dc Left some debug code in.
This was SVN commit r17460.
2015-12-13 17:39:19 +00:00
a7a6b3316c GUI cleanup.
Moves cropping of the mappreview image to a common function
setMapPreviewImage.
Also avoids magic numbers by using the actual formula.

This was SVN commit r17459.
2015-12-13 17:09:41 +00:00
909b8d4369 Allow multiple special sprites, to facilitate cases where we want to add an overlay to a sprite.
"color" can make use of the sprite's alpha texture, and the "add_color"
effect will now take the original image's alpha into account.
Remove the no longer needed "unaffordableMask" images on a variety of
panels.

Somewhat based on a patch by BoeseRaupe. Fixes #2421 and #3688.

This was SVN commit r17456.
2015-12-13 16:03:17 +00:00
88d6f35126 Summary screen cleanup.
Rename panelsData and teamMiscHelperData to g_Foo.
Use let instead of var everywhere except for globals.
Quote object keys, add some spaces.

This was SVN commit r17455.
2015-12-13 13:20:54 +00:00
5ccee7ade1 Summary screen cleanup. Patch by bb, refs #3518.
Renames globals to g_Foo.
Uses let instead of for in loops.
Fixes indentation and some whitespace issues.

This was SVN commit r17453.
2015-12-13 12:42:58 +00:00
160b6e60cd Added new tree acacia and variations.
Upgraded aleppo pines.
New Oaks and dead oaks variations.
New generic dead trees.
Upgraded grapes texture by Stanislas69. Thanks Stan!

This was SVN commit r17452.
2015-12-12 22:44:39 +00:00
5c36a4ab22 Gamesetup cleanup.
Unify calls to hideControl which were duplicated per maptype.

This was SVN commit r17451.
2015-12-12 21:43:32 +00:00