Compare commits

...

5 Commits

Author SHA1 Message Date
x2048 464043b8ab Convert entity glow value to color space before adding to the light 2022-09-04 16:00:13 +02:00
Niklp 2854c19792
Fix incorrectly placed label in tab_online (#12732) 2022-09-02 01:05:40 +01:00
savilli 75d88dcae2
Fix and enable x86 build for Android (#12700) 2022-08-25 22:48:49 +01:00
fluxionary 0ab9bf926d
Fix texture_min_size 2022-08-24 22:38:14 +02:00
rubenwardy 2d10fa7867
Prevent loading a world with unresolved dependencies (#12542) 2022-08-19 12:31:36 +01:00
12 changed files with 50 additions and 22 deletions

View File

@ -40,3 +40,13 @@ jobs:
with:
name: Minetest-arm64-v8a.apk
path: android/app/build/outputs/apk/release/app-arm64-v8a-release-unsigned.apk
- name: Save x86 artifact
uses: actions/upload-artifact@v3
with:
name: Minetest-x86.apk
path: android/app/build/outputs/apk/release/app-x86-release-unsigned.apk
- name: Save x86_64 artifact
uses: actions/upload-artifact@v3
with:
name: Minetest-x86_64.apk
path: android/app/build/outputs/apk/release/app-x86_64-release-unsigned.apk

View File

@ -40,7 +40,7 @@ android {
abi {
enable true
reset()
include 'armeabi-v7a', 'arm64-v8a'
include 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
}

View File

@ -31,7 +31,7 @@ android {
abi {
enable true
reset()
include 'armeabi-v7a', 'arm64-v8a'//, 'x86'
include 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
}

View File

@ -43,6 +43,16 @@ LOCAL_MODULE := Irrlicht
LOCAL_SRC_FILES := deps/$(APP_ABI)/Irrlicht/libIrrlichtMt.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := Irrlicht-libpng
LOCAL_SRC_FILES := deps/$(APP_ABI)/Irrlicht/libpng.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := Irrlicht-libjpeg
LOCAL_SRC_FILES := deps/$(APP_ABI)/Irrlicht/libjpeg.a
include $(PREBUILT_STATIC_LIBRARY)
ifndef USE_BUILTIN_LUA
include $(CLEAR_VARS)
@ -270,7 +280,7 @@ LOCAL_STATIC_LIBRARIES += \
Curl libmbedcrypto libmbedtls libmbedx509 \
Freetype \
Iconv libcharset \
Irrlicht \
Irrlicht Irrlicht-libpng Irrlicht-libjpeg \
OpenAL \
Gettext \
SQLite3 \
@ -281,7 +291,7 @@ ifndef USE_BUILTIN_LUA
endif
LOCAL_STATIC_LIBRARIES += android_native_app_glue $(PROFILER_LIBS)
LOCAL_LDLIBS := -lEGL -lGLESv1_CM -lGLESv2 -landroid -lOpenSLES
LOCAL_LDLIBS := -lEGL -lGLESv1_CM -lGLESv2 -landroid -lOpenSLES -lz
include $(BUILD_SHARED_LIBRARY)

View File

@ -94,7 +94,7 @@ local function get_formspec(tabview, name, tabdata)
-- Name / Password
"container[0,4.8]" ..
"label[0.25,0;" .. fgettext("Name") .. "]" ..
"label[3,0;" .. fgettext("Password") .. "]" ..
"label[2.875,0;" .. fgettext("Password") .. "]" ..
"field[0.25,0.2;2.625,0.75;te_name;;" .. core.formspec_escape(core.settings:get("name")) .. "]" ..
"pwdfield[2.875,0.2;2.625,0.75;te_pwd;]" ..
"container_end[]" ..

View File

@ -213,9 +213,10 @@ void Client::loadMods()
}
m_mods = modconf.getMods();
// complain about mods with unsatisfied dependencies
if (!modconf.isConsistent()) {
modconf.printUnsatisfiedModsError();
errorstream << modconf.getUnsatisfiedModsError() << std::endl;
return;
}

View File

@ -881,7 +881,7 @@ void GenericCAO::updateLight(u32 day_night_ratio)
if (!pos_ok)
light_at_pos = LIGHT_SUN;
video::SColor light = encode_light(light_at_pos, m_prop.glow);
video::SColor light = encode_light(light_at_pos, decode_light(m_prop.glow));
if (!m_enable_shaders)
final_color_blend(&light, light_at_pos, day_night_ratio);

View File

@ -21,16 +21,27 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "log.h"
#include "settings.h"
#include "filesys.h"
#include "gettext.h"
void ModConfiguration::printUnsatisfiedModsError() const
std::string ModConfiguration::getUnsatisfiedModsError() const
{
std::ostringstream error;
error << gettext("Some mods have unsatisfied dependencies:") << std::endl;
for (const ModSpec &mod : m_unsatisfied_mods) {
errorstream << "mod \"" << mod.name
<< "\" has unsatisfied dependencies: ";
//~ Error when a mod is missing dependencies. Ex: "Mod Title is missing: mod1, mod2, mod3"
error << " - " << fmtgettext("%s is missing:", mod.name.c_str());
for (const std::string &unsatisfied_depend : mod.unsatisfied_depends)
errorstream << " \"" << unsatisfied_depend << "\"";
errorstream << std::endl;
error << " " << unsatisfied_depend;
error << "\n";
}
error << "\n"
<< gettext("Install and enable the required mods, or disable the mods causing errors.") << "\n"
<< gettext("Note: this may be caused by a dependency cycle, in which case try updating the mods.");
return error.str();
}
void ModConfiguration::addModsInPath(const std::string &path, const std::string &virtual_path)

View File

@ -51,7 +51,7 @@ public:
*/
const std::vector<ModSpec> &getMods() const { return m_sorted_mods; }
void printUnsatisfiedModsError() const;
std::string getUnsatisfiedModsError() const;
/**
* Adds all mods in the given path. used for games, modpacks

View File

@ -279,7 +279,7 @@ void TextureSettings::readSettings()
bool smooth_lighting = g_settings->getBool("smooth_lighting");
enable_mesh_cache = g_settings->getBool("enable_mesh_cache");
enable_minimap = g_settings->getBool("enable_minimap");
node_texture_size = std::min<u16>(g_settings->getU16("texture_min_size"), 1);
node_texture_size = std::max<u16>(g_settings->getU16("texture_min_size"), 1);
std::string leaves_style_str = g_settings->get("leaves_style");
std::string world_aligned_mode_str = g_settings->get("world_aligned_mode");
std::string autoscale_mode_str = g_settings->get("autoscale_mode");

View File

@ -425,14 +425,10 @@ void Server::init()
m_modmgr = std::make_unique<ServerModManager>(m_path_world);
std::vector<ModSpec> unsatisfied_mods = m_modmgr->getUnsatisfiedMods();
// complain about mods with unsatisfied dependencies
if (!m_modmgr->isConsistent()) {
m_modmgr->printUnsatisfiedModsError();
warningstream
<< "You have unsatisfied dependencies, loading your world anyway. "
<< "This will become a fatal error in the future." << std::endl;
std::string error = m_modmgr->getUnsatisfiedModsError();
throw ServerError(error);
}
//lock environment

View File

@ -57,8 +57,8 @@ public:
return configuration.isConsistent();
}
inline void printUnsatisfiedModsError() const {
return configuration.printUnsatisfiedModsError();
inline std::string getUnsatisfiedModsError() const {
return configuration.getUnsatisfiedModsError();
}
/**