From c8ffe8da7a389742770ce541da4a656e0216607a Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Tue, 7 Jul 2015 20:30:34 +0200 Subject: [PATCH 1/2] Bug 2115: fix cerrdor -> cerddor spelling errors. --- res/core/de/strings.xml | 6 +++--- res/e3a/spellbooks/common.xml | 2 +- res/e3a/spellbooks/gray.xml | 2 +- res/e3a/spells.xml | 2 +- res/eressea/spellbooks/cerddor.xml | 2 +- res/eressea/spellbooks/gray.xml | 2 +- res/eressea/spells.xml | 2 +- src/kernel/messages.c | 6 ------ src/kernel/pool.c | 3 --- src/kernel/spell.c | 1 + src/kernel/spellid.h | 2 +- src/spells.c | 2 +- src/spells/combatspells.c | 2 +- 13 files changed, 13 insertions(+), 21 deletions(-) diff --git a/res/core/de/strings.xml b/res/core/de/strings.xml index aa5b94309..cd5dac609 100644 --- a/res/core/de/strings.xml +++ b/res/core/de/strings.xml @@ -3922,7 +3922,7 @@ Gesang des Lebens analysieren Analyze Song of Life - + Bannlied Countersong @@ -4324,7 +4324,7 @@ Kraft der Natur force of nature - + Gesang der Götter Song of the Gods @@ -5126,7 +5126,7 @@ able to decipher all enchantments or spells, which aren't disguised beyond your capability. - + Dieser schrille Gesang hallt über das ganze Schlachtfeld. Die besonderen Dissonanzen in den Melodien machen es Magiern fast unmöglich, sich auf ihre diff --git a/res/e3a/spellbooks/common.xml b/res/e3a/spellbooks/common.xml index 85dd479c1..0735bc248 100644 --- a/res/e3a/spellbooks/common.xml +++ b/res/e3a/spellbooks/common.xml @@ -37,7 +37,7 @@ - + diff --git a/res/e3a/spellbooks/gray.xml b/res/e3a/spellbooks/gray.xml index 88b49c9bf..5967d6265 100644 --- a/res/e3a/spellbooks/gray.xml +++ b/res/e3a/spellbooks/gray.xml @@ -22,7 +22,7 @@ - + diff --git a/res/e3a/spells.xml b/res/e3a/spells.xml index 2ed5670e2..498777952 100644 --- a/res/e3a/spells.xml +++ b/res/e3a/spells.xml @@ -619,7 +619,7 @@ - + diff --git a/res/eressea/spellbooks/cerddor.xml b/res/eressea/spellbooks/cerddor.xml index 006b66e09..3a690b116 100644 --- a/res/eressea/spellbooks/cerddor.xml +++ b/res/eressea/spellbooks/cerddor.xml @@ -27,7 +27,7 @@ - + diff --git a/res/eressea/spellbooks/gray.xml b/res/eressea/spellbooks/gray.xml index 5e66d907d..21e1609a0 100644 --- a/res/eressea/spellbooks/gray.xml +++ b/res/eressea/spellbooks/gray.xml @@ -26,7 +26,7 @@ - + diff --git a/res/eressea/spells.xml b/res/eressea/spells.xml index bc07107a2..345541298 100644 --- a/res/eressea/spells.xml +++ b/res/eressea/spells.xml @@ -402,7 +402,7 @@ - + diff --git a/src/kernel/messages.c b/src/kernel/messages.c index af0e4170b..552676e08 100644 --- a/src/kernel/messages.c +++ b/src/kernel/messages.c @@ -207,12 +207,6 @@ caddmessage(region * r, faction * f, const char *s, msg_t mtype, int level) { message *m = NULL; -#define LOG_ENGLISH -#ifdef LOG_ENGLISH - if (f && f->locale != default_locale) { - log_warning("message for locale \"%s\": %s\n", locale_name(f->locale), s); - } -#endif unused_arg(level); switch (mtype) { case MSG_INCOME: diff --git a/src/kernel/pool.c b/src/kernel/pool.c index 12e314fd3..ab1800556 100644 --- a/src/kernel/pool.c +++ b/src/kernel/pool.c @@ -78,9 +78,6 @@ int change_resource(unit * u, const resource_type * rtype, int change) assert(!"undefined resource detected. rtype->uchange not initialized."); assert(i == get_resource(u, rtype)); assert(i >= 0); - if (i >= 100000000) { - log_warning("%s has %d %s\n", unitname(u), i, rtype->_name); - } return i; } diff --git a/src/kernel/spell.c b/src/kernel/spell.c index 8a23afd4a..b9a8b5895 100644 --- a/src/kernel/spell.c +++ b/src/kernel/spell.c @@ -78,6 +78,7 @@ static const char *sp_aliases[][2] = { { "illaunfamiliar", "summon_familiar" }, { "draigfamiliar", "summon_familiar" }, { "commonfamiliar", "summon_familiar" }, + { "cerrdorfumbleshield", "cerddorfumbleshield" }, { NULL, NULL }, }; diff --git a/src/kernel/spellid.h b/src/kernel/spellid.h index ce324874b..387c592db 100644 --- a/src/kernel/spellid.h +++ b/src/kernel/spellid.h @@ -136,7 +136,7 @@ enum { SPL_GWYRRD_ARMORSHIELD, SPL_DRAIG_FUMBLESHIELD, SPL_GWYRRD_FUMBLESHIELD, - SPL_CERRDOR_FUMBLESHIELD, + SPL_CERDDOR_FUMBLESHIELD, SPL_TYBIED_FUMBLESHIELD, SPL_SHADOWKNIGHTS = 147, SPL_ITEMCLOAK = 150, diff --git a/src/spells.c b/src/spells.c index b7e1e6868..cb505e980 100644 --- a/src/spells.c +++ b/src/spells.c @@ -6589,7 +6589,7 @@ static spelldata spell_functions[] = { { "heroic_song", sp_hero, 0 }, { "transfer_aura_song", sp_transferaura, 0 }, { "analysesong_unit", sp_analysesong_unit, 0 }, - { "cerrdorfumbleshield", sp_fumbleshield, 0 }, + { "cerddorfumbleshield", sp_fumbleshield, 0 }, { "calm_monster", sp_calm_monster, 0 }, { "seduction", sp_seduce, 0 }, { "headache", sp_headache, 0 }, diff --git a/src/spells/combatspells.c b/src/spells/combatspells.c index cbbafbfbc..feed41ef0 100644 --- a/src/spells/combatspells.c +++ b/src/spells/combatspells.c @@ -1504,7 +1504,7 @@ int sp_fumbleshield(struct castorder * co) switch (sp->id) { case SPL_DRAIG_FUMBLESHIELD: case SPL_GWYRRD_FUMBLESHIELD: - case SPL_CERRDOR_FUMBLESHIELD: + case SPL_CERDDOR_FUMBLESHIELD: case SPL_TYBIED_FUMBLESHIELD: duration = 100; effect = _max(1, 25 - level); From b8e17839a754472f3666dd2fc72176336ea12fc3 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Wed, 8 Jul 2015 18:27:27 +0200 Subject: [PATCH 2/2] eliminate some spammy warnings. --- res/e3a/strings.xml | 13 ++++++++++++- res/eressea/strings.xml | 11 ----------- src/report.c | 20 +++----------------- src/study.h | 2 +- src/util/bsdstring.h | 1 + 5 files changed, 17 insertions(+), 30 deletions(-) diff --git a/res/e3a/strings.xml b/res/e3a/strings.xml index 11208a146..d0647a6d1 100644 --- a/res/e3a/strings.xml +++ b/res/e3a/strings.xml @@ -206,7 +206,18 @@ - + + + Dieser Zauber wird die gesamte Ausrüstung der + Zieleinheit für + einige Zeit vor den Blicken anderer verschleiern. Der + Zauber + schützt nicht vor Dieben und Spionen. + This spell will hide the whole equipment of a target + unit from the + looks of others. It will not protect against thieves or + spies. + Durch dieses uralte Tanzritual ruft der Zauberkundige die Kräfte des Lebens und der Fruchtbarkeit an. Die darauf folgenden diff --git a/res/eressea/strings.xml b/res/eressea/strings.xml index 357d5d83d..551551ae7 100644 --- a/res/eressea/strings.xml +++ b/res/eressea/strings.xml @@ -1,17 +1,6 @@ - - Dieser Zauber wird die gesamte Ausrüstung der - Zieleinheit für - einige Zeit vor den Blicken anderer verschleiern. Der - Zauber - schützt nicht vor Dieben und Spionen. - This spell will hide the whole equipment of a target - unit from the - looks of others. It will not protect against thieves or - spies. - Aufzeichung des Vortrags von Selen Ard'Ragorn in Bar'Glingal: diff --git a/src/report.c b/src/report.c index 98740aef2..0b591b5ed 100644 --- a/src/report.c +++ b/src/report.c @@ -1374,41 +1374,27 @@ static void durchreisende(stream *out, const region * r, const faction * f) if (cansee_durchgezogen(f, r, u, 0)) { ++counter; if (u->ship != NULL) { -#ifdef GERMAN_FLUFF_ENABLED - if (strcmp("de", f->locale->name)==0) { - if (counter == 1) { - bytes = (int)strlcpy(bufp, "Die ", size); - } - else { - bytes = (int)strlcpy(bufp, "die ", size); - } - if (wrptr(&bufp, &size, bytes) != 0) { - WARN_STATIC_BUFFER(); - break; - } - } -#endif bytes = (int)strlcpy(bufp, shipname(u->ship), size); } else { bytes = (int)strlcpy(bufp, unitname(u), size); } if (wrptr(&bufp, &size, bytes) != 0) { - WARN_STATIC_BUFFER(); + INFO_STATIC_BUFFER(); break; } if (counter + 1 < maxtravel) { bytes = (int)strlcpy(bufp, ", ", size); if (wrptr(&bufp, &size, bytes) != 0) { - WARN_STATIC_BUFFER(); + INFO_STATIC_BUFFER(); break; } } else if (counter + 1 == maxtravel) { bytes = (int)strlcpy(bufp, LOC(f->locale, "list_and"), size); if (wrptr(&bufp, &size, bytes) != 0) { - WARN_STATIC_BUFFER(); + INFO_STATIC_BUFFER(); break; } } diff --git a/src/study.h b/src/study.h index 88a6daa5b..d5d664fd2 100644 --- a/src/study.h +++ b/src/study.h @@ -32,7 +32,7 @@ extern "C" { extern bool is_migrant(struct unit *u); extern int study_cost(struct unit *u, skill_t talent); -#define MAXTEACHERS 8 +#define MAXTEACHERS 16 typedef struct teaching_info { struct unit *teachers[MAXTEACHERS]; int value; diff --git a/src/util/bsdstring.h b/src/util/bsdstring.h index 200ca30a6..883e102e6 100644 --- a/src/util/bsdstring.h +++ b/src/util/bsdstring.h @@ -17,5 +17,6 @@ extern size_t slprintf(char * dst, size_t size, const char * format, ...); #endif #define WARN_STATIC_BUFFER() log_warning("static buffer too small in %s:%d\n", __FILE__, __LINE__) +#define INFO_STATIC_BUFFER() log_info("static buffer too small in %s:%d\n", __FILE__, __LINE__) #endif