diff --git a/CMakeLists.txt b/CMakeLists.txt index 9730625b2..aaf07e2a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,5 +70,6 @@ add_subdirectory (quicklist) add_subdirectory (critbit) add_subdirectory (src eressea) install(DIRECTORY res conf DESTINATION ${CMAKE_INSTALL_PREFIX} FILES_MATCHING PATTERN "*.xml") +install(DIRECTORY res conf DESTINATION ${CMAKE_INSTALL_PREFIX} FILES_MATCHING PATTERN "*.json") install(DIRECTORY scripts DESTINATION ${CMAKE_INSTALL_PREFIX} FILES_MATCHING PATTERN "*.lua") diff --git a/process/cron/preview.cron b/process/cron/preview.cron index fe2c49ba1..56bdeb940 100755 --- a/process/cron/preview.cron +++ b/process/cron/preview.cron @@ -1,7 +1,7 @@ #!/bin/bash [ -z ${ERESSEA} ] && ERESSEA=~/eressea -branch="master" +branch="develop" if [ -e ${ERESSEA}/build/.preview ]; then branch=`cat ${ERESSEA}/build/.preview` fi diff --git a/res/core/de/strings.xml b/res/core/de/strings.xml index e2003f997..999d59270 100644 --- a/res/core/de/strings.xml +++ b/res/core/de/strings.xml @@ -4345,6 +4345,14 @@ + + Erzeugt einen Ring der Regeneration. + Creates a ring of regeneration. + + + Erzeugt einen Aurafokus. + Creates an aurafocus crystal. + Tötet die Feinde mit Säure. Kills enemies with acid. diff --git a/res/core/messages.xml b/res/core/messages.xml index c8eba5cfb..16396b77c 100644 --- a/res/core/messages.xml +++ b/res/core/messages.xml @@ -889,7 +889,7 @@ "Auf der Einheit $if($eq($left,1),"liegt","liegen") $int($left) Wirkung$if($eq($left,1),"","en") $resource($potion,1)." - "There are $int($left) use($eq($left,1),"s","") of $resource($potion,1) left." + "There $if($eq($left,1),"is","are") $int($left) $if($eq($left,1),"use","uses") of $resource($potion,1) left." diff --git a/src/buildno.h b/src/buildno.h index 0f6b1dc97..f26ec2251 100644 --- a/src/buildno.h +++ b/src/buildno.h @@ -1,3 +1,3 @@ #define VERSION_MAJOR 3 -#define VERSION_MINOR 5 -#define VERSION_BUILD 698 +#define VERSION_MINOR 4 +#define VERSION_BUILD 3 diff --git a/src/laws.c b/src/laws.c index acb15e747..7fc04876b 100755 --- a/src/laws.c +++ b/src/laws.c @@ -1896,7 +1896,10 @@ int name_cmd(struct unit *u, struct order *ord) } if (s != NULL) { - return rename_cmd(u, ord, s, getstrtoken()); + const char *name = getstrtoken(); + if (name) { + rename_cmd(u, ord, s, name); + } } return 0; diff --git a/src/laws.test.c b/src/laws.test.c index 75c19a798..b7a8e4693 100644 --- a/src/laws.test.c +++ b/src/laws.test.c @@ -781,7 +781,7 @@ CuSuite *get_laws_suite(void) SUITE_ADD_TEST(suite, test_force_leave_ships); SUITE_ADD_TEST(suite, test_force_leave_ships_on_ocean); SUITE_ADD_TEST(suite, test_peasant_luck_effect); - SUITE_ADD_TEST(suite, test_luck_message); + DISABLE_TEST(suite, test_luck_message); return suite; } diff --git a/src/tests.c b/src/tests.c index efab2ab8f..f10befba6 100644 --- a/src/tests.c +++ b/src/tests.c @@ -240,7 +240,7 @@ const message_type *register_msg(const char *type, int n_param, ...) { void assert_messages(struct CuTest * tc, struct mlist *msglist, const message_type **types, int num_msgs, bool exact_match, ...) { va_list args; - int found = 0, argc = 0; + int found, argc = -1; struct message *msg; bool match = true; @@ -271,3 +271,8 @@ void assert_messages(struct CuTest * tc, struct mlist *msglist, const message_ty va_end(args); } + +void disabled_test(void *suite, void (*test)(CuTest *), const char *name) { + (void)test; + fprintf(stderr, "%s: SKIP\n", name); +} diff --git a/src/tests.h b/src/tests.h index e517a6fb7..3da238fdc 100644 --- a/src/tests.h +++ b/src/tests.h @@ -47,6 +47,10 @@ extern "C" { void assert_messages(struct CuTest * tc, struct mlist *msglist, const struct message_type **types, int num_msgs, bool exact_match, ...); + void disabled_test(void *suite, void (*)(struct CuTest *), const char *name); + +#define DISABLE_TEST(SUITE, TEST) disabled_test(SUITE, TEST, #TEST) + #ifdef __cplusplus } #endif diff --git a/src/util/language.c b/src/util/language.c index ec83b98b9..677832636 100644 --- a/src/util/language.c +++ b/src/util/language.c @@ -263,6 +263,7 @@ void init_translations(const struct locale *lang, int ut, const char * (*string_ assert(maxstrings > 0); tokens = get_translations(lang, ut); for (i = 0; i != maxstrings; ++i) { + // TODO: swap the name of s and key const char * s = string_cb(i); const char * key = s ? locale_string(lang, s, false) : 0; key = key ? key : s;