/* called by: entrance ctrl of the object 'track'
0 ^" Z9 i" v1 m+ X. b*/
" |# ^2 c! ^* m0 Y# {is! Z1 ]: g; D4 w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 S; k: r2 D8 a; _, {7 b7 W) wdo
R2 x& q1 q1 V5 g Lan := rootfolder.Internal.Tools.AOLlanguage;
0 S9 S8 f, s9 e# ? if current = @.Destination -- else return
# I: P6 E/ G& U# @1 G then3 g0 l" P" `! q9 h) U6 T
@.Destination := void;
5 V4 m1 M9 N! o8 z/ _0 O. ` if @.occupied then
7 U6 Q1 }$ C M I1 R& \, Z part := @.cont;
" M3 h1 m! W4 k, ? @.transpOrder := void;
4 J+ J! s% \0 I: i2 N- }. d part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" Z* _3 z! j% U( |0 W0 m @,root.eventcontroller.simTime); ^0 ], [1 a+ [' n) i8 q6 m# {
@.HasOrder := false;8 M" k) \0 p$ M ?
@.DrivingHome := true;0 c2 K$ l# O" E N o5 d
rgManager.tryToStartTransOrder;) i* h3 s7 @, a4 c$ g% m
if @.Destination = void
( x: `" s: L% C4 J- Z3 L then -- no transport order for vehicle @
; L" Q- v+ n1 B! U @.Destination :=# p- a& E% W1 w( a
rgManager.nearestFreeStation(@,track.~);; x$ `* n- u9 L+ @" ^
newDirection(@); : l+ U0 ]7 N% `
if @.Destination /= void then6 Z& a( `$ z3 p
@.Destination.NumReservation :=
# j0 x. C \4 Z$ P6 Y% @ @.Destination.NumReservation + 1;" d6 R2 ]! c: `& {- `! p
end;
9 N5 U2 m+ P2 D( v& ]( L) Z @.CurrIcon := "drivingHome";
5 O9 w% a0 k3 L# c! f. ^( H# @ @.DrivingHome := true;
# V7 x9 _" Z. d4 X; t# B4 F+ f; q end;
/ c$ W2 D) R0 [ \. V4 q( ^3 o else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: G# p0 D' @6 p part := @.transpOrder;3 F0 ]* c7 q) `: x
part.move(@);-- load part
; J- y1 @& ^5 y6 ^3 K' \ @.CurrIcon := "load";$ b: @0 O. [7 b o7 ?3 y5 u
GlobalDistObj := part.globDestination;
' @, D9 O% q1 {' ]& }& | assignLObj := rgmanager.rgAssignL;" p' e2 |: W* d. {4 d: L+ E; q/ U
row := assignLObj.getRowNo(GlobalDistObj);% [: {* V7 E8 X2 [2 x
if Row = -1 then -- since 70
& c$ r3 M. v8 A, h if lan=1 then+ w9 p, ~1 v+ \9 h9 Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 c% I' q {" J8 G1 b% M6 h to_str("in der Andockstation: \"",?.~.name,"\""));
' `& n( s+ F" M1 K) z else
8 ]# s) w5 S V. X! b0 h promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 U6 d$ h2 o% F6 f3 j: P y+ I
to_str("in docking station: \"",?.~.name,"\""));
8 i" M( n# r$ `- J0 Y ? end;
2 h+ g! B) @- M9 V; O( `% q! E else1 o8 A! \1 o8 [ H# n8 j) b
@.Destination := assignLObj[1,row];
4 L4 w4 A5 F( C end;
6 z0 b p, m4 u H3 U2 j newDirection(@);
7 h: P) I6 c5 H @.HasOrder := true;! Z2 [$ v* n5 e2 M0 k0 j/ h
end;1 s4 p$ F$ n! b" B% U
end;1 S( W+ D$ w5 W! L
end; -- of the method
3 \: `- T" x. X/ x1 w |