Skip to content

Commit

Permalink
Removed some old testing code
Browse files Browse the repository at this point in the history
removed mapinfo.lua from output directory
made "maps" subfolder the default for created smf and smt files
  • Loading branch information
adras committed Jan 24, 2022
1 parent 7dae55d commit b5b4c87
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 35 deletions.
6 changes: 0 additions & 6 deletions MapCreationTool/MapCreationTool/MapCreationTool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@
<Content Include="..\..\Map-Blueprint\mapcontainer.sdd\mapoptions.lua" Link="Tools\Map-Blueprint\mapcontainer.sdd\mapoptions.lua">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\Map-Blueprint\README" Link="Tools\Map-Blueprint\README">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\springrts_smf_compiler\pymapconv.exe" Link="Tools\PyMapConv\pymapconv.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
Expand All @@ -138,9 +135,6 @@
</ItemGroup>

<ItemGroup>
<None Update="mapinfo.lua">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Rendering\heightmap-Flat.bmp">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand Down
2 changes: 1 addition & 1 deletion MapCreationTool/MapCreationTool/Models/ProjectSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public static ProjectSettings CreateDefault(MapPathInformation pathInfo)
HeightMapName = Path.Combine(pathInfo.mapPath, "height.png"),
GrassMapName = Path.Combine(pathInfo.mapPath, "grass.bmp"),
MetalMapName = Path.Combine(pathInfo.mapPath, "metal.bmp"),
OutSmfFilePath = Path.Combine(pathInfo.mapPath, $@"{pathInfo.mapName}.smf"),
OutSmfFilePath = Path.Combine(pathInfo.mapPath, $@"maps\{pathInfo.mapName}.smf"),
GeoventDecalPath = geoventPath,
MinHeight = -50,
MaxHeight = 200,
Expand Down
28 changes: 0 additions & 28 deletions MapCreationTool/MapCreationTool/Windows/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,34 +34,6 @@ public MainWindow()
{
InitializeComponent();
DataContext = ViewModel = new MainWindowViewModel();


// Just for testing
//try
//{
// TestLuaEditor();
//}
//catch (Exception e)
//{

//}
}

private void TestLuaEditor()
{
LuaEditor editor = new LuaEditor();
editor.Load(@"mapinfo.lua");

int? test1 = editor.GetValue<int>("maphardness");
bool? test2 = editor.GetValue<bool>("notDeformable");
string test3 = editor.GetValue<string>("name");
double test4 = editor.GetValue<double>("extractorRadius");

editor.SetValue("maphardness", 99);
editor.SetValue("notDeformable", true);
editor.SetValue("name", "NewName");
editor.SetValue("extractorRadius", 441.293);
editor.Save("mapinfoTest.lua");
}

private void ctrlStart_OnMapOpened(object sender, MapPathInformation mapPathInfo)
Expand Down

0 comments on commit b5b4c87

Please sign in to comment.