/* called by: entrance ctrl of the object 'track'
# r) k! T4 y, X( s*/
1 u+ b0 ~$ B @5 Jis
+ |) g0 T2 b" B3 R part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( J# c @8 r( B$ Odo6 Q! v; j0 p6 g" ~+ ?% q( D
Lan := rootfolder.Internal.Tools.AOLlanguage;
: V& G& L! h5 P& }9 S if current = @.Destination -- else return
. V* D0 ] V; L2 d4 P \. x then
& W* f9 O: I# G5 @) h @.Destination := void;8 e- T+ J& t& r
if @.occupied then9 M& G3 E0 s ^. ~$ y6 u: L4 {
part := @.cont;- ]% D" m( h! U
@.transpOrder := void;: y4 [1 e+ h/ ?: t2 c) d% t2 e* Z: q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' `$ x/ a2 K+ h1 n! O @,root.eventcontroller.simTime);( C; V* U1 j% K
@.HasOrder := false;
8 I9 J: T' f$ V @.DrivingHome := true;
. t/ x7 Z9 A2 ~' [# } rgManager.tryToStartTransOrder;
6 M. ?; e. W* |! x4 Z if @.Destination = void- K. Q' v1 P& A+ c' ?# b6 v) L
then -- no transport order for vehicle @
6 x; o. I& e2 S- o) r0 }" f @.Destination :=' V x. [7 y% A( T
rgManager.nearestFreeStation(@,track.~);
8 L9 F% u4 O+ [) O3 s( Z0 F newDirection(@); * u: T7 A& I3 ]( [1 @
if @.Destination /= void then Y' W8 F9 {1 }% F# F
@.Destination.NumReservation :=
( N! k I. [( A @.Destination.NumReservation + 1; Z$ K* P& J0 a I9 o
end;
$ M! E/ N$ J. q- \- x; [( X" w @.CurrIcon := "drivingHome";+ {9 I2 I2 C9 F, z' [9 h/ a: i1 k4 Z ~
@.DrivingHome := true;$ x' l' X! w% `% ~! O; j# E
end;4 o F# r2 W" O7 y. t4 O' t& @
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ ]7 K9 h( g3 Y. O4 g! A% } part := @.transpOrder;( P% _ L/ c f+ q N
part.move(@);-- load part0 @! b& r \ [# D$ @9 {+ j* U' A. P
@.CurrIcon := "load";7 p# h0 X. R; B# D* C* q i
GlobalDistObj := part.globDestination;
: l9 j1 J' h4 K% `, k assignLObj := rgmanager.rgAssignL;
3 T; d. ]% X1 P6 W }* N; a row := assignLObj.getRowNo(GlobalDistObj);
3 k9 I5 \! I& d/ D4 x- J if Row = -1 then -- since 70+ Y5 n, r' H7 F
if lan=1 then3 J. R: z; n1 p# {
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," `# }* h }- F
to_str("in der Andockstation: \"",?.~.name,"\""));
6 F9 V: N8 y) D: q9 s2 z, W else
' K6 u. E8 U# G- o, i& [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. Q* w5 O! u4 `6 c$ b4 u to_str("in docking station: \"",?.~.name,"\"")); % A" L2 w# D' t
end;
! Z! M8 p9 O; ` else/ _! f' y+ `$ @
@.Destination := assignLObj[1,row];
% G8 H1 b4 U4 m9 ~# m end; 7 w8 S# u. s& y% c! W5 @! b
newDirection(@);
2 \7 Q6 J. G# R" G @.HasOrder := true;$ _: U6 C( n* `: E! m
end;
' _) ^: V d& i6 ]+ L* H1 r end;
, t8 g1 h6 ^2 ^- {) xend; -- of the method
3 P* Q+ I, |9 h6 D$ s( Q" L |