Add: [Script] Framework for cloning selected ScriptObject
This commit is contained in:
@@ -105,6 +105,12 @@ protected:
|
||||
*/
|
||||
virtual bool LoadObject(HSQUIRRELVM) { return false; }
|
||||
|
||||
/**
|
||||
* Clone an object.
|
||||
* @return The clone if cloning this type is supported, nullptr otherwise.
|
||||
*/
|
||||
virtual ScriptObject *CloneObject() { return nullptr; }
|
||||
|
||||
public:
|
||||
/**
|
||||
* Store the latest result of a DoCommand per company.
|
||||
@@ -136,6 +142,16 @@ public:
|
||||
*/
|
||||
static void InitializeRandomizers();
|
||||
|
||||
/**
|
||||
* Used when trying to instanciate ScriptObject from squirrel.
|
||||
*/
|
||||
static SQInteger Constructor(HSQUIRRELVM);
|
||||
|
||||
/**
|
||||
* Used for 'clone' from squirrel.
|
||||
*/
|
||||
static SQInteger _cloned(HSQUIRRELVM);
|
||||
|
||||
protected:
|
||||
template <Commands TCmd, typename T> struct ScriptDoCommandHelper;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user