|
|
@ -273,11 +273,13 @@ local function update_db(old_db, entry_name, text_entry, help_source, kwargs)
|
|
|
|
-- already in db (e.g. from a higher-priority script dir); skip
|
|
|
|
-- already in db (e.g. from a higher-priority script dir); skip
|
|
|
|
return
|
|
|
|
return
|
|
|
|
end
|
|
|
|
end
|
|
|
|
entrydb[entry_name] = {
|
|
|
|
if not kwargs.text_entry_only then
|
|
|
|
entry_types=kwargs.entry_types,
|
|
|
|
entrydb[entry_name] = {
|
|
|
|
short_help=kwargs.short_help,
|
|
|
|
entry_types=kwargs.entry_types,
|
|
|
|
text_entry=text_entry
|
|
|
|
short_help=kwargs.short_help,
|
|
|
|
}
|
|
|
|
text_entry=text_entry
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
end
|
|
|
|
if entry_name ~= text_entry then
|
|
|
|
if entry_name ~= text_entry then
|
|
|
|
return
|
|
|
|
return
|
|
|
|
end
|
|
|
|
end
|
|
|
@ -329,13 +331,16 @@ local function scan_plugins(old_db)
|
|
|
|
kwargs)
|
|
|
|
kwargs)
|
|
|
|
has_commands = true
|
|
|
|
has_commands = true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
if not includes_plugin and (has_commands or
|
|
|
|
if includes_plugin then goto continue end
|
|
|
|
dfhack.internal.isPluginEnableable(plugin)) then
|
|
|
|
local is_enableable = dfhack.internal.isPluginEnableable(plugin)
|
|
|
|
|
|
|
|
if has_commands or is_enableable then
|
|
|
|
update_db(old_db, plugin, plugin,
|
|
|
|
update_db(old_db, plugin, plugin,
|
|
|
|
has_rendered_help(plugin) and
|
|
|
|
has_rendered_help(plugin) and
|
|
|
|
HELP_SOURCES.RENDERED or HELP_SOURCES.STUB,
|
|
|
|
HELP_SOURCES.RENDERED or HELP_SOURCES.STUB,
|
|
|
|
{entry_types={[ENTRY_TYPES.PLUGIN]=true}})
|
|
|
|
{entry_types={[ENTRY_TYPES.PLUGIN]=true},
|
|
|
|
|
|
|
|
text_entry_only=not is_enableable})
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
::continue::
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|