1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +00:00
OpenMW/apps/openmw/mwscript/globalscripts.hpp

37 lines
710 B
C++
Raw Normal View History

2010-07-04 10:43:34 +02:00
#ifndef GAME_SCRIPT_GLOBALSCRIPTS_H
#define GAME_SCRIPT_GLOBALSCRIPTS_H
#include <string>
#include <map>
#include "locals.hpp"
2012-10-01 19:17:04 +04:00
namespace MWWorld
2010-07-04 10:43:34 +02:00
{
struct ESMStore;
}
namespace MWScript
{
class GlobalScripts
{
2012-10-01 19:17:04 +04:00
const MWWorld::ESMStore& mStore;
std::map<std::string, std::pair<bool, Locals> > mScripts; // running, local variables
2010-07-04 10:43:34 +02:00
public:
2012-10-01 19:17:04 +04:00
GlobalScripts (const MWWorld::ESMStore& store);
2010-07-04 10:43:34 +02:00
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
2010-07-04 10:43:34 +02:00
};
}
#endif