/* called by: entrance ctrl of the object 'track'
- R. ?5 e$ [1 z2 a*/
* _: V) D; a7 G0 |" tis
, o) ?! f7 L5 @8 f* u part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# ?! g. r" R" e- B, e; Odo _: ]* s, J- d3 w+ c: J) r
Lan := rootfolder.Internal.Tools.AOLlanguage;- B: j6 v" n- I# g$ b
if current = @.Destination -- else return6 L7 `3 c1 D+ O/ P
then+ e) n: g* L R
@.Destination := void;# q% N4 ]7 } x( c
if @.occupied then/ w" Z! P6 I& J3 b
part := @.cont;
' b6 ~! `1 v# w G8 V @.transpOrder := void;
! Y- j( |- g* N& z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 H4 [& C; C" a3 }0 \8 v& b: r
@,root.eventcontroller.simTime);
g; c: Y {$ `7 L4 P* b1 S5 D @.HasOrder := false;7 y: |6 e6 U4 Q; b4 q% j9 B
@.DrivingHome := true;
% E$ [1 N4 R' @ rgManager.tryToStartTransOrder;& c' Z* e1 x5 {7 H3 Z# d' j+ X
if @.Destination = void% j8 P1 X$ j; g9 n, e# M2 _! j
then -- no transport order for vehicle @
/ R* ^' k5 N. B& y1 ~: v. L @.Destination :=
: k7 H% e2 q5 |5 |4 V( v+ D rgManager.nearestFreeStation(@,track.~);
2 G, C; Z0 _- g! k+ ^ newDirection(@);
7 ^/ o' o) N0 F d3 ^( O' u if @.Destination /= void then" |6 I* a- l2 ~: j7 d3 }
@.Destination.NumReservation :=2 y3 L- b3 h% o2 S
@.Destination.NumReservation + 1;: o& V2 u5 H! k- p7 o
end;8 ]0 @; D, m9 s" C
@.CurrIcon := "drivingHome";* [1 m, L, e% ~& g$ b
@.DrivingHome := true;+ v* i+ ~$ K: [ ?6 @
end;
: f% v+ E- a$ [; x2 | else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 K1 ~5 E5 x4 e2 c4 n part := @.transpOrder;9 D: Y* _+ b& M) B4 {
part.move(@);-- load part u0 N8 {; a! b4 d3 R, s* F
@.CurrIcon := "load";
, S. i M4 W2 p& O! v3 q GlobalDistObj := part.globDestination;+ J: U# ?. f2 @
assignLObj := rgmanager.rgAssignL;3 k- m, v- ^; e/ X5 \
row := assignLObj.getRowNo(GlobalDistObj);
: l% p6 ~) G5 X' _% h* L if Row = -1 then -- since 706 Q6 v. y5 F- X6 h8 X3 T G* P
if lan=1 then# W0 q) r9 h3 U% T1 G/ W
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: H% H5 \8 \) b5 [
to_str("in der Andockstation: \"",?.~.name,"\""));6 G9 P# Q6 i j
else
5 ~8 B8 ~$ J+ x" N promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 E: l' R, _ @* j, a! w0 _- I1 R, l3 S, D to_str("in docking station: \"",?.~.name,"\""));
" N" [' r+ Q( [+ g5 ]0 N end;
( [# O, d" _" ^, j# r% ~ else
& s7 i. J6 V8 T3 b/ w" E @.Destination := assignLObj[1,row];4 c! v$ D! j( q% K% e8 v
end;
8 r5 C4 C: r& ]; p. C1 M' S% g newDirection(@);7 q: ?) s( ?/ p
@.HasOrder := true;
3 s/ F; A+ Z; B% P3 x end;
0 ]% H! c# h" T+ L/ x" O end;
4 g; a9 `& A, P3 r/ kend; -- of the method
- a5 k0 T, S- [2 y6 c3 O) I$ r |