Tweak handling of nullable types in LUA doc generation.

The types for Int32 and Boolean are currently replaced with friendly names of int and bool for the docs. Ensure we apply the same handling when these are nullable types, changing the output from Int32? and Boolean? to int? and bool?
This commit is contained in:
RoosterDragon
2022-04-04 13:21:51 +01:00
committed by abcdefg30
parent d2935672ca
commit ecb7c16751

View File

@@ -32,7 +32,7 @@ namespace OpenRA.Scripting
ret = t.Name;
if (t.IsGenericType && t.GetGenericTypeDefinition() == typeof(Nullable<>))
ret = $"{t.GetGenericArguments().Select(p => p.Name).First()}?";
ret = $"{t.GetGenericArguments()[0].LuaDocString()}?";
return ret;
}