/* called by: entrance ctrl of the object 'track'; t! T# l$ v/ }# ^: S& g
*/
- n* y9 A3 M' Xis
% {/ a1 z% v* J6 Z part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( _& p2 q0 N7 ^( g7 O3 w; {do
4 R- t, I- _' \( D% ^* a% O$ w Lan := rootfolder.Internal.Tools.AOLlanguage;
% R& J" ?. d4 x4 A' U3 a if current = @.Destination -- else return7 q; t" f7 A9 a
then
7 O: N8 L2 _' C# W: H @.Destination := void;- T2 D+ I) l/ V7 u
if @.occupied then
! R) A/ G, ^$ o$ D5 R part := @.cont;
/ |' X3 _7 q6 Y/ d @.transpOrder := void;
; W% r9 U5 Q D& ? { part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) a. u7 I- U! ]! O( L. ~# I
@,root.eventcontroller.simTime);
7 A0 P4 F t2 _0 `. C/ C @.HasOrder := false;
% l( j$ s" y$ `2 r+ k @.DrivingHome := true;
' `# C# n* _0 U% [ rgManager.tryToStartTransOrder;, ~, j0 e+ k/ }' v) l9 D1 g
if @.Destination = void
# u+ n& D; g0 Q then -- no transport order for vehicle @
& j2 V( X2 H6 E8 c, j @.Destination :=& z* u% d4 G9 U3 P% E" a, F2 f) n
rgManager.nearestFreeStation(@,track.~);2 t# C0 l) S3 c9 j& t
newDirection(@);
& a o5 ^( N9 }* t X if @.Destination /= void then3 E: w, `, j3 r, B6 J7 ?
@.Destination.NumReservation :=8 ^! r* D2 L4 E: ~3 [' ?" l
@.Destination.NumReservation + 1;
- A! d: [4 d/ j9 M end;
; I! m3 n5 v- o' w @.CurrIcon := "drivingHome";9 G7 _# G0 r2 ]
@.DrivingHome := true;8 a1 g: D6 v' A% w
end;
, \6 m8 E, H) x- F. I& z; M2 R else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# m' T5 s: J9 a9 N part := @.transpOrder;# p7 \* ~' ~/ I2 u0 `( L
part.move(@);-- load part
' N: L |! |, N, B7 x8 r1 d @.CurrIcon := "load"; R) h% U a9 Z# P5 Q2 C
GlobalDistObj := part.globDestination;! c B5 v$ D0 t; I( k8 S/ ~/ W
assignLObj := rgmanager.rgAssignL;6 Y! c- s5 H6 |: }! Y1 c$ c
row := assignLObj.getRowNo(GlobalDistObj);
# B+ l+ ?5 I+ ?/ N3 b$ k if Row = -1 then -- since 706 C* p. n7 W$ ]9 I* i9 `
if lan=1 then
+ I* W; b$ \4 B7 z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 Z& [. H2 M5 O P3 U0 W, q4 a+ P to_str("in der Andockstation: \"",?.~.name,"\""));
" P; h" ^0 c$ u n8 w! l' T3 q else
( E; Q9 [$ ~. z$ L promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. f/ X* K/ r8 j p3 {
to_str("in docking station: \"",?.~.name,"\""));
' U# P$ \6 e6 x# f7 H/ W" I0 u end;( K, s8 B( S6 ]- S4 W; E
else
7 B; b% H0 G6 V& q3 d$ l) y @.Destination := assignLObj[1,row];
9 J6 c1 B1 J1 J- q$ M end; ; r, R o) O6 K) H7 e5 R' |. z) e
newDirection(@);
# M/ @. d6 F+ W/ Z# O! s( W/ L! @ @.HasOrder := true;4 {9 H3 p! M7 B. I0 C
end;! j( H; T* s7 G3 Z6 Y7 H7 ~: k
end;
/ T; u O# F/ Lend; -- of the method9 W) f5 `. ^) j
|