/* called by: entrance ctrl of the object 'track'
5 G9 g0 W/ I, n0 L2 r* k. ]*/ @4 l( N% `$ y8 ]
is
. \8 S8 N. X+ r" u# G5 r# `" F part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 W' t& `0 l. u9 X( S% N
do3 S- s8 }& U: E: {2 a$ Z
Lan := rootfolder.Internal.Tools.AOLlanguage;' f5 A. `) q+ x# O2 d$ T9 ^
if current = @.Destination -- else return
" |3 F* m2 Q q6 J8 R then
6 j2 K4 O; O. s/ E# J7 b @.Destination := void;/ R9 l& R- B! }7 }# L9 `7 `5 p
if @.occupied then
) d4 x2 a1 Q w3 ~8 G part := @.cont;
. H7 |! h( C* g6 O( d! W0 } @.transpOrder := void;
' |, H4 u( t5 ^8 a& D part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 I [3 g. u% U! ?+ C0 Y
@,root.eventcontroller.simTime);
6 p+ m1 P$ M8 L @.HasOrder := false;
# M. x/ \3 O- m1 P @.DrivingHome := true;
4 I7 b5 G; T$ I, _7 H7 ~8 [( X9 | rgManager.tryToStartTransOrder;
% d: G! j$ X: E if @.Destination = void
) e% q0 d3 d& k! _8 w then -- no transport order for vehicle @
% D8 j) h( p( T @.Destination :=5 _0 R6 L( A0 k8 r* U7 S
rgManager.nearestFreeStation(@,track.~);
$ s1 |4 d( Q9 q% h; _ newDirection(@); ; t* Y5 I% B2 l4 t7 u3 {* v) H. ^
if @.Destination /= void then
- e) B6 @1 G) C2 k @.Destination.NumReservation :=
8 K5 H5 ` z) J' m @.Destination.NumReservation + 1;
: M) a. Z; q+ n8 s/ L( \ end;
! R1 J& P f: R- K% o$ F: ]6 p5 G; m @.CurrIcon := "drivingHome";
% c6 D% w, h' Z) w# v3 [ @.DrivingHome := true;
5 C; U1 j3 } i. `( ` end;' i( E; u6 B9 e" f$ L
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 v' D4 P; L* X+ p( r# q/ A part := @.transpOrder;0 b; \1 A6 Z2 V$ F% N8 B
part.move(@);-- load part! ?! H* ?( h. J q2 f7 L8 |& w6 F
@.CurrIcon := "load";$ W% X# i' K5 ^+ C }: w
GlobalDistObj := part.globDestination;4 u+ i: x' ~ P1 d" D) w: h7 ], D
assignLObj := rgmanager.rgAssignL;
7 q% u2 `5 u1 X row := assignLObj.getRowNo(GlobalDistObj);
# h! T3 O# o, H if Row = -1 then -- since 70
; l4 D" L+ b8 Z1 o if lan=1 then
; {) h9 E' A- E* m: ]5 `& Y$ x/ U promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ W/ Q* k( P, j0 F: z1 t3 Y _ to_str("in der Andockstation: \"",?.~.name,"\""));' D# B9 \/ F: n1 l5 I
else
) d0 R$ h+ C. s" T4 |) M) ]0 [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ p& s( a2 Z% k" [( a5 t) W3 c- j' f to_str("in docking station: \"",?.~.name,"\""));
; t' C4 z: @0 v- _; o end; M7 n2 C5 e' `& o( X; I, m
else& a) ?8 \7 a' U* g$ f+ b4 C; H
@.Destination := assignLObj[1,row];
$ y/ D% a' }% G; s/ ~# p* r0 f end; 1 ]/ i7 L2 M7 \ u2 k
newDirection(@);
" H* a+ T' `! \7 V8 L9 A/ w @.HasOrder := true;
u) T5 W! F1 s% { end;* W7 Q7 q$ @5 v7 l+ L, }
end;& }: o+ C5 G+ s) x4 C
end; -- of the method
0 O6 l1 K, L8 u3 G |