/* called by: entrance ctrl of the object 'track', ?( I( C- h6 R; L: z. E) b O
*/
5 r7 L* g. ^3 s- sis
, t- f0 j8 u$ a2 E3 |$ o part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 v$ y; e9 M2 K% M0 ~do
- z" Z( L. X9 Y9 z' x3 H4 g) B& L Lan := rootfolder.Internal.Tools.AOLlanguage;8 G$ n6 J @4 [9 g W: L% F
if current = @.Destination -- else return0 B0 p4 x& i9 a* z0 k) p
then% V/ P! [ i% q/ T' C% ~" V8 Y
@.Destination := void;6 v1 u& V) @- N
if @.occupied then" ~) q8 b5 o7 J; ^- M- ^
part := @.cont;* l) }; G' l1 i) N7 |
@.transpOrder := void;, S) s# B, H. ~5 r/ |8 q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 G# I4 u" j4 R( a# f
@,root.eventcontroller.simTime);: C) }+ E0 p+ t. m
@.HasOrder := false;
! v" F* j& q {' q @.DrivingHome := true;: o7 y. U. Y& ^" Z) u2 n( J
rgManager.tryToStartTransOrder;
2 N2 Z/ |& Q% D/ Y* f5 y+ P( W if @.Destination = void' ?% O* }4 }/ M: X6 t1 L
then -- no transport order for vehicle @0 B |' A/ y$ J
@.Destination :=
( R/ l' S" D7 H& B( y rgManager.nearestFreeStation(@,track.~);4 B+ P: e/ Z/ U# _$ {
newDirection(@);
' W/ v& P0 q: E$ Y9 `" e0 e7 X if @.Destination /= void then
; ?1 T2 p7 M* ]' Q+ l8 m @.Destination.NumReservation :=
, k: Q! N/ q1 O; r! h; t @.Destination.NumReservation + 1;! L! ?+ u9 a' |0 A' t* @
end;* I; t+ r0 N: i+ z* l9 ^
@.CurrIcon := "drivingHome";! v" ~/ G! z! Y5 O* ~6 `& P
@.DrivingHome := true;# V0 t& j: Z5 q1 @" ~# |- A
end;1 @+ F7 P( k8 z; O
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: i* N5 c2 O" N: o* [/ H part := @.transpOrder;
/ H& M3 V$ t" j- s( f% w part.move(@);-- load part
9 r4 _" [5 L" W \5 x' h: j; ^/ B" U8 d @.CurrIcon := "load";
" g1 l9 {* Y U! x: t. X4 ? GlobalDistObj := part.globDestination;! E: s5 ?9 W$ ]7 ]4 y4 U2 v
assignLObj := rgmanager.rgAssignL;
- M8 k1 r3 N0 ], C( U3 v row := assignLObj.getRowNo(GlobalDistObj);
( s- M! R3 H9 V# o2 T% j, A' ~: x) e if Row = -1 then -- since 70
9 l0 v" `6 G- `& H# ]/ d if lan=1 then" {0 M: `2 y y& m0 K% F
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 M# r. H' n; G) h9 d F
to_str("in der Andockstation: \"",?.~.name,"\""));
2 ^3 V% C v6 E0 U4 W else3 t# m' Z, Z6 _# }. g& E% Y, x) M f
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 c6 L* d& `! R
to_str("in docking station: \"",?.~.name,"\""));
0 G" g: ?: h c7 a, L end;
! w# X- {" V3 h else
# Z$ K2 @* j# `) U- I1 i @.Destination := assignLObj[1,row];2 o E. w! I' c( Y- i w- |
end;
Q5 E+ g6 W' h: T0 D: _1 w newDirection(@);* K" H( o6 ^9 f7 ?% o& v3 T
@.HasOrder := true;5 H- K5 j$ D0 ~1 e4 m
end;8 C! {! U0 I+ h9 e6 c
end;8 o/ U* W* y- V ^6 F& R* h
end; -- of the method
; J4 v) }7 U7 O4 G$ t- E& j/ @ |