/* called by: entrance ctrl of the object 'track'
7 x5 E7 j& F& ~3 }% y4 x$ x*/
: R% E& [' i: S( W1 J6 y; jis4 ]0 x% T; l7 U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) p& K; ]; o1 Z' g& c& K+ B, _do3 ]& O3 V' c% y- ` Q7 l- o+ D
Lan := rootfolder.Internal.Tools.AOLlanguage;3 g. H. n4 }8 u$ P9 T# l* P9 M) j) \ m
if current = @.Destination -- else return; w& T. J' F) ~1 `
then
/ L) J# W7 B) k+ S T @.Destination := void;% F" ~3 N) c- a0 J% G1 V# k
if @.occupied then+ i P3 I- h! D( G
part := @.cont;* A0 x7 v: p# s
@.transpOrder := void;: d( k" m- X n0 N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' d) [3 T# W+ o7 I! ^3 ` @,root.eventcontroller.simTime);
8 U! T4 w% B" K* c1 N0 x6 [ @.HasOrder := false;+ w0 M) h- ^( X' r7 ~
@.DrivingHome := true;
5 N* n$ g: ~! v2 I+ w rgManager.tryToStartTransOrder;! W; _+ ~8 S- c i4 Y6 F, X. y' ]
if @.Destination = void: m7 o9 y! ]1 M1 A4 n8 e
then -- no transport order for vehicle @3 _- s8 K. e8 Q& ^# `8 Y
@.Destination :=* k- ]1 T1 l, \0 T- V9 G
rgManager.nearestFreeStation(@,track.~);
$ s2 T# a. |9 g R! W8 C0 I newDirection(@);
( w- k$ Q& K$ B: `: ^ if @.Destination /= void then
; v% }0 c9 H. r @.Destination.NumReservation :=% V' r% ~, C8 c* d& J
@.Destination.NumReservation + 1;! L# w: ?- v& e+ M
end;" D+ }6 ^& Y6 h1 K5 B: U: P
@.CurrIcon := "drivingHome";
4 W6 m5 B4 p0 K" O @.DrivingHome := true;: r& Y5 I: ~) z) z' @7 K1 r) b7 b
end;/ }2 F; c2 T7 s: R' v/ a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- b9 ?3 Y, Z# A. J: s
part := @.transpOrder;
( y0 i* n8 ?& ~" b part.move(@);-- load part
; C# q! `+ n( \! s7 x' X8 ^# G @.CurrIcon := "load";
/ Z3 b; ^) e+ O+ i; L GlobalDistObj := part.globDestination;
9 \& }5 S/ q9 c4 {. _ assignLObj := rgmanager.rgAssignL;. r. W5 }- d4 N( p; D. i
row := assignLObj.getRowNo(GlobalDistObj);
: i% d u! Q# ~: l. S0 L( n$ z if Row = -1 then -- since 70. E% }, T, c7 y0 a) R% c9 `2 W
if lan=1 then
' c% H% T: _2 Q- k3 M7 Y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, T7 q! \" _) s0 W$ }- K9 J
to_str("in der Andockstation: \"",?.~.name,"\""));
) W2 W% `5 z# k+ C else* l% o" L% P) s+ S
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 ^: |5 A7 w$ U* M$ `8 q: H" O to_str("in docking station: \"",?.~.name,"\"")); 5 ^( u6 R* c0 U
end;
' W5 {/ U3 q3 o4 l else
$ \) d7 d7 V* {1 ~7 M& m @.Destination := assignLObj[1,row];0 k7 D- Q$ {+ ^; u7 E0 F8 p
end;
+ Q6 Y- P- F9 \3 w# f newDirection(@);1 e. I3 G1 c$ T+ h5 n/ Q1 P
@.HasOrder := true;2 ?2 |& K/ o8 o+ }. ]
end;
* Y# z! Y; k5 _ d; I: u end;
& m, U* T3 \1 @4 w6 V+ |) I5 mend; -- of the method
2 p# M- e7 z+ H0 U9 `* r |