/* called by: entrance ctrl of the object 'track'/ z1 Z% Y( c' C% T7 m
*/
, ^) \( m# h; J' E7 xis
+ h( c& E1 h% x. R" z& z1 l' X! t part, GlobalDistObj, assignLObj:object;row,Lan:integer;* S' q2 @& D+ e
do
6 N& V2 F' G& B& r# A Lan := rootfolder.Internal.Tools.AOLlanguage;& n+ ^! M% Q, h7 R8 H/ j* Z1 ^
if current = @.Destination -- else return
& w6 X# h* M' h3 U. h+ [0 c1 w8 k then
$ b7 s/ y; C! o$ o1 m @.Destination := void;
' c0 h+ {( `1 B) s; |8 ~# A& F" E if @.occupied then5 m' k, w0 e3 Z* e
part := @.cont;
1 J6 z$ \7 a. s1 L4 Q @.transpOrder := void;
& B. N5 k% {0 M3 T+ c+ [ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- z$ `; F _* j! \/ ? k- N$ V! J @,root.eventcontroller.simTime);6 q4 j4 y# ^% l
@.HasOrder := false;
; Z1 ^1 F- [/ N9 T' k# T5 O! J* S @.DrivingHome := true;
, H2 o, j5 j2 b, G2 o& Z6 U rgManager.tryToStartTransOrder;
. A! [3 [& g* S2 q% ^6 u if @.Destination = void
6 ]: u9 O( E' ~7 ^. F- y( b then -- no transport order for vehicle @
z. d# y5 A4 a1 | @.Destination :=2 r! t; [1 M2 }6 Q
rgManager.nearestFreeStation(@,track.~);
/ b0 k: d& \0 q$ h# w/ T newDirection(@); ( L1 W$ u2 Y1 U6 c: I
if @.Destination /= void then2 o6 N8 B L/ M4 q* j' ~5 D
@.Destination.NumReservation :=
5 l/ p9 D% l$ n; f: c" a, r9 x9 G @.Destination.NumReservation + 1;. h' s9 {- j( t4 Y
end;1 z) s) ]: i0 ? ?; N
@.CurrIcon := "drivingHome";( ?! g' S+ n% u) ]& G
@.DrivingHome := true;; y3 k0 @$ d! J5 \- |1 s- a6 r
end;+ H! ?3 A# [6 ?, Z6 O3 o3 R2 o
else -- the vehicle @ is empty, both vehicle and part are in the same dock station& J! d# W& W2 t4 A
part := @.transpOrder;! X; P* u# x1 e
part.move(@);-- load part$ J. A# t* B+ q" b3 q$ e" W
@.CurrIcon := "load";! R4 r- L w- O9 k/ ]
GlobalDistObj := part.globDestination;
5 L/ a9 L6 I+ f( j$ m: A# Q9 B+ J6 v assignLObj := rgmanager.rgAssignL;
2 w: O) k4 Z) T3 C. b0 Z row := assignLObj.getRowNo(GlobalDistObj);- D+ l8 X5 q4 i5 V6 Y& w* c
if Row = -1 then -- since 701 R. G1 n# k7 V/ n( }
if lan=1 then
+ e" }2 b6 Z4 |* C8 Q6 g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ C* O+ c9 Q7 S2 Q' g' G: q to_str("in der Andockstation: \"",?.~.name,"\""));
, i7 Y. r# l+ D. A else
7 C, b- P$ z1 L' p7 I promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 Z$ G! g% }$ { to_str("in docking station: \"",?.~.name,"\"")); . Q9 x: }* h/ y4 E+ u
end;
7 a8 ]6 Z2 P+ g8 q7 I! m; p$ p else9 z* @2 N9 \5 n% q8 y
@.Destination := assignLObj[1,row];" v" j: D& l& Q$ Q; c8 N
end;
/ G1 B2 ]2 |: x# A- T6 b; J7 R l newDirection(@);$ x" W. g. G& P6 Z) b9 L/ U1 h
@.HasOrder := true;
2 w5 y6 B& Y7 a6 _1 E, N, w. j end;# w9 U- V7 c/ h6 {- ?/ i
end;" ~" v& C9 N( `3 W) S
end; -- of the method
! z& L0 q+ O9 g4 ~0 w* O* g4 d |