You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
737 B
C++
39 lines
737 B
C++
#ifndef GAME_SCRIPT_GLOBALSCRIPTS_H
|
|
#define GAME_SCRIPT_GLOBALSCRIPTS_H
|
|
|
|
#include <string>
|
|
#include <map>
|
|
|
|
#include "locals.hpp"
|
|
|
|
namespace MWWorld
|
|
{
|
|
struct ESMStore;
|
|
}
|
|
|
|
namespace MWScript
|
|
{
|
|
class GlobalScripts
|
|
{
|
|
const MWWorld::ESMStore& mStore;
|
|
std::map<std::string, std::pair<bool, Locals> > mScripts; // running, local variables
|
|
|
|
public:
|
|
|
|
GlobalScripts (const MWWorld::ESMStore& store);
|
|
|
|
void reset();
|
|
|
|
void addScript (const std::string& name);
|
|
|
|
void removeScript (const std::string& name);
|
|
|
|
bool isRunning (const std::string& name) const;
|
|
|
|
void run();
|
|
///< run all active global scripts
|
|
};
|
|
}
|
|
|
|
#endif
|