/* called by: entrance ctrl of the object 'track'
6 s* }# w# C/ E g*/' z" [. b" _. K! s" g, A
is
; D7 z' D6 p4 N f, p1 e part, GlobalDistObj, assignLObj:object;row,Lan:integer;) b f* W4 U0 e* `
do9 d, g) c" A# d+ j3 p
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 E) u9 j: L$ B( U! k if current = @.Destination -- else return
1 m7 H2 l: \+ F0 @8 n then) D6 H; }8 L% W* N5 J: m
@.Destination := void;
6 D: v6 r9 t9 q7 B if @.occupied then$ A( Z$ B+ t8 R$ g6 p5 b
part := @.cont;
8 [' w. v( }' Y9 ^% ^6 f @.transpOrder := void;; b5 ?8 u V1 Z) ~# I S% D
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: j( |! I- }" x- E3 m& h! B @,root.eventcontroller.simTime);
. s1 t, \0 n( ^ @.HasOrder := false;
" |2 j$ L9 }0 L( l0 V, J @.DrivingHome := true;" b- b& Z4 z5 S& q1 i1 `* F
rgManager.tryToStartTransOrder;& a( p. x$ f$ V4 w8 `
if @.Destination = void
6 U. ~: [ i ? then -- no transport order for vehicle @7 x# C: V1 z: o* u. A* v L6 |
@.Destination :=
7 T E2 t) B" {) q* K rgManager.nearestFreeStation(@,track.~);
" H( f4 Y1 g4 j newDirection(@); 9 s' r6 C4 h* I! `
if @.Destination /= void then
- J+ Z5 }/ y4 a. U @.Destination.NumReservation :=
' ~4 s9 h$ D3 v& c+ M5 \7 Q0 r% v @.Destination.NumReservation + 1;
) t( ?8 z3 m% H: ]' \, s end;
! f4 s. @7 N* z2 b+ p @.CurrIcon := "drivingHome";( ^% O+ k, }, y# ^1 X
@.DrivingHome := true;
& E& m M& C, H b) y) q5 C end;
% b! S/ u. z4 K5 A+ Z" {1 y2 n else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 G9 ` p! ~/ _
part := @.transpOrder;
1 { F( n% U+ w) R% d part.move(@);-- load part- }4 A ^' P/ q F; f
@.CurrIcon := "load";' a# L) H* j' o" { X3 W
GlobalDistObj := part.globDestination;/ K2 z9 V: C/ j+ Y# b' \, n; x
assignLObj := rgmanager.rgAssignL;
" Y* Z6 f: \4 A2 _& b4 }0 X- a0 V row := assignLObj.getRowNo(GlobalDistObj);4 M9 V' V& o3 b2 l2 Z" r" {1 m2 `
if Row = -1 then -- since 702 p' t* D A: W5 I! ~3 a; x
if lan=1 then
) M. V! d% ^' Y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& @$ Z: c0 c9 d8 } to_str("in der Andockstation: \"",?.~.name,"\""));- C6 d9 P. m1 d. v2 \6 \8 G
else0 ^2 G/ W* o4 |; r5 W5 C
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* J; e, J: ^+ j to_str("in docking station: \"",?.~.name,"\"")); ' s$ `0 E/ ?2 F- n2 s
end;: V5 `4 k. g* J9 t
else
. l& I8 Z% q- V) B; g4 n @.Destination := assignLObj[1,row];! _8 u9 [6 P @, {! {5 n
end; ; h! ?. ?0 l3 p6 P9 N9 M
newDirection(@);
7 ^7 L$ A- k3 ` @.HasOrder := true;
- S+ S" w3 t2 e1 ~4 y end;) h2 @' I, Y2 j# r! j' A! V$ c/ l1 I
end;7 o1 ?, l' D% @+ Q
end; -- of the method
! x7 ?+ {8 |3 z2 q |