Changeset - r19372:42adb924a732
[Not reviewed]
master
0 2 0
frosch - 12 years ago 2012-05-26 14:16:23
frosch@openttd.org
(svn r24287) -Feature [FS#2688]: News item for exclusive transport rights. (based on patch by Grantovich)
2 files changed with 11 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/lang/english.txt
Show inline comments
 
@@ -663,384 +663,386 @@ STR_SMALLMAP_TYPE_INDUSTRIES            
 
STR_SMALLMAP_TYPE_ROUTES                                        :Routes
 
STR_SMALLMAP_TYPE_VEGETATION                                    :Vegetation
 
STR_SMALLMAP_TYPE_OWNERS                                        :Owners
 
STR_SMALLMAP_TOOLTIP_SHOW_LAND_CONTOURS_ON_MAP                  :{BLACK}Show land contours on map
 
STR_SMALLMAP_TOOLTIP_SHOW_VEHICLES_ON_MAP                       :{BLACK}Show vehicles on map
 
STR_SMALLMAP_TOOLTIP_SHOW_INDUSTRIES_ON_MAP                     :{BLACK}Show industries on map
 
STR_SMALLMAP_TOOLTIP_SHOW_TRANSPORT_ROUTES_ON                   :{BLACK}Show transport routes on map
 
STR_SMALLMAP_TOOLTIP_SHOW_VEGETATION_ON_MAP                     :{BLACK}Show vegetation on map
 
STR_SMALLMAP_TOOLTIP_SHOW_LAND_OWNERS_ON_MAP                    :{BLACK}Show land owners on map
 
STR_SMALLMAP_TOOLTIP_INDUSTRY_SELECTION                         :{BLACK}Click on an industry type to toggle displaying it. Ctrl+Click disables all types except the selected one. Ctrl+Click on it again to enable all industry types
 
STR_SMALLMAP_TOOLTIP_COMPANY_SELECTION                          :{BLACK}Click on a company to toggle displaying its property. Ctrl+Click disables all companies except the selected one. Ctrl+Click on it again to enable all companies
 

	
 
STR_SMALLMAP_LEGENDA_ROADS                                      :{TINY_FONT}{BLACK}Roads
 
STR_SMALLMAP_LEGENDA_RAILROADS                                  :{TINY_FONT}{BLACK}Railways
 
STR_SMALLMAP_LEGENDA_STATIONS_AIRPORTS_DOCKS                    :{TINY_FONT}{BLACK}Stations/Airports/Docks
 
STR_SMALLMAP_LEGENDA_BUILDINGS_INDUSTRIES                       :{TINY_FONT}{BLACK}Buildings/Industries
 
STR_SMALLMAP_LEGENDA_VEHICLES                                   :{TINY_FONT}{BLACK}Vehicles
 
STR_SMALLMAP_LEGENDA_TRAINS                                     :{TINY_FONT}{BLACK}Trains
 
STR_SMALLMAP_LEGENDA_ROAD_VEHICLES                              :{TINY_FONT}{BLACK}Road Vehicles
 
STR_SMALLMAP_LEGENDA_SHIPS                                      :{TINY_FONT}{BLACK}Ships
 
STR_SMALLMAP_LEGENDA_AIRCRAFT                                   :{TINY_FONT}{BLACK}Aircraft
 
STR_SMALLMAP_LEGENDA_TRANSPORT_ROUTES                           :{TINY_FONT}{BLACK}Transport Routes
 
STR_SMALLMAP_LEGENDA_FOREST                                     :{TINY_FONT}{BLACK}Forest
 
STR_SMALLMAP_LEGENDA_RAILROAD_STATION                           :{TINY_FONT}{BLACK}Railway Station
 
STR_SMALLMAP_LEGENDA_TRUCK_LOADING_BAY                          :{TINY_FONT}{BLACK}Lorry Loading Bay
 
STR_SMALLMAP_LEGENDA_BUS_STATION                                :{TINY_FONT}{BLACK}Bus Station
 
STR_SMALLMAP_LEGENDA_AIRPORT_HELIPORT                           :{TINY_FONT}{BLACK}Airport/Heliport
 
STR_SMALLMAP_LEGENDA_DOCK                                       :{TINY_FONT}{BLACK}Dock
 
STR_SMALLMAP_LEGENDA_ROUGH_LAND                                 :{TINY_FONT}{BLACK}Rough Land
 
STR_SMALLMAP_LEGENDA_GRASS_LAND                                 :{TINY_FONT}{BLACK}Grass Land
 
STR_SMALLMAP_LEGENDA_BARE_LAND                                  :{TINY_FONT}{BLACK}Bare Land
 
STR_SMALLMAP_LEGENDA_FIELDS                                     :{TINY_FONT}{BLACK}Fields
 
STR_SMALLMAP_LEGENDA_TREES                                      :{TINY_FONT}{BLACK}Trees
 
STR_SMALLMAP_LEGENDA_ROCKS                                      :{TINY_FONT}{BLACK}Rocks
 
STR_SMALLMAP_LEGENDA_WATER                                      :{TINY_FONT}{BLACK}Water
 
STR_SMALLMAP_LEGENDA_NO_OWNER                                   :{TINY_FONT}{BLACK}No Owner
 
STR_SMALLMAP_LEGENDA_TOWNS                                      :{TINY_FONT}{BLACK}Towns
 
STR_SMALLMAP_LEGENDA_INDUSTRIES                                 :{TINY_FONT}{BLACK}Industries
 
STR_SMALLMAP_LEGENDA_DESERT                                     :{TINY_FONT}{BLACK}Desert
 
STR_SMALLMAP_LEGENDA_SNOW                                       :{TINY_FONT}{BLACK}Snow
 

	
 
STR_SMALLMAP_TOOLTIP_TOGGLE_TOWN_NAMES_ON_OFF                   :{BLACK}Toggle town names on/off on map
 
STR_SMALLMAP_CENTER                                             :{BLACK}Centre the smallmap on the current position
 
STR_SMALLMAP_INDUSTRY                                           :{TINY_FONT}{STRING} ({NUM})
 
STR_SMALLMAP_COMPANY                                            :{TINY_FONT}{COMPANY}
 
STR_SMALLMAP_TOWN                                               :{TINY_FONT}{WHITE}{TOWN}
 
STR_SMALLMAP_DISABLE_ALL                                        :{BLACK}Disable all
 
STR_SMALLMAP_ENABLE_ALL                                         :{BLACK}Enable all
 
STR_SMALLMAP_SHOW_HEIGHT                                        :{BLACK}Show height
 
STR_SMALLMAP_TOOLTIP_DISABLE_ALL_INDUSTRIES                     :{BLACK}Display no industries on the map
 
STR_SMALLMAP_TOOLTIP_ENABLE_ALL_INDUSTRIES                      :{BLACK}Display all industries on the map
 
STR_SMALLMAP_TOOLTIP_SHOW_HEIGHT                                :{BLACK}Toggle display of heightmap
 
STR_SMALLMAP_TOOLTIP_DISABLE_ALL_COMPANIES                      :{BLACK}Display no company property on the map
 
STR_SMALLMAP_TOOLTIP_ENABLE_ALL_COMPANIES                       :{BLACK}Display all company property on the map
 

	
 
# Status bar messages
 
STR_STATUSBAR_TOOLTIP_SHOW_LAST_NEWS                            :{BLACK}Show last message or news report
 
STR_STATUSBAR_COMPANY_NAME                                      :{SILVER}- -  {COMPANY}  - -
 
STR_STATUSBAR_PAUSED                                            :{YELLOW}*  *  PAUSED  *  *
 
STR_STATUSBAR_AUTOSAVE                                          :{RED}AUTOSAVE
 
STR_STATUSBAR_SAVING_GAME                                       :{RED}*  *  SAVING GAME  *  *
 

	
 
# News message history
 
STR_MESSAGE_HISTORY                                             :{WHITE}Message History
 
STR_MESSAGE_HISTORY_TOOLTIP                                     :{BLACK}A list of the recent news messages
 
STR_MESSAGE_NEWS_FORMAT                                         :{STRING}  -  {STRING5}
 

	
 
# Message settings window
 
STR_NEWS_MESSAGE_CAPTION                                        :{WHITE}Message
 
STR_NEWS_MESSAGE_OPTIONS_CAPTION                                :{WHITE}Message Options
 
STR_NEWS_MESSAGES_ALL                                           :{YELLOW}Set all message types to: Off / Summary/ Full
 
STR_NEWS_MESSAGES_SOUND                                         :{YELLOW}Play sound for summarised news messages
 
STR_NEWS_MESSAGES_OFF                                           :Off
 
STR_NEWS_MESSAGES_SUMMARY                                       :Summary
 
STR_NEWS_MESSAGES_FULL                                          :Full
 

	
 
STR_NEWS_MESSAGE_TYPES                                          :{BLACK}Message types:
 
STR_NEWS_MESSAGE_TYPE_ARRIVAL_OF_FIRST_VEHICLE_OWN              :{YELLOW}Arrival of first vehicle at player's station
 
STR_NEWS_MESSAGE_TYPE_ARRIVAL_OF_FIRST_VEHICLE_OTHER            :{YELLOW}Arrival of first vehicle at competitor's station
 
STR_NEWS_MESSAGE_TYPE_ACCIDENTS_DISASTERS                       :{YELLOW}Accidents / disasters
 
STR_NEWS_MESSAGE_TYPE_COMPANY_INFORMATION                       :{YELLOW}Company information
 
STR_NEWS_MESSAGE_TYPE_INDUSTRY_OPEN                             :{YELLOW}Opening of industries
 
STR_NEWS_MESSAGE_TYPE_INDUSTRY_CLOSE                            :{YELLOW}Closing of industries
 
STR_NEWS_MESSAGE_TYPE_ECONOMY_CHANGES                           :{YELLOW}Economy changes
 
STR_NEWS_MESSAGE_TYPE_INDUSTRY_CHANGES_SERVED_BY_COMPANY        :{YELLOW}Production changes of industries served by the company
 
STR_NEWS_MESSAGE_TYPE_INDUSTRY_CHANGES_SERVED_BY_OTHER          :{YELLOW}Production changes of industries served by competitor(s)
 
STR_NEWS_MESSAGE_TYPE_INDUSTRY_CHANGES_UNSERVED                 :{YELLOW}Other industry production changes
 
STR_NEWS_MESSAGE_TYPE_ADVICE_INFORMATION_ON_COMPANY             :{YELLOW}Advice / information on company's vehicles
 
STR_NEWS_MESSAGE_TYPE_NEW_VEHICLES                              :{YELLOW}New vehicles
 
STR_NEWS_MESSAGE_TYPE_CHANGES_OF_CARGO_ACCEPTANCE               :{YELLOW}Changes to cargo acceptance
 
STR_NEWS_MESSAGE_TYPE_SUBSIDIES                                 :{YELLOW}Subsidies
 
STR_NEWS_MESSAGE_TYPE_GENERAL_INFORMATION                       :{YELLOW}General information
 

	
 
STR_NEWS_CUSTOM_ITEM                                            :{BIG_FONT}{BLACK}{RAW_STRING}
 

	
 
STR_NEWS_FIRST_TRAIN_ARRIVAL                                    :{BIG_FONT}{BLACK}Citizens celebrate . . .{}First train arrives at {STATION}!
 
STR_NEWS_FIRST_BUS_ARRIVAL                                      :{BIG_FONT}{BLACK}Citizens celebrate . . .{}First bus arrives at {STATION}!
 
STR_NEWS_FIRST_TRUCK_ARRIVAL                                    :{BIG_FONT}{BLACK}Citizens celebrate . . .{}First truck arrives at {STATION}!
 
STR_NEWS_FIRST_PASSENGER_TRAM_ARRIVAL                           :{BIG_FONT}{BLACK}Citizens celebrate . . .{}First passenger tram arrives at {STATION}!
 
STR_NEWS_FIRST_CARGO_TRAM_ARRIVAL                               :{BIG_FONT}{BLACK}Citizens celebrate . . .{}First freight tram arrives at {STATION}!
 
STR_NEWS_FIRST_SHIP_ARRIVAL                                     :{BIG_FONT}{BLACK}Citizens celebrate . . .{}First ship arrives at {STATION}!
 
STR_NEWS_FIRST_AIRCRAFT_ARRIVAL                                 :{BIG_FONT}{BLACK}Citizens celebrate . . .{}First aircraft arrives at {STATION}!
 

	
 
STR_NEWS_TRAIN_CRASH                                            :{BIG_FONT}{BLACK}Train Crash!{}{COMMA} die in fireball after collision
 
STR_NEWS_ROAD_VEHICLE_CRASH_DRIVER                              :{BIG_FONT}{BLACK}Road Vehicle Crash!{}Driver dies in fireball after collision with train
 
STR_NEWS_ROAD_VEHICLE_CRASH                                     :{BIG_FONT}{BLACK}Road Vehicle Crash!{}{COMMA} die in fireball after collision with train
 
STR_NEWS_AIRCRAFT_CRASH                                         :{BIG_FONT}{BLACK}Plane Crash!{}{COMMA} die in fireball at {STATION}
 
STR_NEWS_PLANE_CRASH_OUT_OF_FUEL                                :{BIG_FONT}{BLACK}Plane Crash!{}Aircraft ran out of fuel, {COMMA} die in fireball
 

	
 
STR_NEWS_DISASTER_ZEPPELIN                                      :{BIG_FONT}{BLACK}Zeppelin disaster at {STATION}!
 
STR_NEWS_DISASTER_SMALL_UFO                                     :{BIG_FONT}{BLACK}Road vehicle destroyed in 'UFO' collision!
 
STR_NEWS_DISASTER_AIRPLANE_OIL_REFINERY                         :{BIG_FONT}{BLACK}Oil refinery explosion near {TOWN}!
 
STR_NEWS_DISASTER_HELICOPTER_FACTORY                            :{BIG_FONT}{BLACK}Factory destroyed in suspicious circumstances near {TOWN}!
 
STR_NEWS_DISASTER_BIG_UFO                                       :{BIG_FONT}{BLACK}'UFO' lands near {TOWN}!
 
STR_NEWS_DISASTER_COAL_MINE_SUBSIDENCE                          :{BIG_FONT}{BLACK}Coal mine subsidence leaves trail of destruction near {TOWN}!
 
STR_NEWS_DISASTER_FLOOD_VEHICLE                                 :{BIG_FONT}{BLACK}Floods!{}At least {COMMA} missing, presumed dead after significant flooding!
 

	
 
STR_NEWS_COMPANY_IN_TROUBLE_TITLE                               :{BIG_FONT}{BLACK}Transport company in trouble!
 
STR_NEWS_COMPANY_IN_TROUBLE_DESCRIPTION                         :{BIG_FONT}{BLACK}{RAW_STRING} will be sold off or declared bankrupt unless performance increases soon!
 
STR_NEWS_COMPANY_MERGER_TITLE                                   :{BIG_FONT}{BLACK}Transport company merger!
 
STR_NEWS_COMPANY_MERGER_DESCRIPTION                             :{BIG_FONT}{BLACK}{RAW_STRING} has been sold to {RAW_STRING} for {CURRENCY_LONG}!
 
STR_NEWS_COMPANY_BANKRUPT_TITLE                                 :{BIG_FONT}{BLACK}Bankrupt!
 
STR_NEWS_COMPANY_BANKRUPT_DESCRIPTION                           :{BIG_FONT}{BLACK}{RAW_STRING} has been closed down by creditors and all assets sold off!
 
STR_NEWS_COMPANY_LAUNCH_TITLE                                   :{BIG_FONT}{BLACK}New transport company launched!
 
STR_NEWS_COMPANY_LAUNCH_DESCRIPTION                             :{BIG_FONT}{BLACK}{RAW_STRING} starts construction near {TOWN}!
 
STR_NEWS_MERGER_TAKEOVER_TITLE                                  :{BIG_FONT}{BLACK}{RAW_STRING} has been taken over by {RAW_STRING}!
 
STR_PRESIDENT_NAME_MANAGER                                      :{BLACK}{PRESIDENT_NAME}{}(Manager)
 

	
 
STR_NEWS_NEW_TOWN                                               :{BLACK}{BIG_FONT}{RAW_STRING} sponsored construction of new town {TOWN}!
 

	
 
STR_NEWS_INDUSTRY_CONSTRUCTION                                  :{BIG_FONT}{BLACK}New {STRING} under construction near {TOWN}!
 
STR_NEWS_INDUSTRY_PLANTED                                       :{BIG_FONT}{BLACK}New {STRING} being planted near {TOWN}!
 

	
 
STR_NEWS_INDUSTRY_CLOSURE_GENERAL                               :{BIG_FONT}{BLACK}{STRING2} announces imminent closure!
 
STR_NEWS_INDUSTRY_CLOSURE_SUPPLY_PROBLEMS                       :{BIG_FONT}{BLACK}Supply problems cause {STRING2} to announce imminent closure!
 
STR_NEWS_INDUSTRY_CLOSURE_LACK_OF_TREES                         :{BIG_FONT}{BLACK}Lack of nearby trees causes {STRING2} to announce imminent closure!
 

	
 
STR_NEWS_EURO_INTRODUCTION                                      :{BIG_FONT}{BLACK}European Monetary Union!{}{}The Euro is introduced as the sole currency for everyday transactions in your country!
 
STR_NEWS_BEGIN_OF_RECESSION                                     :{BIG_FONT}{BLACK}World Recession!{}{}Financial experts fear worst as economy slumps!
 
STR_NEWS_END_OF_RECESSION                                       :{BIG_FONT}{BLACK}Recession Over!{}{}Upturn in trade gives confidence to industries as economy strengthens!
 

	
 
STR_NEWS_INDUSTRY_PRODUCTION_INCREASE_GENERAL                   :{BIG_FONT}{BLACK}{INDUSTRY} increases production!
 
STR_NEWS_INDUSTRY_PRODUCTION_INCREASE_COAL                      :{BIG_FONT}{BLACK}New coal seam found at {INDUSTRY}!{}Production is expected to double!
 
STR_NEWS_INDUSTRY_PRODUCTION_INCREASE_OIL                       :{BIG_FONT}{BLACK}New oil reserves found at {INDUSTRY}!{}Production is expected to double!
 
STR_NEWS_INDUSTRY_PRODUCTION_INCREASE_FARM                      :{BIG_FONT}{BLACK}Improved farming methods at {INDUSTRY} are expected to double production!
 
STR_NEWS_INDUSTRY_PRODUCTION_INCREASE_SMOOTH                    :{BIG_FONT}{BLACK}{STRING} production at {INDUSTRY} increases {COMMA}%!
 
STR_NEWS_INDUSTRY_PRODUCTION_DECREASE_GENERAL                   :{BIG_FONT}{BLACK}{INDUSTRY} production down by 50%
 
STR_NEWS_INDUSTRY_PRODUCTION_DECREASE_FARM                      :{BIG_FONT}{BLACK}Insect infestation causes havoc at {INDUSTRY}!{}Production down by 50%
 
STR_NEWS_INDUSTRY_PRODUCTION_DECREASE_SMOOTH                    :{BIG_FONT}{BLACK}{STRING} production at {INDUSTRY} decreases {COMMA}%!
 

	
 
STR_NEWS_TRAIN_IS_WAITING                                       :{WHITE}{VEHICLE} is waiting in depot
 
STR_NEWS_ROAD_VEHICLE_IS_WAITING                                :{WHITE}{VEHICLE} is waiting in depot
 
STR_NEWS_SHIP_IS_WAITING                                        :{WHITE}{VEHICLE} is waiting in depot
 
STR_NEWS_AIRCRAFT_IS_WAITING                                    :{WHITE}{VEHICLE} is waiting in the aircraft hangar
 

	
 
# Start of order review system
 
# DON'T ADD OR REMOVE LINES HERE
 
STR_NEWS_VEHICLE_HAS_TOO_FEW_ORDERS                             :{WHITE}{VEHICLE} has too few orders in the schedule
 
STR_NEWS_VEHICLE_HAS_VOID_ORDER                                 :{WHITE}{VEHICLE} has a void order
 
STR_NEWS_VEHICLE_HAS_DUPLICATE_ENTRY                            :{WHITE}{VEHICLE} has duplicate orders
 
STR_NEWS_VEHICLE_HAS_INVALID_ENTRY                              :{WHITE}{VEHICLE} has an invalid station in its orders
 
# end of order system
 

	
 
STR_NEWS_VEHICLE_IS_GETTING_OLD                                 :{WHITE}{VEHICLE} is getting old
 
STR_NEWS_VEHICLE_IS_GETTING_VERY_OLD                            :{WHITE}{VEHICLE} is getting very old
 
STR_NEWS_VEHICLE_IS_GETTING_VERY_OLD_AND                        :{WHITE}{VEHICLE} is getting very old and urgently needs replacing
 
STR_NEWS_TRAIN_IS_STUCK                                         :{WHITE}{VEHICLE} can't find a path to continue
 
STR_NEWS_VEHICLE_IS_LOST                                        :{WHITE}{VEHICLE} is lost
 
STR_NEWS_VEHICLE_IS_UNPROFITABLE                                :{WHITE}{VEHICLE}'s profit last year was {CURRENCY_LONG}
 
STR_NEWS_AIRCRAFT_DEST_TOO_FAR                                  :{WHITE}{VEHICLE} can't get to the next destination because it is out of range
 

	
 
STR_NEWS_ORDER_REFIT_FAILED                                     :{WHITE}{VEHICLE} stopped because an ordered refit failed
 
STR_NEWS_VEHICLE_AUTORENEW_FAILED                               :{WHITE}Autorenew failed on {VEHICLE}{}{STRING}
 

	
 
STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE                              :{BIG_FONT}{BLACK}New {STRING} now available!
 
STR_NEWS_NEW_VEHICLE_TYPE                                       :{BIG_FONT}{BLACK}{ENGINE}
 
STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE                    :{BLACK}New {STRING} now available!  -  {ENGINE}
 

	
 
STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO                        :{WHITE}{STATION} no longer accepts {STRING}
 
STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO               :{WHITE}{STATION} no longer accepts {STRING} or {STRING}
 
STR_NEWS_STATION_NOW_ACCEPTS_CARGO                              :{WHITE}{STATION} now accepts {STRING}
 
STR_NEWS_STATION_NOW_ACCEPTS_CARGO_AND_CARGO                    :{WHITE}{STATION} now accepts {STRING} and {STRING}
 

	
 
STR_NEWS_OFFER_OF_SUBSIDY_EXPIRED                               :{BIG_FONT}{BLACK}Offer of subsidy expired:{}{}{STRING} from {STRING2} to {STRING2} will now not attract a subsidy
 
STR_NEWS_SUBSIDY_WITHDRAWN_SERVICE                              :{BIG_FONT}{BLACK}Subsidy withdrawn:{}{}{STRING} service from {STRING2} to {STRING2} is no longer subsidised
 
STR_NEWS_SERVICE_SUBSIDY_OFFERED                                :{BIG_FONT}{BLACK}Service subsidy offered:{}{}First {STRING} service from {STRING2} to {STRING2} will attract a year's subsidy from the local authority!
 
STR_NEWS_SERVICE_SUBSIDY_AWARDED_HALF                           :{BIG_FONT}{BLACK}Service subsidy awarded to {RAW_STRING}!{}{}{STRING} service from {STRING2} to {STRING2} will pay 50% extra for the next year!
 
STR_NEWS_SERVICE_SUBSIDY_AWARDED_DOUBLE                         :{BIG_FONT}{BLACK}Service subsidy awarded to {RAW_STRING}!{}{}{STRING} service from {STRING2} to {STRING2} will pay double rates for the next year!
 
STR_NEWS_SERVICE_SUBSIDY_AWARDED_TRIPLE                         :{BIG_FONT}{BLACK}Service subsidy awarded to {RAW_STRING}!{}{}{STRING} service from {STRING2} to {STRING2} will pay triple rates for the next year!
 
STR_NEWS_SERVICE_SUBSIDY_AWARDED_QUADRUPLE                      :{BIG_FONT}{BLACK}Service subsidy awarded to {RAW_STRING}!{}{}{STRING} service from {STRING2} to {STRING2} will pay quadruple rates for the next year!
 

	
 
STR_NEWS_ROAD_REBUILDING                                        :{BIG_FONT}{BLACK}Traffic chaos in {TOWN}!{}{}Road rebuilding programme funded by {RAW_STRING} brings 6 months of misery to motorists!
 
STR_NEWS_EXCLUSIVE_RIGHTS_TITLE                                 :{BIG_FONT}{BLACK}Transport monopoly!
 
STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION                           :{BIG_FONT}{BLACK}Local authority of {TOWN} signs contract with {RAW_STRING} for one year of exclusive transport rights!
 

	
 
# Extra view window
 
STR_EXTRA_VIEW_PORT_TITLE                                       :{WHITE}Viewport {COMMA}
 
STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN                                :{BLACK}Copy to viewport
 
STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT                             :{BLACK}Copy the location of the main view to this viewport
 
STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW                                :{BLACK}Paste from viewport
 
STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT                             :{BLACK}Paste the location of this viewport to the main view
 

	
 
# Game options window
 
STR_GAME_OPTIONS_CAPTION                                        :{WHITE}Game Options
 
STR_GAME_OPTIONS_CURRENCY_UNITS_FRAME                           :{BLACK}Currency units
 
STR_GAME_OPTIONS_CURRENCY_UNITS_DROPDOWN_TOOLTIP                :{BLACK}Currency units selection
 

	
 
############ start of currency region
 
STR_GAME_OPTIONS_CURRENCY_GBP                                   :British Pound (GBP)
 
STR_GAME_OPTIONS_CURRENCY_USD                                   :American Dollar (USD)
 
STR_GAME_OPTIONS_CURRENCY_EUR                                   :Euro (EUR)
 
STR_GAME_OPTIONS_CURRENCY_JPY                                   :Japanese Yen (JPY)
 
STR_GAME_OPTIONS_CURRENCY_ATS                                   :Austrian Shilling (ATS)
 
STR_GAME_OPTIONS_CURRENCY_BEF                                   :Belgian Franc (BEF)
 
STR_GAME_OPTIONS_CURRENCY_CHF                                   :Swiss Franc (CHF)
 
STR_GAME_OPTIONS_CURRENCY_CZK                                   :Czech Koruna (CZK)
 
STR_GAME_OPTIONS_CURRENCY_DEM                                   :Deutschmark (DEM)
 
STR_GAME_OPTIONS_CURRENCY_DKK                                   :Danish Krone (DKK)
 
STR_GAME_OPTIONS_CURRENCY_ESP                                   :Spanish Peseta (ESP)
 
STR_GAME_OPTIONS_CURRENCY_FIM                                   :Finnish Markka (FIM)
 
STR_GAME_OPTIONS_CURRENCY_FRF                                   :French Franc (FRF)
 
STR_GAME_OPTIONS_CURRENCY_GRD                                   :Greek Drachma (GRD)
 
STR_GAME_OPTIONS_CURRENCY_HUF                                   :Hungarian Forint (HUF)
 
STR_GAME_OPTIONS_CURRENCY_ISK                                   :Icelandic Krona (ISK)
 
STR_GAME_OPTIONS_CURRENCY_ITL                                   :Italian Lira (ITL)
 
STR_GAME_OPTIONS_CURRENCY_NLG                                   :Dutch Guilder (NLG)
 
STR_GAME_OPTIONS_CURRENCY_NOK                                   :Norwegian Krone (NOK)
 
STR_GAME_OPTIONS_CURRENCY_PLN                                   :Polish ZÅ‚oty (PLN)
 
STR_GAME_OPTIONS_CURRENCY_RON                                   :Romanian Leu (RON)
 
STR_GAME_OPTIONS_CURRENCY_RUR                                   :Russian Rubles (RUR)
 
STR_GAME_OPTIONS_CURRENCY_SIT                                   :Slovenian Tolar (SIT)
 
STR_GAME_OPTIONS_CURRENCY_SEK                                   :Swedish Krona (SEK)
 
STR_GAME_OPTIONS_CURRENCY_TRY                                   :Turkish Lira (TRY)
 
STR_GAME_OPTIONS_CURRENCY_SKK                                   :Slovak Koruna (SKK)
 
STR_GAME_OPTIONS_CURRENCY_BRL                                   :Brazilian Real (BRL)
 
STR_GAME_OPTIONS_CURRENCY_EEK                                   :Estonian Krooni (EEK)
 
STR_GAME_OPTIONS_CURRENCY_LTL                                   :Lithuanian Litas (LTL)
 
STR_GAME_OPTIONS_CURRENCY_KRW                                   :South Korean Won (KRW)
 
STR_GAME_OPTIONS_CURRENCY_ZAR                                   :South African Rand (ZAR)
 
STR_GAME_OPTIONS_CURRENCY_CUSTOM                                :Custom...
 
############ end of currency region
 

	
 
STR_GAME_OPTIONS_MEASURING_UNITS_FRAME                          :{BLACK}Measuring units
 
STR_GAME_OPTIONS_MEASURING_UNITS_DROPDOWN_TOOLTIP               :{BLACK}Measuring units selection
 

	
 
############ start of measuring units region
 
STR_GAME_OPTIONS_MEASURING_UNITS_IMPERIAL                       :Imperial
 
STR_GAME_OPTIONS_MEASURING_UNITS_METRIC                         :Metric
 
STR_GAME_OPTIONS_MEASURING_UNITS_SI                             :SI
 
############ end of measuring units region
 

	
 
STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME                            :{BLACK}Road vehicles
 
STR_GAME_OPTIONS_ROAD_VEHICLES_DROPDOWN_TOOLTIP                 :{BLACK}Select side of road for vehicles to drive on
 
STR_GAME_OPTIONS_ROAD_VEHICLES_DROPDOWN_LEFT                    :Drive on left
 
STR_GAME_OPTIONS_ROAD_VEHICLES_DROPDOWN_RIGHT                   :Drive on right
 

	
 
STR_GAME_OPTIONS_TOWN_NAMES_FRAME                               :{BLACK}Town names
 
STR_GAME_OPTIONS_TOWN_NAMES_DROPDOWN_TOOLTIP                    :{BLACK}Select style of town names
 

	
 
############ start of townname region
 
STR_GAME_OPTIONS_TOWN_NAME_ORIGINAL_ENGLISH                     :English (Original)
 
STR_GAME_OPTIONS_TOWN_NAME_FRENCH                               :French
 
STR_GAME_OPTIONS_TOWN_NAME_GERMAN                               :German
 
STR_GAME_OPTIONS_TOWN_NAME_ADDITIONAL_ENGLISH                   :English (Additional)
 
STR_GAME_OPTIONS_TOWN_NAME_LATIN_AMERICAN                       :Latin-American
 
STR_GAME_OPTIONS_TOWN_NAME_SILLY                                :Silly
 
STR_GAME_OPTIONS_TOWN_NAME_SWEDISH                              :Swedish
 
STR_GAME_OPTIONS_TOWN_NAME_DUTCH                                :Dutch
 
STR_GAME_OPTIONS_TOWN_NAME_FINNISH                              :Finnish
 
STR_GAME_OPTIONS_TOWN_NAME_POLISH                               :Polish
 
STR_GAME_OPTIONS_TOWN_NAME_SLOVAK                               :Slovak
 
STR_GAME_OPTIONS_TOWN_NAME_NORWEGIAN                            :Norwegian
 
STR_GAME_OPTIONS_TOWN_NAME_HUNGARIAN                            :Hungarian
 
STR_GAME_OPTIONS_TOWN_NAME_AUSTRIAN                             :Austrian
 
STR_GAME_OPTIONS_TOWN_NAME_ROMANIAN                             :Romanian
 
STR_GAME_OPTIONS_TOWN_NAME_CZECH                                :Czech
 
STR_GAME_OPTIONS_TOWN_NAME_SWISS                                :Swiss
 
STR_GAME_OPTIONS_TOWN_NAME_DANISH                               :Danish
 
STR_GAME_OPTIONS_TOWN_NAME_TURKISH                              :Turkish
 
STR_GAME_OPTIONS_TOWN_NAME_ITALIAN                              :Italian
 
STR_GAME_OPTIONS_TOWN_NAME_CATALAN                              :Catalan
 
############ end of townname region
 

	
 
STR_GAME_OPTIONS_AUTOSAVE_FRAME                                 :{BLACK}Autosave
 
STR_GAME_OPTIONS_AUTOSAVE_DROPDOWN_TOOLTIP                      :{BLACK}Select interval between automatic game saves
 

	
 
STR_GAME_OPTIONS_AUTOSAVE_DROPDOWN_OFF                          :Off
 
STR_GAME_OPTIONS_AUTOSAVE_DROPDOWN_EVERY_1_MONTH                :Every month
 
STR_GAME_OPTIONS_AUTOSAVE_DROPDOWN_EVERY_3_MONTHS               :Every 3 months
 
STR_GAME_OPTIONS_AUTOSAVE_DROPDOWN_EVERY_6_MONTHS               :Every 6 months
 
STR_GAME_OPTIONS_AUTOSAVE_DROPDOWN_EVERY_12_MONTHS              :Every 12 months
 

	
 
STR_GAME_OPTIONS_LANGUAGE                                       :{BLACK}Language
 
STR_GAME_OPTIONS_LANGUAGE_TOOLTIP                               :{BLACK}Select the interface language to use
 

	
 
STR_GAME_OPTIONS_FULLSCREEN                                     :{BLACK}Fullscreen
 
STR_GAME_OPTIONS_FULLSCREEN_TOOLTIP                             :{BLACK}Check this box to play OpenTTD fullscreen mode
 

	
 
STR_GAME_OPTIONS_RESOLUTION                                     :{BLACK}Screen resolution
 
STR_GAME_OPTIONS_RESOLUTION_TOOLTIP                             :{BLACK}Select the screen resolution to use
 
STR_GAME_OPTIONS_RESOLUTION_OTHER                               :other
 

	
 
STR_GAME_OPTIONS_SCREENSHOT_FORMAT                              :{BLACK}Screenshot format
 
STR_GAME_OPTIONS_SCREENSHOT_FORMAT_TOOLTIP                      :{BLACK}Select the screenshot format to use
 

	
 
STR_GAME_OPTIONS_BASE_GRF                                       :{BLACK}Base graphics set
 
STR_GAME_OPTIONS_BASE_GRF_TOOLTIP                               :{BLACK}Select the base graphics set to use
 
STR_GAME_OPTIONS_BASE_GRF_STATUS                                :{RED}{NUM} missing/corrupted file{P "" s}
 
STR_GAME_OPTIONS_BASE_GRF_DESCRIPTION_TOOLTIP                   :{BLACK}Additional information about the base graphics set
 

	
 
STR_GAME_OPTIONS_BASE_SFX                                       :{BLACK}Base sounds set
 
STR_GAME_OPTIONS_BASE_SFX_TOOLTIP                               :{BLACK}Select the base sounds set to use
 
STR_GAME_OPTIONS_BASE_SFX_DESCRIPTION_TOOLTIP                   :{BLACK}Additional information about the base sounds set
 

	
 
STR_GAME_OPTIONS_BASE_MUSIC                                     :{BLACK}Base music set
 
STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP                             :{BLACK}Select the base music set to use
 
STR_GAME_OPTIONS_BASE_MUSIC_STATUS                              :{RED}{NUM} corrupted file{P "" s}
 
STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP                 :{BLACK}Additional information about the base music set
 

	
 
STR_ERROR_FULLSCREEN_FAILED                                     :{WHITE}Fullscreen mode failed
 

	
 
# Custom currency window
 

	
 
STR_CURRENCY_WINDOW                                             :{WHITE}Custom currency
 
STR_CURRENCY_EXCHANGE_RATE                                      :{LTBLUE}Exchange rate: {ORANGE}{CURRENCY_LONG} = £ {COMMA}
 
STR_CURRENCY_DECREASE_EXCHANGE_RATE_TOOLTIP                     :{BLACK}Decrease the amount of your currency for one Pound (£)
 
STR_CURRENCY_INCREASE_EXCHANGE_RATE_TOOLTIP                     :{BLACK}Increase the amount of your currency for one Pound (£)
 
STR_CURRENCY_SET_EXCHANGE_RATE_TOOLTIP                          :{BLACK}Set the exchange rate of your currency for one Pound (£)
 

	
 
STR_CURRENCY_SEPARATOR                                          :{LTBLUE}Separator: {ORANGE}{RAW_STRING}
 
STR_CURRENCY_SET_CUSTOM_CURRENCY_SEPARATOR_TOOLTIP              :{BLACK}Set the separator for your currency
 

	
 
STR_CURRENCY_PREFIX                                             :{LTBLUE}Prefix: {ORANGE}{RAW_STRING}
 
STR_CURRENCY_SET_CUSTOM_CURRENCY_PREFIX_TOOLTIP                 :{BLACK}Set the prefix string for your currency
 
STR_CURRENCY_SUFFIX                                             :{LTBLUE}Suffix: {ORANGE}{RAW_STRING}
 
STR_CURRENCY_SET_CUSTOM_CURRENCY_SUFFIX_TOOLTIP                 :{BLACK}Set the suffix string for your currency
 

	
 
STR_CURRENCY_SWITCH_TO_EURO                                     :{LTBLUE}Switch to Euro: {ORANGE}{NUM}
 
STR_CURRENCY_SWITCH_TO_EURO_NEVER                               :{LTBLUE}Switch to Euro: {ORANGE}never
 
STR_CURRENCY_SET_CUSTOM_CURRENCY_TO_EURO_TOOLTIP                :{BLACK}Set the year to switch to Euro
 
STR_CURRENCY_DECREASE_CUSTOM_CURRENCY_TO_EURO_TOOLTIP           :{BLACK}Switch to Euro earlier
 
STR_CURRENCY_INCREASE_CUSTOM_CURRENCY_TO_EURO_TOOLTIP           :{BLACK}Switch to Euro later
 

	
 
STR_CURRENCY_PREVIEW                                            :{LTBLUE}Preview: {ORANGE}{CURRENCY_LONG}
 
STR_CURRENCY_CUSTOM_CURRENCY_PREVIEW_TOOLTIP                    :{BLACK}10000 Pound (£) in your currency
 
STR_CURRENCY_CHANGE_PARAMETER                                   :{BLACK}Change custom currency parameter
 

	
 
# Difficulty level window
 
STR_DIFFICULTY_LEVEL_CAPTION                                    :{WHITE}Difficulty Level
 

	
 
############ range for difficulty levels starts
 
STR_DIFFICULTY_LEVEL_EASY                                       :{BLACK}Easy
 
STR_DIFFICULTY_LEVEL_MEDIUM                                     :{BLACK}Medium
 
STR_DIFFICULTY_LEVEL_HARD                                       :{BLACK}Hard
 
STR_DIFFICULTY_LEVEL_CUSTOM                                     :{BLACK}Custom
 
############ range for difficulty levels ends
 

	
 
STR_DIFFICULTY_LEVEL_HIGH_SCORE_BUTTON                          :{BLACK}Show hi-score chart
 
STR_DIFFICULTY_LEVEL_SAVE                                       :{BLACK}Save
 

	
 
############ range for difficulty settings starts
 
STR_DIFFICULTY_LEVEL_SETTING_MAXIMUM_NO_COMPETITORS             :{LTBLUE}Maximum no. competitors: {ORANGE}{COMMA}
 
STR_DIFFICULTY_LEVEL_SETTING_NO_OF_TOWNS                        :{LTBLUE}No. of towns: {ORANGE}{STRING}
 
STR_DIFFICULTY_LEVEL_SETTING_NO_OF_INDUSTRIES                   :{LTBLUE}No. of industries: {ORANGE}{STRING}
 
STR_DIFFICULTY_LEVEL_SETTING_MAXIMUM_INITIAL_LOAN_000           :{LTBLUE}Maximum initial loan: {ORANGE}{CURRENCY_LONG}
 
STR_DIFFICULTY_LEVEL_SETTING_INITIAL_INTEREST_RATE              :{LTBLUE}Initial interest rate: {ORANGE}{COMMA}%
 
STR_DIFFICULTY_LEVEL_SETTING_VEHICLE_RUNNING_COSTS              :{LTBLUE}Vehicle running costs: {ORANGE}{STRING}
 
STR_DIFFICULTY_LEVEL_SETTING_CONSTRUCTION_SPEED_OF_COMPETITOR   :{LTBLUE}Construction speed of competitors: {ORANGE}{STRING}
 
STR_DIFFICULTY_LEVEL_SETTING_VEHICLE_BREAKDOWNS                 :{LTBLUE}Vehicle breakdowns: {ORANGE}{STRING}
 
STR_DIFFICULTY_LEVEL_SETTING_SUBSIDY_MULTIPLIER                 :{LTBLUE}Subsidy multiplier: {ORANGE}{STRING}
 
STR_DIFFICULTY_LEVEL_SETTING_COST_OF_CONSTRUCTION               :{LTBLUE}Cost of construction: {ORANGE}{STRING}
 
STR_DIFFICULTY_LEVEL_SETTING_TERRAIN_TYPE                       :{LTBLUE}Terrain type: {ORANGE}{STRING}
 
STR_DIFFICULTY_LEVEL_SETTING_QUANTITY_OF_SEA_LAKES              :{LTBLUE}Quantity of sea/lakes: {ORANGE}{STRING}
 
STR_DIFFICULTY_LEVEL_SETTING_ECONOMY                            :{LTBLUE}Economy: {ORANGE}{STRING}
 
STR_DIFFICULTY_LEVEL_SETTING_TRAIN_REVERSING                    :{LTBLUE}Train reversing: {ORANGE}{STRING}
 
STR_DIFFICULTY_LEVEL_SETTING_DISASTERS                          :{LTBLUE}Disasters: {ORANGE}{STRING}
 
STR_DIFFICULTY_LEVEL_SETTING_CITY_APPROVAL                      :{LTBLUE}City council's attitude towards area restructuring: {ORANGE}{STRING}
 
############ range for difficulty settings ends
 

	
 
STR_NONE                                                        :None
 
STR_FUNDING_ONLY                                                :Funding only
 
STR_MINIMAL                                                     :Minimal
 
STR_NUM_VERY_LOW                                                :Very Low
 
STR_NUM_LOW                                                     :Low
 
STR_NUM_NORMAL                                                  :Normal
 
STR_NUM_HIGH                                                    :High
src/town_cmd.cpp
Show inline comments
 
@@ -2635,384 +2635,393 @@ CommandCost CmdDeleteTown(TileIndex tile
 
						}
 
					}
 
				}
 
				break;
 

	
 
			default:
 
				break;
 
		}
 
		if (try_clear) {
 
			CommandCost ret = DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
 
			if (ret.Failed()) return ret;
 
		}
 
	}
 

	
 
	/* The town destructor will delete the other things related to the town. */
 
	if (flags & DC_EXEC) delete t;
 

	
 
	return CommandCost();
 
}
 

	
 
/**
 
 * Factor in the cost of each town action.
 
 * @see TownActions
 
 */
 
const byte _town_action_costs[TACT_COUNT] = {
 
	2, 4, 9, 35, 48, 53, 117, 175
 
};
 

	
 
static CommandCost TownActionAdvertiseSmall(Town *t, DoCommandFlag flags)
 
{
 
	if (flags & DC_EXEC) {
 
		ModifyStationRatingAround(t->xy, _current_company, 0x40, 10);
 
	}
 
	return CommandCost();
 
}
 

	
 
static CommandCost TownActionAdvertiseMedium(Town *t, DoCommandFlag flags)
 
{
 
	if (flags & DC_EXEC) {
 
		ModifyStationRatingAround(t->xy, _current_company, 0x70, 15);
 
	}
 
	return CommandCost();
 
}
 

	
 
static CommandCost TownActionAdvertiseLarge(Town *t, DoCommandFlag flags)
 
{
 
	if (flags & DC_EXEC) {
 
		ModifyStationRatingAround(t->xy, _current_company, 0xA0, 20);
 
	}
 
	return CommandCost();
 
}
 

	
 
static CommandCost TownActionRoadRebuild(Town *t, DoCommandFlag flags)
 
{
 
	/* Check if the company is allowed to fund new roads. */
 
	if (!_settings_game.economy.fund_roads) return CMD_ERROR;
 

	
 
	if (flags & DC_EXEC) {
 
		t->road_build_months = 6;
 

	
 
		char company_name[MAX_LENGTH_COMPANY_NAME_CHARS * MAX_CHAR_LENGTH];
 
		SetDParam(0, _current_company);
 
		GetString(company_name, STR_COMPANY_NAME, lastof(company_name));
 

	
 
		char *cn = strdup(company_name);
 
		SetDParam(0, t->index);
 
		SetDParamStr(1, cn);
 

	
 
		AddNewsItem(STR_NEWS_ROAD_REBUILDING, NT_GENERAL, NF_NORMAL, NR_TOWN, t->index, NR_NONE, UINT32_MAX, cn);
 
	}
 
	return CommandCost();
 
}
 

	
 
/**
 
 * Check whether the land can be cleared.
 
 * @param tile Tile to check.
 
 * @return The tile can be cleared.
 
 */
 
static bool TryClearTile(TileIndex tile)
 
{
 
	Backup<CompanyByte> cur_company(_current_company, OWNER_NONE, FILE_LINE);
 
	CommandCost r = DoCommand(tile, 0, 0, DC_NONE, CMD_LANDSCAPE_CLEAR);
 
	cur_company.Restore();
 
	return r.Succeeded();
 
}
 

	
 
/** Structure for storing data while searching the best place to build a statue. */
 
struct StatueBuildSearchData {
 
	TileIndex best_position; ///< Best position found so far.
 
	int tile_count;          ///< Number of tiles tried.
 

	
 
	StatueBuildSearchData(TileIndex best_pos, int count) : best_position(best_pos), tile_count(count) { }
 
};
 

	
 
/**
 
 * Search callback function for #TownActionBuildStatue.
 
 * @param tile Tile on which to perform the search.
 
 * @param user_data Reference to the statue search data.
 
 * @return Result of the test.
 
 */
 
static bool SearchTileForStatue(TileIndex tile, void *user_data)
 
{
 
	static const int STATUE_NUMBER_INNER_TILES = 25; // Number of tiles int the center of the city, where we try to protect houses.
 

	
 
	StatueBuildSearchData *statue_data = (StatueBuildSearchData *)user_data;
 
	statue_data->tile_count++;
 

	
 
	/* Statues can be build on slopes, just like houses. Only the steep slopes is a no go. */
 
	if (IsSteepSlope(GetTileSlope(tile))) return false;
 
	/* Don't build statues under bridges. */
 
	if (MayHaveBridgeAbove(tile) && IsBridgeAbove(tile)) return false;
 

	
 
	/* A clear-able open space is always preferred. */
 
	if ((IsTileType(tile, MP_CLEAR) || IsTileType(tile, MP_TREES)) && TryClearTile(tile)) {
 
		statue_data->best_position = tile;
 
		return true;
 
	}
 

	
 
	bool house = IsTileType(tile, MP_HOUSE);
 

	
 
	/* Searching inside the inner circle. */
 
	if (statue_data->tile_count <= STATUE_NUMBER_INNER_TILES) {
 
		/* Save first house in inner circle. */
 
		if (house && statue_data->best_position == INVALID_TILE && TryClearTile(tile)) {
 
			statue_data->best_position = tile;
 
		}
 

	
 
		/* If we have reached the end of the inner circle, and have a saved house, terminate the search. */
 
		return statue_data->tile_count == STATUE_NUMBER_INNER_TILES && statue_data->best_position != INVALID_TILE;
 
	}
 

	
 
	/* Searching outside the circle, just pick the first possible spot. */
 
	statue_data->best_position = tile; // Is optimistic, the condition below must also hold.
 
	return house && TryClearTile(tile);
 
}
 

	
 
/**
 
 * Perform a 9x9 tiles circular search from the center of the town
 
 * in order to find a free tile to place a statue
 
 * @param t town to search in
 
 * @param flags Used to check if the statue must be built or not.
 
 * @return Empty cost or an error.
 
 */
 
static CommandCost TownActionBuildStatue(Town *t, DoCommandFlag flags)
 
{
 
	if (!Object::CanAllocateItem()) return_cmd_error(STR_ERROR_TOO_MANY_OBJECTS);
 

	
 
	TileIndex tile = t->xy;
 
	StatueBuildSearchData statue_data(INVALID_TILE, 0);
 
	if (!CircularTileSearch(&tile, 9, SearchTileForStatue, &statue_data)) return_cmd_error(STR_ERROR_STATUE_NO_SUITABLE_PLACE);
 

	
 
	if (flags & DC_EXEC) {
 
		Backup<CompanyByte> cur_company(_current_company, OWNER_NONE, FILE_LINE);
 
		DoCommand(statue_data.best_position, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR);
 
		cur_company.Restore();
 
		BuildObject(OBJECT_STATUE, statue_data.best_position, _current_company, t);
 
		SetBit(t->statues, _current_company); // Once found and built, "inform" the Town.
 
		MarkTileDirtyByTile(statue_data.best_position);
 
	}
 
	return CommandCost();
 
}
 

	
 
static CommandCost TownActionFundBuildings(Town *t, DoCommandFlag flags)
 
{
 
	/* Check if it's allowed to buy the rights */
 
	if (!_settings_game.economy.fund_buildings) return CMD_ERROR;
 

	
 
	if (flags & DC_EXEC) {
 
		/* Build next tick */
 
		t->grow_counter = 1;
 
		/* If we were not already growing */
 
		SetBit(t->flags, TOWN_IS_FUNDED);
 
		/* And grow for 3 months */
 
		t->fund_buildings_months = 3;
 

	
 
		SetWindowDirty(WC_TOWN_VIEW, t->index);
 
	}
 
	return CommandCost();
 
}
 

	
 
static CommandCost TownActionBuyRights(Town *t, DoCommandFlag flags)
 
{
 
	/* Check if it's allowed to buy the rights */
 
	if (!_settings_game.economy.exclusive_rights) return CMD_ERROR;
 

	
 
	if (flags & DC_EXEC) {
 
		t->exclusive_counter = 12;
 
		t->exclusivity = _current_company;
 

	
 
		ModifyStationRatingAround(t->xy, _current_company, 130, 17);
 

	
 
		SetWindowClassesDirty(WC_STATION_VIEW);
 

	
 
		/* Spawn news message */
 
		CompanyNewsInformation *cni = MallocT<CompanyNewsInformation>(1);
 
		cni->FillData(Company::Get(_current_company));
 
		SetDParam(0, STR_NEWS_EXCLUSIVE_RIGHTS_TITLE);
 
		SetDParam(1, STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION);
 
		SetDParam(2, t->index);
 
		SetDParamStr(3, cni->company_name);
 
		AddNewsItem(STR_MESSAGE_NEWS_FORMAT, NT_GENERAL, NF_COMPANY, NR_TOWN, t->index, NR_NONE, UINT32_MAX, cni);
 
	}
 
	return CommandCost();
 
}
 

	
 
static CommandCost TownActionBribe(Town *t, DoCommandFlag flags)
 
{
 
	if (flags & DC_EXEC) {
 
		if (Chance16(1, 14)) {
 
			/* set as unwanted for 6 months */
 
			t->unwanted[_current_company] = 6;
 

	
 
			/* set all close by station ratings to 0 */
 
			Station *st;
 
			FOR_ALL_STATIONS(st) {
 
				if (st->town == t && st->owner == _current_company) {
 
					for (CargoID i = 0; i < NUM_CARGO; i++) st->goods[i].rating = 0;
 
				}
 
			}
 

	
 
			/* only show errormessage to the executing player. All errors are handled command.c
 
			 * but this is special, because it can only 'fail' on a DC_EXEC */
 
			if (IsLocalCompany()) ShowErrorMessage(STR_ERROR_BRIBE_FAILED, INVALID_STRING_ID, WL_INFO);
 

	
 
			/* decrease by a lot!
 
			 * ChangeTownRating is only for stuff in demolishing. Bribe failure should
 
			 * be independent of any cheat settings
 
			 */
 
			if (t->ratings[_current_company] > RATING_BRIBE_DOWN_TO) {
 
				t->ratings[_current_company] = RATING_BRIBE_DOWN_TO;
 
				SetWindowDirty(WC_TOWN_AUTHORITY, t->index);
 
			}
 
		} else {
 
			ChangeTownRating(t, RATING_BRIBE_UP_STEP, RATING_BRIBE_MAXIMUM, DC_EXEC);
 
		}
 
	}
 
	return CommandCost();
 
}
 

	
 
typedef CommandCost TownActionProc(Town *t, DoCommandFlag flags);
 
static TownActionProc * const _town_action_proc[] = {
 
	TownActionAdvertiseSmall,
 
	TownActionAdvertiseMedium,
 
	TownActionAdvertiseLarge,
 
	TownActionRoadRebuild,
 
	TownActionBuildStatue,
 
	TownActionFundBuildings,
 
	TownActionBuyRights,
 
	TownActionBribe
 
};
 

	
 
/**
 
 * Get a list of available actions to do at a town.
 
 * @param nump if not NULL add put the number of available actions in it
 
 * @param cid the company that is querying the town
 
 * @param t the town that is queried
 
 * @return bitmasked value of enabled actions
 
 */
 
uint GetMaskOfTownActions(int *nump, CompanyID cid, const Town *t)
 
{
 
	int num = 0;
 
	TownActions buttons = TACT_NONE;
 

	
 
	/* Spectators and unwanted have no options */
 
	if (cid != COMPANY_SPECTATOR && !(_settings_game.economy.bribe && t->unwanted[cid])) {
 

	
 
		/* Things worth more than this are not shown */
 
		Money avail = Company::Get(cid)->money + _price[PR_STATION_VALUE] * 200;
 

	
 
		/* Check the action bits for validity and
 
		 * if they are valid add them */
 
		for (uint i = 0; i != lengthof(_town_action_costs); i++) {
 
			const TownActions cur = (TownActions)(1 << i);
 

	
 
			/* Is the company not able to bribe ? */
 
			if (cur == TACT_BRIBE && (!_settings_game.economy.bribe || t->ratings[cid] >= RATING_BRIBE_MAXIMUM)) continue;
 

	
 
			/* Is the company not able to buy exclusive rights ? */
 
			if (cur == TACT_BUY_RIGHTS && !_settings_game.economy.exclusive_rights) continue;
 

	
 
			/* Is the company not able to fund buildings ? */
 
			if (cur == TACT_FUND_BUILDINGS && !_settings_game.economy.fund_buildings) continue;
 

	
 
			/* Is the company not able to fund local road reconstruction? */
 
			if (cur == TACT_ROAD_REBUILD && !_settings_game.economy.fund_roads) continue;
 

	
 
			/* Is the company not able to build a statue ? */
 
			if (cur == TACT_BUILD_STATUE && HasBit(t->statues, cid)) continue;
 

	
 
			if (avail >= _town_action_costs[i] * _price[PR_TOWN_ACTION] >> 8) {
 
				buttons |= cur;
 
				num++;
 
			}
 
		}
 
	}
 

	
 
	if (nump != NULL) *nump = num;
 
	return buttons;
 
}
 

	
 
/**
 
 * Do a town action.
 
 * This performs an action such as advertising, building a statue, funding buildings,
 
 * but also bribing the town-council
 
 * @param tile unused
 
 * @param flags type of operation
 
 * @param p1 town to do the action at
 
 * @param p2 action to perform, @see _town_action_proc for the list of available actions
 
 * @param text unused
 
 * @return the cost of this operation or an error
 
 */
 
CommandCost CmdDoTownAction(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
 
{
 
	Town *t = Town::GetIfValid(p1);
 
	if (t == NULL || p2 >= lengthof(_town_action_proc)) return CMD_ERROR;
 

	
 
	if (!HasBit(GetMaskOfTownActions(NULL, _current_company, t), p2)) return CMD_ERROR;
 

	
 
	CommandCost cost(EXPENSES_OTHER, _price[PR_TOWN_ACTION] * _town_action_costs[p2] >> 8);
 

	
 
	CommandCost ret = _town_action_proc[p2](t, flags);
 
	if (ret.Failed()) return ret;
 

	
 
	if (flags & DC_EXEC) {
 
		SetWindowDirty(WC_TOWN_AUTHORITY, p1);
 
	}
 

	
 
	return cost;
 
}
 

	
 
static void UpdateTownRating(Town *t)
 
{
 
	/* Increase company ratings if they're low */
 
	const Company *c;
 
	FOR_ALL_COMPANIES(c) {
 
		if (t->ratings[c->index] < RATING_GROWTH_MAXIMUM) {
 
			t->ratings[c->index] = min((int)RATING_GROWTH_MAXIMUM, t->ratings[c->index] + RATING_GROWTH_UP_STEP);
 
		}
 
	}
 

	
 
	const Station *st;
 
	FOR_ALL_STATIONS(st) {
 
		if (DistanceSquare(st->xy, t->xy) <= t->cache.squared_town_zone_radius[0]) {
 
			if (st->time_since_load <= 20 || st->time_since_unload <= 20) {
 
				if (Company::IsValidID(st->owner)) {
 
					int new_rating = t->ratings[st->owner] + RATING_STATION_UP_STEP;
 
					t->ratings[st->owner] = min(new_rating, INT16_MAX); // do not let it overflow
 
				}
 
			} else {
 
				if (Company::IsValidID(st->owner)) {
 
					int new_rating = t->ratings[st->owner] + RATING_STATION_DOWN_STEP;
 
					t->ratings[st->owner] = max(new_rating, INT16_MIN);
 
				}
 
			}
 
		}
 
	}
 

	
 
	/* clamp all ratings to valid values */
 
	for (uint i = 0; i < MAX_COMPANIES; i++) {
 
		t->ratings[i] = Clamp(t->ratings[i], RATING_MINIMUM, RATING_MAXIMUM);
 
	}
 

	
 
	SetWindowDirty(WC_TOWN_AUTHORITY, t->index);
 
}
 

	
 
static void UpdateTownGrowRate(Town *t)
 
{
 
	ClrBit(t->flags, TOWN_IS_FUNDED);
 
	SetWindowDirty(WC_TOWN_VIEW, t->index);
 

	
 
	if (_settings_game.economy.town_growth_rate == 0 && t->fund_buildings_months == 0) return;
 

	
 
	if (t->fund_buildings_months == 0) {
 
		/* Check if all goals are reached for this town to grow (given we are not funding it) */
 
		for (int i = TE_BEGIN; i < TE_END; i++) {
 
			switch (t->goal[i]) {
 
				case TOWN_GROWTH_WINTER:
 
					if (TileHeight(t->xy) >= GetSnowLine() && t->received[i].old_act == 0 && t->cache.population > 90) return;
 
					break;
 
				case TOWN_GROWTH_DESERT:
 
					if (GetTropicZone(t->xy) == TROPICZONE_DESERT && t->received[i].old_act == 0 && t->cache.population > 60) return;
 
					break;
 
				default:
 
					if (t->goal[i] > t->received[i].old_act) return;
 
					break;
 
			}
 
		}
 
	}
 

	
 
	if ((t->growth_rate & TOWN_GROW_RATE_CUSTOM) != 0) {
 
		SetBit(t->flags, TOWN_IS_FUNDED);
 
		SetWindowDirty(WC_TOWN_VIEW, t->index);
 
		return;
0 comments (0 inline, 0 general)