None of the GUI object types implemented in the past two decades owns
children, only the CGUI page.
Differential Revision: https://code.wildfiregames.com/D2311
Tested on: clang 8.0.1, Jenkins
This was SVN commit r22943.
Merged all the old helmets files including meshes, textures and actors
to another sub folder called "old"
Added a better visual rome gallic helmet as replacement of the one i've
did before.
Replaced thracian helmet on spartan pikeman.
Replaced pers neckguard with one animated working like a cape.
Added the new persian conical helmet.
Added another pilos helmet for the persian cavalry.
Added another crest for the persian pilos helmet.
This was SVN commit r22933.
Before cc1ea7cca0, the promotion code would carry the UnitAI
IsGarrisoned flag, which the Transform helper incorrectly didn't do.
However, this was missed when merging the two code paths.
This fixes an issue for example when units are promoted while atop
walls.
Reported By: faction02
Patch By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2303
This was SVN commit r22929.
This way the save dialog gains the sortable list and details section
feature from 10b49f9c18 / D246 by removing a folder of code, refs #4413.
Fixes a style warning about the old dialog using a style for an 'olist'
type for a 'list' type, refs be963ec9b7 / D2232.
Subsequently move the gui/common/ helper file to the page code, meaning
it's not loaded for every GUI page needlessly anymore.
Fix map preview aspect ratio.
Use object-oriented code for the moved savegame code, refs #5387, but
conserve the rest of the code to limit the changes for auditability.
Differential Revision: https://code.wildfiregames.com/D2290
Tested on: Jenkins
This was SVN commit r22923.
Simply pass the JS value to the Save functions instead of letting those
obtain the data later from the topmost GUI page.
The JS hack incidence appears to be unused since 4b1297b328.
Differential Revision: https://code.wildfiregames.com/D2302
Tested on: clang 8.0.1, Jenkins
This was SVN commit r22922.
Don't write XMB files for XML files that failed the validation,
otherwise the XML validation error will not be reported on consecutive
program starts anymore (as the XMB is loaded, skipping validation).
This had resulted in invalid XML going unnoticed and committed in
credentials.xml in 80dbd1f2a3.
Differential Revision: https://code.wildfiregames.com/D1574
Reported by: gameboy
Comments By: bb
Tested on: clang 8.0.1, Jenkins
This was SVN commit r22921.
Avoid redundant map lookups by caching the iterator.
Remove c-style casts by using type specific printf parameters, and
static_cast elsewhere.
Use references while at it, and typedef -> using.
Differential Revision: https://code.wildfiregames.com/D1567
Comments by: Vladislav
Tested on: clang 8.0.1, gcc 9.1.0
This was SVN commit r22916.
Fixed:
Replaced the Phrygian b helmet with b1 following the name schema of the
rest as well as adding 2 variants more of the same.
Added:
Add bronze specular for the bronze helmets.
Added Phrygian B12
Added Thracian B8 and B9
Added Celt Monte Bibele
Added Illyrian Helmets (B1; B2; B3)
Added new face mask's
Reworked:
Reworked Corinthian Helmet B1 and B2 with a more historically accurate
one.
Reworked the helmet's Crest's adding a better visual ones.
Reworked Phryian Face Mask's with better visual ones.
Renamed:
Renamed Apulo roman helmet to Apulo Itallic.
Renamed Phryian b to b1.
Renamed Thracian b to b1.
This was SVN commit r22913.
Following e16c4c4800, the ModifierManager no longer sends
ValueModificationMessages when an entity changes owner to/from
INVALID_ENTITY. This happens in particular when the entity is renamed.
For now, components must check on their own in OwnershipChanged.
Reported By: Freagarach
Patch By: Angen
Reviewed By: wraitii
Fixes#5588
Differential Revision: https://code.wildfiregames.com/D2286
This was SVN commit r22912.
This is a semi-revert of 78bc56f33e and a correct fix for #3194.
The core issue is that the GUI handler must come behore the hotkey
handler, otherwise typing in boxes can set off hotkeys, and the hotkey
handler is repsonsible for updating the hotkey state.
Thus the GUI handler never has an up-to-date hotkey state, since that's
done later. 78bc56f33e fixed that by calling HotkeyInputHandler
manually, but that was still broken in some (unused) cases and was hacky
(indeed, it even looked hacky as noted by elexis).
The simplest fix is to split the 'hotkey creator' handler from the
'hotkey state change' handler, and run the 'hotkey state change handler'
before any other handler. Thus the gui handler remains in front of the
'hotkey creator' handler, but it has a correct hotkey state at any time.
Differential Revision: https://code.wildfiregames.com/D1839
This was SVN commit r22909.
libc and libstd differ on how they parse strings. This has a remote
chance of breaking mods and 0 A.D. code, and it broke tests on MacOS.
Add a workaround to ensure they are consistent.
Comments by: vladislavbelov
Fixes#2780
Differential Revision: https://code.wildfiregames.com/D1988
This was SVN commit r22908.
Summary: This patch corrects two occurrences of -ise into -ize in the
quotes, because US spelling.
Test Plan: Ought to be unproblematic.
Reviewers: Gallaecio
Reviewed By: Gallaecio
Subscribers: Itms, Stan, Freagarach, O8 JS GUI
Differential Revision: https://code.wildfiregames.com/D2246
This was SVN commit r22907.
Summary:
This patch standardizes the tooltips of gather technologies, per
https://trac.wildfiregames.com/wiki/EnglishStyleGuide#Stats
Flavour text strings are moved from the "tooltip" to the "description"
entry.
Test Plan: Check for mistakes and omissions.
Reviewers: Gallaecio
Reviewed By: Gallaecio
Subscribers: Freagarach
Differential Revision: https://code.wildfiregames.com/D2253
This was SVN commit r22906.
Summary:
This patch rephrases the aura descriptions of hero auras to an uniform
standard, to ensure descriptions follow the actual modifications:
[player] [class] [change] [attributes], e.g. "Spearmen +1 capture attack
strength, +25% melee attack damage." instead of "+25% attack and +1
capture for spear soldiers."
See also D1720, D1806, D1807.
The `formation` and `garrison` type aura descriptions are ugly;
improvement suggestions are welcome.
Test Plan: Check for mistakes and omissions.
Reviewers: Gallaecio, Freagarach
Reviewed By: Gallaecio, Freagarach
Subscribers: Freagarach, elexis, Vulcan
Differential Revision: https://code.wildfiregames.com/D1808
This was SVN commit r22905.
Summary:
Another follow-up to D1719 and D1744. This one does the following:
* [font="sans-14"] (default) at the end of the line that used a
different font, rather than at the beginning of the next line (no net
change, but looks better in the file)
* two spaces for indentation of hotkeys (looks better in game)
* ` – ` (space en-dash space) instead of `: ` (colon space) to separate
hotkey and description, for better visibility and consistency.
* `6400px by 4800px` → `6400×4800 pixels`
* removed Alt+W entry (superseded by Alt+Shift+W above)
* inserted Esc entry under save game for completeness
* rephrased several descriptions
Before: {F1014718}
After: {F1014719}
Test Plan: Launch the game and open the manual.
Reviewers: O7 Catchall, Gallaecio, elexis, Itms
Reviewed By: Gallaecio
Subscribers: Freagarach, O8 JS GUI, Stan, elexis
Differential Revision: https://code.wildfiregames.com/D2110
This was SVN commit r22904.
This moves the "async" pathfinding computations to a worker, preparing
the architecture for threading.
Tested By: Kuba386, Stan`
Differential Revision: https://code.wildfiregames.com/D1918
This was SVN commit r22902.
This fixes status effects following 16b452cf91 where the GiveStatus name
change broke them.
This lets status effects deal all types of damage, capture, or inflict
other status effects, like any attack.
This further adds some basic GUI spport to status effects, by showing up
to 5 icons in the top-right of the portrait, and including status
effects in the tooltips.
Status effects can specify a custom icon.
Differential Revision: https://code.wildfiregames.com/D2218
This was SVN commit r22901.
I.e. don't dereference NULL if the user of the glooxwrapper library
reads from the provided room argument.
A step towards being able to use XmppClient with multiple rooms.
Differential Revision: https://code.wildfiregames.com/D2287
Tested on: clang 8.0.1, Jenkins
This was SVN commit r22898.
Make that function static, so that it can be used for these functions
without slowly having to obtain the ScriptInterface instance using
GetScriptInterfaceAndCBData just to get the JSContext again.
Remove few redundant conversions for CreateObject arguments.
Differential Revision: https://code.wildfiregames.com/D2128
Tested on: gcc 9.1.0, clang 8.0.1, Jenkins
Tedious performance testing in: D2128, D2127
This was SVN commit r22894.
The commit introduced support for arbitrary lobby CreateGUIMessage
JS::Value arguments but didn't transfer wstring_from_utf8 appropriately.
Instead of enlengthening the code by reintroducing utf8_from_wstring
everyhwere, shorten the code and specialize ToJSVal for
glooxwrapper::string and gloox enums.
Avoid string copies for XmppClient getters, refs D1668:
Change GetPresence() and GetRole() to return the pointer to the string
literal instead of copy constructing a std::string each call.
Don't reintroduce the unneeded utf8_from_wstring conversions for the
untranslatable ASCII identifiers returned by GetPresence() and
GetRole().
Change GetSubject() to return a const ref to the member instead of copy
assigning the std::string to an output value.
Change m_Subject to std::wstring to avoid constructing a copy using
wstring_from_utf8 each GetSubject() call.
Change gloox enum to translatable string functions to be static, so as
to use them in the new ToJSVal functions (enabled by not calling
CertificateErrorToString from ConnectionErrorToString anyymore in
92fc34c87c/D2274).
Avoid per-player string copies in m_PlayerMap:
Change m_PlayerMap value type from std::vector<std::string> to a new
PlayerMap struct with named members for readability.
Use gloox enums as PlayerMap values to avoid constructing (performance)
and storing (memory footprint) std::strings.
The JS String is created from the pointer to the ASCII string literal
without intermediaries.
Use glooxwrapper::string for nickname and m_Rating since it's the data
source type received in relevant places, but that might be improved for
performance with std::wstring.
Construct map values in place where possible and post error instead of
silently inserting if an existing value is to be modified.
Avoid repeated std::map lookups on string keys by caching the
PlayerMap::iterator where available.
Remove some glooxwrapper::string to_string() calls redundant with its
operator<< and improve DbgXMPP gloox enum output.
Transfer rating too upon nickchange.
Differential Revision: https://code.wildfiregames.com/D2271
Tested on: clang 8.0.1, Jenkins
This was SVN commit r22891.