/* called by: entrance ctrl of the object 'track'
2 i* J5 k: O& R% R2 g% U*/
G8 Y% `& ^3 p ~" Wis ]: D! y, V4 X! d! i, X9 J
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 U. C/ z, f( S. g- Q sdo2 ^3 e9 ~' e4 \+ X3 D5 c" d. v1 P2 Y
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 M1 K! p( D# i* D+ C if current = @.Destination -- else return& S. a( ^; C9 k6 Z# ]2 d
then! t1 l& m; j& A. n
@.Destination := void;
, k% M k0 `/ c: y% D5 w if @.occupied then
) M3 R# P- A, x. }3 X part := @.cont; }, ?) G% L3 V* b j* e
@.transpOrder := void;
% A: x) a) k* {: v part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 Q: W. A% l2 d- ^5 V @,root.eventcontroller.simTime);
: W7 L: m1 o% i) N7 B, C6 S# v @.HasOrder := false;
& @% o2 k$ F2 p5 k P9 r4 I7 q& W @.DrivingHome := true;6 X& n: V- g% X
rgManager.tryToStartTransOrder;5 c! e" f" H+ n K4 M$ u) g0 m* ?6 G
if @.Destination = void1 U" n9 x+ |; h( G" R8 J4 Y
then -- no transport order for vehicle @
1 \2 [4 C: w- L/ ?: k' i7 j @.Destination :=
! Y* O' P6 [' _3 A# }' H# d* \8 w N rgManager.nearestFreeStation(@,track.~);
4 s) M' h- o7 h' a$ R! B0 w newDirection(@); 6 [/ O/ R; Q' C
if @.Destination /= void then
) I- ]* U. i, Z! |) E7 T8 b& e6 d @.Destination.NumReservation :=
; a3 P2 F, K+ {3 J @.Destination.NumReservation + 1;7 M" d+ x3 G4 [) Q; J6 G( k
end;% d: D; l/ {( q9 Q/ N, j2 c& d
@.CurrIcon := "drivingHome";# |( A$ E2 [/ f: h
@.DrivingHome := true;1 y* H% D$ q& R3 [; F
end;
3 Y- s$ h& D! A else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 V' W" c8 C8 O& _
part := @.transpOrder;
% Q: B Q/ i i/ r9 H4 N part.move(@);-- load part0 ]- J4 M G+ w
@.CurrIcon := "load";- r5 z$ g" t( ?7 W Z
GlobalDistObj := part.globDestination;- o* u1 S/ ~2 l: m/ X# N e i' L
assignLObj := rgmanager.rgAssignL;
0 c) ~% C" |6 T1 U3 H row := assignLObj.getRowNo(GlobalDistObj);( g% |" K" s* d; t$ R! e
if Row = -1 then -- since 701 v# _, n0 i. P. z$ }- Y
if lan=1 then
+ h3 c; S1 n. M7 F# J/ |7 Q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. b- X. _- N! ~ to_str("in der Andockstation: \"",?.~.name,"\""));
- n6 M4 g4 G1 B* s9 u4 M0 W else8 [* n" ]+ ?+ P s5 W4 W3 J9 N+ j
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# O1 N- x* s7 O9 T2 e3 G to_str("in docking station: \"",?.~.name,"\""));
8 d, M$ Q* r E0 K! l* ` end;
9 }" Y9 p7 U" C else# ]/ z3 ]- X. @* ~. c0 h
@.Destination := assignLObj[1,row];
0 y+ N8 x& H f: I! I: f end;
3 |- b2 ~) u2 }5 e" a, C newDirection(@);
2 o0 I% \: x) d1 |3 ^- _6 E1 c B @.HasOrder := true;
) X, x4 s. N, o6 g" U end;1 m. K; @# |! r( h, t5 @7 N) n" u
end;
: S% f8 f$ k6 L( {, ?: K& uend; -- of the method# U) l. b6 G. b! y3 f
|