mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Implemented the context management part of the ScriptManager
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@61 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -55,7 +55,10 @@ class OptionalScript {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/// Initialize things this script depends on by adding dep to their list of dependent scripts
|
||||
void initDependencies(Context&, const Dependency& dep) const;
|
||||
|
||||
private:
|
||||
ScriptP script; ///< The script, may be null if there is no script
|
||||
String unparsed; ///< Unparsed script, for writing back to a file
|
||||
@@ -83,6 +86,10 @@ class Scriptable {
|
||||
return script.invokeOn(ctx, value);
|
||||
}
|
||||
|
||||
inline void initDependencies(Context& ctx, const Dependency& dep) const {
|
||||
script.initDependencies(ctx, dep);
|
||||
}
|
||||
|
||||
private:
|
||||
T value; ///< The actual value
|
||||
OptionalScript script; ///< The optional script
|
||||
|
||||
Reference in New Issue
Block a user