/* called by: entrance ctrl of the object 'track'
2 M- K) g; J9 |! n6 H; K*/
* N8 v s6 R$ ?) i! zis
( A$ B! b8 C" `7 `$ } part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 f: o l" m( `, ^3 odo' X4 j, z2 f& a6 n
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 L( v8 B' G8 m7 g if current = @.Destination -- else return& X" {+ B! k3 i, _6 U7 q+ j" I
then, d) _* P$ s9 A$ A' u! a: C
@.Destination := void;4 _$ h) N& T3 Z$ q
if @.occupied then
+ s n- O! {, D- [ part := @.cont;
, E' u/ A1 q) _ @.transpOrder := void;/ X% v2 t2 w7 S) K2 t
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: m& q; G8 e3 L* g) s+ Q! a7 d, T @,root.eventcontroller.simTime);
4 C- z9 h4 {5 O& ~" _ @.HasOrder := false;
* A/ Q6 P3 Y! m. v$ e @.DrivingHome := true;1 l8 h& k/ M2 G+ `1 v; ]+ ` t
rgManager.tryToStartTransOrder;
: M: f: C: b0 T; k% N8 c$ j% R if @.Destination = void) i$ r4 S& v+ {9 k' t
then -- no transport order for vehicle @
- ]/ P* m/ {" g; q @.Destination :=
1 C; C6 z, G1 ?0 ~& R/ O rgManager.nearestFreeStation(@,track.~);
+ o% Z E: ?6 v- Y( H newDirection(@);
5 S1 J' K4 a' u# q# I; I if @.Destination /= void then# x0 X9 s; v" m! t3 N2 ^9 x/ m; j
@.Destination.NumReservation :=4 @( j8 @ z" f: N* Z/ y
@.Destination.NumReservation + 1;
2 b! V# T5 t! F( ?; f( v. R5 x5 o end;
- N! V; m7 H8 j. r% @$ e% y. j @.CurrIcon := "drivingHome";* ~+ V& P6 p' }" R2 n" t
@.DrivingHome := true;
8 O+ j- z S9 p/ l8 {$ N end;' \' _) t! h" U: j3 F9 R$ u9 Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 B; ^4 p" t! z+ I W% d part := @.transpOrder;
" e; B$ ]7 ~: k/ G5 q5 _5 m part.move(@);-- load part0 r. x$ M$ A2 S0 I$ L
@.CurrIcon := "load";' f" U% ?6 }' b9 L1 X4 e
GlobalDistObj := part.globDestination;
! l. g6 I* u, K0 z assignLObj := rgmanager.rgAssignL;
7 ~4 b; I+ g% b row := assignLObj.getRowNo(GlobalDistObj);8 y( ~- Q1 ~ _4 R
if Row = -1 then -- since 701 j7 f. i0 I5 ~4 j' a
if lan=1 then
; g Z: L$ d: v) v' r promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 J: j: a, f7 U5 a" Y to_str("in der Andockstation: \"",?.~.name,"\""));/ N2 T8 s' w, l+ K$ P _6 n8 N
else& ^- T- G2 p- e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ a: U5 N, J* e+ O2 @ to_str("in docking station: \"",?.~.name,"\"")); 4 R! D# P( j; I5 s3 \2 ~
end;4 }* K" X1 M1 C5 b1 G
else1 k6 b2 T" B/ @
@.Destination := assignLObj[1,row];" m% V+ v) D& Q; l! g( X/ m T' C
end;
+ T2 w& L/ \, v& N3 z, v newDirection(@);
. s% g* a i" \ @.HasOrder := true;* L1 {+ G* C! }' ]/ X
end;# q. E* C T% z
end;
, T9 y q4 Q7 y" Zend; -- of the method
t8 d9 y1 J* M, ^0 q; P |