46 for (pCom=
Command; pCom; pCom=pNext)
49 if (pCom==pUntil) pNext=
nullptr;
51 else pNext=pCom->
Next;
61 int32_t iUpdateInterval,
C4Object *pTarget2,
62 bool fInitEvaluation,
C4Value iData,
bool fAppend,
63 int32_t iRetries,
C4String *szText, int32_t iBaseMode)
66 const int32_t MaxCommandStack = 35;
67 C4Command *pCom,*pLast; int32_t iCommands;
68 for (pCom=
Command,iCommands=0; pCom; pCom=pCom->
Next,iCommands++) {}
69 if (iCommands>=MaxCommandStack)
return false;
74 pCom->
Set(iCommand,
this,pTarget,iTx,iTy,pTarget2,iData,
75 iUpdateInterval,!fInitEvaluation,iRetries,szText,iBaseMode);
80 if (pLast) pLast->
Next=pCom;
139 AddCommand(iCommand,pTarget,iTx,iTy,0,pTarget2,
true,iData,
false,iRetries,szText,
C4CMD_Mode_Base);
146 if (pCom->Command == iCommandType)
return pCom;
180 if (!pUnusedObject)
return false;
const char * CommandName(int32_t iCommand)
const int32_t C4CMD_Mode_Base
const int32_t C4CMD_First
const int32_t C4D_VehicleControl_Outside
const int32_t C4D_VehicleControl_Inside
#define PSF_ControlCommand
#define PSF_GetObject2Drop
#define PSF_ControlCommandFinished
bool ObjectComPut(C4Object *cObj, C4Object *pTarget, C4Object *pThing)
bool ObjectComDrop(C4Object *cObj, C4Object *pThing)
bool Inside(T ival, U lbound, V rbound)
C4Value Exec(C4PropList *p=nullptr, C4AulParSet *pPars=nullptr, bool fPassErrors=false)
void Set(int32_t iCommand, C4Object *pObj, C4Object *pTarget, C4Value iTx, int32_t iTy, C4Object *pTarget2, C4Value iData, int32_t iUpdateInterval, bool fEvaluated, int32_t iRetries, C4String *szText, int32_t iBaseMode)
void ClearCommand(C4Command *pUntil)
bool PutAwayUnusedObject(C4Object *pToMakeRoomForObject)
bool AddCommand(int32_t iCommand, C4Object *pTarget, C4Value iTx, int32_t iTy=0, int32_t iUpdateInterval=0, C4Object *pTarget2=nullptr, bool fInitEvaluation=true, C4Value iData=C4VNull, bool fAppend=false, int32_t iRetries=0, C4String *szText=nullptr, int32_t iBaseMode=0)
void SetCommand(int32_t iCommand, C4Object *pTarget, C4Value iTx, int32_t iTy=0, C4Object *pTarget2=nullptr, bool fControl=false, C4Value iData=C4VNull, int32_t iRetries=0, C4String *szText=nullptr)
int32_t GetProcedure() const
bool CloseMenu(bool fForce)
C4Command * FindCommand(int32_t iCommandType) const
C4NotifyingObjectList Contents
C4Object * GetLastObject() const
C4AulFunc * GetFunc(C4PropertyName k) const
C4Value Call(C4PropertyName k, C4AulParSet *pPars=nullptr, bool fPassErrors=false)
C4Object * getObj() const