/* called by: entrance ctrl of the object 'track'
r% m# d3 y* v& R6 l4 f0 [*/8 i' C" S1 P) [/ o# x
is8 U4 F ?& W* j s
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ i0 I" Z3 e h/ z% Odo5 ]2 c. ^$ Z4 B/ N7 u
Lan := rootfolder.Internal.Tools.AOLlanguage;
% i. |3 }5 L( ~8 ?4 q if current = @.Destination -- else return k- d- f% p2 ?8 V
then
1 X2 d/ _+ E& U" s! C8 r( x @.Destination := void;! \6 q5 L7 h8 [7 K4 Z) q! t9 }
if @.occupied then& j' r5 \0 o- K9 B0 f! G# e
part := @.cont;
0 R! D0 S" f' I, ^ @.transpOrder := void;. {9 x4 b0 a" _$ _* `7 c( R! S
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
r2 x) x" s+ O( l2 m, C0 A2 K& P @,root.eventcontroller.simTime);5 t- H. Y F' b/ N3 n
@.HasOrder := false;
9 c8 N# @" Z8 s0 j8 z& L- S! G @.DrivingHome := true;9 K) w( A# ^( ^
rgManager.tryToStartTransOrder;3 f- D+ o( S; |8 ?
if @.Destination = void9 v+ T. `' R+ S* s: {9 n2 X+ y
then -- no transport order for vehicle @5 ^$ R. r5 M. S* d' e
@.Destination :=3 K" Q; L, R8 i/ H: ] j) O" U
rgManager.nearestFreeStation(@,track.~);
' D* r: B6 @, Y8 c% N& `7 n1 M newDirection(@); N. k- C% [' s5 r* R3 s7 c) g/ h
if @.Destination /= void then6 t* r" E- H9 h1 i( i
@.Destination.NumReservation :=2 C+ m: e7 T& P8 F; [) G
@.Destination.NumReservation + 1;
' z6 ?& A) y( x N" j( R end;
) m4 |# H1 _9 V) q; I @.CurrIcon := "drivingHome";
, H# t. |8 Q2 v+ q5 H% T @.DrivingHome := true;" g% b9 V. n+ t5 a. D5 G( N8 p
end;
( X0 G. F3 h0 ~" S1 Q else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 _: w" F9 e" E: N part := @.transpOrder;$ K: {5 A8 E' c7 U @- Q
part.move(@);-- load part
" W: g3 B" ]) a1 e5 R% H @.CurrIcon := "load";# Q1 n" }! c$ S1 U, d7 j {
GlobalDistObj := part.globDestination;
' P$ i4 M5 @6 o7 x assignLObj := rgmanager.rgAssignL;6 o3 d$ w" C6 F! E
row := assignLObj.getRowNo(GlobalDistObj);
* |& }4 _% S2 F3 k: _, F2 H if Row = -1 then -- since 70
4 j$ d" G$ N. r! O0 w4 s if lan=1 then! ?, ?" }; ~. r
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 j! m( j7 A- }$ F to_str("in der Andockstation: \"",?.~.name,"\""));4 E, ]) d9 B0 r# m U
else/ m% E0 s7 `. O1 b! P- h! [" u
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% m$ d) U8 I/ ]1 w to_str("in docking station: \"",?.~.name,"\""));
5 E0 U S3 w/ ^8 {. c; O: P. q end;
4 Y# Y' k# ~' R3 F3 L `6 s3 v else
6 d2 o1 n4 x# v6 M* N @.Destination := assignLObj[1,row];7 P4 a* \" u# j' B
end; - [7 w. }4 s- _
newDirection(@);, D9 T: o% u9 n5 r8 m7 s
@.HasOrder := true;
5 p: p4 e9 @7 l: ` end;
( s9 p4 x0 e/ m; j& \ end;
* _. V( G) k8 zend; -- of the method
: t2 D) {" J4 g$ t- Y |