/* called by: entrance ctrl of the object 'track'
2 }4 D; z- z( P% X; r7 J$ y! U4 k*/
8 p- }9 }% c6 C- e- ]is
5 P6 Q6 a' y- K v part, GlobalDistObj, assignLObj:object;row,Lan:integer;# D( ~1 ?0 F% u# A/ T. p4 M
do
\, V- x/ B- S% ? Lan := rootfolder.Internal.Tools.AOLlanguage; x1 O8 `) b, d) _# D U+ n" k5 {! q
if current = @.Destination -- else return
: l) I/ g9 p( E0 p5 W5 l& v1 V then7 A% k* E6 [) G7 J0 [
@.Destination := void;
' C# K3 l! y# A( M. A3 d) S8 ` if @.occupied then- H- r; B8 P6 `+ N4 o7 D4 n
part := @.cont;
! r& l* F0 ]9 a% x+ N @.transpOrder := void;
) C6 Y5 l# {% j. X2 \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ ~, m* e4 |: R/ v. f/ y9 C @,root.eventcontroller.simTime);! X( C4 B+ z" v8 ?- S+ a( W( D1 A
@.HasOrder := false;
& t. l! L$ p+ I* a+ }5 K! m- W6 k @.DrivingHome := true;
$ L! @5 w" P4 J4 J0 e6 n rgManager.tryToStartTransOrder;6 `, W+ j. q/ i
if @.Destination = void
1 b7 L4 Q3 x: d1 F then -- no transport order for vehicle @# e; v6 l m6 V8 f3 m$ v
@.Destination :=8 z* e. B* B6 m7 ~8 T
rgManager.nearestFreeStation(@,track.~);
' G# O+ s# K; i- P3 I. M* b newDirection(@);
4 c" i6 I ?% e; i* j+ p7 O3 T if @.Destination /= void then
# s7 w5 X% `7 V3 X7 ?& \2 R* I' B0 } @.Destination.NumReservation :=
; H2 K) |) X8 Z @.Destination.NumReservation + 1;
: e- M6 N& }$ H# Y4 i) O7 |& F- s end;
M) r' q% P- X5 H K- y @.CurrIcon := "drivingHome";3 V: R; ^% I2 S2 z5 r* v2 B3 M
@.DrivingHome := true;
, e2 C+ [; y, k+ W end;
0 _1 b$ l* ~2 T1 R1 I- E else -- the vehicle @ is empty, both vehicle and part are in the same dock station- t) W ^" B2 T) C- @' Z4 B
part := @.transpOrder;
5 Z( ^; [2 Q S: `% c) | h; C g part.move(@);-- load part
- H; v. s# Y1 s( s | @.CurrIcon := "load";: q2 X- j l2 v
GlobalDistObj := part.globDestination;* c: _, A; l" X: ]& c
assignLObj := rgmanager.rgAssignL;
; Y: y; @% p# h" z' r1 l row := assignLObj.getRowNo(GlobalDistObj);
7 u+ r, d$ B: R: ?* w3 a0 H if Row = -1 then -- since 708 {2 B* Z2 E/ d+ N0 n% [
if lan=1 then
% n, M7 N; q# @ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- g1 S& _: t/ _- _+ u
to_str("in der Andockstation: \"",?.~.name,"\""));& q8 Q4 y1 g4 }4 S1 g' J& I
else
# l1 e& K; c$ U8 n) V# T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 l+ j" w0 f* W- I
to_str("in docking station: \"",?.~.name,"\""));
% N7 S Y$ ?* H6 r end;
% Z! w" S. b: G+ g0 g( l) f else' J+ k* g: `3 T0 k( Q
@.Destination := assignLObj[1,row];4 s( J! x. r1 ^. K e$ T
end;
' U e0 |. r: `' R newDirection(@);2 b/ ~8 i# X- T% q+ j5 h
@.HasOrder := true;
! B" \1 }- {+ `, r" @3 [ end; _& n& q/ v4 l- o e
end;! w- |- ]7 x+ n& ]) y$ R9 j4 ^
end; -- of the method
$ R' Y4 m2 R4 D! m% f |