Remove the world population setting from the game setup.
Add a dropdown for choosing the "Population Cap Type".
(-> containing Player Population, World Population, Team Population)
Use a single "Population Cap" dropdown adapting to the pop cap types.
Move all population data into a single .json file.
New system component "PopulationCapManager" for distributing pop caps.
Resolves: #6918
Who says only players should be able to conduct diplomacy?
Also separation of concerns, more maintainable files.
Differential revision: https://code.wildfiregames.com/D4921
Comments by: @elexis, @Stan
Refs. #5894
This was SVN commit r27722.
Remove obseleted function RemoveAllPlayers in 354bd8b088.
Linter stuff.
Don't initialise undefined world population value.
Differential revision: https://code.wildfiregames.com/D4494
This was SVN commit r26477.
- Removed obsolete C++-side `addPlayer`, introduced in 4fed9b8242, moved
out of Atlas in 1c0536bf08, unused after 9ee44bd9b8.
- Get the player settings from a local function (avoids passing
arguments).
- Removed setting the standard diplomacy (done in cmpPlayerManager since
132020f88e).
- Create entity when adding a player instead of creating it and
instructing the playermanager to add it.
- Changed/Removed some comments.
Differential revision: https://code.wildfiregames.com/D4482
Comments by: @Stan
This was SVN commit r26404.
This allows to specify a world population capacity that is divided
evenly amongst living players.
Differential Revision: D2426
Reviewed by: @Angen
This was SVN commit r23873.
The ModifiersManager system component provides an interface to add and
remove modifiers, and get modified stats.
The goal is to merge all the different stat-modifying systems 0 A.D. has
implemented over the years.
This commit makes technologies and auras use ModifiersManager. Some
cheats and AI bonuses also have a similar stat-modifying effect that
have not yet been updated.
Further, this system component makes it possible for e.g. triggers to
easily add modifiers, enabling the writing of Castle Blood Automatic,
RPG or Tower Defense maps without the need for mods or hacks.
The 'Modifier' name was preferred over 'Modification' as it is shorter
and more readable, along with the logic that 'modifiers' store
'modifications' and this stores modifiers. Renaming of other functions
and classes has been left for future work for now.
Internally, this uses a JS data structure. If performance issues arise
with it in the future, this data structure or the whole component could
be moved to C++.
The performance has been tested to be about as fast as the current
implementations (and specifically much faster for global auras with no
icons). Testing showed that sending value modification messages was by
far the slowest part.
Comments by: leper, Stan, elexis
Differential Revision: https://code.wildfiregames.com/D274
This was SVN commit r22767.
As demonstrated by Dizaka, it allowed players to win a game by deleting
all buildings, sending one unit across the map and having the enemy get
defeated by the double gaia count.
It also means that players that still have buildings but no CCs/Wonders
are targetted by elephants.
This was SVN commit r21777.
This also reduces the attackercount slightly, because gaia is now
excluded when counting players.
PlayerManager.GetActivePlayers helper function.
This was SVN commit r21730.
Create a getNonGaia function
Reset counters on playerDefeat
MarkPlayersAsWon function
Rename MarkPlayerAsWon to MarkPlayerAndAlliesAsWon
Stop letting winningplayers in relic depend on PlayerID
Comments By and Discussion With: elexis
Reviewed By: temple
Differential Revision: https://code.wildfiregames.com/D972fixes#4648
This was SVN commit r21441.
The commit had removed the fallback color as there is no traceable use
case.
Copy the Player color from the old to the new player entity in
ReplacePlayer before the ownership changes occur, so that it is always
initialized before read.
Refs 9329506e0d
Reported By: temple
This was SVN commit r20951.
This will allow us to use some linters that would otherwise crash on
this non-standard SpiderMonkey feature. Refs #4419.
Special thanks to elexis for thoroughly checking and testing all the
changes!
Reviewed By: leper, elexis
Differential Revision: https://code.wildfiregames.com/D40
This was SVN commit r19191.
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.
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.
Also fix a simulation bug (check for allied victory on game start).
The mode is not a victory condition as it applies to all victoriy
conditions.
This was SVN commit r18342.
Previously we removed all players and created them anew. This caused
issues in Atlas,
as some components were recreated, but did not get informed about
already existing
entities (eg cmpTechnologyManager). By only creating/deleting players
until we obtain
the new number of players we do not have this issue.
This was SVN commit r16080.
Fixes object panel not being notified of map loading.
Fixes bug where opening a new map before using the player panel
prevented default player data being displayed for new players.
Fixes wxGTK 2.8 bug: wxChoicebook control doesn't update the choice
control when adding/removing pages.
Notifies player that deleting player in Atlas will delete all their
objects (and gives them the option).
Changes DeleteObject to DeleteObjects to support multiple selections.
Implements undo for map resize (experimental).
Removes annoying debug message from attempted undo of map settings.
Tweaks a few Atlas UI controls.
This was SVN commit r10064.
Merge from 22b478ffed8d.
Pure scripted interface definitions.
Entity creation from scripts.
Improved messaging system.
Messages on entity deletion.
Basic player entities.
Player ownership.
Bug fixes.
This was SVN commit r7281.