mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Update metadata exporting.
This commit is contained in:
parent
b7e4362553
commit
a079afbb73
3 changed files with 56 additions and 4 deletions
|
@ -174,6 +174,28 @@
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
"help": "A description of your domain (256 character limit)."
|
"help": "A description of your domain (256 character limit)."
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "thumbnail",
|
||||||
|
"label": "World Thumbnail",
|
||||||
|
"advanced": true,
|
||||||
|
"help": "A link to the thumbnail that is publicly accessible from the internet."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "images",
|
||||||
|
"label": "World Images",
|
||||||
|
"advanced": true,
|
||||||
|
"type": "table",
|
||||||
|
"can_add_new_rows": true,
|
||||||
|
"help": "URLs to images that visually describe your world to potential visitors.",
|
||||||
|
"numbered": false,
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "image",
|
||||||
|
"label": "Image URL",
|
||||||
|
"can_set": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "maturity",
|
"name": "maturity",
|
||||||
"label": "Maturity",
|
"label": "Maturity",
|
||||||
|
@ -204,9 +226,15 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "contact_info",
|
||||||
|
"label": "World Administrative Contact",
|
||||||
|
"advanced": true,
|
||||||
|
"help": "Contact information to reach server administrators for assistance (256 character limit)."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "managers",
|
"name": "managers",
|
||||||
"label": "Server Managers / Administrators",
|
"label": "World Managers / Administrators",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
"type": "table",
|
"type": "table",
|
||||||
"can_add_new_rows": true,
|
"can_add_new_rows": true,
|
||||||
|
|
|
@ -36,18 +36,25 @@ const QString DomainMetadata::Users::HOSTNAMES = "user_hostnames";
|
||||||
const QString DomainMetadata::DESCRIPTORS = "descriptors";
|
const QString DomainMetadata::DESCRIPTORS = "descriptors";
|
||||||
const QString DomainMetadata::Descriptors::NAME = "world_name";
|
const QString DomainMetadata::Descriptors::NAME = "world_name";
|
||||||
const QString DomainMetadata::Descriptors::DESCRIPTION = "description";
|
const QString DomainMetadata::Descriptors::DESCRIPTION = "description";
|
||||||
|
const QString DomainMetadata::Descriptors::THUMBNAIL = "thumbnail";
|
||||||
|
const QString DomainMetadata::Descriptors::IMAGES = "images";
|
||||||
const QString DomainMetadata::Descriptors::CAPACITY = "capacity"; // parsed from security
|
const QString DomainMetadata::Descriptors::CAPACITY = "capacity"; // parsed from security
|
||||||
const QString DomainMetadata::Descriptors::RESTRICTION = "restriction"; // parsed from ACL
|
const QString DomainMetadata::Descriptors::RESTRICTION = "restriction"; // parsed from ACL
|
||||||
const QString DomainMetadata::Descriptors::MATURITY = "maturity";
|
const QString DomainMetadata::Descriptors::MATURITY = "maturity";
|
||||||
|
const QString DomainMetadata::Descriptors::CONTACT = "contact_info";
|
||||||
const QString DomainMetadata::Descriptors::MANAGERS = "managers";
|
const QString DomainMetadata::Descriptors::MANAGERS = "managers";
|
||||||
const QString DomainMetadata::Descriptors::TAGS = "tags";
|
const QString DomainMetadata::Descriptors::TAGS = "tags";
|
||||||
|
|
||||||
// descriptors metadata will appear as (JSON):
|
// descriptors metadata will appear as (JSON):
|
||||||
// {
|
// {
|
||||||
// "name": String, // capped name
|
// "world_name": String, // capped name
|
||||||
// "description": String, // capped description
|
// "description": String, // capped description
|
||||||
|
// "thumbnail": String, // capped thumbnail URL
|
||||||
|
// "images": [ String ], // capped list of image URLs
|
||||||
// "capacity": Number,
|
// "capacity": Number,
|
||||||
// "restriction": String, // enum of either open, hifi, or acl
|
// "restriction": String, // enum of either open, hifi, or acl
|
||||||
// "maturity": String, // enum corresponding to ESRB ratings
|
// "maturity": String, // enum corresponding to ESRB ratings
|
||||||
|
// "contact_info": [ String ], // capped list of usernames
|
||||||
// "managers": [ String ], // capped list of usernames
|
// "managers": [ String ], // capped list of usernames
|
||||||
// "tags": [ String ], // capped list of tags
|
// "tags": [ String ], // capped list of tags
|
||||||
// }
|
// }
|
||||||
|
@ -85,7 +92,7 @@ void DomainMetadata::descriptorsChanged() {
|
||||||
static const QString DESCRIPTORS_GROUP_KEYPATH = "descriptors";
|
static const QString DESCRIPTORS_GROUP_KEYPATH = "descriptors";
|
||||||
auto descriptorsMap = static_cast<DomainServer*>(parent())->_settingsManager.valueForKeyPath(DESCRIPTORS).toMap();
|
auto descriptorsMap = static_cast<DomainServer*>(parent())->_settingsManager.valueForKeyPath(DESCRIPTORS).toMap();
|
||||||
|
|
||||||
// copy simple descriptors (name/description/maturity)
|
// copy simple descriptors
|
||||||
if (!descriptorsMap[Descriptors::NAME].isNull()) {
|
if (!descriptorsMap[Descriptors::NAME].isNull()) {
|
||||||
state[Descriptors::NAME] = descriptorsMap[Descriptors::NAME];
|
state[Descriptors::NAME] = descriptorsMap[Descriptors::NAME];
|
||||||
} else {
|
} else {
|
||||||
|
@ -98,13 +105,27 @@ void DomainMetadata::descriptorsChanged() {
|
||||||
state[Descriptors::DESCRIPTION] = "";
|
state[Descriptors::DESCRIPTION] = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!descriptorsMap[Descriptors::THUMBNAIL].isNull()) {
|
||||||
|
state[Descriptors::THUMBNAIL] = descriptorsMap[Descriptors::THUMBNAIL];
|
||||||
|
} else {
|
||||||
|
state[Descriptors::THUMBNAIL] = "";
|
||||||
|
}
|
||||||
|
|
||||||
if (!descriptorsMap[Descriptors::MATURITY].isNull()) {
|
if (!descriptorsMap[Descriptors::MATURITY].isNull()) {
|
||||||
state[Descriptors::MATURITY] = descriptorsMap[Descriptors::MATURITY];
|
state[Descriptors::MATURITY] = descriptorsMap[Descriptors::MATURITY];
|
||||||
} else {
|
} else {
|
||||||
state[Descriptors::MATURITY] = "";
|
state[Descriptors::MATURITY] = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!descriptorsMap[Descriptors::CONTACT].isNull()) {
|
||||||
|
state[Descriptors::CONTACT] = descriptorsMap[Descriptors::CONTACT];
|
||||||
|
} else {
|
||||||
|
state[Descriptors::CONTACT] = "";
|
||||||
|
}
|
||||||
|
|
||||||
// copy array descriptors (managers/tags)
|
// copy array descriptors
|
||||||
|
state[Descriptors::THUMBNAIL] = descriptorsMap[Descriptors::THUMBNAIL].toList();
|
||||||
|
state[Descriptors::IMAGES] = descriptorsMap[Descriptors::IMAGES].toList();
|
||||||
state[Descriptors::MANAGERS] = descriptorsMap[Descriptors::MANAGERS].toList();
|
state[Descriptors::MANAGERS] = descriptorsMap[Descriptors::MANAGERS].toList();
|
||||||
state[Descriptors::TAGS] = descriptorsMap[Descriptors::TAGS].toList();
|
state[Descriptors::TAGS] = descriptorsMap[Descriptors::TAGS].toList();
|
||||||
|
|
||||||
|
|
|
@ -36,9 +36,12 @@ public:
|
||||||
public:
|
public:
|
||||||
static const QString NAME;
|
static const QString NAME;
|
||||||
static const QString DESCRIPTION;
|
static const QString DESCRIPTION;
|
||||||
|
static const QString THUMBNAIL;
|
||||||
|
static const QString IMAGES;
|
||||||
static const QString CAPACITY;
|
static const QString CAPACITY;
|
||||||
static const QString RESTRICTION;
|
static const QString RESTRICTION;
|
||||||
static const QString MATURITY;
|
static const QString MATURITY;
|
||||||
|
static const QString CONTACT;
|
||||||
static const QString MANAGERS;
|
static const QString MANAGERS;
|
||||||
static const QString TAGS;
|
static const QString TAGS;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue