Merge pull request #229 from Areloch/TerrainAssetFixup

Reworks the terrain loader code to work with the assets.
This commit is contained in:
Brian Roberts 2020-07-10 17:30:27 -05:00 committed by GitHub
commit 67dbe4dfe2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 510 additions and 283 deletions

View file

@ -38,20 +38,11 @@ function AssetBrowser::createTerrainAsset(%this)
AssetBrowser.refresh();
//Save out a basic terrain block here
/*%terrBlock = new TerrainBlock() { terrainFile = %terPath; };
%terrBlock.save(%terPath);
%terrBlock.delete();*/
//the terrain block creation is...weird and does coded path stuff engine-side.
//this needs reworking, but this is a sidestep for now
%misFile = $Client::MissionFile;
$Client::MissionFile = %terPath;
//
$createdTerrainBlock = TerrainBlock::createNew( %assetName, %this.newAssetSettings.resolution, "", %this.newAssetSettings.genWithNoise );
$Client::MissionFile = %misFile;
$createdTerrainBlock.terrainAsset = %moduleName @ ":" @ %assetName;
$createdTerrainBlock.terrainFile = "";
return %tamlpath;
}