/* called by: entrance ctrl of the object 'track'
9 X" F; T) T. L! ^" K*/
* F# [2 x: s" d6 {6 r- Kis" Z O" C, `/ g% v* B e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ ^, d4 ?, k3 a( N
do ]3 ^# u& Y" X2 u) i+ u3 z
Lan := rootfolder.Internal.Tools.AOLlanguage;
+ W1 b7 e; c) |: ?* T! r if current = @.Destination -- else return
4 w" w$ [7 E1 r7 n3 P then1 b# x# l+ h2 G1 c' C+ u0 p2 l
@.Destination := void;
+ Q I. E$ {! J" l, D" ^ if @.occupied then
- W5 f9 V8 L5 R* Z: Q part := @.cont;
- D& v. o$ R h7 ^- n. v5 f @.transpOrder := void;+ q$ S2 n A" k# `
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* E0 F2 ?* a( F, ~ @,root.eventcontroller.simTime);% t1 B8 l' v& o8 F) ~$ t6 m5 Y# I
@.HasOrder := false;
% }2 `8 G3 `4 ? K- T4 F1 a, w @.DrivingHome := true;
: S- u4 ], p$ j: z! B% C0 Z rgManager.tryToStartTransOrder;
0 N& V; Y+ {) O2 F# i9 E. R if @.Destination = void
: f% q! H4 Y/ x9 G$ p8 l/ _ then -- no transport order for vehicle @. W7 U9 q% L% u3 \( a
@.Destination :=
" }! y! t }- b, u rgManager.nearestFreeStation(@,track.~);
! y0 Y6 V. p" m0 f5 C, [2 s5 Z newDirection(@);
* j" r9 Q; ?, T$ z, y) ` if @.Destination /= void then6 U7 D; ]% M6 d2 M! r& V
@.Destination.NumReservation :=! D' C/ c3 F# R& v- c
@.Destination.NumReservation + 1;9 v7 B Y( S2 a) x% O% g
end;
+ `/ h4 ]6 s ` @.CurrIcon := "drivingHome";
3 [; p8 ?& ]2 h- S* p( x @.DrivingHome := true;' q% e% t' k/ A* l ~
end;
) |& t( D1 D# x4 O; m: Y1 } else -- the vehicle @ is empty, both vehicle and part are in the same dock station* B, `4 i# V% I5 a' Z
part := @.transpOrder;# u, D# u) r6 D8 D9 S, I
part.move(@);-- load part
+ u6 `% a% b- b! w% \. [ @.CurrIcon := "load";/ ^8 Z: B8 a# ^) z4 O4 p
GlobalDistObj := part.globDestination; a3 P: q7 C; G" x5 g
assignLObj := rgmanager.rgAssignL;
8 P0 I1 O @/ c+ F2 a7 u row := assignLObj.getRowNo(GlobalDistObj);$ M) Z8 L/ F; E! w
if Row = -1 then -- since 707 j, B" p5 C7 y3 W
if lan=1 then
2 k- p2 l6 E! U2 U% A. s) G/ T promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# H7 m! X) Z& ~ to_str("in der Andockstation: \"",?.~.name,"\""));
0 r8 s+ H: F/ k$ H: d6 E else
* @2 y- k/ {: N7 @( c) C" N" B promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. j9 m/ I" r$ G' D to_str("in docking station: \"",?.~.name,"\""));
2 R3 }* B+ j: q: ^# {( H end;' |1 S# U9 X2 H
else
; I5 R/ a/ _: @2 ? K @.Destination := assignLObj[1,row];' J7 M% x3 k) P
end; `0 X: C6 Z2 ~+ o. i' J0 N% C3 I
newDirection(@);, H( @0 y- y& P6 A
@.HasOrder := true;: _4 c- L8 F0 E! {' B* v
end;5 o7 {/ h/ q! @, y; B- O6 x! e
end;
' k" x ]! K) R7 r6 e8 d2 g5 W* Cend; -- of the method
; i7 N9 a3 {1 N$ a, C |