2026-02-04 20:46:04 +08:00
# include "SOneRules.hpp"
# include "Shared.hpp"
namespace L = LibCmo ;
namespace C = LibCmo : : CK2 ;
namespace O = LibCmo : : CK2 : : ObjImpls ;
namespace BMapInspector : : Rule {
# pragma region SOne Rule 1
constexpr char8_t SONE1 [ ] = u8 " SONE1 " ;
SOneRule1 : : SOneRule1 ( ) : IRule ( ) { }
SOneRule1 : : ~ SOneRule1 ( ) { }
std : : u8string_view SOneRule1 : : GetRuleName ( ) const {
return SONE1 ;
}
void SOneRule1 : : Check ( Reporter : : Reporter & reporter , Map : : Level & level ) const {
auto * ctx = level . GetCKContext ( ) ;
auto physicalized_3dobjects = Shared : : FetchPhysicalized3dObjects ( ctx ) ;
for ( auto * physicalized_3dobject : physicalized_3dobjects ) {
auto * mesh = physicalized_3dobject - > GetCurrentMesh ( ) ;
if ( mesh = = nullptr ) {
reporter . FormatError (
SONE1 ,
2026-02-24 13:49:20 +08:00
u8R " (Object %s is grouped into physicalization group, but it doesn't have any associated mesh. This will cause itself and following objects can not be physicalized.) " ,
Shared : : QuoteObjectName ( physicalized_3dobject ) . c_str ( ) ) ;
2026-02-04 20:46:04 +08:00
}
}
}
# pragma endregion
} // namespace BMapInspector::Rule