/usr/share/games/colobot/ai/titan3.txt is in colobot-common 0.1.6-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | extern void object::CollectTitanium3()
{
// 1) Variable definition.
object item; // info. about objects
while (true) // repeat forever
{
// 2) Go to the titanium ore and grab it.
item = radar(TitaniumOre);// look for titanium ore
goto(item.position); // go to the position
grab(); // grab the titanium
// 3) Go to the converter and drop it.
item = radar(Converter); // look for converter
goto(item.position); // go to the position
drop(); // drop the titanium
move(-2.5); // step back 2.5 m
// 4) Wait until titanium converted and grabs
do
{
wait(1); // wait for cube
item = radar(Titanium, 0, 45, 0, 5);
}
while ( item == null );
goto(item.position);
grab(); // take it
// 5) Go to free space and drop it
goto(space(position)); // go to free space
drop(); // drop titanium
// If power cell half empty, recharges.
if ( energyCell.energyLevel < 0.5 )
{ // if so:
item = radar(PowerStation);
if ( item != null ) // station found ?
{
goto(item.position); // go there
while ( energyCell.energyLevel < 1 )
{ // until recharged:
wait(1); // wait
}
}
}
}
}
|