/* called by: entrance ctrl of the object 'track'
, y+ L2 k( ^9 a5 j*/7 u) G- n3 A) X- [* j' R6 {- p
is, H3 G4 T; O a7 K9 ~
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, G/ |0 J `, J6 u7 Tdo4 X" R, ~8 C' a8 b& {
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 t9 Z# t/ t7 J1 W% C if current = @.Destination -- else return
% E: _0 w6 X. Q8 N then( L% X- J* I7 z/ Z' c/ N
@.Destination := void;
% }; `0 U7 O6 i1 V& o if @.occupied then) u9 [6 D/ ?& R9 H" s+ U5 Z, ^
part := @.cont;; c+ ?" v. k& z3 g9 d0 ^9 ~- q' i
@.transpOrder := void;
7 i2 S2 @2 a2 e3 x. d" Z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! x9 `! f0 A, \! G H' C( Z% L0 V3 R5 x* G
@,root.eventcontroller.simTime);
8 g# V1 F5 w7 E6 _* K% f @.HasOrder := false;
# S( E+ y; J/ d' z* H! ?$ S @.DrivingHome := true;6 A7 m7 I$ t; H3 d8 `
rgManager.tryToStartTransOrder;% ~) u* x3 }5 P. w. D
if @.Destination = void
: O6 T* z: i6 R2 [+ F then -- no transport order for vehicle @
+ i G1 g0 z- ~( V; r @.Destination :=" |5 r& x! \5 ?8 N3 h, d1 D2 f0 a: e
rgManager.nearestFreeStation(@,track.~);& v) r3 s) g' @) b) X, u( P
newDirection(@);
% B% m4 \5 U, H9 s3 ~0 ~" d if @.Destination /= void then, d, [% c2 c; _/ u" A d" {7 r- k' h
@.Destination.NumReservation := c1 r. p9 d4 v2 d5 p: ^, ?8 C! o
@.Destination.NumReservation + 1;% e' J% A+ b* w, E+ A# M2 B# l
end;
' f m) w/ j0 R @.CurrIcon := "drivingHome";+ L8 H* L. y X& B8 _
@.DrivingHome := true;3 G! p9 v7 B( X3 b, B9 T( Z& i; M
end;
2 X3 \* I% Y; g! c+ E else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 h/ w b( N' C% g4 `- V" ]
part := @.transpOrder;
& h- _- X# ^5 H0 U$ d part.move(@);-- load part1 a; q9 E+ f! P3 }
@.CurrIcon := "load";
- d, w( Q# D f. ^. X# f$ t6 @ GlobalDistObj := part.globDestination;8 q/ F0 X- M# ~! i3 J. q& }
assignLObj := rgmanager.rgAssignL;% O6 G3 p* F8 m$ `
row := assignLObj.getRowNo(GlobalDistObj);
& q0 Z& u- x1 g' V6 i( b/ E if Row = -1 then -- since 70
# X1 o2 i" R- N# A; I; G4 K* | if lan=1 then5 R6 j1 n" p8 z5 w' O4 @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- g: c0 D7 R, _& j/ ]0 b
to_str("in der Andockstation: \"",?.~.name,"\""));
( X1 \! s3 j ?: T6 X$ r else
3 ^9 a9 A. `) N. N* Z7 @2 i promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* K" l3 A2 g- J
to_str("in docking station: \"",?.~.name,"\"")); ! Y0 Y+ c5 c1 \/ U1 C5 J% O
end;
- @9 W% z5 w9 | else
2 `, _& d. G, m- b ? @.Destination := assignLObj[1,row];/ ]8 D, I$ S- g# _
end; # B$ s& N" D. x. w! K- Y+ S
newDirection(@);8 h# p7 ^% @0 Q! _* a
@.HasOrder := true;7 l# v: R$ @/ M+ I a
end;, H* U. W P% B8 G/ }
end;
! Z$ {+ S2 ]6 gend; -- of the method
c8 ] C, J& \. {9 A" C; A' S |