mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-12 11:55:44 -05:00
Custom Scripts -> Plugins
Some checks failed
Build Porymap / build-linux (, 5.14.2) (push) Has been cancelled
Build Porymap / build-linux (, 6.8.*) (push) Has been cancelled
Build Porymap / build-linux (minimal, 5.14.2) (push) Has been cancelled
Build Porymap / build-macos (macos-15-intel) (push) Has been cancelled
Build Porymap / build-macos (macos-latest) (push) Has been cancelled
Build Porymap / build-static-windows (push) Has been cancelled
Some checks failed
Build Porymap / build-linux (, 5.14.2) (push) Has been cancelled
Build Porymap / build-linux (, 6.8.*) (push) Has been cancelled
Build Porymap / build-linux (minimal, 5.14.2) (push) Has been cancelled
Build Porymap / build-macos (macos-15-intel) (push) Has been cancelled
Build Porymap / build-macos (macos-latest) (push) Has been cancelled
Build Porymap / build-static-windows (push) Has been cancelled
This commit is contained in:
27
include/api/pluginsettings.h
Normal file
27
include/api/pluginsettings.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
#ifndef PLUGINSETTINGS_H
|
||||
#define PLUGINSETTINGS_H
|
||||
|
||||
#include <QString>
|
||||
#include <QList>
|
||||
|
||||
// Holds the basic user-provided information about a plugin.
|
||||
struct PluginSettings {
|
||||
QString path;
|
||||
bool enabled = true;
|
||||
|
||||
// Plugins can either be specific to the project, or specific to the user.
|
||||
// This allows projects to send plugin scripts downstream to their users,
|
||||
// while still allowing them to use their own personal plugins.
|
||||
bool userOnly = true;
|
||||
|
||||
static QStringList filter(const QList<PluginSettings>& plugins) {
|
||||
QStringList paths;
|
||||
for (auto& plugin : plugins) {
|
||||
if (plugin.enabled) paths.append(plugin.path);
|
||||
}
|
||||
return paths;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // PLUGINSETTINGS_H
|
||||
Reference in New Issue
Block a user