Commit Graph

17627 Commits

Author SHA1 Message Date
fatherbushido b3db71aa63 Fix an issue with tests. Allow to mock several components for the system entity. Reviewed by leper.
Differential Revision: https://code.wildfiregames.com/D848
This was SVN commit r20194.
2017-09-17 07:06:09 +00:00
fatherbushido 6f8dddef5a Tag exhausted resource as not available in ResourceSupply component. Fix #4507. Reviewed by leper.
Differential Revision: https://code.wildfiregames.com/D902
This was SVN commit r20193.
2017-09-17 05:40:33 +00:00
fatherbushido 015f9bbf33 Remove a Brit fortress bonus. Agreed by scythetwirler.
Differential Revision: https://code.wildfiregames.com/D913
This was SVN commit r20192.
2017-09-17 05:21:14 +00:00
fatherbushido e8ff10620b Add a generic healer hero template and make the mauryan healer hero inherit from it. Follow discussion with elexis.
Differential Revision: https://code.wildfiregames.com/D912
This was SVN commit r20191.
2017-09-16 15:53:47 +00:00
fatherbushido 455ab4b9e2 Fix some format specifiers in debug strings. Reviewed by leper.
Differential Revision: https://code.wildfiregames.com/D909
This was SVN commit r20190.
2017-09-16 15:28:01 +00:00
elexis d970c5019a Remove some more recursive duplication in the rmgen library (painting terrain based on height).
This was SVN commit r20189.
2017-09-16 10:28:49 +00:00
bb 0353b9ff49 Change comment for the MatchesClassList function so we can use it for other things aswell
Useful for f.e. required techs and attack types

Reviewed By: leper
Differential Revision: https://code.wildfiregames.com/D869
This was SVN commit r20188.
2017-09-15 16:07:04 +00:00
elexis bf5370ac02 Unify 34 copies of the civic center tile class setting of random map scripts.
This was SVN commit r20186.
2017-09-15 03:52:50 +00:00
elexis 7d0cc59136 Reverse engineer and unify the 14 copies of the river drawing random mapgen code.
Splits unrecognizably blended magic numbers and makes them available for
map editors.

Removes copied terms of copies of conditions of copied of functions,
unused variables, overwritten values, checks that are always true, dead
code from checks that are always false and
things like 9 pairs of unneeded parentheses in a single line that was
copied several times.

Remove the useless RectPlacer terrain painting call on Guadalquivir
River.
Make danubius river borders parallel and drop thetha/seed differences.
Use planar instead of slopy water ground level for Phoenician Levant.

Copied and obscured by
a9b963c3a5 Aegan Sea, Guadalquivir River, Hyrcanian Shores, Phoenician
Levan, Nile,
0d0bc32736 Unknown,
25682da568 Unknown Land,
7f8adcf8cb Unknown Nomad,
5ef6d1f92b English Channel,
5bea1e7b87 Kerala,
026dcf10eb Danubius.

This was SVN commit r20185.
2017-09-15 03:24:35 +00:00
mimo a507fe1101 petra: remove some unused code + some minor tunings
This was SVN commit r20184.
2017-09-14 18:57:33 +00:00
leper e55c8bda07 Move placeable templates out of special/.
special/ should not contain placeable templates. Now we can switch to a
blacklist
approach for placeable templates in Atlas. This should make it easier
for modders
to use a different folder structure than the public mod and having their
templates
show up in Atlas without having to modifiy templates.
Non-placeable templates should exist in only a few different locations
which are
unlikely to change often, and are relatively unlikely to be added
regularly by
modders.

Reviewed By: elexis; some disagreement with FeXoR and Stan on the naming
of the trigger points
Differential Revision: https://code.wildfiregames.com/D877
This was SVN commit r20181.
2017-09-13 01:35:20 +00:00
leper f6683fcbce Fix SpiderMonkey build on FreeBSD 12. Fixes #4765.
Patch By: madpilot
Differential Revision: https://code.wildfiregames.com/D886
This was SVN commit r20180.
2017-09-13 00:10:27 +00:00
leper 189da09a7e Make FromJSProperty actually part of ScriptInterface.
Reviewed By: Imarok
Differential Revision: https://code.wildfiregames.com/D876
This was SVN commit r20179.
2017-09-12 22:52:15 +00:00
leper 66bdc460f4 Cleanup damage type related code in cmpDamageReceiver and cmpDamage.
If something now deals damage with a damage type for which there is no
armor specified
it will deal full damage (assuming 0 armor). This cannot happen in the
game yet, but
might at some later point.

Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D865
This was SVN commit r20178.
2017-09-12 22:18:45 +00:00
leper 2534010d0f Fix build without precompiled headers.
Refs 21f69ef574.

This was SVN commit r20177.
2017-09-12 22:18:39 +00:00
elexis 3312a83f82 Don't overwrite invalid input in numeric fields of the options page following 7a157faf3c.
It prevented the user from correcting NaN easily and typing numbers in
some edge cases like floating points numbers (refs D332).
Instead, display a red background if the user typed something invalid.

Agreed with Dariost in irc on 2017-09-05.

Remove unused wrong XML sprite as reported by bb in dd7f38e370 and
distinguish 0 min/max from undefined.

This was SVN commit r20176.
2017-09-12 19:32:50 +00:00
mimo a5b4dd3744 petra: take field diminishingReturns into account
This was SVN commit r20175.
2017-09-12 17:26:23 +00:00
mimo 96219942d2 petra: fix cases where UnitAI (because of autocontinue) would make the AI build some field foundations while it was not needed
This was SVN commit r20174.
2017-09-12 16:47:30 +00:00
elexis 486aec18d4 Move Main ScriptFunctions to a new JS Interface, refs #4772.
This was SVN commit r20172.
2017-09-12 03:11:33 +00:00
elexis d6cb9c845b Move Debugging ScriptFunctions to a new JS Interface, refs #4772.
This was SVN commit r20171.
2017-09-12 02:25:28 +00:00
elexis 921c5515a6 Move Simulation GUI ScriptFunctions to a new JS Interface, refs #4772.
This was SVN commit r20170.
2017-09-12 01:53:46 +00:00
elexis 5f8be8e0c6 Move Game ScriptFunctions to a new JS Interface, refs #4772.
This was SVN commit r20169.
2017-09-12 01:38:46 +00:00
elexis fa54a8cd65 Move GUI Manager ScriptFunctions to a new JS Interface, refs #4772.
This was SVN commit r20168.
2017-09-12 00:54:49 +00:00
elexis 21f69ef574 Move networking ScriptFunctions to a new JS Interface, refs #4772.
This was SVN commit r20167.
2017-09-12 00:29:10 +00:00
elexis 0e3a6d811c Move SavedGame ScriptFunctions to a new JS Interface, refs #4772.
This was SVN commit r20166.
2017-09-11 23:22:28 +00:00
elexis f1cc54cc18 Move GameView ScriptFunctions to its JS Interface, refs #4772.
Use early returns as initialization checks.

This was SVN commit r20165.
2017-09-11 23:03:27 +00:00
elexis 4d931b57e9 Move ReadJSONFile and WriteJSONFile GUI ScriptFunctions that only handle VFS paths to the VFS JS Interface.
This was SVN commit r20164.
2017-09-11 22:21:34 +00:00
elexis e69a0fb9db Remove unused clumsy JS GUI ScriptFunctions debug timer from ed7b4b5fca.
GetMicroseconds from 7a91d330d3 provides microsecond precise timing.

Refs #4772.

This was SVN commit r20163.
2017-09-11 22:08:54 +00:00
mimo 8f05358b5e Template loading from the AI
Patch by Sandarac

Reviewed By: mimo
Trac Tickets: #4611

Differential Revision: https://code.wildfiregames.com/D639
This was SVN commit r20162.
2017-09-11 16:23:54 +00:00
fatherbushido 57c8473783 Add ResourceSupply component unit tests.
Differential Revision: https://code.wildfiregames.com/D901
This was SVN commit r20161.
2017-09-11 13:00:01 +00:00
elexis ac0e6fd0d0 Pick the closest match for SimRates like 0.10000000149011612 in the session gamespeed dropdown and warn next time a value can't be displayed.
Reported by Grugnas.

This was SVN commit r20160.
2017-09-11 10:16:12 +00:00
mimo 4541543f0e petra: another fix in foundation properties in view of https://code.wildfiregames.com/D639
This was SVN commit r20158.
2017-09-10 17:55:50 +00:00
elexis 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
elexis 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
mimo 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
elexis 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
elexis 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
elexis 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
elexis 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
elexis 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
elexis 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
fatherbushido 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
elexis 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
mimo 4d22667ac9 petra cleanup
This was SVN commit r20145.
2017-09-09 15:01:35 +00:00
elexis ba36f233fa Remove 1400 useless random map script comments.
This was SVN commit r20144.
2017-09-09 14:41:50 +00:00
mimo 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
elexis 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
Imarok 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
elexis 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
elexis 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