/* called by: entrance ctrl of the object 'track'
: h" a. v; w9 L*/1 Y1 m$ [" {' A9 P) [) o; }, `
is7 P! A4 M* {/ D6 c& O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 l" Q; o2 x& F) R2 `% n2 [/ Ido
# C) x) m" d; A4 e Lan := rootfolder.Internal.Tools.AOLlanguage;- }0 W d L- @/ K1 T' a5 M; o/ t
if current = @.Destination -- else return
' _2 h4 a" e# \' y then* c* d; n$ {! a$ i5 F" Q
@.Destination := void;5 P# J+ }* c y {( P! L* g* ^
if @.occupied then
1 g% v1 E# Y6 U part := @.cont;+ G6 o3 {! v7 o% y- o3 a
@.transpOrder := void;) b2 ~& w" W. y! O. X& [* P9 D. r. \
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# y3 @) i: P$ S2 Z4 [
@,root.eventcontroller.simTime);% ?# v; |2 v8 Y4 t9 p" _" f
@.HasOrder := false;/ m2 r4 g, B6 x5 L: I
@.DrivingHome := true;
* j4 u' @- a6 \3 C3 m% K- m/ s' L rgManager.tryToStartTransOrder;
2 e5 _$ t0 j% a) O. b# X" v1 i if @.Destination = void+ q0 O& h8 D: {8 X
then -- no transport order for vehicle @. f" p J, q2 I* P$ K% V5 |
@.Destination :=
& d) g' y( i% E+ G7 p. i rgManager.nearestFreeStation(@,track.~);
8 I' b; i1 q6 E/ }* E$ R$ H& a newDirection(@); % P8 z4 g( B4 Z: t3 L
if @.Destination /= void then
V; \% S% }1 e5 X2 ?/ Y& N @.Destination.NumReservation :=
! d0 U8 j7 [) b! t r# K @.Destination.NumReservation + 1;
' F( ]2 o3 _7 _% K3 w8 U8 J end;
- f3 |! u! |6 a. B y% y* l @.CurrIcon := "drivingHome";4 x5 j, A [% j* c% @
@.DrivingHome := true;
$ k5 |4 e g' Y end;4 e9 _! k! L2 U$ E J
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 I3 [! i' c& b# T0 x
part := @.transpOrder;
# Y% b" }8 c8 b part.move(@);-- load part+ t! [- J; w" }; ^8 D1 N$ ^% z# O
@.CurrIcon := "load";/ C; U1 `+ u* G1 z8 M" ^
GlobalDistObj := part.globDestination;
( m4 b% F: e3 T9 M assignLObj := rgmanager.rgAssignL;
4 I0 l+ z7 v) q' w/ t) T row := assignLObj.getRowNo(GlobalDistObj);8 ?- s; x7 t8 \8 i* L3 |) n6 c
if Row = -1 then -- since 70
1 A% ^' F2 D4 J0 o* t! @$ ? if lan=1 then U5 D8 e" p& X* i- G
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% a/ i e' b7 P F; P1 J) c to_str("in der Andockstation: \"",?.~.name,"\""));
' B6 H7 I. K! n! {' {+ Z% ^ else+ Q$ |! N+ h |# p
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( W4 I6 v; B2 f( i& y# u7 W1 ` to_str("in docking station: \"",?.~.name,"\"")); 0 p/ a% P4 W4 B" z3 E2 T
end;
7 h T1 x4 C# \ M* F' @" M else4 \: C+ L$ h/ X% m# ^2 X( i
@.Destination := assignLObj[1,row];
' ]4 {4 Y/ v/ n5 h+ h% O1 q. f# P end; # S, _% U) H) u, U3 L6 q
newDirection(@);
+ Y: S7 R2 ]( l5 y @.HasOrder := true;: ?4 ^# s- G l- d( @
end;
* E9 q# C* N! U1 \& M% _! ^ end;( @8 k" m: K9 g2 E* m8 s* v
end; -- of the method9 ?8 n. W8 x/ Q* r: ~( @" _* A
|