forked from Mirrors/openclonk
Add CreatePropList script function
Is this needed?
parent
bf839b9a66
commit
79f8d5496a
|
@ -31,6 +31,7 @@ class C4PropList {
|
|||
void ResetProperty(C4String * k);
|
||||
|
||||
C4PropList();
|
||||
C4PropList(C4PropList * prototype);
|
||||
virtual ~C4PropList();
|
||||
|
||||
protected:
|
||||
|
|
|
@ -34,6 +34,11 @@ C4PropList::C4PropList():
|
|||
{
|
||||
}
|
||||
|
||||
C4PropList::C4PropList(C4PropList * prototype):
|
||||
FirstRef(NULL), prototype(prototype)
|
||||
{
|
||||
}
|
||||
|
||||
C4PropList::~C4PropList()
|
||||
{
|
||||
assert(!FirstRef);
|
||||
|
|
|
@ -964,6 +964,11 @@ static C4String *FnGetAction(C4AulContext *cthr, C4Object *pObj)
|
|||
return String(pObj->Def->ActMap[pObj->Action.Act].Name);
|
||||
}
|
||||
|
||||
static C4PropList * FnCreatePropList(C4AulContext *cthr, C4PropList * prototype)
|
||||
{
|
||||
return new C4PropList(prototype);
|
||||
}
|
||||
|
||||
static C4Value FnGetProperty_C4V(C4AulContext *cthr, C4Value * key_C4V, C4Value * pObj_C4V)
|
||||
{
|
||||
C4PropList * pObj = pObj_C4V->_getPropList();
|
||||
|
@ -6582,6 +6587,7 @@ void InitFunctionMap(C4AulScriptEngine *pEngine)
|
|||
AddFunc(pEngine, "SetYDir", FnSetYDir);
|
||||
AddFunc(pEngine, "SetR", FnSetR);
|
||||
AddFunc(pEngine, "SetOwner", FnSetOwner);
|
||||
AddFunc(pEngine, "CreatePropList", FnCreatePropList);
|
||||
AddFunc(pEngine, "CreateObject", FnCreateObject);
|
||||
AddFunc(pEngine, "MakeCrewMember", FnMakeCrewMember);
|
||||
AddFunc(pEngine, "GrabObjectInfo", FnGrabObjectInfo);
|
||||
|
|
Loading…
Reference in New Issue