/* called by: entrance ctrl of the object 'track'
0 g o+ l; `( W% A/ p*/$ g$ ~% P! ^/ L4 E
is2 J$ K. @. X1 P" I
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 ^* w7 H/ A3 Q& w9 h$ \do
/ |+ m# H$ N7 | Lan := rootfolder.Internal.Tools.AOLlanguage;7 P$ \! A4 @3 |( }, Z
if current = @.Destination -- else return/ @& u! J X% j: Y+ N2 S& D6 w
then
6 a: D2 L; L" R1 F( E @.Destination := void;3 A6 P% ~9 K" `$ C' l6 j3 {
if @.occupied then+ {* g$ V: I! u9 l; U5 W' w0 v* H
part := @.cont;: U- b% l# V8 w: p/ M
@.transpOrder := void;
. i8 x4 M4 c. F6 s. N part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# K7 C+ w/ ?# a9 U @,root.eventcontroller.simTime);6 V/ n+ n2 [0 a4 }" k, ]
@.HasOrder := false;* ]) Q& P- k4 Q% X# I& N! p; e! G
@.DrivingHome := true;
, H! c( V; O: h4 x: d3 }8 n. z2 X2 K rgManager.tryToStartTransOrder;
* j: F5 ?5 E8 k( s4 V if @.Destination = void$ b" r3 L- {2 O; c6 i1 K
then -- no transport order for vehicle @/ Z% I! P8 ?6 N6 S3 a# f
@.Destination :=
' g% B7 s$ k, S2 o% }1 P! l rgManager.nearestFreeStation(@,track.~);; d0 B1 o/ q/ D: z
newDirection(@);
4 E8 c: ]( Q1 E8 \8 p if @.Destination /= void then% M$ U% ]: \, E; N& @6 o
@.Destination.NumReservation :=
% G5 u; e. ~* I, i5 u" { @.Destination.NumReservation + 1;
+ V* ~% H5 G. L. ?5 I* H end;7 b: B, _ J- D% t
@.CurrIcon := "drivingHome";
. z" r$ m( P, f7 B) i! G, ? @.DrivingHome := true;
% G7 T+ @0 F1 o$ I" e" d0 B) E end;3 u8 f0 I3 n: y5 e- g# k* P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ k) H- Q+ N, b
part := @.transpOrder;7 ~6 P" Z/ ? V: ]
part.move(@);-- load part9 @" \2 n6 C: D. x
@.CurrIcon := "load";
. c4 I. {9 T! C5 N- ?4 m! ~ F9 k GlobalDistObj := part.globDestination;- s$ Q2 f2 W3 K; V% f
assignLObj := rgmanager.rgAssignL;
$ L m& E d8 J2 v row := assignLObj.getRowNo(GlobalDistObj);! i) i. U3 t$ F. n7 M* X% c5 U
if Row = -1 then -- since 70
! m# P2 D' X4 ~8 E6 B6 d9 Y if lan=1 then5 U a6 ^5 L) p5 w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 t. i" H+ |9 t- g- r% g3 K to_str("in der Andockstation: \"",?.~.name,"\""));
6 I3 g% }9 ^- H# H [ else% I# |! n1 P0 j- z! u* I! P" F
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ j1 S: D/ H- J5 { to_str("in docking station: \"",?.~.name,"\"")); 1 P- B( h+ X0 n0 z0 T
end;
7 v6 j2 A6 G0 o- A0 { else
* j) t, N% w/ { @.Destination := assignLObj[1,row];7 { p$ `3 Z, A; e( i
end; * j+ M* W7 z0 V9 A0 A
newDirection(@);; r/ G% F+ W/ u( `) o o
@.HasOrder := true;" K% w' h4 T3 t
end;
8 ^, v( D4 G( q, I, d- V end;
, C5 K% W: M( x7 c5 Q. Kend; -- of the method. p; h4 j1 @# o7 k2 _6 h7 L5 z$ N
|