Fixed initTable warnings about missing properties
The Lua extension would report missing/uninitialized fields on actor creation because it thought they were required. This makes them all optional, except for OwnerInit, which is special.
This commit is contained in:
committed by
Matthias Mailänder
parent
68d053336b
commit
74df2d22da
@@ -149,7 +149,13 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
.Distinct());
|
||||
|
||||
if (!string.IsNullOrEmpty(parameterString))
|
||||
{
|
||||
// OwnerInit is special as it is the only "required" init. All others are optional.
|
||||
if (init.Name != nameof(OwnerInit))
|
||||
parameterString += '?';
|
||||
|
||||
Console.WriteLine($"---@field {name} {parameterString}");
|
||||
}
|
||||
}
|
||||
|
||||
usedEnums = localEnums.Distinct();
|
||||
|
||||
Reference in New Issue
Block a user