Colobot
|
Public Member Functions | |
CProgramStorageObjectImpl (ObjectInterfaceTypes &types, CObject *object) | |
bool | IntroduceVirus () override |
void | SetActiveVirus (bool bActive) override |
bool | GetActiveVirus () override |
Checks virus active status. More... | |
bool | ReadProgram (Program *program, const std::string &filename) override |
Read program from a given file. More... | |
bool | WriteProgram (Program *program, const std::string &filename) override |
Write program to a given file. More... | |
bool | GetCompile (Program *program) override |
Check if program was compiled successfully. More... | |
Program * | AddProgram () override |
Add a new program. More... | |
void | AddProgram (std::unique_ptr< Program > program) override |
Add given program to the program list stored in this robot. More... | |
void | RemoveProgram (Program *program) override |
Remove program. More... | |
Program * | CloneProgram (Program *program) override |
Clone a program. More... | |
std::vector< std::unique_ptr< Program > > & | GetPrograms () override |
Return a std::vector of all available programs. More... | |
int | GetProgramCount () override |
Return count of all programs. More... | |
Program * | GetProgram (int index) override |
Return program with the given index. More... | |
Program * | GetOrAddProgram (int index) override |
Return program at the given index (creating it and all previous ones as needed) More... | |
int | GetProgramIndex (Program *program) override |
Return index in the list of given Program instance. More... | |
void | SetProgramStorageIndex (int programStorageIndex) override |
Set index for use in filename for saved programs (-1 to disable) More... | |
int | GetProgramStorageIndex () override |
Return index that is used while saving programs. More... | |
void | SaveAllUserPrograms (const std::string &userSource) override |
Save all user programs. More... | |
void | LoadAllProgramsForLevel (CLevelParserLine *levelSource, const std::string &userSource, bool loadSoluce) override |
Load all programs when loading the level including previously saved user programs. More... | |
void | SaveAllProgramsForSavedScene (CLevelParserLine *levelSourceLine, const std::string &levelSource) override |
Save all programs when saving the saved scene. More... | |
void | LoadAllProgramsForSavedScene (CLevelParserLine *levelSourceLine, const std::string &levelSource) override |
Load all programs when loading the saved scene. More... | |
![]() | |
CProgramStorageObject (ObjectInterfaceTypes &types) | |
|
overridevirtual |
Infects a random program of a robot with virus
Implements CProgramStorageObject.
|
overridevirtual |
Sets the virus as active, this controls the "Program infected" message and is cleared after you edit the program. Note that this status is independent from the virus particles (see COldObject::SetVirusMode for that)
Implements CProgramStorageObject.
|
overridevirtual |
Checks virus active status.
Implements CProgramStorageObject.
|
overridevirtual |
Read program from a given file.
Implements CProgramStorageObject.
|
overridevirtual |
Write program to a given file.
Implements CProgramStorageObject.
|
overridevirtual |
Check if program was compiled successfully.
Implements CProgramStorageObject.
|
overridevirtual |
Add a new program.
Implements CProgramStorageObject.
|
overridevirtual |
Add given program to the program list stored in this robot.
Implements CProgramStorageObject.
|
overridevirtual |
Remove program.
Implements CProgramStorageObject.
Clone a program.
Implements CProgramStorageObject.
|
overridevirtual |
Return a std::vector of all available programs.
Implements CProgramStorageObject.
|
overridevirtual |
Return count of all programs.
Implements CProgramStorageObject.
|
overridevirtual |
Return program with the given index.
Implements CProgramStorageObject.
|
overridevirtual |
Return program at the given index (creating it and all previous ones as needed)
Implements CProgramStorageObject.
|
overridevirtual |
Return index in the list of given Program instance.
Implements CProgramStorageObject.
|
overridevirtual |
Set index for use in filename for saved programs (-1 to disable)
Implements CProgramStorageObject.
|
overridevirtual |
Return index that is used while saving programs.
Implements CProgramStorageObject.
|
overridevirtual |
Save all user programs.
Implements CProgramStorageObject.
|
overridevirtual |
Load all programs when loading the level including previously saved user programs.
Implements CProgramStorageObject.
|
overridevirtual |
Save all programs when saving the saved scene.
Implements CProgramStorageObject.
|
overridevirtual |
Load all programs when loading the saved scene.
Implements CProgramStorageObject.