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) {
|
||||
REFLECT(short_name);
|
||||
REFLECT(full_name);
|
||||
REFLECT(folder_name);
|
||||
REFLECT_N("icon", icon_filename);
|
||||
REFLECT_NO_SCRIPT(position_hint);
|
||||
REFLECT(installer_group);
|
||||
@@ -648,10 +649,11 @@ void Packaged::saveCopy(const String& package) {
|
||||
}
|
||||
|
||||
void Packaged::validate(Version) {
|
||||
folder_name = name();
|
||||
// a default for the short name
|
||||
if (short_name.empty()) {
|
||||
if (!full_name.empty()) short_name = full_name;
|
||||
short_name = name();
|
||||
else short_name = folder_name;
|
||||
}
|
||||
// check dependencies
|
||||
FOR_EACH(dep, dependencies) {
|
||||
|
||||
@@ -271,6 +271,7 @@ public:
|
||||
String installer_group; ///< Group to place this package in in the installer
|
||||
String short_name; ///< Short name of this package
|
||||
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
|
||||
vector<PackageDependencyP> dependencies; ///< Dependencies of this package
|
||||
int position_hint; ///< A hint for the package list
|
||||
|
||||
Reference in New Issue
Block a user