feat: T5 map ents dumper (#878)

* feat: T5 map ents dumper

* chore: adjust map ents dumper code style to each other

---------

Co-authored-by: Jan Laupetin <[email protected]>
This commit is contained in:
Ash
2026-07-12 01:03:53 +02:00
committed by GitHub
co-authored by Jan Laupetin
parent 0123595305
commit 28e27409f5
7 changed files with 40 additions and 6 deletions
@@ -0,0 +1,20 @@
#include "MapEntsDumperT5.h"
#include "Maps/MapEntsCommon.h"
using namespace T5;
namespace map_ents
{
void DumperT5::DumpAsset(AssetDumpingContext& context, const XAssetInfo<AssetMapEnts::Type>& asset)
{
const auto* mapEnts = asset.Asset();
const auto assetFile = context.OpenAssetFile(GetEntsFileNameForAssetName(asset.m_name));
if (!assetFile)
return;
auto& stream = *assetFile;
stream.write(mapEnts->entityString, std::max(mapEnts->numEntityChars - 1, 0));
}
} // namespace map_ents