This computes the resource types an entity can accept instead of hardcoding them in tooltips. (Since they can be changed via techs.)
Details
- Reviewers
Silier - Group Reviewers
Restricted Owners Package (Owns No Changed Paths) - Commits
- rP24045: Get dropsites' accepting resources from simulation instead of hardcoding them…
- Verify that the types are shown and change when the they're changed in the simulation.
- Look at the tooltips and check if their presentation is acceptable.
- Verify that translation is done properly.
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Successful build - Chance fights ever on the side of the prudent.
builderr-debug-macos.txt ../../../source/simulation2/scripting/JSInterface_Simulation.cpp:155:4: warning: suggest braces around initialization of subobject [-Wmissing-braces] CFixedVector2D(-halfSize.X, -halfSize.Y), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. In file included from ../../../source/graphics/tests/test_Camera.cpp:17: /Users/wfg/Jenkins/workspace/macos-differential/source/graphics/tests/test_Camera.h:168:4: warning: suggest braces around initialization of subobject [-Wmissing-braces] CVector3D(-101.0f, -101.0f, 101.0f), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. In file included from ../../../source/simulation2/tests/test_SerializeTemplates.cpp:17: /Users/wfg/Jenkins/workspace/macos-differential/source/simulation2/tests/test_SerializeTemplates.h:39:4: warning: suggest braces around initialization of subobject [-Wmissing-braces] 3, 0, 1, 4, 1, 5 ^~~~~~~~~~~~~~~~ { } 1 warning generated. builderr-release-macos.txt /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/liblobby.a(precompiled.o) has no symbols ../../../source/simulation2/scripting/JSInterface_Simulation.cpp:155:4: warning: suggest braces around initialization of subobject [-Wmissing-braces] CFixedVector2D(-halfSize.X, -halfSize.Y), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libsimulation2.a(precompiled.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libengine.a(precompiled.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgraphics.a(precompiled.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libatlas.a(precompiled.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgui.a(precompiled.o) has no symbols In file included from ../../../source/graphics/tests/test_Camera.cpp:17: /Users/wfg/Jenkins/workspace/macos-differential/source/graphics/tests/test_Camera.h:168:4: warning: suggest braces around initialization of subobject [-Wmissing-braces] CVector3D(-101.0f, -101.0f, 101.0f), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. In file included from ../../../source/simulation2/tests/test_SerializeTemplates.cpp:17: /Users/wfg/Jenkins/workspace/macos-differential/source/simulation2/tests/test_SerializeTemplates.h:39:4: warning: suggest braces around initialization of subobject [-Wmissing-braces] 3, 0, 1, 4, 1, 5 ^~~~~~~~~~~~~~~~ { } 1 warning generated.
Link to build: https://jenkins.wildfiregames.com/job/macos-differential/1453/display/redirect
This is a nice improvement, I just tried it out, and it seems to work without errors and warnings:
However, I recommend displaying it directly after Cost, i.e. above Garrison Limit, instead of at the end.
binaries/data/mods/public/simulation/templates/units/maur_support_elephant.xml | ||
---|---|---|
21 ↗ | (On Diff #13367) | (It would be way easier if we'd just sort everything alphabetically,,,) |
binaries/data/mods/public/gui/reference/common/ReferencePage.js | ||
---|---|---|
59 ↗ | (On Diff #13388) | Is this the most logical position? |
binaries/data/mods/public/gui/session/selection_details.js | ||
321 ↗ | (On Diff #13388) | Actually I'm not sure including it in the attack & resistance pop-up is necessary. |
binaries/data/mods/public/gui/session/selection_panels.js | ||
247 ↗ | (On Diff #13388) | Good. |
978–989 ↗ | (On Diff #13388) | Where is this tooltip displayed? |
binaries/data/mods/public/gui/reference/common/ReferencePage.js | ||
---|---|---|
59 ↗ | (On Diff #13388) | If you ask me, I'd say list it above Health, since it's more qualitative than quantitative, unlike the others. |
binaries/data/mods/public/gui/session/selection_panels.js | ||
978 ↗ | (On Diff #13388) | Found it! I had to enable this under Options/In-Game. |
binaries/data/mods/public/gui/common/tooltips.js | ||
---|---|---|
1003 ↗ | (On Diff #13388) | ?? |
binaries/data/mods/public/globalscripts/Templates.js | ||
---|---|---|
351 ↗ | (On Diff #13388) | object creation is not needed, just assign to resourceDropsite |
- Remove redundant typeIcon in tooltip.
- Remove tooltip from attackAndResistanceStats.
- Show before health in reference page.
binaries/data/mods/public/globalscripts/Templates.js | ||
---|---|---|
351 ↗ | (On Diff #13388) | It needs to be in sync with GUIInterface. |
1.) Looks fine
2.) I think dropsite types could be displayed somewhere for already build structure, just like gather rates are