Don't conflate fields with tables
This commit is contained in:
@@ -284,7 +284,7 @@ local {type.Name} = {EMPTY_TABLE}";
|
|||||||
lsb.Append(name);
|
lsb.Append(name);
|
||||||
lsb.Append($", Field of type {returnName}\n");
|
lsb.Append($", Field of type {returnName}\n");
|
||||||
lsb.Append($"-- @realm shared\n");
|
lsb.Append($"-- @realm shared\n");
|
||||||
lsb.Append($"-- @{returnName} {name}\n");
|
lsb.Append($"-- @field {name}\n");
|
||||||
|
|
||||||
lsb.Append("\n");
|
lsb.Append("\n");
|
||||||
sb.Append(lsb);
|
sb.Append(lsb);
|
||||||
@@ -312,7 +312,7 @@ local {type.Name} = {EMPTY_TABLE}";
|
|||||||
lsb.Append(name);
|
lsb.Append(name);
|
||||||
lsb.Append($", Field of type {returnName}\n");
|
lsb.Append($", Field of type {returnName}\n");
|
||||||
lsb.Append($"-- @realm shared\n");
|
lsb.Append($"-- @realm shared\n");
|
||||||
lsb.Append($"-- @{returnName} {name}\n");
|
lsb.Append($"-- @field {name}\n");
|
||||||
|
|
||||||
lsb.Append("\n");
|
lsb.Append("\n");
|
||||||
sb.Append(lsb);
|
sb.Append(lsb);
|
||||||
|
|||||||
@@ -41,4 +41,4 @@ function TeleportTo(worldPos) end
|
|||||||
---
|
---
|
||||||
-- Character.CharacterList, Table containing all characters.
|
-- Character.CharacterList, Table containing all characters.
|
||||||
-- @realm shared
|
-- @realm shared
|
||||||
-- @table Character.CharacterList
|
-- @field Character.CharacterList
|
||||||
|
|||||||
@@ -6,37 +6,7 @@
|
|||||||
|
|
||||||
<p>{* ldoc.markup(mod.description) *}</p>
|
<p>{* ldoc.markup(mod.description) *}</p>
|
||||||
|
|
||||||
{%
|
{% for kind, items, _, summary in mod.kinds() do %}
|
||||||
local kinds = {}
|
|
||||||
local kindsIpairs = {}
|
|
||||||
for kind, items, _, summary in mod.kinds() do
|
|
||||||
local name = kind
|
|
||||||
if kind == "Tables" then
|
|
||||||
name = "Fields"
|
|
||||||
end
|
|
||||||
|
|
||||||
for item in items() do
|
|
||||||
if kinds[name] == nil then
|
|
||||||
kinds[name] = {}
|
|
||||||
|
|
||||||
local value = {}
|
|
||||||
value.kind = name
|
|
||||||
value.summary = summary
|
|
||||||
value.items = kinds[name]
|
|
||||||
table.insert(kindsIpairs, value)
|
|
||||||
end
|
|
||||||
kinds[name][item] = true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
%}
|
|
||||||
|
|
||||||
{% for i, value in ipairs(kindsIpairs) do
|
|
||||||
local kind = value.kind
|
|
||||||
local summary = value.summary
|
|
||||||
local items = value.items
|
|
||||||
%}
|
|
||||||
<header class="section">
|
<header class="section">
|
||||||
<h1>{{kind}}</h1>
|
<h1>{{kind}}</h1>
|
||||||
{% if summary ~= nil then %}
|
{% if summary ~= nil then %}
|
||||||
@@ -45,7 +15,7 @@
|
|||||||
{% end %}
|
{% end %}
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
{% for item, _ in pairs(items) do %}
|
{% for item in items() do %}
|
||||||
<section class="method" id="{{item.name}}">
|
<section class="method" id="{{item.name}}">
|
||||||
<header>
|
<header>
|
||||||
{* ldoc.item_header(item) *}
|
{* ldoc.item_header(item) *}
|
||||||
|
|||||||
@@ -74,14 +74,28 @@ end
|
|||||||
{% end %}
|
{% end %}
|
||||||
{% end %}
|
{% end %}
|
||||||
|
|
||||||
{% if not isSectionEmpty(currentMod, {"field", "table"}) then %}
|
{% if not isSectionEmpty(currentMod, "table") then %}
|
||||||
|
<li>
|
||||||
|
<label class="colorful-label">TABLES</label>
|
||||||
|
</li>
|
||||||
|
{% end %}
|
||||||
|
|
||||||
|
{% for k, v in pairs(currentMod.items) do %}
|
||||||
|
{% if (v.section_id == "table") then %}
|
||||||
|
<li>
|
||||||
|
{* ldoc.sidebar_item(v, currentMod) *}
|
||||||
|
</li>
|
||||||
|
{% end %}
|
||||||
|
{% end %}
|
||||||
|
|
||||||
|
{% if not isSectionEmpty(currentMod, "field") then %}
|
||||||
<li>
|
<li>
|
||||||
<label class="colorful-label">FIELDS</label>
|
<label class="colorful-label">FIELDS</label>
|
||||||
</li>
|
</li>
|
||||||
{% end %}
|
{% end %}
|
||||||
|
|
||||||
{% for k, v in pairs(currentMod.items) do %}
|
{% for k, v in pairs(currentMod.items) do %}
|
||||||
{% if (v.section_id == "field" or v.section_id == "table") then %}
|
{% if (v.section_id == "field") then %}
|
||||||
<li>
|
<li>
|
||||||
{* ldoc.sidebar_item(v, currentMod) *}
|
{* ldoc.sidebar_item(v, currentMod) *}
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
Reference in New Issue
Block a user