/* called by: entrance ctrl of the object 'track'
: R9 q, v3 W: R5 J( z" S*/
' q0 P! b. V* Iis) g5 h, [# N- q& E+ D0 B
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: n* r6 }: p% W! E# s, w0 @) Pdo* a3 s9 k- M' f1 m) G5 b: Z! g; A
Lan := rootfolder.Internal.Tools.AOLlanguage;
: H) M, t. o; m5 C. Z if current = @.Destination -- else return) a5 N- P7 a" q8 L
then. R4 n, A4 N: O
@.Destination := void;
& b H! D; v; u. z5 G. Z if @.occupied then
9 A9 d7 n& q4 M* d" @, t part := @.cont;6 l) N2 I9 v5 c! o6 t
@.transpOrder := void;! u9 F$ b4 M: L4 @, I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 _/ q* T' z y; _6 P V, B @,root.eventcontroller.simTime);
9 O K9 Z* V9 v( s* s) A4 K @.HasOrder := false;: f, u& ^1 m% z' A, X
@.DrivingHome := true;
: _0 G% `, }# F/ ?: Q/ H- H rgManager.tryToStartTransOrder;
4 R7 P& P' c+ g/ c3 H) i if @.Destination = void
0 |: H# X J% [/ X7 A2 M* U then -- no transport order for vehicle @0 F, \5 l9 R7 U1 u
@.Destination :=3 ~0 j* q9 V. a) x/ p. u( m
rgManager.nearestFreeStation(@,track.~);
& ~8 W6 X! K# P& O3 C# G3 ~- ] newDirection(@); % m! H: {9 x7 j* C5 g
if @.Destination /= void then4 {1 v) r# v% M) |9 g R
@.Destination.NumReservation :=2 A+ L F6 E5 |9 W- D+ d3 e
@.Destination.NumReservation + 1;
7 Y+ W9 E: v! Y end;
m: B( @6 B, k+ x* t6 ?0 M @.CurrIcon := "drivingHome";
1 _& s$ e" B2 E @.DrivingHome := true;2 j H( ~+ q8 G9 @( d% d5 }
end;
; l1 L) t; Z7 @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station. Y& B. ]( v; {/ X* | I
part := @.transpOrder;% K0 g& q8 \0 U- w0 y7 s+ q
part.move(@);-- load part
6 Q4 l5 z6 a' I8 P+ g @.CurrIcon := "load";6 T4 u" z1 u7 D( P* B0 x
GlobalDistObj := part.globDestination;7 c3 j Z- w a. ?- P/ b T) l. K
assignLObj := rgmanager.rgAssignL;4 h9 M6 e o- k2 j/ e. M9 n
row := assignLObj.getRowNo(GlobalDistObj);+ `; [. I+ G7 ~1 S7 N
if Row = -1 then -- since 708 H+ d2 ~) u8 z( T$ ]) L
if lan=1 then5 l+ r, s u! d, [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 _7 \" M! e% j# Z, F0 O
to_str("in der Andockstation: \"",?.~.name,"\""));
0 \" c0 l# d) E9 L else
. k" ^2 K$ D/ C+ E0 e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ e0 s X7 [- h2 j to_str("in docking station: \"",?.~.name,"\""));
" m1 ?& a5 U9 v0 k end;
' _* v1 o. b) Y) {& S else
7 V9 j- s: X9 U% v* D! J F; E @.Destination := assignLObj[1,row];7 O9 _# b/ C# [/ J* R
end; ) l% L6 X; {/ e6 @8 L
newDirection(@);
+ Q% l% N3 d# Y4 [2 R @.HasOrder := true;
( [9 h- ]8 k( k end;% Z) Q! I2 O6 d% V# ^
end;
- o) L) N2 D$ _end; -- of the method
( P9 P; V, J( s) o b' A |