mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
expose folder_name package property
This commit is contained in:
@@ -567,6 +567,7 @@ template <> void Writer::handle(const PackageDependency& dep) {
|
|||||||
IMPLEMENT_REFLECTION(Packaged) {
|
IMPLEMENT_REFLECTION(Packaged) {
|
||||||
REFLECT(short_name);
|
REFLECT(short_name);
|
||||||
REFLECT(full_name);
|
REFLECT(full_name);
|
||||||
|
REFLECT(folder_name);
|
||||||
REFLECT_N("icon", icon_filename);
|
REFLECT_N("icon", icon_filename);
|
||||||
REFLECT_NO_SCRIPT(position_hint);
|
REFLECT_NO_SCRIPT(position_hint);
|
||||||
REFLECT(installer_group);
|
REFLECT(installer_group);
|
||||||
@@ -648,11 +649,12 @@ void Packaged::saveCopy(const String& package) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Packaged::validate(Version) {
|
void Packaged::validate(Version) {
|
||||||
|
folder_name = name();
|
||||||
// a default for the short name
|
// a default for the short name
|
||||||
if (short_name.empty()) {
|
if (short_name.empty()) {
|
||||||
if (!full_name.empty()) short_name = full_name;
|
if (!full_name.empty()) short_name = full_name;
|
||||||
short_name = name();
|
else short_name = folder_name;
|
||||||
}
|
}
|
||||||
// check dependencies
|
// check dependencies
|
||||||
FOR_EACH(dep, dependencies) {
|
FOR_EACH(dep, dependencies) {
|
||||||
package_manager.checkDependency(*dep, true);
|
package_manager.checkDependency(*dep, true);
|
||||||
|
|||||||
@@ -271,6 +271,7 @@ public:
|
|||||||
String installer_group; ///< Group to place this package in in the installer
|
String installer_group; ///< Group to place this package in in the installer
|
||||||
String short_name; ///< Short name of this package
|
String short_name; ///< Short name of this package
|
||||||
String full_name; ///< Name of this package, for menus etc.
|
String full_name; ///< Name of this package, for menus etc.
|
||||||
|
String folder_name; ///< Name of the folder this package is loaded from.
|
||||||
String icon_filename; ///< Filename of icon to use in package lists
|
String icon_filename; ///< Filename of icon to use in package lists
|
||||||
vector<PackageDependencyP> dependencies; ///< Dependencies of this package
|
vector<PackageDependencyP> dependencies; ///< Dependencies of this package
|
||||||
int position_hint; ///< A hint for the package list
|
int position_hint; ///< A hint for the package list
|
||||||
|
|||||||
Reference in New Issue
Block a user