/* called by: entrance ctrl of the object 'track'% \/ m/ H) D2 U d! D: x
*/
/ a& S( N8 J8 Zis. V! z7 {* w G; _* ~+ {4 `! v
part, GlobalDistObj, assignLObj:object;row,Lan:integer;( ~; a+ V' m# \8 K! M$ W7 P$ E
do
( Z9 H6 I$ K6 j Lan := rootfolder.Internal.Tools.AOLlanguage;6 G d' T; \$ i+ h
if current = @.Destination -- else return4 L' ]2 T i; r7 r/ ^
then6 \9 X: Q* m: e* S( x! p4 J4 g" W+ E
@.Destination := void;
o# B; ~1 J) r7 L/ C if @.occupied then
- f, _* s8 L; r* U5 |; }3 `1 V part := @.cont;) b8 N* B: o0 D6 B: X% Z" Y4 ~9 q
@.transpOrder := void;8 E# @9 @; G' ^: ~
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 M" F3 B6 b/ Z6 P" c @,root.eventcontroller.simTime);
4 S) g! R1 R1 \ s) g( l( @3 d @.HasOrder := false;
% P9 t! H7 {& f @.DrivingHome := true;
2 \8 G' i5 o/ c rgManager.tryToStartTransOrder;1 a7 Z. b& L+ ]0 x# p
if @.Destination = void
( K. b' l' B7 v: a+ w then -- no transport order for vehicle @; r! p/ X. J9 l) C
@.Destination :=
" Z1 q0 ~. i% d. Q l; s7 ? rgManager.nearestFreeStation(@,track.~);
+ d% d3 G5 A" Z: X2 U+ n2 A newDirection(@);
2 |5 N% `* M- _ if @.Destination /= void then
4 I: b& \6 \0 r @.Destination.NumReservation :=
% c# v) ^! V& O7 j @.Destination.NumReservation + 1;
# [7 H; @" q& t: {1 ? end;
6 e' r. t9 V4 a* w @.CurrIcon := "drivingHome";3 _/ t: ^ E. r6 B! c' j* g
@.DrivingHome := true;0 z* h0 Q& J, g8 m. `1 v) ~
end;; u9 p; b. d$ U+ W' F# c$ g
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( V2 v: g# t8 O* C, Y; h/ J part := @.transpOrder;7 ]9 {+ y1 L3 z9 `2 Q7 i3 o7 Z4 n
part.move(@);-- load part
* c9 ]$ i0 S# P0 x/ t3 R. I7 L @.CurrIcon := "load";, C, A. S. n0 b" ^8 e- [, c
GlobalDistObj := part.globDestination;# {6 m0 Y1 X* G V0 _
assignLObj := rgmanager.rgAssignL;) U# j4 j# f; `2 L6 e* {
row := assignLObj.getRowNo(GlobalDistObj);, z$ D* V' b9 K! U" D. G( D8 Y
if Row = -1 then -- since 70
! v. _* ^& Y Y) f& r1 _ if lan=1 then
! Z7 `/ y6 `+ K5 C" [2 T promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 h- g3 H. X" I. S
to_str("in der Andockstation: \"",?.~.name,"\""));4 }1 @* O9 ?$ X2 [
else
& A, J. F; J% X+ ~# {5 O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 @ L8 V& E' f) R
to_str("in docking station: \"",?.~.name,"\"")); , P R7 ?& p) d; i# E% Y
end;/ F8 S0 W* C7 F
else
$ z1 Q3 A& ^- G, b @.Destination := assignLObj[1,row];/ \2 s1 a1 ?1 M4 G7 J5 q" V
end;
' m. E; t9 h( _- W- V1 D newDirection(@);
- x* B! L$ C: M/ d) i( D; a7 V @.HasOrder := true;" x6 k* z' _5 a5 ]- h
end;
' q/ B0 G' r s- A w; a7 @0 j end;3 q! F/ h1 g+ C; s0 {
end; -- of the method
+ V+ j" d% C3 s; c |