Author reusable mission sites with finite scavenging stock
This commit is contained in:
@@ -5,6 +5,23 @@ class ERR_ValidateBaseWorldPlugin : WorldEditorPlugin
|
||||
{
|
||||
string play;
|
||||
WorldEditor editor = Workbench.GetModule(WorldEditor);
|
||||
if (editor)
|
||||
{
|
||||
WorldEditorAPI api = editor.GetApi();
|
||||
if (api)
|
||||
{
|
||||
float low = 10000;
|
||||
float high = -10000;
|
||||
for (int x = -3; x <= 3; x += 3)
|
||||
for (int z = -3; z <= 3; z += 3)
|
||||
{
|
||||
float height = api.GetTerrainSurfaceY(6150 + x, 7050 + z);
|
||||
low = Math.Min(low, height);
|
||||
high = Math.Max(high, height);
|
||||
}
|
||||
PrintFormat("ERR SITE SURVEY: supply=6150/7050 elevationRange=%1 min=%2 max=%3", high - low, low, high);
|
||||
}
|
||||
}
|
||||
if (editor && System.GetCLIParam("errPlay", play) && play == "1") editor.SwitchToGameMode();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user