1
0

feat: fully refactor BMapInspector rule set for better layout

This commit is contained in:
2026-03-03 17:11:30 +08:00
parent 49a729078c
commit 4c71a20935
35 changed files with 1628 additions and 1428 deletions

View File

@@ -0,0 +1,31 @@
#include "Sector.hpp"
#include <yycc.hpp>
#include <yycc/string/op.hpp>
#include <VTAll.hpp>
namespace strop = yycc::string::op;
namespace L = LibCmo;
namespace BMapInspector::Ruleset::Shared::Sector {
SectorNameBuilder::SectorNameBuilder() {}
SectorNameBuilder::~SectorNameBuilder() {}
SectorName SectorNameBuilder::get_name(L::CKDWORD sector) const {
if (sector < MIN_SECTOR || sector > MAX_SECTOR) {
throw std::logic_error("invalid sector number");
} else {
if (sector < 9) {
return strop::printf(u8"Sector_%02" PRIuCKDWORD, sector);
} else {
return strop::printf(u8"Sector_%" PRIuCKDWORD, sector);
}
}
}
Sector9Names SectorNameBuilder::get_sector9_names() const {
return Sector9Names{.legacy_name = u8"Sector_9", .intuitive_name = u8"Sector_09"};
}
}