Don't use setting to enable "mobs" type...
Always enabled if "mobs" mod is found.master
parent
bc1d7ac7e7
commit
991a068965
3
api.lua
3
api.lua
|
@ -34,7 +34,7 @@ local known_types = {
|
|||
'tools',
|
||||
}
|
||||
|
||||
if listitems.enable_mobs then
|
||||
if core.global_exists('mobs') then
|
||||
table.insert(known_types, 'mobs')
|
||||
end
|
||||
|
||||
|
@ -131,6 +131,7 @@ end
|
|||
--- Compares a string from a list of substrings.
|
||||
--
|
||||
-- @function compareSubstringList
|
||||
-- @local
|
||||
-- @tparam table ss_list
|
||||
-- @tparam string s_value
|
||||
-- @treturn boolean
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/AntumDeluge/LDoc">LDoc 1.4.6-antum-2</a></i>
|
||||
<i style="float:right;">Last updated 2021-04-14 13:47:04 </i>
|
||||
<i style="float:right;">Last updated 2021-04-14 16:11:37 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
|
|
@ -64,10 +64,6 @@
|
|||
</table>
|
||||
<h2><a href="#Functions">Functions</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#compareSubstringList">compareSubstringList (<i>ss_list</i>, <i>s_value</i>)</a></td>
|
||||
<td class="summary">Compares a string from a list of substrings.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#listitems.list">listitems.list (<i>player</i>, <i>l_type</i>, <i>switches</i>, <i>params</i>, <i>nocase</i>)</a></td>
|
||||
<td class="summary"><em>listitems</em> base function.</td>
|
||||
|
@ -113,50 +109,6 @@
|
|||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "compareSubstringList"></a>
|
||||
<strong>compareSubstringList (<i>ss_list</i>, <i>s_value</i>)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Compares a string from a list of substrings.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">ss_list</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
<li><span class="parameter">s_value</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
|
||||
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "listitems.list"></a>
|
||||
<strong>listitems.list (<i>player</i>, <i>l_type</i>, <i>switches</i>, <i>params</i>, <i>nocase</i>)</strong>
|
||||
|
@ -218,7 +170,7 @@
|
|||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/AntumDeluge/LDoc">LDoc 1.4.6-antum-2</a></i>
|
||||
<i style="float:right;">Last updated 2021-04-14 13:47:04 </i>
|
||||
<i style="float:right;">Last updated 2021-04-14 16:11:37 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
|
|
@ -60,10 +60,6 @@
|
|||
<td class="name" nowrap><a href="#listitems.bullet_list">listitems.bullet_list</a></td>
|
||||
<td class="summary">Displays items in a bulleted list.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#listitems.enable_mobs">listitems.enable_mobs</a></td>
|
||||
<td class="summary">Enables/Disables "list mobs" chat command.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
|
@ -78,36 +74,9 @@
|
|||
<strong>listitems.bullet_list</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Displays items in a bulleted list.
|
||||
Displays items in a bulleted list. </p>
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
<h3>Type:</h3>
|
||||
<ul>
|
||||
<i>boolean</i>
|
||||
</ul>
|
||||
<h3>Default:</h3>
|
||||
<ul>
|
||||
<i>true</i>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "listitems.enable_mobs"></a>
|
||||
<strong>listitems.enable_mobs</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Enables/Disables "list mobs" chat command. </p>
|
||||
|
||||
<p> Requires "mobs".
|
||||
<p> FIXME: should be client side only
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
|
@ -136,7 +105,7 @@
|
|||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/AntumDeluge/LDoc">LDoc 1.4.6-antum-2</a></i>
|
||||
<i style="float:right;">Last updated 2021-04-14 13:47:04 </i>
|
||||
<i style="float:right;">Last updated 2021-04-14 16:11:37 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
|
15
settings.lua
15
settings.lua
|
@ -25,18 +25,3 @@ listitems.debug = core.settings:get_bool('enable_debug_mods') or false
|
|||
listitems.bullet_list = core.settings:get_bool('listitems.bullet_list')
|
||||
-- Default enabled
|
||||
listitems.bullet_list = listitems.bullet_list == nil or listitems.bullet_list == true
|
||||
|
||||
|
||||
--- Enables/Disables "list mobs" chat command.
|
||||
--
|
||||
-- Requires "mobs".
|
||||
--
|
||||
-- @setting listitems.enable_mobs
|
||||
-- @settype boolean
|
||||
-- @default true
|
||||
listitems.enable_mobs = false
|
||||
if core.global_exists('mobs') then
|
||||
listitems.enable_mobs = core.settings:get_bool('listitems.enable_mobs')
|
||||
-- Default: enabled
|
||||
listitems.enable_mobs = listitems.enable_mobs == nil or listitems.enable_mobs == true
|
||||
end
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
|
||||
# Displays items in a bulleted list.
|
||||
listitems.bullet_list (Bulleted list) bool true
|
||||
|
||||
# Enables/Disables "list mobs" chat command (requires "mobs").
|
||||
listitems.enable_mobs (Enable "list mobs" command) bool true
|
||||
|
|
Loading…
Reference in New Issue