summaryrefslogtreecommitdiffstats
path: root/core/config/engine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/config/engine.cpp')
-rw-r--r--core/config/engine.cpp45
1 files changed, 45 insertions, 0 deletions
diff --git a/core/config/engine.cpp b/core/config/engine.cpp
index 3574430cf7..7b65319849 100644
--- a/core/config/engine.cpp
+++ b/core/config/engine.cpp
@@ -34,8 +34,10 @@
#include "core/config/project_settings.h"
#include "core/donors.gen.h"
#include "core/license.gen.h"
+#include "core/redot_authors.gen.h"
#include "core/variant/typed_array.h"
#include "core/version.h"
+#include "core/version_generated.gen.h"
void Engine::set_physics_ticks_per_second(int p_ips) {
ERR_FAIL_COND_MSG(p_ips <= 0, "Engine iterations per second must be greater than 0.");
@@ -137,6 +139,25 @@ Dictionary Engine::get_version_info() const {
return dict;
}
+Dictionary Engine::get_godot_compatible_version_info() const {
+ Dictionary dict;
+ dict["major"] = GODOT_VERSION_MAJOR;
+ dict["minor"] = GODOT_VERSION_MINOR;
+ dict["patch"] = GODOT_VERSION_PATCH;
+ dict["hex"] = GODOT_VERSION_HEX;
+ dict["status"] = GODOT_VERSION_STATUS;
+
+ String stringver = String(dict["major"]) + "." + String(dict["minor"]);
+ if ((int)dict["patch"] != 0) {
+ stringver += "." + String(dict["patch"]);
+ }
+ // stringver += "-" + String(dict["status"]) + " (" + String(dict["build"]) + ")"; TODO: add godot automated build identification?
+ stringver += "-" + String(dict["status"]);
+ dict["string"] = stringver;
+
+ return dict;
+}
+
static Array array_from_info(const char *const *info_list) {
Array arr;
for (int i = 0; info_list[i] != nullptr; i++) {
@@ -156,6 +177,17 @@ static Array array_from_info_count(const char *const *info_list, int info_count)
Dictionary Engine::get_author_info() const {
Dictionary dict;
+ dict["lead_developers"] = array_from_info(REDOT_AUTHORS_LEAD_DEVELOPERS);
+ dict["project_managers"] = array_from_info(REDOT_AUTHORS_PROJECT_MANAGERS);
+ dict["founders"] = array_from_info(REDOT_AUTHORS_FOUNDERS);
+ dict["developers"] = array_from_info(REDOT_AUTHORS_DEVELOPERS);
+
+ return dict;
+}
+
+Dictionary Engine::get_godot_author_info() const {
+ Dictionary dict;
+
dict["lead_developers"] = array_from_info(AUTHORS_LEAD_DEVELOPERS);
dict["project_managers"] = array_from_info(AUTHORS_PROJECT_MANAGERS);
dict["founders"] = array_from_info(AUTHORS_FOUNDERS);
@@ -188,6 +220,19 @@ TypedArray<Dictionary> Engine::get_copyright_info() const {
Dictionary Engine::get_donor_info() const {
Dictionary donors;
+ donors["patrons"] = Array();
+ donors["platinum_sponsors"] = Array();
+ donors["gold_sponsors"] = Array();
+ donors["silver_sponsors"] = Array();
+ donors["diamond_members"] = Array();
+ donors["titanium_members"] = Array();
+ donors["platinum_members"] = Array();
+ donors["gold_members"] = Array();
+ return donors;
+}
+
+Dictionary Engine::get_godot_donor_info() const {
+ Dictionary donors;
donors["patrons"] = array_from_info(DONORS_PATRONS);
donors["platinum_sponsors"] = array_from_info(DONORS_SPONSORS_PLATINUM);
donors["gold_sponsors"] = array_from_info(DONORS_SPONSORS_GOLD);