Merge remote-tracking branch 'udb/master'

This commit is contained in:
spherallic 2023-09-11 01:55:11 +02:00
commit 0c2532e160

View file

@ -272,12 +272,13 @@ namespace CodeImp.DoomBuilder.Map
{ {
// Create resource // Create resource
DataLocation res = new DataLocation(); DataLocation res = new DataLocation();
// Copy information from Configuration to ResourceLocation // Copy information from Configuration to ResourceLocation
if(resinfo.Contains("type") && (resinfo["type"] is int)) res.type = (int)resinfo["type"]; if (resinfo.Contains("type") && (resinfo["type"] is int)) res.type = (int)resinfo["type"];
if(resinfo.Contains("location") && (resinfo["location"] is string)) res.location = (string)resinfo["location"]; if (resinfo.Contains("location") && (resinfo["location"] is string)) res.location = (string)resinfo["location"];
if(resinfo.Contains("textures") && (resinfo["textures"] is bool)) res.option1 = (bool)resinfo["textures"]; if (resinfo.Contains("textures") && (resinfo["textures"] is bool)) res.option1 = (bool)resinfo["textures"];
if(resinfo.Contains("flats") && (resinfo["flats"] is bool)) res.option2 = (bool)resinfo["flats"]; if (resinfo.Contains("flats") && (resinfo["flats"] is bool)) res.option2 = (bool)resinfo["flats"];
if (resinfo.Contains("notfortesting") && (resinfo["notfortesting"] is int)) res.notfortesting = Convert.ToBoolean(resinfo["notfortesting"]);
// Add resource // Add resource
AddResource(res); AddResource(res);