Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

CHG: Only founding a city when accout is positive

git-svn-id: svn://tron.homeunix.org/simutrans/simutrans/trunk@5754 8aca7d54-2c30-db11-9de9-000461428c89
  • Loading branch information...
commit 97c302beccbd0f9e6607f6d2e1bd76667a9221e0 1 parent 3de8ab2
Markus Pristovsek authored
Showing with 7 additions and 0 deletions.
  1. +1 −0  simutrans/history.txt
  2. +6 −0 simwerkz.cc
View
1  simutrans/history.txt
@@ -17,6 +17,7 @@
ADD: (kierongreen) powerline tunnels: allow_undergroud_transformers=1 (default) will allow transformers below ground
FIX: deleting tunnel ground was booked twice
FIX: deleting tunnel ground charged for way on tunnel, which is not charged when building
+ CNG: Only founding a city when accout is positive
Release of 111.2.2 (r5583 on 20-Mar-2012):
View
6 simwerkz.cc
@@ -1496,6 +1496,12 @@ const char *wkz_transformer_t::work( karte_t *welt, spieler_t *sp, koord3d k )
*/
const char *wkz_add_city_t::work( karte_t *welt, spieler_t *sp, koord3d pos )
{
+ // has enough money for this?
+ if( sp!=welt->get_spieler(1) && sp->get_konto_als_double()<0.0 ) {
+ // fail without enough funds
+ return "";
+ }
+
grund_t *gr = welt->lookup_kartenboden(pos.get_2d());
if(gr) {
if(gr->ist_natur() &&
Please sign in to comment.
Something went wrong with that request. Please try again.