/* called by: entrance ctrl of the object 'track'
# F4 j$ k5 b2 e$ _0 R% s7 i. W( o*/& [+ y4 `2 K5 T
is! b8 v+ ?8 ]4 }: x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. Q" B+ ^) w# e0 ?( Edo: ?3 y3 L6 q* P/ e* l1 `
Lan := rootfolder.Internal.Tools.AOLlanguage;2 a1 ~0 [1 q( u |2 a7 f9 D
if current = @.Destination -- else return. f' r8 K* K9 Y3 q+ O# Y0 U
then
3 b( y6 F5 z: I: I( C @.Destination := void;
2 D: C p! E% [) t6 e if @.occupied then9 ~3 I% z# ]0 A [( Z1 Q* g5 a
part := @.cont;' D" s! c% a1 M* U* e
@.transpOrder := void;; R' {# k5 ?# h9 u0 v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 j6 }" b( a6 ]+ ?8 t: |
@,root.eventcontroller.simTime);
% }* {& `: {3 d; S& e @.HasOrder := false;$ M: a$ p# b" d9 p
@.DrivingHome := true; E/ A: v# Z$ ?0 c& o
rgManager.tryToStartTransOrder;
N7 h9 X" _' P# t/ n2 J, o if @.Destination = void
! m; `+ K' M! h8 W6 b6 Q then -- no transport order for vehicle @
3 ]8 {( W# E0 S) Q8 A. a @.Destination :=
# V7 Y* g+ H( t% \8 P1 V) L rgManager.nearestFreeStation(@,track.~);/ S/ `6 V9 K2 ^; { X& C; b
newDirection(@); 3 M7 ^- M0 M, u8 b" ^! e
if @.Destination /= void then
$ X0 _$ E! P5 [3 B. J+ S; G3 l @.Destination.NumReservation :=
K- t" r2 `; C- t8 s @.Destination.NumReservation + 1;% i, U/ Z( c4 F9 I
end; v; Q* {3 A/ z; ]6 |# {5 V' Q
@.CurrIcon := "drivingHome";! W. @5 v7 W z8 q) h" ~
@.DrivingHome := true;
& l; o, r e) @% j end;
% x) O3 U; p# s2 [- ` else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- \$ P+ P. |' \+ {" c* Y O, ^2 F& H part := @.transpOrder;* f9 M' j6 f$ @* k9 ^
part.move(@);-- load part
3 v* T7 b) i& P0 a- h @.CurrIcon := "load";% n' a) s& Y; g: V/ m& s
GlobalDistObj := part.globDestination;; J, m3 ?5 D9 _' ]. `# W
assignLObj := rgmanager.rgAssignL;
6 U; G T9 H& }1 U* E6 x9 ], _5 D1 X row := assignLObj.getRowNo(GlobalDistObj);! _+ y; y. H7 g
if Row = -1 then -- since 70
. \' H, b! k. @2 F' [# C) s if lan=1 then
1 a8 r9 u1 S* L$ `; d4 f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) I2 a; O: ?2 w2 N
to_str("in der Andockstation: \"",?.~.name,"\""));
1 B# u1 Q% T( F& s2 J- { else
5 N7 J" P& f2 Z- X" ~ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! w" M' H3 q8 B& y8 o! f# y. m( S& M% X to_str("in docking station: \"",?.~.name,"\""));
3 C" N% x- o, ~" m! G- M. H1 Q end;
! h2 z! } n- Z. m% ]0 t else
5 Y7 I9 ~6 ^/ @! a- k& v6 e @.Destination := assignLObj[1,row];
6 D5 c" p2 t5 q8 A$ X end;
3 a9 a/ K& ]3 U2 b$ |- g! c( _* E newDirection(@);( I6 h2 |& t) q) k& @8 W
@.HasOrder := true;, z# {$ T5 G7 B1 a
end;8 { r5 B0 t* u0 X* |% |0 p
end;( W5 G6 v5 ^3 S9 q
end; -- of the method* E2 f7 q( _* ?/ z. t8 I0 r
|