tree_cmd.c
changeset 872 9b946bdc80d1
parent 866 d242235e6485
child 874 13d226a63762
equal deleted inserted replaced
871:0143ae5b4112 872:9b946bdc80d1
   179 					MarkTileDirtyByTile(ti.tile);
   179 					MarkTileDirtyByTile(ti.tile);
   180 				}
   180 				}
   181 				// 2x as expensive to add more trees to an existing tile
   181 				// 2x as expensive to add more trees to an existing tile
   182 				cost += _price.build_trees * 2;
   182 				cost += _price.build_trees * 2;
   183 			} else {
   183 			} else {
   184 				// don't allow building on rocks
   184 				if (ti.type != MP_CLEAR || _map_owner[ti.tile] != OWNER_NONE) {
   185 				if (ti.type != MP_CLEAR || _map_owner[ti.tile] != OWNER_NONE || (ti.map5 & 0x1C) == 8) {
       
   186 					_error_message = STR_2804_SITE_UNSUITABLE;
   185 					_error_message = STR_2804_SITE_UNSUITABLE;
   187 					continue;
   186 					continue;
   188 				}
   187 				}
   189 
   188 
   190 				// it's expensive to clear farmland
   189 				// it's expensive to clear farmland
   191 				if ((ti.map5 & 0x1F) == 0xF) cost += _price.clear_3;
   190 				if ((ti.map5 & 0x1F) == 0xF) cost += _price.clear_3;
       
   191 				else if ((ti.map5 & 0x1C) == 8) cost += _price.clear_2;
   192 
   192 
   193 				if (flags & DC_EXEC) {
   193 				if (flags & DC_EXEC) {
   194 					int m2;
   194 					int m2;
   195 
   195 
   196 					if (_game_mode != GM_EDITOR && _current_player < MAX_PLAYERS) {
   196 					if (_game_mode != GM_EDITOR && _current_player < MAX_PLAYERS) {