colobot-data/ai/charge2.txt

19 lines
473 B
Plaintext

extern void object::Recharge2()
{
point start; // variable for initial pos.
object item; // info. about power station
start = position; // store initial position
item = radar(PowerStation); // look for station
goto(item.position); // go to the power station
while ( energyCell.energyLevel < 1 )
{
wait(1); // wait until recharged
}
goto(start); // go back to initial pos.
message("Recharge completed");
}