/* called by: entrance ctrl of the object 'track'
* y: W n J+ D- k K*/: g" q3 z4 I& a" N/ N# R* c
is
$ _* c* ]: O4 w4 F; R& p part, GlobalDistObj, assignLObj:object;row,Lan:integer;
y* v' }5 Z; }% D3 y9 d+ Jdo
* _; Q8 K7 m2 C2 y' n/ k" @ Lan := rootfolder.Internal.Tools.AOLlanguage;
2 K X& H! c) M }, g! L if current = @.Destination -- else return) o2 B% @$ i. f$ e- I
then- }/ t; V" E) T. t3 s6 q) F! |
@.Destination := void;% F6 ~3 h0 l3 w3 a* p
if @.occupied then
) x7 d1 K7 O R part := @.cont;
, k0 n0 S' r- m6 y @.transpOrder := void;
- V+ b9 {' `3 h" p- | part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* Y5 U: v9 M% G/ |2 G q% g
@,root.eventcontroller.simTime);9 k( L* G, J2 e, L( q# \3 Z1 H1 C
@.HasOrder := false;
. M/ {/ k9 w$ E$ @7 j) i @.DrivingHome := true;
& w9 ~6 G+ H+ U! ?6 [7 r8 s- G, q rgManager.tryToStartTransOrder;8 F+ p! Y% X1 R9 G( C3 C7 x
if @.Destination = void; B/ q H1 V, j l
then -- no transport order for vehicle @3 u* R/ s" z! N1 N* o- p9 P
@.Destination :=
7 U% A1 ^4 A$ {7 |3 Y rgManager.nearestFreeStation(@,track.~);
/ a% y, L) r3 P* Z newDirection(@);
' X- x6 f+ x0 P) p* S$ { if @.Destination /= void then; I+ ?' L! ?: |; N/ P
@.Destination.NumReservation :=4 u h: ^1 b/ j8 ]/ @: G/ g. n
@.Destination.NumReservation + 1;5 M7 E% Q! @/ A* O" ^ [2 z" B
end;! o R* b# F9 s( W$ n4 y8 E
@.CurrIcon := "drivingHome";
) O! P1 R9 H6 t7 s) O o @.DrivingHome := true;2 i; k3 {! x# b' J* t V8 C" ^
end;
% l: \0 f+ n( B+ s, x( i$ O) | else -- the vehicle @ is empty, both vehicle and part are in the same dock station* e9 y4 O1 ^# J2 {! b
part := @.transpOrder;/ O3 H, J( h" G7 a. K, ?7 C1 w4 J8 H
part.move(@);-- load part
& G' B7 |8 ~% k5 b% r8 U @.CurrIcon := "load";( y9 O9 G! Z. k5 v. }5 H3 w
GlobalDistObj := part.globDestination;# E6 T* N8 P f% L- R/ J
assignLObj := rgmanager.rgAssignL;
/ B' h( t+ b% R0 W7 G row := assignLObj.getRowNo(GlobalDistObj);6 W+ I0 }, A7 _1 `
if Row = -1 then -- since 70
) f2 ^' m: d% f. e4 |: k if lan=1 then: w% d+ g) r* i" b K* b5 ?4 F j
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' F6 x) g5 y5 T
to_str("in der Andockstation: \"",?.~.name,"\""));. u4 l: w/ g+ O9 {' V3 L( a8 d
else
6 y/ E! o- @. H' R2 }+ H( Q5 L promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 |9 m, _; K/ x( k# e to_str("in docking station: \"",?.~.name,"\""));
' n: q" j6 l, @( S9 @$ B end;
1 T4 Z f. d& ~6 y8 z. e3 L else
, H% H% H9 W0 l ?' I: X @.Destination := assignLObj[1,row];
3 w; J- [7 y4 v7 q3 X end;
: ]* c/ E7 Z: [! d newDirection(@);
. e/ e1 N7 o- y) `, Q# u4 ?7 G @.HasOrder := true;
5 T$ O; g' B/ a7 p; C# F end;
8 v/ S3 o# t/ `2 n end;
# d+ U3 H& Q# O6 {end; -- of the method
$ y$ ]! v+ B* g2 M. u! f |