From 86725561d5dc31826802d54fc9229d3322014774 Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 20 Aug 2009 12:18:46 +0000 Subject: [PATCH] (svn r17234) [0.7] -Backport from trunk: - Fix: Remove the (deprecated since 2006) Encoding entry from the openttd.desktop file (r17226) - Fix: With time tables vehicles would stay in the 'loading' state after they have finished loading [FS#3129, FS#3130] (r17222) - Fix: Do not ignore white space changes (e.g. alignment fixes) in the exporter (r17220) - Fix: Accept monthly production values in the scenario editor [FS#2406] (r17198) - Change: [Unix] Only use colorized error output on interactive terminals (r17227) - Update: credits to reflect the (current) truth a bit better (r17210) --- media/openttd.desktop.in | 1 - readme.txt | 7 ++++--- src/ai/api/squirrel_export.sh | 6 +++--- src/economy.cpp | 4 ++++ src/industry_gui.cpp | 2 +- src/misc_gui.cpp | 5 +++-- src/unix.cpp | 8 ++++++-- 7 files changed, 21 insertions(+), 12 deletions(-) diff --git a/media/openttd.desktop.in b/media/openttd.desktop.in index b3ed675fb5..5c37ac4981 100644 --- a/media/openttd.desktop.in +++ b/media/openttd.desktop.in @@ -1,7 +1,6 @@ # $Id$ # http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.1.html [Desktop Entry] -Encoding=UTF-8 Type=Application Version=1.1 Name=!!MENU_NAME!! diff --git a/readme.txt b/readme.txt index aec1296768..9c514c0564 100644 --- a/readme.txt +++ b/readme.txt @@ -1,5 +1,5 @@ OpenTTD README -Last updated: 2009-08-01 +Last updated: 2009-08-18 Release version: 0.7.2 ------------------------------------------------------------------------ @@ -480,7 +480,7 @@ Inactive Developers: Tamás Faragó (Darkvater) - Ex-Lead coder Jaroslav Mazanec (KUDr) - YAPG (Yet Another Pathfinder God) ;) Jonathan Coome (Maedhros) - High priest of the NewGRF Temple - Attila Bán (MiHaMiX) - WebTranslator, Nightlies, Wiki and bugtracker host + Attila Bán (MiHaMiX) - WebTranslator 1 and 2 Christoph Mallon (Tron) - Programmer, code correctness police Retired Developers: @@ -488,7 +488,7 @@ Retired Developers: Serge Paquet (vurlix) - Assistant project manager, coder (0.1 - 0.3.3) Dominik Scherer (dominik81) - Lead programmer, GUI expert (0.3.0 - 0.3.6) Benedikt Brüggemeier (skidd13) - Bug fixer and code reworker - Patric Stout (TrueLight) - Programmer, webhoster (0.3 - pre0.7) + Patric Stout (TrueLight) - Programmer (0.3 - pre0.7), sys op (active) Thanks to: Josef Drexler - For his great work on TTDPatch. @@ -501,6 +501,7 @@ Thanks to: Christian Rosentreter (tokai) - MorphOS / AmigaOS port Richard Kempton (RichK67) - Additional airports, initial TGP implementation Alberto Demichelis - Squirrel scripting language + Markus F.X.J. Oberhumer - MiniLZO for loading old savegames Michael Blunck - For revolutionizing TTD with awesome graphics George - Canal graphics David Dallaston (Pikka) - Tram tracks diff --git a/src/ai/api/squirrel_export.sh b/src/ai/api/squirrel_export.sh index b4bfaac2b7..d244f664b1 100755 --- a/src/ai/api/squirrel_export.sh +++ b/src/ai/api/squirrel_export.sh @@ -24,7 +24,7 @@ if [ -z "$1" ]; then "ai_controller.hpp" | "ai_object.hpp" | "ai_types.hpp" ) continue; esac ${AWK} -f squirrel_export.awk ${f} > ${f}.tmp - if ! [ -f "${f}.sq" ] || [ -n "`diff -I '$Id' -b ${f}.tmp ${f}.sq 2> /dev/null || echo boo`" ]; then + if ! [ -f "${f}.sq" ] || [ -n "`diff -I '$Id' ${f}.tmp ${f}.sq 2> /dev/null || echo boo`" ]; then mv ${f}.tmp ${f}.sq echo "Updated: ${f}.sq" svn add ${f}.sq > /dev/null 2>&1 @@ -36,7 +36,7 @@ if [ -z "$1" ]; then done else ${AWK} -f squirrel_export.awk $1 > $1.tmp - if ! [ -f "${f}.sq" ] || [ -n "`diff -I '$Id' -b $1.sq $1.tmp 2> /dev/null || echo boo`" ]; then + if ! [ -f "${f}.sq" ] || [ -n "`diff -I '$Id' $1.sq $1.tmp 2> /dev/null || echo boo`" ]; then mv $1.tmp $1.sq echo "Updated: $1.sq" svn add $1.sq > /dev/null 2>&1 @@ -99,7 +99,7 @@ echo " ${AWK} -f ${f}.awk ${f} > ${f}.tmp -if ! [ -f "${f}" ] || [ -n "`diff -I '$Id' -b ${f} ${f}.tmp 2> /dev/null || echo boo`" ]; then +if ! [ -f "${f}" ] || [ -n "`diff -I '$Id' ${f} ${f}.tmp 2> /dev/null || echo boo`" ]; then mv ${f}.tmp ${f} echo "Updated: ${f}" else diff --git a/src/economy.cpp b/src/economy.cpp index f7b01399ac..b4727cb7a0 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -1552,6 +1552,10 @@ void PrepareUnload(Vehicle *front_v) static void LoadUnloadVehicle(Vehicle *v, int *cargo_left) { assert(v->current_order.IsType(OT_LOADING)); + + /* When we've finished loading we're just staying here till the timetable 'runs' out */ + if (HasBit(v->vehicle_flags, VF_LOADING_FINISHED)) return; + assert(v->load_unload_time_rem != 0); /* We have not waited enough time till the next round of loading/unloading */ diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index 21a43b03b6..e757e740ad 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -643,7 +643,7 @@ public: Industry *i = GetIndustry(this->window_number); int line = this->editbox_line; - i->production_rate[line] = ClampU(atoi(str), 0, 255); + i->production_rate[line] = ClampU(atoi(str) / 8, 0, 255); UpdateIndustryProduction(i); this->SetDirty(); } diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index dce606e618..269bd6ef8e 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -327,7 +327,7 @@ struct AboutWindow : public Window { " Tam\xC3\xA1s Farag\xC3\xB3 (Darkvater) - Ex-Lead coder", " Jaroslav Mazanec (KUDr) - YAPG (Yet Another Pathfinder God) ;)", " Jonathan Coome (Maedhros) - High priest of the NewGRF Temple", - " Attila B\xC3\xA1n (MiHaMiX) - WebTranslator, Nightlies, Wiki and bugtracker host", + " Attila B\xC3\xA1n (MiHaMiX) - Developer WebTranslator 1 and 2", " Christoph Mallon (Tron) - Programmer, code correctness police", "", "Retired Developers:", @@ -335,7 +335,7 @@ struct AboutWindow : public Window { " Serge Paquet (vurlix) - Assistant project manager, coder (0.1 - 0.3.3)", " Dominik Scherer (dominik81) - Lead programmer, GUI expert (0.3.0 - 0.3.6)", " Benedikt Brüggemeier (skidd13) - Bug fixer and code reworker", - " Patric Stout (TrueLight) - Programmer, webhoster (0.3 - pre0.7)", + " Patric Stout (TrueLight) - Programmer (0.3 - pre0.7), sys op (active)", "", "Special thanks go out to:", " Josef Drexler - For his great work on TTDPatch", @@ -348,6 +348,7 @@ struct AboutWindow : public Window { " Richard Kempton (richK) - additional airports, initial TGP implementation", "", " Alberto Demichelis - Squirrel scripting language © 2003-2008", + " Markus F.X.J. Oberhumer - (Mini)LZO for loading old savegames © 1996-2002", " Michael Blunck - Pre-Signals and Semaphores © 2003", " George - Canal/Lock graphics © 2003-2004", " David Dallaston - Tram tracks", diff --git a/src/unix.cpp b/src/unix.cpp index a583893877..29d8ad388a 100644 --- a/src/unix.cpp +++ b/src/unix.cpp @@ -221,8 +221,12 @@ void ShowOSErrorBox(const char *buf, bool system) * this is the native and nicest way to do this on OSX */ ShowMacDialog( buf, "See readme for more info\nMost likely you are missing files from the original TTD", "Quit" ); #else - /* all systems, but OSX */ - fprintf(stderr, "\033[1;31mError: %s\033[0;39m\n", buf); + /* All unix systems, except OSX. Only use escape codes on a TTY. */ + if (isatty(fileno(stderr))) { + fprintf(stderr, "\033[1;31mError: %s\033[0;39m\n", buf); + } else { + fprintf(stderr, "Error: %s\n", buf); + } #endif }