/* called by: entrance ctrl of the object 'track'
. ?0 d* Y( g6 k2 s*/3 Z6 y0 [; L! i; r) t
is
7 Z0 e$ ^" D* B% J) ?' ?" E part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 y$ s# H& c" f' Q2 L
do# d- q! D7 t' o1 @! G# @. {
Lan := rootfolder.Internal.Tools.AOLlanguage;+ C- e% R, \4 M. M
if current = @.Destination -- else return
( z$ r3 r; `; E) v. P! g N7 J, r then
9 ?' A' k. ^$ \$ R @.Destination := void;
& `; y/ A$ l' ~7 y if @.occupied then# B1 |; @1 `2 e% ?4 Z# `& O
part := @.cont;/ h; r n4 X% d5 g
@.transpOrder := void;
/ J1 k) i8 B5 [' Q4 z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 h/ r- v; i$ O U( E8 e @,root.eventcontroller.simTime);1 i4 R$ N* K- `& Z1 I3 J8 K, H
@.HasOrder := false;$ r9 o+ L+ S- R+ [
@.DrivingHome := true;. p, M8 Q6 }# S
rgManager.tryToStartTransOrder;
" U$ R8 ^+ e! W% O6 O: O1 H! O Z if @.Destination = void
6 @. `8 ~% z9 Y& |1 K, D2 ~ then -- no transport order for vehicle @1 @5 `" M/ ?* y6 D* |7 f
@.Destination :=& }$ m' z+ _0 W5 `7 v" X9 T
rgManager.nearestFreeStation(@,track.~);$ t! n% m: U! U
newDirection(@);
: N" ?2 W3 n0 z. H0 F if @.Destination /= void then
3 B3 M% z$ Q7 `" W f, Z @.Destination.NumReservation :=
^/ Z0 T2 z" ~ M4 V( Y @.Destination.NumReservation + 1;3 k+ | r* V- ], c8 A8 Q4 i
end;# I& x) e+ q* c
@.CurrIcon := "drivingHome";- V3 _- m" ?# X Y6 Q
@.DrivingHome := true;
) b- a* B4 t$ }! [; U2 R' ^# N# A l end;; ~' E+ g% u9 }/ H2 M. T# Y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ o! K8 i6 m, K( n7 y0 ?3 Y9 _) u/ M; C
part := @.transpOrder;# X- D5 o6 {( E: s6 Z
part.move(@);-- load part) |7 {/ @7 v. \3 B! ]
@.CurrIcon := "load";5 L, j) X% `# B4 k9 d% R
GlobalDistObj := part.globDestination;
; J# Q3 {/ c) D' o0 i assignLObj := rgmanager.rgAssignL;9 ^* q# x( G8 i Y4 _
row := assignLObj.getRowNo(GlobalDistObj);$ v' U% W! a; ?' s: r. v- ]! P; t9 b
if Row = -1 then -- since 705 h [# k8 n) Q' X* `
if lan=1 then( F4 ~/ c# ^% c* [" C1 V8 w% K
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 b4 O; \" g1 n0 `, R/ K4 I% ^
to_str("in der Andockstation: \"",?.~.name,"\""));- e5 B0 U% V% i
else
7 }/ s! O# Q2 {' L4 v6 t promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) \+ A* [1 V( r- z2 {" F8 N1 z! u- k
to_str("in docking station: \"",?.~.name,"\"")); + G: S0 N# T+ G( ~
end;6 W9 O+ f8 E7 l$ g! N2 |3 M
else
* w6 Z5 u. d. p4 q. Z @.Destination := assignLObj[1,row];8 y9 p6 B9 B5 L6 p" d
end; ?! u% [# G( m% m
newDirection(@);5 J5 T' o1 X/ Q$ z
@.HasOrder := true;
( a1 Q# [3 W9 I! {" t% Q; B" { end;
6 ^) M8 N. Q p: ? end;
) Y, x' f; `2 tend; -- of the method
2 Z5 N8 ]+ d z$ a5 t; g' E1 @( { |