mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-07 09:33:51 +00:00
feat(wob): tryLoadByGamePath helper, used by editor + terrain_manager
Mirrors the WOM tryLoadByGamePath API: probes custom_zones/buildings/ + output/buildings/ by default, with optional extraPrefixes (e.g. per-zone output/<map>/buildings/) checked first. Both the editor and the main game's terrain_manager now use the helper, removing duplicate inline lookup loops in two more places.
This commit is contained in:
parent
f36309a96f
commit
db068d480b
4 changed files with 48 additions and 31 deletions
|
|
@ -67,6 +67,15 @@ public:
|
|||
|
||||
// Convert WMOModel to WOB (for editor export)
|
||||
static WoweeBuilding fromWMO(const class WMOModel& wmo, const std::string& name = "");
|
||||
|
||||
// Convenience: try loading <path-without-ext>.wob from the standard editor
|
||||
// search paths (custom_zones/buildings/, output/buildings/). `extraPrefixes`
|
||||
// are tried before the defaults — pass per-zone roots like
|
||||
// {"output/<map>/buildings/", "custom_zones/<map>/buildings/"} when the
|
||||
// caller knows the active zone. Returns valid building on hit.
|
||||
static WoweeBuilding tryLoadByGamePath(
|
||||
const std::string& gamePath,
|
||||
const std::vector<std::string>& extraPrefixes = {});
|
||||
};
|
||||
|
||||
} // namespace pipeline
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue