24 lines
955 B
Plaintext
24 lines
955 B
Plaintext
![]() |
\b;Instruction \c;buildingenabled\n;
|
||
|
The instruction \c;buildingenabled();\n; lets you know if a building of the given \l;category\u cbot\category; can be built in the level.
|
||
|
|
||
|
\b;Basic use
|
||
|
It is similar to the \c;\l;canbuild();\u cbot\canbuild;\n; instruction. However, it does not check if a required research has been done.
|
||
|
\c;
|
||
|
\s; \l;if\u cbot\if; (buildingenabled(\l;BotFactory\u object\factory;))
|
||
|
\s; {
|
||
|
\s; build(\l;BotFactory\u object\factory;);
|
||
|
\s; }
|
||
|
\n;
|
||
|
\b;For specialists
|
||
|
Syntax:
|
||
|
\s;\c;buildingenabled ( cat );\n;
|
||
|
|
||
|
\t;cat: \c;\l;int\u cbot\int;\n;
|
||
|
\l;Category\u cbot\category; of a building.
|
||
|
|
||
|
\t;Return value: \c;\l;bool\u cbot\bool;\n;
|
||
|
\c;true\n; if the building can be built in the level even if required research has not been done, \c;false\n; otherwise.
|
||
|
|
||
|
\t;See also
|
||
|
\l;build\u cbot\build;, \l;canbuild\u cbot\canbuild;, \l;ResearchCenter\u object\research;, \l;programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;.
|