diff --git a/scripts/eressea/tunnels.lua b/scripts/eressea/tunnels.lua index 4a787a373..6b7a8e8d1 100644 --- a/scripts/eressea/tunnels.lua +++ b/scripts/eressea/tunnels.lua @@ -27,11 +27,21 @@ end local function tunnel_action(b, param) local units = tunnel_travelers(b) local rto = get_target(param) + eressea.log.info("Tunnel from " .. tostring(b) .. " [" .. param .. "]") if rto and units then - eressea.log.debug("Tunnel from " .. tostring(b) .. " [" .. param .. "]") - for key, u in pairs(units) do + for _, u in pairs(units) do u.region = rto - eressea.log.debug("teleported " .. tostring(u) .. " to " .. tostring(rto)) + eressea.log.info("teleported " .. tostring(u) .. " to " .. tostring(rto)) + end + elseif not units then + eressea.log.info("No units in tunnel " .. tostring(b) .. " [" .. param .. "]") + elseif not rto then + eressea.log.error("No target for tunnel " .. tostring(b) .. " [" .. param .. "]") + end + -- debug code to find bugs: + for u in b.region.units do + if u.building == b then + eressea.log.error("Did not teleport " .. tostring(u) .. " from tunnel " .. tostring(b)) end end end diff --git a/src/creport.c b/src/creport.c index 45400f241..0458f7271 100644 --- a/src/creport.c +++ b/src/creport.c @@ -848,13 +848,12 @@ void cr_output_unit(stream *out, const faction * f, pzTmp = get_racename(u->attribs); if (pzTmp) { - const char *pzRace = LOC(lang, mkname("race", pzTmp)); - pzTmp = pzRace ? pzRace : pzTmp; - stream_printf(out, "\"%s\";Typ\n", translate(pzTmp, LOC(lang, pzTmp))); + const char *pzRace = locale_string(lang, mkname("race", pzTmp), false); + pzTmp = pzRace ? translate(pzRace, LOC(lang, pzRace)) : pzTmp; + stream_printf(out, "\"%s\";Typ\n", pzTmp); if (u->faction == f && fval(u_race(u), RCF_SHAPESHIFTANY)) { pzRace = rc_name_s(u_race(u), NAME_PLURAL); - stream_printf(out, "\"%s\";wahrerTyp\n", - translate(pzRace, LOC(lang, pzRace))); + stream_printf(out, "\"%s\";wahrerTyp\n", pzTmp); } } else { diff --git a/src/magic.c b/src/magic.c index d7b57f24d..fdd74d55e 100644 --- a/src/magic.c +++ b/src/magic.c @@ -2237,7 +2237,7 @@ static void equip_familiar(unit *fam) { snprintf(eqname, sizeof(eqname), "fam_%s", rc->_name); if (!equip_unit(fam, eqname)) { - log_info("could not perform initialization for familiar %s.\n", rc->_name); + log_debug("could not perform initialization for familiar %s.\n", rc->_name); } } diff --git a/src/main.c b/src/main.c index 6b80c0cb0..4216d3046 100644 --- a/src/main.c +++ b/src/main.c @@ -53,7 +53,7 @@ static const char *logfile = "eressea.log"; static const char *luafile = 0; static const char *inifile = "eressea.ini"; static int memdebug = 0; -static int verbosity = 1; +static int verbosity = 2; static void load_inifile(void) { @@ -183,7 +183,7 @@ static int verbosity_to_flags(int verbosity) { static int parse_args(int argc, char **argv) { int i; - int log_stderr, log_flags = 2; + int log_stderr, log_flags = 3; for (i = 1; i != argc; ++i) { char *argi = argv[i]; diff --git a/src/reports.c b/src/reports.c index 4b950b73b..306fe0e10 100644 --- a/src/reports.c +++ b/src/reports.c @@ -713,7 +713,7 @@ void bufunit(const faction * f, const unit * u, const faction *fv, pzTmp = get_racename(u->attribs); if (pzTmp) { - const char *name = LOC(lang, mkname("race", pzTmp)); + const char *name = locale_string(lang, mkname("race", pzTmp), false); sbs_strcat(sbp, name ? name : pzTmp); if (u->faction == f && fval(u_race(u), RCF_SHAPESHIFTANY)) { sbs_strcat(sbp, " (");