/usr/share/games/colobot/ai/tremot1b.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 | extern void object::Slave( )
{
float order;
errmode(0); // don't stop on errors
while ( true )
{
// wait for order completion ...
while ( !testinfo("order", 100) )
{
wait(1);
}
// get the order
order = receive("order", 100);
if ( order == 1 )
{
message("grab( )");
grab();
}
else if ( order == 2 )
{
message("drop( )");
drop();
}
else if ( order == 3 )
{
message("move(10)");
move(10);
}
else if ( order == 4 )
{
message("move(-10)");
move(-10);
}
else
{
message("Unknown order");
}
// signal "end of work"
deleteinfo("order", 100);
}
}
|