1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-09 12:42:11 +00:00
OpenMW/apps/openmw/mwscript/globalscripts.hpp

37 lines
710 B
C++
Raw Normal View History

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