/* called by: entrance ctrl of the object 'track'
2 E5 R# R# d3 z( A8 K0 K1 u*/( N# N8 r6 z; y! I- W: d" c
is
5 w& H4 u! r3 Q/ i% G* i- E$ w% y4 x part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( v# V2 d# t% `do- S- L7 h$ b6 _, I" w
Lan := rootfolder.Internal.Tools.AOLlanguage;. G$ u. H- ?" y( G x- h: A) K# T
if current = @.Destination -- else return
' ]0 H% G" s# j* g* p then
/ K( Z+ A1 d+ J( B" U& | @.Destination := void;# Y: ?) F$ a) B& ^- b
if @.occupied then
% b9 ^% k; n+ z- n5 l part := @.cont;6 D- s4 K% C6 {; f2 N# [
@.transpOrder := void;
l3 X% R1 S+ D: } part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, m. A$ k2 k+ |3 c) x4 [/ [& J
@,root.eventcontroller.simTime);- e/ h' l4 V8 d2 u
@.HasOrder := false;, Z( @" Z( x) s3 \& q" O5 E& o! i
@.DrivingHome := true;
: Z: C- u( R, F0 N+ t8 V rgManager.tryToStartTransOrder;* d. L9 P+ p4 c$ l, j) g* c4 \( P
if @.Destination = void2 k9 b. H; c7 X1 d
then -- no transport order for vehicle @
. L+ t. h1 U/ g" m2 X @.Destination :=
( G- ?" P& Y* X. W, D4 A& X rgManager.nearestFreeStation(@,track.~);
# v& U) f2 J: K8 E newDirection(@);
: O7 `( ^. A8 q; y% ?. g' `( `# ]8 ? if @.Destination /= void then+ ?, d& f, B B
@.Destination.NumReservation :=
' O: V! y8 s& @ @.Destination.NumReservation + 1;
$ m# q9 ]- k3 [ end;0 M9 [# {( [. C" Y& x
@.CurrIcon := "drivingHome"; Q6 x2 v7 o/ D6 d
@.DrivingHome := true;
9 O% W9 P: y0 i. i2 J; v3 e7 z end;
' T/ A7 M6 w" w- Z3 k } z else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% c" ]3 m1 s0 x part := @.transpOrder;' x9 M5 p3 f( P7 T% v
part.move(@);-- load part
; E7 b) l0 Y$ ^ @.CurrIcon := "load";$ ?" a# V1 | p- t- J+ ~" W2 w& _ P
GlobalDistObj := part.globDestination;* m+ f. }1 I9 w' ~# y
assignLObj := rgmanager.rgAssignL;
* G* W1 _ _+ r6 R row := assignLObj.getRowNo(GlobalDistObj);9 F" ?4 Q# k4 N- B
if Row = -1 then -- since 70
: b4 W$ l# T1 L% I6 s$ e if lan=1 then& G- u1 O. L5 f1 B" [; v% u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 o+ o- }6 T. F8 F0 x! {( F
to_str("in der Andockstation: \"",?.~.name,"\""));6 H4 s% d1 s/ m8 u4 K
else; D! v: b$ ?9 o" [$ h
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 @. a' G. _5 u7 R% G to_str("in docking station: \"",?.~.name,"\""));
" w9 V) ?2 [1 ?+ j& f6 V% w! n end;
8 L6 z& T0 s7 ~+ [( [% v4 v, } else' p6 b4 E; u' t! e; w2 m
@.Destination := assignLObj[1,row];' j+ R+ ~) t. U4 \& C! |, s. w( D+ L5 ~. n
end; 4 B6 _/ D8 |9 e& p: S
newDirection(@);' Q: b/ t/ M4 p! L- _
@.HasOrder := true;
8 h6 j- y. q) J6 X# S* a+ ^* X1 { end;6 h5 Q, r n( S G w5 ? ^; f
end;/ ~1 M; ?3 g* g; x. i- R& I
end; -- of the method( K1 I1 @& |& v2 ~" ~) E
|