/* called by: entrance ctrl of the object 'track'
4 d5 h/ M4 M( y$ b$ S3 @*/4 R( Q1 I4 Y+ F1 Z1 u) I; B6 `
is
7 O9 o |, k; V; M: s6 Z5 h part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 s" U' u. ^0 b- V4 K9 V7 hdo
$ f1 _- |# U7 v Lan := rootfolder.Internal.Tools.AOLlanguage;! g4 g M+ |, }- H) m9 T6 W
if current = @.Destination -- else return! f* f! r5 P9 l0 k7 O! O
then' m0 ` R+ E0 ~( {! ?' L" j
@.Destination := void;0 r7 Z+ A) I$ A3 |* D S
if @.occupied then0 U% @$ }" x, }- ]7 D
part := @.cont; S0 Z- X! K% t* W9 M0 b
@.transpOrder := void;1 c' b+ s: J" t- ^
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ m- E8 O4 Q$ X
@,root.eventcontroller.simTime);" R( a% i9 N! X' _1 v" H+ q
@.HasOrder := false;7 Q9 Q4 A7 x. k' [" M; c4 P
@.DrivingHome := true;& [ r% H1 \8 }. J8 c6 N" @
rgManager.tryToStartTransOrder;
6 h2 |# D2 ?& `* v' L8 h! R7 Q if @.Destination = void
, P% w5 O9 W: F then -- no transport order for vehicle @2 K4 r- G' k- p4 a$ b+ K) m" j' L
@.Destination :=6 ^, {: z- D; j+ I; \+ B0 {7 R
rgManager.nearestFreeStation(@,track.~);
0 s4 f* u/ u6 U6 _ newDirection(@); . y0 u$ H+ m, m
if @.Destination /= void then. b( n0 p- j: f
@.Destination.NumReservation :=' n. F) k; n2 E; }- Z$ |4 q* e
@.Destination.NumReservation + 1;
0 I; h7 R$ {/ t1 q end;7 R8 | ~6 I$ n
@.CurrIcon := "drivingHome";
M, N: U) f) D# G8 v P" Q* _- b @.DrivingHome := true;
g9 N/ i' z" _: }/ v end;% B* w0 `( Y; q# W. Z% N" a$ K
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- {$ w& N0 w P& p0 s) B part := @.transpOrder;
d, ~4 T! E0 G# [3 ~2 e+ F part.move(@);-- load part5 U1 C5 W! w' h3 z4 h7 J
@.CurrIcon := "load";
% W. e I0 z: ~) T1 a# f! l GlobalDistObj := part.globDestination;
/ Z9 r) x& G- w4 t8 f/ U assignLObj := rgmanager.rgAssignL;
* Y. }5 z+ v. i- D, k row := assignLObj.getRowNo(GlobalDistObj);
. T; X j3 F6 }# y if Row = -1 then -- since 70
! B, U( Y; e; z$ V a5 N+ p if lan=1 then
/ J6 q3 c7 d$ r" [ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, [! } R" l4 g% ^% n: A to_str("in der Andockstation: \"",?.~.name,"\""));- s4 C. Q2 d4 X; t a
else) s1 a, p" P/ s& B' B9 a
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% M; t7 {0 A8 [ to_str("in docking station: \"",?.~.name,"\"")); : H8 D) W- C- v% P
end;* v9 h S' b* S. j- ~# b
else1 b: M; R0 v! p
@.Destination := assignLObj[1,row];: [4 l9 y' _" _$ {
end;
* k/ c7 o Q# |% f$ T2 u newDirection(@);$ @6 z/ G! v8 }+ Y4 \
@.HasOrder := true;
0 O7 T% R5 g0 B/ Q1 d W end;( A. t& k8 ^' y+ A
end;* ?; z$ P+ ~0 J5 x7 P2 L
end; -- of the method% s! W- R" P% x& b
|