/* called by: entrance ctrl of the object 'track'
; A7 Q6 |) Z- l. K*/! a1 D; N ~ s* g) |
is' ^+ Y) b4 t* h9 Q y+ Y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 ^4 s: v) F/ v2 ?' a$ H. hdo7 G! R# j4 `) I2 l7 T" L
Lan := rootfolder.Internal.Tools.AOLlanguage;% }2 A, W S4 X" o
if current = @.Destination -- else return
6 f% \8 l1 r3 j) p0 G9 A then0 |, |+ w& P6 k- [8 ]
@.Destination := void;+ @5 X6 T: s+ y& P8 {$ f6 w5 }
if @.occupied then' P: ~- B+ X: I6 N* K
part := @.cont;% O( C& _5 G5 |6 c6 D
@.transpOrder := void;4 p0 G; R. i) r1 Z- q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ Q5 ?6 P8 G! Y6 ?, ]* S
@,root.eventcontroller.simTime);
: x2 R3 k' p I0 w& w/ Q1 A0 ?# g @.HasOrder := false;
- l- ]+ ]4 k, m1 G+ B( ]+ [7 _ @.DrivingHome := true;
# K3 u1 e A7 J rgManager.tryToStartTransOrder;
+ P+ S5 D; W4 v' G, w% o; d9 V6 U& q if @.Destination = void, ^7 \3 c1 x8 C& k! c5 a
then -- no transport order for vehicle @$ x- F6 ^- O: j
@.Destination :=( I! d8 l0 |/ C3 W. q! K, |- ]2 s
rgManager.nearestFreeStation(@,track.~);: j( r8 }! \. Z& N% }9 T- I
newDirection(@);
9 {6 z* |( r- w2 o if @.Destination /= void then* G% r0 r' R$ L# b+ E8 J4 ~
@.Destination.NumReservation :=
0 v# t8 z" s; C! [5 k @.Destination.NumReservation + 1;, Y, I2 G7 U0 p8 J3 s
end;
6 k, j# }1 _1 }+ u. x @.CurrIcon := "drivingHome";9 s& i: ]+ ~. |1 h
@.DrivingHome := true;
. V+ a7 {4 O) G' [; k9 f" Z, P- m end;# x# F' W }& h" l% M9 }
else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 i2 D- `7 d% J
part := @.transpOrder;
" g4 z# t# P4 z5 b& i& [ part.move(@);-- load part
5 q( C" Q4 _( r2 A @.CurrIcon := "load";
! E5 v' M' i# a3 G; G2 a GlobalDistObj := part.globDestination;
, V5 M+ t$ R# { assignLObj := rgmanager.rgAssignL;
0 {, H ]: A3 `9 Z- ]% ` row := assignLObj.getRowNo(GlobalDistObj);5 ?+ ?7 g7 {& a3 M ~$ l
if Row = -1 then -- since 70
. u5 R. }. H3 U7 g5 G4 H if lan=1 then
& h: |8 j: z$ s# T2 _ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," ^2 J' R0 P$ g- u' A8 H
to_str("in der Andockstation: \"",?.~.name,"\""));6 G( C' F. z/ z* J
else6 \' Y( _9 F6 I1 Z* j
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 z( C9 s: V( f, [6 C% y" m to_str("in docking station: \"",?.~.name,"\""));
1 l9 F2 N" {4 j$ v5 J, H4 V1 a7 Y6 v end;8 B e! k, A7 x6 Y0 Z
else
4 E8 J0 z0 r1 x4 V& r @.Destination := assignLObj[1,row];
7 ?( h. n$ L6 @5 K+ Z% k end; % `# e$ u, S3 b+ X( |! q; s# E
newDirection(@);
. V* b) e# l* Y, E8 r @.HasOrder := true;8 y) M$ C" Q/ E% b$ z9 p3 v
end;
) I; N# B5 X, v# o/ B4 @ end;! S" G, O, q) ?/ D* {& y" J
end; -- of the method
# h; E; \+ G! K5 b! f |