/* called by: entrance ctrl of the object 'track'
, J- B( g: e' u, Q6 K7 S% v7 c0 K*/
* `0 M+ ` E. J/ His4 @) K5 L" y1 \; [; T' \0 ^; Z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;" ^; X& i2 V8 ^7 V! c' _# p
do- w9 B. I. f7 E9 V
Lan := rootfolder.Internal.Tools.AOLlanguage;
. h: P. P0 q. R( f9 E if current = @.Destination -- else return* h. j: |0 n. g3 V2 U
then; Y$ h/ c% z/ l8 {4 Y
@.Destination := void;
! e8 k" }$ o: x3 o4 L& u if @.occupied then0 _; |5 }9 I, ?, `
part := @.cont;* v& K8 Y% q) s- P. J2 q
@.transpOrder := void;
R W% k0 s# \3 n: K# f1 C part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. J/ C/ a" J: {" l; W @,root.eventcontroller.simTime);
! K6 y4 C& c4 `3 ^ @.HasOrder := false;4 V8 p8 ?' N, N: C. J6 X
@.DrivingHome := true;
1 D$ l- M+ n7 M! c3 {+ `6 q rgManager.tryToStartTransOrder;- M; X8 U* ~' O g- |
if @.Destination = void
0 W# Q$ V, j9 [ [* s3 V; v then -- no transport order for vehicle @8 |* [/ E2 g& r* g
@.Destination :=
: v- i# z( X K% q. E8 R+ ` rgManager.nearestFreeStation(@,track.~);
1 a, n: A/ F/ v newDirection(@);
) C" `- A0 M3 |. ?/ n% ~1 m" D& n if @.Destination /= void then$ T% V8 p6 }5 ]# u& E0 J
@.Destination.NumReservation :=
# W" c7 K# E5 \2 v* q @.Destination.NumReservation + 1;
, p: Q$ I7 |; [' Z4 s, r2 t end;4 D3 U/ `7 ^- {5 s/ ^/ M9 ~" }% r) }
@.CurrIcon := "drivingHome";. E9 H5 D" Z7 `: [! Z
@.DrivingHome := true;
& j0 y/ z( A& u9 w end;
% y& [% o( M; q" g X else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 m0 e+ n* X* {9 F+ p( Y& G
part := @.transpOrder;
; P# h* j' R5 q9 ^/ d* A part.move(@);-- load part
! @ m0 C3 g) _ @.CurrIcon := "load";
% J! S/ R& ?# X6 C GlobalDistObj := part.globDestination;4 ~0 c! {; T, r" @4 E D0 c8 x
assignLObj := rgmanager.rgAssignL;
2 U6 b) l$ t% t( n2 `6 p row := assignLObj.getRowNo(GlobalDistObj);
3 [! H2 B( }2 x if Row = -1 then -- since 70
8 a, R/ y( T8 t- n4 V* Y$ p if lan=1 then5 P& ] }7 ~1 {* ]; R
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* [- s& @+ B/ A& Y6 q/ O! t: c/ B
to_str("in der Andockstation: \"",?.~.name,"\""));
+ }0 ^; V5 U+ _ else- E/ t8 v% o. _9 L
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ u$ C7 X2 n1 U, b! w+ W6 N
to_str("in docking station: \"",?.~.name,"\"")); 8 E- f. q: k# ?" [7 L% E' f" F
end;5 {' @& p8 M# q* N
else Q O* P& t2 i
@.Destination := assignLObj[1,row];9 _8 e6 g3 `3 ^; |3 m* Z
end; ! ~' u8 @$ f7 d
newDirection(@);
* T; ^8 X7 L9 J1 j @.HasOrder := true;$ a. b; m8 h. W* E
end;
1 h8 G+ `# V0 V/ ]0 R: y end;
o( `$ h* s6 }# l1 Xend; -- of the method
+ [% H6 o5 Q( ` |