After rP23374, if map specifies 0 as value in certain settings, this value is ignored.
Fixing that by explicitly checking for undefined.
Details
- Reviewers
Freagarach - Group Reviewers
Restricted Owners Package (Owns No Changed Paths) - Commits
- rP24037: Read correctly 0/false values from map files in gamesetup
set relic duration to 0 in some map file with relic victory condition and check it is correctly used in gamesetup.
test any setting with possible 0 value
check all possible settings with 0 value are covered (should be, but one never knows)
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Lint
Lint Not Applicable - 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 ../../../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/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 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/1451/display/redirect
Successful build - Chance fights ever on the side of the prudent.
builderr-release-macos.txt /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/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
Link to build: https://jenkins.wildfiregames.com/job/macos-differential/1495/display/redirect
gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Dropdowns
- MapSize.js
- WorldPopulationCap.js
binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Dropdowns/GameSpeed.js | ||
---|---|---|
14 ↗ | (On Diff #13468) | Do we want to enable a gameSpeed of 0? |
binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Dropdowns/MapSize.js | ||
24 ↗ | (On Diff #13468) | Does a map size of 0 make sense? |
binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Sliders/RelicCount.js | ||
21 ↗ | (On Diff #13468) | Does it make sense to have a RelicCount of 0 when enabling CaptureTheRelic? |
It is good read map data correctly. Stupid mapmakers should get stupid results.
Complete.