Commit graph

14 commits

Author SHA1 Message Date
Ralph Sennhauser
60fc382bd8
Fix eslint rule 'prefer-const' in maps/scripts
eslint --no-config-lookup --fix --rule '"prefer-const": 1' \
    binaries/data/mods/public/maps/scripts

Ref: #7812
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-05-09 19:46:31 +02: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
elexis
84e88edd36 Remove pairwise annihilating array constructor and spread operator in e4a5d5b4dd.
Differential Revision: https://code.wildfiregames.com/D1134
Reviewed By: bb
This was SVN commit r20619.
2017-12-09 20:25:23 +00:00
bb
722578fdcd Cleanup the conquest code
Stop listening to OnTrainingFinished and OnStructureBuild messages but
use OnOwnershipChanged messages. This fixes the defeat when only
promoted/upgrades/regi-hero units remain.
Add foundations to the conquest lists and make them visible on the
minimap.

Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1022
This was SVN commit r20471.
2017-11-17 11:38:51 +00:00
bb
ae74075a22 Rename TriggerHelper.EntityHasClass to TriggerHelper.EntityMatchesClassList
and so making that function much more general by using MatchesClassList.

Some suggestion and checking by leper
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1020
This was SVN commit r20432.
2017-11-10 12:14:16 +00:00
elexis
d2d43ab46f Victory and defeat reason strings.
Clarify the victory / defeat reason by using a custom string for each
defeat and victory reason.
Group chat notifications instead of posting one for each player.
This also slightly improves lobby performance upon win.

Differential Revision: https://code.wildfiregames.com/D762
Fixes #4382
Based on patch by: Angen
This was SVN commit r19955.
2017-08-08 11:32:00 +00:00
elexis
bbc7852df8 Use let keyword for cmpTrigger consistently, so that this reference to the component before deserialization can't be reused inside the Trigger component after deserialization which would cause an OOS on rejoin / savegame loading as experienced prior 53570da065.
Differential Revision: https://code.wildfiregames.com/D195
Refs #4310, 53570da065, d124b32f6a
Reviewed By: Sandarac
This was SVN commit r19552.
2017-05-10 14:03:51 +00:00
elexis
15dd804112 Remove trailing whitespace of all map scripts (as in all whitespace that doesn't come before any non-whitespace character on the same line).
This was SVN commit r18840.
2016-10-18 13:08:01 +00:00
elexis
f24fd75577 Add missing semicolons found with jshint to all map scripts.
This was SVN commit r18839.
2016-10-18 12:52:00 +00:00
leper
c4c315f6a0 Remove cmpPlayerManager.GetAllPlayerEntities() which leaked internal data.
And all uses thereof could easily be replaced.
This changes the data structure of cmpTrigger.conquestEntitiesByPlayer
to
not store the player entity at all, and since that is now gone replaces
the
object by the array that was its sole property.

Refs #4161.
Reviewed by: fatherbushido
This was SVN commit r18645.
2016-08-27 15:26:23 +00:00
elexis
a3da37ffd3 Gaia control improvements.
Don't throw errors when finishing a gaia foundation.
Allow cheats for gaia.

This was SVN commit r18552.
2016-07-24 02:19:34 +00:00
elexis
9f796068f8 Win and defeat cleanup, fixes #4013.
Add a new simulation message and chat notification for players who won.
Avoid duplicate playerstate messages in the sim and GUI by triggering
changes with a function instead of a message.
Reveal the map on defeat/win exclusively in the player component
(instead of having a silly GUI proxy and doing it also in the
EndGameManager sometimes).
Remove the skipAlliedVictory argument from the player component, since
that shouldn't contain references to the EndGameManager, refs #3970.

Show a proper message box on win/loss and add the hint for hosts
disconnecting other players.
Do defeat/win procedure in the GUI when such a message arrives, instead
of checking onTick for playerstate changes.
Thus don't show that confirmation again on every rejoin.
Don't show a pointless message box if IsAtlasRunning.

Explain that the session.js variable is needed to avoid an
order-of-execution bug.
Select "observer" item when rejoining as a defeated player.
Remove an unneeded call to updateTopPanel.

This was SVN commit r18441.
2016-06-26 04:40:50 +00:00
trompetin17
20877632ce Fix 1vs1 Game, Fix Resign double message
This was SVN commit r16648.
2015-05-10 16:12:55 +00:00
trompetin17
e4a5d5b4dd Added Conquest Strutures and Conquest Units in victory modes, fixes #2976, refs #1649
This was SVN commit r16634.
2015-05-08 03:06:14 +00:00