1
0
forked from 0ad/0ad
Commit Graph

1616 Commits

Author SHA1 Message Date
0fd8aa2a77 Secure lobby authentication - prevent joins as a different player
Reviewed by: Dunedan, elexis, Itms
Fixes #3549
Differential Revision: https://code.wildfiregames.com/D897
This was SVN commit r21520.
2018-03-12 00:23:40 +00:00
cc67d54aeb Fix compiler warnings on VS 2015, refs #3439, refs #5069.
Patch By: Stan
Reviewed By: Itms, vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1262
This was SVN commit r21480.
2018-03-10 09:58:53 +00:00
0e710d716d Fixes the Alt + Tab crash in the fullscreen mode. Refs #4181.
Patch By: Angen
Comments By: echotangoecho, Imarok, Stan
Reviewed By: vladislavbelov
Trac Tickets: #4181
Differential Revision: https://code.wildfiregames.com/D1212
This was SVN commit r21476.
2018-03-09 22:23:03 +00:00
bb
6d54ab4c1f Implement combine victory conditions
Excluding the changes to scenario and skirmisch maps
Transform gameType string to victoryCondition array in load/replaymenu
Adapt the gamesetup to use checkboxes for every victory condition and an
array for storing them
Allow multiple queries in conquestCommon
Remove conquest from regicide, wonder and capture the relic
Move the endless gamedescription from settings to gamedescription
Fixing wrong tabulation from a8a29271ce

This commit will break all scenario and skirmisch maps, their "Gametype"
string needs to be transformed in a "VictoryCondition" array as is done
in the tutorial map (counting endless as an empty array). This counts
for mods too!
Old svn replays and savegame will throw warnings/errors as they are
incompatible after this commit. So svn users will need to delete all
those.

Comments on ai and autostart games By: mimo
Comments on Atlas By: Vladislav
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D1240
fixes: #4014

This was SVN commit r21474.
2018-03-09 21:51:18 +00:00
c894eeb856 Fix debug mode after d5807cd59f
Reviewed by: temple
Differential Revision: https://code.wildfiregames.com/D1315
This was SVN commit r21336.
2018-02-23 20:17:47 +00:00
02ed411e6f Fix comments and year in d5807cd59f and 01f581e813
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D1314
This was SVN commit r21313.
2018-02-21 22:53:01 +00:00
e497672a9c Bump copyright header year numbers.
This was SVN commit r21305.
2018-02-21 18:44:52 +00:00
01f581e813 Move GetEngineInfo to Mod.[h|cpp]
Suggested by: elexis
refs d5807cd59f

This was SVN commit r21242.
2018-02-17 17:36:43 +00:00
d5807cd59f Check for and save mod version for savegames and replays
Reviewed by: elexis
Fixes: #4887
Differential Revision: https://code.wildfiregames.com/D955
This was SVN commit r21239.
2018-02-17 16:53:14 +00:00
262b27d770 Remove unnecessary argument from CSimulation2::InitGame
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D1289
This was SVN commit r21166.
2018-02-09 19:50:01 +00:00
bb
6b88ca6a11 Fix the autostart victoryDuration support, which was broken by 63ca7ad672
Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D1285
This was SVN commit r21122.
2018-02-06 19:44:05 +00:00
22903b09a6 Set victory conditions for autostart games.
Reviewed By: elexis
Trac Tickets: #5016

Differential Revision: https://code.wildfiregames.com/D1278
This was SVN commit r21108.
2018-02-03 19:39:33 +00:00
7819ea434e Diplomacy Colors
Add a button to toggle between normal and "diplomacy" colors.
Reviewed by: elexis
Comments by: leper, ffffffff, Stan
Fixes: #4747

This was SVN commit r21107.
2018-02-03 14:17:31 +00:00
2bfb580415 Fix non-PCH build by adding an explicit include.
This used to build so the include of CStr.h disappeared from the include
chain at some point. PCH builds kept working because this file is
included in precompiled.h for the engine project.

Differential Revision: https://code.wildfiregames.com/D1273
Reviewed By: Imarok
This was SVN commit r21075.
2018-01-30 07:20:49 +00:00
5500a96751 Delete Savegame format version, refs 7064565ff6.
It is unneeded because we won't add backwards compatibility for previous
formats and
because the engine version check from 94302a4149 is sufficient and more
accurate in testing compatibility of savegames of different releases.
The simpler code allows unifying the savegame version check with the
check used by the replay menu (to be used in multiplayer gamesetups).

Differential Revision: https://code.wildfiregames.com/D1131
Reviewed By: wraitii
Agreed with: Imarok
Discussed with: Philip

This was SVN commit r20729.
2017-12-30 14:54:13 +00:00
3319c69d97 Choose AI behavior in gamesetup
Original patch from Sandarac, reworked by elexis and finalized by mimo

Discussed with elexis

Differential Revision: https://code.wildfiregames.com/D1159
This was SVN commit r20671.
2017-12-20 22:02:15 +00:00
571562d7d7 Revert 9c180f660f until there is someone maintaining AI behaviors, refs D746.
This was SVN commit r20654.
2017-12-14 13:31:00 +00:00
9c180f660f AI behavior gamesetup setting.
Based On Patch By: Sandarac
Differential Revision: https://code.wildfiregames.com/D746
Refs #812, #2550

This was SVN commit r20646.
2017-12-12 16:45:09 +00:00
89e339dd16 Remove VFS cache, because it is less effective and less efficient than the OS cache (and partially redundant with higher level application caches).
Patch By: Sandarac
Discussed with: Philip, echotangoecho, Bezerra
Fixes #4072.
Differential Revision: https://code.wildfiregames.com/D587
This was SVN commit r20639.
2017-12-10 17:33:03 +00:00
af03c72f76 Move GetAvailableMods
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D1106
This was SVN commit r20591.
2017-12-05 17:17:21 +00:00
fed3fbee5d Expose the same FileExists to JS GUI, simulation and rmgen.
Thus restrict rmgen FileExists from 871ed04521 to rmgen/ and
simulation/.

Refs #4868, 8de5c26540
Differential Revision: https://code.wildfiregames.com/D1104
Same rap as in 0cfe9ab153, 7fda43d14e.

This was SVN commit r20588.
2017-12-05 00:22:03 +00:00
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
2c8b78ddaa Option to disable fog effects.
Fixes #4626
Patch By: dp304
This was SVN commit r20584.
2017-12-04 15:54:24 +00:00
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
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
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
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
4275a8a33c Unify two rmgen and GUI JSON file loading script functions, refs #4868.
Revert the introduction of the exact copies of FileExists ReadJSONFile
functions in MapGenerator.cpp introduced by 871ed04521.
Include JSInterface_VFS.cpp from MapGenerator.cpp to remove that code
while gaining the other missing VFS file loading functions in rmgen/.
Split RegisterScriptFunctions of JSInterface_VFS.cpp from eb4e66aab3
into RegisterReadOnlyScriptFunctions and RegisterWriteScriptFunctions to
prevent unintentional write access.

This was SVN commit r20507.
2017-11-24 17:19:16 +00:00
49b7d6fb95 Test integer validation.
Reviewed By: leper
Differential Revision: https://code.wildfiregames.com/D947
This was SVN commit r20274.
2017-10-09 07:00:31 +00:00
7a5c5100c0 Allow command line options to start with - or --
Reviewed by: mimo
Differential Revision: https://code.wildfiregames.com/D883
This was SVN commit r20249.
2017-09-30 16:12:18 +00:00
8629b83ed9 Remove unneeded include.
That was a leftover from a previous iteration of the code.

This was SVN commit r20247.
2017-09-30 15:29:13 +00:00
84674911cc Switch back to an unplaceable filter for templates.
This removes FindAllPlaceableTemplates, replaces the few uses of it by
FindAllTemplates,
and makes that ignore all templates starting with special/ in addition
to those starting
with template_.

Now modders can use entirely different template organization schemes
(more folders, different
folders, etc) without having to edit a file that was never well
documented.

In conjunction with a few of the template moving patches preceding this
rubble/ and other/catafalque
are now placeable. The former now does not decay anymore and users that
want that should use the
decay| filter, the latter will be taken care of in #4762.

Return to making FindAllTemplates return all placeable templates again
(switch to unplaceable filter).

To reiterate the main point: Only templates starting with special/ or
template_ will not show up as
placeable in Atlas (or show up to code querying for all (placeable)
templates. If you want to add more
of those use one of these naming schemes (and possibly subfolders in
special/).

Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D935
This was SVN commit r20246.
2017-09-30 15:22:51 +00:00
ff7511d9fc Move special_filter/ templates to special/filter/.
This should help with simplifying the (un)placeable filtering again.

Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D934
This was SVN commit r20242.
2017-09-30 07:14:35 +00:00
486aec18d4 Move Main ScriptFunctions to a new JS Interface, refs #4772.
This was SVN commit r20172.
2017-09-12 03:11:33 +00:00
d6cb9c845b Move Debugging ScriptFunctions to a new JS Interface, refs #4772.
This was SVN commit r20171.
2017-09-12 02:25:28 +00:00
5f8be8e0c6 Move Game ScriptFunctions to a new JS Interface, refs #4772.
This was SVN commit r20169.
2017-09-12 01:38:46 +00:00
0e3a6d811c Move SavedGame ScriptFunctions to a new JS Interface, refs #4772.
This was SVN commit r20166.
2017-09-11 23:22:28 +00:00
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
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
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
eb4e66aab3 Move VFS GUI script function registration to its interface file.
This was SVN commit r20133.
2017-09-08 04:01:26 +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
5c01b50ca4 Add FALLTHROUGH, which in the best case is just [[fallthrough]].
Note that this does not fix the warnings in AtlasObjectXML, someone
interested
in fixing those should check whether using ICU would be a nicer
solution.

Reviewed By: echotangoecho
Differential Revision: https://code.wildfiregames.com/D740
This was SVN commit r20095.
2017-09-01 20:04:53 +00:00
27d99765bb Add an icon to pyrogenesis' application window
Tested By: Imarok (Windows, Ubuntu w. Gnome), s0600204 (Arch w. Xfce),
ffffffff (Kubuntu w. KDE)
Reviewed By: ffffffff, s0600204
Differential Revision: https://code.wildfiregames.com/D768
Trac Tickets: #4363

This was SVN commit r20067.
2017-08-28 21:56:54 +00:00
ce580f0de0 Always delete CMapReader. Patch by Sandarac. Fixes #4154.
This fixes an assertion failure in ScriptEngine that can occur when
closing
the game while in the loading screen.

Reviewed By: vladislavbelov, leper
Differential Revision: https://code.wildfiregames.com/D684
This was SVN commit r20035.
2017-08-25 00:37:48 +00:00
9defd11440 Pass ScriptInterface as a const ref where possible.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D739
This was SVN commit r20028.
2017-08-24 00:32:42 +00:00
7970c3dc54 Pass a const reference, if someone wants to modify it they should use the global directly.
Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D738
This was SVN commit r20027.
2017-08-23 23:52:32 +00:00
04f2209b50 Rename WaterUgly setting to WaterEffects in order to remove the invertedboolean workaround of the options page.
Differential Revision: https://code.wildfiregames.com/D815
Refs #3737
Tested By: Stan
This was SVN commit r20010.
2017-08-21 00:09:25 +00:00
cb18830a81 Remove CinemaManager input handler to allow user interaction on other GUI pages like message boxes and possibly few selected hotkeys.
Disable gameview/camera hotkeys while cinematic paths are playing.

Differential Revision: https://code.wildfiregames.com/D697
Refs #3301, #3814, 89aef0b6eb
Reviewed By: Vladislav
This was SVN commit r19980.
2017-08-12 10:32:07 +00:00
781cec163e Remove CTerritoryManager pointer from CWorld, a relic from before simulation2.
Patch By: Sandarac
Differential Revision: https://code.wildfiregames.com/D731
This was SVN commit r19931.
2017-07-29 23:27:02 +00:00