Commit graph

17949 commits

Author SHA1 Message Date
elexis
7fda43d14e Expose the same file listing function to JS GUI, simulation and rmgen, refs #4868.
Removes the workaround and limitations of globalscripts Resources
(52f311da2b) and loadCivFiles (89055ef858), allowing them to actually
become actually global.
Rename to ListDirectoryFiles as proposed by wraitii.

Differential Revision: https://code.wildfiregames.com/D1103
Reviewed By: s0600204
Proofread by: echotangoecho
Comments by: wraitii
Relevant discussions with leper in #4868, D1062

This was SVN commit r20586.
2017-12-04 23:46:55 +00:00
elexis
54904b1750 Add gui tag color setter function, so that we don't have to read and ensure the color syntax each time.
Differential Revision: https://code.wildfiregames.com/D1088
Patch By: fpre / ffffffff
This was SVN commit r20585.
2017-12-04 17:29:26 +00:00
elexis
2c8b78ddaa Option to disable fog effects.
Fixes #4626
Patch By: dp304
This was SVN commit r20584.
2017-12-04 15:54:24 +00:00
elexis
247bde356c Reload water shaders too when changing shader settings.
Refs #4626
Patch By: dp304
This was SVN commit r20583.
2017-12-04 15:51:20 +00:00
elexis
30c3b7c3b8 Fix two clang warnings in 61261d14fc reported by leper.
Differential Revision: https://code.wildfiregames.com/D1064
Reviewed By: fcxSanya
Refs #2305

This was SVN commit r20582.
2017-12-04 14:30:38 +00:00
bb
ac8c0d1d94 Fix of by one error in 9faf90a4b1
Spotted by temple

This was SVN commit r20581.
2017-12-04 09:18:05 +00:00
elexis
1bf2221b83 Idle unit hotkey.
Differential Revision: https://code.wildfiregames.com/D1060
Patch By: temple
Reviewed By: wraitii
This was SVN commit r20578.
2017-12-04 02:54:51 +00:00
elexis
cd571035bb Allow fast-forwarding of matches with only AI players.
Differential Revision: https://code.wildfiregames.com/D595
Refs #4078
Accepted By: Grugnas
This was SVN commit r20577.
2017-12-04 02:37:21 +00:00
elexis
0cfe9ab153 Expose the same ReadJSONFile function to simulation, GUI and rmgen.
This way globalscripts/ can use the same code in all contexts, all paths
are absolute and only one function name is needed.
Remove ReadCivJSONFile which is redundant with this function as well.
Restrict read access of rmgen/ to rmgen/ and simulation/, refs
4275a8a33c, 89055ef858.

Refs #4868
Differential Revision: https://code.wildfiregames.com/D1085
Reviewed By: wraitii
Partial agreement with leper

This was SVN commit r20576.
2017-12-03 23:02:27 +00:00
elexis
5e85ca5d7b Deprecate type property of mods.
Such a property should be well defined, but currently it contains
arbitrary text and is redundant with the description.

Differential Revision: https://code.wildfiregames.com/D1082
Refs #4890
Discussed with: leper
Reviewed By: wraitii
This was SVN commit r20575.
2017-12-03 21:44:16 +00:00
elexis
c670f14812 Fix camouflaged oversight in d3ce5289b6 reported by leper and stupidly forgotton regex.
Complete documentation and validation of loaded mods proposed in D1093.

Differential Revision: https://code.wildfiregames.com/D1081
Reviewed By: wraitii, Itms
This was SVN commit r20574.
2017-12-03 21:14:54 +00:00
bb
9faf90a4b1 Move undeletable tag to identity component, preparation for allowing units without health component.
Also fix a missing init from D750/7e1646afd5

Patch By: temple
Differential Revision: https://code.wildfiregames.com/D341
This was SVN commit r20573.
2017-12-03 20:54:53 +00:00
elexis
9f0484e5ce Delete unused SpiderMonkey GarbageCollection ScriptFunctions ForceGC in the AI and GUI context (e9e05f4efc) and MaybeGC in the random mapgen context (942a45372c).
Optimizing the memory footprint requires likely different functions
following the new SM versions and a lot of testing,
so having these doesn't lower the effort to achieve optimization while
confusing the reader.

Differential Revision: https://code.wildfiregames.com/D1073
Reviewed By: Yves
This was SVN commit r20572.
2017-12-03 12:48:21 +00:00
wraitii
dcc49a064b Change gathering rally points to use gather nstead of gather-near-position when possible.
This makes rallypoint flags nicer and is generally more efficient for
unitAI too.
The behaviour falls back to gathering near position for any entity with
a "speed" component, which is set by GuiInterface depending on having
UnitMotion. This thus assumes entities without UnitMotion do not move.
However, Gather falls back to gather near position in case of failure,
so it ought to be fine in general.

Reviewed By: wraitii
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1014
This was SVN commit r20571.
2017-12-03 10:25:59 +00:00
wraitii
93b052ba10 Let Fauna cast silhouettes to make them more visible inside forests or behind buildings.
This doesn't affect purely decorative animals.

Reviewed By: wraitii
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D965
This was SVN commit r20570.
2017-12-03 10:16:45 +00:00
wraitii
99d486c1d7 Allow models using alpha-blending (transparent models) to be silhouette casters.
This change ahead of D965, where fauna become silhouette casters, and
several fauna animals are transparent models.

Reviewed By: wraitii
Patch By: temple
This was SVN commit r20569.
2017-12-03 10:14:16 +00:00
wraitii
0790ceb3ef Fix individual combat when attacked
In particular, better handle melee units attacking capturing units.

Reviewed By: wraitii
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1047
This was SVN commit r20568.
2017-12-03 10:10:13 +00:00
mimo
36fadbb070 fix oversight in 854288a6dc
This was SVN commit r20567.
2017-12-02 10:01:40 +00:00
mimo
854288a6dc Add AI difficulty in options
Reviewed By: elexis
Trac Tickets: #4876

Differential Revision: https://code.wildfiregames.com/D1096
This was SVN commit r20566.
2017-12-01 20:05:58 +00:00
Itms
0ce7a7f5c8 Go back to the legacy syntax for detecting premake actions.
The filter command does only filter out premake commands, and does not
act on Lua instructions like this one. Some code refactoring would be
needed in order to take advantage of the powerful filter syntax.

Refs #3439.

This was SVN commit r20563.
2017-11-29 22:37:09 +00:00
Itms
f22dfba717 Support Visual Studio 2015 (MSVC 14.0), fixes #3439.
VS 2013 stays the default Windows compiler, but support for it will be
dropped as soon as possible.
Tested By: Stan
This was SVN commit r20562.
2017-11-29 21:16:10 +00:00
Itms
2da6c0ce2a Use default Unicode encoding in source code on Windows.
This change drops MBCS encoding (which was the default for premake4)
except in the Collada project which is entirely written assuming MBCS.

Tested By: wraitii
Differential Revision: https://code.wildfiregames.com/D1069
This was SVN commit r20561.
2017-11-29 20:14:22 +00:00
Itms
8bb7a20ec1 Remove hack from cxxtest premake module, refs #3729.
This fixes an issue where tests wouldn't build without precompiled
headers.

Tested By: leper
Differential Revision: https://code.wildfiregames.com/D1068
This was SVN commit r20560.
2017-11-29 20:04:44 +00:00
mimo
ff724b8645 fix a rare error in petra
This was SVN commit r20559.
2017-11-29 17:30:31 +00:00
mimo
0afa4a38da fix cheat following 8de5c26540
This was SVN commit r20558.
2017-11-29 17:10:03 +00:00
Imarok
326f759050 Lobby: Don't display a timestamp when an invalid command is sent
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D1077
This was SVN commit r20557.
2017-11-29 15:48:41 +00:00
elexis
71ef1a6e95 Replace mod selection sorting choice dropdown and checkbox with the column based sorting from b8fce56821, refs #2405.
Use case insensitive sorting iff it's the locale default.

This was SVN commit r20555.
2017-11-29 12:47:16 +00:00
elexis
d3ce5289b6 Cleanup mod selection GUI page.
Refactor functions and unify sort dropdown choices.
Move colors to globals so that they are easily modifiable, even from
external files, refs fd034c9bcd / D911.
Fix broken "Dependency not met" translation and wrong equal comparison
operator description (== vs =), refs 64bfa089af.
Use localeCompare, simpler loops and array functions, JSdoc syntax,
ternaries, deepfreeze, let keyword and prefix increment operator.
Renames to increase descriptiveness and consistency.
Remove duplication, tautologic and unsatisfiable conditions, dead code,
unused variables and GUI object names, example within example,
unneeded variables, parentheses, TODOs, strict checks and keep XML
element, misleading linebreaks, pointless comments and "Mods Loaded"
string and the switch fall-through.

This was SVN commit r20552.
2017-11-28 22:43:27 +00:00
mimo
8de5c26540 Allow civ specific techs with {civ}
Discussed with leper

Reviewed By: bb
Trac Tickets: #4589

Differential Revision: https://code.wildfiregames.com/D1024
This was SVN commit r20551.
2017-11-28 20:43:00 +00:00
elexis
752005c4a4 Enable and disable mods more comfortably using the doubleclick event, refs #3574 / 70164a02c4.
Filter mods while typing, refs D860 / 7a157faf3c.

This was SVN commit r20550.
2017-11-28 18:57:01 +00:00
elexis
b1a116db37 Move translate functions from mod/globalscripts/ to mod/gui/common/.
This throws reference errors at JS compile time when attempting to
translate strings in the simulation.

Differential Revision: https://code.wildfiregames.com/D1075
Refs D619
Reviewed By: bb
This was SVN commit r20549.
2017-11-28 18:48:52 +00:00
s0600204
1e879527d3 Fix a redeclaration error with 9504f5c36a.
Reported by: @minohaka
This was SVN commit r20548.
2017-11-28 10:22:12 +00:00
s0600204
9504f5c36a Change var -> let and i++ -> ++i in rmgen wall builder and demo map
In a bid to reduce size of D900 patch.

`var` -> `let` change suggested by @elexis

Refs D900, #2944

This was SVN commit r20546.
2017-11-28 01:38:54 +00:00
Stan
c6807e2fc0 Add new operators for onager by Alexandermb,
Reviewed by me and Lordgood.

This was SVN commit r20545.
2017-11-27 22:30:47 +00:00
Imarok
2877ae1c38 Fix oversight in 16afbf32c8 noticed by Geramoto
Reviewed by: bb
Refs: #4722
Differential Revision: https://code.wildfiregames.com/D1072
This was SVN commit r20544.
2017-11-27 19:51:21 +00:00
Imarok
215a102c27 Count Trained Cattle as resource and not as unit. Also only count the net amount of gathered/used food for cattle.
Reviewed by: temple
Fixes: #3948
Differential Revision: https://code.wildfiregames.com/D1052
This was SVN commit r20543.
2017-11-27 19:47:45 +00:00
Imarok
aec1ff5493 Wild domestic animals should stay visible in FOW.
This is broken since 9d232fd39a.

Reviewed by: temple
Differential Revision: https://code.wildfiregames.com/D1071
This was SVN commit r20542.
2017-11-27 19:38:00 +00:00
elexis
5ce9a2f19d Rename gui/savedgames/ to gui/savegame/ so that the page XML filename always matches the directory name.
This was SVN commit r20541.
2017-11-27 18:50:06 +00:00
mimo
f84d195b9d Fix Builder and ProductionQueue schemas inconsistencies
Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D1070
This was SVN commit r20540.
2017-11-27 18:42:46 +00:00
elexis
1375925367 Split locale and locale_advanced GUI page into two directories.
Include the entire directory instead of all files in the directory,
completing D619.

This was SVN commit r20539.
2017-11-27 18:05:34 +00:00
elexis
2b31ebad0d Cleanup summary screen init.
First fill all global helper variables before pushing the data to the
GUI (IPO model).
init should always be the first function declaration in a file.
Split and rename init functions.
Fill g_ScorePanelsData from init so that it becomes independent from the
file include order.
Include all files of the summary directory instead of each file
individually, as in D619.

This was SVN commit r20538.
2017-11-27 17:35:55 +00:00
elexis
63522189a0 Disjoint save and load GUI page.
Include the entire directory as in D619.

This was SVN commit r20537.
2017-11-27 17:02:24 +00:00
elexis
c326b4fab6 Fix lineendings of the new files in 77a2f484a2, 0146c705ce, efd9b3e212.
This was SVN commit r20536.
2017-11-27 16:56:45 +00:00
elexis
9950e06d4c Include entire directories in GUI pages instead of a subset of the files contained, where possible.
This allows mods to add new JS files without introducing a hardly
maintainable copy of the XML file.

Differential Revision: https://code.wildfiregames.com/D619
Proofread By: bb
This was SVN commit r20535.
2017-11-27 16:29:23 +00:00
elexis
683723faf8 Fix whitespace of createDecoration calls.
Add one missing constraint in mainland of 822e37f70c.
Remove unneeded grass patch min/max angle value.

This was SVN commit r20532.
2017-11-27 01:30:19 +00:00
elexis
ff6bb138ba Fix clFood and constraint argument forgotton in createFood calls of 822e37f70c as reported by temple.
Fix whitespace of all createFood calls while at it.

This was SVN commit r20531.
2017-11-27 00:25:04 +00:00
wraitii
d0ca03d7ba Fix OSX compilation
A check for OSX version that seemed useless broke compilation on Xcode
9.

Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D986
This was SVN commit r20530.
2017-11-26 16:50:21 +00:00
mimo
6a10797355 gamesetup panel should indicate the AI level without having to open the AI-config panel
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D1066
This was SVN commit r20529.
2017-11-26 14:42:10 +00:00
elexis
89055ef858 Delete GetCivData from MapGeneratorWorker.cpp which is redundant with the ReadJSONFile from 871ed04521.
Unify civ file loading from gui/common/functions_civinfo.js and
rmgen/library.js in globalscripts/Templates.js.
Delete the two forgotton headers in 4275a8a33c.

Refs #4868, #4804, D900.
Differential Revision: https://code.wildfiregames.com/D1062
Discussed with: leper

This was SVN commit r20528.
2017-11-26 13:30:57 +00:00
elexis
ba8d1c6166 Fix Builder test following 3a5be78aa9, refs #4870.
Also fix confusion of playerID and playerEntityID in that test following
c14a7a0b0b.

Differential Revision: https://code.wildfiregames.com/D1067
Reviewed By: bb, Itms
Comments By: Stan
This was SVN commit r20527.
2017-11-26 11:51:59 +00:00