/* called by: entrance ctrl of the object 'track'0 s4 A# T# x, ^+ _1 c9 ^
*/
1 R/ C$ e9 C; m5 ~% i/ ^is
. [, L" d& \1 p part, GlobalDistObj, assignLObj:object;row,Lan:integer;
m I/ d& A7 o$ k: ido
. p& h5 x" p2 j% N4 q8 n3 l Lan := rootfolder.Internal.Tools.AOLlanguage;; Z2 O" K* r5 d3 A6 Z% C2 ?
if current = @.Destination -- else return
2 i& w" l" e2 g! d then
0 g+ k+ Q$ k4 V; c. Z @.Destination := void;
4 e. W2 a* |* p1 s4 o5 { if @.occupied then8 j4 q% U1 O) X3 _1 J
part := @.cont;
+ P' G0 r$ Z! @ p6 G @.transpOrder := void;4 Z2 K. W( r8 t/ P( K
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 j5 z! {! p# d1 S0 |% @ @,root.eventcontroller.simTime);* |; ?3 ?, Y' t3 J. \ }! O
@.HasOrder := false;1 P9 q" ?3 i* p& M+ d# d* j0 ?8 H
@.DrivingHome := true;
Z. y( j9 J* x) n& n7 f' O4 N$ Z rgManager.tryToStartTransOrder;* |7 C; C; {" Q+ s; n3 T
if @.Destination = void; w0 B2 _. y" M" E: _
then -- no transport order for vehicle @" G: Q" ?0 l9 @5 G+ r* u
@.Destination :=! \1 P; q+ n1 ~: K
rgManager.nearestFreeStation(@,track.~);+ W" \; O3 F3 E- O) n( A
newDirection(@); 0 ^6 ^! J! n) Y& R! C" |
if @.Destination /= void then
: q: s- e( S) f& q) ]# m @.Destination.NumReservation :=- C# T0 W5 k% L0 [. H: [; H6 x
@.Destination.NumReservation + 1;
& V, a) s) j' N+ n end;% S! R8 F0 s" n0 Q& j
@.CurrIcon := "drivingHome";
. G) _" p! C6 _6 j0 j- J. Z y @.DrivingHome := true;
; d! c, [( \; j; w& o: Q. D' o end;
: W8 ]8 M' B' Y e4 C5 [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ b, U6 U7 d) }* o' R part := @.transpOrder;
6 }) a2 O" |& I* Y# {) k part.move(@);-- load part. q" J; Q- s: v7 ?5 L* E Y: a
@.CurrIcon := "load";
: K- U6 |; U* G( N GlobalDistObj := part.globDestination;
% ?/ h y! f! z2 Y- u& j; G- t* I/ _ assignLObj := rgmanager.rgAssignL;5 u# n8 Q; l" L
row := assignLObj.getRowNo(GlobalDistObj);9 `: n& i/ u- T7 W6 @; w
if Row = -1 then -- since 70
# V5 X0 t& m3 m, M# B9 } if lan=1 then! s3 I' P) i! u; ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' }' r% m1 O! b; w to_str("in der Andockstation: \"",?.~.name,"\""));" ?; f* A* G9 s6 ?/ g% K9 O2 A& d
else
, o( f9 R- x; A9 h# |5 q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. h9 D* h. w9 V: }* q; } to_str("in docking station: \"",?.~.name,"\"")); 1 S3 ^$ ^5 N: r) v% Z/ d- @
end;
9 } o) o0 ?' ^$ z/ z else
+ T7 q* R' i) }3 l$ X/ B, q* K @.Destination := assignLObj[1,row];% @* S: I P$ \
end;
( d3 w3 g6 X3 M- i8 f- ?& A newDirection(@);
+ s1 k0 e6 V, {0 |2 f' N! {2 P( S @.HasOrder := true;7 R! k3 W: i( \
end;" y( a4 \; m2 E2 A; G, Q5 G- P
end;
; {% h, H g9 f; O3 lend; -- of the method7 Y1 J+ |3 r8 }8 U* n8 L G4 C0 @+ m
|