From bcb8d197d3ad1f67a846da06a631952a3c442dfc Mon Sep 17 00:00:00 2001 From: filux Date: Fri, 19 Feb 2016 21:14:27 +0100 Subject: [PATCH] fixed some typos [ci skip] https://lintian.debian.org/full/pkg-games-devel@lists.alioth.debian.org.html#megaglest --- data/glest_game | 2 +- source/glest_game/global/core_data.cpp | 2 +- source/glest_game/world/world.cpp | 4 +-- source/glest_map_editor/main.cpp | 2 +- .../convert_faction_xml2html.pl | 7 ++--- .../make_html_for_git_docs.sh | 27 +++++++++++++++++-- .../convert_faction_xml2html/megapack.ini | 2 +- .../convert_faction_xml2html/setupDeps.sh | 4 +-- 8 files changed, 37 insertions(+), 13 deletions(-) diff --git a/data/glest_game b/data/glest_game index 467605f4..7a96907c 160000 --- a/data/glest_game +++ b/data/glest_game @@ -1 +1 @@ -Subproject commit 467605f4a8ff23c11fbc2982c835fd1c11ff9087 +Subproject commit 7a96907c89f5db8317b8e090737b404acdfc876e diff --git a/source/glest_game/global/core_data.cpp b/source/glest_game/global/core_data.cpp index 3c415309..9b50f66a 100644 --- a/source/glest_game/global/core_data.cpp +++ b/source/glest_game/global/core_data.cpp @@ -1437,7 +1437,7 @@ int CoreData::computeFontSize(int size) { rs= 10; } } - if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] fontsize orginal %d calculated:%d \n",__FILE__,__FUNCTION__,__LINE__,size,rs); + if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] fontsize original %d calculated:%d \n",__FILE__,__FUNCTION__,__LINE__,size,rs); return rs; } diff --git a/source/glest_game/world/world.cpp b/source/glest_game/world/world.cpp index 1ae088fa..6c4b56c3 100644 --- a/source/glest_game/world/world.cpp +++ b/source/glest_game/world/world.cpp @@ -1451,11 +1451,11 @@ void World::givePositionCommand(int unitId, const string &commandName, const Vec cc= ccAttack; } else { - throw megaglest_runtime_error("Invalid position commmand: " + commandName,true); + throw megaglest_runtime_error("Invalid position command: " + commandName,true); } if(unit->getType()->getFirstCtOfClass(cc) == NULL) { - throw megaglest_runtime_error("Invalid commmand: [" + commandName + "] for unit: [" + unit->getType()->getName(false) + "] id [" + intToStr(unit->getId()) + "]",true); + throw megaglest_runtime_error("Invalid command: [" + commandName + "] for unit: [" + unit->getType()->getName(false) + "] id [" + intToStr(unit->getId()) + "]",true); } if(SystemFlags::getSystemSettingType(SystemFlags::debugUnitCommands).enabled) SystemFlags::OutputDebug(SystemFlags::debugUnitCommands,"In [%s::%s Line: %d] cc = %d Unit [%s]\n",__FILE__,__FUNCTION__,__LINE__,cc,unit->getFullName(false).c_str()); unit->giveCommand(new Command( unit->getType()->getFirstCtOfClass(cc), pos )); diff --git a/source/glest_map_editor/main.cpp b/source/glest_map_editor/main.cpp index ffbb01ba..57e6bd7a 100644 --- a/source/glest_map_editor/main.cpp +++ b/source/glest_map_editor/main.cpp @@ -1122,7 +1122,7 @@ void MainWindow::onMenuEditAdvanced(wxCommandEvent &event) { simpleDialog.addValue("Height Factor", intToStr(program->getMap()->getHeightFactor()),"lower means more hill effect. Numbers above 100 are handled like this:\nx=x/100 ,so a 150 will mean 1.5 in the game."); simpleDialog.addValue("Water Level", intToStr(program->getMap()->getWaterLevel()),"water is visible below this, and walkable until 1.5 less"); simpleDialog.addValue("Cliff Level", intToStr(program->getMap()->getCliffLevel()),"neighboring fields with at least this heights difference are cliffs"); - simpleDialog.addValue("Camera Height", intToStr(program->getMap()->getCameraHeight()),"you can give a camera heigth here default is 0 ;ignored if <20"); + simpleDialog.addValue("Camera Height", intToStr(program->getMap()->getCameraHeight()),"you can give a camera height here default is 0 ;ignored if <20"); if (!simpleDialog.show("Advanced")) return; try { diff --git a/source/tools/convert_faction_xml2html/convert_faction_xml2html.pl b/source/tools/convert_faction_xml2html/convert_faction_xml2html.pl index 74ae9f94..1d87cb6e 100755 --- a/source/tools/convert_faction_xml2html/convert_faction_xml2html.pl +++ b/source/tools/convert_faction_xml2html/convert_faction_xml2html.pl @@ -3,9 +3,10 @@ # script to create HTML-pages and diagrams from the glest-factions techtree # 20110120, bugs & feedback to olaus@rupp.de # Copyright 2011 olaus +# Copyright 2012-2016 olaus & MegaGlest Team # license: GPLv3 or newer -our $version = "0.8 beta"; +our $version = "0.8.1 beta"; # This tool requires jquery and the jquery dataTables plugin (run setupDeps.sh which uses curl to try to download these into the media folder). # These are NOT required to run the script but are used to display the resulting html. @@ -909,7 +910,7 @@ foreach my $faction_path ( @factions ) { # show levels - if ( defined @{ $u_levels{ $u }} ) { + if ( $u_levels{ $u } ) { my $level_num = 0; @@ -943,7 +944,7 @@ foreach my $faction_path ( @factions ) { } # show available upgrades for this unit - if ( defined @{ $upgrades_for{ $u }} ) { + if ( $upgrades_for{ $u } ) { $full_attack_tmp .= "Upgrades Available:"; diff --git a/source/tools/convert_faction_xml2html/make_html_for_git_docs.sh b/source/tools/convert_faction_xml2html/make_html_for_git_docs.sh index 3d1ffd24..f62745d3 100755 --- a/source/tools/convert_faction_xml2html/make_html_for_git_docs.sh +++ b/source/tools/convert_faction_xml2html/make_html_for_git_docs.sh @@ -3,7 +3,7 @@ # Use this script to make autodocumentation for docs in data's repository # ---------------------------------------------------------------------------- # 2015 Written by filux -# Copyright (c) 2015 under GNU GPL v3.0+ +# Copyright (c) 2015-2016 under GNU GPL v3.0+ LANG=C if [ "$1" = "" ]; then @@ -21,10 +21,33 @@ if [ "$3" = "" ]; then else rel_path_tech_test="$3" fi +if [ "$4" = "" ]; then + remote_logo="https://megaglest.org/uploads/megaglest2011/logo/logo.png" +else + remote_logo="$4" +fi +if [ "$5" = "" ]; then + remote_footer_logo="https://megaglest.org/uploads/megaglest2011/logo/gpl_osi.png" +else + remote_footer_logo="$5" +fi SCRIPTDIR="$(dirname "$(readlink -f "$0")")" cd "$SCRIPTDIR" -rm -rf html +rm -rf html; sleep 0.1s +mkdir -p html/images sed "s|^generate_g3d_images = .*|generate_g3d_images = 0|" "$techtree.ini" > "$techtree-temp.ini" +if [ "$(which curl 2>/dev/null)" != "" ]; then + if [ "$(grep -c "$remote_logo" "$techtree-temp.ini")" -gt "0" ]; then + curl -L -s "$remote_logo" -o "html/images/logo.png" + if [ "$?" -eq "0" ]; then sed -i "s|$remote_logo|images/logo.png|" "$techtree-temp.ini"; sleep 0.1s; fi + fi + if [ "$(grep -c "$remote_footer_logo" "$techtree-temp.ini")" -gt "0" ]; then + curl -L -s "$remote_footer_logo" -o "html/images/footer_logo.png" + if [ "$?" -eq "0" ]; then sed -i "s|$remote_footer_logo|images/footer_logo.png|" "$techtree-temp.ini"; sleep 0.1s; fi + fi +else + echo "Downloading tool 'curl' DOES NOT EXIST on this system, please install it." +fi ./convert_faction_xml2html.pl "$techtree-temp.ini" cd html diff --git a/source/tools/convert_faction_xml2html/megapack.ini b/source/tools/convert_faction_xml2html/megapack.ini index 3ee56411..ff6290d1 100644 --- a/source/tools/convert_faction_xml2html/megapack.ini +++ b/source/tools/convert_faction_xml2html/megapack.ini @@ -152,7 +152,7 @@ header=< - +