Commit Graph

17595 Commits

Author SHA1 Message Date
32d8283be1 Move the 12MB heightmap data from the JS code of _kali's 9 alpha 21 realworld maps to separate JSON files (following the new JSON function in 871ed04521).
Don't use the JSON file ending, so that Atlas and gamesetup don't need
code to avoid parsing these huge files.

This was SVN commit r20157.
2017-09-10 15:54:26 +00:00
97e1d002f1 Add two missing checks in the EndgameManager for players who already had won or were defeated in d2d43ab46f as reported by fatherbushido, refs #4382.
Add a warning if a Trigger script (like the one on Treasure Islands,
refs #4507) tries to marks a player as won who had already won or lost.
Merge a duplicate call in the Player component.

This was SVN commit r20156.
2017-09-10 15:30:53 +00:00
8e78a2ba0b Petra: fix in foundation properties when using https://code.wildfiregames.com/D639
This was SVN commit r20155.
2017-09-10 12:15:14 +00:00
921630408d Create arrays with [], not new Array in random map scripts, as stated by the Coding_Conventions,
except Snowflake Searocks which will receive special treatment.

This was SVN commit r20153.
2017-09-10 01:58:04 +00:00
9750d09032 Fix oversight in 757b6efa43 (don't pick the "random" biome by chance when launching the game with a random biome), refs D852.
This was SVN commit r20152.
2017-09-10 01:52:11 +00:00
f1e352927c Merge the 14 copies of the player placement code on river maps.
This was SVN commit r20151.
2017-09-10 01:04:11 +00:00
9119b663d8 Fix wrong comma in cc0d4f25da and a mismatched brace in ba36f233fa (hidden by the wrong indentation of a9b963c3a5).
This was SVN commit r20150.
2017-09-09 22:57:46 +00:00
635e608776 Unify 36 copies of the radial playerplacement loop of random mapscripts.
Trim unused PlayerAngle, StartAngle and baseRadius variables.

This was SVN commit r20149.
2017-09-09 19:12:28 +00:00
4477bcfb7e Replace 55 playerarray sorting loops copies with calls to two random mapgen helper functions.
Rename randomizePlayers as it paradoxically called sortPlayers on the
result.

This was SVN commit r20148.
2017-09-09 16:49:35 +00:00
7bc941cf62 Add Heal component unit tests.
Differential Revision: https://code.wildfiregames.com/D898
This was SVN commit r20147.
2017-09-09 16:24:28 +00:00
45bb3d2a43 Remove 23 copies of the random mapgen terrain init loop (including 16 copies of unused x and z vars).
This was SVN commit r20146.
2017-09-09 15:30:44 +00:00
4d22667ac9 petra cleanup
This was SVN commit r20145.
2017-09-09 15:01:35 +00:00
ba36f233fa Remove 1400 useless random map script comments.
This was SVN commit r20144.
2017-09-09 14:41:50 +00:00
25282a5552 Petra: fix population bonus of foundation when using https://code.wildfiregames.com/D639
This was SVN commit r20143.
2017-09-09 14:38:40 +00:00
5e019b5818 Don't use the default metal/stone mines of the random biome system in the independent heightmap library (following 7471a0db63) that is only used by a map that doesn't use the random biome system, revealed by cc0d4f25da.
Don't mix alpine and mediterranean (rmbiome) mines on Schwarzwald as
before 7471a0db63. Refs #3764.

This was SVN commit r20142.
2017-09-09 14:34:15 +00:00
ab7089ad61 Command line option for pid+timestamp in OOS dump, mainlog and interestinglog
Reviewed by: elexis Fixes #3339
Differential Revision: https://code.wildfiregames.com/D51
This was SVN commit r20141.
2017-09-09 13:16:05 +00:00
84d2b89fef Fix missing conversion of biome environment constants in 871ed04521 as reported by fatherbushido, fixes #4766.
Remove wrong defaultbiome copypasta.

This was SVN commit r20140.
2017-09-09 12:30:35 +00:00
74bfe5fd55 Add biome descriptions.
Display biomes in the objectives dialog and gamesetup map description
panel.
Complete the mod support of 871ed04521 by leaving the code
biome-agnostic.
Fix an oversight in unknown nomad in 2c5a6052ea.

Differential Revision: https://code.wildfiregames.com/D884
Strings By: Hannibal_Barca
This was SVN commit r20139.
2017-09-09 00:10:08 +00:00
bb
339c1f2210 Add missing and remove redundant phase required technology entries from templates
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D887
This was SVN commit r20138.
2017-09-08 21:23:51 +00:00
76a2cd43d0 Fix broken Autogarrison in 1638727c23
Patch by Stan

Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D885
This was SVN commit r20137.
2017-09-08 18:04:19 +00:00
1cdc8f1356 Mark simulation component template and entity properties as read-only in simulation tests (as they are in actual games).
Thus throw errors if a simulation test tries to alternate the template
instead of silently passing tests with wrong values (as happened tests
fixed by ff90bb8490).
Remove the two clones from simulation components that were only relevant
for that test.
Add test to test the test.

Differential Revision: https://code.wildfiregames.com/D871
Fixes #4759
setup.js and setup_test.js Reviewed By: leper

This was SVN commit r20134.
2017-09-08 04:22:53 +00:00
eb4e66aab3 Move VFS GUI script function registration to its interface file.
This was SVN commit r20133.
2017-09-08 04:01:26 +00:00
47ac189e62 Remove unnecessary, terribly named random biome getter functions.
Refs #892 / bc805bd357
Proposed by leper in irc on 2016-06-15
Discussed with FeXoR in irc on 2016-04-10

This was SVN commit r20132.
2017-09-08 03:26:06 +00:00
dcba05e881 Remove biome constants, so that mods can remove biomes without triggering reference errors, refs 871ed04521.
This was SVN commit r20131.
2017-09-08 02:49:49 +00:00
a7d1cba47b Fix compulsory JSON syntax error.
This was SVN commit r20130.
2017-09-08 02:44:23 +00:00
871ed04521 Move biome definitions to JSON and JS files, so that mods can easily remove or add new biomes, refs cc0d4f25da.
Move environment biome constants from JS to JSON.

This was SVN commit r20129.
2017-09-08 02:15:54 +00:00
b4cf5d0a73 petra: further improve performance in structure placement
Differential Revision: https://code.wildfiregames.com/D875
This was SVN commit r20128.
2017-09-07 17:21:24 +00:00
cc0d4f25da Move random biome system to a separate mapgen library.
Proposed library and directoryname agreed with FeXoR.
Make the rmgen/ biome agnostic by moving the biome constants in
createForests to the randombiome globals.
Don't pass a non-randombiome constant in gulf of bothnia to the
createForests function that expected a randombiome constant, refs
e17dd1ac12, accepted by Grugnas.
Remove unused trivial unrecommended randomizeBiome function,
make Biomes autocompletable in the gamesetup chat, refs D852.

This was SVN commit r20127.
2017-09-07 15:34:15 +00:00
e95f4e9744 Unify deepcopy and clone.
Delete clone globalscripts function introduced by 9f47ed536d.
Rename the better supported deepcopy function to clone.
Delete unused Vector2D and Vector3D clone prototype functions that can
just use clone if needed.

Differential Revision: https://code.wildfiregames.com/D870
Reviewed By: leper
This was SVN commit r20125.
2017-09-06 20:58:27 +00:00
e1bf09977c Fix the "Thermistocles" typo in the helmet prop file name. Refs 4d31ff14eb.
Reviewed By: Stan
Differential Revision: https://code.wildfiregames.com/D604
This was SVN commit r20124.
2017-09-06 20:56:13 +00:00
bb
f42205b2d7 Improve wolve target-finder performance
Don't use 3D coordinates since the map is flat.
Don't loop over all targets when there are enough targets in 200m
Wolves spawned at same spawnpoint can be treated as they have the same
position
some of it proposed and reviewed by elexis

Patch By: temple
Differential Revision: https://code.wildfiregames.com/D185
This was SVN commit r20123.
2017-09-06 08:59:56 +00:00
bb
63ca7ad672 Split VictoryDuration in RelicDuration and WonderDuration
As proposed by leper in 35377c51a7
refs #4014

Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D874
This was SVN commit r20122.
2017-09-06 08:44:26 +00:00
a46b44e4dc Allow specifying the gravity affecting projectiles.
This allows for differently shaped flight curves for projectiles (e.g.
mortars, magical projectiles).

Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D864
This was SVN commit r20120.
2017-09-06 00:23:13 +00:00
154ff3c517 Factor out resource generation in cmpTrader.
This makes it easier to change who gets the resources (refs #4314).

Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D872
This was SVN commit r20119.
2017-09-06 00:18:05 +00:00
757b6efa43 Fix missing harbor and wild lake random biome implementation.
Fix random biome gamesetup option and colorize the random item as
proposed by bb.
Remove duplicate biome getter in rmgen2.

Reviewed By: Grugnas
This was SVN commit r20118.
2017-09-05 22:34:57 +00:00
2c5a6052ea Allow selecting the biome on all maps that support the random biome system, refs D852.
Fix numeric biome indices in unknown_land, unknown_nomad and
island_stronghold.

Differential Revision: https://code.wildfiregames.com/D873
Patch By: Grugnas
This was SVN commit r20117.
2017-09-05 16:16:25 +00:00
bb
deba66c376 Allow arbitrary order between dropdowns and checkboxes in gamesetup
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D862
This was SVN commit r20116.
2017-09-05 15:58:21 +00:00
f2550705d3 Select the biome of the random map in the gamesetup.
Differential Revision: https://code.wildfiregames.com/D852
Based on patch by: Grugnas
This was SVN commit r20115.
2017-09-05 12:57:22 +00:00
38865845d3 Stop using postfix increment in a few places.
Pointed out by cppcheck.

Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D414
This was SVN commit r20113.
2017-09-04 22:00:04 +00:00
4551e911a4 Cleanup of damage type related code in cmpDeathDamage.
This fixes a broken use of a function, removes an unused parameter,
fixes the incorrect property name in the gui.

Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D868
This was SVN commit r20112.
2017-09-04 21:22:11 +00:00
c4f6371940 Move lobby panels to custom file, so that they could be shown in a dialog as well.
Refs #4106, D817
Patch By: fpre / ffffffff
This was SVN commit r20111.
2017-09-04 20:47:42 +00:00
b3d1d02e53 Move prelobby files to a separate directory (to prepare splitting the lobby code into several files).
Refs #4106, D817

This was SVN commit r20110.
2017-09-04 19:41:40 +00:00
7cd3689f03 Fix a nearly hidden gamesetup bug that exists since at least alpha 19, revealed by 9cb0a60d73 / D829, reported by mimo.
When substituting missing map- or player-assignment-data, the original
player assignments object was assigned, thus unintentionally modified
when the assignments were modified.

Reviewed By: mimo
This was SVN commit r20109.
2017-09-04 19:03:19 +00:00
a3b9d16eff Petra: Look for aquatic treasure on naval maps
Patch by Sandarac

Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D765
This was SVN commit r20108.
2017-09-04 18:06:02 +00:00
bce425ede5 petra: add some protections for non-existing templates
Differential Revision: https://code.wildfiregames.com/D867
This was SVN commit r20107.
2017-09-04 16:58:00 +00:00
5cc7fd27d7 Fix oversight in dd7f38e370 (thought undefined was converted to emptystring instead of "undefined"), refs D805.
This was SVN commit r20106.
2017-09-04 11:49:03 +00:00
3aca693db1 Add +1 tab indentation following dd7f38e370 / D805 for the lines not affected by 892876a571.
This was SVN commit r20103.
2017-09-03 22:08:13 +00:00
892876a571 Remove unneeded parameters nesting from the options page following c20ee2ad5e, refs #2596.
Add +1 tab for the affected lines following dd7f38e370, refs D805.

This was SVN commit r20102.
2017-09-03 21:59:45 +00:00
dd7f38e370 Use tabs for the options page and rewrite it altogether.
Removes a lot of JS and XML duplication, unneeded for-loops.
Display min/max in the tooltip for number inputs.
Increase the width for dropdowns and dynamically maximize the width of
the label.
Remember the selected tab when hotloading the page.

Differential Revision: https://code.wildfiregames.com/D805
Refs #3737
Graphical design agreed with: scythetwirler, mimo, Itms, fpre, Imarok,
bb, leper, brian, feneur, implodedok
Testing By: Vladislav, mimo
This was SVN commit r20101.
2017-09-03 21:38:50 +00:00
9cb0a60d73 Deepfreeze Aura, Technology and Resource Templates, Simulation states, GameAttributes and few other JS objects.
This reveals unintentional modifications to these objects which would
most often imply hidden bugs.

Differential Revision: https://code.wildfiregames.com/D829
Fixes #4257
Refs #3647

This was SVN commit r20100.
2017-09-03 16:37:09 +00:00