more scripting features (dynamic fields)

This commit is contained in:
Eduardo Bart
2011-05-02 01:13:57 -03:00
parent f7bb044f48
commit 9e90ae0ee4
19 changed files with 378 additions and 146 deletions

View File

@@ -31,9 +31,15 @@ class Scriptable : public boost::enable_shared_from_this<Scriptable>
{
public:
virtual const char *getScriptableName() const { return NULL; }
void associateLuaRef(const std::string& refName, int refId);
int getLuaRef(const std::string& refName);
void clearLuaRefs();
private:
std::map<std::string, int> m_luaRefs;
};
typedef boost::shared_ptr<Scriptable> ScriptablePtr;
typedef boost::weak_ptr<Scriptable> ScriptableWeakPtr;
#endif