Colobot
Loading...
Searching...
No Matches
CScript Class Reference

Public Member Functions

 CScript (COldObject *object)
void PutScript (Ui::CEdit *edit, const char *name)
bool GetScript (Ui::CEdit *edit)
bool GetCompile ()
const std::string & GetTitle ()
void SetStepMode (bool bStep)
bool GetStepMode ()
bool Run ()
bool Continue ()
bool Step ()
void Stop ()
bool IsRunning ()
bool IsContinue ()
bool GetCursor (int &cursor1, int &cursor2)
void UpdateList (Ui::CList *list)
bool IntroduceVirus ()
int GetError ()
void GetError (std::string &error)
void New (Ui::CEdit *edit, const char *name)
bool SendScript (const char *text)
bool ReadScript (const char *filename)
bool WriteScript (const char *filename)
bool ReadStack (std::istream &istr)
bool WriteStack (std::ostream &ostr)
bool Compare (CScript *other)
void SetFilename (const std::string &filename)
const std::string & GetFilename ()

Static Public Member Functions

static void ColorizeScript (Ui::CEdit *edit, int rangeStart=0, int rangeEnd=std::numeric_limits< int >::max())

Protected Member Functions

bool IsEmpty ()
bool CheckToken ()
bool Compile ()

Protected Attributes

COldObjectm_object = nullptr
CTaskExecutorObjectm_taskExecutor = nullptr
Gfx::CEnginem_engine = nullptr
Ui::CInterfacem_interface = nullptr
std::unique_ptr< CBot::CBotProgramm_botProg
CRobotMainm_main = nullptr
Gfx::CTerrainm_terrain = nullptr
Gfx::CWaterm_water = nullptr
int m_ipf = 0
int m_errMode = 0
int m_len = 0
std::unique_ptr< char[]> m_script
bool m_bRun = false
bool m_bStepMode = false
bool m_bContinue = false
bool m_bCompile = false
std::string m_title = ""
std::string m_mainFunction = ""
std::string m_filename = ""
std::string m_token = ""
int m_tokenUsed = 0
int m_tokenAllowed = 0
CBot::CBotError m_error = CBot::CBotNoErr
int m_cursor1 = 0
int m_cursor2 = 0
boost::optional< float > m_returnValue = boost::none

Friends

class CScriptFunctions

The documentation for this class was generated from the following files: