# ai_scanner.cpp File Reference

allows scanning AI scripts More...

`#include "../stdafx.h"`
`#include "../debug.h"`
`#include "../fileio_func.h"`
`#include "../network/network.h"`
`#include "../core/random_func.hpp"`
`#include <squirrel.h>`
`#include "../script/squirrel.hpp"`
`#include "../script/squirrel_helper.hpp"`
`#include "../script/squirrel_class.hpp"`
`#include "ai_info.hpp"`
`#include "ai_scanner.hpp"`
`#include "api/ai_controller.hpp"`
`#include "../network/network_content.h"`
`#include "../3rdparty/md5/md5.h"`
`#include "../tar_type.h"`

Go to the source code of this file.

## Data Structures
struct | AIFileChecksumCreator
| Helper for creating a MD5sum of all files within of an AI. More...
## Functions
static bool | IsSameAI (const ContentInfo *ci, bool md5sum, AIFileInfo *info)
| Check whether the AI given in info is the same as in ci based on the shortname and md5 sum.

## Detailed Description

allows scanning AI scripts

Definition in file ai_scanner.cpp.

## Function Documentation

static bool IsSameAI | ( | const ContentInfo * | ci,
|  | bool | md5sum,
|  | AIFileInfo * | info |
| ) |  |  | `[static]`

Check whether the AI given in info is the same as in ci based on the shortname and md5 sum.

Parameters:

  | ci | the information to compare to
  | md5sum | whether to check the MD5 checksum
  | info | the AI to get the shortname and md5 sum from

Returns:
  true iff they're the same

Definition at line 392 of file ai_scanner.cpp.

References AIFileChecksumCreator::AddFile(), ScriptFileInfo::GetMainScript(), ScriptFileInfo::GetShortName(), lastof, AIFileChecksumCreator::md5sum, ContentInfo::md5sum, FileScanner::Scan(), seprintf(), strecpy(), and ContentInfo::unique_id.