/* called by: entrance ctrl of the object 'track'
: b1 n% x( Q7 D*/0 _: W7 C# d- z0 Y% X% i' Q
is
- l# |! L0 H. |. z+ g. ` part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ H3 p6 \ X! [7 n$ N5 M* \
do
& i/ z: U# g& P2 X' c* q Lan := rootfolder.Internal.Tools.AOLlanguage;) K& ~( T% _4 F% E$ h
if current = @.Destination -- else return
1 F2 n1 Y7 x& w) G then
/ O8 X9 K1 f" G4 z7 X9 A @.Destination := void;
! i! o8 L# J+ F if @.occupied then
' Y! k: Z! f V; u+ _( k% g part := @.cont;; s& n4 P8 t* u D# B
@.transpOrder := void;& p2 m; ^# S# i
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* ^8 A3 H. T5 h; B0 u, z @,root.eventcontroller.simTime);& @+ n6 O1 w" U7 D
@.HasOrder := false;
" x% K- M7 q" v @.DrivingHome := true;
' b4 Q3 s; H* s$ C& ?2 T rgManager.tryToStartTransOrder;$ m$ A& ~4 R: t: x6 e' E- Z/ d
if @.Destination = void
& N3 x! Z; |1 C2 k2 B1 d' B+ z then -- no transport order for vehicle @* b2 F S0 _9 g! k
@.Destination :=2 X9 b- D. B* P& R- Z9 F* ^
rgManager.nearestFreeStation(@,track.~);
; X5 \/ D: D B- O! H' M+ i M3 A newDirection(@); " N8 ]! E2 J/ |' i
if @.Destination /= void then
$ ~- r# N9 @+ q @.Destination.NumReservation :=
; T. R# U3 h# R9 ~2 c! Q/ H @.Destination.NumReservation + 1;7 H& T) g& z' \9 C. W4 ]
end;
8 W% j0 u5 \; M& Q @.CurrIcon := "drivingHome";; }+ z! V# `! y" L9 y
@.DrivingHome := true;9 g" I) Y8 E: g
end;/ |0 ~3 P: t$ a. R; j( q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 z- |* t5 P8 L' S- g- P part := @.transpOrder;
U! e/ o, r$ j s part.move(@);-- load part! F: D. d6 i( O" W0 m, m
@.CurrIcon := "load";. x+ h# c! p* t6 J" ~
GlobalDistObj := part.globDestination;/ I: z. h T. F4 I; `( ~
assignLObj := rgmanager.rgAssignL;
- [$ c/ f7 m0 d$ } row := assignLObj.getRowNo(GlobalDistObj);
& u: P! s* S i: N0 b$ G4 j. S8 H if Row = -1 then -- since 70* P6 z) A# m C; f
if lan=1 then2 G' }* e( z) D; b" {# V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 R! F J4 ?8 L* G& U: y: E' @& L to_str("in der Andockstation: \"",?.~.name,"\""));3 \1 {9 l; K1 |4 t! |" `" t' b) l1 h
else* I+ S' X9 _; u. y, s \3 Y8 F1 h
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" O( h+ ]% v/ A$ b to_str("in docking station: \"",?.~.name,"\"")); . s+ A |2 P% e
end;; m* y5 I2 ?+ _0 E3 D
else. w. w/ |0 T6 n. Y) L- V! b, n
@.Destination := assignLObj[1,row];
& q8 v5 N; U! G7 |2 V, L: l) H! C( v end; 4 `1 E$ f6 ]2 n4 u7 m5 _
newDirection(@); _8 A* j+ l3 m% ], G
@.HasOrder := true;; ~8 i: R1 R2 k$ I% l5 [$ R
end;7 g, T& v6 |. j$ B; [
end;! K- U7 U9 g9 P2 t& `: M
end; -- of the method
! @+ q9 f# d4 k& K* a( F9 R4 t |