script_news.hpp

Go to the documentation of this file.
00001 /* $Id$ */
00002 
00003 /*
00004  * This file is part of OpenTTD.
00005  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
00006  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00007  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
00008  */
00009 
00012 #ifndef SCRIPT_NEWS_HPP
00013 #define SCRIPT_NEWS_HPP
00014 
00015 #include "script_company.hpp"
00016 #include "script_text.hpp"
00017 #include "../../news_type.h"
00018 
00023 class ScriptNews : public ScriptObject {
00024 public:
00028   enum NewsType {
00029     /* Note: these values represent part of the in-game NewsSubtype enum */
00030     NT_ARRIVAL_COMPANY   = ::NS_ARRIVAL_COMPANY,  
00031     NT_ARRIVAL_OTHER     = ::NS_ARRIVAL_OTHER,    
00032     NT_ACCIDENT          = ::NS_ACCIDENT,         
00033     NT_COMPANY_TROUBLE   = ::NS_COMPANY_TROUBLE,  
00034     NT_COMPANY_MERGER    = ::NS_COMPANY_MERGER,   
00035     NT_COMPANY_BANKRUPT  = ::NS_COMPANY_BANKRUPT, 
00036     NT_COMPANY_NEW       = ::NS_COMPANY_NEW,      
00037     NT_INDUSTRY_OPEN     = ::NS_INDUSTRY_OPEN,    
00038     NT_INDUSTRY_CLOSE    = ::NS_INDUSTRY_CLOSE,   
00039     NT_ECONOMY           = ::NS_ECONOMY,          
00040     NT_INDUSTRY_COMPANY  = ::NS_INDUSTRY_COMPANY, 
00041     NT_INDUSTRY_OTHER    = ::NS_INDUSTRY_OTHER,   
00042     NT_INDUSTRY_NOBODY   = ::NS_INDUSTRY_NOBODY,  
00043     NT_ADVICE            = ::NS_ADVICE,           
00044     NT_NEW_VEHICLES      = ::NS_NEW_VEHICLES,     
00045     NT_ACCEPTANCE        = ::NS_ACCEPTANCE,       
00046     NT_SUBSIDIES         = ::NS_SUBSIDIES,        
00047     NT_GENERAL           = ::NS_GENERAL,          
00048   };
00049 
00059   static bool Create(NewsType type, Text *text, ScriptCompany::CompanyID company);
00060 };
00061 
00062 #endif /* SCRIPT_NEWS_HPP */