/* called by: entrance ctrl of the object 'track'2 P- a; G6 L( Q* b$ ^0 Q
*/
# I v6 p; d1 S% N" @- v! ois2 e" G, c* S8 A
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' t$ M# y& O, E3 {do
5 s3 S! X8 e+ I7 ?: c Lan := rootfolder.Internal.Tools.AOLlanguage;
, L6 B9 z7 z; t8 [1 K, u" T if current = @.Destination -- else return& g1 |1 d, `' P2 D+ Y
then0 P9 u4 W* E: R" u
@.Destination := void;
& J+ \# o/ n+ P% B x. d2 ~( C! k& S if @.occupied then& B: F; l A0 Z+ h( l) ]6 G
part := @.cont;' {' v, f1 G) g# p( ~
@.transpOrder := void;2 C1 x* G2 ]' F) \1 E
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* X+ ?* y, P: e @,root.eventcontroller.simTime);3 o; @& V; L3 ?: V* c3 B+ |8 J
@.HasOrder := false;0 b8 c5 f: ` A2 ^
@.DrivingHome := true; x: |9 a. j4 b8 V
rgManager.tryToStartTransOrder;
]" P# r1 t* k4 j6 ^5 S& K: T if @.Destination = void
% V# V2 {% k- y; }: D6 y/ s then -- no transport order for vehicle @
/ Q$ ^7 \0 U* \3 [, C, S2 {7 r$ j @.Destination :=1 j7 @) l/ t9 h' w9 C
rgManager.nearestFreeStation(@,track.~);
3 q3 Y- X3 Q* B! l6 P7 Y3 w) c newDirection(@); 8 I7 O* T6 V- k1 T7 f2 [$ ~
if @.Destination /= void then D: ~+ b0 x: R2 @5 c
@.Destination.NumReservation :=& X0 Y( l8 ?. O" p- ?8 d3 g
@.Destination.NumReservation + 1;" y5 K1 \9 ~- h4 |, T7 N/ u! i
end;
" q* R) H! W/ k @.CurrIcon := "drivingHome";1 A2 s3 t" j$ k- \
@.DrivingHome := true;6 D: n/ B8 r& ^& p+ I) e
end;! A1 Z; d) d* ?: ^- i7 \
else -- the vehicle @ is empty, both vehicle and part are in the same dock station% M, M9 M' }8 R3 F7 y/ l0 {) m
part := @.transpOrder;; f1 @3 V3 c( L8 c6 d7 f. Q
part.move(@);-- load part
: o4 I/ T* j; V @.CurrIcon := "load";2 U! C0 h0 I+ L B4 N5 H+ G6 S
GlobalDistObj := part.globDestination;& r( Q- T2 R* T) F+ |! @8 a
assignLObj := rgmanager.rgAssignL;
( N, ~& |1 |' j- C1 O row := assignLObj.getRowNo(GlobalDistObj);5 h) W, X' m0 x$ `0 }$ l
if Row = -1 then -- since 70
B: b( ~9 ~* o if lan=1 then: ~* \) @! Q* @# r
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) ~7 C$ p: a* L# u1 H& J
to_str("in der Andockstation: \"",?.~.name,"\""));
0 |) }% S6 F. }( q6 d else4 d# J+ ~7 _. l2 X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) ~6 w) O& T! A% l" O" [0 g" j to_str("in docking station: \"",?.~.name,"\"")); / l& B4 x+ F- K, D7 K
end;+ r* }/ a4 e" v# n' }2 ] J5 ?; c' z
else
) f# i; d& \$ o$ T. i& ]+ K( A @.Destination := assignLObj[1,row];
9 c! Q: g1 ~% A. w& I- K! P! x/ A end;
, s' w: r& W. q( [' b; [( U0 L newDirection(@);
+ D; J1 z& g( x. O2 U @.HasOrder := true;* [% f$ b' [- b9 O
end;
3 K( o; B) O4 L- x end;
6 r* H+ Z% J5 P0 ?9 n- ^end; -- of the method
$ r. A0 T% o6 C& ]: S" r+ c1 k; L3 @ |