Compare commits

...

3 commits

Author SHA1 Message Date
3c4dfbda9a SaveTool: make the weapon part selector focus on the current item. 2022-11-25 09:43:32 +01:00
d1712bf8cb Mass: add logging indentation to refreshValues(). 2022-11-25 09:43:11 +01:00
567546489f Maps/Accessories: update with 0.9 accessories.
Also update formatting for better readability.
2022-11-25 09:42:44 +01:00
3 changed files with 208 additions and 152 deletions

View file

@ -65,6 +65,16 @@ static const std::map<Int, AccessoryData> accessories {
{23, {"Star"_s, AccessorySize::S}},
{24, {"SixSideStar"_s, AccessorySize::S}},
{25, {"Asterisk"_s, AccessorySize::S}},
{26, {"Ring"_s, AccessorySize::S}},
{27, {"SawedRing"_s, AccessorySize::S}},
{28, {"HalfRing"_s, AccessorySize::S}},
{29, {"Cresent"_s, AccessorySize::S}},
{30, {"Donut"_s, AccessorySize::S}},
{31, {"FiveCogWheel"_s, AccessorySize::S}},
{32, {"SixCogWheel"_s, AccessorySize::S}},
{33, {"SevenCogWheel"_s, AccessorySize::S}},
{34, {"EightCogWheel"_s, AccessorySize::S}},
{35, {"TwelveCogWheel"_s, AccessorySize::S}},
{51, {"SquBevel"_s, AccessorySize::S}},
{52, {"TriBevel"_s, AccessorySize::S}},
@ -414,12 +424,22 @@ static const std::map<Int, AccessoryData> accessories {
{2408, {"Blade 08"_s, AccessorySize::XL}},
{2409, {"Blade 09"_s, AccessorySize::XL}},
{2410, {"Blade 10"_s, AccessorySize::XL}},
{2411, {"Blade 11"_s, AccessorySize::XL}},
{2412, {"Blade 12"_s, AccessorySize::XL}},
{2413, {"Blade 13"_s, AccessorySize::XL}},
{2414, {"Blade 14"_s, AccessorySize::XL}},
{2415, {"Blade 15"_s, AccessorySize::XL}},
{2426, {"Curved Blade 01"_s, AccessorySize::XL}},
{2427, {"Curved Blade 02"_s, AccessorySize::XL}},
{2428, {"Curved Blade 03"_s, AccessorySize::XL}},
{2429, {"Curved Blade 04"_s, AccessorySize::XL}},
{2430, {"Curved Blade 05"_s, AccessorySize::XL}},
{2431, {"Axe Head 01"_s, AccessorySize::XL}},
{2432, {"Axe Head 02"_s, AccessorySize::XL}},
{2433, {"Axe Head 03"_s, AccessorySize::XL}},
{2434, {"Axe Head 04"_s, AccessorySize::XL}},
{2435, {"Axe Head 05"_s, AccessorySize::XL}},
{2451, {"Horn 01"_s, AccessorySize::M}},
{2452, {"Horn 02"_s, AccessorySize::M}},
@ -460,6 +480,12 @@ static const std::map<Int, AccessoryData> accessories {
{2504, {"Finger 04"_s, AccessorySize::M}},
{2505, {"Finger 05"_s, AccessorySize::M}},
{2510, {"Clamp 01"_s, AccessorySize::M}},
{2511, {"Clamp 02"_s, AccessorySize::M}},
{2512, {"Clamp 03"_s, AccessorySize::M}},
{2513, {"Clamp 04"_s, AccessorySize::M}},
{2514, {"Clamp 05"_s, AccessorySize::M}},
{2521, {"Fabric 01"_s, AccessorySize::XL}},
{2522, {"Fabric 02"_s, AccessorySize::XL}},
{2523, {"Fabric 03"_s, AccessorySize::XL}},
@ -482,6 +508,16 @@ static const std::map<Int, AccessoryData> accessories {
{2608, {"S Bullet Barrel 03"_s, AccessorySize::XL}},
{2609, {"S Bullet Barrel 04"_s, AccessorySize::XL}},
{2610, {"S Bullet Barrel 05"_s, AccessorySize::XL}},
{2611, {"B Bullet Barrel 01"_s, AccessorySize::XL}},
{2612, {"B Bullet Barrel 02"_s, AccessorySize::XL}},
{2613, {"B Bullet Barrel 03"_s, AccessorySize::XL}},
{2614, {"B Bullet Barrel 04"_s, AccessorySize::XL}},
{2615, {"B Bullet Barrel 05"_s, AccessorySize::XL}},
{2616, {"B Bullet Barrel 06"_s, AccessorySize::XL}},
{2617, {"B Bullet Barrel 07"_s, AccessorySize::XL}},
{2618, {"B Bullet Barrel 08"_s, AccessorySize::XL}},
{2619, {"B Bullet Barrel 09"_s, AccessorySize::XL}},
{2620, {"B Bullet Barrel 10"_s, AccessorySize::XL}},
{2651, {"Cylinder Scope 01"_s, AccessorySize::M}},
{2652, {"Cylinder Scope 02"_s, AccessorySize::M}},
@ -531,6 +567,12 @@ static const std::map<Int, AccessoryData> accessories {
{2903, {"Complex Construct 03"_s, AccessorySize::L}},
{2904, {"Complex Construct 04"_s, AccessorySize::L}},
{2905, {"Complex Construct 05"_s, AccessorySize::L}},
{2950, {"Q Mask 01"_s, AccessorySize::M}},
{2951, {"Q Mask 02"_s, AccessorySize::M}},
{2952, {"Q Mask 03"_s, AccessorySize::M}},
{2953, {"Q Mask 04"_s, AccessorySize::M}},
{2954, {"Q Mask 05"_s, AccessorySize::M}},
// endregion
// region Connectors

View file

@ -18,6 +18,7 @@
#include <Corrade/Containers/Array.h>
#include <Corrade/Containers/Pair.h>
#include <Corrade/Containers/ScopeGuard.h>
#include <Corrade/Utility/Path.h>
#include "PropertyNames.h"
@ -78,6 +79,16 @@ auto Mass::getNameFromFile(Containers::StringView path) -> Containers::Optional<
void Mass::refreshValues() {
LOG_INFO_FORMAT("Refreshing values for {}.", _filename);
logger().lockMutex();
logger().indent();
logger().unlockMutex();
Containers::ScopeGuard indent_guard{[]{
logger().lockMutex();
logger().unindent();
logger().unlockMutex();
}};
LOG_INFO("Checking if file exists.");
if(!Utility::Path::exists(Utility::Path::join(_folder, _filename))) {
LOG_WARNING_FORMAT("{} doesn't exist in {}.", _filename, _folder);

View file

@ -479,6 +479,9 @@ void SaveTool::drawWeaponEditor(Weapon& weapon) {
if(ImGui::Selectable(mapped_part.second.data(), mapped_part.first == part.id)) {
part.id = mapped_part.first;
}
if(mapped_part.first == part.id) {
ImGui::SetItemDefaultFocus();
}
}
ImGui::EndListBox();