Commit Graph

17940 Commits

Author SHA1 Message Date
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
elexis 69b7f39bf1 Rename RMS to Engine.
This was SVN commit r20525.
2017-11-25 22:17:01 +00:00
bb 65fe9737b1 Enlarge dropdown size for the ingame gamespeed dropdown, so the scrollbar is hidden for replays.
Patch By: temple
Reviewed By: elexis, vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1053
This was SVN commit r20524.
2017-11-25 19:01:42 +00:00
Itms 94db174b25 Fix the pkgconfig premake module when headers are force-included.
This fixes a bug with premake5 happening when using
--with-system-mozjs38.

Tested By: temple
Differential Revision: https://code.wildfiregames.com/D1028
This was SVN commit r20523.
2017-11-25 16:56:56 +00:00
mimo 3a5be78aa9 Units should only be able to build structures from their owner's civ, and not from their identity civ
Reviewed By: elexis
Trac Tickets: #4870

Differential Revision: https://code.wildfiregames.com/D1065
This was SVN commit r20521.
2017-11-25 16:22:03 +00:00
wraitii 60ae523f92 Fix territory borders not showing up on OSX when compiled with the lastest xCode.
The bug came from inlining the copy constructor of Grid, which ended up
reading from un-initialized variables.

Discussed with leper who had a similar fix for a test failure locally.

Fixes #4859

Differential Revision: https://code.wildfiregames.com/D1048
This was SVN commit r20520.
2017-11-25 12:48:37 +00:00
leper f7206dc77d More ScriptInterface const.
Reviewed By: elexis; some comments by bb
Differential Revision: https://code.wildfiregames.com/D863
This was SVN commit r20519.
2017-11-25 06:49:58 +00:00
elexis 60801158b5 Remove +1 in getPlayerTeam and areAllies of rmgen/ and -1 in the calls to that following 8097eeb8ab.
This was SVN commit r20517.
2017-11-25 00:37:41 +00:00
elexis 993869ffb8 Remove getTeamsArray copy from Island Stronghold (875a774da9) following the introduction of rmgen2 in 6d52a71d4a (d8ed6d828a).
(Don't replace the starting base code of that map to a call to
placeStronghold because the code in this variant is the only one that
doesn't have resource collisions on tiny maps currently, refs #3851.)

This was SVN commit r20516.
2017-11-25 00:24:44 +00:00
elexis bbe1ddc5cf Corsica & Sardinia player placement simplification, refs 9016b8d866.
The code intended to group players per team on a single island (even if
more than 4 players in one team).
But since it used sortAllPlayers playerIDs instead of onIsland, the
players were not actually grouped per team.
Drop the additional, slightly redundant complexity and just place at
most 4 players per side like the other naval maps do too.
If greater groups per side are wished, it can be changed later
consistently for all maps.

This was SVN commit r20515.
2017-11-25 00:09:33 +00:00