/* called by: entrance ctrl of the object 'track'9 G @1 s/ Y1 R- X6 i
*/
+ F; t7 _8 J' P8 I/ F1 O. F4 ~. `is
: H4 R! Y0 {8 M) ~/ J1 c o3 L% p part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 a; }6 x5 d b6 c+ v" K3 l# @do
$ L: L$ L' y, y8 W Lan := rootfolder.Internal.Tools.AOLlanguage;, C9 V: U8 Y+ B
if current = @.Destination -- else return
9 x: B) d \( \" W then
$ _7 B! k0 e- j3 L# }. l2 Z; @ @.Destination := void;6 _1 C" i- t, _" C5 H
if @.occupied then$ \! v9 g% d5 w! |* f7 f j- q, u
part := @.cont;
- h- ~2 y1 b% `0 W' j# l @.transpOrder := void;
: N/ h+ m+ T( L o7 F. }$ e1 f& p! I, C part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
g5 Q9 f% ~$ b$ Q5 n @,root.eventcontroller.simTime);2 ~ l; }" @2 }& |9 y# {2 G
@.HasOrder := false;
" v) h* ]9 \6 m& j4 ^ @.DrivingHome := true;
1 A9 X2 Q# n, d0 B2 _( a2 c rgManager.tryToStartTransOrder;
0 z) E. K" f' r1 ]3 u# I, G if @.Destination = void! C9 G# X" H3 g* l; k
then -- no transport order for vehicle @
& n2 Z) F2 p' T L% t @.Destination :=( M3 t7 F5 ?; j& k
rgManager.nearestFreeStation(@,track.~);
4 {5 S9 {' p: l$ Y9 S5 j7 o2 H newDirection(@); 0 s0 D4 c% y" _7 b2 S, C
if @.Destination /= void then2 W7 c& y; w/ D; y
@.Destination.NumReservation :=# O: J* y5 k( r
@.Destination.NumReservation + 1;& m, m' t2 z4 t* G$ B2 H3 u
end;; R8 P. t" C$ y9 I' l1 |) w# d; @
@.CurrIcon := "drivingHome";
3 ]* s% h. C5 c @.DrivingHome := true;
7 w+ {' V5 [# ~. t end;
7 z1 q8 v# T5 D) ?$ W1 H! R3 g( T else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 R V7 E! m0 U" U' a# i
part := @.transpOrder;3 G2 G+ v( t5 h- j+ U/ u
part.move(@);-- load part6 S8 _* V: B# u. d) D
@.CurrIcon := "load";
7 O& G6 Q' T2 P) X GlobalDistObj := part.globDestination;3 ~) p7 s4 q; y! A) h5 b
assignLObj := rgmanager.rgAssignL;+ V+ I# @6 X, p" o7 L% g- @
row := assignLObj.getRowNo(GlobalDistObj);
. ~$ i! |( e& l: K9 }/ o if Row = -1 then -- since 70
, ~5 n9 ?* Z- _( R if lan=1 then
( l) \. I& a9 B promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, Y/ k5 @) {* Q) r1 a! k9 H. y' x
to_str("in der Andockstation: \"",?.~.name,"\""));
6 Y5 f$ U) [, S: d9 t: D, Z0 I else3 E1 P* d9 g0 p8 \" ~ i: K
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 _# Y, w1 H' x" n5 L5 g to_str("in docking station: \"",?.~.name,"\"")); 4 N* ?8 i9 Y2 ^ B* j; {
end;
3 s e' b6 ~0 O( _4 U3 |% K else$ Y. x$ U' a7 e8 P. i4 v, l& J
@.Destination := assignLObj[1,row];( t( N$ @! v6 x, c
end; 3 B6 A# w9 i( g' Z3 X2 S1 p. k
newDirection(@);, r% H( F6 X6 B( Z& m& L: v' {
@.HasOrder := true;5 c+ e3 y, Q# S( X& D6 _
end;
; A' C6 E. Q: i8 M" ]" H end;: F6 b/ L" `! m3 w/ F" n
end; -- of the method
( u7 {$ y3 g) f/ A# { |