stopped infoblocks from ringing, since they're not telephones anymore - code is only...
[supertux.git] / src / object / block.cpp
index 63b02d9..417cbda 100644 (file)
@@ -20,6 +20,7 @@
 #include <config.h>
 
 #include "block.hpp"
+#include "msg.hpp"
 
 #include <stdexcept>
 
@@ -133,7 +134,7 @@ BonusBlock::BonusBlock(const Vector& pos, int data)
     case 4: contents = CONTENT_1UP; break;
     case 5: contents = CONTENT_ICEGROW; break;
     default:
-      std::cerr << "Invalid box contents!\n";
+      msg_warning("Invalid box contents");
       contents = CONTENT_COIN;
       break;
   }          
@@ -168,7 +169,7 @@ BonusBlock::BonusBlock(const lisp::Lisp& lisp)
       } else if(contentstring == "custom") {
         contents = CONTENT_CUSTOM;
       } else {
-        std::cerr << "Invalid box contents '" << contentstring << "'.\n";
+        msg_warning("Invalid box contents '" << contentstring << "'");
       }
     } else {
       if(contents == CONTENT_CUSTOM) {
@@ -178,7 +179,7 @@ BonusBlock::BonusBlock(const lisp::Lisp& lisp)
           throw std::runtime_error(
             "Only MovingObjects are allowed inside BonusBlocks");
       } else {
-        std::cerr << "Invalid element '" << token << "' in bonusblock.\n";
+        msg_warning("Invalid element '" << token << "' in bonusblock");
       }
     }  
   }