/* called by: entrance ctrl of the object 'track'$ a6 q' H3 U& G& k
*/: T6 J: f/ B" a& v) |$ i6 P
is
~$ T* T% d& h part, GlobalDistObj, assignLObj:object;row,Lan:integer;: S1 K; `, b) p% C0 D
do* r' b& B1 d; P, O
Lan := rootfolder.Internal.Tools.AOLlanguage;
; L+ b& a& m/ N# w' ^; B, ^ if current = @.Destination -- else return& ^1 T7 E" r" Y& r3 `
then
) w/ ~6 `3 o4 W @.Destination := void;
2 R# n4 I* n. q' V if @.occupied then; b2 {' a: v% U! D( U4 x4 @9 r( e
part := @.cont;7 E+ w2 E6 X/ F0 o# V
@.transpOrder := void;( T2 ~! w8 N0 m, W2 P! r7 T
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% `/ j4 i- I9 f. V; T$ G" w
@,root.eventcontroller.simTime);
/ k" g# x$ E, T+ z$ s9 f2 h5 Q3 d @.HasOrder := false;
( D* q0 L# Y3 f5 F0 M @.DrivingHome := true;
' U3 a U1 l% P6 D9 U6 U$ X8 V rgManager.tryToStartTransOrder;* A4 |+ L8 | K7 }/ A
if @.Destination = void
* l9 w/ z& v; T( f4 L% { then -- no transport order for vehicle @
; i/ @' G, Q( t @.Destination :=
( t& {; _, w! \% \; P* y rgManager.nearestFreeStation(@,track.~);7 I: c9 Z' D6 z2 }& c
newDirection(@); * X6 H" b9 k/ t2 V6 W! s4 H3 V/ a) h
if @.Destination /= void then1 e; Y# i9 I+ |) s# i
@.Destination.NumReservation :=
6 Y$ D, x2 ^7 W3 h* N% s' N; A @.Destination.NumReservation + 1;
7 d; B) o1 a& g, R# R end;
5 T' w$ G4 }8 k1 q @.CurrIcon := "drivingHome";$ e1 C6 O( b5 m( w
@.DrivingHome := true;8 \7 e2 {) J4 V% [
end;; H% I7 d( E6 Z1 Y9 m: D) I
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) f/ N. V& r: G part := @.transpOrder;+ V3 I3 N% P o" C& i
part.move(@);-- load part, }: l/ X8 L! f5 z' ?6 ^
@.CurrIcon := "load";; J, i$ M4 Y; X( p
GlobalDistObj := part.globDestination;8 t, Z7 s2 A7 z1 `1 Q# r f
assignLObj := rgmanager.rgAssignL;# t8 b4 T9 B' T
row := assignLObj.getRowNo(GlobalDistObj);: u" Z" t4 x& b x( v# Z4 j
if Row = -1 then -- since 70# |/ w- S$ O$ \ h
if lan=1 then
8 ~; @8 `+ ^, M, x8 U0 F( i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, m4 c% T& L5 c. `* Q! N: E3 ^5 r/ J* j
to_str("in der Andockstation: \"",?.~.name,"\""));* ?2 j* Z2 }6 l Q0 g% G* K
else
' G" I- ^2 @; J0 c7 Z) L promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* w# C( \% J1 @. S) x8 p to_str("in docking station: \"",?.~.name,"\""));
. Y3 ~( Z4 k! T" i- N; O end;
: o! w4 p& j& ]' F. t7 ] else
6 }1 F% R* C) o$ y4 W/ d+ C) V" f @.Destination := assignLObj[1,row];5 v9 {( W) Y3 U2 j
end; + y" l$ p1 C- w3 @" f: B
newDirection(@);
& j) }! u6 G2 N& s' F' Z0 Z @.HasOrder := true;
5 \. Y' ~0 [+ k' \0 {& ~& J( h end;
" r" j; P) s9 [. A8 b3 a: G) } end;/ V0 W h) U& F, d2 S$ B' e
end; -- of the method0 Q5 B; T, p% K
|